@xy-planning-network/trees 0.6.3 → 0.6.5-rc-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 CHANGED
@@ -8645,7 +8645,8 @@ function throttle(func, timeout = 100) {
8645
8645
  const _sfc_main$g = /* @__PURE__ */ defineComponent({
8646
8646
  props: {
8647
8647
  as: { default: "div" },
8648
- position: { default: "auto" }
8648
+ position: { default: "auto" },
8649
+ static: { type: Boolean, default: false }
8649
8650
  },
8650
8651
  setup(__props) {
8651
8652
  const props = __props;
@@ -8807,7 +8808,8 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
8807
8808
  ref_key: "wrapper",
8808
8809
  ref: wrapper,
8809
8810
  class: normalizeClass(["absolute z-10", unref(classes).wrapper]),
8810
- style: normalizeStyle(__props.position === "auto" ? unref(autoPosition).wrapper : {})
8811
+ style: normalizeStyle(__props.position === "auto" ? unref(autoPosition).wrapper : {}),
8812
+ static: __props.static
8811
8813
  }, {
8812
8814
  default: withCtx(() => [
8813
8815
  createElementVNode("div", {
@@ -8821,7 +8823,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
8821
8823
  ], 6)
8822
8824
  ]),
8823
8825
  _: 2
8824
- }, 1032, ["class", "style"])
8826
+ }, 1032, ["class", "style", "static"])
8825
8827
  ]),
8826
8828
  _: 2
