ws4kp/dist/resources/ws.min.js
2022-12-13 15:43:43 -06:00

1 line
116 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(()=>{"use strict";var e={407:(e,t,n)=>{var s=n(929),r=n(739),a=n(325),i=n(594);document.addEventListener("DOMContentLoaded",(()=>{c()}));let o=!1;const l=["Land Features","Bay","Channel","Cove","Dam","Delta","Gulf","Lagoon","Lake","Ocean","Reef","Reservoir","Sea","Sound","Strait","Waterfall","Wharf","Amusement Park","Historical Monument","Landmark","Tourist Attraction","Zoo","College","Beach","Campground","Golf Course","Harbor","Nature Reserve","Other Parks and Outdoors","Park","Racetrack","Scenic Overlook","Ski Resort","Sports Center","Sports Field","Wildlife Reserve","Airport","Ferry","Marina","Pier","Port","Resort","Postal","Populated Place"].join(","),c=()=>{document.getElementById("txtAddress").addEventListener("focus",(e=>{e.target.select()})),(0,a.uL)(y),document.getElementById("NavigateMenu").addEventListener("click",g),document.getElementById("NavigateRefresh").addEventListener("click",w),document.getElementById("NavigateNext").addEventListener("click",v),document.getElementById("NavigatePrevious").addEventListener("click",S),document.getElementById("NavigatePlay").addEventListener("click",I),document.getElementById("ToggleFullScreen").addEventListener("click",h);const e=document.getElementById("btnGetGps");e.addEventListener("click",D),navigator.geolocation||(e.style.display="none"),document.getElementById("divTwc").addEventListener("click",(()=>{document.fullscreenElement&&T()})),document.addEventListener("keydown",C),document.addEventListener("touchmove",(e=>{o&&e.preventDefault()})),$("#frmGetLatLng #txtAddress").devbridgeAutocomplete({serviceUrl:"https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/suggest",deferRequestBy:300,paramName:"text",params:{f:"json",countryCode:"USA",category:l,maxSuggestions:10},dataType:"json",transformResult:e=>({suggestions:e.suggestions.map((e=>({value:e.text,data:e.magicKey})))}),minChars:3,showNoSuggestionNotice:!0,noSuggestionNotice:"No results found. Please try a different search string.",onSelect(e){u(e,this)},width:490}),$("#frmGetLatLng").on("submit",(()=>{const e=$("#frmGetLatLng #txtAddress").devbridgeAutocomplete();return e.suggestions[0]&&$(e.suggestionsContainer.children[0]).trigger("click"),!1}));const t=localStorage.getItem("latLonQuery"),n=localStorage.getItem("latLon"),s=localStorage.getItem("latLonFromGPS");if(t&&n&&!s){document.getElementById("txtAddress").value=t,y(JSON.parse(n))}s&&D();const r=localStorage.getItem("play");null!==r&&"true"!==r||M("navButton","play"),document.getElementById("btnClearQuery").addEventListener("click",(()=>{document.getElementById("spanCity").innerHTML="",document.getElementById("spanState").innerHTML="",document.getElementById("spanStationId").innerHTML="",document.getElementById("spanRadarId").innerHTML="",document.getElementById("spanZoneId").innerHTML="",document.getElementById("chkAutoRefresh").checked=!0,localStorage.removeItem("autoRefresh"),localStorage.removeItem("play"),M("navButton","play"),localStorage.removeItem("latLonQuery"),localStorage.removeItem("latLon"),localStorage.removeItem("latLonFromGPS"),document.getElementById("btnGetGps").classList.remove("active")})),document.getElementById("container").addEventListener("swiped-left",(()=>p("left"))),document.getElementById("container").addEventListener("swiped-right",(()=>p("right")))},u=async(e,t)=>{if(t.previousSuggestionValue===e.value)return;const n=(await(0,s.AV)("https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/find",{data:{text:e.value,magicKey:e.data,f:"json"}})).locations[0];n?d(n.feature.geometry):console.error("An unexpected error occurred. Please try a different search string.")},d=(e,t)=>{const n={lat:(0,i.Xp)(e.y,4),lon:(0,i.Xp)(e.x,4)};localStorage.setItem("latLonQuery",document.getElementById("txtAddress").value),localStorage.setItem("latLon",JSON.stringify(n)),y(n,t)},h=()=>(document.fullscreenElement?f():m(),(0,a.yA)()?(0,r.Z)(!0):(0,r.Z)(!1),T(),!1),m=()=>{const e=document.getElementById("divTwc"),t=e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||e.msRequestFullscreen;t?t.call(e,{navigationUI:"hide"}):(window.scrollTo(0,0),o=!0),(0,a.SI)(),T();const n=document.getElementById("ToggleFullScreen");n.src="images/nav/ic_fullscreen_exit_white_24dp_1x.png",n.title="Exit fullscreen"},f=()=>{o&&(o=!1),document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen(),(0,a.SI)();const e=document.getElementById("ToggleFullScreen");e.src="images/nav/ic_fullscreen_white_24dp_1x.png",e.title="Enter fullscreen"},g=()=>(M("navButton","menu"),T(),!1),y=(e,t)=>{e&&(y.latLon=e);const{latLon:n}=y;n&&(document.getElementById("txtAddress").blur(),(0,a.QE)(),(0,a.un)(n,t))},p=e=>{if("left"===e)v();else S()},w=()=>((0,a.HC)(),y(),T(),!1),v=()=>(M("navButton","next"),T(),!1),S=()=>(M("navButton","previous"),T(),!1);let b=null;const T=()=>{document.activeElement.blur(),document.getElementById("divTwcBottom").classList.remove("hidden"),document.getElementById("divTwcBottom").classList.add("visible"),b&&(clearTimeout(b),b=null),b=setTimeout((()=>{document.fullscreenElement&&(document.getElementById("divTwcBottom").classList.remove("visible"),document.getElementById("divTwcBottom").classList.add("hidden"))}),2e3)},C=e=>{const t=e.keyCode||e.which;if((Date.now()-C.lastButton??0)<200)return!1;if(C.lastButton=Date.now(),document.fullscreenElement||document.activeElement===document.body)switch(t){case 32:return I(),!1;case 39:case 34:return v(),!1;case 37:case 33:return S(),!1;case 36:return g(),!1;case 48:return w(),!1;case 70:return h(),!1}return!1},I=()=>(M("navButton","playToggle"),T(),!1),M=(e,t={})=>{(0,a.yw)({type:e,message:t})},D=async()=>{if(!navigator.geolocation)return;const e=document.getElementById("btnGetGps");if(e.classList.contains("active"))return e.classList.remove("active"),void localStorage.removeItem("latLonFromGPS");e.classList.add("active");const t=await(async()=>new Promise((e=>{navigator.geolocation.getCurrentPosition(e)})))(),{latitude:n,longitude:s}=t.coords,r=document.getElementById("txtAddress");r.value=`${(0,i.Xp)(n,4)}, ${(0,i.Xp)(s,4)}`,d({y:n,x:s},(e=>{console.log(e);const t=e.properties.relativeLocation.properties,a=`${t.city}, ${t.state}`;localStorage.setItem("latLon",JSON.stringify({lat:n,lon:s})),localStorage.setItem("latLonQuery",a),localStorage.setItem("latLonFromGPS",!0),r.value=`${t.city}, ${t.state}`}))}},428:(e,t,n)=>{n.d(t,{Z:()=>d});var s=n(138),r=n(732),a=n(38),i=n(159),o=n(325);class l extends i.Z{constructor(e,t){super(e,t,"Almanac",!0),this.backgroundImage0=(0,s.a)("images/BackGround3_1.png"),(0,s.b)("images/2/Full-Moon.gif"),(0,s.b)("images/2/Last-Quarter.gif"),(0,s.b)("images/2/New-Moon.gif"),(0,s.b)("images/2/First-Quarter.gif"),this.timing.totalScreens=1}async getData(e){if(!super.getData(e))return;const t=e??this.weatherParameters,{sun:n,moon:s}=this.calcSunMoonData(t);this.data={sun:n,moon:s},this.setStatus(a.Z.loaded),this.getDataCallback()}calcSunMoonData(e){const t=[SunCalc.getTimes(new Date,e.latitude,e.longitude),SunCalc.getTimes(r.ou.local().plus({days:1}).toJSDate(),e.latitude,e.longitude)],n=[];let s=r.ou.local().minus({days:1}),{phase:a}=SunCalc.getMoonIllumination(s.toJSDate()),i=0;do{const e=a;s=s.plus({days:1}),a=SunCalc.getMoonIllumination(s.toJSDate()).phase,e<.25&&a>=.25&&n.push(this.getMoonTransition(.25,"First",s)),e<.5&&a>=.5&&n.push(this.getMoonTransition(.5,"Full",s)),e<.75&&a>=.75&&n.push(this.getMoonTransition(.75,"Last",s)),e>a&&n.push(this.getMoonTransition(0,"New",s)),i+=1}while(i<=30&&n.length<4);return{sun:t,moon:n}}getMoonTransition(e,t,n,s=0){let r=n,{phase:a}=SunCalc.getMoonIllumination(r.toJSDate()),i=0;const o={hours:0===s?-1:0,minutes:1===s?1:0,seconds:2===s?-1:0,milliseconds:3===s?1:0};let l=(t,n)=>t<e&&n>=e;s%2==0&&(l=(t,n)=>t>e&&n<=e);do{const n=a;if(r=r.plus(o),a=SunCalc.getMoonIllumination(r.toJSDate()).phase,a>.9&&(a-=1),l(n,a)){if(s>=3)break;return this.getMoonTransition(e,t,r,s+1)}i+=1}while(i<1e3);return{phase:t,date:r}}async drawCanvas(){super.drawCanvas();const e=this.data,t=r.ou.local(),n=t.plus({days:1});this.elem.querySelector(".day-1").innerHTML=t.toLocaleString({weekday:"long"}),this.elem.querySelector(".day-2").innerHTML=n.toLocaleString({weekday:"long"}),this.elem.querySelector(".rise-1").innerHTML=r.ou.fromJSDate(e.sun[0].sunrise).toLocaleString(r.ou.TIME_SIMPLE).toLowerCase(),this.elem.querySelector(".rise-2").innerHTML=r.ou.fromJSDate(e.sun[1].sunrise).toLocaleString(r.ou.TIME_SIMPLE).toLowerCase(),this.elem.querySelector(".set-1").innerHTML=r.ou.fromJSDate(e.sun[0].sunset).toLocaleString(r.ou.TIME_SIMPLE).toLowerCase(),this.elem.querySelector(".set-2").innerHTML=r.ou.fromJSDate(e.sun[1].sunset).toLocaleString(r.ou.TIME_SIMPLE).toLowerCase();const s=e.moon.map((e=>{const t={},n=e.date.toLocaleString({month:"short",day:"numeric"});return t.date=n,t.type=e.phase,t.icon={type:"img",src:c(e.phase)},this.fillTemplate("day",t)})),a=this.elem.querySelector(".moon .days");a.innerHTML="",a.append(...s),this.finishDraw()}async getSun(){return new Promise((e=>{this.data&&e(this.data),this.getDataCallbacks.push(e)}))}}const c=e=>{switch(e){case"Full":return"images/2/Full-Moon.gif";case"Last":return"images/2/Last-Quarter.gif";case"New":return"images/2/New-Moon.gif";default:return"images/2/First-Quarter.gif"}},u=new l(8,"almanac");(0,o.G1)(u);const d=u.getSun.bind(u)},172:(e,t,n)=>{n.d(t,{Z:()=>g});var s=n(38),r=n(138),a=n(929),i=n(791),o=n(206),l=n(372),c=n(159),u=n(325),d=n(594);class h extends c.Z{constructor(e,t){super(e,t,"Current Conditions",!0),this.backgroundImage=(0,r.a)("images/BackGround1_1.png")}async getData(e){const t=super.getData(e),n=e??this.weatherParameters;let i,o,c=0;for(;!i&&c<n.stations.length;){o=n.stations[c],c+=1;try{if(i=await(0,a.AV)(`${o.id}/observations`,{cors:!0,data:{limit:2},retryCount:3,stillWaiting:()=>this.stillWaiting()}),null===i.features[0].properties.temperature.value||null===i.features[0].properties.windSpeed.value||null===i.features[0].properties.textDescription)throw i=void 0,new Error(`Unable to get observations: ${o.properties.stationIdentifier}, trying next station`)}catch(e){console.error(e)}}if(!i)return console.error("All current weather stations exhausted"),this.enabled&&this.setStatus(s.Z.failed),void this.getDataCallback(void 0);this.data={...i,station:o},this.getDataCallback(),t&&((0,r.b)((0,l.H8)(i.features[0].properties.icon)),this.setStatus(s.Z.loaded))}parseData(){if(!this.data)return!1;const e={},t=this.data.features[0].properties;e.observations=t,e.Temperature=Math.round(t.temperature.value),e.TemperatureUnit="C",e.DewPoint=Math.round(t.dewpoint.value),e.Ceiling=Math.round(t.cloudLayers[0]?.base?.value??0),e.CeilingUnit="m.",e.Visibility=Math.round(t.visibility.value/1e3),e.VisibilityUnit=" km.",e.WindSpeed=Math.round(t.windSpeed.value),e.WindDirection=(0,i.mt)(t.windDirection.value),e.Pressure=Math.round(t.barometricPressure.value),e.HeatIndex=Math.round(t.heatIndex.value),e.WindChill=Math.round(t.windChill.value),e.WindGust=Math.round(t.windGust.value),e.WindUnit="KPH",e.Humidity=Math.round(t.relativeHumidity.value),e.Icon=(0,l.H8)(t.icon),e.PressureDirection="",e.TextConditions=t.textDescription,e.station=this.data.station;const n=t.barometricPressure.value-this.data.features[1].properties.barometricPressure.value;return n>150&&(e.PressureDirection="R"),n<-150&&(e.PressureDirection="F"),e.Temperature=(0,d.NE)(e.Temperature),e.TemperatureUnit="F",e.DewPoint=(0,d.NE)(e.DewPoint),e.Ceiling=100*Math.round((0,d.AD)(e.Ceiling)/100),e.CeilingUnit="ft.",e.Visibility=(0,d.dp)(t.visibility.value/1e3),e.VisibilityUnit=" mi.",e.WindSpeed=(0,d.Kh)(e.WindSpeed),e.WindUnit="MPH",e.Pressure=(0,d.MO)(e.Pressure).toFixed(2),e.HeatIndex=(0,d.NE)(e.HeatIndex),e.WindChill=(0,d.NE)(e.WindChill),e.WindGust=(0,d.Kh)(e.WindGust),e}async drawCanvas(){super.drawCanvas();const e={},t=this.parseData();e.temp=t.Temperature+String.fromCharCode(176);let n=t.observations.textDescription;n.length>15&&(n=m(n)),e.condition=n,e.wind=t.WindDirection.padEnd(3,"")+t.WindSpeed.toString().padStart(3," "),t.WindGust&&(e["wind-gusts"]=`Gusts to ${t.WindGust}`),e.location=(0,o.a)(this.data.station.properties.name).substr(0,20),e.humidity=`${t.Humidity}%`,e.dewpoint=t.DewPoint+String.fromCharCode(176),e.ceiling=0===t.Ceiling?"Unlimited":t.Ceiling+t.CeilingUnit,e.visibility=t.Visibility+t.VisibilityUnit,e.pressure=`${t.Pressure} ${t.PressureDirection}`,t.observations.heatIndex.value&&t.HeatIndex!==t.Temperature?(e["heat-index-label"]="Heat Index:",e["heat-index"]=t.HeatIndex+String.fromCharCode(176)):t.observations.windChill.value&&""!==t.WindChill&&t.WindChill<t.Temperature&&(e["heat-index-label"]="Wind Chill:",e["heat-index"]=t.WindChill+String.fromCharCode(176)),e.icon={type:"img",src:t.Icon};const s=this.elem.querySelector(".main");s.innerHTML="",s.append(this.fillTemplate("weather",e)),this.finishDraw()}async getCurrentWeather(e){return e&&this.stillWaitingCallbacks.push(e),new Promise((e=>{this.data&&e(this.parseData()),this.getDataCallbacks.push((()=>e(this.parseData())))}))}}const m=e=>{let t=e;return t=t.replace(/Light/g,"L"),t=t.replace(/Heavy/g,"H"),t=t.replace(/Partly/g,"P"),t=t.replace(/Mostly/g,"M"),t=t.replace(/Few/g,"F"),t=t.replace(/Thunderstorm/g,"T'storm"),t=t.replace(/ in /g,""),t=t.replace(/Vicinity/g,""),t=t.replace(/ and /g," "),t=t.replace(/Freezing Rain/g,"Frz Rn"),t=t.replace(/Freezing/g,"Frz"),t=t.replace(/Unknown Precip/g,""),t=t.replace(/L Snow Fog/g,"L Snw/Fog"),t=t.replace(/ with /g,"/"),t},f=new h(0,"current-weather");(0,u.G1)(f);const g=f.getCurrentWeather.bind(f)},496:(e,t,n)=>{var s=n(206),r=n(946),a=n(172),i=n(325);const o=String.fromCharCode(176);let l,c=0;const u=()=>{const e=(0,i.Dw)();e?.okToDrawCurrentConditions?(c=(c+1)%h.length,d()):"progress"===e?.elemId&&(c=0)},d=async()=>{const e=await(0,a.Z)((()=>(void 0).stillWaiting()));e&&m(h[c](e))},h=[e=>`Conditions at ${(0,s.a)(e.station.properties.name).substr(0,20)}`,e=>{let t=`Temp: ${e.Temperature}${o} ${e.TemperatureUnit}`;return e.observations.heatIndex.value?t+=` Heat Index: ${e.HeatIndex}${o} ${e.TemperatureUnit}`:e.observations.windChill.value&&(t+=` Wind Chill: ${e.WindChill}${o} ${e.TemperatureUnit}`),t},e=>`Humidity: ${e.Humidity}${o} ${e.TemperatureUnit} Dewpoint: ${e.DewPoint}${o} ${e.TemperatureUnit}`,e=>`Barometric Pressure: ${e.Pressure} ${e.PressureDirection}`,e=>{let t="";return t=e.WindSpeed>0?`Wind: ${e.WindDirection} ${e.WindSpeed} ${e.WindUnit}`:"Wind: Calm",e.WindGust>0&&(t+=` Gusts to ${e.WindGust}`),t},e=>`Visib: ${e.Visibility} ${e.VisibilityUnit} Ceiling: ${0===e.Ceiling?"Unlimited":`${e.Ceiling} ${e.CeilingUnit}`}`],m=e=>{(0,r.T)(".weather-display .scroll .fixed",(t=>{t.innerHTML=e}))};document.addEventListener("DOMContentLoaded",(()=>{l||(l=setInterval(u,4e3)),d()}))},582:(e,t,n)=>{var s=n(38),r=n(929),a=n(732),i=n(372),o=n(138),l=n(159),c=n(325);class u extends l.Z{constructor(e,t){super(e,t,"Extended Forecast",!0),this.timing.totalScreens=2}async getData(e){if(!super.getData(e))return;const t=e??this.weatherParameters;let n;try{n=await(0,r.AV)(t.forecast,{data:{units:"us"},retryCount:3,stillWaiting:()=>this.stillWaiting()})}catch(e){return console.error("Unable to get extended forecast"),console.error(e.status,e.responseJSON),void this.setStatus(s.Z.failed)}this.data=d(n.properties.periods),this.screenIndex=0,this.setStatus(s.Z.loaded)}async drawCanvas(){super.drawCanvas();const e=this.data.slice(0+3*this.screenIndex,3+3*this.screenIndex).map((e=>{const t={};t.date=e.dayName;const{low:n}=e;void 0!==n&&(t["value-lo"]=Math.round(n));const{high:s}=e;return t["value-hi"]=Math.round(s),t.condition=e.text,t.icon={type:"img",src:e.icon},this.fillTemplate("day",t)})),t=this.elem.querySelector(".day-container");t.innerHTML="",t.append(...e),this.finishDraw()}}const d=e=>{const t=[0,1,2,3,4,5,6].map((e=>a.ou.local().startOf("day").plus({days:e}).toLocaleString({weekday:"short"})));let n=0;const s=[];return e.forEach((e=>{s[n]||s.push({dayName:"",low:void 0,high:void 0,text:void 0,icon:void 0});const r=s[n];r.icon=(0,i.H8)(e.icon),r.text=h(e.shortForecast),r.dayName=t[n],(0,o.b)(r.icon),e.isDaytime?(r.high=e.temperature,n+=1):r.low=e.temperature})),s},h=e=>{const t=[[/ and /gi," "],[/Slight /gi,""],[/Chance /gi,""],[/Very /gi,""],[/Patchy /gi,""],[/Areas /gi,""],[/Dense /gi,""],[/Thunderstorm/g,"T'Storm"]].reduce(((e,[t,n])=>e.replace(t,n)),e);let n=t.split(" ");-1!==t.indexOf("then")&&(n=t.split(" then "),n=n[1].split(" "));let s=n[0].substr(0,10),r="";n[1]&&(s.endsWith(".")?s=s.replace(/\./,""):r=n[1].substr(0,10),"Blowing"===r&&(r=""));let a=s;return""!==r&&(a+=` ${r}`),a};(0,c.G1)(new u(7,"extended-forecast"))},967:(e,t,n)=>{var s=n(38),r=n(583),a=n(159),i=n(325),o=n(732);class l extends a.Z{constructor(e,t,n){super(e,t,"Hourly Graph",n),document.addEventListener("DOMContentLoaded",(()=>{this.moveHeader()}))}moveHeader(){const e=this.fillTemplate("top-right",{});this.elem.querySelector(".header .right").append(e)}async getData(){if(!super.getData())return;const e=await(0,r.Z)((()=>this.stillWaiting()));if(void 0===e)return void this.setStatus(s.Z.failed);const t=e.map((e=>e.temperature)),n=e.map((e=>e.probabilityOfPrecipitation)),a=e.map((e=>e.skyCover));this.data={skyCover:a,temperature:t,probabilityOfPrecipitation:n},this.setStatus(s.Z.loaded)}drawCanvas(){this.image||(this.image=this.elem.querySelector(".chart img"));const e=285;this.image.width=532,this.image.height=e;const t=document.createElement("canvas");t.width=532,t.height=e;const n=t.getContext("2d");n.imageSmoothingEnabled=!1;const s=c(0,5,this.data.temperature.length-1,532),r=o.ou.now().startOf("hour");document.querySelector(".x-axis .l-1").innerHTML=h(r),document.querySelector(".x-axis .l-2").innerHTML=h(r.plus({hour:6})),document.querySelector(".x-axis .l-3").innerHTML=h(r.plus({hour:12})),document.querySelector(".x-axis .l-4").innerHTML=h(r.plus({hour:18})),document.querySelector(".x-axis .l-5").innerHTML=h(r.plus({hour:24}));const a=c(0,275,100,10),i=u(this.data.skyCover,s,a);d(i,n,{strokeStyle:"lightgrey",lineWidth:3});const l=u(this.data.probabilityOfPrecipitation,s,a);d(l,n,{strokeStyle:"aqua",lineWidth:3});const m=Math.min(...this.data.temperature),f=Math.max(...this.data.temperature),g=Math.round((m+f)/2),y=c(m,275,f,10),p=u(this.data.temperature,s,y);d(p,n,{strokeStyle:"red",lineWidth:3});const w=String.fromCharCode(176);this.elem.querySelector(".y-axis .l-1").innerHTML=(f+w).substring(0,3),this.elem.querySelector(".y-axis .l-2").innerHTML=(g+w).substring(0,3),this.elem.querySelector(".y-axis .l-3").innerHTML=(m+w).substring(0,3),this.image.src=t.toDataURL(),super.drawCanvas(),this.finishDraw()}}const c=(e,t,n,s)=>{const r=(s-t)/(n-e),a=t-r*e;return e=>r*e+a},u=(e,t,n)=>e.map(((e,s)=>[t(s),n(e)])),d=(e,t,n)=>{t.beginPath(),t.strokeStyle="black",t.lineWidth=(n?.lineWidth??2)+2,t.moveTo(e[0][0],e[0][1]),e.slice(1).forEach((e=>t.lineTo(e[0],e[1]+2))),t.stroke(),t.beginPath(),t.strokeStyle=n?.strokeStyle??"red",t.lineWidth=n?.lineWidth??2,t.moveTo(e[0][0],e[0][1]),e.slice(1).forEach((e=>t.lineTo(e[0],e[1]))),t.stroke()},h=e=>e.toFormat("ha").slice(0,-1);(0,i.G1)(new l(3,"hourly-graph"))},583:(e,t,n)=>{n.d(t,{Z:()=>p});var s=n(38),r=n(732),a=n(929),i=n(594),o=n(372),l=n(791),c=n(159),u=n(325),d=n(428);class h extends c.Z{constructor(e,t,n){super(e,t,"Hourly Forecast",n),this.timing.baseDelay=20;this.timing.delay=[450];for(let e=0;e<4;e+=1)this.timing.delay.push(300);this.timing.delay.push(150)}async getData(e){const t=super.getData(e);let n;try{n=await(0,a.AV)(e.forecastGridData,{retryCount:3,stillWaiting:()=>this.stillWaiting()})}catch(e){return console.error("Get hourly forecast failed"),console.error(e.status,e.responseJSON),this.enabled&&this.setStatus(s.Z.failed),void this.getDataCallback(void 0)}this.data=await m(n.properties),this.getDataCallback(),t&&(this.setStatus(s.Z.loaded),this.drawLongCanvas())}async drawLongCanvas(){const e=this.elem.querySelector(".hourly-lines");e.innerHTML="";const t=r.ou.local(),n=this.data.map(((e,n)=>{const s={},r=t.plus({hours:n}).toLocaleString({weekday:"short",hour:"numeric"});s.hour=r;const a=Math.round(e.temperature).toString().padStart(3),i=Math.round(e.apparentTemperature).toString().padStart(3);s.temp=a,a!==i&&(s.like=i);let o="Calm";if(e.windSpeed>0){const t=Math.round(e.windSpeed).toString();o=e.windDirection+Array(6-e.windDirection.length-t.length).join(" ")+t}return s.wind=o,s.icon={type:"img",src:e.icon},this.fillTemplate("hourly-row",s)}));e.append(...n)}drawCanvas(){super.drawCanvas(),this.finishDraw()}showCanvas(){this.drawCanvas(),super.showCanvas()}screenIndexChange(){this.baseCountChange(this.navBaseCount)}baseCountChange(e){let t=Math.min(this.elem.querySelector(".hourly-lines").getBoundingClientRect().height-289,e-150);t<0&&(t=0),this.elem.querySelector(".main").scrollTo(0,t)}async getCurrentData(e){return e&&this.stillWaitingCallbacks.push(e),new Promise((e=>{this.data&&e(this.data),this.getDataCallbacks.push((()=>e(this.data)))}))}}const m=async e=>{const t=g(e.temperature.values),n=g(e.apparentTemperature.values),s=g(e.windSpeed.values),r=g(e.windDirection.values),a=g(e.skyCover.values),o=g(e.weather.values),c=g(e.iceAccumulation.values),u=g(e.probabilityOfPrecipitation.values),d=g(e.snowfallAmount.values),h=await f(a,o,c,u,d,s);return t.map(((e,o)=>({temperature:(0,i.NE)(t[o]),apparentTemperature:(0,i.NE)(n[o]),windSpeed:(0,i.dp)(s[o]),windDirection:(0,l.mt)(r[o]),probabilityOfPrecipitation:u[o],skyCover:a[o],icon:h[o]})))},f=async(e,t,n,s,a,i)=>{const l=r.ou.local().startOf("hour"),c=(await(0,d.Z)()).sun,u=r.Xp.fromDateTimes(r.ou.fromJSDate(c[0].sunset),r.ou.fromJSDate(c[1].sunrise)),h=r.ou.fromJSDate(c[1].sunset);return e.map(((r,c)=>{const d=l.plus({hours:c}),m=u.contains(d)||d>h;return(0,o.V6)(e[c],t[c],n[c],s[c],a[c],i[c],m)}))},g=e=>{const t=r.ou.utc().startOf("hour").toMillis(),n=[];return e.forEach((e=>{let s=Date.parse(e.validTime.substr(0,e.validTime.indexOf("/")));const a=s+r.nL.fromISO(e.validTime.substr(e.validTime.indexOf("/")+1)).shiftTo("milliseconds").values.milliseconds;do{s>=t&&n.length<24&&n.push(e.value),s+=36e5}while(s<a&&n.length<24)})),n},y=new h(2,"hourly",!1);(0,u.G1)(y);const p=y.getCurrentData.bind(y)},372:(e,t,n)=>{n.d(t,{H8:()=>r,V6:()=>a,gD:()=>s});const s=(e,t)=>{const n=t??e.indexOf("/night/")>=0,s=e=>`images/r/${e}`;let r=e.toLowerCase().match(/[^/]+$/)[0].match(/(.*?)[,?&.]/)[1];const a=+(e.match(/,(\d{2,3})/)??[0,100])[1];if("dualimage"===r){const t=e.match(/&j=(.*)&/);[,r]=t}switch(r+(n?"-n":"")){case"skc":case"hot":case"haze":return s("Sunny.gif");case"skc-n":case"nskc":case"nskc-n":case"cold-n":return s("Clear-1992.gif");case"bkn":return s("Mostly-Cloudy-1994-2.gif");case"bkn-n":case"few-n":case"nfew-n":case"nfew":return s("Partly-Clear-1994-2.gif");case"sct":case"few":return s("Partly-Cloudy.gif");case"sct-n":case"nsct":case"nsct-n":return s("Mostly-Clear.gif");case"ovc":case"ovc-n":return s("Cloudy.gif");case"fog":case"fog-n":return s("Fog.gif");case"rain_sleet":case"sleet":case"sleet-n":return s("Sleet.gif");case"rain_showers":case"rain_showers_high":return s("Scattered-Showers-1994-2.gif");case"rain_showers-n":case"rain_showers_high-n":return s("Scattered-Showers-Night-1994-2.gif");case"rain":case"rain-n":return s("Rain-1992.gif");case"snow":case"snow-n":return s(a>50?"Heavy-Snow-1994-2.gif":"Light-Snow.gif");case"rain_snow":return s("Rain-Snow-1992.gif");case"snow_fzra":case"snow_fzra-n":return s("Freezing-Rain-Snow-1992.gif");case"fzra":case"fzra-n":return s("Freezing-Rain-1992.gif");case"snow_sleet":case"snow_sleet-n":return s("Snow and Sleet.gif");case"tsra_sct":case"tsra":return s("Scattered-Tstorms-1994-2.gif");case"tsra_sct-n":case"tsra-n":return s("Scattered-Tstorms-Night-1994-2.gif");case"tsra_hi":case"tsra_hi-n":case"hurricane":case"tropical_storm":return s("Thunderstorm.gif");case"wind_few":case"wind_sct":case"wind_bkn":case"wind_ovc":return s("Wind.gif");case"wind_skc":return s("Sunny-Wind-1994.gif");case"wind_skc-n":case"wind_sct-n":return s("Clear-Wind-1994.gif");case"blizzard":return s("Blowing Snow.gif");case"cold":return s("cold.gif");default:return console.log(`Unable to locate regional icon for ${r} ${e} ${n}`),!1}},r=(e,t)=>{if(!e)return!1;const n=e=>`images/${e}`,s=t??e.indexOf("/night/")>=0;let r=e.toLowerCase().match(/[^/]+$/)[0].match(/(.*?)[,?&.]/)[1];const a=+(e.match(/,(\d{2,3})/)??[0,100])[1];if("dualimage"===r){const t=e.match(/&j=(.*)&/);[,r]=t}switch(r+(s?"-n":"")){case"skc":case"hot":case"haze":case"cold":return n("CC_Clear1.gif");case"skc-n":case"nskc":case"nskc-n":case"cold-n":return n("CC_Clear0.gif");case"sct":case"few":case"bkn":return n("CC_PartlyCloudy1.gif");case"bkn-n":case"few-n":case"nfew-n":case"nfew":case"sct-n":case"nsct":case"nsct-n":return n("CC_PartlyCloudy0.gif");case"ovc":case"novc":case"ovc-n":return n("CC_Cloudy.gif");case"fog":case"fog-n":return n("CC_Fog.gif");case"rain_sleet":return n("Sleet.gif");case"rain_showers":case"rain_showers_high":case"rain_showers-n":case"rain_showers_high-n":return n("CC_Showers.gif");case"rain":case"rain-n":return n("CC_Rain.gif");case"snow":case"snow-n":return n(a>50?"CC_Snow.gif":"CC_SnowShowers.gif");case"rain_snow":return n("CC_RainSnow.gif");case"snow_fzra":case"snow_fzra-n":case"fzra":case"fzra-n":return n("CC_FreezingRain.gif");case"snow_sleet":return n("Snow-Sleet.gif");case"tsra_sct":case"tsra":return n("EF_ScatTstorms.gif");case"tsra_sct-n":case"tsra-n":case"tsra_hi":case"tsra_hi-n":case"hurricane":case"tropical_storm":return n("CC_TStorm.gif");case"wind_few":case"wind_sct":case"wind_bkn":case"wind_ovc":case"wind_skc":case"wind_skc-n":case"wind_sct-n":return n("CC_Windy.gif");case"blizzard":return n("Blowing-Snow.gif");default:return console.log(`Unable to locate icon for ${r} ${e} ${s}`),!1}},a=(e,t,n,s,r,a,i=!1)=>{const o=e=>`images/r/${e}`;let l=!1,c=!1,u=!1,d=!1,h=!1;return t.forEach((e=>{e.weather&&(e.weather.toLowerCase().includes("thunder")&&(l=!0),e.weather.toLowerCase().includes("snow")&&(c=!0),e.weather.toLowerCase().includes("ice")&&(u=!0),e.weather.toLowerCase().includes("fog")&&(d=!0),e.weather.toLowerCase().includes("wind")&&(h=!0))})),o(n>0||u?"Freezing-Rain-1992.gif":r>10?a>30||h?"Blowing Snow.gif":"Heavy-Snow-1994.gif":(r>0||c)&&l?"ThunderSnow.gif":r>0||c?"Light-Snow.gif":l?"Thunderstorm.gif":s>70?"Rain-1992.gif":s>50?"Shower.gif":s>30?i?"Scattered-Showers-Night.gif":"Scattered-Showers-1994.gif":d?"Fog.gif":e>70?"Cloudy.gif":e>50?i?"Partly-Clear-1994.gif":"Mostly-Cloudy-1994.gif":e>30?i?"Mostly-Clear.gif":"Partly-Cloudy.gif":i?"Clear-1992.gif":"Sunny.gif")}},495:(e,t,n)=>{var s=n(791),r=n(929),a=n(38),i=n(206),o=n(594),l=n(159),c=n(325);class u extends l.Z{constructor(e,t){super(e,t,"Latest Observations",!0),this.MaximumRegionalStations=7}async getData(e){if(!super.getData(e))return;const t=e??this.weatherParameters,n=Object.keys(StationInfo).map((e=>{const n=StationInfo[e],r=(0,s.TE)(n.lat,n.lon,t.latitude,t.longitude);return{...n,distance:r}})).sort(((e,t)=>e.distance-t.distance)).slice(0,30),i=(await Promise.all(n.map((async e=>{try{const t=await(0,r.AV)(`https://api.weather.gov/stations/${e.id}/observations/latest`,{retryCount:3,stillWaiting:()=>this.stillWaiting()});return null!==t.properties.temperature.value&&""!==t.properties.textDescription&&null!==t.properties.windSpeed.value&&{...t.properties,StationId:e.id,city:e.city}}catch(t){return console.log(`Unable to get latest observations for ${e.id}`),!1}})))).filter((e=>e));this.data=i.slice(0,this.MaximumRegionalStations),this.data.length<1?this.setStatus(a.Z.noData):this.setStatus(a.Z.loaded)}async drawCanvas(){super.drawCanvas();const e=this.data.sort(((e,t)=>e.Name<t.Name?-1:1));this.elem.querySelector(".column-headers .temp.english").classList.add("show"),this.elem.querySelector(".column-headers .temp.metric").classList.remove("show");const t=e.map((e=>{const t=(0,s.mt)(e.windDirection.value),n=Math.round((0,o.NE)(e.temperature.value)),r=Math.round((0,o.Kh)(e.windSpeed.value)),a={};return a.location=(0,i.a)(e.city).substr(0,14),a.temp=n,a.weather=d(e.textDescription).substr(0,9),a.wind=r>0?t+Array(6-t.length-r.toString().length).join(" ")+r.toString():"NA"===r?"NA":"Calm",this.fillTemplate("observation-row",a)})),n=this.elem.querySelector(".observation-lines");n.innerHTML="",n.append(...t),this.finishDraw()}}const d=e=>{let t=e;return t=t.replace(/Light/,"L"),t=t.replace(/Heavy/,"H"),t=t.replace(/Partly/,"P"),t=t.replace(/Mostly/,"M"),t=t.replace(/Few/,"F"),t=t.replace(/Thunderstorm/,"T'storm"),t=t.replace(/ in /,""),t=t.replace(/Vicinity/,""),t=t.replace(/ and /," "),t=t.replace(/Freezing Rain/,"Frz Rn"),t=t.replace(/Freezing/,"Frz"),t=t.replace(/Unknown Precip/,""),t=t.replace(/L Snow Fog/,"L Snw/Fog"),t=t.replace(/ with /,"/"),t};(0,c.G1)(new u(1,"latest-observations"))},748:(e,t,n)=>{var s=n(38),r=n(929),a=n(159),i=n(325);class o extends a.Z{constructor(e,t){super(e,t,"Local Forecast",!0),this.timing.baseDelay=5e3}async getData(e){if(!super.getData(e))return;const t=e??this.weatherParameters,n=await this.getRawData(t);if(!n)return void this.setStatus(s.Z.failed);const r=l(n);this.screenTexts=r.map((e=>{let t=`${e.DayName.toUpperCase()}...`;return t+=e.Text.toUpperCase().replace("..."," "),t}));const a=this.screenTexts.map((e=>this.fillTemplate("forecast",{text:e}))),i=this.elem.querySelector(".forecasts");i.innerHTML="",i.append(...a),this.pageHeight=i.parentNode.getBoundingClientRect().height,a.forEach((e=>{const t=Math.ceil(e.scrollHeight/this.pageHeight)*this.pageHeight;e.style.height=`${t}px`})),this.timing.totalScreens=i.scrollHeight/this.pageHeight,this.calcNavTiming(),this.setStatus(s.Z.loaded)}async getRawData(e){try{return await(0,r.AV)(e.forecast,{data:{units:"us"},retryCount:3,stillWaiting:()=>this.stillWaiting()})}catch(t){return console.error(`GetWeatherForecast failed: ${e.forecast}`),console.error(t.status,t.responseJSON),this.setStatus(s.Z.failed),!1}}async drawCanvas(){super.drawCanvas();const e=-this.screenIndex*this.pageHeight;this.elem.querySelector(".forecasts").style.top=`${e}px`,this.finishDraw()}}const l=e=>e.properties.periods.slice(0,6).map((e=>({DayName:e.name.toUpperCase(),Text:e.detailedForecast})));(0,i.G1)(new o(6,"local-forecast"))},325:(e,t,n)=>{n.d(t,{Dw:()=>D,G1:()=>O,Gw:()=>$,HC:()=>N,Nf:()=>p,Pl:()=>T,QE:()=>P,SI:()=>E,WI:()=>b,nI:()=>L,uL:()=>B,un:()=>_,yA:()=>S,yw:()=>y});var s=n(739),r=n(38),a=n(791),i=n(929),o=n(735);document.addEventListener("DOMContentLoaded",(()=>{g()}));const l=[];let c,u=!1;const d={},h=6e5;let m=null,f=0;const g=async()=>{window.addEventListener("resize",E),E();const e=localStorage.getItem("TwcAutoRefresh");document.getElementById("chkAutoRefresh").checked=!e||"true"===e,document.getElementById("chkAutoRefresh").addEventListener("change",V),F()},y=e=>{if(e.type)if("navButton"===e.type)k(e.message);else console.error(`Unknown event ${e.type}`)},p=e=>{if(e.id<0)return;if(!c)return;c.drawCanvas(l,w());const t=l.findIndex((e=>e.enabled));S()&&e.id===t&&e.status===r.Z.loaded&&C(b.command.firstFrame),w()<l.length||H(new Date)},w=()=>l.reduce(((e,t)=>t.status!==r.Z.loading?e+1:e),0),v=()=>{l.forEach((e=>e.hideCanvas()))},S=()=>u,b={response:{previous:Symbol("previous"),inProgress:Symbol("inProgress"),next:Symbol("next")},command:{firstFrame:Symbol("firstFrame"),previousFrame:Symbol("previousFrame"),nextFrame:Symbol("nextFrame"),lastFrame:Symbol("lastFrame")}},T=e=>{e.type===b.response.previous&&I(-1),e.type===b.response.next&&I(1)},C=e=>{const t=D();if(c.hideCanvas(),t)e===b.command.nextFrame&&D().navNext(),e===b.command.previousFrame&&D().navPrev();else{let e,t=0;do{l[t].status===r.Z.loaded&&(e=l[t]),t+=1}while(!e&&t<l.length);if(!e)return;e.navNext(b.command.firstFrame)}},I=e=>{const t=l.length,n=M();let s;for(let i=0;i<t&&(s=(0,a.re)(n+(i+1)*e,t),l[s].status!==r.Z.loaded);i+=1);if(s<=n&&W())return;const i=l[s];v(),e<0&&i.showCanvas(b.command.lastFrame),e>0&&i.showCanvas(b.command.firstFrame)},M=()=>l.findIndex((e=>e.isActive())),D=()=>l[M()],x=e=>{u=e;const t=document.getElementById("NavigatePlay");localStorage.setItem("TwcPlay",u),u?((0,s.Z)(!0),t.title="Pause",t.src="images/nav/ic_pause_white_24dp_1x.png"):((0,s.Z)(!1),t.title="Play",t.src="images/nav/ic_play_arrow_white_24dp_1x.png"),c&&u&&!D()&&C(b.command.firstFrame)},k=e=>{switch(e){case"play":x(!0);break;case"playToggle":x(!u);break;case"stop":x(!1);break;case"next":x(!1),C(b.command.nextFrame);break;case"previous":x(!1),C(b.command.previousFrame);break;case"menu":x(!1),c.showCanvas(),v();break;default:console.error(`Unknown navButton ${e}`)}},L=e=>l[e],E=()=>{const e=document.fullscreenElement?0:16,t=(window.innerWidth-e)/640,n=(window.innerHeight-e)/480,s=Math.min(t,n);s<1||document.fullscreenElement?document.getElementById("container").style.zoom=s:document.getElementById("container").style.zoom=1},N=()=>{l.forEach((e=>{e.status=r.Z.loading}))},O=e=>{l[e.navId]=e,F()},F=()=>{const e=document.getElementById("enabledDisplays");if(!e)return;const t=l.map((e=>e.generateCheckbox(e.defaultEnabled))).filter((e=>e));e.innerHTML="",e.append(...t)},$=e=>{c=e},Z=e=>{document.getElementById("spanCity").innerHTML=`${e.city}, `,document.getElementById("spanState").innerHTML=e.state,document.getElementById("spanStationId").innerHTML=e.stationId,document.getElementById("spanRadarId").innerHTML=e.radarId,document.getElementById("spanZoneId").innerHTML=e.zoneId},V=e=>{const{checked:t}=e.target;t?A():P(),localStorage.setItem("TwcAutoRefresh",t)},H=e=>{e?(document.getElementById("spanLastRefresh").innerHTML=e.toLocaleString("en-US",{weekday:"short",month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}),document.getElementById("chkAutoRefresh").checked&&A()):document.getElementById("spanLastRefresh").innerHTML="(none)"},_=(e,t)=>{(async(e,t)=>{const n=await(0,o.F)(e.lat,e.lon);"function"==typeof t&&t(n);const s=await(0,i.AV)(n.properties.observationStations),r=s.features[0].properties.stationIdentifier;let{city:a}=n.properties.relativeLocation.properties;r in StationInfo&&(a=StationInfo[r].city,[a]=a.split("/")),d.latitude=e.lat,d.longitude=e.lon,d.zoneId=n.properties.forecastZone.substr(-6),d.radarId=n.properties.radarStation.substr(-3),d.stationId=r,d.weatherOffice=n.properties.cwa,d.city=a,d.state=n.properties.relativeLocation.properties.state,d.timeZone=n.properties.relativeLocation.properties.timeZone,d.forecast=n.properties.forecast,d.forecastGridData=n.properties.forecastGridData,d.stations=s.features,Z(d),v(),document.getElementById("loading").style.display="none",c&&(await c.drawCanvas(),c.showCanvas()),l.forEach((e=>e.getData(d)))})(e,t),H(null)},A=()=>{if(m)return;f=0;const e=()=>{f+=500;let e=h-f;e<0&&(e=0);const t=new Date(e);document.getElementById("spanRefreshCountDown").innerHTML=`${t.getMinutes()<10?`0${t.getMinutes()}`:t.getMinutes()}:${t.getSeconds()<10?`0${t.getSeconds()}`:t.getSeconds()}`,f>=h&&!S()&&q()};m=window.setInterval(e,500),e()},P=()=>{m&&(window.clearInterval(m),document.getElementById("spanRefreshCountDown").innerHTML="--:--",m=null)},W=()=>f>=h&&(q(),!0),q=()=>{q.callback&&q.callback()},B=e=>{q.callback=e}},846:(e,t,n)=>{var s=n(138),r=n(38),a=n(159),i=n(325);class o extends a.Z{constructor(e,t){super(e,t,"",!1),this.backgroundImage=(0,s.a)("images/BackGround1_1.png"),this.timing=!1,document.addEventListener("DOMContentLoaded",(()=>{this.version=document.getElementById("version").innerHTML,this.elem.querySelector(".container").addEventListener("click",this.lineClick.bind(this))})),this.okToDrawCurrentConditions=!1}async drawCanvas(e,t){if(super.drawCanvas(),this.progressCover||(this.progressCover=this.elem.querySelector(".scroll .cover")),!e)return;const n=e.map(((e,t)=>{const n={};let s;switch(n.name=e.name,e.status){case r.Z.loading:s="loading";break;case r.Z.loaded:s="press-here";break;case r.Z.failed:s="failed";break;case r.Z.noData:s="no-data";break;case r.Z.disabled:s="disabled";break;case r.Z.retrying:s="retrying"}const a=this.fillTemplate("item",n);if(!a)return!1;const i=a.querySelector(".links");return i.classList.remove("loading"),i.classList.add(s),i.dataset.index=t,a})).filter((e=>e)),s=this.elem.querySelector(".container");s.innerHTML="",s.append(...n),this.finishDraw();const a=t/e.length;this.progressCover.style.width=100*(1-a)+"%",a<1?this.progressCover.parentNode.classList.add("show"):setTimeout((()=>this.progressCover.parentNode.classList.remove("show")),1e3)}lineClick(e){const t=e.target?.parentNode?.dataset?.index;if(void 0===t)return;const n=+t;(0,i.yw)("navButton");const s=(0,i.nI)(n);s&&s.status===r.Z.loaded&&(s.showCanvas(i.WI.command.firstFrame),this.elem.classList.remove("show"))}}const l=new o(-1,"progress");(0,i.Gw)(l)},478:(e,t,n)=>{var s=n(38),r=n(732),a=n(138),i=n(929),o=n(737),l=n(159),c=n(325);class u extends l.Z{constructor(e,t){super(e,t,"Local Radar",!0),this.okToDrawCurrentConditions=!1,this.okToDrawCurrentDateTime=!1,this.dopplerRadarImageMax=6,this.timing.baseDelay=350,this.timing.delay=[{time:4,si:5},{time:1,si:0},{time:1,si:1},{time:1,si:2},{time:1,si:3},{time:1,si:4},{time:4,si:5},{time:1,si:0},{time:1,si:1},{time:1,si:2},{time:1,si:3},{time:1,si:4},{time:4,si:5},{time:1,si:0},{time:1,si:1},{time:1,si:2},{time:1,si:3},{time:1,si:4},{time:12,si:5}]}async getData(e){if(!super.getData(e))return;const t=e??this.weatherParameters;if("AK"===t.state||"HI"===t.state)return void this.setStatus(s.Z.noData);let n="images/4000RadarMap2.jpg";"HI"===t.State&&(n="images/HawaiiRadarMap2.png"),this.baseMap=await(0,a.a)(n);const l=[];let c=r.ou.utc().minus({days:1}).startOf("day");for(;c<=r.ou.utc().startOf("day");)l.push(`https://mesonet.agron.iastate.edu/archive/data/${c.toFormat("yyyy/LL/dd")}/GIS/uscomp/`),c=c.plus({days:1});const u=(await Promise.all(l.map((async e=>{try{return await(0,i.fL)(e,{cors:!0})}catch(e){return console.log("Unable to get list of radars"),console.error(e),this.setStatus(s.Z.failed),!1}})))).filter((e=>e)).map(((e,t)=>{const n=(new DOMParser).parseFromString(e,"text/html"),s=n.createElement("base");s.href=l[t],n.head.append(s);const r=n.getElementsByTagName("a"),a=[];return Array.from(r).forEach((e=>{e.innerHTML?.includes(".png")&&e.innerHTML?.includes("n0r_")&&a.push(e.href)})),a})).flat(),d=u.sort(((e,t)=>Date(e)<Date(t)?-1:1)).slice(-this.dopplerRadarImageMax);let h=120,m=69;const f=2550;h*=2,m*=2;const g=((e,t,n)=>{let s=0,r=0;return s=55.2*(51.75-e.latitude),s-=n,s>3200-2*n?s=3200-2*n:s<0&&(s=0),r=41.775*(-130.37-e.longitude)*-1,r-=t,r>5100-2*t?r=5100-2*t:r<0&&(r=0),{x:2*r,y:2*s}})(t,240,138),y=document.createElement("canvas");y.width=f,y.height=1600;const p=y.getContext("2d");p.imageSmoothingEnabled=!1;const w=((e,t,n)=>{let s=0,r=0;return s=61.4481*(51-e.latitude),s-=n,s>6e3-2*n?s=6e3-2*n:s<0&&(s=0),r=42.1768*(-129.138-e.longitude)*-1,r-=t,r>2800-2*t?r=2800-2*t:r<0&&(r=0),{x:2*r,y:2*s}})(t,240,138),v=w.x/2,S=w.y/2,b=await Promise.all(d.map((async e=>{const t=document.createElement("canvas");t.width=640,t.height=367;const n=t.getContext("2d");n.imageSmoothingEnabled=!1;const s=await fetch((0,o.d)(e));if(!s.ok)throw new Error(`Unable to fetch radar error ${s.status} ${s.statusText} from ${s.url}`);const i=await s.blob(),l=e.match(/_(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)\./);let c;if(l){const[,e,t,n,s,a]=l;c=r.ou.fromObject({year:e,month:t,day:n,hour:s,minute:a},{zone:"UTC"}).setZone()}else c=r.ou.fromHTTP(s.headers.get("last-modified")).setZone();const u=await(0,a.a)(i);p.clearRect(0,0,f,1600),p.drawImage(u,0,0,f,1600),n.drawImage(await this.baseMap,g.x,g.y,480,276,0,0,640,367);const d=document.createElement("canvas");d.width=640,d.height=367;const h=d.getContext("2d",{willReadFrequently:!0});h.imageSmoothingEnabled=!1,h.drawImage(y,v,S,240,163.1,0,0,640,367),(e=>{const t=e.getImageData(0,0,e.canvas.width,e.canvas.height);for(let e=0;e<t.data.length;e+=4){let n=t.data[e],s=t.data[e+1],r=t.data[e+2],a=t.data[e+3];0===n&&0===s&&0===r||0===n&&236===s&&236===r||1===n&&160===s&&246===r||0===n&&0===s&&246===r?(n=0,s=0,r=0,a=0):0===n&&255===s&&0===r?(n=49,s=210,r=22,a=255):0===n&&200===s&&0===r?(n=0,s=142,r=0,a=255):0===n&&144===s&&0===r?(n=20,s=90,r=15,a=255):255===n&&255===s&&0===r?(n=10,s=40,r=10,a=255):231===n&&192===s&&0===r?(n=196,s=179,r=70,a=255):255===n&&144===s&&0===r?(n=190,s=72,r=19,a=255):214===n&&0===s&&0===r||255===n&&0===s&&0===r?(n=171,s=14,r=14,a=255):(192===n&&0===s&&0===r||255===n&&0===s&&255===r)&&(n=115,s=31,r=4,a=255),t.data[e]=n,t.data[e+1]=s,t.data[e+2]=r,t.data[e+3]=a}e.putImageData(t,0,0)})(h),((e,t)=>{const n=e.getImageData(0,0,e.canvas.width,e.canvas.height),s=t.getImageData(0,0,t.canvas.width,t.canvas.height);for(let e=0;e<s.data.length;e+=4)n.data[e]<116&&n.data[e+1]<116&&n.data[e+2]<116&&(s.data[e]=0,s.data[e+1]=0,s.data[e+2]=0,s.data[e+3]=0);t.putImageData(s,0,0),e.drawImage(t.canvas,0,0)})(n,h);const m=this.fillTemplate("frame",{map:{type:"img",src:t.toDataURL()}});return{canvas:t,time:c,elem:m}}))),T=this.elem.querySelector(".scroll-area");T.innerHTML="",T.append(...b.map((e=>e.elem))),this.timing.totalScreens=b.length,this.data=b.map((e=>e.canvas)),this.times=b.map((e=>e.time)),this.setStatus(s.Z.loaded)}async drawCanvas(){super.drawCanvas();const e=this.times[this.screenIndex].toLocaleString(r.ou.TIME_SIMPLE),t=e.length>=8?e:`&nbsp;${e}`;this.elem.querySelector(".header .right .time").innerHTML=t,this.elem.querySelector(".scroll-area").style.top=371*-this.screenIndex+"px",this.finishDraw()}}(0,c.G1)(new u(9,"radar"))},257:(e,t,n)=>{var s=n(38),r=n(791),a=n(929),i=n(594),o=n(372),l=n(138),c=n(732),u=n(159),d=n(325);const h=(e,t,n)=>({daytime:e.isDaytime,temperature:e.temperature||0,name:v(t.city),icon:e.icon,x:n.x,y:n.y,time:e.startTime}),m=(e,t,n,s)=>{let r=0,a=0;return r=56*(73-e),r-=s,r>1142-2*s?r=1142-2*s:r<0&&(r=0),a=25*(-175-t)*-1,a-=n,a>1200-2*n?a=1200-2*n:a<0&&(a=0),{x:a,y:r}},f=(e,t,n,s)=>{let r=0,a=0;return r=55.2*(25-e),r-=s,r>571-2*s?r=571-2*s:r<0&&(r=0),a=41.775*(-164.5-t)*-1,a-=n,a>600-2*n?a=600-2*n:a<0&&(a=0),{x:a,y:r}},g=(e,t,n,s)=>({minLat:-1*((t+2*s)/56-73),maxLat:-1*(t/56-73),minLon:-1*(-1*e/25+175),maxLon:-1*(-1*(e+2*n)/25+175)}),y=(e,t,n,s)=>({minLat:-1*((t+2*s)/55.2-25),maxLat:-1*(t/55.2-25),minLon:-1*(-1*e/41.775+164.5),maxLon:-1*(-1*(e+2*n)/41.775+164.5)}),p=(e,t,n)=>{let s=37*(e.lon-n),r=70*(t-e.lat);return r<30&&(r=30),r>282&&(r=282),s<40&&(s=40),s>580&&(s=580),{x:s,y:r}},w=(e,t,n)=>{let s=57*(e.lon-n),r=70*(t-e.lat);return r<30&&(r=30),r>282&&(r=282),s<40&&(s=40),s>580&&(s=580),{x:s,y:r}},v=e=>e.match(/[^-;/\\,]*/)[0].substr(0,12);var S=n(735);class b extends u.Z{constructor(e,t){super(e,t,"Regional Forecast",!0),this.timing.totalScreens=3}async getData(e){if(!super.getData(e))return;const t=e??this.weatherParameters;let n="images/Basemap2.png";"HI"===t.state?n="images/HawaiiRadarMap4.png":"AK"===t.state&&(n="images/AlaskaRadarMap6.png"),this.elem.querySelector(".map img").src=n;const c={x:240,y:117},u=((e,t,n,s,r)=>{if("AK"===r)return m(e,t,n,s);if("HI"===r)return f(e,t,n,s);let a=0,i=0;return a=55.2*(50.5-e),a-=s,a>1600-2*s?a=1600-2*s:a<0&&(a=0),i=41.775*(-127.5-t)*-1,i-=n,i>2550-2*n?i=2550-2*n:i<0&&(i=0),{x:i,y:a}})(t.latitude,t.longitude,c.x,c.y,t.state),d=(S=u.x,b=u.y,C=c.x,I=c.y,"AK"===(M=t.state)?g(S,b,C,I):"HI"===M?y(S,b,C,I):{minLat:-1*((b+2*I)/55.2-50.5),maxLat:-1*(b/55.2-50.5),minLon:-1*(-1*S/41.775+127.5),maxLon:-1*(-1*(S+2*C)/41.775+127.5)});var S,b,C,I,M;let D=2.5;"HI"===t.state&&(D=1);const x=Object.values(StationInfo).map((e=>({...e,targetDistance:D}))),k=[...RegionalCities,...x],L=[];k.forEach((e=>{if(e.lat>d.minLat&&e.lat<d.maxLat&&e.lon>d.minLon&&e.lon<d.maxLon-1){const t=e.targetDistance||1;L.reduce(((n,s)=>{const a=(0,r.TE)(e.lon,e.lat,s.lon,s.lat);return n&&a>=t}),!0)&&L.push(e)}}));const E=await Promise.all(L.map((async e=>{try{const n=e?.point??await T(e.lat,e.lon);if(!n)throw new Error("No pre-loaded point");const s=(async(e,t)=>{try{const t=(await(0,a.AV)(`https://api.weather.gov/gridpoints/${e.wfo}/${e.x},${e.y}/stations`)).features[0].id,n=await(0,a.AV)(`${t}/observations/latest`);return!!n.properties.icon&&((0,l.b)((0,o.gD)(n.properties.icon,!n.properties.daytime)),n.properties)}catch(e){return console.log(`Unable to get regional observations for ${t.Name??t.city}`),console.error(e.status,e.responseJSON),!1}})(n,e),r=await(0,a.AV)(`https://api.weather.gov/gridpoints/${n.wfo}/${n.x},${n.y}/forecast`),c=((e,t,n,s)=>{"AK"===s&&p(e,t,n),"HI"===s&&w(e,t,n);let r=57*(e.lon-n),a=70*(t-e.lat);return a<30&&(a=30),a>282&&(a=282),r<40&&(r=40),r>580&&(r=580),{x:r,y:a}})(e,d.maxLat,d.minLon,t.state),u=await s,m={daytime:!!u.icon.match(/\/day\//),temperature:(0,i.NE)(u.temperature.value),name:v(e.city),icon:u.icon,x:c.x,y:c.y};return(0,l.b)((0,o.gD)(m.icon,!m.daytime)),[m,h(r.properties.periods[1],e,c),h(r.properties.periods[2],e,c)]}catch(t){return console.log(`No regional forecast data for '${e.name??e.city}'`),console.log(t),!1}}))),N=E.filter((e=>e));0!==N.length?(this.data={regionalData:N,offsetXY:c,sourceXY:u},this.setStatus(s.Z.loaded)):this.setStatus(s.Z.noData)}drawCanvas(){super.drawCanvas();const{regionalData:e,sourceXY:t,offsetXY:n}=this.data,s=this.elem.querySelector(".title.dual .top"),r=this.elem.querySelector(".title.dual .bottom");if(0===this.screenIndex)s.innerHTML="Regional",r.innerHTML="Observations";else{const t=c.ou.fromISO(e[0][this.screenIndex].time).toLocaleString({weekday:"long"});s.innerHTML="Forecast for",e[0][this.screenIndex].daytime?r.innerHTML=t:r.innerHTML=`${t} Night`}const a=640/(2*n.x),i=this.elem.querySelector(".map");i.style.zoom=a,i.style.top=`-${t.y}px`,i.style.left=`-${t.x}px`;const l=e.map((e=>{const t={},n=e[this.screenIndex];t.icon={type:"img",src:(0,o.gD)(n.icon,!n.daytime)},t.city=n.name;const{temperature:s}=n;t.temp=s;const r=this.fillTemplate("location",t);return r.style.left=`${n.x}px`,r.style.top=`${n.y}px`,r})),u=this.elem.querySelector(".location-container");u.innerHTML="",u.append(...l),this.finishDraw()}}const T=async(e,t)=>{const n=await(0,S.F)(e,t);return{x:n.properties.gridX,y:n.properties.gridY,wfo:n.properties.gridId}};(0,d.G1)(new b(5,"regional-forecast"))},38:(e,t,n)=>{n.d(t,{Z:()=>s});const s={loading:Symbol("loading"),loaded:Symbol("loaded"),failed:Symbol("failed"),noData:Symbol("noData"),disabled:Symbol("disabled"),retrying:Symbol("retyring")}},449:(e,t,n)=>{var s=n(38),r=n(929),a=n(372),i=n(732),o=n(159),l=n(325);class c extends o.Z{constructor(e,t,n){super(e,t,"Travel Forecast",n),this.timing.baseDelay=20;const s=TravelCities.length/4,r=Math.floor(s)-2,a=r%1;this.timing.delay=[450];for(let e=0;e<r;e+=1)this.timing.delay.push(300);0!==a&&this.timing.delay.push(Math.round(this.extra*this.cityHeight)),this.timing.delay.push(150)}async getData(){if(!super.getData())return;const e=TravelCities.map((async e=>{try{if(!e.point)throw new Error("No pre-loaded point");const t=await(0,r.AV)(`https://api.weather.gov/gridpoints/${e.point.wfo}/${e.point.x},${e.point.y}/forecast`),n=t.properties.periods[0].isDaytime?0:1;return{today:0===n,high:t.properties.periods[n].temperature,low:t.properties.periods[n+1].temperature,name:e.Name,icon:(0,a.gD)(t.properties.periods[n].icon)}}catch(t){return console.error(`GetTravelWeather for ${e.Name} failed`),console.error(t.status,t.responseJSON),{name:e.Name,error:!0}}})),t=await Promise.all(e);this.data=t;this.data.reduce(((e,t)=>e||t.high),!1)?(this.setStatus(s.Z.loaded),this.drawLongCanvas()):this.setStatus(s.Z.noData)}async drawLongCanvas(){const e=this.elem.querySelector(".travel-lines");e.innerHTML="";const t=this.data.map((e=>{if(e.error)return!1;const t={};if(t.city=e,e.icon){t.city=e.name;const{low:n,high:s}=e,r=Math.round(n).toString(),a=Math.round(s).toString();t.low=r,t.high=a,t.icon={type:"img",src:e.icon}}else t.error="NO TRAVEL DATA AVAILABLE";return this.fillTemplate("travel-row",t)})).filter((e=>e));e.append(...t)}async drawCanvas(){super.drawCanvas();const e=this.data;this.elem.querySelector(".header .title.dual .bottom").innerHTML=`For ${u(e)}`,this.finishDraw()}async showCanvas(){await this.drawCanvas(),super.showCanvas()}screenIndexChange(){this.baseCountChange(this.navBaseCount)}baseCountChange(e){let t=Math.min(this.elem.querySelector(".travel-lines").getBoundingClientRect().height-289,e-150);t<0&&(t=0),this.elem.querySelector(".main").scrollTo(0,t)}getLongCanvas(){return this.longCanvas}}const u=e=>e.reduce(((e,t)=>{if(t&&""===e){return i.ou.local().plus({days:t.today?0:1}).toLocaleString({weekday:"long"})}return e}),"");(0,l.G1)(new c(4,"travel",!1))},791:(e,t,n)=>{n.d(t,{TE:()=>r,mt:()=>s,re:()=>a});const s=e=>["N","NNE","NE","ENE","E","ESE","SE","SSE","S","SSW","SW","WSW","W","WNW","NW","NNW"][Math.floor(e/22.5+.5)%16],r=(e,t,n,s)=>Math.sqrt((n-e)**2+(s-t)**2),a=(e,t)=>(e%t+t)%t},737:(e,t,n)=>{n.d(t,{d:()=>s});const s=e=>{let t=e;return t=t.replace("https://api.weather.gov/",window.location.href),t=t.replace("https://www.cpc.ncep.noaa.gov/",window.location.href),t}},946:(e,t,n)=>{n.d(t,{T:()=>s});const s=(e,t)=>{[...document.querySelectorAll(e)].forEach(t)}},929:(e,t,n)=>{n.d(t,{AV:()=>r,Ik:()=>i,fL:()=>a});var s=n(737);const r=(e,t)=>o(e,"json",t),a=(e,t)=>o(e,"text",t),i=(e,t)=>o(e,"blob",t),o=async(e,t,n={})=>{const r={method:"GET",mode:"cors",type:"GET",retryCount:0,...n};r.originalRetries=r.retryCount;let a=e;!0===r.cors&&(a=(0,s.d)(e));const i=new URL(a,`${window.location.origin}/`);i.protocol="localhost"!==window.location.hostname?window.location.protocol:i.protocol,r.data&&Object.keys(r.data).forEach((e=>{const t=r.data[e];i.searchParams.append(e,t)}));const o=await l(i,r);if(!o.ok)throw new Error(`Fetch error ${o.status} ${o.statusText} while fetching ${o.url}`);switch(t){case"json":return o.json();case"text":return o.text();case"blob":return o.blob();default:return o}},l=(e,t)=>new Promise(((n,s)=>{fetch(e,t).then((s=>{if(t.retryCount>0){if(s.status>=500&&s.status<=599&&t.retryCount>0){"function"==typeof t.stillWaiting&&t.retryCount===t.originalRetries&&t.stillWaiting();const s={...t,retryCount:t.retryCount-1};return n(c(u(t.originalRetries-s.retryCount),l,e,s))}return n(s)}return n(s)})).catch((e=>s(e)))})),c=(e,t,...n)=>new Promise((s=>{setTimeout((()=>{s(t(...n))}),e)})),u=e=>{switch(e){case 1:return 1e3;case 2:return 2e3;case 3:return 5e3;case 4:return 1e4;default:return 3e4}}},138:(e,t,n)=>{n.d(t,{a:()=>a,b:()=>o});var s=n(929),r=n(737);const a=(e,t=!1)=>new Promise((n=>{const s=new Image;if(s.onload=e=>{n(e.target)},e instanceof Blob)s.src=window.URL.createObjectURL(e);else{let n=e;t&&(n=(0,r.d)(e)),s.src=n}})),i=[],o=e=>!i.includes(e)&&((0,s.Ik)(e),!0)},739:(e,t,n)=>{n.d(t,{Z:()=>a});let s=!1;const r=(e=!1)=>(r.controller||(r.controller=new NoSleep),s!==e&&(s=e,e?r.controller.enable():r.controller.disable())),a=r},206:(e,t,n)=>{n.d(t,{a:()=>s});const s=e=>[/^[A-Za-z ]+ \/ /,/^[A-Za-z ]+\//,/^[A-Za-z ]+, /].reduce(((e,t)=>e.replace(t,"")),e)},594:(e,t,n)=>{n.d(t,{AD:()=>o,Kh:()=>r,MO:()=>l,NE:()=>a,Xp:()=>s,dp:()=>i});const s=(e,t)=>Math.trunc(e*10**t)/10**t,r=e=>Math.round(e/1.60934),a=e=>Math.round(9*e/5+32),i=e=>Math.round(e/1.60934),o=e=>Math.round(e/.3048),l=e=>s(2953e-7*e,2)},735:(e,t,n)=>{n.d(t,{F:()=>r});var s=n(929);const r=async(e,t)=>{try{return await(0,s.AV)(`https://api.weather.gov/points/${e},${t}`)}catch(n){return console.log(`Unable to get point ${e}, ${t}`),console.error(n),!1}}},159:(e,t,n)=>{n.d(t,{Z:()=>o});var s=n(38),r=n(732),a=n(946),i=n(325);const o=class{constructor(e,t,n,r){this.navId=e,this.elemId=void 0,this.gifs=[],this.data=void 0,this.loadingStatus=s.Z.loading,this.name=n??t,this.getDataCallbacks=[],this.stillWaitingCallbacks=[],this.defaultEnabled=r,this.okToDrawCurrentConditions=!0,this.okToDrawCurrentDateTime=!0,this.timing={totalScreens:1,baseDelay:9e3,delay:1},this.navBaseCount=0,this.screenIndex=-1,this.storeElemId(t),this.enabled?this.setStatus(s.Z.loading):this.setStatus(s.Z.disabled),this.startNavCount(),document.addEventListener("DOMContentLoaded",(()=>{this.loadTemplates()}))}generateCheckbox(e=!0){if("progress"===this.elemId)return!1;let t=window.localStorage.getItem(`display-enabled: ${this.elemId}`);null===t&&(t=e),this.enabled="true"===t||!0===t,window.localStorage.setItem(`display-enabled: ${this.elemId}`,this.enabled);const n=document.createElement("template");return n.innerHTML=`<label for="${this.elemId}Enabled">\n\t\t\t\t\t\t\t<input type="checkbox" value="true" id="${this.elemId}Enabled" name="${this.elemId}Enabled"${this.enabled?" checked":""}/>\n\t\t\t\t\t\t ${this.name}</label>`,n.content.firstChild.addEventListener("change",(e=>this.checkboxChange(e))),n.content.firstChild}checkboxChange(e){this.enabled=e.target.checked,window.localStorage.setItem(`display-enabled: ${this.elemId}`,this.enabled),this.getData()}setStatus(e){this.status=e,(0,i.Nf)({id:this.navId,status:this.status})}get status(){return this.loadingStatus}set status(e){this.loadingStatus=e}storeElemId(e){this.elemId||(this.elemId=e)}getData(e){return this.data=void 0,e&&(this.weatherParameters=e),this.enabled?(this.setStatus(s.Z.loading),this.calcNavTiming(),!0):(this.setStatus(s.Z.disabled),!1)}getDataCallback(){this.getDataCallbacks.forEach((e=>e(this.data))),this.getDataCallbacks=[]}drawCanvas(){this.screenIndex<0&&(this.screenIndex=0)}finishDraw(){this.okToDrawCurrentDateTime&&(this.drawCurrentDateTime(),this.dateTimeInterval||setInterval((()=>this.drawCurrentDateTime()),100))}drawCurrentDateTime(){if(!this.isActive())return;const e=r.ou.local(),t=e.toLocaleString(r.ou.TIME_WITH_SECONDS).padStart(11," ");this.lastTime!==t&&(0,a.T)(".date-time.time",(e=>{e.innerHTML=t.toUpperCase()})),this.lastTime=t;const n=e.toFormat(" ccc LLL ")+e.day.toString().padStart(2," ");this.lastDate!==n&&(0,a.T)(".date-time.date",(e=>{e.innerHTML=n.toUpperCase()})),this.lastDate=n}showCanvas(e){e===i.WI.command.firstFrame&&this.navNext(e),e===i.WI.command.lastFrame&&this.navPrev(e),this.startNavCount(),this.elem.classList.add("show")}hideCanvas(){this.resetNavBaseCount(),this.elem.classList.remove("show")}isActive(){return 0!==this.elem.offsetHeight}isEnabled(){return this.enabled}navBaseTime(){(0,i.yA)()&&this.isActive()&&(this.navBaseCount+=1,this.baseCountChange&&this.baseCountChange(this.navBaseCount),this.updateScreenFromBaseCount())}async updateScreenFromBaseCount(){const e=this.screenIndexFromBaseCount();!1!==e?e!==this.screenIndex&&(this.screenIndex=-1===e?0:e,this.screenIndexChange?this.screenIndexChange(this.screenIndex):(await this.drawCanvas(),this.showCanvas())):this.sendNavDisplayMessage(i.WI.response.next)}calcNavTiming(){if(!1===this.timing)return;Array.isArray(this.timing.delay)&&(this.timing.totalScreens=this.timing.delay.length);let e=[];if("number"==typeof this.timing.delay)for(let t=0;t<this.timing.totalScreens;t+=1)e.push(this.timing.delay);else e=this.timing.delay.map((e=>"object"==typeof e?e.time:e));let t=0;if(this.timing.fullDelay=e.map((e=>{const n=t+e;return t+=e,n})),Array.isArray(this.timing.delay)&&"object"==typeof this.timing.delay[0])this.timing.screenIndexes=this.timing.delay.map((e=>e.si));else{this.timing.screenIndexes=[];for(let e=0;e<this.timing.totalScreens;e+=1)this.timing.screenIndexes.push(e)}}navNext(e){if(e===i.WI.command.firstFrame)this.resetNavBaseCount();else{const e=this.timing.fullDelay.find((e=>e>this.navBaseCount));this.navBaseCount=e}this.updateScreenFromBaseCount()}navPrev(e){if(e===i.WI.command.lastFrame)this.navBaseCount=this.timing.fullDelay[this.timing.totalScreens-1]-1;else{const e=this.timing.fullDelay.reduce(((e,t)=>t<this.navBaseCount?t:e),0);if(0===e&&0===this.navBaseCount)return void this.sendNavDisplayMessage(i.WI.response.previous);this.navBaseCount=e}this.updateScreenFromBaseCount()}screenIndexFromBaseCount(){if(!this.timing)return 0;this.timing&&!this.timing.fullDelay&&this.calcNavTiming();const e=this.timing.fullDelay.findIndex((e=>e>this.navBaseCount));return-1!==e&&this.timing.screenIndexes[e]}startNavCount(){this.navInterval||(this.navInterval=setInterval((()=>this.navBaseTime()),this.timing.baseDelay))}resetNavBaseCount(){this.navBaseCount=0,this.screenIndex=-1,this.navInterval&&(clearInterval(this.navInterval),this.navInterval=void 0)}sendNavDisplayMessage(e){(0,i.Pl)({id:this.navId,type:e})}loadTemplates(){if(this.templates={},this.elem=document.getElementById(`${this.elemId}-html`),!this.elem)return;this.elem.querySelectorAll(".template").forEach((e=>{const t=e.classList[0],n=e.cloneNode(!0);n.classList.remove("template"),this.templates[t]=n,e.remove()}))}fillTemplate(e,t){const n=this.templates[e];if(!n)return!1;const s=n.cloneNode(!0);return Object.entries(t).forEach((([e,t])=>{const n=s.querySelector(`.${e}`);n&&("string"==typeof t||"number"==typeof t?n.innerHTML=t:"img"===t?.type&&(n.querySelector("img").src=t.src))})),s}stillWaiting(){this.enabled&&this.setStatus(s.Z.retrying),this.stillWaitingCallbacks.forEach((e=>e())),this.stillWaitingCallbacks=[]}}},732:(e,t,n)=>{n.d(t,{Xp:()=>Yt,nL:()=>Gt,ou:()=>Xn});class s extends Error{}class r extends s{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class a extends s{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class i extends s{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class o extends s{}class l extends s{constructor(e){super(`Invalid unit ${e}`)}}class c extends s{}class u extends s{constructor(){super("Zone is an abstract class")}}const d="numeric",h="short",m="long",f={year:d,month:d,day:d},g={year:d,month:h,day:d},y={year:d,month:h,day:d,weekday:h},p={year:d,month:m,day:d},w={year:d,month:m,day:d,weekday:m},v={hour:d,minute:d},S={hour:d,minute:d,second:d},b={hour:d,minute:d,second:d,timeZoneName:h},T={hour:d,minute:d,second:d,timeZoneName:m},C={hour:d,minute:d,hourCycle:"h23"},I={hour:d,minute:d,second:d,hourCycle:"h23"},M={hour:d,minute:d,second:d,hourCycle:"h23",timeZoneName:h},D={hour:d,minute:d,second:d,hourCycle:"h23",timeZoneName:m},x={year:d,month:d,day:d,hour:d,minute:d},k={year:d,month:d,day:d,hour:d,minute:d,second:d},L={year:d,month:h,day:d,hour:d,minute:d},E={year:d,month:h,day:d,hour:d,minute:d,second:d},N={year:d,month:h,day:d,weekday:h,hour:d,minute:d},O={year:d,month:m,day:d,hour:d,minute:d,timeZoneName:h},F={year:d,month:m,day:d,hour:d,minute:d,second:d,timeZoneName:h},$={year:d,month:m,day:d,weekday:m,hour:d,minute:d,timeZoneName:m},Z={year:d,month:m,day:d,weekday:m,hour:d,minute:d,second:d,timeZoneName:m};function V(e){return void 0===e}function H(e){return"number"==typeof e}function _(e){return"number"==typeof e&&e%1==0}function A(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function P(e,t,n){if(0!==e.length)return e.reduce(((e,s)=>{const r=[t(s),s];return e&&n(e[0],r[0])===e[0]?e:r}),null)[1]}function W(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function q(e,t,n){return _(e)&&e>=t&&e<=n}function B(e,t=2){let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function z(e){return V(e)||null===e||""===e?void 0:parseInt(e,10)}function R(e){return V(e)||null===e||""===e?void 0:parseFloat(e)}function U(e){if(!V(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function j(e,t,n=!1){const s=10**t;return(n?Math.trunc:Math.round)(e*s)/s}function G(e){return e%4==0&&(e%100!=0||e%400==0)}function J(e){return G(e)?366:365}function Y(e,t){const n=function(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===n?G(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Q(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(t.getUTCFullYear()-1900)),+t}function K(e){const t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,n=e-1,s=(n+Math.floor(n/4)-Math.floor(n/100)+Math.floor(n/400))%7;return 4===t||3===s?53:52}function X(e){return e>99?e:e>60?1900+e:2e3+e}function ee(e,t,n,s=null){const r=new Date(e),a={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};s&&(a.timeZone=s);const i={timeZoneName:t,...a},o=new Intl.DateTimeFormat(n,i).formatToParts(r).find((e=>"timezonename"===e.type.toLowerCase()));return o?o.value:null}function te(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const s=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-s:s)}function ne(e){const t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new c(`Invalid unit value ${e}`);return t}function se(e,t){const n={};for(const s in e)if(W(e,s)){const r=e[s];if(null==r)continue;n[t(s)]=ne(r)}return n}function re(e,t){const n=Math.trunc(Math.abs(e/60)),s=Math.trunc(Math.abs(e%60)),r=e>=0?"+":"-";switch(t){case"short":return`${r}${B(n,2)}:${B(s,2)}`;case"narrow":return`${r}${n}${s>0?`:${s}`:""}`;case"techie":return`${r}${B(n,2)}${B(s,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function ae(e){return function(e,t){return t.reduce(((t,n)=>(t[n]=e[n],t)),{})}(e,["hour","minute","second","millisecond"])}const ie=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/,oe=["January","February","March","April","May","June","July","August","September","October","November","December"],le=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ce=["J","F","M","A","M","J","J","A","S","O","N","D"];function ue(e){switch(e){case"narrow":return[...ce];case"short":return[...le];case"long":return[...oe];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const de=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],he=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],me=["M","T","W","T","F","S","S"];function fe(e){switch(e){case"narrow":return[...me];case"short":return[...he];case"long":return[...de];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const ge=["AM","PM"],ye=["Before Christ","Anno Domini"],pe=["BC","AD"],we=["B","A"];function ve(e){switch(e){case"narrow":return[...we];case"short":return[...pe];case"long":return[...ye];default:return null}}function Se(e,t){let n="";for(const s of e)s.literal?n+=s.val:n+=t(s.val);return n}const be={D:f,DD:g,DDD:p,DDDD:w,t:v,tt:S,ttt:b,tttt:T,T:C,TT:I,TTT:M,TTTT:D,f:x,ff:L,fff:O,ffff:$,F:k,FF:E,FFF:F,FFFF:Z};class Te{static create(e,t={}){return new Te(e,t)}static parseFormat(e){let t=null,n="",s=!1;const r=[];for(let a=0;a<e.length;a++){const i=e.charAt(a);"'"===i?(n.length>0&&r.push({literal:s,val:n}),t=null,n="",s=!s):s||i===t?n+=i:(n.length>0&&r.push({literal:!1,val:n}),n=i,t=i)}return n.length>0&&r.push({literal:s,val:n}),r}static macroTokenToFormatOpts(e){return be[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTime(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).format()}formatDateTimeParts(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).formatToParts()}resolvedOptions(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t}).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return B(e,t);const n={...this.opts};return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),s=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,r=(t,n)=>this.loc.extract(e,t,n),a=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",i=()=>n?function(e){return ge[e.hour<12?0:1]}(e):r({hour:"numeric",hourCycle:"h12"},"dayperiod"),o=(t,s)=>n?function(e,t){return ue(t)[e.month-1]}(e,t):r(s?{month:t}:{month:t,day:"numeric"},"month"),l=(t,s)=>n?function(e,t){return fe(t)[e.weekday-1]}(e,t):r(s?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),c=t=>{const n=Te.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},u=t=>n?function(e,t){return ve(t)[e.year<0?0:1]}(e,t):r({era:t},"era");return Se(Te.parseFormat(t),(t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return i();case"d":return s?r({day:"numeric"},"day"):this.num(e.day);case"dd":return s?r({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return s?r({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?r({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return o("short",!0);case"LLLL":return o("long",!0);case"LLLLL":return o("narrow",!0);case"M":return s?r({month:"numeric"},"month"):this.num(e.month);case"MM":return s?r({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return o("short",!1);case"MMMM":return o("long",!1);case"MMMMM":return o("narrow",!1);case"y":return s?r({year:"numeric"},"year"):this.num(e.year);case"yy":return s?r({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?r({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?r({year:"numeric"},"year"):this.num(e.year,6);case"G":return u("short");case"GG":return u("long");case"GGGGG":return u("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return c(t)}}))}formatDurationFromString(e,t){const n=e=>{switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=Te.parseFormat(t),r=s.reduce(((e,{literal:t,val:n})=>t?e:e.concat(n)),[]);return Se(s,(e=>t=>{const s=n(t);return s?this.num(e.get(s),t.length):t})(e.shiftTo(...r.map(n).filter((e=>e)))))}}class Ce{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}class Ie{get type(){throw new u}get name(){throw new u}get ianaName(){return this.name}get isUniversal(){throw new u}offsetName(e,t){throw new u}formatOffset(e,t){throw new u}offset(e){throw new u}equals(e){throw new u}get isValid(){throw new u}}let Me=null;class De extends Ie{static get instance(){return null===Me&&(Me=new De),Me}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return ee(e,t,n)}formatOffset(e,t){return re(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}let xe={};const ke={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let Le={};class Ee extends Ie{static create(e){return Le[e]||(Le[e]=new Ee(e)),Le[e]}static resetCache(){Le={},xe={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=Ee.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return ee(e,t,n,this.name)}formatOffset(e,t){return re(this.offset(e),t)}offset(e){const t=new Date(e);if(isNaN(t))return NaN;const n=(s=this.name,xe[s]||(xe[s]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:s,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),xe[s]);var s;let[r,a,i,o,l,c,u]=n.formatToParts?function(e,t){const n=e.formatToParts(t),s=[];for(let e=0;e<n.length;e++){const{type:t,value:r}=n[e],a=ke[t];"era"===t?s[a]=r:V(a)||(s[a]=parseInt(r,10))}return s}(n,t):function(e,t){const n=e.format(t).replace(/\u200E/g,""),s=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,r,a,i,o,l,c,u]=s;return[i,r,a,o,l,c,u]}(n,t);"BC"===o&&(r=1-Math.abs(r));let d=+t;const h=d%1e3;return d-=h>=0?h:1e3+h,(Q({year:r,month:a,day:i,hour:24===l?0:l,minute:c,second:u,millisecond:0})-d)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let Ne=null;class Oe extends Ie{static get utcInstance(){return null===Ne&&(Ne=new Oe(0)),Ne}static instance(e){return 0===e?Oe.utcInstance:new Oe(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new Oe(te(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${re(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${re(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return re(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class Fe extends Ie{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function $e(e,t){if(V(e)||null===e)return t;if(e instanceof Ie)return e;if("string"==typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?De.instance:"utc"===n||"gmt"===n?Oe.utcInstance:Oe.parseSpecifier(n)||Ee.create(e)}return H(e)?Oe.instance(e):"object"==typeof e&&e.offset&&"number"==typeof e.offset?e:new Fe(e)}let Ze,Ve=()=>Date.now(),He="system",_e=null,Ae=null,Pe=null;class We{static get now(){return Ve}static set now(e){Ve=e}static set defaultZone(e){He=e}static get defaultZone(){return $e(He,De.instance)}static get defaultLocale(){return _e}static set defaultLocale(e){_e=e}static get defaultNumberingSystem(){return Ae}static set defaultNumberingSystem(e){Ae=e}static get defaultOutputCalendar(){return Pe}static set defaultOutputCalendar(e){Pe=e}static get throwOnInvalid(){return Ze}static set throwOnInvalid(e){Ze=e}static resetCaches(){Ke.resetCache(),Ee.resetCache()}}let qe={};let Be={};function ze(e,t={}){const n=JSON.stringify([e,t]);let s=Be[n];return s||(s=new Intl.DateTimeFormat(e,t),Be[n]=s),s}let Re={};let Ue={};let je=null;function Ge(e,t,n,s,r){const a=e.listingMode(n);return"error"===a?null:"en"===a?s(t):r(t)}class Je{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:s,floor:r,...a}=n;if(!t||Object.keys(a).length>0){const t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e,t={}){const n=JSON.stringify([e,t]);let s=Re[n];return s||(s=new Intl.NumberFormat(e,t),Re[n]=s),s}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return B(this.floor?Math.floor(e):j(e,3),this.padTo)}}class Ye{constructor(e,t,n){let s;if(this.opts=n,e.zone.isUniversal){const t=e.offset/60*-1,r=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&Ee.create(r).valid?(s=r,this.dt=e):(s="UTC",n.timeZoneName?this.dt=e:this.dt=0===e.offset?e:Xn.fromMillis(e.ts+60*e.offset*1e3))}else"system"===e.zone.type?this.dt=e:(this.dt=e,s=e.zone.name);const r={...this.opts};s&&(r.timeZone=s),this.dtf=ze(t,r)}format(){return this.dtf.format(this.dt.toJSDate())}formatToParts(){return this.dtf.formatToParts(this.dt.toJSDate())}resolvedOptions(){return this.dtf.resolvedOptions()}}class Qe{constructor(e,t,n){this.opts={style:"long",...n},!t&&A()&&(this.rtf=function(e,t={}){const{base:n,...s}=t,r=JSON.stringify([e,s]);let a=Ue[r];return a||(a=new Intl.RelativeTimeFormat(e,t),Ue[r]=a),a}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,n="always",s=!1){const r={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},a=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&a){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${r[e][0]}`;case-1:return n?"yesterday":`last ${r[e][0]}`;case 0:return n?"today":`this ${r[e][0]}`}}const i=Object.is(t,-0)||t<0,o=Math.abs(t),l=1===o,c=r[e],u=s?l?c[1]:c[2]||c[1]:l?r[e][0]:e;return i?`${o} ${u} ago`:`in ${o} ${u}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class Ke{static fromOpts(e){return Ke.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,n,s=!1){const r=e||We.defaultLocale,a=r||(s?"en-US":je||(je=(new Intl.DateTimeFormat).resolvedOptions().locale,je)),i=t||We.defaultNumberingSystem,o=n||We.defaultOutputCalendar;return new Ke(a,i,o,r)}static resetCache(){je=null,Be={},Re={},Ue={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:n}={}){return Ke.create(e,t,n)}constructor(e,t,n,s){const[r,a,i]=function(e){const t=e.indexOf("-u-");if(-1===t)return[e];{let n;const s=e.substring(0,t);try{n=ze(e).resolvedOptions()}catch(e){n=ze(s).resolvedOptions()}const{numberingSystem:r,calendar:a}=n;return[s,r,a]}}(e);this.locale=r,this.numberingSystem=t||a||null,this.outputCalendar=n||i||null,this.intl=function(e,t,n){return n||t?(e+="-u",n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?Ke.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1,n=!0){return Ge(this,e,n,ue,(()=>{const n=t?{month:e,day:"numeric"}:{month:e},s=t?"format":"standalone";return this.monthsCache[s][e]||(this.monthsCache[s][e]=function(e){const t=[];for(let n=1;n<=12;n++){const s=Xn.utc(2016,n,1);t.push(e(s))}return t}((e=>this.extract(e,n,"month")))),this.monthsCache[s][e]}))}weekdays(e,t=!1,n=!0){return Ge(this,e,n,fe,(()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=t?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=function(e){const t=[];for(let n=1;n<=7;n++){const s=Xn.utc(2016,11,13+n);t.push(e(s))}return t}((e=>this.extract(e,n,"weekday")))),this.weekdaysCache[s][e]}))}meridiems(e=!0){return Ge(this,void 0,e,(()=>ge),(()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Xn.utc(2016,11,13,9),Xn.utc(2016,11,13,19)].map((t=>this.extract(t,e,"dayperiod")))}return this.meridiemCache}))}eras(e,t=!0){return Ge(this,e,t,ve,(()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[Xn.utc(-40,1,1),Xn.utc(2017,1,1)].map((e=>this.extract(e,t,"era")))),this.eraCache[e]}))}extract(e,t,n){const s=this.dtFormatter(e,t).formatToParts().find((e=>e.type.toLowerCase()===n));return s?s.value:null}numberFormatter(e={}){return new Je(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new Ye(e,this.intl,t)}relFormatter(e={}){return new Qe(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const n=JSON.stringify([e,t]);let s=qe[n];return s||(s=new Intl.ListFormat(e,t),qe[n]=s),s}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}function Xe(...e){const t=e.reduce(((e,t)=>e+t.source),"");return RegExp(`^${t}$`)}function et(...e){return t=>e.reduce((([e,n,s],r)=>{const[a,i,o]=r(t,s);return[{...e,...a},i||n,o]}),[{},null,1]).slice(0,2)}function tt(e,...t){if(null==e)return[null,null];for(const[n,s]of t){const t=n.exec(e);if(t)return s(t)}return[null,null]}function nt(...e){return(t,n)=>{const s={};let r;for(r=0;r<e.length;r++)s[e[r]]=z(t[n+r]);return[s,null,n+r]}}const st=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,rt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,at=RegExp(`${rt.source}${`(?:${st.source}?(?:\\[(${ie.source})\\])?)?`}`),it=RegExp(`(?:T${at.source})?`),ot=nt("weekYear","weekNumber","weekDay"),lt=nt("year","ordinal"),ct=RegExp(`${rt.source} ?(?:${st.source}|(${ie.source}))?`),ut=RegExp(`(?: ${ct.source})?`);function dt(e,t,n){const s=e[t];return V(s)?n:z(s)}function ht(e,t){return[{hours:dt(e,t,0),minutes:dt(e,t+1,0),seconds:dt(e,t+2,0),milliseconds:U(e[t+3])},null,t+4]}function mt(e,t){const n=!e[t]&&!e[t+1],s=te(e[t+1],e[t+2]);return[{},n?null:Oe.instance(s),t+3]}function ft(e,t){return[{},e[t]?Ee.create(e[t]):null,t+1]}const gt=RegExp(`^T?${rt.source}$`),yt=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function pt(e){const[t,n,s,r,a,i,o,l,c]=e,u="-"===t[0],d=l&&"-"===l[0],h=(e,t=!1)=>void 0!==e&&(t||e&&u)?-e:e;return[{years:h(R(n)),months:h(R(s)),weeks:h(R(r)),days:h(R(a)),hours:h(R(i)),minutes:h(R(o)),seconds:h(R(l),"-0"===l),milliseconds:h(U(c),d)}]}const wt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function vt(e,t,n,s,r,a,i){const o={year:2===t.length?X(z(t)):z(t),month:le.indexOf(n)+1,day:z(s),hour:z(r),minute:z(a)};return i&&(o.second=z(i)),e&&(o.weekday=e.length>3?de.indexOf(e)+1:he.indexOf(e)+1),o}const St=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function bt(e){const[,t,n,s,r,a,i,o,l,c,u,d]=e,h=vt(t,r,s,n,a,i,o);let m;return m=l?wt[l]:c?0:te(u,d),[h,new Oe(m)]}const Tt=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Ct=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,It=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Mt(e){const[,t,n,s,r,a,i,o]=e;return[vt(t,r,s,n,a,i,o),Oe.utcInstance]}function Dt(e){const[,t,n,s,r,a,i,o]=e;return[vt(t,o,n,s,r,a,i),Oe.utcInstance]}const xt=Xe(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,it),kt=Xe(/(\d{4})-?W(\d\d)(?:-?(\d))?/,it),Lt=Xe(/(\d{4})-?(\d{3})/,it),Et=Xe(at),Nt=et((function(e,t){return[{year:dt(e,t),month:dt(e,t+1,1),day:dt(e,t+2,1)},null,t+3]}),ht,mt,ft),Ot=et(ot,ht,mt,ft),Ft=et(lt,ht,mt,ft),$t=et(ht,mt,ft);const Zt=et(ht);const Vt=Xe(/(\d{4})-(\d\d)-(\d\d)/,ut),Ht=Xe(ct),_t=et(ht,mt,ft);const At={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},Pt={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...At},Wt=365.2425,qt=30.436875,Bt={years:{quarters:4,months:12,weeks:52.1775,days:Wt,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:qt,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...At},zt=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Rt=zt.slice(0).reverse();function Ut(e,t,n=!1){const s={values:n?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Gt(s)}function jt(e,t,n,s,r){const a=e[r][n],i=t[n]/a,o=!(Math.sign(i)===Math.sign(s[r]))&&0!==s[r]&&Math.abs(i)<=1?function(e){return e<0?Math.floor(e):Math.ceil(e)}(i):Math.trunc(i);s[r]+=o,t[n]-=o*a}class Gt{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?Bt:Pt;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||Ke.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return Gt.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new c("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new Gt({values:se(e,Gt.normalizeUnit),loc:Ke.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(H(e))return Gt.fromMillis(e);if(Gt.isDuration(e))return e;if("object"==typeof e)return Gt.fromObject(e);throw new c(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return tt(e,[yt,pt])}(e);return n?Gt.fromObject(n,t):Gt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return tt(e,[gt,Zt])}(e);return n?Gt.fromObject(n,t):Gt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new c("need to specify a reason the Duration is invalid");const n=e instanceof Ce?e:new Ce(e,t);if(We.throwOnInvalid)throw new i(n);return new Gt({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new l(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?Te.create(this.loc,n).formatDurationFromString(this,e):"Invalid Duration"}toHuman(e={}){const t=zt.map((t=>{const n=this.values[t];return V(n)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:t.slice(0,-1)}).format(n)})).filter((e=>e));return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=j(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e};const n=this.shiftTo("hours","minutes","seconds","milliseconds");let s="basic"===e.format?"hhmm":"hh:mm";e.suppressSeconds&&0===n.seconds&&0===n.milliseconds||(s+="basic"===e.format?"ss":":ss",e.suppressMilliseconds&&0===n.milliseconds||(s+=".SSS"));let r=n.toFormat(s);return e.includePrefix&&(r="T"+r),r}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.as("milliseconds")}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=Gt.fromDurationLike(e),n={};for(const e of zt)(W(t.values,e)||W(this.values,e))&&(n[e]=t.get(e)+this.get(e));return Ut(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=Gt.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=ne(e(this.values[n],n));return Ut(this,{values:t},!0)}get(e){return this[Gt.normalizeUnit(e)]}set(e){if(!this.isValid)return this;return Ut(this,{values:{...this.values,...se(e,Gt.normalizeUnit)}})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:s}={}){return Ut(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:s,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return function(e,t){Rt.reduce(((n,s)=>V(t[s])?n:(n&&jt(e,t,n,t,s),s)),null)}(this.matrix,e),Ut(this,{values:e},!0)}rescale(){if(!this.isValid)return this;return Ut(this,{values:function(e){const t={};for(const[n,s]of Object.entries(e))0!==s&&(t[n]=s);return t}(this.normalize().shiftToAll().toObject())},!0)}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map((e=>Gt.normalizeUnit(e)));const t={},n={},s=this.toObject();let r;for(const a of zt)if(e.indexOf(a)>=0){r=a;let e=0;for(const t in n)e+=this.matrix[t][a]*n[t],n[t]=0;H(s[a])&&(e+=s[a]);const i=Math.trunc(e);t[a]=i,n[a]=(1e3*e-1e3*i)/1e3;for(const e in s)zt.indexOf(e)>zt.indexOf(a)&&jt(this.matrix,s,e,t,a)}else H(s[a])&&(n[a]=s[a]);for(const e in n)0!==n[e]&&(t[r]+=e===r?n[e]:n[e]/this.matrix[r][e]);return Ut(this,{values:t},!0).normalize()}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return Ut(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(const s of zt)if(t=this.values[s],n=e.values[s],!(void 0===t||0===t?void 0===n||0===n:t===n))return!1;var t,n;return!0}}const Jt="Invalid Interval";class Yt{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new c("need to specify a reason the Interval is invalid");const n=e instanceof Ce?e:new Ce(e,t);if(We.throwOnInvalid)throw new a(n);return new Yt({invalid:n})}static fromDateTimes(e,t){const n=es(e),s=es(t),r=function(e,t){return e&&e.isValid?t&&t.isValid?t<e?Yt.invalid("end before start",`The end of an interval must be after its start, but you had start=${e.toISO()} and end=${t.toISO()}`):null:Yt.invalid("missing or invalid end"):Yt.invalid("missing or invalid start")}(n,s);return null==r?new Yt({start:n,end:s}):r}static after(e,t){const n=Gt.fromDurationLike(t),s=es(e);return Yt.fromDateTimes(s,s.plus(n))}static before(e,t){const n=Gt.fromDurationLike(t),s=es(e);return Yt.fromDateTimes(s.minus(n),s)}static fromISO(e,t){const[n,s]=(e||"").split("/",2);if(n&&s){let e,r,a,i;try{e=Xn.fromISO(n,t),r=e.isValid}catch(s){r=!1}try{a=Xn.fromISO(s,t),i=a.isValid}catch(s){i=!1}if(r&&i)return Yt.fromDateTimes(e,a);if(r){const n=Gt.fromISO(s,t);if(n.isValid)return Yt.after(e,n)}else if(i){const e=Gt.fromISO(n,t);if(e.isValid)return Yt.before(a,e)}}return Yt.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return null===this.invalidReason}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds"){if(!this.isValid)return NaN;const t=this.start.startOf(e),n=this.end.startOf(e);return Math.floor(n.diff(t,e).get(e))+1}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&(this.s<=e&&this.e>e)}set({start:e,end:t}={}){return this.isValid?Yt.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(es).filter((e=>this.contains(e))).sort(),n=[];let{s}=this,r=0;for(;s<this.e;){const e=t[r]||this.e,a=+e>+this.e?this.e:e;n.push(Yt.fromDateTimes(s,a)),s=a,r+=1}return n}splitBy(e){const t=Gt.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s}=this,r=1;const a=[];for(;s<this.e;){const e=this.start.plus(t.mapUnits((e=>e*r)));n=+e>+this.e?this.e:e,a.push(Yt.fromDateTimes(s,n)),s=n,r+=1}return a}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return!!this.isValid&&+this.e==+e.s}abutsEnd(e){return!!this.isValid&&+e.e==+this.s}engulfs(e){return!!this.isValid&&(this.s<=e.s&&this.e>=e.e)}equals(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:Yt.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return Yt.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort(((e,t)=>e.s-t.s)).reduce((([e,t],n)=>t?t.overlaps(n)||t.abutsStart(n)?[e,t.union(n)]:[e.concat([t]),n]:[e,n]),[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const s=[],r=e.map((e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}])),a=Array.prototype.concat(...r).sort(((e,t)=>e.time-t.time));for(const e of a)n+="s"===e.type?1:-1,1===n?t=e.time:(t&&+t!=+e.time&&s.push(Yt.fromDateTimes(t,e.time)),t=null);return Yt.merge(s)}difference(...e){return Yt.xor([this].concat(e)).map((e=>this.intersection(e))).filter((e=>e&&!e.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} ${this.e.toISO()})`:Jt}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Jt}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Jt}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Jt}toFormat(e,{separator:t=" "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Jt}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Gt.invalid(this.invalidReason)}mapEndpoints(e){return Yt.fromDateTimes(e(this.s),e(this.e))}}class Qt{static hasDST(e=We.defaultZone){const t=Xn.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return Ee.isValidZone(e)}static normalizeZone(e){return $e(e,We.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:s=null,outputCalendar:r="gregory"}={}){return(s||Ke.create(t,n,r)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:s=null,outputCalendar:r="gregory"}={}){return(s||Ke.create(t,n,r)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:s=null}={}){return(s||Ke.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:s=null}={}){return(s||Ke.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Ke.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Ke.create(t,null,"gregory").eras(e)}static features(){return{relative:A()}}}function Kt(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),s=n(t)-n(e);return Math.floor(Gt.fromMillis(s).as("days"))}function Xt(e,t,n,s){let[r,a,i,o]=function(e,t,n){const s=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=Kt(e,t);return(n-n%7)/7}],["days",Kt]],r={};let a,i;for(const[o,l]of s)if(n.indexOf(o)>=0){a=o;let n=l(e,t);i=e.plus({[o]:n}),i>t?(e=e.plus({[o]:n-1}),n-=1):e=i,r[o]=n}return[e,r,i,a]}(e,t,n);const l=t-r,c=n.filter((e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0));0===c.length&&(i<t&&(i=r.plus({[o]:1})),i!==r&&(a[o]=(a[o]||0)+l/(i-r)));const u=Gt.fromObject(a,s);return c.length>0?Gt.fromMillis(l,s).shiftTo(...c).plus(u):u}const en={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[-৯]",deva:"[-९]",fullwide:"[-]",gujr:"[-૯]",hanidec:"[|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[-೯]",laoo:"[-໙]",limb:"[᥆-᥏]",mlym:"[-൯]",mong:"[᠐-᠙]",mymr:"[-၉]",orya:"[-୯]",tamldec:"[-௯]",telu:"[-౯]",thai:"[-๙]",tibt:"[༠-༩]",latn:"\\d"},tn={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},nn=en.hanidec.replace(/[\[|\]]/g,"").split("");function sn({numberingSystem:e},t=""){return new RegExp(`${en[e||"latn"]}${t}`)}function rn(e,t=(e=>e)){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n<e.length;n++){const s=e.charCodeAt(n);if(-1!==e[n].search(en.hanidec))t+=nn.indexOf(e[n]);else for(const e in tn){const[n,r]=tn[e];s>=n&&s<=r&&(t+=s-n)}}return parseInt(t,10)}return t}(e))}}const an=`[ ${String.fromCharCode(160)}]`,on=new RegExp(an,"g");function ln(e){return e.replace(/\./g,"\\.?").replace(on,an)}function cn(e){return e.replace(/\./g,"").replace(on," ").toLowerCase()}function un(e,t){return null===e?null:{regex:RegExp(e.map(ln).join("|")),deser:([n])=>e.findIndex((e=>cn(n)===cn(e)))+t}}function dn(e,t){return{regex:e,deser:([,e,t])=>te(e,t),groups:t}}function hn(e){return{regex:e,deser:([e])=>e}}const mn={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let fn=null;function gn(e,t){return Array.prototype.concat(...e.map((e=>function(e,t){if(e.literal)return e;const n=pn(Te.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t))))}function yn(e,t,n){const s=gn(Te.parseFormat(n),e),r=s.map((t=>function(e,t){const n=sn(t),s=sn(t,"{2}"),r=sn(t,"{3}"),a=sn(t,"{4}"),i=sn(t,"{6}"),o=sn(t,"{1,2}"),l=sn(t,"{1,3}"),c=sn(t,"{1,6}"),u=sn(t,"{1,9}"),d=sn(t,"{2,4}"),h=sn(t,"{4,6}"),m=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},f=(f=>{if(e.literal)return m(f);switch(f.val){case"G":return un(t.eras("short",!1),0);case"GG":return un(t.eras("long",!1),0);case"y":return rn(c);case"yy":case"kk":return rn(d,X);case"yyyy":case"kkkk":return rn(a);case"yyyyy":return rn(h);case"yyyyyy":return rn(i);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return rn(o);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return rn(s);case"MMM":return un(t.months("short",!0,!1),1);case"MMMM":return un(t.months("long",!0,!1),1);case"LLL":return un(t.months("short",!1,!1),1);case"LLLL":return un(t.months("long",!1,!1),1);case"o":case"S":return rn(l);case"ooo":case"SSS":return rn(r);case"u":return hn(u);case"uu":return hn(o);case"uuu":case"E":case"c":return rn(n);case"a":return un(t.meridiems(),0);case"EEE":return un(t.weekdays("short",!1,!1),1);case"EEEE":return un(t.weekdays("long",!1,!1),1);case"ccc":return un(t.weekdays("short",!0,!1),1);case"cccc":return un(t.weekdays("long",!0,!1),1);case"Z":case"ZZ":return dn(new RegExp(`([+-]${o.source})(?::(${s.source}))?`),2);case"ZZZ":return dn(new RegExp(`([+-]${o.source})(${s.source})?`),2);case"z":return hn(/[a-z_+-/]{1,256}?/i);default:return m(f)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return f.token=e,f}(t,e))),a=r.find((e=>e.invalidReason));if(a)return{input:t,tokens:s,invalidReason:a.invalidReason};{const[e,n]=function(e){return[`^${e.map((e=>e.regex)).reduce(((e,t)=>`${e}(${t.source})`),"")}$`,e]}(r),a=RegExp(e,"i"),[i,l]=function(e,t,n){const s=e.match(t);if(s){const e={};let t=1;for(const r in n)if(W(n,r)){const a=n[r],i=a.groups?a.groups+1:1;!a.literal&&a.token&&(e[a.token.val[0]]=a.deser(s.slice(t,t+i))),t+=i}return[s,e]}return[s,{}]}(t,a,n),[c,u,d]=l?function(e){let t,n=null;return V(e.z)||(n=Ee.create(e.z)),V(e.Z)||(n||(n=new Oe(e.Z)),t=e.Z),V(e.q)||(e.M=3*(e.q-1)+1),V(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),V(e.u)||(e.S=U(e.u)),[Object.keys(e).reduce(((t,n)=>{const s=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return s&&(t[s]=e[n]),t}),{}),n,t]}(l):[null,null,void 0];if(W(l,"a")&&W(l,"H"))throw new o("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:s,regex:a,rawMatches:i,matches:l,result:c,zone:u,specificOffset:d}}}function pn(e,t){if(!e)return null;return Te.create(t,e).formatDateTimeParts((fn||(fn=Xn.fromMillis(1555555555555)),fn)).map((t=>function(e,t,n){const{type:s,value:r}=e;if("literal"===s)return{literal:!0,val:r};const a=n[s];let i=mn[s];return"object"==typeof i&&(i=i[a]),i?{literal:!1,val:i}:void 0}(t,0,e)))}const wn=[0,31,59,90,120,151,181,212,243,273,304,334],vn=[0,31,60,91,121,152,182,213,244,274,305,335];function Sn(e,t){return new Ce("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function bn(e,t,n){const s=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&s.setUTCFullYear(s.getUTCFullYear()-1900);const r=s.getUTCDay();return 0===r?7:r}function Tn(e,t,n){return n+(G(e)?vn:wn)[t-1]}function Cn(e,t){const n=G(e)?vn:wn,s=n.findIndex((e=>e<t));return{month:s+1,day:t-n[s]}}function In(e){const{year:t,month:n,day:s}=e,r=Tn(t,n,s),a=bn(t,n,s);let i,o=Math.floor((r-a+10)/7);return o<1?(i=t-1,o=K(i)):o>K(t)?(i=t+1,o=1):i=t,{weekYear:i,weekNumber:o,weekday:a,...ae(e)}}function Mn(e){const{weekYear:t,weekNumber:n,weekday:s}=e,r=bn(t,1,4),a=J(t);let i,o=7*n+s-r-3;o<1?(i=t-1,o+=J(i)):o>a?(i=t+1,o-=J(t)):i=t;const{month:l,day:c}=Cn(i,o);return{year:i,month:l,day:c,...ae(e)}}function Dn(e){const{year:t,month:n,day:s}=e;return{year:t,ordinal:Tn(t,n,s),...ae(e)}}function xn(e){const{year:t,ordinal:n}=e,{month:s,day:r}=Cn(t,n);return{year:t,month:s,day:r,...ae(e)}}function kn(e){const t=_(e.year),n=q(e.month,1,12),s=q(e.day,1,Y(e.year,e.month));return t?n?!s&&Sn("day",e.day):Sn("month",e.month):Sn("year",e.year)}function Ln(e){const{hour:t,minute:n,second:s,millisecond:r}=e,a=q(t,0,23)||24===t&&0===n&&0===s&&0===r,i=q(n,0,59),o=q(s,0,59),l=q(r,0,999);return a?i?o?!l&&Sn("millisecond",r):Sn("second",s):Sn("minute",n):Sn("hour",t)}const En="Invalid DateTime",Nn=864e13;function On(e){return new Ce("unsupported zone",`the zone "${e.name}" is not supported`)}function Fn(e){return null===e.weekData&&(e.weekData=In(e.c)),e.weekData}function $n(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new Xn({...n,...t,old:n})}function Zn(e,t,n){let s=e-60*t*1e3;const r=n.offset(s);if(t===r)return[s,t];s-=60*(r-t)*1e3;const a=n.offset(s);return r===a?[s,r]:[e-60*Math.min(r,a)*1e3,Math.max(r,a)]}function Vn(e,t){const n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Hn(e,t,n){return Zn(Q(e),t,n)}function _n(e,t){const n=e.o,s=e.c.year+Math.trunc(t.years),r=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),a={...e.c,year:s,month:r,day:Math.min(e.c.day,Y(s,r))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},i=Gt.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),o=Q(a);let[l,c]=Zn(o,n,e.zone);return 0!==i&&(l+=i,c=e.zone.offset(l)),{ts:l,o:c}}function An(e,t,n,s,r,a){const{setZone:i,zone:o}=n;if(e&&0!==Object.keys(e).length){const s=t||o,r=Xn.fromObject(e,{...n,zone:s,specificOffset:a});return i?r:r.setZone(o)}return Xn.invalid(new Ce("unparsable",`the input "${r}" can't be parsed as ${s}`))}function Pn(e,t,n=!0){return e.isValid?Te.create(Ke.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function Wn(e,t){const n=e.c.year>9999||e.c.year<0;let s="";return n&&e.c.year>=0&&(s+="+"),s+=B(e.c.year,n?6:4),t?(s+="-",s+=B(e.c.month),s+="-",s+=B(e.c.day)):(s+=B(e.c.month),s+=B(e.c.day)),s}function qn(e,t,n,s,r,a){let i=B(e.c.hour);return t?(i+=":",i+=B(e.c.minute),0===e.c.second&&n||(i+=":")):i+=B(e.c.minute),0===e.c.second&&n||(i+=B(e.c.second),0===e.c.millisecond&&s||(i+=".",i+=B(e.c.millisecond,3))),r&&(e.isOffsetFixed&&0===e.offset&&!a?i+="Z":e.o<0?(i+="-",i+=B(Math.trunc(-e.o/60)),i+=":",i+=B(Math.trunc(-e.o%60))):(i+="+",i+=B(Math.trunc(e.o/60)),i+=":",i+=B(Math.trunc(e.o%60)))),a&&(i+="["+e.zone.ianaName+"]"),i}const Bn={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},zn={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Rn={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Un=["year","month","day","hour","minute","second","millisecond"],jn=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],Gn=["year","ordinal","hour","minute","second","millisecond"];function Jn(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new l(e);return t}function Yn(e,t){const n=$e(t.zone,We.defaultZone),s=Ke.fromObject(t),r=We.now();let a,i;if(V(e.year))a=r;else{for(const t of Un)V(e[t])&&(e[t]=Bn[t]);const t=kn(e)||Ln(e);if(t)return Xn.invalid(t);const s=n.offset(r);[a,i]=Hn(e,s,n)}return new Xn({ts:a,zone:n,loc:s,o:i})}function Qn(e,t,n){const s=!!V(n.round)||n.round,r=(e,r)=>{e=j(e,s||n.calendary?0:2,!0);return t.loc.clone(n).relFormatter(n).format(e,r)},a=s=>n.calendary?t.hasSame(e,s)?0:t.startOf(s).diff(e.startOf(s),s).get(s):t.diff(e,s).get(s);if(n.unit)return r(a(n.unit),n.unit);for(const e of n.units){const t=a(e);if(Math.abs(t)>=1)return r(t,e)}return r(e>t?-0:0,n.units[n.units.length-1])}function Kn(e){let t,n={};return e.length>0&&"object"==typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}class Xn{constructor(e){const t=e.zone||We.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new Ce("invalid input"):null)||(t.isValid?null:On(t));this.ts=V(e.ts)?We.now():e.ts;let s=null,r=null;if(!n){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,r]=[e.old.c,e.old.o];else{const e=t.offset(this.ts);s=Vn(this.ts,e),n=Number.isNaN(s.year)?new Ce("invalid input"):null,s=n?null:s,r=n?null:e}}this._zone=t,this.loc=e.loc||Ke.create(),this.invalid=n,this.weekData=null,this.c=s,this.o=r,this.isLuxonDateTime=!0}static now(){return new Xn({})}static local(){const[e,t]=Kn(arguments),[n,s,r,a,i,o,l]=t;return Yn({year:n,month:s,day:r,hour:a,minute:i,second:o,millisecond:l},e)}static utc(){const[e,t]=Kn(arguments),[n,s,r,a,i,o,l]=t;return e.zone=Oe.utcInstance,Yn({year:n,month:s,day:r,hour:a,minute:i,second:o,millisecond:l},e)}static fromJSDate(e,t={}){const n=(s=e,"[object Date]"===Object.prototype.toString.call(s)?e.valueOf():NaN);var s;if(Number.isNaN(n))return Xn.invalid("invalid input");const r=$e(t.zone,We.defaultZone);return r.isValid?new Xn({ts:n,zone:r,loc:Ke.fromObject(t)}):Xn.invalid(On(r))}static fromMillis(e,t={}){if(H(e))return e<-Nn||e>Nn?Xn.invalid("Timestamp out of range"):new Xn({ts:e,zone:$e(t.zone,We.defaultZone),loc:Ke.fromObject(t)});throw new c(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(H(e))return new Xn({ts:1e3*e,zone:$e(t.zone,We.defaultZone),loc:Ke.fromObject(t)});throw new c("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=$e(t.zone,We.defaultZone);if(!n.isValid)return Xn.invalid(On(n));const s=We.now(),r=V(t.specificOffset)?n.offset(s):t.specificOffset,a=se(e,Jn),i=!V(a.ordinal),l=!V(a.year),c=!V(a.month)||!V(a.day),u=l||c,d=a.weekYear||a.weekNumber,h=Ke.fromObject(t);if((u||i)&&d)throw new o("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&i)throw new o("Can't mix ordinal dates with month/day");const m=d||a.weekday&&!u;let f,g,y=Vn(s,r);m?(f=jn,g=zn,y=In(y)):i?(f=Gn,g=Rn,y=Dn(y)):(f=Un,g=Bn);let p=!1;for(const e of f){V(a[e])?a[e]=p?g[e]:y[e]:p=!0}const w=m?function(e){const t=_(e.weekYear),n=q(e.weekNumber,1,K(e.weekYear)),s=q(e.weekday,1,7);return t?n?!s&&Sn("weekday",e.weekday):Sn("week",e.week):Sn("weekYear",e.weekYear)}(a):i?function(e){const t=_(e.year),n=q(e.ordinal,1,J(e.year));return t?!n&&Sn("ordinal",e.ordinal):Sn("year",e.year)}(a):kn(a),v=w||Ln(a);if(v)return Xn.invalid(v);const S=m?Mn(a):i?xn(a):a,[b,T]=Hn(S,r,n),C=new Xn({ts:b,zone:n,o:T,loc:h});return a.weekday&&u&&e.weekday!==C.weekday?Xn.invalid("mismatched weekday",`you can't specify both a weekday of ${a.weekday} and a date of ${C.toISO()}`):C}static fromISO(e,t={}){const[n,s]=function(e){return tt(e,[xt,Nt],[kt,Ot],[Lt,Ft],[Et,$t])}(e);return An(n,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,s]=function(e){return tt(function(e){return e.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[St,bt])}(e);return An(n,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,s]=function(e){return tt(e,[Tt,Mt],[Ct,Mt],[It,Dt])}(e);return An(n,s,t,"HTTP",t)}static fromFormat(e,t,n={}){if(V(e)||V(t))throw new c("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:r=null}=n,a=Ke.fromOpts({locale:s,numberingSystem:r,defaultToEN:!0}),[i,o,l,u]=function(e,t,n){const{result:s,zone:r,specificOffset:a,invalidReason:i}=yn(e,t,n);return[s,r,a,i]}(a,e,t);return u?Xn.invalid(u):An(i,o,n,`format ${t}`,e,l)}static fromString(e,t,n={}){return Xn.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,s]=function(e){return tt(e,[Vt,Nt],[Ht,_t])}(e);return An(n,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new c("need to specify a reason the DateTime is invalid");const n=e instanceof Ce?e:new Ce(e,t);if(We.throwOnInvalid)throw new r(n);return new Xn({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=pn(e,Ke.fromObject(t));return n?n.map((e=>e?e.val:null)).join(""):null}static expandFormat(e,t={}){return gn(Te.parseFormat(e),Ke.fromObject(t)).map((e=>e.val)).join("")}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Fn(this).weekYear:NaN}get weekNumber(){return this.isValid?Fn(this).weekNumber:NaN}get weekday(){return this.isValid?Fn(this).weekday:NaN}get ordinal(){return this.isValid?Dn(this.c).ordinal:NaN}get monthShort(){return this.isValid?Qt.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Qt.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Qt.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Qt.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}get isInLeapYear(){return G(this.year)}get daysInMonth(){return Y(this.year,this.month)}get daysInYear(){return this.isValid?J(this.year):NaN}get weeksInWeekYear(){return this.isValid?K(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:s}=Te.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(Oe.instance(e),t)}toLocal(){return this.setZone(We.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if((e=$e(e,We.defaultZone)).equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[s]=Hn(n,t,e)}return $n(this,{ts:s,zone:e})}return Xn.invalid(On(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){return $n(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=se(e,Jn),n=!V(t.weekYear)||!V(t.weekNumber)||!V(t.weekday),s=!V(t.ordinal),r=!V(t.year),a=!V(t.month)||!V(t.day),i=r||a,l=t.weekYear||t.weekNumber;if((i||s)&&l)throw new o("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(a&&s)throw new o("Can't mix ordinal dates with month/day");let c;n?c=Mn({...In(this.c),...t}):V(t.ordinal)?(c={...this.toObject(),...t},V(t.day)&&(c.day=Math.min(Y(c.year,c.month),c.day))):c=xn({...Dn(this.c),...t});const[u,d]=Hn(c,this.o,this.zone);return $n(this,{ts:u,o:d})}plus(e){if(!this.isValid)return this;return $n(this,_n(this,Gt.fromDurationLike(e)))}minus(e){if(!this.isValid)return this;return $n(this,_n(this,Gt.fromDurationLike(e).negate()))}startOf(e){if(!this.isValid)return this;const t={},n=Gt.normalizeUnit(e);switch(n){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}if("weeks"===n&&(t.weekday=1),"quarters"===n){const e=Math.ceil(this.month/3);t.month=3*(e-1)+1}return this.set(t)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,t={}){return this.isValid?Te.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):En}toLocaleString(e=f,t={}){return this.isValid?Te.create(this.loc.clone(t),e).formatDateTime(this):En}toLocaleParts(e={}){return this.isValid?Te.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:s=!0,extendedZone:r=!1}={}){if(!this.isValid)return null;const a="extended"===e;let i=Wn(this,a);return i+="T",i+=qn(this,a,t,n,s,r),i}toISODate({format:e="extended"}={}){return this.isValid?Wn(this,"extended"===e):null}toISOWeekDate(){return Pn(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:s=!1,extendedZone:r=!1,format:a="extended"}={}){if(!this.isValid)return null;return(s?"T":"")+qn(this,"extended"===a,t,e,n,r)}toRFC2822(){return Pn(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Pn(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Wn(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(n&&(s+=" "),t?s+="z":e&&(s+="ZZ")),Pn(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():En}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return Gt.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...n},r=(o=t,Array.isArray(o)?o:[o]).map(Gt.normalizeUnit),a=e.valueOf()>this.valueOf(),i=Xt(a?this:e,a?e:this,r,s);var o;return a?i.negate():i}diffNow(e="milliseconds",t={}){return this.diff(Xn.now(),e,t)}until(e){return this.isValid?Yt.fromDateTimes(this,e):this}hasSame(e,t){if(!this.isValid)return!1;const n=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t)<=n&&n<=s.endOf(t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||Xn.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0;let s=["years","months","days","hours","minutes","seconds"],r=e.unit;return Array.isArray(e.unit)&&(s=e.unit,r=void 0),Qn(t,this.plus(n),{...e,numeric:"always",units:s,unit:r})}toRelativeCalendar(e={}){return this.isValid?Qn(e.base||Xn.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(Xn.isDateTime))throw new c("min requires all arguments be DateTimes");return P(e,(e=>e.valueOf()),Math.min)}static max(...e){if(!e.every(Xn.isDateTime))throw new c("max requires all arguments be DateTimes");return P(e,(e=>e.valueOf()),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:s=null,numberingSystem:r=null}=n;return yn(Ke.fromOpts({locale:s,numberingSystem:r,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,n={}){return Xn.fromFormatExplain(e,t,n)}static get DATE_SHORT(){return f}static get DATE_MED(){return g}static get DATE_MED_WITH_WEEKDAY(){return y}static get DATE_FULL(){return p}static get DATE_HUGE(){return w}static get TIME_SIMPLE(){return v}static get TIME_WITH_SECONDS(){return S}static get TIME_WITH_SHORT_OFFSET(){return b}static get TIME_WITH_LONG_OFFSET(){return T}static get TIME_24_SIMPLE(){return C}static get TIME_24_WITH_SECONDS(){return I}static get TIME_24_WITH_SHORT_OFFSET(){return M}static get TIME_24_WITH_LONG_OFFSET(){return D}static get DATETIME_SHORT(){return x}static get DATETIME_SHORT_WITH_SECONDS(){return k}static get DATETIME_MED(){return L}static get DATETIME_MED_WITH_SECONDS(){return E}static get DATETIME_MED_WITH_WEEKDAY(){return N}static get DATETIME_FULL(){return O}static get DATETIME_FULL_WITH_SECONDS(){return F}static get DATETIME_HUGE(){return $}static get DATETIME_HUGE_WITH_SECONDS(){return Z}}function es(e){if(Xn.isDateTime(e))return e;if(e&&e.valueOf&&H(e.valueOf()))return Xn.fromJSDate(e);if(e&&"object"==typeof e)return Xn.fromObject(e);throw new c(`Unknown datetime argument: ${e}, of type ${typeof e}`)}}},t={};function n(s){var r=t[s];if(void 0!==r)return r.exports;var a=t[s]={exports:{}};return e[s](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var s in t)n.o(t,s)&&!n.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n(496),n(172),n(428),n(372),n(582),n(583),n(967),n(495),n(748),n(478),n(257),n(449),n(846);n(407)})();