avo 4.0.9 → 4.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/assets/builds/avo/application.css +3 -0
- data/app/assets/builds/avo/application.js +1 -1
- data/app/assets/builds/avo/application.js.map +2 -2
- data/app/assets/stylesheets/css/components/filters.css +1 -1
- data/app/components/avo/filters_component.html.erb +14 -1
- data/app/components/avo/resource_component.rb +20 -5
- data/app/controllers/avo/actions_controller.rb +2 -1
- data/app/controllers/avo/base_controller.rb +1 -1
- data/app/helpers/avo/resources_helper.rb +0 -9
- data/app/javascript/js/controllers/fields/date_field_controller.js +7 -1
- data/app/views/avo/base/_boolean_filter.html.erb +21 -24
- data/app/views/avo/base/_date_time_filter.html.erb +34 -35
- data/app/views/avo/base/_multiple_select_filter.html.erb +15 -17
- data/app/views/avo/base/_select_filter.html.erb +10 -13
- data/app/views/avo/base/_text_filter.html.erb +16 -17
- data/lib/avo/base_action.rb +2 -1
- data/lib/avo/version.rb +1 -1
- metadata +2 -3
- data/app/views/layouts/avo/_filter_wrapper.html.erb +0 -8
|
@@ -657,7 +657,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
657
657
|
<span class='flatpickr-weekday'>
|
|
658
658
|
`+Z.join("</span><span class='flatpickr-weekday'>")+`
|
|
659
659
|
</span>
|
|
660
|
-
`}}function ye(){t.calendarContainer.classList.add("hasWeeks");var K=Zo("div","flatpickr-weekwrapper");K.appendChild(Zo("span","flatpickr-weekday",t.l10n.weekAbbreviation));var Z=Zo("div","flatpickr-weeks");return K.appendChild(Z),{weekWrapper:K,weekNumbers:Z}}function se(K,Z){Z===void 0&&(Z=!0);var ie=Z?K:K-t.currentMonth;ie<0&&t._hidePrevMonthArrow===!0||ie>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=ie,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Ft("onYearChange"),U()),z(),Ft("onMonthChange"),Cn())}function $e(K,Z){if(K===void 0&&(K=!0),Z===void 0&&(Z=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,Z===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var ie=cq(t.config),be=ie.hours,Oe=ie.minutes,je=ie.seconds;C(be,Oe,je)}t.redraw(),K&&Ft("onChange")}function bt(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Ft("onClose")}function it(){t.config!==void 0&&Ft("onDestroy");for(var K=t._handlers.length;K--;)t._handlers[K].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var Z=t.calendarContainer.parentNode;if(Z.lastChild&&Z.removeChild(Z.lastChild),Z.parentNode){for(;Z.firstChild;)Z.parentNode.insertBefore(Z.firstChild,Z);Z.parentNode.removeChild(Z)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(ie){try{delete t[ie]}catch{}})}function _t(K){return t.calendarContainer.contains(K)}function ct(K){if(t.isOpen&&!t.config.inline){var Z=kf(K),ie=_t(Z),be=Z===t.input||Z===t.altInput||t.element.contains(Z)||K.path&&K.path.indexOf&&(~K.path.indexOf(t.input)||~K.path.indexOf(t.altInput)),Oe=!be&&!ie&&!_t(K.relatedTarget),je=!t.config.ignoredFocusElements.some(function(et){return et.contains(Z)});Oe&&je&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&u(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function Lt(K){if(!(!K||t.config.minDate&&K<t.config.minDate.getFullYear()||t.config.maxDate&&K>t.config.maxDate.getFullYear())){var Z=K,ie=t.currentYear!==Z;t.currentYear=Z||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),ie&&(t.redraw(),Ft("onYearChange"),U())}}function Ht(K,Z){var ie;Z===void 0&&(Z=!0);var be=t.parseDate(K,void 0,Z);if(t.config.minDate&&be&&Ef(be,t.config.minDate,Z!==void 0?Z:!t.minDateHasTime)<0||t.config.maxDate&&be&&Ef(be,t.config.maxDate,Z!==void 0?Z:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(be===void 0)return!1;for(var Oe=!!t.config.enable,je=(ie=t.config.enable)!==null&&ie!==void 0?ie:t.config.disable,et=0,Ee=void 0;et<je.length;et++){if(Ee=je[et],typeof Ee=="function"&&Ee(be))return Oe;if(Ee instanceof Date&&be!==void 0&&Ee.getTime()===be.getTime())return Oe;if(typeof Ee=="string"){var Ue=t.parseDate(Ee,void 0,!0);return Ue&&Ue.getTime()===be.getTime()?Oe:!Oe}else if(typeof Ee=="object"&&be!==void 0&&Ee.from&&Ee.to&&be.getTime()>=Ee.from.getTime()&&be.getTime()<=Ee.to.getTime())return Oe}return!Oe}function Nt(K){return t.daysContainer!==void 0?K.className.indexOf("hidden")===-1&&K.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(K):!1}function fr(K){var Z=K.target===t._input,ie=t._input.value.trimEnd()!==On();Z&&ie&&!(K.relatedTarget&&_t(K.relatedTarget))&&t.setDate(t._input.value,!0,K.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function Kt(K){var Z=kf(K),ie=t.config.wrap?r.contains(Z):Z===t._input,be=t.config.allowInput,Oe=t.isOpen&&(!be||!ie),je=t.config.inline&&ie&&!be;if(K.keyCode===13&&ie){if(be)return t.setDate(t._input.value,!0,Z===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),Z.blur();t.open()}else if(_t(Z)||Oe||je){var et=!!t.timeContainer&&t.timeContainer.contains(Z);switch(K.keyCode){case 13:et?(K.preventDefault(),u(),Br()):ur(K);break;case 27:K.preventDefault(),Br();break;case 8:case 46:ie&&!t.config.allowInput&&(K.preventDefault(),t.clear());break;case 37:case 39:if(!et&&!ie){K.preventDefault();var Ee=o();if(t.daysContainer!==void 0&&(be===!1||Ee&&Nt(Ee))){var Ue=K.keyCode===39?1:-1;K.ctrlKey?(K.stopPropagation(),se(Ue),Pe(ve(1),0)):Pe(void 0,Ue)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:K.preventDefault();var ot=K.keyCode===40?1:-1;t.daysContainer&&Z.$i!==void 0||Z===t.input||Z===t.altInput?K.ctrlKey?(K.stopPropagation(),Lt(t.currentYear-ot),Pe(ve(1),0)):et||Pe(void 0,ot*7):Z===t.currentYearElement?Lt(t.currentYear-ot):t.config.enableTime&&(!et&&t.hourElement&&t.hourElement.focus(),u(K),t._debouncedChange());break;case 9:if(et){var Dt=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(Gt){return Gt}),jt=Dt.indexOf(Z);if(jt!==-1){var It=Dt[jt+(K.shiftKey?-1:1)];K.preventDefault(),(It||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(Z)&&K.shiftKey&&(K.preventDefault(),t._input.focus());break;default:break}}if(t.amPM!==void 0&&Z===t.amPM)switch(K.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],x(),Wn();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],x(),Wn();break}(ie||_t(Z))&&Ft("onKeyDown",K)}function Xt(K,Z){if(Z===void 0&&(Z="flatpickr-day"),!(t.selectedDates.length!==1||K&&(!K.classList.contains(Z)||K.classList.contains("flatpickr-disabled")))){for(var ie=K?K.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),be=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Oe=Math.min(ie,t.selectedDates[0].getTime()),je=Math.max(ie,t.selectedDates[0].getTime()),et=!1,Ee=0,Ue=0,ot=Oe;ot<je;ot+=FDe.DAY)Ht(new Date(ot),!0)||(et=et||ot>Oe&&ot<je,ot<be&&(!Ee||ot>Ee)?Ee=ot:ot>be&&(!Ue||ot<Ue)&&(Ue=ot));var Dt=Array.from(t.rContainer.querySelectorAll("*:nth-child(-n+"+t.config.showMonths+") > ."+Z));Dt.forEach(function(jt){var It=jt.dateObj,Gt=It.getTime(),kr=Ee>0&&Gt<Ee||Ue>0&&Gt>Ue;if(kr){jt.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(cr){jt.classList.remove(cr)});return}else if(et&&!kr)return;["startRange","inRange","endRange","notAllowed"].forEach(function(cr){jt.classList.remove(cr)}),K!==void 0&&(K.classList.add(ie<=t.selectedDates[0].getTime()?"startRange":"endRange"),be<ie&&Gt===be?jt.classList.add("startRange"):be>ie&&Gt===be&&jt.classList.add("endRange"),Gt>=Ee&&(Ue===0||Gt<=Ue)&&RDe(Gt,be,ie)&&jt.classList.add("inRange"))})}}function vt(){t.isOpen&&!t.config.static&&!t.config.inline&&dr()}function yt(K,Z){if(Z===void 0&&(Z=t._positionElement),t.isMobile===!0){if(K){K.preventDefault();var ie=kf(K);ie&&ie.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),Ft("onOpen");return}else if(t._input.disabled||t.config.inline)return;var be=t.isOpen;t.isOpen=!0,be||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),Ft("onOpen"),dr(Z)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(K===void 0||!t.timeContainer.contains(K.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function Ke(K){return function(Z){var ie=t.config["_"+K+"Date"]=t.parseDate(Z,t.config.dateFormat),be=t.config["_"+(K==="min"?"max":"min")+"Date"];ie!==void 0&&(t[K==="min"?"minDateHasTime":"maxDateHasTime"]=ie.getHours()>0||ie.getMinutes()>0||ie.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Oe){return Ht(Oe)}),!t.selectedDates.length&&K==="min"&&S(ie),Wn()),t.daysContainer&&(Et(),ie!==void 0?t.currentYearElement[K]=ie.getFullYear().toString():t.currentYearElement.removeAttribute(K),t.currentYearElement.disabled=!!be&&ie!==void 0&&be.getFullYear()===ie.getFullYear())}}function me(){var K=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],Z=Vc(Vc({},JSON.parse(JSON.stringify(r.dataset||{}))),e),ie={};t.config.parseDate=Z.parseDate,t.config.formatDate=Z.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(Dt){t.config._enable=Yt(Dt)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(Dt){t.config._disable=Yt(Dt)}});var be=Z.mode==="time";if(!Z.dateFormat&&(Z.enableTime||be)){var Oe=Ul.defaultConfig.dateFormat||Lb.dateFormat;ie.dateFormat=Z.noCalendar||be?"H:i"+(Z.enableSeconds?":S":""):Oe+" H:i"+(Z.enableSeconds?":S":"")}if(Z.altInput&&(Z.enableTime||be)&&!Z.altFormat){var je=Ul.defaultConfig.altFormat||Lb.altFormat;ie.altFormat=Z.noCalendar||be?"h:i"+(Z.enableSeconds?":S K":" K"):je+(" h:i"+(Z.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:Ke("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:Ke("max")});var et=function(Dt){return function(jt){t.config[Dt==="min"?"_minTime":"_maxTime"]=t.parseDate(jt,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:et("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:et("max")}),Z.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,ie,Z);for(var Ee=0;Ee<K.length;Ee++)t.config[K[Ee]]=t.config[K[Ee]]===!0||t.config[K[Ee]]==="true";iq.filter(function(Dt){return t.config[Dt]!==void 0}).forEach(function(Dt){t.config[Dt]=sq(t.config[Dt]||[]).map(a)}),t.isMobile=!t.config.disableMobile&&!t.config.inline&&t.config.mode==="single"&&!t.config.disable.length&&!t.config.enable&&!t.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var Ee=0;Ee<t.config.plugins.length;Ee++){var Ue=t.config.plugins[Ee](t)||{};for(var ot in Ue)iq.indexOf(ot)>-1?t.config[ot]=sq(Ue[ot]).map(a).concat(t.config[ot]):typeof Z[ot]>"u"&&(t.config[ot]=Ue[ot])}Z.altInputClass||(t.config.altInputClass=De().className+" "+t.config.altInputClass),Ft("onParseConfig")}function De(){return t.config.wrap?r.querySelector("[data-input]"):r}function ze(){typeof t.config.locale!="object"&&typeof Ul.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=Vc(Vc({},Ul.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?Ul.l10ns[t.config.locale]:void 0),Ov.D="("+t.l10n.weekdays.shorthand.join("|")+")",Ov.l="("+t.l10n.weekdays.longhand.join("|")+")",Ov.M="("+t.l10n.months.shorthand.join("|")+")",Ov.F="("+t.l10n.months.longhand.join("|")+")",Ov.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var K=Vc(Vc({},e),JSON.parse(JSON.stringify(r.dataset||{})));K.time_24hr===void 0&&Ul.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=l7(t),t.parseDate=lq({config:t.config,l10n:t.l10n})}function dr(K){if(typeof t.config.position=="function")return void t.config.position(t,K);if(t.calendarContainer!==void 0){Ft("onPreCalendarPosition");var Z=K||t._positionElement,ie=Array.prototype.reduce.call(t.calendarContainer.children,(function(er,qr){return er+qr.offsetHeight}),0),be=t.calendarContainer.offsetWidth,Oe=t.config.position.split(" "),je=Oe[0],et=Oe.length>1?Oe[1]:null,Ee=Z.getBoundingClientRect(),Ue=window.innerHeight-Ee.bottom,ot=je==="above"||je!=="below"&&Ue<ie&&Ee.top>ie,Dt=window.pageYOffset+Ee.top+(ot?-ie-2:Z.offsetHeight+2);if(jc(t.calendarContainer,"arrowTop",!ot),jc(t.calendarContainer,"arrowBottom",ot),!t.config.inline){var jt=window.pageXOffset+Ee.left,It=!1,Gt=!1;et==="center"?(jt-=(be-Ee.width)/2,It=!0):et==="right"&&(jt-=be-Ee.width,Gt=!0),jc(t.calendarContainer,"arrowLeft",!It&&!Gt),jc(t.calendarContainer,"arrowCenter",It),jc(t.calendarContainer,"arrowRight",Gt);var kr=window.document.body.offsetWidth-(window.pageXOffset+Ee.right),cr=jt+be>window.document.body.offsetWidth,Ot=kr+be>window.document.body.offsetWidth;if(jc(t.calendarContainer,"rightMost",cr),!t.config.static)if(t.calendarContainer.style.top=Dt+"px",!cr)t.calendarContainer.style.left=jt+"px",t.calendarContainer.style.right="auto";else if(!Ot)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=kr+"px";else{var xr=lt();if(xr===void 0)return;var lr=window.document.body.offsetWidth,hr=Math.max(0,lr/2-be/2),Sn=".flatpickr-calendar.centerMost:before",Sr=".flatpickr-calendar.centerMost:after",Ve=xr.cssRules.length,ar="{left:"+Ee.left+"px;right:auto;}";jc(t.calendarContainer,"rightMost",!1),jc(t.calendarContainer,"centerMost",!0),xr.insertRule(Sn+","+Sr+ar,Ve),t.calendarContainer.style.left=hr+"px",t.calendarContainer.style.right="auto"}}}}function lt(){for(var K=null,Z=0;Z<document.styleSheets.length;Z++){var ie=document.styleSheets[Z];if(ie.cssRules){try{ie.cssRules}catch{continue}K=ie;break}}return K??Ut()}function Ut(){var K=document.createElement("style");return document.head.appendChild(K),K.sheet}function Et(){t.config.noCalendar||t.isMobile||(U(),Cn(),z())}function Br(){t._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(t.close,0):t.close()}function ur(K){K.preventDefault(),K.stopPropagation();var Z=function(Dt){return Dt.classList&&Dt.classList.contains("flatpickr-day")&&!Dt.classList.contains("flatpickr-disabled")&&!Dt.classList.contains("notAllowed")},ie=a7(kf(K),Z);if(ie!==void 0){var be=ie,Oe=t.latestSelectedDateObj=new Date(be.dateObj.getTime()),je=(Oe.getMonth()<t.currentMonth||Oe.getMonth()>t.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=be,t.config.mode==="single")t.selectedDates=[Oe];else if(t.config.mode==="multiple"){var et=br(Oe);et?t.selectedDates.splice(parseInt(et),1):t.selectedDates.push(Oe)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Oe,t.selectedDates.push(Oe),Ef(Oe,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(Dt,jt){return Dt.getTime()-jt.getTime()}));if(x(),je){var Ee=t.currentYear!==Oe.getFullYear();t.currentYear=Oe.getFullYear(),t.currentMonth=Oe.getMonth(),Ee&&(Ft("onYearChange"),U()),Ft("onMonthChange")}if(Cn(),z(),Wn(),!je&&t.config.mode!=="range"&&t.config.showMonths===1?oe(be):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var Ue=t.config.mode==="single"&&!t.config.enableTime,ot=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(Ue||ot)&&Br()}R()}}var Tr={locale:[ze,Me],showMonths:[Ie,l,he],minDate:[$],maxDate:[$],positionElement:[gi],clickOpens:[function(){t.config.clickOpens===!0?(L(t._input,"focus",t.open),L(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function wr(K,Z){if(K!==null&&typeof K=="object"){Object.assign(t.config,K);for(var ie in K)Tr[ie]!==void 0&&Tr[ie].forEach(function(be){return be()})}else t.config[K]=Z,Tr[K]!==void 0?Tr[K].forEach(function(be){return be()}):iq.indexOf(K)>-1&&(t.config[K]=sq(Z));t.redraw(),Wn(!0)}function at(K,Z){var ie=[];if(K instanceof Array)ie=K.map(function(be){return t.parseDate(be,Z)});else if(K instanceof Date||typeof K=="number")ie=[t.parseDate(K,Z)];else if(typeof K=="string")switch(t.config.mode){case"single":case"time":ie=[t.parseDate(K,Z)];break;case"multiple":ie=K.split(t.config.conjunction).map(function(be){return t.parseDate(be,Z)});break;case"range":ie=K.split(t.l10n.rangeSeparator).map(function(be){return t.parseDate(be,Z)});break;default:break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(K)));t.selectedDates=t.config.allowInvalidPreload?ie:ie.filter(function(be){return be instanceof Date&&Ht(be,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(be,Oe){return be.getTime()-Oe.getTime()})}function rt(K,Z,ie){if(Z===void 0&&(Z=!1),ie===void 0&&(ie=t.config.dateFormat),K!==0&&!K||K instanceof Array&&K.length===0)return t.clear(Z);at(K,ie),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),$(void 0,Z),S(),t.selectedDates.length===0&&t.clear(!1),Wn(Z),Z&&Ft("onChange")}function Yt(K){return K.slice().map(function(Z){return typeof Z=="string"||typeof Z=="number"||Z instanceof Date?t.parseDate(Z,void 0,!0):Z&&typeof Z=="object"&&Z.from&&Z.to?{from:t.parseDate(Z.from,void 0),to:t.parseDate(Z.to,void 0)}:Z}).filter(function(Z){return Z})}function Kr(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var K=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);K&&at(K,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()<t.now.getTime()?t.config.maxDate:t.now,t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth(),t.selectedDates.length>0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function ui(){if(t.input=De(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=Zo(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),gi()}function gi(){t._positionElement=t.config.positionElement||t._input}function Ri(){var K=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=Zo("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=K,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=K==="datetime-local"?"Y-m-d\\TH:i:S":K==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}L(t.mobileInput,"change",function(Z){t.setDate(kf(Z).value,!1,t.mobileFormatStr),Ft("onChange"),Ft("onClose")})}function Wt(K){if(t.isOpen===!0)return t.close();t.open(K)}function Ft(K,Z){if(t.config!==void 0){var ie=t.config[K];if(ie!==void 0&&ie.length>0)for(var be=0;ie[be]&&be<ie.length;be++)ie[be](t.selectedDates,t.input.value,t,Z);K==="onChange"&&(t.input.dispatchEvent(Pr("change")),t.input.dispatchEvent(Pr("input")))}}function Pr(K){var Z=document.createEvent("Event");return Z.initEvent(K,!0,!0),Z}function br(K){for(var Z=0;Z<t.selectedDates.length;Z++){var ie=t.selectedDates[Z];if(ie instanceof Date&&Ef(ie,K)===0)return""+Z}return!1}function wn(K){return t.config.mode!=="range"||t.selectedDates.length<2?!1:Ef(K,t.selectedDates[0])>=0&&Ef(K,t.selectedDates[1])<=0}function Cn(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(K,Z){var ie=new Date(t.currentYear,t.currentMonth,1);ie.setMonth(t.currentMonth+Z),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[Z].textContent=hC(ie.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=ie.getMonth().toString(),K.value=ie.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYear<t.config.minDate.getFullYear()),t._hideNextMonthArrow=t.config.maxDate!==void 0&&(t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth+1>t.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function On(K){var Z=K||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(ie){return t.formatDate(ie,Z)}).filter(function(ie,be,Oe){return t.config.mode!=="range"||t.config.enableTime||Oe.indexOf(ie)===be}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function Wn(K){K===void 0&&(K=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=On(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=On(t.config.altFormat)),K!==!1&&Ft("onValueUpdate")}function uo(K){var Z=kf(K),ie=t.prevMonthNav.contains(Z),be=t.nextMonthNav.contains(Z);ie||be?se(ie?-1:1):t.yearElements.indexOf(Z)>=0?Z.select():Z.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):Z.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Gn(K){K.preventDefault();var Z=K.type==="keydown",ie=kf(K),be=ie;t.amPM!==void 0&&ie===t.amPM&&(t.amPM.textContent=t.l10n.amPM[Tf(t.amPM.textContent===t.l10n.amPM[0])]);var Oe=parseFloat(be.getAttribute("min")),je=parseFloat(be.getAttribute("max")),et=parseFloat(be.getAttribute("step")),Ee=parseInt(be.value,10),Ue=K.delta||(Z?K.which===38?1:-1:0),ot=Ee+et*Ue;if(typeof be.value<"u"&&be.value.length===2){var Dt=be===t.hourElement,jt=be===t.minuteElement;ot<Oe?(ot=je+ot+Tf(!Dt)+(Tf(Dt)&&Tf(!t.amPM)),jt&&G(void 0,-1,t.hourElement)):ot>je&&(ot=be===t.hourElement?ot-je-Tf(!t.amPM):Oe,jt&&G(void 0,1,t.hourElement)),t.amPM&&Dt&&(et===1?ot+Ee===23:Math.abs(ot-Ee)>et)&&(t.amPM.textContent=t.l10n.amPM[Tf(t.amPM.textContent===t.l10n.amPM[0])]),be.value=Uc(ot)}}return i(),t}function mS(r,e){for(var t=Array.prototype.slice.call(r).filter(function(a){return a instanceof HTMLElement}),n=[],i=0;i<t.length;i++){var o=t[i];try{if(o.getAttribute("data-fp-omit")!==null)continue;o._flatpickr!==void 0&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=gNt(o,e||{}),n.push(o._flatpickr)}catch(a){console.error(a)}}return n.length===1?n[0]:n}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(r){return mS(this,r)},HTMLElement.prototype.flatpickr=function(r){return mS([this],r)});var Ul=function(r,e){return typeof r=="string"?mS(window.document.querySelectorAll(r),e):r instanceof Node?mS([r],e):mS(r,e)};Ul.defaultConfig={};Ul.l10ns={en:Vc({},aq),default:Vc({},aq)};Ul.localize=function(r){Ul.l10ns.default=Vc(Vc({},Ul.l10ns.default),r)};Ul.setDefaults=function(r){Ul.defaultConfig=Vc(Vc({},Ul.defaultConfig),r)};Ul.parseDate=lq({});Ul.formatDate=l7({});Ul.compareDates=Ef;typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(r){return mS(this,r)});Date.prototype.fp_incr=function(r){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof r=="string"?parseInt(r,10):r))};typeof window<"u"&&(window.flatpickr=Ul);var gS=Ul;function vNt(r,e,t){let n=dm(t.element);n&&n.appendChild(t.calendarContainer)}function yNt(r,e,t){dm(t.element)&&requestAnimationFrame(()=>{let{calendarContainer:n}=t;n.style.top&&n.style.top!=="auto"&&(n.style.top=`${parseFloat(n.style.top)-window.pageYOffset}px`),n.style.left&&n.style.left!=="auto"&&(n.style.left=`${parseFloat(n.style.left)-window.pageXOffset}px`)})}gS.setDefaults({onReady:[vNt],onOpen:[yNt]});var Lv=class extends Error{},y7=class extends Lv{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},b7=class extends Lv{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},x7=class extends Lv{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},qb=class extends Lv{},yq=class extends Lv{constructor(e){super(`Invalid unit ${e}`)}},Ou=class extends Lv{},yg=class extends Lv{constructor(){super("Zone is an abstract class")}},bn="numeric",gm="short",hd="long",bq={year:bn,month:bn,day:bn},mIe={year:bn,month:gm,day:bn},bNt={year:bn,month:gm,day:bn,weekday:gm},gIe={year:bn,month:hd,day:bn},vIe={year:bn,month:hd,day:bn,weekday:hd},yIe={hour:bn,minute:bn},bIe={hour:bn,minute:bn,second:bn},xIe={hour:bn,minute:bn,second:bn,timeZoneName:gm},_Ie={hour:bn,minute:bn,second:bn,timeZoneName:hd},wIe={hour:bn,minute:bn,hourCycle:"h23"},SIe={hour:bn,minute:bn,second:bn,hourCycle:"h23"},TIe={hour:bn,minute:bn,second:bn,hourCycle:"h23",timeZoneName:gm},kIe={hour:bn,minute:bn,second:bn,hourCycle:"h23",timeZoneName:hd},EIe={year:bn,month:bn,day:bn,hour:bn,minute:bn},AIe={year:bn,month:bn,day:bn,hour:bn,minute:bn,second:bn},CIe={year:bn,month:gm,day:bn,hour:bn,minute:bn},DIe={year:bn,month:gm,day:bn,hour:bn,minute:bn,second:bn},xNt={year:bn,month:gm,day:bn,weekday:gm,hour:bn,minute:bn},IIe={year:bn,month:hd,day:bn,hour:bn,minute:bn,timeZoneName:gm},OIe={year:bn,month:hd,day:bn,hour:bn,minute:bn,second:bn,timeZoneName:gm},MIe={year:bn,month:hd,day:bn,weekday:hd,hour:bn,minute:bn,timeZoneName:hd},LIe={year:bn,month:hd,day:bn,weekday:hd,hour:bn,minute:bn,second:bn,timeZoneName:hd},Qx=class{get type(){throw new yg}get name(){throw new yg}get ianaName(){return this.name}get isUniversal(){throw new yg}offsetName(e,t){throw new yg}formatOffset(e,t){throw new yg}offset(e){throw new yg}equals(e){throw new yg}get isValid(){throw new yg}},u7=null,xq=class r extends Qx{static get instance(){return u7===null&&(u7=new r),u7}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return HIe(e,t,n)}formatOffset(e,t){return gC(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}},_7=new Map;function _Nt(r){let e=_7.get(r);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),_7.set(r,e)),e}var wNt={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function SNt(r,e){let t=r.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,i,o,a,l,u,f,p]=n;return[a,i,o,l,u,f,p]}function TNt(r,e){let t=r.formatToParts(e),n=[];for(let i=0;i<t.length;i++){let{type:o,value:a}=t[i],l=wNt[o];o==="era"?n[l]=a:Si(l)||(n[l]=parseInt(a,10))}return n}var c7=new Map,Nb=class r extends Qx{static create(e){let t=c7.get(e);return t===void 0&&c7.set(e,t=new r(e)),t}static resetCache(){c7.clear(),_7.clear()}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{return!1}}constructor(e){super(),this.zoneName=e,this.valid=r.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return HIe(e,t,n,this.name)}formatOffset(e,t){return gC(this.offset(e),t)}offset(e){if(!this.valid)return NaN;let t=new Date(e);if(isNaN(t))return NaN;let n=_Nt(this.name),[i,o,a,l,u,f,p]=n.formatToParts?TNt(n,t):SNt(n,t);l==="BC"&&(i=-Math.abs(i)+1);let S=Eq({year:i,month:o,day:a,hour:u===24?0:u,minute:f,second:p,millisecond:0}),C=+t,M=C%1e3;return C-=M>=0?M:1e3+M,(S-C)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}},BDe={};function kNt(r,e={}){let t=JSON.stringify([r,e]),n=BDe[t];return n||(n=new Intl.ListFormat(r,e),BDe[t]=n),n}var w7=new Map;function S7(r,e={}){let t=JSON.stringify([r,e]),n=w7.get(t);return n===void 0&&(n=new Intl.DateTimeFormat(r,e),w7.set(t,n)),n}var T7=new Map;function ENt(r,e={}){let t=JSON.stringify([r,e]),n=T7.get(t);return n===void 0&&(n=new Intl.NumberFormat(r,e),T7.set(t,n)),n}var k7=new Map;function ANt(r,e={}){let{base:t,...n}=e,i=JSON.stringify([r,n]),o=k7.get(i);return o===void 0&&(o=new Intl.RelativeTimeFormat(r,e),k7.set(i,o)),o}var dC=null;function CNt(){return dC||(dC=new Intl.DateTimeFormat().resolvedOptions().locale,dC)}var E7=new Map;function PIe(r){let e=E7.get(r);return e===void 0&&(e=new Intl.DateTimeFormat(r).resolvedOptions(),E7.set(r,e)),e}var A7=new Map;function DNt(r){let e=A7.get(r);if(!e){let t=new Intl.Locale(r);e="getWeekInfo"in t?t.getWeekInfo():t.weekInfo,"minimalDays"in e||(e={...RIe,...e}),A7.set(r,e)}return e}function INt(r){let e=r.indexOf("-x-");e!==-1&&(r=r.substring(0,e));let t=r.indexOf("-u-");if(t===-1)return[r];{let n,i;try{n=S7(r).resolvedOptions(),i=r}catch{let u=r.substring(0,t);n=S7(u).resolvedOptions(),i=u}let{numberingSystem:o,calendar:a}=n;return[i,o,a]}}function ONt(r,e,t){return(t||e)&&(r.includes("-u-")||(r+="-u"),t&&(r+=`-ca-${t}`),e&&(r+=`-nu-${e}`)),r}function MNt(r){let e=[];for(let t=1;t<=12;t++){let n=xa.utc(2009,t,1);e.push(r(n))}return e}function LNt(r){let e=[];for(let t=1;t<=7;t++){let n=xa.utc(2016,11,13+t);e.push(r(n))}return e}function hq(r,e,t,n){let i=r.listingMode();return i==="error"?null:i==="en"?t(e):n(e)}function PNt(r){return r.numberingSystem&&r.numberingSystem!=="latn"?!1:r.numberingSystem==="latn"||!r.locale||r.locale.startsWith("en")||PIe(r.locale).numberingSystem==="latn"}var C7=class{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;let{padTo:i,floor:o,...a}=n;if(!t||Object.keys(a).length>0){let l={useGrouping:!1,...n};n.padTo>0&&(l.minimumIntegerDigits=n.padTo),this.inf=ENt(e,l)}}format(e){if(this.inf){let t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{let t=this.floor?Math.floor(e):z7(e,3);return jl(t,this.padTo)}}},D7=class{constructor(e,t,n){this.opts=n,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){let a=-1*(e.offset/60),l=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;e.offset!==0&&Nb.create(l).valid?(i=l,this.dt=e):(i="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);let o={...this.opts};o.timeZone=o.timeZone||i,this.dtf=S7(t,o)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(t=>{if(t.type==="timeZoneName"){let n=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:n}}else return t}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},I7=class{constructor(e,t,n){this.opts={style:"long",...n},!t&&jIe()&&(this.rtf=ANt(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):tBt(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}},RIe={firstDay:1,minimalDays:4,weekend:[6,7]},Pa=class r{static fromOpts(e){return r.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,i,o=!1){let a=e||Ss.defaultLocale,l=a||(o?"en-US":CNt()),u=t||Ss.defaultNumberingSystem,f=n||Ss.defaultOutputCalendar,p=L7(i)||Ss.defaultWeekSettings;return new r(l,u,f,p,a)}static resetCache(){dC=null,w7.clear(),T7.clear(),k7.clear(),E7.clear(),A7.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:i}={}){return r.create(e,t,n,i)}constructor(e,t,n,i,o){let[a,l,u]=INt(e);this.locale=a,this.numberingSystem=t||l||null,this.outputCalendar=n||u||null,this.weekSettings=i,this.intl=ONt(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=o,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=PNt(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:r.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,L7(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return hq(this,e,GIe,()=>{let n=this.intl==="ja"||this.intl.startsWith("ja-");t&=!n;let i=t?{month:e,day:"numeric"}:{month:e},o=t?"format":"standalone";if(!this.monthsCache[o][e]){let a=n?l=>this.dtFormatter(l,i).format():l=>this.extract(l,i,"month");this.monthsCache[o][e]=MNt(a)}return this.monthsCache[o][e]})}weekdays(e,t=!1){return hq(this,e,ZIe,()=>{let n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=t?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=LNt(o=>this.extract(o,n,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return hq(this,void 0,()=>XIe,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[xa.utc(2016,11,13,9),xa.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return hq(this,e,JIe,()=>{let t={era:e};return this.eraCache[e]||(this.eraCache[e]=[xa.utc(-40,1,1),xa.utc(2017,1,1)].map(n=>this.extract(n,t,"era"))),this.eraCache[e]})}extract(e,t,n){let i=this.dtFormatter(e,t),o=i.formatToParts(),a=o.find(l=>l.type.toLowerCase()===n);return a?a.value:null}numberFormatter(e={}){return new C7(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new D7(e,this.intl,t)}relFormatter(e={}){return new I7(this.intl,this.isEnglish(),e)}listFormatter(e={}){return kNt(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||PIe(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:VIe()?DNt(this.locale):RIe}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},h7=null,cp=class r extends Qx{static get utcInstance(){return h7===null&&(h7=new r(0)),h7}static instance(e){return e===0?r.utcInstance:new r(e)}static parseSpecifier(e){if(e){let t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new r(Aq(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${gC(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${gC(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return gC(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}},O7=class extends Qx{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 Rb(r,e){if(Si(r)||r===null)return e;if(r instanceof Qx)return r;if(zNt(r)){let t=r.toLowerCase();return t==="default"?e:t==="local"||t==="system"?xq.instance:t==="utc"||t==="gmt"?cp.utcInstance:cp.parseSpecifier(t)||Nb.create(r)}else return Fb(r)?cp.instance(r):typeof r=="object"&&"offset"in r&&typeof r.offset=="function"?r:new O7(r)}var q7={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},zDe={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]},RNt=q7.hanidec.replace(/[\[|\]]/g,"").split("");function qNt(r){let e=parseInt(r,10);if(isNaN(e)){e="";for(let t=0;t<r.length;t++){let n=r.charCodeAt(t);if(r[t].search(q7.hanidec)!==-1)e+=RNt.indexOf(r[t]);else for(let i in zDe){let[o,a]=zDe[i];n>=o&&n<=a&&(e+=n-o)}}return parseInt(e,10)}else return e}var M7=new Map;function FNt(){M7.clear()}function pm({numberingSystem:r},e=""){let t=r||"latn",n=M7.get(t);n===void 0&&(n=new Map,M7.set(t,n));let i=n.get(e);return i===void 0&&(i=new RegExp(`${q7[t]}${e}`),n.set(e,i)),i}var UDe=()=>Date.now(),jDe="system",VDe=null,HDe=null,WDe=null,$De=60,GDe,KDe=null,Ss=class{static get now(){return UDe}static set now(e){UDe=e}static set defaultZone(e){jDe=e}static get defaultZone(){return Rb(jDe,xq.instance)}static get defaultLocale(){return VDe}static set defaultLocale(e){VDe=e}static get defaultNumberingSystem(){return HDe}static set defaultNumberingSystem(e){HDe=e}static get defaultOutputCalendar(){return WDe}static set defaultOutputCalendar(e){WDe=e}static get defaultWeekSettings(){return KDe}static set defaultWeekSettings(e){KDe=L7(e)}static get twoDigitCutoffYear(){return $De}static set twoDigitCutoffYear(e){$De=e%100}static get throwOnInvalid(){return GDe}static set throwOnInvalid(e){GDe=e}static resetCaches(){Pa.resetCache(),Nb.resetCache(),xa.resetCache(),FNt()}},cd=class{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},qIe=[0,31,59,90,120,151,181,212,243,273,304,334],FIe=[0,31,60,91,121,152,182,213,244,274,305,335];function lp(r,e){return new cd("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${r}, which is invalid`)}function F7(r,e,t){let n=new Date(Date.UTC(r,e-1,t));r<100&&r>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);let i=n.getUTCDay();return i===0?7:i}function NIe(r,e,t){return t+(yC(r)?FIe:qIe)[e-1]}function BIe(r,e){let t=yC(r)?FIe:qIe,n=t.findIndex(o=>o<e),i=e-t[n];return{month:n+1,day:i}}function N7(r,e){return(r-e+7)%7+1}function _q(r,e=4,t=1){let{year:n,month:i,day:o}=r,a=NIe(n,i,o),l=N7(F7(n,i,o),t),u=Math.floor((a-l+14-e)/7),f;return u<1?(f=n-1,u=vC(f,e,t)):u>vC(n,e,t)?(f=n+1,u=1):f=n,{weekYear:f,weekNumber:u,weekday:l,...Cq(r)}}function YDe(r,e=4,t=1){let{weekYear:n,weekNumber:i,weekday:o}=r,a=N7(F7(n,1,e),t),l=_S(n),u=i*7+o-a-7+e,f;u<1?(f=n-1,u+=_S(f)):u>l?(f=n+1,u-=_S(n)):f=n;let{month:p,day:x}=BIe(f,u);return{year:f,month:p,day:x,...Cq(r)}}function f7(r){let{year:e,month:t,day:n}=r,i=NIe(e,t,n);return{year:e,ordinal:i,...Cq(r)}}function ZDe(r){let{year:e,ordinal:t}=r,{month:n,day:i}=BIe(e,t);return{year:e,month:n,day:i,...Cq(r)}}function XDe(r,e){if(!Si(r.localWeekday)||!Si(r.localWeekNumber)||!Si(r.localWeekYear)){if(!Si(r.weekday)||!Si(r.weekNumber)||!Si(r.weekYear))throw new qb("Cannot mix locale-based week fields with ISO-based week fields");return Si(r.localWeekday)||(r.weekday=r.localWeekday),Si(r.localWeekNumber)||(r.weekNumber=r.localWeekNumber),Si(r.localWeekYear)||(r.weekYear=r.localWeekYear),delete r.localWeekday,delete r.localWeekNumber,delete r.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function NNt(r,e=4,t=1){let n=kq(r.weekYear),i=up(r.weekNumber,1,vC(r.weekYear,e,t)),o=up(r.weekday,1,7);return n?i?o?!1:lp("weekday",r.weekday):lp("week",r.weekNumber):lp("weekYear",r.weekYear)}function BNt(r){let e=kq(r.year),t=up(r.ordinal,1,_S(r.year));return e?t?!1:lp("ordinal",r.ordinal):lp("year",r.year)}function zIe(r){let e=kq(r.year),t=up(r.month,1,12),n=up(r.day,1,wq(r.year,r.month));return e?t?n?!1:lp("day",r.day):lp("month",r.month):lp("year",r.year)}function UIe(r){let{hour:e,minute:t,second:n,millisecond:i}=r,o=up(e,0,23)||e===24&&t===0&&n===0&&i===0,a=up(t,0,59),l=up(n,0,59),u=up(i,0,999);return o?a?l?u?!1:lp("millisecond",i):lp("second",n):lp("minute",t):lp("hour",e)}function Si(r){return typeof r>"u"}function Fb(r){return typeof r=="number"}function kq(r){return typeof r=="number"&&r%1===0}function zNt(r){return typeof r=="string"}function UNt(r){return Object.prototype.toString.call(r)==="[object Date]"}function jIe(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function VIe(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function jNt(r){return Array.isArray(r)?r:[r]}function JDe(r,e,t){if(r.length!==0)return r.reduce((n,i)=>{let o=[e(i),i];return n&&t(n[0],o[0])===n[0]?n:o},null)[1]}function VNt(r,e){return e.reduce((t,n)=>(t[n]=r[n],t),{})}function TS(r,e){return Object.prototype.hasOwnProperty.call(r,e)}function L7(r){if(r==null)return null;if(typeof r!="object")throw new Ou("Week settings must be an object");if(!up(r.firstDay,1,7)||!up(r.minimalDays,1,7)||!Array.isArray(r.weekend)||r.weekend.some(e=>!up(e,1,7)))throw new Ou("Invalid week settings");return{firstDay:r.firstDay,minimalDays:r.minimalDays,weekend:Array.from(r.weekend)}}function up(r,e,t){return kq(r)&&r>=e&&r<=t}function HNt(r,e){return r-e*Math.floor(r/e)}function jl(r,e=2){let t=r<0,n;return t?n="-"+(""+-r).padStart(e,"0"):n=(""+r).padStart(e,"0"),n}function Pb(r){if(!(Si(r)||r===null||r===""))return parseInt(r,10)}function Zx(r){if(!(Si(r)||r===null||r===""))return parseFloat(r)}function B7(r){if(!(Si(r)||r===null||r==="")){let e=parseFloat("0."+r)*1e3;return Math.floor(e)}}function z7(r,e,t="round"){let n=10**e;switch(t){case"expand":return r>0?Math.ceil(r*n)/n:Math.floor(r*n)/n;case"trunc":return Math.trunc(r*n)/n;case"round":return Math.round(r*n)/n;case"floor":return Math.floor(r*n)/n;case"ceil":return Math.ceil(r*n)/n;default:throw new RangeError(`Value rounding ${t} is out of range`)}}function yC(r){return r%4===0&&(r%100!==0||r%400===0)}function _S(r){return yC(r)?366:365}function wq(r,e){let t=HNt(e-1,12)+1,n=r+(e-t)/12;return t===2?yC(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function Eq(r){let e=Date.UTC(r.year,r.month-1,r.day,r.hour,r.minute,r.second,r.millisecond);return r.year<100&&r.year>=0&&(e=new Date(e),e.setUTCFullYear(r.year,r.month-1,r.day)),+e}function QDe(r,e,t){return-N7(F7(r,1,e),t)+e-1}function vC(r,e=4,t=1){let n=QDe(r,e,t),i=QDe(r+1,e,t);return(_S(r)-n+i)/7}function P7(r){return r>99?r:r>Ss.twoDigitCutoffYear?1900+r:2e3+r}function HIe(r,e,t,n=null){let i=new Date(r),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(o.timeZone=n);let a={timeZoneName:e,...o},l=new Intl.DateTimeFormat(t,a).formatToParts(i).find(u=>u.type.toLowerCase()==="timezonename");return l?l.value:null}function Aq(r,e){let t=parseInt(r,10);Number.isNaN(t)&&(t=0);let n=parseInt(e,10)||0,i=t<0||Object.is(t,-0)?-n:n;return t*60+i}function WIe(r){let e=Number(r);if(typeof r=="boolean"||r===""||!Number.isFinite(e))throw new Ou(`Invalid unit value ${r}`);return e}function Sq(r,e){let t={};for(let n in r)if(TS(r,n)){let i=r[n];if(i==null)continue;t[e(n)]=WIe(i)}return t}function gC(r,e){let t=Math.trunc(Math.abs(r/60)),n=Math.trunc(Math.abs(r%60)),i=r>=0?"+":"-";switch(e){case"short":return`${i}${jl(t,2)}:${jl(n,2)}`;case"narrow":return`${i}${t}${n>0?`:${n}`:""}`;case"techie":return`${i}${jl(t,2)}${jl(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Cq(r){return VNt(r,["hour","minute","second","millisecond"])}var WNt=["January","February","March","April","May","June","July","August","September","October","November","December"],$Ie=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],$Nt=["J","F","M","A","M","J","J","A","S","O","N","D"];function GIe(r){switch(r){case"narrow":return[...$Nt];case"short":return[...$Ie];case"long":return[...WNt];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}}var KIe=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],YIe=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],GNt=["M","T","W","T","F","S","S"];function ZIe(r){switch(r){case"narrow":return[...GNt];case"short":return[...YIe];case"long":return[...KIe];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var XIe=["AM","PM"],KNt=["Before Christ","Anno Domini"],YNt=["BC","AD"],ZNt=["B","A"];function JIe(r){switch(r){case"narrow":return[...ZNt];case"short":return[...YNt];case"long":return[...KNt];default:return null}}function XNt(r){return XIe[r.hour<12?0:1]}function JNt(r,e){return ZIe(e)[r.weekday-1]}function QNt(r,e){return GIe(e)[r.month-1]}function eBt(r,e){return JIe(e)[r.year<0?0:1]}function tBt(r,e,t="always",n=!1){let i={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."]},o=["hours","minutes","seconds"].indexOf(r)===-1;if(t==="auto"&&o){let x=r==="days";switch(e){case 1:return x?"tomorrow":`next ${i[r][0]}`;case-1:return x?"yesterday":`last ${i[r][0]}`;case 0:return x?"today":`this ${i[r][0]}`}}let a=Object.is(e,-0)||e<0,l=Math.abs(e),u=l===1,f=i[r],p=n?u?f[1]:f[2]||f[1]:u?i[r][0]:r;return a?`${l} ${p} ago`:`in ${l} ${p}`}function eIe(r,e){let t="";for(let n of r)n.literal?t+=n.val:t+=e(n.val);return t}var rBt={D:bq,DD:mIe,DDD:gIe,DDDD:vIe,t:yIe,tt:bIe,ttt:xIe,tttt:_Ie,T:wIe,TT:SIe,TTT:TIe,TTTT:kIe,f:EIe,ff:CIe,fff:IIe,ffff:MIe,F:AIe,FF:DIe,FFF:OIe,FFFF:LIe},ud=class r{static create(e,t={}){return new r(e,t)}static parseFormat(e){let t=null,n="",i=!1,o=[];for(let a=0;a<e.length;a++){let l=e.charAt(a);l==="'"?((n.length>0||i)&&o.push({literal:i||/^\s+$/.test(n),val:n===""?"'":n}),t=null,n="",i=!i):i||l===t?n+=l:(n.length>0&&o.push({literal:/^\s+$/.test(n),val:n}),n=l,t=l)}return n.length>0&&o.push({literal:i||/^\s+$/.test(n),val:n}),o}static macroTokenToFormatOpts(e){return rBt[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return jl(e,t);let i={...this.opts};return t>0&&(i.padTo=t),n&&(i.signDisplay=n),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){let n=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",o=(C,M)=>this.loc.extract(e,C,M),a=C=>e.isOffsetFixed&&e.offset===0&&C.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,C.format):"",l=()=>n?XNt(e):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),u=(C,M)=>n?QNt(e,C):o(M?{month:C}:{month:C,day:"numeric"},"month"),f=(C,M)=>n?JNt(e,C):o(M?{weekday:C}:{weekday:C,month:"long",day:"numeric"},"weekday"),p=C=>{let M=r.macroTokenToFormatOpts(C);return M?this.formatWithSystemDefault(e,M):C},x=C=>n?eBt(e,C):o({era:C},"era"),S=C=>{switch(C){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 l();case"d":return i?o({day:"numeric"},"day"):this.num(e.day);case"dd":return i?o({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return f("short",!0);case"cccc":return f("long",!0);case"ccccc":return f("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return f("short",!1);case"EEEE":return f("long",!1);case"EEEEE":return f("narrow",!1);case"L":return i?o({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?o({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return i?o({month:"numeric"},"month"):this.num(e.month);case"MM":return i?o({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return i?o({year:"numeric"},"year"):this.num(e.year);case"yy":return i?o({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?o({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?o({year:"numeric"},"year"):this.num(e.year,6);case"G":return x("short");case"GG":return x("long");case"GGGGG":return x("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"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);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 p(C)}};return eIe(r.parseFormat(t),S)}formatDurationFromString(e,t){let n=this.opts.signMode==="negativeLargestOnly"?-1:1,i=p=>{switch(p[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},o=(p,x)=>S=>{let C=i(S);if(C){let M=x.isNegativeDuration&&C!==x.largestUnit?n:1,L;return this.opts.signMode==="negativeLargestOnly"&&C!==x.largestUnit?L="never":this.opts.signMode==="all"?L="always":L="auto",this.num(p.get(C)*M,S.length,L)}else return S},a=r.parseFormat(t),l=a.reduce((p,{literal:x,val:S})=>x?p:p.concat(S),[]),u=e.shiftTo(...l.map(i).filter(p=>p)),f={isNegativeDuration:u<0,largestUnit:Object.keys(u.values)[0]};return eIe(a,o(u,f))}},QIe=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function kS(...r){let e=r.reduce((t,n)=>t+n.source,"");return RegExp(`^${e}$`)}function ES(...r){return e=>r.reduce(([t,n,i],o)=>{let[a,l,u]=o(e,i);return[{...t,...a},l||n,u]},[{},null,1]).slice(0,2)}function AS(r,...e){if(r==null)return[null,null];for(let[t,n]of e){let i=t.exec(r);if(i)return n(i)}return[null,null]}function eOe(...r){return(e,t)=>{let n={},i;for(i=0;i<r.length;i++)n[r[i]]=Pb(e[t+i]);return[n,null,t+i]}}var tOe=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,nBt=`(?:${tOe.source}?(?:\\[(${QIe.source})\\])?)?`,U7=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,rOe=RegExp(`${U7.source}${nBt}`),j7=RegExp(`(?:[Tt]${rOe.source})?`),iBt=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,oBt=/(\d{4})-?W(\d\d)(?:-?(\d))?/,aBt=/(\d{4})-?(\d{3})/,sBt=eOe("weekYear","weekNumber","weekDay"),lBt=eOe("year","ordinal"),uBt=/(\d{4})-(\d\d)-(\d\d)/,nOe=RegExp(`${U7.source} ?(?:${tOe.source}|(${QIe.source}))?`),cBt=RegExp(`(?: ${nOe.source})?`);function wS(r,e,t){let n=r[e];return Si(n)?t:Pb(n)}function hBt(r,e){return[{year:wS(r,e),month:wS(r,e+1,1),day:wS(r,e+2,1)},null,e+3]}function CS(r,e){return[{hours:wS(r,e,0),minutes:wS(r,e+1,0),seconds:wS(r,e+2,0),milliseconds:B7(r[e+3])},null,e+4]}function bC(r,e){let t=!r[e]&&!r[e+1],n=Aq(r[e+1],r[e+2]),i=t?null:cp.instance(n);return[{},i,e+3]}function xC(r,e){let t=r[e]?Nb.create(r[e]):null;return[{},t,e+1]}var fBt=RegExp(`^T?${U7.source}$`),dBt=/^-?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 pBt(r){let[e,t,n,i,o,a,l,u,f]=r,p=e[0]==="-",x=u&&u[0]==="-",S=(C,M=!1)=>C!==void 0&&(M||C&&p)?-C:C;return[{years:S(Zx(t)),months:S(Zx(n)),weeks:S(Zx(i)),days:S(Zx(o)),hours:S(Zx(a)),minutes:S(Zx(l)),seconds:S(Zx(u),u==="-0"),milliseconds:S(B7(f),x)}]}var mBt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function V7(r,e,t,n,i,o,a){let l={year:e.length===2?P7(Pb(e)):Pb(e),month:$Ie.indexOf(t)+1,day:Pb(n),hour:Pb(i),minute:Pb(o)};return a&&(l.second=Pb(a)),r&&(l.weekday=r.length>3?KIe.indexOf(r)+1:YIe.indexOf(r)+1),l}var gBt=/^(?:(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 vBt(r){let[,e,t,n,i,o,a,l,u,f,p,x]=r,S=V7(e,i,n,t,o,a,l),C;return u?C=mBt[u]:f?C=0:C=Aq(p,x),[S,new cp(C)]}function yBt(r){return r.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var bBt=/^(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$/,xBt=/^(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$/,_Bt=/^(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 tIe(r){let[,e,t,n,i,o,a,l]=r;return[V7(e,i,n,t,o,a,l),cp.utcInstance]}function wBt(r){let[,e,t,n,i,o,a,l]=r;return[V7(e,l,t,n,i,o,a),cp.utcInstance]}var SBt=kS(iBt,j7),TBt=kS(oBt,j7),kBt=kS(aBt,j7),EBt=kS(rOe),iOe=ES(hBt,CS,bC,xC),ABt=ES(sBt,CS,bC,xC),CBt=ES(lBt,CS,bC,xC),DBt=ES(CS,bC,xC);function IBt(r){return AS(r,[SBt,iOe],[TBt,ABt],[kBt,CBt],[EBt,DBt])}function OBt(r){return AS(yBt(r),[gBt,vBt])}function MBt(r){return AS(r,[bBt,tIe],[xBt,tIe],[_Bt,wBt])}function LBt(r){return AS(r,[dBt,pBt])}var PBt=ES(CS);function RBt(r){return AS(r,[fBt,PBt])}var qBt=kS(uBt,cBt),FBt=kS(nOe),NBt=ES(CS,bC,xC);function BBt(r){return AS(r,[qBt,iOe],[FBt,NBt])}var rIe="Invalid Duration",oOe={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},zBt={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...oOe},sp=146097/400,vS=146097/4800,UBt={years:{quarters:4,months:12,weeks:sp/7,days:sp,hours:sp*24,minutes:sp*24*60,seconds:sp*24*60*60,milliseconds:sp*24*60*60*1e3},quarters:{months:3,weeks:sp/28,days:sp/4,hours:sp*24/4,minutes:sp*24*60/4,seconds:sp*24*60*60/4,milliseconds:sp*24*60*60*1e3/4},months:{weeks:vS/7,days:vS,hours:vS*24,minutes:vS*24*60,seconds:vS*24*60*60,milliseconds:vS*24*60*60*1e3},...oOe},Jx=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],jBt=Jx.slice(0).reverse();function Mv(r,e,t=!1){let n={values:t?e.values:{...r.values,...e.values||{}},loc:r.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||r.conversionAccuracy,matrix:e.matrix||r.matrix};return new Mu(n)}function aOe(r,e){let t=e.milliseconds??0;for(let n of jBt.slice(1))e[n]&&(t+=e[n]*r[n].milliseconds);return t}function nIe(r,e){let t=aOe(r,e)<0?-1:1;Jx.reduceRight((n,i)=>{if(Si(e[i]))return n;if(n){let o=e[n]*t,a=r[i][n],l=Math.floor(o/a);e[i]+=l*t,e[n]-=l*a*t}return i},null),Jx.reduce((n,i)=>{if(Si(e[i]))return n;if(n){let o=e[n]%1;e[n]-=o,e[i]+=o*r[n][i]}return i},null)}function iIe(r){let e={};for(let[t,n]of Object.entries(r))n!==0&&(e[t]=n);return e}var Mu=class r{constructor(e){let t=e.conversionAccuracy==="longterm"||!1,n=t?UBt:zBt;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||Pa.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return r.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new Ou(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new r({values:Sq(e,r.normalizeUnit),loc:Pa.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(Fb(e))return r.fromMillis(e);if(r.isDuration(e))return e;if(typeof e=="object")return r.fromObject(e);throw new Ou(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){let[n]=LBt(e);return n?r.fromObject(n,t):r.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){let[n]=RBt(e);return n?r.fromObject(n,t):r.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new Ou("need to specify a reason the Duration is invalid");let n=e instanceof cd?e:new cd(e,t);if(Ss.throwOnInvalid)throw new x7(n);return new r({invalid:n})}static normalizeUnit(e){let 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()];if(!t)throw new yq(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={}){let n={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?ud.create(this.loc,n).formatDurationFromString(this,e):rIe}toHuman(e={}){if(!this.isValid)return rIe;let t=e.showZeros!==!1,n=Jx.map(i=>{let o=this.values[i];return Si(o)||o===0&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(o)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=z7(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},xa.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?aOe(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let t=r.fromDurationLike(e),n={};for(let i of Jx)(TS(t.values,i)||TS(this.values,i))&&(n[i]=t.get(i)+this.get(i));return Mv(this,{values:n},!0)}minus(e){if(!this.isValid)return this;let t=r.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;let t={};for(let n of Object.keys(this.values))t[n]=WIe(e(this.values[n],n));return Mv(this,{values:t},!0)}get(e){return this[r.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let t={...this.values,...Sq(e,r.normalizeUnit)};return Mv(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:i}={}){let a={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:i,conversionAccuracy:n};return Mv(this,a)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return nIe(this.matrix,e),Mv(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=iIe(this.normalize().shiftToAll().toObject());return Mv(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(a=>r.normalizeUnit(a));let t={},n={},i=this.toObject(),o;for(let a of Jx)if(e.indexOf(a)>=0){o=a;let l=0;for(let f in n)l+=this.matrix[f][a]*n[f],n[f]=0;Fb(i[a])&&(l+=i[a]);let u=Math.trunc(l);t[a]=u,n[a]=(l*1e3-u*1e3)/1e3}else Fb(i[a])&&(n[a]=i[a]);for(let a in n)n[a]!==0&&(t[o]+=a===o?n[a]:n[a]/this.matrix[o][a]);return nIe(this.matrix,t),Mv(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let e={};for(let t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Mv(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;let e=iIe(this.values);return Mv(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 this.invalid===null}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||!this.loc.equals(e.loc))return!1;function t(n,i){return n===void 0||n===0?i===void 0||i===0:n===i}for(let n of Jx)if(!t(this.values[n],e.values[n]))return!1;return!0}},yS="Invalid Interval";function VBt(r,e){return!r||!r.isValid?SS.invalid("missing or invalid start"):!e||!e.isValid?SS.invalid("missing or invalid end"):e<r?SS.invalid("end before start",`The end of an interval must be after its start, but you had start=${r.toISO()} and end=${e.toISO()}`):null}var SS=class r{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 Ou("need to specify a reason the Interval is invalid");let n=e instanceof cd?e:new cd(e,t);if(Ss.throwOnInvalid)throw new b7(n);return new r({invalid:n})}static fromDateTimes(e,t){let n=fC(e),i=fC(t),o=VBt(n,i);return o??new r({start:n,end:i})}static after(e,t){let n=Mu.fromDurationLike(t),i=fC(e);return r.fromDateTimes(i,i.plus(n))}static before(e,t){let n=Mu.fromDurationLike(t),i=fC(e);return r.fromDateTimes(i.minus(n),i)}static fromISO(e,t){let[n,i]=(e||"").split("/",2);if(n&&i){let o,a;try{o=xa.fromISO(n,t),a=o.isValid}catch{a=!1}let l,u;try{l=xa.fromISO(i,t),u=l.isValid}catch{u=!1}if(a&&u)return r.fromDateTimes(o,l);if(a){let f=Mu.fromISO(i,t);if(f.isValid)return r.after(o,f)}else if(u){let f=Mu.fromISO(n,t);if(f.isValid)return r.before(l,f)}}return r.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 lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}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",t){if(!this.isValid)return NaN;let n=this.start.startOf(e,t),i;return t?.useLocaleWeeks?i=this.end.reconfigure({locale:n.locale}):i=this.end,i=i.startOf(e,t),Math.floor(i.diff(n,e).get(e))+(i.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?r.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];let t=e.map(fC).filter(a=>this.contains(a)).sort((a,l)=>a.toMillis()-l.toMillis()),n=[],{s:i}=this,o=0;for(;i<this.e;){let a=t[o]||this.e,l=+a>+this.e?this.e:a;n.push(r.fromDateTimes(i,l)),i=l,o+=1}return n}splitBy(e){let t=Mu.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:n}=this,i=1,o,a=[];for(;n<this.e;){let l=this.start.plus(t.mapUnits(u=>u*i));o=+l>+this.e?this.e:l,a.push(r.fromDateTimes(n,o)),n=o,i+=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:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;let t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:r.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;let t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return r.fromDateTimes(t,n)}static merge(e){let[t,n]=e.sort((i,o)=>i.s-o.s).reduce(([i,o],a)=>o?o.overlaps(a)||o.abutsStart(a)?[i,o.union(a)]:[i.concat([o]),a]:[i,a],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0,i=[],o=e.map(u=>[{time:u.s,type:"s"},{time:u.e,type:"e"}]),a=Array.prototype.concat(...o),l=a.sort((u,f)=>u.time-f.time);for(let u of l)n+=u.type==="s"?1:-1,n===1?t=u.time:(t&&+t!=+u.time&&i.push(r.fromDateTimes(t,u.time)),t=null);return r.merge(i)}difference(...e){return r.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:yS}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=bq,t={}){return this.isValid?ud.create(this.s.loc.clone(t),e).formatInterval(this):yS}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:yS}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:yS}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:yS}toFormat(e,{separator:t=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:yS}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Mu.invalid(this.invalidReason)}mapEndpoints(e){return r.fromDateTimes(e(this.s),e(this.e))}},xS=class{static hasDST(e=Ss.defaultZone){let t=xa.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return Nb.isValidZone(e)}static normalizeZone(e){return Rb(e,Ss.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||Pa.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||Pa.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||Pa.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null,outputCalendar:o="gregory"}={}){return(i||Pa.create(t,n,o)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null,outputCalendar:o="gregory"}={}){return(i||Pa.create(t,n,o)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null}={}){return(i||Pa.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null}={}){return(i||Pa.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Pa.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Pa.create(t,null,"gregory").eras(e)}static features(){return{relative:jIe(),localeWeek:VIe()}}};function oIe(r,e){let t=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=t(e)-t(r);return Math.floor(Mu.fromMillis(n).as("days"))}function HBt(r,e,t){let n=[["years",(u,f)=>f.year-u.year],["quarters",(u,f)=>f.quarter-u.quarter+(f.year-u.year)*4],["months",(u,f)=>f.month-u.month+(f.year-u.year)*12],["weeks",(u,f)=>{let p=oIe(u,f);return(p-p%7)/7}],["days",oIe]],i={},o=r,a,l;for(let[u,f]of n)t.indexOf(u)>=0&&(a=u,i[u]=f(r,e),l=o.plus(i),l>e?(i[u]--,r=o.plus(i),r>e&&(l=r,i[u]--,r=o.plus(i))):r=l);return[r,i,l,a]}function WBt(r,e,t,n){let[i,o,a,l]=HBt(r,e,t),u=e-i,f=t.filter(x=>["hours","minutes","seconds","milliseconds"].indexOf(x)>=0);f.length===0&&(a<e&&(a=i.plus({[l]:1})),a!==i&&(o[l]=(o[l]||0)+u/(a-i)));let p=Mu.fromObject(o,n);return f.length>0?Mu.fromMillis(u,n).shiftTo(...f).plus(p):p}var $Bt="missing Intl.DateTimeFormat.formatToParts support";function oa(r,e=t=>t){return{regex:r,deser:([t])=>e(qNt(t))}}var GBt="\xA0",sOe=`[ ${GBt}]`,lOe=new RegExp(sOe,"g");function KBt(r){return r.replace(/\./g,"\\.?").replace(lOe,sOe)}function aIe(r){return r.replace(/\./g,"").replace(lOe," ").toLowerCase()}function mm(r,e){return r===null?null:{regex:RegExp(r.map(KBt).join("|")),deser:([t])=>r.findIndex(n=>aIe(t)===aIe(n))+e}}function sIe(r,e){return{regex:r,deser:([,t,n])=>Aq(t,n),groups:e}}function fq(r){return{regex:r,deser:([e])=>e}}function YBt(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function ZBt(r,e){let t=pm(e),n=pm(e,"{2}"),i=pm(e,"{3}"),o=pm(e,"{4}"),a=pm(e,"{6}"),l=pm(e,"{1,2}"),u=pm(e,"{1,3}"),f=pm(e,"{1,6}"),p=pm(e,"{1,9}"),x=pm(e,"{2,4}"),S=pm(e,"{4,6}"),C=R=>({regex:RegExp(YBt(R.val)),deser:([H])=>H,literal:!0}),L=(R=>{if(r.literal)return C(R);switch(R.val){case"G":return mm(e.eras("short"),0);case"GG":return mm(e.eras("long"),0);case"y":return oa(f);case"yy":return oa(x,P7);case"yyyy":return oa(o);case"yyyyy":return oa(S);case"yyyyyy":return oa(a);case"M":return oa(l);case"MM":return oa(n);case"MMM":return mm(e.months("short",!0),1);case"MMMM":return mm(e.months("long",!0),1);case"L":return oa(l);case"LL":return oa(n);case"LLL":return mm(e.months("short",!1),1);case"LLLL":return mm(e.months("long",!1),1);case"d":return oa(l);case"dd":return oa(n);case"o":return oa(u);case"ooo":return oa(i);case"HH":return oa(n);case"H":return oa(l);case"hh":return oa(n);case"h":return oa(l);case"mm":return oa(n);case"m":return oa(l);case"q":return oa(l);case"qq":return oa(n);case"s":return oa(l);case"ss":return oa(n);case"S":return oa(u);case"SSS":return oa(i);case"u":return fq(p);case"uu":return fq(l);case"uuu":return oa(t);case"a":return mm(e.meridiems(),0);case"kkkk":return oa(o);case"kk":return oa(x,P7);case"W":return oa(l);case"WW":return oa(n);case"E":case"c":return oa(t);case"EEE":return mm(e.weekdays("short",!1),1);case"EEEE":return mm(e.weekdays("long",!1),1);case"ccc":return mm(e.weekdays("short",!0),1);case"cccc":return mm(e.weekdays("long",!0),1);case"Z":case"ZZ":return sIe(new RegExp(`([+-]${l.source})(?::(${n.source}))?`),2);case"ZZZ":return sIe(new RegExp(`([+-]${l.source})(${n.source})?`),2);case"z":return fq(/[a-z_+-/]{1,256}?/i);case" ":return fq(/[^\S\n\r]/);default:return C(R)}})(r)||{invalidReason:$Bt};return L.token=r,L}var XBt={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",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function JBt(r,e,t){let{type:n,value:i}=r;if(n==="literal"){let u=/^\s+$/.test(i);return{literal:!u,val:u?" ":i}}let o=e[n],a=n;n==="hour"&&(e.hour12!=null?a=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?a="hour12":a="hour24":a=t.hour12?"hour12":"hour24");let l=XBt[a];if(typeof l=="object"&&(l=l[o]),l)return{literal:!1,val:l}}function QBt(r){return[`^${r.map(t=>t.regex).reduce((t,n)=>`${t}(${n.source})`,"")}$`,r]}function ezt(r,e,t){let n=r.match(e);if(n){let i={},o=1;for(let a in t)if(TS(t,a)){let l=t[a],u=l.groups?l.groups+1:1;!l.literal&&l.token&&(i[l.token.val[0]]=l.deser(n.slice(o,o+u))),o+=u}return[n,i]}else return[n,{}]}function tzt(r){let e=o=>{switch(o){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}},t=null,n;return Si(r.z)||(t=Nb.create(r.z)),Si(r.Z)||(t||(t=new cp(r.Z)),n=r.Z),Si(r.q)||(r.M=(r.q-1)*3+1),Si(r.h)||(r.h<12&&r.a===1?r.h+=12:r.h===12&&r.a===0&&(r.h=0)),r.G===0&&r.y&&(r.y=-r.y),Si(r.u)||(r.S=B7(r.u)),[Object.keys(r).reduce((o,a)=>{let l=e(a);return l&&(o[l]=r[a]),o},{}),t,n]}var d7=null;function rzt(){return d7||(d7=xa.fromMillis(1555555555555)),d7}function nzt(r,e){if(r.literal)return r;let t=ud.macroTokenToFormatOpts(r.val),n=hOe(t,e);return n==null||n.includes(void 0)?r:n}function uOe(r,e){return Array.prototype.concat(...r.map(t=>nzt(t,e)))}var Tq=class{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=uOe(ud.parseFormat(t),e),this.units=this.tokens.map(n=>ZBt(n,e)),this.disqualifyingUnit=this.units.find(n=>n.invalidReason),!this.disqualifyingUnit){let[n,i]=QBt(this.units);this.regex=RegExp(n,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){let[t,n]=ezt(e,this.regex,this.handlers),[i,o,a]=n?tzt(n):[null,null,void 0];if(TS(n,"a")&&TS(n,"H"))throw new qb("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:i,zone:o,specificOffset:a}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function cOe(r,e,t){return new Tq(r,t).explainFromTokens(e)}function izt(r,e,t){let{result:n,zone:i,specificOffset:o,invalidReason:a}=cOe(r,e,t);return[n,i,o,a]}function hOe(r,e){if(!r)return null;let n=ud.create(e,r).dtFormatter(rzt()),i=n.formatToParts(),o=n.resolvedOptions();return i.map(a=>JBt(a,r,o))}var p7="Invalid DateTime",lIe=864e13;function pC(r){return new cd("unsupported zone",`the zone "${r.name}" is not supported`)}function m7(r){return r.weekData===null&&(r.weekData=_q(r.c)),r.weekData}function g7(r){return r.localWeekData===null&&(r.localWeekData=_q(r.c,r.loc.getMinDaysInFirstWeek(),r.loc.getStartOfWeek())),r.localWeekData}function Xx(r,e){let t={ts:r.ts,zone:r.zone,c:r.c,o:r.o,loc:r.loc,invalid:r.invalid};return new xa({...t,...e,old:t})}function fOe(r,e,t){let n=r-e*60*1e3,i=t.offset(n);if(e===i)return[n,e];n-=(i-e)*60*1e3;let o=t.offset(n);return i===o?[n,i]:[r-Math.min(i,o)*60*1e3,Math.max(i,o)]}function dq(r,e){r+=e*60*1e3;let t=new Date(r);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function mq(r,e,t){return fOe(Eq(r),e,t)}function uIe(r,e){let t=r.o,n=r.c.year+Math.trunc(e.years),i=r.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,o={...r.c,year:n,month:i,day:Math.min(r.c.day,wq(n,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},a=Mu.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),l=Eq(o),[u,f]=fOe(l,t,r.zone);return a!==0&&(u+=a,f=r.zone.offset(u)),{ts:u,o:f}}function bS(r,e,t,n,i,o){let{setZone:a,zone:l}=t;if(r&&Object.keys(r).length!==0||e){let u=e||l,f=xa.fromObject(r,{...t,zone:u,specificOffset:o});return a?f:f.setZone(l)}else return xa.invalid(new cd("unparsable",`the input "${i}" can't be parsed as ${n}`))}function pq(r,e,t=!0){return r.isValid?ud.create(Pa.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(r,e):null}function v7(r,e,t){let n=r.c.year>9999||r.c.year<0,i="";if(n&&r.c.year>=0&&(i+="+"),i+=jl(r.c.year,n?6:4),t==="year")return i;if(e){if(i+="-",i+=jl(r.c.month),t==="month")return i;i+="-"}else if(i+=jl(r.c.month),t==="month")return i;return i+=jl(r.c.day),i}function cIe(r,e,t,n,i,o,a){let l=!t||r.c.millisecond!==0||r.c.second!==0,u="";switch(a){case"day":case"month":case"year":break;default:if(u+=jl(r.c.hour),a==="hour")break;if(e){if(u+=":",u+=jl(r.c.minute),a==="minute")break;l&&(u+=":",u+=jl(r.c.second))}else{if(u+=jl(r.c.minute),a==="minute")break;l&&(u+=jl(r.c.second))}if(a==="second")break;l&&(!n||r.c.millisecond!==0)&&(u+=".",u+=jl(r.c.millisecond,3))}return i&&(r.isOffsetFixed&&r.offset===0&&!o?u+="Z":r.o<0?(u+="-",u+=jl(Math.trunc(-r.o/60)),u+=":",u+=jl(Math.trunc(-r.o%60))):(u+="+",u+=jl(Math.trunc(r.o/60)),u+=":",u+=jl(Math.trunc(r.o%60)))),o&&(u+="["+r.zone.ianaName+"]"),u}var dOe={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ozt={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},azt={ordinal:1,hour:0,minute:0,second:0,millisecond:0},gq=["year","month","day","hour","minute","second","millisecond"],szt=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],lzt=["year","ordinal","hour","minute","second","millisecond"];function vq(r){let e={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"}[r.toLowerCase()];if(!e)throw new yq(r);return e}function hIe(r){switch(r.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return vq(r)}}function uzt(r){if(mC===void 0&&(mC=Ss.now()),r.type!=="iana")return r.offset(mC);let e=r.name,t=R7.get(e);return t===void 0&&(t=r.offset(mC),R7.set(e,t)),t}function fIe(r,e){let t=Rb(e.zone,Ss.defaultZone);if(!t.isValid)return xa.invalid(pC(t));let n=Pa.fromObject(e),i,o;if(Si(r.year))i=Ss.now();else{for(let u of gq)Si(r[u])&&(r[u]=dOe[u]);let a=zIe(r)||UIe(r);if(a)return xa.invalid(a);let l=uzt(t);[i,o]=mq(r,l,t)}return new xa({ts:i,zone:t,loc:n,o})}function dIe(r,e,t){let n=Si(t.round)?!0:t.round,i=Si(t.rounding)?"trunc":t.rounding,o=(l,u)=>(l=z7(l,n||t.calendary?0:2,t.calendary?"round":i),e.loc.clone(t).relFormatter(t).format(l,u)),a=l=>t.calendary?e.hasSame(r,l)?0:e.startOf(l).diff(r.startOf(l),l).get(l):e.diff(r,l).get(l);if(t.unit)return o(a(t.unit),t.unit);for(let l of t.units){let u=a(l);if(Math.abs(u)>=1)return o(u,l)}return o(r>e?-0:0,t.units[t.units.length-1])}function pIe(r){let e={},t;return r.length>0&&typeof r[r.length-1]=="object"?(e=r[r.length-1],t=Array.from(r).slice(0,r.length-1)):t=Array.from(r),[e,t]}var mC,R7=new Map,xa=class r{constructor(e){let t=e.zone||Ss.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new cd("invalid input"):null)||(t.isValid?null:pC(t));this.ts=Si(e.ts)?Ss.now():e.ts;let i=null,o=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[i,o]=[e.old.c,e.old.o];else{let l=Fb(e.o)&&!e.old?e.o:t.offset(this.ts);i=dq(this.ts,l),n=Number.isNaN(i.year)?new cd("invalid input"):null,i=n?null:i,o=n?null:l}this._zone=t,this.loc=e.loc||Pa.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=i,this.o=o,this.isLuxonDateTime=!0}static now(){return new r({})}static local(){let[e,t]=pIe(arguments),[n,i,o,a,l,u,f]=t;return fIe({year:n,month:i,day:o,hour:a,minute:l,second:u,millisecond:f},e)}static utc(){let[e,t]=pIe(arguments),[n,i,o,a,l,u,f]=t;return e.zone=cp.utcInstance,fIe({year:n,month:i,day:o,hour:a,minute:l,second:u,millisecond:f},e)}static fromJSDate(e,t={}){let n=UNt(e)?e.valueOf():NaN;if(Number.isNaN(n))return r.invalid("invalid input");let i=Rb(t.zone,Ss.defaultZone);return i.isValid?new r({ts:n,zone:i,loc:Pa.fromObject(t)}):r.invalid(pC(i))}static fromMillis(e,t={}){if(Fb(e))return e<-lIe||e>lIe?r.invalid("Timestamp out of range"):new r({ts:e,zone:Rb(t.zone,Ss.defaultZone),loc:Pa.fromObject(t)});throw new Ou(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(Fb(e))return new r({ts:e*1e3,zone:Rb(t.zone,Ss.defaultZone),loc:Pa.fromObject(t)});throw new Ou("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};let n=Rb(t.zone,Ss.defaultZone);if(!n.isValid)return r.invalid(pC(n));let i=Pa.fromObject(t),o=Sq(e,hIe),{minDaysInFirstWeek:a,startOfWeek:l}=XDe(o,i),u=Ss.now(),f=Si(t.specificOffset)?n.offset(u):t.specificOffset,p=!Si(o.ordinal),x=!Si(o.year),S=!Si(o.month)||!Si(o.day),C=x||S,M=o.weekYear||o.weekNumber;if((C||p)&&M)throw new qb("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(S&&p)throw new qb("Can't mix ordinal dates with month/day");let L=M||o.weekday&&!C,R,H,$=dq(u,f);L?(R=szt,H=ozt,$=_q($,a,l)):p?(R=lzt,H=azt,$=f7($)):(R=gq,H=dOe);let Q=!1;for(let Pe of R){let ke=o[Pe];Si(ke)?Q?o[Pe]=H[Pe]:o[Pe]=$[Pe]:Q=!0}let G=L?NNt(o,a,l):p?BNt(o):zIe(o),te=G||UIe(o);if(te)return r.invalid(te);let fe=L?YDe(o,a,l):p?ZDe(o):o,[oe,ve]=mq(fe,f,n),xe=new r({ts:oe,zone:n,o:ve,loc:i});return o.weekday&&C&&e.weekday!==xe.weekday?r.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${xe.toISO()}`):xe.isValid?xe:r.invalid(xe.invalid)}static fromISO(e,t={}){let[n,i]=IBt(e);return bS(n,i,t,"ISO 8601",e)}static fromRFC2822(e,t={}){let[n,i]=OBt(e);return bS(n,i,t,"RFC 2822",e)}static fromHTTP(e,t={}){let[n,i]=MBt(e);return bS(n,i,t,"HTTP",t)}static fromFormat(e,t,n={}){if(Si(e)||Si(t))throw new Ou("fromFormat requires an input string and a format");let{locale:i=null,numberingSystem:o=null}=n,a=Pa.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0}),[l,u,f,p]=izt(a,e,t);return p?r.invalid(p):bS(l,u,n,`format ${t}`,e,f)}static fromString(e,t,n={}){return r.fromFormat(e,t,n)}static fromSQL(e,t={}){let[n,i]=BBt(e);return bS(n,i,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new Ou("need to specify a reason the DateTime is invalid");let n=e instanceof cd?e:new cd(e,t);if(Ss.throwOnInvalid)throw new y7(n);return new r({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){let n=hOe(e,Pa.fromObject(t));return n?n.map(i=>i?i.val:null).join(""):null}static expandFormat(e,t={}){return uOe(ud.parseFormat(e),Pa.fromObject(t)).map(i=>i.val).join("")}static resetCache(){mC=void 0,R7.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}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?m7(this).weekYear:NaN}get weekNumber(){return this.isValid?m7(this).weekNumber:NaN}get weekday(){return this.isValid?m7(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?g7(this).weekday:NaN}get localWeekNumber(){return this.isValid?g7(this).weekNumber:NaN}get localWeekYear(){return this.isValid?g7(this).weekYear:NaN}get ordinal(){return this.isValid?f7(this.c).ordinal:NaN}get monthShort(){return this.isValid?xS.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?xS.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?xS.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?xS.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?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,t=6e4,n=Eq(this.c),i=this.zone.offset(n-e),o=this.zone.offset(n+e),a=this.zone.offset(n-i*t),l=this.zone.offset(n-o*t);if(a===l)return[this];let u=n-a*t,f=n-l*t,p=dq(u,a),x=dq(f,l);return p.hour===x.hour&&p.minute===x.minute&&p.second===x.second&&p.millisecond===x.millisecond?[Xx(this,{ts:u}),Xx(this,{ts:f})]:[this]}get isInLeapYear(){return yC(this.year)}get daysInMonth(){return wq(this.year,this.month)}get daysInYear(){return this.isValid?_S(this.year):NaN}get weeksInWeekYear(){return this.isValid?vC(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?vC(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:t,numberingSystem:n,calendar:i}=ud.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:i}}toUTC(e=0,t={}){return this.setZone(cp.instance(e),t)}toLocal(){return this.setZone(Ss.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if(e=Rb(e,Ss.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(t||n){let o=e.offset(this.ts),a=this.toObject();[i]=mq(a,o,e)}return Xx(this,{ts:i,zone:e})}else return r.invalid(pC(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){let i=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n});return Xx(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let t=Sq(e,hIe),{minDaysInFirstWeek:n,startOfWeek:i}=XDe(t,this.loc),o=!Si(t.weekYear)||!Si(t.weekNumber)||!Si(t.weekday),a=!Si(t.ordinal),l=!Si(t.year),u=!Si(t.month)||!Si(t.day),f=l||u,p=t.weekYear||t.weekNumber;if((f||a)&&p)throw new qb("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&a)throw new qb("Can't mix ordinal dates with month/day");let x;o?x=YDe({..._q(this.c,n,i),...t},n,i):Si(t.ordinal)?(x={...this.toObject(),...t},Si(t.day)&&(x.day=Math.min(wq(x.year,x.month),x.day))):x=ZDe({...f7(this.c),...t});let[S,C]=mq(x,this.o,this.zone);return Xx(this,{ts:S,o:C})}plus(e){if(!this.isValid)return this;let t=Mu.fromDurationLike(e);return Xx(this,uIe(this,t))}minus(e){if(!this.isValid)return this;let t=Mu.fromDurationLike(e).negate();return Xx(this,uIe(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;let n={},i=Mu.normalizeUnit(e);switch(i){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(i==="weeks")if(t){let o=this.loc.getStartOfWeek(),{weekday:a}=this;a<o&&(n.weekNumber=this.weekNumber-1),n.weekday=o}else n.weekday=1;if(i==="quarters"){let o=Math.ceil(this.month/3);n.month=(o-1)*3+1}return this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?ud.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):p7}toLocaleString(e=bq,t={}){return this.isValid?ud.create(this.loc.clone(t),e).formatDateTime(this):p7}toLocaleParts(e={}){return this.isValid?ud.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:i=!0,extendedZone:o=!1,precision:a="milliseconds"}={}){if(!this.isValid)return null;a=vq(a);let l=e==="extended",u=v7(this,l,a);return gq.indexOf(a)>=3&&(u+="T"),u+=cIe(this,l,t,n,i,o,a),u}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?v7(this,e==="extended",vq(t)):null}toISOWeekDate(){return pq(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:i=!1,extendedZone:o=!1,format:a="extended",precision:l="milliseconds"}={}){return this.isValid?(l=vq(l),(i&&gq.indexOf(l)>=3?"T":"")+cIe(this,a==="extended",t,e,n,o,l)):null}toRFC2822(){return pq(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return pq(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?v7(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let i="HH:mm:ss.SSS";return(t||e)&&(n&&(i+=" "),t?i+="z":e&&(i+="ZZ")),pq(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():p7}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}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{};let 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 Mu.invalid("created by diffing an invalid DateTime");let i={locale:this.locale,numberingSystem:this.numberingSystem,...n},o=jNt(t).map(Mu.normalizeUnit),a=e.valueOf()>this.valueOf(),l=a?this:e,u=a?e:this,f=WBt(l,u,o,i);return a?f.negate():f}diffNow(e="milliseconds",t={}){return this.diff(r.now(),e,t)}until(e){return this.isValid?SS.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;let i=e.valueOf(),o=this.setZone(e.zone,{keepLocalTime:!0});return o.startOf(t,n)<=i&&i<=o.endOf(t,n)}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;let t=e.base||r.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0,i=["years","months","days","hours","minutes","seconds"],o=e.unit;return Array.isArray(e.unit)&&(i=e.unit,o=void 0),dIe(t,this.plus(n),{...e,numeric:"always",units:i,unit:o})}toRelativeCalendar(e={}){return this.isValid?dIe(e.base||r.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(r.isDateTime))throw new Ou("min requires all arguments be DateTimes");return JDe(e,t=>t.valueOf(),Math.min)}static max(...e){if(!e.every(r.isDateTime))throw new Ou("max requires all arguments be DateTimes");return JDe(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){let{locale:i=null,numberingSystem:o=null}=n,a=Pa.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});return cOe(a,e,t)}static fromStringExplain(e,t,n={}){return r.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){let{locale:n=null,numberingSystem:i=null}=t,o=Pa.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0});return new Tq(o,e)}static fromFormatParser(e,t,n={}){if(Si(e)||Si(t))throw new Ou("fromFormatParser requires an input string and a format parser");let{locale:i=null,numberingSystem:o=null}=n,a=Pa.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});if(!a.equals(t.locale))throw new Ou(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${t.locale}`);let{result:l,zone:u,specificOffset:f,invalidReason:p}=t.explainFromTokens(e);return p?r.invalid(p):bS(l,u,n,`format ${t.format}`,e,f)}static get DATE_SHORT(){return bq}static get DATE_MED(){return mIe}static get DATE_MED_WITH_WEEKDAY(){return bNt}static get DATE_FULL(){return gIe}static get DATE_HUGE(){return vIe}static get TIME_SIMPLE(){return yIe}static get TIME_WITH_SECONDS(){return bIe}static get TIME_WITH_SHORT_OFFSET(){return xIe}static get TIME_WITH_LONG_OFFSET(){return _Ie}static get TIME_24_SIMPLE(){return wIe}static get TIME_24_WITH_SECONDS(){return SIe}static get TIME_24_WITH_SHORT_OFFSET(){return TIe}static get TIME_24_WITH_LONG_OFFSET(){return kIe}static get DATETIME_SHORT(){return EIe}static get DATETIME_SHORT_WITH_SECONDS(){return AIe}static get DATETIME_MED(){return CIe}static get DATETIME_MED_WITH_SECONDS(){return DIe}static get DATETIME_MED_WITH_WEEKDAY(){return xNt}static get DATETIME_FULL(){return IIe}static get DATETIME_FULL_WITH_SECONDS(){return OIe}static get DATETIME_HUGE(){return MIe}static get DATETIME_HUGE_WITH_SECONDS(){return LIe}};function fC(r){if(xa.isDateTime(r))return r;if(r&&r.valueOf&&Fb(r.valueOf()))return xa.fromJSDate(r);if(r&&typeof r=="object")return xa.fromObject(r);throw new Ou(`Unknown datetime argument: ${r}, of type ${typeof r}`)}function czt(r){return new Date(new Date(r).getTime()+new Date(r).getTimezoneOffset()*60*1e3)}var hzt="y/LL/dd",_C="TT",Dq=class extends Zt{static targets=["input","fakeInput"];static values={view:String,timezone:String,format:String,enableTime:Boolean,pickerFormat:String,firstDayOfWeek:Number,time24Hr:Boolean,disableMobile:Boolean,noCalendar:Boolean,relative:Boolean,fieldType:{type:String,default:"dateTime"},pickerOptions:{type:Object,default:{}}};flatpickrInstance;cachedInitialValue;get browserZone(){return xa.local().zoneName}get initialValue(){return this.isOnShow||this.isOnIndex?this.context.element.innerText:this.isOnEdit?this.inputTarget.value:null}get isOnIndex(){return this.viewValue==="index"}get isOnEdit(){return this.viewValue==="edit"}get isOnShow(){return this.viewValue==="show"}get fieldIsDate(){return this.fieldTypeValue==="date"}get fieldIsDateTime(){return this.fieldTypeValue==="dateTime"}get fieldIsTime(){return this.fieldTypeValue==="time"}get fieldHasTime(){return this.fieldIsTime||this.fieldIsDateTime}get parsedValue(){return xa.fromISO(this.initialValue.trim(),{zone:"UTC"})}get displayTimezone(){return this.timezoneValue||this.browserZone}connect(){this.cacheInitialValue(),this.isOnShow||this.isOnIndex?this.initShow():this.isOnEdit&&this.initEdit()}disconnect(){this.isOnShow||this.isOnIndex?this.context.element.innerText=this.cachedInitialValue:this.isOnEdit&&this.flatpickrInstance&&this.flatpickrInstance.destroy()}cacheInitialValue(){this.cachedInitialValue=this.initialValue}initShow(){let r=this.parsedValue;if(this.fieldHasTime&&this.relativeValue)if(this.fieldIsTime){let e=r.toFormat(_C);r=xa.fromFormat(e,_C,{zone:"UTC"}).setZone(this.displayTimezone)}else r=r.setZone(this.displayTimezone);this.context.element.innerText=r.toFormat(this.formatValue)}initEdit(){let r={enableTime:!1,enableSeconds:!1,time_24hr:this.time24HrValue,locale:{firstDayOfWeek:0},altInput:!0,onChange:this.onChange.bind(this),onClose:this.onClose.bind(this),noCalendar:!1,...this.pickerOptionsValue};if(r.altFormat=this.pickerFormatValue,r.disableMobile=this.disableMobileValue,r.locale.firstDayOfWeek=this.firstDayOfWeekValue,r.enableTime=this.enableTimeValue,r.enableSeconds=this.enableTimeValue,r.noCalendar=this.noCalendarValue,this.fieldHasTime&&(r.dateFormat="Y-m-d H:i:S"),this.initialValue)switch(this.fieldTypeValue){case"date":r.defaultDate=czt(this.initialValue);break;case"time":{let e=this.parsedValue.toFormat(_C);r.defaultDate=xa.fromFormat(e,_C,{zone:"UTC"}).setZone(this.displayTimezone,{keepLocalTime:!this.relativeValue}).toISO()}break;case"dateTime":r.defaultDate=this.parsedValue.setZone(this.displayTimezone,{keepLocalTime:!this.relativeValue}).toISO();break;default:break}this.flatpickrInstance=gS(this.fakeInputTarget,r),this.initialValue&&this.inputTarget.dispatchEvent(new Event("change",{bubbles:!0}))}onChange(r){if(r.length===0){this.updateRealInput("");return}let e=xa.fromISO(r[0].toISOString()).setZone(this.displayTimezone,{keepLocalTime:!0}).setZone("UTC",{keepLocalTime:!this.relativeValue}),t;switch(this.fieldTypeValue){case"time":t=e.toFormat(_C);break;case"date":t=e.toFormat(hzt);break;case"dateTime":t=e.toISO();break;default:break}this.updateRealInput(t)}onClose(r,e,t){if(t.config.allowInput&&t.altInput.value){let{value:n}=t.altInput;n?t.setDate(n,!0,t.config.altFormat):this.updateRealInput("")}}updateRealInput(r){this.inputTarget.value=r}clear(){this.fakeInputTarget._flatpickr.clear()}};var Iq=class extends Sf{static targets=["input"];static values={class:String,pickerOptions:Object};getFilterValue(){return this.inputTarget.value}getFilterClass(){return this.classValue}connect(){this.initFlatpickr()}initFlatpickr(){this.pickerInstance=gS(this.inputTarget,this.pickerOptionsValue)}clear(){this.inputTarget._flatpickr.clear()}};var Oq=class extends Zt{static values={chartId:String};toggleSlice({params:r,currentTarget:e}){let t=this.chart();t&&(t.toggleDataVisibility(r.index),t.update(),e.classList.toggle("distribution-chart__row--inactive",!t.getDataVisibility(r.index)))}highlightSlice({params:r}){let e=this.chart();if(!e||!e.getDataVisibility(r.index))return;let t=e.data.datasets[0],n=new Array(t.data.length).fill(0);n[r.index]=32,t.offset=n,e.update()}clearHighlight(){let r=this.chart();r&&(r.data.datasets[0].offset=0,r.update())}chart(){return window.Chartkick?.charts?.[this.chartIdValue]?.getChartObject?.()??null}};var H7=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function W7(r,e,t,n){r.addEventListener?r.addEventListener(e,t,n):r.attachEvent&&r.attachEvent("on".concat(e),t)}function wC(r,e,t,n){r.removeEventListener?r.removeEventListener(e,t,n):r.detachEvent&&r.detachEvent("on".concat(e),t)}function gOe(r,e){let t=e.slice(0,e.length-1);for(let n=0;n<t.length;n++)t[n]=r[t[n].toLowerCase()];return t}function vOe(r){typeof r!="string"&&(r=""),r=r.replace(/\s/g,"");let e=r.split(","),t=e.lastIndexOf("");for(;t>=0;)e[t-1]+=",",e.splice(t,1),t=e.lastIndexOf("");return e}function fzt(r,e){let t=r.length>=e.length?r:e,n=r.length>=e.length?e:r,i=!0;for(let o=0;o<t.length;o++)n.indexOf(t[o])===-1&&(i=!1);return i}var kC={backspace:8,"\u232B":8,tab:9,clear:12,enter:13,"\u21A9":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,arrowup:38,arrowdown:40,arrowleft:37,arrowright:39,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"\u21EA":20,",":188,".":190,"/":191,"`":192,"-":H7?173:189,"=":H7?61:187,";":H7?59:186,"'":222,"{":219,"}":221,"[":219,"]":221,"\\":220},vm={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,meta:91,command:91},SC={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},hc={16:!1,18:!1,17:!1,91:!1},zs={};for(let r=1;r<20;r++)kC["f".concat(r)]=111+r;var Ts=[],TC=null,yOe="all",Pv=new Map,DS=r=>kC[r.toLowerCase()]||vm[r.toLowerCase()]||r.toUpperCase().charCodeAt(0),dzt=r=>Object.keys(kC).find(e=>kC[e]===r),pzt=r=>Object.keys(vm).find(e=>vm[e]===r);function bOe(r){yOe=r||"all"}function EC(){return yOe||"all"}function mzt(){return Ts.slice(0)}function gzt(){return Ts.map(r=>dzt(r)||pzt(r)||String.fromCharCode(r))}function vzt(){let r=[];return Object.keys(zs).forEach(e=>{zs[e].forEach(t=>{let{key:n,scope:i,mods:o,shortcut:a}=t;r.push({scope:i,shortcut:a,mods:o,keys:n.split("+").map(l=>DS(l))})})}),r}function yzt(r){let e=r.target||r.srcElement,{tagName:t}=e,n=!0,i=t==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(e.type);return(e.isContentEditable||(i||t==="TEXTAREA"||t==="SELECT")&&!e.readOnly)&&(n=!1),n}function bzt(r){return typeof r=="string"&&(r=DS(r)),Ts.indexOf(r)!==-1}function xzt(r,e){let t,n;r||(r=EC());for(let i in zs)if(Object.prototype.hasOwnProperty.call(zs,i))for(t=zs[i],n=0;n<t.length;)t[n].scope===r?t.splice(n,1).forEach(a=>{let{element:l}=a;return G7(l)}):n++;EC()===r&&bOe(e||"all")}function _zt(r){let e=r.keyCode||r.which||r.charCode;r.key&&r.key.toLowerCase()==="capslock"&&(e=DS(r.key));let t=Ts.indexOf(e);if(t>=0&&Ts.splice(t,1),r.key&&r.key.toLowerCase()==="meta"&&Ts.splice(0,Ts.length),(e===93||e===224)&&(e=91),e in hc){hc[e]=!1;for(let n in vm)vm[n]===e&&(Rv[n]=!1)}}function xOe(r){if(typeof r>"u")Object.keys(zs).forEach(i=>{Array.isArray(zs[i])&&zs[i].forEach(o=>Mq(o)),delete zs[i]}),G7(null);else if(Array.isArray(r))r.forEach(i=>{i.key&&Mq(i)});else if(typeof r=="object")r.key&&Mq(r);else if(typeof r=="string"){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];let[i,o]=t;typeof i=="function"&&(o=i,i=""),Mq({key:r,scope:i,method:o,splitKey:"+"})}}var Mq=r=>{let{key:e,scope:t,method:n,splitKey:i="+"}=r;vOe(e).forEach(a=>{let l=a.split(i),u=l.length,f=l[u-1],p=f==="*"?"*":DS(f);if(!zs[p])return;t||(t=EC());let x=u>1?gOe(vm,l):[],S=[];zs[p]=zs[p].filter(C=>{let L=(n?C.method===n:!0)&&C.scope===t&&fzt(C.mods,x);return L&&S.push(C.element),!L}),S.forEach(C=>G7(C))})};function pOe(r,e,t,n){if(e.element!==n)return;let i;if(e.scope===t||e.scope==="all"){i=e.mods.length>0;for(let o in hc)Object.prototype.hasOwnProperty.call(hc,o)&&(!hc[o]&&e.mods.indexOf(+o)>-1||hc[o]&&e.mods.indexOf(+o)===-1)&&(i=!1);(e.mods.length===0&&!hc[16]&&!hc[18]&&!hc[17]&&!hc[91]||i||e.shortcut==="*")&&(e.keys=[],e.keys=e.keys.concat(Ts),e.method(r,e)===!1&&(r.preventDefault?r.preventDefault():r.returnValue=!1,r.stopPropagation&&r.stopPropagation(),r.cancelBubble&&(r.cancelBubble=!0)))}}function mOe(r,e){let t=zs["*"],n=r.keyCode||r.which||r.charCode;if(r.key&&r.key.toLowerCase()==="capslock"||!Rv.filter.call(this,r))return;if((n===93||n===224)&&(n=91),Ts.indexOf(n)===-1&&n!==229&&Ts.push(n),["metaKey","ctrlKey","altKey","shiftKey"].forEach(l=>{let u=SC[l];r[l]&&Ts.indexOf(u)===-1?Ts.push(u):!r[l]&&Ts.indexOf(u)>-1?Ts.splice(Ts.indexOf(u),1):l==="metaKey"&&r[l]&&(Ts=Ts.filter(f=>f in SC||f===n))}),n in hc){hc[n]=!0;for(let l in vm)if(Object.prototype.hasOwnProperty.call(vm,l)){let u=SC[vm[l]];Rv[l]=r[u]}if(!t)return}for(let l in hc)Object.prototype.hasOwnProperty.call(hc,l)&&(hc[l]=r[SC[l]]);r.getModifierState&&!(r.altKey&&!r.ctrlKey)&&r.getModifierState("AltGraph")&&(Ts.indexOf(17)===-1&&Ts.push(17),Ts.indexOf(18)===-1&&Ts.push(18),hc[17]=!0,hc[18]=!0);let i=EC();if(t)for(let l=0;l<t.length;l++)t[l].scope===i&&(r.type==="keydown"&&t[l].keydown||r.type==="keyup"&&t[l].keyup)&&pOe(r,t[l],i,e);if(!(n in zs))return;let o=zs[n],a=o.length;for(let l=0;l<a;l++)if((r.type==="keydown"&&o[l].keydown||r.type==="keyup"&&o[l].keyup)&&o[l].key){let u=o[l],{splitKey:f}=u,p=u.key.split(f),x=[];for(let S=0;S<p.length;S++)x.push(DS(p[S]));x.sort().join("")===Ts.sort().join("")&&pOe(r,u,i,e)}}function Rv(r,e,t){Ts=[];let n=vOe(r),i=[],o="all",a=document,l=0,u=!1,f=!0,p="+",x=!1,S=!1;for(t===void 0&&typeof e=="function"&&(t=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(o=e.scope),e.element&&(a=e.element),e.keyup&&(u=e.keyup),e.keydown!==void 0&&(f=e.keydown),e.capture!==void 0&&(x=e.capture),typeof e.splitKey=="string"&&(p=e.splitKey),e.single===!0&&(S=!0)),typeof e=="string"&&(o=e),S&&xOe(r,o);l<n.length;l++)r=n[l].split(p),i=[],r.length>1&&(i=gOe(vm,r)),r=r[r.length-1],r=r==="*"?"*":DS(r),r in zs||(zs[r]=[]),zs[r].push({keyup:u,keydown:f,scope:o,mods:i,shortcut:n[l],method:t,key:n[l],splitKey:p,element:a});if(typeof a<"u"&&window){if(!Pv.has(a)){let C=function(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return mOe(L,a)},M=function(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;mOe(L,a),_zt(L)};Pv.set(a,{keydownListener:C,keyupListenr:M,capture:x}),W7(a,"keydown",C,x),W7(a,"keyup",M,x)}if(!TC){let C=()=>{Ts=[]};TC={listener:C,capture:x},W7(window,"focus",C,x)}}}function wzt(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(zs).forEach(t=>{zs[t].filter(i=>i.scope===e&&i.shortcut===r).forEach(i=>{i&&i.method&&i.method()})})}function G7(r){let e=Object.values(zs).flat();if(e.findIndex(n=>{let{element:i}=n;return i===r})<0){let{keydownListener:n,keyupListenr:i,capture:o}=Pv.get(r)||{};n&&i&&(wC(r,"keyup",i,o),wC(r,"keydown",n,o),Pv.delete(r))}if((e.length<=0||Pv.size<=0)&&(Object.keys(Pv).forEach(i=>{let{keydownListener:o,keyupListenr:a,capture:l}=Pv.get(i)||{};o&&a&&(wC(i,"keyup",a,l),wC(i,"keydown",o,l),Pv.delete(i))}),Pv.clear(),Object.keys(zs).forEach(i=>delete zs[i]),TC)){let{listener:i,capture:o}=TC;wC(window,"focus",i,o),TC=null}}var $7={getPressedKeyString:gzt,setScope:bOe,getScope:EC,deleteScope:xzt,getPressedKeyCodes:mzt,getAllKeyCodes:vzt,isPressed:bzt,filter:yzt,trigger:wzt,unbind:xOe,keyMap:kC,modifier:vm,modifierMap:SC};for(let r in $7)Object.prototype.hasOwnProperty.call($7,r)&&(Rv[r]=$7[r]);if(typeof window<"u"){let r=window.hotkeys;Rv.noConflict=e=>(e&&window.hotkeys===Rv&&(window.hotkeys=r),Rv),window.hotkeys=Rv}var Szt=(r,e,t)=>{let n=r;return t===!0?n=`${e.identifier}:${r}`:typeof t=="string"&&(n=`${t}:${r}`),n},Tzt=(r,e,t)=>{let{bubbles:n,cancelable:i,composed:o}=e||{bubbles:!0,cancelable:!0,composed:!0};return e&&Object.assign(t,{originalEvent:e}),new CustomEvent(r,{bubbles:n,cancelable:i,composed:o,detail:t})};function kzt(r){let e=r.getBoundingClientRect(),t=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth,i=e.top<=t&&e.top+e.height>=0,o=e.left<=n&&e.left+e.width>=0;return i&&o}var Ezt={events:["click","touchend"],onlyVisible:!0,dispatchEvent:!0,eventPrefix:!0},Lq=(r,e={})=>{let{onlyVisible:t,dispatchEvent:n,events:i,eventPrefix:o}=Object.assign({},Ezt,e),a=p=>{let x=e?.element||r.element;if(!(x.contains(p.target)||!kzt(x)&&t)&&(r.clickOutside&&r.clickOutside(p),n)){let S=Szt("click:outside",r,o),C=Tzt(S,p,{controller:r});x.dispatchEvent(C)}},l=()=>{i?.forEach(p=>{window.addEventListener(p,a,!1)})},u=()=>{i?.forEach(p=>{window.removeEventListener(p,a,!1)})},f=r.disconnect.bind(r);return Object.assign(r,{disconnect(){u(),f()}}),l(),[l,u]};var K7=class extends Zt{};K7.debounces=[];var Y7=class extends Zt{};Y7.throttles=[];var Pq=class extends Zt{static targets=["menu"];static values={exemptionContainers:Array,logger:Boolean,flip:Boolean};get exemptionContainerTargets(){return this.exemptionContainersValue.map(r=>document.querySelector(r)).filter(Boolean)}get isOpen(){return this.menuTarget.hasAttribute("open")}get focusableItems(){return[...this.menuTarget.querySelectorAll("a, button")].filter(r=>!r.closest("[hidden]")&&r.dataset.disabled!=="true")}clickOutside(r){this.hasMenuTarget&&!(this.hasExemptionContainersValue&&this.exemptionContainerTargets.some(t=>t.contains(r.target)))&&this.isOpen&&this.close()}connect(){Lq(this),this.boundHandleKeydown=this.handleKeydown.bind(this)}disconnect(){this.element.removeEventListener("keydown",this.boundHandleKeydown)}toggle(){this.isOpen?this.close():this.open()}open(){this.menuTarget.show(),this.maybeFlip(),this.element.addEventListener("keydown",this.boundHandleKeydown),document.body.classList.add("dropdown-open"),this.dispatch("open",{bubbles:!0}),requestAnimationFrame(()=>{let r=this.focusableItems;if(r.length===0)return;(r.find(t=>[...t.classList].some(n=>n.endsWith("--active"))||t.getAttribute("aria-selected")==="true")||r[0]).focus()})}close(){this.menuTarget.close(),this.element.removeEventListener("keydown",this.boundHandleKeydown),document.body.classList.remove("dropdown-open")}maybeFlip(){!this.flipValue||!this.hasMenuTarget||(this.menuTarget.classList.remove("start-auto","end-0"),this.menuTarget.classList.add("start-0","end-auto"),this.menuTarget.getBoundingClientRect().right>document.documentElement.clientWidth&&(this.menuTarget.classList.remove("start-0","end-auto"),this.menuTarget.classList.add("start-auto","end-0")))}handleKeydown(r){let e=this.focusableItems;if(e.length===0)return;let t=e.indexOf(document.activeElement);switch(r.key){case"ArrowDown":r.preventDefault(),e[t<e.length-1?t+1:0].focus();break;case"ArrowUp":r.preventDefault(),e[t>0?t-1:e.length-1].focus();break;case"Escape":r.preventDefault(),this.close();break;default:}}};var Rq=class extends Zt{get focusableItems(){return[...this.element.querySelectorAll("a, button")].filter(r=>!r.closest("[hidden]")&&r.dataset.disabled!=="true")}connect(){this.boundHandleKeydown=this.handleKeydown.bind(this),this.boundOnToggle=this.onToggle.bind(this),this.element.addEventListener("toggle",this.boundOnToggle),this.element.addEventListener("keydown",this.boundHandleKeydown)}disconnect(){this.element.removeEventListener("toggle",this.boundOnToggle),this.element.removeEventListener("keydown",this.boundHandleKeydown)}onToggle(r){r.newState==="open"&&requestAnimationFrame(()=>{let e=this.focusableItems;if(e.length===0)return;(e.find(n=>n.classList.contains("dropdown-menu__item--active"))||e[0]).focus()})}handleKeydown(r){if(!this.element.matches(":popover-open"))return;let e=this.focusableItems;if(e.length===0)return;let t=e.indexOf(document.activeElement);switch(r.key){case"ArrowDown":r.preventDefault(),e[t<e.length-1?t+1:0].focus();break;case"ArrowUp":r.preventDefault(),e[t>0?t-1:e.length-1].focus();break;case"Escape":r.preventDefault(),r.stopPropagation(),this.element.hidePopover();break;default:}}};var bMe=Vo(yMe()),hF=class extends Zt{static targets=["element"];get view(){return this.elementTarget.dataset.view}get componentOptions(){try{return JSON.parse(this.elementTarget.dataset.componentOptions)}catch{return{}}}get isDark(){return document.documentElement.classList.contains("dark")}get resolvedTheme(){return this.isDark?"monokai":"default"}connect(){let r={element:this.elementTarget,spellChecker:this.componentOptions.spell_checker,autoRefresh:{delay:500},theme:this.resolvedTheme};this.view==="show"&&(r.toolbar=!1,r.status=!1),this.easyMde=new bMe.default(r),this.view==="show"&&(this.easyMde.codemirror.options.readOnly=!0),this.easyMde.codemirror.on("keydown",(t,n)=>{n.key==="Escape"&&this.easyMde.codemirror.getInputField().blur()});let e=this;this.observer=new MutationObserver(()=>{e.easyMde.codemirror.setOption("theme",e.resolvedTheme)}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})}disconnect(){this.observer&&this.observer.disconnect(),this.easyMde&&(this.easyMde.toTextArea(),this.easyMde=null)}};var fF=class extends Zt{submit(r){r.key&&this.element.requestSubmit()}};var dF=class extends Zt{static targets=["icon"];mousemove(r){let n=r.clientX,i=r.clientY;this.iconTargets.forEach(o=>{let a=o.getBoundingClientRect(),l=a.left+a.width/2,u=a.top+a.height/2,f=l-n,p=u-i,x=Math.sqrt(f*f+p*p);if(x<90&&x>0){let S=parseFloat(o.dataset.repulsionScale??1),C=(1-x/90)*30*S;o.style.setProperty("--tx",`${f/x*C}px`),o.style.setProperty("--ty",`${p/x*C}px`),o.classList.add("grid-card__icon--repelling")}else o.style.setProperty("--tx","0px"),o.style.setProperty("--ty","0px"),o.classList.remove("grid-card__icon--repelling")})}mouseleave(){this.iconTargets.forEach(r=>{r.style.setProperty("--tx","0px"),r.style.setProperty("--ty","0px"),r.classList.remove("grid-card__icon--repelling")})}};var y3t=32,pF=class extends Zt{static targets=["row","trigger"];connect(){this.items=Array.from(this.rowTarget.children),this.bindAriaExpanded(),this.popoverItems=this.collectPopoverItems(),this.scheduleUpdate=this.scheduleUpdate.bind(this),this.resizeObserver=new ResizeObserver(this.scheduleUpdate),this.resizeObserver.observe(this.element),this.update()}collectPopoverItems(){if(!this.popoverElement)return[];let r=this.popoverElement.querySelector(".dropdown-menu__list");return r?Array.from(r.children):[]}disconnect(){this.resizeObserver?.disconnect(),this.rafId&&cancelAnimationFrame(this.rafId),this.popoverElement&&this.handlePopoverToggle&&this.popoverElement.removeEventListener("toggle",this.handlePopoverToggle)}bindAriaExpanded(){if(!this.hasTriggerTarget)return;let r=this.triggerTarget.getAttribute("popovertarget");this.popoverElement=r?document.getElementById(r):null,this.popoverElement&&(this.handlePopoverToggle=e=>{this.triggerTarget.setAttribute("aria-expanded",e.newState==="open"?"true":"false")},this.popoverElement.addEventListener("toggle",this.handlePopoverToggle))}scheduleUpdate(){this.rafId||(this.rafId=requestAnimationFrame(()=>{this.rafId=null,this.update()}))}update(){if(this.items.length===0){this.element.classList.remove("header-menu--has-overflow"),this.element.classList.remove("header-menu--row-empty"),this.element.classList.add("header-menu--empty");return}this.element.classList.remove("header-menu--empty"),this.items.forEach(S=>{S.style.display=""}),this.truncatedItem&&(this.truncatedItem.classList.remove("header-menu__item--truncated"),this.truncatedItem.style.maxWidth="",this.truncatedItem=null);let r=this.hasTriggerTarget?this.triggerTarget.offsetWidth:0,e=this.element.clientWidth,t=window.getComputedStyle(this.rowTarget),n=parseFloat(t.columnGap)||parseFloat(t.gap)||0,i=this.items.length,o=0;for(let S=0;S<this.items.length;S+=1){let C=o+(S===0?0:n)+this.items[S].offsetWidth,L=S<this.items.length-1?e-r-n:e;if(C>L){i=S;break}o=C}let a=-1;if(i<this.items.length){let S=o+(i>0?n:0),C=e-r-n-S;C>=y3t&&(a=i,this.truncatedItem=this.items[a],this.truncatedItem.classList.add("header-menu__item--truncated"),this.truncatedItem.style.maxWidth=`${Math.floor(C)}px`)}let l=i+(a>=0?1:0);for(let S=l;S<this.items.length;S+=1)this.items[S].style.display="none";let f=this.rowTarget.clientWidth>0?l:0;this.popoverItems.forEach((S,C)=>{S.style.display=C<f?"none":""});let p=i<this.items.length;this.element.classList.toggle("header-menu--has-overflow",p);let x=i>0||a>=0;this.element.classList.toggle("header-menu--row-empty",!x)}};var mF=class extends Zt{static targets=["content"];showContent(r){this.contentTarget.classList.toggle("hidden"),r.target.classList.add("hidden")}};var b3t="input, textarea, select, [contenteditable]",gF=class extends Zt{static targets=["table"];initialize(){this.handleKeydown=this.handleKeydown.bind(this),this.handleDropdownOpen=this.handleDropdownOpen.bind(this),this.handleAdvanceRequest=this.handleAdvanceRequest.bind(this),this.handleTableBlur=this.handleTableBlur.bind(this)}connect(){this.currentIndex=-1,this.hotkeysEnabled=window.Avo?.configuration?.hotkeys?.enabled!==!1,document.addEventListener("keydown",this.handleKeydown),document.addEventListener("dropdown-menu:open",this.handleDropdownOpen),document.addEventListener("avo:advance-resource-table",this.handleAdvanceRequest),this.hotkeysEnabled&&this.element.querySelectorAll("tr[data-visit-path] [data-hotkey]").forEach(e=>{let t=e.getAttribute("data-hotkey");e.setAttribute("data-hotkey-original",t),e.removeAttribute("data-hotkey")})}disconnect(){document.removeEventListener("keydown",this.handleKeydown),document.removeEventListener("dropdown-menu:open",this.handleDropdownOpen),document.removeEventListener("avo:advance-resource-table",this.handleAdvanceRequest)}tableTargetConnected(r){r.addEventListener("blur",this.handleTableBlur),this.currentIndex=-1}tableTargetDisconnected(r){r.removeEventListener("blur",this.handleTableBlur)}handleDropdownOpen(){let r=this.rows();r.length&&this.clearFocus(r)}handleAdvanceRequest(r){if(!this.hasTableTarget)return;let e=r.detail?.direction==="previous"?"previous":"next",t=this.rows();t.length&&(this.tableTarget.focus({preventScroll:!0}),this.moveFocus(t,e))}handleTableBlur(){let r=this.rows();r.length&&this.clearFocus(r)}handleKeydown(r){if(r.defaultPrevented||document.body.classList.contains("modal-open")||document.body.classList.contains("dropdown-open")||r.target.closest(b3t)||r.repeat&&(r.key==="Enter"||r.key==="Escape"||r.key===" "))return;let e=this.rows();if(e.length&&this.tableHasFocus()&&!(this.hotkeysEnabled&&this.currentIndex!==-1&&this.handleRowHotkey(r,e))&&["ArrowDown","ArrowUp","Enter","Escape"," "].includes(r.key)){if(this.currentIndex=this.normalizeCurrentIndex(e.length),r.key==="Escape"){if(this.currentIndex!==-1){r.preventDefault(),this.clearFocus(e);return}let t=this.application.getControllerForElementAndIdentifier(this.element.querySelector('[data-controller~="item-select-all"]'),"item-select-all");if(t&&JSON.parse(t.element.dataset.selectedResources||"[]").length>0){r.preventDefault(),t.deselectAll();return}r.preventDefault(),this.tableTarget.blur();return}if(r.key==="Enter"){if(this.currentIndex===-1)return;r.preventDefault();let t=e[this.currentIndex];t?.dataset.visitPath&&window.Turbo.visit(t.dataset.visitPath);return}if(r.key===" "){if(this.currentIndex===-1)return;r.preventDefault();let t=e[this.currentIndex].querySelector('[data-item-select-all-target="itemCheckbox"]');t&&t.click();return}r.preventDefault(),this.moveFocus(e,r.key==="ArrowDown"?"next":"previous")}}moveFocus(r,e){e==="next"?this.currentIndex=this.currentIndex<r.length-1?this.currentIndex+1:0:this.currentIndex=this.currentIndex>0?this.currentIndex-1:r.length-1,r.forEach((t,n)=>t.classList.toggle("is-keyboard-focused",n===this.currentIndex)),r[this.currentIndex].scrollIntoView({block:"nearest"}),this.syncActiveDescendant(r[this.currentIndex]),this.hotkeysEnabled&&this.syncRowHotkeys(r)}rows(){return Array.from(this.element.querySelectorAll("tr[data-visit-path]"))}tableHasFocus(){return this.hasTableTarget?this.tableTarget===document.activeElement||this.tableTarget.contains(document.activeElement):!1}syncActiveDescendant(r){this.hasTableTarget&&(r?.id?this.tableTarget.setAttribute("aria-activedescendant",r.id):this.tableTarget.removeAttribute("aria-activedescendant"))}normalizeCurrentIndex(r){return this.currentIndex<-1?-1:this.currentIndex>=r?r-1:this.currentIndex}syncRowHotkeys(r){r.forEach((e,t)=>{e.querySelectorAll("[data-hotkey-original]").forEach(i=>{if(t===this.currentIndex){let o=i.getAttribute("data-hotkey-original");i.setAttribute("data-hotkey",o)}else i.removeAttribute("data-hotkey")})})}handleRowHotkey(r,e){let t=e[this.currentIndex];if(!t)return!1;let n=t.querySelector(`[data-hotkey="${r.key}"]`);return n?(r.preventDefault(),r.stopImmediatePropagation(),n.click(),!0):!1}clearFocus(r){r.forEach(e=>e.classList.remove("is-keyboard-focused")),this.currentIndex=-1,this.hasTableTarget&&this.tableTarget.removeAttribute("aria-activedescendant"),r.forEach(e=>{e.querySelectorAll("[data-hotkey-original]").forEach(t=>{t.removeAttribute("data-hotkey")})})}};var vF=class extends Zt{static targets=["element"];focus({params:r}){let e=this.context.element.querySelector(r.selector);this.element&&e.focus()}};var yF=class extends Zt{static targets=["itemCheckbox","checkbox","selectAllOverlay","unselectedMessage","selectedMessage"];static values={pageCount:Number,selectedAll:Boolean,selectedAllQuery:String};connect(){this.resourceName=this.element.dataset.resourceName,this.selectedResourcesObserver=new oS(this.element,"data-selected-resources",this),this.selectedResourcesObserver.start()}elementAttributeValueChanged(r){let e=JSON.parse(r.dataset.selectedResources),t=this.element.querySelectorAll("tbody tr").length;this.checkboxTarget.indeterminate=!1,this.checkboxTarget.checked=!1,e.length===t?this.checkboxTarget.checked=!0:e.length===0?this.checkboxTarget.checked=!1:e.length>0&&e.length<t&&(this.checkboxTarget.indeterminate=!0)}disconnect(){this.selectedResourcesObserver.stop()}deselectAll(){this.itemCheckboxTargets.forEach(r=>r.checked&&r.click()),this.checkboxTarget.checked=!1,this.selectAllEnabled()&&(this.selectAllOverlay(!1),this.resetUnselected())}toggle(r){let e=!!r.target.checked;this.itemCheckboxTargets.forEach(t=>t.checked!==e&&t.click()),this.selectAllEnabled()&&(this.selectAllOverlay(e),e||this.resetUnselected())}selectRow(){let r=!0;this.itemCheckboxTargets.forEach(e=>r=r&&e.checked),this.checkboxTarget.checked=r,this.selectAllEnabled()&&(this.selectAllOverlay(r),this.resetUnselected()),this.updateLinks("resourceIds")}selectAll(r){r.preventDefault(),this.selectedAllValue=!this.selectedAllValue,this.unselectedMessageTarget.classList.toggle("hidden"),this.selectedMessageTarget.classList.toggle("hidden"),this.selectedAllValue?this.updateLinks("selectedQuery"):this.updateLinks("resourceIds")}updateLinks(r){document.querySelectorAll(`a[data-actions-picker-target][data-resource-name="${this.resourceName}"]`).forEach(t=>{try{let n=new URL(t.href);if(Array.from(n.searchParams.keys()).filter(i=>i.startsWith("fields[")).forEach(i=>n.searchParams.delete(i)),r==="resourceIds"){let i=JSON.parse(this.element.dataset.selectedResources).join(",");n.searchParams.set("fields[avo_resource_ids]",i),n.searchParams.set("fields[avo_selected_all]","false")}else if(r==="selectedQuery"){let i=this.element.dataset.itemSelectAllSelectedAllQueryValue;n.searchParams.set("fields[avo_index_query]",i),n.searchParams.set("fields[avo_selected_all]","true")}t.href=n.toString()}catch(n){console.error("Error updating link:",t,n)}})}resetUnselected(){this.selectedAllValue=!1,this.unselectedMessageTarget.classList.remove("hidden"),this.selectedMessageTarget.classList.add("hidden")}selectAllOverlay(r){r?this.selectAllOverlayTarget.classList.remove("hidden"):this.selectAllOverlayTarget.classList.add("hidden")}selectAllEnabled(){return this.pageCountValue>1&&this.selectedAllQueryValue!=="select_all_disabled"}};var bF=class extends Zt{static targets=["panel"];checkbox={};get actionLinks(){return document.querySelectorAll('a[data-actions-picker-target="resourceAction"]')}get currentIds(){try{return JSON.parse(this.stateHolderElement.dataset.selectedResources)}catch{return[]}}set currentIds(r){this.stateHolderElement.dataset.selectedResources=JSON.stringify(r),this.actionLinks.length>0&&(r.length>0?this.enableResourceActions():this.disableResourceActions())}connect(){this.resourceName=this.element.dataset.resourceName,this.resourceId=this.element.dataset.resourceId,this.stateHolderElement=document.querySelector(`[data-selected-resources-name="${this.resourceName}"]`)}addToSelected(){let r=this.currentIds;r.push(this.resourceId),this.element.closest("tr")&&this.element.closest("tr").classList.add("selected-row"),this.currentIds=r}removeFromSelected(){this.element.closest("tr")&&this.element.closest("tr").classList.remove("selected-row"),this.currentIds=this.currentIds.filter(r=>r.toString()!==this.resourceId)}toggle(r){this.checkbox=r.target,this.checkbox.checked?this.addToSelected():this.removeFromSelected()}enableResourceActions(){this.actionLinks.forEach(r=>{r.dataset.resourceName===this.resourceName&&(r.classList.remove(r.dataset.disabledClasses),r.setAttribute("data-href",r.getAttribute("href")),r.dataset.disabled=!1,r.removeAttribute("tabindex"),r.setAttribute("aria-disabled","false"))})}disableResourceActions(){this.actionLinks.forEach(r=>{r.dataset.resourceName===this.resourceName&&(r.classList.add(r.dataset.disabledClasses),r.setAttribute("href",r.getAttribute("data-href")),r.dataset.disabled=!0,r.setAttribute("tabindex","-1"),r.setAttribute("aria-disabled","true"))})}};var xF=class extends Zt{static targets=["input","section","row","empty"];connect(){this.modal=this.element.closest(".modal"),this.modal&&(this.handleToggle=this.onModalToggle.bind(this),this.modal.addEventListener("toggle",this.handleToggle))}disconnect(){this.modal&&this.modal.removeEventListener("toggle",this.handleToggle)}onModalToggle(r){r.newState==="open"?(this.reset(),requestAnimationFrame(()=>this.inputTarget.focus())):this.reset()}filter(){let r=this.inputTarget.value.trim().toLowerCase(),e=!1;this.sectionTargets.forEach(t=>{let n=!1;this.rowsFor(t).forEach(i=>{let o=r===""||this.searchText(i).includes(r);i.hidden=!o,o&&(n=!0)}),t.hidden=!n,n&&(e=!0)}),this.hasEmptyTarget&&(this.emptyTarget.hidden=e||r==="")}clearOnEscape(r){this.inputTarget.value!==""&&(r.stopPropagation(),this.reset(),this.inputTarget.focus())}reset(){this.inputTarget.value="",this.filter()}rowsFor(r){return this.rowTargets.filter(e=>r.contains(e))}searchText(r){return r.dataset.searchText||(r.dataset.searchText=r.textContent.replace(/\s+/g," ").trim().toLowerCase()),r.dataset.searchText}};function xMe(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function x3t(r){if(Array.isArray(r))return r}function _3t(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n,i,o,a,l=[],u=!0,f=!1;try{if(o=(t=t.call(r)).next,e!==0)for(;!(u=(n=o.call(t)).done)&&(l.push(n.value),l.length!==e);u=!0);}catch(p){f=!0,i=p}finally{try{if(!u&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(f)throw i}}return l}}function w3t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
660
|
+
`}}function ye(){t.calendarContainer.classList.add("hasWeeks");var K=Zo("div","flatpickr-weekwrapper");K.appendChild(Zo("span","flatpickr-weekday",t.l10n.weekAbbreviation));var Z=Zo("div","flatpickr-weeks");return K.appendChild(Z),{weekWrapper:K,weekNumbers:Z}}function se(K,Z){Z===void 0&&(Z=!0);var ie=Z?K:K-t.currentMonth;ie<0&&t._hidePrevMonthArrow===!0||ie>0&&t._hideNextMonthArrow===!0||(t.currentMonth+=ie,(t.currentMonth<0||t.currentMonth>11)&&(t.currentYear+=t.currentMonth>11?1:-1,t.currentMonth=(t.currentMonth+12)%12,Ft("onYearChange"),U()),z(),Ft("onMonthChange"),Cn())}function $e(K,Z){if(K===void 0&&(K=!0),Z===void 0&&(Z=!0),t.input.value="",t.altInput!==void 0&&(t.altInput.value=""),t.mobileInput!==void 0&&(t.mobileInput.value=""),t.selectedDates=[],t.latestSelectedDateObj=void 0,Z===!0&&(t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth()),t.config.enableTime===!0){var ie=cq(t.config),be=ie.hours,Oe=ie.minutes,je=ie.seconds;C(be,Oe,je)}t.redraw(),K&&Ft("onChange")}function bt(){t.isOpen=!1,t.isMobile||(t.calendarContainer!==void 0&&t.calendarContainer.classList.remove("open"),t._input!==void 0&&t._input.classList.remove("active")),Ft("onClose")}function it(){t.config!==void 0&&Ft("onDestroy");for(var K=t._handlers.length;K--;)t._handlers[K].remove();if(t._handlers=[],t.mobileInput)t.mobileInput.parentNode&&t.mobileInput.parentNode.removeChild(t.mobileInput),t.mobileInput=void 0;else if(t.calendarContainer&&t.calendarContainer.parentNode)if(t.config.static&&t.calendarContainer.parentNode){var Z=t.calendarContainer.parentNode;if(Z.lastChild&&Z.removeChild(Z.lastChild),Z.parentNode){for(;Z.firstChild;)Z.parentNode.insertBefore(Z.firstChild,Z);Z.parentNode.removeChild(Z)}}else t.calendarContainer.parentNode.removeChild(t.calendarContainer);t.altInput&&(t.input.type="text",t.altInput.parentNode&&t.altInput.parentNode.removeChild(t.altInput),delete t.altInput),t.input&&(t.input.type=t.input._type,t.input.classList.remove("flatpickr-input"),t.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(ie){try{delete t[ie]}catch{}})}function _t(K){return t.calendarContainer.contains(K)}function ct(K){if(t.isOpen&&!t.config.inline){var Z=kf(K),ie=_t(Z),be=Z===t.input||Z===t.altInput||t.element.contains(Z)||K.path&&K.path.indexOf&&(~K.path.indexOf(t.input)||~K.path.indexOf(t.altInput)),Oe=!be&&!ie&&!_t(K.relatedTarget),je=!t.config.ignoredFocusElements.some(function(et){return et.contains(Z)});Oe&&je&&(t.config.allowInput&&t.setDate(t._input.value,!1,t.config.altInput?t.config.altFormat:t.config.dateFormat),t.timeContainer!==void 0&&t.minuteElement!==void 0&&t.hourElement!==void 0&&t.input.value!==""&&t.input.value!==void 0&&u(),t.close(),t.config&&t.config.mode==="range"&&t.selectedDates.length===1&&t.clear(!1))}}function Lt(K){if(!(!K||t.config.minDate&&K<t.config.minDate.getFullYear()||t.config.maxDate&&K>t.config.maxDate.getFullYear())){var Z=K,ie=t.currentYear!==Z;t.currentYear=Z||t.currentYear,t.config.maxDate&&t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth=Math.min(t.config.maxDate.getMonth(),t.currentMonth):t.config.minDate&&t.currentYear===t.config.minDate.getFullYear()&&(t.currentMonth=Math.max(t.config.minDate.getMonth(),t.currentMonth)),ie&&(t.redraw(),Ft("onYearChange"),U())}}function Ht(K,Z){var ie;Z===void 0&&(Z=!0);var be=t.parseDate(K,void 0,Z);if(t.config.minDate&&be&&Ef(be,t.config.minDate,Z!==void 0?Z:!t.minDateHasTime)<0||t.config.maxDate&&be&&Ef(be,t.config.maxDate,Z!==void 0?Z:!t.maxDateHasTime)>0)return!1;if(!t.config.enable&&t.config.disable.length===0)return!0;if(be===void 0)return!1;for(var Oe=!!t.config.enable,je=(ie=t.config.enable)!==null&&ie!==void 0?ie:t.config.disable,et=0,Ee=void 0;et<je.length;et++){if(Ee=je[et],typeof Ee=="function"&&Ee(be))return Oe;if(Ee instanceof Date&&be!==void 0&&Ee.getTime()===be.getTime())return Oe;if(typeof Ee=="string"){var Ue=t.parseDate(Ee,void 0,!0);return Ue&&Ue.getTime()===be.getTime()?Oe:!Oe}else if(typeof Ee=="object"&&be!==void 0&&Ee.from&&Ee.to&&be.getTime()>=Ee.from.getTime()&&be.getTime()<=Ee.to.getTime())return Oe}return!Oe}function Nt(K){return t.daysContainer!==void 0?K.className.indexOf("hidden")===-1&&K.className.indexOf("flatpickr-disabled")===-1&&t.daysContainer.contains(K):!1}function fr(K){var Z=K.target===t._input,ie=t._input.value.trimEnd()!==On();Z&&ie&&!(K.relatedTarget&&_t(K.relatedTarget))&&t.setDate(t._input.value,!0,K.target===t.altInput?t.config.altFormat:t.config.dateFormat)}function Kt(K){var Z=kf(K),ie=t.config.wrap?r.contains(Z):Z===t._input,be=t.config.allowInput,Oe=t.isOpen&&(!be||!ie),je=t.config.inline&&ie&&!be;if(K.keyCode===13&&ie){if(be)return t.setDate(t._input.value,!0,Z===t.altInput?t.config.altFormat:t.config.dateFormat),t.close(),Z.blur();t.open()}else if(_t(Z)||Oe||je){var et=!!t.timeContainer&&t.timeContainer.contains(Z);switch(K.keyCode){case 13:et?(K.preventDefault(),u(),Br()):ur(K);break;case 27:K.preventDefault(),Br();break;case 8:case 46:ie&&!t.config.allowInput&&(K.preventDefault(),t.clear());break;case 37:case 39:if(!et&&!ie){K.preventDefault();var Ee=o();if(t.daysContainer!==void 0&&(be===!1||Ee&&Nt(Ee))){var Ue=K.keyCode===39?1:-1;K.ctrlKey?(K.stopPropagation(),se(Ue),Pe(ve(1),0)):Pe(void 0,Ue)}}else t.hourElement&&t.hourElement.focus();break;case 38:case 40:K.preventDefault();var ot=K.keyCode===40?1:-1;t.daysContainer&&Z.$i!==void 0||Z===t.input||Z===t.altInput?K.ctrlKey?(K.stopPropagation(),Lt(t.currentYear-ot),Pe(ve(1),0)):et||Pe(void 0,ot*7):Z===t.currentYearElement?Lt(t.currentYear-ot):t.config.enableTime&&(!et&&t.hourElement&&t.hourElement.focus(),u(K),t._debouncedChange());break;case 9:if(et){var Dt=[t.hourElement,t.minuteElement,t.secondElement,t.amPM].concat(t.pluginElements).filter(function(Gt){return Gt}),jt=Dt.indexOf(Z);if(jt!==-1){var It=Dt[jt+(K.shiftKey?-1:1)];K.preventDefault(),(It||t._input).focus()}}else!t.config.noCalendar&&t.daysContainer&&t.daysContainer.contains(Z)&&K.shiftKey&&(K.preventDefault(),t._input.focus());break;default:break}}if(t.amPM!==void 0&&Z===t.amPM)switch(K.key){case t.l10n.amPM[0].charAt(0):case t.l10n.amPM[0].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[0],x(),Wn();break;case t.l10n.amPM[1].charAt(0):case t.l10n.amPM[1].charAt(0).toLowerCase():t.amPM.textContent=t.l10n.amPM[1],x(),Wn();break}(ie||_t(Z))&&Ft("onKeyDown",K)}function Xt(K,Z){if(Z===void 0&&(Z="flatpickr-day"),!(t.selectedDates.length!==1||K&&(!K.classList.contains(Z)||K.classList.contains("flatpickr-disabled")))){for(var ie=K?K.dateObj.getTime():t.days.firstElementChild.dateObj.getTime(),be=t.parseDate(t.selectedDates[0],void 0,!0).getTime(),Oe=Math.min(ie,t.selectedDates[0].getTime()),je=Math.max(ie,t.selectedDates[0].getTime()),et=!1,Ee=0,Ue=0,ot=Oe;ot<je;ot+=FDe.DAY)Ht(new Date(ot),!0)||(et=et||ot>Oe&&ot<je,ot<be&&(!Ee||ot>Ee)?Ee=ot:ot>be&&(!Ue||ot<Ue)&&(Ue=ot));var Dt=Array.from(t.rContainer.querySelectorAll("*:nth-child(-n+"+t.config.showMonths+") > ."+Z));Dt.forEach(function(jt){var It=jt.dateObj,Gt=It.getTime(),kr=Ee>0&&Gt<Ee||Ue>0&&Gt>Ue;if(kr){jt.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(cr){jt.classList.remove(cr)});return}else if(et&&!kr)return;["startRange","inRange","endRange","notAllowed"].forEach(function(cr){jt.classList.remove(cr)}),K!==void 0&&(K.classList.add(ie<=t.selectedDates[0].getTime()?"startRange":"endRange"),be<ie&&Gt===be?jt.classList.add("startRange"):be>ie&&Gt===be&&jt.classList.add("endRange"),Gt>=Ee&&(Ue===0||Gt<=Ue)&&RDe(Gt,be,ie)&&jt.classList.add("inRange"))})}}function vt(){t.isOpen&&!t.config.static&&!t.config.inline&&dr()}function yt(K,Z){if(Z===void 0&&(Z=t._positionElement),t.isMobile===!0){if(K){K.preventDefault();var ie=kf(K);ie&&ie.blur()}t.mobileInput!==void 0&&(t.mobileInput.focus(),t.mobileInput.click()),Ft("onOpen");return}else if(t._input.disabled||t.config.inline)return;var be=t.isOpen;t.isOpen=!0,be||(t.calendarContainer.classList.add("open"),t._input.classList.add("active"),Ft("onOpen"),dr(Z)),t.config.enableTime===!0&&t.config.noCalendar===!0&&t.config.allowInput===!1&&(K===void 0||!t.timeContainer.contains(K.relatedTarget))&&setTimeout(function(){return t.hourElement.select()},50)}function Ke(K){return function(Z){var ie=t.config["_"+K+"Date"]=t.parseDate(Z,t.config.dateFormat),be=t.config["_"+(K==="min"?"max":"min")+"Date"];ie!==void 0&&(t[K==="min"?"minDateHasTime":"maxDateHasTime"]=ie.getHours()>0||ie.getMinutes()>0||ie.getSeconds()>0),t.selectedDates&&(t.selectedDates=t.selectedDates.filter(function(Oe){return Ht(Oe)}),!t.selectedDates.length&&K==="min"&&S(ie),Wn()),t.daysContainer&&(Et(),ie!==void 0?t.currentYearElement[K]=ie.getFullYear().toString():t.currentYearElement.removeAttribute(K),t.currentYearElement.disabled=!!be&&ie!==void 0&&be.getFullYear()===ie.getFullYear())}}function me(){var K=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],Z=Vc(Vc({},JSON.parse(JSON.stringify(r.dataset||{}))),e),ie={};t.config.parseDate=Z.parseDate,t.config.formatDate=Z.formatDate,Object.defineProperty(t.config,"enable",{get:function(){return t.config._enable},set:function(Dt){t.config._enable=Yt(Dt)}}),Object.defineProperty(t.config,"disable",{get:function(){return t.config._disable},set:function(Dt){t.config._disable=Yt(Dt)}});var be=Z.mode==="time";if(!Z.dateFormat&&(Z.enableTime||be)){var Oe=Ul.defaultConfig.dateFormat||Lb.dateFormat;ie.dateFormat=Z.noCalendar||be?"H:i"+(Z.enableSeconds?":S":""):Oe+" H:i"+(Z.enableSeconds?":S":"")}if(Z.altInput&&(Z.enableTime||be)&&!Z.altFormat){var je=Ul.defaultConfig.altFormat||Lb.altFormat;ie.altFormat=Z.noCalendar||be?"h:i"+(Z.enableSeconds?":S K":" K"):je+(" h:i"+(Z.enableSeconds?":S":"")+" K")}Object.defineProperty(t.config,"minDate",{get:function(){return t.config._minDate},set:Ke("min")}),Object.defineProperty(t.config,"maxDate",{get:function(){return t.config._maxDate},set:Ke("max")});var et=function(Dt){return function(jt){t.config[Dt==="min"?"_minTime":"_maxTime"]=t.parseDate(jt,"H:i:S")}};Object.defineProperty(t.config,"minTime",{get:function(){return t.config._minTime},set:et("min")}),Object.defineProperty(t.config,"maxTime",{get:function(){return t.config._maxTime},set:et("max")}),Z.mode==="time"&&(t.config.noCalendar=!0,t.config.enableTime=!0),Object.assign(t.config,ie,Z);for(var Ee=0;Ee<K.length;Ee++)t.config[K[Ee]]=t.config[K[Ee]]===!0||t.config[K[Ee]]==="true";iq.filter(function(Dt){return t.config[Dt]!==void 0}).forEach(function(Dt){t.config[Dt]=sq(t.config[Dt]||[]).map(a)}),t.isMobile=!t.config.disableMobile&&!t.config.inline&&t.config.mode==="single"&&!t.config.disable.length&&!t.config.enable&&!t.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(var Ee=0;Ee<t.config.plugins.length;Ee++){var Ue=t.config.plugins[Ee](t)||{};for(var ot in Ue)iq.indexOf(ot)>-1?t.config[ot]=sq(Ue[ot]).map(a).concat(t.config[ot]):typeof Z[ot]>"u"&&(t.config[ot]=Ue[ot])}Z.altInputClass||(t.config.altInputClass=De().className+" "+t.config.altInputClass),Ft("onParseConfig")}function De(){return t.config.wrap?r.querySelector("[data-input]"):r}function ze(){typeof t.config.locale!="object"&&typeof Ul.l10ns[t.config.locale]>"u"&&t.config.errorHandler(new Error("flatpickr: invalid locale "+t.config.locale)),t.l10n=Vc(Vc({},Ul.l10ns.default),typeof t.config.locale=="object"?t.config.locale:t.config.locale!=="default"?Ul.l10ns[t.config.locale]:void 0),Ov.D="("+t.l10n.weekdays.shorthand.join("|")+")",Ov.l="("+t.l10n.weekdays.longhand.join("|")+")",Ov.M="("+t.l10n.months.shorthand.join("|")+")",Ov.F="("+t.l10n.months.longhand.join("|")+")",Ov.K="("+t.l10n.amPM[0]+"|"+t.l10n.amPM[1]+"|"+t.l10n.amPM[0].toLowerCase()+"|"+t.l10n.amPM[1].toLowerCase()+")";var K=Vc(Vc({},e),JSON.parse(JSON.stringify(r.dataset||{})));K.time_24hr===void 0&&Ul.defaultConfig.time_24hr===void 0&&(t.config.time_24hr=t.l10n.time_24hr),t.formatDate=l7(t),t.parseDate=lq({config:t.config,l10n:t.l10n})}function dr(K){if(typeof t.config.position=="function")return void t.config.position(t,K);if(t.calendarContainer!==void 0){Ft("onPreCalendarPosition");var Z=K||t._positionElement,ie=Array.prototype.reduce.call(t.calendarContainer.children,(function(er,qr){return er+qr.offsetHeight}),0),be=t.calendarContainer.offsetWidth,Oe=t.config.position.split(" "),je=Oe[0],et=Oe.length>1?Oe[1]:null,Ee=Z.getBoundingClientRect(),Ue=window.innerHeight-Ee.bottom,ot=je==="above"||je!=="below"&&Ue<ie&&Ee.top>ie,Dt=window.pageYOffset+Ee.top+(ot?-ie-2:Z.offsetHeight+2);if(jc(t.calendarContainer,"arrowTop",!ot),jc(t.calendarContainer,"arrowBottom",ot),!t.config.inline){var jt=window.pageXOffset+Ee.left,It=!1,Gt=!1;et==="center"?(jt-=(be-Ee.width)/2,It=!0):et==="right"&&(jt-=be-Ee.width,Gt=!0),jc(t.calendarContainer,"arrowLeft",!It&&!Gt),jc(t.calendarContainer,"arrowCenter",It),jc(t.calendarContainer,"arrowRight",Gt);var kr=window.document.body.offsetWidth-(window.pageXOffset+Ee.right),cr=jt+be>window.document.body.offsetWidth,Ot=kr+be>window.document.body.offsetWidth;if(jc(t.calendarContainer,"rightMost",cr),!t.config.static)if(t.calendarContainer.style.top=Dt+"px",!cr)t.calendarContainer.style.left=jt+"px",t.calendarContainer.style.right="auto";else if(!Ot)t.calendarContainer.style.left="auto",t.calendarContainer.style.right=kr+"px";else{var xr=lt();if(xr===void 0)return;var lr=window.document.body.offsetWidth,hr=Math.max(0,lr/2-be/2),Sn=".flatpickr-calendar.centerMost:before",Sr=".flatpickr-calendar.centerMost:after",Ve=xr.cssRules.length,ar="{left:"+Ee.left+"px;right:auto;}";jc(t.calendarContainer,"rightMost",!1),jc(t.calendarContainer,"centerMost",!0),xr.insertRule(Sn+","+Sr+ar,Ve),t.calendarContainer.style.left=hr+"px",t.calendarContainer.style.right="auto"}}}}function lt(){for(var K=null,Z=0;Z<document.styleSheets.length;Z++){var ie=document.styleSheets[Z];if(ie.cssRules){try{ie.cssRules}catch{continue}K=ie;break}}return K??Ut()}function Ut(){var K=document.createElement("style");return document.head.appendChild(K),K.sheet}function Et(){t.config.noCalendar||t.isMobile||(U(),Cn(),z())}function Br(){t._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(t.close,0):t.close()}function ur(K){K.preventDefault(),K.stopPropagation();var Z=function(Dt){return Dt.classList&&Dt.classList.contains("flatpickr-day")&&!Dt.classList.contains("flatpickr-disabled")&&!Dt.classList.contains("notAllowed")},ie=a7(kf(K),Z);if(ie!==void 0){var be=ie,Oe=t.latestSelectedDateObj=new Date(be.dateObj.getTime()),je=(Oe.getMonth()<t.currentMonth||Oe.getMonth()>t.currentMonth+t.config.showMonths-1)&&t.config.mode!=="range";if(t.selectedDateElem=be,t.config.mode==="single")t.selectedDates=[Oe];else if(t.config.mode==="multiple"){var et=br(Oe);et?t.selectedDates.splice(parseInt(et),1):t.selectedDates.push(Oe)}else t.config.mode==="range"&&(t.selectedDates.length===2&&t.clear(!1,!1),t.latestSelectedDateObj=Oe,t.selectedDates.push(Oe),Ef(Oe,t.selectedDates[0],!0)!==0&&t.selectedDates.sort(function(Dt,jt){return Dt.getTime()-jt.getTime()}));if(x(),je){var Ee=t.currentYear!==Oe.getFullYear();t.currentYear=Oe.getFullYear(),t.currentMonth=Oe.getMonth(),Ee&&(Ft("onYearChange"),U()),Ft("onMonthChange")}if(Cn(),z(),Wn(),!je&&t.config.mode!=="range"&&t.config.showMonths===1?oe(be):t.selectedDateElem!==void 0&&t.hourElement===void 0&&t.selectedDateElem&&t.selectedDateElem.focus(),t.hourElement!==void 0&&t.hourElement!==void 0&&t.hourElement.focus(),t.config.closeOnSelect){var Ue=t.config.mode==="single"&&!t.config.enableTime,ot=t.config.mode==="range"&&t.selectedDates.length===2&&!t.config.enableTime;(Ue||ot)&&Br()}R()}}var Tr={locale:[ze,Me],showMonths:[Ie,l,he],minDate:[$],maxDate:[$],positionElement:[gi],clickOpens:[function(){t.config.clickOpens===!0?(L(t._input,"focus",t.open),L(t._input,"click",t.open)):(t._input.removeEventListener("focus",t.open),t._input.removeEventListener("click",t.open))}]};function wr(K,Z){if(K!==null&&typeof K=="object"){Object.assign(t.config,K);for(var ie in K)Tr[ie]!==void 0&&Tr[ie].forEach(function(be){return be()})}else t.config[K]=Z,Tr[K]!==void 0?Tr[K].forEach(function(be){return be()}):iq.indexOf(K)>-1&&(t.config[K]=sq(Z));t.redraw(),Wn(!0)}function at(K,Z){var ie=[];if(K instanceof Array)ie=K.map(function(be){return t.parseDate(be,Z)});else if(K instanceof Date||typeof K=="number")ie=[t.parseDate(K,Z)];else if(typeof K=="string")switch(t.config.mode){case"single":case"time":ie=[t.parseDate(K,Z)];break;case"multiple":ie=K.split(t.config.conjunction).map(function(be){return t.parseDate(be,Z)});break;case"range":ie=K.split(t.l10n.rangeSeparator).map(function(be){return t.parseDate(be,Z)});break;default:break}else t.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(K)));t.selectedDates=t.config.allowInvalidPreload?ie:ie.filter(function(be){return be instanceof Date&&Ht(be,!1)}),t.config.mode==="range"&&t.selectedDates.sort(function(be,Oe){return be.getTime()-Oe.getTime()})}function rt(K,Z,ie){if(Z===void 0&&(Z=!1),ie===void 0&&(ie=t.config.dateFormat),K!==0&&!K||K instanceof Array&&K.length===0)return t.clear(Z);at(K,ie),t.latestSelectedDateObj=t.selectedDates[t.selectedDates.length-1],t.redraw(),$(void 0,Z),S(),t.selectedDates.length===0&&t.clear(!1),Wn(Z),Z&&Ft("onChange")}function Yt(K){return K.slice().map(function(Z){return typeof Z=="string"||typeof Z=="number"||Z instanceof Date?t.parseDate(Z,void 0,!0):Z&&typeof Z=="object"&&Z.from&&Z.to?{from:t.parseDate(Z.from,void 0),to:t.parseDate(Z.to,void 0)}:Z}).filter(function(Z){return Z})}function Kr(){t.selectedDates=[],t.now=t.parseDate(t.config.now)||new Date;var K=t.config.defaultDate||((t.input.nodeName==="INPUT"||t.input.nodeName==="TEXTAREA")&&t.input.placeholder&&t.input.value===t.input.placeholder?null:t.input.value);K&&at(K,t.config.dateFormat),t._initialDate=t.selectedDates.length>0?t.selectedDates[0]:t.config.minDate&&t.config.minDate.getTime()>t.now.getTime()?t.config.minDate:t.config.maxDate&&t.config.maxDate.getTime()<t.now.getTime()?t.config.maxDate:t.now,t.currentYear=t._initialDate.getFullYear(),t.currentMonth=t._initialDate.getMonth(),t.selectedDates.length>0&&(t.latestSelectedDateObj=t.selectedDates[0]),t.config.minTime!==void 0&&(t.config.minTime=t.parseDate(t.config.minTime,"H:i")),t.config.maxTime!==void 0&&(t.config.maxTime=t.parseDate(t.config.maxTime,"H:i")),t.minDateHasTime=!!t.config.minDate&&(t.config.minDate.getHours()>0||t.config.minDate.getMinutes()>0||t.config.minDate.getSeconds()>0),t.maxDateHasTime=!!t.config.maxDate&&(t.config.maxDate.getHours()>0||t.config.maxDate.getMinutes()>0||t.config.maxDate.getSeconds()>0)}function ui(){if(t.input=De(),!t.input){t.config.errorHandler(new Error("Invalid input element specified"));return}t.input._type=t.input.type,t.input.type="text",t.input.classList.add("flatpickr-input"),t._input=t.input,t.config.altInput&&(t.altInput=Zo(t.input.nodeName,t.config.altInputClass),t._input=t.altInput,t.altInput.placeholder=t.input.placeholder,t.altInput.disabled=t.input.disabled,t.altInput.required=t.input.required,t.altInput.tabIndex=t.input.tabIndex,t.altInput.type="text",t.input.setAttribute("type","hidden"),!t.config.static&&t.input.parentNode&&t.input.parentNode.insertBefore(t.altInput,t.input.nextSibling)),t.config.allowInput||t._input.setAttribute("readonly","readonly"),gi()}function gi(){t._positionElement=t.config.positionElement||t._input}function Ri(){var K=t.config.enableTime?t.config.noCalendar?"time":"datetime-local":"date";t.mobileInput=Zo("input",t.input.className+" flatpickr-mobile"),t.mobileInput.tabIndex=1,t.mobileInput.type=K,t.mobileInput.disabled=t.input.disabled,t.mobileInput.required=t.input.required,t.mobileInput.placeholder=t.input.placeholder,t.mobileFormatStr=K==="datetime-local"?"Y-m-d\\TH:i:S":K==="date"?"Y-m-d":"H:i:S",t.selectedDates.length>0&&(t.mobileInput.defaultValue=t.mobileInput.value=t.formatDate(t.selectedDates[0],t.mobileFormatStr)),t.config.minDate&&(t.mobileInput.min=t.formatDate(t.config.minDate,"Y-m-d")),t.config.maxDate&&(t.mobileInput.max=t.formatDate(t.config.maxDate,"Y-m-d")),t.input.getAttribute("step")&&(t.mobileInput.step=String(t.input.getAttribute("step"))),t.input.type="hidden",t.altInput!==void 0&&(t.altInput.type="hidden");try{t.input.parentNode&&t.input.parentNode.insertBefore(t.mobileInput,t.input.nextSibling)}catch{}L(t.mobileInput,"change",function(Z){t.setDate(kf(Z).value,!1,t.mobileFormatStr),Ft("onChange"),Ft("onClose")})}function Wt(K){if(t.isOpen===!0)return t.close();t.open(K)}function Ft(K,Z){if(t.config!==void 0){var ie=t.config[K];if(ie!==void 0&&ie.length>0)for(var be=0;ie[be]&&be<ie.length;be++)ie[be](t.selectedDates,t.input.value,t,Z);K==="onChange"&&(t.input.dispatchEvent(Pr("change")),t.input.dispatchEvent(Pr("input")))}}function Pr(K){var Z=document.createEvent("Event");return Z.initEvent(K,!0,!0),Z}function br(K){for(var Z=0;Z<t.selectedDates.length;Z++){var ie=t.selectedDates[Z];if(ie instanceof Date&&Ef(ie,K)===0)return""+Z}return!1}function wn(K){return t.config.mode!=="range"||t.selectedDates.length<2?!1:Ef(K,t.selectedDates[0])>=0&&Ef(K,t.selectedDates[1])<=0}function Cn(){t.config.noCalendar||t.isMobile||!t.monthNav||(t.yearElements.forEach(function(K,Z){var ie=new Date(t.currentYear,t.currentMonth,1);ie.setMonth(t.currentMonth+Z),t.config.showMonths>1||t.config.monthSelectorType==="static"?t.monthElements[Z].textContent=hC(ie.getMonth(),t.config.shorthandCurrentMonth,t.l10n)+" ":t.monthsDropdownContainer.value=ie.getMonth().toString(),K.value=ie.getFullYear().toString()}),t._hidePrevMonthArrow=t.config.minDate!==void 0&&(t.currentYear===t.config.minDate.getFullYear()?t.currentMonth<=t.config.minDate.getMonth():t.currentYear<t.config.minDate.getFullYear()),t._hideNextMonthArrow=t.config.maxDate!==void 0&&(t.currentYear===t.config.maxDate.getFullYear()?t.currentMonth+1>t.config.maxDate.getMonth():t.currentYear>t.config.maxDate.getFullYear()))}function On(K){var Z=K||(t.config.altInput?t.config.altFormat:t.config.dateFormat);return t.selectedDates.map(function(ie){return t.formatDate(ie,Z)}).filter(function(ie,be,Oe){return t.config.mode!=="range"||t.config.enableTime||Oe.indexOf(ie)===be}).join(t.config.mode!=="range"?t.config.conjunction:t.l10n.rangeSeparator)}function Wn(K){K===void 0&&(K=!0),t.mobileInput!==void 0&&t.mobileFormatStr&&(t.mobileInput.value=t.latestSelectedDateObj!==void 0?t.formatDate(t.latestSelectedDateObj,t.mobileFormatStr):""),t.input.value=On(t.config.dateFormat),t.altInput!==void 0&&(t.altInput.value=On(t.config.altFormat)),K!==!1&&Ft("onValueUpdate")}function uo(K){var Z=kf(K),ie=t.prevMonthNav.contains(Z),be=t.nextMonthNav.contains(Z);ie||be?se(ie?-1:1):t.yearElements.indexOf(Z)>=0?Z.select():Z.classList.contains("arrowUp")?t.changeYear(t.currentYear+1):Z.classList.contains("arrowDown")&&t.changeYear(t.currentYear-1)}function Gn(K){K.preventDefault();var Z=K.type==="keydown",ie=kf(K),be=ie;t.amPM!==void 0&&ie===t.amPM&&(t.amPM.textContent=t.l10n.amPM[Tf(t.amPM.textContent===t.l10n.amPM[0])]);var Oe=parseFloat(be.getAttribute("min")),je=parseFloat(be.getAttribute("max")),et=parseFloat(be.getAttribute("step")),Ee=parseInt(be.value,10),Ue=K.delta||(Z?K.which===38?1:-1:0),ot=Ee+et*Ue;if(typeof be.value<"u"&&be.value.length===2){var Dt=be===t.hourElement,jt=be===t.minuteElement;ot<Oe?(ot=je+ot+Tf(!Dt)+(Tf(Dt)&&Tf(!t.amPM)),jt&&G(void 0,-1,t.hourElement)):ot>je&&(ot=be===t.hourElement?ot-je-Tf(!t.amPM):Oe,jt&&G(void 0,1,t.hourElement)),t.amPM&&Dt&&(et===1?ot+Ee===23:Math.abs(ot-Ee)>et)&&(t.amPM.textContent=t.l10n.amPM[Tf(t.amPM.textContent===t.l10n.amPM[0])]),be.value=Uc(ot)}}return i(),t}function mS(r,e){for(var t=Array.prototype.slice.call(r).filter(function(a){return a instanceof HTMLElement}),n=[],i=0;i<t.length;i++){var o=t[i];try{if(o.getAttribute("data-fp-omit")!==null)continue;o._flatpickr!==void 0&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=gNt(o,e||{}),n.push(o._flatpickr)}catch(a){console.error(a)}}return n.length===1?n[0]:n}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(r){return mS(this,r)},HTMLElement.prototype.flatpickr=function(r){return mS([this],r)});var Ul=function(r,e){return typeof r=="string"?mS(window.document.querySelectorAll(r),e):r instanceof Node?mS([r],e):mS(r,e)};Ul.defaultConfig={};Ul.l10ns={en:Vc({},aq),default:Vc({},aq)};Ul.localize=function(r){Ul.l10ns.default=Vc(Vc({},Ul.l10ns.default),r)};Ul.setDefaults=function(r){Ul.defaultConfig=Vc(Vc({},Ul.defaultConfig),r)};Ul.parseDate=lq({});Ul.formatDate=l7({});Ul.compareDates=Ef;typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(r){return mS(this,r)});Date.prototype.fp_incr=function(r){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof r=="string"?parseInt(r,10):r))};typeof window<"u"&&(window.flatpickr=Ul);var gS=Ul;function vNt(r,e,t){let n=dm(t.element);n&&n.appendChild(t.calendarContainer)}function yNt(r,e,t){dm(t.element)&&requestAnimationFrame(()=>{let{calendarContainer:n}=t;n.style.top&&n.style.top!=="auto"&&(n.style.top=`${parseFloat(n.style.top)-window.pageYOffset}px`),n.style.left&&n.style.left!=="auto"&&(n.style.left=`${parseFloat(n.style.left)-window.pageXOffset}px`)})}gS.setDefaults({onReady:[vNt],onOpen:[yNt]});var Lv=class extends Error{},y7=class extends Lv{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},b7=class extends Lv{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},x7=class extends Lv{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},qb=class extends Lv{},yq=class extends Lv{constructor(e){super(`Invalid unit ${e}`)}},Ou=class extends Lv{},yg=class extends Lv{constructor(){super("Zone is an abstract class")}},bn="numeric",gm="short",hd="long",bq={year:bn,month:bn,day:bn},mIe={year:bn,month:gm,day:bn},bNt={year:bn,month:gm,day:bn,weekday:gm},gIe={year:bn,month:hd,day:bn},vIe={year:bn,month:hd,day:bn,weekday:hd},yIe={hour:bn,minute:bn},bIe={hour:bn,minute:bn,second:bn},xIe={hour:bn,minute:bn,second:bn,timeZoneName:gm},_Ie={hour:bn,minute:bn,second:bn,timeZoneName:hd},wIe={hour:bn,minute:bn,hourCycle:"h23"},SIe={hour:bn,minute:bn,second:bn,hourCycle:"h23"},TIe={hour:bn,minute:bn,second:bn,hourCycle:"h23",timeZoneName:gm},kIe={hour:bn,minute:bn,second:bn,hourCycle:"h23",timeZoneName:hd},EIe={year:bn,month:bn,day:bn,hour:bn,minute:bn},AIe={year:bn,month:bn,day:bn,hour:bn,minute:bn,second:bn},CIe={year:bn,month:gm,day:bn,hour:bn,minute:bn},DIe={year:bn,month:gm,day:bn,hour:bn,minute:bn,second:bn},xNt={year:bn,month:gm,day:bn,weekday:gm,hour:bn,minute:bn},IIe={year:bn,month:hd,day:bn,hour:bn,minute:bn,timeZoneName:gm},OIe={year:bn,month:hd,day:bn,hour:bn,minute:bn,second:bn,timeZoneName:gm},MIe={year:bn,month:hd,day:bn,weekday:hd,hour:bn,minute:bn,timeZoneName:hd},LIe={year:bn,month:hd,day:bn,weekday:hd,hour:bn,minute:bn,second:bn,timeZoneName:hd},Qx=class{get type(){throw new yg}get name(){throw new yg}get ianaName(){return this.name}get isUniversal(){throw new yg}offsetName(e,t){throw new yg}formatOffset(e,t){throw new yg}offset(e){throw new yg}equals(e){throw new yg}get isValid(){throw new yg}},u7=null,xq=class r extends Qx{static get instance(){return u7===null&&(u7=new r),u7}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return HIe(e,t,n)}formatOffset(e,t){return gC(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}},_7=new Map;function _Nt(r){let e=_7.get(r);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),_7.set(r,e)),e}var wNt={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function SNt(r,e){let t=r.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,i,o,a,l,u,f,p]=n;return[a,i,o,l,u,f,p]}function TNt(r,e){let t=r.formatToParts(e),n=[];for(let i=0;i<t.length;i++){let{type:o,value:a}=t[i],l=wNt[o];o==="era"?n[l]=a:Si(l)||(n[l]=parseInt(a,10))}return n}var c7=new Map,Nb=class r extends Qx{static create(e){let t=c7.get(e);return t===void 0&&c7.set(e,t=new r(e)),t}static resetCache(){c7.clear(),_7.clear()}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{return!1}}constructor(e){super(),this.zoneName=e,this.valid=r.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return HIe(e,t,n,this.name)}formatOffset(e,t){return gC(this.offset(e),t)}offset(e){if(!this.valid)return NaN;let t=new Date(e);if(isNaN(t))return NaN;let n=_Nt(this.name),[i,o,a,l,u,f,p]=n.formatToParts?TNt(n,t):SNt(n,t);l==="BC"&&(i=-Math.abs(i)+1);let S=Eq({year:i,month:o,day:a,hour:u===24?0:u,minute:f,second:p,millisecond:0}),C=+t,M=C%1e3;return C-=M>=0?M:1e3+M,(S-C)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}},BDe={};function kNt(r,e={}){let t=JSON.stringify([r,e]),n=BDe[t];return n||(n=new Intl.ListFormat(r,e),BDe[t]=n),n}var w7=new Map;function S7(r,e={}){let t=JSON.stringify([r,e]),n=w7.get(t);return n===void 0&&(n=new Intl.DateTimeFormat(r,e),w7.set(t,n)),n}var T7=new Map;function ENt(r,e={}){let t=JSON.stringify([r,e]),n=T7.get(t);return n===void 0&&(n=new Intl.NumberFormat(r,e),T7.set(t,n)),n}var k7=new Map;function ANt(r,e={}){let{base:t,...n}=e,i=JSON.stringify([r,n]),o=k7.get(i);return o===void 0&&(o=new Intl.RelativeTimeFormat(r,e),k7.set(i,o)),o}var dC=null;function CNt(){return dC||(dC=new Intl.DateTimeFormat().resolvedOptions().locale,dC)}var E7=new Map;function PIe(r){let e=E7.get(r);return e===void 0&&(e=new Intl.DateTimeFormat(r).resolvedOptions(),E7.set(r,e)),e}var A7=new Map;function DNt(r){let e=A7.get(r);if(!e){let t=new Intl.Locale(r);e="getWeekInfo"in t?t.getWeekInfo():t.weekInfo,"minimalDays"in e||(e={...RIe,...e}),A7.set(r,e)}return e}function INt(r){let e=r.indexOf("-x-");e!==-1&&(r=r.substring(0,e));let t=r.indexOf("-u-");if(t===-1)return[r];{let n,i;try{n=S7(r).resolvedOptions(),i=r}catch{let u=r.substring(0,t);n=S7(u).resolvedOptions(),i=u}let{numberingSystem:o,calendar:a}=n;return[i,o,a]}}function ONt(r,e,t){return(t||e)&&(r.includes("-u-")||(r+="-u"),t&&(r+=`-ca-${t}`),e&&(r+=`-nu-${e}`)),r}function MNt(r){let e=[];for(let t=1;t<=12;t++){let n=xa.utc(2009,t,1);e.push(r(n))}return e}function LNt(r){let e=[];for(let t=1;t<=7;t++){let n=xa.utc(2016,11,13+t);e.push(r(n))}return e}function hq(r,e,t,n){let i=r.listingMode();return i==="error"?null:i==="en"?t(e):n(e)}function PNt(r){return r.numberingSystem&&r.numberingSystem!=="latn"?!1:r.numberingSystem==="latn"||!r.locale||r.locale.startsWith("en")||PIe(r.locale).numberingSystem==="latn"}var C7=class{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;let{padTo:i,floor:o,...a}=n;if(!t||Object.keys(a).length>0){let l={useGrouping:!1,...n};n.padTo>0&&(l.minimumIntegerDigits=n.padTo),this.inf=ENt(e,l)}}format(e){if(this.inf){let t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{let t=this.floor?Math.floor(e):z7(e,3);return jl(t,this.padTo)}}},D7=class{constructor(e,t,n){this.opts=n,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){let a=-1*(e.offset/60),l=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;e.offset!==0&&Nb.create(l).valid?(i=l,this.dt=e):(i="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);let o={...this.opts};o.timeZone=o.timeZone||i,this.dtf=S7(t,o)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(t=>{if(t.type==="timeZoneName"){let n=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:n}}else return t}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},I7=class{constructor(e,t,n){this.opts={style:"long",...n},!t&&jIe()&&(this.rtf=ANt(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):tBt(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}},RIe={firstDay:1,minimalDays:4,weekend:[6,7]},Pa=class r{static fromOpts(e){return r.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,i,o=!1){let a=e||Ss.defaultLocale,l=a||(o?"en-US":CNt()),u=t||Ss.defaultNumberingSystem,f=n||Ss.defaultOutputCalendar,p=L7(i)||Ss.defaultWeekSettings;return new r(l,u,f,p,a)}static resetCache(){dC=null,w7.clear(),T7.clear(),k7.clear(),E7.clear(),A7.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:i}={}){return r.create(e,t,n,i)}constructor(e,t,n,i,o){let[a,l,u]=INt(e);this.locale=a,this.numberingSystem=t||l||null,this.outputCalendar=n||u||null,this.weekSettings=i,this.intl=ONt(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=o,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=PNt(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:r.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,L7(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return hq(this,e,GIe,()=>{let n=this.intl==="ja"||this.intl.startsWith("ja-");t&=!n;let i=t?{month:e,day:"numeric"}:{month:e},o=t?"format":"standalone";if(!this.monthsCache[o][e]){let a=n?l=>this.dtFormatter(l,i).format():l=>this.extract(l,i,"month");this.monthsCache[o][e]=MNt(a)}return this.monthsCache[o][e]})}weekdays(e,t=!1){return hq(this,e,ZIe,()=>{let n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=t?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=LNt(o=>this.extract(o,n,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return hq(this,void 0,()=>XIe,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[xa.utc(2016,11,13,9),xa.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return hq(this,e,JIe,()=>{let t={era:e};return this.eraCache[e]||(this.eraCache[e]=[xa.utc(-40,1,1),xa.utc(2017,1,1)].map(n=>this.extract(n,t,"era"))),this.eraCache[e]})}extract(e,t,n){let i=this.dtFormatter(e,t),o=i.formatToParts(),a=o.find(l=>l.type.toLowerCase()===n);return a?a.value:null}numberFormatter(e={}){return new C7(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new D7(e,this.intl,t)}relFormatter(e={}){return new I7(this.intl,this.isEnglish(),e)}listFormatter(e={}){return kNt(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||PIe(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:VIe()?DNt(this.locale):RIe}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}},h7=null,cp=class r extends Qx{static get utcInstance(){return h7===null&&(h7=new r(0)),h7}static instance(e){return e===0?r.utcInstance:new r(e)}static parseSpecifier(e){if(e){let t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new r(Aq(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${gC(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${gC(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return gC(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}},O7=class extends Qx{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 Rb(r,e){if(Si(r)||r===null)return e;if(r instanceof Qx)return r;if(zNt(r)){let t=r.toLowerCase();return t==="default"?e:t==="local"||t==="system"?xq.instance:t==="utc"||t==="gmt"?cp.utcInstance:cp.parseSpecifier(t)||Nb.create(r)}else return Fb(r)?cp.instance(r):typeof r=="object"&&"offset"in r&&typeof r.offset=="function"?r:new O7(r)}var q7={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},zDe={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]},RNt=q7.hanidec.replace(/[\[|\]]/g,"").split("");function qNt(r){let e=parseInt(r,10);if(isNaN(e)){e="";for(let t=0;t<r.length;t++){let n=r.charCodeAt(t);if(r[t].search(q7.hanidec)!==-1)e+=RNt.indexOf(r[t]);else for(let i in zDe){let[o,a]=zDe[i];n>=o&&n<=a&&(e+=n-o)}}return parseInt(e,10)}else return e}var M7=new Map;function FNt(){M7.clear()}function pm({numberingSystem:r},e=""){let t=r||"latn",n=M7.get(t);n===void 0&&(n=new Map,M7.set(t,n));let i=n.get(e);return i===void 0&&(i=new RegExp(`${q7[t]}${e}`),n.set(e,i)),i}var UDe=()=>Date.now(),jDe="system",VDe=null,HDe=null,WDe=null,$De=60,GDe,KDe=null,Ss=class{static get now(){return UDe}static set now(e){UDe=e}static set defaultZone(e){jDe=e}static get defaultZone(){return Rb(jDe,xq.instance)}static get defaultLocale(){return VDe}static set defaultLocale(e){VDe=e}static get defaultNumberingSystem(){return HDe}static set defaultNumberingSystem(e){HDe=e}static get defaultOutputCalendar(){return WDe}static set defaultOutputCalendar(e){WDe=e}static get defaultWeekSettings(){return KDe}static set defaultWeekSettings(e){KDe=L7(e)}static get twoDigitCutoffYear(){return $De}static set twoDigitCutoffYear(e){$De=e%100}static get throwOnInvalid(){return GDe}static set throwOnInvalid(e){GDe=e}static resetCaches(){Pa.resetCache(),Nb.resetCache(),xa.resetCache(),FNt()}},cd=class{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},qIe=[0,31,59,90,120,151,181,212,243,273,304,334],FIe=[0,31,60,91,121,152,182,213,244,274,305,335];function lp(r,e){return new cd("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${r}, which is invalid`)}function F7(r,e,t){let n=new Date(Date.UTC(r,e-1,t));r<100&&r>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);let i=n.getUTCDay();return i===0?7:i}function NIe(r,e,t){return t+(yC(r)?FIe:qIe)[e-1]}function BIe(r,e){let t=yC(r)?FIe:qIe,n=t.findIndex(o=>o<e),i=e-t[n];return{month:n+1,day:i}}function N7(r,e){return(r-e+7)%7+1}function _q(r,e=4,t=1){let{year:n,month:i,day:o}=r,a=NIe(n,i,o),l=N7(F7(n,i,o),t),u=Math.floor((a-l+14-e)/7),f;return u<1?(f=n-1,u=vC(f,e,t)):u>vC(n,e,t)?(f=n+1,u=1):f=n,{weekYear:f,weekNumber:u,weekday:l,...Cq(r)}}function YDe(r,e=4,t=1){let{weekYear:n,weekNumber:i,weekday:o}=r,a=N7(F7(n,1,e),t),l=_S(n),u=i*7+o-a-7+e,f;u<1?(f=n-1,u+=_S(f)):u>l?(f=n+1,u-=_S(n)):f=n;let{month:p,day:x}=BIe(f,u);return{year:f,month:p,day:x,...Cq(r)}}function f7(r){let{year:e,month:t,day:n}=r,i=NIe(e,t,n);return{year:e,ordinal:i,...Cq(r)}}function ZDe(r){let{year:e,ordinal:t}=r,{month:n,day:i}=BIe(e,t);return{year:e,month:n,day:i,...Cq(r)}}function XDe(r,e){if(!Si(r.localWeekday)||!Si(r.localWeekNumber)||!Si(r.localWeekYear)){if(!Si(r.weekday)||!Si(r.weekNumber)||!Si(r.weekYear))throw new qb("Cannot mix locale-based week fields with ISO-based week fields");return Si(r.localWeekday)||(r.weekday=r.localWeekday),Si(r.localWeekNumber)||(r.weekNumber=r.localWeekNumber),Si(r.localWeekYear)||(r.weekYear=r.localWeekYear),delete r.localWeekday,delete r.localWeekNumber,delete r.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function NNt(r,e=4,t=1){let n=kq(r.weekYear),i=up(r.weekNumber,1,vC(r.weekYear,e,t)),o=up(r.weekday,1,7);return n?i?o?!1:lp("weekday",r.weekday):lp("week",r.weekNumber):lp("weekYear",r.weekYear)}function BNt(r){let e=kq(r.year),t=up(r.ordinal,1,_S(r.year));return e?t?!1:lp("ordinal",r.ordinal):lp("year",r.year)}function zIe(r){let e=kq(r.year),t=up(r.month,1,12),n=up(r.day,1,wq(r.year,r.month));return e?t?n?!1:lp("day",r.day):lp("month",r.month):lp("year",r.year)}function UIe(r){let{hour:e,minute:t,second:n,millisecond:i}=r,o=up(e,0,23)||e===24&&t===0&&n===0&&i===0,a=up(t,0,59),l=up(n,0,59),u=up(i,0,999);return o?a?l?u?!1:lp("millisecond",i):lp("second",n):lp("minute",t):lp("hour",e)}function Si(r){return typeof r>"u"}function Fb(r){return typeof r=="number"}function kq(r){return typeof r=="number"&&r%1===0}function zNt(r){return typeof r=="string"}function UNt(r){return Object.prototype.toString.call(r)==="[object Date]"}function jIe(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function VIe(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function jNt(r){return Array.isArray(r)?r:[r]}function JDe(r,e,t){if(r.length!==0)return r.reduce((n,i)=>{let o=[e(i),i];return n&&t(n[0],o[0])===n[0]?n:o},null)[1]}function VNt(r,e){return e.reduce((t,n)=>(t[n]=r[n],t),{})}function TS(r,e){return Object.prototype.hasOwnProperty.call(r,e)}function L7(r){if(r==null)return null;if(typeof r!="object")throw new Ou("Week settings must be an object");if(!up(r.firstDay,1,7)||!up(r.minimalDays,1,7)||!Array.isArray(r.weekend)||r.weekend.some(e=>!up(e,1,7)))throw new Ou("Invalid week settings");return{firstDay:r.firstDay,minimalDays:r.minimalDays,weekend:Array.from(r.weekend)}}function up(r,e,t){return kq(r)&&r>=e&&r<=t}function HNt(r,e){return r-e*Math.floor(r/e)}function jl(r,e=2){let t=r<0,n;return t?n="-"+(""+-r).padStart(e,"0"):n=(""+r).padStart(e,"0"),n}function Pb(r){if(!(Si(r)||r===null||r===""))return parseInt(r,10)}function Zx(r){if(!(Si(r)||r===null||r===""))return parseFloat(r)}function B7(r){if(!(Si(r)||r===null||r==="")){let e=parseFloat("0."+r)*1e3;return Math.floor(e)}}function z7(r,e,t="round"){let n=10**e;switch(t){case"expand":return r>0?Math.ceil(r*n)/n:Math.floor(r*n)/n;case"trunc":return Math.trunc(r*n)/n;case"round":return Math.round(r*n)/n;case"floor":return Math.floor(r*n)/n;case"ceil":return Math.ceil(r*n)/n;default:throw new RangeError(`Value rounding ${t} is out of range`)}}function yC(r){return r%4===0&&(r%100!==0||r%400===0)}function _S(r){return yC(r)?366:365}function wq(r,e){let t=HNt(e-1,12)+1,n=r+(e-t)/12;return t===2?yC(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function Eq(r){let e=Date.UTC(r.year,r.month-1,r.day,r.hour,r.minute,r.second,r.millisecond);return r.year<100&&r.year>=0&&(e=new Date(e),e.setUTCFullYear(r.year,r.month-1,r.day)),+e}function QDe(r,e,t){return-N7(F7(r,1,e),t)+e-1}function vC(r,e=4,t=1){let n=QDe(r,e,t),i=QDe(r+1,e,t);return(_S(r)-n+i)/7}function P7(r){return r>99?r:r>Ss.twoDigitCutoffYear?1900+r:2e3+r}function HIe(r,e,t,n=null){let i=new Date(r),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(o.timeZone=n);let a={timeZoneName:e,...o},l=new Intl.DateTimeFormat(t,a).formatToParts(i).find(u=>u.type.toLowerCase()==="timezonename");return l?l.value:null}function Aq(r,e){let t=parseInt(r,10);Number.isNaN(t)&&(t=0);let n=parseInt(e,10)||0,i=t<0||Object.is(t,-0)?-n:n;return t*60+i}function WIe(r){let e=Number(r);if(typeof r=="boolean"||r===""||!Number.isFinite(e))throw new Ou(`Invalid unit value ${r}`);return e}function Sq(r,e){let t={};for(let n in r)if(TS(r,n)){let i=r[n];if(i==null)continue;t[e(n)]=WIe(i)}return t}function gC(r,e){let t=Math.trunc(Math.abs(r/60)),n=Math.trunc(Math.abs(r%60)),i=r>=0?"+":"-";switch(e){case"short":return`${i}${jl(t,2)}:${jl(n,2)}`;case"narrow":return`${i}${t}${n>0?`:${n}`:""}`;case"techie":return`${i}${jl(t,2)}${jl(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Cq(r){return VNt(r,["hour","minute","second","millisecond"])}var WNt=["January","February","March","April","May","June","July","August","September","October","November","December"],$Ie=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],$Nt=["J","F","M","A","M","J","J","A","S","O","N","D"];function GIe(r){switch(r){case"narrow":return[...$Nt];case"short":return[...$Ie];case"long":return[...WNt];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}}var KIe=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],YIe=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],GNt=["M","T","W","T","F","S","S"];function ZIe(r){switch(r){case"narrow":return[...GNt];case"short":return[...YIe];case"long":return[...KIe];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var XIe=["AM","PM"],KNt=["Before Christ","Anno Domini"],YNt=["BC","AD"],ZNt=["B","A"];function JIe(r){switch(r){case"narrow":return[...ZNt];case"short":return[...YNt];case"long":return[...KNt];default:return null}}function XNt(r){return XIe[r.hour<12?0:1]}function JNt(r,e){return ZIe(e)[r.weekday-1]}function QNt(r,e){return GIe(e)[r.month-1]}function eBt(r,e){return JIe(e)[r.year<0?0:1]}function tBt(r,e,t="always",n=!1){let i={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."]},o=["hours","minutes","seconds"].indexOf(r)===-1;if(t==="auto"&&o){let x=r==="days";switch(e){case 1:return x?"tomorrow":`next ${i[r][0]}`;case-1:return x?"yesterday":`last ${i[r][0]}`;case 0:return x?"today":`this ${i[r][0]}`}}let a=Object.is(e,-0)||e<0,l=Math.abs(e),u=l===1,f=i[r],p=n?u?f[1]:f[2]||f[1]:u?i[r][0]:r;return a?`${l} ${p} ago`:`in ${l} ${p}`}function eIe(r,e){let t="";for(let n of r)n.literal?t+=n.val:t+=e(n.val);return t}var rBt={D:bq,DD:mIe,DDD:gIe,DDDD:vIe,t:yIe,tt:bIe,ttt:xIe,tttt:_Ie,T:wIe,TT:SIe,TTT:TIe,TTTT:kIe,f:EIe,ff:CIe,fff:IIe,ffff:MIe,F:AIe,FF:DIe,FFF:OIe,FFFF:LIe},ud=class r{static create(e,t={}){return new r(e,t)}static parseFormat(e){let t=null,n="",i=!1,o=[];for(let a=0;a<e.length;a++){let l=e.charAt(a);l==="'"?((n.length>0||i)&&o.push({literal:i||/^\s+$/.test(n),val:n===""?"'":n}),t=null,n="",i=!i):i||l===t?n+=l:(n.length>0&&o.push({literal:/^\s+$/.test(n),val:n}),n=l,t=l)}return n.length>0&&o.push({literal:i||/^\s+$/.test(n),val:n}),o}static macroTokenToFormatOpts(e){return rBt[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,n=void 0){if(this.opts.forceSimple)return jl(e,t);let i={...this.opts};return t>0&&(i.padTo=t),n&&(i.signDisplay=n),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){let n=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",o=(C,M)=>this.loc.extract(e,C,M),a=C=>e.isOffsetFixed&&e.offset===0&&C.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,C.format):"",l=()=>n?XNt(e):o({hour:"numeric",hourCycle:"h12"},"dayperiod"),u=(C,M)=>n?QNt(e,C):o(M?{month:C}:{month:C,day:"numeric"},"month"),f=(C,M)=>n?JNt(e,C):o(M?{weekday:C}:{weekday:C,month:"long",day:"numeric"},"weekday"),p=C=>{let M=r.macroTokenToFormatOpts(C);return M?this.formatWithSystemDefault(e,M):C},x=C=>n?eBt(e,C):o({era:C},"era"),S=C=>{switch(C){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 l();case"d":return i?o({day:"numeric"},"day"):this.num(e.day);case"dd":return i?o({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return f("short",!0);case"cccc":return f("long",!0);case"ccccc":return f("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return f("short",!1);case"EEEE":return f("long",!1);case"EEEEE":return f("narrow",!1);case"L":return i?o({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?o({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return i?o({month:"numeric"},"month"):this.num(e.month);case"MM":return i?o({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return i?o({year:"numeric"},"year"):this.num(e.year);case"yy":return i?o({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?o({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?o({year:"numeric"},"year"):this.num(e.year,6);case"G":return x("short");case"GG":return x("long");case"GGGGG":return x("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"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);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 p(C)}};return eIe(r.parseFormat(t),S)}formatDurationFromString(e,t){let n=this.opts.signMode==="negativeLargestOnly"?-1:1,i=p=>{switch(p[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},o=(p,x)=>S=>{let C=i(S);if(C){let M=x.isNegativeDuration&&C!==x.largestUnit?n:1,L;return this.opts.signMode==="negativeLargestOnly"&&C!==x.largestUnit?L="never":this.opts.signMode==="all"?L="always":L="auto",this.num(p.get(C)*M,S.length,L)}else return S},a=r.parseFormat(t),l=a.reduce((p,{literal:x,val:S})=>x?p:p.concat(S),[]),u=e.shiftTo(...l.map(i).filter(p=>p)),f={isNegativeDuration:u<0,largestUnit:Object.keys(u.values)[0]};return eIe(a,o(u,f))}},QIe=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function kS(...r){let e=r.reduce((t,n)=>t+n.source,"");return RegExp(`^${e}$`)}function ES(...r){return e=>r.reduce(([t,n,i],o)=>{let[a,l,u]=o(e,i);return[{...t,...a},l||n,u]},[{},null,1]).slice(0,2)}function AS(r,...e){if(r==null)return[null,null];for(let[t,n]of e){let i=t.exec(r);if(i)return n(i)}return[null,null]}function eOe(...r){return(e,t)=>{let n={},i;for(i=0;i<r.length;i++)n[r[i]]=Pb(e[t+i]);return[n,null,t+i]}}var tOe=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,nBt=`(?:${tOe.source}?(?:\\[(${QIe.source})\\])?)?`,U7=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,rOe=RegExp(`${U7.source}${nBt}`),j7=RegExp(`(?:[Tt]${rOe.source})?`),iBt=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,oBt=/(\d{4})-?W(\d\d)(?:-?(\d))?/,aBt=/(\d{4})-?(\d{3})/,sBt=eOe("weekYear","weekNumber","weekDay"),lBt=eOe("year","ordinal"),uBt=/(\d{4})-(\d\d)-(\d\d)/,nOe=RegExp(`${U7.source} ?(?:${tOe.source}|(${QIe.source}))?`),cBt=RegExp(`(?: ${nOe.source})?`);function wS(r,e,t){let n=r[e];return Si(n)?t:Pb(n)}function hBt(r,e){return[{year:wS(r,e),month:wS(r,e+1,1),day:wS(r,e+2,1)},null,e+3]}function CS(r,e){return[{hours:wS(r,e,0),minutes:wS(r,e+1,0),seconds:wS(r,e+2,0),milliseconds:B7(r[e+3])},null,e+4]}function bC(r,e){let t=!r[e]&&!r[e+1],n=Aq(r[e+1],r[e+2]),i=t?null:cp.instance(n);return[{},i,e+3]}function xC(r,e){let t=r[e]?Nb.create(r[e]):null;return[{},t,e+1]}var fBt=RegExp(`^T?${U7.source}$`),dBt=/^-?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 pBt(r){let[e,t,n,i,o,a,l,u,f]=r,p=e[0]==="-",x=u&&u[0]==="-",S=(C,M=!1)=>C!==void 0&&(M||C&&p)?-C:C;return[{years:S(Zx(t)),months:S(Zx(n)),weeks:S(Zx(i)),days:S(Zx(o)),hours:S(Zx(a)),minutes:S(Zx(l)),seconds:S(Zx(u),u==="-0"),milliseconds:S(B7(f),x)}]}var mBt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function V7(r,e,t,n,i,o,a){let l={year:e.length===2?P7(Pb(e)):Pb(e),month:$Ie.indexOf(t)+1,day:Pb(n),hour:Pb(i),minute:Pb(o)};return a&&(l.second=Pb(a)),r&&(l.weekday=r.length>3?KIe.indexOf(r)+1:YIe.indexOf(r)+1),l}var gBt=/^(?:(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 vBt(r){let[,e,t,n,i,o,a,l,u,f,p,x]=r,S=V7(e,i,n,t,o,a,l),C;return u?C=mBt[u]:f?C=0:C=Aq(p,x),[S,new cp(C)]}function yBt(r){return r.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var bBt=/^(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$/,xBt=/^(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$/,_Bt=/^(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 tIe(r){let[,e,t,n,i,o,a,l]=r;return[V7(e,i,n,t,o,a,l),cp.utcInstance]}function wBt(r){let[,e,t,n,i,o,a,l]=r;return[V7(e,l,t,n,i,o,a),cp.utcInstance]}var SBt=kS(iBt,j7),TBt=kS(oBt,j7),kBt=kS(aBt,j7),EBt=kS(rOe),iOe=ES(hBt,CS,bC,xC),ABt=ES(sBt,CS,bC,xC),CBt=ES(lBt,CS,bC,xC),DBt=ES(CS,bC,xC);function IBt(r){return AS(r,[SBt,iOe],[TBt,ABt],[kBt,CBt],[EBt,DBt])}function OBt(r){return AS(yBt(r),[gBt,vBt])}function MBt(r){return AS(r,[bBt,tIe],[xBt,tIe],[_Bt,wBt])}function LBt(r){return AS(r,[dBt,pBt])}var PBt=ES(CS);function RBt(r){return AS(r,[fBt,PBt])}var qBt=kS(uBt,cBt),FBt=kS(nOe),NBt=ES(CS,bC,xC);function BBt(r){return AS(r,[qBt,iOe],[FBt,NBt])}var rIe="Invalid Duration",oOe={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},zBt={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...oOe},sp=146097/400,vS=146097/4800,UBt={years:{quarters:4,months:12,weeks:sp/7,days:sp,hours:sp*24,minutes:sp*24*60,seconds:sp*24*60*60,milliseconds:sp*24*60*60*1e3},quarters:{months:3,weeks:sp/28,days:sp/4,hours:sp*24/4,minutes:sp*24*60/4,seconds:sp*24*60*60/4,milliseconds:sp*24*60*60*1e3/4},months:{weeks:vS/7,days:vS,hours:vS*24,minutes:vS*24*60,seconds:vS*24*60*60,milliseconds:vS*24*60*60*1e3},...oOe},Jx=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],jBt=Jx.slice(0).reverse();function Mv(r,e,t=!1){let n={values:t?e.values:{...r.values,...e.values||{}},loc:r.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||r.conversionAccuracy,matrix:e.matrix||r.matrix};return new Mu(n)}function aOe(r,e){let t=e.milliseconds??0;for(let n of jBt.slice(1))e[n]&&(t+=e[n]*r[n].milliseconds);return t}function nIe(r,e){let t=aOe(r,e)<0?-1:1;Jx.reduceRight((n,i)=>{if(Si(e[i]))return n;if(n){let o=e[n]*t,a=r[i][n],l=Math.floor(o/a);e[i]+=l*t,e[n]-=l*a*t}return i},null),Jx.reduce((n,i)=>{if(Si(e[i]))return n;if(n){let o=e[n]%1;e[n]-=o,e[i]+=o*r[n][i]}return i},null)}function iIe(r){let e={};for(let[t,n]of Object.entries(r))n!==0&&(e[t]=n);return e}var Mu=class r{constructor(e){let t=e.conversionAccuracy==="longterm"||!1,n=t?UBt:zBt;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||Pa.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return r.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new Ou(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new r({values:Sq(e,r.normalizeUnit),loc:Pa.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(Fb(e))return r.fromMillis(e);if(r.isDuration(e))return e;if(typeof e=="object")return r.fromObject(e);throw new Ou(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){let[n]=LBt(e);return n?r.fromObject(n,t):r.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){let[n]=RBt(e);return n?r.fromObject(n,t):r.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new Ou("need to specify a reason the Duration is invalid");let n=e instanceof cd?e:new cd(e,t);if(Ss.throwOnInvalid)throw new x7(n);return new r({invalid:n})}static normalizeUnit(e){let 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()];if(!t)throw new yq(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={}){let n={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?ud.create(this.loc,n).formatDurationFromString(this,e):rIe}toHuman(e={}){if(!this.isValid)return rIe;let t=e.showZeros!==!1,n=Jx.map(i=>{let o=this.values[i];return Si(o)||o===0&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(o)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=z7(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},xa.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?aOe(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let t=r.fromDurationLike(e),n={};for(let i of Jx)(TS(t.values,i)||TS(this.values,i))&&(n[i]=t.get(i)+this.get(i));return Mv(this,{values:n},!0)}minus(e){if(!this.isValid)return this;let t=r.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;let t={};for(let n of Object.keys(this.values))t[n]=WIe(e(this.values[n],n));return Mv(this,{values:t},!0)}get(e){return this[r.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let t={...this.values,...Sq(e,r.normalizeUnit)};return Mv(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:i}={}){let a={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:i,conversionAccuracy:n};return Mv(this,a)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return nIe(this.matrix,e),Mv(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=iIe(this.normalize().shiftToAll().toObject());return Mv(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(a=>r.normalizeUnit(a));let t={},n={},i=this.toObject(),o;for(let a of Jx)if(e.indexOf(a)>=0){o=a;let l=0;for(let f in n)l+=this.matrix[f][a]*n[f],n[f]=0;Fb(i[a])&&(l+=i[a]);let u=Math.trunc(l);t[a]=u,n[a]=(l*1e3-u*1e3)/1e3}else Fb(i[a])&&(n[a]=i[a]);for(let a in n)n[a]!==0&&(t[o]+=a===o?n[a]:n[a]/this.matrix[o][a]);return nIe(this.matrix,t),Mv(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let e={};for(let t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Mv(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;let e=iIe(this.values);return Mv(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 this.invalid===null}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||!this.loc.equals(e.loc))return!1;function t(n,i){return n===void 0||n===0?i===void 0||i===0:n===i}for(let n of Jx)if(!t(this.values[n],e.values[n]))return!1;return!0}},yS="Invalid Interval";function VBt(r,e){return!r||!r.isValid?SS.invalid("missing or invalid start"):!e||!e.isValid?SS.invalid("missing or invalid end"):e<r?SS.invalid("end before start",`The end of an interval must be after its start, but you had start=${r.toISO()} and end=${e.toISO()}`):null}var SS=class r{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 Ou("need to specify a reason the Interval is invalid");let n=e instanceof cd?e:new cd(e,t);if(Ss.throwOnInvalid)throw new b7(n);return new r({invalid:n})}static fromDateTimes(e,t){let n=fC(e),i=fC(t),o=VBt(n,i);return o??new r({start:n,end:i})}static after(e,t){let n=Mu.fromDurationLike(t),i=fC(e);return r.fromDateTimes(i,i.plus(n))}static before(e,t){let n=Mu.fromDurationLike(t),i=fC(e);return r.fromDateTimes(i.minus(n),i)}static fromISO(e,t){let[n,i]=(e||"").split("/",2);if(n&&i){let o,a;try{o=xa.fromISO(n,t),a=o.isValid}catch{a=!1}let l,u;try{l=xa.fromISO(i,t),u=l.isValid}catch{u=!1}if(a&&u)return r.fromDateTimes(o,l);if(a){let f=Mu.fromISO(i,t);if(f.isValid)return r.after(o,f)}else if(u){let f=Mu.fromISO(n,t);if(f.isValid)return r.before(l,f)}}return r.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 lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}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",t){if(!this.isValid)return NaN;let n=this.start.startOf(e,t),i;return t?.useLocaleWeeks?i=this.end.reconfigure({locale:n.locale}):i=this.end,i=i.startOf(e,t),Math.floor(i.diff(n,e).get(e))+(i.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?r.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];let t=e.map(fC).filter(a=>this.contains(a)).sort((a,l)=>a.toMillis()-l.toMillis()),n=[],{s:i}=this,o=0;for(;i<this.e;){let a=t[o]||this.e,l=+a>+this.e?this.e:a;n.push(r.fromDateTimes(i,l)),i=l,o+=1}return n}splitBy(e){let t=Mu.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:n}=this,i=1,o,a=[];for(;n<this.e;){let l=this.start.plus(t.mapUnits(u=>u*i));o=+l>+this.e?this.e:l,a.push(r.fromDateTimes(n,o)),n=o,i+=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:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;let t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:r.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;let t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return r.fromDateTimes(t,n)}static merge(e){let[t,n]=e.sort((i,o)=>i.s-o.s).reduce(([i,o],a)=>o?o.overlaps(a)||o.abutsStart(a)?[i,o.union(a)]:[i.concat([o]),a]:[i,a],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0,i=[],o=e.map(u=>[{time:u.s,type:"s"},{time:u.e,type:"e"}]),a=Array.prototype.concat(...o),l=a.sort((u,f)=>u.time-f.time);for(let u of l)n+=u.type==="s"?1:-1,n===1?t=u.time:(t&&+t!=+u.time&&i.push(r.fromDateTimes(t,u.time)),t=null);return r.merge(i)}difference(...e){return r.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:yS}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=bq,t={}){return this.isValid?ud.create(this.s.loc.clone(t),e).formatInterval(this):yS}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:yS}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:yS}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:yS}toFormat(e,{separator:t=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:yS}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Mu.invalid(this.invalidReason)}mapEndpoints(e){return r.fromDateTimes(e(this.s),e(this.e))}},xS=class{static hasDST(e=Ss.defaultZone){let t=xa.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return Nb.isValidZone(e)}static normalizeZone(e){return Rb(e,Ss.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||Pa.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||Pa.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||Pa.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null,outputCalendar:o="gregory"}={}){return(i||Pa.create(t,n,o)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null,outputCalendar:o="gregory"}={}){return(i||Pa.create(t,n,o)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null}={}){return(i||Pa.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null}={}){return(i||Pa.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Pa.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Pa.create(t,null,"gregory").eras(e)}static features(){return{relative:jIe(),localeWeek:VIe()}}};function oIe(r,e){let t=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=t(e)-t(r);return Math.floor(Mu.fromMillis(n).as("days"))}function HBt(r,e,t){let n=[["years",(u,f)=>f.year-u.year],["quarters",(u,f)=>f.quarter-u.quarter+(f.year-u.year)*4],["months",(u,f)=>f.month-u.month+(f.year-u.year)*12],["weeks",(u,f)=>{let p=oIe(u,f);return(p-p%7)/7}],["days",oIe]],i={},o=r,a,l;for(let[u,f]of n)t.indexOf(u)>=0&&(a=u,i[u]=f(r,e),l=o.plus(i),l>e?(i[u]--,r=o.plus(i),r>e&&(l=r,i[u]--,r=o.plus(i))):r=l);return[r,i,l,a]}function WBt(r,e,t,n){let[i,o,a,l]=HBt(r,e,t),u=e-i,f=t.filter(x=>["hours","minutes","seconds","milliseconds"].indexOf(x)>=0);f.length===0&&(a<e&&(a=i.plus({[l]:1})),a!==i&&(o[l]=(o[l]||0)+u/(a-i)));let p=Mu.fromObject(o,n);return f.length>0?Mu.fromMillis(u,n).shiftTo(...f).plus(p):p}var $Bt="missing Intl.DateTimeFormat.formatToParts support";function oa(r,e=t=>t){return{regex:r,deser:([t])=>e(qNt(t))}}var GBt="\xA0",sOe=`[ ${GBt}]`,lOe=new RegExp(sOe,"g");function KBt(r){return r.replace(/\./g,"\\.?").replace(lOe,sOe)}function aIe(r){return r.replace(/\./g,"").replace(lOe," ").toLowerCase()}function mm(r,e){return r===null?null:{regex:RegExp(r.map(KBt).join("|")),deser:([t])=>r.findIndex(n=>aIe(t)===aIe(n))+e}}function sIe(r,e){return{regex:r,deser:([,t,n])=>Aq(t,n),groups:e}}function fq(r){return{regex:r,deser:([e])=>e}}function YBt(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function ZBt(r,e){let t=pm(e),n=pm(e,"{2}"),i=pm(e,"{3}"),o=pm(e,"{4}"),a=pm(e,"{6}"),l=pm(e,"{1,2}"),u=pm(e,"{1,3}"),f=pm(e,"{1,6}"),p=pm(e,"{1,9}"),x=pm(e,"{2,4}"),S=pm(e,"{4,6}"),C=R=>({regex:RegExp(YBt(R.val)),deser:([H])=>H,literal:!0}),L=(R=>{if(r.literal)return C(R);switch(R.val){case"G":return mm(e.eras("short"),0);case"GG":return mm(e.eras("long"),0);case"y":return oa(f);case"yy":return oa(x,P7);case"yyyy":return oa(o);case"yyyyy":return oa(S);case"yyyyyy":return oa(a);case"M":return oa(l);case"MM":return oa(n);case"MMM":return mm(e.months("short",!0),1);case"MMMM":return mm(e.months("long",!0),1);case"L":return oa(l);case"LL":return oa(n);case"LLL":return mm(e.months("short",!1),1);case"LLLL":return mm(e.months("long",!1),1);case"d":return oa(l);case"dd":return oa(n);case"o":return oa(u);case"ooo":return oa(i);case"HH":return oa(n);case"H":return oa(l);case"hh":return oa(n);case"h":return oa(l);case"mm":return oa(n);case"m":return oa(l);case"q":return oa(l);case"qq":return oa(n);case"s":return oa(l);case"ss":return oa(n);case"S":return oa(u);case"SSS":return oa(i);case"u":return fq(p);case"uu":return fq(l);case"uuu":return oa(t);case"a":return mm(e.meridiems(),0);case"kkkk":return oa(o);case"kk":return oa(x,P7);case"W":return oa(l);case"WW":return oa(n);case"E":case"c":return oa(t);case"EEE":return mm(e.weekdays("short",!1),1);case"EEEE":return mm(e.weekdays("long",!1),1);case"ccc":return mm(e.weekdays("short",!0),1);case"cccc":return mm(e.weekdays("long",!0),1);case"Z":case"ZZ":return sIe(new RegExp(`([+-]${l.source})(?::(${n.source}))?`),2);case"ZZZ":return sIe(new RegExp(`([+-]${l.source})(${n.source})?`),2);case"z":return fq(/[a-z_+-/]{1,256}?/i);case" ":return fq(/[^\S\n\r]/);default:return C(R)}})(r)||{invalidReason:$Bt};return L.token=r,L}var XBt={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",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function JBt(r,e,t){let{type:n,value:i}=r;if(n==="literal"){let u=/^\s+$/.test(i);return{literal:!u,val:u?" ":i}}let o=e[n],a=n;n==="hour"&&(e.hour12!=null?a=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?a="hour12":a="hour24":a=t.hour12?"hour12":"hour24");let l=XBt[a];if(typeof l=="object"&&(l=l[o]),l)return{literal:!1,val:l}}function QBt(r){return[`^${r.map(t=>t.regex).reduce((t,n)=>`${t}(${n.source})`,"")}$`,r]}function ezt(r,e,t){let n=r.match(e);if(n){let i={},o=1;for(let a in t)if(TS(t,a)){let l=t[a],u=l.groups?l.groups+1:1;!l.literal&&l.token&&(i[l.token.val[0]]=l.deser(n.slice(o,o+u))),o+=u}return[n,i]}else return[n,{}]}function tzt(r){let e=o=>{switch(o){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}},t=null,n;return Si(r.z)||(t=Nb.create(r.z)),Si(r.Z)||(t||(t=new cp(r.Z)),n=r.Z),Si(r.q)||(r.M=(r.q-1)*3+1),Si(r.h)||(r.h<12&&r.a===1?r.h+=12:r.h===12&&r.a===0&&(r.h=0)),r.G===0&&r.y&&(r.y=-r.y),Si(r.u)||(r.S=B7(r.u)),[Object.keys(r).reduce((o,a)=>{let l=e(a);return l&&(o[l]=r[a]),o},{}),t,n]}var d7=null;function rzt(){return d7||(d7=xa.fromMillis(1555555555555)),d7}function nzt(r,e){if(r.literal)return r;let t=ud.macroTokenToFormatOpts(r.val),n=hOe(t,e);return n==null||n.includes(void 0)?r:n}function uOe(r,e){return Array.prototype.concat(...r.map(t=>nzt(t,e)))}var Tq=class{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=uOe(ud.parseFormat(t),e),this.units=this.tokens.map(n=>ZBt(n,e)),this.disqualifyingUnit=this.units.find(n=>n.invalidReason),!this.disqualifyingUnit){let[n,i]=QBt(this.units);this.regex=RegExp(n,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){let[t,n]=ezt(e,this.regex,this.handlers),[i,o,a]=n?tzt(n):[null,null,void 0];if(TS(n,"a")&&TS(n,"H"))throw new qb("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:i,zone:o,specificOffset:a}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function cOe(r,e,t){return new Tq(r,t).explainFromTokens(e)}function izt(r,e,t){let{result:n,zone:i,specificOffset:o,invalidReason:a}=cOe(r,e,t);return[n,i,o,a]}function hOe(r,e){if(!r)return null;let n=ud.create(e,r).dtFormatter(rzt()),i=n.formatToParts(),o=n.resolvedOptions();return i.map(a=>JBt(a,r,o))}var p7="Invalid DateTime",lIe=864e13;function pC(r){return new cd("unsupported zone",`the zone "${r.name}" is not supported`)}function m7(r){return r.weekData===null&&(r.weekData=_q(r.c)),r.weekData}function g7(r){return r.localWeekData===null&&(r.localWeekData=_q(r.c,r.loc.getMinDaysInFirstWeek(),r.loc.getStartOfWeek())),r.localWeekData}function Xx(r,e){let t={ts:r.ts,zone:r.zone,c:r.c,o:r.o,loc:r.loc,invalid:r.invalid};return new xa({...t,...e,old:t})}function fOe(r,e,t){let n=r-e*60*1e3,i=t.offset(n);if(e===i)return[n,e];n-=(i-e)*60*1e3;let o=t.offset(n);return i===o?[n,i]:[r-Math.min(i,o)*60*1e3,Math.max(i,o)]}function dq(r,e){r+=e*60*1e3;let t=new Date(r);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function mq(r,e,t){return fOe(Eq(r),e,t)}function uIe(r,e){let t=r.o,n=r.c.year+Math.trunc(e.years),i=r.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,o={...r.c,year:n,month:i,day:Math.min(r.c.day,wq(n,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},a=Mu.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),l=Eq(o),[u,f]=fOe(l,t,r.zone);return a!==0&&(u+=a,f=r.zone.offset(u)),{ts:u,o:f}}function bS(r,e,t,n,i,o){let{setZone:a,zone:l}=t;if(r&&Object.keys(r).length!==0||e){let u=e||l,f=xa.fromObject(r,{...t,zone:u,specificOffset:o});return a?f:f.setZone(l)}else return xa.invalid(new cd("unparsable",`the input "${i}" can't be parsed as ${n}`))}function pq(r,e,t=!0){return r.isValid?ud.create(Pa.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(r,e):null}function v7(r,e,t){let n=r.c.year>9999||r.c.year<0,i="";if(n&&r.c.year>=0&&(i+="+"),i+=jl(r.c.year,n?6:4),t==="year")return i;if(e){if(i+="-",i+=jl(r.c.month),t==="month")return i;i+="-"}else if(i+=jl(r.c.month),t==="month")return i;return i+=jl(r.c.day),i}function cIe(r,e,t,n,i,o,a){let l=!t||r.c.millisecond!==0||r.c.second!==0,u="";switch(a){case"day":case"month":case"year":break;default:if(u+=jl(r.c.hour),a==="hour")break;if(e){if(u+=":",u+=jl(r.c.minute),a==="minute")break;l&&(u+=":",u+=jl(r.c.second))}else{if(u+=jl(r.c.minute),a==="minute")break;l&&(u+=jl(r.c.second))}if(a==="second")break;l&&(!n||r.c.millisecond!==0)&&(u+=".",u+=jl(r.c.millisecond,3))}return i&&(r.isOffsetFixed&&r.offset===0&&!o?u+="Z":r.o<0?(u+="-",u+=jl(Math.trunc(-r.o/60)),u+=":",u+=jl(Math.trunc(-r.o%60))):(u+="+",u+=jl(Math.trunc(r.o/60)),u+=":",u+=jl(Math.trunc(r.o%60)))),o&&(u+="["+r.zone.ianaName+"]"),u}var dOe={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ozt={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},azt={ordinal:1,hour:0,minute:0,second:0,millisecond:0},gq=["year","month","day","hour","minute","second","millisecond"],szt=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],lzt=["year","ordinal","hour","minute","second","millisecond"];function vq(r){let e={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"}[r.toLowerCase()];if(!e)throw new yq(r);return e}function hIe(r){switch(r.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return vq(r)}}function uzt(r){if(mC===void 0&&(mC=Ss.now()),r.type!=="iana")return r.offset(mC);let e=r.name,t=R7.get(e);return t===void 0&&(t=r.offset(mC),R7.set(e,t)),t}function fIe(r,e){let t=Rb(e.zone,Ss.defaultZone);if(!t.isValid)return xa.invalid(pC(t));let n=Pa.fromObject(e),i,o;if(Si(r.year))i=Ss.now();else{for(let u of gq)Si(r[u])&&(r[u]=dOe[u]);let a=zIe(r)||UIe(r);if(a)return xa.invalid(a);let l=uzt(t);[i,o]=mq(r,l,t)}return new xa({ts:i,zone:t,loc:n,o})}function dIe(r,e,t){let n=Si(t.round)?!0:t.round,i=Si(t.rounding)?"trunc":t.rounding,o=(l,u)=>(l=z7(l,n||t.calendary?0:2,t.calendary?"round":i),e.loc.clone(t).relFormatter(t).format(l,u)),a=l=>t.calendary?e.hasSame(r,l)?0:e.startOf(l).diff(r.startOf(l),l).get(l):e.diff(r,l).get(l);if(t.unit)return o(a(t.unit),t.unit);for(let l of t.units){let u=a(l);if(Math.abs(u)>=1)return o(u,l)}return o(r>e?-0:0,t.units[t.units.length-1])}function pIe(r){let e={},t;return r.length>0&&typeof r[r.length-1]=="object"?(e=r[r.length-1],t=Array.from(r).slice(0,r.length-1)):t=Array.from(r),[e,t]}var mC,R7=new Map,xa=class r{constructor(e){let t=e.zone||Ss.defaultZone,n=e.invalid||(Number.isNaN(e.ts)?new cd("invalid input"):null)||(t.isValid?null:pC(t));this.ts=Si(e.ts)?Ss.now():e.ts;let i=null,o=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[i,o]=[e.old.c,e.old.o];else{let l=Fb(e.o)&&!e.old?e.o:t.offset(this.ts);i=dq(this.ts,l),n=Number.isNaN(i.year)?new cd("invalid input"):null,i=n?null:i,o=n?null:l}this._zone=t,this.loc=e.loc||Pa.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=i,this.o=o,this.isLuxonDateTime=!0}static now(){return new r({})}static local(){let[e,t]=pIe(arguments),[n,i,o,a,l,u,f]=t;return fIe({year:n,month:i,day:o,hour:a,minute:l,second:u,millisecond:f},e)}static utc(){let[e,t]=pIe(arguments),[n,i,o,a,l,u,f]=t;return e.zone=cp.utcInstance,fIe({year:n,month:i,day:o,hour:a,minute:l,second:u,millisecond:f},e)}static fromJSDate(e,t={}){let n=UNt(e)?e.valueOf():NaN;if(Number.isNaN(n))return r.invalid("invalid input");let i=Rb(t.zone,Ss.defaultZone);return i.isValid?new r({ts:n,zone:i,loc:Pa.fromObject(t)}):r.invalid(pC(i))}static fromMillis(e,t={}){if(Fb(e))return e<-lIe||e>lIe?r.invalid("Timestamp out of range"):new r({ts:e,zone:Rb(t.zone,Ss.defaultZone),loc:Pa.fromObject(t)});throw new Ou(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(Fb(e))return new r({ts:e*1e3,zone:Rb(t.zone,Ss.defaultZone),loc:Pa.fromObject(t)});throw new Ou("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};let n=Rb(t.zone,Ss.defaultZone);if(!n.isValid)return r.invalid(pC(n));let i=Pa.fromObject(t),o=Sq(e,hIe),{minDaysInFirstWeek:a,startOfWeek:l}=XDe(o,i),u=Ss.now(),f=Si(t.specificOffset)?n.offset(u):t.specificOffset,p=!Si(o.ordinal),x=!Si(o.year),S=!Si(o.month)||!Si(o.day),C=x||S,M=o.weekYear||o.weekNumber;if((C||p)&&M)throw new qb("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(S&&p)throw new qb("Can't mix ordinal dates with month/day");let L=M||o.weekday&&!C,R,H,$=dq(u,f);L?(R=szt,H=ozt,$=_q($,a,l)):p?(R=lzt,H=azt,$=f7($)):(R=gq,H=dOe);let Q=!1;for(let Pe of R){let ke=o[Pe];Si(ke)?Q?o[Pe]=H[Pe]:o[Pe]=$[Pe]:Q=!0}let G=L?NNt(o,a,l):p?BNt(o):zIe(o),te=G||UIe(o);if(te)return r.invalid(te);let fe=L?YDe(o,a,l):p?ZDe(o):o,[oe,ve]=mq(fe,f,n),xe=new r({ts:oe,zone:n,o:ve,loc:i});return o.weekday&&C&&e.weekday!==xe.weekday?r.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${xe.toISO()}`):xe.isValid?xe:r.invalid(xe.invalid)}static fromISO(e,t={}){let[n,i]=IBt(e);return bS(n,i,t,"ISO 8601",e)}static fromRFC2822(e,t={}){let[n,i]=OBt(e);return bS(n,i,t,"RFC 2822",e)}static fromHTTP(e,t={}){let[n,i]=MBt(e);return bS(n,i,t,"HTTP",t)}static fromFormat(e,t,n={}){if(Si(e)||Si(t))throw new Ou("fromFormat requires an input string and a format");let{locale:i=null,numberingSystem:o=null}=n,a=Pa.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0}),[l,u,f,p]=izt(a,e,t);return p?r.invalid(p):bS(l,u,n,`format ${t}`,e,f)}static fromString(e,t,n={}){return r.fromFormat(e,t,n)}static fromSQL(e,t={}){let[n,i]=BBt(e);return bS(n,i,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new Ou("need to specify a reason the DateTime is invalid");let n=e instanceof cd?e:new cd(e,t);if(Ss.throwOnInvalid)throw new y7(n);return new r({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){let n=hOe(e,Pa.fromObject(t));return n?n.map(i=>i?i.val:null).join(""):null}static expandFormat(e,t={}){return uOe(ud.parseFormat(e),Pa.fromObject(t)).map(i=>i.val).join("")}static resetCache(){mC=void 0,R7.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}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?m7(this).weekYear:NaN}get weekNumber(){return this.isValid?m7(this).weekNumber:NaN}get weekday(){return this.isValid?m7(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?g7(this).weekday:NaN}get localWeekNumber(){return this.isValid?g7(this).weekNumber:NaN}get localWeekYear(){return this.isValid?g7(this).weekYear:NaN}get ordinal(){return this.isValid?f7(this.c).ordinal:NaN}get monthShort(){return this.isValid?xS.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?xS.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?xS.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?xS.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?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,t=6e4,n=Eq(this.c),i=this.zone.offset(n-e),o=this.zone.offset(n+e),a=this.zone.offset(n-i*t),l=this.zone.offset(n-o*t);if(a===l)return[this];let u=n-a*t,f=n-l*t,p=dq(u,a),x=dq(f,l);return p.hour===x.hour&&p.minute===x.minute&&p.second===x.second&&p.millisecond===x.millisecond?[Xx(this,{ts:u}),Xx(this,{ts:f})]:[this]}get isInLeapYear(){return yC(this.year)}get daysInMonth(){return wq(this.year,this.month)}get daysInYear(){return this.isValid?_S(this.year):NaN}get weeksInWeekYear(){return this.isValid?vC(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?vC(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:t,numberingSystem:n,calendar:i}=ud.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:i}}toUTC(e=0,t={}){return this.setZone(cp.instance(e),t)}toLocal(){return this.setZone(Ss.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if(e=Rb(e,Ss.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(t||n){let o=e.offset(this.ts),a=this.toObject();[i]=mq(a,o,e)}return Xx(this,{ts:i,zone:e})}else return r.invalid(pC(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){let i=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n});return Xx(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let t=Sq(e,hIe),{minDaysInFirstWeek:n,startOfWeek:i}=XDe(t,this.loc),o=!Si(t.weekYear)||!Si(t.weekNumber)||!Si(t.weekday),a=!Si(t.ordinal),l=!Si(t.year),u=!Si(t.month)||!Si(t.day),f=l||u,p=t.weekYear||t.weekNumber;if((f||a)&&p)throw new qb("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&a)throw new qb("Can't mix ordinal dates with month/day");let x;o?x=YDe({..._q(this.c,n,i),...t},n,i):Si(t.ordinal)?(x={...this.toObject(),...t},Si(t.day)&&(x.day=Math.min(wq(x.year,x.month),x.day))):x=ZDe({...f7(this.c),...t});let[S,C]=mq(x,this.o,this.zone);return Xx(this,{ts:S,o:C})}plus(e){if(!this.isValid)return this;let t=Mu.fromDurationLike(e);return Xx(this,uIe(this,t))}minus(e){if(!this.isValid)return this;let t=Mu.fromDurationLike(e).negate();return Xx(this,uIe(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;let n={},i=Mu.normalizeUnit(e);switch(i){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(i==="weeks")if(t){let o=this.loc.getStartOfWeek(),{weekday:a}=this;a<o&&(n.weekNumber=this.weekNumber-1),n.weekday=o}else n.weekday=1;if(i==="quarters"){let o=Math.ceil(this.month/3);n.month=(o-1)*3+1}return this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?ud.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):p7}toLocaleString(e=bq,t={}){return this.isValid?ud.create(this.loc.clone(t),e).formatDateTime(this):p7}toLocaleParts(e={}){return this.isValid?ud.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:i=!0,extendedZone:o=!1,precision:a="milliseconds"}={}){if(!this.isValid)return null;a=vq(a);let l=e==="extended",u=v7(this,l,a);return gq.indexOf(a)>=3&&(u+="T"),u+=cIe(this,l,t,n,i,o,a),u}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?v7(this,e==="extended",vq(t)):null}toISOWeekDate(){return pq(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:i=!1,extendedZone:o=!1,format:a="extended",precision:l="milliseconds"}={}){return this.isValid?(l=vq(l),(i&&gq.indexOf(l)>=3?"T":"")+cIe(this,a==="extended",t,e,n,o,l)):null}toRFC2822(){return pq(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return pq(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?v7(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let i="HH:mm:ss.SSS";return(t||e)&&(n&&(i+=" "),t?i+="z":e&&(i+="ZZ")),pq(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():p7}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}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{};let 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 Mu.invalid("created by diffing an invalid DateTime");let i={locale:this.locale,numberingSystem:this.numberingSystem,...n},o=jNt(t).map(Mu.normalizeUnit),a=e.valueOf()>this.valueOf(),l=a?this:e,u=a?e:this,f=WBt(l,u,o,i);return a?f.negate():f}diffNow(e="milliseconds",t={}){return this.diff(r.now(),e,t)}until(e){return this.isValid?SS.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;let i=e.valueOf(),o=this.setZone(e.zone,{keepLocalTime:!0});return o.startOf(t,n)<=i&&i<=o.endOf(t,n)}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;let t=e.base||r.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0,i=["years","months","days","hours","minutes","seconds"],o=e.unit;return Array.isArray(e.unit)&&(i=e.unit,o=void 0),dIe(t,this.plus(n),{...e,numeric:"always",units:i,unit:o})}toRelativeCalendar(e={}){return this.isValid?dIe(e.base||r.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(r.isDateTime))throw new Ou("min requires all arguments be DateTimes");return JDe(e,t=>t.valueOf(),Math.min)}static max(...e){if(!e.every(r.isDateTime))throw new Ou("max requires all arguments be DateTimes");return JDe(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){let{locale:i=null,numberingSystem:o=null}=n,a=Pa.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});return cOe(a,e,t)}static fromStringExplain(e,t,n={}){return r.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){let{locale:n=null,numberingSystem:i=null}=t,o=Pa.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0});return new Tq(o,e)}static fromFormatParser(e,t,n={}){if(Si(e)||Si(t))throw new Ou("fromFormatParser requires an input string and a format parser");let{locale:i=null,numberingSystem:o=null}=n,a=Pa.fromOpts({locale:i,numberingSystem:o,defaultToEN:!0});if(!a.equals(t.locale))throw new Ou(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${t.locale}`);let{result:l,zone:u,specificOffset:f,invalidReason:p}=t.explainFromTokens(e);return p?r.invalid(p):bS(l,u,n,`format ${t.format}`,e,f)}static get DATE_SHORT(){return bq}static get DATE_MED(){return mIe}static get DATE_MED_WITH_WEEKDAY(){return bNt}static get DATE_FULL(){return gIe}static get DATE_HUGE(){return vIe}static get TIME_SIMPLE(){return yIe}static get TIME_WITH_SECONDS(){return bIe}static get TIME_WITH_SHORT_OFFSET(){return xIe}static get TIME_WITH_LONG_OFFSET(){return _Ie}static get TIME_24_SIMPLE(){return wIe}static get TIME_24_WITH_SECONDS(){return SIe}static get TIME_24_WITH_SHORT_OFFSET(){return TIe}static get TIME_24_WITH_LONG_OFFSET(){return kIe}static get DATETIME_SHORT(){return EIe}static get DATETIME_SHORT_WITH_SECONDS(){return AIe}static get DATETIME_MED(){return CIe}static get DATETIME_MED_WITH_SECONDS(){return DIe}static get DATETIME_MED_WITH_WEEKDAY(){return xNt}static get DATETIME_FULL(){return IIe}static get DATETIME_FULL_WITH_SECONDS(){return OIe}static get DATETIME_HUGE(){return MIe}static get DATETIME_HUGE_WITH_SECONDS(){return LIe}};function fC(r){if(xa.isDateTime(r))return r;if(r&&r.valueOf&&Fb(r.valueOf()))return xa.fromJSDate(r);if(r&&typeof r=="object")return xa.fromObject(r);throw new Ou(`Unknown datetime argument: ${r}, of type ${typeof r}`)}function czt(r){return new Date(new Date(r).getTime()+new Date(r).getTimezoneOffset()*60*1e3)}var hzt="y/LL/dd",_C="TT",Dq=class extends Zt{static targets=["input","fakeInput"];static values={view:String,timezone:String,format:String,enableTime:Boolean,pickerFormat:String,firstDayOfWeek:Number,time24Hr:Boolean,disableMobile:Boolean,noCalendar:Boolean,relative:Boolean,fieldType:{type:String,default:"dateTime"},pickerOptions:{type:Object,default:{}}};flatpickrInstance;cachedInitialValue;get browserZone(){return xa.local().zoneName}get initialValue(){return this.isOnShow||this.isOnIndex?this.context.element.innerText:this.isOnEdit?this.inputTarget.value:null}get isOnIndex(){return this.viewValue==="index"}get isOnEdit(){return this.viewValue==="edit"}get isOnShow(){return this.viewValue==="show"}get fieldIsDate(){return this.fieldTypeValue==="date"}get fieldIsDateTime(){return this.fieldTypeValue==="dateTime"}get fieldIsTime(){return this.fieldTypeValue==="time"}get fieldHasTime(){return this.fieldIsTime||this.fieldIsDateTime}get parsedValue(){return xa.fromISO(this.initialValue.trim(),{zone:"UTC"})}get displayTimezone(){return this.timezoneValue||this.browserZone}get locale(){return document.documentElement.lang||"en"}connect(){this.cacheInitialValue(),this.isOnShow||this.isOnIndex?this.initShow():this.isOnEdit&&this.initEdit()}disconnect(){this.isOnShow||this.isOnIndex?this.context.element.innerText=this.cachedInitialValue:this.isOnEdit&&this.flatpickrInstance&&this.flatpickrInstance.destroy()}cacheInitialValue(){this.cachedInitialValue=this.initialValue}initShow(){let r=this.parsedValue;if(this.fieldHasTime&&this.relativeValue)if(this.fieldIsTime){let e=r.toFormat(_C);r=xa.fromFormat(e,_C,{zone:"UTC"}).setZone(this.displayTimezone)}else r=r.setZone(this.displayTimezone);this.context.element.innerText=r.toFormat(this.formatValue,{locale:this.locale})}initEdit(){let r={enableTime:!1,enableSeconds:!1,time_24hr:this.time24HrValue,locale:{firstDayOfWeek:0},altInput:!0,onChange:this.onChange.bind(this),onClose:this.onClose.bind(this),noCalendar:!1,...this.pickerOptionsValue};if(r.altFormat=this.pickerFormatValue,r.disableMobile=this.disableMobileValue,r.locale.firstDayOfWeek=this.firstDayOfWeekValue,r.enableTime=this.enableTimeValue,r.enableSeconds=this.enableTimeValue,r.noCalendar=this.noCalendarValue,this.fieldHasTime&&(r.dateFormat="Y-m-d H:i:S"),this.initialValue)switch(this.fieldTypeValue){case"date":r.defaultDate=czt(this.initialValue);break;case"time":{let e=this.parsedValue.toFormat(_C);r.defaultDate=xa.fromFormat(e,_C,{zone:"UTC"}).setZone(this.displayTimezone,{keepLocalTime:!this.relativeValue}).toISO()}break;case"dateTime":r.defaultDate=this.parsedValue.setZone(this.displayTimezone,{keepLocalTime:!this.relativeValue}).toISO();break;default:break}this.flatpickrInstance=gS(this.fakeInputTarget,r),this.initialValue&&this.inputTarget.dispatchEvent(new Event("change",{bubbles:!0}))}onChange(r){if(r.length===0){this.updateRealInput("");return}let e=xa.fromISO(r[0].toISOString()).setZone(this.displayTimezone,{keepLocalTime:!0}).setZone("UTC",{keepLocalTime:!this.relativeValue}),t;switch(this.fieldTypeValue){case"time":t=e.toFormat(_C);break;case"date":t=e.toFormat(hzt);break;case"dateTime":t=e.toISO();break;default:break}this.updateRealInput(t)}onClose(r,e,t){if(t.config.allowInput&&t.altInput.value){let{value:n}=t.altInput;n?t.setDate(n,!0,t.config.altFormat):this.updateRealInput("")}}updateRealInput(r){this.inputTarget.value=r}clear(){this.fakeInputTarget._flatpickr.clear()}};var Iq=class extends Sf{static targets=["input"];static values={class:String,pickerOptions:Object};getFilterValue(){return this.inputTarget.value}getFilterClass(){return this.classValue}connect(){this.initFlatpickr()}initFlatpickr(){this.pickerInstance=gS(this.inputTarget,this.pickerOptionsValue)}clear(){this.inputTarget._flatpickr.clear()}};var Oq=class extends Zt{static values={chartId:String};toggleSlice({params:r,currentTarget:e}){let t=this.chart();t&&(t.toggleDataVisibility(r.index),t.update(),e.classList.toggle("distribution-chart__row--inactive",!t.getDataVisibility(r.index)))}highlightSlice({params:r}){let e=this.chart();if(!e||!e.getDataVisibility(r.index))return;let t=e.data.datasets[0],n=new Array(t.data.length).fill(0);n[r.index]=32,t.offset=n,e.update()}clearHighlight(){let r=this.chart();r&&(r.data.datasets[0].offset=0,r.update())}chart(){return window.Chartkick?.charts?.[this.chartIdValue]?.getChartObject?.()??null}};var H7=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function W7(r,e,t,n){r.addEventListener?r.addEventListener(e,t,n):r.attachEvent&&r.attachEvent("on".concat(e),t)}function wC(r,e,t,n){r.removeEventListener?r.removeEventListener(e,t,n):r.detachEvent&&r.detachEvent("on".concat(e),t)}function gOe(r,e){let t=e.slice(0,e.length-1);for(let n=0;n<t.length;n++)t[n]=r[t[n].toLowerCase()];return t}function vOe(r){typeof r!="string"&&(r=""),r=r.replace(/\s/g,"");let e=r.split(","),t=e.lastIndexOf("");for(;t>=0;)e[t-1]+=",",e.splice(t,1),t=e.lastIndexOf("");return e}function fzt(r,e){let t=r.length>=e.length?r:e,n=r.length>=e.length?e:r,i=!0;for(let o=0;o<t.length;o++)n.indexOf(t[o])===-1&&(i=!1);return i}var kC={backspace:8,"\u232B":8,tab:9,clear:12,enter:13,"\u21A9":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,arrowup:38,arrowdown:40,arrowleft:37,arrowright:39,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"\u21EA":20,",":188,".":190,"/":191,"`":192,"-":H7?173:189,"=":H7?61:187,";":H7?59:186,"'":222,"{":219,"}":221,"[":219,"]":221,"\\":220},vm={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,meta:91,command:91},SC={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},hc={16:!1,18:!1,17:!1,91:!1},zs={};for(let r=1;r<20;r++)kC["f".concat(r)]=111+r;var Ts=[],TC=null,yOe="all",Pv=new Map,DS=r=>kC[r.toLowerCase()]||vm[r.toLowerCase()]||r.toUpperCase().charCodeAt(0),dzt=r=>Object.keys(kC).find(e=>kC[e]===r),pzt=r=>Object.keys(vm).find(e=>vm[e]===r);function bOe(r){yOe=r||"all"}function EC(){return yOe||"all"}function mzt(){return Ts.slice(0)}function gzt(){return Ts.map(r=>dzt(r)||pzt(r)||String.fromCharCode(r))}function vzt(){let r=[];return Object.keys(zs).forEach(e=>{zs[e].forEach(t=>{let{key:n,scope:i,mods:o,shortcut:a}=t;r.push({scope:i,shortcut:a,mods:o,keys:n.split("+").map(l=>DS(l))})})}),r}function yzt(r){let e=r.target||r.srcElement,{tagName:t}=e,n=!0,i=t==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(e.type);return(e.isContentEditable||(i||t==="TEXTAREA"||t==="SELECT")&&!e.readOnly)&&(n=!1),n}function bzt(r){return typeof r=="string"&&(r=DS(r)),Ts.indexOf(r)!==-1}function xzt(r,e){let t,n;r||(r=EC());for(let i in zs)if(Object.prototype.hasOwnProperty.call(zs,i))for(t=zs[i],n=0;n<t.length;)t[n].scope===r?t.splice(n,1).forEach(a=>{let{element:l}=a;return G7(l)}):n++;EC()===r&&bOe(e||"all")}function _zt(r){let e=r.keyCode||r.which||r.charCode;r.key&&r.key.toLowerCase()==="capslock"&&(e=DS(r.key));let t=Ts.indexOf(e);if(t>=0&&Ts.splice(t,1),r.key&&r.key.toLowerCase()==="meta"&&Ts.splice(0,Ts.length),(e===93||e===224)&&(e=91),e in hc){hc[e]=!1;for(let n in vm)vm[n]===e&&(Rv[n]=!1)}}function xOe(r){if(typeof r>"u")Object.keys(zs).forEach(i=>{Array.isArray(zs[i])&&zs[i].forEach(o=>Mq(o)),delete zs[i]}),G7(null);else if(Array.isArray(r))r.forEach(i=>{i.key&&Mq(i)});else if(typeof r=="object")r.key&&Mq(r);else if(typeof r=="string"){for(var e=arguments.length,t=new Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];let[i,o]=t;typeof i=="function"&&(o=i,i=""),Mq({key:r,scope:i,method:o,splitKey:"+"})}}var Mq=r=>{let{key:e,scope:t,method:n,splitKey:i="+"}=r;vOe(e).forEach(a=>{let l=a.split(i),u=l.length,f=l[u-1],p=f==="*"?"*":DS(f);if(!zs[p])return;t||(t=EC());let x=u>1?gOe(vm,l):[],S=[];zs[p]=zs[p].filter(C=>{let L=(n?C.method===n:!0)&&C.scope===t&&fzt(C.mods,x);return L&&S.push(C.element),!L}),S.forEach(C=>G7(C))})};function pOe(r,e,t,n){if(e.element!==n)return;let i;if(e.scope===t||e.scope==="all"){i=e.mods.length>0;for(let o in hc)Object.prototype.hasOwnProperty.call(hc,o)&&(!hc[o]&&e.mods.indexOf(+o)>-1||hc[o]&&e.mods.indexOf(+o)===-1)&&(i=!1);(e.mods.length===0&&!hc[16]&&!hc[18]&&!hc[17]&&!hc[91]||i||e.shortcut==="*")&&(e.keys=[],e.keys=e.keys.concat(Ts),e.method(r,e)===!1&&(r.preventDefault?r.preventDefault():r.returnValue=!1,r.stopPropagation&&r.stopPropagation(),r.cancelBubble&&(r.cancelBubble=!0)))}}function mOe(r,e){let t=zs["*"],n=r.keyCode||r.which||r.charCode;if(r.key&&r.key.toLowerCase()==="capslock"||!Rv.filter.call(this,r))return;if((n===93||n===224)&&(n=91),Ts.indexOf(n)===-1&&n!==229&&Ts.push(n),["metaKey","ctrlKey","altKey","shiftKey"].forEach(l=>{let u=SC[l];r[l]&&Ts.indexOf(u)===-1?Ts.push(u):!r[l]&&Ts.indexOf(u)>-1?Ts.splice(Ts.indexOf(u),1):l==="metaKey"&&r[l]&&(Ts=Ts.filter(f=>f in SC||f===n))}),n in hc){hc[n]=!0;for(let l in vm)if(Object.prototype.hasOwnProperty.call(vm,l)){let u=SC[vm[l]];Rv[l]=r[u]}if(!t)return}for(let l in hc)Object.prototype.hasOwnProperty.call(hc,l)&&(hc[l]=r[SC[l]]);r.getModifierState&&!(r.altKey&&!r.ctrlKey)&&r.getModifierState("AltGraph")&&(Ts.indexOf(17)===-1&&Ts.push(17),Ts.indexOf(18)===-1&&Ts.push(18),hc[17]=!0,hc[18]=!0);let i=EC();if(t)for(let l=0;l<t.length;l++)t[l].scope===i&&(r.type==="keydown"&&t[l].keydown||r.type==="keyup"&&t[l].keyup)&&pOe(r,t[l],i,e);if(!(n in zs))return;let o=zs[n],a=o.length;for(let l=0;l<a;l++)if((r.type==="keydown"&&o[l].keydown||r.type==="keyup"&&o[l].keyup)&&o[l].key){let u=o[l],{splitKey:f}=u,p=u.key.split(f),x=[];for(let S=0;S<p.length;S++)x.push(DS(p[S]));x.sort().join("")===Ts.sort().join("")&&pOe(r,u,i,e)}}function Rv(r,e,t){Ts=[];let n=vOe(r),i=[],o="all",a=document,l=0,u=!1,f=!0,p="+",x=!1,S=!1;for(t===void 0&&typeof e=="function"&&(t=e),Object.prototype.toString.call(e)==="[object Object]"&&(e.scope&&(o=e.scope),e.element&&(a=e.element),e.keyup&&(u=e.keyup),e.keydown!==void 0&&(f=e.keydown),e.capture!==void 0&&(x=e.capture),typeof e.splitKey=="string"&&(p=e.splitKey),e.single===!0&&(S=!0)),typeof e=="string"&&(o=e),S&&xOe(r,o);l<n.length;l++)r=n[l].split(p),i=[],r.length>1&&(i=gOe(vm,r)),r=r[r.length-1],r=r==="*"?"*":DS(r),r in zs||(zs[r]=[]),zs[r].push({keyup:u,keydown:f,scope:o,mods:i,shortcut:n[l],method:t,key:n[l],splitKey:p,element:a});if(typeof a<"u"&&window){if(!Pv.has(a)){let C=function(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return mOe(L,a)},M=function(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;mOe(L,a),_zt(L)};Pv.set(a,{keydownListener:C,keyupListenr:M,capture:x}),W7(a,"keydown",C,x),W7(a,"keyup",M,x)}if(!TC){let C=()=>{Ts=[]};TC={listener:C,capture:x},W7(window,"focus",C,x)}}}function wzt(r){let e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(zs).forEach(t=>{zs[t].filter(i=>i.scope===e&&i.shortcut===r).forEach(i=>{i&&i.method&&i.method()})})}function G7(r){let e=Object.values(zs).flat();if(e.findIndex(n=>{let{element:i}=n;return i===r})<0){let{keydownListener:n,keyupListenr:i,capture:o}=Pv.get(r)||{};n&&i&&(wC(r,"keyup",i,o),wC(r,"keydown",n,o),Pv.delete(r))}if((e.length<=0||Pv.size<=0)&&(Object.keys(Pv).forEach(i=>{let{keydownListener:o,keyupListenr:a,capture:l}=Pv.get(i)||{};o&&a&&(wC(i,"keyup",a,l),wC(i,"keydown",o,l),Pv.delete(i))}),Pv.clear(),Object.keys(zs).forEach(i=>delete zs[i]),TC)){let{listener:i,capture:o}=TC;wC(window,"focus",i,o),TC=null}}var $7={getPressedKeyString:gzt,setScope:bOe,getScope:EC,deleteScope:xzt,getPressedKeyCodes:mzt,getAllKeyCodes:vzt,isPressed:bzt,filter:yzt,trigger:wzt,unbind:xOe,keyMap:kC,modifier:vm,modifierMap:SC};for(let r in $7)Object.prototype.hasOwnProperty.call($7,r)&&(Rv[r]=$7[r]);if(typeof window<"u"){let r=window.hotkeys;Rv.noConflict=e=>(e&&window.hotkeys===Rv&&(window.hotkeys=r),Rv),window.hotkeys=Rv}var Szt=(r,e,t)=>{let n=r;return t===!0?n=`${e.identifier}:${r}`:typeof t=="string"&&(n=`${t}:${r}`),n},Tzt=(r,e,t)=>{let{bubbles:n,cancelable:i,composed:o}=e||{bubbles:!0,cancelable:!0,composed:!0};return e&&Object.assign(t,{originalEvent:e}),new CustomEvent(r,{bubbles:n,cancelable:i,composed:o,detail:t})};function kzt(r){let e=r.getBoundingClientRect(),t=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth,i=e.top<=t&&e.top+e.height>=0,o=e.left<=n&&e.left+e.width>=0;return i&&o}var Ezt={events:["click","touchend"],onlyVisible:!0,dispatchEvent:!0,eventPrefix:!0},Lq=(r,e={})=>{let{onlyVisible:t,dispatchEvent:n,events:i,eventPrefix:o}=Object.assign({},Ezt,e),a=p=>{let x=e?.element||r.element;if(!(x.contains(p.target)||!kzt(x)&&t)&&(r.clickOutside&&r.clickOutside(p),n)){let S=Szt("click:outside",r,o),C=Tzt(S,p,{controller:r});x.dispatchEvent(C)}},l=()=>{i?.forEach(p=>{window.addEventListener(p,a,!1)})},u=()=>{i?.forEach(p=>{window.removeEventListener(p,a,!1)})},f=r.disconnect.bind(r);return Object.assign(r,{disconnect(){u(),f()}}),l(),[l,u]};var K7=class extends Zt{};K7.debounces=[];var Y7=class extends Zt{};Y7.throttles=[];var Pq=class extends Zt{static targets=["menu"];static values={exemptionContainers:Array,logger:Boolean,flip:Boolean};get exemptionContainerTargets(){return this.exemptionContainersValue.map(r=>document.querySelector(r)).filter(Boolean)}get isOpen(){return this.menuTarget.hasAttribute("open")}get focusableItems(){return[...this.menuTarget.querySelectorAll("a, button")].filter(r=>!r.closest("[hidden]")&&r.dataset.disabled!=="true")}clickOutside(r){this.hasMenuTarget&&!(this.hasExemptionContainersValue&&this.exemptionContainerTargets.some(t=>t.contains(r.target)))&&this.isOpen&&this.close()}connect(){Lq(this),this.boundHandleKeydown=this.handleKeydown.bind(this)}disconnect(){this.element.removeEventListener("keydown",this.boundHandleKeydown)}toggle(){this.isOpen?this.close():this.open()}open(){this.menuTarget.show(),this.maybeFlip(),this.element.addEventListener("keydown",this.boundHandleKeydown),document.body.classList.add("dropdown-open"),this.dispatch("open",{bubbles:!0}),requestAnimationFrame(()=>{let r=this.focusableItems;if(r.length===0)return;(r.find(t=>[...t.classList].some(n=>n.endsWith("--active"))||t.getAttribute("aria-selected")==="true")||r[0]).focus()})}close(){this.menuTarget.close(),this.element.removeEventListener("keydown",this.boundHandleKeydown),document.body.classList.remove("dropdown-open")}maybeFlip(){!this.flipValue||!this.hasMenuTarget||(this.menuTarget.classList.remove("start-auto","end-0"),this.menuTarget.classList.add("start-0","end-auto"),this.menuTarget.getBoundingClientRect().right>document.documentElement.clientWidth&&(this.menuTarget.classList.remove("start-0","end-auto"),this.menuTarget.classList.add("start-auto","end-0")))}handleKeydown(r){let e=this.focusableItems;if(e.length===0)return;let t=e.indexOf(document.activeElement);switch(r.key){case"ArrowDown":r.preventDefault(),e[t<e.length-1?t+1:0].focus();break;case"ArrowUp":r.preventDefault(),e[t>0?t-1:e.length-1].focus();break;case"Escape":r.preventDefault(),this.close();break;default:}}};var Rq=class extends Zt{get focusableItems(){return[...this.element.querySelectorAll("a, button")].filter(r=>!r.closest("[hidden]")&&r.dataset.disabled!=="true")}connect(){this.boundHandleKeydown=this.handleKeydown.bind(this),this.boundOnToggle=this.onToggle.bind(this),this.element.addEventListener("toggle",this.boundOnToggle),this.element.addEventListener("keydown",this.boundHandleKeydown)}disconnect(){this.element.removeEventListener("toggle",this.boundOnToggle),this.element.removeEventListener("keydown",this.boundHandleKeydown)}onToggle(r){r.newState==="open"&&requestAnimationFrame(()=>{let e=this.focusableItems;if(e.length===0)return;(e.find(n=>n.classList.contains("dropdown-menu__item--active"))||e[0]).focus()})}handleKeydown(r){if(!this.element.matches(":popover-open"))return;let e=this.focusableItems;if(e.length===0)return;let t=e.indexOf(document.activeElement);switch(r.key){case"ArrowDown":r.preventDefault(),e[t<e.length-1?t+1:0].focus();break;case"ArrowUp":r.preventDefault(),e[t>0?t-1:e.length-1].focus();break;case"Escape":r.preventDefault(),r.stopPropagation(),this.element.hidePopover();break;default:}}};var bMe=Vo(yMe()),hF=class extends Zt{static targets=["element"];get view(){return this.elementTarget.dataset.view}get componentOptions(){try{return JSON.parse(this.elementTarget.dataset.componentOptions)}catch{return{}}}get isDark(){return document.documentElement.classList.contains("dark")}get resolvedTheme(){return this.isDark?"monokai":"default"}connect(){let r={element:this.elementTarget,spellChecker:this.componentOptions.spell_checker,autoRefresh:{delay:500},theme:this.resolvedTheme};this.view==="show"&&(r.toolbar=!1,r.status=!1),this.easyMde=new bMe.default(r),this.view==="show"&&(this.easyMde.codemirror.options.readOnly=!0),this.easyMde.codemirror.on("keydown",(t,n)=>{n.key==="Escape"&&this.easyMde.codemirror.getInputField().blur()});let e=this;this.observer=new MutationObserver(()=>{e.easyMde.codemirror.setOption("theme",e.resolvedTheme)}),this.observer.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]})}disconnect(){this.observer&&this.observer.disconnect(),this.easyMde&&(this.easyMde.toTextArea(),this.easyMde=null)}};var fF=class extends Zt{submit(r){r.key&&this.element.requestSubmit()}};var dF=class extends Zt{static targets=["icon"];mousemove(r){let n=r.clientX,i=r.clientY;this.iconTargets.forEach(o=>{let a=o.getBoundingClientRect(),l=a.left+a.width/2,u=a.top+a.height/2,f=l-n,p=u-i,x=Math.sqrt(f*f+p*p);if(x<90&&x>0){let S=parseFloat(o.dataset.repulsionScale??1),C=(1-x/90)*30*S;o.style.setProperty("--tx",`${f/x*C}px`),o.style.setProperty("--ty",`${p/x*C}px`),o.classList.add("grid-card__icon--repelling")}else o.style.setProperty("--tx","0px"),o.style.setProperty("--ty","0px"),o.classList.remove("grid-card__icon--repelling")})}mouseleave(){this.iconTargets.forEach(r=>{r.style.setProperty("--tx","0px"),r.style.setProperty("--ty","0px"),r.classList.remove("grid-card__icon--repelling")})}};var y3t=32,pF=class extends Zt{static targets=["row","trigger"];connect(){this.items=Array.from(this.rowTarget.children),this.bindAriaExpanded(),this.popoverItems=this.collectPopoverItems(),this.scheduleUpdate=this.scheduleUpdate.bind(this),this.resizeObserver=new ResizeObserver(this.scheduleUpdate),this.resizeObserver.observe(this.element),this.update()}collectPopoverItems(){if(!this.popoverElement)return[];let r=this.popoverElement.querySelector(".dropdown-menu__list");return r?Array.from(r.children):[]}disconnect(){this.resizeObserver?.disconnect(),this.rafId&&cancelAnimationFrame(this.rafId),this.popoverElement&&this.handlePopoverToggle&&this.popoverElement.removeEventListener("toggle",this.handlePopoverToggle)}bindAriaExpanded(){if(!this.hasTriggerTarget)return;let r=this.triggerTarget.getAttribute("popovertarget");this.popoverElement=r?document.getElementById(r):null,this.popoverElement&&(this.handlePopoverToggle=e=>{this.triggerTarget.setAttribute("aria-expanded",e.newState==="open"?"true":"false")},this.popoverElement.addEventListener("toggle",this.handlePopoverToggle))}scheduleUpdate(){this.rafId||(this.rafId=requestAnimationFrame(()=>{this.rafId=null,this.update()}))}update(){if(this.items.length===0){this.element.classList.remove("header-menu--has-overflow"),this.element.classList.remove("header-menu--row-empty"),this.element.classList.add("header-menu--empty");return}this.element.classList.remove("header-menu--empty"),this.items.forEach(S=>{S.style.display=""}),this.truncatedItem&&(this.truncatedItem.classList.remove("header-menu__item--truncated"),this.truncatedItem.style.maxWidth="",this.truncatedItem=null);let r=this.hasTriggerTarget?this.triggerTarget.offsetWidth:0,e=this.element.clientWidth,t=window.getComputedStyle(this.rowTarget),n=parseFloat(t.columnGap)||parseFloat(t.gap)||0,i=this.items.length,o=0;for(let S=0;S<this.items.length;S+=1){let C=o+(S===0?0:n)+this.items[S].offsetWidth,L=S<this.items.length-1?e-r-n:e;if(C>L){i=S;break}o=C}let a=-1;if(i<this.items.length){let S=o+(i>0?n:0),C=e-r-n-S;C>=y3t&&(a=i,this.truncatedItem=this.items[a],this.truncatedItem.classList.add("header-menu__item--truncated"),this.truncatedItem.style.maxWidth=`${Math.floor(C)}px`)}let l=i+(a>=0?1:0);for(let S=l;S<this.items.length;S+=1)this.items[S].style.display="none";let f=this.rowTarget.clientWidth>0?l:0;this.popoverItems.forEach((S,C)=>{S.style.display=C<f?"none":""});let p=i<this.items.length;this.element.classList.toggle("header-menu--has-overflow",p);let x=i>0||a>=0;this.element.classList.toggle("header-menu--row-empty",!x)}};var mF=class extends Zt{static targets=["content"];showContent(r){this.contentTarget.classList.toggle("hidden"),r.target.classList.add("hidden")}};var b3t="input, textarea, select, [contenteditable]",gF=class extends Zt{static targets=["table"];initialize(){this.handleKeydown=this.handleKeydown.bind(this),this.handleDropdownOpen=this.handleDropdownOpen.bind(this),this.handleAdvanceRequest=this.handleAdvanceRequest.bind(this),this.handleTableBlur=this.handleTableBlur.bind(this)}connect(){this.currentIndex=-1,this.hotkeysEnabled=window.Avo?.configuration?.hotkeys?.enabled!==!1,document.addEventListener("keydown",this.handleKeydown),document.addEventListener("dropdown-menu:open",this.handleDropdownOpen),document.addEventListener("avo:advance-resource-table",this.handleAdvanceRequest),this.hotkeysEnabled&&this.element.querySelectorAll("tr[data-visit-path] [data-hotkey]").forEach(e=>{let t=e.getAttribute("data-hotkey");e.setAttribute("data-hotkey-original",t),e.removeAttribute("data-hotkey")})}disconnect(){document.removeEventListener("keydown",this.handleKeydown),document.removeEventListener("dropdown-menu:open",this.handleDropdownOpen),document.removeEventListener("avo:advance-resource-table",this.handleAdvanceRequest)}tableTargetConnected(r){r.addEventListener("blur",this.handleTableBlur),this.currentIndex=-1}tableTargetDisconnected(r){r.removeEventListener("blur",this.handleTableBlur)}handleDropdownOpen(){let r=this.rows();r.length&&this.clearFocus(r)}handleAdvanceRequest(r){if(!this.hasTableTarget)return;let e=r.detail?.direction==="previous"?"previous":"next",t=this.rows();t.length&&(this.tableTarget.focus({preventScroll:!0}),this.moveFocus(t,e))}handleTableBlur(){let r=this.rows();r.length&&this.clearFocus(r)}handleKeydown(r){if(r.defaultPrevented||document.body.classList.contains("modal-open")||document.body.classList.contains("dropdown-open")||r.target.closest(b3t)||r.repeat&&(r.key==="Enter"||r.key==="Escape"||r.key===" "))return;let e=this.rows();if(e.length&&this.tableHasFocus()&&!(this.hotkeysEnabled&&this.currentIndex!==-1&&this.handleRowHotkey(r,e))&&["ArrowDown","ArrowUp","Enter","Escape"," "].includes(r.key)){if(this.currentIndex=this.normalizeCurrentIndex(e.length),r.key==="Escape"){if(this.currentIndex!==-1){r.preventDefault(),this.clearFocus(e);return}let t=this.application.getControllerForElementAndIdentifier(this.element.querySelector('[data-controller~="item-select-all"]'),"item-select-all");if(t&&JSON.parse(t.element.dataset.selectedResources||"[]").length>0){r.preventDefault(),t.deselectAll();return}r.preventDefault(),this.tableTarget.blur();return}if(r.key==="Enter"){if(this.currentIndex===-1)return;r.preventDefault();let t=e[this.currentIndex];t?.dataset.visitPath&&window.Turbo.visit(t.dataset.visitPath);return}if(r.key===" "){if(this.currentIndex===-1)return;r.preventDefault();let t=e[this.currentIndex].querySelector('[data-item-select-all-target="itemCheckbox"]');t&&t.click();return}r.preventDefault(),this.moveFocus(e,r.key==="ArrowDown"?"next":"previous")}}moveFocus(r,e){e==="next"?this.currentIndex=this.currentIndex<r.length-1?this.currentIndex+1:0:this.currentIndex=this.currentIndex>0?this.currentIndex-1:r.length-1,r.forEach((t,n)=>t.classList.toggle("is-keyboard-focused",n===this.currentIndex)),r[this.currentIndex].scrollIntoView({block:"nearest"}),this.syncActiveDescendant(r[this.currentIndex]),this.hotkeysEnabled&&this.syncRowHotkeys(r)}rows(){return Array.from(this.element.querySelectorAll("tr[data-visit-path]"))}tableHasFocus(){return this.hasTableTarget?this.tableTarget===document.activeElement||this.tableTarget.contains(document.activeElement):!1}syncActiveDescendant(r){this.hasTableTarget&&(r?.id?this.tableTarget.setAttribute("aria-activedescendant",r.id):this.tableTarget.removeAttribute("aria-activedescendant"))}normalizeCurrentIndex(r){return this.currentIndex<-1?-1:this.currentIndex>=r?r-1:this.currentIndex}syncRowHotkeys(r){r.forEach((e,t)=>{e.querySelectorAll("[data-hotkey-original]").forEach(i=>{if(t===this.currentIndex){let o=i.getAttribute("data-hotkey-original");i.setAttribute("data-hotkey",o)}else i.removeAttribute("data-hotkey")})})}handleRowHotkey(r,e){let t=e[this.currentIndex];if(!t)return!1;let n=t.querySelector(`[data-hotkey="${r.key}"]`);return n?(r.preventDefault(),r.stopImmediatePropagation(),n.click(),!0):!1}clearFocus(r){r.forEach(e=>e.classList.remove("is-keyboard-focused")),this.currentIndex=-1,this.hasTableTarget&&this.tableTarget.removeAttribute("aria-activedescendant"),r.forEach(e=>{e.querySelectorAll("[data-hotkey-original]").forEach(t=>{t.removeAttribute("data-hotkey")})})}};var vF=class extends Zt{static targets=["element"];focus({params:r}){let e=this.context.element.querySelector(r.selector);this.element&&e.focus()}};var yF=class extends Zt{static targets=["itemCheckbox","checkbox","selectAllOverlay","unselectedMessage","selectedMessage"];static values={pageCount:Number,selectedAll:Boolean,selectedAllQuery:String};connect(){this.resourceName=this.element.dataset.resourceName,this.selectedResourcesObserver=new oS(this.element,"data-selected-resources",this),this.selectedResourcesObserver.start()}elementAttributeValueChanged(r){let e=JSON.parse(r.dataset.selectedResources),t=this.element.querySelectorAll("tbody tr").length;this.checkboxTarget.indeterminate=!1,this.checkboxTarget.checked=!1,e.length===t?this.checkboxTarget.checked=!0:e.length===0?this.checkboxTarget.checked=!1:e.length>0&&e.length<t&&(this.checkboxTarget.indeterminate=!0)}disconnect(){this.selectedResourcesObserver.stop()}deselectAll(){this.itemCheckboxTargets.forEach(r=>r.checked&&r.click()),this.checkboxTarget.checked=!1,this.selectAllEnabled()&&(this.selectAllOverlay(!1),this.resetUnselected())}toggle(r){let e=!!r.target.checked;this.itemCheckboxTargets.forEach(t=>t.checked!==e&&t.click()),this.selectAllEnabled()&&(this.selectAllOverlay(e),e||this.resetUnselected())}selectRow(){let r=!0;this.itemCheckboxTargets.forEach(e=>r=r&&e.checked),this.checkboxTarget.checked=r,this.selectAllEnabled()&&(this.selectAllOverlay(r),this.resetUnselected()),this.updateLinks("resourceIds")}selectAll(r){r.preventDefault(),this.selectedAllValue=!this.selectedAllValue,this.unselectedMessageTarget.classList.toggle("hidden"),this.selectedMessageTarget.classList.toggle("hidden"),this.selectedAllValue?this.updateLinks("selectedQuery"):this.updateLinks("resourceIds")}updateLinks(r){document.querySelectorAll(`a[data-actions-picker-target][data-resource-name="${this.resourceName}"]`).forEach(t=>{try{let n=new URL(t.href);if(Array.from(n.searchParams.keys()).filter(i=>i.startsWith("fields[")).forEach(i=>n.searchParams.delete(i)),r==="resourceIds"){let i=JSON.parse(this.element.dataset.selectedResources).join(",");n.searchParams.set("fields[avo_resource_ids]",i),n.searchParams.set("fields[avo_selected_all]","false")}else if(r==="selectedQuery"){let i=this.element.dataset.itemSelectAllSelectedAllQueryValue;n.searchParams.set("fields[avo_index_query]",i),n.searchParams.set("fields[avo_selected_all]","true")}t.href=n.toString()}catch(n){console.error("Error updating link:",t,n)}})}resetUnselected(){this.selectedAllValue=!1,this.unselectedMessageTarget.classList.remove("hidden"),this.selectedMessageTarget.classList.add("hidden")}selectAllOverlay(r){r?this.selectAllOverlayTarget.classList.remove("hidden"):this.selectAllOverlayTarget.classList.add("hidden")}selectAllEnabled(){return this.pageCountValue>1&&this.selectedAllQueryValue!=="select_all_disabled"}};var bF=class extends Zt{static targets=["panel"];checkbox={};get actionLinks(){return document.querySelectorAll('a[data-actions-picker-target="resourceAction"]')}get currentIds(){try{return JSON.parse(this.stateHolderElement.dataset.selectedResources)}catch{return[]}}set currentIds(r){this.stateHolderElement.dataset.selectedResources=JSON.stringify(r),this.actionLinks.length>0&&(r.length>0?this.enableResourceActions():this.disableResourceActions())}connect(){this.resourceName=this.element.dataset.resourceName,this.resourceId=this.element.dataset.resourceId,this.stateHolderElement=document.querySelector(`[data-selected-resources-name="${this.resourceName}"]`)}addToSelected(){let r=this.currentIds;r.push(this.resourceId),this.element.closest("tr")&&this.element.closest("tr").classList.add("selected-row"),this.currentIds=r}removeFromSelected(){this.element.closest("tr")&&this.element.closest("tr").classList.remove("selected-row"),this.currentIds=this.currentIds.filter(r=>r.toString()!==this.resourceId)}toggle(r){this.checkbox=r.target,this.checkbox.checked?this.addToSelected():this.removeFromSelected()}enableResourceActions(){this.actionLinks.forEach(r=>{r.dataset.resourceName===this.resourceName&&(r.classList.remove(r.dataset.disabledClasses),r.setAttribute("data-href",r.getAttribute("href")),r.dataset.disabled=!1,r.removeAttribute("tabindex"),r.setAttribute("aria-disabled","false"))})}disableResourceActions(){this.actionLinks.forEach(r=>{r.dataset.resourceName===this.resourceName&&(r.classList.add(r.dataset.disabledClasses),r.setAttribute("href",r.getAttribute("data-href")),r.dataset.disabled=!0,r.setAttribute("tabindex","-1"),r.setAttribute("aria-disabled","true"))})}};var xF=class extends Zt{static targets=["input","section","row","empty"];connect(){this.modal=this.element.closest(".modal"),this.modal&&(this.handleToggle=this.onModalToggle.bind(this),this.modal.addEventListener("toggle",this.handleToggle))}disconnect(){this.modal&&this.modal.removeEventListener("toggle",this.handleToggle)}onModalToggle(r){r.newState==="open"?(this.reset(),requestAnimationFrame(()=>this.inputTarget.focus())):this.reset()}filter(){let r=this.inputTarget.value.trim().toLowerCase(),e=!1;this.sectionTargets.forEach(t=>{let n=!1;this.rowsFor(t).forEach(i=>{let o=r===""||this.searchText(i).includes(r);i.hidden=!o,o&&(n=!0)}),t.hidden=!n,n&&(e=!0)}),this.hasEmptyTarget&&(this.emptyTarget.hidden=e||r==="")}clearOnEscape(r){this.inputTarget.value!==""&&(r.stopPropagation(),this.reset(),this.inputTarget.focus())}reset(){this.inputTarget.value="",this.filter()}rowsFor(r){return this.rowTargets.filter(e=>r.contains(e))}searchText(r){return r.dataset.searchText||(r.dataset.searchText=r.textContent.replace(/\s+/g," ").trim().toLowerCase()),r.dataset.searchText}};function xMe(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function x3t(r){if(Array.isArray(r))return r}function _3t(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var n,i,o,a,l=[],u=!0,f=!1;try{if(o=(t=t.call(r)).next,e!==0)for(;!(u=(n=o.call(t)).done)&&(l.push(n.value),l.length!==e);u=!0);}catch(p){f=!0,i=p}finally{try{if(!u&&t.return!=null&&(a=t.return(),Object(a)!==a))return}finally{if(f)throw i}}return l}}function w3t(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
661
661
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function S3t(r,e){return x3t(r)||_3t(r,e)||T3t(r,e)||w3t()}function T3t(r,e){if(r){if(typeof r=="string")return xMe(r,e);var t={}.toString.call(r).slice(8,-1);return t==="Object"&&r.constructor&&(t=r.constructor.name),t==="Map"||t==="Set"?Array.from(r):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?xMe(r,e):void 0}}var PMe=Object.entries,_Me=Object.setPrototypeOf,k3t=Object.isFrozen,E3t=Object.getPrototypeOf,A3t=Object.getOwnPropertyDescriptor,dc=Object.freeze,pc=Object.seal,RS=Object.create,RMe=typeof Reflect<"u"&&Reflect,dG=RMe.apply,pG=RMe.construct;dc||(dc=function(e){return e});pc||(pc=function(e){return e});dG||(dG=function(e,t){for(var n=arguments.length,i=new Array(n>2?n-2:0),o=2;o<n;o++)i[o-2]=arguments[o];return e.apply(t,i)});pG||(pG=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return new e(...n)});var IC=Vl(Array.prototype.forEach),C3t=Vl(Array.prototype.lastIndexOf),wMe=Vl(Array.prototype.pop),PS=Vl(Array.prototype.push),D3t=Vl(Array.prototype.splice),jb=Array.isArray,LC=Vl(String.prototype.toLowerCase),lG=Vl(String.prototype.toString),SMe=Vl(String.prototype.match),OC=Vl(String.prototype.replace),TMe=Vl(String.prototype.indexOf),I3t=Vl(String.prototype.trim),O3t=Vl(Number.prototype.toString),M3t=Vl(Boolean.prototype.toString),kMe=typeof BigInt>"u"?null:Vl(BigInt.prototype.toString),EMe=typeof Symbol>"u"?null:Vl(Symbol.prototype.toString),Lu=Vl(Object.prototype.hasOwnProperty),MC=Vl(Object.prototype.toString),fc=Vl(RegExp.prototype.test),n_=L3t(TypeError);function Vl(r){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return dG(r,e,n)}}function L3t(r){return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return pG(r,t)}}function Po(r,e){let t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:LC;if(_Me&&_Me(r,null),!jb(e))return r;let n=e.length;for(;n--;){let i=e[n];if(typeof i=="string"){let o=t(i);o!==i&&(k3t(e)||(e[n]=o),i=o)}r[i]=!0}return r}function P3t(r){for(let e=0;e<r.length;e++)Lu(r,e)||(r[e]=null);return r}function kh(r){let e=RS(null);for(let n of PMe(r)){var t=S3t(n,2);let i=t[0],o=t[1];Lu(r,i)&&(jb(o)?e[i]=P3t(o):o&&typeof o=="object"&&o.constructor===Object?e[i]=kh(o):e[i]=o)}return e}function R3t(r){switch(typeof r){case"string":return r;case"number":return O3t(r);case"boolean":return M3t(r);case"bigint":return kMe?kMe(r):"0";case"symbol":return EMe?EMe(r):"Symbol()";case"undefined":return MC(r);case"function":case"object":{if(r===null)return MC(r);let e=r,t=xg(e,"toString");if(typeof t=="function"){let n=t(e);return typeof n=="string"?n:MC(n)}return MC(r)}default:return MC(r)}}function xg(r,e){for(;r!==null;){let n=A3t(r,e);if(n){if(n.get)return Vl(n.get);if(typeof n.value=="function")return Vl(n.value)}r=E3t(r)}function t(){return null}return t}function q3t(r){try{return fc(r,""),!0}catch{return!1}}var AMe=dc(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),uG=dc(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),cG=dc(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),F3t=dc(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),hG=dc(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),N3t=dc(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),CMe=dc(["#text"]),DMe=dc(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),fG=dc(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),IMe=dc(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),_F=dc(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),B3t=pc(/{{[\w\W]*|^[\w\W]*}}/g),z3t=pc(/<%[\w\W]*|^[\w\W]*%>/g),U3t=pc(/\${[\w\W]*/g),j3t=pc(/^data-[\-\w.\u00B7-\uFFFF]+$/),V3t=pc(/^aria-[\-\w]+$/),OMe=pc(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),H3t=pc(/^(?:\w+script|data):/i),W3t=pc(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),$3t=pc(/^html$/i),G3t=pc(/^[a-z][.\w]*(-[.\w]+)+$/i),MMe=pc(/<[/\w!]/g),K3t=pc(/<[/\w]/g),Y3t=pc(/<\/no(script|embed|frames)/i),Z3t=pc(/\/>/i),bg={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},X3t=function(){return typeof window>"u"?null:window},J3t=function(e,t){if(typeof e!="object"||typeof e.createPolicy!="function")return null;let n=null,i="data-tt-policy-suffix";t&&t.hasAttribute(i)&&(n=t.getAttribute(i));let o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},LMe=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Ub=function(e,t,n,i){return Lu(e,t)&&jb(e[t])?Po(i.base?kh(i.base):{},e[t],i.transform):n};function qMe(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:X3t(),e=nr=>qMe(nr);if(e.version="3.4.11",e.removed=[],!r||!r.document||r.document.nodeType!==bg.document||!r.Element)return e.isSupported=!1,e;let t=r.document,n=t,i=n.currentScript;r.DocumentFragment;let o=r.HTMLTemplateElement,a=r.Node,l=r.Element,u=r.NodeFilter,f=r.NamedNodeMap;f===void 0&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;let p=r.DOMParser,x=r.trustedTypes,S=l.prototype,C=xg(S,"cloneNode"),M=xg(S,"remove"),L=xg(S,"nextSibling"),R=xg(S,"childNodes"),H=xg(S,"parentNode"),$=xg(S,"shadowRoot"),Q=xg(S,"attributes"),G=a&&a.prototype?xg(a.prototype,"nodeType"):null,te=a&&a.prototype?xg(a.prototype,"nodeName"):null;if(typeof o=="function"){let nr=t.createElement("template");nr.content&&nr.content.ownerDocument&&(t=nr.content.ownerDocument)}let fe,oe="",ve,xe=!1,Pe=0,ke=function(){if(Pe>0)throw n_('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},z=function(Ye){ke(),Pe++;try{return fe.createHTML(Ye)}finally{Pe--}},U=function(Ye){ke(),Pe++;try{return fe.createScriptURL(Ye)}finally{Pe--}},ge=function(){return xe||(ve=J3t(x,i),xe=!0),ve},Ie=t,ce=Ie.implementation,re=Ie.createNodeIterator,he=Ie.createDocumentFragment,Me=Ie.getElementsByTagName,ye=n.importNode,se=LMe();e.isSupported=typeof PMe=="function"&&typeof H=="function"&&ce&&ce.createHTMLDocument!==void 0;let $e=B3t,bt=z3t,it=U3t,_t=j3t,ct=V3t,Lt=H3t,Ht=W3t,Nt=G3t,fr=OMe,Kt=null,Xt=Po({},[...AMe,...uG,...cG,...hG,...CMe]),vt=null,yt=Po({},[...DMe,...fG,...IMe,..._F]),Ke=Object.seal(RS(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),me=null,De=null,ze=Object.seal(RS(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),dr=!0,lt=!0,Ut=!1,Et=!0,Br=!1,ur=!0,Tr=!1,wr=!1,at=null,rt=null,Yt=!1,Kr=!1,ui=!1,gi=!1,Ri=!0,Wt=!1,Ft="user-content-",Pr=!0,br=!1,wn={},Cn=null,On=Po({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]),Wn=null,uo=Po({},["audio","video","img","source","image","track"]),Gn=null,K=Po({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Z="http://www.w3.org/1998/Math/MathML",ie="http://www.w3.org/2000/svg",be="http://www.w3.org/1999/xhtml",Oe=be,je=!1,et=null,Ee=Po({},[Z,ie,be],lG),Ue=dc(["mi","mo","mn","ms","mtext"]),ot=Po({},Ue),Dt=dc(["annotation-xml"]),jt=Po({},Dt),It=Po({},["title","style","font","a","script"]),Gt=null,kr=["application/xhtml+xml","text/html"],cr="text/html",Ot=null,xr=null,lr=t.createElement("form"),hr=function(Ye){return Ye instanceof RegExp||Ye instanceof Function},Sn=function(){let Ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(xr&&xr===Ye)return;(!Ye||typeof Ye!="object")&&(Ye={}),Ye=kh(Ye),Gt=kr.indexOf(Ye.PARSER_MEDIA_TYPE)===-1?cr:Ye.PARSER_MEDIA_TYPE,Ot=Gt==="application/xhtml+xml"?lG:LC,Kt=Ub(Ye,"ALLOWED_TAGS",Xt,{transform:Ot}),vt=Ub(Ye,"ALLOWED_ATTR",yt,{transform:Ot}),et=Ub(Ye,"ALLOWED_NAMESPACES",Ee,{transform:lG}),Gn=Ub(Ye,"ADD_URI_SAFE_ATTR",K,{transform:Ot,base:K}),Wn=Ub(Ye,"ADD_DATA_URI_TAGS",uo,{transform:Ot,base:uo}),Cn=Ub(Ye,"FORBID_CONTENTS",On,{transform:Ot}),me=Ub(Ye,"FORBID_TAGS",kh({}),{transform:Ot}),De=Ub(Ye,"FORBID_ATTR",kh({}),{transform:Ot}),wn=Lu(Ye,"USE_PROFILES")?Ye.USE_PROFILES&&typeof Ye.USE_PROFILES=="object"?kh(Ye.USE_PROFILES):Ye.USE_PROFILES:!1,dr=Ye.ALLOW_ARIA_ATTR!==!1,lt=Ye.ALLOW_DATA_ATTR!==!1,Ut=Ye.ALLOW_UNKNOWN_PROTOCOLS||!1,Et=Ye.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Br=Ye.SAFE_FOR_TEMPLATES||!1,ur=Ye.SAFE_FOR_XML!==!1,Tr=Ye.WHOLE_DOCUMENT||!1,Kr=Ye.RETURN_DOM||!1,ui=Ye.RETURN_DOM_FRAGMENT||!1,gi=Ye.RETURN_TRUSTED_TYPE||!1,Yt=Ye.FORCE_BODY||!1,Ri=Ye.SANITIZE_DOM!==!1,Wt=Ye.SANITIZE_NAMED_PROPS||!1,Pr=Ye.KEEP_CONTENT!==!1,br=Ye.IN_PLACE||!1,fr=q3t(Ye.ALLOWED_URI_REGEXP)?Ye.ALLOWED_URI_REGEXP:OMe,Oe=typeof Ye.NAMESPACE=="string"?Ye.NAMESPACE:be,ot=Lu(Ye,"MATHML_TEXT_INTEGRATION_POINTS")&&Ye.MATHML_TEXT_INTEGRATION_POINTS&&typeof Ye.MATHML_TEXT_INTEGRATION_POINTS=="object"?kh(Ye.MATHML_TEXT_INTEGRATION_POINTS):Po({},Ue),jt=Lu(Ye,"HTML_INTEGRATION_POINTS")&&Ye.HTML_INTEGRATION_POINTS&&typeof Ye.HTML_INTEGRATION_POINTS=="object"?kh(Ye.HTML_INTEGRATION_POINTS):Po({},Dt);let kt=Lu(Ye,"CUSTOM_ELEMENT_HANDLING")&&Ye.CUSTOM_ELEMENT_HANDLING&&typeof Ye.CUSTOM_ELEMENT_HANDLING=="object"?kh(Ye.CUSTOM_ELEMENT_HANDLING):RS(null);if(Ke=RS(null),Lu(kt,"tagNameCheck")&&hr(kt.tagNameCheck)&&(Ke.tagNameCheck=kt.tagNameCheck),Lu(kt,"attributeNameCheck")&&hr(kt.attributeNameCheck)&&(Ke.attributeNameCheck=kt.attributeNameCheck),Lu(kt,"allowCustomizedBuiltInElements")&&typeof kt.allowCustomizedBuiltInElements=="boolean"&&(Ke.allowCustomizedBuiltInElements=kt.allowCustomizedBuiltInElements),pc(Ke),Br&&(lt=!1),ui&&(Kr=!0),wn&&(Kt=Po({},CMe),vt=RS(null),wn.html===!0&&(Po(Kt,AMe),Po(vt,DMe)),wn.svg===!0&&(Po(Kt,uG),Po(vt,fG),Po(vt,_F)),wn.svgFilters===!0&&(Po(Kt,cG),Po(vt,fG),Po(vt,_F)),wn.mathMl===!0&&(Po(Kt,hG),Po(vt,IMe),Po(vt,_F))),ze.tagCheck=null,ze.attributeCheck=null,Lu(Ye,"ADD_TAGS")&&(typeof Ye.ADD_TAGS=="function"?ze.tagCheck=Ye.ADD_TAGS:jb(Ye.ADD_TAGS)&&(Kt===Xt&&(Kt=kh(Kt)),Po(Kt,Ye.ADD_TAGS,Ot))),Lu(Ye,"ADD_ATTR")&&(typeof Ye.ADD_ATTR=="function"?ze.attributeCheck=Ye.ADD_ATTR:jb(Ye.ADD_ATTR)&&(vt===yt&&(vt=kh(vt)),Po(vt,Ye.ADD_ATTR,Ot))),Lu(Ye,"ADD_URI_SAFE_ATTR")&&jb(Ye.ADD_URI_SAFE_ATTR)&&Po(Gn,Ye.ADD_URI_SAFE_ATTR,Ot),Lu(Ye,"FORBID_CONTENTS")&&jb(Ye.FORBID_CONTENTS)&&(Cn===On&&(Cn=kh(Cn)),Po(Cn,Ye.FORBID_CONTENTS,Ot)),Lu(Ye,"ADD_FORBID_CONTENTS")&&jb(Ye.ADD_FORBID_CONTENTS)&&(Cn===On&&(Cn=kh(Cn)),Po(Cn,Ye.ADD_FORBID_CONTENTS,Ot)),Pr&&(Kt["#text"]=!0),Tr&&Po(Kt,["html","head","body"]),Kt.table&&(Po(Kt,["tbody"]),delete me.tbody),Ye.TRUSTED_TYPES_POLICY){if(typeof Ye.TRUSTED_TYPES_POLICY.createHTML!="function")throw n_('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Ye.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw n_('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');let Ar=fe;fe=Ye.TRUSTED_TYPES_POLICY;try{oe=z("")}catch(pn){throw fe=Ar,pn}}else Ye.TRUSTED_TYPES_POLICY===null?(fe=void 0,oe=""):(fe===void 0&&(fe=ge()),fe&&typeof oe=="string"&&(oe=z("")));dc&&dc(Ye),xr=Ye},Sr=Po({},[...uG,...cG,...F3t]),Ve=Po({},[...hG,...N3t]),ar=function(Ye,kt,Ar){return kt.namespaceURI===be?Ye==="svg":kt.namespaceURI===Z?Ye==="svg"&&(Ar==="annotation-xml"||ot[Ar]):!!Sr[Ye]},er=function(Ye,kt,Ar){return kt.namespaceURI===be?Ye==="math":kt.namespaceURI===ie?Ye==="math"&&jt[Ar]:!!Ve[Ye]},qr=function(Ye,kt,Ar){return kt.namespaceURI===ie&&!jt[Ar]||kt.namespaceURI===Z&&!ot[Ar]?!1:!Ve[Ye]&&(It[Ye]||!Sr[Ye])},Wr=function(Ye){let kt=H(Ye);(!kt||!kt.tagName)&&(kt={namespaceURI:Oe,tagName:"template"});let Ar=LC(Ye.tagName),pn=LC(kt.tagName);return et[Ye.namespaceURI]?Ye.namespaceURI===ie?ar(Ar,kt,pn):Ye.namespaceURI===Z?er(Ar,kt,pn):Ye.namespaceURI===be?qr(Ar,kt,pn):!!(Gt==="application/xhtml+xml"&&et[Ye.namespaceURI]):!1},un=function(Ye){PS(e.removed,{element:Ye});try{H(Ye).removeChild(Ye)}catch{if(M(Ye),!H(Ye))throw n_("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},en=function(Ye){let kt=R(Ye);if(kt){let pn=[];IC(kt,ni=>{PS(pn,ni)}),IC(pn,ni=>{try{M(ni)}catch{}})}let Ar=Q(Ye);if(Ar)for(let pn=Ar.length-1;pn>=0;--pn){let ni=Ar[pn],ci=ni&&ni.name;if(typeof ci=="string")try{Ye.removeAttribute(ci)}catch{}}},pr=function(Ye,kt){try{PS(e.removed,{attribute:kt.getAttributeNode(Ye),from:kt})}catch{PS(e.removed,{attribute:null,from:kt})}if(kt.removeAttribute(Ye),Ye==="is")if(Kr||ui)try{un(kt)}catch{}else try{kt.setAttribute(Ye,"")}catch{}},cn=function(Ye){let kt=Q(Ye);if(kt)for(let Ar=kt.length-1;Ar>=0;--Ar){let pn=kt[Ar],ni=pn&&pn.name;if(!(typeof ni!="string"||vt[Ot(ni)]))try{Ye.removeAttribute(ni)}catch{}}},Dn=function(Ye){let kt=[Ye];for(;kt.length>0;){let Ar=kt.pop();(G?G(Ar):Ar.nodeType)===bg.element&&cn(Ar);let ni=R(Ar);if(ni)for(let ci=ni.length-1;ci>=0;--ci)kt.push(ni[ci])}},Mr=function(Ye){let kt=null,Ar=null;if(Yt)Ye="<remove></remove>"+Ye;else{let ci=SMe(Ye,/^[\r\n\t ]+/);Ar=ci&&ci[0]}Gt==="application/xhtml+xml"&&Oe===be&&(Ye='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Ye+"</body></html>");let pn=fe?z(Ye):Ye;if(Oe===be)try{kt=new p().parseFromString(pn,Gt)}catch{}if(!kt||!kt.documentElement){kt=ce.createDocument(Oe,"template",null);try{kt.documentElement.innerHTML=je?oe:pn}catch{}}let ni=kt.body||kt.documentElement;return Ye&&Ar&&ni.insertBefore(t.createTextNode(Ar),ni.childNodes[0]||null),Oe===be?Me.call(kt,Tr?"html":"body")[0]:Tr?kt.documentElement:ni},V=function(Ye){return re.call(Ye.ownerDocument||Ye,Ye,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},W=function(Ye){return Ye=OC(Ye,$e," "),Ye=OC(Ye,bt," "),Ye=OC(Ye,it," "),Ye},Se=function(Ye){var kt;Ye.normalize();let Ar=re.call(Ye.ownerDocument||Ye,Ye,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null),pn=Ar.nextNode();for(;pn;)pn.data=W(pn.data),pn=Ar.nextNode();let ni=(kt=Ye.querySelectorAll)===null||kt===void 0?void 0:kt.call(Ye,"template");ni&&IC(ni,ci=>{We(ci.content)&&Se(ci.content)})},Be=function(Ye){let kt=te?te(Ye):null;return typeof kt!="string"||Ot(kt)!=="form"?!1:typeof Ye.nodeName!="string"||typeof Ye.textContent!="string"||typeof Ye.removeChild!="function"||Ye.attributes!==Q(Ye)||typeof Ye.removeAttribute!="function"||typeof Ye.setAttribute!="function"||typeof Ye.namespaceURI!="string"||typeof Ye.insertBefore!="function"||typeof Ye.hasChildNodes!="function"||Ye.nodeType!==G(Ye)||Ye.childNodes!==R(Ye)},We=function(Ye){if(!G||typeof Ye!="object"||Ye===null)return!1;try{return G(Ye)===bg.documentFragment}catch{return!1}},xt=function(Ye){if(!G||typeof Ye!="object"||Ye===null)return!1;try{return typeof G(Ye)=="number"}catch{return!1}};function rr(nr,Ye,kt){nr.length!==0&&IC(nr,Ar=>{Ar.call(e,Ye,kt,xr)})}let Zr=function(Ye,kt){return!!(ur&&Ye.hasChildNodes()&&!xt(Ye.firstElementChild)&&fc(MMe,Ye.textContent)&&fc(MMe,Ye.innerHTML)||ur&&Ye.namespaceURI===be&&kt==="style"&&xt(Ye.firstElementChild)||Ye.nodeType===bg.processingInstruction||ur&&Ye.nodeType===bg.comment&&fc(K3t,Ye.data))},Yr=function(Ye,kt){if(!me[kt]&&Mn(kt)&&(Ke.tagNameCheck instanceof RegExp&&fc(Ke.tagNameCheck,kt)||Ke.tagNameCheck instanceof Function&&Ke.tagNameCheck(kt)))return!1;if(Pr&&!Cn[kt]){let Ar=H(Ye),pn=R(Ye);if(pn&&Ar){let ni=pn.length;for(let ci=ni-1;ci>=0;--ci){let Ao=br?pn[ci]:C(pn[ci],!0);Ar.insertBefore(Ao,L(Ye))}}}return un(Ye),!0},hn=function(Ye){if(rr(se.beforeSanitizeElements,Ye,null),Be(Ye))return un(Ye),!0;let kt=Ot(te?te(Ye):Ye.nodeName);if(rr(se.uponSanitizeElement,Ye,{tagName:kt,allowedTags:Kt}),Zr(Ye,kt))return un(Ye),!0;if(me[kt]||!(ze.tagCheck instanceof Function&&ze.tagCheck(kt))&&!Kt[kt])return Yr(Ye,kt);if((G?G(Ye):Ye.nodeType)===bg.element&&!Wr(Ye)||(kt==="noscript"||kt==="noembed"||kt==="noframes")&&fc(Y3t,Ye.innerHTML))return un(Ye),!0;if(Br&&Ye.nodeType===bg.text){let pn=W(Ye.textContent);Ye.textContent!==pn&&(PS(e.removed,{element:Ye.cloneNode()}),Ye.textContent=pn)}return rr(se.afterSanitizeElements,Ye,null),!1},Un=function(Ye,kt,Ar){if(De[kt]||Ri&&(kt==="id"||kt==="name")&&(Ar in t||Ar in lr))return!1;let pn=vt[kt]||ze.attributeCheck instanceof Function&&ze.attributeCheck(kt,Ye);if(!(lt&&fc(_t,kt))){if(!(dr&&fc(ct,kt))){if(pn){if(!Gn[kt]){if(!fc(fr,OC(Ar,Ht,""))){if(!((kt==="src"||kt==="xlink:href"||kt==="href")&&Ye!=="script"&&TMe(Ar,"data:")===0&&Wn[Ye])){if(!(Ut&&!fc(Lt,OC(Ar,Ht,"")))){if(Ar)return!1}}}}}else if(!(Mn(Ye)&&(Ke.tagNameCheck instanceof RegExp&&fc(Ke.tagNameCheck,Ye)||Ke.tagNameCheck instanceof Function&&Ke.tagNameCheck(Ye))&&(Ke.attributeNameCheck instanceof RegExp&&fc(Ke.attributeNameCheck,kt)||Ke.attributeNameCheck instanceof Function&&Ke.attributeNameCheck(kt,Ye))||kt==="is"&&Ke.allowCustomizedBuiltInElements&&(Ke.tagNameCheck instanceof RegExp&&fc(Ke.tagNameCheck,Ar)||Ke.tagNameCheck instanceof Function&&Ke.tagNameCheck(Ar))))return!1}}return!0},Er=Po({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Mn=function(Ye){return!Er[LC(Ye)]&&fc(Nt,Ye)},Xn=function(Ye,kt,Ar,pn){if(fe&&typeof x=="object"&&typeof x.getAttributeType=="function"&&!Ar)switch(x.getAttributeType(Ye,kt)){case"TrustedHTML":return z(pn);case"TrustedScriptURL":return U(pn)}return pn},rs=function(Ye,kt,Ar,pn){try{Ar?Ye.setAttributeNS(Ar,kt,pn):Ye.setAttribute(kt,pn),Be(Ye)?un(Ye):wMe(e.removed)}catch{pr(kt,Ye)}},go=function(Ye){rr(se.beforeSanitizeAttributes,Ye,null);let kt=Ye.attributes;if(!kt||Be(Ye))return;let Ar={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:vt,forceKeepAttr:void 0},pn=kt.length,ni=Ot(Ye.nodeName);for(;pn--;){let ci=kt[pn],Ao=ci.name,ji=ci.namespaceURI,Na=ci.value,ns=Ot(Ao),Ba=Na,Xo=Ao==="value"?Ba:I3t(Ba);if(Ar.attrName=ns,Ar.attrValue=Xo,Ar.keepAttr=!0,Ar.forceKeepAttr=void 0,rr(se.uponSanitizeAttribute,Ye,Ar),Xo=Ar.attrValue,Wt&&(ns==="id"||ns==="name")&&TMe(Xo,Ft)!==0&&(pr(Ao,Ye),Xo=Ft+Xo),ur&&fc(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Xo)){pr(Ao,Ye);continue}if(ns==="attributename"&&SMe(Xo,"href")){pr(Ao,Ye);continue}if(!Ar.forceKeepAttr){if(!Ar.keepAttr){pr(Ao,Ye);continue}if(!Et&&fc(Z3t,Xo)){pr(Ao,Ye);continue}if(Br&&(Xo=W(Xo)),!Un(ni,ns,Xo)){pr(Ao,Ye);continue}Xo=Xn(ni,ns,ji,Xo),Xo!==Ba&&rs(Ye,Ao,ji,Xo)}}rr(se.afterSanitizeAttributes,Ye,null)},qu=function(Ye){let kt=null,Ar=V(Ye);for(rr(se.beforeSanitizeShadowDOM,Ye,null);kt=Ar.nextNode();)if(rr(se.uponSanitizeShadowNode,kt,null),hn(kt),go(kt),We(kt.content)&&qu(kt.content),(G?G(kt):kt.nodeType)===bg.element){let ni=$(kt);We(ni)&&(Fa(ni),qu(ni))}rr(se.afterSanitizeShadowDOM,Ye,null)},Fa=function(Ye){let kt=[{node:Ye,shadow:null}];for(;kt.length>0;){let Ar=kt.pop();if(Ar.shadow){qu(Ar.shadow);continue}let pn=Ar.node,ci=(G?G(pn):pn.nodeType)===bg.element,Ao=R(pn);if(Ao)for(let ji=Ao.length-1;ji>=0;--ji)kt.push({node:Ao[ji],shadow:null});if(ci){let ji=te?te(pn):null;if(typeof ji=="string"&&Ot(ji)==="template"){let Na=pn.content;We(Na)&&kt.push({node:Na,shadow:null})}}if(ci){let ji=$(pn);We(ji)&&kt.push({node:null,shadow:ji},{node:ji,shadow:null})}}};return e.sanitize=function(nr){let Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},kt=null,Ar=null,pn=null,ni=null;if(je=!nr,je&&(nr="<!-->"),typeof nr!="string"&&!xt(nr)&&(nr=R3t(nr),typeof nr!="string"))throw n_("dirty is not a string, aborting");if(!e.isSupported)return nr;wr?(Kt=at,vt=rt):Sn(Ye),(se.uponSanitizeElement.length>0||se.uponSanitizeAttribute.length>0)&&(Kt=kh(Kt)),se.uponSanitizeAttribute.length>0&&(vt=kh(vt)),e.removed=[];let ci=br&&typeof nr!="string"&&xt(nr);if(ci){let Na=te?te(nr):nr.nodeName;if(typeof Na=="string"){let ns=Ot(Na);if(!Kt[ns]||me[ns])throw n_("root node is forbidden and cannot be sanitized in-place")}if(Be(nr))throw n_("root node is clobbered and cannot be sanitized in-place");try{Fa(nr)}catch(ns){throw en(nr),ns}}else if(xt(nr))kt=Mr("<!---->"),Ar=kt.ownerDocument.importNode(nr,!0),Ar.nodeType===bg.element&&Ar.nodeName==="BODY"||Ar.nodeName==="HTML"?kt=Ar:kt.appendChild(Ar),Fa(Ar);else{if(!Kr&&!Br&&!Tr&&nr.indexOf("<")===-1)return fe&&gi?z(nr):nr;if(kt=Mr(nr),!kt)return Kr?null:gi?oe:""}kt&&Yt&&un(kt.firstChild);let Ao=V(ci?nr:kt);try{for(;pn=Ao.nextNode();)hn(pn),go(pn),We(pn.content)&&qu(pn.content)}catch(Na){throw ci&&en(nr),Na}if(ci)return IC(e.removed,Na=>{Na.element&&Dn(Na.element)}),Br&&Se(nr),nr;if(Kr){if(Br&&Se(kt),ui)for(ni=he.call(kt.ownerDocument);kt.firstChild;)ni.appendChild(kt.firstChild);else ni=kt;return(vt.shadowroot||vt.shadowrootmode)&&(ni=ye.call(n,ni,!0)),ni}let ji=Tr?kt.outerHTML:kt.innerHTML;return Tr&&Kt["!doctype"]&&kt.ownerDocument&&kt.ownerDocument.doctype&&kt.ownerDocument.doctype.name&&fc($3t,kt.ownerDocument.doctype.name)&&(ji="<!DOCTYPE "+kt.ownerDocument.doctype.name+`>
|
|
662
662
|
`+ji),Br&&(ji=W(ji)),fe&&gi?z(ji):ji},e.setConfig=function(){let nr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Sn(nr),wr=!0,at=Kt,rt=vt},e.clearConfig=function(){xr=null,wr=!1,at=null,rt=null,fe=ve,oe=""},e.isValidAttribute=function(nr,Ye,kt){xr||Sn({});let Ar=Ot(nr),pn=Ot(Ye);return Un(Ar,pn,kt)},e.addHook=function(nr,Ye){typeof Ye=="function"&&Lu(se,nr)&&PS(se[nr],Ye)},e.removeHook=function(nr,Ye){if(Lu(se,nr)){if(Ye!==void 0){let kt=C3t(se[nr],Ye);return kt===-1?void 0:D3t(se[nr],kt,1)[0]}return wMe(se[nr])}},e.removeHooks=function(nr){Lu(se,nr)&&(se[nr]=[])},e.removeAllHooks=function(){se=LMe()},e}var mG=qMe();function FMe(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(r);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,n)}return t}function wg(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?FMe(Object(t),!0).forEach(function(n){Q3t(r,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):FMe(Object(t)).forEach(function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))})}return r}function EF(r){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?EF=function(e){return typeof e}:EF=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},EF(r)}function Q3t(r,e,t){return e in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function Nv(){return Nv=Object.assign||function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},Nv.apply(this,arguments)}function e5t(r,e){if(r==null)return{};var t={},n=Object.keys(r),i,o;for(o=0;o<n.length;o++)i=n[o],!(e.indexOf(i)>=0)&&(t[i]=r[i]);return t}function t5t(r,e){if(r==null)return{};var t=e5t(r,e),n,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);for(i=0;i<o.length;i++)n=o[i],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(r,n)&&(t[n]=r[n])}return t}var r5t="1.15.6";function Fv(r){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(r)}var Bv=Fv(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),jC=Fv(/Edge/i),NMe=Fv(/firefox/i),FC=Fv(/safari/i)&&!Fv(/chrome/i)&&!Fv(/android/i),DG=Fv(/iP(ad|od|hone)/i),$Me=Fv(/chrome/i)&&Fv(/android/i),GMe={capture:!1,passive:!1};function Eo(r,e,t){r.addEventListener(e,t,!Bv&&GMe)}function bo(r,e,t){r.removeEventListener(e,t,!Bv&&GMe)}function OF(r,e){if(e){if(e[0]===">"&&(e=e.substring(1)),r)try{if(r.matches)return r.matches(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e)}catch{return!1}return!1}}function KMe(r){return r.host&&r!==document&&r.host.nodeType?r.host:r.parentNode}function bm(r,e,t,n){if(r){t=t||document;do{if(e!=null&&(e[0]===">"?r.parentNode===t&&OF(r,e):OF(r,e))||n&&r===t)return r;if(r===t)break}while(r=KMe(r))}return null}var BMe=/\s+/g;function dd(r,e,t){if(r&&e)if(r.classList)r.classList[t?"add":"remove"](e);else{var n=(" "+r.className+" ").replace(BMe," ").replace(" "+e+" "," ");r.className=(n+(t?" "+e:"")).replace(BMe," ")}}function yi(r,e,t){var n=r&&r.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(r,""):r.currentStyle&&(t=r.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function zS(r,e){var t="";if(typeof r=="string")t=r;else do{var n=yi(r,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(r=r.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(t)}function YMe(r,e,t){if(r){var n=r.getElementsByTagName(e),i=0,o=n.length;if(t)for(;i<o;i++)t(n[i],i);return n}return[]}function _g(){var r=document.scrollingElement;return r||document.documentElement}function Wl(r,e,t,n,i){if(!(!r.getBoundingClientRect&&r!==window)){var o,a,l,u,f,p,x;if(r!==window&&r.parentNode&&r!==_g()?(o=r.getBoundingClientRect(),a=o.top,l=o.left,u=o.bottom,f=o.right,p=o.height,x=o.width):(a=0,l=0,u=window.innerHeight,f=window.innerWidth,p=window.innerHeight,x=window.innerWidth),(e||t)&&r!==window&&(i=i||r.parentNode,!Bv))do if(i&&i.getBoundingClientRect&&(yi(i,"transform")!=="none"||t&&yi(i,"position")!=="static")){var S=i.getBoundingClientRect();a-=S.top+parseInt(yi(i,"border-top-width")),l-=S.left+parseInt(yi(i,"border-left-width")),u=a+o.height,f=l+o.width;break}while(i=i.parentNode);if(n&&r!==window){var C=zS(i||r),M=C&&C.a,L=C&&C.d;C&&(a/=L,l/=M,x/=M,p/=L,u=a+p,f=l+x)}return{top:a,left:l,bottom:u,right:f,width:x,height:p}}}function zMe(r,e,t){for(var n=Wb(r,!0),i=Wl(r)[e];n;){var o=Wl(n)[t],a=void 0;if(t==="top"||t==="left"?a=i>=o:a=i<=o,!a)return n;if(n===_g())break;n=Wb(n,!1)}return!1}function US(r,e,t,n){for(var i=0,o=0,a=r.children;o<a.length;){if(a[o].style.display!=="none"&&a[o]!==bi.ghost&&(n||a[o]!==bi.dragged)&&bm(a[o],t.draggable,r,!1)){if(i===e)return a[o];i++}o++}return null}function IG(r,e){for(var t=r.lastElementChild;t&&(t===bi.ghost||yi(t,"display")==="none"||e&&!OF(t,e));)t=t.previousElementSibling;return t||null}function hp(r,e){var t=0;if(!r||!r.parentNode)return-1;for(;r=r.previousElementSibling;)r.nodeName.toUpperCase()!=="TEMPLATE"&&r!==bi.clone&&(!e||OF(r,e))&&t++;return t}function UMe(r){var e=0,t=0,n=_g();if(r)do{var i=zS(r),o=i.a,a=i.d;e+=r.scrollLeft*o,t+=r.scrollTop*a}while(r!==n&&(r=r.parentNode));return[e,t]}function n5t(r,e){for(var t in r)if(r.hasOwnProperty(t)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===r[t][n])return Number(t)}return-1}function Wb(r,e){if(!r||!r.getBoundingClientRect)return _g();var t=r,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var i=yi(t);if(t.clientWidth<t.scrollWidth&&(i.overflowX=="auto"||i.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(i.overflowY=="auto"||i.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return _g();if(n||e)return t;n=!0}}while(t=t.parentNode);return _g()}function i5t(r,e){if(r&&e)for(var t in e)e.hasOwnProperty(t)&&(r[t]=e[t]);return r}function gG(r,e){return Math.round(r.top)===Math.round(e.top)&&Math.round(r.left)===Math.round(e.left)&&Math.round(r.height)===Math.round(e.height)&&Math.round(r.width)===Math.round(e.width)}var NC;function ZMe(r,e){return function(){if(!NC){var t=arguments,n=this;t.length===1?r.call(n,t[0]):r.apply(n,t),NC=setTimeout(function(){NC=void 0},e)}}}function o5t(){clearTimeout(NC),NC=void 0}function XMe(r,e,t){r.scrollLeft+=e,r.scrollTop+=t}function JMe(r){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(r).cloneNode(!0):t?t(r).clone(!0)[0]:r.cloneNode(!0)}function QMe(r,e,t){var n={};return Array.from(r.children).forEach(function(i){var o,a,l,u;if(!(!bm(i,e.draggable,r,!1)||i.animated||i===t)){var f=Wl(i);n.left=Math.min((o=n.left)!==null&&o!==void 0?o:1/0,f.left),n.top=Math.min((a=n.top)!==null&&a!==void 0?a:1/0,f.top),n.right=Math.max((l=n.right)!==null&&l!==void 0?l:-1/0,f.right),n.bottom=Math.max((u=n.bottom)!==null&&u!==void 0?u:-1/0,f.bottom)}}),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var Cf="Sortable"+new Date().getTime();function a5t(){var r=[],e;return{captureAnimationState:function(){if(r=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(i){if(!(yi(i,"display")==="none"||i===bi.ghost)){r.push({target:i,rect:Wl(i)});var o=wg({},r[r.length-1].rect);if(i.thisAnimationDuration){var a=zS(i,!0);a&&(o.top-=a.f,o.left-=a.e)}i.fromRect=o}})}},addAnimationState:function(n){r.push(n)},removeAnimationState:function(n){r.splice(n5t(r,{target:n}),1)},animateAll:function(n){var i=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var o=!1,a=0;r.forEach(function(l){var u=0,f=l.target,p=f.fromRect,x=Wl(f),S=f.prevFromRect,C=f.prevToRect,M=l.rect,L=zS(f,!0);L&&(x.top-=L.f,x.left-=L.e),f.toRect=x,f.thisAnimationDuration&&gG(S,x)&&!gG(p,x)&&(M.top-x.top)/(M.left-x.left)===(p.top-x.top)/(p.left-x.left)&&(u=l5t(M,S,C,i.options)),gG(x,p)||(f.prevFromRect=p,f.prevToRect=x,u||(u=i.options.animation),i.animate(f,M,x,u)),u&&(o=!0,a=Math.max(a,u),clearTimeout(f.animationResetTimer),f.animationResetTimer=setTimeout(function(){f.animationTime=0,f.prevFromRect=null,f.fromRect=null,f.prevToRect=null,f.thisAnimationDuration=null},u),f.thisAnimationDuration=u)}),clearTimeout(e),o?e=setTimeout(function(){typeof n=="function"&&n()},a):typeof n=="function"&&n(),r=[]},animate:function(n,i,o,a){if(a){yi(n,"transition",""),yi(n,"transform","");var l=zS(this.el),u=l&&l.a,f=l&&l.d,p=(i.left-o.left)/(u||1),x=(i.top-o.top)/(f||1);n.animatingX=!!p,n.animatingY=!!x,yi(n,"transform","translate3d("+p+"px,"+x+"px,0)"),this.forRepaintDummy=s5t(n),yi(n,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),yi(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){yi(n,"transition",""),yi(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},a)}}}}function s5t(r){return r.offsetWidth}function l5t(r,e,t,n){return Math.sqrt(Math.pow(e.top-r.top,2)+Math.pow(e.left-r.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*n.animation}var qS=[],vG={initializeByDefault:!0},VC={mount:function(e){for(var t in vG)vG.hasOwnProperty(t)&&!(t in e)&&(e[t]=vG[t]);qS.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),qS.push(e)},pluginEvent:function(e,t,n){var i=this;this.eventCanceled=!1,n.cancel=function(){i.eventCanceled=!0};var o=e+"Global";qS.forEach(function(a){t[a.pluginName]&&(t[a.pluginName][o]&&t[a.pluginName][o](wg({sortable:t},n)),t.options[a.pluginName]&&t[a.pluginName][e]&&t[a.pluginName][e](wg({sortable:t},n)))})},initializePlugins:function(e,t,n,i){qS.forEach(function(l){var u=l.pluginName;if(!(!e.options[u]&&!l.initializeByDefault)){var f=new l(e,t,e.options);f.sortable=e,f.options=e.options,e[u]=f,Nv(n,f.defaults)}});for(var o in e.options)if(e.options.hasOwnProperty(o)){var a=this.modifyOption(e,o,e.options[o]);typeof a<"u"&&(e.options[o]=a)}},getEventProperties:function(e,t){var n={};return qS.forEach(function(i){typeof i.eventProperties=="function"&&Nv(n,i.eventProperties.call(t[i.pluginName],e))}),n},modifyOption:function(e,t,n){var i;return qS.forEach(function(o){e[o.pluginName]&&o.optionListeners&&typeof o.optionListeners[t]=="function"&&(i=o.optionListeners[t].call(e[o.pluginName],n))}),i}};function u5t(r){var e=r.sortable,t=r.rootEl,n=r.name,i=r.targetEl,o=r.cloneEl,a=r.toEl,l=r.fromEl,u=r.oldIndex,f=r.newIndex,p=r.oldDraggableIndex,x=r.newDraggableIndex,S=r.originalEvent,C=r.putSortable,M=r.extraEventProperties;if(e=e||t&&t[Cf],!!e){var L,R=e.options,H="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!Bv&&!jC?L=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(L=document.createEvent("Event"),L.initEvent(n,!0,!0)),L.to=a||t,L.from=l||t,L.item=i||t,L.clone=o,L.oldIndex=u,L.newIndex=f,L.oldDraggableIndex=p,L.newDraggableIndex=x,L.originalEvent=S,L.pullMode=C?C.lastPutMode:void 0;var $=wg(wg({},M),VC.getEventProperties(n,e));for(var Q in $)L[Q]=$[Q];t&&t.dispatchEvent(L),R[H]&&R[H].call(e,L)}}var c5t=["evt"],Af=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=n.evt,o=t5t(n,c5t);VC.pluginEvent.bind(bi)(e,t,wg({dragEl:an,parentEl:Xs,ghostEl:Oi,rootEl:ks,nextEl:a_,lastDownEl:AF,cloneEl:Us,cloneHidden:Hb,dragStarted:PC,putSortable:mc,activeSortable:bi.active,originalEvent:i,oldIndex:BS,oldDraggableIndex:BC,newIndex:pd,newDraggableIndex:Vb,hideGhostForTarget:nLe,unhideGhostForTarget:iLe,cloneNowHidden:function(){Hb=!0},cloneNowShown:function(){Hb=!1},dispatchSortableEvent:function(l){Eh({sortable:t,name:l,originalEvent:i})}},o))};function Eh(r){u5t(wg({putSortable:mc,cloneEl:Us,targetEl:an,rootEl:ks,oldIndex:BS,oldDraggableIndex:BC,newIndex:pd,newDraggableIndex:Vb},r))}var an,Xs,Oi,ks,a_,AF,Us,Hb,BS,pd,BC,Vb,wF,mc,NS=!1,MF=!1,LF=[],i_,ym,yG,bG,jMe,VMe,PC,FS,zC,UC=!1,SF=!1,CF,Wc,xG=[],kG=!1,PF=[],qF=typeof document<"u",TF=DG,HMe=jC||Bv?"cssFloat":"float",h5t=qF&&!$Me&&!DG&&"draggable"in document.createElement("div"),eLe=(function(){if(qF){if(Bv)return!1;var r=document.createElement("x");return r.style.cssText="pointer-events:auto",r.style.pointerEvents==="auto"}})(),tLe=function(e,t){var n=yi(e),i=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),o=US(e,0,t),a=US(e,1,t),l=o&&yi(o),u=a&&yi(a),f=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+Wl(o).width,p=u&&parseInt(u.marginLeft)+parseInt(u.marginRight)+Wl(a).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&l.float&&l.float!=="none"){var x=l.float==="left"?"left":"right";return a&&(u.clear==="both"||u.clear===x)?"vertical":"horizontal"}return o&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||f>=i&&n[HMe]==="none"||a&&n[HMe]==="none"&&f+p>i)?"vertical":"horizontal"},f5t=function(e,t,n){var i=n?e.left:e.top,o=n?e.right:e.bottom,a=n?e.width:e.height,l=n?t.left:t.top,u=n?t.right:t.bottom,f=n?t.width:t.height;return i===l||o===u||i+a/2===l+f/2},d5t=function(e,t){var n;return LF.some(function(i){var o=i[Cf].options.emptyInsertThreshold;if(!(!o||IG(i))){var a=Wl(i),l=e>=a.left-o&&e<=a.right+o,u=t>=a.top-o&&t<=a.bottom+o;if(l&&u)return n=i}}),n},rLe=function(e){function t(o,a){return function(l,u,f,p){var x=l.options.group.name&&u.options.group.name&&l.options.group.name===u.options.group.name;if(o==null&&(a||x))return!0;if(o==null||o===!1)return!1;if(a&&o==="clone")return o;if(typeof o=="function")return t(o(l,u,f,p),a)(l,u,f,p);var S=(a?l:u).options.group.name;return o===!0||typeof o=="string"&&o===S||o.join&&o.indexOf(S)>-1}}var n={},i=e.group;(!i||EF(i)!="object")&&(i={name:i}),n.name=i.name,n.checkPull=t(i.pull,!0),n.checkPut=t(i.put),n.revertClone=i.revertClone,e.group=n},nLe=function(){!eLe&&Oi&&yi(Oi,"display","none")},iLe=function(){!eLe&&Oi&&yi(Oi,"display","")};qF&&!$Me&&document.addEventListener("click",function(r){if(MF)return r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.stopImmediatePropagation&&r.stopImmediatePropagation(),MF=!1,!1},!0);var o_=function(e){if(an){e=e.touches?e.touches[0]:e;var t=d5t(e.clientX,e.clientY);if(t){var n={};for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[Cf]._onDragOver(n)}}},p5t=function(e){an&&an.parentNode[Cf]._isOutsideThisEl(e.target)};function bi(r,e){if(!(r&&r.nodeType&&r.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(r));this.el=r,this.options=e=Nv({},e),r[Cf]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(r.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return tLe(r,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(a,l){a.setData("Text",l.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:bi.supportPointer!==!1&&"PointerEvent"in window&&(!FC||DG),emptyInsertThreshold:5};VC.initializePlugins(this,r,t);for(var n in t)!(n in e)&&(e[n]=t[n]);rLe(e);for(var i in this)i.charAt(0)==="_"&&typeof this[i]=="function"&&(this[i]=this[i].bind(this));this.nativeDraggable=e.forceFallback?!1:h5t,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?Eo(r,"pointerdown",this._onTapStart):(Eo(r,"mousedown",this._onTapStart),Eo(r,"touchstart",this._onTapStart)),this.nativeDraggable&&(Eo(r,"dragover",this),Eo(r,"dragenter",this)),LF.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),Nv(this,a5t())}bi.prototype={constructor:bi,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(FS=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,an):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,i=this.options,o=i.preventOnFilter,a=e.type,l=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,u=(l||e).target,f=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||u,p=i.filter;if(w5t(n),!an&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||i.disabled)&&!f.isContentEditable&&!(!this.nativeDraggable&&FC&&u&&u.tagName.toUpperCase()==="SELECT")&&(u=bm(u,i.draggable,n,!1),!(u&&u.animated)&&AF!==u)){if(BS=hp(u),BC=hp(u,i.draggable),typeof p=="function"){if(p.call(this,e,u,this)){Eh({sortable:t,rootEl:f,name:"filter",targetEl:u,toEl:n,fromEl:n}),Af("filter",t,{evt:e}),o&&e.preventDefault();return}}else if(p&&(p=p.split(",").some(function(x){if(x=bm(f,x.trim(),n,!1),x)return Eh({sortable:t,rootEl:x,name:"filter",targetEl:u,fromEl:n,toEl:n}),Af("filter",t,{evt:e}),!0}),p)){o&&e.preventDefault();return}i.handle&&!bm(f,i.handle,n,!1)||this._prepareDragStart(e,l,u)}}},_prepareDragStart:function(e,t,n){var i=this,o=i.el,a=i.options,l=o.ownerDocument,u;if(n&&!an&&n.parentNode===o){var f=Wl(n);if(ks=o,an=n,Xs=an.parentNode,a_=an.nextSibling,AF=n,wF=a.group,bi.dragged=an,i_={target:an,clientX:(t||e).clientX,clientY:(t||e).clientY},jMe=i_.clientX-f.left,VMe=i_.clientY-f.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,an.style["will-change"]="all",u=function(){if(Af("delayEnded",i,{evt:e}),bi.eventCanceled){i._onDrop();return}i._disableDelayedDragEvents(),!NMe&&i.nativeDraggable&&(an.draggable=!0),i._triggerDragStart(e,t),Eh({sortable:i,name:"choose",originalEvent:e}),dd(an,a.chosenClass,!0)},a.ignore.split(",").forEach(function(p){YMe(an,p.trim(),_G)}),Eo(l,"dragover",o_),Eo(l,"mousemove",o_),Eo(l,"touchmove",o_),a.supportPointer?(Eo(l,"pointerup",i._onDrop),!this.nativeDraggable&&Eo(l,"pointercancel",i._onDrop)):(Eo(l,"mouseup",i._onDrop),Eo(l,"touchend",i._onDrop),Eo(l,"touchcancel",i._onDrop)),NMe&&this.nativeDraggable&&(this.options.touchStartThreshold=4,an.draggable=!0),Af("delayStart",this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(jC||Bv))){if(bi.eventCanceled){this._onDrop();return}a.supportPointer?(Eo(l,"pointerup",i._disableDelayedDrag),Eo(l,"pointercancel",i._disableDelayedDrag)):(Eo(l,"mouseup",i._disableDelayedDrag),Eo(l,"touchend",i._disableDelayedDrag),Eo(l,"touchcancel",i._disableDelayedDrag)),Eo(l,"mousemove",i._delayedDragTouchMoveHandler),Eo(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&Eo(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(u,a.delay)}else u()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){an&&_G(an),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;bo(e,"mouseup",this._disableDelayedDrag),bo(e,"touchend",this._disableDelayedDrag),bo(e,"touchcancel",this._disableDelayedDrag),bo(e,"pointerup",this._disableDelayedDrag),bo(e,"pointercancel",this._disableDelayedDrag),bo(e,"mousemove",this._delayedDragTouchMoveHandler),bo(e,"touchmove",this._delayedDragTouchMoveHandler),bo(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?Eo(document,"pointermove",this._onTouchMove):t?Eo(document,"touchmove",this._onTouchMove):Eo(document,"mousemove",this._onTouchMove):(Eo(an,"dragend",this),Eo(ks,"dragstart",this._onDragStart));try{document.selection?DF(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(NS=!1,ks&&an){Af("dragStarted",this,{evt:t}),this.nativeDraggable&&Eo(document,"dragover",p5t);var n=this.options;!e&&dd(an,n.dragClass,!1),dd(an,n.ghostClass,!0),bi.active=this,e&&this._appendGhost(),Eh({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(ym){this._lastX=ym.clientX,this._lastY=ym.clientY,nLe();for(var e=document.elementFromPoint(ym.clientX,ym.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ym.clientX,ym.clientY),e!==t);)t=e;if(an.parentNode[Cf]._isOutsideThisEl(e),t)do{if(t[Cf]){var n=void 0;if(n=t[Cf]._onDragOver({clientX:ym.clientX,clientY:ym.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=KMe(t));iLe()}},_onTouchMove:function(e){if(i_){var t=this.options,n=t.fallbackTolerance,i=t.fallbackOffset,o=e.touches?e.touches[0]:e,a=Oi&&zS(Oi,!0),l=Oi&&a&&a.a,u=Oi&&a&&a.d,f=TF&&Wc&&UMe(Wc),p=(o.clientX-i_.clientX+i.x)/(l||1)+(f?f[0]-xG[0]:0)/(l||1),x=(o.clientY-i_.clientY+i.y)/(u||1)+(f?f[1]-xG[1]:0)/(u||1);if(!bi.active&&!NS){if(n&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(Oi){a?(a.e+=p-(yG||0),a.f+=x-(bG||0)):a={a:1,b:0,c:0,d:1,e:p,f:x};var S="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");yi(Oi,"webkitTransform",S),yi(Oi,"mozTransform",S),yi(Oi,"msTransform",S),yi(Oi,"transform",S),yG=p,bG=x,ym=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Oi){var e=this.options.fallbackOnBody?document.body:ks,t=Wl(an,!0,TF,!0,e),n=this.options;if(TF){for(Wc=e;yi(Wc,"position")==="static"&&yi(Wc,"transform")==="none"&&Wc!==document;)Wc=Wc.parentNode;Wc!==document.body&&Wc!==document.documentElement?(Wc===document&&(Wc=_g()),t.top+=Wc.scrollTop,t.left+=Wc.scrollLeft):Wc=_g(),xG=UMe(Wc)}Oi=an.cloneNode(!0),dd(Oi,n.ghostClass,!1),dd(Oi,n.fallbackClass,!0),dd(Oi,n.dragClass,!0),yi(Oi,"transition",""),yi(Oi,"transform",""),yi(Oi,"box-sizing","border-box"),yi(Oi,"margin",0),yi(Oi,"top",t.top),yi(Oi,"left",t.left),yi(Oi,"width",t.width),yi(Oi,"height",t.height),yi(Oi,"opacity","0.8"),yi(Oi,"position",TF?"absolute":"fixed"),yi(Oi,"zIndex","100000"),yi(Oi,"pointerEvents","none"),bi.ghost=Oi,e.appendChild(Oi),yi(Oi,"transform-origin",jMe/parseInt(Oi.style.width)*100+"% "+VMe/parseInt(Oi.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,i=e.dataTransfer,o=n.options;if(Af("dragStart",this,{evt:e}),bi.eventCanceled){this._onDrop();return}Af("setupClone",this),bi.eventCanceled||(Us=JMe(an),Us.removeAttribute("id"),Us.draggable=!1,Us.style["will-change"]="",this._hideClone(),dd(Us,this.options.chosenClass,!1),bi.clone=Us),n.cloneId=DF(function(){Af("clone",n),!bi.eventCanceled&&(n.options.removeCloneOnHide||ks.insertBefore(Us,an),n._hideClone(),Eh({sortable:n,name:"clone"}))}),!t&&dd(an,o.dragClass,!0),t?(MF=!0,n._loopId=setInterval(n._emulateDragOver,50)):(bo(document,"mouseup",n._onDrop),bo(document,"touchend",n._onDrop),bo(document,"touchcancel",n._onDrop),i&&(i.effectAllowed="move",o.setData&&o.setData.call(n,i,an)),Eo(document,"drop",n),yi(an,"transform","translateZ(0)")),NS=!0,n._dragStartId=DF(n._dragStarted.bind(n,t,e)),Eo(document,"selectstart",n),PC=!0,window.getSelection().removeAllRanges(),FC&&yi(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,i,o,a,l=this.options,u=l.group,f=bi.active,p=wF===u,x=l.sort,S=mc||f,C,M=this,L=!1;if(kG)return;function R(he,Me){Af(he,M,wg({evt:e,isOwner:p,axis:C?"vertical":"horizontal",revert:a,dragRect:i,targetRect:o,canSort:x,fromSortable:S,target:n,completed:$,onMove:function(se,$e){return kF(ks,t,an,i,se,Wl(se),e,$e)},changed:Q},Me))}function H(){R("dragOverAnimationCapture"),M.captureAnimationState(),M!==S&&S.captureAnimationState()}function $(he){return R("dragOverCompleted",{insertion:he}),he&&(p?f._hideClone():f._showClone(M),M!==S&&(dd(an,mc?mc.options.ghostClass:f.options.ghostClass,!1),dd(an,l.ghostClass,!0)),mc!==M&&M!==bi.active?mc=M:M===bi.active&&mc&&(mc=null),S===M&&(M._ignoreWhileAnimating=n),M.animateAll(function(){R("dragOverAnimationComplete"),M._ignoreWhileAnimating=null}),M!==S&&(S.animateAll(),S._ignoreWhileAnimating=null)),(n===an&&!an.animated||n===t&&!n.animated)&&(FS=null),!l.dragoverBubble&&!e.rootEl&&n!==document&&(an.parentNode[Cf]._isOutsideThisEl(e.target),!he&&o_(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),L=!0}function Q(){pd=hp(an),Vb=hp(an,l.draggable),Eh({sortable:M,name:"change",toEl:t,newIndex:pd,newDraggableIndex:Vb,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=bm(n,l.draggable,t,!0),R("dragOver"),bi.eventCanceled)return L;if(an.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||M._ignoreWhileAnimating===n)return $(!1);if(MF=!1,f&&!l.disabled&&(p?x||(a=Xs!==ks):mc===this||(this.lastPutMode=wF.checkPull(this,f,an,e))&&u.checkPut(this,f,an,e))){if(C=this._getDirection(e,n)==="vertical",i=Wl(an),R("dragOverValid"),bi.eventCanceled)return L;if(a)return Xs=ks,H(),this._hideClone(),R("revert"),bi.eventCanceled||(a_?ks.insertBefore(an,a_):ks.appendChild(an)),$(!0);var G=IG(t,l.draggable);if(!G||y5t(e,C,this)&&!G.animated){if(G===an)return $(!1);if(G&&t===e.target&&(n=G),n&&(o=Wl(n)),kF(ks,t,an,i,n,o,e,!!n)!==!1)return H(),G&&G.nextSibling?t.insertBefore(an,G.nextSibling):t.appendChild(an),Xs=t,Q(),$(!0)}else if(G&&v5t(e,C,this)){var te=US(t,0,l,!0);if(te===an)return $(!1);if(n=te,o=Wl(n),kF(ks,t,an,i,n,o,e,!1)!==!1)return H(),t.insertBefore(an,te),Xs=t,Q(),$(!0)}else if(n.parentNode===t){o=Wl(n);var fe=0,oe,ve=an.parentNode!==t,xe=!f5t(an.animated&&an.toRect||i,n.animated&&n.toRect||o,C),Pe=C?"top":"left",ke=zMe(n,"top","top")||zMe(an,"top","top"),z=ke?ke.scrollTop:void 0;FS!==n&&(oe=o[Pe],UC=!1,SF=!xe&&l.invertSwap||ve),fe=b5t(e,n,o,C,xe?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,SF,FS===n);var U;if(fe!==0){var ge=hp(an);do ge-=fe,U=Xs.children[ge];while(U&&(yi(U,"display")==="none"||U===Oi))}if(fe===0||U===n)return $(!1);FS=n,zC=fe;var Ie=n.nextElementSibling,ce=!1;ce=fe===1;var re=kF(ks,t,an,i,n,o,e,ce);if(re!==!1)return(re===1||re===-1)&&(ce=re===1),kG=!0,setTimeout(g5t,30),H(),ce&&!Ie?t.appendChild(an):n.parentNode.insertBefore(an,ce?Ie:n),ke&&XMe(ke,0,z-ke.scrollTop),Xs=an.parentNode,oe!==void 0&&!SF&&(CF=Math.abs(oe-Wl(n)[Pe])),Q(),$(!0)}if(t.contains(an))return $(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){bo(document,"mousemove",this._onTouchMove),bo(document,"touchmove",this._onTouchMove),bo(document,"pointermove",this._onTouchMove),bo(document,"dragover",o_),bo(document,"mousemove",o_),bo(document,"touchmove",o_)},_offUpEvents:function(){var e=this.el.ownerDocument;bo(e,"mouseup",this._onDrop),bo(e,"touchend",this._onDrop),bo(e,"pointerup",this._onDrop),bo(e,"pointercancel",this._onDrop),bo(e,"touchcancel",this._onDrop),bo(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(pd=hp(an),Vb=hp(an,n.draggable),Af("drop",this,{evt:e}),Xs=an&&an.parentNode,pd=hp(an),Vb=hp(an,n.draggable),bi.eventCanceled){this._nulling();return}NS=!1,SF=!1,UC=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),EG(this.cloneId),EG(this._dragStartId),this.nativeDraggable&&(bo(document,"drop",this),bo(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),FC&&yi(document.body,"user-select",""),yi(an,"transform",""),e&&(PC&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),Oi&&Oi.parentNode&&Oi.parentNode.removeChild(Oi),(ks===Xs||mc&&mc.lastPutMode!=="clone")&&Us&&Us.parentNode&&Us.parentNode.removeChild(Us),an&&(this.nativeDraggable&&bo(an,"dragend",this),_G(an),an.style["will-change"]="",PC&&!NS&&dd(an,mc?mc.options.ghostClass:this.options.ghostClass,!1),dd(an,this.options.chosenClass,!1),Eh({sortable:this,name:"unchoose",toEl:Xs,newIndex:null,newDraggableIndex:null,originalEvent:e}),ks!==Xs?(pd>=0&&(Eh({rootEl:Xs,name:"add",toEl:Xs,fromEl:ks,originalEvent:e}),Eh({sortable:this,name:"remove",toEl:Xs,originalEvent:e}),Eh({rootEl:Xs,name:"sort",toEl:Xs,fromEl:ks,originalEvent:e}),Eh({sortable:this,name:"sort",toEl:Xs,originalEvent:e})),mc&&mc.save()):pd!==BS&&pd>=0&&(Eh({sortable:this,name:"update",toEl:Xs,originalEvent:e}),Eh({sortable:this,name:"sort",toEl:Xs,originalEvent:e})),bi.active&&((pd==null||pd===-1)&&(pd=BS,Vb=BC),Eh({sortable:this,name:"end",toEl:Xs,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){Af("nulling",this),ks=an=Xs=Oi=a_=Us=AF=Hb=i_=ym=PC=pd=Vb=BS=BC=FS=zC=mc=wF=bi.dragged=bi.ghost=bi.clone=bi.active=null,PF.forEach(function(e){e.checked=!0}),PF.length=yG=bG=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":an&&(this._onDragOver(e),m5t(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,i=0,o=n.length,a=this.options;i<o;i++)t=n[i],bm(t,a.draggable,this.el,!1)&&e.push(t.getAttribute(a.dataIdAttr)||_5t(t));return e},sort:function(e,t){var n={},i=this.el;this.toArray().forEach(function(o,a){var l=i.children[a];bm(l,this.options.draggable,i,!1)&&(n[o]=l)},this),t&&this.captureAnimationState(),e.forEach(function(o){n[o]&&(i.removeChild(n[o]),i.appendChild(n[o]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return bm(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var i=VC.modifyOption(this,e,t);typeof i<"u"?n[e]=i:n[e]=t,e==="group"&&rLe(n)},destroy:function(){Af("destroy",this);var e=this.el;e[Cf]=null,bo(e,"mousedown",this._onTapStart),bo(e,"touchstart",this._onTapStart),bo(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(bo(e,"dragover",this),bo(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),LF.splice(LF.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Hb){if(Af("hideClone",this),bi.eventCanceled)return;yi(Us,"display","none"),this.options.removeCloneOnHide&&Us.parentNode&&Us.parentNode.removeChild(Us),Hb=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Hb){if(Af("showClone",this),bi.eventCanceled)return;an.parentNode==ks&&!this.options.group.revertClone?ks.insertBefore(Us,an):a_?ks.insertBefore(Us,a_):ks.appendChild(Us),this.options.group.revertClone&&this.animate(an,Us),yi(Us,"display",""),Hb=!1}}};function m5t(r){r.dataTransfer&&(r.dataTransfer.dropEffect="move"),r.cancelable&&r.preventDefault()}function kF(r,e,t,n,i,o,a,l){var u,f=r[Cf],p=f.options.onMove,x;return window.CustomEvent&&!Bv&&!jC?u=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(u=document.createEvent("Event"),u.initEvent("move",!0,!0)),u.to=e,u.from=r,u.dragged=t,u.draggedRect=n,u.related=i||e,u.relatedRect=o||Wl(e),u.willInsertAfter=l,u.originalEvent=a,r.dispatchEvent(u),p&&(x=p.call(f,u,a)),x}function _G(r){r.draggable=!1}function g5t(){kG=!1}function v5t(r,e,t){var n=Wl(US(t.el,0,t.options,!0)),i=QMe(t.el,t.options,Oi),o=10;return e?r.clientX<i.left-o||r.clientY<n.top&&r.clientX<n.right:r.clientY<i.top-o||r.clientY<n.bottom&&r.clientX<n.left}function y5t(r,e,t){var n=Wl(IG(t.el,t.options.draggable)),i=QMe(t.el,t.options,Oi),o=10;return e?r.clientX>i.right+o||r.clientY>n.bottom&&r.clientX>n.left:r.clientY>i.bottom+o||r.clientX>n.right&&r.clientY>n.top}function b5t(r,e,t,n,i,o,a,l){var u=n?r.clientY:r.clientX,f=n?t.height:t.width,p=n?t.top:t.left,x=n?t.bottom:t.right,S=!1;if(!a){if(l&&CF<f*i){if(!UC&&(zC===1?u>p+f*o/2:u<x-f*o/2)&&(UC=!0),UC)S=!0;else if(zC===1?u<p+CF:u>x-CF)return-zC}else if(u>p+f*(1-i)/2&&u<x-f*(1-i)/2)return x5t(e)}return S=S||a,S&&(u<p+f*o/2||u>x-f*o/2)?u>p+f/2?1:-1:0}function x5t(r){return hp(an)<hp(r)?1:-1}function _5t(r){for(var e=r.tagName+r.className+r.src+r.href+r.textContent,t=e.length,n=0;t--;)n+=e.charCodeAt(t);return n.toString(36)}function w5t(r){PF.length=0;for(var e=r.getElementsByTagName("input"),t=e.length;t--;){var n=e[t];n.checked&&PF.push(n)}}function DF(r){return setTimeout(r,0)}function EG(r){return clearTimeout(r)}qF&&Eo(document,"touchmove",function(r){(bi.active||NS)&&r.cancelable&&r.preventDefault()});bi.utils={on:Eo,off:bo,css:yi,find:YMe,is:function(e,t){return!!bm(e,t,e,!1)},extend:i5t,throttle:ZMe,closest:bm,toggleClass:dd,clone:JMe,index:hp,nextTick:DF,cancelNextTick:EG,detectDirection:tLe,getChild:US,expando:Cf};bi.get=function(r){return r[Cf]};bi.mount=function(){for(var r=arguments.length,e=new Array(r),t=0;t<r;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(bi.utils=wg(wg({},bi.utils),n.utils)),VC.mount(n)})};bi.create=function(r,e){return new bi(r,e)};bi.version=r5t;var Hl=[],RC,AG,CG=!1,wG,SG,RF,qC;function S5t(){function r(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return r.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?Eo(document,"dragover",this._handleAutoScroll):this.options.supportPointer?Eo(document,"pointermove",this._handleFallbackAutoScroll):n.touches?Eo(document,"touchmove",this._handleFallbackAutoScroll):Eo(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?bo(document,"dragover",this._handleAutoScroll):(bo(document,"pointermove",this._handleFallbackAutoScroll),bo(document,"touchmove",this._handleFallbackAutoScroll),bo(document,"mousemove",this._handleFallbackAutoScroll)),WMe(),IF(),o5t()},nulling:function(){RF=AG=RC=CG=qC=wG=SG=null,Hl.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var i=this,o=(t.touches?t.touches[0]:t).clientX,a=(t.touches?t.touches[0]:t).clientY,l=document.elementFromPoint(o,a);if(RF=t,n||this.options.forceAutoScrollFallback||jC||Bv||FC){TG(t,this.options,l,n);var u=Wb(l,!0);CG&&(!qC||o!==wG||a!==SG)&&(qC&&WMe(),qC=setInterval(function(){var f=Wb(document.elementFromPoint(o,a),!0);f!==u&&(u=f,IF()),TG(t,i.options,f,n)},10),wG=o,SG=a)}else{if(!this.options.bubbleScroll||Wb(l,!0)===_g()){IF();return}TG(t,this.options,Wb(l,!1),!1)}}},Nv(r,{pluginName:"scroll",initializeByDefault:!0})}function IF(){Hl.forEach(function(r){clearInterval(r.pid)}),Hl=[]}function WMe(){clearInterval(qC)}var TG=ZMe(function(r,e,t,n){if(e.scroll){var i=(r.touches?r.touches[0]:r).clientX,o=(r.touches?r.touches[0]:r).clientY,a=e.scrollSensitivity,l=e.scrollSpeed,u=_g(),f=!1,p;AG!==t&&(AG=t,IF(),RC=e.scroll,p=e.scrollFn,RC===!0&&(RC=Wb(t,!0)));var x=0,S=RC;do{var C=S,M=Wl(C),L=M.top,R=M.bottom,H=M.left,$=M.right,Q=M.width,G=M.height,te=void 0,fe=void 0,oe=C.scrollWidth,ve=C.scrollHeight,xe=yi(C),Pe=C.scrollLeft,ke=C.scrollTop;C===u?(te=Q<oe&&(xe.overflowX==="auto"||xe.overflowX==="scroll"||xe.overflowX==="visible"),fe=G<ve&&(xe.overflowY==="auto"||xe.overflowY==="scroll"||xe.overflowY==="visible")):(te=Q<oe&&(xe.overflowX==="auto"||xe.overflowX==="scroll"),fe=G<ve&&(xe.overflowY==="auto"||xe.overflowY==="scroll"));var z=te&&(Math.abs($-i)<=a&&Pe+Q<oe)-(Math.abs(H-i)<=a&&!!Pe),U=fe&&(Math.abs(R-o)<=a&&ke+G<ve)-(Math.abs(L-o)<=a&&!!ke);if(!Hl[x])for(var ge=0;ge<=x;ge++)Hl[ge]||(Hl[ge]={});(Hl[x].vx!=z||Hl[x].vy!=U||Hl[x].el!==C)&&(Hl[x].el=C,Hl[x].vx=z,Hl[x].vy=U,clearInterval(Hl[x].pid),(z!=0||U!=0)&&(f=!0,Hl[x].pid=setInterval(function(){n&&this.layer===0&&bi.active._onTouchMove(RF);var Ie=Hl[this.layer].vy?Hl[this.layer].vy*l:0,ce=Hl[this.layer].vx?Hl[this.layer].vx*l:0;typeof p=="function"&&p.call(bi.dragged.parentNode[Cf],ce,Ie,r,RF,Hl[this.layer].el)!=="continue"||XMe(Hl[this.layer].el,ce,Ie)}.bind({layer:x}),24))),x++}while(e.bubbleScroll&&S!==u&&(S=Wb(S,!1)));CG=f}},30),oLe=function(e){var t=e.originalEvent,n=e.putSortable,i=e.dragEl,o=e.activeSortable,a=e.dispatchSortableEvent,l=e.hideGhostForTarget,u=e.unhideGhostForTarget;if(t){var f=n||o;l();var p=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,x=document.elementFromPoint(p.clientX,p.clientY);u(),f&&!f.el.contains(x)&&(a("spill"),this.onSpill({dragEl:i,putSortable:n}))}};function OG(){}OG.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var i=US(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(t,i):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:oLe};Nv(OG,{pluginName:"revertOnSpill"});function MG(){}MG.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,i=n||this.sortable;i.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),i.animateAll()},drop:oLe};Nv(MG,{pluginName:"removeOnSpill"});bi.mount(new S5t);bi.mount(MG,OG);var aLe=bi;var FF=class extends Zt{static targets=["input","controller","rows"];fieldValue=[];options={};get keyInputDisabled(){return!this.options.editable||this.options.disable_editing_keys}get valueInputDisabled(){return!this.options.editable||this.options.disable_editing_values}get prefersReducedMotion(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}connect(){this.setOptions();try{let r=JSON.parse(this.inputTarget.value,(e,t)=>typeof t=="number"||typeof t=="boolean"?String(t):t);Object.keys(r).forEach(e=>this.fieldValue.push([e,r[e]]))}catch{this.fieldValue=[]}this.updateKeyValueComponent()}addRow(){this.options.disable_adding_rows||!this.options.editable||(this.fieldValue.push(["",""]),this.updateKeyValueComponent(),this.focusLastRow(),this.animateLastRow())}deleteRow(r){if(this.options.disable_deleting_rows||!this.options.editable)return;let{index:e}=r.params,t=this.rowsTarget.querySelectorAll(".key-value__row")[e];if(this.fieldValue.splice(e,1),this.updateTextareaInput(),!t||this.prefersReducedMotion){this.updateKeyValueComponent();return}t.classList.add("key-value__row--leaving"),t.addEventListener("animationend",()=>this.updateKeyValueComponent(),{once:!0})}moveKey(r,e){this.options.editable&&(this.fieldValue=this.moveElement(this.fieldValue,r,e),this.updateTextareaInput(),this.updateKeyValueComponent())}moveElement(r,e,t){let n=r[e];return r.splice(e,1),r.splice(t,0,n),r}get lastRow(){return this.rowsTarget.querySelector(".key-value__row:last-child")}focusLastRow(){this.lastRow?.querySelector(".key-value-input-key")?.focus()}animateLastRow(){let r=this.lastRow;!r||this.prefersReducedMotion||(r.classList.add("key-value__row--entering"),r.addEventListener("animationend",()=>r.classList.remove("key-value__row--entering"),{once:!0}))}valueFieldUpdated(r){let{value:e}=r.target,{index:t}=r.target.dataset;this.fieldValue[t][1]=e,this.updateTextareaInput()}keyFieldUpdated(r){let{value:e}=r.target,{index:t}=r.target.dataset;this.fieldValue[t][0]=e,this.updateTextareaInput()}updateTextareaInput(){if(!this.hasInputTarget)return;let r={};this.fieldValue&&this.fieldValue.length>0&&(r=Object.assign(...this.fieldValue.map(([e,t])=>({[e]:t})))),this.inputTarget.innerText=JSON.stringify(r),this.inputTarget.dispatchEvent(new Event("input"))}updateKeyValueComponent(){let r="",e=0;this.fieldValue.forEach(t=>{let[n,i]=t;r+=this.interpolatedRow(mG.sanitize(n),mG.sanitize(i),e),e++}),this.rowsTarget.innerHTML=r,this.#e(),window.initTippy()}#e(){let r=this;new aLe(this.rowsTarget,{animation:150,handle:'[data-control="dnd-handle"]',onUpdate(e){r.moveKey(e.oldIndex,e.newIndex)}})}interpolatedRow(r,e,t){let n='<div class="key-value__row" role="row">';return n+=`
|
|
663
663
|
${this.inputCell("key",t,r,e)}
|