8827
8829
  }, 1024)
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 lu(){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,H("onYearChange"),Ee()),we(),H("onMonthChange"),Yt())}function su(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&&H("onChange")}function du(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),H("onClose")}function cu(){e.config!==void 0&&H("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 Qe(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=se(d),h=Qe(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&&!Qe(d.relatedTarget):!w&&!h&&!Qe(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 Ft(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(),H("onYearChange"),Ee())}function Ae(d,f=!0){var h;const w=e.parseDate(d,void 0,f);if(e.config.minDate&&w&&de(w,e.config.minDate,f!==void 0?f:!e.minDateHasTime)<0||e.config.maxDate&&w&&de(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,N;V<v.length;V++){if(N=v[V],typeof N=="function"&&N(w))return k;if(N instanceof Date&&w!==void 0&&N.getTime()===w.getTime())return k;if(typeof N=="string"){const M=e.parseDate(N,void 0,!0);return M&&M.getTime()===w.getTime()?k:!k}else if(typeof N=="object"&&w!==void 0&&N.from&&N.to&&w.getTime()>=N.from.getTime()&&w.getTime()<=N.to.getTime())return k}return!k}function jt(d){return e.daysContainer!==void 0?d.className.indexOf("hidden")===-1&&d.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(d):!1}function uu(d){d.target===e._input&&(e.selectedDates.length>0||e._input.value.length>0)&&!(d.relatedTarget&&Qe(d.relatedTarget))&&e.setDate(e._input.value,!0,d.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function fu(d){const f=se(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(Qe(f)||k||v){const V=!!e.timeContainer&&e.timeContainer.contains(f);switch(d.keyCode){case 13:V?(d.preventDefault(),s(),Fn()):Ra(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&&jt(document.activeElement))){const M=d.keyCode===39?1:-1;d.ctrlKey?(d.stopPropagation(),In(M),j(ye(1),0)):j(void 0,M)}}else e.hourElement&&e.hourElement.focus();break;case 38:case 40:d.preventDefault();const N=d.keyCode===40?1:-1;e.daysContainer&&f.$i!==void 0||f===e.input||f===e.altInput?d.ctrlKey?(d.stopPropagation(),Ft(e.currentYear-N),j(ye(1),0)):V||j(void 0,N*7):f===e.currentYearElement?Ft(e.currentYear-N):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(),Be();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],u(),Be();break}(h||Qe(f))&&H("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,N=0;for(let M=w;M<k;M+=dl.DAY)Ae(new Date(M),!0)||(v=v||M>w&&M<k,M<h&&(!V||M>V)?V=M:M>h&&(!N||M<N)&&(N=M));for(let M=0;M<e.config.showMonths;M++){const T=e.daysContainer.children[M];for(let L=0,pe=T.children.length;L<pe;L++){const Q=T.children[L],ke=Q.dateObj.getTime(),ct=V>0&&ke<V||N>0&&ke>N;if(ct){Q.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(ut=>{Q.classList.remove(ut)});continue}else if(v&&!ct)continue;["startRange","inRange","endRange","notAllowed"].forEach(ut=>{Q.classList.remove(ut)}),d!==void 0&&(d.classList.add(f<=e.selectedDates[0].getTime()?"startRange":"endRange"),h<f&&ke===h?Q.classList.add("startRange"):h>f&&ke===h&&Q.classList.add("endRange"),ke>=V&&(N===0||ke<=N)&&sl(ke,h,f)&&Q.classList.add("inRange"))}}}function pu(){e.isOpen&&!e.config.static&&!e.config.inline&&Ht()}function mu(d,f=e._positionElement){if(e.isMobile===!0){if(d){d.preventDefault();const w=se(d);w&&w.blur()}e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),H("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"),H("onOpen"),Ht(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 Pa(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=>Ae(k)),!e.selectedDates.length&&d==="min"&&b(h),Be()),e.daysContainer&&(La(),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 hu(){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=ja(v)}}),Object.defineProperty(e.config,"disable",{get:()=>e.config._disable,set:v=>{e.config._disable=ja(v)}});const w=f.mode==="time";if(!f.dateFormat&&(f.enableTime||w)){const v=Y.defaultConfig.dateFormat||Ge.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||Ge.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:Pa("min")}),Object.defineProperty(e.config,"maxDate",{get:()=>e.config._maxDate,set:Pa("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 N in V)kn.indexOf(N)>-1?e.config[N]=Dn(V[N]).map(i).concat(e.config[N]):typeof f[N]=="undefined"&&(e.config[N]=V[N])}f.altInputClass||(e.config.altInputClass=Aa().className+" "+e.config.altInputClass),H("onParseConfig")}function Aa(){return e.config.wrap?n.querySelector("[data-input]"):n}function Ia(){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=ca(e),e.parseDate=Sn({config:e.config,l10n:e.l10n})}function Ht(d){if(typeof e.config.position=="function")return void e.config.position(e,d);if(e.calendarContainer===void 0)return;H("onPreCalendarPosition");const f=d||e._positionElement,h=Array.prototype.reduce.call(e.calendarContainer.children,(ft,Un)=>ft+Un.offsetHeight,0),w=e.calendarContainer.offsetWidth,k=e.config.position.split(" "),v=k[0],V=k.length>1?k[1]:null,N=f.getBoundingClientRect(),M=window.innerHeight-N.bottom,T=v==="above"||v!=="below"&&M<h&&N.top>h,L=window.pageYOffset+N.top+(T?-h-2:f.offsetHeight+2);if(ee(e.calendarContainer,"arrowTop",!T),ee(e.calendarContainer,"arrowBottom",T),e.config.inline)return;let pe=window.pageXOffset+N.left,Q=!1,zt=!1;V==="center"?(pe-=(w-N.width)/2,Q=!0):V==="right"&&(pe-=w-N.width,zt=!0),ee(e.calendarContainer,"arrowLeft",!Q&&!zt),ee(e.calendarContainer,"arrowCenter",Q),ee(e.calendarContainer,"arrowRight",zt);const ke=window.document.body.offsetWidth-(window.pageXOffset+N.right),ct=pe+w>window.document.body.offsetWidth,ut=ke+w>window.document.body.offsetWidth;if(ee(e.calendarContainer,"rightMost",ct),!e.config.static)if(e.calendarContainer.style.top=`${L}px`,!ct)e.calendarContainer.style.left=`${pe}px`,e.calendarContainer.style.right="auto";else if(!ut)e.calendarContainer.style.left="auto",e.calendarContainer.style.right=`${ke}px`;else{const ft=gu();if(ft===void 0)return;const Un=window.document.body.offsetWidth,Nu=Math.max(0,Un/2-w/2),Su=".flatpickr-calendar.centerMost:before",Vu=".flatpickr-calendar.centerMost:after",_u=ft.cssRules.length,Bu=`{left:${N.left}px;right:auto;}`;ee(e.calendarContainer,"rightMost",!1),ee(e.calendarContainer,"centerMost",!0),ft.insertRule(`${Su},${Vu}${Bu}`,_u),e.calendarContainer.style.left=`${Nu}px`,e.calendarContainer.style.right="auto"}}function gu(){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:bu()}function bu(){const d=document.createElement("style");return document.head.appendChild(d),d.sheet}function La(){e.config.noCalendar||e.isMobile||(Ee(),Yt(),we())}function Fn(){e._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(e.close,0):e.close()}function Ra(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=da(se(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=Hn(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),de(k,e.selectedDates[0],!0)!==0&&e.selectedDates.sort((V,N)=>V.getTime()-N.getTime()));if(u(),v){const V=e.currentYear!==k.getFullYear();e.currentYear=k.getFullYear(),e.currentMonth=k.getMonth(),V&&(H("onYearChange"),Ee()),H("onMonthChange")}if(Yt(),we(),Be(),!v&&e.config.mode!=="range"&&e.config.showMonths===1?_e(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,N=e.config.mode==="range"&&e.selectedDates.length===2&&!e.config.enableTime;(V||N)&&Fn()}x()}const Ut={locale:[Ia,Oa],showMonths:[Ma,l,Ta],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 yu(d,f){if(d!==null&&typeof d=="object"){Object.assign(e.config,d);for(const h in d)Ut[h]!==void 0&&Ut[h].forEach(w=>w())}else e.config[d]=f,Ut[d]!==void 0?Ut[d].forEach(h=>h()):kn.indexOf(d)>-1&&(e.config[d]=Dn(f));e.redraw(),Be(!0)}function Fa(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&&Ae(w,!1)),e.config.mode==="range"&&e.selectedDates.sort((w,k)=>w.getTime()-k.getTime())}function wu(d,f=!1,h=e.config.dateFormat){if(d!==0&&!d||d instanceof Array&&d.length===0)return e.clear(f);Fa(d,h),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),E(void 0,f),b(),e.selectedDates.length===0&&e.clear(!1),Be(f),f&&H("onChange")}function ja(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 xu(){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&&Fa(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 Cu(){if(e.input=Aa(),!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 vu(){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(se(f).value,!1,e.mobileFormatStr),H("onChange"),H("onClose")})}function Eu(d){if(e.isOpen===!0)return e.close();e.open(d)}function H(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 Hn(d){for(let f=0;f<e.selectedDates.length;f++)if(de(e.selectedDates[f],d)===0)return""+f;return!1}function ku(d){return e.config.mode!=="range"||e.selectedDates.length<2?!1:de(d,e.selectedDates[0])>=0&&de(d,e.selectedDates[1])<=0}function Yt(){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=Ot(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 Ha(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 Be(d=!0){e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=Ha(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=Ha(e.config.altFormat)),d!==!1&&H("onValueUpdate")}function Du(d){const f=se(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 $u(d){d.preventDefault();const f=d.type==="keydown",h=se(d),w=h;e.amPM!==void 0&&h===e.amPM&&(e.amPM.textContent=e.l10n.amPM[ue(e.amPM.textContent===e.l10n.amPM[0])]);const k=parseFloat(w.getAttribute("min")),v=parseFloat(w.getAttribute("max")),V=parseFloat(w.getAttribute("step")),N=parseInt(w.value,10),M=d.delta||(f?d.which===38?1:-1:0);let T=N+V*M;if(typeof w.value!="undefined"&&w.value.length===2){const L=w===e.hourElement,pe=w===e.minuteElement;T<k?(T=v+T+ue(!L)+(ue(L)&&ue(!e.amPM)),pe&&_(void 0,-1,e.hourElement)):T>v&&(T=w===e.hourElement?T-v-ue(!e.amPM):k,pe&&_(void 0,1,e.hourElement)),e.amPM&&L&&(V===1?T+N===23:Math.abs(T-N)>V)&&(e.amPM.textContent=e.l10n.amPM[ue(e.amPM.textContent===e.l10n.amPM[0])]),w.value=ae(T)}}return a(),e}function Je(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=ul(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 Je(this,n)},HTMLElement.prototype.flatpickr=function(n){return Je([this],n)});var Y=function(n,r){return typeof n=="string"?Je(window.document.querySelectorAll(n),r):n instanceof Node?Je([n],r):Je(n,r)};Y.defaultConfig={},Y.l10ns={en:Object.assign({},ot),default:Object.assign({},ot)},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=ca({}),Y.compareDates=de,typeof jQuery!="undefined"&&typeof jQuery.fn!="undefined"&&(jQuery.fn.flatpickr=function(n){return Je(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 fe=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}},{...r.$attrs}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(n.label),1)]),_:1},16,["class"])):t.createCommentVNode("",!0)}}),ce=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},{...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)}}),fl=["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||ve.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(fe,{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,fl),t.createVNode(ce,{id:`${t.unref(a)}-help`,text:n.help},null,8,["id","text"])],64))}}),Pt=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||ve.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"]))}}),pl=["aria-labelledby","aria-describedby","id","value"],ml={key:0,value:"",disabled:"",selected:""},hl=["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||ve.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(fe,{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},{...l.$attrs,onChange:c=>{r("update:modelValue",c.target.value)}}),[n.placeholder?(t.openBlock(),t.createElementBlock("option",ml,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,hl))),128))],16,pl),t.createVNode(ce,{id:`${t.unref(a)}-help`,text:n.help},null,8,["id","text"])],64))}}),gl={class:"md:flex md:items-center md:justify-between bg-white mx-auto py-4 border-t border-gray-100"},bl={class:"flex-1 min-w-0"},yl={class:"text-lg leading-6 font-semibold text-gray-900"},wl={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",gl,[t.createElementVNode("div",bl,[t.createElementVNode("h1",yl,t.toDisplayString(n.title),1)]),t.createElementVNode("div",wl,[t.createVNode(Bn,{modelValue:a.value,"onUpdate:modelValue":[p[0]||(p[0]=u=>a.value=u),l],options:i},null,8,["modelValue"]),t.createVNode(Pt,{modelValue:o.value,"onUpdate:modelValue":[p[1]||(p[1]=u=>o.value=u),s],class:"ml-3"},null,8,["modelValue"])])]))}});function lt(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:["PATCH","patch","POST","post","PUT","put"].includes(r)?g:{},method:r,params:["GET","get"].includes(r)?g:{},signal:u.signal,url:n};return Ue(C,{...e,...y}).then(E=>(o.value=E,a.value=void 0,c.value=!1,E),E=>{throw a.value=E,kr(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 xl(n,r={}){return lt(n,"GET",r)}function Cl(n,r={}){return lt(n,"DELETE",r)}function vl(n,r={}){return lt(n,"POST",r)}function El(n,r={}){return lt(n,"PUT",r)}function ua(n={}){const r=t.ref(new Map);let e={removeDelay:1e4,email:""};const o=m=>{e={...e,...m}},a=m=>{r.value.delete(m)},i=m=>{const g=ve.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 kl=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 Pe(){return Tn===void 0&&(Tn=ua()),Tn}const On={error(n,r){Pe().flasher.error(n,r)},info(n,r){Pe().flasher.info(n,r)},success(n,r){Pe().flasher.success(n,r)},warning(n,r){Pe().flasher.warning(n,r)},genericError(n,r){Pe().flasher.genericError(n,r)}},Dl={class:"px-4 flex items-center justify-between sm:px-0"},$l={class:"w-0 flex-1 flex"},Nl=[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 ")],Sl={class:"hidden md:flex"},Vl=["textContent","onClick"],_l={class:"w-0 flex-1 flex justify-end"},Bl=[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)],At=t.defineComponent({props:{modelValue:null},emits:["update:modelValue"],setup(n,{emit:r}){const e=n,o=i=>{r("update:modelValue",{...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",Dl,[t.createElementVNode("div",$l,[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"]))},Nl,2)]),t.createElementVNode("div",Sl,[(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,Vl))),128))]),t.createElementVNode("div",_l,[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"]))},Bl,2)])]))}}),Ml={key:0,class:"shadow overflow-hidden sm:rounded-md border"},fa=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};cn.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",Ml,[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(At,{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)]))}}),Tl=["href"],pa=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,Tl))}});var Lu="";const Ol={class:"fixed inset-0 flex flex-col items-end justify-end px-4 py-6 pointer-events-none sm:p-6 z-[45]"},Pl={class:"rounded-lg ring-1 ring-black ring-opacity-5 overflow-hidden"},Al={class:"p-4"},Il={class:"flex items-center"},Ll={class:"w-0 flex-1 flex justify-between"},Rl=["innerHTML"],Fl={class:"ml-4 shrink-0 flex"},jl=["onClick"],Hl=[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)],It=t.defineComponent({setup(n){const{flasher:r,flashes:e}=Pe(),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(()=>{kl(r)}),(a,i)=>(t.openBlock(),t.createBlock(t.unref(un),null,{default:t.withCtx(()=>[t.createElementVNode("div",Ol,[t.createVNode(t.TransitionGroup,{tag:"div",class:"max-w-sm space-y-2 w-full","enter-active-class":"ease-out duration-300","enter-from-class":"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2","enter-to-class":"translate-y-0 opacity-100 sm:translate-x-0","leave-active-class":"ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(e),([l,s])=>(t.openBlock(),t.createElementBlock("div",{key:s.message,class:t.normalizeClass(["bg-white shadow-lg rounded-lg pointer-events-auto border-t-4 transform z-10",[o(s.type)]])},[t.createElementVNode("div",Pl,[t.createElementVNode("div",Al,[t.createElementVNode("div",Il,[t.createElementVNode("div",Ll,[t.createElementVNode("p",{class:"w-0 flex-1 text-sm leading-5 font-medium text-gray-900",innerHTML:s.message},null,8,Rl)]),t.createElementVNode("div",Fl,[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"},Hl,8,jl)])])])])],2))),128))]),_:1})])]),_: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 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 18h7"})])}function zl(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 ma(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 Lt(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 Wl={class:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"},Kl=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"},Gl={class:"block absolute top-0 right-0 pt-4 pr-4"},Jl=t.createElementVNode("span",{class:"sr-only"},"Close",-1),Xl={class:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Ql={class:"mt-3 sm:mt-0 sm:text-left"},Zl={class:"mt-2"},es={key:0,class:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},ts=["textContent","disabled"],ha=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(at),{as:"template",show:n.modelValue},{default:t.withCtx(()=>[t.createVNode(t.unref(Nt),{as:"div",static:"",class:"fixed z-30 inset-0 overflow-y-auto",onClose:i[3]||(i[3]=l=>o(!1)),open:n.modelValue},{default:t.withCtx(()=>[t.createElementVNode("div",Wl,[t.createVNode(t.unref($e),{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(St),{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})]),_:1}),Kl,t.createVNode(t.unref($e),{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",Gl,[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))},[Jl,t.createVNode(t.unref(Lt),{class:"h-6 w-6","aria-hidden":"true"})])]),t.createElementVNode("div",Xl,[t.createElementVNode("div",Ql,[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",Zl,[t.renderSlot(a.$slots,"default")])])]),n.submitText?(t.openBlock(),t.createElementBlock("div",es,[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,ts),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"]))}}),ns={class:"aspect-square overflow-hidden"},rs={class:"flex justify-center relative"},as={class:"sr-only"},os=t.createElementVNode("div",{class:"animate-spin-gear drop-shadow-md"},[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),is=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&&a.class?(i=t.unref(r))==null?void 0:i.class:"h-20 w-20")},[t.createElementVNode("div",ns,[t.createElementVNode("div",rs,[t.createElementVNode("p",as,[t.renderSlot(e.$slots,"default")]),os,is])])],2)}}}),ls={key:0,class:"fixed top-0 left-0 flex flex-col items-center justify-center w-full h-full cursor-not-allowed z-40 bg-gray-50 bg-opacity-50"},ss={class:"mt-2"},Rt=t.defineComponent({setup(n){const{idx:r,loading:e,maxIdx:o,messages:a,msg:i,showMsg:l}=Cr(),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.openBlock(),t.createBlock(t.unref(un),null,{default:t.withCtx(()=>[t.unref(e)?(t.openBlock(),t.createElementBlock("div",ls,[t.createVNode(Pn,{class:"w-32 h-32"}),t.withDirectives(t.createElementVNode("div",ss,[t.createVNode(t.Transition,{appear:"","enter-active-class":"ease-out duration-1000","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"ease-in duration-500","leave-from-class":"opacity-100","leave-to-class":"opacity-0",onAfterEnter:c,onAfterLeave:s},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",{class:"container font-medium text-lg leading-snug text-center transition-opacity"},t.toDisplayString(t.unref(i)),513),[[t.vShow,t.unref(l)]])]),_:1})],512),[[t.vShow,t.unref(a)]])])):t.createCommentVNode("",!0)]),_:1}))}}),ds={class:"h-screen flex overflow-hidden bg-gray-100"},cs={class:"relative flex-1 flex flex-col max-w-xs w-full pt-5 pb-4 bg-white"},us={class:"absolute top-0 right-0 -mr-12 pt-2"},fs=t.createElementVNode("span",{class:"sr-only"},"Close sidebar",-1),ps={class:"shrink-0 flex justify-center px-4"},ms=["src"],hs={class:"mt-5 flex flex-col flex-1 h-0 overflow-y-auto"},gs={class:"flex-1 px-2 space-y-1"},bs=["href","target"],ys={key:0,class:"mt-auto"},ws={class:"mt-6 px-2"},xs=t.createElementVNode("div",{class:"shrink-0 w-14","aria-hidden":"true"},null,-1),Cs={class:"hidden md:flex md:shrink-0"},vs={class:"flex flex-col w-64"},Es={class:"flex flex-col grow border-r border-gray-200 pt-5 pb-4 bg-white overflow-y-auto"},ks={class:"flex items-center shrink-0 px-4"},Ds=["src"],$s={class:"mt-5 grow flex flex-col"},Ns={class:"flex-1 px-2 bg-white space-y-1"},Ss=["href","target"],Vs={key:0,class:"mt-atuo"},_s={class:"mt-6 px-2"},Bs={class:"flex flex-col w-0 flex-1 overflow-hidden"},Ms={class:"relative z-10 shrink-0 flex h-16 bg-xy-blue shadow"},Ts=t.createElementVNode("span",{class:"sr-only"},"Open sidebar",-1),Os={class:"flex-1 px-4 flex justify-between"},Ps={class:"flex-1 flex"},As={class:"flex items-center text-2xl text-white"},Is={class:"ml-4 flex items-center md:ml-6"},Ls=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1),Rs=["href"],Fs={class:"flex-1 relative overflow-y-auto focus:outline-none"},js={class:"mx-auto"},ga=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",ds,[t.createVNode(t.unref(at),{as:"template",show:e.value},{default:t.withCtx(()=>[t.createVNode(t.unref(Nt),{as:"div",static:"",class:"fixed inset-0 flex z-10 md:hidden",onClose:i[1]||(i[1]=l=>e.value=!1),open:e.value},{default:t.withCtx(()=>[t.createVNode(t.unref($e),{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(St),{class:"fixed inset-0 bg-gray-600 bg-opacity-75"})]),_:1}),t.createVNode(t.unref($e),{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",cs,[t.createVNode(t.unref($e),{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",us,[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)},[fs,t.createVNode(t.unref(Lt),{class:"h-6 w-6 text-white","aria-hidden":"true"})])])]),_:1}),t.createElementVNode("div",ps,[t.createElementVNode("img",{class:"w-auto h-12",src:n.iconURL,alt:"Logo"},null,8,ms)]),t.createElementVNode("div",hs,[t.createElementVNode("nav",gs,[(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,bs))),128))]),a.$slots["sidebar-bottom"]?(t.openBlock(),t.createElementBlock("div",ys,[t.createElementVNode("div",ws,[t.renderSlot(a.$slots,"sidebar-bottom")])])):t.createCommentVNode("",!0)])])]),_:3}),xs]),_:3},8,["open"])]),_:3},8,["show"]),t.createElementVNode("div",Cs,[t.createElementVNode("div",vs,[t.createElementVNode("div",Es,[t.createElementVNode("div",ks,[t.createElementVNode("img",{class:"w-auto h-12",src:n.iconURL,alt:"Logo"},null,8,Ds)]),t.createElementVNode("div",$s,[t.createElementVNode("nav",Ns,[(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,Ss))),128))]),a.$slots["sidebar-bottom"]?(t.openBlock(),t.createElementBlock("div",Vs,[t.createElementVNode("div",_s,[t.renderSlot(a.$slots,"sidebar-bottom")])])):t.createCommentVNode("",!0)])])])]),t.createElementVNode("div",Bs,[t.createElementVNode("div",Ms,[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)},[Ts,t.createVNode(t.unref(Yl),{class:"h-6 w-6","aria-hidden":"true"})]),t.createElementVNode("div",Os,[t.createElementVNode("div",Ps,[t.createElementVNode("h1",As,[t.renderSlot(a.$slots,"header")])]),t.createElementVNode("div",Is,[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(()=>[Ls,t.createVNode(t.unref(Wi),{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,Rs)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})])])]),t.createElementVNode("main",Fs,[t.createElementVNode("div",js,[t.renderSlot(a.$slots,"default")])])])]),t.createVNode(It),t.createVNode(Rt)],64))}});function Hs(n,r=100){let e;return(...o)=>{e||(n.apply(o),e=!0,setTimeout(()=>e=!1,r))}}const st=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&&_.el)||!((G=o==null?void 0:o.value)!=null&&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 $=0;return E?(g.width>m.right?$=m.right-g.width+(g.width-m.right):$=m.right-g.width,p>g.width+b&&($=$+b)):(g.width>C?$=m.left-(g.width-C):$=m.left,p>g.width+b&&($=$-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(${$}px, 0)`}}});if(r.position==="auto"){const p=Hs(()=>{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(Kr),{class:"relative flex",as:n.as},{default:t.withCtx(({open:b,close:m})=>[t.createVNode(t.unref(Ti),{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(Oi),{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 Us=(n,r)=>{const e=n.__vccOpts||n;for(const[o,a]of r)e[o]=a;return e};const Ys={},zs={class:"w-full max-w-xs bg-white rounded-md p-2 border border-gray-100 shadow-md"};function Ws(n,r){return t.openBlock(),t.createElementBlock("div",zs,[t.renderSlot(n.$slots,"default")])}var ba=Us(Ys,[["render",Ws]]);const Ks={class:"absolute inset-0 overflow-hidden"},qs={class:"fixed inset-y-0 right-0 pl-10 max-w-full flex"},Gs={class:"w-screen max-w-md"},Js={class:"h-full flex flex-col bg-white shadow-xl overflow-y-scroll"},Xs={class:"py-6 px-4 bg-blue-700 sm:px-6"},Qs={class:"flex items-center justify-between"},Zs={class:"ml-3 h-7 flex items-center"},ed=t.createElementVNode("span",{class:"sr-only"},"Close panel",-1),td={class:"mt-1"},nd=["textContent"],rd={class:"relative flex-1 py-6 px-4 sm:px-6"},ya=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(at),{as:"template",show:n.modelValue},{default:t.withCtx(()=>[t.createVNode(t.unref(Nt),{as:"div",static:"",class:"fixed inset-0 z-20 overflow-hidden bg-black bg-opacity-50",onClose:l[1]||(l[1]=s=>a()),open:n.modelValue},{default:t.withCtx(()=>[t.createElementVNode("div",Ks,[t.createVNode(t.unref(St),{class:"absolute inset-0"}),t.createElementVNode("div",qs,[t.createVNode(t.unref($e),{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",Gs,[t.createElementVNode("div",Js,[t.createElementVNode("div",Xs,[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",Zs,[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())},[ed,t.createVNode(t.unref(Lt),{class:"h-6 w-6","aria-hidden":"true"})])])]),t.createElementVNode("div",td,[t.createElementVNode("p",{class:"text-blue-300",textContent:t.toDisplayString(n.description)},null,8,nd)])]),t.createElementVNode("div",rd,[t.renderSlot(i.$slots,"default")]),t.renderSlot(i.$slots,"footer")])])]),_:3})])])]),_:3},8,["open"])]),_:3},8,["show"]))}}),ad={class:"leading-none w-4 h-4"},od=t.createElementVNode("div",{class:"p-5 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"},null,-1),id={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"},wa=t.defineComponent({props:{as:{default:"span"},position:{default:"auto"}},setup(n){return(r,e)=>(t.openBlock(),t.createBlock(st,{position:n.position,as:n.as},{button:t.withCtx(()=>[t.createElementVNode("div",ad,[t.createVNode(t.unref(Ul)),od])]),default:t.withCtx(()=>[t.createElementVNode("div",id,[t.renderSlot(r.$slots,"default")])]),_:3},8,["position","as"]))}}),ld={class:"min-h-screen bg-gray-100"},sd={class:"mx-auto px-4 sm:px-6 lg:px-8"},dd={class:"flex justify-between h-16"},cd={class:"flex"},ud={class:"shrink-0 flex items-center"},fd=["src"],pd={class:"hidden sm:-my-px sm:ml-6 sm:flex sm:space-x-8"},md=["href","aria-current"],hd={class:"hidden sm:ml-6 sm:flex sm:items-center"},gd=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1),bd=["href"],yd={class:"-mr-2 flex items-center sm:hidden"},wd=t.createElementVNode("span",{class:"sr-only"},"Open main menu",-1),xd={class:"pt-2 pb-3 space-y-1"},Cd=["href","aria-current"],vd={class:"pt-4 pb-3 border-t border-gray-200"},Ed={class:"flex items-center px-4"},kd={class:"shrink-0"},Dd={class:"ml-3"},$d=["textContent"],Nd=["textContent"],Sd={class:"mt-3 space-y-1"},Vd=["href"],_d={class:"mx-auto sm:px-6 lg:px-8"},Bd={class:"px-4 py-8 sm:px-0"},xa=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",ld,[t.createVNode(t.unref(Di),{as:"nav",class:"bg-white shadow-sm"},{default:t.withCtx(({open:i})=>[t.createElementVNode("div",sd,[t.createElementVNode("div",dd,[t.createElementVNode("div",cd,[t.createElementVNode("div",ud,[t.createElementVNode("img",{class:"block h-8 w-auto",src:n.iconURL,alt:"XY Trees"},null,8,fd)]),t.createElementVNode("div",pd,[(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,md))),128))])]),t.createElementVNode("div",hd,[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(()=>[gd,t.createVNode(t.unref(ma),{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,bd)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})]),t.createElementVNode("div",yd,[t.createVNode(t.unref($i),{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(()=>[wd,i?(t.openBlock(),t.createBlock(t.unref(Lt),{key:1,class:"block h-6 w-6","aria-hidden":"true"})):(t.openBlock(),t.createBlock(t.unref(zl),{key:0,class:"block h-6 w-6","aria-hidden":"true"}))]),_:2},1024)])])]),t.createVNode(t.unref(Ni),{class:"sm:hidden"},{default:t.withCtx(()=>[t.createElementVNode("div",xd,[(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,Cd))),128))]),t.createElementVNode("div",vd,[t.createElementVNode("div",Ed,[t.createElementVNode("div",kd,[t.createVNode(t.unref(ma),{class:"text-gray-500 h-10 w-10 rounded-full"})]),t.createElementVNode("div",Dd,[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,$d)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"text-sm font-medium text-gray-500",textContent:t.toDisplayString(n.currentUser.email)},null,8,Nd)])]),t.createElementVNode("div",Sd,[(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,Vd))),128))])])]),_:1})]),_:1}),t.renderSlot(o.$slots,"header"),t.createElementVNode("main",null,[t.createElementVNode("div",_d,[t.createElementVNode("div",Bd,[t.renderSlot(o.$slots,"default")])])])]),t.createVNode(It),t.createVNode(Rt)],64))}}),Md={class:"flex flex-col"},Td={class:"-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"},Od={class:"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8"},Pd={class:"overflow-hidden border-b border-gray-200 shadow sm:rounded-lg"},Ad={class:"min-w-full divide-y divide-gray-200"},Id=["textContent"],Ld={class:"bg-white divide-y divide-gray-200"},Rd=["textContent"],Fd={key:0},jd=["colspan"],Ca=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",Md,[t.createElementVNode("div",Td,[t.createElementVNode("div",Od,[t.createElementVNode("div",Pd,[t.createElementVNode("table",Ad,[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,Id))),128))])]),t.createElementVNode("tbody",Ld,[(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,Rd))]))),128))]))),128)),n.tableData.items.length==0?(t.openBlock(),t.createElementBlock("tr",Fd,[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,jd)])):t.createCommentVNode("",!0)])])])])])]))}}),Hd={class:"flex items-center justify-center space-x-8"},Ud={class:"font-medium"},Yd={class:"flex items-center space-x-5"},zd={key:0,class:"block w-2.5 h-2.5 bg-xy-green rounded-full hover:bg-green-900 focus:bg-green-900"},Wd={key:1,class:"relative flex items-center justify-center"},Kd=[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)],qd={key:2,href:"#",class:"block w-2.5 h-2.5 bg-gray-200 rounded-full hover:bg-gray-400 focus:bg-gray-400"},Gd={key:0,class:"flex shrink-0"},Jd={key:0,class:"inline-flex rounded-md shadow-sm"},Xd=["textContent"],Qd={class:"ml-3 inline-flex rounded-md shadow-sm"},Zd=["textContent"],va=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",Hd,[t.createElementVNode("p",Ud,"Step "+t.toDisplayString(n.step)+" of "+t.toDisplayString(n.total),1),t.createElementVNode("ul",Yd,[(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",zd)):n.step===l?(t.openBlock(),t.createElementBlock("div",Wd,Kd)):(t.openBlock(),t.createElementBlock("span",qd))]))),128))])]),n.hideActions?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Gd,[n.hidePrevious?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",Jd,[t.createElementVNode("button",{type:"button",class:"xy-btn-white",onClick:o,textContent:t.toDisplayString(n.previousText)},null,8,Xd)])),t.createElementVNode("span",Qd,[t.createElementVNode("button",{type:"button",class:"xy-btn",onClick:e,textContent:t.toDisplayString(n.nextText)},null,8,Zd)])]))]))}}),ec={class:"flex flex-col mb-4 space-y-4 lg:space-y-0 lg:flex-row lg:justify-between"},tc={key:0,class:"w-full max-w-lg lg:max-w-xs"},nc=t.createElementVNode("label",{for:"search",class:"sr-only"},"Search",-1),rc={class:"relative"},ac=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),oc={key:1,class:"w-full max-w-lg lg:max-w-xs"},ic={class:"relative z-0 min-w-full align-middle border-b border-gray-200 shadow sm:rounded-lg overflow-x-auto"},lc={class:"min-w-full"},sc={key:0},dc=["onClick"],cc={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",class:"h-5 inline"},uc=[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)],fc={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},pc=[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)],mc={key:2,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},hc=[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)],gc={class:"bg-white"},bc=["onClick"],yc=["textContent"],wc={key:0},xc=["colspan"],Ea=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};cn.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",ec,[n.tableData.search?(t.openBlock(),t.createElementBlock("div",tc,[nc,t.createElementVNode("div",rc,[ac,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",oc,[t.createVNode(Pt,{modelValue:a.value,"onUpdate:modelValue":[x[2]||(x[2]=C=>a.value=C),p]},null,8,["modelValue"])])):t.createCommentVNode("",!0)]),t.createElementVNode("div",ic,[t.createElementVNode("table",lc,[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",sc,t.toDisplayString(C.display),1)):t.createCommentVNode("",!0),C.sort?(t.openBlock(),t.createElementBlock("span",{key:1,class:"cursor-pointer",onClick:t.withModifiers($=>u(C.sort),["prevent"])},[e.value!==C.sort?(t.openBlock(),t.createElementBlock("svg",cc,uc)):o.value=="desc"?(t.openBlock(),t.createElementBlock("svg",fc,pc)):(t.openBlock(),t.createElementBlock("svg",mc,hc))],8,dc)):t.createCommentVNode("",!0)]))),128))])]),t.createElementVNode("tbody",gc,[(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:$=>y.$emit("handleClick",C),class:t.normalizeClass({"cursor-pointer":n.clickable})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.tableData.columns,($,_)=>(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",$.class]),key:E+"-"+_},[$.component?(t.openBlock(),t.createBlock(t.resolveDynamicComponent($.component),{key:0,"props-data":C,"current-user":n.tableData.currentUser,attribute:$.key,items:$.items},null,8,["props-data","current-user","attribute","items"])):(t.openBlock(),t.createElementBlock("div",{key:1,textContent:t.toDisplayString(c(C,$))},null,8,yc))],2))),128))],10,bc))),128)),t.unref(g)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("tr",wc,[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,xc)]))])])]),t.unref(g)?(t.openBlock(),t.createBlock(At,{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)]))}}),Cc=t.createElementVNode("label",{for:"tabs",class:"sr-only"},"Select a tab",-1),vc={class:"hidden sm:block"},Ec=["textContent","onClick"],ka=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}])},[Cc,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",vc,[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,Ec))),128))],2)],2)])])}}}),kc=t.createElementVNode("span",{class:"sr-only"},"Use",-1),Da=t.defineComponent({props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:r}){return(e,o)=>(t.openBlock(),t.createBlock(t.unref(Ri),{class:t.normalizeClass([n.modelValue?"bg-blue-600":"bg-gray-200","relative inline-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(()=>[kc,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"]))}}),Dc={class:"relative flex items-start"},$c={class:"flex items-center h-5"},Nc=["id","aria-labelledby","aria-describedby","checked"],Sc={class:"ml-3"},$a=t.defineComponent({props:{label:{default:""},help:{default:""},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:r}){const o=t.useAttrs().id||ve.CreateIdAttribute();return(a,i)=>(t.openBlock(),t.createElementBlock("div",Dc,[t.createElementVNode("div",$c,[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"},{onChange:l=>{r("update:modelValue",l.target.checked)},...a.$attrs}),null,16,Nc)]),t.createElementVNode("div",Sc,[t.createVNode(fe,{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(ce,{class:"-mt-1",id:`${t.unref(o)}-help`,text:n.help},null,8,["id","text"])])]))}});function Vc(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 dt=t.defineComponent({props:{tag:{default:"legend"}},setup(n){return(r,e)=>t.unref(Vc)(r.$slots.default)?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.tag),t.normalizeProps(t.mergeProps({key:0},{...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)}}),_c=["aria-labelledby","aria-describedby"],Bc={key:0,class:"space-y-0.5"},Mc={key:0},Tc={class:"flex"},Oc={class:"flex items-center h-5"},Pc=["id","aria-labelledby","aria-describedby","checked","disabled"],Ac={class:"ml-3"},Na=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||ve.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",Bc,[t.createVNode(dt,{id:`${t.unref(i)}-legend`},{default:t.withCtx(()=>[n.legend?(t.openBlock(),t.createElementBlock("div",Mc,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(ce,{tag:"p",text:n.help,id:`${t.unref(i)}-help`},null,8,["text","id"])])):t.createCommentVNode("",!0),t.createElementVNode("div",Tc,[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",Oc,[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"},{onChange:m=>{s(m.target.checked,u.value)},...c.$attrs}),null,16,Pc)]),t.createElementVNode("div",Ac,[t.createVNode(fe,{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(ce,{class:"-mt-1",id:`${t.unref(i)}-${b}-help`,text:u.help},null,8,["id","text"])])]))),128))],2)])],8,_c))}}),Ic=["aria-labelledby","aria-describedby"],Lc={key:0,class:"space-y-0.5"},Rc={key:0},Fc={class:"flex"},jc={class:"flex items-center h-5"},Hc=["aria-describedby","aria-labelledby","checked","disabled","id","name","value"],Uc={class:"ml-3"},Sa=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||ve.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",Lc,[t.createVNode(dt,{id:`${t.unref(i)}-legend`},{default:t.withCtx(()=>[n.legend?(t.openBlock(),t.createElementBlock("div",Rc,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(ce,{tag:"p",text:n.help,id:`${t.unref(i)}-help`},null,8,["text","id"])])):t.createCommentVNode("",!0),t.createElementVNode("div",Fc,[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",jc,[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},{onChange:()=>{r("update:modelValue",p.value)},...s.$attrs}),null,16,Hc)]),t.createElementVNode("div",Uc,[t.createVNode(fe,{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(ce,{class:"-mt-1",id:`${t.unref(i)}-${u}-help`,text:p.help},null,8,["id","text"])])]))),128))],2)])],8,Ic))}}),Yc=["id"],zc={class:"flex-1 flex pr-1"},Wc={class:"flex flex-col"},Kc={key:1,class:"mt-auto mb-0"},qc=["checked","name","required","value"],Va=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=ve.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(Ai),{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(Zr),{key:0,class:"block"},{default:t.withCtx(()=>[t.createVNode(dt,{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(ce,{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,Yc)):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(Ii),{as:"template",disabled:m!=null&&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(["relative bg-white border rounded-lg shadow-sm p-4 flex cursor-pointer focus:outline-none",[y?"border-transparent":"border-gray-300",g?"border-blue-500 ring-2 ring-blue-500":"",x?"cursor-not-allowed opacity-75":""]])},[t.createElementVNode("div",zc,[t.createElementVNode("div",Wc,[t.createVNode(t.unref(Zr),{as:"div"},{default:t.withCtx(()=>[t.createVNode(fe,{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(ce,{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",Kc,[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(zi),{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,qc)],2)]),_:2},1032,["disabled","value"]))),128))],2)]),_:3},8,["modelValue","disabled","aria-invalid","aria-errormessage"]))}}),Gc=["aria-labelledby","aria-describedby","id","value"],_a=t.defineComponent({props:{help:{default:""},label:{default:""},modelValue:{default:""}},emits:["update:modelValue"],setup(n,{emit:r}){const o=t.useAttrs().id||ve.CreateIdAttribute();return(a,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(fe,{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,Gc),t.createVNode(ce,{id:`${t.unref(o)}-help`,text:n.help},null,8,["id","text"])],64))}}),Jc=["aria-labelledby","aria-describedby"],Xc={key:0,class:"space-y-0.5"},Qc=["for"],Zc=["id","name","checked"],eu=["for"],tu=["id","name","checked"],Ba=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||ve.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",Xc,[t.createVNode(fe,{class:"block my-auto",label:n.legend,tag:"legend"},null,8,["label"]),t.createVNode(ce,{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},{...s.$attrs,onChange:l}),null,16,Zc),t.createVNode(fe,{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},{...s.$attrs,onChange:l}),null,16,tu),t.createVNode(fe,{class:"ml-2",disabled:s.$attrs.hasOwnProperty("disabled")&&s.$attrs.disabled!==!1,label:"No",tag:"span"},null,8,["disabled"])],10,eu)])],8,Jc))}});var nu=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",ActionsDropdown:aa,Cards:oa,ContentModal:ia,DateFilter:Mn,DetailList:fa,DownloadCell:pa,Flash:It,Modal:ha,SidebarLayout:ga,Slideover:ya,StackedLayout:xa,Popover:st,PopoverContent:ba,PopoverPosition:st,Paginator:At,Spinner:Rt,StaticTable:Ca,Steps:va,Table:Ea,Tabs:ka,Toggle:Da,Tooltip:wa,BaseInput:_n,Checkbox:$a,DateRangePicker:Pt,InputHelp:ce,InputLabel:fe,FieldsetLegend:dt,MultiCheckboxes:Na,Radio:Sa,RadioCards:Va,Select:Bn,TextArea:_a,YesOrNoRadio:Ba,XYSpinner:Pn});const ru=function(r){Object.entries(nu).forEach(([e,o])=>{r.component(e,o)})};S.ActionsDropdown=aa,S.BaseAPI=cn,S.BaseInput=_n,S.Cards=oa,S.Checkbox=$a,S.ContentModal=ia,S.DateFilter=Mn,S.DateRangePicker=Pt,S.DetailList=fa,S.DownloadCell=pa,S.FieldsetLegend=dt,S.Flash=It,S.InputHelp=ce,S.InputLabel=fe,S.Modal=ha,S.MultiCheckboxes=Na,S.Paginator=At,S.Popover=st,S.PopoverContent=ba,S.PopoverPosition=st,S.Radio=Sa,S.RadioCards=Va,S.Select=Bn,S.SidebarLayout=ga,S.Slideover=ya,S.Spinner=Rt,S.StackedLayout=xa,S.StaticTable=Ca,S.Steps=va,S.Table=Ea,S.Tabs=ka,S.TextArea=_a,S.Toggle=Da,S.Tooltip=wa,S.XYSpinner=Pn,S.YesOrNoRadio=Ba,S.default=ru,S.isHttpCancel=kr,S.isHttpError=Er,S.useAppFlasher=On,S.useAppFlashes=Pe,S.useAppSpinner=dn,S.useBaseAPI=lt,S.useBaseAPIDelete=Cl,S.useBaseAPIGet=xl,S.useBaseAPIPost=vl,S.useBaseAPIPut=El,S.useFlashes=ua,S.useSpinnerDisplay=xr,Object.defineProperty(S,"__esModule",{value:!0}),S[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 kl=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 Pe(){return Tn===void 0&&(Tn=ua()),Tn}const On={error(n,r){Pe().flasher.error(n,r)},info(n,r){Pe().flasher.info(n,r)},success(n,r){Pe().flasher.success(n,r)},warning(n,r){Pe().flasher.warning(n,r)},genericError(n,r){Pe().flasher.genericError(n,r)}},Dl={class:"px-4 flex items-center justify-between sm:px-0"},$l={class:"w-0 flex-1 flex"},Nl=[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 ")],Sl={class:"hidden md:flex"},Vl=["textContent","onClick"],_l={class:"w-0 flex-1 flex justify-end"},Bl=[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)],At=t.defineComponent({props:{modelValue:null},emits:["update:modelValue"],setup(n,{emit:r}){const e=n,o=i=>{r("update:modelValue",{...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",Dl,[t.createElementVNode("div",$l,[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"]))},Nl,2)]),t.createElementVNode("div",Sl,[(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,Vl))),128))]),t.createElementVNode("div",_l,[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"]))},Bl,2)])]))}}),Ml={key:0,class:"shadow overflow-hidden sm:rounded-md border"},fa=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};cn.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",Ml,[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(At,{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)]))}}),Tl=["href"],pa=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,Tl))}});var Lu="";const Ol={class:"fixed inset-0 flex flex-col items-end justify-end px-4 py-6 pointer-events-none sm:p-6 z-[45]"},Pl={class:"rounded-lg ring-1 ring-black ring-opacity-5 overflow-hidden"},Al={class:"p-4"},Il={class:"flex items-center"},Ll={class:"w-0 flex-1 flex justify-between"},Rl=["innerHTML"],Fl={class:"ml-4 shrink-0 flex"},jl=["onClick"],Hl=[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)],It=t.defineComponent({setup(n){const{flasher:r,flashes:e}=Pe(),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(()=>{kl(r)}),(a,i)=>(t.openBlock(),t.createBlock(t.unref(un),null,{default:t.withCtx(()=>[t.createElementVNode("div",Ol,[t.createVNode(t.TransitionGroup,{tag:"div",class:"max-w-sm space-y-2 w-full","enter-active-class":"ease-out duration-300","enter-from-class":"translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2","enter-to-class":"translate-y-0 opacity-100 sm:translate-x-0","leave-active-class":"ease-in duration-100","leave-from-class":"opacity-100","leave-to-class":"opacity-0"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(e),([l,s])=>(t.openBlock(),t.createElementBlock("div",{key:s.message,class:t.normalizeClass(["bg-white shadow-lg rounded-lg pointer-events-auto border-t-4 transform z-10",[o(s.type)]])},[t.createElementVNode("div",Pl,[t.createElementVNode("div",Al,[t.createElementVNode("div",Il,[t.createElementVNode("div",Ll,[t.createElementVNode("p",{class:"w-0 flex-1 text-sm leading-5 font-medium text-gray-900",innerHTML:s.message},null,8,Rl)]),t.createElementVNode("div",Fl,[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"},Hl,8,jl)])])])])],2))),128))]),_:1})])]),_: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 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 18h7"})])}function zl(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 ma(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 Lt(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 Wl={class:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"},Kl=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"},Gl={class:"block absolute top-0 right-0 pt-4 pr-4"},Jl=t.createElementVNode("span",{class:"sr-only"},"Close",-1),Xl={class:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Ql={class:"mt-3 sm:mt-0 sm:text-left"},Zl={class:"mt-2"},es={key:0,class:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},ts=["textContent","disabled"],ha=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(at),{as:"template",show:n.modelValue},{default:t.withCtx(()=>[t.createVNode(t.unref(Nt),{as:"div",static:"",class:"fixed z-30 inset-0 overflow-y-auto",onClose:i[3]||(i[3]=l=>o(!1)),open:n.modelValue},{default:t.withCtx(()=>[t.createElementVNode("div",Wl,[t.createVNode(t.unref($e),{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(St),{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})]),_:1}),Kl,t.createVNode(t.unref($e),{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",Gl,[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))},[Jl,t.createVNode(t.unref(Lt),{class:"h-6 w-6","aria-hidden":"true"})])]),t.createElementVNode("div",Xl,[t.createElementVNode("div",Ql,[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",Zl,[t.renderSlot(a.$slots,"default")])])]),n.submitText?(t.openBlock(),t.createElementBlock("div",es,[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,ts),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"]))}}),ns={class:"aspect-square overflow-hidden"},rs={class:"flex justify-center relative"},as={class:"sr-only"},os=t.createElementVNode("div",{class:"animate-spin-gear drop-shadow-md"},[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),is=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&&a.class?(i=t.unref(r))==null?void 0:i.class:"h-20 w-20")},[t.createElementVNode("div",ns,[t.createElementVNode("div",rs,[t.createElementVNode("p",as,[t.renderSlot(e.$slots,"default")]),os,is])])],2)}}}),ls={key:0,class:"fixed top-0 left-0 flex flex-col items-center justify-center w-full h-full cursor-not-allowed z-40 bg-gray-50 bg-opacity-50"},ss={class:"mt-2"},Rt=t.defineComponent({setup(n){const{idx:r,loading:e,maxIdx:o,messages:a,msg:i,showMsg:l}=Cr(),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.openBlock(),t.createBlock(t.unref(un),null,{default:t.withCtx(()=>[t.unref(e)?(t.openBlock(),t.createElementBlock("div",ls,[t.createVNode(Pn,{class:"w-32 h-32"}),t.withDirectives(t.createElementVNode("div",ss,[t.createVNode(t.Transition,{appear:"","enter-active-class":"ease-out duration-1000","enter-from-class":"opacity-0","enter-to-class":"opacity-100","leave-active-class":"ease-in duration-500","leave-from-class":"opacity-100","leave-to-class":"opacity-0",onAfterEnter:c,onAfterLeave:s},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",{class:"container font-medium text-lg leading-snug text-center transition-opacity"},t.toDisplayString(t.unref(i)),513),[[t.vShow,t.unref(l)]])]),_:1})],512),[[t.vShow,t.unref(a)]])])):t.createCommentVNode("",!0)]),_:1}))}}),ds={class:"h-screen flex overflow-hidden bg-gray-100"},cs={class:"relative flex-1 flex flex-col max-w-xs w-full pt-5 pb-4 bg-white"},us={class:"absolute top-0 right-0 -mr-12 pt-2"},fs=t.createElementVNode("span",{class:"sr-only"},"Close sidebar",-1),ps={class:"shrink-0 flex justify-center px-4"},ms=["src"],hs={class:"mt-5 flex flex-col flex-1 h-0 overflow-y-auto"},gs={class:"flex-1 px-2 space-y-1"},bs=["href","target"],ys={key:0,class:"mt-auto"},ws={class:"mt-6 px-2"},xs=t.createElementVNode("div",{class:"shrink-0 w-14","aria-hidden":"true"},null,-1),Cs={class:"hidden md:flex md:shrink-0"},vs={class:"flex flex-col w-64"},Es={class:"flex flex-col grow border-r border-gray-200 pt-5 pb-4 bg-white overflow-y-auto"},ks={class:"flex items-center shrink-0 px-4"},Ds=["src"],$s={class:"mt-5 grow flex flex-col"},Ns={class:"flex-1 px-2 bg-white space-y-1"},Ss=["href","target"],Vs={key:0,class:"mt-atuo"},_s={class:"mt-6 px-2"},Bs={class:"flex flex-col w-0 flex-1 overflow-hidden"},Ms={class:"relative z-10 shrink-0 flex h-16 bg-xy-blue shadow"},Ts=t.createElementVNode("span",{class:"sr-only"},"Open sidebar",-1),Os={class:"flex-1 px-4 flex justify-between"},Ps={class:"flex-1 flex"},As={class:"flex items-center text-2xl text-white"},Is={class:"ml-4 flex items-center md:ml-6"},Ls=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1),Rs=["href"],Fs={class:"flex-1 relative overflow-y-auto focus:outline-none"},js={class:"mx-auto"},ga=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",ds,[t.createVNode(t.unref(at),{as:"template",show:e.value},{default:t.withCtx(()=>[t.createVNode(t.unref(Nt),{as:"div",static:"",class:"fixed inset-0 flex z-10 md:hidden",onClose:i[1]||(i[1]=l=>e.value=!1),open:e.value},{default:t.withCtx(()=>[t.createVNode(t.unref($e),{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(St),{class:"fixed inset-0 bg-gray-600 bg-opacity-75"})]),_:1}),t.createVNode(t.unref($e),{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",cs,[t.createVNode(t.unref($e),{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",us,[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)},[fs,t.createVNode(t.unref(Lt),{class:"h-6 w-6 text-white","aria-hidden":"true"})])])]),_:1}),t.createElementVNode("div",ps,[t.createElementVNode("img",{class:"w-auto h-12",src:n.iconURL,alt:"Logo"},null,8,ms)]),t.createElementVNode("div",hs,[t.createElementVNode("nav",gs,[(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,bs))),128))]),a.$slots["sidebar-bottom"]?(t.openBlock(),t.createElementBlock("div",ys,[t.createElementVNode("div",ws,[t.renderSlot(a.$slots,"sidebar-bottom")])])):t.createCommentVNode("",!0)])])]),_:3}),xs]),_:3},8,["open"])]),_:3},8,["show"]),t.createElementVNode("div",Cs,[t.createElementVNode("div",vs,[t.createElementVNode("div",Es,[t.createElementVNode("div",ks,[t.createElementVNode("img",{class:"w-auto h-12",src:n.iconURL,alt:"Logo"},null,8,Ds)]),t.createElementVNode("div",$s,[t.createElementVNode("nav",Ns,[(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,Ss))),128))]),a.$slots["sidebar-bottom"]?(t.openBlock(),t.createElementBlock("div",Vs,[t.createElementVNode("div",_s,[t.renderSlot(a.$slots,"sidebar-bottom")])])):t.createCommentVNode("",!0)])])])]),t.createElementVNode("div",Bs,[t.createElementVNode("div",Ms,[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)},[Ts,t.createVNode(t.unref(Yl),{class:"h-6 w-6","aria-hidden":"true"})]),t.createElementVNode("div",Os,[t.createElementVNode("div",Ps,[t.createElementVNode("h1",As,[t.renderSlot(a.$slots,"header")])]),t.createElementVNode("div",Is,[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(()=>[Ls,t.createVNode(t.unref(Wi),{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,Rs)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})])])]),t.createElementVNode("main",Fs,[t.createElementVNode("div",js,[t.renderSlot(a.$slots,"default")])])])]),t.createVNode(It),t.createVNode(Rt)],64))}});function Hs(n,r=100){let e;return(...o)=>{e||(n.apply(o),e=!0,setTimeout(()=>e=!1,r))}}const st=t.defineComponent({props:{as:{default:"div"},position:{default:"auto"},static:{type:Boolean,default:!1}},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&&_.el)||!((G=o==null?void 0:o.value)!=null&&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 $=0;return E?(g.width>m.right?$=m.right-g.width+(g.width-m.right):$=m.right-g.width,p>g.width+b&&($=$+b)):(g.width>C?$=m.left-(g.width-C):$=m.left,p>g.width+b&&($=$-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(${$}px, 0)`}}});if(r.position==="auto"){const p=Hs(()=>{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(Kr),{class:"relative flex",as:n.as},{default:t.withCtx(({open:b,close:m})=>[t.createVNode(t.unref(Ti),{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(Oi),{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:{}),static:n.static},{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","static"])]),_:2},1024)]),_:3},8,["as"]))}});var Us=(n,r)=>{const e=n.__vccOpts||n;for(const[o,a]of r)e[o]=a;return e};const Ys={},zs={class:"w-full max-w-xs bg-white rounded-md p-2 border border-gray-100 shadow-md"};function Ws(n,r){return t.openBlock(),t.createElementBlock("div",zs,[t.renderSlot(n.$slots,"default")])}var ba=Us(Ys,[["render",Ws]]);const Ks={class:"absolute inset-0 overflow-hidden"},qs={class:"fixed inset-y-0 right-0 pl-10 max-w-full flex"},Gs={class:"w-screen max-w-md"},Js={class:"h-full flex flex-col bg-white shadow-xl overflow-y-scroll"},Xs={class:"py-6 px-4 bg-blue-700 sm:px-6"},Qs={class:"flex items-center justify-between"},Zs={class:"ml-3 h-7 flex items-center"},ed=t.createElementVNode("span",{class:"sr-only"},"Close panel",-1),td={class:"mt-1"},nd=["textContent"],rd={class:"relative flex-1 py-6 px-4 sm:px-6"},ya=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(at),{as:"template",show:n.modelValue},{default:t.withCtx(()=>[t.createVNode(t.unref(Nt),{as:"div",static:"",class:"fixed inset-0 z-20 overflow-hidden bg-black bg-opacity-50",onClose:l[1]||(l[1]=s=>a()),open:n.modelValue},{default:t.withCtx(()=>[t.createElementVNode("div",Ks,[t.createVNode(t.unref(St),{class:"absolute inset-0"}),t.createElementVNode("div",qs,[t.createVNode(t.unref($e),{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",Gs,[t.createElementVNode("div",Js,[t.createElementVNode("div",Xs,[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",Zs,[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())},[ed,t.createVNode(t.unref(Lt),{class:"h-6 w-6","aria-hidden":"true"})])])]),t.createElementVNode("div",td,[t.createElementVNode("p",{class:"text-blue-300",textContent:t.toDisplayString(n.description)},null,8,nd)])]),t.createElementVNode("div",rd,[t.renderSlot(i.$slots,"default")]),t.renderSlot(i.$slots,"footer")])])]),_:3})])])]),_:3},8,["open"])]),_:3},8,["show"]))}}),ad={class:"leading-none w-4 h-4"},od=t.createElementVNode("div",{class:"p-5 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"},null,-1),id={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"},wa=t.defineComponent({props:{as:{default:"span"},position:{default:"auto"}},setup(n){return(r,e)=>(t.openBlock(),t.createBlock(st,{position:n.position,as:n.as},{button:t.withCtx(()=>[t.createElementVNode("div",ad,[t.createVNode(t.unref(Ul)),od])]),default:t.withCtx(()=>[t.createElementVNode("div",id,[t.renderSlot(r.$slots,"default")])]),_:3},8,["position","as"]))}}),ld={class:"min-h-screen bg-gray-100"},sd={class:"mx-auto px-4 sm:px-6 lg:px-8"},dd={class:"flex justify-between h-16"},cd={class:"flex"},ud={class:"shrink-0 flex items-center"},fd=["src"],pd={class:"hidden sm:-my-px sm:ml-6 sm:flex sm:space-x-8"},md=["href","aria-current"],hd={class:"hidden sm:ml-6 sm:flex sm:items-center"},gd=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1),bd=["href"],yd={class:"-mr-2 flex items-center sm:hidden"},wd=t.createElementVNode("span",{class:"sr-only"},"Open main menu",-1),xd={class:"pt-2 pb-3 space-y-1"},Cd=["href","aria-current"],vd={class:"pt-4 pb-3 border-t border-gray-200"},Ed={class:"flex items-center px-4"},kd={class:"shrink-0"},Dd={class:"ml-3"},$d=["textContent"],Nd=["textContent"],Sd={class:"mt-3 space-y-1"},Vd=["href"],_d={class:"mx-auto sm:px-6 lg:px-8"},Bd={class:"px-4 py-8 sm:px-0"},xa=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",ld,[t.createVNode(t.unref(Di),{as:"nav",class:"bg-white shadow-sm"},{default:t.withCtx(({open:i})=>[t.createElementVNode("div",sd,[t.createElementVNode("div",dd,[t.createElementVNode("div",cd,[t.createElementVNode("div",ud,[t.createElementVNode("img",{class:"block h-8 w-auto",src:n.iconURL,alt:"XY Trees"},null,8,fd)]),t.createElementVNode("div",pd,[(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,md))),128))])]),t.createElementVNode("div",hd,[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(()=>[gd,t.createVNode(t.unref(ma),{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,bd)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})]),t.createElementVNode("div",yd,[t.createVNode(t.unref($i),{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(()=>[wd,i?(t.openBlock(),t.createBlock(t.unref(Lt),{key:1,class:"block h-6 w-6","aria-hidden":"true"})):(t.openBlock(),t.createBlock(t.unref(zl),{key:0,class:"block h-6 w-6","aria-hidden":"true"}))]),_:2},1024)])])]),t.createVNode(t.unref(Ni),{class:"sm:hidden"},{default:t.withCtx(()=>[t.createElementVNode("div",xd,[(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,Cd))),128))]),t.createElementVNode("div",vd,[t.createElementVNode("div",Ed,[t.createElementVNode("div",kd,[t.createVNode(t.unref(ma),{class:"text-gray-500 h-10 w-10 rounded-full"})]),t.createElementVNode("div",Dd,[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,$d)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"text-sm font-medium text-gray-500",textContent:t.toDisplayString(n.currentUser.email)},null,8,Nd)])]),t.createElementVNode("div",Sd,[(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,Vd))),128))])])]),_:1})]),_:1}),t.renderSlot(o.$slots,"header"),t.createElementVNode("main",null,[t.createElementVNode("div",_d,[t.createElementVNode("div",Bd,[t.renderSlot(o.$slots,"default")])])])]),t.createVNode(It),t.createVNode(Rt)],64))}}),Md={class:"flex flex-col"},Td={class:"-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"},Od={class:"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8"},Pd={class:"overflow-hidden border-b border-gray-200 shadow sm:rounded-lg"},Ad={class:"min-w-full divide-y divide-gray-200"},Id=["textContent"],Ld={class:"bg-white divide-y divide-gray-200"},Rd=["textContent"],Fd={key:0},jd=["colspan"],Ca=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",Md,[t.createElementVNode("div",Td,[t.createElementVNode("div",Od,[t.createElementVNode("div",Pd,[t.createElementVNode("table",Ad,[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,Id))),128))])]),t.createElementVNode("tbody",Ld,[(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,Rd))]))),128))]))),128)),n.tableData.items.length==0?(t.openBlock(),t.createElementBlock("tr",Fd,[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,jd)])):t.createCommentVNode("",!0)])])])])])]))}}),Hd={class:"flex items-center justify-center space-x-8"},Ud={class:"font-medium"},Yd={class:"flex items-center space-x-5"},zd={key:0,class:"block w-2.5 h-2.5 bg-xy-green rounded-full hover:bg-green-900 focus:bg-green-900"},Wd={key:1,class:"relative flex items-center justify-center"},Kd=[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)],qd={key:2,href:"#",class:"block w-2.5 h-2.5 bg-gray-200 rounded-full hover:bg-gray-400 focus:bg-gray-400"},Gd={key:0,class:"flex shrink-0"},Jd={key:0,class:"inline-flex rounded-md shadow-sm"},Xd=["textContent"],Qd={class:"ml-3 inline-flex rounded-md shadow-sm"},Zd=["textContent"],va=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",Hd,[t.createElementVNode("p",Ud,"Step "+t.toDisplayString(n.step)+" of "+t.toDisplayString(n.total),1),t.createElementVNode("ul",Yd,[(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",zd)):n.step===l?(t.openBlock(),t.createElementBlock("div",Wd,Kd)):(t.openBlock(),t.createElementBlock("span",qd))]))),128))])]),n.hideActions?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Gd,[n.hidePrevious?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",Jd,[t.createElementVNode("button",{type:"button",class:"xy-btn-white",onClick:o,textContent:t.toDisplayString(n.previousText)},null,8,Xd)])),t.createElementVNode("span",Qd,[t.createElementVNode("button",{type:"button",class:"xy-btn",onClick:e,textContent:t.toDisplayString(n.nextText)},null,8,Zd)])]))]))}}),ec={class:"flex flex-col mb-4 space-y-4 lg:space-y-0 lg:flex-row lg:justify-between"},tc={key:0,class:"w-full max-w-lg lg:max-w-xs"},nc=t.createElementVNode("label",{for:"search",class:"sr-only"},"Search",-1),rc={class:"relative"},ac=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),oc={key:1,class:"w-full max-w-lg lg:max-w-xs"},ic={class:"relative z-0 min-w-full align-middle border-b border-gray-200 shadow sm:rounded-lg overflow-x-auto"},lc={class:"min-w-full"},sc={key:0},dc=["onClick"],cc={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",class:"h-5 inline"},uc=[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)],fc={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},pc=[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)],mc={key:2,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},hc=[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)],gc={class:"bg-white"},bc=["onClick"],yc=["textContent"],wc={key:0},xc=["colspan"],Ea=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};cn.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",ec,[n.tableData.search?(t.openBlock(),t.createElementBlock("div",tc,[nc,t.createElementVNode("div",rc,[ac,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",oc,[t.createVNode(Pt,{modelValue:a.value,"onUpdate:modelValue":[x[2]||(x[2]=C=>a.value=C),p]},null,8,["modelValue"])])):t.createCommentVNode("",!0)]),t.createElementVNode("div",ic,[t.createElementVNode("table",lc,[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",sc,t.toDisplayString(C.display),1)):t.createCommentVNode("",!0),C.sort?(t.openBlock(),t.createElementBlock("span",{key:1,class:"cursor-pointer",onClick:t.withModifiers($=>u(C.sort),["prevent"])},[e.value!==C.sort?(t.openBlock(),t.createElementBlock("svg",cc,uc)):o.value=="desc"?(t.openBlock(),t.createElementBlock("svg",fc,pc)):(t.openBlock(),t.createElementBlock("svg",mc,hc))],8,dc)):t.createCommentVNode("",!0)]))),128))])]),t.createElementVNode("tbody",gc,[(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:$=>y.$emit("handleClick",C),class:t.normalizeClass({"cursor-pointer":n.clickable})},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(n.tableData.columns,($,_)=>(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",$.class]),key:E+"-"+_},[$.component?(t.openBlock(),t.createBlock(t.resolveDynamicComponent($.component),{key:0,"props-data":C,"current-user":n.tableData.currentUser,attribute:$.key,items:$.items},null,8,["props-data","current-user","attribute","items"])):(t.openBlock(),t.createElementBlock("div",{key:1,textContent:t.toDisplayString(c(C,$))},null,8,yc))],2))),128))],10,bc))),128)),t.unref(g)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("tr",wc,[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,xc)]))])])]),t.unref(g)?(t.openBlock(),t.createBlock(At,{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)]))}}),Cc=t.createElementVNode("label",{for:"tabs",class:"sr-only"},"Select a tab",-1),vc={class:"hidden sm:block"},Ec=["textContent","onClick"],ka=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}])},[Cc,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",vc,[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,Ec))),128))],2)],2)])])}}}),kc=t.createElementVNode("span",{class:"sr-only"},"Use",-1),Da=t.defineComponent({props:{modelValue:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:r}){return(e,o)=>(t.openBlock(),t.createBlock(t.unref(Ri),{class:t.normalizeClass([n.modelValue?"bg-blue-600":"bg-gray-200","relative inline-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(()=>[kc,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"]))}}),Dc={class:"relative flex items-start"},$c={class:"flex items-center h-5"},Nc=["id","aria-labelledby","aria-describedby","checked"],Sc={class:"ml-3"},$a=t.defineComponent({props:{label:{default:""},help:{default:""},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:r}){const o=t.useAttrs().id||ve.CreateIdAttribute();return(a,i)=>(t.openBlock(),t.createElementBlock("div",Dc,[t.createElementVNode("div",$c,[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"},{onChange:l=>{r("update:modelValue",l.target.checked)},...a.$attrs}),null,16,Nc)]),t.createElementVNode("div",Sc,[t.createVNode(fe,{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(ce,{class:"-mt-1",id:`${t.unref(o)}-help`,text:n.help},null,8,["id","text"])])]))}});function Vc(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 dt=t.defineComponent({props:{tag:{default:"legend"}},setup(n){return(r,e)=>t.unref(Vc)(r.$slots.default)?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(n.tag),t.normalizeProps(t.mergeProps({key:0},{...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)}}),_c=["aria-labelledby","aria-describedby"],Bc={key:0,class:"space-y-0.5"},Mc={key:0},Tc={class:"flex"},Oc={class:"flex items-center h-5"},Pc=["id","aria-labelledby","aria-describedby","checked","disabled"],Ac={class:"ml-3"},Na=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||ve.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",Bc,[t.createVNode(dt,{id:`${t.unref(i)}-legend`},{default:t.withCtx(()=>[n.legend?(t.openBlock(),t.createElementBlock("div",Mc,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(ce,{tag:"p",text:n.help,id:`${t.unref(i)}-help`},null,8,["text","id"])])):t.createCommentVNode("",!0),t.createElementVNode("div",Tc,[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",Oc,[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"},{onChange:m=>{s(m.target.checked,u.value)},...c.$attrs}),null,16,Pc)]),t.createElementVNode("div",Ac,[t.createVNode(fe,{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(ce,{class:"-mt-1",id:`${t.unref(i)}-${b}-help`,text:u.help},null,8,["id","text"])])]))),128))],2)])],8,_c))}}),Ic=["aria-labelledby","aria-describedby"],Lc={key:0,class:"space-y-0.5"},Rc={key:0},Fc={class:"flex"},jc={class:"flex items-center h-5"},Hc=["aria-describedby","aria-labelledby","checked","disabled","id","name","value"],Uc={class:"ml-3"},Sa=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||ve.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",Lc,[t.createVNode(dt,{id:`${t.unref(i)}-legend`},{default:t.withCtx(()=>[n.legend?(t.openBlock(),t.createElementBlock("div",Rc,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(ce,{tag:"p",text:n.help,id:`${t.unref(i)}-help`},null,8,["text","id"])])):t.createCommentVNode("",!0),t.createElementVNode("div",Fc,[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",jc,[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},{onChange:()=>{r("update:modelValue",p.value)},...s.$attrs}),null,16,Hc)]),t.createElementVNode("div",Uc,[t.createVNode(fe,{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(ce,{class:"-mt-1",id:`${t.unref(i)}-${u}-help`,text:p.help},null,8,["id","text"])])]))),128))],2)])],8,Ic))}}),Yc=["id"],zc={class:"flex-1 flex pr-1"},Wc={class:"flex flex-col"},Kc={key:1,class:"mt-auto mb-0"},qc=["checked","name","required","value"],Va=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=ve.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(Ai),{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(Zr),{key:0,class:"block"},{default:t.withCtx(()=>[t.createVNode(dt,{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(ce,{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,Yc)):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(Ii),{as:"template",disabled:m!=null&&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(["relative bg-white border rounded-lg shadow-sm p-4 flex cursor-pointer focus:outline-none",[y?"border-transparent":"border-gray-300",g?"border-blue-500 ring-2 ring-blue-500":"",x?"cursor-not-allowed opacity-75":""]])},[t.createElementVNode("div",zc,[t.createElementVNode("div",Wc,[t.createVNode(t.unref(Zr),{as:"div"},{default:t.withCtx(()=>[t.createVNode(fe,{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(ce,{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",Kc,[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(zi),{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,qc)],2)]),_:2},1032,["disabled","value"]))),128))],2)]),_:3},8,["modelValue","disabled","aria-invalid","aria-errormessage"]))}}),Gc=["aria-labelledby","aria-describedby","id","value"],_a=t.defineComponent({props:{help:{default:""},label:{default:""},modelValue:{default:""}},emits:["update:modelValue"],setup(n,{emit:r}){const o=t.useAttrs().id||ve.CreateIdAttribute();return(a,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(fe,{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,Gc),t.createVNode(ce,{id:`${t.unref(o)}-help`,text:n.help},null,8,["id","text"])],64))}}),Jc=["aria-labelledby","aria-describedby"],Xc={key:0,class:"space-y-0.5"},Qc=["for"],Zc=["id","name","checked"],eu=["for"],tu=["id","name","checked"],Ba=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||ve.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",Xc,[t.createVNode(fe,{class:"block my-auto",label:n.legend,tag:"legend"},null,8,["label"]),t.createVNode(ce,{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},{...s.$attrs,onChange:l}),null,16,Zc),t.createVNode(fe,{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},{...s.$attrs,onChange:l}),null,16,tu),t.createVNode(fe,{class:"ml-2",disabled:s.$attrs.hasOwnProperty("disabled")&&s.$attrs.disabled!==!1,label:"No",tag:"span"},null,8,["disabled"])],10,eu)])],8,Jc))}});var nu=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",ActionsDropdown:aa,Cards:oa,ContentModal:ia,DateFilter:Mn,DetailList:fa,DownloadCell:pa,Flash:It,Modal:ha,SidebarLayout:ga,Slideover:ya,StackedLayout:xa,Popover:st,PopoverContent:ba,PopoverPosition:st,Paginator:At,Spinner:Rt,StaticTable:Ca,Steps:va,Table:Ea,Tabs:ka,Toggle:Da,Tooltip:wa,BaseInput:_n,Checkbox:$a,DateRangePicker:Pt,InputHelp:ce,InputLabel:fe,FieldsetLegend:dt,MultiCheckboxes:Na,Radio:Sa,RadioCards:Va,Select:Bn,TextArea:_a,YesOrNoRadio:Ba,XYSpinner:Pn});const ru=function(r){Object.entries(nu).forEach(([e,o])=>{r.component(e,o)})};S.ActionsDropdown=aa,S.BaseAPI=cn,S.BaseInput=_n,S.Cards=oa,S.Checkbox=$a,S.ContentModal=ia,S.DateFilter=Mn,S.DateRangePicker=Pt,S.DetailList=fa,S.DownloadCell=pa,S.FieldsetLegend=dt,S.Flash=It,S.InputHelp=ce,S.InputLabel=fe,S.Modal=ha,S.MultiCheckboxes=Na,S.Paginator=At,S.Popover=st,S.PopoverContent=ba,S.PopoverPosition=st,S.Radio=Sa,S.RadioCards=Va,S.Select=Bn,S.SidebarLayout=ga,S.Slideover=ya,S.Spinner=Rt,S.StackedLayout=xa,S.StaticTable=Ca,S.Steps=va,S.Table=Ea,S.Tabs=ka,S.TextArea=_a,S.Toggle=Da,S.Tooltip=wa,S.XYSpinner=Pn,S.YesOrNoRadio=Ba,S.default=ru,S.isHttpCancel=kr,S.isHttpError=Er,S.useAppFlasher=On,S.useAppFlashes=Pe,S.useAppSpinner=dn,S.useBaseAPI=lt,S.useBaseAPIDelete=Cl,S.useBaseAPIGet=xl,S.useBaseAPIPost=vl,S.useBaseAPIPut=El,S.useFlashes=ua,S.useSpinnerDisplay=xr,Object.defineProperty(S,"__esModule",{value:!0}),S[Symbol.toStringTag]="Module"});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xy-planning-network/trees",
3
- "version": "0.6.3",
3
+ "version": "0.6.5-rc-1",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "repository": "github:xy-planning-network/trees",
@@ -24,10 +24,12 @@ const props = withDefaults(
24
24
  defineProps<{
25
25
  as?: string
26
26
  position?: PopoverPosition
27
+ static?: boolean
27
28
  }>(),
28
29
  {
29
30
  as: "div",
30
31
  position: "auto",
32
+ static: false,
31
33
  }
32
34
  )
33
35
 
@@ -216,6 +218,7 @@ if (props.position === "auto") {
216
218
  class="absolute z-10"
217
219
  :class="classes.wrapper"
218
220
  :style="position === 'auto' ? autoPosition.wrapper : {}"
221
+ :static="static"
219
222
  >
220
223
  <div
221
224
  :class="classes.content"
@@ -10,14 +10,22 @@ declare const _default: import("vue").DefineComponent<{
10
10
  } & {
11
11
  default: string;
12
12
  };
13
+ static: {
14
+ type: import("vue").PropType<boolean>;
15
+ } & {
16
+ default: boolean;
17
+ };
13
18
  }, () => void, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
14
19
  as?: unknown;
15
20
  position?: unknown;
21
+ static?: unknown;
16
22
  } & {
17
23
  as: string;
24
+ static: boolean;
18
25
  position: PopoverPosition;
19
26
  } & {}>, {
20
27
  as: string;
28
+ static: boolean;
21
29
  position: PopoverPosition;
22
30
  }>;
23
31
  export default _default;