@xy-planning-network/trees 0.11.2 → 0.11.4
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.
- package/dist/trees.es.js +3 -2
- package/dist/trees.umd.js +1 -1
- package/package.json +1 -1
- package/src/lib-components/forms/DateRangePicker.vue +5 -1
- package/types/composables/date.d.ts +2 -1
- package/types/composables/forms.d.ts +10 -1
- package/types/lib-components/forms/DateRangePicker.vue.d.ts +2 -1
package/dist/trees.es.js
CHANGED
|
@@ -6527,6 +6527,7 @@ const Cd = ["id", "aria-labelledby", "aria-describedby", "aria-errormessage", "p
|
|
|
6527
6527
|
__name: "DateRangePicker",
|
|
6528
6528
|
props: /* @__PURE__ */ be(/* @__PURE__ */ ut({
|
|
6529
6529
|
modelValue: {},
|
|
6530
|
+
maxDate: {},
|
|
6530
6531
|
maxRange: {},
|
|
6531
6532
|
startDate: {},
|
|
6532
6533
|
label: {},
|
|
@@ -6534,6 +6535,7 @@ const Cd = ["id", "aria-labelledby", "aria-describedby", "aria-errormessage", "p
|
|
|
6534
6535
|
placeholder: {}
|
|
6535
6536
|
}, {
|
|
6536
6537
|
...dt,
|
|
6538
|
+
maxDate: () => /* @__PURE__ */ new Date(),
|
|
6537
6539
|
maxRange: 0,
|
|
6538
6540
|
placeholder: "mm-dd-yyyy range",
|
|
6539
6541
|
startDate: 0
|
|
@@ -6557,8 +6559,7 @@ const Cd = ["id", "aria-labelledby", "aria-describedby", "aria-errormessage", "p
|
|
|
6557
6559
|
allowInput: !0,
|
|
6558
6560
|
dateFormat: "m-d-Y",
|
|
6559
6561
|
mode: "range",
|
|
6560
|
-
maxDate:
|
|
6561
|
-
// So far, we cannot have options past today for ranges
|
|
6562
|
+
maxDate: n.maxDate,
|
|
6562
6563
|
minDate: n.startDate,
|
|
6563
6564
|
onClose: (c) => {
|
|
6564
6565
|
c.length === 2 ? d({
|
package/dist/trees.umd.js
CHANGED
|
@@ -11,6 +11,6 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
11
11
|
<span class='flatpickr-weekday'>
|
|
12
12
|
${h.join("</span><span class='flatpickr-weekday'>")}
|
|
13
13
|
</span>
|
|
14
|
-
`}function Bp(){e.calendarContainer.classList.add("hasWeeks");const p=U("div","flatpickr-weekwrapper");p.appendChild(U("span","flatpickr-weekday",e.l10n.weekAbbreviation));const h=U("div","flatpickr-weeks");return p.appendChild(h),{weekWrapper:p,weekNumbers:h}}function gr(p,h=!0){const x=h?p:p-e.currentMonth;x<0&&e._hidePrevMonthArrow===!0||x>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=x,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,X("onYearChange"),se()),Q(),X("onMonthChange"),Sn())}function Vp(p=!0,h=!0){if(e.input.value="",e.altInput!==void 0&&(e.altInput.value=""),e.mobileInput!==void 0&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,h===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){const{hours:x,minutes:E,seconds:B}=dr(e.config);m(x,E,B)}e.redraw(),p&&X("onChange")}function Tp(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),X("onClose")}function vp(){e.config!==void 0&&X("onDestroy");for(let p=e._handlers.length;p--;)e._handlers[p].remove();if(e._handlers=[],e.mobileInput)e.mobileInput.parentNode&&e.mobileInput.parentNode.removeChild(e.mobileInput),e.mobileInput=void 0;else if(e.calendarContainer&&e.calendarContainer.parentNode)if(e.config.static&&e.calendarContainer.parentNode){const p=e.calendarContainer.parentNode;if(p.lastChild&&p.removeChild(p.lastChild),p.parentNode){for(;p.firstChild;)p.parentNode.insertBefore(p.firstChild,p);p.parentNode.removeChild(p)}}else e.calendarContainer.parentNode.removeChild(e.calendarContainer);e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput),delete e.altInput),e.input&&(e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.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(p=>{try{delete e[p]}catch{}})}function gt(p){return e.config.appendTo&&e.config.appendTo.contains(p)?!0:e.calendarContainer.contains(p)}function br(p){if(e.isOpen&&!e.config.inline){const h=ke(p),x=gt(h),E=h===e.input||h===e.altInput||e.element.contains(h)||p.path&&p.path.indexOf&&(~p.path.indexOf(e.input)||~p.path.indexOf(e.altInput)),B=p.type==="blur"?E&&p.relatedTarget&&!gt(p.relatedTarget):!E&&!x&&!gt(p.relatedTarget),D=!e.config.ignoredFocusElements.some($=>$.contains(h));B&&D&&(e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0&&e.input.value!==""&&e.input.value!==void 0&&s(),e.close(),e.config&&e.config.mode==="range"&&e.selectedDates.length===1&&(e.clear(!1),e.redraw()))}}function Cn(p){if(!p||e.config.minDate&&p<e.config.minDate.getFullYear()||e.config.maxDate&&p>e.config.maxDate.getFullYear())return;const h=p,x=e.currentYear!==h;e.currentYear=h||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),x&&(e.redraw(),X("onYearChange"),se())}function et(p,h=!0){var x;const E=e.parseDate(p,void 0,h);if(e.config.minDate&&E&&Ee(E,e.config.minDate,h!==void 0?h:!e.minDateHasTime)<0||e.config.maxDate&&E&&Ee(E,e.config.maxDate,h!==void 0?h:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(E===void 0)return!1;const B=!!e.config.enable,D=(x=e.config.enable)!==null&&x!==void 0?x:e.config.disable;for(let $=0,T;$<D.length;$++){if(T=D[$],typeof T=="function"&&T(E))return B;if(T instanceof Date&&E!==void 0&&T.getTime()===E.getTime())return B;if(typeof T=="string"){const R=e.parseDate(T,void 0,!0);return R&&R.getTime()===E.getTime()?B:!B}else if(typeof T=="object"&&E!==void 0&&T.from&&T.to&&E.getTime()>=T.from.getTime()&&E.getTime()<=T.to.getTime())return B}return!B}function kn(p){return e.daysContainer!==void 0?p.className.indexOf("hidden")===-1&&p.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(p):!1}function $p(p){p.target===e._input&&(e.selectedDates.length>0||e._input.value.length>0)&&!(p.relatedTarget&>(p.relatedTarget))&&e.setDate(e._input.value,!0,p.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function Mp(p){const h=ke(p),x=e.config.wrap?n.contains(h):h===e._input,E=e.config.allowInput,B=e.isOpen&&(!E||!x),D=e.config.inline&&x&&!E;if(p.keyCode===13&&x){if(E)return e.setDate(e._input.value,!0,h===e.altInput?e.config.altFormat:e.config.dateFormat),h.blur();e.open()}else if(gt(h)||B||D){const $=!!e.timeContainer&&e.timeContainer.contains(h);switch(p.keyCode){case 13:$?(p.preventDefault(),s(),wr()):pi(p);break;case 27:p.preventDefault(),wr();break;case 8:case 46:x&&!e.config.allowInput&&(p.preventDefault(),e.clear());break;case 37:case 39:if(!$&&!x){if(p.preventDefault(),e.daysContainer!==void 0&&(E===!1||document.activeElement&&kn(document.activeElement))){const R=p.keyCode===39?1:-1;p.ctrlKey?(p.stopPropagation(),gr(R),F(O(1),0)):F(void 0,R)}}else e.hourElement&&e.hourElement.focus();break;case 38:case 40:p.preventDefault();const T=p.keyCode===40?1:-1;e.daysContainer&&h.$i!==void 0||h===e.input||h===e.altInput?p.ctrlKey?(p.stopPropagation(),Cn(e.currentYear-T),F(O(1),0)):$||F(void 0,T*7):h===e.currentYearElement?Cn(e.currentYear-T):e.config.enableTime&&(!$&&e.hourElement&&e.hourElement.focus(),s(p),e._debouncedChange());break;case 9:if($){const R=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(Y=>Y),j=R.indexOf(h);if(j!==-1){const Y=R[j+(p.shiftKey?-1:1)];p.preventDefault(),(Y||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(h)&&p.shiftKey&&(p.preventDefault(),e._input.focus());break}}if(e.amPM!==void 0&&h===e.amPM)switch(p.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],d(),qe();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],d(),qe();break}(x||gt(h))&&X("onKeyDown",p)}function yr(p){if(e.selectedDates.length!==1||p&&(!p.classList.contains("flatpickr-day")||p.classList.contains("flatpickr-disabled")))return;const h=p?p.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),x=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),E=Math.min(h,e.selectedDates[0].getTime()),B=Math.max(h,e.selectedDates[0].getTime());let D=!1,$=0,T=0;for(let R=E;R<B;R+=uc.DAY)et(new Date(R),!0)||(D=D||R>E&&R<B,R<x&&(!$||R>$)?$=R:R>x&&(!T||R<T)&&(T=R));for(let R=0;R<e.config.showMonths;R++){const j=e.daysContainer.children[R];for(let Y=0,_e=j.children.length;Y<_e;Y++){const ce=j.children[Y],Le=ce.dateObj.getTime(),Mt=$>0&&Le<$||T>0&&Le>T;if(Mt){ce.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(Ot=>{ce.classList.remove(Ot)});continue}else if(D&&!Mt)continue;["startRange","inRange","endRange","notAllowed"].forEach(Ot=>{ce.classList.remove(Ot)}),p!==void 0&&(p.classList.add(h<=e.selectedDates[0].getTime()?"startRange":"endRange"),x<h&&Le===x?ce.classList.add("startRange"):x>h&&Le===x&&ce.classList.add("endRange"),Le>=$&&(T===0||Le<=T)&&dc(Le,x,h)&&ce.classList.add("inRange"))}}}function Op(){e.isOpen&&!e.config.static&&!e.config.inline&&En()}function Pp(p,h=e._positionElement){if(e.isMobile===!0){if(p){p.preventDefault();const E=ke(p);E&&E.blur()}e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),X("onOpen");return}else if(e._input.disabled||e.config.inline)return;const x=e.isOpen;e.isOpen=!0,x||(e.calendarContainer.classList.add("open"),e._input.classList.add("active"),X("onOpen"),En(h)),e.config.enableTime===!0&&e.config.noCalendar===!0&&e.config.allowInput===!1&&(p===void 0||!e.timeContainer.contains(p.relatedTarget))&&setTimeout(()=>e.hourElement.select(),50)}function ci(p){return h=>{const x=e.config[`_${p}Date`]=e.parseDate(h,e.config.dateFormat),E=e.config[`_${p==="min"?"max":"min"}Date`];x!==void 0&&(e[p==="min"?"minDateHasTime":"maxDateHasTime"]=x.getHours()>0||x.getMinutes()>0||x.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(B=>et(B)),!e.selectedDates.length&&p==="min"&&f(x),qe()),e.daysContainer&&(fi(),x!==void 0?e.currentYearElement[p]=x.getFullYear().toString():e.currentYearElement.removeAttribute(p),e.currentYearElement.disabled=!!E&&x!==void 0&&E.getFullYear()===x.getFullYear())}}function Ap(){const p=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],h=Object.assign(Object.assign({},JSON.parse(JSON.stringify(n.dataset||{}))),r),x={};e.config.parseDate=h.parseDate,e.config.formatDate=h.formatDate,Object.defineProperty(e.config,"enable",{get:()=>e.config._enable,set:D=>{e.config._enable=hi(D)}}),Object.defineProperty(e.config,"disable",{get:()=>e.config._disable,set:D=>{e.config._disable=hi(D)}});const E=h.mode==="time";if(!h.dateFormat&&(h.enableTime||E)){const D=te.defaultConfig.dateFormat||ft.dateFormat;x.dateFormat=h.noCalendar||E?"H:i"+(h.enableSeconds?":S":""):D+" H:i"+(h.enableSeconds?":S":"")}if(h.altInput&&(h.enableTime||E)&&!h.altFormat){const D=te.defaultConfig.altFormat||ft.altFormat;x.altFormat=h.noCalendar||E?"h:i"+(h.enableSeconds?":S K":" K"):D+` h:i${h.enableSeconds?":S":""} K`}Object.defineProperty(e.config,"minDate",{get:()=>e.config._minDate,set:ci("min")}),Object.defineProperty(e.config,"maxDate",{get:()=>e.config._maxDate,set:ci("max")});const B=D=>$=>{e.config[D==="min"?"_minTime":"_maxTime"]=e.parseDate($,"H:i:S")};Object.defineProperty(e.config,"minTime",{get:()=>e.config._minTime,set:B("min")}),Object.defineProperty(e.config,"maxTime",{get:()=>e.config._maxTime,set:B("max")}),h.mode==="time"&&(e.config.noCalendar=!0,e.config.enableTime=!0),Object.assign(e.config,x,h);for(let D=0;D<p.length;D++)e.config[p[D]]=e.config[p[D]]===!0||e.config[p[D]]==="true";ar.filter(D=>e.config[D]!==void 0).forEach(D=>{e.config[D]=ir(e.config[D]||[]).map(i)}),e.isMobile=!e.config.disableMobile&&!e.config.inline&&e.config.mode==="single"&&!e.config.disable.length&&!e.config.enable&&!e.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(let D=0;D<e.config.plugins.length;D++){const $=e.config.plugins[D](e)||{};for(const T in $)ar.indexOf(T)>-1?e.config[T]=ir($[T]).map(i).concat(e.config[T]):typeof h[T]>"u"&&(e.config[T]=$[T])}h.altInputClass||(e.config.altInputClass=di().className+" "+e.config.altInputClass),X("onParseConfig")}function di(){return e.config.wrap?n.querySelector("[data-input]"):n}function ui(){typeof e.config.locale!="object"&&typeof te.l10ns[e.config.locale]>"u"&&e.config.errorHandler(new Error(`flatpickr: invalid locale ${e.config.locale}`)),e.l10n=Object.assign(Object.assign({},te.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?te.l10ns[e.config.locale]:void 0),sr.K=`(${e.l10n.amPM[0]}|${e.l10n.amPM[1]}|${e.l10n.amPM[0].toLowerCase()}|${e.l10n.amPM[1].toLowerCase()})`,Object.assign(Object.assign({},r),JSON.parse(JSON.stringify(n.dataset||{}))).time_24hr===void 0&&te.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=Ta(e),e.parseDate=cr({config:e.config,l10n:e.l10n})}function En(p){if(typeof e.config.position=="function")return void e.config.position(e,p);if(e.calendarContainer===void 0)return;X("onPreCalendarPosition");const h=p||e._positionElement,x=Array.prototype.reduce.call(e.calendarContainer.children,(Pt,kr)=>Pt+kr.offsetHeight,0),E=e.calendarContainer.offsetWidth,B=e.config.position.split(" "),D=B[0],$=B.length>1?B[1]:null,T=h.getBoundingClientRect(),R=window.innerHeight-T.bottom,j=D==="above"||D!=="below"&&R<x&&T.top>x,Y=window.pageYOffset+T.top+(j?-x-2:h.offsetHeight+2);if(ue(e.calendarContainer,"arrowTop",!j),ue(e.calendarContainer,"arrowBottom",j),e.config.inline)return;let _e=window.pageXOffset+T.left,ce=!1,Nn=!1;$==="center"?(_e-=(E-T.width)/2,ce=!0):$==="right"&&(_e-=E-T.width,Nn=!0),ue(e.calendarContainer,"arrowLeft",!ce&&!Nn),ue(e.calendarContainer,"arrowCenter",ce),ue(e.calendarContainer,"arrowRight",Nn);const Le=window.document.body.offsetWidth-(window.pageXOffset+T.right),Mt=_e+E>window.document.body.offsetWidth,Ot=Le+E>window.document.body.offsetWidth;if(ue(e.calendarContainer,"rightMost",Mt),!e.config.static)if(e.calendarContainer.style.top=`${Y}px`,!Mt)e.calendarContainer.style.left=`${_e}px`,e.calendarContainer.style.right="auto";else if(!Ot)e.calendarContainer.style.left="auto",e.calendarContainer.style.right=`${Le}px`;else{const Pt=Rp();if(Pt===void 0)return;const kr=window.document.body.offsetWidth,Kp=Math.max(0,kr/2-E/2),Gp=".flatpickr-calendar.centerMost:before",Jp=".flatpickr-calendar.centerMost:after",Xp=Pt.cssRules.length,Zp=`{left:${T.left}px;right:auto;}`;ue(e.calendarContainer,"rightMost",!1),ue(e.calendarContainer,"centerMost",!0),Pt.insertRule(`${Gp},${Jp}${Zp}`,Xp),e.calendarContainer.style.left=`${Kp}px`,e.calendarContainer.style.right="auto"}}function Rp(){let p=null;for(let h=0;h<document.styleSheets.length;h++){const x=document.styleSheets[h];try{x.cssRules}catch{continue}p=x;break}return p??Lp()}function Lp(){const p=document.createElement("style");return document.head.appendChild(p),p.sheet}function fi(){e.config.noCalendar||e.isMobile||(se(),Sn(),Q())}function wr(){e._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(e.close,0):e.close()}function pi(p){p.preventDefault(),p.stopPropagation();const h=$=>$.classList&&$.classList.contains("flatpickr-day")&&!$.classList.contains("flatpickr-disabled")&&!$.classList.contains("notAllowed"),x=Va(ke(p),h);if(x===void 0)return;const E=x,B=e.latestSelectedDateObj=new Date(E.dateObj.getTime()),D=(B.getMonth()<e.currentMonth||B.getMonth()>e.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=E,e.config.mode==="single")e.selectedDates=[B];else if(e.config.mode==="multiple"){const $=Cr(B);$?e.selectedDates.splice(parseInt($),1):e.selectedDates.push(B)}else e.config.mode==="range"&&(e.selectedDates.length===2&&e.clear(!1,!1),e.latestSelectedDateObj=B,e.selectedDates.push(B),Ee(B,e.selectedDates[0],!0)!==0&&e.selectedDates.sort(($,T)=>$.getTime()-T.getTime()));if(d(),D){const $=e.currentYear!==B.getFullYear();e.currentYear=B.getFullYear(),e.currentMonth=B.getMonth(),$&&(X("onYearChange"),se()),X("onMonthChange")}if(Sn(),Q(),qe(),!D&&e.config.mode!=="range"&&e.config.showMonths===1?v(E):e.selectedDateElem!==void 0&&e.hourElement===void 0&&e.selectedDateElem&&e.selectedDateElem.focus(),e.hourElement!==void 0&&e.hourElement!==void 0&&e.hourElement.focus(),e.config.closeOnSelect){const $=e.config.mode==="single"&&!e.config.enableTime,T=e.config.mode==="range"&&e.selectedDates.length===2&&!e.config.enableTime;($||T)&&wr()}y()}const Dn={locale:[ui,si],showMonths:[ii,l,li],minDate:[k],maxDate:[k],clickOpens:[()=>{e.config.clickOpens===!0?(b(e._input,"focus",e.open),b(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function Ip(p,h){if(p!==null&&typeof p=="object"){Object.assign(e.config,p);for(const x in p)Dn[x]!==void 0&&Dn[x].forEach(E=>E())}else e.config[p]=h,Dn[p]!==void 0?Dn[p].forEach(x=>x()):ar.indexOf(p)>-1&&(e.config[p]=ir(h));e.redraw(),qe(!0)}function mi(p,h){let x=[];if(p instanceof Array)x=p.map(E=>e.parseDate(E,h));else if(p instanceof Date||typeof p=="number")x=[e.parseDate(p,h)];else if(typeof p=="string")switch(e.config.mode){case"single":case"time":x=[e.parseDate(p,h)];break;case"multiple":x=p.split(e.config.conjunction).map(E=>e.parseDate(E,h));break;case"range":x=p.split(e.l10n.rangeSeparator).map(E=>e.parseDate(E,h));break}else e.config.errorHandler(new Error(`Invalid date supplied: ${JSON.stringify(p)}`));e.selectedDates=e.config.allowInvalidPreload?x:x.filter(E=>E instanceof Date&&et(E,!1)),e.config.mode==="range"&&e.selectedDates.sort((E,B)=>E.getTime()-B.getTime())}function Fp(p,h=!1,x=e.config.dateFormat){if(p!==0&&!p||p instanceof Array&&p.length===0)return e.clear(h);mi(p,x),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),k(void 0,h),f(),e.selectedDates.length===0&&e.clear(!1),qe(h),h&&X("onChange")}function hi(p){return p.slice().map(h=>typeof h=="string"||typeof h=="number"||h instanceof Date?e.parseDate(h,void 0,!0):h&&typeof h=="object"&&h.from&&h.to?{from:e.parseDate(h.from,void 0),to:e.parseDate(h.to,void 0)}:h).filter(h=>h)}function jp(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;const p=e.config.defaultDate||((e.input.nodeName==="INPUT"||e.input.nodeName==="TEXTAREA")&&e.input.placeholder&&e.input.value===e.input.placeholder?null:e.input.value);p&&mi(p,e.config.dateFormat),e._initialDate=e.selectedDates.length>0?e.selectedDates[0]:e.config.minDate&&e.config.minDate.getTime()>e.now.getTime()?e.config.minDate:e.config.maxDate&&e.config.maxDate.getTime()<e.now.getTime()?e.config.maxDate:e.now,e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth(),e.selectedDates.length>0&&(e.latestSelectedDateObj=e.selectedDates[0]),e.config.minTime!==void 0&&(e.config.minTime=e.parseDate(e.config.minTime,"H:i")),e.config.maxTime!==void 0&&(e.config.maxTime=e.parseDate(e.config.maxTime,"H:i")),e.minDateHasTime=!!e.config.minDate&&(e.config.minDate.getHours()>0||e.config.minDate.getMinutes()>0||e.config.minDate.getSeconds()>0),e.maxDateHasTime=!!e.config.maxDate&&(e.config.maxDate.getHours()>0||e.config.maxDate.getMinutes()>0||e.config.maxDate.getSeconds()>0)}function Hp(){if(e.input=di(),!e.input){e.config.errorHandler(new Error("Invalid input element specified"));return}e.input._type=e.input.type,e.input.type="text",e.input.classList.add("flatpickr-input"),e._input=e.input,e.config.altInput&&(e.altInput=U(e.input.nodeName,e.config.altInputClass),e._input=e.altInput,e.altInput.placeholder=e.input.placeholder,e.altInput.disabled=e.input.disabled,e.altInput.required=e.input.required,e.altInput.tabIndex=e.input.tabIndex,e.altInput.type="text",e.input.setAttribute("type","hidden"),!e.config.static&&e.input.parentNode&&e.input.parentNode.insertBefore(e.altInput,e.input.nextSibling)),e.config.allowInput||e._input.setAttribute("readonly","readonly"),e._positionElement=e.config.positionElement||e._input}function Up(){const p=e.config.enableTime?e.config.noCalendar?"time":"datetime-local":"date";e.mobileInput=U("input",e.input.className+" flatpickr-mobile"),e.mobileInput.tabIndex=1,e.mobileInput.type=p,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=p==="datetime-local"?"Y-m-d\\TH:i:S":p==="date"?"Y-m-d":"H:i:S",e.selectedDates.length>0&&(e.mobileInput.defaultValue=e.mobileInput.value=e.formatDate(e.selectedDates[0],e.mobileFormatStr)),e.config.minDate&&(e.mobileInput.min=e.formatDate(e.config.minDate,"Y-m-d")),e.config.maxDate&&(e.mobileInput.max=e.formatDate(e.config.maxDate,"Y-m-d")),e.input.getAttribute("step")&&(e.mobileInput.step=String(e.input.getAttribute("step"))),e.input.type="hidden",e.altInput!==void 0&&(e.altInput.type="hidden");try{e.input.parentNode&&e.input.parentNode.insertBefore(e.mobileInput,e.input.nextSibling)}catch{}b(e.mobileInput,"change",h=>{e.setDate(ke(h).value,!1,e.mobileFormatStr),X("onChange"),X("onClose")})}function zp(p){if(e.isOpen===!0)return e.close();e.open(p)}function X(p,h){if(e.config===void 0)return;const x=e.config[p];if(x!==void 0&&x.length>0)for(let E=0;x[E]&&E<x.length;E++)x[E](e.selectedDates,e.input.value,e,h);p==="onChange"&&(e.input.dispatchEvent(xr("change")),e.input.dispatchEvent(xr("input")))}function xr(p){const h=document.createEvent("Event");return h.initEvent(p,!0,!0),h}function Cr(p){for(let h=0;h<e.selectedDates.length;h++)if(Ee(e.selectedDates[h],p)===0)return""+h;return!1}function qp(p){return e.config.mode!=="range"||e.selectedDates.length<2?!1:Ee(p,e.selectedDates[0])>=0&&Ee(p,e.selectedDates[1])<=0}function Sn(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach((p,h)=>{const x=new Date(e.currentYear,e.currentMonth,1);x.setMonth(e.currentMonth+h),e.config.showMonths>1||e.config.monthSelectorType==="static"?e.monthElements[h].textContent=gn(x.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=x.getMonth().toString(),p.value=x.getFullYear().toString()}),e._hidePrevMonthArrow=e.config.minDate!==void 0&&(e.currentYear===e.config.minDate.getFullYear()?e.currentMonth<=e.config.minDate.getMonth():e.currentYear<e.config.minDate.getFullYear()),e._hideNextMonthArrow=e.config.maxDate!==void 0&&(e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth+1>e.config.maxDate.getMonth():e.currentYear>e.config.maxDate.getFullYear()))}function gi(p){return e.selectedDates.map(h=>e.formatDate(h,p)).filter((h,x,E)=>e.config.mode!=="range"||e.config.enableTime||E.indexOf(h)===x).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function qe(p=!0){e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=gi(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=gi(e.config.altFormat)),p!==!1&&X("onValueUpdate")}function Wp(p){const h=ke(p),x=e.prevMonthNav.contains(h),E=e.nextMonthNav.contains(h);x||E?gr(x?-1:1):e.yearElements.indexOf(h)>=0?h.select():h.classList.contains("arrowUp")?e.changeYear(e.currentYear+1):h.classList.contains("arrowDown")&&e.changeYear(e.currentYear-1)}function Yp(p){p.preventDefault();const h=p.type==="keydown",x=ke(p),E=x;e.amPM!==void 0&&x===e.amPM&&(e.amPM.textContent=e.l10n.amPM[Ne(e.amPM.textContent===e.l10n.amPM[0])]);const B=parseFloat(E.getAttribute("min")),D=parseFloat(E.getAttribute("max")),$=parseFloat(E.getAttribute("step")),T=parseInt(E.value,10),R=p.delta||(h?p.which===38?1:-1:0);let j=T+$*R;if(typeof E.value<"u"&&E.value.length===2){const Y=E===e.hourElement,_e=E===e.minuteElement;j<B?(j=D+j+Ne(!Y)+(Ne(Y)&&Ne(!e.amPM)),_e&&N(void 0,-1,e.hourElement)):j>D&&(j=E===e.hourElement?j-D-Ne(!e.amPM):B,_e&&N(void 0,1,e.hourElement)),e.amPM&&Y&&($===1?j+T===23:Math.abs(j-T)>$)&&(e.amPM.textContent=e.l10n.amPM[Ne(e.amPM.textContent===e.l10n.amPM[0])]),E.value=ge(j)}}return a(),e}function pt(n,r){const e=Array.prototype.slice.call(n).filter(a=>a instanceof HTMLElement),o=[];for(let a=0;a<e.length;a++){const i=e[a];try{if(i.getAttribute("data-fp-omit")!==null)continue;i._flatpickr!==void 0&&(i._flatpickr.destroy(),i._flatpickr=void 0),i._flatpickr=pc(i,r||{}),o.push(i._flatpickr)}catch(l){console.error(l)}}return o.length===1?o[0]:o}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(n){return pt(this,n)},HTMLElement.prototype.flatpickr=function(n){return pt([this],n)});var te=function(n,r){return typeof n=="string"?pt(window.document.querySelectorAll(n),r):n instanceof Node?pt([n],r):pt(n,r)};te.defaultConfig={},te.l10ns={en:Object.assign({},Vt),default:Object.assign({},Vt)},te.localize=n=>{te.l10ns.default=Object.assign(Object.assign({},te.l10ns.default),n)},te.setDefaults=n=>{te.defaultConfig=Object.assign(Object.assign({},te.defaultConfig),n)},te.parseDate=cr({}),te.formatDate=Ta({}),te.compareDates=Ee,typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(n){return pt(this,n)}),Date.prototype.fp_incr=function(n){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof n=="string"?parseInt(n,10):n))},typeof window<"u"&&(window.flatpickr=te);const mc=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder"],bn=t.defineComponent({inheritAttrs:!1,__name:"DateRangePicker",props:t.mergeModels(t.mergeDefaults({modelValue:{},maxRange:{},startDate:{},label:{},help:{},placeholder:{}},{...Pe,maxRange:0,placeholder:"mm-dd-yyyy range",startDate:0}),{modelValue:{...Z,default:{maxDate:0,minDate:0}},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",{...Z,default:{maxDate:0,minDate:0}}),{aria:o,errorState:a,inputID:i,isRequired:l,onInvalid:s,validate:c}=Ve(r),u=d=>{e.value=d};return t.onMounted(()=>{const d={allowInput:!0,dateFormat:"m-d-Y",mode:"range",maxDate:new Date,minDate:r.startDate,onClose:f=>{f.length===2?u({minDate:f[0].setUTCHours(0,0,0,0)/1e3,maxDate:Math.floor(f[1].setUTCHours(23,59,59,999)/1e3)}):f.length===0&&u({minDate:0,maxDate:0})}};e.value&&e.value.minDate!=0&&e.value.maxDate!=0&&(d.defaultDate=[e.value.minDate*1e3,e.value.maxDate*1e3]),r.maxRange&&(d.onChange=(f,m,g)=>{if(f.length===1){var b=new Date(f[0].getTime()),y=new Date(f[0].getTime());b.setDate(b.getDate()+r.maxRange),y.setDate(y.getDate()-r.maxRange);const w=new Date;b>w&&(b=w),g.set("minDate",y),g.set("maxDate",b)}}),te(`#${i.value}`,d)}),(d,f)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(he,{id:t.unref(o).labelledby,class:"mb-2",for:t.unref(i),label:d.label,required:t.unref(l)},null,8,["id","for","label","required"]),t.createElementVNode("input",t.mergeProps({id:t.unref(i),"aria-labelledby":t.unref(o).labelledby,"aria-describedby":t.unref(o).describedby,"aria-errormessage":t.unref(o).errormessage,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200",t.unref(a)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],placeholder:d.placeholder},d.$attrs,{type:"text",onInput:f[0]||(f[0]=(...m)=>t.unref(c)&&t.unref(c)(...m)),onInvalid:f[1]||(f[1]=(...m)=>t.unref(s)&&t.unref(s)(...m))}),null,16,mc),t.createVNode(le,{id:t.unref(o).describedby,class:"mt-1",text:d.help},null,8,["id","text"]),t.createVNode(Se,{id:t.unref(o).errormessage,class:"mt-0.5",text:t.unref(a)},null,8,["id","text"])]))}}),hc=["id","aria-labelledby","aria-describedby","aria-errormessage"],gc=["textContent"],bc=["value","disabled","textContent"],ur=t.defineComponent({inheritAttrs:!1,__name:"Select",props:t.mergeModels(t.mergeDefaults({modelValue:{},options:{},label:{},help:{},placeholder:{}},{...Pe,placeholder:"Select an option"}),{modelValue:Z,modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",Z),{aria:o,inputID:a,isRequired:i,validate:l,errorState:s,onInvalid:c}=Ve(r);return(u,d)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(he,{id:t.unref(o).labelledby,class:"mb-2",for:t.unref(a),label:u.label,required:t.unref(i)},null,8,["id","for","label","required"]),t.withDirectives(t.createElementVNode("select",t.mergeProps({id:t.unref(a),"onUpdate:modelValue":d[0]||(d[0]=f=>e.value=f),"aria-labelledby":t.unref(o).labelledby,"aria-describedby":t.unref(o).describedby,"aria-errormessage":t.unref(o).errormessage,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6 pl-3 pr-10","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200 disabled:opacity-100",t.unref(s)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"]},u.$attrs,{onChange:d[1]||(d[1]=(...f)=>t.unref(l)&&t.unref(l)(...f)),onInvalid:d[2]||(d[2]=(...f)=>t.unref(c)&&t.unref(c)(...f))}),[t.createElementVNode("option",{value:"",disabled:"",selected:"",textContent:t.toDisplayString(u.placeholder)},null,8,gc),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.options,f=>(t.openBlock(),t.createElementBlock("option",{key:f.value,value:f.value,disabled:f.disabled,textContent:t.toDisplayString(f.label)},null,8,bc))),128))],16,hc),[[t.vModelSelect,e.value]]),t.createVNode(le,{id:t.unref(o).describedby,class:"mt-1",text:u.help},null,8,["id","text"]),t.createVNode(Se,{id:t.unref(o).errormessage,class:"mt-0.5",text:t.unref(s)},null,8,["id","text"])]))}}),fr=t.defineComponent({__name:"DateFilter",props:{dateRange:{},sortDir:{}},emits:["sort-dir-changed","date-range-changed"],setup(n,{emit:r}){const e=n,o=t.ref(e.dateRange),a=t.ref(e.sortDir),i=[{label:"Newest-Oldest",value:"desc"},{label:"Oldest-Newest",value:"asc"}],l=r,s=u=>{(u==="asc"||u==="desc")&&l("sort-dir-changed",u)},c=u=>{u&&l("date-range-changed",u)};return(u,d)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(ur,{modelValue:a.value,"onUpdate:modelValue":[d[0]||(d[0]=f=>a.value=f),s],options:i},null,8,["modelValue"]),t.createVNode(bn,{modelValue:o.value,"onUpdate:modelValue":[d[1]||(d[1]=f=>o.value=f),c],class:"ml-3"},null,8,["modelValue"])],64))}});function mt(n,r="GET",e={}){const o=t.ref(),a=t.shallowRef(),i=t.ref(!1),l=t.ref(!1),s=t.ref(!1),c=t.ref(!1);let u=0,d;const f=()=>{d!==void 0&&d.abort()},m=(g={},b={})=>{u++;const y=u;d=new AbortController,c.value=!1,l.value=!1,s.value=!0;const w={data:["PATCH","patch","POST","post","PUT","put"].includes(r)?g:{},method:r,params:["GET","get"].includes(r)?g:{},signal:d.signal,url:n};return rt(w,{...e,...b}).then(k=>(o.value=k,a.value=void 0,c.value=!1,k),k=>{throw a.value=k,uo(k)&&(c.value=!0),k}).finally(()=>{y==u&&(l.value=!0,s.value=!1),i.value=!0})};return e!=null&&e.immediate&&e.immediate===!0&&m(),{result:o,error:a,isFinished:l,isLoading:s,isAborted:c,hasFetched:i,abort:f,execute:m}}function yc(n,r={}){return mt(n,"GET",r)}function wc(n,r={}){return mt(n,"DELETE",r)}function xc(n,r={}){return mt(n,"PATCH",r)}function Cc(n,r={}){return mt(n,"POST",r)}function kc(n,r={}){return mt(n,"PUT",r)}const va="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Ec={CreateIdAttribute:(n=8)=>{let r="";for(let e=0;e<n;e++)r+=va.charAt(Math.floor(Math.random()*va.length));return r}};function $a(n={}){const r=t.ref(new Map);let e={removeDelay:1e4,email:""};const o=m=>{e={...e,...m}},a=m=>{r.value.delete(m)},i=m=>{const g=Ec.CreateIdAttribute();return r.value.set(g,m),(m.persistent===void 0||!m.persistent)&&setTimeout(()=>a(g),e.removeDelay),g},l=m=>i(m),s=(m,g=!1)=>i({message:m,persistent:g,type:"error"}),c=(m,g=!1)=>i({message:m,persistent:g,type:"info"}),u=(m,g=!1)=>i({message:m,persistent:g,type:"success"}),d=(m,g=!1)=>i({message:m,persistent:g,type:"warning"}),f=(m="",g=!1)=>{const b=m||e.email,y=b?`Whoops! Something went wrong, please reach out to
|
|
14
|
+
`}function Bp(){e.calendarContainer.classList.add("hasWeeks");const p=U("div","flatpickr-weekwrapper");p.appendChild(U("span","flatpickr-weekday",e.l10n.weekAbbreviation));const h=U("div","flatpickr-weeks");return p.appendChild(h),{weekWrapper:p,weekNumbers:h}}function gr(p,h=!0){const x=h?p:p-e.currentMonth;x<0&&e._hidePrevMonthArrow===!0||x>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=x,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,X("onYearChange"),se()),Q(),X("onMonthChange"),Sn())}function Vp(p=!0,h=!0){if(e.input.value="",e.altInput!==void 0&&(e.altInput.value=""),e.mobileInput!==void 0&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,h===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){const{hours:x,minutes:E,seconds:B}=dr(e.config);m(x,E,B)}e.redraw(),p&&X("onChange")}function Tp(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),X("onClose")}function vp(){e.config!==void 0&&X("onDestroy");for(let p=e._handlers.length;p--;)e._handlers[p].remove();if(e._handlers=[],e.mobileInput)e.mobileInput.parentNode&&e.mobileInput.parentNode.removeChild(e.mobileInput),e.mobileInput=void 0;else if(e.calendarContainer&&e.calendarContainer.parentNode)if(e.config.static&&e.calendarContainer.parentNode){const p=e.calendarContainer.parentNode;if(p.lastChild&&p.removeChild(p.lastChild),p.parentNode){for(;p.firstChild;)p.parentNode.insertBefore(p.firstChild,p);p.parentNode.removeChild(p)}}else e.calendarContainer.parentNode.removeChild(e.calendarContainer);e.altInput&&(e.input.type="text",e.altInput.parentNode&&e.altInput.parentNode.removeChild(e.altInput),delete e.altInput),e.input&&(e.input.type=e.input._type,e.input.classList.remove("flatpickr-input"),e.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(p=>{try{delete e[p]}catch{}})}function gt(p){return e.config.appendTo&&e.config.appendTo.contains(p)?!0:e.calendarContainer.contains(p)}function br(p){if(e.isOpen&&!e.config.inline){const h=ke(p),x=gt(h),E=h===e.input||h===e.altInput||e.element.contains(h)||p.path&&p.path.indexOf&&(~p.path.indexOf(e.input)||~p.path.indexOf(e.altInput)),B=p.type==="blur"?E&&p.relatedTarget&&!gt(p.relatedTarget):!E&&!x&&!gt(p.relatedTarget),D=!e.config.ignoredFocusElements.some($=>$.contains(h));B&&D&&(e.timeContainer!==void 0&&e.minuteElement!==void 0&&e.hourElement!==void 0&&e.input.value!==""&&e.input.value!==void 0&&s(),e.close(),e.config&&e.config.mode==="range"&&e.selectedDates.length===1&&(e.clear(!1),e.redraw()))}}function Cn(p){if(!p||e.config.minDate&&p<e.config.minDate.getFullYear()||e.config.maxDate&&p>e.config.maxDate.getFullYear())return;const h=p,x=e.currentYear!==h;e.currentYear=h||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),x&&(e.redraw(),X("onYearChange"),se())}function et(p,h=!0){var x;const E=e.parseDate(p,void 0,h);if(e.config.minDate&&E&&Ee(E,e.config.minDate,h!==void 0?h:!e.minDateHasTime)<0||e.config.maxDate&&E&&Ee(E,e.config.maxDate,h!==void 0?h:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(E===void 0)return!1;const B=!!e.config.enable,D=(x=e.config.enable)!==null&&x!==void 0?x:e.config.disable;for(let $=0,T;$<D.length;$++){if(T=D[$],typeof T=="function"&&T(E))return B;if(T instanceof Date&&E!==void 0&&T.getTime()===E.getTime())return B;if(typeof T=="string"){const R=e.parseDate(T,void 0,!0);return R&&R.getTime()===E.getTime()?B:!B}else if(typeof T=="object"&&E!==void 0&&T.from&&T.to&&E.getTime()>=T.from.getTime()&&E.getTime()<=T.to.getTime())return B}return!B}function kn(p){return e.daysContainer!==void 0?p.className.indexOf("hidden")===-1&&p.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(p):!1}function $p(p){p.target===e._input&&(e.selectedDates.length>0||e._input.value.length>0)&&!(p.relatedTarget&>(p.relatedTarget))&&e.setDate(e._input.value,!0,p.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function Mp(p){const h=ke(p),x=e.config.wrap?n.contains(h):h===e._input,E=e.config.allowInput,B=e.isOpen&&(!E||!x),D=e.config.inline&&x&&!E;if(p.keyCode===13&&x){if(E)return e.setDate(e._input.value,!0,h===e.altInput?e.config.altFormat:e.config.dateFormat),h.blur();e.open()}else if(gt(h)||B||D){const $=!!e.timeContainer&&e.timeContainer.contains(h);switch(p.keyCode){case 13:$?(p.preventDefault(),s(),wr()):pi(p);break;case 27:p.preventDefault(),wr();break;case 8:case 46:x&&!e.config.allowInput&&(p.preventDefault(),e.clear());break;case 37:case 39:if(!$&&!x){if(p.preventDefault(),e.daysContainer!==void 0&&(E===!1||document.activeElement&&kn(document.activeElement))){const R=p.keyCode===39?1:-1;p.ctrlKey?(p.stopPropagation(),gr(R),F(O(1),0)):F(void 0,R)}}else e.hourElement&&e.hourElement.focus();break;case 38:case 40:p.preventDefault();const T=p.keyCode===40?1:-1;e.daysContainer&&h.$i!==void 0||h===e.input||h===e.altInput?p.ctrlKey?(p.stopPropagation(),Cn(e.currentYear-T),F(O(1),0)):$||F(void 0,T*7):h===e.currentYearElement?Cn(e.currentYear-T):e.config.enableTime&&(!$&&e.hourElement&&e.hourElement.focus(),s(p),e._debouncedChange());break;case 9:if($){const R=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(Y=>Y),j=R.indexOf(h);if(j!==-1){const Y=R[j+(p.shiftKey?-1:1)];p.preventDefault(),(Y||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(h)&&p.shiftKey&&(p.preventDefault(),e._input.focus());break}}if(e.amPM!==void 0&&h===e.amPM)switch(p.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],d(),qe();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],d(),qe();break}(x||gt(h))&&X("onKeyDown",p)}function yr(p){if(e.selectedDates.length!==1||p&&(!p.classList.contains("flatpickr-day")||p.classList.contains("flatpickr-disabled")))return;const h=p?p.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),x=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),E=Math.min(h,e.selectedDates[0].getTime()),B=Math.max(h,e.selectedDates[0].getTime());let D=!1,$=0,T=0;for(let R=E;R<B;R+=uc.DAY)et(new Date(R),!0)||(D=D||R>E&&R<B,R<x&&(!$||R>$)?$=R:R>x&&(!T||R<T)&&(T=R));for(let R=0;R<e.config.showMonths;R++){const j=e.daysContainer.children[R];for(let Y=0,_e=j.children.length;Y<_e;Y++){const ce=j.children[Y],Le=ce.dateObj.getTime(),Mt=$>0&&Le<$||T>0&&Le>T;if(Mt){ce.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(Ot=>{ce.classList.remove(Ot)});continue}else if(D&&!Mt)continue;["startRange","inRange","endRange","notAllowed"].forEach(Ot=>{ce.classList.remove(Ot)}),p!==void 0&&(p.classList.add(h<=e.selectedDates[0].getTime()?"startRange":"endRange"),x<h&&Le===x?ce.classList.add("startRange"):x>h&&Le===x&&ce.classList.add("endRange"),Le>=$&&(T===0||Le<=T)&&dc(Le,x,h)&&ce.classList.add("inRange"))}}}function Op(){e.isOpen&&!e.config.static&&!e.config.inline&&En()}function Pp(p,h=e._positionElement){if(e.isMobile===!0){if(p){p.preventDefault();const E=ke(p);E&&E.blur()}e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),X("onOpen");return}else if(e._input.disabled||e.config.inline)return;const x=e.isOpen;e.isOpen=!0,x||(e.calendarContainer.classList.add("open"),e._input.classList.add("active"),X("onOpen"),En(h)),e.config.enableTime===!0&&e.config.noCalendar===!0&&e.config.allowInput===!1&&(p===void 0||!e.timeContainer.contains(p.relatedTarget))&&setTimeout(()=>e.hourElement.select(),50)}function ci(p){return h=>{const x=e.config[`_${p}Date`]=e.parseDate(h,e.config.dateFormat),E=e.config[`_${p==="min"?"max":"min"}Date`];x!==void 0&&(e[p==="min"?"minDateHasTime":"maxDateHasTime"]=x.getHours()>0||x.getMinutes()>0||x.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(B=>et(B)),!e.selectedDates.length&&p==="min"&&f(x),qe()),e.daysContainer&&(fi(),x!==void 0?e.currentYearElement[p]=x.getFullYear().toString():e.currentYearElement.removeAttribute(p),e.currentYearElement.disabled=!!E&&x!==void 0&&E.getFullYear()===x.getFullYear())}}function Ap(){const p=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],h=Object.assign(Object.assign({},JSON.parse(JSON.stringify(n.dataset||{}))),r),x={};e.config.parseDate=h.parseDate,e.config.formatDate=h.formatDate,Object.defineProperty(e.config,"enable",{get:()=>e.config._enable,set:D=>{e.config._enable=hi(D)}}),Object.defineProperty(e.config,"disable",{get:()=>e.config._disable,set:D=>{e.config._disable=hi(D)}});const E=h.mode==="time";if(!h.dateFormat&&(h.enableTime||E)){const D=te.defaultConfig.dateFormat||ft.dateFormat;x.dateFormat=h.noCalendar||E?"H:i"+(h.enableSeconds?":S":""):D+" H:i"+(h.enableSeconds?":S":"")}if(h.altInput&&(h.enableTime||E)&&!h.altFormat){const D=te.defaultConfig.altFormat||ft.altFormat;x.altFormat=h.noCalendar||E?"h:i"+(h.enableSeconds?":S K":" K"):D+` h:i${h.enableSeconds?":S":""} K`}Object.defineProperty(e.config,"minDate",{get:()=>e.config._minDate,set:ci("min")}),Object.defineProperty(e.config,"maxDate",{get:()=>e.config._maxDate,set:ci("max")});const B=D=>$=>{e.config[D==="min"?"_minTime":"_maxTime"]=e.parseDate($,"H:i:S")};Object.defineProperty(e.config,"minTime",{get:()=>e.config._minTime,set:B("min")}),Object.defineProperty(e.config,"maxTime",{get:()=>e.config._maxTime,set:B("max")}),h.mode==="time"&&(e.config.noCalendar=!0,e.config.enableTime=!0),Object.assign(e.config,x,h);for(let D=0;D<p.length;D++)e.config[p[D]]=e.config[p[D]]===!0||e.config[p[D]]==="true";ar.filter(D=>e.config[D]!==void 0).forEach(D=>{e.config[D]=ir(e.config[D]||[]).map(i)}),e.isMobile=!e.config.disableMobile&&!e.config.inline&&e.config.mode==="single"&&!e.config.disable.length&&!e.config.enable&&!e.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(let D=0;D<e.config.plugins.length;D++){const $=e.config.plugins[D](e)||{};for(const T in $)ar.indexOf(T)>-1?e.config[T]=ir($[T]).map(i).concat(e.config[T]):typeof h[T]>"u"&&(e.config[T]=$[T])}h.altInputClass||(e.config.altInputClass=di().className+" "+e.config.altInputClass),X("onParseConfig")}function di(){return e.config.wrap?n.querySelector("[data-input]"):n}function ui(){typeof e.config.locale!="object"&&typeof te.l10ns[e.config.locale]>"u"&&e.config.errorHandler(new Error(`flatpickr: invalid locale ${e.config.locale}`)),e.l10n=Object.assign(Object.assign({},te.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?te.l10ns[e.config.locale]:void 0),sr.K=`(${e.l10n.amPM[0]}|${e.l10n.amPM[1]}|${e.l10n.amPM[0].toLowerCase()}|${e.l10n.amPM[1].toLowerCase()})`,Object.assign(Object.assign({},r),JSON.parse(JSON.stringify(n.dataset||{}))).time_24hr===void 0&&te.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=Ta(e),e.parseDate=cr({config:e.config,l10n:e.l10n})}function En(p){if(typeof e.config.position=="function")return void e.config.position(e,p);if(e.calendarContainer===void 0)return;X("onPreCalendarPosition");const h=p||e._positionElement,x=Array.prototype.reduce.call(e.calendarContainer.children,(Pt,kr)=>Pt+kr.offsetHeight,0),E=e.calendarContainer.offsetWidth,B=e.config.position.split(" "),D=B[0],$=B.length>1?B[1]:null,T=h.getBoundingClientRect(),R=window.innerHeight-T.bottom,j=D==="above"||D!=="below"&&R<x&&T.top>x,Y=window.pageYOffset+T.top+(j?-x-2:h.offsetHeight+2);if(ue(e.calendarContainer,"arrowTop",!j),ue(e.calendarContainer,"arrowBottom",j),e.config.inline)return;let _e=window.pageXOffset+T.left,ce=!1,Nn=!1;$==="center"?(_e-=(E-T.width)/2,ce=!0):$==="right"&&(_e-=E-T.width,Nn=!0),ue(e.calendarContainer,"arrowLeft",!ce&&!Nn),ue(e.calendarContainer,"arrowCenter",ce),ue(e.calendarContainer,"arrowRight",Nn);const Le=window.document.body.offsetWidth-(window.pageXOffset+T.right),Mt=_e+E>window.document.body.offsetWidth,Ot=Le+E>window.document.body.offsetWidth;if(ue(e.calendarContainer,"rightMost",Mt),!e.config.static)if(e.calendarContainer.style.top=`${Y}px`,!Mt)e.calendarContainer.style.left=`${_e}px`,e.calendarContainer.style.right="auto";else if(!Ot)e.calendarContainer.style.left="auto",e.calendarContainer.style.right=`${Le}px`;else{const Pt=Rp();if(Pt===void 0)return;const kr=window.document.body.offsetWidth,Kp=Math.max(0,kr/2-E/2),Gp=".flatpickr-calendar.centerMost:before",Jp=".flatpickr-calendar.centerMost:after",Xp=Pt.cssRules.length,Zp=`{left:${T.left}px;right:auto;}`;ue(e.calendarContainer,"rightMost",!1),ue(e.calendarContainer,"centerMost",!0),Pt.insertRule(`${Gp},${Jp}${Zp}`,Xp),e.calendarContainer.style.left=`${Kp}px`,e.calendarContainer.style.right="auto"}}function Rp(){let p=null;for(let h=0;h<document.styleSheets.length;h++){const x=document.styleSheets[h];try{x.cssRules}catch{continue}p=x;break}return p??Lp()}function Lp(){const p=document.createElement("style");return document.head.appendChild(p),p.sheet}function fi(){e.config.noCalendar||e.isMobile||(se(),Sn(),Q())}function wr(){e._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(e.close,0):e.close()}function pi(p){p.preventDefault(),p.stopPropagation();const h=$=>$.classList&&$.classList.contains("flatpickr-day")&&!$.classList.contains("flatpickr-disabled")&&!$.classList.contains("notAllowed"),x=Va(ke(p),h);if(x===void 0)return;const E=x,B=e.latestSelectedDateObj=new Date(E.dateObj.getTime()),D=(B.getMonth()<e.currentMonth||B.getMonth()>e.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=E,e.config.mode==="single")e.selectedDates=[B];else if(e.config.mode==="multiple"){const $=Cr(B);$?e.selectedDates.splice(parseInt($),1):e.selectedDates.push(B)}else e.config.mode==="range"&&(e.selectedDates.length===2&&e.clear(!1,!1),e.latestSelectedDateObj=B,e.selectedDates.push(B),Ee(B,e.selectedDates[0],!0)!==0&&e.selectedDates.sort(($,T)=>$.getTime()-T.getTime()));if(d(),D){const $=e.currentYear!==B.getFullYear();e.currentYear=B.getFullYear(),e.currentMonth=B.getMonth(),$&&(X("onYearChange"),se()),X("onMonthChange")}if(Sn(),Q(),qe(),!D&&e.config.mode!=="range"&&e.config.showMonths===1?v(E):e.selectedDateElem!==void 0&&e.hourElement===void 0&&e.selectedDateElem&&e.selectedDateElem.focus(),e.hourElement!==void 0&&e.hourElement!==void 0&&e.hourElement.focus(),e.config.closeOnSelect){const $=e.config.mode==="single"&&!e.config.enableTime,T=e.config.mode==="range"&&e.selectedDates.length===2&&!e.config.enableTime;($||T)&&wr()}y()}const Dn={locale:[ui,si],showMonths:[ii,l,li],minDate:[k],maxDate:[k],clickOpens:[()=>{e.config.clickOpens===!0?(b(e._input,"focus",e.open),b(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function Ip(p,h){if(p!==null&&typeof p=="object"){Object.assign(e.config,p);for(const x in p)Dn[x]!==void 0&&Dn[x].forEach(E=>E())}else e.config[p]=h,Dn[p]!==void 0?Dn[p].forEach(x=>x()):ar.indexOf(p)>-1&&(e.config[p]=ir(h));e.redraw(),qe(!0)}function mi(p,h){let x=[];if(p instanceof Array)x=p.map(E=>e.parseDate(E,h));else if(p instanceof Date||typeof p=="number")x=[e.parseDate(p,h)];else if(typeof p=="string")switch(e.config.mode){case"single":case"time":x=[e.parseDate(p,h)];break;case"multiple":x=p.split(e.config.conjunction).map(E=>e.parseDate(E,h));break;case"range":x=p.split(e.l10n.rangeSeparator).map(E=>e.parseDate(E,h));break}else e.config.errorHandler(new Error(`Invalid date supplied: ${JSON.stringify(p)}`));e.selectedDates=e.config.allowInvalidPreload?x:x.filter(E=>E instanceof Date&&et(E,!1)),e.config.mode==="range"&&e.selectedDates.sort((E,B)=>E.getTime()-B.getTime())}function Fp(p,h=!1,x=e.config.dateFormat){if(p!==0&&!p||p instanceof Array&&p.length===0)return e.clear(h);mi(p,x),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),k(void 0,h),f(),e.selectedDates.length===0&&e.clear(!1),qe(h),h&&X("onChange")}function hi(p){return p.slice().map(h=>typeof h=="string"||typeof h=="number"||h instanceof Date?e.parseDate(h,void 0,!0):h&&typeof h=="object"&&h.from&&h.to?{from:e.parseDate(h.from,void 0),to:e.parseDate(h.to,void 0)}:h).filter(h=>h)}function jp(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;const p=e.config.defaultDate||((e.input.nodeName==="INPUT"||e.input.nodeName==="TEXTAREA")&&e.input.placeholder&&e.input.value===e.input.placeholder?null:e.input.value);p&&mi(p,e.config.dateFormat),e._initialDate=e.selectedDates.length>0?e.selectedDates[0]:e.config.minDate&&e.config.minDate.getTime()>e.now.getTime()?e.config.minDate:e.config.maxDate&&e.config.maxDate.getTime()<e.now.getTime()?e.config.maxDate:e.now,e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth(),e.selectedDates.length>0&&(e.latestSelectedDateObj=e.selectedDates[0]),e.config.minTime!==void 0&&(e.config.minTime=e.parseDate(e.config.minTime,"H:i")),e.config.maxTime!==void 0&&(e.config.maxTime=e.parseDate(e.config.maxTime,"H:i")),e.minDateHasTime=!!e.config.minDate&&(e.config.minDate.getHours()>0||e.config.minDate.getMinutes()>0||e.config.minDate.getSeconds()>0),e.maxDateHasTime=!!e.config.maxDate&&(e.config.maxDate.getHours()>0||e.config.maxDate.getMinutes()>0||e.config.maxDate.getSeconds()>0)}function Hp(){if(e.input=di(),!e.input){e.config.errorHandler(new Error("Invalid input element specified"));return}e.input._type=e.input.type,e.input.type="text",e.input.classList.add("flatpickr-input"),e._input=e.input,e.config.altInput&&(e.altInput=U(e.input.nodeName,e.config.altInputClass),e._input=e.altInput,e.altInput.placeholder=e.input.placeholder,e.altInput.disabled=e.input.disabled,e.altInput.required=e.input.required,e.altInput.tabIndex=e.input.tabIndex,e.altInput.type="text",e.input.setAttribute("type","hidden"),!e.config.static&&e.input.parentNode&&e.input.parentNode.insertBefore(e.altInput,e.input.nextSibling)),e.config.allowInput||e._input.setAttribute("readonly","readonly"),e._positionElement=e.config.positionElement||e._input}function Up(){const p=e.config.enableTime?e.config.noCalendar?"time":"datetime-local":"date";e.mobileInput=U("input",e.input.className+" flatpickr-mobile"),e.mobileInput.tabIndex=1,e.mobileInput.type=p,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=p==="datetime-local"?"Y-m-d\\TH:i:S":p==="date"?"Y-m-d":"H:i:S",e.selectedDates.length>0&&(e.mobileInput.defaultValue=e.mobileInput.value=e.formatDate(e.selectedDates[0],e.mobileFormatStr)),e.config.minDate&&(e.mobileInput.min=e.formatDate(e.config.minDate,"Y-m-d")),e.config.maxDate&&(e.mobileInput.max=e.formatDate(e.config.maxDate,"Y-m-d")),e.input.getAttribute("step")&&(e.mobileInput.step=String(e.input.getAttribute("step"))),e.input.type="hidden",e.altInput!==void 0&&(e.altInput.type="hidden");try{e.input.parentNode&&e.input.parentNode.insertBefore(e.mobileInput,e.input.nextSibling)}catch{}b(e.mobileInput,"change",h=>{e.setDate(ke(h).value,!1,e.mobileFormatStr),X("onChange"),X("onClose")})}function zp(p){if(e.isOpen===!0)return e.close();e.open(p)}function X(p,h){if(e.config===void 0)return;const x=e.config[p];if(x!==void 0&&x.length>0)for(let E=0;x[E]&&E<x.length;E++)x[E](e.selectedDates,e.input.value,e,h);p==="onChange"&&(e.input.dispatchEvent(xr("change")),e.input.dispatchEvent(xr("input")))}function xr(p){const h=document.createEvent("Event");return h.initEvent(p,!0,!0),h}function Cr(p){for(let h=0;h<e.selectedDates.length;h++)if(Ee(e.selectedDates[h],p)===0)return""+h;return!1}function qp(p){return e.config.mode!=="range"||e.selectedDates.length<2?!1:Ee(p,e.selectedDates[0])>=0&&Ee(p,e.selectedDates[1])<=0}function Sn(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach((p,h)=>{const x=new Date(e.currentYear,e.currentMonth,1);x.setMonth(e.currentMonth+h),e.config.showMonths>1||e.config.monthSelectorType==="static"?e.monthElements[h].textContent=gn(x.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=x.getMonth().toString(),p.value=x.getFullYear().toString()}),e._hidePrevMonthArrow=e.config.minDate!==void 0&&(e.currentYear===e.config.minDate.getFullYear()?e.currentMonth<=e.config.minDate.getMonth():e.currentYear<e.config.minDate.getFullYear()),e._hideNextMonthArrow=e.config.maxDate!==void 0&&(e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth+1>e.config.maxDate.getMonth():e.currentYear>e.config.maxDate.getFullYear()))}function gi(p){return e.selectedDates.map(h=>e.formatDate(h,p)).filter((h,x,E)=>e.config.mode!=="range"||e.config.enableTime||E.indexOf(h)===x).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function qe(p=!0){e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=gi(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=gi(e.config.altFormat)),p!==!1&&X("onValueUpdate")}function Wp(p){const h=ke(p),x=e.prevMonthNav.contains(h),E=e.nextMonthNav.contains(h);x||E?gr(x?-1:1):e.yearElements.indexOf(h)>=0?h.select():h.classList.contains("arrowUp")?e.changeYear(e.currentYear+1):h.classList.contains("arrowDown")&&e.changeYear(e.currentYear-1)}function Yp(p){p.preventDefault();const h=p.type==="keydown",x=ke(p),E=x;e.amPM!==void 0&&x===e.amPM&&(e.amPM.textContent=e.l10n.amPM[Ne(e.amPM.textContent===e.l10n.amPM[0])]);const B=parseFloat(E.getAttribute("min")),D=parseFloat(E.getAttribute("max")),$=parseFloat(E.getAttribute("step")),T=parseInt(E.value,10),R=p.delta||(h?p.which===38?1:-1:0);let j=T+$*R;if(typeof E.value<"u"&&E.value.length===2){const Y=E===e.hourElement,_e=E===e.minuteElement;j<B?(j=D+j+Ne(!Y)+(Ne(Y)&&Ne(!e.amPM)),_e&&N(void 0,-1,e.hourElement)):j>D&&(j=E===e.hourElement?j-D-Ne(!e.amPM):B,_e&&N(void 0,1,e.hourElement)),e.amPM&&Y&&($===1?j+T===23:Math.abs(j-T)>$)&&(e.amPM.textContent=e.l10n.amPM[Ne(e.amPM.textContent===e.l10n.amPM[0])]),E.value=ge(j)}}return a(),e}function pt(n,r){const e=Array.prototype.slice.call(n).filter(a=>a instanceof HTMLElement),o=[];for(let a=0;a<e.length;a++){const i=e[a];try{if(i.getAttribute("data-fp-omit")!==null)continue;i._flatpickr!==void 0&&(i._flatpickr.destroy(),i._flatpickr=void 0),i._flatpickr=pc(i,r||{}),o.push(i._flatpickr)}catch(l){console.error(l)}}return o.length===1?o[0]:o}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(n){return pt(this,n)},HTMLElement.prototype.flatpickr=function(n){return pt([this],n)});var te=function(n,r){return typeof n=="string"?pt(window.document.querySelectorAll(n),r):n instanceof Node?pt([n],r):pt(n,r)};te.defaultConfig={},te.l10ns={en:Object.assign({},Vt),default:Object.assign({},Vt)},te.localize=n=>{te.l10ns.default=Object.assign(Object.assign({},te.l10ns.default),n)},te.setDefaults=n=>{te.defaultConfig=Object.assign(Object.assign({},te.defaultConfig),n)},te.parseDate=cr({}),te.formatDate=Ta({}),te.compareDates=Ee,typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(n){return pt(this,n)}),Date.prototype.fp_incr=function(n){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof n=="string"?parseInt(n,10):n))},typeof window<"u"&&(window.flatpickr=te);const mc=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder"],bn=t.defineComponent({inheritAttrs:!1,__name:"DateRangePicker",props:t.mergeModels(t.mergeDefaults({modelValue:{},maxDate:{},maxRange:{},startDate:{},label:{},help:{},placeholder:{}},{...Pe,maxDate:()=>new Date,maxRange:0,placeholder:"mm-dd-yyyy range",startDate:0}),{modelValue:{...Z,default:{maxDate:0,minDate:0}},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",{...Z,default:{maxDate:0,minDate:0}}),{aria:o,errorState:a,inputID:i,isRequired:l,onInvalid:s,validate:c}=Ve(r),u=d=>{e.value=d};return t.onMounted(()=>{const d={allowInput:!0,dateFormat:"m-d-Y",mode:"range",maxDate:r.maxDate,minDate:r.startDate,onClose:f=>{f.length===2?u({minDate:f[0].setUTCHours(0,0,0,0)/1e3,maxDate:Math.floor(f[1].setUTCHours(23,59,59,999)/1e3)}):f.length===0&&u({minDate:0,maxDate:0})}};e.value&&e.value.minDate!=0&&e.value.maxDate!=0&&(d.defaultDate=[e.value.minDate*1e3,e.value.maxDate*1e3]),r.maxRange&&(d.onChange=(f,m,g)=>{if(f.length===1){var b=new Date(f[0].getTime()),y=new Date(f[0].getTime());b.setDate(b.getDate()+r.maxRange),y.setDate(y.getDate()-r.maxRange);const w=new Date;b>w&&(b=w),g.set("minDate",y),g.set("maxDate",b)}}),te(`#${i.value}`,d)}),(d,f)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(he,{id:t.unref(o).labelledby,class:"mb-2",for:t.unref(i),label:d.label,required:t.unref(l)},null,8,["id","for","label","required"]),t.createElementVNode("input",t.mergeProps({id:t.unref(i),"aria-labelledby":t.unref(o).labelledby,"aria-describedby":t.unref(o).describedby,"aria-errormessage":t.unref(o).errormessage,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200",t.unref(a)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],placeholder:d.placeholder},d.$attrs,{type:"text",onInput:f[0]||(f[0]=(...m)=>t.unref(c)&&t.unref(c)(...m)),onInvalid:f[1]||(f[1]=(...m)=>t.unref(s)&&t.unref(s)(...m))}),null,16,mc),t.createVNode(le,{id:t.unref(o).describedby,class:"mt-1",text:d.help},null,8,["id","text"]),t.createVNode(Se,{id:t.unref(o).errormessage,class:"mt-0.5",text:t.unref(a)},null,8,["id","text"])]))}}),hc=["id","aria-labelledby","aria-describedby","aria-errormessage"],gc=["textContent"],bc=["value","disabled","textContent"],ur=t.defineComponent({inheritAttrs:!1,__name:"Select",props:t.mergeModels(t.mergeDefaults({modelValue:{},options:{},label:{},help:{},placeholder:{}},{...Pe,placeholder:"Select an option"}),{modelValue:Z,modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",Z),{aria:o,inputID:a,isRequired:i,validate:l,errorState:s,onInvalid:c}=Ve(r);return(u,d)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(he,{id:t.unref(o).labelledby,class:"mb-2",for:t.unref(a),label:u.label,required:t.unref(i)},null,8,["id","for","label","required"]),t.withDirectives(t.createElementVNode("select",t.mergeProps({id:t.unref(a),"onUpdate:modelValue":d[0]||(d[0]=f=>e.value=f),"aria-labelledby":t.unref(o).labelledby,"aria-describedby":t.unref(o).describedby,"aria-errormessage":t.unref(o).errormessage,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6 pl-3 pr-10","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200 disabled:opacity-100",t.unref(s)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"]},u.$attrs,{onChange:d[1]||(d[1]=(...f)=>t.unref(l)&&t.unref(l)(...f)),onInvalid:d[2]||(d[2]=(...f)=>t.unref(c)&&t.unref(c)(...f))}),[t.createElementVNode("option",{value:"",disabled:"",selected:"",textContent:t.toDisplayString(u.placeholder)},null,8,gc),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.options,f=>(t.openBlock(),t.createElementBlock("option",{key:f.value,value:f.value,disabled:f.disabled,textContent:t.toDisplayString(f.label)},null,8,bc))),128))],16,hc),[[t.vModelSelect,e.value]]),t.createVNode(le,{id:t.unref(o).describedby,class:"mt-1",text:u.help},null,8,["id","text"]),t.createVNode(Se,{id:t.unref(o).errormessage,class:"mt-0.5",text:t.unref(s)},null,8,["id","text"])]))}}),fr=t.defineComponent({__name:"DateFilter",props:{dateRange:{},sortDir:{}},emits:["sort-dir-changed","date-range-changed"],setup(n,{emit:r}){const e=n,o=t.ref(e.dateRange),a=t.ref(e.sortDir),i=[{label:"Newest-Oldest",value:"desc"},{label:"Oldest-Newest",value:"asc"}],l=r,s=u=>{(u==="asc"||u==="desc")&&l("sort-dir-changed",u)},c=u=>{u&&l("date-range-changed",u)};return(u,d)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(ur,{modelValue:a.value,"onUpdate:modelValue":[d[0]||(d[0]=f=>a.value=f),s],options:i},null,8,["modelValue"]),t.createVNode(bn,{modelValue:o.value,"onUpdate:modelValue":[d[1]||(d[1]=f=>o.value=f),c],class:"ml-3"},null,8,["modelValue"])],64))}});function mt(n,r="GET",e={}){const o=t.ref(),a=t.shallowRef(),i=t.ref(!1),l=t.ref(!1),s=t.ref(!1),c=t.ref(!1);let u=0,d;const f=()=>{d!==void 0&&d.abort()},m=(g={},b={})=>{u++;const y=u;d=new AbortController,c.value=!1,l.value=!1,s.value=!0;const w={data:["PATCH","patch","POST","post","PUT","put"].includes(r)?g:{},method:r,params:["GET","get"].includes(r)?g:{},signal:d.signal,url:n};return rt(w,{...e,...b}).then(k=>(o.value=k,a.value=void 0,c.value=!1,k),k=>{throw a.value=k,uo(k)&&(c.value=!0),k}).finally(()=>{y==u&&(l.value=!0,s.value=!1),i.value=!0})};return e!=null&&e.immediate&&e.immediate===!0&&m(),{result:o,error:a,isFinished:l,isLoading:s,isAborted:c,hasFetched:i,abort:f,execute:m}}function yc(n,r={}){return mt(n,"GET",r)}function wc(n,r={}){return mt(n,"DELETE",r)}function xc(n,r={}){return mt(n,"PATCH",r)}function Cc(n,r={}){return mt(n,"POST",r)}function kc(n,r={}){return mt(n,"PUT",r)}const va="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Ec={CreateIdAttribute:(n=8)=>{let r="";for(let e=0;e<n;e++)r+=va.charAt(Math.floor(Math.random()*va.length));return r}};function $a(n={}){const r=t.ref(new Map);let e={removeDelay:1e4,email:""};const o=m=>{e={...e,...m}},a=m=>{r.value.delete(m)},i=m=>{const g=Ec.CreateIdAttribute();return r.value.set(g,m),(m.persistent===void 0||!m.persistent)&&setTimeout(()=>a(g),e.removeDelay),g},l=m=>i(m),s=(m,g=!1)=>i({message:m,persistent:g,type:"error"}),c=(m,g=!1)=>i({message:m,persistent:g,type:"info"}),u=(m,g=!1)=>i({message:m,persistent:g,type:"success"}),d=(m,g=!1)=>i({message:m,persistent:g,type:"warning"}),f=(m="",g=!1)=>{const b=m||e.email,y=b?`Whoops! Something went wrong, please reach out to
|
|
15
15
|
<a class="underline text-xy-blue" href="mailto:${b}">${b}</a>
|
|
16
16
|
if the issue persists.`:"Whoops! Something went wrong.";return i({message:y,persistent:g,type:"error"})};return o(n||{}),{flasher:{add:i,remove:a,flash:l,error:s,warning:d,info:c,success:u,genericError:f},flashes:r,configure:o}}const Dc=n=>{if(window.Flashes)for(const r of window.Flashes){if(typeof r.type>"u"){const e=r.message.split(": ");n.add({type:e[0],message:e[1]});continue}n.add(r)}};let pr;function Qe(){return pr===void 0&&(pr=$a()),pr}const mr={error(n,r){Qe().flasher.error(n,r)},info(n,r){Qe().flasher.info(n,r)},success(n,r){Qe().flasher.success(n,r)},warning(n,r){Qe().flasher.warning(n,r)},genericError(n,r){Qe().flasher.genericError(n,r)}},Sc=(n,r)=>{var u;const e=t.ref(n),o={initial:((u=e==null?void 0:e.value[0])==null?void 0:u.value)||"",paramName:(r==null?void 0:r.paramName)||"tab"},a=t.ref(o.initial),i=d=>!!e.value.find(f=>f.value===d),l=d=>a.value===d,c=new URLSearchParams(window.location.search).get(o.paramName);return c&&i(c)&&(a.value=c),t.watch(a,d=>{const f=new URLSearchParams(window.location.search);f.set(o.paramName,d.toString());const m=f.toString()!==""?`?${f.toString()}`:"";window.history.replaceState({tab:d},document.title,`${window.location.pathname}${m}`)}),{activeTab:a,isActiveTab:l,tabs:e}},Nc=n=>{const r=t.ref(n);return t.watch(r,e=>{const o=new URLSearchParams(window.location.search);for(const i in e){const l=e[i];if(l==null||l==null){o.delete(i);continue}if(Array.isArray(l)){o.delete(i),l.forEach(s=>{o.append(i,s.toString())});continue}!o.has(i)&&!l||o.set(i,l.toString())}const a=o.toString()!==""?`?${o.toString()}`:"";window.history.replaceState(t.toRaw(e),document.title,`${window.location.pathname}${a}`)},{deep:!0}),r},_c={class:"px-4 flex items-center justify-between sm:px-0"},Bc={class:"w-0 flex-1 flex"},Vc={class:"hidden md:flex"},Tc=["onClick","textContent"],vc={class:"w-0 flex-1 flex justify-end"},yn=t.defineComponent({__name:"Paginator",props:{modelValue:{required:!0},modelModifiers:{}},emits:["update:modelValue"],setup(n){const r=t.useModel(n,"modelValue"),e=a=>{r.value={...r.value,page:a}},o=t.computed(()=>{const a=[];if(r.value.totalPages<=4){for(let l=0;l<r.value.totalPages;l++)a.push(l+1);return a}if(r.value.totalPages-r.value.page>=3){for(let l=0;l<4;l++)a.push(r.value.page+l);return a}for(let l=0;l<4;l++)a.unshift(r.value.totalPages-l);return a});return(a,i)=>(t.openBlock(),t.createElementBlock("div",_c,[t.createElementVNode("div",Bc,[t.createElementVNode("a",{href:"#",class:t.normalizeClass(["-mt-px border-t-2 border-transparent pt-4 pr-1 inline-flex items-center text-sm leading-5 font-medium focus:outline-none focus:text-gray-700 focus:border-gray-400",r.value.page==1?"text-gray-500 cursor-not-allowed pointer-events-none":"text-gray-700 hover:text-gray-900 hover:border-gray-300"]),onClick:i[0]||(i[0]=t.withModifiers(l=>e(r.value.page-1),["prevent"]))},i[2]||(i[2]=[t.createElementVNode("svg",{class:"mr-3 h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z","clip-rule":"evenodd"})],-1),t.createTextVNode(" Previous ")]),2)]),t.createElementVNode("div",Vc,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.value,l=>(t.openBlock(),t.createElementBlock("a",{key:l,href:"#",class:t.normalizeClass(["-mt-px border-t-2 pt-4 px-4 inline-flex items-center text-sm leading-5 font-medium",r.value.page===l?"border-blue-500 text-blue-600 focus:outline-none focus:text-blue-800 focus:border-blue-700":"border-transparent text-gray-700 hover:text-gray-900 hover:border-gray-300 focus:outline-none focus:text-gray-700 focus:border-gray-400"]),onClick:t.withModifiers(s=>e(l),["prevent"]),textContent:t.toDisplayString(l)},null,10,Tc))),128))]),t.createElementVNode("div",vc,[t.createElementVNode("a",{href:"#",class:t.normalizeClass(["-mt-px border-t-2 border-transparent pt-4 pl-1 inline-flex items-center text-sm leading-5 font-medium focus:outline-none focus:text-gray-700 focus:border-gray-400",r.value.page>=r.value.totalPages?"text-gray-500 cursor-not-allowed pointer-events-none":"text-gray-700 hover:text-gray-900 hover:border-gray-300"]),onClick:i[1]||(i[1]=t.withModifiers(l=>e(r.value.page+1),["prevent"]))},i[3]||(i[3]=[t.createTextVNode(" Next "),t.createElementVNode("svg",{class:"ml-3 h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]),2)])]))}}),$c={key:0,class:"flex"},Ma=t.defineComponent({__name:"DetailList",props:{borderless:{type:Boolean,default:!1},defaultSort:{default:"created_at"},defaultSortDir:{default:"desc"},disableDate:{type:Boolean,default:!1},disableNavigation:{type:Boolean,default:!1},perPage:{default:10},url:{}},setup(n,{expose:r}){const e=n,o=t.ref({minDate:0,maxDate:0}),a=t.ref([]),i=t.ref({page:1,perPage:e.perPage,totalItems:0,totalPages:0}),l=t.ref(e.defaultSort),s=t.ref(e.defaultSortDir),c=()=>{const b={maxDate:o.value.maxDate,minDate:o.value.minDate,page:i.value.page,perPage:i.value.perPage,q:"",sort:l.value,sortDir:s.value};jn.get(e.url,{},b).then(y=>{i.value={page:y.data.page,perPage:y.data.perPage,totalItems:y.data.totalItems,totalPages:y.data.totalPages},a.value=y.data.items},()=>{mr.genericError()})},u=t.computed(()=>!!a.value.length),d=t.computed(()=>!e.disableDate),f=t.computed(()=>!e.disableNavigation&&u),g={refresh:c,reset:()=>{i.value.page=1,c()}};return t.watch([s,o],()=>{c()}),r(g),c(),(b,y)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass({"mt-4 space-y-2":d.value})},[b.disableDate?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",$c,[t.createVNode(fr,{"date-range":o.value,"sort-dir":s.value,onSortDirChanged:y[0]||(y[0]=w=>s.value=w),onDateRangeChanged:y[1]||(y[1]=w=>o.value=w)},null,8,["date-range","sort-dir"])])),u.value?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["overflow-hidden",{"shadow sm:rounded-md border":!b.borderless}])},[t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,(w,k)=>(t.openBlock(),t.createElementBlock("li",{key:k,class:t.normalizeClass({"border-t border-gray-200":k>0})},[t.renderSlot(b.$slots,"default",{item:w})],2))),128))])],2)):t.renderSlot(b.$slots,"empty",{key:2},()=>[y[4]||(y[4]=t.createTextVNode(" No items were found! "))]),f.value?(t.openBlock(),t.createBlock(yn,{key:3,modelValue:i.value,"onUpdate:modelValue":[y[2]||(y[2]=w=>i.value=w),y[3]||(y[3]=w=>c())]},null,8,["modelValue"])):t.createCommentVNode("",!0)],2))}}),Mc=["href"],Oa=t.defineComponent({__name:"DownloadCell",props:{propsData:{},attribute:{}},setup(n){return(r,e)=>(t.openBlock(),t.createElementBlock("a",{href:r.propsData[r.attribute]},[t.createVNode(t.unref(Vs),{class:"h-6 w-6 group-hover:text-gray-500 transition"})],8,Mc))}}),Oc={class:"fixed inset-0 flex flex-col items-end justify-end px-4 py-6 pointer-events-none sm:p-6 z-[45]"},Pc={class:"rounded-lg ring-1 ring-black ring-opacity-5 overflow-hidden"},Ac={class:"p-4"},Rc={class:"flex items-center"},Lc={class:"w-0 flex-1 flex justify-between"},Ic=["innerHTML"],Fc={class:"ml-4 shrink-0 flex"},jc=["onClick"],wn=t.defineComponent({__name:"Flash",setup(n){const{flasher:r,flashes:e}=Qe(),o=a=>{switch(a){case"warning":return"border-orange-500";case"error":return"border-red-500";case"info":return"border-blue-500";case"success":return"border-green-500"}};return t.onMounted(()=>{Dc(r)}),(a,i)=>(t.openBlock(),t.createBlock(t.unref(zn),null,{default:t.withCtx(()=>[t.createElementVNode("div",Oc,[t.createVNode(t.TransitionGroup,{tag:"div",class:"max-w-sm space-y-2 w-full","enter-active-class":"ease-out duration-300","enter-from-class":"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2","enter-to-class":"translate-y-0 opacity-100 sm:translate-x-0","leave-active-class":"ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(e),([l,s])=>(t.openBlock(),t.createElementBlock("div",{key:s.message,class:t.normalizeClass(["bg-white shadow-lg rounded-lg pointer-events-auto border-t-4 transform z-10",[o(s.type)]])},[t.createElementVNode("div",Pc,[t.createElementVNode("div",Ac,[t.createElementVNode("div",Rc,[t.createElementVNode("div",Lc,[t.createElementVNode("p",{class:"w-0 flex-1 text-sm leading-5 font-medium text-gray-900",innerHTML:s.message},null,8,Ic)]),t.createElementVNode("div",Fc,[t.createElementVNode("button",{class:"inline-flex text-gray-400 focus:outline-none focus:text-gray-500 transition ease-in-out duration-150",onClick:c=>t.unref(r).remove(l)},i[0]||(i[0]=[t.createElementVNode("svg",{class:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)]),8,jc)])])])])],2))),128))]),_:1})])]),_:1}))}});function Hc(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})])}function Uc(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h7"})])}function zc(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 6h16M4 12h16M4 18h16"})])}function Pa(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5.121 17.804A13.937 13.937 0 0112 16c2.5 0 4.847.655 6.879 1.804M15 10a3 3 0 11-6 0 3 3 0 016 0zm6 2a9 9 0 11-18 0 9 9 0 0118 0z"})])}function vt(n,r){return t.openBlock(),t.createBlock("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[t.createVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})])}const qc={class:"flex"},Wc={class:"flex-shrink-0"},Yc={class:"ml-2.5"},Kc={key:0,role:"list",class:"list-disc space-y-1 pl-5"},Gc={key:1},Jc={key:1,class:"mt-4"},Xc={class:"flex flex-col gap-y-1.5 -mx-2 sm:flex-row sm:gap-x-3 sm:items-center"},Zc={key:0},Qc=["href","role"],ed={key:1},td=["href","role"],nd={key:0,class:"ml-auto pl-3"},rd={class:"-mx-1.5 -my-1.5"},Aa=t.defineComponent({__name:"InlineAlert",props:{btnLink:{default:""},btnText:{default:""},content:{},dismissable:{type:Boolean,default:!1},secondaryBtnLink:{default:""},secondaryBtnText:{default:""},title:{default:""},kind:{}},emits:["close","click","click:secondary"],setup(n,{emit:r}){const e=n,o=r,a=t.ref(!0),i=()=>{a.value=!1,o("close",!0)},l=t.computed(()=>{const c={bgColor:"",btnAction:"",btnClose:"",contentColor:"",iconColor:""};switch(e.kind){case"alert":c.bgColor="bg-red-50",c.btnAction="bg-red-50 text-red-900 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50",c.btnClose="bg-red-50 text-red-600 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50",c.contentColor="text-red-800",c.iconColor="text-red-400";break;case"info":c.bgColor="bg-blue-50",c.btnAction="bg-blue-50 text-blue-900 hover:bg-blue-100 focus:ring-blue-600 focus:ring-offset-blue-50",c.btnClose="bg-blue-50 text-blue-600 hover:bg-blue-100 focus:ring-blue-600 focus:ring-offset-blue-50",c.contentColor="text-blue-800",c.iconColor="text-blue-400";break;case"success":c.bgColor="bg-emerald-50",c.btnAction="bg-emerald-50 text-emerald-900 hover:bg-emerald-100 focus:ring-emerald-600 focus:ring-offset-emerald-50",c.btnClose="bg-emerald-50 text-emerald-600 hover:bg-emerald-100 focus:ring-emerald-600 focus:ring-offset-emerald-50",c.contentColor="text-emerald-800",c.iconColor="text-emerald-400";break;case"warn":c.bgColor="bg-amber-50",c.btnAction="bg-amber-50 text-amber-900 hover:bg-amber-100 focus:ring-amber-600 focus:ring-offset-amber-50",c.btnClose="bg-amber-50 text-amber-600 hover:bg-amber-100 focus:ring-amber-600 focus:ring-offset-amber-50",c.contentColor="text-amber-800",c.iconColor="text-amber-400";break}return c}),s=t.computed(()=>{let c=null;switch(e.kind){case"alert":c=$s;break;case"info":c=vs;break;case"success":c=Zo;break;case"warn":c=Ts;break}return c});return(c,u)=>a.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["rounded-xy p-4",l.value.bgColor])},[t.createElementVNode("div",qc,[t.createElementVNode("div",Wc,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(s.value),{class:t.normalizeClass(["h-5 w-5",l.value.iconColor]),"aria-hidden":"true"},null,8,["class"]))]),t.createElementVNode("div",Yc,[c.title?(t.openBlock(),t.createElementBlock("h3",{key:0,class:t.normalizeClass(["text-sm leading-snug font-semibold mb-1.5",l.value.contentColor])},t.toDisplayString(c.title),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["text-sm",l.value.contentColor])},[Array.isArray(c.content)?(t.openBlock(),t.createElementBlock("ul",Kc,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.content,(d,f)=>(t.openBlock(),t.createElementBlock("li",{key:f},t.toDisplayString(d),1))),128))])):(t.openBlock(),t.createElementBlock("p",Gc,t.toDisplayString(c.content),1))],2),c.btnText||c.secondaryBtnText?(t.openBlock(),t.createElementBlock("div",Jc,[t.createElementVNode("div",Xc,[c.btnText?(t.openBlock(),t.createElementBlock("div",Zc,[t.createElementVNode("a",{class:t.normalizeClass(["inline-flex rounded-3xl px-2.5 py-1.5 text-sm font-medium focus:outline-none focus:ring-2 focus:ring-offset-2",l.value.btnAction]),href:c.btnLink,role:c.btnLink?"link":"button",onClick:u[0]||(u[0]=d=>c.$emit("click",d))},t.toDisplayString(c.btnText),11,Qc)])):t.createCommentVNode("",!0),c.secondaryBtnText?(t.openBlock(),t.createElementBlock("div",ed,[t.createElementVNode("a",{class:t.normalizeClass(["inline-flex rounded-3xl px-2.5 py-1.5 text-sm font-medium focus:outline-none focus:ring-2 focus:ring-offset-2",l.value.btnAction]),href:c.secondaryBtnLink,role:c.secondaryBtnLink?"link":"button",onClick:u[1]||(u[1]=d=>c.$emit("click:secondary",d))},t.toDisplayString(c.secondaryBtnText),11,td)])):t.createCommentVNode("",!0)])])):t.createCommentVNode("",!0)]),c.dismissable?(t.openBlock(),t.createElementBlock("div",nd,[t.createElementVNode("div",rd,[t.createElementVNode("button",{class:t.normalizeClass(["inline-flex rounded-md p-1.5 focus:outline-none focus:ring-2 focus:ring-offset-2",l.value.btnClose]),type:"button",onClick:i},[u[2]||(u[2]=t.createElementVNode("span",{class:"sr-only"},"close",-1)),t.createVNode(t.unref(vt),{class:"h-4 w-4"})],2)])])):t.createCommentVNode("",!0)])],2)):t.createCommentVNode("",!0)}}),od={class:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"},ad={class:"block absolute top-0 right-0 pt-4 pr-4 sm:pt-6 sm:pr-8"},id={class:"bg-white px-4 pt-5 pb-4 sm:p-8 sm:pb-6"},ld={class:"mt-3 sm:mt-0 sm:text-left"},sd={class:"mt-2"},cd={key:0,class:"bg-gray-50 px-4 py-3 sm:py-4 sm:px-8 sm:flex sm:flex-row-reverse"},dd=["disabled","textContent"],Ra=t.defineComponent({__name:"Modal",props:t.mergeModels({destructive:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},wide:{type:Boolean,default:!1},submitText:{default:""},title:{default:""}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:t.mergeModels(["close","submit"],["update:modelValue"]),setup(n,{emit:r}){const e=t.useModel(n,"modelValue"),o=r,a=()=>{o("submit")};return t.watch(e,i=>{i||o("close")}),(i,l)=>(t.openBlock(),t.createBlock(t.unref(St),{as:"template",show:e.value},{default:t.withCtx(()=>[t.createVNode(t.unref(tn),{as:"div",static:"",class:"fixed z-30 inset-0 overflow-y-auto",open:e.value,onClose:l[3]||(l[3]=s=>e.value=!1)},{default:t.withCtx(()=>[t.createElementVNode("div",od,[t.createVNode(t.unref(Ie),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in duration-200","leave-from":"opacity-100","leave-to":"opacity-0"},{default:t.withCtx(()=>[t.createVNode(t.unref(nn),{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})]),_:1}),l[5]||(l[5]=t.createElementVNode("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"",-1)),t.createVNode(t.unref(Ie),{as:"template",enter:"ease-out duration-300","enter-from":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95","enter-to":"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200","leave-from":"opacity-100 translate-y-0 sm:scale-100","leave-to":"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"},{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(["inline-block align-bottom bg-white rounded-xy text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:rounded-xy-lg w-full",i.wide?"sm:max-w-6xl":"sm:max-w-2xl"])},[t.createElementVNode("div",ad,[t.createElementVNode("button",{type:"button",class:"bg-white rounded-md text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500",onClick:l[0]||(l[0]=s=>e.value=!1)},[l[4]||(l[4]=t.createElementVNode("span",{class:"sr-only"},"Close",-1)),t.createVNode(t.unref(vt),{class:"h-6 w-6","aria-hidden":"true"})])]),t.createElementVNode("div",id,[t.createElementVNode("div",ld,[t.createVNode(t.unref(Yn),{as:"h3",class:"text-center text-lg leading-6 font-medium text-gray-900"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.title),1)]),_:1}),t.createElementVNode("div",sd,[t.renderSlot(i.$slots,"default")])])]),i.submitText?(t.openBlock(),t.createElementBlock("div",cd,[t.createElementVNode("button",{type:"button",class:t.normalizeClass(["xy-btn w-full sm:ml-3 sm:w-auto sm:text-sm",[i.destructive?"xy-btn-red":"xy-btn"]]),disabled:i.disabled,onClick:l[1]||(l[1]=s=>a()),textContent:t.toDisplayString(i.submitText)},null,10,dd),t.createElementVNode("button",{type:"button",class:"xy-btn-neutral mt-3 w-full sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm",onClick:l[2]||(l[2]=s=>e.value=!1)}," Cancel ")])):t.createCommentVNode("",!0),t.renderSlot(i.$slots,"buttons")],2)]),_:3})])]),_:3},8,["open"])]),_:3},8,["show"]))}}),ud={class:"aspect-square overflow-hidden"},fd={class:"flex justify-center relative"},pd={class:"sr-only"},hr=t.defineComponent({__name:"XYSpinner",setup(n){const r=t.useAttrs();return(e,o)=>{var a,i;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass((a=t.unref(r))!=null&&a.class?(i=t.unref(r))==null?void 0:i.class:"h-20 w-20"),role:"status"},[t.createElementVNode("div",ud,[t.createElementVNode("div",fd,[t.createElementVNode("p",pd,[t.renderSlot(e.$slots,"default",{},()=>[o[0]||(o[0]=t.createTextVNode("loading"))])]),o[1]||(o[1]=t.createStaticVNode('<div class="animate-spin-gear drop-shadow-sm"><svg class="h-full w-full text-xy-green-300" viewBox="0 0 129 129" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><polygon id="path-1" points="0.000248076923 0.48676924 128.472837 0.48676924 128.472837 128.800648 0.000248076923 128.800648"></polygon></defs><g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Group-6-Copy-3"><g id="Group-3"><mask id="mask-2" fill="white"><use xlink:href="#path-1"></use></mask><g id="Clip-2"></g><path id="Fill-1" d="M86.3955173,100.279324 C86.3955173,100.279324 79.4778923,106.213874 64.2360462,106.755809 C48.9954404,106.213874 42.0778154,100.279324 42.0778154,100.279324 C11.8756904,81.4963011 25.2309115,49.088357 25.2309115,49.088357 C36.5680269,24.1350542 59.1839596,22.5554236 63.8105942,22.4983139 L63.8105942,22.5043894 C63.8105942,22.5043894 63.9681231,22.4983139 64.2360462,22.4958837 C64.5052096,22.4983139 64.6627385,22.5043894 64.6627385,22.5043894 L64.6627385,22.4983139 C69.2881327,22.5554236 91.9053058,24.1350542 103.241181,49.088357 C103.241181,49.088357 116.596402,81.4963011 86.3955173,100.279324 L86.3955173,100.279324 Z M128.473085,68.8191581 L128.473085,60.4677727 L117.036738,58.80187 L115.10794,49.3726905 L124.970238,43.4186983 L121.675777,35.7307578 L110.49619,38.6214817 L106.161046,32.1486416 L113.220075,23.080347 L107.361738,17.0716753 L97.9645846,23.7437918 L89.14545,17.842049 L91.8693346,6.72144964 L84.04995,3.59378109 L78.2114596,13.4628269 L69.5907865,11.8127205 L67.908825,0.48676924 L64.6627385,0.48676924 L63.8105942,0.48676924 L60.5645077,0.48676924 L58.8813058,11.8127205 L50.2618731,13.4628269 L44.4233827,3.59378109 L36.6039981,6.72144964 L39.3278827,17.842049 L30.5087481,23.7437918 L21.1103538,17.0716753 L15.2520173,23.080347 L22.3122865,32.1486416 L17.9771423,38.6214817 L6.79755577,35.7307578 L3.50185385,43.4186983 L13.3641519,49.3726905 L11.4365942,58.80187 L0.000248076923,60.4677727 L0.000248076923,68.8191581 L11.4365942,70.4850608 L13.1036712,79.0223566 L3.13718077,84.8050196 L6.29644038,92.5488548 L17.5244019,89.8513318 L23.4832096,98.5854738 L16.7466808,107.893143 L22.8134019,113.695248 L31.9699212,106.70356 L38.5067481,110.99651 L35.5881231,122.068505 L43.35045,125.332265 L49.3625942,115.565287 L58.8813058,117.47421 L60.5645077,128.801377 L63.6927577,128.801377 L64.780575,128.801377 L67.908825,128.801377 L69.5907865,117.47421 L79.1107385,115.565287 L85.1228827,125.332265 L92.8852096,122.068505 L89.9665846,110.99651 L96.5034115,106.70356 L105.659931,113.695248 L111.725412,107.893143 L104.988883,98.5854738 L110.94769,89.8513318 L122.175652,92.5488548 L125.334912,84.8050196 L115.369662,79.0223566 L117.035498,70.4850608 L128.473085,68.8191581 Z" fill="currentColor" mask="url(#mask-2)"></path></g></g></g></svg></div><div class="absolute top-0 left-0 right-0 bottom-0 flex justify-center items-center transform scale-50"><svg viewBox="0 0 280 280" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path class="fill-xy-green" d="m17.57,94.37c-3.36,13.54-5.07,28.73-5.07,45.63,0,32.02,6.04,58,18.1,77.95,3.81,4.98,7.46,9.94,10.95,14.66,21.21,23.24,54.01,34.89,98.45,34.89.71,0,1.39-.03,2.09-.03-3.62-46.93-22.27-88.31-54.36-124.11-19.79-22.07-42.96-38.86-70.16-48.99Z"></path><path class="fill-xy-blue" d="m267.5,140c0-85-42.5-127.5-127.5-127.5-55.06,0-92.27,17.86-111.66,53.53,28.32,8.48,56.67,16.85,84.98,25.37,27.05,8.14,54.01,16.55,81.06,24.67,5.45,1.64,7.5,4.76,6.63,10.27-.69,4.35-1.04,8.75-1.57,13.13-4.95,40.77-8.32,81.74-12.43,122.61,53.64-13.88,80.49-54.56,80.49-122.08Z"></path></svg></div>',2))])])],2)}}}),md={key:0,class:"fixed top-0 left-0 flex flex-col items-center justify-center w-full h-full cursor-not-allowed z-40 bg-gray-50 bg-opacity-60"},hd={class:"mt-2"},xn=t.defineComponent({__name:"Spinner",setup(n){const{idx:r,loading:e,maxIdx:o,messages:a,msg:i,showMsg:l}=so(),s=()=>{r.value++,r.value>o.value&&(r.value=0),a.value&&(i.value=a.value[r.value]),l.value=!0},c=()=>{window.setTimeout(()=>{l.value=!1},2500)};return(u,d)=>(t.openBlock(),t.createBlock(t.unref(zn),null,{default:t.withCtx(()=>[t.unref(e)?(t.openBlock(),t.createElementBlock("div",md,[t.createVNode(hr,{class:"w-32 h-32"}),t.withDirectives(t.createElementVNode("div",hd,[t.createVNode(t.Transition,{appear:"","enter-active-class":"ease-out duration-1000","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"ease-in duration-500","leave-from-class":"opacity-100","leave-to-class":"opacity-0",onAfterEnter:c,onAfterLeave:s},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",{class:"container font-medium text-lg leading-snug text-center transition-opacity"},t.toDisplayString(t.unref(i)),513),[[t.vShow,t.unref(l)]])]),_:1})],512),[[t.vShow,t.unref(a)]])])):t.createCommentVNode("",!0)]),_:1}))}}),gd={class:"h-screen flex overflow-hidden bg-gray-50"},bd={class:"relative flex-1 flex flex-col max-w-xs w-full pt-5 pb-4 bg-white"},yd={class:"absolute top-0 right-0 -mr-12 pt-2"},wd={class:"shrink-0 flex justify-center px-4"},xd=["src"],Cd={class:"mt-5 flex flex-col flex-1 h-0 overflow-y-auto"},kd={class:"flex-1 px-2"},Ed={class:"space-y-1"},Dd=["href","target"],Sd={key:0,class:"mt-auto"},Nd={class:"mt-6 px-2"},_d={class:"hidden lg:flex lg:shrink-0"},Bd={class:"flex flex-col w-64"},Vd={class:"flex flex-col grow border-r border-gray-200 pt-5 pb-4 bg-white overflow-y-auto"},Td={class:"flex justify-center shrink-0 px-4"},vd=["src"],$d={class:"mt-5 grow flex flex-col"},Md={class:"flex-1 px-2 bg-white"},Od={class:"space-y-1"},Pd=["href","target"],Ad={key:0,class:"mt-atuo"},Rd={class:"mt-6 px-2"},Ld={class:"flex flex-col w-0 flex-1 overflow-hidden"},Id={class:"relative z-10 shrink-0 flex h-16 bg-xy-blue shadow"},Fd={class:"flex-1 px-4 flex justify-between"},jd={class:"flex-1 flex"},Hd={class:"flex items-center text-base leading-snug sm:text-2xl text-white"},Ud={class:"ml-4 flex items-center lg:ml-6"},zd=["href"],qd={class:"flex-1 relative overflow-y-auto focus:outline-none"},Wd={class:"mx-auto"},La=t.defineComponent({__name:"SidebarLayout",props:{activeUrl:{default:""},iconUrl:{},navigation:{},userNavigation:{}},setup(n){const r=n,e=t.ref(!1),o=a=>r.activeUrl===a;return(a,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",gd,[t.createVNode(t.unref(St),{as:"template",show:e.value},{default:t.withCtx(()=>[t.createVNode(t.unref(tn),{as:"div",static:"",class:"fixed inset-0 flex z-10 lg:hidden",open:e.value,onClose:i[1]||(i[1]=l=>e.value=!1)},{default:t.withCtx(()=>[t.createVNode(t.unref(Ie),{as:"template",enter:"transition-opacity ease-linear duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"transition-opacity ease-linear duration-300","leave-from":"opacity-100","leave-to":"opacity-0"},{default:t.withCtx(()=>[t.createVNode(t.unref(nn),{class:"fixed inset-0 bg-gray-600 bg-opacity-75"})]),_:1}),t.createVNode(t.unref(Ie),{as:"template",enter:"transition ease-in-out duration-300 transform","enter-from":"-translate-x-full","enter-to":"translate-x-0",leave:"transition ease-in-out duration-300 transform","leave-from":"translate-x-0","leave-to":"-translate-x-full"},{default:t.withCtx(()=>[t.createElementVNode("div",bd,[t.createVNode(t.unref(Ie),{as:"template",enter:"ease-in-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in-out duration-300","leave-from":"opacity-100","leave-to":"opacity-0"},{default:t.withCtx(()=>[t.createElementVNode("div",yd,[t.createElementVNode("button",{class:"ml-1 flex items-center justify-center h-10 w-10 rounded-full focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white",onClick:i[0]||(i[0]=l=>e.value=!1)},[i[3]||(i[3]=t.createElementVNode("span",{class:"sr-only"},"Close sidebar",-1)),t.createVNode(t.unref(vt),{class:"h-6 w-6 text-white","aria-hidden":"true"})])])]),_:1}),t.createElementVNode("div",wd,[t.createElementVNode("img",{class:"w-auto h-12",src:a.iconUrl,alt:"Logo"},null,8,xd)]),t.createElementVNode("div",Cd,[t.createElementVNode("div",kd,[t.renderSlot(a.$slots,"sidebar-nav",{},()=>[t.createElementVNode("nav",Ed,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([o(l.url)?"bg-gray-100 text-gray-900":"text-gray-700 hover:bg-gray-50 hover:text-gray-900","group flex items-center px-2 py-2 text-base font-semibold rounded-md"]),target:l.openInTab?"_blank":"_self"},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.icon),{class:t.normalizeClass([o(l.url)?"text-gray-600":"text-gray-500 group-hover:text-gray-600","mr-4 h-6 w-6"]),"aria-hidden":"true"},null,8,["class"])),t.createTextVNode(" "+t.toDisplayString(l.name),1)],10,Dd))),128))])])]),a.$slots["sidebar-bottom"]?(t.openBlock(),t.createElementBlock("div",Sd,[t.createElementVNode("div",Nd,[t.renderSlot(a.$slots,"sidebar-bottom")])])):t.createCommentVNode("",!0)])])]),_:3}),i[4]||(i[4]=t.createElementVNode("div",{class:"shrink-0 w-14","aria-hidden":"true"},null,-1))]),_:3},8,["open"])]),_:3},8,["show"]),t.createElementVNode("div",_d,[t.createElementVNode("div",Bd,[t.createElementVNode("div",Vd,[t.createElementVNode("div",Td,[t.createElementVNode("img",{class:"w-auto h-12",src:a.iconUrl,alt:"Logo"},null,8,vd)]),t.createElementVNode("div",$d,[t.createElementVNode("div",Md,[t.renderSlot(a.$slots,"sidebar-nav",{},()=>[t.createElementVNode("nav",Od,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([o(l.url)?"bg-gray-100 text-gray-900":"text-gray-800 hover:bg-gray-100 hover:text-gray-900","group flex items-center px-2 py-2 text-sm font-semibold rounded-md"]),target:l.openInTab?"_blank":"_self"},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.icon),{class:t.normalizeClass([o(l.url)?"text-gray-600":"text-gray-400 group-hover:text-gray-600","mr-3 h-6 w-6"]),"aria-hidden":"true"},null,8,["class"])),t.createTextVNode(" "+t.toDisplayString(l.name),1)],10,Pd))),128))])])]),a.$slots["sidebar-bottom"]?(t.openBlock(),t.createElementBlock("div",Ad,[t.createElementVNode("div",Rd,[t.renderSlot(a.$slots,"sidebar-bottom")])])):t.createCommentVNode("",!0)])])])]),t.createElementVNode("div",Ld,[t.createElementVNode("div",Id,[t.createElementVNode("button",{class:"px-4 border-r border-gray-200 text-white focus:outline-none focus:ring-2 focus:ring-inset focus:ring-blue-500 lg:hidden",onClick:i[2]||(i[2]=l=>e.value=!0)},[i[5]||(i[5]=t.createElementVNode("span",{class:"sr-only"},"Open sidebar",-1)),t.createVNode(t.unref(Uc),{class:"h-6 w-6","aria-hidden":"true"})]),t.createElementVNode("div",Fd,[t.createElementVNode("div",jd,[t.createElementVNode("h1",Hd,[t.renderSlot(a.$slots,"header")])]),t.createElementVNode("div",Ud,[t.createVNode(t.unref(Kn),{as:"div",class:"ml-3 relative"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(Gn),{class:"max-w-xs flex items-center text-sm text-white rounded-full hover:bg-blue-900 hover:text-gray-50 focus:outline-none focus:ring focus:text-white"},{default:t.withCtx(()=>[i[6]||(i[6]=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1)),t.createVNode(t.unref(_s),{class:"h-8 w-8",fill:"currentColor"})]),_:1})]),t.createVNode(t.Transition,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:t.withCtx(()=>[t.createVNode(t.unref(Jn),{class:"origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.userNavigation,l=>(t.openBlock(),t.createBlock(t.unref(Xn),{key:l.name},{default:t.withCtx(({active:s})=>[t.createElementVNode("a",{href:l.url,class:t.normalizeClass([s?"bg-gray-100":"","block px-4 py-2 text-sm text-gray-700 font-semibold"])},t.toDisplayString(l.name),11,zd)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})])])]),t.createElementVNode("main",qd,[t.createElementVNode("div",Wd,[t.renderSlot(a.$slots,"default")])])])]),t.createVNode(wn),t.createVNode(xn)],64))}}),$t=t.defineComponent({__name:"Popover",props:{as:{default:"div"},position:{default:"auto"}},setup(n){const r=n,e=t.useTemplateRef("trigger"),o=t.useTemplateRef("wrapper"),a=t.computed(()=>{const s=[Us(5),qs()];return r.position==="auto"&&s.push(Hs()),s}),i=t.computed(()=>{if(r.position!=="auto")return r.position}),{floatingStyles:l}=Sa(e,o,{middleware:a,placement:i,strategy:"fixed",whileElementsMounted:Ca});return(s,c)=>(t.openBlock(),t.createBlock(t.unref(Fo),{as:s.as,class:"relative"},{default:t.withCtx(({open:u,close:d})=>[t.createVNode(t.unref(ms),{ref:"trigger"},{default:t.withCtx(()=>[t.renderSlot(s.$slots,"button",{open:u,close:d})]),_:2},1536),t.createElementVNode("div",{ref:"wrapper",class:"z-[5]",style:t.normalizeStyle(t.unref(l))},[t.createVNode(t.unref(hs),null,{default:t.withCtx(()=>[t.renderSlot(s.$slots,"default",{open:u,close:d})]),_:2},1024)],4)]),_:3},8,["as"]))}}),Yd=(n,r)=>{const e=n.__vccOpts||n;for(const[o,a]of r)e[o]=a;return e},Kd={},Gd={class:"w-full max-w-xs bg-white rounded-xy p-2 border border-gray-100 shadow-md"};function Jd(n,r){return t.openBlock(),t.createElementBlock("div",Gd,[t.renderSlot(n.$slots,"default")])}const Ia=Yd(Kd,[["render",Jd]]),Xd={class:"absolute inset-0 overflow-hidden"},Zd={class:"fixed inset-y-0 right-0 pl-10 max-w-full flex"},Qd={class:"w-screen max-w-md"},eu={class:"h-full flex flex-col bg-white shadow-xl overflow-y-scroll"},tu={class:"py-6 px-4 bg-xy-blue-700 sm:px-6"},nu={class:"flex items-center justify-between"},ru={class:"ml-3 h-7 flex items-center"},ou={class:"mt-1"},au=["textContent"],iu={class:"relative flex-1 py-6 px-4 sm:px-6"},Fa=t.defineComponent({__name:"Slideover",props:t.mergeModels({header:{},description:{}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:t.mergeModels(["close"],["update:modelValue"]),setup(n,{emit:r}){const e=t.useModel(n,"modelValue"),o=r;return t.watch(e,a=>{a||o("close")}),(a,i)=>(t.openBlock(),t.createBlock(t.unref(St),{as:"template",show:e.value},{default:t.withCtx(()=>[t.createVNode(t.unref(tn),{as:"div",static:"",class:"fixed inset-0 z-20 overflow-hidden bg-black bg-opacity-50",open:e.value,onClose:i[1]||(i[1]=l=>e.value=!1)},{default:t.withCtx(()=>[t.createElementVNode("div",Xd,[t.createVNode(t.unref(nn),{class:"absolute inset-0"}),t.createElementVNode("div",Zd,[t.createVNode(t.unref(Ie),{as:"template",enter:"transform transition ease-in-out duration-500 sm:duration-700","enter-from":"translate-x-full","enter-to":"translate-x-0",leave:"transform transition ease-in-out duration-500 sm:duration-700","leave-from":"translate-x-0","leave-to":"translate-x-full"},{default:t.withCtx(()=>[t.createElementVNode("div",Qd,[t.createElementVNode("div",eu,[t.createElementVNode("div",tu,[t.createElementVNode("div",nu,[t.createVNode(t.unref(Yn),{as:"h3",class:"text-white"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a.header),1)]),_:1}),t.createElementVNode("div",ru,[t.createElementVNode("button",{class:"bg-xy-blue-600 rounded-md text-gray-50 hover:text-white focus:outline-none focus:ring-2 focus:ring-white",onClick:i[0]||(i[0]=l=>e.value=!1)},[i[2]||(i[2]=t.createElementVNode("span",{class:"sr-only"},"Close panel",-1)),t.createVNode(t.unref(vt),{class:"h-6 w-6","aria-hidden":"true"})])])]),t.createElementVNode("div",ou,[t.createElementVNode("p",{class:"text-gray-50 text-base font-medium",textContent:t.toDisplayString(a.description)},null,8,au)])]),t.createElementVNode("div",iu,[t.renderSlot(a.$slots,"default")]),t.renderSlot(a.$slots,"footer")])])]),_:3})])])]),_:3},8,["open"])]),_:3},8,["show"]))}}),lu=["onMouseover","onMouseleave"],su=["onMouseleave"],cu={class:"max-w-xs"},ja=t.defineComponent({__name:"Tooltip",props:{as:{default:"span"},position:{default:"auto"}},setup(n){var r=!1,e=null;const o=i=>{r=!1,e&&clearTimeout(e),e=setTimeout(()=>{r||i()},100)},a=(i,l)=>{r=!0,!l&&i.target&&i.target.click()};return(i,l)=>(t.openBlock(),t.createBlock($t,{position:i.position,as:i.as},{button:t.withCtx(({open:s,close:c})=>[t.createElementVNode("div",{class:"leading-none relative w-4 h-4",onMouseover:u=>a(u,s),onMouseleave:u=>o(c)},[t.createVNode(t.unref(Hc)),l[1]||(l[1]=t.createElementVNode("div",{class:"p-5 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"},null,-1))],40,lu)]),default:t.withCtx(({close:s})=>[t.createElementVNode("div",{class:"sm:min-w-max bg-white rounded-xy px-3.5 py-2.5 border border-gray-100 drop-shadow-md text-xs text-gray-900 leading-snug font-medium",onMouseover:l[0]||(l[0]=t.withModifiers(c=>t.isRef(r)?r.value=!0:r=!0,["prevent"])),onMouseleave:t.withModifiers(c=>o(s),["prevent"])},[t.createElementVNode("div",cu,[t.renderSlot(i.$slots,"default")])],40,su)]),_:3},8,["position","as"]))}}),du={class:"min-h-screen bg-gray-50"},uu={class:"mx-auto px-4 sm:px-6 lg:px-8"},fu={class:"flex justify-between h-16"},pu={class:"flex"},mu={class:"shrink-0 flex items-center"},hu=["src"],gu={class:"hidden sm:-my-px sm:ml-6 sm:flex sm:space-x-8"},bu=["href","aria-current"],yu={class:"hidden sm:ml-6 sm:flex sm:items-center"},wu=["href"],xu={class:"-mr-2 flex items-center sm:hidden"},Cu={class:"pt-2 pb-3 space-y-1"},ku=["href","aria-current"],Eu={class:"pt-4 pb-3 border-t border-gray-200"},Du={class:"flex items-center px-4"},Su={class:"shrink-0"},Nu={class:"ml-3"},_u=["textContent"],Bu=["textContent"],Vu={class:"mt-3 space-y-1"},Tu=["href"],vu={class:"mx-auto sm:px-6 lg:px-8"},$u={class:"px-4 py-8 sm:px-0"},Ha=t.defineComponent({__name:"StackedLayout",props:{activeUrl:{default:""},currentUser:{},iconUrl:{},navigation:{},userNavigation:{}},setup(n){const r=n,e=o=>r.activeUrl===o;return(o,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",du,[t.createVNode(t.unref(is),{as:"nav",class:"bg-white shadow-sm"},{default:t.withCtx(({open:i})=>[t.createElementVNode("div",uu,[t.createElementVNode("div",fu,[t.createElementVNode("div",pu,[t.createElementVNode("div",mu,[t.createElementVNode("img",{class:"block h-8 w-auto",src:o.iconUrl,alt:"XY Trees"},null,8,hu)]),t.createElementVNode("div",gu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([e(l.url)?"border-blue-500 text-gray-900":"border-transparent text-gray-700 hover:text-gray-900 hover:border-blue-500","inline-flex items-center px-1 pt-1 border-b-2 text-sm font-semibold"]),"aria-current":e(l.url)?"page":void 0},t.toDisplayString(l.name),11,bu))),128))])]),t.createElementVNode("div",yu,[t.createVNode(t.unref(Kn),{as:"div",class:"ml-3 relative"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(Gn),{class:"bg-white flex text-sm rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"},{default:t.withCtx(()=>[a[0]||(a[0]=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1)),t.createVNode(t.unref(Pa),{class:"text-gray-500 h-8 w-8 rounded-full"})]),_:1})]),t.createVNode(t.Transition,{"enter-active-class":"transition ease-out duration-200","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:t.withCtx(()=>[t.createVNode(t.unref(Jn),{class:"origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.userNavigation,l=>(t.openBlock(),t.createBlock(t.unref(Xn),{key:l.name},{default:t.withCtx(({active:s})=>[t.createElementVNode("a",{href:l.url,class:t.normalizeClass([s?"bg-gray-100":"","block px-4 py-2 text-sm text-gray-700 font-semibold"])},t.toDisplayString(l.name),11,wu)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})]),t.createElementVNode("div",xu,[t.createVNode(t.unref(ls),{class:"bg-white inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"},{default:t.withCtx(()=>[a[1]||(a[1]=t.createElementVNode("span",{class:"sr-only"},"Open main menu",-1)),i?(t.openBlock(),t.createBlock(t.unref(vt),{key:1,class:"block h-6 w-6","aria-hidden":"true"})):(t.openBlock(),t.createBlock(t.unref(zc),{key:0,class:"block h-6 w-6","aria-hidden":"true"}))]),_:2},1024)])])]),t.createVNode(t.unref(ss),{class:"sm:hidden"},{default:t.withCtx(()=>[t.createElementVNode("div",Cu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([e(l.url)?"bg-blue-50 border-blue-500 text-blue-700":"border-transparent text-gray-700 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-900","block pl-3 pr-4 py-2 border-l-4 text-base font-semibold"]),"aria-current":e(l.url)?"page":void 0},t.toDisplayString(l.name),11,ku))),128))]),t.createElementVNode("div",Eu,[t.createElementVNode("div",Du,[t.createElementVNode("div",Su,[t.createVNode(t.unref(Pa),{class:"text-gray-500 h-10 w-10 rounded-full"})]),t.createElementVNode("div",Nu,[o.currentUser.name?(t.openBlock(),t.createElementBlock("div",{key:0,class:"text-base font-medium text-gray-800",textContent:t.toDisplayString(o.currentUser.name)},null,8,_u)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"text-sm font-medium text-gray-500",textContent:t.toDisplayString(o.currentUser.email)},null,8,Bu)])]),t.createElementVNode("div",Vu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.userNavigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:"block px-4 py-2 text-base font-medium text-gray-700 hover:text-gray-900 hover:bg-gray-100"},t.toDisplayString(l.name),9,Tu))),128))])])]),_:1})]),_:1}),t.renderSlot(o.$slots,"header"),t.createElementVNode("main",null,[t.createElementVNode("div",vu,[t.createElementVNode("div",$u,[t.renderSlot(o.$slots,"default")])])])]),t.createVNode(wn),t.createVNode(xn)],64))}}),Mu=n=>n==null,Ou={refresh(){console.warn("refresh() was called on a static table, did you mean to use DynamicTable?")},reset(){console.warn("reset() was called on a static table, did you mean to use DynamicTable?")}},Ua=(n,r,e,o=Ou)=>{const a=t.ref(r),i=t.ref(n),l=t.ref(e),s=t.computed(()=>l.value.actions.length>0),c=t.computed(()=>a.value.map(d=>{let f="";switch((d==null?void 0:d.alignment)||"left"){case"left":f="text-left";break;case"right":f="text-right";break;case"center":f="text-center";break}return{...d,alignment:f}})),u=t.computed(()=>i.value.map((d,f)=>({actions:l.value.actions.map(m=>({...m,disabled:typeof m.disabled=="function"?m.disabled.apply(void 0,[d,f]):m.disabled,onClick:()=>m.onClick(d,f,o),show:typeof m.show=="function"?m.show.apply(void 0,[d,f]):m.show})),rowData:d,cells:c.value.map(m=>{const g=typeof m.render=="string"?d[m.render]:m.render(d,f),b=(m==null?void 0:m.classNames)||"";return{...m,isComponent:t.isVNode(g),classNames:typeof b=="function"?b.apply(void 0,[d,f]):b,val:g}})})));return{columns:c,hasActions:s,isEmptyCellValue:Mu,rows:u}},Pu={key:0,class:"flex items-center space-x-2 justify-end"},Au={class:"isolate inline-flex rounded-md shadow-sm"},Ru=["disabled","onClick"],Lu={class:"relative inline-flex items-center gap-x-1.5"},za=t.defineComponent({__name:"TableActionButtons",props:{actions:{default:()=>[]}},setup(n){const r=n,{actions:e,hasActions:o}=ea(t.toRef(r,"actions"));return(a,i)=>t.unref(o)?(t.openBlock(),t.createElementBlock("div",Pu,[t.createElementVNode("span",Au,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(e),(l,s)=>(t.openBlock(),t.createElementBlock("button",{key:s,type:"button",class:t.normalizeClass(["group relative inline-flex items-center bg-white px-3 py-2 text-sm font-semibold text-gray-700 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10 disabled:text-gray-400 disabled:cursor-not-allowed",{"rounded-l-md":s===0,"-ml-px":s>0,"rounded-r-md":s===t.unref(e).length-1}]),disabled:l.disabled,onClick:t.withModifiers(l.onClick,["stop"])},[t.createElementVNode("span",Lu,[l.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.icon),{key:0,class:t.normalizeClass(["-ml-0.5 h-4 w-4 group-disabled:text-gray-300",l.label?"text-gray-400":"text-gray-600"]),"aria-hidden":"true"},null,8,["class"])):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(l.label),1)])],10,Ru))),128))])])):t.createCommentVNode("",!0)}}),Iu={class:"flex flex-col"},Fu={class:"-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"},ju={class:"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8"},Hu={class:"overflow-hidden border-b border-gray-200 shadow sm:rounded-lg"},Uu={class:"min-w-full divide-y divide-gray-200"},zu={class:"bg-gray-100"},qu={key:0,class:"px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4"},Wu={class:"bg-white"},Yu={key:0,class:"px-6 py-2 text-sm text-gray-700 whitespace-nowrap leading-5"},Ku={key:0},Gu=["colspan"],qa=t.defineComponent({__name:"DataTable",props:{tableActions:{default:()=>({type:"dropdown",actions:[]})},tableColumns:{},tableData:{}},setup(n){const r=n,{columns:e,hasActions:o,isEmptyCellValue:a,rows:i}=Ua(t.toRef(r,"tableData"),t.toRef(r,"tableColumns"),t.toRef(r,"tableActions"));return(l,s)=>(t.openBlock(),t.createElementBlock("div",Iu,[t.createElementVNode("div",Fu,[t.createElementVNode("div",ju,[t.createElementVNode("div",Hu,[t.createElementVNode("table",Uu,[t.createElementVNode("thead",zu,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(e),(c,u)=>(t.openBlock(),t.createElementBlock("th",{key:u,class:t.normalizeClass(["px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4",c.alignment])},t.toDisplayString(c.title),3))),128)),t.unref(o)?(t.openBlock(),t.createElementBlock("th",qu)):t.createCommentVNode("",!0)])]),t.createElementVNode("tbody",Wu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(i),(c,u)=>(t.openBlock(),t.createElementBlock("tr",{key:u,class:"even:bg-gray-50"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.cells,(d,f)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent("td"),{key:f,class:t.normalizeClass(["px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5",d.alignment])},{default:t.withCtx(()=>[d.isComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(d.val),{key:0})):(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(d.classNames)},t.toDisplayString(t.unref(a)(d.val)?"-":String(d.val)),3))]),_:2},1032,["class"]))),128)),t.unref(o)?(t.openBlock(),t.createElementBlock("td",Yu,[l.tableActions.type==="dropdown"?(t.openBlock(),t.createBlock(t.unref(pn),{key:0,actions:c.actions},null,8,["actions"])):(t.openBlock(),t.createBlock(za,{key:1,actions:c.actions},null,8,["actions"]))])):t.createCommentVNode("",!0)]))),128)),t.unref(i).length===0?(t.openBlock(),t.createElementBlock("tr",Ku,[t.createElementVNode("td",{colspan:t.unref(e).length+(t.unref(o)?1:0),class:"px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5"}," No items were found! ",8,Gu)])):t.createCommentVNode("",!0)])])])])])]))}}),Ju={class:"flex items-center justify-center space-x-8"},Xu={class:"font-medium"},Zu={class:"flex items-center space-x-5"},Qu={key:0,class:"block w-2.5 h-2.5 bg-xy-green rounded-full hover:bg-green-900 focus:bg-green-900"},ef={key:1,class:"relative flex items-center justify-center"},tf={key:2,href:"#",class:"block w-2.5 h-2.5 bg-gray-200 rounded-full hover:bg-gray-400 focus:bg-gray-400"},nf={key:0,class:"flex shrink-0"},rf={key:0,class:"inline-flex rounded-md shadow-sm"},of=["textContent"],af={class:"ml-3 inline-flex rounded-md shadow-sm"},lf=["textContent"],Wa=t.defineComponent({__name:"Steps",props:{hideActions:{type:Boolean,default:!1},hidePrevious:{type:Boolean,default:!1},nextText:{default:"Next"},previousText:{default:"Back"},step:{},total:{}},emits:["next","previous"],setup(n,{emit:r}){const e=r,o=()=>{e("next")},a=()=>{e("previous")};return(i,l)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("nav",Ju,[t.createElementVNode("p",Xu,"Step "+t.toDisplayString(i.step)+" of "+t.toDisplayString(i.total),1),t.createElementVNode("ul",Zu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.total,s=>(t.openBlock(),t.createElementBlock("li",{key:s},[i.step>s?(t.openBlock(),t.createElementBlock("span",Qu)):i.step===s?(t.openBlock(),t.createElementBlock("div",ef,l[0]||(l[0]=[t.createElementVNode("span",{class:"absolute w-5 h-5 p-px flex"},[t.createElementVNode("span",{class:"w-full h-full rounded-full bg-green-100"})],-1),t.createElementVNode("span",{class:"relative block w-2.5 h-2.5 bg-xy-green rounded-full"},null,-1)]))):(t.openBlock(),t.createElementBlock("span",tf))]))),128))])]),i.hideActions?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",nf,[i.hidePrevious?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",rf,[t.createElementVNode("button",{type:"button",class:"xy-btn-secondary",onClick:a,textContent:t.toDisplayString(i.previousText)},null,8,of)])),t.createElementVNode("span",af,[t.createElementVNode("button",{type:"button",class:"xy-btn",onClick:o,textContent:t.toDisplayString(i.nextText)},null,8,lf)])]))]))}}),sf={class:"flex flex-col mb-4 space-y-4 lg:space-y-0 lg:flex-row lg:justify-between"},cf={key:0,class:"w-full max-w-lg lg:max-w-xs"},df={class:"flex items-center gap-x-2"},uf={class:"flex-1"},ff={key:1,class:"w-full max-w-lg lg:max-w-xs"},pf={class:"flex items-center gap-x-2"},mf={class:"flex-1"},hf={class:"relative z-0 min-w-full align-middle border-b border-gray-200 shadow sm:rounded-lg overflow-x-auto"},gf={class:"min-w-full divide-y divide-gray-200"},bf={class:"bg-gray-100"},yf=["onClick"],wf={key:0},xf={key:1},Cf={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",class:"h-5 inline"},kf={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},Ef={key:2,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},Df={key:0,class:"px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4"},Sf={class:"bg-white"},Nf=["onClick"],_f={key:0,class:"px-6 py-2 text-sm text-gray-700 whitespace-nowrap leading-5"},Bf={key:0},Vf=["colspan"],Ya=t.defineComponent({__name:"DynamicTable",props:{tableActions:{default:()=>({type:"dropdown",actions:[]})},tableColumns:{},tableOptions:{}},emits:["click:row"],setup(n,{expose:r}){const e=n,o=()=>{const M={minDate:b.value.minDate,maxDate:b.value.maxDate,page:y.value.page,perPage:y.value.perPage,sort:m.value,sortDir:g.value,q:w.value};jn.get(e.tableOptions.url,{skipLoader:!1},M).then(v=>{y.value={page:v.data.page,perPage:v.data.perPage,totalItems:v.data.totalItems,totalPages:v.data.totalPages},l.value=v.data.items},()=>{mr.genericError()})},a=()=>{y.value.page=1,o()},i=()=>{if(N.value.maxRange){const M=new Date,v=M.setDate(M.getDate()-N.value.maxRange),O=new Date;b.value={minDate:Math.floor(v/1e3),maxDate:Math.floor(O.getTime()/1e3)}}},l=t.ref([]),s={refresh:o,reset:a},{columns:c,hasActions:u,isEmptyCellValue:d,rows:f}=Ua(l,t.toRef(e,"tableColumns"),t.toRef(e,"tableActions"),s),m=t.ref(e.tableOptions.defaultSort?e.tableOptions.defaultSort:""),g=t.ref(e.tableOptions.defaultSortDirection?e.tableOptions.defaultSortDirection:"desc"),b=t.ref({minDate:0,maxDate:0}),y=t.ref({page:1,perPage:10,totalItems:0,totalPages:0}),w=t.ref(""),k=M=>{M&&(y.value.page=1,b.value=M,o())},S=M=>{m.value==M?g.value=g.value==="desc"?"asc":"desc":(m.value=M,g.value="desc"),o()},N=t.computed(()=>typeof e.tableOptions.dateSearch=="object"?e.tableOptions.dateSearch:{}),L=t.computed(()=>!!f.value.length);return t.watch(()=>e.tableOptions.refreshTrigger,()=>{o()}),t.watch(()=>e.tableOptions.reloadTrigger,()=>{a()}),r(s),i(),o(),(M,v)=>{const O=t.resolveComponent("BaseInput");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",sf,[M.tableOptions.search?(t.openBlock(),t.createElementBlock("div",cf,[v[6]||(v[6]=t.createElementVNode("label",{for:"table-search",class:"sr-only"},"Search",-1)),t.createElementVNode("div",df,[v[5]||(v[5]=t.createElementVNode("div",{"aria-hidden":"true",class:"shrink-0 aspect-square rounded-full bg-gray-50 text-gray-400 h-10 w-10 flex items-center justify-center pointer-events-none"},[t.createElementVNode("svg",{class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z","clip-rule":"evenodd"})])],-1)),t.createElementVNode("div",uf,[t.createVNode(O,{id:"table-search",modelValue:w.value,"onUpdate:modelValue":v[0]||(v[0]=I=>w.value=I),modelModifiers:{trim:!0},type:"search",placeholder:"Search",onChange:v[1]||(v[1]=I=>a())},null,8,["modelValue"])])])])):t.createCommentVNode("",!0),M.tableOptions.dateSearch?(t.openBlock(),t.createElementBlock("div",ff,[v[8]||(v[8]=t.createElementVNode("label",{for:"table-date-range",class:"sr-only"},"Date Range",-1)),t.createElementVNode("div",pf,[v[7]||(v[7]=t.createElementVNode("div",{"aria-hidden":"true",class:"shrink-0 aspect-square rounded-full bg-gray-50 text-gray-400 h-10 w-10 flex items-center justify-center pointer-events-none"},[t.createElementVNode("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})])],-1)),t.createElementVNode("div",mf,[t.createVNode(bn,t.mergeProps({id:"table-date-range",modelValue:b.value,"onUpdate:modelValue":v[2]||(v[2]=I=>b.value=I)},{...N.value},{"onUpdate:modelValue":k}),null,16,["modelValue"])])])])):t.createCommentVNode("",!0)]),t.createElementVNode("div",hf,[t.createElementVNode("table",gf,[t.createElementVNode("thead",bf,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(c),(I,F)=>(t.openBlock(),t.createElementBlock("th",{key:F,class:t.normalizeClass(["px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase leading-4",I.alignment])},[t.createElementVNode("div",{class:t.normalizeClass(["inline-flex items-center gap-2",{"cursor-pointer":I.sort}]),onClick:t.withModifiers(H=>I.sort?S(I.sort):void 0,["prevent"])},[I.title?(t.openBlock(),t.createElementBlock("span",wf,t.toDisplayString(I.title),1)):t.createCommentVNode("",!0),I.sort?(t.openBlock(),t.createElementBlock("span",xf,[m.value!==I.sort?(t.openBlock(),t.createElementBlock("svg",Cf,v[9]||(v[9]=[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 9l4-4 4 4m0 6l-4 4-4-4"},null,-1)]))):g.value=="desc"?(t.openBlock(),t.createElementBlock("svg",kf,v[10]||(v[10]=[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M14.707 12.707a1 1 0 01-1.414 0L10 9.414l-3.293 3.293a1 1 0 01-1.414-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 010 1.414z","clip-rule":"evenodd"},null,-1)]))):(t.openBlock(),t.createElementBlock("svg",Ef,v[11]||(v[11]=[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z","clip-rule":"evenodd"},null,-1)])))])):t.createCommentVNode("",!0)],10,yf)],2))),128)),t.unref(u)?(t.openBlock(),t.createElementBlock("th",Df)):t.createCommentVNode("",!0)])]),t.createElementVNode("tbody",Sf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(f),(I,F)=>(t.openBlock(),t.createElementBlock("tr",{key:F,class:"even:bg-gray-50",onClick:H=>M.$emit("click:row",I.rowData)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(I.cells,(H,Q)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent("td"),{key:Q,class:t.normalizeClass(["px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5",H.alignment])},{default:t.withCtx(()=>[H.isComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(H.val),{key:0})):(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(H.classNames)},t.toDisplayString(t.unref(d)(H.val)?"-":String(H.val)),3))]),_:2},1032,["class"]))),128)),t.unref(u)?(t.openBlock(),t.createElementBlock("td",_f,[M.tableActions.type==="dropdown"?(t.openBlock(),t.createBlock(t.unref(pn),{key:0,actions:I.actions},null,8,["actions"])):(t.openBlock(),t.createBlock(za,{key:1,actions:I.actions},null,8,["actions"]))])):t.createCommentVNode("",!0)],8,Nf))),128)),L.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("tr",Bf,[t.createElementVNode("td",{colspan:t.unref(c).length+(t.unref(u)?1:0),class:"px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5"}," No items were found! ",8,Vf)]))])])]),L.value?(t.openBlock(),t.createBlock(yn,{key:0,modelValue:y.value,"onUpdate:modelValue":[v[3]||(v[3]=I=>y.value=I),v[4]||(v[4]=I=>o())]},null,8,["modelValue"])):t.createCommentVNode("",!0)])}}}),Tf={class:"hidden sm:block"},vf=["onClick","textContent"],Ka=t.defineComponent({__name:"Tabs",props:t.mergeModels({pillDesign:{type:Boolean,default:!1},tabs:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue"),o=(i,l)=>{let s="";return r.pillDesign?(s="px-12 py-2 font-semibold text-md leading-5 rounded-t-md focus:outline-none ",e.value===i?s=s+"focus:bg-white text-gray-700 bg-white border-b-2 border-blue-500":s=s+"text-gray-700 hover:text-gray-900 focus:text-gray-900 focus:bg-gray-100 border border-gray-200",s):(s="px-1 py-4 text-sm font-semibold border-b-2 whitespace-nowrap leading-5 focus:outline-none ",e.value===i?s=s+"border-blue-500 text-xy-blue focus:text-blue-800 focus:border-blue-700":s=s+"border-transparent text-gray-700 hover:text-gray-900 hover:border-gray-300 focus:text-gray-900 focus:border-gray-300",l&&(s=s+" ml-8"),s)},a=t.computed(()=>!r.pillDesign);return(i,l)=>{const s=t.resolveComponent("Select");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",{class:t.normalizeClass(["sm:hidden",{"mb-4":i.pillDesign}])},[l[1]||(l[1]=t.createElementVNode("label",{for:"tabs",class:"sr-only"},"Select a tab",-1)),t.createVNode(s,{modelValue:e.value,"onUpdate:modelValue":l[0]||(l[0]=c=>e.value=c),name:"tabs",options:i.tabs},null,8,["modelValue","options"])],2),t.createElementVNode("div",Tf,[t.createElementVNode("div",{class:t.normalizeClass({"border-b border-gray-200":a.value})},[t.createElementVNode("nav",{class:t.normalizeClass(["flex",[i.pillDesign?"ml-8":"-mb-px"]])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.tabs,(c,u)=>(t.openBlock(),t.createElementBlock("a",{key:u,href:"#",class:t.normalizeClass(o(c.value,u>0)),onClick:t.withModifiers(d=>e.value=c.value,["prevent"]),textContent:t.toDisplayString(c.label)},null,10,vf))),128))],2)],2)])])}}}),$f={key:0,class:"sr-only"},Mf={class:"ml-3 mt-0.5"},Ga=t.defineComponent({inheritAttrs:!1,__name:"Toggle",props:t.mergeModels({label:{default:""},help:{default:""}},{modelValue:{type:Boolean,...Z},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=t.useModel(n,"modelValue",Z),e=t.useAttrs(),o=t.computed(()=>Hn(e,"disabled"));return(a,i)=>(t.openBlock(),t.createBlock(t.unref(ys),{as:"div",class:"flex items-start"},{default:t.withCtx(()=>[t.createVNode(t.unref(ws),{modelValue:r.value,"onUpdate:modelValue":i[0]||(i[0]=l=>r.value=l),class:t.normalizeClass([r.value?"bg-xy-blue":"bg-gray-200",o.value?"opacity-75 cursor-not-allowed":"cursor-pointer","relative inline-flex shrink-0 h-6 w-11 border-2 border-transparent rounded-full transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-blue-500"]),disabled:o.value},{default:t.withCtx(()=>[a.label?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",$f,"Use")),t.createElementVNode("span",{"aria-hidden":"true",class:t.normalizeClass([r.value?"translate-x-5":"translate-x-0","pointer-events-none inline-block h-5 w-5 rounded-full bg-white shadow transform ring-0 transition ease-in-out duration-200"])},null,2)]),_:1},8,["modelValue","class","disabled"]),t.createElementVNode("div",Mf,[a.label?(t.openBlock(),t.createBlock(t.unref(xs),{key:0},{default:t.withCtx(()=>[t.createVNode(he,{label:a.label,class:t.normalizeClass(o.value?"cursor-not-allowed":"cursor-pointer")},null,8,["label","class"])]),_:1})):t.createCommentVNode("",!0),a.help?(t.openBlock(),t.createBlock(t.unref(Cs),{key:1},{default:t.withCtx(()=>[t.createVNode(le,{text:a.help},null,8,["text"])]),_:1})):t.createCommentVNode("",!0)])]),_:1}))}}),Of={"aria-label":"Progress"},Pf={role:"list",class:"flex items-center"},Af={class:"absolute inset-0 flex items-center","aria-hidden":"true"},Rf=["aria-current"],Lf={key:1,class:"h-3 w-3 rounded-full bg-xy-blue","aria-hidden":"true"},If={class:"sr-only"},Ff={key:2,class:"sr-only"},Ja=t.defineComponent({__name:"ProgressCircles",props:{current:{},steps:{}},setup(n){const r=n,e=t.computed(()=>r.steps.map((o,a)=>{let i;return r.current>a?i="complete":r.current===a?i="current":i="incomplete",{name:o.name,description:(o==null?void 0:o.description)||"",status:i}}));return(o,a)=>(t.openBlock(),t.createElementBlock("nav",Of,[t.createElementVNode("ol",Pf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(i,l)=>(t.openBlock(),t.createElementBlock("li",{key:i.name,class:t.normalizeClass([l!==e.value.length-1?"pr-8":"","relative"])},[t.createElementVNode("div",Af,[t.createElementVNode("div",{class:t.normalizeClass(["h-0.5 w-full",i.status==="complete"?"bg-xy-blue":"bg-gray-300"])},null,2)]),t.createElementVNode("div",{class:t.normalizeClass({"relative flex h-5 w-5 items-center justify-center rounded-full":!0,"bg-xy-blue":i.status==="complete","border-2 border-indigo-600 bg-white":i.status==="current","border-2 border-gray-300 bg-white":i.status==="incomplete"}),"aria-current":i.status==="current"?!0:void 0},[i.status==="complete"?(t.openBlock(),t.createBlock(t.unref(Qo),{key:0,class:"h-3 w-3 text-white","aria-hidden":"true"})):i.status==="current"?(t.openBlock(),t.createElementBlock("span",Lf)):t.createCommentVNode("",!0),t.createElementVNode("span",If,t.toDisplayString(i.name),1),i.description?(t.openBlock(),t.createElementBlock("span",Ff,t.toDisplayString(i.description),1)):t.createCommentVNode("",!0)],10,Rf)],2))),128))])]))}}),jf={"aria-label":"Progress"},Hf={role:"list",class:"overflow-hidden"},Uf=["aria-current"],zf={class:"flex h-9 items-center"},qf={key:1,class:"h-2.5 w-2.5 rounded-full bg-xy-blue"},Wf={class:"ml-4 flex min-w-0 flex-col"},Yf={key:0,class:"text-sm text-gray-600"},Xa=t.defineComponent({__name:"ProgressCirclesLabeled",props:{current:{},steps:{}},setup(n){const r=n,e=t.computed(()=>r.steps.map((o,a)=>{let i;return r.current>a?i="complete":r.current===a?i="current":i="incomplete",{name:o.name,description:(o==null?void 0:o.description)||"",status:i}}));return(o,a)=>(t.openBlock(),t.createElementBlock("div",jf,[t.createElementVNode("ol",Hf,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.value,(i,l)=>(t.openBlock(),t.createElementBlock("li",{key:l,class:t.normalizeClass([l!==e.value.length-1?"pb-6":"","relative"])},[l!==e.value.length-1?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["absolute left-3 top-3 -ml-px mt-0.5 h-full w-0.5",i.status==="complete"?"bg-xy-blue":"bg-gray-300"]),"aria-hidden":"true"},null,2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"group relative flex items-start","aria-current":i.status==="current"?!0:void 0},[t.createElementVNode("span",zf,[t.createElementVNode("span",{class:t.normalizeClass({"relative z-10 flex h-6 w-6 items-center justify-center rounded-full":!0,"bg-xy-blue ":i.status==="complete","border-2 border-xy-blue bg-white":i.status==="current","border-2 border-gray-300 bg-white":i.status==="incomplete"})},[i.status==="complete"?(t.openBlock(),t.createBlock(t.unref(Qo),{key:0,class:"h-4 w-4 text-white","aria-hidden":"true"})):i.status==="current"?(t.openBlock(),t.createElementBlock("span",qf)):t.createCommentVNode("",!0)],2)]),t.createElementVNode("span",Wf,[t.createElementVNode("span",{class:t.normalizeClass({"text-sm font-bold":!0,"text-gray-800":i.status==="complete","text-xy-blue":i.status==="current","text-gray-600":i.status==="incomplete","mt-2":!i.description})},t.toDisplayString(i.name),3),i.description?(t.openBlock(),t.createElementBlock("span",Yf,t.toDisplayString(i.description),1)):t.createCommentVNode("",!0)])],8,Uf)],2))),128))])]))}}),Kf=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder","type"],Za=t.defineComponent({inheritAttrs:!1,__name:"BaseInput",props:t.mergeModels(t.mergeDefaults({modelValue:{},type:{},label:{},help:{},placeholder:{}},Pe),{modelValue:{...Z,set:n=>props.type==="number"?Un(n):n},modelModifiers:{}}),emits:["update:modelValue"],setup(n,{expose:r}){const e=n,o=t.useModel(n,"modelValue",{...Z,set:f=>e.type==="number"?Un(f):f}),a=t.useTemplateRef("input"),{errorState:i,inputID:l,isRequired:s,onInvalid:c,inputValidation:u}=Ve(e);r({input:a});const d=t.computed(()=>{switch(e.type){case"number":return{max:Number.MAX_SAFE_INTEGER,min:Number.MIN_SAFE_INTEGER};case"email":return{pattern:po};case"tel":return{pattern:mo};case"url":return{pattern:ho};default:return{}}});return(f,m)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(he,{id:`${t.unref(l)}-label`,class:"mb-2",for:t.unref(l),label:f.label,required:t.unref(s)},null,8,["id","for","label","required"]),t.withDirectives(t.createElementVNode("input",t.mergeProps({id:t.unref(l),ref:"input","onUpdate:modelValue":m[0]||(m[0]=g=>o.value=g),"aria-labelledby":f.label?`${t.unref(l)}-label`:void 0,"aria-describedby":f.help?`${t.unref(l)}-help`:void 0,"aria-errormessage":t.unref(i)?`${t.unref(l)}-error`:void 0,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200",t.unref(i)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],placeholder:f.placeholder,type:f.type},{...d.value,...f.$attrs},{onInput:m[1]||(m[1]=(...g)=>t.unref(u)&&t.unref(u)(...g)),onInvalid:m[2]||(m[2]=(...g)=>t.unref(c)&&t.unref(c)(...g))}),null,16,Kf),[[t.vModelDynamic,o.value,void 0,{trim:!0}]]),t.createVNode(le,{id:`${t.unref(l)}-help`,class:"mt-1",text:f.help},null,8,["id","text"]),t.createVNode(Se,{id:`${t.unref(l)}-error`,class:"mt-0.5",text:t.unref(i)},null,8,["id","text"])]))}}),Gf={class:"relative flex items-start"},Jf={class:"flex items-center h-5"},Xf=["id","aria-labelledby","aria-describedby","aria-errormessage","checked"],Zf={class:"ml-3"},Qa=t.defineComponent({inheritAttrs:!1,__name:"Checkbox",props:t.mergeModels(t.mergeDefaults({modelValue:{type:[Boolean,null]},label:{},help:{},placeholder:{}},Pe),{modelValue:{type:[Boolean,null],...Z},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",Z),{aria:o,inputID:a,isDisabled:i,isRequired:l,errorState:s,validate:c,onInvalid:u}=Ve(r);return(d,f)=>(t.openBlock(),t.createElementBlock("div",Gf,[t.createElementVNode("div",Jf,[t.withDirectives(t.createElementVNode("input",t.mergeProps({id:t.unref(a),"onUpdate:modelValue":f[0]||(f[0]=m=>e.value=m),"aria-labelledby":t.unref(o).labelledby,"aria-describedby":t.unref(o).describedby,"aria-errormessage":t.unref(o).errormessage,checked:e.value||void 0,class:["h-4 w-4 rounded text-xy-blue cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(s)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],type:"checkbox"},d.$attrs,{onChange:f[1]||(f[1]=(...m)=>t.unref(c)&&t.unref(c)(...m)),onInvalid:f[2]||(f[2]=(...m)=>t.unref(u)&&t.unref(u)(...m))}),null,16,Xf),[[t.vModelCheckbox,e.value]])]),t.createElementVNode("div",Zf,[t.createVNode(he,{id:t.unref(o).labelledby,for:t.unref(a),label:d.label,class:t.normalizeClass(t.unref(i)?"cursor-not-allowed":"cursor-pointer"),required:t.unref(l)},null,8,["id","for","label","class","required"]),t.createVNode(le,{id:t.unref(o).describedby,text:d.help},null,8,["id","text"]),t.createVNode(Se,{id:t.unref(o).errormessage,class:"mt-0.5",text:t.unref(s)},null,8,["id","text"])])]))}}),Qf=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder"],ei=t.defineComponent({inheritAttrs:!1,__name:"DateTimeInput",props:t.mergeModels(t.mergeDefaults({modelValue:{},label:{},help:{},placeholder:{}},Pe),{modelValue:{...Z,get:n=>n&&go(n),set:n=>n&&new Date(n).toISOString()},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",{...Z,get:c=>c&&go(c),set:c=>c&&new Date(c).toISOString()}),{errorState:o,inputID:a,isRequired:i,onInvalid:l,inputValidation:s}=Ve(r);return(c,u)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(he,{id:`${t.unref(a)}-label`,class:"mb-2",for:t.unref(a),label:c.label,required:t.unref(i)},null,8,["id","for","label","required"]),t.withDirectives(t.createElementVNode("input",t.mergeProps({id:t.unref(a),"onUpdate:modelValue":u[0]||(u[0]=d=>e.value=d),"aria-labelledby":c.label?`${t.unref(a)}-label`:void 0,"aria-describedby":c.help?`${t.unref(a)}-help`:void 0,"aria-errormessage":t.unref(o)?`${t.unref(a)}-error`:void 0,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200",t.unref(o)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],placeholder:c.placeholder,type:"datetime-local"},c.$attrs,{onInput:u[1]||(u[1]=(...d)=>t.unref(s)&&t.unref(s)(...d)),onInvalid:u[2]||(u[2]=(...d)=>t.unref(l)&&t.unref(l)(...d))}),null,16,Qf),[[t.vModelText,e.value]]),t.createVNode(le,{id:`${t.unref(a)}-help`,class:"mt-1",text:c.help},null,8,["id","text"]),t.createVNode(Se,{id:`${t.unref(a)}-error`,class:"mt-0.5",text:t.unref(o)},null,8,["id","text"])]))}}),ep={key:0,class:"text-red-700/80"},ht=t.defineComponent({__name:"FieldsetLegend",props:{label:{default:""},required:{type:Boolean,default:!1},tag:{default:"legend"}},setup(n){const r=n,e=t.computed(()=>r.required&&/\*$/gm.exec(r.label)!==null?r.label.substring(0,r.label.length-1):r.label);return(o,a)=>o.label?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),t.mergeProps({key:0,class:"block text-sm leading-6 font-semibold text-gray-800"},o.$attrs),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.value)+" ",1),r.required?(t.openBlock(),t.createElementBlock("span",ep,"*")):t.createCommentVNode("",!0)]),_:1},16)):t.createCommentVNode("",!0)}}),tp=["aria-labelledby","aria-describedby","aria-errormessage"],np={key:0},rp={class:"flex"},op={class:"flex items-center h-5"},ap=["id","aria-labelledby","aria-describedby","disabled","value"],ip={class:"ml-3"},ti=t.defineComponent({inheritAttrs:!1,__name:"MultiCheckboxes",props:t.mergeModels(t.mergeDefaults({max:{},min:{},modelValue:{},options:{},label:{},help:{},placeholder:{},columns:{}},Pe),{modelValue:{...Z,get:n=>Array.isArray(n)?n:[]},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",{...Z,get:g=>Array.isArray(g)?g:[]}),{aria:o,inputID:a,isDisabled:i,errorState:l,validate:s}=Ve(r),c=t.computed(()=>r.min||null),u=t.computed(()=>r.max||null),d=t.computed(()=>{var b;const g=((b=e.value)==null?void 0:b.length)||0;return c.value!==null&&g<c.value?`Please select at least ${c.value} of these options.`:u.value!==null&&g>u.value?`Please limit your selection to ${u.value} of these options.`:c.value!==null&&u.value!==null&&(g<c.value||g>u.value)?`Please select between ${c.value} and ${u.value} of these options.`:""}),f=t.useTemplateRef("errorInput"),m=()=>{var g;l.value||(l.value=d.value,(g=f.value)==null||g.setCustomValidity(d.value))};return(g,b)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"relative space-y-6","aria-labelledby":t.unref(o).labelledby,"aria-describedby":t.unref(o).describedby,"aria-errormessage":t.unref(o).errormessage},[g.label?(t.openBlock(),t.createElementBlock("div",np,[t.createVNode(ht,{id:t.unref(o).labelledby,label:g.label,required:!!c.value},null,8,["id","label","required"]),g.help?(t.openBlock(),t.createBlock(le,{key:0,id:t.unref(o).describedby,class:"mt-1",tag:"p",text:g.help},null,8,["id","text"])):t.createCommentVNode("",!0),t.createVNode(Se,{id:t.unref(o).errormessage,class:"mt-1",text:t.unref(l)},null,8,["id","text"])])):t.createCommentVNode("",!0),t.createElementVNode("div",rp,[t.createElementVNode("div",{class:t.normalizeClass(["grid gap-y-5",{"sm:grid sm:gap-x-10":g.columns!==void 0,"sm:grid-cols-2":g.columns===2,"sm:grid-cols-3":g.columns===3}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.options,(y,w)=>(t.openBlock(),t.createElementBlock("div",{key:y.value,class:"flex items-start"},[t.createElementVNode("div",op,[t.withDirectives(t.createElementVNode("input",t.mergeProps({id:`${t.unref(a)}-${w}`,"onUpdate:modelValue":b[0]||(b[0]=k=>e.value=k),"aria-labelledby":`${t.unref(a)}-${w}-label`,"aria-describedby":y.help?`${t.unref(a)}-${w}-help`:void 0,disabled:y.disabled,class:["h-4 w-4 rounded cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(l)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],type:"checkbox",value:y.value,ref_for:!0},g.$attrs,{onChange:b[1]||(b[1]=(...k)=>t.unref(s)&&t.unref(s)(...k))}),null,16,ap),[[t.vModelCheckbox,e.value]])]),t.createElementVNode("div",ip,[t.createVNode(he,{id:`${t.unref(a)}-${w}-label`,for:`${t.unref(a)}-${w}`,label:y.label,class:t.normalizeClass(t.unref(i)||y.disabled?"cursor-not-allowed":"cursor-pointer")},null,8,["id","for","label","class"]),t.createVNode(le,{id:`${t.unref(a)}-${w}-help`,text:y.help},null,8,["id","text"])])]))),128))],2)]),d.value?(t.openBlock(),t.createElementBlock("input",{key:1,ref:"errorInput",required:"",class:"sr-only top-1 left-1","aria-hidden":"",type:"checkbox",onInvalid:m},null,544)):t.createCommentVNode("",!0)],8,tp))}}),lp=["aria-labelledby","aria-describedby","aria-errormessage"],sp={key:0},cp={class:"flex"},dp={class:"flex items-center h-5"},up=["id","aria-describedby","aria-labelledby","disabled","name","value"],fp={class:"ml-3"},ni=t.defineComponent({inheritAttrs:!1,__name:"Radio",props:t.mergeModels(t.mergeDefaults({modelValue:{},options:{},label:{},help:{},placeholder:{},columns:{}},Pe),{modelValue:Z,modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",Z),{aria:o,errorState:a,inputID:i,isDisabled:l,isRequired:s,onInvalid:c,validate:u}=Ve(r);return(d,f)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"space-y-6","aria-labelledby":t.unref(o).labelledby,"aria-describedby":t.unref(o).describedby,"aria-errormessage":t.unref(o).errormessage},[d.label?(t.openBlock(),t.createElementBlock("div",sp,[t.createVNode(ht,{id:t.unref(o).labelledby,label:d.label,required:t.unref(s)},null,8,["id","label","required"]),d.help?(t.openBlock(),t.createBlock(le,{key:0,id:t.unref(o).describedby,class:"mt-1",tag:"p",text:d.help},null,8,["id","text"])):t.createCommentVNode("",!0),t.createVNode(Se,{id:t.unref(o).errormessage,class:"mt-1",text:t.unref(a)},null,8,["id","text"])])):t.createCommentVNode("",!0),t.createElementVNode("div",cp,[t.createElementVNode("div",{class:t.normalizeClass(["grid gap-y-5",{"sm:grid sm:gap-x-10":d.columns!==void 0,"sm:grid-cols-2":d.columns===2,"sm:grid-cols-3":d.columns===3}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.options,(m,g)=>(t.openBlock(),t.createElementBlock("div",{key:m.value,class:"flex items-start"},[t.createElementVNode("div",dp,[t.withDirectives(t.createElementVNode("input",t.mergeProps({id:`${t.unref(i)}-${g}`,"onUpdate:modelValue":f[0]||(f[0]=b=>e.value=b),"aria-describedby":m.help?`${t.unref(i)}-${g}-help`:void 0,"aria-labelledby":`${t.unref(i)}-${g}-label`,class:["h-4 w-4 cursor-pointer text-xy-blue","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(a)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],disabled:m.disabled,name:t.unref(i),type:"radio",value:m.value,ref_for:!0},d.$attrs,{onChange:f[1]||(f[1]=(...b)=>t.unref(u)&&t.unref(u)(...b)),onInvalid:f[2]||(f[2]=(...b)=>t.unref(c)&&t.unref(c)(...b))}),null,16,up),[[t.vModelRadio,e.value]])]),t.createElementVNode("div",fp,[t.createVNode(he,{id:`${t.unref(i)}-${g}-label`,for:`${t.unref(i)}-${g}`,label:m.label,class:t.normalizeClass(t.unref(l)||m.disabled?"cursor-not-allowed":"cursor-pointer")},null,8,["id","for","label","class"]),t.createVNode(le,{id:`${t.unref(i)}-${g}-help`,text:m.help},null,8,["id","text"])])]))),128))],2)])],8,lp))}}),pp={class:"flex-1 flex pr-1"},mp={class:"flex flex-col"},hp={key:1,class:"mt-auto mb-0"},gp=["checked","name","required","value"],ri=t.defineComponent({inheritAttrs:!1,__name:"RadioCards",props:t.mergeModels(t.mergeDefaults({options:{},modelValue:{},label:{},help:{},placeholder:{},columns:{}},Pe),{modelValue:Z,modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",Z),{aria:o,isDisabled:a,isRequired:i,nameAttr:l,errorState:s,onInvalid:c}=Ve(r),u=d=>{d&&(s.value="")};return(d,f)=>(t.openBlock(),t.createBlock(t.unref(gs),{modelValue:e.value,"onUpdate:modelValue":[f[1]||(f[1]=m=>e.value=m),u],disabled:t.unref(a),"aria-invalid":t.unref(s)?"true":null,"aria-errormessage":t.unref(o).errormessage},{default:t.withCtx(()=>[d.label?(t.openBlock(),t.createBlock(t.unref(Wo),{key:0,class:"block"},{default:t.withCtx(()=>[t.createVNode(ht,{tag:"div",label:d.label,required:t.unref(i)},null,8,["label","required"])]),_:1})):t.createCommentVNode("",!0),d.help?(t.openBlock(),t.createBlock(t.unref(Qn),{key:1,class:"mt-1"},{default:t.withCtx(()=>[t.createVNode(le,{text:d.help},null,8,["text"])]),_:1})):t.createCommentVNode("",!0),t.createVNode(Se,{id:t.unref(o).errormessage,class:"mt-1",text:t.unref(s)},null,8,["id","text"]),t.createElementVNode("div",{class:t.normalizeClass(["mt-6 grid grid-cols-1 gap-y-5 gap-x-4 relative",{"sm:grid-cols-2":d.columns===2,"sm:grid-cols-3":d.columns===3}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.options,m=>(t.openBlock(),t.createBlock(t.unref(bs),{key:m.value,as:"template",disabled:t.unref(a)||m.disabled,value:m.value},{default:t.withCtx(({active:g,checked:b,disabled:y})=>[t.createElementVNode("div",{class:t.normalizeClass(["relative border rounded-lg shadow-sm p-4 flex focus:outline-none",[y?"cursor-not-allowed bg-gray-50 border-gray-200 opacity-90":"cursor-pointer bg-white border-gray-300",t.unref(s)&&!y?"border-red-700":"",b?"border-transparent":"",g?"border-xy-blue ring-2 ring-xy-blue-500":""]])},[t.createElementVNode("div",pp,[t.createElementVNode("div",mp,[t.createVNode(t.unref(Wo),{as:"div"},{default:t.withCtx(()=>[t.createVNode(he,{tag:"div",class:"mt-auto mb-auto",label:m.label},null,8,["label"])]),_:2},1024),m.help?(t.openBlock(),t.createBlock(t.unref(Qn),{key:0,as:"div"},{default:t.withCtx(()=>[t.createVNode(le,{tag:"div",class:"mt-auto",text:m.help},null,8,["text"])]),_:2},1024)):t.createCommentVNode("",!0),m.sublabel||d.$slots.sublabel?(t.openBlock(),t.createElementBlock("div",hp,[t.createVNode(t.unref(Qn),{as:"div",class:"text-sm/5 font-medium mt-4 text-gray-800"},{default:t.withCtx(()=>[t.renderSlot(d.$slots,"sublabel",{active:g,checked:b,disabled:y,option:m},()=>[t.createTextVNode(t.toDisplayString(m.sublabel),1)])]),_:2},1024)])):t.createCommentVNode("",!0)])]),t.createVNode(t.unref(Zo),{class:t.normalizeClass([b?"":"invisible","h-5 w-5 text-xy-blue"]),"aria-hidden":"true"},null,8,["class"]),t.createElementVNode("div",{class:t.normalizeClass([g?"border":"border-2",b?"border-xy-blue":"border-transparent","absolute -inset-px rounded-lg pointer-events-none"]),"aria-hidden":"true"},null,2),t.createElementVNode("input",{class:"sr-only top-1 left-1","aria-hidden":"true",checked:b,name:t.unref(l),required:t.unref(i),tabindex:"-1",type:"radio",value:m.value,onInvalid:f[0]||(f[0]=(...w)=>t.unref(c)&&t.unref(c)(...w))},null,40,gp)],2)]),_:2},1032,["disabled","value"]))),128))],2)]),_:3},8,["modelValue","disabled","aria-invalid","aria-errormessage"]))}}),bp=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder"],oi=t.defineComponent({inheritAttrs:!1,__name:"TextArea",props:t.mergeModels(t.mergeDefaults({modelValue:{},label:{},help:{},placeholder:{}},Pe),{modelValue:Z,modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",Z),{aria:o,inputID:a,isRequired:i,errorState:l,onInvalid:s,inputValidation:c}=Ve(r);return(u,d)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(he,{id:t.unref(o).labelledby,class:"mb-2",for:t.unref(a),label:u.label,required:t.unref(i)},null,8,["id","for","label","required"]),t.withDirectives(t.createElementVNode("textarea",t.mergeProps({id:t.unref(a),"onUpdate:modelValue":d[0]||(d[0]=f=>e.value=f),"aria-labelledby":t.unref(o).labelledby,"aria-describedby":t.unref(o).describedby,"aria-errormessage":t.unref(o).errormessage,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200",t.unref(l)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],placeholder:u.placeholder},u.$attrs,{onInput:d[1]||(d[1]=(...f)=>t.unref(c)&&t.unref(c)(...f)),onInvalid:d[2]||(d[2]=(...f)=>t.unref(s)&&t.unref(s)(...f))}),null,16,bp),[[t.vModelText,e.value]]),t.createVNode(le,{id:t.unref(o).describedby,class:"mt-1",text:u.help},null,8,["id","text"]),t.createVNode(Se,{id:t.unref(o).errormessage,class:"mt-0.5",text:t.unref(l)},null,8,["id","text"])]))}}),yp=["aria-labelledby","aria-describedby","aria-errormessage"],wp={key:0},xp=["for"],Cp=["id","name"],kp=["for"],Ep=["id","name"],ai=t.defineComponent({inheritAttrs:!1,__name:"YesOrNoRadio",props:t.mergeModels(t.mergeDefaults({modelValue:{type:[Boolean,null]},label:{},help:{},placeholder:{}},Pe),{modelValue:{type:[Boolean,null],...Z},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const r=n,e=t.useModel(n,"modelValue",Z),{aria:o,isDisabled:a,isRequired:i,nameAttr:l,errorState:s,onInvalid:c,validate:u}=Ve(r);return(d,f)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"space-y-6","aria-labelledby":t.unref(o).labelledby,"aria-describedby":t.unref(o).describedby,"aria-errormessage":t.unref(o).errormessage},[d.label?(t.openBlock(),t.createElementBlock("div",wp,[t.createVNode(ht,{id:t.unref(o).labelledby,class:"block my-auto",label:d.label,required:t.unref(i),tag:"legend"},null,8,["id","label","required"]),d.help?(t.openBlock(),t.createBlock(le,{key:0,id:t.unref(o).describedby,class:"mt-1",tag:"p",text:d.help},null,8,["id","text"])):t.createCommentVNode("",!0),t.createVNode(Se,{id:t.unref(o).errormessage,class:"mt-1",text:t.unref(s)},null,8,["id","text"])])):t.createCommentVNode("",!0),t.createElementVNode("div",null,[t.createElementVNode("label",{class:t.normalizeClass(["inline-flex items-center group",t.unref(a)?"cursor-not-allowed":"cursor-pointer"]),for:`${t.unref(l)}-true`},[t.withDirectives(t.createElementVNode("input",t.mergeProps({id:`${t.unref(l)}-true`,"onUpdate:modelValue":f[0]||(f[0]=m=>e.value=m),type:"radio",class:["h-4 w-4 text-xy-blue cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(s)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],name:t.unref(l),value:!0},d.$attrs,{onChange:f[1]||(f[1]=(...m)=>t.unref(u)&&t.unref(u)(...m)),onInvalid:f[2]||(f[2]=(...m)=>t.unref(c)&&t.unref(c)(...m))}),null,16,Cp),[[t.vModelRadio,e.value]]),t.createVNode(he,{class:"ml-3",label:"Yes",tag:"span"})],10,xp),t.createElementVNode("label",{class:t.normalizeClass(["inline-flex items-center ml-6",t.unref(a)?"cursor-not-allowed":"cursor-pointer"]),for:`${t.unref(l)}-false`},[t.withDirectives(t.createElementVNode("input",t.mergeProps({id:`${t.unref(l)}-false`,"onUpdate:modelValue":f[3]||(f[3]=m=>e.value=m),type:"radio",class:["h-4 w-4 text-xy-blue cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(s)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],name:t.unref(l),value:!1},d.$attrs,{onChange:f[4]||(f[4]=(...m)=>t.unref(u)&&t.unref(u)(...m)),onInvalid:f[5]||(f[5]=(...m)=>t.unref(c)&&t.unref(c)(...m))}),null,16,Ep),[[t.vModelRadio,e.value]]),t.createVNode(he,{class:"ml-3",label:"No",tag:"span"})],10,kp)])],8,yp))}}),Dp=Object.freeze(Object.defineProperty({__proto__:null,ActionsDropdown:pn,BaseInput:Za,Cards:Na,Checkbox:Qa,ContentModal:_a,DataTable:qa,DateFilter:fr,DateRangePicker:bn,DateTime:ei,DetailList:Ma,DownloadCell:Oa,DynamicTable:Ya,FieldsetLegend:ht,Flash:wn,InlineAlert:Aa,InputError:Se,InputHelp:le,InputLabel:he,Modal:Ra,MultiCheckboxes:ti,Paginator:yn,Popover:$t,PopoverContent:Ia,PopoverPosition:$t,ProgressCircles:Ja,ProgressCirclesLabeled:Xa,Radio:ni,RadioCards:ri,Select:ur,SidebarLayout:La,Slideover:Fa,Spinner:xn,StackedLayout:Ha,Steps:Wa,Tabs:Ka,TextArea:oi,Toggle:Ga,Tooltip:ja,XYSpinner:hr,YesOrNoRadio:ai},Symbol.toStringTag,{value:"Module"})),Sp=function(r){Object.entries(Dp).forEach(([e,o])=>{r.component(e,o)})};_.ActionsDropdown=pn,_.BaseAPI=jn,_.BaseInput=Za,_.Cards=Na,_.Checkbox=Qa,_.ContentModal=_a,_.DataTable=qa,_.DateFilter=fr,_.DateRangePicker=bn,_.DateTime=ei,_.DetailList=Ma,_.DownloadCell=Oa,_.DynamicTable=Ya,_.FieldsetLegend=ht,_.Flash=wn,_.InlineAlert=Aa,_.InputError=Se,_.InputHelp=le,_.InputLabel=he,_.Modal=Ra,_.MultiCheckboxes=ti,_.Paginator=yn,_.Popover=$t,_.PopoverContent=Ia,_.PopoverPosition=$t,_.ProgressCircles=Ja,_.ProgressCirclesLabeled=Xa,_.Radio=ni,_.RadioCards=ri,_.Select=ur,_.SidebarLayout=La,_.Slideover=Fa,_.Spinner=xn,_.StackedLayout=Ha,_.Steps=Wa,_.Tabs=Ka,_.TextArea=oi,_.Toggle=Ga,_.Tooltip=ja,_.XYSpinner=hr,_.YesOrNoRadio=ai,_.debounceFn=fo,_.debounceLeading=Ul,_.default=Sp,_.emailPattern=po,_.isHttpCancel=uo,_.isHttpError=co,_.looseToNumber=Un,_.phonePattern=mo,_.setBaseAPIDefaults=Hl,_.textInputTypes=zl,_.throttleFn=ql,_.urlPattern=ho,_.useAppFlasher=mr,_.useAppFlashes=Qe,_.useAppSpinner=Fn,_.useBaseAPI=mt,_.useBaseAPIDelete=wc,_.useBaseAPIGet=yc,_.useBaseAPIPatch=xc,_.useBaseAPIPost=Cc,_.useBaseAPIPut=kc,_.useFlashes=$a,_.useInputField=Ve,_.useSpinnerDisplay=lo,_.useTabHistory=Sc,_.useUrlSearchParams=Nc,Object.defineProperties(_,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -16,8 +16,12 @@ defineOptions({
|
|
|
16
16
|
inheritAttrs: false,
|
|
17
17
|
})
|
|
18
18
|
|
|
19
|
+
// maxDate/startDate should be used or maxRange.
|
|
20
|
+
// The props combination of maxDate/startDate and maxRange
|
|
21
|
+
// will have unexpected results.
|
|
19
22
|
const props = withDefaults(defineProps<DateRangeInput>(), {
|
|
20
23
|
...defaultInputProps,
|
|
24
|
+
maxDate: () => new Date(),
|
|
21
25
|
maxRange: 0,
|
|
22
26
|
placeholder: "mm-dd-yyyy range",
|
|
23
27
|
startDate: 0,
|
|
@@ -39,7 +43,7 @@ onMounted(() => {
|
|
|
39
43
|
allowInput: true,
|
|
40
44
|
dateFormat: "m-d-Y",
|
|
41
45
|
mode: "range",
|
|
42
|
-
maxDate:
|
|
46
|
+
maxDate: props.maxDate,
|
|
43
47
|
minDate: props.startDate,
|
|
44
48
|
onClose: (selectedDates) => {
|
|
45
49
|
if (selectedDates.length === 2) {
|
|
@@ -14,13 +14,22 @@ export interface InputOption {
|
|
|
14
14
|
export interface BooleanInput extends Input {
|
|
15
15
|
modelValue?: boolean | null;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* DateRangeInput allows a max range to be applied to the datepicker
|
|
19
|
+
* such that selecting the first date will then apply a max/min of +/- maxRange.
|
|
20
|
+
* This does not play nicely with maxDate and startDate.
|
|
21
|
+
*
|
|
22
|
+
* ex: when submitting a startDate of Jan 1 and maxRange of 10, the date picker will allow
|
|
23
|
+
* dates prior to Jan 1 given the handling of maxRange being adjusted on the fly.
|
|
24
|
+
*/
|
|
17
25
|
export interface DateRangeInput extends Input {
|
|
18
26
|
modelValue?: {
|
|
19
27
|
minDate: number;
|
|
20
28
|
maxDate: number;
|
|
21
29
|
};
|
|
30
|
+
maxDate?: Date | string | number;
|
|
22
31
|
maxRange?: number;
|
|
23
|
-
startDate?: number;
|
|
32
|
+
startDate?: Date | string | number;
|
|
24
33
|
}
|
|
25
34
|
export interface DateTimeInput extends Input {
|
|
26
35
|
modelValue?: string | null;
|
|
@@ -20,8 +20,9 @@ declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {},
|
|
|
20
20
|
minDate: number;
|
|
21
21
|
maxDate: number;
|
|
22
22
|
};
|
|
23
|
+
maxDate: string | number | Date;
|
|
23
24
|
maxRange: number;
|
|
24
|
-
startDate: number;
|
|
25
|
+
startDate: string | number | Date;
|
|
25
26
|
help: string;
|
|
26
27
|
placeholder: string;
|
|
27
28
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|