@xy-planning-network/trees 0.9.2-rc2 → 0.9.2-rc4

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
@@ -6647,8 +6647,7 @@ const li = {
6647
6647
  var u;
6648
6648
  const e = T(t), r = {
6649
6649
  initial: ((u = e == null ? void 0 : e.value[0]) == null ? void 0 : u.value) || "",
6650
- paramName: "tab",
6651
- ...n
6650
+ paramName: (n == null ? void 0 : n.paramName) || "tab"
6652
6651
  }, a = T(r.initial), o = (d) => !!e.value.find((f) => f.value === d), i = (d) => a.value === d, l = new URLSearchParams(window.location.search).get(r.paramName);
6653
6652
  return l && o(l) && (a.value = l), Fe(a, (d) => {
6654
6653
  const f = new URLSearchParams(window.location.search);
@@ -6672,7 +6671,17 @@ const li = {
6672
6671
  const r = new URLSearchParams(window.location.search);
6673
6672
  for (const o in e) {
6674
6673
  const i = e[o];
6675
- r.delete(o), !(i == "" || i == !1 || i == null || i == null) && (Array.isArray(i) ? i.forEach((s) => r.append(o, s.toString())) : r.set(o, i.toString()));
6674
+ if (i == null || i == null) {
6675
+ r.delete(o);
6676
+ continue;
6677
+ }
6678
+ if (Array.isArray(i)) {
6679
+ r.delete(o), i.forEach((s) => {
6680
+ r.append(o, s.toString());
6681
+ });
6682
+ continue;
6683
+ }
6684
+ !r.has(o) && !i || r.set(o, i.toString());
6676
6685
  }
6677
6686
  const a = r.toString() !== "" ? `?${r.toString()}` : "";
6678
6687
  window.history.replaceState(
package/dist/trees.umd.js CHANGED
@@ -10,4 +10,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
10
10
  </span>
11
11
  `}function pp(){e.calendarContainer.classList.add("hasWeeks");const f=j("div","flatpickr-weekwrapper");f.appendChild(j("span","flatpickr-weekday",e.l10n.weekAbbreviation));const h=j("div","flatpickr-weeks");return f.appendChild(h),{weekWrapper:f,weekNumbers:h}}function pr(f,h=!0){const w=h?f:f-e.currentMonth;w<0&&e._hidePrevMonthArrow===!0||w>0&&e._hideNextMonthArrow===!0||(e.currentMonth+=w,(e.currentMonth<0||e.currentMonth>11)&&(e.currentYear+=e.currentMonth>11?1:-1,e.currentMonth=(e.currentMonth+12)%12,J("onYearChange"),ae()),X(),J("onMonthChange"),xn())}function mp(f=!0,h=!0){if(e.input.value="",e.altInput!==void 0&&(e.altInput.value=""),e.mobileInput!==void 0&&(e.mobileInput.value=""),e.selectedDates=[],e.latestSelectedDateObj=void 0,h===!0&&(e.currentYear=e._initialDate.getFullYear(),e.currentMonth=e._initialDate.getMonth()),e.config.enableTime===!0){const{hours:w,minutes:C,seconds:S}=lr(e.config);m(w,C,S)}e.redraw(),f&&J("onChange")}function hp(){e.isOpen=!1,e.isMobile||(e.calendarContainer!==void 0&&e.calendarContainer.classList.remove("open"),e._input!==void 0&&e._input.classList.remove("active")),J("onClose")}function gp(){e.config!==void 0&&J("onDestroy");for(let f=e._handlers.length;f--;)e._handlers[f].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 f=e.calendarContainer.parentNode;if(f.lastChild&&f.removeChild(f.lastChild),f.parentNode){for(;f.firstChild;)f.parentNode.insertBefore(f.firstChild,f);f.parentNode.removeChild(f)}}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(f=>{try{delete e[f]}catch{}})}function ft(f){return e.config.appendTo&&e.config.appendTo.contains(f)?!0:e.calendarContainer.contains(f)}function mr(f){if(e.isOpen&&!e.config.inline){const h=ye(f),w=ft(h),C=h===e.input||h===e.altInput||e.element.contains(h)||f.path&&f.path.indexOf&&(~f.path.indexOf(e.input)||~f.path.indexOf(e.altInput)),S=f.type==="blur"?C&&f.relatedTarget&&!ft(f.relatedTarget):!C&&!w&&!ft(f.relatedTarget),_=!e.config.ignoredFocusElements.some(B=>B.contains(h));S&&_&&(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 gn(f){if(!f||e.config.minDate&&f<e.config.minDate.getFullYear()||e.config.maxDate&&f>e.config.maxDate.getFullYear())return;const h=f,w=e.currentYear!==h;e.currentYear=h||e.currentYear,e.config.maxDate&&e.currentYear===e.config.maxDate.getFullYear()?e.currentMonth=Math.min(e.config.maxDate.getMonth(),e.currentMonth):e.config.minDate&&e.currentYear===e.config.minDate.getFullYear()&&(e.currentMonth=Math.max(e.config.minDate.getMonth(),e.currentMonth)),w&&(e.redraw(),J("onYearChange"),ae())}function Je(f,h=!0){var w;const C=e.parseDate(f,void 0,h);if(e.config.minDate&&C&&we(C,e.config.minDate,h!==void 0?h:!e.minDateHasTime)<0||e.config.maxDate&&C&&we(C,e.config.maxDate,h!==void 0?h:!e.maxDateHasTime)>0)return!1;if(!e.config.enable&&e.config.disable.length===0)return!0;if(C===void 0)return!1;const S=!!e.config.enable,_=(w=e.config.enable)!==null&&w!==void 0?w:e.config.disable;for(let B=0,$;B<_.length;B++){if($=_[B],typeof $=="function"&&$(C))return S;if($ instanceof Date&&C!==void 0&&$.getTime()===C.getTime())return S;if(typeof $=="string"){const O=e.parseDate($,void 0,!0);return O&&O.getTime()===C.getTime()?S:!S}else if(typeof $=="object"&&C!==void 0&&$.from&&$.to&&C.getTime()>=$.from.getTime()&&C.getTime()<=$.to.getTime())return S}return!S}function bn(f){return e.daysContainer!==void 0?f.className.indexOf("hidden")===-1&&f.className.indexOf("flatpickr-disabled")===-1&&e.daysContainer.contains(f):!1}function bp(f){f.target===e._input&&(e.selectedDates.length>0||e._input.value.length>0)&&!(f.relatedTarget&&ft(f.relatedTarget))&&e.setDate(e._input.value,!0,f.target===e.altInput?e.config.altFormat:e.config.dateFormat)}function yp(f){const h=ye(f),w=e.config.wrap?n.contains(h):h===e._input,C=e.config.allowInput,S=e.isOpen&&(!C||!w),_=e.config.inline&&w&&!C;if(f.keyCode===13&&w){if(C)return e.setDate(e._input.value,!0,h===e.altInput?e.config.altFormat:e.config.dateFormat),h.blur();e.open()}else if(ft(h)||S||_){const B=!!e.timeContainer&&e.timeContainer.contains(h);switch(f.keyCode){case 13:B?(f.preventDefault(),s(),gr()):ti(f);break;case 27:f.preventDefault(),gr();break;case 8:case 46:w&&!e.config.allowInput&&(f.preventDefault(),e.clear());break;case 37:case 39:if(!B&&!w){if(f.preventDefault(),e.daysContainer!==void 0&&(C===!1||document.activeElement&&bn(document.activeElement))){const O=f.keyCode===39?1:-1;f.ctrlKey?(f.stopPropagation(),pr(O),I(M(1),0)):I(void 0,O)}}else e.hourElement&&e.hourElement.focus();break;case 38:case 40:f.preventDefault();const $=f.keyCode===40?1:-1;e.daysContainer&&h.$i!==void 0||h===e.input||h===e.altInput?f.ctrlKey?(f.stopPropagation(),gn(e.currentYear-$),I(M(1),0)):B||I(void 0,$*7):h===e.currentYearElement?gn(e.currentYear-$):e.config.enableTime&&(!B&&e.hourElement&&e.hourElement.focus(),s(f),e._debouncedChange());break;case 9:if(B){const O=[e.hourElement,e.minuteElement,e.secondElement,e.amPM].concat(e.pluginElements).filter(W=>W),P=O.indexOf(h);if(P!==-1){const W=O[P+(f.shiftKey?-1:1)];f.preventDefault(),(W||e._input).focus()}}else!e.config.noCalendar&&e.daysContainer&&e.daysContainer.contains(h)&&f.shiftKey&&(f.preventDefault(),e._input.focus());break}}if(e.amPM!==void 0&&h===e.amPM)switch(f.key){case e.l10n.amPM[0].charAt(0):case e.l10n.amPM[0].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[0],u(),qe();break;case e.l10n.amPM[1].charAt(0):case e.l10n.amPM[1].charAt(0).toLowerCase():e.amPM.textContent=e.l10n.amPM[1],u(),qe();break}(w||ft(h))&&J("onKeyDown",f)}function hr(f){if(e.selectedDates.length!==1||f&&(!f.classList.contains("flatpickr-day")||f.classList.contains("flatpickr-disabled")))return;const h=f?f.dateObj.getTime():e.days.firstElementChild.dateObj.getTime(),w=e.parseDate(e.selectedDates[0],void 0,!0).getTime(),C=Math.min(h,e.selectedDates[0].getTime()),S=Math.max(h,e.selectedDates[0].getTime());let _=!1,B=0,$=0;for(let O=C;O<S;O+=js.DAY)Je(new Date(O),!0)||(_=_||O>C&&O<S,O<w&&(!B||O>B)?B=O:O>w&&(!$||O<$)&&($=O));for(let O=0;O<e.config.showMonths;O++){const P=e.daysContainer.children[O];for(let W=0,Ee=P.children.length;W<Ee;W++){const ie=P.children[W],Oe=ie.dateObj.getTime(),Vt=B>0&&Oe<B||$>0&&Oe>$;if(Vt){ie.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach($t=>{ie.classList.remove($t)});continue}else if(_&&!Vt)continue;["startRange","inRange","endRange","notAllowed"].forEach($t=>{ie.classList.remove($t)}),f!==void 0&&(f.classList.add(h<=e.selectedDates[0].getTime()?"startRange":"endRange"),w<h&&Oe===w?ie.classList.add("startRange"):w>h&&Oe===w&&ie.classList.add("endRange"),Oe>=B&&($===0||Oe<=$)&&Fs(Oe,w,h)&&ie.classList.add("inRange"))}}}function wp(){e.isOpen&&!e.config.static&&!e.config.inline&&yn()}function xp(f,h=e._positionElement){if(e.isMobile===!0){if(f){f.preventDefault();const C=ye(f);C&&C.blur()}e.mobileInput!==void 0&&(e.mobileInput.focus(),e.mobileInput.click()),J("onOpen");return}else if(e._input.disabled||e.config.inline)return;const w=e.isOpen;e.isOpen=!0,w||(e.calendarContainer.classList.add("open"),e._input.classList.add("active"),J("onOpen"),yn(h)),e.config.enableTime===!0&&e.config.noCalendar===!0&&e.config.allowInput===!1&&(f===void 0||!e.timeContainer.contains(f.relatedTarget))&&setTimeout(()=>e.hourElement.select(),50)}function Xa(f){return h=>{const w=e.config[`_${f}Date`]=e.parseDate(h,e.config.dateFormat),C=e.config[`_${f==="min"?"max":"min"}Date`];w!==void 0&&(e[f==="min"?"minDateHasTime":"maxDateHasTime"]=w.getHours()>0||w.getMinutes()>0||w.getSeconds()>0),e.selectedDates&&(e.selectedDates=e.selectedDates.filter(S=>Je(S)),!e.selectedDates.length&&f==="min"&&p(w),qe()),e.daysContainer&&(ei(),w!==void 0?e.currentYearElement[f]=w.getFullYear().toString():e.currentYearElement.removeAttribute(f),e.currentYearElement.disabled=!!C&&w!==void 0&&C.getFullYear()===w.getFullYear())}}function Cp(){const f=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],h=Object.assign(Object.assign({},JSON.parse(JSON.stringify(n.dataset||{}))),r),w={};e.config.parseDate=h.parseDate,e.config.formatDate=h.formatDate,Object.defineProperty(e.config,"enable",{get:()=>e.config._enable,set:_=>{e.config._enable=ri(_)}}),Object.defineProperty(e.config,"disable",{get:()=>e.config._disable,set:_=>{e.config._disable=ri(_)}});const C=h.mode==="time";if(!h.dateFormat&&(h.enableTime||C)){const _=ee.defaultConfig.dateFormat||st.dateFormat;w.dateFormat=h.noCalendar||C?"H:i"+(h.enableSeconds?":S":""):_+" H:i"+(h.enableSeconds?":S":"")}if(h.altInput&&(h.enableTime||C)&&!h.altFormat){const _=ee.defaultConfig.altFormat||st.altFormat;w.altFormat=h.noCalendar||C?"h:i"+(h.enableSeconds?":S K":" K"):_+` h:i${h.enableSeconds?":S":""} K`}Object.defineProperty(e.config,"minDate",{get:()=>e.config._minDate,set:Xa("min")}),Object.defineProperty(e.config,"maxDate",{get:()=>e.config._maxDate,set:Xa("max")});const S=_=>B=>{e.config[_==="min"?"_minTime":"_maxTime"]=e.parseDate(B,"H:i:S")};Object.defineProperty(e.config,"minTime",{get:()=>e.config._minTime,set:S("min")}),Object.defineProperty(e.config,"maxTime",{get:()=>e.config._maxTime,set:S("max")}),h.mode==="time"&&(e.config.noCalendar=!0,e.config.enableTime=!0),Object.assign(e.config,w,h);for(let _=0;_<f.length;_++)e.config[f[_]]=e.config[f[_]]===!0||e.config[f[_]]==="true";nr.filter(_=>e.config[_]!==void 0).forEach(_=>{e.config[_]=rr(e.config[_]||[]).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 _=0;_<e.config.plugins.length;_++){const B=e.config.plugins[_](e)||{};for(const $ in B)nr.indexOf($)>-1?e.config[$]=rr(B[$]).map(i).concat(e.config[$]):typeof h[$]>"u"&&(e.config[$]=B[$])}h.altInputClass||(e.config.altInputClass=Za().className+" "+e.config.altInputClass),J("onParseConfig")}function Za(){return e.config.wrap?n.querySelector("[data-input]"):n}function Qa(){typeof e.config.locale!="object"&&typeof ee.l10ns[e.config.locale]>"u"&&e.config.errorHandler(new Error(`flatpickr: invalid locale ${e.config.locale}`)),e.l10n=Object.assign(Object.assign({},ee.l10ns.default),typeof e.config.locale=="object"?e.config.locale:e.config.locale!=="default"?ee.l10ns[e.config.locale]:void 0),ar.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&&ee.defaultConfig.time_24hr===void 0&&(e.config.time_24hr=e.l10n.time_24hr),e.formatDate=ka(e),e.parseDate=ir({config:e.config,l10n:e.l10n})}function yn(f){if(typeof e.config.position=="function")return void e.config.position(e,f);if(e.calendarContainer===void 0)return;J("onPreCalendarPosition");const h=f||e._positionElement,w=Array.prototype.reduce.call(e.calendarContainer.children,(Bt,wr)=>Bt+wr.offsetHeight,0),C=e.calendarContainer.offsetWidth,S=e.config.position.split(" "),_=S[0],B=S.length>1?S[1]:null,$=h.getBoundingClientRect(),O=window.innerHeight-$.bottom,P=_==="above"||_!=="below"&&O<w&&$.top>w,W=window.pageYOffset+$.top+(P?-w-2:h.offsetHeight+2);if(ce(e.calendarContainer,"arrowTop",!P),ce(e.calendarContainer,"arrowBottom",P),e.config.inline)return;let Ee=window.pageXOffset+$.left,ie=!1,Cn=!1;B==="center"?(Ee-=(C-$.width)/2,ie=!0):B==="right"&&(Ee-=C-$.width,Cn=!0),ce(e.calendarContainer,"arrowLeft",!ie&&!Cn),ce(e.calendarContainer,"arrowCenter",ie),ce(e.calendarContainer,"arrowRight",Cn);const Oe=window.document.body.offsetWidth-(window.pageXOffset+$.right),Vt=Ee+C>window.document.body.offsetWidth,$t=Oe+C>window.document.body.offsetWidth;if(ce(e.calendarContainer,"rightMost",Vt),!e.config.static)if(e.calendarContainer.style.top=`${W}px`,!Vt)e.calendarContainer.style.left=`${Ee}px`,e.calendarContainer.style.right="auto";else if(!$t)e.calendarContainer.style.left="auto",e.calendarContainer.style.right=`${Oe}px`;else{const Bt=kp();if(Bt===void 0)return;const wr=window.document.body.offsetWidth,Mp=Math.max(0,wr/2-C/2),Op=".flatpickr-calendar.centerMost:before",Pp=".flatpickr-calendar.centerMost:after",Ap=Bt.cssRules.length,Lp=`{left:${$.left}px;right:auto;}`;ce(e.calendarContainer,"rightMost",!1),ce(e.calendarContainer,"centerMost",!0),Bt.insertRule(`${Op},${Pp}${Lp}`,Ap),e.calendarContainer.style.left=`${Mp}px`,e.calendarContainer.style.right="auto"}}function kp(){let f=null;for(let h=0;h<document.styleSheets.length;h++){const w=document.styleSheets[h];try{w.cssRules}catch{continue}f=w;break}return f??Ep()}function Ep(){const f=document.createElement("style");return document.head.appendChild(f),f.sheet}function ei(){e.config.noCalendar||e.isMobile||(ae(),xn(),X())}function gr(){e._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(e.close,0):e.close()}function ti(f){f.preventDefault(),f.stopPropagation();const h=B=>B.classList&&B.classList.contains("flatpickr-day")&&!B.classList.contains("flatpickr-disabled")&&!B.classList.contains("notAllowed"),w=Ca(ye(f),h);if(w===void 0)return;const C=w,S=e.latestSelectedDateObj=new Date(C.dateObj.getTime()),_=(S.getMonth()<e.currentMonth||S.getMonth()>e.currentMonth+e.config.showMonths-1)&&e.config.mode!=="range";if(e.selectedDateElem=C,e.config.mode==="single")e.selectedDates=[S];else if(e.config.mode==="multiple"){const B=yr(S);B?e.selectedDates.splice(parseInt(B),1):e.selectedDates.push(S)}else e.config.mode==="range"&&(e.selectedDates.length===2&&e.clear(!1,!1),e.latestSelectedDateObj=S,e.selectedDates.push(S),we(S,e.selectedDates[0],!0)!==0&&e.selectedDates.sort((B,$)=>B.getTime()-$.getTime()));if(u(),_){const B=e.currentYear!==S.getFullYear();e.currentYear=S.getFullYear(),e.currentMonth=S.getMonth(),B&&(J("onYearChange"),ae()),J("onMonthChange")}if(xn(),X(),qe(),!_&&e.config.mode!=="range"&&e.config.showMonths===1?R(C):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 B=e.config.mode==="single"&&!e.config.enableTime,$=e.config.mode==="range"&&e.selectedDates.length===2&&!e.config.enableTime;(B||$)&&gr()}y()}const wn={locale:[Qa,Ja],showMonths:[Ka,l,Ga],minDate:[k],maxDate:[k],clickOpens:[()=>{e.config.clickOpens===!0?(b(e._input,"focus",e.open),b(e._input,"click",e.open)):(e._input.removeEventListener("focus",e.open),e._input.removeEventListener("click",e.open))}]};function _p(f,h){if(f!==null&&typeof f=="object"){Object.assign(e.config,f);for(const w in f)wn[w]!==void 0&&wn[w].forEach(C=>C())}else e.config[f]=h,wn[f]!==void 0?wn[f].forEach(w=>w()):nr.indexOf(f)>-1&&(e.config[f]=rr(h));e.redraw(),qe(!0)}function ni(f,h){let w=[];if(f instanceof Array)w=f.map(C=>e.parseDate(C,h));else if(f instanceof Date||typeof f=="number")w=[e.parseDate(f,h)];else if(typeof f=="string")switch(e.config.mode){case"single":case"time":w=[e.parseDate(f,h)];break;case"multiple":w=f.split(e.config.conjunction).map(C=>e.parseDate(C,h));break;case"range":w=f.split(e.l10n.rangeSeparator).map(C=>e.parseDate(C,h));break}else e.config.errorHandler(new Error(`Invalid date supplied: ${JSON.stringify(f)}`));e.selectedDates=e.config.allowInvalidPreload?w:w.filter(C=>C instanceof Date&&Je(C,!1)),e.config.mode==="range"&&e.selectedDates.sort((C,S)=>C.getTime()-S.getTime())}function Dp(f,h=!1,w=e.config.dateFormat){if(f!==0&&!f||f instanceof Array&&f.length===0)return e.clear(h);ni(f,w),e.latestSelectedDateObj=e.selectedDates[e.selectedDates.length-1],e.redraw(),k(void 0,h),p(),e.selectedDates.length===0&&e.clear(!1),qe(h),h&&J("onChange")}function ri(f){return f.slice().map(h=>typeof h=="string"||typeof h=="number"||h instanceof Date?e.parseDate(h,void 0,!0):h&&typeof h=="object"&&h.from&&h.to?{from:e.parseDate(h.from,void 0),to:e.parseDate(h.to,void 0)}:h).filter(h=>h)}function Np(){e.selectedDates=[],e.now=e.parseDate(e.config.now)||new Date;const f=e.config.defaultDate||((e.input.nodeName==="INPUT"||e.input.nodeName==="TEXTAREA")&&e.input.placeholder&&e.input.value===e.input.placeholder?null:e.input.value);f&&ni(f,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 Sp(){if(e.input=Za(),!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=j(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 vp(){const f=e.config.enableTime?e.config.noCalendar?"time":"datetime-local":"date";e.mobileInput=j("input",e.input.className+" flatpickr-mobile"),e.mobileInput.tabIndex=1,e.mobileInput.type=f,e.mobileInput.disabled=e.input.disabled,e.mobileInput.required=e.input.required,e.mobileInput.placeholder=e.input.placeholder,e.mobileFormatStr=f==="datetime-local"?"Y-m-d\\TH:i:S":f==="date"?"Y-m-d":"H:i:S",e.selectedDates.length>0&&(e.mobileInput.defaultValue=e.mobileInput.value=e.formatDate(e.selectedDates[0],e.mobileFormatStr)),e.config.minDate&&(e.mobileInput.min=e.formatDate(e.config.minDate,"Y-m-d")),e.config.maxDate&&(e.mobileInput.max=e.formatDate(e.config.maxDate,"Y-m-d")),e.input.getAttribute("step")&&(e.mobileInput.step=String(e.input.getAttribute("step"))),e.input.type="hidden",e.altInput!==void 0&&(e.altInput.type="hidden");try{e.input.parentNode&&e.input.parentNode.insertBefore(e.mobileInput,e.input.nextSibling)}catch{}b(e.mobileInput,"change",h=>{e.setDate(ye(h).value,!1,e.mobileFormatStr),J("onChange"),J("onClose")})}function Vp(f){if(e.isOpen===!0)return e.close();e.open(f)}function J(f,h){if(e.config===void 0)return;const w=e.config[f];if(w!==void 0&&w.length>0)for(let C=0;w[C]&&C<w.length;C++)w[C](e.selectedDates,e.input.value,e,h);f==="onChange"&&(e.input.dispatchEvent(br("change")),e.input.dispatchEvent(br("input")))}function br(f){const h=document.createEvent("Event");return h.initEvent(f,!0,!0),h}function yr(f){for(let h=0;h<e.selectedDates.length;h++)if(we(e.selectedDates[h],f)===0)return""+h;return!1}function $p(f){return e.config.mode!=="range"||e.selectedDates.length<2?!1:we(f,e.selectedDates[0])>=0&&we(f,e.selectedDates[1])<=0}function xn(){e.config.noCalendar||e.isMobile||!e.monthNav||(e.yearElements.forEach((f,h)=>{const w=new Date(e.currentYear,e.currentMonth,1);w.setMonth(e.currentMonth+h),e.config.showMonths>1||e.config.monthSelectorType==="static"?e.monthElements[h].textContent=un(w.getMonth(),e.config.shorthandCurrentMonth,e.l10n)+" ":e.monthsDropdownContainer.value=w.getMonth().toString(),f.value=w.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 oi(f){return e.selectedDates.map(h=>e.formatDate(h,f)).filter((h,w,C)=>e.config.mode!=="range"||e.config.enableTime||C.indexOf(h)===w).join(e.config.mode!=="range"?e.config.conjunction:e.l10n.rangeSeparator)}function qe(f=!0){e.mobileInput!==void 0&&e.mobileFormatStr&&(e.mobileInput.value=e.latestSelectedDateObj!==void 0?e.formatDate(e.latestSelectedDateObj,e.mobileFormatStr):""),e.input.value=oi(e.config.dateFormat),e.altInput!==void 0&&(e.altInput.value=oi(e.config.altFormat)),f!==!1&&J("onValueUpdate")}function Bp(f){const h=ye(f),w=e.prevMonthNav.contains(h),C=e.nextMonthNav.contains(h);w||C?pr(w?-1:1):e.yearElements.indexOf(h)>=0?h.select():h.classList.contains("arrowUp")?e.changeYear(e.currentYear+1):h.classList.contains("arrowDown")&&e.changeYear(e.currentYear-1)}function Tp(f){f.preventDefault();const h=f.type==="keydown",w=ye(f),C=w;e.amPM!==void 0&&w===e.amPM&&(e.amPM.textContent=e.l10n.amPM[ke(e.amPM.textContent===e.l10n.amPM[0])]);const S=parseFloat(C.getAttribute("min")),_=parseFloat(C.getAttribute("max")),B=parseFloat(C.getAttribute("step")),$=parseInt(C.value,10),O=f.delta||(h?f.which===38?1:-1:0);let P=$+B*O;if(typeof C.value<"u"&&C.value.length===2){const W=C===e.hourElement,Ee=C===e.minuteElement;P<S?(P=_+P+ke(!W)+(ke(W)&&ke(!e.amPM)),Ee&&v(void 0,-1,e.hourElement)):P>_&&(P=C===e.hourElement?P-_-ke(!e.amPM):S,Ee&&v(void 0,1,e.hourElement)),e.amPM&&W&&(B===1?P+$===23:Math.abs(P-$)>B)&&(e.amPM.textContent=e.l10n.amPM[ke(e.amPM.textContent===e.l10n.amPM[0])]),C.value=fe(P)}}return a(),e}function ct(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=Us(i,r||{}),o.push(i._flatpickr)}catch(l){console.error(l)}}return o.length===1?o[0]:o}typeof HTMLElement<"u"&&typeof HTMLCollection<"u"&&typeof NodeList<"u"&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(n){return ct(this,n)},HTMLElement.prototype.flatpickr=function(n){return ct([this],n)});var ee=function(n,r){return typeof n=="string"?ct(window.document.querySelectorAll(n),r):n instanceof Node?ct([n],r):ct(n,r)};ee.defaultConfig={},ee.l10ns={en:Object.assign({},Dt),default:Object.assign({},Dt)},ee.localize=n=>{ee.l10ns.default=Object.assign(Object.assign({},ee.l10ns.default),n)},ee.setDefaults=n=>{ee.defaultConfig=Object.assign(Object.assign({},ee.defaultConfig),n)},ee.parseDate=ir({}),ee.formatDate=ka({}),ee.compareDates=we,typeof jQuery<"u"&&typeof jQuery.fn<"u"&&(jQuery.fn.flatpickr=function(n){return ct(this,n)}),Date.prototype.fp_incr=function(n){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+(typeof n=="string"?parseInt(n,10):n))},typeof window<"u"&&(window.flatpickr=ee);const zp="",zs=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder"],fn=t.defineComponent({inheritAttrs:!1,__name:"DateRangePicker",props:t.mergeDefaults({modelValue:{},maxRange:{},startDate:{},label:{},help:{},placeholder:{}},{...Ae,maxRange:0,modelValue:()=>({maxDate:0,minDate:0}),placeholder:"mm-dd-yyyy range",startDate:0}),setup(n){const r=n,{aria:e,errorState:o,modelState:a,inputID:i,isRequired:l,onInvalid:s,validate:c}=Be(r),d=u=>{a.value=u};return t.onMounted(()=>{const u={allowInput:!0,dateFormat:"m-d-Y",mode:"range",maxDate:new Date,minDate:r.startDate,onClose:p=>{p.length===2?d({minDate:p[0].setUTCHours(0,0,0,0)/1e3,maxDate:Math.floor(p[1].setUTCHours(23,59,59,999)/1e3)}):p.length===0&&d({minDate:0,maxDate:0})}};r.modelValue.minDate!=0&&r.modelValue.maxDate!=0&&(u.defaultDate=[r.modelValue.minDate*1e3,r.modelValue.maxDate*1e3]),r.maxRange&&(u.onChange=(p,m,g)=>{if(p.length===1){var b=new Date(p[0].getTime()),y=new Date(p[0].getTime());b.setDate(b.getDate()+r.maxRange),y.setDate(y.getDate()-r.maxRange);const x=new Date;b>x&&(b=x),g.set("minDate",y),g.set("maxDate",b)}}),ee(`#${i.value}`,u)}),(u,p)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(be,{id:t.unref(e).labelledby,class:"mb-2",for:t.unref(i),label:u.label,required:t.unref(l)},null,8,["id","for","label","required"]),t.createElementVNode("input",t.mergeProps({id:t.unref(i),"aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200",t.unref(o)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],placeholder:u.placeholder},u.$attrs,{type:"text",onInput:p[0]||(p[0]=(...m)=>t.unref(c)&&t.unref(c)(...m)),onInvalid:p[1]||(p[1]=(...m)=>t.unref(s)&&t.unref(s)(...m))}),null,16,zs),t.createVNode(se,{id:t.unref(e).describedby,class:"mt-1",text:u.help},null,8,["id","text"]),t.createVNode(Ve,{id:t.unref(e).errormessage,class:"mt-0.5",text:t.unref(o)},null,8,["id","text"])]))}}),qs=["id","aria-labelledby","aria-describedby","aria-errormessage","value"],Ys=["textContent"],Ws=["value","disabled","textContent"],sr=t.defineComponent({inheritAttrs:!1,__name:"Select",props:t.mergeDefaults({modelValue:{},options:{},label:{},help:{},placeholder:{}},{...Ae,placeholder:"Select an option"}),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,inputID:o,isRequired:a,validate:i,modelState:l,errorState:s,onInvalid:c}=Be(r),d=u=>{l.value=u.target.value,i(u)};return(u,p)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(be,{id:t.unref(e).labelledby,class:"mb-2",for:t.unref(o),label:u.label,required:t.unref(a)},null,8,["id","for","label","required"]),t.createElementVNode("select",t.mergeProps({id:t.unref(o),"aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6 pl-3 pr-10","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200 disabled:opacity-100",t.unref(s)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],value:t.unref(l)},u.$attrs,{onChange:d,onInvalid:p[0]||(p[0]=(...m)=>t.unref(c)&&t.unref(c)(...m))}),[t.createElementVNode("option",{value:"",disabled:"",selected:"",textContent:t.toDisplayString(u.placeholder)},null,8,Ys),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.options,m=>(t.openBlock(),t.createElementBlock("option",{key:m.value,value:m.value,disabled:m.disabled,textContent:t.toDisplayString(m.label)},null,8,Ws))),128))],16,qs),t.createVNode(se,{id:t.unref(e).describedby,class:"mt-1",text:u.help},null,8,["id","text"]),t.createVNode(Ve,{id:t.unref(e).errormessage,class:"mt-0.5",text:t.unref(s)},null,8,["id","text"])]))}}),Ks={class:"md:flex md:items-center md:justify-between bg-white mx-auto py-4 border-t border-gray-100"},Gs={class:"flex-1 min-w-0"},Js={class:"text-lg leading-6 font-semibold text-gray-900"},Xs={class:"mt-4 flex md:mt-0 md:ml-4"},cr=t.defineComponent({__name:"DateFilter",props:{dateRange:{},sortDir:{},title:{}},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,d)=>(t.openBlock(),t.createElementBlock("div",Ks,[t.createElementVNode("div",Gs,[t.createElementVNode("h1",Js,t.toDisplayString(c.title),1)]),t.createElementVNode("div",Xs,[t.createVNode(sr,{modelValue:a.value,"onUpdate:modelValue":[d[0]||(d[0]=u=>a.value=u),l],options:i},null,8,["modelValue"]),t.createVNode(fn,{modelValue:o.value,"onUpdate:modelValue":[d[1]||(d[1]=u=>o.value=u),s],class:"ml-3"},null,8,["modelValue"])])]))}});function dt(n,r="GET",e={}){const o=t.ref(),a=t.shallowRef(),i=t.ref(!1),l=t.ref(!1),s=t.ref(!1),c=t.ref(!1);let d=0,u;const p=()=>{u!==void 0&&u.abort()},m=(g={},b={})=>{d++;const y=d;u=new AbortController,c.value=!1,l.value=!1,s.value=!0;const x={data:["PATCH","patch","POST","post","PUT","put"].includes(r)?g:{},method:r,params:["GET","get"].includes(r)?g:{},signal:u.signal,url:n};return Qe(x,{...e,...b}).then(k=>(o.value=k,a.value=void 0,c.value=!1,k),k=>{throw a.value=k,to(k)&&(c.value=!0),k}).finally(()=>{y==d&&(l.value=!0,s.value=!1),i.value=!0})};return e!=null&&e.immediate&&e.immediate===!0&&m(),{result:o,error:a,isFinished:l,isLoading:s,isAborted:c,hasFetched:i,abort:p,execute:m}}function Zs(n,r={}){return dt(n,"GET",r)}function Qs(n,r={}){return dt(n,"DELETE",r)}function ec(n,r={}){return dt(n,"PATCH",r)}function tc(n,r={}){return dt(n,"POST",r)}function nc(n,r={}){return dt(n,"PUT",r)}function Ea(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=ro.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"}),d=(m,g=!1)=>i({message:m,persistent:g,type:"success"}),u=(m,g=!1)=>i({message:m,persistent:g,type:"warning"}),p=(m="",g=!1)=>{const b=m||e.email,y=b?`Whoops! Something went wrong, please reach out to
12
12
  <a class="underline text-xy-blue" href="mailto:${b}">${b}</a>
13
- if the issue persists.`:"Whoops! Something went wrong.";return i({message:y,persistent:g,type:"error"})};return o(n||{}),{flasher:{add:i,remove:a,flash:l,error:s,warning:u,info:c,success:d,genericError:p},flashes:r,configure:o}}const rc=n=>{if(window.Flashes)for(const r of window.Flashes){if(typeof r.type>"u"){const e=r.message.split(": ");n.add({type:e[0],message:e[1]});continue}n.add(r)}};let dr;function Ge(){return dr===void 0&&(dr=Ea()),dr}const ur={error(n,r){Ge().flasher.error(n,r)},info(n,r){Ge().flasher.info(n,r)},success(n,r){Ge().flasher.success(n,r)},warning(n,r){Ge().flasher.warning(n,r)},genericError(n,r){Ge().flasher.genericError(n,r)}},oc=(n,r)=>{var d;const e=t.ref(n),o={initial:((d=e==null?void 0:e.value[0])==null?void 0:d.value)||"",paramName:"tab",...r},a=t.ref(o.initial),i=u=>!!e.value.find(p=>p.value===u),l=u=>a.value===u,c=new URLSearchParams(window.location.search).get(o.paramName);return c&&i(c)&&(a.value=c),t.watch(a,u=>{const p=new URLSearchParams(window.location.search);p.set(o.paramName,u.toString());const m=p.toString()!==""?`?${p.toString()}`:"";window.history.replaceState({tab:u},document.title,`${window.location.pathname}${m}`)}),{activeTab:a,isActiveTab:l,tabs:e}},ac=n=>{const r=t.ref(n);return t.watch(r,e=>{const o=new URLSearchParams(window.location.search);for(const i in e){const l=e[i];o.delete(i),!(l==""||l==!1||l==null||l==null)&&(Array.isArray(l)?l.forEach(s=>o.append(i,s.toString())):o.set(i,l.toString()))}const a=o.toString()!==""?`?${o.toString()}`:"";window.history.replaceState(t.toRaw(e),document.title,`${window.location.pathname}${a}`)},{deep:!0}),r},ic={class:"px-4 flex items-center justify-between sm:px-0"},lc={class:"w-0 flex-1 flex"},sc=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),cc={class:"hidden md:flex"},dc=["onClick","textContent"],uc={class:"w-0 flex-1 flex justify-end"},fc=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),pn=t.defineComponent({__name:"Paginator",props:{modelValue:{}},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",ic,[t.createElementVNode("div",lc,[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",i.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(i.modelValue.page-1),["prevent"]))},[sc,t.createTextVNode(" Previous ")],2)]),t.createElementVNode("div",cc,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,s=>(t.openBlock(),t.createElementBlock("a",{key:s,href:"#",class:t.normalizeClass(["-mt-px border-t-2 pt-4 px-4 inline-flex items-center text-sm leading-5 font-medium",i.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"]),onClick:t.withModifiers(c=>o(s),["prevent"]),textContent:t.toDisplayString(s)},null,10,dc))),128))]),t.createElementVNode("div",uc,[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",i.modelValue.page>=i.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(i.modelValue.page+1),["prevent"]))},[t.createTextVNode(" Next "),fc],2)])]))}}),pc={key:0,class:"shadow overflow-hidden sm:rounded-md border"},_a=t.defineComponent({__name:"DetailList",props:{refreshTrigger:{default:0},reloadTrigger:{default:0},title:{},url:{}},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 d={page:i.value.page,perPage:i.value.perPage,sortDir:l.value};In.get(r.url,{},Object.assign(d,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)},()=>{ur.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,d)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(cr,{"date-range":e.value,"sort-dir":l.value,title:c.title,onSortDirChanged:d[0]||(d[0]=u=>l.value=u),onDateRangeChanged:d[1]||(d[1]=u=>e.value=u)},null,8,["date-range","sort-dir","title"]),o.value?(t.openBlock(),t.createElementBlock("div",pc,[t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,(u,p)=>(t.openBlock(),t.createElementBlock("li",{key:p,class:t.normalizeClass({"border-t border-gray-200":p>0})},[t.renderSlot(c.$slots,"default",{item:u})],2))),128))])])):t.renderSlot(c.$slots,"empty",{key:1}),o.value?(t.openBlock(),t.createBlock(pn,{key:2,modelValue:i.value,"onUpdate:modelValue":[d[2]||(d[2]=u=>i.value=u),d[3]||(d[3]=u=>s(!1))]},null,8,["modelValue"])):t.createCommentVNode("",!0)]))}}),mc=["href"],Da=t.defineComponent({__name:"DownloadCell",props:{propsData:{},attribute:{}},setup(n){return(r,e)=>(t.openBlock(),t.createElementBlock("a",{href:r.propsData[r.attribute]},[t.createVNode(t.unref(rs),{class:"h-6 w-6 group-hover:text-gray-500 transition"})],8,mc))}}),hc={class:"fixed inset-0 flex flex-col items-end justify-end px-4 py-6 pointer-events-none sm:p-6 z-[45]"},gc={class:"rounded-lg ring-1 ring-black ring-opacity-5 overflow-hidden"},bc={class:"p-4"},yc={class:"flex items-center"},wc={class:"w-0 flex-1 flex justify-between"},xc=["innerHTML"],Cc={class:"ml-4 shrink-0 flex"},kc=["onClick"],Ec=[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)],mn=t.defineComponent({__name:"Flash",setup(n){const{flasher:r,flashes:e}=Ge(),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(()=>{rc(r)}),(a,i)=>(t.openBlock(),t.createBlock(t.unref(jn),null,{default:t.withCtx(()=>[t.createElementVNode("div",hc,[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",gc,[t.createElementVNode("div",bc,[t.createElementVNode("div",yc,[t.createElementVNode("div",wc,[t.createElementVNode("p",{class:"w-0 flex-1 text-sm leading-5 font-medium text-gray-900",innerHTML:s.message},null,8,xc)]),t.createElementVNode("div",Cc,[t.createElementVNode("button",{class:"inline-flex text-gray-400 focus:outline-none focus:text-gray-500 transition ease-in-out duration-150",onClick:c=>t.unref(r).remove(l)},Ec,8,kc)])])])])],2))),128))]),_:1})])]),_:1}))}}),Yp="";function _c(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 Dc(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 Nc(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 Na(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 St(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 Sc={class:"flex"},vc={class:"flex-shrink-0"},Vc={class:"ml-2.5"},$c={key:0,role:"list",class:"list-disc space-y-1 pl-5"},Bc={key:1},Tc={key:1,class:"mt-4"},Mc={class:"flex flex-col gap-y-1.5 -mx-2 sm:flex-row sm:gap-x-3 sm:items-center"},Oc={key:0},Pc=["href","role"],Ac={key:1},Lc=["href","role"],Rc={key:0,class:"ml-auto pl-3"},Ic={class:"-mx-1.5 -my-1.5"},Fc=t.createElementVNode("span",{class:"sr-only"},"close",-1),Sa=t.defineComponent({__name:"InlineAlert",props:{btnLink:{default:""},btnText:{default:""},content:{},dismissable:{type:Boolean,default:!1},secondaryBtnLink:{default:""},secondaryBtnText:{default:""},title:{default:""},kind:{}},emits:["close","click","click:secondary"],setup(n,{emit:r}){const e=n,o=t.ref(!0),a=()=>{o.value=!1,r("close",!0)},i=t.computed(()=>{const s={bgColor:"",btnAction:"",btnClose:"",contentColor:"",iconColor:""};switch(e.kind){case"alert":s.bgColor="bg-red-50",s.btnAction="bg-red-50 text-red-900 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50",s.btnClose="bg-red-50 text-red-600 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50",s.contentColor="text-red-800",s.iconColor="text-red-400";break;case"info":s.bgColor="bg-blue-50",s.btnAction="bg-blue-50 text-blue-900 hover:bg-blue-100 focus:ring-blue-600 focus:ring-offset-blue-50",s.btnClose="bg-blue-50 text-blue-600 hover:bg-blue-100 focus:ring-blue-600 focus:ring-offset-blue-50",s.contentColor="text-blue-800",s.iconColor="text-blue-400";break;case"success":s.bgColor="bg-emerald-50",s.btnAction="bg-emerald-50 text-emerald-900 hover:bg-emerald-100 focus:ring-emerald-600 focus:ring-offset-emerald-50",s.btnClose="bg-emerald-50 text-emerald-600 hover:bg-emerald-100 focus:ring-emerald-600 focus:ring-offset-emerald-50",s.contentColor="text-emerald-800",s.iconColor="text-emerald-400";break;case"warn":s.bgColor="bg-amber-50",s.btnAction="bg-amber-50 text-amber-900 hover:bg-amber-100 focus:ring-amber-600 focus:ring-offset-amber-50",s.btnClose="bg-amber-50 text-amber-600 hover:bg-amber-100 focus:ring-amber-600 focus:ring-offset-amber-50",s.contentColor="text-amber-800",s.iconColor="text-amber-400";break}return s}),l=t.computed(()=>{let s=null;switch(e.kind){case"alert":s=is;break;case"info":s=as;break;case"success":s=qo;break;case"warn":s=os;break}return s});return(s,c)=>o.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["rounded-lg p-4",i.value.bgColor])},[t.createElementVNode("div",Sc,[t.createElementVNode("div",vc,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.value),{class:t.normalizeClass(["h-5 w-5",i.value.iconColor]),"aria-hidden":"true"},null,8,["class"]))]),t.createElementVNode("div",Vc,[s.title?(t.openBlock(),t.createElementBlock("h3",{key:0,class:t.normalizeClass(["text-sm leading-snug font-semibold mb-1.5",i.value.contentColor])},t.toDisplayString(s.title),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["text-sm",i.value.contentColor])},[Array.isArray(s.content)?(t.openBlock(),t.createElementBlock("ul",$c,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.content,(d,u)=>(t.openBlock(),t.createElementBlock("li",{key:u},t.toDisplayString(d),1))),128))])):(t.openBlock(),t.createElementBlock("p",Bc,t.toDisplayString(s.content),1))],2),s.btnText||s.secondaryBtnText?(t.openBlock(),t.createElementBlock("div",Tc,[t.createElementVNode("div",Mc,[s.btnText?(t.openBlock(),t.createElementBlock("div",Oc,[t.createElementVNode("a",{class:t.normalizeClass(["inline-flex rounded-md px-2 py-1.5 text-sm font-medium focus:outline-none focus:ring-2 focus:ring-offset-2",i.value.btnAction]),href:s.btnLink,role:s.btnLink?"link":"button",onClick:c[0]||(c[0]=d=>s.$emit("click",d))},t.toDisplayString(s.btnText),11,Pc)])):t.createCommentVNode("",!0),s.secondaryBtnText?(t.openBlock(),t.createElementBlock("div",Ac,[t.createElementVNode("a",{class:t.normalizeClass(["inline-flex rounded-md px-2 py-1.5 text-sm font-medium focus:outline-none focus:ring-2 focus:ring-offset-2",i.value.btnAction]),href:s.secondaryBtnLink,role:s.secondaryBtnLink?"link":"button",onClick:c[1]||(c[1]=d=>s.$emit("click:secondary",d))},t.toDisplayString(s.secondaryBtnText),11,Lc)])):t.createCommentVNode("",!0)])])):t.createCommentVNode("",!0)]),s.dismissable?(t.openBlock(),t.createElementBlock("div",Rc,[t.createElementVNode("div",Ic,[t.createElementVNode("button",{class:t.normalizeClass(["inline-flex rounded-md p-1.5 focus:outline-none focus:ring-2 focus:ring-offset-2",i.value.btnClose]),type:"button",onClick:a},[Fc,t.createVNode(t.unref(St),{class:"h-4 w-4"})],2)])])):t.createCommentVNode("",!0)])],2)):t.createCommentVNode("",!0)}}),jc={class:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"},Hc=t.createElementVNode("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"​",-1),Uc={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"},zc={class:"block absolute top-0 right-0 pt-4 pr-4"},qc=t.createElementVNode("span",{class:"sr-only"},"Close",-1),Yc={class:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Wc={class:"mt-3 sm:mt-0 sm:text-left"},Kc={class:"mt-2"},Gc={key:0,class:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},Jc=["disabled","textContent"],va=t.defineComponent({__name:"Modal",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(Ct),{as:"template",show:a.modelValue},{default:t.withCtx(()=>[t.createVNode(t.unref(Jt),{as:"div",static:"",class:"fixed z-30 inset-0 overflow-y-auto",open:a.modelValue,onClose:i[3]||(i[3]=l=>o(!1))},{default:t.withCtx(()=>[t.createElementVNode("div",jc,[t.createVNode(t.unref(Le),{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(Xt),{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})]),_:1}),Hc,t.createVNode(t.unref(Le),{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",Uc,[t.createElementVNode("div",zc,[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))},[qc,t.createVNode(t.unref(St),{class:"h-6 w-6","aria-hidden":"true"})])]),t.createElementVNode("div",Yc,[t.createElementVNode("div",Wc,[t.createVNode(t.unref(zn),{as:"h3",class:"text-center text-lg leading-6 font-medium text-gray-900"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a.title),1)]),_:1}),t.createElementVNode("div",Kc,[t.renderSlot(a.$slots,"default")])])]),a.submitText?(t.openBlock(),t.createElementBlock("div",Gc,[t.createElementVNode("button",{type:"button",class:t.normalizeClass(["xy-btn w-full sm:ml-3 sm:w-auto sm:text-sm",[a.destructive?"xy-btn-red":"xy-btn"]]),disabled:a.disabled,onClick:i[1]||(i[1]=l=>e()),textContent:t.toDisplayString(a.submitText)},null,10,Jc),t.createElementVNode("button",{ref:"cancelButtonRef",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))}," Cancel ",512)])):t.createCommentVNode("",!0),t.renderSlot(a.$slots,"buttons")])]),_:3})])]),_:3},8,["open"])]),_:3},8,["show"]))}}),Xc={class:"aspect-square overflow-hidden"},Zc={class:"flex justify-center relative"},Qc={class:"sr-only"},ed=t.createElementVNode("div",{class:"animate-spin-gear drop-shadow-sm"},[t.createElementVNode("svg",{class:"h-full w-full text-xy-green-300",viewBox:"0 0 129 129",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[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:"currentColor",mask:"url(#mask-2)"})])])])])],-1),td=t.createElementVNode("div",{class:"absolute top-0 left-0 right-0 bottom-0 flex justify-center items-center transform scale-50"},[t.createElementVNode("svg",{viewBox:"0 0 280 280",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[t.createElementVNode("path",{class:"fill-xy-green",d:"m17.57,94.37c-3.36,13.54-5.07,28.73-5.07,45.63,0,32.02,6.04,58,18.1,77.95,3.81,4.98,7.46,9.94,10.95,14.66,21.21,23.24,54.01,34.89,98.45,34.89.71,0,1.39-.03,2.09-.03-3.62-46.93-22.27-88.31-54.36-124.11-19.79-22.07-42.96-38.86-70.16-48.99Z"}),t.createElementVNode("path",{class:"fill-xy-blue",d:"m267.5,140c0-85-42.5-127.5-127.5-127.5-55.06,0-92.27,17.86-111.66,53.53,28.32,8.48,56.67,16.85,84.98,25.37,27.05,8.14,54.01,16.55,81.06,24.67,5.45,1.64,7.5,4.76,6.63,10.27-.69,4.35-1.04,8.75-1.57,13.13-4.95,40.77-8.32,81.74-12.43,122.61,53.64-13.88,80.49-54.56,80.49-122.08Z"})])],-1),fr=t.defineComponent({__name:"XYSpinner",setup(n){const r=t.useAttrs();return(e,o)=>{var a,i;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass((a=t.unref(r))!=null&&a.class?(i=t.unref(r))==null?void 0:i.class:"h-20 w-20"),role:"status"},[t.createElementVNode("div",Xc,[t.createElementVNode("div",Zc,[t.createElementVNode("p",Qc,[t.renderSlot(e.$slots,"default",{},()=>[t.createTextVNode("loading")])]),ed,td])])],2)}}}),nd={key:0,class:"fixed top-0 left-0 flex flex-col items-center justify-center w-full h-full cursor-not-allowed z-40 bg-gray-50 bg-opacity-60"},rd={class:"mt-2"},hn=t.defineComponent({__name:"Spinner",setup(n){const{idx:r,loading:e,maxIdx:o,messages:a,msg:i,showMsg:l}=Qr(),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(d,u)=>(t.openBlock(),t.createBlock(t.unref(jn),null,{default:t.withCtx(()=>[t.unref(e)?(t.openBlock(),t.createElementBlock("div",nd,[t.createVNode(fr,{class:"w-32 h-32"}),t.withDirectives(t.createElementVNode("div",rd,[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}))}}),od={class:"h-screen flex overflow-hidden bg-gray-100"},ad={class:"relative flex-1 flex flex-col max-w-xs w-full pt-5 pb-4 bg-white"},id={class:"absolute top-0 right-0 -mr-12 pt-2"},ld=t.createElementVNode("span",{class:"sr-only"},"Close sidebar",-1),sd={class:"shrink-0 flex justify-center px-4"},cd=["src"],dd={class:"mt-5 flex flex-col flex-1 h-0 overflow-y-auto"},ud={class:"flex-1 px-2 space-y-1"},fd=["href","target"],pd={key:0,class:"mt-auto"},md={class:"mt-6 px-2"},hd=t.createElementVNode("div",{class:"shrink-0 w-14","aria-hidden":"true"},null,-1),gd={class:"hidden lg:flex lg:shrink-0"},bd={class:"flex flex-col w-64"},yd={class:"flex flex-col grow border-r border-gray-200 pt-5 pb-4 bg-white overflow-y-auto"},wd={class:"flex justify-center shrink-0 px-4"},xd=["src"],Cd={class:"mt-5 grow flex flex-col"},kd={class:"flex-1 px-2 bg-white space-y-1"},Ed=["href","target"],_d={key:0,class:"mt-atuo"},Dd={class:"mt-6 px-2"},Nd={class:"flex flex-col w-0 flex-1 overflow-hidden"},Sd={class:"relative z-10 shrink-0 flex h-16 bg-xy-blue shadow"},vd=t.createElementVNode("span",{class:"sr-only"},"Open sidebar",-1),Vd={class:"flex-1 px-4 flex justify-between"},$d={class:"flex-1 flex"},Bd={class:"flex items-center text-2xl text-white"},Td={class:"ml-4 flex items-center lg:ml-6"},Md=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1),Od=["href"],Pd={class:"flex-1 relative overflow-y-auto focus:outline-none"},Ad={class:"mx-auto"},Va=t.defineComponent({__name:"SidebarLayout",props:{activeUrl:{default:""},iconUrl:{},navigation:{},userNavigation:{}},setup(n){const r=n,e=t.ref(!1),o=a=>r.activeUrl===a;return(a,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",od,[t.createVNode(t.unref(Ct),{as:"template",show:e.value},{default:t.withCtx(()=>[t.createVNode(t.unref(Jt),{as:"div",static:"",class:"fixed inset-0 flex z-10 lg:hidden",open:e.value,onClose:i[1]||(i[1]=l=>e.value=!1)},{default:t.withCtx(()=>[t.createVNode(t.unref(Le),{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(Xt),{class:"fixed inset-0 bg-gray-600 bg-opacity-75"})]),_:1}),t.createVNode(t.unref(Le),{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",ad,[t.createVNode(t.unref(Le),{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",id,[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)},[ld,t.createVNode(t.unref(St),{class:"h-6 w-6 text-white","aria-hidden":"true"})])])]),_:1}),t.createElementVNode("div",sd,[t.createElementVNode("img",{class:"w-auto h-12",src:a.iconUrl,alt:"Logo"},null,8,cd)]),t.createElementVNode("div",dd,[t.createElementVNode("nav",ud,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([o(l.url)?"bg-gray-100 text-gray-900":"text-gray-700 hover:bg-gray-50 hover:text-gray-900","group flex items-center px-2 py-2 text-base font-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,fd))),128))]),a.$slots["sidebar-bottom"]?(t.openBlock(),t.createElementBlock("div",pd,[t.createElementVNode("div",md,[t.renderSlot(a.$slots,"sidebar-bottom")])])):t.createCommentVNode("",!0)])])]),_:3}),hd]),_:3},8,["open"])]),_:3},8,["show"]),t.createElementVNode("div",gd,[t.createElementVNode("div",bd,[t.createElementVNode("div",yd,[t.createElementVNode("div",wd,[t.createElementVNode("img",{class:"w-auto h-12",src:a.iconUrl,alt:"Logo"},null,8,xd)]),t.createElementVNode("div",Cd,[t.createElementVNode("nav",kd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([o(l.url)?"bg-gray-100 text-gray-900":"text-gray-700 hover:bg-gray-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,Ed))),128))]),a.$slots["sidebar-bottom"]?(t.openBlock(),t.createElementBlock("div",_d,[t.createElementVNode("div",Dd,[t.renderSlot(a.$slots,"sidebar-bottom")])])):t.createCommentVNode("",!0)])])])]),t.createElementVNode("div",Nd,[t.createElementVNode("div",Sd,[t.createElementVNode("button",{class:"px-4 border-r border-gray-200 text-white focus:outline-none focus:ring-2 focus:ring-inset focus:ring-blue-500 lg:hidden",onClick:i[2]||(i[2]=l=>e.value=!0)},[vd,t.createVNode(t.unref(Dc),{class:"h-6 w-6","aria-hidden":"true"})]),t.createElementVNode("div",Vd,[t.createElementVNode("div",$d,[t.createElementVNode("h1",Bd,[t.renderSlot(a.$slots,"header")])]),t.createElementVNode("div",Td,[t.createVNode(t.unref(qn),{as:"div",class:"ml-3 relative"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(Yn),{class:"max-w-xs flex items-center text-sm text-white rounded-full hover:bg-blue-900 hover:text-gray-50 focus:outline-none focus:ring focus:text-white"},{default:t.withCtx(()=>[Md,t.createVNode(t.unref(ts),{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(Wn),{class:"origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.userNavigation,l=>(t.openBlock(),t.createBlock(t.unref(Kn),{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,Od)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})])])]),t.createElementVNode("main",Pd,[t.createElementVNode("div",Ad,[t.renderSlot(a.$slots,"default")])])])]),t.createVNode(mn),t.createVNode(hn)],64))}}),vt=t.defineComponent({__name:"Popover",props:{as:{default:"div"},position:{default:"auto"}},setup(n){const r=n,e=t.ref(null),o=t.ref(null),a=t.computed(()=>{const s=[bs(5),ws()];return r.position==="auto"&&s.push(gs()),s}),i=t.computed(()=>{if(r.position!=="auto")return r.position}),{floatingStyles:l}=ba(e,o,{middleware:a,placement:i,strategy:"fixed",whileElementsMounted:pa});return(s,c)=>(t.openBlock(),t.createBlock(t.unref(Mo),{as:s.as,class:"relative"},{default:t.withCtx(({open:d,close:u})=>[t.createVNode(t.unref(Hl),{ref_key:"trigger",ref:e},{default:t.withCtx(()=>[t.renderSlot(s.$slots,"button",{open:d,close:u})]),_:2},1536),t.createElementVNode("div",{ref_key:"wrapper",ref:o,class:"z-[5]",style:t.normalizeStyle(t.unref(l))},[t.createVNode(t.unref(Ul),null,{default:t.withCtx(()=>[t.renderSlot(s.$slots,"default",{open:d,close:u})]),_:2},1024)],4)]),_:3},8,["as"]))}}),Ld=(n,r)=>{const e=n.__vccOpts||n;for(const[o,a]of r)e[o]=a;return e},Rd={},Id={class:"w-full max-w-xs bg-white rounded-md p-2 border border-gray-100 shadow-md"};function Fd(n,r){return t.openBlock(),t.createElementBlock("div",Id,[t.renderSlot(n.$slots,"default")])}const $a=Ld(Rd,[["render",Fd]]),jd={class:"absolute inset-0 overflow-hidden"},Hd={class:"fixed inset-y-0 right-0 pl-10 max-w-full flex"},Ud={class:"w-screen max-w-md"},zd={class:"h-full flex flex-col bg-white shadow-xl overflow-y-scroll"},qd={class:"py-6 px-4 bg-xy-blue-700 sm:px-6"},Yd={class:"flex items-center justify-between"},Wd={class:"ml-3 h-7 flex items-center"},Kd=t.createElementVNode("span",{class:"sr-only"},"Close panel",-1),Gd={class:"mt-1"},Jd=["textContent"],Xd={class:"relative flex-1 py-6 px-4 sm:px-6"},Ba=t.defineComponent({__name:"Slideover",props:{header:{},description:{},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(Ct),{as:"template",show:i.modelValue},{default:t.withCtx(()=>[t.createVNode(t.unref(Jt),{as:"div",static:"",class:"fixed inset-0 z-20 overflow-hidden bg-black bg-opacity-50",open:i.modelValue,onClose:l[1]||(l[1]=s=>a())},{default:t.withCtx(()=>[t.createElementVNode("div",jd,[t.createVNode(t.unref(Xt),{class:"absolute inset-0"}),t.createElementVNode("div",Hd,[t.createVNode(t.unref(Le),{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",Ud,[t.createElementVNode("div",zd,[t.createElementVNode("div",qd,[t.createElementVNode("div",Yd,[t.createVNode(t.unref(zn),{as:"h3",class:"text-white"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.header),1)]),_:1}),t.createElementVNode("div",Wd,[t.createElementVNode("button",{class:"bg-xy-blue-600 rounded-md text-gray-50 hover:text-white focus:outline-none focus:ring-2 focus:ring-white",onClick:l[0]||(l[0]=s=>a())},[Kd,t.createVNode(t.unref(St),{class:"h-6 w-6","aria-hidden":"true"})])])]),t.createElementVNode("div",Gd,[t.createElementVNode("p",{class:"text-gray-50 text-base font-medium",textContent:t.toDisplayString(i.description)},null,8,Jd)])]),t.createElementVNode("div",Xd,[t.renderSlot(i.$slots,"default")]),t.renderSlot(i.$slots,"footer")])])]),_:3})])])]),_:3},8,["open"])]),_:3},8,["show"]))}}),Zd=["onMouseover","onMouseleave"],Qd=t.createElementVNode("div",{class:"p-5 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"},null,-1),eu=["onMouseleave"],tu={class:"max-w-xs"},Ta=t.defineComponent({__name:"Tooltip",props:{as:{default:"span"},position:{default:"auto"}},setup(n){var r=!1,e=null;const o=i=>{r=!1,e&&clearTimeout(e),e=setTimeout(()=>{r||i()},100)},a=(i,l)=>{r=!0,!l&&i.target&&i.target.click()};return(i,l)=>(t.openBlock(),t.createBlock(vt,{position:i.position,as:i.as},{button:t.withCtx(({open:s,close:c})=>[t.createElementVNode("div",{class:"leading-none relative w-4 h-4",onMouseover:d=>a(d,s),onMouseleave:d=>o(c)},[t.createVNode(t.unref(_c)),Qd],40,Zd)]),default:t.withCtx(({close:s})=>[t.createElementVNode("div",{class:"sm:min-w-max bg-white rounded-md px-3 py-2 border border-gray-100 drop-shadow-md text-xs text-gray-900 leading-snug font-medium",onMouseover:l[0]||(l[0]=t.withModifiers(c=>t.isRef(r)?r.value=!0:r=!0,["prevent"])),onMouseleave:t.withModifiers(c=>o(s),["prevent"])},[t.createElementVNode("div",tu,[t.renderSlot(i.$slots,"default")])],40,eu)]),_:3},8,["position","as"]))}}),nu={class:"min-h-screen bg-gray-100"},ru={class:"mx-auto px-4 sm:px-6 lg:px-8"},ou={class:"flex justify-between h-16"},au={class:"flex"},iu={class:"shrink-0 flex items-center"},lu=["src"],su={class:"hidden sm:-my-px sm:ml-6 sm:flex sm:space-x-8"},cu=["href","aria-current"],du={class:"hidden sm:ml-6 sm:flex sm:items-center"},uu=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1),fu=["href"],pu={class:"-mr-2 flex items-center sm:hidden"},mu=t.createElementVNode("span",{class:"sr-only"},"Open main menu",-1),hu={class:"pt-2 pb-3 space-y-1"},gu=["href","aria-current"],bu={class:"pt-4 pb-3 border-t border-gray-200"},yu={class:"flex items-center px-4"},wu={class:"shrink-0"},xu={class:"ml-3"},Cu=["textContent"],ku=["textContent"],Eu={class:"mt-3 space-y-1"},_u=["href"],Du={class:"mx-auto sm:px-6 lg:px-8"},Nu={class:"px-4 py-8 sm:px-0"},Ma=t.defineComponent({__name:"StackedLayout",props:{activeUrl:{default:""},currentUser:{},iconUrl:{},navigation:{},userNavigation:{}},setup(n){const r=n,e=o=>r.activeUrl===o;return(o,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",nu,[t.createVNode(t.unref(Ol),{as:"nav",class:"bg-white shadow-sm"},{default:t.withCtx(({open:i})=>[t.createElementVNode("div",ru,[t.createElementVNode("div",ou,[t.createElementVNode("div",au,[t.createElementVNode("div",iu,[t.createElementVNode("img",{class:"block h-8 w-auto",src:o.iconUrl,alt:"XY Trees"},null,8,lu)]),t.createElementVNode("div",su,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([e(l.url)?"border-blue-500 text-gray-900":"border-transparent text-gray-700 hover:text-gray-900 hover:border-blue-500","inline-flex items-center px-1 pt-1 border-b-2 text-sm font-semibold"]),"aria-current":e(l.url)?"page":void 0},t.toDisplayString(l.name),11,cu))),128))])]),t.createElementVNode("div",du,[t.createVNode(t.unref(qn),{as:"div",class:"ml-3 relative"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(Yn),{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(()=>[uu,t.createVNode(t.unref(Na),{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(Wn),{class:"origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.userNavigation,l=>(t.openBlock(),t.createBlock(t.unref(Kn),{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,fu)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})]),t.createElementVNode("div",pu,[t.createVNode(t.unref(Pl),{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(()=>[mu,i?(t.openBlock(),t.createBlock(t.unref(St),{key:1,class:"block h-6 w-6","aria-hidden":"true"})):(t.openBlock(),t.createBlock(t.unref(Nc),{key:0,class:"block h-6 w-6","aria-hidden":"true"}))]),_:2},1024)])])]),t.createVNode(t.unref(Al),{class:"sm:hidden"},{default:t.withCtx(()=>[t.createElementVNode("div",hu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([e(l.url)?"bg-blue-50 border-blue-500 text-blue-700":"border-transparent text-gray-700 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-900","block pl-3 pr-4 py-2 border-l-4 text-base font-semibold"]),"aria-current":e(l.url)?"page":void 0},t.toDisplayString(l.name),11,gu))),128))]),t.createElementVNode("div",bu,[t.createElementVNode("div",yu,[t.createElementVNode("div",wu,[t.createVNode(t.unref(Na),{class:"text-gray-500 h-10 w-10 rounded-full"})]),t.createElementVNode("div",xu,[o.currentUser.name?(t.openBlock(),t.createElementBlock("div",{key:0,class:"text-base font-medium text-gray-800",textContent:t.toDisplayString(o.currentUser.name)},null,8,Cu)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"text-sm font-medium text-gray-500",textContent:t.toDisplayString(o.currentUser.email)},null,8,ku)])]),t.createElementVNode("div",Eu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.userNavigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:"block px-4 py-2 text-base font-medium text-gray-700 hover:text-gray-900 hover:bg-gray-100"},t.toDisplayString(l.name),9,_u))),128))])])]),_:1})]),_:1}),t.renderSlot(o.$slots,"header"),t.createElementVNode("main",null,[t.createElementVNode("div",Du,[t.createElementVNode("div",Nu,[t.renderSlot(o.$slots,"default")])])])]),t.createVNode(mn),t.createVNode(hn)],64))}}),Su=n=>n==null,vu={refresh(){console.warn("refresh() was called on a static table, did you mean to use DynamicTable?")},reset(){console.warn("reset() was called on a static table, did you mean to use DynamicTable?")}},Oa=(n,r,e,o=vu)=>{const a=t.ref(r),i=t.ref(n),l=t.ref(e),s=t.computed(()=>l.value.actions.length>0),c=t.computed(()=>a.value.map(u=>{let p="";switch((u==null?void 0:u.alignment)||"left"){case"left":p="text-left";break;case"right":p="text-right";break;case"center":p="text-center";break}return{...u,alignment:p}})),d=t.computed(()=>i.value.map((u,p)=>({actions:l.value.actions.map(m=>({...m,disabled:typeof m.disabled=="function"?m.disabled.apply(void 0,[u,p]):m.disabled,onClick:()=>m.onClick(u,p,o),show:typeof m.show=="function"?m.show.apply(void 0,[u,p]):m.show})),rowData:u,cells:c.value.map(m=>{const g=typeof m.render=="string"?u[m.render]:m.render(u,p),b=(m==null?void 0:m.classNames)||"";return{...m,isComponent:t.isVNode(g),classNames:typeof b=="function"?b.apply(void 0,[u,p]):b,val:g}})})));return{columns:c,hasActions:s,isEmptyCellValue:Su,rows:d}},Vu={key:0,class:"flex items-center space-x-2 justify-end"},$u={class:"isolate inline-flex rounded-md shadow-sm"},Bu=["disabled","onClick"],Tu={class:"relative inline-flex items-center gap-x-1.5"},Pa=t.defineComponent({__name:"TableActionButtons",props:{actions:{default:()=>[]}},setup(n){const r=n,{actions:e,hasActions:o}=Yo(t.toRef(r,"actions"));return(a,i)=>t.unref(o)?(t.openBlock(),t.createElementBlock("div",Vu,[t.createElementVNode("span",$u,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(e),(l,s)=>(t.openBlock(),t.createElementBlock("button",{key:s,type:"button",class:t.normalizeClass(["group relative inline-flex items-center bg-white px-3 py-2 text-sm font-semibold text-gray-700 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10 disabled:text-gray-400 disabled:cursor-not-allowed",{"rounded-l-md":s===0,"-ml-px":s>0,"rounded-r-md":s===t.unref(e).length-1}]),disabled:l.disabled,onClick:t.withModifiers(l.onClick,["stop"])},[t.createElementVNode("span",Tu,[l.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.icon),{key:0,class:t.normalizeClass(["-ml-0.5 h-4 w-4 group-disabled:text-gray-300",l.label?"text-gray-400":"text-gray-600"]),"aria-hidden":"true"},null,8,["class"])):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(l.label),1)])],10,Bu))),128))])])):t.createCommentVNode("",!0)}}),Mu={class:"flex flex-col"},Ou={class:"-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"},Pu={class:"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8"},Au={class:"overflow-hidden border-b border-gray-200 shadow sm:rounded-lg"},Lu={class:"min-w-full divide-y divide-gray-200"},Ru={key:0,class:"px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase bg-gray-50 leading-4"},Iu={class:"bg-white divide-y divide-gray-200"},Fu={key:0,class:"px-6 py-2 text-sm text-gray-700 whitespace-nowrap leading-5"},ju={key:0},Hu=["colspan"],Aa=t.defineComponent({__name:"DataTable",props:{tableActions:{default:()=>({type:"dropdown",actions:[]})},tableColumns:{},tableData:{}},setup(n){const r=n,{columns:e,hasActions:o,isEmptyCellValue:a,rows:i}=Oa(t.toRef(r,"tableData"),t.toRef(r,"tableColumns"),t.toRef(r,"tableActions"));return(l,s)=>(t.openBlock(),t.createElementBlock("div",Mu,[t.createElementVNode("div",Ou,[t.createElementVNode("div",Pu,[t.createElementVNode("div",Au,[t.createElementVNode("table",Lu,[t.createElementVNode("thead",null,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(e),(c,d)=>(t.openBlock(),t.createElementBlock("th",{key:d,class:t.normalizeClass(["px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase bg-gray-50 leading-4",c.alignment])},t.toDisplayString(c.title),3))),128)),t.unref(o)?(t.openBlock(),t.createElementBlock("th",Ru)):t.createCommentVNode("",!0)])]),t.createElementVNode("tbody",Iu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(i),(c,d)=>(t.openBlock(),t.createElementBlock("tr",{key:d},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.cells,(u,p)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent("td"),{key:p,class:t.normalizeClass(["px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5",u.alignment])},{default:t.withCtx(()=>[u.isComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u.val),{key:0})):(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(u.classNames)},t.toDisplayString(t.unref(a)(u.val)?"-":String(u.val)),3))]),_:2},1032,["class"]))),128)),t.unref(o)?(t.openBlock(),t.createElementBlock("td",Fu,[l.tableActions.type==="dropdown"?(t.openBlock(),t.createBlock(t.unref(sn),{key:0,actions:c.actions},null,8,["actions"])):(t.openBlock(),t.createBlock(Pa,{key:1,actions:c.actions},null,8,["actions"]))])):t.createCommentVNode("",!0)]))),128)),t.unref(i).length===0?(t.openBlock(),t.createElementBlock("tr",ju,[t.createElementVNode("td",{colspan:t.unref(e).length,class:"px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5"}," No items were found! ",8,Hu)])):t.createCommentVNode("",!0)])])])])])]))}}),Uu={class:"flex items-center justify-center space-x-8"},zu={class:"font-medium"},qu={class:"flex items-center space-x-5"},Yu={key:0,class:"block w-2.5 h-2.5 bg-xy-green rounded-full hover:bg-green-900 focus:bg-green-900"},Wu={key:1,class:"relative flex items-center justify-center"},Ku=[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)],Gu={key:2,href:"#",class:"block w-2.5 h-2.5 bg-gray-200 rounded-full hover:bg-gray-400 focus:bg-gray-400"},Ju={key:0,class:"flex shrink-0"},Xu={key:0,class:"inline-flex rounded-md shadow-sm"},Zu=["textContent"],Qu={class:"ml-3 inline-flex rounded-md shadow-sm"},ef=["textContent"],La=t.defineComponent({__name:"Steps",props:{hideActions:{type:Boolean,default:!1},hidePrevious:{type:Boolean,default:!1},nextText:{default:"Next"},previousText:{default:"Back"},step:{},total:{}},emits:["next","previous"],setup(n,{emit:r}){const e=()=>{r("next")},o=()=>{r("previous")};return(a,i)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("nav",Uu,[t.createElementVNode("p",zu,"Step "+t.toDisplayString(a.step)+" of "+t.toDisplayString(a.total),1),t.createElementVNode("ul",qu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.total,l=>(t.openBlock(),t.createElementBlock("li",{key:l},[a.step>l?(t.openBlock(),t.createElementBlock("span",Yu)):a.step===l?(t.openBlock(),t.createElementBlock("div",Wu,Ku)):(t.openBlock(),t.createElementBlock("span",Gu))]))),128))])]),a.hideActions?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Ju,[a.hidePrevious?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",Xu,[t.createElementVNode("button",{type:"button",class:"xy-btn-white",onClick:o,textContent:t.toDisplayString(a.previousText)},null,8,Zu)])),t.createElementVNode("span",Qu,[t.createElementVNode("button",{type:"button",class:"xy-btn",onClick:e,textContent:t.toDisplayString(a.nextText)},null,8,ef)])]))]))}}),tf={class:"flex flex-col mb-4 space-y-4 lg:space-y-0 lg:flex-row lg:justify-between"},nf={key:0,class:"w-full max-w-lg lg:max-w-xs"},rf=t.createElementVNode("label",{for:"table-search",class:"sr-only"},"Search",-1),of={class:"flex items-center gap-x-2"},af=t.createElementVNode("div",{"aria-hidden":"true",class:"shrink-0 aspect-square rounded-full bg-gray-50 text-gray-400 h-10 w-10 flex items-center justify-center pointer-events-none"},[t.createElementVNode("svg",{class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z","clip-rule":"evenodd"})])],-1),lf={class:"flex-1"},sf={key:1,class:"w-full max-w-lg lg:max-w-xs"},cf=t.createElementVNode("label",{for:"table-date-range",class:"sr-only"},"Date Range",-1),df={class:"flex items-center gap-x-2"},uf=t.createElementVNode("div",{"aria-hidden":"true",class:"shrink-0 aspect-square rounded-full bg-gray-50 text-gray-400 h-10 w-10 flex items-center justify-center pointer-events-none"},[t.createElementVNode("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})])],-1),ff={class:"flex-1"},pf={class:"relative z-0 min-w-full align-middle border-b border-gray-200 shadow sm:rounded-lg overflow-x-auto"},mf={class:"min-w-full divide-y divide-gray-200"},hf={key:0},gf=["onClick"],bf={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",class:"h-5 inline"},yf=[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)],wf={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},xf=[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)],Cf={key:2,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},kf=[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)],Ef={key:0,class:"px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase bg-gray-50 leading-4"},_f={class:"bg-white divide-y divide-gray-200"},Df=["onClick"],Nf={key:0,class:"px-6 py-2 text-sm text-gray-700 whitespace-nowrap leading-5"},Sf={key:0},vf=["colspan"],Ra=t.defineComponent({__name:"DynamicTable",props:{tableActions:{default:()=>({type:"dropdown",actions:[]})},tableColumns:{},tableOptions:{}},emits:["click:row"],setup(n,{expose:r}){const e=n,o=()=>{const A={minDate:b.value.minDate,maxDate:b.value.maxDate,page:y.value.page,perPage:y.value.perPage,sort:m.value,sortDir:g.value,q:x.value};In.get(e.tableOptions.url,{skipLoader:!1},A).then(R=>{y.value={page:R.data.page,perPage:R.data.perPage,totalItems:R.data.totalItems,totalPages:R.data.totalPages},l.value=R.data.items},()=>{ur.genericError()})},a=()=>{y.value.page=1,o()},i=()=>{if(v.value.maxRange){const A=new Date,R=A.setDate(A.getDate()-v.value.maxRange),M=new Date;b.value={minDate:Math.floor(R/1e3),maxDate:Math.floor(M.getTime()/1e3)}}},l=t.ref([]),s={refresh:o,reset:a},{columns:c,hasActions:d,isEmptyCellValue:u,rows:p}=Oa(l,t.toRef(e,"tableColumns"),t.toRef(e,"tableActions"),s),m=t.ref(e.tableOptions.defaultSort?e.tableOptions.defaultSort:""),g=t.ref(e.tableOptions.defaultSortDirection?e.tableOptions.defaultSortDirection:"desc"),b=t.ref({minDate:0,maxDate:0}),y=t.ref({page:1,perPage:10,totalItems:0,totalPages:0}),x=t.ref(""),k=A=>{y.value.page=1,b.value=A,o()},D=A=>{m.value==A?g.value=g.value==="desc"?"asc":"desc":(m.value=A,g.value="desc"),o()},v=t.computed(()=>typeof e.tableOptions.dateSearch=="object"?e.tableOptions.dateSearch:{}),H=t.computed(()=>!!p.value.length);return t.watch(()=>e.tableOptions.refreshTrigger,()=>{o()}),t.watch(()=>e.tableOptions.reloadTrigger,()=>{a()}),r(s),i(),o(),(A,R)=>{const M=t.resolveComponent("BaseInput");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",tf,[A.tableOptions.search?(t.openBlock(),t.createElementBlock("div",nf,[rf,t.createElementVNode("div",of,[af,t.createElementVNode("div",lf,[t.createVNode(M,{id:"table-search",modelValue:x.value,"onUpdate:modelValue":R[0]||(R[0]=U=>x.value=U),modelModifiers:{trim:!0},type:"search",placeholder:"Search",onChange:R[1]||(R[1]=U=>a())},null,8,["modelValue"])])])])):t.createCommentVNode("",!0),A.tableOptions.dateSearch?(t.openBlock(),t.createElementBlock("div",sf,[cf,t.createElementVNode("div",df,[uf,t.createElementVNode("div",ff,[t.createVNode(fn,t.mergeProps({id:"table-date-range",modelValue:b.value,"onUpdate:modelValue":R[2]||(R[2]=U=>b.value=U)},{...v.value},{"onUpdate:modelValue":k}),null,16,["modelValue"])])])])):t.createCommentVNode("",!0)]),t.createElementVNode("div",pf,[t.createElementVNode("table",mf,[t.createElementVNode("thead",null,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(c),(U,I)=>(t.openBlock(),t.createElementBlock("th",{key:I,class:t.normalizeClass(["px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase bg-gray-50 leading-4",U.alignment])},[U.title?(t.openBlock(),t.createElementBlock("span",hf,t.toDisplayString(U.title),1)):t.createCommentVNode("",!0),U.sort?(t.openBlock(),t.createElementBlock("span",{key:1,class:"cursor-pointer",onClick:t.withModifiers(F=>D(U.sort),["prevent"])},[m.value!==U.sort?(t.openBlock(),t.createElementBlock("svg",bf,yf)):g.value=="desc"?(t.openBlock(),t.createElementBlock("svg",wf,xf)):(t.openBlock(),t.createElementBlock("svg",Cf,kf))],8,gf)):t.createCommentVNode("",!0)],2))),128)),t.unref(d)?(t.openBlock(),t.createElementBlock("th",Ef)):t.createCommentVNode("",!0)])]),t.createElementVNode("tbody",_f,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(p),(U,I)=>(t.openBlock(),t.createElementBlock("tr",{key:I,onClick:F=>A.$emit("click:row",U.rowData)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.cells,(F,X)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent("td"),{key:X,class:t.normalizeClass(["px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5",F.alignment])},{default:t.withCtx(()=>[F.isComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(F.val),{key:0})):(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(F.classNames)},t.toDisplayString(t.unref(u)(F.val)?"-":String(F.val)),3))]),_:2},1032,["class"]))),128)),t.unref(d)?(t.openBlock(),t.createElementBlock("td",Nf,[A.tableActions.type==="dropdown"?(t.openBlock(),t.createBlock(t.unref(sn),{key:0,actions:U.actions},null,8,["actions"])):(t.openBlock(),t.createBlock(Pa,{key:1,actions:U.actions},null,8,["actions"]))])):t.createCommentVNode("",!0)],8,Df))),128)),H.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("tr",Sf,[t.createElementVNode("td",{colspan:t.unref(p).length,class:"px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5"}," No items were found! ",8,vf)]))])])]),H.value?(t.openBlock(),t.createBlock(pn,{key:0,modelValue:y.value,"onUpdate:modelValue":[R[3]||(R[3]=U=>y.value=U),R[4]||(R[4]=U=>o())]},null,8,["modelValue"])):t.createCommentVNode("",!0)])}}}),Vf=t.createElementVNode("label",{for:"tabs",class:"sr-only"},"Select a tab",-1),$f={class:"hidden sm:block"},Bf=["onClick","textContent"],Ia=t.defineComponent({__name:"Tabs",props:{modelValue:{},pillDesign:{type:Boolean,default:!1},tabs:{}},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":l.pillDesign}])},[Vf,t.createVNode(c,{name:"tabs","model-value":l.modelValue,options:l.tabs,"onUpdate:modelValue":s[0]||(s[0]=d=>o(d))},null,8,["model-value","options"])],2),t.createElementVNode("div",$f,[t.createElementVNode("div",{class:t.normalizeClass({"border-b border-gray-200":i.value})},[t.createElementVNode("nav",{class:t.normalizeClass(["flex",[l.pillDesign?"ml-8":"-mb-px"]])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.tabs,(d,u)=>(t.openBlock(),t.createElementBlock("a",{key:u,href:"#",class:t.normalizeClass(a(d.value,u>0)),onClick:t.withModifiers(p=>o(d.value),["prevent"]),textContent:t.toDisplayString(d.label)},null,10,Bf))),128))],2)],2)])])}}}),Tf={key:0,class:"sr-only"},Mf={class:"ml-3 mt-0.5"},Fa=t.defineComponent({inheritAttrs:!1,__name:"Toggle",props:{modelValue:{type:Boolean},label:{default:""},help:{default:""}},emits:["update:modelValue"],setup(n,{emit:r}){const e=t.useAttrs(),o=t.computed(()=>Fn(e,"disabled"));return(a,i)=>(t.openBlock(),t.createBlock(t.unref(Yl),{as:"div",class:"flex items-start"},{default:t.withCtx(()=>[t.createVNode(t.unref(Wl),{class:t.normalizeClass([a.modelValue?"bg-xy-blue":"bg-gray-200",o.value?"opacity-75 cursor-not-allowed":"cursor-pointer","relative inline-flex shrink-0 h-6 w-11 border-2 border-transparent rounded-full transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-blue-500"]),disabled:o.value,"model-value":a.modelValue,"onUpdate:modelValue":i[0]||(i[0]=l=>r("update:modelValue",l))},{default:t.withCtx(()=>[a.label?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",Tf,"Use")),t.createElementVNode("span",{"aria-hidden":"true",class:t.normalizeClass([a.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","disabled","model-value"]),t.createElementVNode("div",Mf,[a.label?(t.openBlock(),t.createBlock(t.unref(Kl),{key:0},{default:t.withCtx(()=>[t.createVNode(be,{label:a.label,class:t.normalizeClass(o.value?"cursor-not-allowed":"cursor-pointer")},null,8,["label","class"])]),_:1})):t.createCommentVNode("",!0),a.help?(t.openBlock(),t.createBlock(t.unref(Gl),{key:1},{default:t.withCtx(()=>[t.createVNode(se,{text:a.help},null,8,["text"])]),_:1})):t.createCommentVNode("",!0)])]),_:1}))}}),Of=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder","type","value"],ja=t.defineComponent({inheritAttrs:!1,__name:"BaseInput",props:t.mergeDefaults({modelValue:{},type:{},label:{},help:{},placeholder:{}},Ae),emits:["update:modelValue","update:error"],setup(n,{expose:r}){const e=n,o=t.ref(null),{errorState:a,modelState:i,inputID:l,isRequired:s,onInvalid:c,inputValidation:d}=Be(e);r({input:o});const u=t.computed(()=>{switch(e.type){case"number":return{max:Number.MAX_SAFE_INTEGER,min:Number.MIN_SAFE_INTEGER};case"email":return{pattern:io};case"tel":return{pattern:lo};default:return{}}}),p=m=>{let g=m.target.value;e.type==="number"&&(g=so(g)),i.value=g,d(m)};return(m,g)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(be,{id:`${t.unref(l)}-label`,class:"mb-2",for:t.unref(l),label:m.label,required:t.unref(s)},null,8,["id","for","label","required"]),t.createElementVNode("input",t.mergeProps({id:t.unref(l),ref_key:"input",ref:o,"aria-labelledby":m.label?`${t.unref(l)}-label`:void 0,"aria-describedby":m.help?`${t.unref(l)}-help`:void 0,"aria-errormessage":t.unref(a)?`${t.unref(l)}-error`:void 0,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200",t.unref(a)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],placeholder:m.placeholder,type:m.type,value:t.unref(i)},{...u.value,...m.$attrs},{onInput:p,onInvalid:g[0]||(g[0]=(...b)=>t.unref(c)&&t.unref(c)(...b))}),null,16,Of),t.createVNode(se,{id:`${t.unref(l)}-help`,class:"mt-1",text:m.help},null,8,["id","text"]),t.createVNode(Ve,{id:`${t.unref(l)}-error`,class:"mt-0.5",text:t.unref(a)},null,8,["id","text"])]))}}),Pf={class:"relative flex items-start"},Af={class:"flex items-center h-5"},Lf=["id","aria-labelledby","aria-describedby","aria-errormessage","checked"],Rf={class:"ml-3"},Ha=t.defineComponent({inheritAttrs:!1,__name:"Checkbox",props:t.mergeDefaults({modelValue:{type:[Boolean,null]},label:{},help:{},placeholder:{}},Ae),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,inputID:o,isDisabled:a,isRequired:i,errorState:l,modelState:s,validate:c,onInvalid:d}=Be(r),u=p=>{s.value=p.target.checked,c(p)};return(p,m)=>(t.openBlock(),t.createElementBlock("div",Pf,[t.createElementVNode("div",Af,[t.createElementVNode("input",t.mergeProps({id:t.unref(o),"aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage,checked:t.unref(s)||void 0,class:["h-4 w-4 rounded text-xy-blue cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(l)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],type:"checkbox"},p.$attrs,{onChange:u,onInvalid:m[0]||(m[0]=(...g)=>t.unref(d)&&t.unref(d)(...g))}),null,16,Lf)]),t.createElementVNode("div",Rf,[t.createVNode(be,{id:t.unref(e).labelledby,for:t.unref(o),label:p.label,class:t.normalizeClass(t.unref(a)?"cursor-not-allowed":"cursor-pointer"),required:t.unref(i)},null,8,["id","for","label","class","required"]),t.createVNode(se,{id:t.unref(e).describedby,text:p.help},null,8,["id","text"]),t.createVNode(Ve,{id:t.unref(e).errormessage,class:"mt-0.5",text:t.unref(l)},null,8,["id","text"])])]))}}),If={key:0,class:"text-red-700/80"},ut=t.defineComponent({__name:"FieldsetLegend",props:{label:{default:""},required:{type:Boolean,default:!1},tag:{default:"legend"}},setup(n){const r=n,e=t.computed(()=>r.required&&/\*$/gm.exec(r.label)!==null?r.label.substring(0,r.label.length-1):r.label);return(o,a)=>o.label?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),t.mergeProps({key:0,class:"block text-base leading-snug font-medium text-gray-800"},o.$attrs),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.value)+" ",1),r.required?(t.openBlock(),t.createElementBlock("span",If,"*")):t.createCommentVNode("",!0)]),_:1},16)):t.createCommentVNode("",!0)}}),Ff=["aria-labelledby","aria-describedby","aria-errormessage"],jf={key:0},Hf={class:"flex"},Uf={class:"flex items-center h-5"},zf=["id","aria-labelledby","aria-describedby","checked","disabled","onChange"],qf={class:"ml-3"},Ua=t.defineComponent({inheritAttrs:!1,__name:"MultiCheckboxes",props:t.mergeDefaults({max:{},min:{},modelValue:{},options:{},label:{},help:{},placeholder:{},columns:{}},Ae),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,inputID:o,isDisabled:a,modelState:i,errorState:l,validate:s}=Be(r),c=(y,x)=>{const k=y.target.checked;Array.isArray(i.value)||(i.value=[]),k?i.value.push(x):i.value.splice(i.value.indexOf(x),1),s(y)},d=t.computed(()=>Array.isArray(i.value)?i.value.length:0),u=t.computed(()=>r.min||0),p=t.computed(()=>r.max||r.options.filter(y=>!y.disabled).length),m=t.computed(()=>d.value<u.value?`Please select ${u.value} of these option${u.value>1?"s":""}.`:d.value>p.value?`Please select only ${p.value} of these option${p.value>1?"s":""}.`:""),g=t.ref(null),b=()=>{var y;l.value||(l.value=m.value,(y=g.value)==null||y.setCustomValidity(m.value))};return(y,x)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"relative space-y-4","aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage},[y.label?(t.openBlock(),t.createElementBlock("div",jf,[t.createVNode(ut,{id:t.unref(e).labelledby,label:y.label,required:u.value>0},null,8,["id","label","required"]),y.help?(t.openBlock(),t.createBlock(se,{key:0,id:t.unref(e).describedby,tag:"p",text:y.help},null,8,["id","text"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createVNode(Ve,{id:t.unref(e).errormessage,text:t.unref(l)},null,8,["id","text"]),m.value?(t.openBlock(),t.createElementBlock("input",{key:1,ref_key:"errorInput",ref:g,required:"",class:"sr-only top-1 left-1","aria-hidden":"",type:"checkbox",onInvalid:b},null,544)):t.createCommentVNode("",!0),t.createElementVNode("div",Hf,[t.createElementVNode("div",{class:t.normalizeClass(["grid gap-y-6",{"sm:grid sm:gap-x-5 sm:space-y-0":y.columns!==void 0,"sm:grid-cols-2":y.columns===2,"sm:grid-cols-3":y.columns===3}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.options,(k,D)=>{var v;return t.openBlock(),t.createElementBlock("div",{key:k.value,class:"flex items-start"},[t.createElementVNode("div",Uf,[t.createElementVNode("input",t.mergeProps({id:`${t.unref(o)}-${D}`,"aria-labelledby":`${t.unref(o)}-${D}-label`,"aria-describedby":k.help?`${t.unref(o)}-${D}-help`:void 0,checked:(v=y.modelValue)==null?void 0:v.includes(k.value),disabled:k.disabled,class:["h-4 w-4 rounded cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(l)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],type:"checkbox"},y.$attrs,{onChange:H=>c(H,k.value)}),null,16,zf)]),t.createElementVNode("div",qf,[t.createVNode(be,{id:`${t.unref(o)}-${D}-label`,for:`${t.unref(o)}-${D}`,label:k.label,class:t.normalizeClass(t.unref(a)||k.disabled?"cursor-not-allowed":"cursor-pointer")},null,8,["id","for","label","class"]),t.createVNode(se,{id:`${t.unref(o)}-${D}-help`,text:k.help},null,8,["id","text"])])])}),128))],2)])],8,Ff))}}),Yf=["aria-labelledby","aria-describedby","aria-errormessage"],Wf={key:0},Kf={class:"flex"},Gf={class:"flex items-center h-5"},Jf=["id","aria-describedby","aria-labelledby","checked","disabled","name","value","onChange"],Xf={class:"ml-3"},za=t.defineComponent({inheritAttrs:!1,__name:"Radio",props:t.mergeDefaults({modelValue:{},options:{},label:{},help:{},placeholder:{},columns:{}},Ae),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,errorState:o,modelState:a,inputID:i,isDisabled:l,isRequired:s,onInvalid:c,validate:d}=Be(r),u=(p,m)=>{a.value=m,d(p)};return(p,m)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"space-y-4","aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage},[p.label?(t.openBlock(),t.createElementBlock("div",Wf,[t.createVNode(ut,{id:t.unref(e).labelledby,label:p.label,required:t.unref(s)},null,8,["id","label","required"]),p.help?(t.openBlock(),t.createBlock(se,{key:0,id:t.unref(e).describedby,tag:"p",text:p.help},null,8,["id","text"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createVNode(Ve,{id:t.unref(e).errormessage,text:t.unref(o)},null,8,["id","text"]),t.createElementVNode("div",Kf,[t.createElementVNode("div",{class:t.normalizeClass(["grid gap-y-6",{"sm:grid sm:gap-x-5 sm:space-y-0":p.columns!==void 0,"sm:grid-cols-2":p.columns===2,"sm:grid-cols-3":p.columns===3}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.options,(g,b)=>(t.openBlock(),t.createElementBlock("div",{key:g.value,class:"flex items-start"},[t.createElementVNode("div",Gf,[t.createElementVNode("input",t.mergeProps({id:`${t.unref(i)}-${b}`,"aria-describedby":g.help?`${t.unref(i)}-${b}-help`:void 0,"aria-labelledby":`${t.unref(i)}-${b}-label`,checked:t.unref(a)===g.value,class:["h-4 w-4 cursor-pointer text-xy-blue","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(o)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],disabled:g.disabled,name:t.unref(i),type:"radio",value:g.value},p.$attrs,{onChange:y=>u(y,g.value),onInvalid:m[0]||(m[0]=(...y)=>t.unref(c)&&t.unref(c)(...y))}),null,16,Jf)]),t.createElementVNode("div",Xf,[t.createVNode(be,{id:`${t.unref(i)}-${b}-label`,for:`${t.unref(i)}-${b}`,label:g.label,class:t.normalizeClass(t.unref(l)||g.disabled?"cursor-not-allowed":"cursor-pointer")},null,8,["id","for","label","class"]),t.createVNode(se,{id:`${t.unref(i)}-${b}-help`,text:g.help},null,8,["id","text"])])]))),128))],2)])],8,Yf))}}),Zf={class:"flex-1 flex pr-1"},Qf={class:"flex flex-col"},ep={key:1,class:"mt-auto mb-0"},tp=["checked","name","required","value"],qa=t.defineComponent({inheritAttrs:!1,__name:"RadioCards",props:t.mergeDefaults({options:{},modelValue:{},label:{},help:{},placeholder:{},columns:{}},Ae),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,isDisabled:o,isRequired:a,nameAttr:i,modelState:l,errorState:s,onInvalid:c}=Be(r),d=u=>{u&&(s.value="")};return(u,p)=>(t.openBlock(),t.createBlock(t.unref(zl),{modelValue:t.unref(l),"onUpdate:modelValue":[p[1]||(p[1]=m=>t.isRef(l)?l.value=m:null),d],disabled:t.unref(o),"aria-invalid":t.unref(s)?"true":null,"aria-errormessage":t.unref(e).errormessage},{default:t.withCtx(()=>[u.label?(t.openBlock(),t.createBlock(t.unref(Io),{key:0,class:"block"},{default:t.withCtx(()=>[t.createVNode(ut,{tag:"div",label:u.label,required:t.unref(a)},null,8,["label","required"])]),_:1})):t.createCommentVNode("",!0),u.help?(t.openBlock(),t.createBlock(t.unref(Jn),{key:1},{default:t.withCtx(()=>[t.createVNode(se,{text:u.help},null,8,["text"])]),_:1})):t.createCommentVNode("",!0),t.createVNode(Ve,{id:t.unref(e).errormessage,text:t.unref(s)},null,8,["id","text"]),t.createElementVNode("div",{class:t.normalizeClass(["mt-4 grid grid-cols-1 gap-y-5 gap-x-4 relative",{"sm:grid-cols-2":u.columns===2,"sm:grid-cols-3":u.columns===3}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.options,m=>(t.openBlock(),t.createBlock(t.unref(ql),{key:m.value,as:"template",disabled:t.unref(o)||m.disabled,value:m.value},{default:t.withCtx(({active:g,checked:b,disabled:y})=>[t.createElementVNode("div",{class:t.normalizeClass(["relative border rounded-lg shadow-sm p-4 flex focus:outline-none",[y?"cursor-not-allowed bg-gray-50 border-gray-200 opacity-90":"cursor-pointer bg-white border-gray-300",t.unref(s)&&!y?"border-red-700":"",b?"border-transparent":"",g?"border-xy-blue ring-2 ring-xy-blue-500":""]])},[t.createElementVNode("div",Zf,[t.createElementVNode("div",Qf,[t.createVNode(t.unref(Io),{as:"div"},{default:t.withCtx(()=>[t.createVNode(be,{tag:"div",class:"mt-auto mb-auto",label:m.label},null,8,["label"])]),_:2},1024),m.help?(t.openBlock(),t.createBlock(t.unref(Jn),{key:0,as:"div"},{default:t.withCtx(()=>[t.createVNode(se,{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",ep,[t.createVNode(t.unref(Jn),{as:"div",class:"text-sm/5 font-medium mt-4 text-gray-800"},{default:t.withCtx(()=>[t.renderSlot(u.$slots,"sublabel",{active:g,checked:b,disabled:y,option:m},()=>[t.createTextVNode(t.toDisplayString(m.sublabel),1)])]),_:2},1024)])):t.createCommentVNode("",!0)])]),t.createVNode(t.unref(qo),{class:t.normalizeClass([b?"":"invisible","h-5 w-5 text-xy-blue"]),"aria-hidden":"true"},null,8,["class"]),t.createElementVNode("div",{class:t.normalizeClass([g?"border":"border-2",b?"border-xy-blue":"border-transparent","absolute -inset-px rounded-lg pointer-events-none"]),"aria-hidden":"true"},null,2),t.createElementVNode("input",{class:"sr-only top-1 left-1","aria-hidden":"true",checked:b,name:t.unref(i),required:t.unref(a),tabindex:"-1",type:"radio",value:m.value,onInvalid:p[0]||(p[0]=(...x)=>t.unref(c)&&t.unref(c)(...x))},null,40,tp)],2)]),_:2},1032,["disabled","value"]))),128))],2)]),_:3},8,["modelValue","disabled","aria-invalid","aria-errormessage"]))}}),np=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder","value"],Ya=t.defineComponent({inheritAttrs:!1,__name:"TextArea",props:t.mergeDefaults({modelValue:{},label:{},help:{},placeholder:{}},Ae),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,inputID:o,isRequired:a,modelState:i,errorState:l,onInvalid:s,inputValidation:c}=Be(r),d=u=>{i.value=u.target.value,c(u)};return(u,p)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(be,{id:t.unref(e).labelledby,class:"mb-2",for:t.unref(o),label:u.label,required:t.unref(a)},null,8,["id","for","label","required"]),t.createElementVNode("textarea",t.mergeProps({id:t.unref(o),"aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200",t.unref(l)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],placeholder:u.placeholder,value:t.unref(i)||void 0},u.$attrs,{onInput:d,onInvalid:p[0]||(p[0]=(...m)=>t.unref(s)&&t.unref(s)(...m))}),null,16,np),t.createVNode(se,{id:t.unref(e).describedby,class:"mt-1",text:u.help},null,8,["id","text"]),t.createVNode(Ve,{id:t.unref(e).errormessage,class:"mt-0.5",text:t.unref(l)},null,8,["id","text"])]))}}),rp=["aria-labelledby","aria-describedby","aria-errormessage"],op={key:0},ap=["for"],ip=["id","name","checked"],lp=["for"],sp=["id","name","checked"],Wa=t.defineComponent({inheritAttrs:!1,__name:"YesOrNoRadio",props:t.mergeDefaults({modelValue:{type:[Boolean,null]},label:{},help:{},placeholder:{}},Ae),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,isDisabled:o,isRequired:a,nameAttr:i,modelState:l,errorState:s,onInvalid:c,validate:d}=Be(r),u=(p,m)=>{l.value=m,d(p)};return(p,m)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"space-y-4","aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage},[p.label?(t.openBlock(),t.createElementBlock("div",op,[t.createVNode(ut,{id:t.unref(e).labelledby,class:"block my-auto",label:p.label,required:t.unref(a),tag:"legend"},null,8,["id","label","required"]),p.help?(t.openBlock(),t.createBlock(se,{key:0,id:t.unref(e).describedby,tag:"p",text:p.help},null,8,["id","text"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createVNode(Ve,{id:t.unref(e).errormessage,text:t.unref(s)},null,8,["id","text"]),t.createElementVNode("div",null,[t.createElementVNode("label",{class:t.normalizeClass(["inline-flex items-center group",t.unref(o)?"cursor-not-allowed":"cursor-pointer"]),for:`${t.unref(i)}-true`},[t.createElementVNode("input",t.mergeProps({id:`${t.unref(i)}-true`,type:"radio",class:["h-4 w-4 text-xy-blue cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(s)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],name:t.unref(i),value:!0,checked:t.unref(l)===!0},p.$attrs,{onChange:m[0]||(m[0]=g=>u(g,!0)),onInvalid:m[1]||(m[1]=(...g)=>t.unref(c)&&t.unref(c)(...g))}),null,16,ip),t.createVNode(be,{class:"ml-3",label:"Yes",tag:"span"})],10,ap),t.createElementVNode("label",{class:t.normalizeClass(["inline-flex items-center ml-6",t.unref(o)?"cursor-not-allowed":"cursor-pointer"]),for:`${t.unref(i)}-false`},[t.createElementVNode("input",t.mergeProps({id:`${t.unref(i)}-false`,type:"radio",class:["h-4 w-4 text-xy-blue cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(s)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],name:t.unref(i),value:!1,checked:t.unref(l)===!1},p.$attrs,{onChange:m[2]||(m[2]=g=>u(g,!1)),onInvalid:m[3]||(m[3]=(...g)=>t.unref(c)&&t.unref(c)(...g))}),null,16,sp),t.createVNode(be,{class:"ml-3",label:"No",tag:"span"})],10,lp)])],8,rp))}}),cp=Object.freeze(Object.defineProperty({__proto__:null,ActionsDropdown:sn,BaseInput:ja,Cards:ya,Checkbox:Ha,ContentModal:wa,DataTable:Aa,DateFilter:cr,DateRangePicker:fn,DetailList:_a,DownloadCell:Da,DynamicTable:Ra,FieldsetLegend:ut,Flash:mn,InlineAlert:Sa,InputError:Ve,InputHelp:se,InputLabel:be,Modal:va,MultiCheckboxes:Ua,Paginator:pn,Popover:vt,PopoverContent:$a,PopoverPosition:vt,Radio:za,RadioCards:qa,Select:sr,SidebarLayout:Va,Slideover:Ba,Spinner:hn,StackedLayout:Ma,Steps:La,Tabs:Ia,TextArea:Ya,Toggle:Fa,Tooltip:Ta,XYSpinner:fr,YesOrNoRadio:Wa},Symbol.toStringTag,{value:"Module"})),dp=function(r){Object.entries(cp).forEach(([e,o])=>{r.component(e,o)})};N.ActionsDropdown=sn,N.BaseAPI=In,N.BaseInput=ja,N.Cards=ya,N.Checkbox=Ha,N.ContentModal=wa,N.DataTable=Aa,N.DateFilter=cr,N.DateRangePicker=fn,N.DetailList=_a,N.DownloadCell=Da,N.DynamicTable=Ra,N.FieldsetLegend=ut,N.Flash=mn,N.InlineAlert=Sa,N.InputError=Ve,N.InputHelp=se,N.InputLabel=be,N.Modal=va,N.MultiCheckboxes=Ua,N.Paginator=pn,N.Popover=vt,N.PopoverContent=$a,N.PopoverPosition=vt,N.Radio=za,N.RadioCards=qa,N.Select=sr,N.SidebarLayout=Va,N.Slideover=Ba,N.Spinner=hn,N.StackedLayout=Ma,N.Steps=La,N.Tabs=Ia,N.TextArea=Ya,N.Toggle=Fa,N.Tooltip=Ta,N.XYSpinner=fr,N.YesOrNoRadio=Wa,N.debounceFn=oo,N.debounceLeading=yl,N.default=dp,N.emailPattern=io,N.isHttpCancel=to,N.isHttpError=eo,N.looseToNumber=so,N.phonePattern=lo,N.setBaseAPIDefaults=bl,N.throttleFn=wl,N.useAppFlasher=ur,N.useAppFlashes=Ge,N.useAppSpinner=Rn,N.useBaseAPI=dt,N.useBaseAPIDelete=Qs,N.useBaseAPIGet=Zs,N.useBaseAPIPatch=ec,N.useBaseAPIPost=tc,N.useBaseAPIPut=nc,N.useFlashes=Ea,N.useInputField=Be,N.useModel=ao,N.useSpinnerDisplay=Zr,N.useTabHistory=oc,N.useUrlSearchParams=ac,Object.defineProperties(N,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
13
+ if the issue persists.`:"Whoops! Something went wrong.";return i({message:y,persistent:g,type:"error"})};return o(n||{}),{flasher:{add:i,remove:a,flash:l,error:s,warning:u,info:c,success:d,genericError:p},flashes:r,configure:o}}const rc=n=>{if(window.Flashes)for(const r of window.Flashes){if(typeof r.type>"u"){const e=r.message.split(": ");n.add({type:e[0],message:e[1]});continue}n.add(r)}};let dr;function Ge(){return dr===void 0&&(dr=Ea()),dr}const ur={error(n,r){Ge().flasher.error(n,r)},info(n,r){Ge().flasher.info(n,r)},success(n,r){Ge().flasher.success(n,r)},warning(n,r){Ge().flasher.warning(n,r)},genericError(n,r){Ge().flasher.genericError(n,r)}},oc=(n,r)=>{var d;const e=t.ref(n),o={initial:((d=e==null?void 0:e.value[0])==null?void 0:d.value)||"",paramName:(r==null?void 0:r.paramName)||"tab"},a=t.ref(o.initial),i=u=>!!e.value.find(p=>p.value===u),l=u=>a.value===u,c=new URLSearchParams(window.location.search).get(o.paramName);return c&&i(c)&&(a.value=c),t.watch(a,u=>{const p=new URLSearchParams(window.location.search);p.set(o.paramName,u.toString());const m=p.toString()!==""?`?${p.toString()}`:"";window.history.replaceState({tab:u},document.title,`${window.location.pathname}${m}`)}),{activeTab:a,isActiveTab:l,tabs:e}},ac=n=>{const r=t.ref(n);return t.watch(r,e=>{const o=new URLSearchParams(window.location.search);for(const i in e){const l=e[i];if(l==null||l==null){o.delete(i);continue}if(Array.isArray(l)){o.delete(i),l.forEach(s=>{o.append(i,s.toString())});continue}!o.has(i)&&!l||o.set(i,l.toString())}const a=o.toString()!==""?`?${o.toString()}`:"";window.history.replaceState(t.toRaw(e),document.title,`${window.location.pathname}${a}`)},{deep:!0}),r},ic={class:"px-4 flex items-center justify-between sm:px-0"},lc={class:"w-0 flex-1 flex"},sc=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),cc={class:"hidden md:flex"},dc=["onClick","textContent"],uc={class:"w-0 flex-1 flex justify-end"},fc=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),pn=t.defineComponent({__name:"Paginator",props:{modelValue:{}},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",ic,[t.createElementVNode("div",lc,[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",i.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(i.modelValue.page-1),["prevent"]))},[sc,t.createTextVNode(" Previous ")],2)]),t.createElementVNode("div",cc,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,s=>(t.openBlock(),t.createElementBlock("a",{key:s,href:"#",class:t.normalizeClass(["-mt-px border-t-2 pt-4 px-4 inline-flex items-center text-sm leading-5 font-medium",i.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"]),onClick:t.withModifiers(c=>o(s),["prevent"]),textContent:t.toDisplayString(s)},null,10,dc))),128))]),t.createElementVNode("div",uc,[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",i.modelValue.page>=i.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(i.modelValue.page+1),["prevent"]))},[t.createTextVNode(" Next "),fc],2)])]))}}),pc={key:0,class:"shadow overflow-hidden sm:rounded-md border"},_a=t.defineComponent({__name:"DetailList",props:{refreshTrigger:{default:0},reloadTrigger:{default:0},title:{},url:{}},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 d={page:i.value.page,perPage:i.value.perPage,sortDir:l.value};In.get(r.url,{},Object.assign(d,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)},()=>{ur.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,d)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(cr,{"date-range":e.value,"sort-dir":l.value,title:c.title,onSortDirChanged:d[0]||(d[0]=u=>l.value=u),onDateRangeChanged:d[1]||(d[1]=u=>e.value=u)},null,8,["date-range","sort-dir","title"]),o.value?(t.openBlock(),t.createElementBlock("div",pc,[t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,(u,p)=>(t.openBlock(),t.createElementBlock("li",{key:p,class:t.normalizeClass({"border-t border-gray-200":p>0})},[t.renderSlot(c.$slots,"default",{item:u})],2))),128))])])):t.renderSlot(c.$slots,"empty",{key:1}),o.value?(t.openBlock(),t.createBlock(pn,{key:2,modelValue:i.value,"onUpdate:modelValue":[d[2]||(d[2]=u=>i.value=u),d[3]||(d[3]=u=>s(!1))]},null,8,["modelValue"])):t.createCommentVNode("",!0)]))}}),mc=["href"],Da=t.defineComponent({__name:"DownloadCell",props:{propsData:{},attribute:{}},setup(n){return(r,e)=>(t.openBlock(),t.createElementBlock("a",{href:r.propsData[r.attribute]},[t.createVNode(t.unref(rs),{class:"h-6 w-6 group-hover:text-gray-500 transition"})],8,mc))}}),hc={class:"fixed inset-0 flex flex-col items-end justify-end px-4 py-6 pointer-events-none sm:p-6 z-[45]"},gc={class:"rounded-lg ring-1 ring-black ring-opacity-5 overflow-hidden"},bc={class:"p-4"},yc={class:"flex items-center"},wc={class:"w-0 flex-1 flex justify-between"},xc=["innerHTML"],Cc={class:"ml-4 shrink-0 flex"},kc=["onClick"],Ec=[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)],mn=t.defineComponent({__name:"Flash",setup(n){const{flasher:r,flashes:e}=Ge(),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(()=>{rc(r)}),(a,i)=>(t.openBlock(),t.createBlock(t.unref(jn),null,{default:t.withCtx(()=>[t.createElementVNode("div",hc,[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",gc,[t.createElementVNode("div",bc,[t.createElementVNode("div",yc,[t.createElementVNode("div",wc,[t.createElementVNode("p",{class:"w-0 flex-1 text-sm leading-5 font-medium text-gray-900",innerHTML:s.message},null,8,xc)]),t.createElementVNode("div",Cc,[t.createElementVNode("button",{class:"inline-flex text-gray-400 focus:outline-none focus:text-gray-500 transition ease-in-out duration-150",onClick:c=>t.unref(r).remove(l)},Ec,8,kc)])])])])],2))),128))]),_:1})])]),_:1}))}}),Yp="";function _c(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 Dc(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 Nc(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 Na(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 St(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 Sc={class:"flex"},vc={class:"flex-shrink-0"},Vc={class:"ml-2.5"},$c={key:0,role:"list",class:"list-disc space-y-1 pl-5"},Bc={key:1},Tc={key:1,class:"mt-4"},Mc={class:"flex flex-col gap-y-1.5 -mx-2 sm:flex-row sm:gap-x-3 sm:items-center"},Oc={key:0},Pc=["href","role"],Ac={key:1},Lc=["href","role"],Rc={key:0,class:"ml-auto pl-3"},Ic={class:"-mx-1.5 -my-1.5"},Fc=t.createElementVNode("span",{class:"sr-only"},"close",-1),Sa=t.defineComponent({__name:"InlineAlert",props:{btnLink:{default:""},btnText:{default:""},content:{},dismissable:{type:Boolean,default:!1},secondaryBtnLink:{default:""},secondaryBtnText:{default:""},title:{default:""},kind:{}},emits:["close","click","click:secondary"],setup(n,{emit:r}){const e=n,o=t.ref(!0),a=()=>{o.value=!1,r("close",!0)},i=t.computed(()=>{const s={bgColor:"",btnAction:"",btnClose:"",contentColor:"",iconColor:""};switch(e.kind){case"alert":s.bgColor="bg-red-50",s.btnAction="bg-red-50 text-red-900 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50",s.btnClose="bg-red-50 text-red-600 hover:bg-red-100 focus:ring-red-600 focus:ring-offset-red-50",s.contentColor="text-red-800",s.iconColor="text-red-400";break;case"info":s.bgColor="bg-blue-50",s.btnAction="bg-blue-50 text-blue-900 hover:bg-blue-100 focus:ring-blue-600 focus:ring-offset-blue-50",s.btnClose="bg-blue-50 text-blue-600 hover:bg-blue-100 focus:ring-blue-600 focus:ring-offset-blue-50",s.contentColor="text-blue-800",s.iconColor="text-blue-400";break;case"success":s.bgColor="bg-emerald-50",s.btnAction="bg-emerald-50 text-emerald-900 hover:bg-emerald-100 focus:ring-emerald-600 focus:ring-offset-emerald-50",s.btnClose="bg-emerald-50 text-emerald-600 hover:bg-emerald-100 focus:ring-emerald-600 focus:ring-offset-emerald-50",s.contentColor="text-emerald-800",s.iconColor="text-emerald-400";break;case"warn":s.bgColor="bg-amber-50",s.btnAction="bg-amber-50 text-amber-900 hover:bg-amber-100 focus:ring-amber-600 focus:ring-offset-amber-50",s.btnClose="bg-amber-50 text-amber-600 hover:bg-amber-100 focus:ring-amber-600 focus:ring-offset-amber-50",s.contentColor="text-amber-800",s.iconColor="text-amber-400";break}return s}),l=t.computed(()=>{let s=null;switch(e.kind){case"alert":s=is;break;case"info":s=as;break;case"success":s=qo;break;case"warn":s=os;break}return s});return(s,c)=>o.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["rounded-lg p-4",i.value.bgColor])},[t.createElementVNode("div",Sc,[t.createElementVNode("div",vc,[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.value),{class:t.normalizeClass(["h-5 w-5",i.value.iconColor]),"aria-hidden":"true"},null,8,["class"]))]),t.createElementVNode("div",Vc,[s.title?(t.openBlock(),t.createElementBlock("h3",{key:0,class:t.normalizeClass(["text-sm leading-snug font-semibold mb-1.5",i.value.contentColor])},t.toDisplayString(s.title),3)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(["text-sm",i.value.contentColor])},[Array.isArray(s.content)?(t.openBlock(),t.createElementBlock("ul",$c,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.content,(d,u)=>(t.openBlock(),t.createElementBlock("li",{key:u},t.toDisplayString(d),1))),128))])):(t.openBlock(),t.createElementBlock("p",Bc,t.toDisplayString(s.content),1))],2),s.btnText||s.secondaryBtnText?(t.openBlock(),t.createElementBlock("div",Tc,[t.createElementVNode("div",Mc,[s.btnText?(t.openBlock(),t.createElementBlock("div",Oc,[t.createElementVNode("a",{class:t.normalizeClass(["inline-flex rounded-md px-2 py-1.5 text-sm font-medium focus:outline-none focus:ring-2 focus:ring-offset-2",i.value.btnAction]),href:s.btnLink,role:s.btnLink?"link":"button",onClick:c[0]||(c[0]=d=>s.$emit("click",d))},t.toDisplayString(s.btnText),11,Pc)])):t.createCommentVNode("",!0),s.secondaryBtnText?(t.openBlock(),t.createElementBlock("div",Ac,[t.createElementVNode("a",{class:t.normalizeClass(["inline-flex rounded-md px-2 py-1.5 text-sm font-medium focus:outline-none focus:ring-2 focus:ring-offset-2",i.value.btnAction]),href:s.secondaryBtnLink,role:s.secondaryBtnLink?"link":"button",onClick:c[1]||(c[1]=d=>s.$emit("click:secondary",d))},t.toDisplayString(s.secondaryBtnText),11,Lc)])):t.createCommentVNode("",!0)])])):t.createCommentVNode("",!0)]),s.dismissable?(t.openBlock(),t.createElementBlock("div",Rc,[t.createElementVNode("div",Ic,[t.createElementVNode("button",{class:t.normalizeClass(["inline-flex rounded-md p-1.5 focus:outline-none focus:ring-2 focus:ring-offset-2",i.value.btnClose]),type:"button",onClick:a},[Fc,t.createVNode(t.unref(St),{class:"h-4 w-4"})],2)])])):t.createCommentVNode("",!0)])],2)):t.createCommentVNode("",!0)}}),jc={class:"flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"},Hc=t.createElementVNode("span",{class:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true"},"​",-1),Uc={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"},zc={class:"block absolute top-0 right-0 pt-4 pr-4"},qc=t.createElementVNode("span",{class:"sr-only"},"Close",-1),Yc={class:"bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"},Wc={class:"mt-3 sm:mt-0 sm:text-left"},Kc={class:"mt-2"},Gc={key:0,class:"bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"},Jc=["disabled","textContent"],va=t.defineComponent({__name:"Modal",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(Ct),{as:"template",show:a.modelValue},{default:t.withCtx(()=>[t.createVNode(t.unref(Jt),{as:"div",static:"",class:"fixed z-30 inset-0 overflow-y-auto",open:a.modelValue,onClose:i[3]||(i[3]=l=>o(!1))},{default:t.withCtx(()=>[t.createElementVNode("div",jc,[t.createVNode(t.unref(Le),{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(Xt),{class:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity"})]),_:1}),Hc,t.createVNode(t.unref(Le),{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",Uc,[t.createElementVNode("div",zc,[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))},[qc,t.createVNode(t.unref(St),{class:"h-6 w-6","aria-hidden":"true"})])]),t.createElementVNode("div",Yc,[t.createElementVNode("div",Wc,[t.createVNode(t.unref(zn),{as:"h3",class:"text-center text-lg leading-6 font-medium text-gray-900"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(a.title),1)]),_:1}),t.createElementVNode("div",Kc,[t.renderSlot(a.$slots,"default")])])]),a.submitText?(t.openBlock(),t.createElementBlock("div",Gc,[t.createElementVNode("button",{type:"button",class:t.normalizeClass(["xy-btn w-full sm:ml-3 sm:w-auto sm:text-sm",[a.destructive?"xy-btn-red":"xy-btn"]]),disabled:a.disabled,onClick:i[1]||(i[1]=l=>e()),textContent:t.toDisplayString(a.submitText)},null,10,Jc),t.createElementVNode("button",{ref:"cancelButtonRef",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))}," Cancel ",512)])):t.createCommentVNode("",!0),t.renderSlot(a.$slots,"buttons")])]),_:3})])]),_:3},8,["open"])]),_:3},8,["show"]))}}),Xc={class:"aspect-square overflow-hidden"},Zc={class:"flex justify-center relative"},Qc={class:"sr-only"},ed=t.createElementVNode("div",{class:"animate-spin-gear drop-shadow-sm"},[t.createElementVNode("svg",{class:"h-full w-full text-xy-green-300",viewBox:"0 0 129 129",version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[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:"currentColor",mask:"url(#mask-2)"})])])])])],-1),td=t.createElementVNode("div",{class:"absolute top-0 left-0 right-0 bottom-0 flex justify-center items-center transform scale-50"},[t.createElementVNode("svg",{viewBox:"0 0 280 280",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[t.createElementVNode("path",{class:"fill-xy-green",d:"m17.57,94.37c-3.36,13.54-5.07,28.73-5.07,45.63,0,32.02,6.04,58,18.1,77.95,3.81,4.98,7.46,9.94,10.95,14.66,21.21,23.24,54.01,34.89,98.45,34.89.71,0,1.39-.03,2.09-.03-3.62-46.93-22.27-88.31-54.36-124.11-19.79-22.07-42.96-38.86-70.16-48.99Z"}),t.createElementVNode("path",{class:"fill-xy-blue",d:"m267.5,140c0-85-42.5-127.5-127.5-127.5-55.06,0-92.27,17.86-111.66,53.53,28.32,8.48,56.67,16.85,84.98,25.37,27.05,8.14,54.01,16.55,81.06,24.67,5.45,1.64,7.5,4.76,6.63,10.27-.69,4.35-1.04,8.75-1.57,13.13-4.95,40.77-8.32,81.74-12.43,122.61,53.64-13.88,80.49-54.56,80.49-122.08Z"})])],-1),fr=t.defineComponent({__name:"XYSpinner",setup(n){const r=t.useAttrs();return(e,o)=>{var a,i;return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass((a=t.unref(r))!=null&&a.class?(i=t.unref(r))==null?void 0:i.class:"h-20 w-20"),role:"status"},[t.createElementVNode("div",Xc,[t.createElementVNode("div",Zc,[t.createElementVNode("p",Qc,[t.renderSlot(e.$slots,"default",{},()=>[t.createTextVNode("loading")])]),ed,td])])],2)}}}),nd={key:0,class:"fixed top-0 left-0 flex flex-col items-center justify-center w-full h-full cursor-not-allowed z-40 bg-gray-50 bg-opacity-60"},rd={class:"mt-2"},hn=t.defineComponent({__name:"Spinner",setup(n){const{idx:r,loading:e,maxIdx:o,messages:a,msg:i,showMsg:l}=Qr(),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(d,u)=>(t.openBlock(),t.createBlock(t.unref(jn),null,{default:t.withCtx(()=>[t.unref(e)?(t.openBlock(),t.createElementBlock("div",nd,[t.createVNode(fr,{class:"w-32 h-32"}),t.withDirectives(t.createElementVNode("div",rd,[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}))}}),od={class:"h-screen flex overflow-hidden bg-gray-100"},ad={class:"relative flex-1 flex flex-col max-w-xs w-full pt-5 pb-4 bg-white"},id={class:"absolute top-0 right-0 -mr-12 pt-2"},ld=t.createElementVNode("span",{class:"sr-only"},"Close sidebar",-1),sd={class:"shrink-0 flex justify-center px-4"},cd=["src"],dd={class:"mt-5 flex flex-col flex-1 h-0 overflow-y-auto"},ud={class:"flex-1 px-2 space-y-1"},fd=["href","target"],pd={key:0,class:"mt-auto"},md={class:"mt-6 px-2"},hd=t.createElementVNode("div",{class:"shrink-0 w-14","aria-hidden":"true"},null,-1),gd={class:"hidden lg:flex lg:shrink-0"},bd={class:"flex flex-col w-64"},yd={class:"flex flex-col grow border-r border-gray-200 pt-5 pb-4 bg-white overflow-y-auto"},wd={class:"flex justify-center shrink-0 px-4"},xd=["src"],Cd={class:"mt-5 grow flex flex-col"},kd={class:"flex-1 px-2 bg-white space-y-1"},Ed=["href","target"],_d={key:0,class:"mt-atuo"},Dd={class:"mt-6 px-2"},Nd={class:"flex flex-col w-0 flex-1 overflow-hidden"},Sd={class:"relative z-10 shrink-0 flex h-16 bg-xy-blue shadow"},vd=t.createElementVNode("span",{class:"sr-only"},"Open sidebar",-1),Vd={class:"flex-1 px-4 flex justify-between"},$d={class:"flex-1 flex"},Bd={class:"flex items-center text-2xl text-white"},Td={class:"ml-4 flex items-center lg:ml-6"},Md=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1),Od=["href"],Pd={class:"flex-1 relative overflow-y-auto focus:outline-none"},Ad={class:"mx-auto"},Va=t.defineComponent({__name:"SidebarLayout",props:{activeUrl:{default:""},iconUrl:{},navigation:{},userNavigation:{}},setup(n){const r=n,e=t.ref(!1),o=a=>r.activeUrl===a;return(a,i)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",od,[t.createVNode(t.unref(Ct),{as:"template",show:e.value},{default:t.withCtx(()=>[t.createVNode(t.unref(Jt),{as:"div",static:"",class:"fixed inset-0 flex z-10 lg:hidden",open:e.value,onClose:i[1]||(i[1]=l=>e.value=!1)},{default:t.withCtx(()=>[t.createVNode(t.unref(Le),{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(Xt),{class:"fixed inset-0 bg-gray-600 bg-opacity-75"})]),_:1}),t.createVNode(t.unref(Le),{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",ad,[t.createVNode(t.unref(Le),{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",id,[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)},[ld,t.createVNode(t.unref(St),{class:"h-6 w-6 text-white","aria-hidden":"true"})])])]),_:1}),t.createElementVNode("div",sd,[t.createElementVNode("img",{class:"w-auto h-12",src:a.iconUrl,alt:"Logo"},null,8,cd)]),t.createElementVNode("div",dd,[t.createElementVNode("nav",ud,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([o(l.url)?"bg-gray-100 text-gray-900":"text-gray-700 hover:bg-gray-50 hover:text-gray-900","group flex items-center px-2 py-2 text-base font-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,fd))),128))]),a.$slots["sidebar-bottom"]?(t.openBlock(),t.createElementBlock("div",pd,[t.createElementVNode("div",md,[t.renderSlot(a.$slots,"sidebar-bottom")])])):t.createCommentVNode("",!0)])])]),_:3}),hd]),_:3},8,["open"])]),_:3},8,["show"]),t.createElementVNode("div",gd,[t.createElementVNode("div",bd,[t.createElementVNode("div",yd,[t.createElementVNode("div",wd,[t.createElementVNode("img",{class:"w-auto h-12",src:a.iconUrl,alt:"Logo"},null,8,xd)]),t.createElementVNode("div",Cd,[t.createElementVNode("nav",kd,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([o(l.url)?"bg-gray-100 text-gray-900":"text-gray-700 hover:bg-gray-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,Ed))),128))]),a.$slots["sidebar-bottom"]?(t.openBlock(),t.createElementBlock("div",_d,[t.createElementVNode("div",Dd,[t.renderSlot(a.$slots,"sidebar-bottom")])])):t.createCommentVNode("",!0)])])])]),t.createElementVNode("div",Nd,[t.createElementVNode("div",Sd,[t.createElementVNode("button",{class:"px-4 border-r border-gray-200 text-white focus:outline-none focus:ring-2 focus:ring-inset focus:ring-blue-500 lg:hidden",onClick:i[2]||(i[2]=l=>e.value=!0)},[vd,t.createVNode(t.unref(Dc),{class:"h-6 w-6","aria-hidden":"true"})]),t.createElementVNode("div",Vd,[t.createElementVNode("div",$d,[t.createElementVNode("h1",Bd,[t.renderSlot(a.$slots,"header")])]),t.createElementVNode("div",Td,[t.createVNode(t.unref(qn),{as:"div",class:"ml-3 relative"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(Yn),{class:"max-w-xs flex items-center text-sm text-white rounded-full hover:bg-blue-900 hover:text-gray-50 focus:outline-none focus:ring focus:text-white"},{default:t.withCtx(()=>[Md,t.createVNode(t.unref(ts),{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(Wn),{class:"origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.userNavigation,l=>(t.openBlock(),t.createBlock(t.unref(Kn),{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,Od)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})])])]),t.createElementVNode("main",Pd,[t.createElementVNode("div",Ad,[t.renderSlot(a.$slots,"default")])])])]),t.createVNode(mn),t.createVNode(hn)],64))}}),vt=t.defineComponent({__name:"Popover",props:{as:{default:"div"},position:{default:"auto"}},setup(n){const r=n,e=t.ref(null),o=t.ref(null),a=t.computed(()=>{const s=[bs(5),ws()];return r.position==="auto"&&s.push(gs()),s}),i=t.computed(()=>{if(r.position!=="auto")return r.position}),{floatingStyles:l}=ba(e,o,{middleware:a,placement:i,strategy:"fixed",whileElementsMounted:pa});return(s,c)=>(t.openBlock(),t.createBlock(t.unref(Mo),{as:s.as,class:"relative"},{default:t.withCtx(({open:d,close:u})=>[t.createVNode(t.unref(Hl),{ref_key:"trigger",ref:e},{default:t.withCtx(()=>[t.renderSlot(s.$slots,"button",{open:d,close:u})]),_:2},1536),t.createElementVNode("div",{ref_key:"wrapper",ref:o,class:"z-[5]",style:t.normalizeStyle(t.unref(l))},[t.createVNode(t.unref(Ul),null,{default:t.withCtx(()=>[t.renderSlot(s.$slots,"default",{open:d,close:u})]),_:2},1024)],4)]),_:3},8,["as"]))}}),Ld=(n,r)=>{const e=n.__vccOpts||n;for(const[o,a]of r)e[o]=a;return e},Rd={},Id={class:"w-full max-w-xs bg-white rounded-md p-2 border border-gray-100 shadow-md"};function Fd(n,r){return t.openBlock(),t.createElementBlock("div",Id,[t.renderSlot(n.$slots,"default")])}const $a=Ld(Rd,[["render",Fd]]),jd={class:"absolute inset-0 overflow-hidden"},Hd={class:"fixed inset-y-0 right-0 pl-10 max-w-full flex"},Ud={class:"w-screen max-w-md"},zd={class:"h-full flex flex-col bg-white shadow-xl overflow-y-scroll"},qd={class:"py-6 px-4 bg-xy-blue-700 sm:px-6"},Yd={class:"flex items-center justify-between"},Wd={class:"ml-3 h-7 flex items-center"},Kd=t.createElementVNode("span",{class:"sr-only"},"Close panel",-1),Gd={class:"mt-1"},Jd=["textContent"],Xd={class:"relative flex-1 py-6 px-4 sm:px-6"},Ba=t.defineComponent({__name:"Slideover",props:{header:{},description:{},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(Ct),{as:"template",show:i.modelValue},{default:t.withCtx(()=>[t.createVNode(t.unref(Jt),{as:"div",static:"",class:"fixed inset-0 z-20 overflow-hidden bg-black bg-opacity-50",open:i.modelValue,onClose:l[1]||(l[1]=s=>a())},{default:t.withCtx(()=>[t.createElementVNode("div",jd,[t.createVNode(t.unref(Xt),{class:"absolute inset-0"}),t.createElementVNode("div",Hd,[t.createVNode(t.unref(Le),{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",Ud,[t.createElementVNode("div",zd,[t.createElementVNode("div",qd,[t.createElementVNode("div",Yd,[t.createVNode(t.unref(zn),{as:"h3",class:"text-white"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(i.header),1)]),_:1}),t.createElementVNode("div",Wd,[t.createElementVNode("button",{class:"bg-xy-blue-600 rounded-md text-gray-50 hover:text-white focus:outline-none focus:ring-2 focus:ring-white",onClick:l[0]||(l[0]=s=>a())},[Kd,t.createVNode(t.unref(St),{class:"h-6 w-6","aria-hidden":"true"})])])]),t.createElementVNode("div",Gd,[t.createElementVNode("p",{class:"text-gray-50 text-base font-medium",textContent:t.toDisplayString(i.description)},null,8,Jd)])]),t.createElementVNode("div",Xd,[t.renderSlot(i.$slots,"default")]),t.renderSlot(i.$slots,"footer")])])]),_:3})])])]),_:3},8,["open"])]),_:3},8,["show"]))}}),Zd=["onMouseover","onMouseleave"],Qd=t.createElementVNode("div",{class:"p-5 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"},null,-1),eu=["onMouseleave"],tu={class:"max-w-xs"},Ta=t.defineComponent({__name:"Tooltip",props:{as:{default:"span"},position:{default:"auto"}},setup(n){var r=!1,e=null;const o=i=>{r=!1,e&&clearTimeout(e),e=setTimeout(()=>{r||i()},100)},a=(i,l)=>{r=!0,!l&&i.target&&i.target.click()};return(i,l)=>(t.openBlock(),t.createBlock(vt,{position:i.position,as:i.as},{button:t.withCtx(({open:s,close:c})=>[t.createElementVNode("div",{class:"leading-none relative w-4 h-4",onMouseover:d=>a(d,s),onMouseleave:d=>o(c)},[t.createVNode(t.unref(_c)),Qd],40,Zd)]),default:t.withCtx(({close:s})=>[t.createElementVNode("div",{class:"sm:min-w-max bg-white rounded-md px-3 py-2 border border-gray-100 drop-shadow-md text-xs text-gray-900 leading-snug font-medium",onMouseover:l[0]||(l[0]=t.withModifiers(c=>t.isRef(r)?r.value=!0:r=!0,["prevent"])),onMouseleave:t.withModifiers(c=>o(s),["prevent"])},[t.createElementVNode("div",tu,[t.renderSlot(i.$slots,"default")])],40,eu)]),_:3},8,["position","as"]))}}),nu={class:"min-h-screen bg-gray-100"},ru={class:"mx-auto px-4 sm:px-6 lg:px-8"},ou={class:"flex justify-between h-16"},au={class:"flex"},iu={class:"shrink-0 flex items-center"},lu=["src"],su={class:"hidden sm:-my-px sm:ml-6 sm:flex sm:space-x-8"},cu=["href","aria-current"],du={class:"hidden sm:ml-6 sm:flex sm:items-center"},uu=t.createElementVNode("span",{class:"sr-only"},"Open user menu",-1),fu=["href"],pu={class:"-mr-2 flex items-center sm:hidden"},mu=t.createElementVNode("span",{class:"sr-only"},"Open main menu",-1),hu={class:"pt-2 pb-3 space-y-1"},gu=["href","aria-current"],bu={class:"pt-4 pb-3 border-t border-gray-200"},yu={class:"flex items-center px-4"},wu={class:"shrink-0"},xu={class:"ml-3"},Cu=["textContent"],ku=["textContent"],Eu={class:"mt-3 space-y-1"},_u=["href"],Du={class:"mx-auto sm:px-6 lg:px-8"},Nu={class:"px-4 py-8 sm:px-0"},Ma=t.defineComponent({__name:"StackedLayout",props:{activeUrl:{default:""},currentUser:{},iconUrl:{},navigation:{},userNavigation:{}},setup(n){const r=n,e=o=>r.activeUrl===o;return(o,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",nu,[t.createVNode(t.unref(Ol),{as:"nav",class:"bg-white shadow-sm"},{default:t.withCtx(({open:i})=>[t.createElementVNode("div",ru,[t.createElementVNode("div",ou,[t.createElementVNode("div",au,[t.createElementVNode("div",iu,[t.createElementVNode("img",{class:"block h-8 w-auto",src:o.iconUrl,alt:"XY Trees"},null,8,lu)]),t.createElementVNode("div",su,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([e(l.url)?"border-blue-500 text-gray-900":"border-transparent text-gray-700 hover:text-gray-900 hover:border-blue-500","inline-flex items-center px-1 pt-1 border-b-2 text-sm font-semibold"]),"aria-current":e(l.url)?"page":void 0},t.toDisplayString(l.name),11,cu))),128))])]),t.createElementVNode("div",du,[t.createVNode(t.unref(qn),{as:"div",class:"ml-3 relative"},{default:t.withCtx(()=>[t.createElementVNode("div",null,[t.createVNode(t.unref(Yn),{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(()=>[uu,t.createVNode(t.unref(Na),{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(Wn),{class:"origin-top-right absolute right-0 mt-2 w-48 rounded-md shadow-lg py-1 bg-white ring-1 ring-black ring-opacity-5 focus:outline-none"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.userNavigation,l=>(t.openBlock(),t.createBlock(t.unref(Kn),{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,fu)]),_:2},1024))),128))]),_:1})]),_:1})]),_:1})]),t.createElementVNode("div",pu,[t.createVNode(t.unref(Pl),{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(()=>[mu,i?(t.openBlock(),t.createBlock(t.unref(St),{key:1,class:"block h-6 w-6","aria-hidden":"true"})):(t.openBlock(),t.createBlock(t.unref(Nc),{key:0,class:"block h-6 w-6","aria-hidden":"true"}))]),_:2},1024)])])]),t.createVNode(t.unref(Al),{class:"sm:hidden"},{default:t.withCtx(()=>[t.createElementVNode("div",hu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.navigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:t.normalizeClass([e(l.url)?"bg-blue-50 border-blue-500 text-blue-700":"border-transparent text-gray-700 hover:bg-gray-50 hover:border-gray-300 hover:text-gray-900","block pl-3 pr-4 py-2 border-l-4 text-base font-semibold"]),"aria-current":e(l.url)?"page":void 0},t.toDisplayString(l.name),11,gu))),128))]),t.createElementVNode("div",bu,[t.createElementVNode("div",yu,[t.createElementVNode("div",wu,[t.createVNode(t.unref(Na),{class:"text-gray-500 h-10 w-10 rounded-full"})]),t.createElementVNode("div",xu,[o.currentUser.name?(t.openBlock(),t.createElementBlock("div",{key:0,class:"text-base font-medium text-gray-800",textContent:t.toDisplayString(o.currentUser.name)},null,8,Cu)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:"text-sm font-medium text-gray-500",textContent:t.toDisplayString(o.currentUser.email)},null,8,ku)])]),t.createElementVNode("div",Eu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.userNavigation,l=>(t.openBlock(),t.createElementBlock("a",{key:l.name,href:l.url,class:"block px-4 py-2 text-base font-medium text-gray-700 hover:text-gray-900 hover:bg-gray-100"},t.toDisplayString(l.name),9,_u))),128))])])]),_:1})]),_:1}),t.renderSlot(o.$slots,"header"),t.createElementVNode("main",null,[t.createElementVNode("div",Du,[t.createElementVNode("div",Nu,[t.renderSlot(o.$slots,"default")])])])]),t.createVNode(mn),t.createVNode(hn)],64))}}),Su=n=>n==null,vu={refresh(){console.warn("refresh() was called on a static table, did you mean to use DynamicTable?")},reset(){console.warn("reset() was called on a static table, did you mean to use DynamicTable?")}},Oa=(n,r,e,o=vu)=>{const a=t.ref(r),i=t.ref(n),l=t.ref(e),s=t.computed(()=>l.value.actions.length>0),c=t.computed(()=>a.value.map(u=>{let p="";switch((u==null?void 0:u.alignment)||"left"){case"left":p="text-left";break;case"right":p="text-right";break;case"center":p="text-center";break}return{...u,alignment:p}})),d=t.computed(()=>i.value.map((u,p)=>({actions:l.value.actions.map(m=>({...m,disabled:typeof m.disabled=="function"?m.disabled.apply(void 0,[u,p]):m.disabled,onClick:()=>m.onClick(u,p,o),show:typeof m.show=="function"?m.show.apply(void 0,[u,p]):m.show})),rowData:u,cells:c.value.map(m=>{const g=typeof m.render=="string"?u[m.render]:m.render(u,p),b=(m==null?void 0:m.classNames)||"";return{...m,isComponent:t.isVNode(g),classNames:typeof b=="function"?b.apply(void 0,[u,p]):b,val:g}})})));return{columns:c,hasActions:s,isEmptyCellValue:Su,rows:d}},Vu={key:0,class:"flex items-center space-x-2 justify-end"},$u={class:"isolate inline-flex rounded-md shadow-sm"},Bu=["disabled","onClick"],Tu={class:"relative inline-flex items-center gap-x-1.5"},Pa=t.defineComponent({__name:"TableActionButtons",props:{actions:{default:()=>[]}},setup(n){const r=n,{actions:e,hasActions:o}=Yo(t.toRef(r,"actions"));return(a,i)=>t.unref(o)?(t.openBlock(),t.createElementBlock("div",Vu,[t.createElementVNode("span",$u,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(e),(l,s)=>(t.openBlock(),t.createElementBlock("button",{key:s,type:"button",class:t.normalizeClass(["group relative inline-flex items-center bg-white px-3 py-2 text-sm font-semibold text-gray-700 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus:z-10 disabled:text-gray-400 disabled:cursor-not-allowed",{"rounded-l-md":s===0,"-ml-px":s>0,"rounded-r-md":s===t.unref(e).length-1}]),disabled:l.disabled,onClick:t.withModifiers(l.onClick,["stop"])},[t.createElementVNode("span",Tu,[l.icon?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(l.icon),{key:0,class:t.normalizeClass(["-ml-0.5 h-4 w-4 group-disabled:text-gray-300",l.label?"text-gray-400":"text-gray-600"]),"aria-hidden":"true"},null,8,["class"])):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(l.label),1)])],10,Bu))),128))])])):t.createCommentVNode("",!0)}}),Mu={class:"flex flex-col"},Ou={class:"-my-2 overflow-x-auto sm:-mx-6 lg:-mx-8"},Pu={class:"inline-block min-w-full py-2 align-middle sm:px-6 lg:px-8"},Au={class:"overflow-hidden border-b border-gray-200 shadow sm:rounded-lg"},Lu={class:"min-w-full divide-y divide-gray-200"},Ru={key:0,class:"px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase bg-gray-50 leading-4"},Iu={class:"bg-white divide-y divide-gray-200"},Fu={key:0,class:"px-6 py-2 text-sm text-gray-700 whitespace-nowrap leading-5"},ju={key:0},Hu=["colspan"],Aa=t.defineComponent({__name:"DataTable",props:{tableActions:{default:()=>({type:"dropdown",actions:[]})},tableColumns:{},tableData:{}},setup(n){const r=n,{columns:e,hasActions:o,isEmptyCellValue:a,rows:i}=Oa(t.toRef(r,"tableData"),t.toRef(r,"tableColumns"),t.toRef(r,"tableActions"));return(l,s)=>(t.openBlock(),t.createElementBlock("div",Mu,[t.createElementVNode("div",Ou,[t.createElementVNode("div",Pu,[t.createElementVNode("div",Au,[t.createElementVNode("table",Lu,[t.createElementVNode("thead",null,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(e),(c,d)=>(t.openBlock(),t.createElementBlock("th",{key:d,class:t.normalizeClass(["px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase bg-gray-50 leading-4",c.alignment])},t.toDisplayString(c.title),3))),128)),t.unref(o)?(t.openBlock(),t.createElementBlock("th",Ru)):t.createCommentVNode("",!0)])]),t.createElementVNode("tbody",Iu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(i),(c,d)=>(t.openBlock(),t.createElementBlock("tr",{key:d},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.cells,(u,p)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent("td"),{key:p,class:t.normalizeClass(["px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5",u.alignment])},{default:t.withCtx(()=>[u.isComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u.val),{key:0})):(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(u.classNames)},t.toDisplayString(t.unref(a)(u.val)?"-":String(u.val)),3))]),_:2},1032,["class"]))),128)),t.unref(o)?(t.openBlock(),t.createElementBlock("td",Fu,[l.tableActions.type==="dropdown"?(t.openBlock(),t.createBlock(t.unref(sn),{key:0,actions:c.actions},null,8,["actions"])):(t.openBlock(),t.createBlock(Pa,{key:1,actions:c.actions},null,8,["actions"]))])):t.createCommentVNode("",!0)]))),128)),t.unref(i).length===0?(t.openBlock(),t.createElementBlock("tr",ju,[t.createElementVNode("td",{colspan:t.unref(e).length,class:"px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5"}," No items were found! ",8,Hu)])):t.createCommentVNode("",!0)])])])])])]))}}),Uu={class:"flex items-center justify-center space-x-8"},zu={class:"font-medium"},qu={class:"flex items-center space-x-5"},Yu={key:0,class:"block w-2.5 h-2.5 bg-xy-green rounded-full hover:bg-green-900 focus:bg-green-900"},Wu={key:1,class:"relative flex items-center justify-center"},Ku=[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)],Gu={key:2,href:"#",class:"block w-2.5 h-2.5 bg-gray-200 rounded-full hover:bg-gray-400 focus:bg-gray-400"},Ju={key:0,class:"flex shrink-0"},Xu={key:0,class:"inline-flex rounded-md shadow-sm"},Zu=["textContent"],Qu={class:"ml-3 inline-flex rounded-md shadow-sm"},ef=["textContent"],La=t.defineComponent({__name:"Steps",props:{hideActions:{type:Boolean,default:!1},hidePrevious:{type:Boolean,default:!1},nextText:{default:"Next"},previousText:{default:"Back"},step:{},total:{}},emits:["next","previous"],setup(n,{emit:r}){const e=()=>{r("next")},o=()=>{r("previous")};return(a,i)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("nav",Uu,[t.createElementVNode("p",zu,"Step "+t.toDisplayString(a.step)+" of "+t.toDisplayString(a.total),1),t.createElementVNode("ul",qu,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.total,l=>(t.openBlock(),t.createElementBlock("li",{key:l},[a.step>l?(t.openBlock(),t.createElementBlock("span",Yu)):a.step===l?(t.openBlock(),t.createElementBlock("div",Wu,Ku)):(t.openBlock(),t.createElementBlock("span",Gu))]))),128))])]),a.hideActions?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Ju,[a.hidePrevious?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",Xu,[t.createElementVNode("button",{type:"button",class:"xy-btn-white",onClick:o,textContent:t.toDisplayString(a.previousText)},null,8,Zu)])),t.createElementVNode("span",Qu,[t.createElementVNode("button",{type:"button",class:"xy-btn",onClick:e,textContent:t.toDisplayString(a.nextText)},null,8,ef)])]))]))}}),tf={class:"flex flex-col mb-4 space-y-4 lg:space-y-0 lg:flex-row lg:justify-between"},nf={key:0,class:"w-full max-w-lg lg:max-w-xs"},rf=t.createElementVNode("label",{for:"table-search",class:"sr-only"},"Search",-1),of={class:"flex items-center gap-x-2"},af=t.createElementVNode("div",{"aria-hidden":"true",class:"shrink-0 aspect-square rounded-full bg-gray-50 text-gray-400 h-10 w-10 flex items-center justify-center pointer-events-none"},[t.createElementVNode("svg",{class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20"},[t.createElementVNode("path",{"fill-rule":"evenodd",d:"M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z","clip-rule":"evenodd"})])],-1),lf={class:"flex-1"},sf={key:1,class:"w-full max-w-lg lg:max-w-xs"},cf=t.createElementVNode("label",{for:"table-date-range",class:"sr-only"},"Date Range",-1),df={class:"flex items-center gap-x-2"},uf=t.createElementVNode("div",{"aria-hidden":"true",class:"shrink-0 aspect-square rounded-full bg-gray-50 text-gray-400 h-10 w-10 flex items-center justify-center pointer-events-none"},[t.createElementVNode("svg",{class:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[t.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})])],-1),ff={class:"flex-1"},pf={class:"relative z-0 min-w-full align-middle border-b border-gray-200 shadow sm:rounded-lg overflow-x-auto"},mf={class:"min-w-full divide-y divide-gray-200"},hf={key:0},gf=["onClick"],bf={key:0,xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",class:"h-5 inline"},yf=[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)],wf={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},xf=[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)],Cf={key:2,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",class:"h-5 inline"},kf=[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)],Ef={key:0,class:"px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase bg-gray-50 leading-4"},_f={class:"bg-white divide-y divide-gray-200"},Df=["onClick"],Nf={key:0,class:"px-6 py-2 text-sm text-gray-700 whitespace-nowrap leading-5"},Sf={key:0},vf=["colspan"],Ra=t.defineComponent({__name:"DynamicTable",props:{tableActions:{default:()=>({type:"dropdown",actions:[]})},tableColumns:{},tableOptions:{}},emits:["click:row"],setup(n,{expose:r}){const e=n,o=()=>{const A={minDate:b.value.minDate,maxDate:b.value.maxDate,page:y.value.page,perPage:y.value.perPage,sort:m.value,sortDir:g.value,q:x.value};In.get(e.tableOptions.url,{skipLoader:!1},A).then(R=>{y.value={page:R.data.page,perPage:R.data.perPage,totalItems:R.data.totalItems,totalPages:R.data.totalPages},l.value=R.data.items},()=>{ur.genericError()})},a=()=>{y.value.page=1,o()},i=()=>{if(v.value.maxRange){const A=new Date,R=A.setDate(A.getDate()-v.value.maxRange),M=new Date;b.value={minDate:Math.floor(R/1e3),maxDate:Math.floor(M.getTime()/1e3)}}},l=t.ref([]),s={refresh:o,reset:a},{columns:c,hasActions:d,isEmptyCellValue:u,rows:p}=Oa(l,t.toRef(e,"tableColumns"),t.toRef(e,"tableActions"),s),m=t.ref(e.tableOptions.defaultSort?e.tableOptions.defaultSort:""),g=t.ref(e.tableOptions.defaultSortDirection?e.tableOptions.defaultSortDirection:"desc"),b=t.ref({minDate:0,maxDate:0}),y=t.ref({page:1,perPage:10,totalItems:0,totalPages:0}),x=t.ref(""),k=A=>{y.value.page=1,b.value=A,o()},D=A=>{m.value==A?g.value=g.value==="desc"?"asc":"desc":(m.value=A,g.value="desc"),o()},v=t.computed(()=>typeof e.tableOptions.dateSearch=="object"?e.tableOptions.dateSearch:{}),H=t.computed(()=>!!p.value.length);return t.watch(()=>e.tableOptions.refreshTrigger,()=>{o()}),t.watch(()=>e.tableOptions.reloadTrigger,()=>{a()}),r(s),i(),o(),(A,R)=>{const M=t.resolveComponent("BaseInput");return t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",tf,[A.tableOptions.search?(t.openBlock(),t.createElementBlock("div",nf,[rf,t.createElementVNode("div",of,[af,t.createElementVNode("div",lf,[t.createVNode(M,{id:"table-search",modelValue:x.value,"onUpdate:modelValue":R[0]||(R[0]=U=>x.value=U),modelModifiers:{trim:!0},type:"search",placeholder:"Search",onChange:R[1]||(R[1]=U=>a())},null,8,["modelValue"])])])])):t.createCommentVNode("",!0),A.tableOptions.dateSearch?(t.openBlock(),t.createElementBlock("div",sf,[cf,t.createElementVNode("div",df,[uf,t.createElementVNode("div",ff,[t.createVNode(fn,t.mergeProps({id:"table-date-range",modelValue:b.value,"onUpdate:modelValue":R[2]||(R[2]=U=>b.value=U)},{...v.value},{"onUpdate:modelValue":k}),null,16,["modelValue"])])])])):t.createCommentVNode("",!0)]),t.createElementVNode("div",pf,[t.createElementVNode("table",mf,[t.createElementVNode("thead",null,[t.createElementVNode("tr",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(c),(U,I)=>(t.openBlock(),t.createElementBlock("th",{key:I,class:t.normalizeClass(["px-6 py-3 text-xs font-medium tracking-wider text-gray-900 uppercase bg-gray-50 leading-4",U.alignment])},[U.title?(t.openBlock(),t.createElementBlock("span",hf,t.toDisplayString(U.title),1)):t.createCommentVNode("",!0),U.sort?(t.openBlock(),t.createElementBlock("span",{key:1,class:"cursor-pointer",onClick:t.withModifiers(F=>D(U.sort),["prevent"])},[m.value!==U.sort?(t.openBlock(),t.createElementBlock("svg",bf,yf)):g.value=="desc"?(t.openBlock(),t.createElementBlock("svg",wf,xf)):(t.openBlock(),t.createElementBlock("svg",Cf,kf))],8,gf)):t.createCommentVNode("",!0)],2))),128)),t.unref(d)?(t.openBlock(),t.createElementBlock("th",Ef)):t.createCommentVNode("",!0)])]),t.createElementVNode("tbody",_f,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(p),(U,I)=>(t.openBlock(),t.createElementBlock("tr",{key:I,onClick:F=>A.$emit("click:row",U.rowData)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(U.cells,(F,X)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent("td"),{key:X,class:t.normalizeClass(["px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5",F.alignment])},{default:t.withCtx(()=>[F.isComponent?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(F.val),{key:0})):(t.openBlock(),t.createElementBlock("span",{key:1,class:t.normalizeClass(F.classNames)},t.toDisplayString(t.unref(u)(F.val)?"-":String(F.val)),3))]),_:2},1032,["class"]))),128)),t.unref(d)?(t.openBlock(),t.createElementBlock("td",Nf,[A.tableActions.type==="dropdown"?(t.openBlock(),t.createBlock(t.unref(sn),{key:0,actions:U.actions},null,8,["actions"])):(t.openBlock(),t.createBlock(Pa,{key:1,actions:U.actions},null,8,["actions"]))])):t.createCommentVNode("",!0)],8,Df))),128)),H.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("tr",Sf,[t.createElementVNode("td",{colspan:t.unref(p).length,class:"px-6 py-4 text-sm text-gray-700 whitespace-nowrap leading-5"}," No items were found! ",8,vf)]))])])]),H.value?(t.openBlock(),t.createBlock(pn,{key:0,modelValue:y.value,"onUpdate:modelValue":[R[3]||(R[3]=U=>y.value=U),R[4]||(R[4]=U=>o())]},null,8,["modelValue"])):t.createCommentVNode("",!0)])}}}),Vf=t.createElementVNode("label",{for:"tabs",class:"sr-only"},"Select a tab",-1),$f={class:"hidden sm:block"},Bf=["onClick","textContent"],Ia=t.defineComponent({__name:"Tabs",props:{modelValue:{},pillDesign:{type:Boolean,default:!1},tabs:{}},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":l.pillDesign}])},[Vf,t.createVNode(c,{name:"tabs","model-value":l.modelValue,options:l.tabs,"onUpdate:modelValue":s[0]||(s[0]=d=>o(d))},null,8,["model-value","options"])],2),t.createElementVNode("div",$f,[t.createElementVNode("div",{class:t.normalizeClass({"border-b border-gray-200":i.value})},[t.createElementVNode("nav",{class:t.normalizeClass(["flex",[l.pillDesign?"ml-8":"-mb-px"]])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.tabs,(d,u)=>(t.openBlock(),t.createElementBlock("a",{key:u,href:"#",class:t.normalizeClass(a(d.value,u>0)),onClick:t.withModifiers(p=>o(d.value),["prevent"]),textContent:t.toDisplayString(d.label)},null,10,Bf))),128))],2)],2)])])}}}),Tf={key:0,class:"sr-only"},Mf={class:"ml-3 mt-0.5"},Fa=t.defineComponent({inheritAttrs:!1,__name:"Toggle",props:{modelValue:{type:Boolean},label:{default:""},help:{default:""}},emits:["update:modelValue"],setup(n,{emit:r}){const e=t.useAttrs(),o=t.computed(()=>Fn(e,"disabled"));return(a,i)=>(t.openBlock(),t.createBlock(t.unref(Yl),{as:"div",class:"flex items-start"},{default:t.withCtx(()=>[t.createVNode(t.unref(Wl),{class:t.normalizeClass([a.modelValue?"bg-xy-blue":"bg-gray-200",o.value?"opacity-75 cursor-not-allowed":"cursor-pointer","relative inline-flex shrink-0 h-6 w-11 border-2 border-transparent rounded-full transition-colors ease-in-out duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-xy-blue-500"]),disabled:o.value,"model-value":a.modelValue,"onUpdate:modelValue":i[0]||(i[0]=l=>r("update:modelValue",l))},{default:t.withCtx(()=>[a.label?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",Tf,"Use")),t.createElementVNode("span",{"aria-hidden":"true",class:t.normalizeClass([a.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","disabled","model-value"]),t.createElementVNode("div",Mf,[a.label?(t.openBlock(),t.createBlock(t.unref(Kl),{key:0},{default:t.withCtx(()=>[t.createVNode(be,{label:a.label,class:t.normalizeClass(o.value?"cursor-not-allowed":"cursor-pointer")},null,8,["label","class"])]),_:1})):t.createCommentVNode("",!0),a.help?(t.openBlock(),t.createBlock(t.unref(Gl),{key:1},{default:t.withCtx(()=>[t.createVNode(se,{text:a.help},null,8,["text"])]),_:1})):t.createCommentVNode("",!0)])]),_:1}))}}),Of=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder","type","value"],ja=t.defineComponent({inheritAttrs:!1,__name:"BaseInput",props:t.mergeDefaults({modelValue:{},type:{},label:{},help:{},placeholder:{}},Ae),emits:["update:modelValue","update:error"],setup(n,{expose:r}){const e=n,o=t.ref(null),{errorState:a,modelState:i,inputID:l,isRequired:s,onInvalid:c,inputValidation:d}=Be(e);r({input:o});const u=t.computed(()=>{switch(e.type){case"number":return{max:Number.MAX_SAFE_INTEGER,min:Number.MIN_SAFE_INTEGER};case"email":return{pattern:io};case"tel":return{pattern:lo};default:return{}}}),p=m=>{let g=m.target.value;e.type==="number"&&(g=so(g)),i.value=g,d(m)};return(m,g)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(be,{id:`${t.unref(l)}-label`,class:"mb-2",for:t.unref(l),label:m.label,required:t.unref(s)},null,8,["id","for","label","required"]),t.createElementVNode("input",t.mergeProps({id:t.unref(l),ref_key:"input",ref:o,"aria-labelledby":m.label?`${t.unref(l)}-label`:void 0,"aria-describedby":m.help?`${t.unref(l)}-help`:void 0,"aria-errormessage":t.unref(a)?`${t.unref(l)}-error`:void 0,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200",t.unref(a)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],placeholder:m.placeholder,type:m.type,value:t.unref(i)},{...u.value,...m.$attrs},{onInput:p,onInvalid:g[0]||(g[0]=(...b)=>t.unref(c)&&t.unref(c)(...b))}),null,16,Of),t.createVNode(se,{id:`${t.unref(l)}-help`,class:"mt-1",text:m.help},null,8,["id","text"]),t.createVNode(Ve,{id:`${t.unref(l)}-error`,class:"mt-0.5",text:t.unref(a)},null,8,["id","text"])]))}}),Pf={class:"relative flex items-start"},Af={class:"flex items-center h-5"},Lf=["id","aria-labelledby","aria-describedby","aria-errormessage","checked"],Rf={class:"ml-3"},Ha=t.defineComponent({inheritAttrs:!1,__name:"Checkbox",props:t.mergeDefaults({modelValue:{type:[Boolean,null]},label:{},help:{},placeholder:{}},Ae),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,inputID:o,isDisabled:a,isRequired:i,errorState:l,modelState:s,validate:c,onInvalid:d}=Be(r),u=p=>{s.value=p.target.checked,c(p)};return(p,m)=>(t.openBlock(),t.createElementBlock("div",Pf,[t.createElementVNode("div",Af,[t.createElementVNode("input",t.mergeProps({id:t.unref(o),"aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage,checked:t.unref(s)||void 0,class:["h-4 w-4 rounded text-xy-blue cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(l)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],type:"checkbox"},p.$attrs,{onChange:u,onInvalid:m[0]||(m[0]=(...g)=>t.unref(d)&&t.unref(d)(...g))}),null,16,Lf)]),t.createElementVNode("div",Rf,[t.createVNode(be,{id:t.unref(e).labelledby,for:t.unref(o),label:p.label,class:t.normalizeClass(t.unref(a)?"cursor-not-allowed":"cursor-pointer"),required:t.unref(i)},null,8,["id","for","label","class","required"]),t.createVNode(se,{id:t.unref(e).describedby,text:p.help},null,8,["id","text"]),t.createVNode(Ve,{id:t.unref(e).errormessage,class:"mt-0.5",text:t.unref(l)},null,8,["id","text"])])]))}}),If={key:0,class:"text-red-700/80"},ut=t.defineComponent({__name:"FieldsetLegend",props:{label:{default:""},required:{type:Boolean,default:!1},tag:{default:"legend"}},setup(n){const r=n,e=t.computed(()=>r.required&&/\*$/gm.exec(r.label)!==null?r.label.substring(0,r.label.length-1):r.label);return(o,a)=>o.label?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(o.tag),t.mergeProps({key:0,class:"block text-base leading-snug font-medium text-gray-800"},o.$attrs),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.value)+" ",1),r.required?(t.openBlock(),t.createElementBlock("span",If,"*")):t.createCommentVNode("",!0)]),_:1},16)):t.createCommentVNode("",!0)}}),Ff=["aria-labelledby","aria-describedby","aria-errormessage"],jf={key:0},Hf={class:"flex"},Uf={class:"flex items-center h-5"},zf=["id","aria-labelledby","aria-describedby","checked","disabled","onChange"],qf={class:"ml-3"},Ua=t.defineComponent({inheritAttrs:!1,__name:"MultiCheckboxes",props:t.mergeDefaults({max:{},min:{},modelValue:{},options:{},label:{},help:{},placeholder:{},columns:{}},Ae),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,inputID:o,isDisabled:a,modelState:i,errorState:l,validate:s}=Be(r),c=(y,x)=>{const k=y.target.checked;Array.isArray(i.value)||(i.value=[]),k?i.value.push(x):i.value.splice(i.value.indexOf(x),1),s(y)},d=t.computed(()=>Array.isArray(i.value)?i.value.length:0),u=t.computed(()=>r.min||0),p=t.computed(()=>r.max||r.options.filter(y=>!y.disabled).length),m=t.computed(()=>d.value<u.value?`Please select ${u.value} of these option${u.value>1?"s":""}.`:d.value>p.value?`Please select only ${p.value} of these option${p.value>1?"s":""}.`:""),g=t.ref(null),b=()=>{var y;l.value||(l.value=m.value,(y=g.value)==null||y.setCustomValidity(m.value))};return(y,x)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"relative space-y-4","aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage},[y.label?(t.openBlock(),t.createElementBlock("div",jf,[t.createVNode(ut,{id:t.unref(e).labelledby,label:y.label,required:u.value>0},null,8,["id","label","required"]),y.help?(t.openBlock(),t.createBlock(se,{key:0,id:t.unref(e).describedby,tag:"p",text:y.help},null,8,["id","text"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createVNode(Ve,{id:t.unref(e).errormessage,text:t.unref(l)},null,8,["id","text"]),m.value?(t.openBlock(),t.createElementBlock("input",{key:1,ref_key:"errorInput",ref:g,required:"",class:"sr-only top-1 left-1","aria-hidden":"",type:"checkbox",onInvalid:b},null,544)):t.createCommentVNode("",!0),t.createElementVNode("div",Hf,[t.createElementVNode("div",{class:t.normalizeClass(["grid gap-y-6",{"sm:grid sm:gap-x-5 sm:space-y-0":y.columns!==void 0,"sm:grid-cols-2":y.columns===2,"sm:grid-cols-3":y.columns===3}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(y.options,(k,D)=>{var v;return t.openBlock(),t.createElementBlock("div",{key:k.value,class:"flex items-start"},[t.createElementVNode("div",Uf,[t.createElementVNode("input",t.mergeProps({id:`${t.unref(o)}-${D}`,"aria-labelledby":`${t.unref(o)}-${D}-label`,"aria-describedby":k.help?`${t.unref(o)}-${D}-help`:void 0,checked:(v=y.modelValue)==null?void 0:v.includes(k.value),disabled:k.disabled,class:["h-4 w-4 rounded cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(l)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],type:"checkbox"},y.$attrs,{onChange:H=>c(H,k.value)}),null,16,zf)]),t.createElementVNode("div",qf,[t.createVNode(be,{id:`${t.unref(o)}-${D}-label`,for:`${t.unref(o)}-${D}`,label:k.label,class:t.normalizeClass(t.unref(a)||k.disabled?"cursor-not-allowed":"cursor-pointer")},null,8,["id","for","label","class"]),t.createVNode(se,{id:`${t.unref(o)}-${D}-help`,text:k.help},null,8,["id","text"])])])}),128))],2)])],8,Ff))}}),Yf=["aria-labelledby","aria-describedby","aria-errormessage"],Wf={key:0},Kf={class:"flex"},Gf={class:"flex items-center h-5"},Jf=["id","aria-describedby","aria-labelledby","checked","disabled","name","value","onChange"],Xf={class:"ml-3"},za=t.defineComponent({inheritAttrs:!1,__name:"Radio",props:t.mergeDefaults({modelValue:{},options:{},label:{},help:{},placeholder:{},columns:{}},Ae),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,errorState:o,modelState:a,inputID:i,isDisabled:l,isRequired:s,onInvalid:c,validate:d}=Be(r),u=(p,m)=>{a.value=m,d(p)};return(p,m)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"space-y-4","aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage},[p.label?(t.openBlock(),t.createElementBlock("div",Wf,[t.createVNode(ut,{id:t.unref(e).labelledby,label:p.label,required:t.unref(s)},null,8,["id","label","required"]),p.help?(t.openBlock(),t.createBlock(se,{key:0,id:t.unref(e).describedby,tag:"p",text:p.help},null,8,["id","text"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createVNode(Ve,{id:t.unref(e).errormessage,text:t.unref(o)},null,8,["id","text"]),t.createElementVNode("div",Kf,[t.createElementVNode("div",{class:t.normalizeClass(["grid gap-y-6",{"sm:grid sm:gap-x-5 sm:space-y-0":p.columns!==void 0,"sm:grid-cols-2":p.columns===2,"sm:grid-cols-3":p.columns===3}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(p.options,(g,b)=>(t.openBlock(),t.createElementBlock("div",{key:g.value,class:"flex items-start"},[t.createElementVNode("div",Gf,[t.createElementVNode("input",t.mergeProps({id:`${t.unref(i)}-${b}`,"aria-describedby":g.help?`${t.unref(i)}-${b}-help`:void 0,"aria-labelledby":`${t.unref(i)}-${b}-label`,checked:t.unref(a)===g.value,class:["h-4 w-4 cursor-pointer text-xy-blue","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(o)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],disabled:g.disabled,name:t.unref(i),type:"radio",value:g.value},p.$attrs,{onChange:y=>u(y,g.value),onInvalid:m[0]||(m[0]=(...y)=>t.unref(c)&&t.unref(c)(...y))}),null,16,Jf)]),t.createElementVNode("div",Xf,[t.createVNode(be,{id:`${t.unref(i)}-${b}-label`,for:`${t.unref(i)}-${b}`,label:g.label,class:t.normalizeClass(t.unref(l)||g.disabled?"cursor-not-allowed":"cursor-pointer")},null,8,["id","for","label","class"]),t.createVNode(se,{id:`${t.unref(i)}-${b}-help`,text:g.help},null,8,["id","text"])])]))),128))],2)])],8,Yf))}}),Zf={class:"flex-1 flex pr-1"},Qf={class:"flex flex-col"},ep={key:1,class:"mt-auto mb-0"},tp=["checked","name","required","value"],qa=t.defineComponent({inheritAttrs:!1,__name:"RadioCards",props:t.mergeDefaults({options:{},modelValue:{},label:{},help:{},placeholder:{},columns:{}},Ae),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,isDisabled:o,isRequired:a,nameAttr:i,modelState:l,errorState:s,onInvalid:c}=Be(r),d=u=>{u&&(s.value="")};return(u,p)=>(t.openBlock(),t.createBlock(t.unref(zl),{modelValue:t.unref(l),"onUpdate:modelValue":[p[1]||(p[1]=m=>t.isRef(l)?l.value=m:null),d],disabled:t.unref(o),"aria-invalid":t.unref(s)?"true":null,"aria-errormessage":t.unref(e).errormessage},{default:t.withCtx(()=>[u.label?(t.openBlock(),t.createBlock(t.unref(Io),{key:0,class:"block"},{default:t.withCtx(()=>[t.createVNode(ut,{tag:"div",label:u.label,required:t.unref(a)},null,8,["label","required"])]),_:1})):t.createCommentVNode("",!0),u.help?(t.openBlock(),t.createBlock(t.unref(Jn),{key:1},{default:t.withCtx(()=>[t.createVNode(se,{text:u.help},null,8,["text"])]),_:1})):t.createCommentVNode("",!0),t.createVNode(Ve,{id:t.unref(e).errormessage,text:t.unref(s)},null,8,["id","text"]),t.createElementVNode("div",{class:t.normalizeClass(["mt-4 grid grid-cols-1 gap-y-5 gap-x-4 relative",{"sm:grid-cols-2":u.columns===2,"sm:grid-cols-3":u.columns===3}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.options,m=>(t.openBlock(),t.createBlock(t.unref(ql),{key:m.value,as:"template",disabled:t.unref(o)||m.disabled,value:m.value},{default:t.withCtx(({active:g,checked:b,disabled:y})=>[t.createElementVNode("div",{class:t.normalizeClass(["relative border rounded-lg shadow-sm p-4 flex focus:outline-none",[y?"cursor-not-allowed bg-gray-50 border-gray-200 opacity-90":"cursor-pointer bg-white border-gray-300",t.unref(s)&&!y?"border-red-700":"",b?"border-transparent":"",g?"border-xy-blue ring-2 ring-xy-blue-500":""]])},[t.createElementVNode("div",Zf,[t.createElementVNode("div",Qf,[t.createVNode(t.unref(Io),{as:"div"},{default:t.withCtx(()=>[t.createVNode(be,{tag:"div",class:"mt-auto mb-auto",label:m.label},null,8,["label"])]),_:2},1024),m.help?(t.openBlock(),t.createBlock(t.unref(Jn),{key:0,as:"div"},{default:t.withCtx(()=>[t.createVNode(se,{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",ep,[t.createVNode(t.unref(Jn),{as:"div",class:"text-sm/5 font-medium mt-4 text-gray-800"},{default:t.withCtx(()=>[t.renderSlot(u.$slots,"sublabel",{active:g,checked:b,disabled:y,option:m},()=>[t.createTextVNode(t.toDisplayString(m.sublabel),1)])]),_:2},1024)])):t.createCommentVNode("",!0)])]),t.createVNode(t.unref(qo),{class:t.normalizeClass([b?"":"invisible","h-5 w-5 text-xy-blue"]),"aria-hidden":"true"},null,8,["class"]),t.createElementVNode("div",{class:t.normalizeClass([g?"border":"border-2",b?"border-xy-blue":"border-transparent","absolute -inset-px rounded-lg pointer-events-none"]),"aria-hidden":"true"},null,2),t.createElementVNode("input",{class:"sr-only top-1 left-1","aria-hidden":"true",checked:b,name:t.unref(i),required:t.unref(a),tabindex:"-1",type:"radio",value:m.value,onInvalid:p[0]||(p[0]=(...x)=>t.unref(c)&&t.unref(c)(...x))},null,40,tp)],2)]),_:2},1032,["disabled","value"]))),128))],2)]),_:3},8,["modelValue","disabled","aria-invalid","aria-errormessage"]))}}),np=["id","aria-labelledby","aria-describedby","aria-errormessage","placeholder","value"],Ya=t.defineComponent({inheritAttrs:!1,__name:"TextArea",props:t.mergeDefaults({modelValue:{},label:{},help:{},placeholder:{}},Ae),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,inputID:o,isRequired:a,modelState:i,errorState:l,onInvalid:s,inputValidation:c}=Be(r),d=u=>{i.value=u.target.value,c(u)};return(u,p)=>(t.openBlock(),t.createElementBlock("div",null,[t.createVNode(be,{id:t.unref(e).labelledby,class:"mb-2",for:t.unref(o),label:u.label,required:t.unref(a)},null,8,["id","for","label","required"]),t.createElementVNode("textarea",t.mergeProps({id:t.unref(o),"aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage,class:["block w-full rounded-md border-0 py-2 shadow-sm ring-1 ring-inset focus:ring-2 sm:text-sm sm:leading-6","disabled:cursor-not-allowed disabled:bg-gray-50 disabled:text-gray-700 disabled:ring-gray-200",t.unref(l)?"text-red-900 ring-red-700 placeholder:text-red-300 focus:ring-red-700":"text-gray-900 ring-gray-300 placeholder:text-gray-400 focus:ring-xy-blue-500"],placeholder:u.placeholder,value:t.unref(i)||void 0},u.$attrs,{onInput:d,onInvalid:p[0]||(p[0]=(...m)=>t.unref(s)&&t.unref(s)(...m))}),null,16,np),t.createVNode(se,{id:t.unref(e).describedby,class:"mt-1",text:u.help},null,8,["id","text"]),t.createVNode(Ve,{id:t.unref(e).errormessage,class:"mt-0.5",text:t.unref(l)},null,8,["id","text"])]))}}),rp=["aria-labelledby","aria-describedby","aria-errormessage"],op={key:0},ap=["for"],ip=["id","name","checked"],lp=["for"],sp=["id","name","checked"],Wa=t.defineComponent({inheritAttrs:!1,__name:"YesOrNoRadio",props:t.mergeDefaults({modelValue:{type:[Boolean,null]},label:{},help:{},placeholder:{}},Ae),emits:["update:modelValue","update:error"],setup(n){const r=n,{aria:e,isDisabled:o,isRequired:a,nameAttr:i,modelState:l,errorState:s,onInvalid:c,validate:d}=Be(r),u=(p,m)=>{l.value=m,d(p)};return(p,m)=>(t.openBlock(),t.createElementBlock("fieldset",{class:"space-y-4","aria-labelledby":t.unref(e).labelledby,"aria-describedby":t.unref(e).describedby,"aria-errormessage":t.unref(e).errormessage},[p.label?(t.openBlock(),t.createElementBlock("div",op,[t.createVNode(ut,{id:t.unref(e).labelledby,class:"block my-auto",label:p.label,required:t.unref(a),tag:"legend"},null,8,["id","label","required"]),p.help?(t.openBlock(),t.createBlock(se,{key:0,id:t.unref(e).describedby,tag:"p",text:p.help},null,8,["id","text"])):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),t.createVNode(Ve,{id:t.unref(e).errormessage,text:t.unref(s)},null,8,["id","text"]),t.createElementVNode("div",null,[t.createElementVNode("label",{class:t.normalizeClass(["inline-flex items-center group",t.unref(o)?"cursor-not-allowed":"cursor-pointer"]),for:`${t.unref(i)}-true`},[t.createElementVNode("input",t.mergeProps({id:`${t.unref(i)}-true`,type:"radio",class:["h-4 w-4 text-xy-blue cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(s)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],name:t.unref(i),value:!0,checked:t.unref(l)===!0},p.$attrs,{onChange:m[0]||(m[0]=g=>u(g,!0)),onInvalid:m[1]||(m[1]=(...g)=>t.unref(c)&&t.unref(c)(...g))}),null,16,ip),t.createVNode(be,{class:"ml-3",label:"Yes",tag:"span"})],10,ap),t.createElementVNode("label",{class:t.normalizeClass(["inline-flex items-center ml-6",t.unref(o)?"cursor-not-allowed":"cursor-pointer"]),for:`${t.unref(i)}-false`},[t.createElementVNode("input",t.mergeProps({id:`${t.unref(i)}-false`,type:"radio",class:["h-4 w-4 text-xy-blue cursor-pointer","disabled:bg-gray-100 disabled:border-gray-200 disabled:cursor-not-allowed disabled:opacity-100","checked:disabled:bg-xy-blue checked:disabled:border-xy-blue checked:disabled:opacity-50",t.unref(s)?"border-red-700 focus:ring-red-700":"border-gray-300 focus:ring-xy-blue-500"],name:t.unref(i),value:!1,checked:t.unref(l)===!1},p.$attrs,{onChange:m[2]||(m[2]=g=>u(g,!1)),onInvalid:m[3]||(m[3]=(...g)=>t.unref(c)&&t.unref(c)(...g))}),null,16,sp),t.createVNode(be,{class:"ml-3",label:"No",tag:"span"})],10,lp)])],8,rp))}}),cp=Object.freeze(Object.defineProperty({__proto__:null,ActionsDropdown:sn,BaseInput:ja,Cards:ya,Checkbox:Ha,ContentModal:wa,DataTable:Aa,DateFilter:cr,DateRangePicker:fn,DetailList:_a,DownloadCell:Da,DynamicTable:Ra,FieldsetLegend:ut,Flash:mn,InlineAlert:Sa,InputError:Ve,InputHelp:se,InputLabel:be,Modal:va,MultiCheckboxes:Ua,Paginator:pn,Popover:vt,PopoverContent:$a,PopoverPosition:vt,Radio:za,RadioCards:qa,Select:sr,SidebarLayout:Va,Slideover:Ba,Spinner:hn,StackedLayout:Ma,Steps:La,Tabs:Ia,TextArea:Ya,Toggle:Fa,Tooltip:Ta,XYSpinner:fr,YesOrNoRadio:Wa},Symbol.toStringTag,{value:"Module"})),dp=function(r){Object.entries(cp).forEach(([e,o])=>{r.component(e,o)})};N.ActionsDropdown=sn,N.BaseAPI=In,N.BaseInput=ja,N.Cards=ya,N.Checkbox=Ha,N.ContentModal=wa,N.DataTable=Aa,N.DateFilter=cr,N.DateRangePicker=fn,N.DetailList=_a,N.DownloadCell=Da,N.DynamicTable=Ra,N.FieldsetLegend=ut,N.Flash=mn,N.InlineAlert=Sa,N.InputError=Ve,N.InputHelp=se,N.InputLabel=be,N.Modal=va,N.MultiCheckboxes=Ua,N.Paginator=pn,N.Popover=vt,N.PopoverContent=$a,N.PopoverPosition=vt,N.Radio=za,N.RadioCards=qa,N.Select=sr,N.SidebarLayout=Va,N.Slideover=Ba,N.Spinner=hn,N.StackedLayout=Ma,N.Steps=La,N.Tabs=Ia,N.TextArea=Ya,N.Toggle=Fa,N.Tooltip=Ta,N.XYSpinner=fr,N.YesOrNoRadio=Wa,N.debounceFn=oo,N.debounceLeading=yl,N.default=dp,N.emailPattern=io,N.isHttpCancel=to,N.isHttpError=eo,N.looseToNumber=so,N.phonePattern=lo,N.setBaseAPIDefaults=bl,N.throttleFn=wl,N.useAppFlasher=ur,N.useAppFlashes=Ge,N.useAppSpinner=Rn,N.useBaseAPI=dt,N.useBaseAPIDelete=Qs,N.useBaseAPIGet=Zs,N.useBaseAPIPatch=ec,N.useBaseAPIPost=tc,N.useBaseAPIPut=nc,N.useFlashes=Ea,N.useInputField=Be,N.useModel=ao,N.useSpinnerDisplay=Zr,N.useTabHistory=oc,N.useUrlSearchParams=ac,Object.defineProperties(N,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xy-planning-network/trees",
3
- "version": "0.9.2-rc2",
3
+ "version": "0.9.2-rc4",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "repository": "github:xy-planning-network/trees",
@@ -128,6 +128,7 @@ export type URLParams<T> = {
128
128
  * interface SearchParams {
129
129
  * q: string
130
130
  * isActive: boolean
131
+ * attributes: string[]
131
132
  * }
132
133
  *
133
134
  * // NOTE: initial params values should come from the
@@ -141,15 +142,18 @@ export type URLParams<T> = {
141
142
  *
142
143
  * <BaseInput v-model="searchParams.q" label="Search" type="search" />
143
144
  * <Checkbox v-model="searchParams.isActive" label="Is Active" />
145
+ * <MultiCheckboxes v-model="searchParams.attributes" label="Attributes" :options="attrOpts" />
144
146
  *
145
- * When q = "jimothy bobbitz" and isActive = false
146
- * /path?q=jimothy+bobbitz
147
+ * When initialized as {q: "", isActive: false, attributes: []}
148
+ * the query string is not immediately updated. Updates
149
+ * begin once the Ref is mutated.
150
+ * /path
147
151
  *
148
- * When q = "jimothy bobbitz" and isActive = true
149
- * /path?q=jimothy+bobbitz&isActive=true
152
+ * When mutated to {q: "jimothy bobbitz", isActive: true, attributes: ['att-1', 'att-3']}
153
+ * /path?q=jimothy+bobbitz&isActive=true&attributes=att-1&attributes=att-3
150
154
  *
151
- * * When q = "" and isActive = false
152
- * /path
155
+ * When mutated later back to {q: "", isActive: false, attributes: []}
156
+ * /path?q=&isActive=false
153
157
  *
154
158
  * @param initial any Record<string, URLParamValue> like interface
155
159
  * @return Ref<T>