@xy-planning-network/trees 0.5.0 → 0.5.1
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 -3
- package/dist/trees.umd.js +1 -1
- package/package.json +1 -1
package/dist/trees.es.js
CHANGED
|
@@ -7570,13 +7570,13 @@ const useAppFlasher = {
|
|
|
7570
7570
|
useAppFlashes().flasher.error(msg, persistent);
|
|
7571
7571
|
},
|
|
7572
7572
|
info(msg, persistent) {
|
|
7573
|
-
useAppFlashes().flasher.
|
|
7573
|
+
useAppFlashes().flasher.info(msg, persistent);
|
|
7574
7574
|
},
|
|
7575
7575
|
success(msg, persistent) {
|
|
7576
|
-
useAppFlashes().flasher.
|
|
7576
|
+
useAppFlashes().flasher.success(msg, persistent);
|
|
7577
7577
|
},
|
|
7578
7578
|
warning(msg, persistent) {
|
|
7579
|
-
useAppFlashes().flasher.
|
|
7579
|
+
useAppFlashes().flasher.warning(msg, persistent);
|
|
7580
7580
|
},
|
|
7581
7581
|
genericError(email, persistent) {
|
|
7582
7582
|
useAppFlashes().flasher.genericError(email, persistent);
|
package/dist/trees.umd.js
CHANGED
|
@@ -9,4 +9,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
9
9
|
</span>
|
|
10
10
|
`}function nu(){e.calendarContainer.classList.add("hasWeeks");const d=O("div","flatpickr-weekwrapper");d.appendChild(O("span","flatpickr-weekday",e.l10n.weekAbbreviation));const f=O("div","flatpickr-weeks");return d.appendChild(f),{weekWrapper:d,weekNumbers:f}}function In(d,f=!0){const h=f?d:d-e.currentMonth;h<0&&e._hidePrevMonthArrow===!0||h>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=h,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,U("onYearChange"),De()),Ce(),U("onMonthChange"),Wt())}function ru(d=!0,f=!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,f===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){const{hours:h,minutes:w,seconds:k}=Vn(e.config);m(h,w,k)}e.redraw(),d&&U("onChange")}function au(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),U("onClose")}function ou(){e.config!==void 0&&U("onDestroy");for(let d=e._handlers.length;d--;)e._handlers[d].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 d=e.calendarContainer.parentNode;if(d.lastChild&&d.removeChild(d.lastChild),d.parentNode){for(;d.firstChild;)d.parentNode.insertBefore(d.firstChild,d);d.parentNode.removeChild(d)}}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(d=>{try{delete e[d]}catch{}})}function et(d){return e.config.appendTo&&e.config.appendTo.contains(d)?!0:e.calendarContainer.contains(d)}function Ln(d){if(e.isOpen&&!e.config.inline){const f=ce(d),h=et(f),w=f===e.input||f===e.altInput||e.element.contains(f)||d.path&&d.path.indexOf&&(~d.path.indexOf(e.input)||~d.path.indexOf(e.altInput)),k=d.type==="blur"?w&&d.relatedTarget&&!et(d.relatedTarget):!w&&!h&&!et(d.relatedTarget),v=!e.config.ignoredFocusElements.some(V=>V.contains(f));k&&v&&(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 Ut(d){if(!d||e.config.minDate&&d<e.config.minDate.getFullYear()||e.config.maxDate&&d>e.config.maxDate.getFullYear())return;const f=d,h=e.currentYear!==f;e.currentYear=f||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)),h&&(e.redraw(),U("onYearChange"),De())}function Le(d,f=!0){var h;const w=e.parseDate(d,void 0,f);if(e.config.minDate&&w&&ue(w,e.config.minDate,f!==void 0?f:!e.minDateHasTime)<0||e.config.maxDate&&w&&ue(w,e.config.maxDate,f!==void 0?f:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(w===void 0)return!1;const k=!!e.config.enable,v=(h=e.config.enable)!==null&&h!==void 0?h:e.config.disable;for(let V=0,S;V<v.length;V++){if(S=v[V],typeof S=="function"&&S(w))return k;if(S instanceof Date&&w!==void 0&&S.getTime()===w.getTime())return k;if(typeof S=="string"){const M=e.parseDate(S,void 0,!0);return M&&M.getTime()===w.getTime()?k:!k}else if(typeof S=="object"&&w!==void 0&&S.from&&S.to&&w.getTime()>=S.from.getTime()&&w.getTime()<=S.to.getTime())return k}return!k}function Ht(d){return e.daysContainer!==void 0?d.className.indexOf("hidden")===-1&&d.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(d):!1}function iu(d){d.target===e._input&&(e.selectedDates.length>0||e._input.value.length>0)&&!(d.relatedTarget&&et(d.relatedTarget))&&e.setDate(e._input.value,!0,d.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function lu(d){const f=ce(d),h=e.config.wrap?n.contains(f):f===e._input,w=e.config.allowInput,k=e.isOpen&&(!w||!h),v=e.config.inline&&h&&!w;if(d.keyCode===13&&h){if(w)return e.setDate(e._input.value,!0,f===e.altInput?e.config.altFormat:e.config.dateFormat),f.blur();e.open()}else if(et(f)||k||v){const V=!!e.timeContainer&&e.timeContainer.contains(f);switch(d.keyCode){case 13:V?(d.preventDefault(),s(),Fn()):Oa(d);break;case 27:d.preventDefault(),Fn();break;case 8:case 46:h&&!e.config.allowInput&&(d.preventDefault(),e.clear());break;case 37:case 39:if(!V&&!h){if(d.preventDefault(),e.daysContainer!==void 0&&(w===!1||document.activeElement&&Ht(document.activeElement))){const M=d.keyCode===39?1:-1;d.ctrlKey?(d.stopPropagation(),In(M),j(xe(1),0)):j(void 0,M)}}else e.hourElement&&e.hourElement.focus();break;case 38:case 40:d.preventDefault();const S=d.keyCode===40?1:-1;e.daysContainer&&f.$i!==void 0||f===e.input||f===e.altInput?d.ctrlKey?(d.stopPropagation(),Ut(e.currentYear-S),j(xe(1),0)):V||j(void 0,S*7):f===e.currentYearElement?Ut(e.currentYear-S):e.config.enableTime&&(!V&&e.hourElement&&e.hourElement.focus(),s(d),e._debouncedChange());break;case 9:if(V){const M=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(L=>L),T=M.indexOf(f);if(T!==-1){const L=M[T+(d.shiftKey?-1:1)];d.preventDefault(),(L||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(f)&&d.shiftKey&&(d.preventDefault(),e._input.focus());break}}if(e.amPM!==void 0&&f===e.amPM)switch(d.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],u(),Te();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],u(),Te();break}(h||et(f))&&U("onKeyDown",d)}function Rn(d){if(e.selectedDates.length!==1||d&&(!d.classList.contains("flatpickr-day")||d.classList.contains("flatpickr-disabled")))return;const f=d?d.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),h=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),w=Math.min(f,e.selectedDates[0].getTime()),k=Math.max(f,e.selectedDates[0].getTime());let v=!1,V=0,S=0;for(let M=w;M<k;M+=sl.DAY)Le(new Date(M),!0)||(v=v||M>w&&M<k,M<h&&(!V||M>V)?V=M:M>h&&(!S||M<S)&&(S=M));for(let M=0;M<e.config.showMonths;M++){const T=e.daysContainer.children[M];for(let L=0,he=T.children.length;L<he;L++){const Z=T.children[L],$e=Z.dateObj.getTime(),ft=V>0&&$e<V||S>0&&$e>S;if(ft){Z.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(pt=>{Z.classList.remove(pt)});continue}else if(v&&!ft)continue;["startRange","inRange","endRange","notAllowed"].forEach(pt=>{Z.classList.remove(pt)}),d!==void 0&&(d.classList.add(f<=e.selectedDates[0].getTime()?"startRange":"endRange"),h<f&&$e===h?Z.classList.add("startRange"):h>f&&$e===h&&Z.classList.add("endRange"),$e>=V&&(S===0||$e<=S)&&ll($e,h,f)&&Z.classList.add("inRange"))}}}function su(){e.isOpen&&!e.config.static&&!e.config.inline&&Yt()}function du(d,f=e._positionElement){if(e.isMobile===!0){if(d){d.preventDefault();const w=ce(d);w&&w.blur()}e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),U("onOpen");return}else if(e._input.disabled||e.config.inline)return;const h=e.isOpen;e.isOpen=!0,h||(e.calendarContainer.classList.add("open"),e._input.classList.add("active"),U("onOpen"),Yt(f)),e.config.enableTime===!0&&e.config.noCalendar===!0&&e.config.allowInput===!1&&(d===void 0||!e.timeContainer.contains(d.relatedTarget))&&setTimeout(()=>e.hourElement.select(),50)}function _a(d){return f=>{const h=e.config[`_${d}Date`]=e.parseDate(f,e.config.dateFormat),w=e.config[`_${d==="min"?"max":"min"}Date`];h!==void 0&&(e[d==="min"?"minDateHasTime":"maxDateHasTime"]=h.getHours()>0||h.getMinutes()>0||h.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(k=>Le(k)),!e.selectedDates.length&&d==="min"&&b(h),Te()),e.daysContainer&&(Ta(),h!==void 0?e.currentYearElement[d]=h.getFullYear().toString():e.currentYearElement.removeAttribute(d),e.currentYearElement.disabled=!!w&&h!==void 0&&w.getFullYear()===h.getFullYear())}}function cu(){const d=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],f=Object.assign(Object.assign({},JSON.parse(JSON.stringify(n.dataset||{}))),r),h={};e.config.parseDate=f.parseDate,e.config.formatDate=f.formatDate,Object.defineProperty(e.config,"enable",{get:()=>e.config._enable,set:v=>{e.config._enable=Aa(v)}}),Object.defineProperty(e.config,"disable",{get:()=>e.config._disable,set:v=>{e.config._disable=Aa(v)}});const w=f.mode==="time";if(!f.dateFormat&&(f.enableTime||w)){const v=Y.defaultConfig.dateFormat||Xe.dateFormat;h.dateFormat=f.noCalendar||w?"H:i"+(f.enableSeconds?":S":""):v+" H:i"+(f.enableSeconds?":S":"")}if(f.altInput&&(f.enableTime||w)&&!f.altFormat){const v=Y.defaultConfig.altFormat||Xe.altFormat;h.altFormat=f.noCalendar||w?"h:i"+(f.enableSeconds?":S K":" K"):v+` h:i${f.enableSeconds?":S":""} K`}Object.defineProperty(e.config,"minDate",{get:()=>e.config._minDate,set:_a("min")}),Object.defineProperty(e.config,"maxDate",{get:()=>e.config._maxDate,set:_a("max")});const k=v=>V=>{e.config[v==="min"?"_minTime":"_maxTime"]=e.parseDate(V,"H:i:S")};Object.defineProperty(e.config,"minTime",{get:()=>e.config._minTime,set:k("min")}),Object.defineProperty(e.config,"maxTime",{get:()=>e.config._maxTime,set:k("max")}),f.mode==="time"&&(e.config.noCalendar=!0,e.config.enableTime=!0),Object.assign(e.config,h,f);for(let v=0;v<d.length;v++)e.config[d[v]]=e.config[d[v]]===!0||e.config[d[v]]==="true";kn.filter(v=>e.config[v]!==void 0).forEach(v=>{e.config[v]=Dn(e.config[v]||[]).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 v=0;v<e.config.plugins.length;v++){const V=e.config.plugins[v](e)||{};for(const S in V)kn.indexOf(S)>-1?e.config[S]=Dn(V[S]).map(i).concat(e.config[S]):typeof f[S]=="undefined"&&(e.config[S]=V[S])}f.altInputClass||(e.config.altInputClass=Ba().className+" "+e.config.altInputClass),U("onParseConfig")}function Ba(){return e.config.wrap?n.querySelector("[data-input]"):n}function Ma(){typeof e.config.locale!="object"&&typeof Y.l10ns[e.config.locale]=="undefined"&&e.config.errorHandler(new Error(`flatpickr: invalid locale ${e.config.locale}`)),e.l10n=Object.assign(Object.assign({},Y.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?Y.l10ns[e.config.locale]:void 0),Nn.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&&Y.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=oa(e),e.parseDate=Sn({config:e.config,l10n:e.l10n})}function Yt(d){if(typeof e.config.position=="function")return void e.config.position(e,d);if(e.calendarContainer===void 0)return;U("onPreCalendarPosition");const f=d||e._positionElement,h=Array.prototype.reduce.call(e.calendarContainer.children,(mt,Hn)=>mt+Hn.offsetHeight,0),w=e.calendarContainer.offsetWidth,k=e.config.position.split(" "),v=k[0],V=k.length>1?k[1]:null,S=f.getBoundingClientRect(),M=window.innerHeight-S.bottom,T=v==="above"||v!=="below"&&M<h&&S.top>h,L=window.pageYOffset+S.top+(T?-h-2:f.offsetHeight+2);if(te(e.calendarContainer,"arrowTop",!T),te(e.calendarContainer,"arrowBottom",T),e.config.inline)return;let he=window.pageXOffset+S.left,Z=!1,qt=!1;V==="center"?(he-=(w-S.width)/2,Z=!0):V==="right"&&(he-=w-S.width,qt=!0),te(e.calendarContainer,"arrowLeft",!Z&&!qt),te(e.calendarContainer,"arrowCenter",Z),te(e.calendarContainer,"arrowRight",qt);const $e=window.document.body.offsetWidth-(window.pageXOffset+S.right),ft=he+w>window.document.body.offsetWidth,pt=$e+w>window.document.body.offsetWidth;if(te(e.calendarContainer,"rightMost",ft),!e.config.static)if(e.calendarContainer.style.top=`${L}px`,!ft)e.calendarContainer.style.left=`${he}px`,e.calendarContainer.style.right="auto";else if(!pt)e.calendarContainer.style.left="auto",e.calendarContainer.style.right=`${$e}px`;else{const mt=uu();if(mt===void 0)return;const Hn=window.document.body.offsetWidth,vu=Math.max(0,Hn/2-w/2),Eu=".flatpickr-calendar.centerMost:before",ku=".flatpickr-calendar.centerMost:after",Du=mt.cssRules.length,$u=`{left:${S.left}px;right:auto;}`;te(e.calendarContainer,"rightMost",!1),te(e.calendarContainer,"centerMost",!0),mt.insertRule(`${Eu},${ku}${$u}`,Du),e.calendarContainer.style.left=`${vu}px`,e.calendarContainer.style.right="auto"}}function uu(){let d=null;for(let f=0;f<document.styleSheets.length;f++){const h=document.styleSheets[f];try{h.cssRules}catch{continue}d=h;break}return d!=null?d:fu()}function fu(){const d=document.createElement("style");return document.head.appendChild(d),d.sheet}function Ta(){e.config.noCalendar||e.isMobile||(De(),Wt(),Ce())}function Fn(){e._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(e.close,0):e.close()}function Oa(d){d.preventDefault(),d.stopPropagation();const f=V=>V.classList&&V.classList.contains("flatpickr-day")&&!V.classList.contains("flatpickr-disabled")&&!V.classList.contains("notAllowed"),h=aa(ce(d),f);if(h===void 0)return;const w=h,k=e.latestSelectedDateObj=new Date(w.dateObj.getTime()),v=(k.getMonth()<e.currentMonth||k.getMonth()>e.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=w,e.config.mode==="single")e.selectedDates=[k];else if(e.config.mode==="multiple"){const V=Un(k);V?e.selectedDates.splice(parseInt(V),1):e.selectedDates.push(k)}else e.config.mode==="range"&&(e.selectedDates.length===2&&e.clear(!1,!1),e.latestSelectedDateObj=k,e.selectedDates.push(k),ue(k,e.selectedDates[0],!0)!==0&&e.selectedDates.sort((V,S)=>V.getTime()-S.getTime()));if(u(),v){const V=e.currentYear!==k.getFullYear();e.currentYear=k.getFullYear(),e.currentMonth=k.getMonth(),V&&(U("onYearChange"),De()),U("onMonthChange")}if(Wt(),Ce(),Te(),!v&&e.config.mode!=="range"&&e.config.showMonths===1?Me(w):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 V=e.config.mode==="single"&&!e.config.enableTime,S=e.config.mode==="range"&&e.selectedDates.length===2&&!e.config.enableTime;(V||S)&&Fn()}x()}const zt={locale:[Ma,Va],showMonths:[Na,l,Sa],minDate:[E],maxDate:[E],clickOpens:[()=>{e.config.clickOpens===!0?(y(e._input,"focus",e.open),y(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function pu(d,f){if(d!==null&&typeof d=="object"){Object.assign(e.config,d);for(const h in d)zt[h]!==void 0&&zt[h].forEach(w=>w())}else e.config[d]=f,zt[d]!==void 0?zt[d].forEach(h=>h()):kn.indexOf(d)>-1&&(e.config[d]=Dn(f));e.redraw(),Te(!0)}function Pa(d,f){let h=[];if(d instanceof Array)h=d.map(w=>e.parseDate(w,f));else if(d instanceof Date||typeof d=="number")h=[e.parseDate(d,f)];else if(typeof d=="string")switch(e.config.mode){case"single":case"time":h=[e.parseDate(d,f)];break;case"multiple":h=d.split(e.config.conjunction).map(w=>e.parseDate(w,f));break;case"range":h=d.split(e.l10n.rangeSeparator).map(w=>e.parseDate(w,f));break}else e.config.errorHandler(new Error(`Invalid date supplied: ${JSON.stringify(d)}`));e.selectedDates=e.config.allowInvalidPreload?h:h.filter(w=>w instanceof Date&&Le(w,!1)),e.config.mode==="range"&&e.selectedDates.sort((w,k)=>w.getTime()-k.getTime())}function mu(d,f=!1,h=e.config.dateFormat){if(d!==0&&!d||d instanceof Array&&d.length===0)return e.clear(f);Pa(d,h),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),E(void 0,f),b(),e.selectedDates.length===0&&e.clear(!1),Te(f),f&&U("onChange")}function Aa(d){return d.slice().map(f=>typeof f=="string"||typeof f=="number"||f instanceof Date?e.parseDate(f,void 0,!0):f&&typeof f=="object"&&f.from&&f.to?{from:e.parseDate(f.from,void 0),to:e.parseDate(f.to,void 0)}:f).filter(f=>f)}function hu(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;const d=e.config.defaultDate||((e.input.nodeName==="INPUT"||e.input.nodeName==="TEXTAREA")&&e.input.placeholder&&e.input.value===e.input.placeholder?null:e.input.value);d&&Pa(d,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 gu(){if(e.input=Ba(),!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=O(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 bu(){const d=e.config.enableTime?e.config.noCalendar?"time":"datetime-local":"date";e.mobileInput=O("input",e.input.className+" flatpickr-mobile"),e.mobileInput.tabIndex=1,e.mobileInput.type=d,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=d==="datetime-local"?"Y-m-d\\TH:i:S":d==="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{}y(e.mobileInput,"change",f=>{e.setDate(ce(f).value,!1,e.mobileFormatStr),U("onChange"),U("onClose")})}function yu(d){if(e.isOpen===!0)return e.close();e.open(d)}function U(d,f){if(e.config===void 0)return;const h=e.config[d];if(h!==void 0&&h.length>0)for(let w=0;h[w]&&w<h.length;w++)h[w](e.selectedDates,e.input.value,e,f);d==="onChange"&&(e.input.dispatchEvent(jn("change")),e.input.dispatchEvent(jn("input")))}function jn(d){const f=document.createEvent("Event");return f.initEvent(d,!0,!0),f}function Un(d){for(let f=0;f<e.selectedDates.length;f++)if(ue(e.selectedDates[f],d)===0)return""+f;return!1}function wu(d){return e.config.mode!=="range"||e.selectedDates.length<2?!1:ue(d,e.selectedDates[0])>=0&&ue(d,e.selectedDates[1])<=0}function Wt(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach((d,f)=>{const h=new Date(e.currentYear,e.currentMonth,1);h.setMonth(e.currentMonth+f),e.config.showMonths>1||e.config.monthSelectorType==="static"?e.monthElements[f].textContent=At(h.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=h.getMonth().toString(),d.value=h.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 Ia(d){return e.selectedDates.map(f=>e.formatDate(f,d)).filter((f,h,w)=>e.config.mode!=="range"||e.config.enableTime||w.indexOf(f)===h).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function Te(d=!0){e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=Ia(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=Ia(e.config.altFormat)),d!==!1&&U("onValueUpdate")}function xu(d){const f=ce(d),h=e.prevMonthNav.contains(f),w=e.nextMonthNav.contains(f);h||w?In(h?-1:1):e.yearElements.indexOf(f)>=0?f.select():f.classList.contains("arrowUp")?e.changeYear(e.currentYear+1):f.classList.contains("arrowDown")&&e.changeYear(e.currentYear-1)}function Cu(d){d.preventDefault();const f=d.type==="keydown",h=ce(d),w=h;e.amPM!==void 0&&h===e.amPM&&(e.amPM.textContent=e.l10n.amPM[pe(e.amPM.textContent===e.l10n.amPM[0])]);const k=parseFloat(w.getAttribute("min")),v=parseFloat(w.getAttribute("max")),V=parseFloat(w.getAttribute("step")),S=parseInt(w.value,10),M=d.delta||(f?d.which===38?1:-1:0);let T=S+V*M;if(typeof w.value!="undefined"&&w.value.length===2){const L=w===e.hourElement,he=w===e.minuteElement;T<k?(T=v+T+pe(!L)+(pe(L)&&pe(!e.amPM)),he&&_(void 0,-1,e.hourElement)):T>v&&(T=w===e.hourElement?T-v-pe(!e.amPM):k,he&&_(void 0,1,e.hourElement)),e.amPM&&L&&(V===1?T+S===23:Math.abs(T-S)>V)&&(e.amPM.textContent=e.l10n.amPM[pe(e.amPM.textContent===e.l10n.amPM[0])]),w.value=oe(T)}}return a(),e}function Qe(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=cl(i,r||{}),o.push(i._flatpickr)}catch(l){console.error(l)}}return o.length===1?o[0]:o}typeof HTMLElement!="undefined"&&typeof HTMLCollection!="undefined"&&typeof NodeList!="undefined"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(n){return Qe(this,n)},HTMLElement.prototype.flatpickr=function(n){return Qe([this],n)});var Y=function(n,r){return typeof n=="string"?Qe(window.document.querySelectorAll(n),r):n instanceof Node?Qe([n],r):Qe(n,r)};Y.defaultConfig={},Y.l10ns={en:Object.assign({},lt),default:Object.assign({},lt)},Y.localize=n=>{Y.l10ns.default=Object.assign(Object.assign({},Y.l10ns.default),n)},Y.setDefaults=n=>{Y.defaultConfig=Object.assign(Object.assign({},Y.defaultConfig),n)},Y.parseDate=Sn({}),Y.formatDate=oa({}),Y.compareDates=ue,typeof jQuery!="undefined"&&typeof jQuery.fn!="undefined"&&(jQuery.fn.flatpickr=function(n){return Qe(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!="undefined"&&(window.flatpickr=Y);var Tu="";const me=t.defineComponent({props:{disabled:{type:Boolean,default:!1},label:{default:""},tag:{default:"label"}},setup(n){return(r,e)=>n.label?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.tag),t.mergeProps({key:0,class:{"block my-1 text-sm font-semibold leading-snug text-gray-900":!0,"opacity-75":n.disabled}},J({},r.$attrs)),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(n.label),1)]),_:1},16,["class"])):t.createCommentVNode("",!0)}}),fe=t.defineComponent({props:{tag:{default:"div"},text:{default:""}},setup(n){return(r,e)=>n.text?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.tag),t.normalizeProps(t.mergeProps({key:0},Re(J({},r.$attrs),{class:"mt-1 text-sm leading-snug font-normal text-gray-700"}))),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(n.text),1)]),_:1},16)):t.createCommentVNode("",!0)}}),ul=["aria-labelledby","aria-describedby","id","placeholder","type","value"],_n=t.defineComponent({props:{type:null,help:{default:""},label:{default:""},modelValue:{default:""}},emits:["update:modelValue"],setup(n,{emit:r}){const e=n,a=t.useAttrs().id||ke.CreateIdAttribute(),i=["date","datetime-local","email","month","number","password","search","tel","text","time","url","week"],l=t.computed(()=>typeof e.type=="string"&&i.includes(e.type));return(s,c)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(me,{class:"block",id:`${t.unref(a)}-label`,for:t.unref(a),label:n.label},null,8,["id","for","label"]),t.createElementVNode("input",t.mergeProps({"aria-labelledby":n.label?`${t.unref(a)}-label`:void 0,"aria-describedby":n.help?`${t.unref(a)}-help`:void 0,class:["mt-1","sm:text-sm",...t.unref(l)?["block","shadow-sm","focus:ring-blue-500","focus:border-blue-500","border-gray-600","rounded-md","w-full","disabled:opacity-70","disabled:cursor-not-allowed"]:[]],id:t.unref(a),placeholder:n.label,type:n.type,value:n.modelValue,onInput:c[0]||(c[0]=p=>r("update:modelValue",p.target.value))},s.$attrs),null,16,ul),t.createVNode(fe,{id:`${t.unref(a)}-help`,text:n.help},null,8,["id","text"])],64))}}),It=t.defineComponent({props:{modelValue:null,startDate:{default:0},label:{default:""},help:{default:""}},emits:["update:modelValue"],setup(n,{emit:r}){const e=n,a=t.useAttrs().id||ke.CreateIdAttribute(),i=l=>{r("update:modelValue",l)};return t.onMounted(()=>{Y(`#${a}`,{dateFormat:"m-d-Y",mode:"range",maxDate:new Date,minDate:e.startDate,onClose:l=>{l.length===2?i({minDate:l[0].setUTCHours(0,0,0,0)/1e3,maxDate:Math.floor(l[1].setUTCHours(23,59,59,999)/1e3)}):l.length===0&&i({minDate:0,maxDate:0})}})}),(l,s)=>(t.openBlock(),t.createBlock(_n,{type:"text",placeholder:"mm-dd-yyyy range",id:t.unref(a),label:n.label,help:n.help},null,8,["id","label","help"]))}}),fl=["aria-labelledby","aria-describedby","id","value"],pl={key:0,value:"",disabled:"",selected:""},ml=["value","textContent"],Bn=t.defineComponent({props:{design:{default:"standard"},label:{default:""},help:{default:""},placeholder:{default:"Select an option"},options:null,modelValue:null},emits:["update:modelValue"],setup(n,{emit:r}){const e=n,a=t.useAttrs().id||ke.CreateIdAttribute(),i=t.computed(()=>({standard:"mt-1 block w-full border border-gray-600 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-blue-500 focus:border-blue-500 sm:text-sm disabled:opacity-70 disabled:cursor-not-allowed",compressed:"appearance-none rounded-none relative block w-full px-3 py-2 border border-gray-600 text-gray-900 focus:outline-none focus:ring-blue-500 focus:border-blue-500 focus:z-10 sm:text-sm disabled:opacity-70 disabled:cursor-not-allowed"})[e.design]);return(l,s)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(me,{id:`${t.unref(a)}-label`,for:t.unref(a),label:n.label},null,8,["id","for","label"]),t.createElementVNode("select",t.mergeProps({"aria-labelledby":n.label?`${t.unref(a)}-label`:void 0,"aria-describedby":n.help?`${t.unref(a)}-help`:void 0,class:t.unref(i),id:t.unref(a),value:n.modelValue},Re(J({},l.$attrs),{onChange:c=>{r("update:modelValue",c.target.value)}})),[n.placeholder?(t.openBlock(),t.createElementBlock("option",pl,t.toDisplayString(n.placeholder),1)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.options,c=>(t.openBlock(),t.createElementBlock("option",{value:c.value,textContent:t.toDisplayString(c.label),key:c.value},null,8,ml))),128))],16,fl),t.createVNode(fe,{id:`${t.unref(a)}-help`,text:n.help},null,8,["id","text"])],64))}}),hl={class:"md:flex md:items-center md:justify-between bg-white mx-auto py-4 border-t border-gray-100"},gl={class:"flex-1 min-w-0"},bl={class:"text-lg leading-6 font-semibold text-gray-900"},yl={class:"mt-4 flex md:mt-0 md:ml-4"},Mn=t.defineComponent({props:{dateRange:null,sortDir:null,title:null},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=c=>{r("sort-dir-changed",c)},s=c=>{r("date-range-changed",c)};return(c,p)=>(t.openBlock(),t.createElementBlock("div",hl,[t.createElementVNode("div",gl,[t.createElementVNode("h1",bl,t.toDisplayString(n.title),1)]),t.createElementVNode("div",yl,[t.createVNode(Bn,{modelValue:a.value,"onUpdate:modelValue":[p[0]||(p[0]=u=>a.value=u),l],options:i},null,8,["modelValue"]),t.createVNode(It,{modelValue:o.value,"onUpdate:modelValue":[p[1]||(p[1]=u=>o.value=u),s],class:"ml-3"},null,8,["modelValue"])])]))}});function dt(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 p=0,u;const b=()=>{u!==void 0&&u.abort()},m=(g={},y={})=>{p++;const x=p;u=new AbortController,c.value=!1,l.value=!1,s.value=!0;const C={data:["POST","post","PUT","put"].includes(r)?g:{},method:r,params:["GET","get"].includes(r)?g:{},signal:u.signal,url:n};return Et.makeRequest(C,J(J({},e),y)).then(E=>(o.value=E,a.value=void 0,c.value=!1,E),E=>{throw a.value=E,wr.isCancel(E)&&(c.value=!0),E}).finally(()=>{x==p&&(l.value=!0,s.value=!1),i.value=!0})};return(e==null?void 0:e.immediate)&&e.immediate===!0&&m(),{result:o,error:a,isFinished:l,isLoading:s,isAborted:c,hasFetched:i,abort:b,execute:m}}function wl(n,r={}){return dt(n,"GET",r)}function xl(n,r={}){return dt(n,"DELETE",r)}function Cl(n,r={}){return dt(n,"POST",r)}function vl(n,r={}){return dt(n,"PUT",r)}function ia(n={}){const r=t.ref(new Map);let e={removeDelay:1e4,email:""};const o=m=>{e=J(J({},e),m)},a=m=>{r.value.delete(m)},i=m=>{const g=ke.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"}),p=(m,g=!1)=>i({message:m,persistent:g,type:"success"}),u=(m,g=!1)=>i({message:m,persistent:g,type:"warning"}),b=(m="",g=!1)=>{const y=m||e.email,x=y?`Whoops! Something went wrong, please reach out to
|
|
11
11
|
<a class="underline text-xy-blue" href="mailto:${y}">${y}</a>
|
|
12
|
-
if the issue persists.`:"Whoops! Something went wrong.";return i({message:x,persistent:g,type:"error"})};return o(n||{}),{flasher:{add:i,remove:a,flash:l,error:s,warning:u,info:c,success:p,genericError:b},flashes:r,configure:o}}const El=n=>{if(window.Flashes)for(const r of window.Flashes){if(typeof r.type=="undefined"){const e=r.message.split(": ");n.add({type:e[0],message:e[1]});continue}n.add(r)}};let Tn;function Ie(){return Tn===void 0&&(Tn=ia()),Tn}const On={error(n,r){Ie().flasher.error(n,r)},info(n,r){Ie().flasher.warning(n,r)},success(n,r){Ie().flasher.info(n,r)},warning(n,r){Ie().flasher.success(n,r)},genericError(n,r){Ie().flasher.genericError(n,r)}},kl={class:"px-4 flex items-center justify-between sm:px-0"},Dl={class:"w-0 flex-1 flex"},$l=[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 ")],Nl={class:"hidden md:flex"},Sl=["textContent","onClick"],Vl={class:"w-0 flex-1 flex justify-end"},_l=[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)],Lt=t.defineComponent({props:{modelValue:null},emits:["update:modelValue"],setup(n,{emit:r}){const e=n,o=i=>{r("update:modelValue",Re(J({},e.modelValue),{page:i}))},a=t.computed(()=>{const i=[];if(e.modelValue.totalPages<=4){for(let s=0;s<e.modelValue.totalPages;s++)i.push(s+1);return i}if(e.modelValue.totalPages-e.modelValue.page>=3){for(let s=0;s<4;s++)i.push(e.modelValue.page+s);return i}for(let s=0;s<4;s++)i.unshift(e.modelValue.totalPages-s);return i});return(i,l)=>(t.openBlock(),t.createElementBlock("div",kl,[t.createElementVNode("div",Dl,[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",n.modelValue.page==1?"text-gray-500 cursor-not-allowed pointer-events-none":"text-gray-700 hover:text-gray-900 hover:border-gray-300"]),onClick:l[0]||(l[0]=t.withModifiers(s=>o(n.modelValue.page-1),["prevent"]))},$l,2)]),t.createElementVNode("div",Nl,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(a),s=>(t.openBlock(),t.createElementBlock("a",{href:"#",class:t.normalizeClass(["-mt-px border-t-2 pt-4 px-4 inline-flex items-center text-sm leading-5 font-medium",n.modelValue.page===s?"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"]),key:s,textContent:t.toDisplayString(s),onClick:t.withModifiers(c=>o(s),["prevent"])},null,10,Sl))),128))]),t.createElementVNode("div",Vl,[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",n.modelValue.page>=n.modelValue.totalPages?"text-gray-500 cursor-not-allowed pointer-events-none":"text-gray-700 hover:text-gray-900 hover:border-gray-300"]),onClick:l[1]||(l[1]=t.withModifiers(s=>o(n.modelValue.page+1),["prevent"]))},_l,2)])]))}}),Bl={key:0,class:"shadow overflow-hidden sm:rounded-md border"},la=t.defineComponent({props:{refreshTrigger:{default:0},reloadTrigger:{default:0},title:null,url:null},setup(n){const r=n,e=t.ref({minDate:0,maxDate:0}),o=t.ref(!0),a=t.ref([]),i=t.ref({page:1,perPage:10,totalItems:0,totalPages:0}),l=t.ref("DESC"),s=c=>{const p={page:i.value.page,perPage:i.value.perPage,sortDir:l.value};Et.get(r.url,{},Object.assign(p,e.value)).then(u=>{i.value={page:u.data.page,perPage:u.data.perPage,totalItems:u.data.totalItems,totalPages:u.data.totalPages},a.value=u.data.items,c&&(o.value=a.value.length!=0)},()=>{On.genericError()})};return t.watch([l,e],()=>{s(!1)}),t.watch(()=>r.refreshTrigger,()=>{s(!1)}),t.watch(()=>r.reloadTrigger,()=>{i.value.page=1,s(!0)}),s(!0),(c,p)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(Mn,{"date-range":e.value,"sort-dir":l.value,title:n.title,onSortDirChanged:p[0]||(p[0]=u=>l.value=u),onDateRangeChanged:p[1]||(p[1]=u=>e.value=u)},null,8,["date-range","sort-dir","title"]),o.value?(t.openBlock(),t.createElementBlock("div",Bl,[t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,(u,b)=>(t.openBlock(),t.createElementBlock("li",{key:b,class:t.normalizeClass({"border-t border-gray-200":b>0})},[t.renderSlot(c.$slots,"default",{item:u})],2))),128))])])):t.renderSlot(c.$slots,"empty",{key:1}),o.value?(t.openBlock(),t.createBlock(Lt,{key:2,modelValue:i.value,"onUpdate:modelValue":[p[2]||(p[2]=u=>i.value=u),p[3]||(p[3]=u=>s(!1))]},null,8,["modelValue"])):t.createCommentVNode("",!0)]))}}),Ml=["href"],sa=t.defineComponent({props:{propsData:null,attribute:null},setup(n){return(r,e)=>(t.openBlock(),t.createElementBlock("a",{href:n.propsData[n.attribute]},[t.createVNode(t.unref(qi),{class:"h-6 w-6 group-hover:text-gray-500 transition"})],8,Ml))}});var Lu="";const Tl={class:"fixed inset-0 flex flex-col items-end justify-end px-4 py-6 pointer-events-none sm:p-6 z-40"},Ol={class:"rounded-lg ring-1 ring-black ring-opacity-5 overflow-hidden"},Pl={class:"p-4"},Al={class:"flex items-center"},Il={class:"w-0 flex-1 flex justify-between"},Ll=["innerHTML"],Rl={class:"ml-4 flex-shrink-0 flex"},Fl=["onClick"],jl=[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)],Rt=t.defineComponent({setup(n){const{flasher:r,flashes:e}=Ie(),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(()=>{El(r)}),(a,i)=>(t.openBlock(),t.createElementBlock("div",Tl,[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",[o(s.type)]])},[t.createElementVNode("div",Ol,[t.createElementVNode("div",Pl,[t.createElementVNode("div",Al,[t.createElementVNode("div",Il,[t.createElementVNode("p",{class:"w-0 flex-1 text-sm leading-5 font-medium text-gray-900",innerHTML:s.message},null,8,Ll)]),t.createElementVNode("div",Rl,[t.createElementVNode("button",{onClick:c=>t.unref(r).remove(l),class:"inline-flex text-gray-400 focus:outline-none focus:text-gray-500 transition ease-in-out duration-150"},jl,8,Fl)])])])])],2))),128))]),_:1})]))}});function Ul(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 Hl(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 Yl(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 da(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 Ft(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 zl={class:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"},Wl=t.createElementVNode("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"\u200B",-1),ql={class:"inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-2xl w-full"},Kl={class:"block absolute top-0 right-0 pt-4 pr-4"},Gl=t.createElementVNode("span",{class:"sr-only"},"Close",-1),Jl={class:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Xl={class:"mt-3 sm:mt-0 sm:text-left"},Ql={class:"mt-2"},Zl={key:0,class:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},es=["textContent","disabled"],ca=t.defineComponent({props:{destructive:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},modelValue:{type:Boolean},submitText:{default:""},title:{default:""}},emits:["submit","update:modelValue"],setup(n,{emit:r}){const e=()=>{r("submit")},o=a=>{r("update:modelValue",a)};return(a,i)=>(t.openBlock(),t.createBlock(t.unref(it),{as:"template",show:n.modelValue},{default:t.withCtx(()=>[t.createVNode(t.unref(Vt),{as:"div",static:"",class:"fixed z-10 inset-0 overflow-y-auto",onClose:i[3]||(i[3]=l=>o(!1)),open:n.modelValue},{default:t.withCtx(()=>[t.createElementVNode("div",zl,[t.createVNode(t.unref(Se),{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(_t),{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})]),_:1}),Wl,t.createVNode(t.unref(Se),{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",ql,[t.createElementVNode("div",Kl,[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:i[0]||(i[0]=l=>o(!1))},[Gl,t.createVNode(t.unref(Ft),{class:"h-6 w-6","aria-hidden":"true"})])]),t.createElementVNode("div",Jl,[t.createElementVNode("div",Xl,[t.createVNode(t.unref(hn),{as:"h3",class:"text-center text-lg leading-6 font-medium text-gray-900",textContent:t.toDisplayString(n.title)},null,8,["textContent"]),t.createElementVNode("div",Ql,[t.renderSlot(a.$slots,"default")])])]),n.submitText?(t.openBlock(),t.createElementBlock("div",Zl,[t.createElementVNode("button",{type:"button",class:t.normalizeClass(["xy-btn w-full sm:ml-3 sm:w-auto sm:text-sm",[n.destructive?"xy-btn-red":"xy-btn"]]),onClick:i[1]||(i[1]=l=>e()),textContent:t.toDisplayString(n.submitText),disabled:n.disabled},null,10,es),t.createElementVNode("button",{type:"button",class:"xy-btn-white mt-3 w-full sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm",onClick:i[2]||(i[2]=l=>o(!1)),ref:"cancelButtonRef"}," Cancel ",512)])):t.createCommentVNode("",!0),t.renderSlot(a.$slots,"buttons")])]),_:3})])]),_:3},8,["open"])]),_:3},8,["show"]))}}),ts={class:"aspect-w-1 aspect-h-1 overflow-hidden"},ns={class:"flex justify-center relative"},rs={class:"sr-only"},as=t.createElementVNode("div",{class:"animate-spin-gear"},[t.createElementVNode("svg",{width:"100%",height:"100%",viewBox:"0 0 129 129",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[t.createElementVNode("defs",null,[t.createElementVNode("polygon",{id:"path-1",points:"0.000248076923 0.48676924 128.472837 0.48676924 128.472837 128.800648 0.000248076923 128.800648"})]),t.createElementVNode("g",{id:"Page-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t.createElementVNode("g",{id:"Group-6-Copy-3"},[t.createElementVNode("g",{id:"Group-3"},[t.createElementVNode("mask",{id:"mask-2",fill:"white"},[t.createElementVNode("use",{"xlink:href":"#path-1"})]),t.createElementVNode("g",{id:"Clip-2"}),t.createElementVNode("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:"#51A749",mask:"url(#mask-2)"})])])])])],-1),os=t.createElementVNode("div",{class:"absolute top-0 left-0 right-0 bottom-0 flex justify-center items-center transform scale-50"},[t.createElementVNode("svg",{width:"100%",height:"100%",viewBox:"0 0 53 32",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[t.createElementVNode("g",{id:"Page-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t.createElementVNode("g",{id:"Group-3-Copy"},[t.createElementVNode("polygon",{id:"Fill-1",fill:"#1F6DF4",points:"0.7994 0.3999 11.2214 16.0009 0.7994 31.5999 11.2214 31.5999 16.4004 24.0149 21.1934 31.5999 31.9994 31.5999 21.4254 15.7449 26.0064 9.1719 20.6194 1.3729 16.1554 7.9149 11.2214 0.3999"}),t.createElementVNode("polygon",{id:"Fill-2",fill:"#51A749",points:"41.978 0.3999 36.799 7.6269 32.006 0.3999 21.2 0.3999 31.775 15.5069 27.194 21.7689 32.27 29.1999 52.4 0.3999"})])])])],-1),Pn=t.defineComponent({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?void 0:a.class)?(i=t.unref(r))==null?void 0:i.class:"h-20 w-20")},[t.createElementVNode("div",ts,[t.createElementVNode("div",ns,[t.createElementVNode("p",rs,[t.renderSlot(e.$slots,"default")]),as,os])])],2)}}}),is={key:0,class:"fixed top-0 left-0 flex flex-col items-center justify-center w-full h-full cursor-not-allowed z-50 bg-gray-50 bg-opacity-50"},ls={class:"mt-2"},jt=t.defineComponent({setup(n){const{idx:r,loading:e,maxIdx:o,messages:a,msg:i,showMsg:l}=Yn(),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(p,u)=>t.unref(e)?(t.openBlock(),t.createElementBlock("div",is,[t.createVNode(Pn,{class:"w-32 h-32"}),t.withDirectives(t.createElementVNode("div",ls,[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)}}),ss={class:"h-screen flex overflow-hidden bg-gray-100"},ds={class:"relative flex-1 flex flex-col max-w-xs w-full pt-5 pb-4 bg-white"},cs={class:"absolute top-0 right-0 -mr-12 pt-2"},us=t.createElementVNode("span",{class:"sr-only"},"Close sidebar",-1),fs={class:"flex-shrink-0 flex justify-center px-4"},ps=["src"],ms={class:"mt-5 flex-1 h-0 overflow-y-auto"},hs={class:"px-2 space-y-1"},gs=["href","target"],bs=t.createElementVNode("div",{class:"flex-shrink-0 w-14","aria-hidden":"true"},null,-1),ys={class:"hidden md:flex md:flex-shrink-0"},ws={class:"flex flex-col w-64"},xs={class:"flex flex-col flex-grow border-r border-gray-200 pt-5 pb-4 bg-white overflow-y-auto"},Cs={class:"flex items-center flex-shrink-0 px-4"},vs=["src"],Es={class:"mt-5 flex-grow flex flex-col"},ks={class:"flex-1 px-2 bg-white space-y-1"},Ds=["href","target"],$s={class:"flex flex-col w-0 flex-1 overflow-hidden"},Ns={class:"relative z-10 flex-shrink-0 flex h-16 bg-xy-blue shadow"},Ss=t.createElementVNode("span",{class:"sr-only"},"Open sidebar",-1),Vs={class:"flex-1 px-4 flex justify-between"},_s={class:"flex-1 flex"},Bs={class:"flex items-center text-2xl text-white"},Ms={class:"ml-4 flex items-center md:ml-6"},Ts=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1),Os=["href"],Ps={class:"flex-1 relative overflow-y-auto focus:outline-none"},As={class:"mx-auto"},ua=t.defineComponent({props:{activeURL:{default:""},iconURL:null,navigation:null,userNavigation:null},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",ss,[t.createVNode(t.unref(it),{as:"template",show:e.value},{default:t.withCtx(()=>[t.createVNode(t.unref(Vt),{as:"div",static:"",class:"fixed inset-0 flex z-40 md:hidden",onClose:i[1]||(i[1]=l=>e.value=!1),open:e.value},{default:t.withCtx(()=>[t.createVNode(t.unref(Se),{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(_t),{class:"fixed inset-0 bg-gray-600 bg-opacity-75"})]),_:1}),t.createVNode(t.unref(Se),{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",ds,[t.createVNode(t.unref(Se),{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",cs,[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)},[us,t.createVNode(t.unref(Ft),{class:"h-6 w-6 text-white","aria-hidden":"true"})])])]),_:1}),t.createElementVNode("div",fs,[t.createElementVNode("img",{class:"w-auto h-12",src:n.iconURL,alt:"Logo"},null,8,ps)]),t.createElementVNode("div",ms,[t.createElementVNode("nav",hs,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.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-medium 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,gs))),128))])])])]),_:1}),bs]),_:1},8,["open"])]),_:1},8,["show"]),t.createElementVNode("div",ys,[t.createElementVNode("div",ws,[t.createElementVNode("div",xs,[t.createElementVNode("div",Cs,[t.createElementVNode("img",{class:"w-auto h-12",src:n.iconURL,alt:"Logo"},null,8,vs)]),t.createElementVNode("div",Es,[t.createElementVNode("nav",ks,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.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-100 hover:text-gray-900","group flex items-center px-2 py-2 text-sm font-medium 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-3 h-6 w-6"]),"aria-hidden":"true"},null,8,["class"])),t.createTextVNode(" "+t.toDisplayString(l.name),1)],10,Ds))),128))])])])])]),t.createElementVNode("div",$s,[t.createElementVNode("div",Ns,[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 md:hidden",onClick:i[2]||(i[2]=l=>e.value=!0)},[Ss,t.createVNode(t.unref(Hl),{class:"h-6 w-6","aria-hidden":"true"})]),t.createElementVNode("div",Vs,[t.createElementVNode("div",_s,[t.createElementVNode("h1",Bs,[t.renderSlot(a.$slots,"header")])]),t.createElementVNode("div",Ms,[t.createVNode(t.unref(gn),{as:"div",class:"ml-3 relative"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(bn),{class:"max-w-xs flex items-center text-sm text-white rounded-full hover:bg-blue-500 hover:text-gray-200 focus:outline-none focus:ring focus:text-white"},{default:t.withCtx(()=>[Ts,t.createVNode(t.unref(zi),{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(yn),{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(n.userNavigation,l=>(t.openBlock(),t.createBlock(t.unref(wn),{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,Os)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})])])]),t.createElementVNode("main",Ps,[t.createElementVNode("div",As,[t.renderSlot(a.$slots,"default")])])])]),t.createVNode(Rt),t.createVNode(jt)],64))}});function Is(n,r=100){let e;return(...o)=>{e||(n.apply(o),e=!0,setTimeout(()=>e=!1,r))}}const ct=t.defineComponent({props:{as:{default:"div"},position:{default:"auto"}},setup(n){const r=n,e=()=>({vw:document.documentElement.clientWidth,vh:document.documentElement.clientHeight}),o=t.ref(),a=t.ref(),i=t.ref(e()),l=t.computed(()=>{const p={wrapper:"",content:""};return r.position==="none"||(p.wrapper="h-0 flex w-screen",p.content="absolute",r.position!=="auto"&&(p.wrapper+=` ${s.value.wrapper}`,p.content+=` ${s.value.content}`)),p}),s=t.computed(()=>{let p="",u="";switch(r.position){case"top-left":p="top-0 right-0 -translate-y-full justify-end",u="bottom-full";break;case"top-center":p="top-0 -translate-y-full -translate-x-full left-1/2 justify-end",u="bottom-full translate-x-1/2";break;case"top-right":p="top-0 -translate-y-full left-0 -translate-x-full justify-end",u="bottom-full translate-x-full";break;case"bottom-left":p="top-full right-0 justify-end",u="top-full";break;case"bottom-center":p="top-full -translate-x-full left-1/2 justify-end",u="top-full translate-x-1/2";break;case"bottom-right":p="top-full left-0 -translate-x-full justify-end",u="top-full translate-x-full";break;case"left":p="top-1/2 left-0 -translate-y-1/2 -translate-x-full justify-end",u="-translate-y-1/2";break;case"right":p="top-1/2 -translate-y-1/2 right-0 justify-end",u="translate-x-full -translate-y-1/2";break}return{wrapper:p,content:u}}),c=t.computed(()=>{var _,G;if(!((_=a==null?void 0:a.value)==null?void 0:_.el)||!((G=o==null?void 0:o.value)==null?void 0:G.el))return{};const{vw:p,vh:u}=i.value,b=10,m=o.value.el.getBoundingClientRect(),g=a.value.el.firstChild.getBoundingClientRect(),y=u-m.bottom,x=m.top>y,C=p-m.left,E=m.left>C;let N=0;return E?(g.width>m.right?N=m.right-g.width+(g.width-m.right):N=m.right-g.width,p>g.width+b&&(N=N+b)):(g.width>C?N=m.left-(g.width-C):N=m.left,p>g.width+b&&(N=N-b)),{wrapper:{top:x?"auto":"100%",bottom:x?"100%":"auto",transform:`translate(${m.left*-1}px, 0)`,width:`${p}px`},content:{top:x?"auto":"100%",bottom:x?"100%":"auto",transform:`translate(${N}px, 0)`}}});if(r.position==="auto"){const p=Is(()=>{i.value=e()});t.onMounted(()=>{window.addEventListener("resize",p),window.addEventListener("scroll",p)}),t.onUnmounted(()=>{window.removeEventListener("resize",p),window.removeEventListener("scroll",p)})}return(p,u)=>(t.openBlock(),t.createBlock(t.unref(Ur),{class:"relative flex",as:n.as},{default:t.withCtx(({open:b,close:m})=>[t.createVNode(t.unref(Mi),{ref_key:"trigger",ref:o},{default:t.withCtx(()=>[t.renderSlot(p.$slots,"button",{open:b,close:m})]),_:2},1536),t.createVNode(t.Transition,{"enter-active-class":"transition-opacity transition-faster ease-out-quad","leave-active-class":"transition-opacity transition-fastest ease-in-quad","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:t.withCtx(()=>[t.createVNode(t.unref(Ti),{ref_key:"wrapper",ref:a,class:t.normalizeClass(["absolute z-10",t.unref(l).wrapper]),style:t.normalizeStyle(n.position==="auto"?t.unref(c).wrapper:{})},{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(t.unref(l).content),style:t.normalizeStyle(n.position==="auto"?t.unref(c).content:{})},[t.renderSlot(p.$slots,"default",{open:b,close:m})],6)]),_:2},1032,["class","style"])]),_:2},1024)]),_:3},8,["as"]))}});var Ls=(n,r)=>{const e=n.__vccOpts||n;for(const[o,a]of r)e[o]=a;return e};const Rs={},Fs={class:"w-full max-w-xs bg-white rounded-md p-2 border border-gray-100 shadow-md"};function js(n,r){return t.openBlock(),t.createElementBlock("div",Fs,[t.renderSlot(n.$slots,"default")])}var fa=Ls(Rs,[["render",js]]);const Us={class:"absolute inset-0 overflow-hidden"},Hs={class:"fixed inset-y-0 right-0 pl-10 max-w-full flex"},Ys={class:"w-screen max-w-md"},zs={class:"h-full flex flex-col bg-white shadow-xl overflow-y-scroll"},Ws={class:"py-6 px-4 bg-blue-700 sm:px-6"},qs={class:"flex items-center justify-between"},Ks={class:"ml-3 h-7 flex items-center"},Gs=t.createElementVNode("span",{class:"sr-only"},"Close panel",-1),Js={class:"mt-1"},Xs=["textContent"],Qs={class:"relative flex-1 py-6 px-4 sm:px-6"},pa=t.defineComponent({props:{header:null,description:null,modelValue:{type:Boolean}},emits:["close","update:modelValue"],setup(n,{emit:r}){const e=n,o=t.ref(e.modelValue),a=()=>{o.value=!1,r("close",o.value),r("update:modelValue",o.value)};return(i,l)=>(t.openBlock(),t.createBlock(t.unref(it),{as:"template",show:n.modelValue},{default:t.withCtx(()=>[t.createVNode(t.unref(Vt),{as:"div",static:"",class:"fixed inset-0 z-40 overflow-hidden bg-black bg-opacity-50",onClose:l[1]||(l[1]=s=>a()),open:n.modelValue},{default:t.withCtx(()=>[t.createElementVNode("div",Us,[t.createVNode(t.unref(_t),{class:"absolute inset-0"}),t.createElementVNode("div",Hs,[t.createVNode(t.unref(Se),{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",Ys,[t.createElementVNode("div",zs,[t.createElementVNode("div",Ws,[t.createElementVNode("div",qs,[t.createVNode(t.unref(hn),{as:"h3",class:"text-white",textContent:t.toDisplayString(n.header)},null,8,["textContent"]),t.createElementVNode("div",Ks,[t.createElementVNode("button",{class:"bg-blue-700 rounded-md text-blue-200 hover:text-white focus:outline-none focus:ring-2 focus:ring-white",onClick:l[0]||(l[0]=s=>a())},[Gs,t.createVNode(t.unref(Ft),{class:"h-6 w-6","aria-hidden":"true"})])])]),t.createElementVNode("div",Js,[t.createElementVNode("p",{class:"text-blue-300",textContent:t.toDisplayString(n.description)},null,8,Xs)])]),t.createElementVNode("div",Qs,[t.renderSlot(i.$slots,"default")]),t.renderSlot(i.$slots,"footer")])])]),_:3})])])]),_:3},8,["open"])]),_:3},8,["show"]))}}),Zs={class:"leading-none w-4 h-4"},ed=t.createElementVNode("div",{class:"p-5 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"},null,-1),td={class:"w-full max-w-xs bg-white rounded-md px-3 py-2 border border-gray-100 drop-shadow-md text-xs text-gray-900 leading-snug font-medium"},ma=t.defineComponent({props:{as:{default:"span"},position:{default:"auto"}},setup(n){return(r,e)=>(t.openBlock(),t.createBlock(ct,{position:n.position,as:n.as},{button:t.withCtx(()=>[t.createElementVNode("div",Zs,[t.createVNode(t.unref(Ul)),ed])]),default:t.withCtx(()=>[t.createElementVNode("div",td,[t.renderSlot(r.$slots,"default")])]),_:3},8,["position","as"]))}}),nd={class:"min-h-screen bg-gray-100"},rd={class:"mx-auto px-4 sm:px-6 lg:px-8"},ad={class:"flex justify-between h-16"},od={class:"flex"},id={class:"flex-shrink-0 flex items-center"},ld=["src"],sd={class:"hidden sm:-my-px sm:ml-6 sm:flex sm:space-x-8"},dd=["href","aria-current"],cd={class:"hidden sm:ml-6 sm:flex sm:items-center"},ud=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1),fd=["href"],pd={class:"-mr-2 flex items-center sm:hidden"},md=t.createElementVNode("span",{class:"sr-only"},"Open main menu",-1),hd={class:"pt-2 pb-3 space-y-1"},gd=["href","aria-current"],bd={class:"pt-4 pb-3 border-t border-gray-200"},yd={class:"flex items-center px-4"},wd={class:"flex-shrink-0"},xd={class:"ml-3"},Cd=["textContent"],vd=["textContent"],Ed={class:"mt-3 space-y-1"},kd=["href"],Dd={class:"mx-auto sm:px-6 lg:px-8"},$d={class:"px-4 py-8 sm:px-0"},ha=t.defineComponent({props:{activeURL:{default:""},currentUser:null,iconURL:null,navigation:null,userNavigation:null},setup(n){const r=n,e=o=>r.activeURL===o;return(o,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",nd,[t.createVNode(t.unref(ki),{as:"nav",class:"bg-white shadow-sm"},{default:t.withCtx(({open:i})=>[t.createElementVNode("div",rd,[t.createElementVNode("div",ad,[t.createElementVNode("div",od,[t.createElementVNode("div",id,[t.createElementVNode("img",{class:"block h-8 w-auto",src:n.iconURL,alt:"XY Trees"},null,8,ld)]),t.createElementVNode("div",sd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.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,dd))),128))])]),t.createElementVNode("div",cd,[t.createVNode(t.unref(gn),{as:"div",class:"ml-3 relative"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(bn),{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(()=>[ud,t.createVNode(t.unref(da),{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(yn),{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(n.userNavigation,l=>(t.openBlock(),t.createBlock(t.unref(wn),{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,fd)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})]),t.createElementVNode("div",pd,[t.createVNode(t.unref(Di),{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(()=>[md,i?(t.openBlock(),t.createBlock(t.unref(Ft),{key:1,class:"block h-6 w-6","aria-hidden":"true"})):(t.openBlock(),t.createBlock(t.unref(Yl),{key:0,class:"block h-6 w-6","aria-hidden":"true"}))]),_:2},1024)])])]),t.createVNode(t.unref($i),{class:"sm:hidden"},{default:t.withCtx(()=>[t.createElementVNode("div",hd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.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,gd))),128))]),t.createElementVNode("div",bd,[t.createElementVNode("div",yd,[t.createElementVNode("div",wd,[t.createVNode(t.unref(da),{class:"text-gray-500 h-10 w-10 rounded-full"})]),t.createElementVNode("div",xd,[n.currentUser.name?(t.openBlock(),t.createElementBlock("div",{key:0,class:"text-base font-medium text-gray-800",textContent:t.toDisplayString(n.currentUser.name)},null,8,Cd)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"text-sm font-medium text-gray-500",textContent:t.toDisplayString(n.currentUser.email)},null,8,vd)])]),t.createElementVNode("div",Ed,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.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,kd))),128))])])]),_:1})]),_:1}),t.renderSlot(o.$slots,"header"),t.createElementVNode("main",null,[t.createElementVNode("div",Dd,[t.createElementVNode("div",$d,[t.renderSlot(o.$slots,"default")])])])]),t.createVNode(Rt),t.createVNode(jt)],64))}}),Nd={class:"flex flex-col"},Sd={class:"-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"},Vd={class:"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8"},_d={class:"overflow-hidden border-b border-gray-200 shadow sm:rounded-lg"},Bd={class:"min-w-full divide-y divide-gray-200"},Md=["textContent"],Td={class:"bg-white divide-y divide-gray-200"},Od=["textContent"],Pd={key:0},Ad=["colspan"],ga=t.defineComponent({props:{tableData:null},setup(n){const r=(e,o)=>{if(o.key)return e[o.key];if(o.presenter){const a=t.getCurrentInstance();return o.presenter(e,a==null?void 0:a.proxy)}return""};return(e,o)=>(t.openBlock(),t.createElementBlock("div",Nd,[t.createElementVNode("div",Sd,[t.createElementVNode("div",Vd,[t.createElementVNode("div",_d,[t.createElementVNode("table",Bd,[t.createElementVNode("thead",null,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.tableData.columns,(a,i)=>(t.openBlock(),t.createElementBlock("th",{class:"px-6 py-3 text-xs font-medium tracking-wider text-left text-gray-900 uppercase bg-gray-50 leading-4",key:i,textContent:t.toDisplayString(a.display)},null,8,Md))),128))])]),t.createElementVNode("tbody",Td,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.tableData.items,(a,i)=>(t.openBlock(),t.createElementBlock("tr",{key:a.id?a.id:i},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.tableData.columns,(l,s)=>(t.openBlock(),t.createElementBlock("td",{class:"px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5",key:i+"-"+s},[l.component?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.component),{key:0,"props-data":a,"current-user":n.tableData.currentUser,attribute:l.key},null,8,["props-data","current-user","attribute"])):(t.openBlock(),t.createElementBlock("span",{key:1,textContent:t.toDisplayString(r(a,l))},null,8,Od))]))),128))]))),128)),n.tableData.items.length==0?(t.openBlock(),t.createElementBlock("tr",Pd,[t.createElementVNode("td",{colspan:n.tableData.columns.length,class:"px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5"}," No items were found! ",8,Ad)])):t.createCommentVNode("",!0)])])])])])]))}}),Id={class:"flex items-center justify-center space-x-8"},Ld={class:"font-medium"},Rd={class:"flex items-center space-x-5"},Fd={key:0,class:"block w-2.5 h-2.5 bg-xy-green rounded-full hover:bg-green-900 focus:bg-green-900"},jd={key:1,class:"relative flex items-center justify-center"},Ud=[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)],Hd={key:2,href:"#",class:"block w-2.5 h-2.5 bg-gray-200 rounded-full hover:bg-gray-400 focus:bg-gray-400"},Yd={key:0,class:"flex flex-shrink-0"},zd={key:0,class:"inline-flex rounded-md shadow-sm"},Wd=["textContent"],qd={class:"ml-3 inline-flex rounded-md shadow-sm"},Kd=["textContent"],ba=t.defineComponent({props:{hideActions:{type:Boolean,default:!1},hidePrevious:{type:Boolean,default:!1},nextText:{default:"Next"},previousText:{default:"Back"},step:null,total:null},emits:["next","previous"],setup(n,{emit:r}){const e=()=>{r("next")},o=()=>{r("previous")};return(a,i)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("nav",Id,[t.createElementVNode("p",Ld,"Step "+t.toDisplayString(n.step)+" of "+t.toDisplayString(n.total),1),t.createElementVNode("ul",Rd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.total,l=>(t.openBlock(),t.createElementBlock("li",{key:l},[n.step>l?(t.openBlock(),t.createElementBlock("span",Fd)):n.step===l?(t.openBlock(),t.createElementBlock("div",jd,Ud)):(t.openBlock(),t.createElementBlock("span",Hd))]))),128))])]),n.hideActions?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Yd,[n.hidePrevious?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",zd,[t.createElementVNode("button",{type:"button",class:"xy-btn-white",onClick:o,textContent:t.toDisplayString(n.previousText)},null,8,Wd)])),t.createElementVNode("span",qd,[t.createElementVNode("button",{type:"button",class:"xy-btn",onClick:e,textContent:t.toDisplayString(n.nextText)},null,8,Kd)])]))]))}}),Gd={class:"flex flex-col mb-4 space-y-4 lg:space-y-0 lg:flex-row lg:justify-between"},Jd={key:0,class:"w-full max-w-lg lg:max-w-xs"},Xd=t.createElementVNode("label",{for:"search",class:"sr-only"},"Search",-1),Qd={class:"relative"},Zd=t.createElementVNode("div",{class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},[t.createElementVNode("svg",{class:"w-5 h-5 text-gray-400",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),ec={key:1,class:"w-full max-w-lg lg:max-w-xs"},tc={class:"relative z-0 min-w-full align-middle border-b border-gray-200 shadow sm:rounded-lg overflow-x-auto"},nc={class:"min-w-full"},rc={key:0},ac=["onClick"],oc={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",class:"h-5 inline"},ic=[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)],lc={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},sc=[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)],dc={key:2,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},cc=[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)],uc={class:"bg-white"},fc=["onClick"],pc=["textContent"],mc={key:0},hc=["colspan"],ya=t.defineComponent({props:{clickable:{type:Boolean,default:!1},loader:{type:Boolean,default:!0},tableData:null},setup(n){const r=n,e=t.ref(r.tableData.defaultSort?r.tableData.defaultSort:""),o=t.ref(r.tableData.defaultSortDirection?r.tableData.defaultSortDirection:"desc"),a=t.ref({minDate:0,maxDate:0}),i=t.ref([]),l=t.ref({page:1,perPage:10,totalItems:0,totalPages:0}),s=t.ref(""),c=(y,x)=>{if(x.key)return x.key.split(".").reduce((C,E)=>C[E],y);if(x.presenter){const C=t.getCurrentInstance();return x.presenter(y,C==null?void 0:C.proxy)}return""},p=y=>{l.value.page=1,a.value=y,b()},u=y=>{e.value==y?o.value=o.value==="desc"?"asc":"desc":(e.value=y,o.value="desc"),b()},b=()=>{const y={minDate:a.value.minDate,maxDate:a.value.maxDate,page:l.value.page,perPage:l.value.perPage,sort:e.value,sortDir:o.value,q:s.value};Et.get(r.tableData.url,{skipLoader:!r.loader},y).then(x=>{l.value={page:x.data.page,perPage:x.data.perPage,totalItems:x.data.totalItems,totalPages:x.data.totalPages},i.value=x.data.items},()=>{On.genericError()})},m=()=>{l.value.page=1,b()},g=t.computed(()=>!!i.value.length);return t.watch(()=>r.tableData.refreshTrigger,()=>{b()}),t.watch(()=>r.tableData.reloadTrigger,()=>{m()}),b(),(y,x)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",Gd,[n.tableData.search?(t.openBlock(),t.createElementBlock("div",Jd,[Xd,t.createElementVNode("div",Qd,[Zd,t.withDirectives(t.createElementVNode("input",{class:"pl-10",type:"search","onUpdate:modelValue":x[0]||(x[0]=C=>s.value=C),placeholder:"Search",onChange:x[1]||(x[1]=C=>m())},null,544),[[t.vModelText,s.value,void 0,{trim:!0}]])])])):t.createCommentVNode("",!0),n.tableData.dateSearch?(t.openBlock(),t.createElementBlock("div",ec,[t.createVNode(It,{modelValue:a.value,"onUpdate:modelValue":[x[2]||(x[2]=C=>a.value=C),p]},null,8,["modelValue"])])):t.createCommentVNode("",!0)]),t.createElementVNode("div",tc,[t.createElementVNode("table",nc,[t.createElementVNode("thead",null,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.tableData.columns,(C,E)=>(t.openBlock(),t.createElementBlock("th",{class:"px-6 py-3 text-xs font-medium tracking-wider text-left text-gray-900 uppercase border-b border-gray-200 bg-gray-50 leading-4",key:E},[C.display.length?(t.openBlock(),t.createElementBlock("span",rc,t.toDisplayString(C.display),1)):t.createCommentVNode("",!0),C.sort?(t.openBlock(),t.createElementBlock("span",{key:1,class:"cursor-pointer",onClick:t.withModifiers(N=>u(C.sort),["prevent"])},[e.value!==C.sort?(t.openBlock(),t.createElementBlock("svg",oc,ic)):o.value=="desc"?(t.openBlock(),t.createElementBlock("svg",lc,sc)):(t.openBlock(),t.createElementBlock("svg",dc,cc))],8,ac)):t.createCommentVNode("",!0)]))),128))])]),t.createElementVNode("tbody",uc,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,(C,E)=>(t.openBlock(),t.createElementBlock("tr",{key:C.id?C.id:E,onClick:N=>y.$emit("handleClick",C),class:t.normalizeClass({"cursor-pointer":n.clickable})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.tableData.columns,(N,_)=>(t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["px-6 py-4 text-sm text-gray-700 whitespace-nowrap border-b border-gray-200 leading-5",N.class]),key:E+"-"+_},[N.component?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(N.component),{key:0,"props-data":C,"current-user":n.tableData.currentUser,attribute:N.key,items:N.items},null,8,["props-data","current-user","attribute","items"])):(t.openBlock(),t.createElementBlock("div",{key:1,textContent:t.toDisplayString(c(C,N))},null,8,pc))],2))),128))],10,fc))),128)),t.unref(g)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("tr",mc,[t.createElementVNode("td",{colspan:n.tableData.columns.length,class:"px-6 py-4 text-sm text-gray-700 whitespace-nowrap border-b border-gray-200 leading-5"}," No items were found! ",8,hc)]))])])]),t.unref(g)?(t.openBlock(),t.createBlock(Lt,{key:0,modelValue:l.value,"onUpdate:modelValue":[x[3]||(x[3]=C=>l.value=C),x[4]||(x[4]=C=>b())]},null,8,["modelValue"])):t.createCommentVNode("",!0)]))}}),gc=t.createElementVNode("label",{for:"tabs",class:"sr-only"},"Select a tab",-1),bc={class:"hidden sm:block"},yc=["textContent","onClick"],wa=t.defineComponent({props:{modelValue:null,pillDesign:{type:Boolean,default:!1},tabs:null},emits:["update:modelValue"],setup(n,{emit:r}){const e=n,o=l=>{r("update:modelValue",l)},a=(l,s)=>{let c="";return e.pillDesign?(c="px-12 py-2 font-semibold text-md leading-5 rounded-t-md focus:outline-none ",e.modelValue===l?c=c+"focus:bg-white text-gray-700 bg-white border-b-2 border-blue-500":c=c+"text-gray-700 hover:text-gray-900 focus:text-gray-900 focus:bg-gray-100 border border-gray-200",c):(c="px-1 py-4 text-sm font-semibold border-b-2 whitespace-nowrap leading-5 focus:outline-none ",e.modelValue===l?c=c+"border-blue-500 text-xy-blue focus:text-blue-800 focus:border-blue-700":c=c+"border-transparent text-gray-700 hover:text-gray-900 hover:border-gray-300 focus:text-gray-900 focus:border-gray-300",s&&(c=c+" ml-8"),c)},i=t.computed(()=>!e.pillDesign);return(l,s)=>{const c=t.resolveComponent("Select");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",{class:t.normalizeClass(["sm:hidden",{"mb-4":n.pillDesign}])},[gc,t.createVNode(c,{name:"tabs",modelValue:n.modelValue,"onUpdate:modelValue":s[0]||(s[0]=p=>o(p)),options:n.tabs},null,8,["modelValue","options"])],2),t.createElementVNode("div",bc,[t.createElementVNode("div",{class:t.normalizeClass({"border-b border-gray-200":t.unref(i)})},[t.createElementVNode("nav",{class:t.normalizeClass(["flex",[n.pillDesign?"ml-8":"-mb-px"]])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.tabs,(p,u)=>(t.openBlock(),t.createElementBlock("a",{href:"#",class:t.normalizeClass(a(p.value,u>0)),key:u,textContent:t.toDisplayString(p.label),onClick:t.withModifiers(b=>o(p.value),["prevent"])},null,10,yc))),128))],2)],2)])])}}}),wc=t.createElementVNode("span",{class:"sr-only"},"Use",-1),xa=t.defineComponent({props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:r}){return(e,o)=>(t.openBlock(),t.createBlock(t.unref(Li),{class:t.normalizeClass([n.modelValue?"bg-blue-600":"bg-gray-200","relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"]),modelValue:n.modelValue,"onUpdate:modelValue":o[0]||(o[0]=a=>r("update:modelValue",a))},{default:t.withCtx(()=>[wc,t.createElementVNode("span",{"aria-hidden":"true",class:t.normalizeClass([n.modelValue?"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,["class","modelValue"]))}}),xc={class:"relative flex items-start"},Cc={class:"flex items-center h-5"},vc=["id","aria-labelledby","aria-describedby","checked"],Ec={class:"ml-3"},Ca=t.defineComponent({props:{label:{default:""},help:{default:""},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:r}){const o=t.useAttrs().id||ke.CreateIdAttribute();return(a,i)=>(t.openBlock(),t.createElementBlock("div",xc,[t.createElementVNode("div",Cc,[t.createElementVNode("input",t.mergeProps({id:t.unref(o),"aria-labelledby":n.label?`${t.unref(o)}-label`:void 0,"aria-describedby":n.help?`${t.unref(o)}-help`:void 0,checked:n.modelValue,class:"focus:ring-blue-500 h-4 w-4 text-blue-500 border-gray-600 rounded disabled:opacity-50 disabled:cursor-not-allowed",type:"checkbox"},J({onChange:l=>{r("update:modelValue",l.target.checked)}},a.$attrs)),null,16,vc)]),t.createElementVNode("div",Ec,[t.createVNode(me,{class:"mt-auto",disabled:a.$attrs.hasOwnProperty("disabled")&&a.$attrs.disabled!==!1,id:`${t.unref(o)}-label`,for:t.unref(o),label:n.label},null,8,["disabled","id","for","label"]),t.createVNode(fe,{class:"-mt-1",id:`${t.unref(o)}-help`,text:n.help},null,8,["id","text"])])]))}});function kc(n,r={}){return n?n(r).some(e=>e.type===t.Comment||Array.isArray(e.children)&&!e.children.length?!1:e.type!==t.Text||typeof e.children=="string"&&e.children.trim()!==""):!1}const ut=t.defineComponent({props:{tag:{default:"legend"}},setup(n){return(r,e)=>t.unref(kc)(r.$slots.default)?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.tag),t.normalizeProps(t.mergeProps({key:0},Re(J({},r.$attrs),{class:"text-sm font-semibold leading-snug text-gray-900"}))),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:3},16)):t.createCommentVNode("",!0)}}),Dc=["aria-labelledby","aria-describedby"],$c={key:0,class:"space-y-0.5"},Nc={key:0},Sc={class:"flex"},Vc={class:"flex items-center h-5"},_c=["id","aria-labelledby","aria-describedby","checked","disabled"],Bc={class:"ml-3"},va=t.defineComponent({props:{options:null,help:{default:""},legend:{default:""},modelValue:null,columns:{default:void 0}},emits:["update:modelValue"],setup(n,{emit:r}){const e=n,o=t.useAttrs(),a=t.useSlots(),i=o.id||ke.CreateIdAttribute(),l=t.computed(()=>e.legend!==""||a.legend!==void 0),s=(c,p)=>{let u=[...e.modelValue];c?u.push(p):u.splice(u.indexOf(p),1),r("update:modelValue",u)};return(c,p)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"space-y-5","aria-labelledby":t.unref(l)?`${t.unref(i)}-legend`:void 0,"aria-describedby":n.help?`${t.unref(i)}-help`:void 0},[t.unref(l)||n.help?(t.openBlock(),t.createElementBlock("div",$c,[t.createVNode(ut,{id:`${t.unref(i)}-legend`},{default:t.withCtx(()=>[n.legend?(t.openBlock(),t.createElementBlock("div",Nc,t.toDisplayString(n.legend),1)):t.createCommentVNode("",!0),c.$slots.legend?t.renderSlot(c.$slots,"legend",{key:1}):t.createCommentVNode("",!0)]),_:3},8,["id"]),t.createVNode(fe,{tag:"p",text:n.help,id:`${t.unref(i)}-help`},null,8,["text","id"])])):t.createCommentVNode("",!0),t.createElementVNode("div",Sc,[t.createElementVNode("div",{class:t.normalizeClass(["grid gap-4",{"sm:grid sm:gap-y-4 sm:gap-x-5 sm:space-y-0":n.columns!==void 0,"sm:grid-cols-2":n.columns===2,"sm:grid-cols-3":n.columns===3,"sm:grid-cols-4":n.columns===4}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.options,(u,b)=>(t.openBlock(),t.createElementBlock("div",{key:u.value,class:"flex items-start"},[t.createElementVNode("div",Vc,[t.createElementVNode("input",t.mergeProps({id:`${t.unref(i)}-${b}`,"aria-labelledby":`${t.unref(i)}-${b}-label`,"aria-describedby":(u==null?void 0:u.help)&&u.help?`${t.unref(i)}-${b}-help`:void 0,checked:n.modelValue.includes(u.value),disabled:u.disabled===!0?!0:void 0,class:"focus:ring-blue-500 h-4 w-4 text-blue-500 border-gray-600 rounded disabled:opacity-50 disabled:cursor-not-allowed",type:"checkbox"},J({onChange:m=>{s(m.target.checked,u.value)}},c.$attrs)),null,16,_c)]),t.createElementVNode("div",Bc,[t.createVNode(me,{class:"mt-auto",disabled:c.$attrs.hasOwnProperty("disabled")&&c.$attrs.disabled!==!1||u.disabled===!0,id:`${t.unref(i)}-${b}-label`,for:`${t.unref(i)}-${b}`,label:u.label},null,8,["disabled","id","for","label"]),t.createVNode(fe,{class:"-mt-1",id:`${t.unref(i)}-${b}-help`,text:u.help},null,8,["id","text"])])]))),128))],2)])],8,Dc))}}),Mc=["aria-labelledby","aria-describedby"],Tc={key:0,class:"space-y-0.5"},Oc={key:0},Pc={class:"flex"},Ac={class:"flex items-center h-5"},Ic=["aria-describedby","aria-labelledby","checked","disabled","id","name","value"],Lc={class:"ml-3"},Ea=t.defineComponent({props:{options:null,help:{default:""},legend:{default:""},modelValue:{default:void 0},columns:{default:void 0}},emits:["update:modelValue"],setup(n,{emit:r}){const e=n,o=t.useAttrs(),a=t.useSlots(),i=o.id||ke.CreateIdAttribute(),l=t.computed(()=>e.legend!==""||a.legend!==void 0);return(s,c)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"space-y-5","aria-labelledby":t.unref(l)?`${t.unref(i)}-legend`:void 0,"aria-describedby":n.help?`${t.unref(i)}-help`:void 0},[t.unref(l)||n.help?(t.openBlock(),t.createElementBlock("div",Tc,[t.createVNode(ut,{id:`${t.unref(i)}-legend`},{default:t.withCtx(()=>[n.legend?(t.openBlock(),t.createElementBlock("div",Oc,t.toDisplayString(n.legend),1)):t.createCommentVNode("",!0),s.$slots.legend?t.renderSlot(s.$slots,"legend",{key:1}):t.createCommentVNode("",!0)]),_:3},8,["id"]),t.createVNode(fe,{tag:"p",text:n.help,id:`${t.unref(i)}-help`},null,8,["text","id"])])):t.createCommentVNode("",!0),t.createElementVNode("div",Pc,[t.createElementVNode("div",{class:t.normalizeClass(["grid gap-4",{"sm:grid sm:gap-y-4 sm:gap-x-5 sm:space-y-0":n.columns!==void 0,"sm:grid-cols-2":n.columns===2,"sm:grid-cols-3":n.columns===3,"sm:grid-cols-4":n.columns===4}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.options,(p,u)=>(t.openBlock(),t.createElementBlock("div",{key:p.value,class:"flex items-start"},[t.createElementVNode("div",Ac,[t.createElementVNode("input",t.mergeProps({"aria-describedby":(p==null?void 0:p.help)&&p.help?`${t.unref(i)}-${u}-help`:void 0,"aria-labelledby":`${t.unref(i)}-${u}-label`,checked:n.modelValue===p.value,class:"w-4 h-4 border-gray-600 focus:ring-blue-500 text-xy-blue disabled:opacity-50 disabled:cursor-not-allowed",disabled:p.disabled===!0?!0:void 0,id:`${t.unref(i)}-${u}`,name:t.unref(i),type:"radio",value:p.value},J({onChange:()=>{r("update:modelValue",p.value)}},s.$attrs)),null,16,Ic)]),t.createElementVNode("div",Lc,[t.createVNode(me,{class:"mt-auto",disabled:s.$attrs.hasOwnProperty("disabled")&&s.$attrs.disabled!==!1||p.disabled===!0,id:`${t.unref(i)}-${u}-label`,for:`${t.unref(i)}-${u}`,label:p.label},null,8,["disabled","id","for","label"]),t.createVNode(fe,{class:"-mt-1",id:`${t.unref(i)}-${u}-help`,text:p.help},null,8,["id","text"])])]))),128))],2)])],8,Mc))}}),Rc=["id"],Fc={class:"flex-1 flex pr-1"},jc={class:"flex flex-col"},Uc={key:1,class:"mt-auto mb-0"},Hc=["checked","name","required","value"],ka=t.defineComponent({props:{columns:{default:void 0},help:{default:""},legend:{default:""},modelValue:{default:void 0},options:null},emits:["update:modelValue"],setup(n,{emit:r}){const e=n,o=t.useAttrs(),a=ke.CreateIdAttribute(),i=t.ref(),l=t.ref(),s=t.computed(()=>e.modelValue===void 0?i.value:e.modelValue),c=u=>{i.value=u,l.value=!1,r("update:modelValue",u)},p=t.computed(()=>typeof o.name=="string"&&o.name!==""?o.name:a);return(u,b)=>(t.openBlock(),t.createBlock(t.unref(Pi),{modelValue:t.unref(s),"onUpdate:modelValue":c,disabled:typeof t.unref(o).disabled=="boolean"?t.unref(o).disabled:!1,"aria-invalid":l.value===!0?"true":null,"aria-errormessage":l.value===!0?`error-${t.unref(a)}`:null},{default:t.withCtx(()=>[n.legend?(t.openBlock(),t.createBlock(t.unref(Kr),{key:0,class:"block"},{default:t.withCtx(()=>[t.createVNode(ut,{tag:"div"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(n.legend),1)]),_:1})]),_:1})):t.createCommentVNode("",!0),n.help?(t.openBlock(),t.createBlock(t.unref(xn),{key:1},{default:t.withCtx(()=>[t.createVNode(fe,{text:n.help},null,8,["text"])]),_:1})):t.createCommentVNode("",!0),l.value===!0?(t.openBlock(),t.createElementBlock("div",{key:2,id:`error-${t.unref(a)}`,class:"sr-only"}," Please select one of these options. ",8,Rc)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["mt-4 grid grid-cols-1 gap-y-5 gap-x-4 relative",{"sm:grid-cols-2":n.columns===2,"sm:grid-cols-3":n.columns===3}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.options,m=>(t.openBlock(),t.createBlock(t.unref(Ai),{as:"template",disabled:(m==null?void 0:m.disabled)?m.disabled:!1,key:m.value,value:m.value},{default:t.withCtx(({active:g,checked:y,disabled:x})=>[t.createElementVNode("div",{class:t.normalizeClass([y?"border-transparent":"border-gray-300",g?"border-blue-500 ring-2 ring-blue-500":"","relative bg-white border rounded-lg shadow-sm p-4 flex cursor-pointer focus:outline-none",x?"opacity-75":""])},[t.createElementVNode("div",Fc,[t.createElementVNode("div",jc,[t.createVNode(t.unref(Kr),{as:"div"},{default:t.withCtx(()=>[t.createVNode(me,{tag:"div",class:"mt-auto mb-auto",label:m.label},null,8,["label"])]),_:2},1024),m.help?(t.openBlock(),t.createBlock(t.unref(xn),{key:0,as:"div"},{default:t.withCtx(()=>[t.createVNode(fe,{tag:"div",class:"mt-auto",text:m.help},null,8,["text"])]),_:2},1024)):t.createCommentVNode("",!0),m.sublabel||u.$slots.sublabel?(t.openBlock(),t.createElementBlock("div",Uc,[t.createVNode(t.unref(xn),{as:"div",class:"font-semibold leading-snug mt-4 text-gray-900 text-sm"},{default:t.withCtx(()=>[t.renderSlot(u.$slots,"sublabel",{active:g,checked:y,disabled:x,option:m},()=>[t.createTextVNode(t.toDisplayString(m.sublabel),1)])]),_:2},1024)])):t.createCommentVNode("",!0)])]),t.createVNode(t.unref(Yi),{class:t.normalizeClass([y?"":"invisible","h-5 w-5 text-blue-600"]),"aria-hidden":"true"},null,8,["class"]),t.createElementVNode("div",{class:t.normalizeClass([g?"border":"border-2",y?"border-blue-500":"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:y,name:t.unref(p),required:t.unref(o).required!==void 0&&t.unref(o).required!==!1,tabindex:"-1",type:"radio",value:m.value,onInvalid:b[0]||(b[0]=C=>l.value=!0)},null,40,Hc)],2)]),_:2},1032,["disabled","value"]))),128))],2)]),_:3},8,["modelValue","disabled","aria-invalid","aria-errormessage"]))}}),Yc=["aria-labelledby","aria-describedby","id","value"],Da=t.defineComponent({props:{help:{default:""},label:{default:""},modelValue:{default:""}},emits:["update:modelValue"],setup(n,{emit:r}){const o=t.useAttrs().id||ke.CreateIdAttribute();return(a,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(me,{class:"block",id:`${t.unref(o)}-label`,for:t.unref(o),label:n.label},null,8,["id","for","label"]),t.createElementVNode("textarea",t.mergeProps({"aria-labelledby":n.label?`${t.unref(o)}-label`:void 0,"aria-describedby":n.help?`${t.unref(o)}-help`:void 0,class:["mt-1","sm:text-sm","block","shadow-sm","focus:ring-blue-500","focus:border-blue-500","border-gray-600","rounded-md","w-full","disabled:opacity-70","disabled:cursor-not-allowed"],id:t.unref(o),value:n.modelValue,onInput:i[0]||(i[0]=l=>r("update:modelValue",l.target.value))},a.$attrs),null,16,Yc),t.createVNode(fe,{id:`${t.unref(o)}-help`,text:n.help},null,8,["id","text"])],64))}}),zc=["aria-labelledby","aria-describedby"],Wc={key:0,class:"space-y-0.5"},qc=["for"],Kc=["id","name","checked"],Gc=["for"],Jc=["id","name","checked"],$a=t.defineComponent({props:{modelValue:{type:Boolean,default:void 0},help:{default:""},legend:{default:""},name:{default:""}},emits:["update:modelValue"],setup(n,{emit:r}){const e=n,a=t.useAttrs().id||ke.CreateIdAttribute(),i=t.computed(()=>typeof e.name=="string"&&e.name!==""),l=s=>{r("update:modelValue",s.target.value==="true")};return(s,c)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"space-y-3","aria-labelledby":n.legend?`${t.unref(a)}-legend`:void 0,"aria-describedby":n.help?`${t.unref(a)}-help`:void 0},[n.legend||n.help?(t.openBlock(),t.createElementBlock("div",Wc,[t.createVNode(me,{class:"block my-auto",label:n.legend,tag:"legend"},null,8,["label"]),t.createVNode(fe,{tag:"p",text:n.help,id:`${t.unref(a)}-help`},null,8,["text","id"])])):t.createCommentVNode("",!0),t.createElementVNode("div",null,[t.createElementVNode("label",{class:t.normalizeClass(["inline-flex items-center",{"cursor-not-allowed":s.$attrs.disabled}]),for:`${t.unref(i)?n.name:t.unref(a)}-true`},[t.createElementVNode("input",t.mergeProps({type:"radio",class:"w-4 h-4 border-gray-600 focus:ring-blue-500 text-xy-blue disabled:opacity-50 disabled:cursor-not-allowed",id:`${t.unref(i)?n.name:t.unref(a)}-true`,name:t.unref(i)?n.name:t.unref(a),value:!0,checked:n.modelValue===!0},Re(J({},s.$attrs),{onChange:l})),null,16,Kc),t.createVNode(me,{class:"ml-2",disabled:s.$attrs.hasOwnProperty("disabled")&&s.$attrs.disabled!==!1,label:"Yes",tag:"span"},null,8,["disabled"])],10,qc),t.createElementVNode("label",{class:t.normalizeClass(["inline-flex items-center ml-6",{"cursor-not-allowed":s.$attrs.disabled}]),for:`${t.unref(i)?n.name:t.unref(a)}-false`},[t.createElementVNode("input",t.mergeProps({type:"radio",class:"w-4 h-4 border-gray-600 focus:ring-blue-500 text-xy-blue disabled:opacity-50 disabled:cursor-not-allowed",id:`${t.unref(i)?n.name:t.unref(a)}-false`,name:t.unref(i)?n.name:t.unref(a),value:!1,checked:n.modelValue===!1},Re(J({},s.$attrs),{onChange:l})),null,16,Jc),t.createVNode(me,{class:"ml-2",disabled:s.$attrs.hasOwnProperty("disabled")&&s.$attrs.disabled!==!1,label:"No",tag:"span"},null,8,["disabled"])],10,Gc)])],8,zc))}});var Xc=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",ActionsDropdown:Zr,Cards:ea,ContentModal:ta,DateFilter:Mn,DetailList:la,DownloadCell:sa,Flash:Rt,Modal:ca,SidebarLayout:ua,Slideover:pa,StackedLayout:ha,Popover:ct,PopoverContent:fa,PopoverPosition:ct,Paginator:Lt,Spinner:jt,StaticTable:ga,Steps:ba,Table:ya,Tabs:wa,Toggle:xa,Tooltip:ma,BaseInput:_n,Checkbox:Ca,DateRangePicker:It,InputHelp:fe,InputLabel:me,FieldsetLegend:ut,MultiCheckboxes:va,Radio:Ea,RadioCards:ka,Select:Bn,TextArea:Da,YesOrNoRadio:$a,XYSpinner:Pn});const Qc=function(r){Object.entries(Xc).forEach(([e,o])=>{r.component(e,o)})};D.ActionsDropdown=Zr,D.BaseAPI=Et,D.BaseInput=_n,D.Cards=ea,D.Checkbox=Ca,D.ContentModal=ta,D.DateFilter=Mn,D.DateRangePicker=It,D.DetailList=la,D.DownloadCell=sa,D.FieldsetLegend=ut,D.Flash=Rt,D.InputHelp=fe,D.InputLabel=me,D.Modal=ca,D.MultiCheckboxes=va,D.Paginator=Lt,D.Popover=ct,D.PopoverContent=fa,D.PopoverPosition=ct,D.Radio=Ea,D.RadioCards=ka,D.Select=Bn,D.SidebarLayout=ua,D.Slideover=pa,D.Spinner=jt,D.StackedLayout=ha,D.StaticTable=ga,D.Steps=ba,D.Table=ya,D.Tabs=wa,D.TextArea=Da,D.Toggle=xa,D.Tooltip=ma,D.XYSpinner=Pn,D.YesOrNoRadio=$a,D.default=Qc,D.useAppFlasher=On,D.useAppFlashes=Ie,D.useAppSpinner=Gt,D.useBaseAPI=dt,D.useBaseAPIDelete=xl,D.useBaseAPIGet=wl,D.useBaseAPIPost=Cl,D.useBaseAPIPut=vl,D.useFlashes=ia,D.useSpinnerDisplay=ie,Object.defineProperty(D,"__esModule",{value:!0}),D[Symbol.toStringTag]="Module"});
|
|
12
|
+
if the issue persists.`:"Whoops! Something went wrong.";return i({message:x,persistent:g,type:"error"})};return o(n||{}),{flasher:{add:i,remove:a,flash:l,error:s,warning:u,info:c,success:p,genericError:b},flashes:r,configure:o}}const El=n=>{if(window.Flashes)for(const r of window.Flashes){if(typeof r.type=="undefined"){const e=r.message.split(": ");n.add({type:e[0],message:e[1]});continue}n.add(r)}};let Tn;function Ie(){return Tn===void 0&&(Tn=ia()),Tn}const On={error(n,r){Ie().flasher.error(n,r)},info(n,r){Ie().flasher.info(n,r)},success(n,r){Ie().flasher.success(n,r)},warning(n,r){Ie().flasher.warning(n,r)},genericError(n,r){Ie().flasher.genericError(n,r)}},kl={class:"px-4 flex items-center justify-between sm:px-0"},Dl={class:"w-0 flex-1 flex"},$l=[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 ")],Nl={class:"hidden md:flex"},Sl=["textContent","onClick"],Vl={class:"w-0 flex-1 flex justify-end"},_l=[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)],Lt=t.defineComponent({props:{modelValue:null},emits:["update:modelValue"],setup(n,{emit:r}){const e=n,o=i=>{r("update:modelValue",Re(J({},e.modelValue),{page:i}))},a=t.computed(()=>{const i=[];if(e.modelValue.totalPages<=4){for(let s=0;s<e.modelValue.totalPages;s++)i.push(s+1);return i}if(e.modelValue.totalPages-e.modelValue.page>=3){for(let s=0;s<4;s++)i.push(e.modelValue.page+s);return i}for(let s=0;s<4;s++)i.unshift(e.modelValue.totalPages-s);return i});return(i,l)=>(t.openBlock(),t.createElementBlock("div",kl,[t.createElementVNode("div",Dl,[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",n.modelValue.page==1?"text-gray-500 cursor-not-allowed pointer-events-none":"text-gray-700 hover:text-gray-900 hover:border-gray-300"]),onClick:l[0]||(l[0]=t.withModifiers(s=>o(n.modelValue.page-1),["prevent"]))},$l,2)]),t.createElementVNode("div",Nl,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(a),s=>(t.openBlock(),t.createElementBlock("a",{href:"#",class:t.normalizeClass(["-mt-px border-t-2 pt-4 px-4 inline-flex items-center text-sm leading-5 font-medium",n.modelValue.page===s?"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"]),key:s,textContent:t.toDisplayString(s),onClick:t.withModifiers(c=>o(s),["prevent"])},null,10,Sl))),128))]),t.createElementVNode("div",Vl,[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",n.modelValue.page>=n.modelValue.totalPages?"text-gray-500 cursor-not-allowed pointer-events-none":"text-gray-700 hover:text-gray-900 hover:border-gray-300"]),onClick:l[1]||(l[1]=t.withModifiers(s=>o(n.modelValue.page+1),["prevent"]))},_l,2)])]))}}),Bl={key:0,class:"shadow overflow-hidden sm:rounded-md border"},la=t.defineComponent({props:{refreshTrigger:{default:0},reloadTrigger:{default:0},title:null,url:null},setup(n){const r=n,e=t.ref({minDate:0,maxDate:0}),o=t.ref(!0),a=t.ref([]),i=t.ref({page:1,perPage:10,totalItems:0,totalPages:0}),l=t.ref("DESC"),s=c=>{const p={page:i.value.page,perPage:i.value.perPage,sortDir:l.value};Et.get(r.url,{},Object.assign(p,e.value)).then(u=>{i.value={page:u.data.page,perPage:u.data.perPage,totalItems:u.data.totalItems,totalPages:u.data.totalPages},a.value=u.data.items,c&&(o.value=a.value.length!=0)},()=>{On.genericError()})};return t.watch([l,e],()=>{s(!1)}),t.watch(()=>r.refreshTrigger,()=>{s(!1)}),t.watch(()=>r.reloadTrigger,()=>{i.value.page=1,s(!0)}),s(!0),(c,p)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(Mn,{"date-range":e.value,"sort-dir":l.value,title:n.title,onSortDirChanged:p[0]||(p[0]=u=>l.value=u),onDateRangeChanged:p[1]||(p[1]=u=>e.value=u)},null,8,["date-range","sort-dir","title"]),o.value?(t.openBlock(),t.createElementBlock("div",Bl,[t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,(u,b)=>(t.openBlock(),t.createElementBlock("li",{key:b,class:t.normalizeClass({"border-t border-gray-200":b>0})},[t.renderSlot(c.$slots,"default",{item:u})],2))),128))])])):t.renderSlot(c.$slots,"empty",{key:1}),o.value?(t.openBlock(),t.createBlock(Lt,{key:2,modelValue:i.value,"onUpdate:modelValue":[p[2]||(p[2]=u=>i.value=u),p[3]||(p[3]=u=>s(!1))]},null,8,["modelValue"])):t.createCommentVNode("",!0)]))}}),Ml=["href"],sa=t.defineComponent({props:{propsData:null,attribute:null},setup(n){return(r,e)=>(t.openBlock(),t.createElementBlock("a",{href:n.propsData[n.attribute]},[t.createVNode(t.unref(qi),{class:"h-6 w-6 group-hover:text-gray-500 transition"})],8,Ml))}});var Lu="";const Tl={class:"fixed inset-0 flex flex-col items-end justify-end px-4 py-6 pointer-events-none sm:p-6 z-40"},Ol={class:"rounded-lg ring-1 ring-black ring-opacity-5 overflow-hidden"},Pl={class:"p-4"},Al={class:"flex items-center"},Il={class:"w-0 flex-1 flex justify-between"},Ll=["innerHTML"],Rl={class:"ml-4 flex-shrink-0 flex"},Fl=["onClick"],jl=[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)],Rt=t.defineComponent({setup(n){const{flasher:r,flashes:e}=Ie(),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(()=>{El(r)}),(a,i)=>(t.openBlock(),t.createElementBlock("div",Tl,[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",[o(s.type)]])},[t.createElementVNode("div",Ol,[t.createElementVNode("div",Pl,[t.createElementVNode("div",Al,[t.createElementVNode("div",Il,[t.createElementVNode("p",{class:"w-0 flex-1 text-sm leading-5 font-medium text-gray-900",innerHTML:s.message},null,8,Ll)]),t.createElementVNode("div",Rl,[t.createElementVNode("button",{onClick:c=>t.unref(r).remove(l),class:"inline-flex text-gray-400 focus:outline-none focus:text-gray-500 transition ease-in-out duration-150"},jl,8,Fl)])])])])],2))),128))]),_:1})]))}});function Ul(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 Hl(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 Yl(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 da(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 Ft(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 zl={class:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"},Wl=t.createElementVNode("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"\u200B",-1),ql={class:"inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-2xl w-full"},Kl={class:"block absolute top-0 right-0 pt-4 pr-4"},Gl=t.createElementVNode("span",{class:"sr-only"},"Close",-1),Jl={class:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Xl={class:"mt-3 sm:mt-0 sm:text-left"},Ql={class:"mt-2"},Zl={key:0,class:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},es=["textContent","disabled"],ca=t.defineComponent({props:{destructive:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},modelValue:{type:Boolean},submitText:{default:""},title:{default:""}},emits:["submit","update:modelValue"],setup(n,{emit:r}){const e=()=>{r("submit")},o=a=>{r("update:modelValue",a)};return(a,i)=>(t.openBlock(),t.createBlock(t.unref(it),{as:"template",show:n.modelValue},{default:t.withCtx(()=>[t.createVNode(t.unref(Vt),{as:"div",static:"",class:"fixed z-10 inset-0 overflow-y-auto",onClose:i[3]||(i[3]=l=>o(!1)),open:n.modelValue},{default:t.withCtx(()=>[t.createElementVNode("div",zl,[t.createVNode(t.unref(Se),{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(_t),{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})]),_:1}),Wl,t.createVNode(t.unref(Se),{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",ql,[t.createElementVNode("div",Kl,[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:i[0]||(i[0]=l=>o(!1))},[Gl,t.createVNode(t.unref(Ft),{class:"h-6 w-6","aria-hidden":"true"})])]),t.createElementVNode("div",Jl,[t.createElementVNode("div",Xl,[t.createVNode(t.unref(hn),{as:"h3",class:"text-center text-lg leading-6 font-medium text-gray-900",textContent:t.toDisplayString(n.title)},null,8,["textContent"]),t.createElementVNode("div",Ql,[t.renderSlot(a.$slots,"default")])])]),n.submitText?(t.openBlock(),t.createElementBlock("div",Zl,[t.createElementVNode("button",{type:"button",class:t.normalizeClass(["xy-btn w-full sm:ml-3 sm:w-auto sm:text-sm",[n.destructive?"xy-btn-red":"xy-btn"]]),onClick:i[1]||(i[1]=l=>e()),textContent:t.toDisplayString(n.submitText),disabled:n.disabled},null,10,es),t.createElementVNode("button",{type:"button",class:"xy-btn-white mt-3 w-full sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm",onClick:i[2]||(i[2]=l=>o(!1)),ref:"cancelButtonRef"}," Cancel ",512)])):t.createCommentVNode("",!0),t.renderSlot(a.$slots,"buttons")])]),_:3})])]),_:3},8,["open"])]),_:3},8,["show"]))}}),ts={class:"aspect-w-1 aspect-h-1 overflow-hidden"},ns={class:"flex justify-center relative"},rs={class:"sr-only"},as=t.createElementVNode("div",{class:"animate-spin-gear"},[t.createElementVNode("svg",{width:"100%",height:"100%",viewBox:"0 0 129 129",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[t.createElementVNode("defs",null,[t.createElementVNode("polygon",{id:"path-1",points:"0.000248076923 0.48676924 128.472837 0.48676924 128.472837 128.800648 0.000248076923 128.800648"})]),t.createElementVNode("g",{id:"Page-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t.createElementVNode("g",{id:"Group-6-Copy-3"},[t.createElementVNode("g",{id:"Group-3"},[t.createElementVNode("mask",{id:"mask-2",fill:"white"},[t.createElementVNode("use",{"xlink:href":"#path-1"})]),t.createElementVNode("g",{id:"Clip-2"}),t.createElementVNode("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:"#51A749",mask:"url(#mask-2)"})])])])])],-1),os=t.createElementVNode("div",{class:"absolute top-0 left-0 right-0 bottom-0 flex justify-center items-center transform scale-50"},[t.createElementVNode("svg",{width:"100%",height:"100%",viewBox:"0 0 53 32",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[t.createElementVNode("g",{id:"Page-1",stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},[t.createElementVNode("g",{id:"Group-3-Copy"},[t.createElementVNode("polygon",{id:"Fill-1",fill:"#1F6DF4",points:"0.7994 0.3999 11.2214 16.0009 0.7994 31.5999 11.2214 31.5999 16.4004 24.0149 21.1934 31.5999 31.9994 31.5999 21.4254 15.7449 26.0064 9.1719 20.6194 1.3729 16.1554 7.9149 11.2214 0.3999"}),t.createElementVNode("polygon",{id:"Fill-2",fill:"#51A749",points:"41.978 0.3999 36.799 7.6269 32.006 0.3999 21.2 0.3999 31.775 15.5069 27.194 21.7689 32.27 29.1999 52.4 0.3999"})])])])],-1),Pn=t.defineComponent({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?void 0:a.class)?(i=t.unref(r))==null?void 0:i.class:"h-20 w-20")},[t.createElementVNode("div",ts,[t.createElementVNode("div",ns,[t.createElementVNode("p",rs,[t.renderSlot(e.$slots,"default")]),as,os])])],2)}}}),is={key:0,class:"fixed top-0 left-0 flex flex-col items-center justify-center w-full h-full cursor-not-allowed z-50 bg-gray-50 bg-opacity-50"},ls={class:"mt-2"},jt=t.defineComponent({setup(n){const{idx:r,loading:e,maxIdx:o,messages:a,msg:i,showMsg:l}=Yn(),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(p,u)=>t.unref(e)?(t.openBlock(),t.createElementBlock("div",is,[t.createVNode(Pn,{class:"w-32 h-32"}),t.withDirectives(t.createElementVNode("div",ls,[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)}}),ss={class:"h-screen flex overflow-hidden bg-gray-100"},ds={class:"relative flex-1 flex flex-col max-w-xs w-full pt-5 pb-4 bg-white"},cs={class:"absolute top-0 right-0 -mr-12 pt-2"},us=t.createElementVNode("span",{class:"sr-only"},"Close sidebar",-1),fs={class:"flex-shrink-0 flex justify-center px-4"},ps=["src"],ms={class:"mt-5 flex-1 h-0 overflow-y-auto"},hs={class:"px-2 space-y-1"},gs=["href","target"],bs=t.createElementVNode("div",{class:"flex-shrink-0 w-14","aria-hidden":"true"},null,-1),ys={class:"hidden md:flex md:flex-shrink-0"},ws={class:"flex flex-col w-64"},xs={class:"flex flex-col flex-grow border-r border-gray-200 pt-5 pb-4 bg-white overflow-y-auto"},Cs={class:"flex items-center flex-shrink-0 px-4"},vs=["src"],Es={class:"mt-5 flex-grow flex flex-col"},ks={class:"flex-1 px-2 bg-white space-y-1"},Ds=["href","target"],$s={class:"flex flex-col w-0 flex-1 overflow-hidden"},Ns={class:"relative z-10 flex-shrink-0 flex h-16 bg-xy-blue shadow"},Ss=t.createElementVNode("span",{class:"sr-only"},"Open sidebar",-1),Vs={class:"flex-1 px-4 flex justify-between"},_s={class:"flex-1 flex"},Bs={class:"flex items-center text-2xl text-white"},Ms={class:"ml-4 flex items-center md:ml-6"},Ts=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1),Os=["href"],Ps={class:"flex-1 relative overflow-y-auto focus:outline-none"},As={class:"mx-auto"},ua=t.defineComponent({props:{activeURL:{default:""},iconURL:null,navigation:null,userNavigation:null},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",ss,[t.createVNode(t.unref(it),{as:"template",show:e.value},{default:t.withCtx(()=>[t.createVNode(t.unref(Vt),{as:"div",static:"",class:"fixed inset-0 flex z-40 md:hidden",onClose:i[1]||(i[1]=l=>e.value=!1),open:e.value},{default:t.withCtx(()=>[t.createVNode(t.unref(Se),{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(_t),{class:"fixed inset-0 bg-gray-600 bg-opacity-75"})]),_:1}),t.createVNode(t.unref(Se),{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",ds,[t.createVNode(t.unref(Se),{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",cs,[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)},[us,t.createVNode(t.unref(Ft),{class:"h-6 w-6 text-white","aria-hidden":"true"})])])]),_:1}),t.createElementVNode("div",fs,[t.createElementVNode("img",{class:"w-auto h-12",src:n.iconURL,alt:"Logo"},null,8,ps)]),t.createElementVNode("div",ms,[t.createElementVNode("nav",hs,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.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-medium 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,gs))),128))])])])]),_:1}),bs]),_:1},8,["open"])]),_:1},8,["show"]),t.createElementVNode("div",ys,[t.createElementVNode("div",ws,[t.createElementVNode("div",xs,[t.createElementVNode("div",Cs,[t.createElementVNode("img",{class:"w-auto h-12",src:n.iconURL,alt:"Logo"},null,8,vs)]),t.createElementVNode("div",Es,[t.createElementVNode("nav",ks,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.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-100 hover:text-gray-900","group flex items-center px-2 py-2 text-sm font-medium 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-3 h-6 w-6"]),"aria-hidden":"true"},null,8,["class"])),t.createTextVNode(" "+t.toDisplayString(l.name),1)],10,Ds))),128))])])])])]),t.createElementVNode("div",$s,[t.createElementVNode("div",Ns,[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 md:hidden",onClick:i[2]||(i[2]=l=>e.value=!0)},[Ss,t.createVNode(t.unref(Hl),{class:"h-6 w-6","aria-hidden":"true"})]),t.createElementVNode("div",Vs,[t.createElementVNode("div",_s,[t.createElementVNode("h1",Bs,[t.renderSlot(a.$slots,"header")])]),t.createElementVNode("div",Ms,[t.createVNode(t.unref(gn),{as:"div",class:"ml-3 relative"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(bn),{class:"max-w-xs flex items-center text-sm text-white rounded-full hover:bg-blue-500 hover:text-gray-200 focus:outline-none focus:ring focus:text-white"},{default:t.withCtx(()=>[Ts,t.createVNode(t.unref(zi),{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(yn),{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(n.userNavigation,l=>(t.openBlock(),t.createBlock(t.unref(wn),{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,Os)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})])])]),t.createElementVNode("main",Ps,[t.createElementVNode("div",As,[t.renderSlot(a.$slots,"default")])])])]),t.createVNode(Rt),t.createVNode(jt)],64))}});function Is(n,r=100){let e;return(...o)=>{e||(n.apply(o),e=!0,setTimeout(()=>e=!1,r))}}const ct=t.defineComponent({props:{as:{default:"div"},position:{default:"auto"}},setup(n){const r=n,e=()=>({vw:document.documentElement.clientWidth,vh:document.documentElement.clientHeight}),o=t.ref(),a=t.ref(),i=t.ref(e()),l=t.computed(()=>{const p={wrapper:"",content:""};return r.position==="none"||(p.wrapper="h-0 flex w-screen",p.content="absolute",r.position!=="auto"&&(p.wrapper+=` ${s.value.wrapper}`,p.content+=` ${s.value.content}`)),p}),s=t.computed(()=>{let p="",u="";switch(r.position){case"top-left":p="top-0 right-0 -translate-y-full justify-end",u="bottom-full";break;case"top-center":p="top-0 -translate-y-full -translate-x-full left-1/2 justify-end",u="bottom-full translate-x-1/2";break;case"top-right":p="top-0 -translate-y-full left-0 -translate-x-full justify-end",u="bottom-full translate-x-full";break;case"bottom-left":p="top-full right-0 justify-end",u="top-full";break;case"bottom-center":p="top-full -translate-x-full left-1/2 justify-end",u="top-full translate-x-1/2";break;case"bottom-right":p="top-full left-0 -translate-x-full justify-end",u="top-full translate-x-full";break;case"left":p="top-1/2 left-0 -translate-y-1/2 -translate-x-full justify-end",u="-translate-y-1/2";break;case"right":p="top-1/2 -translate-y-1/2 right-0 justify-end",u="translate-x-full -translate-y-1/2";break}return{wrapper:p,content:u}}),c=t.computed(()=>{var _,G;if(!((_=a==null?void 0:a.value)==null?void 0:_.el)||!((G=o==null?void 0:o.value)==null?void 0:G.el))return{};const{vw:p,vh:u}=i.value,b=10,m=o.value.el.getBoundingClientRect(),g=a.value.el.firstChild.getBoundingClientRect(),y=u-m.bottom,x=m.top>y,C=p-m.left,E=m.left>C;let N=0;return E?(g.width>m.right?N=m.right-g.width+(g.width-m.right):N=m.right-g.width,p>g.width+b&&(N=N+b)):(g.width>C?N=m.left-(g.width-C):N=m.left,p>g.width+b&&(N=N-b)),{wrapper:{top:x?"auto":"100%",bottom:x?"100%":"auto",transform:`translate(${m.left*-1}px, 0)`,width:`${p}px`},content:{top:x?"auto":"100%",bottom:x?"100%":"auto",transform:`translate(${N}px, 0)`}}});if(r.position==="auto"){const p=Is(()=>{i.value=e()});t.onMounted(()=>{window.addEventListener("resize",p),window.addEventListener("scroll",p)}),t.onUnmounted(()=>{window.removeEventListener("resize",p),window.removeEventListener("scroll",p)})}return(p,u)=>(t.openBlock(),t.createBlock(t.unref(Ur),{class:"relative flex",as:n.as},{default:t.withCtx(({open:b,close:m})=>[t.createVNode(t.unref(Mi),{ref_key:"trigger",ref:o},{default:t.withCtx(()=>[t.renderSlot(p.$slots,"button",{open:b,close:m})]),_:2},1536),t.createVNode(t.Transition,{"enter-active-class":"transition-opacity transition-faster ease-out-quad","leave-active-class":"transition-opacity transition-fastest ease-in-quad","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:t.withCtx(()=>[t.createVNode(t.unref(Ti),{ref_key:"wrapper",ref:a,class:t.normalizeClass(["absolute z-10",t.unref(l).wrapper]),style:t.normalizeStyle(n.position==="auto"?t.unref(c).wrapper:{})},{default:t.withCtx(()=>[t.createElementVNode("div",{class:t.normalizeClass(t.unref(l).content),style:t.normalizeStyle(n.position==="auto"?t.unref(c).content:{})},[t.renderSlot(p.$slots,"default",{open:b,close:m})],6)]),_:2},1032,["class","style"])]),_:2},1024)]),_:3},8,["as"]))}});var Ls=(n,r)=>{const e=n.__vccOpts||n;for(const[o,a]of r)e[o]=a;return e};const Rs={},Fs={class:"w-full max-w-xs bg-white rounded-md p-2 border border-gray-100 shadow-md"};function js(n,r){return t.openBlock(),t.createElementBlock("div",Fs,[t.renderSlot(n.$slots,"default")])}var fa=Ls(Rs,[["render",js]]);const Us={class:"absolute inset-0 overflow-hidden"},Hs={class:"fixed inset-y-0 right-0 pl-10 max-w-full flex"},Ys={class:"w-screen max-w-md"},zs={class:"h-full flex flex-col bg-white shadow-xl overflow-y-scroll"},Ws={class:"py-6 px-4 bg-blue-700 sm:px-6"},qs={class:"flex items-center justify-between"},Ks={class:"ml-3 h-7 flex items-center"},Gs=t.createElementVNode("span",{class:"sr-only"},"Close panel",-1),Js={class:"mt-1"},Xs=["textContent"],Qs={class:"relative flex-1 py-6 px-4 sm:px-6"},pa=t.defineComponent({props:{header:null,description:null,modelValue:{type:Boolean}},emits:["close","update:modelValue"],setup(n,{emit:r}){const e=n,o=t.ref(e.modelValue),a=()=>{o.value=!1,r("close",o.value),r("update:modelValue",o.value)};return(i,l)=>(t.openBlock(),t.createBlock(t.unref(it),{as:"template",show:n.modelValue},{default:t.withCtx(()=>[t.createVNode(t.unref(Vt),{as:"div",static:"",class:"fixed inset-0 z-40 overflow-hidden bg-black bg-opacity-50",onClose:l[1]||(l[1]=s=>a()),open:n.modelValue},{default:t.withCtx(()=>[t.createElementVNode("div",Us,[t.createVNode(t.unref(_t),{class:"absolute inset-0"}),t.createElementVNode("div",Hs,[t.createVNode(t.unref(Se),{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",Ys,[t.createElementVNode("div",zs,[t.createElementVNode("div",Ws,[t.createElementVNode("div",qs,[t.createVNode(t.unref(hn),{as:"h3",class:"text-white",textContent:t.toDisplayString(n.header)},null,8,["textContent"]),t.createElementVNode("div",Ks,[t.createElementVNode("button",{class:"bg-blue-700 rounded-md text-blue-200 hover:text-white focus:outline-none focus:ring-2 focus:ring-white",onClick:l[0]||(l[0]=s=>a())},[Gs,t.createVNode(t.unref(Ft),{class:"h-6 w-6","aria-hidden":"true"})])])]),t.createElementVNode("div",Js,[t.createElementVNode("p",{class:"text-blue-300",textContent:t.toDisplayString(n.description)},null,8,Xs)])]),t.createElementVNode("div",Qs,[t.renderSlot(i.$slots,"default")]),t.renderSlot(i.$slots,"footer")])])]),_:3})])])]),_:3},8,["open"])]),_:3},8,["show"]))}}),Zs={class:"leading-none w-4 h-4"},ed=t.createElementVNode("div",{class:"p-5 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"},null,-1),td={class:"w-full max-w-xs bg-white rounded-md px-3 py-2 border border-gray-100 drop-shadow-md text-xs text-gray-900 leading-snug font-medium"},ma=t.defineComponent({props:{as:{default:"span"},position:{default:"auto"}},setup(n){return(r,e)=>(t.openBlock(),t.createBlock(ct,{position:n.position,as:n.as},{button:t.withCtx(()=>[t.createElementVNode("div",Zs,[t.createVNode(t.unref(Ul)),ed])]),default:t.withCtx(()=>[t.createElementVNode("div",td,[t.renderSlot(r.$slots,"default")])]),_:3},8,["position","as"]))}}),nd={class:"min-h-screen bg-gray-100"},rd={class:"mx-auto px-4 sm:px-6 lg:px-8"},ad={class:"flex justify-between h-16"},od={class:"flex"},id={class:"flex-shrink-0 flex items-center"},ld=["src"],sd={class:"hidden sm:-my-px sm:ml-6 sm:flex sm:space-x-8"},dd=["href","aria-current"],cd={class:"hidden sm:ml-6 sm:flex sm:items-center"},ud=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1),fd=["href"],pd={class:"-mr-2 flex items-center sm:hidden"},md=t.createElementVNode("span",{class:"sr-only"},"Open main menu",-1),hd={class:"pt-2 pb-3 space-y-1"},gd=["href","aria-current"],bd={class:"pt-4 pb-3 border-t border-gray-200"},yd={class:"flex items-center px-4"},wd={class:"flex-shrink-0"},xd={class:"ml-3"},Cd=["textContent"],vd=["textContent"],Ed={class:"mt-3 space-y-1"},kd=["href"],Dd={class:"mx-auto sm:px-6 lg:px-8"},$d={class:"px-4 py-8 sm:px-0"},ha=t.defineComponent({props:{activeURL:{default:""},currentUser:null,iconURL:null,navigation:null,userNavigation:null},setup(n){const r=n,e=o=>r.activeURL===o;return(o,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",nd,[t.createVNode(t.unref(ki),{as:"nav",class:"bg-white shadow-sm"},{default:t.withCtx(({open:i})=>[t.createElementVNode("div",rd,[t.createElementVNode("div",ad,[t.createElementVNode("div",od,[t.createElementVNode("div",id,[t.createElementVNode("img",{class:"block h-8 w-auto",src:n.iconURL,alt:"XY Trees"},null,8,ld)]),t.createElementVNode("div",sd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.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,dd))),128))])]),t.createElementVNode("div",cd,[t.createVNode(t.unref(gn),{as:"div",class:"ml-3 relative"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(bn),{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(()=>[ud,t.createVNode(t.unref(da),{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(yn),{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(n.userNavigation,l=>(t.openBlock(),t.createBlock(t.unref(wn),{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,fd)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})]),t.createElementVNode("div",pd,[t.createVNode(t.unref(Di),{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(()=>[md,i?(t.openBlock(),t.createBlock(t.unref(Ft),{key:1,class:"block h-6 w-6","aria-hidden":"true"})):(t.openBlock(),t.createBlock(t.unref(Yl),{key:0,class:"block h-6 w-6","aria-hidden":"true"}))]),_:2},1024)])])]),t.createVNode(t.unref($i),{class:"sm:hidden"},{default:t.withCtx(()=>[t.createElementVNode("div",hd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.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,gd))),128))]),t.createElementVNode("div",bd,[t.createElementVNode("div",yd,[t.createElementVNode("div",wd,[t.createVNode(t.unref(da),{class:"text-gray-500 h-10 w-10 rounded-full"})]),t.createElementVNode("div",xd,[n.currentUser.name?(t.openBlock(),t.createElementBlock("div",{key:0,class:"text-base font-medium text-gray-800",textContent:t.toDisplayString(n.currentUser.name)},null,8,Cd)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"text-sm font-medium text-gray-500",textContent:t.toDisplayString(n.currentUser.email)},null,8,vd)])]),t.createElementVNode("div",Ed,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.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,kd))),128))])])]),_:1})]),_:1}),t.renderSlot(o.$slots,"header"),t.createElementVNode("main",null,[t.createElementVNode("div",Dd,[t.createElementVNode("div",$d,[t.renderSlot(o.$slots,"default")])])])]),t.createVNode(Rt),t.createVNode(jt)],64))}}),Nd={class:"flex flex-col"},Sd={class:"-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"},Vd={class:"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8"},_d={class:"overflow-hidden border-b border-gray-200 shadow sm:rounded-lg"},Bd={class:"min-w-full divide-y divide-gray-200"},Md=["textContent"],Td={class:"bg-white divide-y divide-gray-200"},Od=["textContent"],Pd={key:0},Ad=["colspan"],ga=t.defineComponent({props:{tableData:null},setup(n){const r=(e,o)=>{if(o.key)return e[o.key];if(o.presenter){const a=t.getCurrentInstance();return o.presenter(e,a==null?void 0:a.proxy)}return""};return(e,o)=>(t.openBlock(),t.createElementBlock("div",Nd,[t.createElementVNode("div",Sd,[t.createElementVNode("div",Vd,[t.createElementVNode("div",_d,[t.createElementVNode("table",Bd,[t.createElementVNode("thead",null,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.tableData.columns,(a,i)=>(t.openBlock(),t.createElementBlock("th",{class:"px-6 py-3 text-xs font-medium tracking-wider text-left text-gray-900 uppercase bg-gray-50 leading-4",key:i,textContent:t.toDisplayString(a.display)},null,8,Md))),128))])]),t.createElementVNode("tbody",Td,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.tableData.items,(a,i)=>(t.openBlock(),t.createElementBlock("tr",{key:a.id?a.id:i},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.tableData.columns,(l,s)=>(t.openBlock(),t.createElementBlock("td",{class:"px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5",key:i+"-"+s},[l.component?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.component),{key:0,"props-data":a,"current-user":n.tableData.currentUser,attribute:l.key},null,8,["props-data","current-user","attribute"])):(t.openBlock(),t.createElementBlock("span",{key:1,textContent:t.toDisplayString(r(a,l))},null,8,Od))]))),128))]))),128)),n.tableData.items.length==0?(t.openBlock(),t.createElementBlock("tr",Pd,[t.createElementVNode("td",{colspan:n.tableData.columns.length,class:"px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5"}," No items were found! ",8,Ad)])):t.createCommentVNode("",!0)])])])])])]))}}),Id={class:"flex items-center justify-center space-x-8"},Ld={class:"font-medium"},Rd={class:"flex items-center space-x-5"},Fd={key:0,class:"block w-2.5 h-2.5 bg-xy-green rounded-full hover:bg-green-900 focus:bg-green-900"},jd={key:1,class:"relative flex items-center justify-center"},Ud=[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)],Hd={key:2,href:"#",class:"block w-2.5 h-2.5 bg-gray-200 rounded-full hover:bg-gray-400 focus:bg-gray-400"},Yd={key:0,class:"flex flex-shrink-0"},zd={key:0,class:"inline-flex rounded-md shadow-sm"},Wd=["textContent"],qd={class:"ml-3 inline-flex rounded-md shadow-sm"},Kd=["textContent"],ba=t.defineComponent({props:{hideActions:{type:Boolean,default:!1},hidePrevious:{type:Boolean,default:!1},nextText:{default:"Next"},previousText:{default:"Back"},step:null,total:null},emits:["next","previous"],setup(n,{emit:r}){const e=()=>{r("next")},o=()=>{r("previous")};return(a,i)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("nav",Id,[t.createElementVNode("p",Ld,"Step "+t.toDisplayString(n.step)+" of "+t.toDisplayString(n.total),1),t.createElementVNode("ul",Rd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.total,l=>(t.openBlock(),t.createElementBlock("li",{key:l},[n.step>l?(t.openBlock(),t.createElementBlock("span",Fd)):n.step===l?(t.openBlock(),t.createElementBlock("div",jd,Ud)):(t.openBlock(),t.createElementBlock("span",Hd))]))),128))])]),n.hideActions?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Yd,[n.hidePrevious?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",zd,[t.createElementVNode("button",{type:"button",class:"xy-btn-white",onClick:o,textContent:t.toDisplayString(n.previousText)},null,8,Wd)])),t.createElementVNode("span",qd,[t.createElementVNode("button",{type:"button",class:"xy-btn",onClick:e,textContent:t.toDisplayString(n.nextText)},null,8,Kd)])]))]))}}),Gd={class:"flex flex-col mb-4 space-y-4 lg:space-y-0 lg:flex-row lg:justify-between"},Jd={key:0,class:"w-full max-w-lg lg:max-w-xs"},Xd=t.createElementVNode("label",{for:"search",class:"sr-only"},"Search",-1),Qd={class:"relative"},Zd=t.createElementVNode("div",{class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},[t.createElementVNode("svg",{class:"w-5 h-5 text-gray-400",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),ec={key:1,class:"w-full max-w-lg lg:max-w-xs"},tc={class:"relative z-0 min-w-full align-middle border-b border-gray-200 shadow sm:rounded-lg overflow-x-auto"},nc={class:"min-w-full"},rc={key:0},ac=["onClick"],oc={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",class:"h-5 inline"},ic=[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)],lc={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},sc=[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)],dc={key:2,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},cc=[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)],uc={class:"bg-white"},fc=["onClick"],pc=["textContent"],mc={key:0},hc=["colspan"],ya=t.defineComponent({props:{clickable:{type:Boolean,default:!1},loader:{type:Boolean,default:!0},tableData:null},setup(n){const r=n,e=t.ref(r.tableData.defaultSort?r.tableData.defaultSort:""),o=t.ref(r.tableData.defaultSortDirection?r.tableData.defaultSortDirection:"desc"),a=t.ref({minDate:0,maxDate:0}),i=t.ref([]),l=t.ref({page:1,perPage:10,totalItems:0,totalPages:0}),s=t.ref(""),c=(y,x)=>{if(x.key)return x.key.split(".").reduce((C,E)=>C[E],y);if(x.presenter){const C=t.getCurrentInstance();return x.presenter(y,C==null?void 0:C.proxy)}return""},p=y=>{l.value.page=1,a.value=y,b()},u=y=>{e.value==y?o.value=o.value==="desc"?"asc":"desc":(e.value=y,o.value="desc"),b()},b=()=>{const y={minDate:a.value.minDate,maxDate:a.value.maxDate,page:l.value.page,perPage:l.value.perPage,sort:e.value,sortDir:o.value,q:s.value};Et.get(r.tableData.url,{skipLoader:!r.loader},y).then(x=>{l.value={page:x.data.page,perPage:x.data.perPage,totalItems:x.data.totalItems,totalPages:x.data.totalPages},i.value=x.data.items},()=>{On.genericError()})},m=()=>{l.value.page=1,b()},g=t.computed(()=>!!i.value.length);return t.watch(()=>r.tableData.refreshTrigger,()=>{b()}),t.watch(()=>r.tableData.reloadTrigger,()=>{m()}),b(),(y,x)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",Gd,[n.tableData.search?(t.openBlock(),t.createElementBlock("div",Jd,[Xd,t.createElementVNode("div",Qd,[Zd,t.withDirectives(t.createElementVNode("input",{class:"pl-10",type:"search","onUpdate:modelValue":x[0]||(x[0]=C=>s.value=C),placeholder:"Search",onChange:x[1]||(x[1]=C=>m())},null,544),[[t.vModelText,s.value,void 0,{trim:!0}]])])])):t.createCommentVNode("",!0),n.tableData.dateSearch?(t.openBlock(),t.createElementBlock("div",ec,[t.createVNode(It,{modelValue:a.value,"onUpdate:modelValue":[x[2]||(x[2]=C=>a.value=C),p]},null,8,["modelValue"])])):t.createCommentVNode("",!0)]),t.createElementVNode("div",tc,[t.createElementVNode("table",nc,[t.createElementVNode("thead",null,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.tableData.columns,(C,E)=>(t.openBlock(),t.createElementBlock("th",{class:"px-6 py-3 text-xs font-medium tracking-wider text-left text-gray-900 uppercase border-b border-gray-200 bg-gray-50 leading-4",key:E},[C.display.length?(t.openBlock(),t.createElementBlock("span",rc,t.toDisplayString(C.display),1)):t.createCommentVNode("",!0),C.sort?(t.openBlock(),t.createElementBlock("span",{key:1,class:"cursor-pointer",onClick:t.withModifiers(N=>u(C.sort),["prevent"])},[e.value!==C.sort?(t.openBlock(),t.createElementBlock("svg",oc,ic)):o.value=="desc"?(t.openBlock(),t.createElementBlock("svg",lc,sc)):(t.openBlock(),t.createElementBlock("svg",dc,cc))],8,ac)):t.createCommentVNode("",!0)]))),128))])]),t.createElementVNode("tbody",uc,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(i.value,(C,E)=>(t.openBlock(),t.createElementBlock("tr",{key:C.id?C.id:E,onClick:N=>y.$emit("handleClick",C),class:t.normalizeClass({"cursor-pointer":n.clickable})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.tableData.columns,(N,_)=>(t.openBlock(),t.createElementBlock("td",{class:t.normalizeClass(["px-6 py-4 text-sm text-gray-700 whitespace-nowrap border-b border-gray-200 leading-5",N.class]),key:E+"-"+_},[N.component?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(N.component),{key:0,"props-data":C,"current-user":n.tableData.currentUser,attribute:N.key,items:N.items},null,8,["props-data","current-user","attribute","items"])):(t.openBlock(),t.createElementBlock("div",{key:1,textContent:t.toDisplayString(c(C,N))},null,8,pc))],2))),128))],10,fc))),128)),t.unref(g)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("tr",mc,[t.createElementVNode("td",{colspan:n.tableData.columns.length,class:"px-6 py-4 text-sm text-gray-700 whitespace-nowrap border-b border-gray-200 leading-5"}," No items were found! ",8,hc)]))])])]),t.unref(g)?(t.openBlock(),t.createBlock(Lt,{key:0,modelValue:l.value,"onUpdate:modelValue":[x[3]||(x[3]=C=>l.value=C),x[4]||(x[4]=C=>b())]},null,8,["modelValue"])):t.createCommentVNode("",!0)]))}}),gc=t.createElementVNode("label",{for:"tabs",class:"sr-only"},"Select a tab",-1),bc={class:"hidden sm:block"},yc=["textContent","onClick"],wa=t.defineComponent({props:{modelValue:null,pillDesign:{type:Boolean,default:!1},tabs:null},emits:["update:modelValue"],setup(n,{emit:r}){const e=n,o=l=>{r("update:modelValue",l)},a=(l,s)=>{let c="";return e.pillDesign?(c="px-12 py-2 font-semibold text-md leading-5 rounded-t-md focus:outline-none ",e.modelValue===l?c=c+"focus:bg-white text-gray-700 bg-white border-b-2 border-blue-500":c=c+"text-gray-700 hover:text-gray-900 focus:text-gray-900 focus:bg-gray-100 border border-gray-200",c):(c="px-1 py-4 text-sm font-semibold border-b-2 whitespace-nowrap leading-5 focus:outline-none ",e.modelValue===l?c=c+"border-blue-500 text-xy-blue focus:text-blue-800 focus:border-blue-700":c=c+"border-transparent text-gray-700 hover:text-gray-900 hover:border-gray-300 focus:text-gray-900 focus:border-gray-300",s&&(c=c+" ml-8"),c)},i=t.computed(()=>!e.pillDesign);return(l,s)=>{const c=t.resolveComponent("Select");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",{class:t.normalizeClass(["sm:hidden",{"mb-4":n.pillDesign}])},[gc,t.createVNode(c,{name:"tabs",modelValue:n.modelValue,"onUpdate:modelValue":s[0]||(s[0]=p=>o(p)),options:n.tabs},null,8,["modelValue","options"])],2),t.createElementVNode("div",bc,[t.createElementVNode("div",{class:t.normalizeClass({"border-b border-gray-200":t.unref(i)})},[t.createElementVNode("nav",{class:t.normalizeClass(["flex",[n.pillDesign?"ml-8":"-mb-px"]])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.tabs,(p,u)=>(t.openBlock(),t.createElementBlock("a",{href:"#",class:t.normalizeClass(a(p.value,u>0)),key:u,textContent:t.toDisplayString(p.label),onClick:t.withModifiers(b=>o(p.value),["prevent"])},null,10,yc))),128))],2)],2)])])}}}),wc=t.createElementVNode("span",{class:"sr-only"},"Use",-1),xa=t.defineComponent({props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:r}){return(e,o)=>(t.openBlock(),t.createBlock(t.unref(Li),{class:t.normalizeClass([n.modelValue?"bg-blue-600":"bg-gray-200","relative inline-flex flex-shrink-0 h-6 w-11 border-2 border-transparent rounded-full cursor-pointer transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"]),modelValue:n.modelValue,"onUpdate:modelValue":o[0]||(o[0]=a=>r("update:modelValue",a))},{default:t.withCtx(()=>[wc,t.createElementVNode("span",{"aria-hidden":"true",class:t.normalizeClass([n.modelValue?"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,["class","modelValue"]))}}),xc={class:"relative flex items-start"},Cc={class:"flex items-center h-5"},vc=["id","aria-labelledby","aria-describedby","checked"],Ec={class:"ml-3"},Ca=t.defineComponent({props:{label:{default:""},help:{default:""},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:r}){const o=t.useAttrs().id||ke.CreateIdAttribute();return(a,i)=>(t.openBlock(),t.createElementBlock("div",xc,[t.createElementVNode("div",Cc,[t.createElementVNode("input",t.mergeProps({id:t.unref(o),"aria-labelledby":n.label?`${t.unref(o)}-label`:void 0,"aria-describedby":n.help?`${t.unref(o)}-help`:void 0,checked:n.modelValue,class:"focus:ring-blue-500 h-4 w-4 text-blue-500 border-gray-600 rounded disabled:opacity-50 disabled:cursor-not-allowed",type:"checkbox"},J({onChange:l=>{r("update:modelValue",l.target.checked)}},a.$attrs)),null,16,vc)]),t.createElementVNode("div",Ec,[t.createVNode(me,{class:"mt-auto",disabled:a.$attrs.hasOwnProperty("disabled")&&a.$attrs.disabled!==!1,id:`${t.unref(o)}-label`,for:t.unref(o),label:n.label},null,8,["disabled","id","for","label"]),t.createVNode(fe,{class:"-mt-1",id:`${t.unref(o)}-help`,text:n.help},null,8,["id","text"])])]))}});function kc(n,r={}){return n?n(r).some(e=>e.type===t.Comment||Array.isArray(e.children)&&!e.children.length?!1:e.type!==t.Text||typeof e.children=="string"&&e.children.trim()!==""):!1}const ut=t.defineComponent({props:{tag:{default:"legend"}},setup(n){return(r,e)=>t.unref(kc)(r.$slots.default)?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.tag),t.normalizeProps(t.mergeProps({key:0},Re(J({},r.$attrs),{class:"text-sm font-semibold leading-snug text-gray-900"}))),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:3},16)):t.createCommentVNode("",!0)}}),Dc=["aria-labelledby","aria-describedby"],$c={key:0,class:"space-y-0.5"},Nc={key:0},Sc={class:"flex"},Vc={class:"flex items-center h-5"},_c=["id","aria-labelledby","aria-describedby","checked","disabled"],Bc={class:"ml-3"},va=t.defineComponent({props:{options:null,help:{default:""},legend:{default:""},modelValue:null,columns:{default:void 0}},emits:["update:modelValue"],setup(n,{emit:r}){const e=n,o=t.useAttrs(),a=t.useSlots(),i=o.id||ke.CreateIdAttribute(),l=t.computed(()=>e.legend!==""||a.legend!==void 0),s=(c,p)=>{let u=[...e.modelValue];c?u.push(p):u.splice(u.indexOf(p),1),r("update:modelValue",u)};return(c,p)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"space-y-5","aria-labelledby":t.unref(l)?`${t.unref(i)}-legend`:void 0,"aria-describedby":n.help?`${t.unref(i)}-help`:void 0},[t.unref(l)||n.help?(t.openBlock(),t.createElementBlock("div",$c,[t.createVNode(ut,{id:`${t.unref(i)}-legend`},{default:t.withCtx(()=>[n.legend?(t.openBlock(),t.createElementBlock("div",Nc,t.toDisplayString(n.legend),1)):t.createCommentVNode("",!0),c.$slots.legend?t.renderSlot(c.$slots,"legend",{key:1}):t.createCommentVNode("",!0)]),_:3},8,["id"]),t.createVNode(fe,{tag:"p",text:n.help,id:`${t.unref(i)}-help`},null,8,["text","id"])])):t.createCommentVNode("",!0),t.createElementVNode("div",Sc,[t.createElementVNode("div",{class:t.normalizeClass(["grid gap-4",{"sm:grid sm:gap-y-4 sm:gap-x-5 sm:space-y-0":n.columns!==void 0,"sm:grid-cols-2":n.columns===2,"sm:grid-cols-3":n.columns===3,"sm:grid-cols-4":n.columns===4}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.options,(u,b)=>(t.openBlock(),t.createElementBlock("div",{key:u.value,class:"flex items-start"},[t.createElementVNode("div",Vc,[t.createElementVNode("input",t.mergeProps({id:`${t.unref(i)}-${b}`,"aria-labelledby":`${t.unref(i)}-${b}-label`,"aria-describedby":(u==null?void 0:u.help)&&u.help?`${t.unref(i)}-${b}-help`:void 0,checked:n.modelValue.includes(u.value),disabled:u.disabled===!0?!0:void 0,class:"focus:ring-blue-500 h-4 w-4 text-blue-500 border-gray-600 rounded disabled:opacity-50 disabled:cursor-not-allowed",type:"checkbox"},J({onChange:m=>{s(m.target.checked,u.value)}},c.$attrs)),null,16,_c)]),t.createElementVNode("div",Bc,[t.createVNode(me,{class:"mt-auto",disabled:c.$attrs.hasOwnProperty("disabled")&&c.$attrs.disabled!==!1||u.disabled===!0,id:`${t.unref(i)}-${b}-label`,for:`${t.unref(i)}-${b}`,label:u.label},null,8,["disabled","id","for","label"]),t.createVNode(fe,{class:"-mt-1",id:`${t.unref(i)}-${b}-help`,text:u.help},null,8,["id","text"])])]))),128))],2)])],8,Dc))}}),Mc=["aria-labelledby","aria-describedby"],Tc={key:0,class:"space-y-0.5"},Oc={key:0},Pc={class:"flex"},Ac={class:"flex items-center h-5"},Ic=["aria-describedby","aria-labelledby","checked","disabled","id","name","value"],Lc={class:"ml-3"},Ea=t.defineComponent({props:{options:null,help:{default:""},legend:{default:""},modelValue:{default:void 0},columns:{default:void 0}},emits:["update:modelValue"],setup(n,{emit:r}){const e=n,o=t.useAttrs(),a=t.useSlots(),i=o.id||ke.CreateIdAttribute(),l=t.computed(()=>e.legend!==""||a.legend!==void 0);return(s,c)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"space-y-5","aria-labelledby":t.unref(l)?`${t.unref(i)}-legend`:void 0,"aria-describedby":n.help?`${t.unref(i)}-help`:void 0},[t.unref(l)||n.help?(t.openBlock(),t.createElementBlock("div",Tc,[t.createVNode(ut,{id:`${t.unref(i)}-legend`},{default:t.withCtx(()=>[n.legend?(t.openBlock(),t.createElementBlock("div",Oc,t.toDisplayString(n.legend),1)):t.createCommentVNode("",!0),s.$slots.legend?t.renderSlot(s.$slots,"legend",{key:1}):t.createCommentVNode("",!0)]),_:3},8,["id"]),t.createVNode(fe,{tag:"p",text:n.help,id:`${t.unref(i)}-help`},null,8,["text","id"])])):t.createCommentVNode("",!0),t.createElementVNode("div",Pc,[t.createElementVNode("div",{class:t.normalizeClass(["grid gap-4",{"sm:grid sm:gap-y-4 sm:gap-x-5 sm:space-y-0":n.columns!==void 0,"sm:grid-cols-2":n.columns===2,"sm:grid-cols-3":n.columns===3,"sm:grid-cols-4":n.columns===4}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.options,(p,u)=>(t.openBlock(),t.createElementBlock("div",{key:p.value,class:"flex items-start"},[t.createElementVNode("div",Ac,[t.createElementVNode("input",t.mergeProps({"aria-describedby":(p==null?void 0:p.help)&&p.help?`${t.unref(i)}-${u}-help`:void 0,"aria-labelledby":`${t.unref(i)}-${u}-label`,checked:n.modelValue===p.value,class:"w-4 h-4 border-gray-600 focus:ring-blue-500 text-xy-blue disabled:opacity-50 disabled:cursor-not-allowed",disabled:p.disabled===!0?!0:void 0,id:`${t.unref(i)}-${u}`,name:t.unref(i),type:"radio",value:p.value},J({onChange:()=>{r("update:modelValue",p.value)}},s.$attrs)),null,16,Ic)]),t.createElementVNode("div",Lc,[t.createVNode(me,{class:"mt-auto",disabled:s.$attrs.hasOwnProperty("disabled")&&s.$attrs.disabled!==!1||p.disabled===!0,id:`${t.unref(i)}-${u}-label`,for:`${t.unref(i)}-${u}`,label:p.label},null,8,["disabled","id","for","label"]),t.createVNode(fe,{class:"-mt-1",id:`${t.unref(i)}-${u}-help`,text:p.help},null,8,["id","text"])])]))),128))],2)])],8,Mc))}}),Rc=["id"],Fc={class:"flex-1 flex pr-1"},jc={class:"flex flex-col"},Uc={key:1,class:"mt-auto mb-0"},Hc=["checked","name","required","value"],ka=t.defineComponent({props:{columns:{default:void 0},help:{default:""},legend:{default:""},modelValue:{default:void 0},options:null},emits:["update:modelValue"],setup(n,{emit:r}){const e=n,o=t.useAttrs(),a=ke.CreateIdAttribute(),i=t.ref(),l=t.ref(),s=t.computed(()=>e.modelValue===void 0?i.value:e.modelValue),c=u=>{i.value=u,l.value=!1,r("update:modelValue",u)},p=t.computed(()=>typeof o.name=="string"&&o.name!==""?o.name:a);return(u,b)=>(t.openBlock(),t.createBlock(t.unref(Pi),{modelValue:t.unref(s),"onUpdate:modelValue":c,disabled:typeof t.unref(o).disabled=="boolean"?t.unref(o).disabled:!1,"aria-invalid":l.value===!0?"true":null,"aria-errormessage":l.value===!0?`error-${t.unref(a)}`:null},{default:t.withCtx(()=>[n.legend?(t.openBlock(),t.createBlock(t.unref(Kr),{key:0,class:"block"},{default:t.withCtx(()=>[t.createVNode(ut,{tag:"div"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(n.legend),1)]),_:1})]),_:1})):t.createCommentVNode("",!0),n.help?(t.openBlock(),t.createBlock(t.unref(xn),{key:1},{default:t.withCtx(()=>[t.createVNode(fe,{text:n.help},null,8,["text"])]),_:1})):t.createCommentVNode("",!0),l.value===!0?(t.openBlock(),t.createElementBlock("div",{key:2,id:`error-${t.unref(a)}`,class:"sr-only"}," Please select one of these options. ",8,Rc)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["mt-4 grid grid-cols-1 gap-y-5 gap-x-4 relative",{"sm:grid-cols-2":n.columns===2,"sm:grid-cols-3":n.columns===3}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.options,m=>(t.openBlock(),t.createBlock(t.unref(Ai),{as:"template",disabled:(m==null?void 0:m.disabled)?m.disabled:!1,key:m.value,value:m.value},{default:t.withCtx(({active:g,checked:y,disabled:x})=>[t.createElementVNode("div",{class:t.normalizeClass([y?"border-transparent":"border-gray-300",g?"border-blue-500 ring-2 ring-blue-500":"","relative bg-white border rounded-lg shadow-sm p-4 flex cursor-pointer focus:outline-none",x?"opacity-75":""])},[t.createElementVNode("div",Fc,[t.createElementVNode("div",jc,[t.createVNode(t.unref(Kr),{as:"div"},{default:t.withCtx(()=>[t.createVNode(me,{tag:"div",class:"mt-auto mb-auto",label:m.label},null,8,["label"])]),_:2},1024),m.help?(t.openBlock(),t.createBlock(t.unref(xn),{key:0,as:"div"},{default:t.withCtx(()=>[t.createVNode(fe,{tag:"div",class:"mt-auto",text:m.help},null,8,["text"])]),_:2},1024)):t.createCommentVNode("",!0),m.sublabel||u.$slots.sublabel?(t.openBlock(),t.createElementBlock("div",Uc,[t.createVNode(t.unref(xn),{as:"div",class:"font-semibold leading-snug mt-4 text-gray-900 text-sm"},{default:t.withCtx(()=>[t.renderSlot(u.$slots,"sublabel",{active:g,checked:y,disabled:x,option:m},()=>[t.createTextVNode(t.toDisplayString(m.sublabel),1)])]),_:2},1024)])):t.createCommentVNode("",!0)])]),t.createVNode(t.unref(Yi),{class:t.normalizeClass([y?"":"invisible","h-5 w-5 text-blue-600"]),"aria-hidden":"true"},null,8,["class"]),t.createElementVNode("div",{class:t.normalizeClass([g?"border":"border-2",y?"border-blue-500":"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:y,name:t.unref(p),required:t.unref(o).required!==void 0&&t.unref(o).required!==!1,tabindex:"-1",type:"radio",value:m.value,onInvalid:b[0]||(b[0]=C=>l.value=!0)},null,40,Hc)],2)]),_:2},1032,["disabled","value"]))),128))],2)]),_:3},8,["modelValue","disabled","aria-invalid","aria-errormessage"]))}}),Yc=["aria-labelledby","aria-describedby","id","value"],Da=t.defineComponent({props:{help:{default:""},label:{default:""},modelValue:{default:""}},emits:["update:modelValue"],setup(n,{emit:r}){const o=t.useAttrs().id||ke.CreateIdAttribute();return(a,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(me,{class:"block",id:`${t.unref(o)}-label`,for:t.unref(o),label:n.label},null,8,["id","for","label"]),t.createElementVNode("textarea",t.mergeProps({"aria-labelledby":n.label?`${t.unref(o)}-label`:void 0,"aria-describedby":n.help?`${t.unref(o)}-help`:void 0,class:["mt-1","sm:text-sm","block","shadow-sm","focus:ring-blue-500","focus:border-blue-500","border-gray-600","rounded-md","w-full","disabled:opacity-70","disabled:cursor-not-allowed"],id:t.unref(o),value:n.modelValue,onInput:i[0]||(i[0]=l=>r("update:modelValue",l.target.value))},a.$attrs),null,16,Yc),t.createVNode(fe,{id:`${t.unref(o)}-help`,text:n.help},null,8,["id","text"])],64))}}),zc=["aria-labelledby","aria-describedby"],Wc={key:0,class:"space-y-0.5"},qc=["for"],Kc=["id","name","checked"],Gc=["for"],Jc=["id","name","checked"],$a=t.defineComponent({props:{modelValue:{type:Boolean,default:void 0},help:{default:""},legend:{default:""},name:{default:""}},emits:["update:modelValue"],setup(n,{emit:r}){const e=n,a=t.useAttrs().id||ke.CreateIdAttribute(),i=t.computed(()=>typeof e.name=="string"&&e.name!==""),l=s=>{r("update:modelValue",s.target.value==="true")};return(s,c)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"space-y-3","aria-labelledby":n.legend?`${t.unref(a)}-legend`:void 0,"aria-describedby":n.help?`${t.unref(a)}-help`:void 0},[n.legend||n.help?(t.openBlock(),t.createElementBlock("div",Wc,[t.createVNode(me,{class:"block my-auto",label:n.legend,tag:"legend"},null,8,["label"]),t.createVNode(fe,{tag:"p",text:n.help,id:`${t.unref(a)}-help`},null,8,["text","id"])])):t.createCommentVNode("",!0),t.createElementVNode("div",null,[t.createElementVNode("label",{class:t.normalizeClass(["inline-flex items-center",{"cursor-not-allowed":s.$attrs.disabled}]),for:`${t.unref(i)?n.name:t.unref(a)}-true`},[t.createElementVNode("input",t.mergeProps({type:"radio",class:"w-4 h-4 border-gray-600 focus:ring-blue-500 text-xy-blue disabled:opacity-50 disabled:cursor-not-allowed",id:`${t.unref(i)?n.name:t.unref(a)}-true`,name:t.unref(i)?n.name:t.unref(a),value:!0,checked:n.modelValue===!0},Re(J({},s.$attrs),{onChange:l})),null,16,Kc),t.createVNode(me,{class:"ml-2",disabled:s.$attrs.hasOwnProperty("disabled")&&s.$attrs.disabled!==!1,label:"Yes",tag:"span"},null,8,["disabled"])],10,qc),t.createElementVNode("label",{class:t.normalizeClass(["inline-flex items-center ml-6",{"cursor-not-allowed":s.$attrs.disabled}]),for:`${t.unref(i)?n.name:t.unref(a)}-false`},[t.createElementVNode("input",t.mergeProps({type:"radio",class:"w-4 h-4 border-gray-600 focus:ring-blue-500 text-xy-blue disabled:opacity-50 disabled:cursor-not-allowed",id:`${t.unref(i)?n.name:t.unref(a)}-false`,name:t.unref(i)?n.name:t.unref(a),value:!1,checked:n.modelValue===!1},Re(J({},s.$attrs),{onChange:l})),null,16,Jc),t.createVNode(me,{class:"ml-2",disabled:s.$attrs.hasOwnProperty("disabled")&&s.$attrs.disabled!==!1,label:"No",tag:"span"},null,8,["disabled"])],10,Gc)])],8,zc))}});var Xc=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",ActionsDropdown:Zr,Cards:ea,ContentModal:ta,DateFilter:Mn,DetailList:la,DownloadCell:sa,Flash:Rt,Modal:ca,SidebarLayout:ua,Slideover:pa,StackedLayout:ha,Popover:ct,PopoverContent:fa,PopoverPosition:ct,Paginator:Lt,Spinner:jt,StaticTable:ga,Steps:ba,Table:ya,Tabs:wa,Toggle:xa,Tooltip:ma,BaseInput:_n,Checkbox:Ca,DateRangePicker:It,InputHelp:fe,InputLabel:me,FieldsetLegend:ut,MultiCheckboxes:va,Radio:Ea,RadioCards:ka,Select:Bn,TextArea:Da,YesOrNoRadio:$a,XYSpinner:Pn});const Qc=function(r){Object.entries(Xc).forEach(([e,o])=>{r.component(e,o)})};D.ActionsDropdown=Zr,D.BaseAPI=Et,D.BaseInput=_n,D.Cards=ea,D.Checkbox=Ca,D.ContentModal=ta,D.DateFilter=Mn,D.DateRangePicker=It,D.DetailList=la,D.DownloadCell=sa,D.FieldsetLegend=ut,D.Flash=Rt,D.InputHelp=fe,D.InputLabel=me,D.Modal=ca,D.MultiCheckboxes=va,D.Paginator=Lt,D.Popover=ct,D.PopoverContent=fa,D.PopoverPosition=ct,D.Radio=Ea,D.RadioCards=ka,D.Select=Bn,D.SidebarLayout=ua,D.Slideover=pa,D.Spinner=jt,D.StackedLayout=ha,D.StaticTable=ga,D.Steps=ba,D.Table=ya,D.Tabs=wa,D.TextArea=Da,D.Toggle=xa,D.Tooltip=ma,D.XYSpinner=Pn,D.YesOrNoRadio=$a,D.default=Qc,D.useAppFlasher=On,D.useAppFlashes=Ie,D.useAppSpinner=Gt,D.useBaseAPI=dt,D.useBaseAPIDelete=xl,D.useBaseAPIGet=wl,D.useBaseAPIPost=Cl,D.useBaseAPIPut=vl,D.useFlashes=ia,D.useSpinnerDisplay=ie,Object.defineProperty(D,"__esModule",{value:!0}),D[Symbol.toStringTag]="Module"});
|