codesaaz-core 0.0.36 → 0.0.39

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.
@@ -1,173 +1,28 @@
1
- (function(Tt,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("vue"),require("vue-router"),require("primevue")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","primevue"],l):(Tt=typeof globalThis<"u"?globalThis:Tt||self,l(Tt.Codesaaz={},Tt.Vue,Tt.VueRouter,Tt.PrimeVue))})(this,function(Tt,l,Ut,qo){"use strict";var nk=Object.defineProperty;var ik=(Tt,l,Ut)=>l in Tt?nk(Tt,l,{enumerable:!0,configurable:!0,writable:!0,value:Ut}):Tt[l]=Ut;var L=(Tt,l,Ut)=>ik(Tt,typeof l!="symbol"?l+"":l,Ut);const Oi={get:Di("GET"),post:Di("POST"),put:Di("PUT"),delete:Di("DELETE")};function Di(n){return(t,e)=>{const i={method:n,headers:{}};return e&&(i.headers["Content-Type"]="application/json",i.body=JSON.stringify(e)),fetch(t,i).then(dd)}}function dd(n){return n.text().then(t=>{const e=t&&JSON.parse(t);return n.ok?e:Promise.reject(e)})}/*!
1
+ (function(ke,o){typeof exports=="object"&&typeof module<"u"?o(exports,require("vue"),require("vue-router"),require("primevue")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","primevue"],o):(ke=typeof globalThis<"u"?globalThis:ke||self,o(ke.Codesaaz={},ke.Vue,ke.VueRouter,ke.PrimeVue))})(this,function(ke,o,it,Cr){"use strict";var Er=document.createElement("style");Er.textContent=`.text-color-hint[data-v-8820d348]{color:var( --text-color)}.p-message-wrapper{padding:.5rem}.showHideColor,.sorting-filter-section[data-v-a358808d]:hover,.linked-entity-section[data-v-412eec44]:hover{color:var(--primary-color)}.border-bottom-section[data-v-412eec44]{border-bottom:1px solid var(--surface-border)}.section-heading[data-v-12a444f4]:hover{color:var(--primary-color)}.custom-sidebar[data-v-12a444f4]{padding-left:8%;padding-top:14px;padding-bottom:14px;border-bottom-left-radius:5px;border-bottom-right-radius:5px;background:var(--surface-card);border-top:1px solid var(--surface-border);bottom:0;left:0;position:fixed;right:0;z-index:1111;transition-property:none;transition-duration:.3s;transform:translateY(0)}.custom-sidebar-content[data-v-12a444f4]{display:flex;align-items:center!important;justify-content:space-between;display:inline-flex;word-break:break-word;overflow:visible;flex-grow:1;width:100%}.custom-sidebar-button[data-v-12a444f4]{display:flex;flex-wrap:nowrap;flex-shrink:1}.custom-sidebar-text[data-v-12a444f4]{flex-shrink:100000;width:100%;overflow-x:auto;overflow-y:hidden;display:flex;flex-direction:column;white-space:normal;padding-left:10px}.column-item[data-v-12a444f4]{width:calc(33.33% - 10px);margin-bottom:20px}.tile-grid[data-v-bce4d0f0]{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.tile[data-v-f59ea2d9]:hover{background:var(--surface-hover)}.tile-grid[data-v-066206a2]{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.record-list[data-v-066206a2]{color:var(--primary-color)}.record-head[data-v-066206a2]{color:var(--p-red-400)}.tile[data-v-edc5e5a2]:hover{background:var(--surface-hover)}.error-message[data-v-edc5e5a2]{background-color:#ffe4e4;border:1px solid red;padding:10px;margin-bottom:10px;text-align:center;border-radius:5px}.flex[data-v-c78e676f]{display:flex}.flex-col[data-v-c78e676f]{flex-direction:column}.flex-grow[data-v-c78e676f]{flex-grow:1}.gap-4[data-v-c78e676f]{gap:1rem}.gap-2[data-v-c78e676f]{gap:.5rem}.p-6[data-v-c78e676f]{padding:1.5rem}.bg-white[data-v-c78e676f]{background-color:#fff}.shadow-md[data-v-c78e676f]{box-shadow:0 4px 6px #0000001a}.rounded-lg[data-v-c78e676f]{border-radius:.5rem}.border[data-v-c78e676f]{border-width:1px}.border-gray-300[data-v-c78e676f]{border-color:#d1d5db}.font-bold[data-v-c78e676f]{font-weight:700}.text-gray-700[data-v-c78e676f]{color:#4a5568}.text-gray-600[data-v-c78e676f]{color:#718096}.tile[data-v-037944bc]:hover{background:var(--surface-hover)}.error-message[data-v-037944bc]{background-color:#ffe4e4;border:1px solid red;padding:10px;margin-bottom:10px;text-align:center;border-radius:5px}.flex[data-v-27c0e644]{display:flex}.flex-col[data-v-27c0e644]{flex-direction:column}.flex-grow[data-v-27c0e644]{flex-grow:1}.gap-4[data-v-27c0e644]{gap:1rem}.gap-2[data-v-27c0e644]{gap:.5rem}.p-6[data-v-27c0e644]{padding:1.5rem}.bg-white[data-v-27c0e644]{background-color:#fff}.shadow-md[data-v-27c0e644]{box-shadow:0 4px 6px #0000001a}.rounded-lg[data-v-27c0e644]{border-radius:.5rem}.border[data-v-27c0e644]{border-width:1px}.border-gray-300[data-v-27c0e644]{border-color:#d1d5db}.font-bold[data-v-27c0e644]{font-weight:700}.text-gray-700[data-v-27c0e644]{color:#4a5568}.text-gray-600[data-v-27c0e644]{color:#718096}@media (min-width: 400px) and (max-width: 520px){.responsive-box[data-v-27c0e644]{width:75%}}:root{--vc-clr-primary: #000;--vc-clr-secondary: #090f207f;--vc-clr-white: #ffffff}.carousel,.carousel *{box-sizing:border-box}.carousel{height:var(--vc-carousel-height);overscroll-behavior:none;position:relative;touch-action:pan-y;z-index:1}.carousel.is-dragging{touch-action:none}.carousel__track{display:flex;gap:var(--vc-slide-gap);height:100%;list-style:none;margin:0!important;padding:0!important;position:relative;transition:transform ease-out;transition-duration:var(--vc-transition-duration);width:100%}.carousel__viewport{height:100%;overflow:hidden;width:100%}.carousel__sr-only{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.carousel.is-ttb .carousel__track{flex-direction:column}.carousel.is-btt .carousel__track{flex-direction:column-reverse}.carousel.is-vertical .carousel__slide--clone:first-child{margin-block-start:var(--vc-cloned-offset)}.carousel:not(.is-vertical) .carousel__slide--clone:first-child{margin-inline-start:var(--vc-cloned-offset)}.carousel.is-effect-fade .carousel__track{display:grid;grid-template-columns:100%;grid-template-rows:100%;transition:none}.carousel.is-effect-fade .carousel__slide{grid-area:1 / 1;height:100%!important;opacity:0;pointer-events:none;transition:opacity ease-in-out;transition-duration:var(--vc-transition-duration);width:100%!important}.carousel.is-effect-fade .carousel__slide--active{opacity:1;pointer-events:auto}:root{--vc-icn-width: 1.2em}.carousel__icon{fill:currentColor;height:var(--vc-icn-width);width:var(--vc-icn-width)}:root{--vc-nav-background: transparent;--vc-nav-border-radius: 0;--vc-nav-color: var(--vc-clr-primary);--vc-nav-color-hover: var(--vc-clr-secondary);--vc-nav-height: 30px;--vc-nav-width: 30px}.carousel__next,.carousel__prev{align-items:center;background:var(--vc-nav-background);border:0;border-radius:var(--vc-nav-border-radius);box-sizing:content-box;color:var(--vc-nav-color);cursor:pointer;display:flex;font-size:var(--vc-nav-height);height:var(--vc-nav-height);justify-content:center;margin:0 10px;padding:0;position:absolute;text-align:center;top:50%;transform:translateY(-50%);width:var(--vc-nav-width)}.carousel__next--disabled,.carousel__prev--disabled{cursor:not-allowed;opacity:.5}.carousel__next{right:0}.carousel__prev{left:0}.carousel.is-btt .carousel__next{top:0}.carousel.is-btt .carousel__prev{bottom:0}.carousel.is-rtl .carousel__next{left:0;right:auto}.carousel.is-rtl .carousel__prev{left:auto;right:0}.carousel.is-ttb .carousel__next{bottom:0}.carousel.is-ttb .carousel__prev{top:0}.carousel.is-vertical .carousel__next,.carousel.is-vertical .carousel__prev{left:auto;margin:5px auto;right:50%;top:auto;transform:translate(50%)}@media (hover: hover){.carousel__next:hover,.carousel__prev:hover{color:var(--vc-nav-color-hover)}}:root{--vc-pgn-active-color: var(--vc-clr-primary);--vc-pgn-background-color: var(--vc-clr-secondary);--vc-pgn-border-radius: 0;--vc-pgn-height: 4px;--vc-pgn-margin: 6px 5px;--vc-pgn-width: 16px}.carousel__pagination{bottom:5px;display:flex;justify-content:center;left:50%;line-height:0;list-style:none!important;margin:0!important;padding:0!important;position:absolute;transform:translate(-50%)}.carousel__pagination-button{border:0;cursor:pointer;margin:var(--vc-pgn-margin);background-color:var(--vc-pgn-background-color);border-radius:var(--vc-pgn-border-radius);display:block;height:var(--vc-pgn-height);width:var(--vc-pgn-width);padding:0}.carousel__pagination-button--active{background-color:var(--vc-pgn-active-color)}@media (hover: hover){.carousel__pagination-button:hover{background-color:var(--vc-pgn-active-color)}}.carousel.is-vertical .carousel__pagination{bottom:50%;flex-direction:column;left:auto;right:5px;transform:translateY(50%)}.carousel.is-vertical .carousel__pagination-button{height:var(--vc-pgn-width);width:var(--vc-pgn-height)}.carousel.is-btt .carousel__pagination{flex-direction:column-reverse}.carousel__slide{align-items:center;display:flex;flex-shrink:0;justify-content:center;margin:0;transform:translateZ(0)}.tile[data-v-2c25fd02]:hover{background:var(--surface-hover)}.error-message[data-v-2c25fd02]{background-color:#ffe4e4;border:1px solid red;padding:10px;margin-bottom:10px;text-align:center;border-radius:5px}[data-v-2c25fd02] .carousel__prev,[data-v-2c25fd02] .carousel__next{background-color:var(--primary-color);border-radius:50%;width:40px;height:40px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:20px;transition:background-color .3s}[data-v-2c25fd02] .carousel__prev:hover,[data-v-2c25fd02] .carousel__next:hover{background-color:var(--primary-color)}[data-v-2c25fd02] .carousel__pagination{display:flex;justify-content:center;margin-top:10px}[data-v-2c25fd02] .carousel__pagination-button{width:10px;height:10px;background:gray;border-radius:50%;margin:0 5px;transition:background .3s}[data-v-2c25fd02] .carousel__pagination-button--active{background:var(--primary-color)}@media (min-width: 360px) and (max-width: 520px){[data-v-2c25fd02] .carousel__prev,[data-v-2c25fd02] .carousel__next{background-color:var(--primary-color);border-radius:50%;width:30px;height:30px;display:flex;align-items:center;justify-content:center;color:#fff;font-size:20px;transition:background-color .3s}}.layout-menu-vertical .layout-root-menuitem.is-open>.submenu-vertical[data-v-918f9cb5]{display:block;left:9rem;background-color:#fff;width:12rem}.layout-menu-horizontal .layout-root-menuitem.is-open>.submenu-horizontal[data-v-918f9cb5]{display:block;top:49px;left:0!important}.layout-container.layout-slim-plus .layout-menu .layout-root-menuitem>ul[data-v-918f9cb5]{left:7rem;position:absolute}
2
+ /*$vite$:1*/`,document.head.appendChild(Er);/*!
2
3
  * pinia v2.3.1
3
4
  * (c) 2025 Eduardo San Martin Morote
4
5
  * @license MIT
5
- */let Yo;const vs=n=>Yo=n,ud=Symbol();function Cs(n){return n&&typeof n=="object"&&Object.prototype.toString.call(n)==="[object Object]"&&typeof n.toJSON!="function"}var Pn;(function(n){n.direct="direct",n.patchObject="patch object",n.patchFunction="patch function"})(Pn||(Pn={}));const Ko=()=>{};function Xo(n,t,e,i=Ko){n.push(t);const s=()=>{const o=n.indexOf(t);o>-1&&(n.splice(o,1),i())};return!e&&l.getCurrentScope()&&l.onScopeDispose(s),s}function dn(n,...t){n.slice().forEach(e=>{e(...t)})}const hd=n=>n(),Go=Symbol(),Os=Symbol();function Ds(n,t){n instanceof Map&&t instanceof Map?t.forEach((e,i)=>n.set(i,e)):n instanceof Set&&t instanceof Set&&t.forEach(n.add,n);for(const e in t){if(!t.hasOwnProperty(e))continue;const i=t[e],s=n[e];Cs(s)&&Cs(i)&&n.hasOwnProperty(e)&&!l.isRef(i)&&!l.isReactive(i)?n[e]=Ds(s,i):n[e]=i}return n}const fd=Symbol();function md(n){return!Cs(n)||!n.hasOwnProperty(fd)}const{assign:Ne}=Object;function pd(n){return!!(l.isRef(n)&&n.effect)}function gd(n,t,e,i){const{state:s,actions:o,getters:r}=t,a=e.state.value[n];let c;function d(){a||(e.state.value[n]=s?s():{});const u=l.toRefs(e.state.value[n]);return Ne(u,o,Object.keys(r||{}).reduce((h,f)=>(h[f]=l.markRaw(l.computed(()=>{vs(e);const m=e._s.get(n);return r[f].call(m,m)})),h),{}))}return c=Qo(n,d,t,e,i,!0),c}function Qo(n,t,e={},i,s,o){let r;const a=Ne({actions:{}},e),c={deep:!0};let d,u,h=[],f=[],m;const p=i.state.value[n];!o&&!p&&(i.state.value[n]={}),l.ref({});let g;function y(x){let O;d=u=!1,typeof x=="function"?(x(i.state.value[n]),O={type:Pn.patchFunction,storeId:n,events:m}):(Ds(i.state.value[n],x),O={type:Pn.patchObject,payload:x,storeId:n,events:m});const M=g=Symbol();l.nextTick().then(()=>{g===M&&(d=!0)}),u=!0,dn(h,O,i.state.value[n])}const b=o?function(){const{state:O}=e,M=O?O():{};this.$patch(C=>{Ne(C,M)})}:Ko;function _(){r.stop(),h=[],f=[],i._s.delete(n)}const w=(x,O="")=>{if(Go in x)return x[Os]=O,x;const M=function(){vs(i);const C=Array.from(arguments),T=[],$=[];function U(I){T.push(I)}function H(I){$.push(I)}dn(f,{args:C,name:M[Os],store:k,after:U,onError:H});let B;try{B=x.apply(this&&this.$id===n?this:k,C)}catch(I){throw dn($,I),I}return B instanceof Promise?B.then(I=>(dn(T,I),I)).catch(I=>(dn($,I),Promise.reject(I))):(dn(T,B),B)};return M[Go]=!0,M[Os]=O,M},E={_p:i,$id:n,$onAction:Xo.bind(null,f),$patch:y,$reset:b,$subscribe(x,O={}){const M=Xo(h,x,O.detached,()=>C()),C=r.run(()=>l.watch(()=>i.state.value[n],T=>{(O.flush==="sync"?u:d)&&x({storeId:n,type:Pn.direct,events:m},T)},Ne({},c,O)));return M},$dispose:_},k=l.reactive(E);i._s.set(n,k);const S=(i._a&&i._a.runWithContext||hd)(()=>i._e.run(()=>(r=l.effectScope()).run(()=>t({action:w}))));for(const x in S){const O=S[x];if(l.isRef(O)&&!pd(O)||l.isReactive(O))o||(p&&md(O)&&(l.isRef(O)?O.value=p[x]:Ds(O,p[x])),i.state.value[n][x]=O);else if(typeof O=="function"){const M=w(O,x);S[x]=M,a.actions[x]=O}}return Ne(k,S),Ne(l.toRaw(k),S),Object.defineProperty(k,"$state",{get:()=>i.state.value[n],set:x=>{y(O=>{Ne(O,x)})}}),i._p.forEach(x=>{Ne(k,r.run(()=>x({store:k,app:i._a,pinia:i,options:a})))}),p&&o&&e.hydrate&&e.hydrate(k.$state,p),d=!0,u=!0,k}/*! #__NO_SIDE_EFFECTS__ */function Jo(n,t,e){let i,s;const o=typeof t=="function";typeof n=="string"?(i=n,s=o?e:t):(s=n,i=n.id);function r(a,c){const d=l.hasInjectionContext();return a=a||(d?l.inject(ud,null):null),a&&vs(a),a=Yo,a._s.has(i)||(o?Qo(i,t,s,a):gd(i,s,a)),a._s.get(i)}return r.$id=i,r}const me=Jo("globalConfigsStore",{state:()=>({globalConfigs:{}}),actions:{setBaseUrl(n){this.globalConfigs.baseUrl=n},setAppId(n){this.globalConfigs.appId=n}},getters:{getBaseUrl:n=>()=>n.globalConfigs.baseUrl,getAppId:n=>()=>n.globalConfigs.appId}});class Zo{constructor(){let t="http://localhost:7070";const e=me();e.getBaseUrl()!=null&&e.getBaseUrl()!=""&&(t=e.getBaseUrl()),this.baseUrl=t}async post(t,e){return await Oi.post(this.baseUrl+t,e)}async put(t,e){return await Oi.put(this.baseUrl+t,e)}async delete(t,e){return await Oi.delete(this.baseUrl+t,e)}async get(t){return await Oi.get(this.baseUrl+t)}}class qe{constructor(){this.httpService=new Zo}async getEntityRecords(t){return await this.getAppId(),await this.httpService.get(`/api/app/v1/${this.appId}/entity/${t}/record`)}async searchEntityRecords(t,e){return this.appId==null&&this.getAppId(),await this.httpService.post(`/api/app/v1/${this.appId}/entity/${t}/record/search`,e)}async getRelatedEntityRecord(t,e){return this.appId==null&&this.getAppId(),await this.httpService.get(`/api/app/v1/${this.appId}/entity/${t}/link/record/${e}?fetchRelatedEntities=true`)}async saveRelatedEntityRecord(t,e,i){return this.appId==null&&this.getAppId(),await this.httpService.post(`/api/app/v1/${this.appId}/entity/${t}/link/record/${e}`,i)}async getRecord(t,e){return this.appId==null&&this.getAppId(),await this.httpService.get(`/api/app/v1/${this.appId}/entity/${t}/record/${e}?fetchRelatedEntities=false`)}async addRecord(t,e){return this.appId==null&&this.getAppId(),await this.httpService.post(`/api/app/v1/${this.appId}/entity/${t}/record`,e)}async updateRecord(t,e,i){return this.appId==null&&this.getAppId(),await this.httpService.put(`/api/app/v1/${this.appId}/entity/${t}/record/${e}`,i)}async deleteRecord(t,e){return this.appId==null&&this.getAppId(),await this.httpService.delete(`/api/app/v1/${this.appId}/entity/${t}/record/${e}`)}async getAppId(){const t=me();this.appId=t.getAppId()}}function yd(n=""){const t=new qe,e={gt:"GREATER_THAN",dateAfter:"GREATER_THAN",equals:"EQUAL",dateIs:"EQUAL",notEquals:"NOT_EQUAL",dateIsNot:"NOT_EQUAL",lt:"LESS_THAN",dateBefore:"LESS_THAN",lte:"LESS_THAN_EQUAL",gte:"GREATER_THAN_EQUAL",between:"BETWEEN",contains:"CONTAINS",startsWith:"STARTS_WITH",notContains:"NOT_CONTAINS",endsWith:"ENDS_WITH"};let i=l.ref({}),s=l.ref([]),o=l.ref([]),r=l.ref([]);const a=l.ref(""),c=l.ref(1),d=l.ref(25),u=l.ref(0),h=l.ref(0),f=l.ref(0),m=l.ref(!1),p=l.ref([]),g=l.ref(""),y=l.ref({}),b=async(C,T=!0)=>{m.value=!0;try{const $=await t.getEntityRecords(C);$&&$.response&&(i.value=$.response,s.value=$.response.result,r.value=$.response.entity.entityDefinition.columns,o.value=w($.response.entity.entityDefinition.columns),h.value=$.response.totalRecords,M())}catch($){console.error("Error fetching entity:",$.errorMessage)}finally{m.value=!1}},_=async(C=!0)=>{m.value=!0;try{const T={sortBy:[a.value],sortDirection:c.value===1?"ASC":"DESC",pageSize:d.value,currentPage:u.value,columnList:null,filter:p.value,fullTextSearch:g.value};Object.keys(T.filter).length===0&&(T.filter=[]);const $=await t.searchEntityRecords(n,T);$&&$.response&&(m.value=!1,i.value=$.response,s.value=$.response.result,h.value=$.response.totalRecords,f.value=u.value*d.value)}catch(T){console.error("Error fetching entity:",T.errorMessage)}finally{m.value=!1}},w=C=>C.map(T=>({field:T.name,name:T.displayName?T.displayName:T.name,filterable:T.filterable,datatype:T.type,sortable:!0,displayFormatKey:T.displayFormatKey,displayFormat:T.displayFormat})),E=C=>{a.value=C.sortField,c.value=C.sortOrder,f.value=0,_()},k=C=>{d.value=C.rows,u.value=C.page,f.value=C.first,_()},v=()=>{_()},S=()=>{_()},x=C=>{switch(C.toLowerCase()){case"integer":case"int":case"numeric":return"numeric";case"date":return"date";case"bool":case"boolean":return"boolean";default:return"text"}},O=C=>{const T=o.value.find($=>$.field===C);return T?T.datatype:null},M=()=>{for(let C=0;C<r.value.length;C++){const T=r.value[C];if(T.primaryKey&&T.primaryKey==!0){y.value=T,a.value=T.name;break}}};return{items:s,headers:o,first:f,totalRecords:h,pageSize:d,loading:m,sortBy:a,sortDirection:c,operatorMap:e,filterToSend:p,fullTextSearch:g,listingResponse:i,primarayKeyColumn:y,onFullTextSearch:S,getDatatypeByField:O,getColumnDatatype:x,onSort:E,onPage:k,onFilter:v,fetchEntityFilterData:_,fetchEntityByName:b}}const jt=(n,t)=>{const e=n.__vccOpts||n;for(const[i,s]of t)e[i]=s;return e},bd={key:0,class:"field flex flex-col mb-3"},_d=["for"],xd={key:0},kd={key:0,class:"font-bold"},Sd={key:1,class:"font-bold text-color-hint"},wd={key:1,class:"flex items-center"},Ed={class:"ml-2"},vd={key:0},Ni=jt({__name:"EntityForm",props:l.mergeModels({column:Object,errors:Array},{modelValue:{},modelModifiers:{}}),emits:l.mergeModels(["input"],["update:modelValue"]),setup(n,{emit:t}){const e=l.useModel(n,"modelValue"),i=t,s=o=>{i("input",o.name)};if(n.column&&!n.column.inputComponent){let o="";switch(n.column.type.toLowerCase()){case"text":o="INPUT_TEXT";break;case"int":o="INPUT_NUMBER";break;case"float":o="INPUT_FLOAT";break;case"boolean":o="INPUT_BOOLEAN";break;case"uuid":o="INPUT_UUID";break;case"date":o="INPUT_DATE";break;default:o="INPUT_STRING"}n.column.inputComponent=o}return(o,r)=>{var h,f,m,p,g;const a=l.resolveComponent("Calendar"),c=l.resolveComponent("InputNumber"),d=l.resolveComponent("InputText"),u=l.resolveComponent("Checkbox");return l.openBlock(),l.createElementBlock(l.Fragment,null,[n.column.inputComponent.toLowerCase()!="input_boolean"?(l.openBlock(),l.createElementBlock("div",bd,[l.createElementVNode("label",{class:"mb-1",for:n.column.name},[l.createTextVNode(l.toDisplayString(n.column.displayName||n.column.name)+" ",1),n.column.required?(l.openBlock(),l.createElementBlock("span",xd,"*")):l.createCommentVNode("",!0)],8,_d),n.column.inputComponent.toLowerCase()=="input_date"?(l.openBlock(),l.createBlock(a,{key:0,modelValue:e.value,"onUpdate:modelValue":r[0]||(r[0]=y=>e.value=y),id:n.column.name,name:n.column.name,onDateSelect:r[1]||(r[1]=y=>s(n.column)),invalid:((h=n.errors)==null?void 0:h.length)>0},null,8,["modelValue","id","name","invalid"])):n.column.inputComponent.toLowerCase()=="input_number"?(l.openBlock(),l.createBlock(c,{key:1,modelValue:e.value,"onUpdate:modelValue":r[2]||(r[2]=y=>e.value=y),id:n.column.name,name:n.column.name,allowEmpty:!0,format:!1,onInput:r[3]||(r[3]=y=>s(n.column)),invalid:((f=n.errors)==null?void 0:f.length)>0},null,8,["modelValue","id","name","invalid"])):n.column.type.toLowerCase()=="input_float"?(l.openBlock(),l.createBlock(c,{key:2,type:"decimal",minFractionDigits:1,id:n.column.name,allowEmpty:!0,format:!1,name:n.column.name,onInput:r[4]||(r[4]=y=>s(n.column)),invalid:((m=n.errors)==null?void 0:m.length)>0},null,8,["id","name","invalid"])):(l.openBlock(),l.createBlock(d,{key:3,modelValue:e.value,"onUpdate:modelValue":r[5]||(r[5]=y=>e.value=y),id:n.column.name,name:n.column.name,onInput:r[6]||(r[6]=y=>s(n.column)),invalid:((p=n.errors)==null?void 0:p.length)>0},null,8,["modelValue","id","name","invalid"])),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.errors,(y,b)=>(l.openBlock(),l.createElementBlock("div",{key:b,class:"text-red-500 mt-1 ml-2"},[y.includes("hint:")?(l.openBlock(),l.createElementBlock("small",Sd,l.toDisplayString(y.split(":")[1]),1)):(l.openBlock(),l.createElementBlock("small",kd,l.toDisplayString(y),1))]))),128))])):l.createCommentVNode("",!0),n.column.inputComponent.toLowerCase()=="input_boolean"?(l.openBlock(),l.createElementBlock("div",wd,[l.createVNode(u,{modelValue:e.value,"onUpdate:modelValue":r[7]||(r[7]=y=>e.value=y),invalid:((g=n.errors)==null?void 0:g.length)>0,onInput:r[8]||(r[8]=y=>s(n.column.name)),binary:""},null,8,["modelValue","invalid"]),l.createElementVNode("label",Ed,[l.createTextVNode(l.toDisplayString(n.column.displayName||n.column.name)+" ",1),n.column.required?(l.openBlock(),l.createElementBlock("span",vd,"*")):l.createCommentVNode("",!0)])])):l.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-bda1af7c"]]);/**
6
+ */let Sr;const Fo=e=>Sr=e,Za=Symbol();function Ao(e){return e&&typeof e=="object"&&Object.prototype.toString.call(e)==="[object Object]"&&typeof e.toJSON!="function"}var Lt;(function(e){e.direct="direct",e.patchObject="patch object",e.patchFunction="patch function"})(Lt||(Lt={}));const Br=()=>{};function Nr(e,t,r,n=Br){e.push(t);const a=()=>{const i=e.indexOf(t);i>-1&&(e.splice(i,1),n())};return!r&&o.getCurrentScope()&&o.onScopeDispose(a),a}function _t(e,...t){e.slice().forEach(r=>{r(...t)})}const ei=e=>e(),_r=Symbol(),Io=Symbol();function Po(e,t){e instanceof Map&&t instanceof Map?t.forEach((r,n)=>e.set(n,r)):e instanceof Set&&t instanceof Set&&t.forEach(e.add,e);for(const r in t){if(!t.hasOwnProperty(r))continue;const n=t[r],a=e[r];Ao(a)&&Ao(n)&&e.hasOwnProperty(r)&&!o.isRef(n)&&!o.isReactive(n)?e[r]=Po(a,n):e[r]=n}return e}const ti=Symbol();function oi(e){return!Ao(e)||!e.hasOwnProperty(ti)}const{assign:lt}=Object;function ri(e){return!!(o.isRef(e)&&e.effect)}function ni(e,t,r,n){const{state:a,actions:i,getters:l}=t,d=r.state.value[e];let u;function s(){d||(r.state.value[e]=a?a():{});const c=o.toRefs(r.state.value[e]);return lt(c,i,Object.keys(l||{}).reduce((f,m)=>(f[m]=o.markRaw(o.computed(()=>{Fo(r);const p=r._s.get(e);return l[m].call(p,p)})),f),{}))}return u=Rr(e,s,t,r,n,!0),u}function Rr(e,t,r={},n,a,i){let l;const d=lt({actions:{}},r),u={deep:!0};let s,c,f=[],m=[],p;const g=n.state.value[e];!i&&!g&&(n.state.value[e]={}),o.ref({});let h;function b(y){let E;s=c=!1,typeof y=="function"?(y(n.state.value[e]),E={type:Lt.patchFunction,storeId:e,events:p}):(Po(n.state.value[e],y),E={type:Lt.patchObject,payload:y,storeId:e,events:p});const V=h=Symbol();o.nextTick().then(()=>{h===V&&(s=!0)}),c=!0,_t(f,E,n.state.value[e])}const k=i?function(){const{state:E}=r,V=E?E():{};this.$patch(_=>{lt(_,V)})}:Br;function C(){l.stop(),f=[],m=[],n._s.delete(e)}const S=(y,E="")=>{if(_r in y)return y[Io]=E,y;const V=function(){Fo(n);const _=Array.from(arguments),D=[],P=[];function T(Y){D.push(Y)}function j(Y){P.push(Y)}_t(m,{args:_,name:V[Io],store:R,after:T,onError:j});let I;try{I=y.apply(this&&this.$id===e?this:R,_)}catch(Y){throw _t(P,Y),Y}return I instanceof Promise?I.then(Y=>(_t(D,Y),Y)).catch(Y=>(_t(P,Y),Promise.reject(Y))):(_t(D,I),I)};return V[_r]=!0,V[Io]=E,V},L={_p:n,$id:e,$onAction:Nr.bind(null,m),$patch:b,$reset:k,$subscribe(y,E={}){const V=Nr(f,y,E.detached,()=>_()),_=l.run(()=>o.watch(()=>n.state.value[e],D=>{(E.flush==="sync"?c:s)&&y({storeId:e,type:Lt.direct,events:p},D)},lt({},u,E)));return V},$dispose:C},R=o.reactive(L);n._s.set(e,R);const w=(n._a&&n._a.runWithContext||ei)(()=>n._e.run(()=>(l=o.effectScope()).run(()=>t({action:S}))));for(const y in w){const E=w[y];if(o.isRef(E)&&!ri(E)||o.isReactive(E))i||(g&&oi(E)&&(o.isRef(E)?E.value=g[y]:Po(E,g[y])),n.state.value[e][y]=E);else if(typeof E=="function"){const V=S(E,y);w[y]=V,d.actions[y]=E}}return lt(R,w),lt(o.toRaw(R),w),Object.defineProperty(R,"$state",{get:()=>n.state.value[e],set:y=>{b(E=>{lt(E,y)})}}),n._p.forEach(y=>{lt(R,l.run(()=>y({store:R,app:n._a,pinia:n,options:d})))}),g&&i&&r.hydrate&&r.hydrate(R.$state,g),s=!0,c=!0,R}/*! #__NO_SIDE_EFFECTS__ */function Lo(e,t,r){let n,a;const i=typeof t=="function";typeof e=="string"?(n=e,a=i?r:t):(a=e,n=e.id);function l(d,u){const s=o.hasInjectionContext();return d=d||(s?o.inject(Za,null):null),d&&Fo(d),d=Sr,d._s.has(n)||(i?Rr(n,t,a,d):ni(n,a,d)),d._s.get(n)}return l.$id=n,l}const Ne=Lo("globalConfigsStore",{state:()=>({globalConfigs:{}}),actions:{setBaseUrl(e){this.globalConfigs.baseUrl=e},setAppId(e){this.globalConfigs.appId=e}},getters:{getBaseUrl:e=>()=>e.globalConfigs.baseUrl,getAppId:e=>()=>e.globalConfigs.appId}});function Tr(e,t){return function(){return e.apply(t,arguments)}}const{toString:ai}=Object.prototype,{getPrototypeOf:Mo}=Object,ro=(e=>t=>{const r=ai.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),ze=e=>(e=e.toLowerCase(),t=>ro(t)===e),no=e=>t=>typeof t===e,{isArray:Rt}=Array,Mt=no("undefined");function ii(e){return e!==null&&!Mt(e)&&e.constructor!==null&&!Mt(e.constructor)&&Ie(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Dr=ze("ArrayBuffer");function li(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Dr(e.buffer),t}const si=no("string"),Ie=no("function"),Or=no("number"),ao=e=>e!==null&&typeof e=="object",ci=e=>e===!0||e===!1,io=e=>{if(ro(e)!=="object")return!1;const t=Mo(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},di=ze("Date"),ui=ze("File"),fi=ze("Blob"),mi=ze("FileList"),pi=e=>ao(e)&&Ie(e.pipe),gi=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Ie(e.append)&&((t=ro(e))==="formdata"||t==="object"&&Ie(e.toString)&&e.toString()==="[object FormData]"))},hi=ze("URLSearchParams"),[bi,yi,ki,wi]=["ReadableStream","Request","Response","Headers"].map(ze),xi=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function jt(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,a;if(typeof e!="object"&&(e=[e]),Rt(e))for(n=0,a=e.length;n<a;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),l=i.length;let d;for(n=0;n<l;n++)d=i[n],t.call(null,e[d],d,e)}}function Vr(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,a;for(;n-- >0;)if(a=r[n],t===a.toLowerCase())return a;return null}const ht=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$r=e=>!Mt(e)&&e!==ht;function jo(){const{caseless:e}=$r(this)&&this||{},t={},r=(n,a)=>{const i=e&&Vr(t,a)||a;io(t[i])&&io(n)?t[i]=jo(t[i],n):io(n)?t[i]=jo({},n):Rt(n)?t[i]=n.slice():t[i]=n};for(let n=0,a=arguments.length;n<a;n++)arguments[n]&&jt(arguments[n],r);return t}const vi=(e,t,r,{allOwnKeys:n}={})=>(jt(t,(a,i)=>{r&&Ie(a)?e[i]=Tr(a,r):e[i]=a},{allOwnKeys:n}),e),Ci=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Ei=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Si=(e,t,r,n)=>{let a,i,l;const d={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)l=a[i],(!n||n(l,e,t))&&!d[l]&&(t[l]=e[l],d[l]=!0);e=r!==!1&&Mo(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Bi=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},Ni=e=>{if(!e)return null;if(Rt(e))return e;let t=e.length;if(!Or(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},_i=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Mo(Uint8Array)),Ri=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let a;for(;(a=n.next())&&!a.done;){const i=a.value;t.call(e,i[0],i[1])}},Ti=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},Di=ze("HTMLFormElement"),Oi=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,a){return n.toUpperCase()+a}),Fr=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Vi=ze("RegExp"),Ar=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};jt(r,(a,i)=>{let l;(l=t(a,i,e))!==!1&&(n[i]=l||a)}),Object.defineProperties(e,n)},$i=e=>{Ar(e,(t,r)=>{if(Ie(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(Ie(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Fi=(e,t)=>{const r={},n=a=>{a.forEach(i=>{r[i]=!0})};return Rt(e)?n(e):n(String(e).split(t)),r},Ai=()=>{},Ii=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,zo="abcdefghijklmnopqrstuvwxyz",Ir="0123456789",Pr={DIGIT:Ir,ALPHA:zo,ALPHA_DIGIT:zo+zo.toUpperCase()+Ir},Pi=(e=16,t=Pr.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function Li(e){return!!(e&&Ie(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Mi=e=>{const t=new Array(10),r=(n,a)=>{if(ao(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[a]=n;const i=Rt(n)?[]:{};return jt(n,(l,d)=>{const u=r(l,a+1);!Mt(u)&&(i[d]=u)}),t[a]=void 0,i}}return n};return r(e,0)},ji=ze("AsyncFunction"),zi=e=>e&&(ao(e)||Ie(e))&&Ie(e.then)&&Ie(e.catch),Lr=((e,t)=>e?setImmediate:t?((r,n)=>(ht.addEventListener("message",({source:a,data:i})=>{a===ht&&i===r&&n.length&&n.shift()()},!1),a=>{n.push(a),ht.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Ie(ht.postMessage)),Ui=typeof queueMicrotask<"u"?queueMicrotask.bind(ht):typeof process<"u"&&process.nextTick||Lr,B={isArray:Rt,isArrayBuffer:Dr,isBuffer:ii,isFormData:gi,isArrayBufferView:li,isString:si,isNumber:Or,isBoolean:ci,isObject:ao,isPlainObject:io,isReadableStream:bi,isRequest:yi,isResponse:ki,isHeaders:wi,isUndefined:Mt,isDate:di,isFile:ui,isBlob:fi,isRegExp:Vi,isFunction:Ie,isStream:pi,isURLSearchParams:hi,isTypedArray:_i,isFileList:mi,forEach:jt,merge:jo,extend:vi,trim:xi,stripBOM:Ci,inherits:Ei,toFlatObject:Si,kindOf:ro,kindOfTest:ze,endsWith:Bi,toArray:Ni,forEachEntry:Ri,matchAll:Ti,isHTMLForm:Di,hasOwnProperty:Fr,hasOwnProp:Fr,reduceDescriptors:Ar,freezeMethods:$i,toObjectSet:Fi,toCamelCase:Oi,noop:Ai,toFiniteNumber:Ii,findKey:Vr,global:ht,isContextDefined:$r,ALPHABET:Pr,generateString:Pi,isSpecCompliantForm:Li,toJSONObject:Mi,isAsyncFn:ji,isThenable:zi,setImmediate:Lr,asap:Ui};function oe(e,t,r,n,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),a&&(this.response=a,this.status=a.status?a.status:null)}B.inherits(oe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:B.toJSONObject(this.config),code:this.code,status:this.status}}});const Mr=oe.prototype,jr={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{jr[e]={value:e}}),Object.defineProperties(oe,jr),Object.defineProperty(Mr,"isAxiosError",{value:!0}),oe.from=(e,t,r,n,a,i)=>{const l=Object.create(Mr);return B.toFlatObject(e,l,function(u){return u!==Error.prototype},d=>d!=="isAxiosError"),oe.call(l,e.message,t,r,n,a),l.cause=e,l.name=e.name,i&&Object.assign(l,i),l};const Wi=null;function Uo(e){return B.isPlainObject(e)||B.isArray(e)}function zr(e){return B.endsWith(e,"[]")?e.slice(0,-2):e}function Ur(e,t,r){return e?e.concat(t).map(function(a,i){return a=zr(a),!r&&i?"["+a+"]":a}).join(r?".":""):t}function qi(e){return B.isArray(e)&&!e.some(Uo)}const Hi=B.toFlatObject(B,{},null,function(t){return/^is[A-Z]/.test(t)});function lo(e,t,r){if(!B.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=B.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,b){return!B.isUndefined(b[h])});const n=r.metaTokens,a=r.visitor||c,i=r.dots,l=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&B.isSpecCompliantForm(t);if(!B.isFunction(a))throw new TypeError("visitor must be a function");function s(g){if(g===null)return"";if(B.isDate(g))return g.toISOString();if(!u&&B.isBlob(g))throw new oe("Blob is not supported. Use a Buffer instead.");return B.isArrayBuffer(g)||B.isTypedArray(g)?u&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function c(g,h,b){let k=g;if(g&&!b&&typeof g=="object"){if(B.endsWith(h,"{}"))h=n?h:h.slice(0,-2),g=JSON.stringify(g);else if(B.isArray(g)&&qi(g)||(B.isFileList(g)||B.endsWith(h,"[]"))&&(k=B.toArray(g)))return h=zr(h),k.forEach(function(S,L){!(B.isUndefined(S)||S===null)&&t.append(l===!0?Ur([h],L,i):l===null?h:h+"[]",s(S))}),!1}return Uo(g)?!0:(t.append(Ur(b,h,i),s(g)),!1)}const f=[],m=Object.assign(Hi,{defaultVisitor:c,convertValue:s,isVisitable:Uo});function p(g,h){if(!B.isUndefined(g)){if(f.indexOf(g)!==-1)throw Error("Circular reference detected in "+h.join("."));f.push(g),B.forEach(g,function(k,C){(!(B.isUndefined(k)||k===null)&&a.call(t,k,B.isString(C)?C.trim():C,h,m))===!0&&p(k,h?h.concat(C):[C])}),f.pop()}}if(!B.isObject(e))throw new TypeError("data must be an object");return p(e),t}function Wr(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Wo(e,t){this._pairs=[],e&&lo(e,this,t)}const qr=Wo.prototype;qr.append=function(t,r){this._pairs.push([t,r])},qr.toString=function(t){const r=t?function(n){return t.call(this,n,Wr)}:Wr;return this._pairs.map(function(a){return r(a[0])+"="+r(a[1])},"").join("&")};function Ki(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Hr(e,t,r){if(!t)return e;const n=r&&r.encode||Ki;B.isFunction(r)&&(r={serialize:r});const a=r&&r.serialize;let i;if(a?i=a(t,r):i=B.isURLSearchParams(t)?t.toString():new Wo(t,r).toString(n),i){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Kr{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){B.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Yr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Yi={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Wo,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},qo=typeof window<"u"&&typeof document<"u",Ho=typeof navigator=="object"&&navigator||void 0,Gi=qo&&(!Ho||["ReactNative","NativeScript","NS"].indexOf(Ho.product)<0),Xi=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Ji=qo&&window.location.href||"http://localhost",_e={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:qo,hasStandardBrowserEnv:Gi,hasStandardBrowserWebWorkerEnv:Xi,navigator:Ho,origin:Ji},Symbol.toStringTag,{value:"Module"})),...Yi};function Qi(e,t){return lo(e,new _e.classes.URLSearchParams,Object.assign({visitor:function(r,n,a,i){return _e.isNode&&B.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function Zi(e){return B.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function el(e){const t={},r=Object.keys(e);let n;const a=r.length;let i;for(n=0;n<a;n++)i=r[n],t[i]=e[i];return t}function Gr(e){function t(r,n,a,i){let l=r[i++];if(l==="__proto__")return!0;const d=Number.isFinite(+l),u=i>=r.length;return l=!l&&B.isArray(a)?a.length:l,u?(B.hasOwnProp(a,l)?a[l]=[a[l],n]:a[l]=n,!d):((!a[l]||!B.isObject(a[l]))&&(a[l]=[]),t(r,n,a[l],i)&&B.isArray(a[l])&&(a[l]=el(a[l])),!d)}if(B.isFormData(e)&&B.isFunction(e.entries)){const r={};return B.forEachEntry(e,(n,a)=>{t(Zi(n),a,r,0)}),r}return null}function tl(e,t,r){if(B.isString(e))try{return(t||JSON.parse)(e),B.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(0,JSON.stringify)(e)}const zt={transitional:Yr,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",a=n.indexOf("application/json")>-1,i=B.isObject(t);if(i&&B.isHTMLForm(t)&&(t=new FormData(t)),B.isFormData(t))return a?JSON.stringify(Gr(t)):t;if(B.isArrayBuffer(t)||B.isBuffer(t)||B.isStream(t)||B.isFile(t)||B.isBlob(t)||B.isReadableStream(t))return t;if(B.isArrayBufferView(t))return t.buffer;if(B.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Qi(t,this.formSerializer).toString();if((d=B.isFileList(t))||n.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return lo(d?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||a?(r.setContentType("application/json",!1),tl(t)):t}],transformResponse:[function(t){const r=this.transitional||zt.transitional,n=r&&r.forcedJSONParsing,a=this.responseType==="json";if(B.isResponse(t)||B.isReadableStream(t))return t;if(t&&B.isString(t)&&(n&&!this.responseType||a)){const l=!(r&&r.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(d){if(l)throw d.name==="SyntaxError"?oe.from(d,oe.ERR_BAD_RESPONSE,this,null,this.response):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:_e.classes.FormData,Blob:_e.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};B.forEach(["delete","get","head","post","put","patch"],e=>{zt.headers[e]={}});const ol=B.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),rl=e=>{const t={};let r,n,a;return e&&e.split(`
7
+ `).forEach(function(l){a=l.indexOf(":"),r=l.substring(0,a).trim().toLowerCase(),n=l.substring(a+1).trim(),!(!r||t[r]&&ol[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Xr=Symbol("internals");function Ut(e){return e&&String(e).trim().toLowerCase()}function so(e){return e===!1||e==null?e:B.isArray(e)?e.map(so):String(e)}function nl(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const al=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ko(e,t,r,n,a){if(B.isFunction(n))return n.call(this,t,r);if(a&&(t=r),!!B.isString(t)){if(B.isString(n))return t.indexOf(n)!==-1;if(B.isRegExp(n))return n.test(t)}}function il(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function ll(e,t){const r=B.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(a,i,l){return this[n].call(this,t,a,i,l)},configurable:!0})})}class De{constructor(t){t&&this.set(t)}set(t,r,n){const a=this;function i(d,u,s){const c=Ut(u);if(!c)throw new Error("header name must be a non-empty string");const f=B.findKey(a,c);(!f||a[f]===void 0||s===!0||s===void 0&&a[f]!==!1)&&(a[f||u]=so(d))}const l=(d,u)=>B.forEach(d,(s,c)=>i(s,c,u));if(B.isPlainObject(t)||t instanceof this.constructor)l(t,r);else if(B.isString(t)&&(t=t.trim())&&!al(t))l(rl(t),r);else if(B.isHeaders(t))for(const[d,u]of t.entries())i(u,d,n);else t!=null&&i(r,t,n);return this}get(t,r){if(t=Ut(t),t){const n=B.findKey(this,t);if(n){const a=this[n];if(!r)return a;if(r===!0)return nl(a);if(B.isFunction(r))return r.call(this,a,n);if(B.isRegExp(r))return r.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Ut(t),t){const n=B.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Ko(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let a=!1;function i(l){if(l=Ut(l),l){const d=B.findKey(n,l);d&&(!r||Ko(n,n[d],d,r))&&(delete n[d],a=!0)}}return B.isArray(t)?t.forEach(i):i(t),a}clear(t){const r=Object.keys(this);let n=r.length,a=!1;for(;n--;){const i=r[n];(!t||Ko(this,this[i],i,t,!0))&&(delete this[i],a=!0)}return a}normalize(t){const r=this,n={};return B.forEach(this,(a,i)=>{const l=B.findKey(n,i);if(l){r[l]=so(a),delete r[i];return}const d=t?il(i):String(i).trim();d!==i&&delete r[i],r[d]=so(a),n[d]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return B.forEach(this,(n,a)=>{n!=null&&n!==!1&&(r[a]=t&&B.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
8
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(a=>n.set(a)),n}static accessor(t){const n=(this[Xr]=this[Xr]={accessors:{}}).accessors,a=this.prototype;function i(l){const d=Ut(l);n[d]||(ll(a,l),n[d]=!0)}return B.isArray(t)?t.forEach(i):i(t),this}}De.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),B.reduceDescriptors(De.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),B.freezeMethods(De);function Yo(e,t){const r=this||zt,n=t||r,a=De.from(n.headers);let i=n.data;return B.forEach(e,function(d){i=d.call(r,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function Jr(e){return!!(e&&e.__CANCEL__)}function Tt(e,t,r){oe.call(this,e??"canceled",oe.ERR_CANCELED,t,r),this.name="CanceledError"}B.inherits(Tt,oe,{__CANCEL__:!0});function Qr(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new oe("Request failed with status code "+r.status,[oe.ERR_BAD_REQUEST,oe.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function sl(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function cl(e,t){e=e||10;const r=new Array(e),n=new Array(e);let a=0,i=0,l;return t=t!==void 0?t:1e3,function(u){const s=Date.now(),c=n[i];l||(l=s),r[a]=u,n[a]=s;let f=i,m=0;for(;f!==a;)m+=r[f++],f=f%e;if(a=(a+1)%e,a===i&&(i=(i+1)%e),s-l<t)return;const p=c&&s-c;return p?Math.round(m*1e3/p):void 0}}function dl(e,t){let r=0,n=1e3/t,a,i;const l=(s,c=Date.now())=>{r=c,a=null,i&&(clearTimeout(i),i=null),e.apply(null,s)};return[(...s)=>{const c=Date.now(),f=c-r;f>=n?l(s,c):(a=s,i||(i=setTimeout(()=>{i=null,l(a)},n-f)))},()=>a&&l(a)]}const co=(e,t,r=3)=>{let n=0;const a=cl(50,250);return dl(i=>{const l=i.loaded,d=i.lengthComputable?i.total:void 0,u=l-n,s=a(u),c=l<=d;n=l;const f={loaded:l,total:d,progress:d?l/d:void 0,bytes:u,rate:s||void 0,estimated:s&&d&&c?(d-l)/s:void 0,event:i,lengthComputable:d!=null,[t?"download":"upload"]:!0};e(f)},r)},Zr=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},en=e=>(...t)=>B.asap(()=>e(...t)),ul=_e.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,_e.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(_e.origin),_e.navigator&&/(msie|trident)/i.test(_e.navigator.userAgent)):()=>!0,fl=_e.hasStandardBrowserEnv?{write(e,t,r,n,a,i){const l=[e+"="+encodeURIComponent(t)];B.isNumber(r)&&l.push("expires="+new Date(r).toGMTString()),B.isString(n)&&l.push("path="+n),B.isString(a)&&l.push("domain="+a),i===!0&&l.push("secure"),document.cookie=l.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ml(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function pl(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function tn(e,t){return e&&!ml(t)?pl(e,t):t}const on=e=>e instanceof De?{...e}:e;function bt(e,t){t=t||{};const r={};function n(s,c,f,m){return B.isPlainObject(s)&&B.isPlainObject(c)?B.merge.call({caseless:m},s,c):B.isPlainObject(c)?B.merge({},c):B.isArray(c)?c.slice():c}function a(s,c,f,m){if(B.isUndefined(c)){if(!B.isUndefined(s))return n(void 0,s,f,m)}else return n(s,c,f,m)}function i(s,c){if(!B.isUndefined(c))return n(void 0,c)}function l(s,c){if(B.isUndefined(c)){if(!B.isUndefined(s))return n(void 0,s)}else return n(void 0,c)}function d(s,c,f){if(f in t)return n(s,c);if(f in e)return n(void 0,s)}const u={url:i,method:i,data:i,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:d,headers:(s,c,f)=>a(on(s),on(c),f,!0)};return B.forEach(Object.keys(Object.assign({},e,t)),function(c){const f=u[c]||a,m=f(e[c],t[c],c);B.isUndefined(m)&&f!==d||(r[c]=m)}),r}const rn=e=>{const t=bt({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:a,xsrfCookieName:i,headers:l,auth:d}=t;t.headers=l=De.from(l),t.url=Hr(tn(t.baseURL,t.url),e.params,e.paramsSerializer),d&&l.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):"")));let u;if(B.isFormData(r)){if(_e.hasStandardBrowserEnv||_e.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((u=l.getContentType())!==!1){const[s,...c]=u?u.split(";").map(f=>f.trim()).filter(Boolean):[];l.setContentType([s||"multipart/form-data",...c].join("; "))}}if(_e.hasStandardBrowserEnv&&(n&&B.isFunction(n)&&(n=n(t)),n||n!==!1&&ul(t.url))){const s=a&&i&&fl.read(i);s&&l.set(a,s)}return t},gl=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const a=rn(e);let i=a.data;const l=De.from(a.headers).normalize();let{responseType:d,onUploadProgress:u,onDownloadProgress:s}=a,c,f,m,p,g;function h(){p&&p(),g&&g(),a.cancelToken&&a.cancelToken.unsubscribe(c),a.signal&&a.signal.removeEventListener("abort",c)}let b=new XMLHttpRequest;b.open(a.method.toUpperCase(),a.url,!0),b.timeout=a.timeout;function k(){if(!b)return;const S=De.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),R={data:!d||d==="text"||d==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:S,config:e,request:b};Qr(function(w){r(w),h()},function(w){n(w),h()},R),b=null}"onloadend"in b?b.onloadend=k:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(k)},b.onabort=function(){b&&(n(new oe("Request aborted",oe.ECONNABORTED,e,b)),b=null)},b.onerror=function(){n(new oe("Network Error",oe.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let L=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const R=a.transitional||Yr;a.timeoutErrorMessage&&(L=a.timeoutErrorMessage),n(new oe(L,R.clarifyTimeoutError?oe.ETIMEDOUT:oe.ECONNABORTED,e,b)),b=null},i===void 0&&l.setContentType(null),"setRequestHeader"in b&&B.forEach(l.toJSON(),function(L,R){b.setRequestHeader(R,L)}),B.isUndefined(a.withCredentials)||(b.withCredentials=!!a.withCredentials),d&&d!=="json"&&(b.responseType=a.responseType),s&&([m,g]=co(s,!0),b.addEventListener("progress",m)),u&&b.upload&&([f,p]=co(u),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",p)),(a.cancelToken||a.signal)&&(c=S=>{b&&(n(!S||S.type?new Tt(null,e,b):S),b.abort(),b=null)},a.cancelToken&&a.cancelToken.subscribe(c),a.signal&&(a.signal.aborted?c():a.signal.addEventListener("abort",c)));const C=sl(a.url);if(C&&_e.protocols.indexOf(C)===-1){n(new oe("Unsupported protocol "+C+":",oe.ERR_BAD_REQUEST,e));return}b.send(i||null)})},hl=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,a;const i=function(s){if(!a){a=!0,d();const c=s instanceof Error?s:this.reason;n.abort(c instanceof oe?c:new Tt(c instanceof Error?c.message:c))}};let l=t&&setTimeout(()=>{l=null,i(new oe(`timeout ${t} of ms exceeded`,oe.ETIMEDOUT))},t);const d=()=>{e&&(l&&clearTimeout(l),l=null,e.forEach(s=>{s.unsubscribe?s.unsubscribe(i):s.removeEventListener("abort",i)}),e=null)};e.forEach(s=>s.addEventListener("abort",i));const{signal:u}=n;return u.unsubscribe=()=>B.asap(d),u}},bl=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,a;for(;n<r;)a=n+t,yield e.slice(n,a),n=a},yl=async function*(e,t){for await(const r of kl(e))yield*bl(r,t)},kl=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},nn=(e,t,r,n)=>{const a=yl(e,t);let i=0,l,d=u=>{l||(l=!0,n&&n(u))};return new ReadableStream({async pull(u){try{const{done:s,value:c}=await a.next();if(s){d(),u.close();return}let f=c.byteLength;if(r){let m=i+=f;r(m)}u.enqueue(new Uint8Array(c))}catch(s){throw d(s),s}},cancel(u){return d(u),a.return()}},{highWaterMark:2})},uo=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",an=uo&&typeof ReadableStream=="function",wl=uo&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),ln=(e,...t)=>{try{return!!e(...t)}catch{return!1}},xl=an&&ln(()=>{let e=!1;const t=new Request(_e.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),sn=64*1024,Go=an&&ln(()=>B.isReadableStream(new Response("").body)),fo={stream:Go&&(e=>e.body)};uo&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!fo[t]&&(fo[t]=B.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new oe(`Response type '${t}' is not supported`,oe.ERR_NOT_SUPPORT,n)})})})(new Response);const vl=async e=>{if(e==null)return 0;if(B.isBlob(e))return e.size;if(B.isSpecCompliantForm(e))return(await new Request(_e.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(B.isArrayBufferView(e)||B.isArrayBuffer(e))return e.byteLength;if(B.isURLSearchParams(e)&&(e=e+""),B.isString(e))return(await wl(e)).byteLength},Cl=async(e,t)=>{const r=B.toFiniteNumber(e.getContentLength());return r??vl(t)},Xo={http:Wi,xhr:gl,fetch:uo&&(async e=>{let{url:t,method:r,data:n,signal:a,cancelToken:i,timeout:l,onDownloadProgress:d,onUploadProgress:u,responseType:s,headers:c,withCredentials:f="same-origin",fetchOptions:m}=rn(e);s=s?(s+"").toLowerCase():"text";let p=hl([a,i&&i.toAbortSignal()],l),g;const h=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let b;try{if(u&&xl&&r!=="get"&&r!=="head"&&(b=await Cl(c,n))!==0){let R=new Request(t,{method:"POST",body:n,duplex:"half"}),N;if(B.isFormData(n)&&(N=R.headers.get("content-type"))&&c.setContentType(N),R.body){const[w,y]=Zr(b,co(en(u)));n=nn(R.body,sn,w,y)}}B.isString(f)||(f=f?"include":"omit");const k="credentials"in Request.prototype;g=new Request(t,{...m,signal:p,method:r.toUpperCase(),headers:c.normalize().toJSON(),body:n,duplex:"half",credentials:k?f:void 0});let C=await fetch(g);const S=Go&&(s==="stream"||s==="response");if(Go&&(d||S&&h)){const R={};["status","statusText","headers"].forEach(E=>{R[E]=C[E]});const N=B.toFiniteNumber(C.headers.get("content-length")),[w,y]=d&&Zr(N,co(en(d),!0))||[];C=new Response(nn(C.body,sn,w,()=>{y&&y(),h&&h()}),R)}s=s||"text";let L=await fo[B.findKey(fo,s)||"text"](C,e);return!S&&h&&h(),await new Promise((R,N)=>{Qr(R,N,{data:L,headers:De.from(C.headers),status:C.status,statusText:C.statusText,config:e,request:g})})}catch(k){throw h&&h(),k&&k.name==="TypeError"&&/fetch/i.test(k.message)?Object.assign(new oe("Network Error",oe.ERR_NETWORK,e,g),{cause:k.cause||k}):oe.from(k,k&&k.code,e,g)}})};B.forEach(Xo,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const cn=e=>`- ${e}`,El=e=>B.isFunction(e)||e===null||e===!1,dn={getAdapter:e=>{e=B.isArray(e)?e:[e];const{length:t}=e;let r,n;const a={};for(let i=0;i<t;i++){r=e[i];let l;if(n=r,!El(r)&&(n=Xo[(l=String(r)).toLowerCase()],n===void 0))throw new oe(`Unknown adapter '${l}'`);if(n)break;a[l||"#"+i]=n}if(!n){const i=Object.entries(a).map(([d,u])=>`adapter ${d} `+(u===!1?"is not supported by the environment":"is not available in the build"));let l=t?i.length>1?`since :
9
+ `+i.map(cn).join(`
10
+ `):" "+cn(i[0]):"as no adapter specified";throw new oe("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return n},adapters:Xo};function Jo(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Tt(null,e)}function un(e){return Jo(e),e.headers=De.from(e.headers),e.data=Yo.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),dn.getAdapter(e.adapter||zt.adapter)(e).then(function(n){return Jo(e),n.data=Yo.call(e,e.transformResponse,n),n.headers=De.from(n.headers),n},function(n){return Jr(n)||(Jo(e),n&&n.response&&(n.response.data=Yo.call(e,e.transformResponse,n.response),n.response.headers=De.from(n.response.headers))),Promise.reject(n)})}const fn="1.7.9",mo={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{mo[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const mn={};mo.transitional=function(t,r,n){function a(i,l){return"[Axios v"+fn+"] Transitional option '"+i+"'"+l+(n?". "+n:"")}return(i,l,d)=>{if(t===!1)throw new oe(a(l," has been removed"+(r?" in "+r:"")),oe.ERR_DEPRECATED);return r&&!mn[l]&&(mn[l]=!0,console.warn(a(l," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,l,d):!0}},mo.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Sl(e,t,r){if(typeof e!="object")throw new oe("options must be an object",oe.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let a=n.length;for(;a-- >0;){const i=n[a],l=t[i];if(l){const d=e[i],u=d===void 0||l(d,i,e);if(u!==!0)throw new oe("option "+i+" must be "+u,oe.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new oe("Unknown option "+i,oe.ERR_BAD_OPTION)}}const po={assertOptions:Sl,validators:mo},Ge=po.validators;class yt{constructor(t){this.defaults=t,this.interceptors={request:new Kr,response:new Kr}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=a.stack?a.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
11
+ `+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=bt(this.defaults,r);const{transitional:n,paramsSerializer:a,headers:i}=r;n!==void 0&&po.assertOptions(n,{silentJSONParsing:Ge.transitional(Ge.boolean),forcedJSONParsing:Ge.transitional(Ge.boolean),clarifyTimeoutError:Ge.transitional(Ge.boolean)},!1),a!=null&&(B.isFunction(a)?r.paramsSerializer={serialize:a}:po.assertOptions(a,{encode:Ge.function,serialize:Ge.function},!0)),po.assertOptions(r,{baseUrl:Ge.spelling("baseURL"),withXsrfToken:Ge.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let l=i&&B.merge(i.common,i[r.method]);i&&B.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),r.headers=De.concat(l,i);const d=[];let u=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(r)===!1||(u=u&&h.synchronous,d.unshift(h.fulfilled,h.rejected))});const s=[];this.interceptors.response.forEach(function(h){s.push(h.fulfilled,h.rejected)});let c,f=0,m;if(!u){const g=[un.bind(this),void 0];for(g.unshift.apply(g,d),g.push.apply(g,s),m=g.length,c=Promise.resolve(r);f<m;)c=c.then(g[f++],g[f++]);return c}m=d.length;let p=r;for(f=0;f<m;){const g=d[f++],h=d[f++];try{p=g(p)}catch(b){h.call(this,b);break}}try{c=un.call(this,p)}catch(g){return Promise.reject(g)}for(f=0,m=s.length;f<m;)c=c.then(s[f++],s[f++]);return c}getUri(t){t=bt(this.defaults,t);const r=tn(t.baseURL,t.url);return Hr(r,t.params,t.paramsSerializer)}}B.forEach(["delete","get","head","options"],function(t){yt.prototype[t]=function(r,n){return this.request(bt(n||{},{method:t,url:r,data:(n||{}).data}))}}),B.forEach(["post","put","patch"],function(t){function r(n){return function(i,l,d){return this.request(bt(d||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:l}))}}yt.prototype[t]=r(),yt.prototype[t+"Form"]=r(!0)});class Qo{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(a=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](a);n._listeners=null}),this.promise.then=a=>{let i;const l=new Promise(d=>{n.subscribe(d),i=d}).then(a);return l.cancel=function(){n.unsubscribe(i)},l},t(function(i,l,d){n.reason||(n.reason=new Tt(i,l,d),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Qo(function(a){t=a}),cancel:t}}}function Bl(e){return function(r){return e.apply(null,r)}}function Nl(e){return B.isObject(e)&&e.isAxiosError===!0}const Zo={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Zo).forEach(([e,t])=>{Zo[t]=e});function pn(e){const t=new yt(e),r=Tr(yt.prototype.request,t);return B.extend(r,yt.prototype,t,{allOwnKeys:!0}),B.extend(r,t,null,{allOwnKeys:!0}),r.create=function(a){return pn(bt(e,a))},r}const xe=pn(zt);xe.Axios=yt,xe.CanceledError=Tt,xe.CancelToken=Qo,xe.isCancel=Jr,xe.VERSION=fn,xe.toFormData=lo,xe.AxiosError=oe,xe.Cancel=xe.CanceledError,xe.all=function(t){return Promise.all(t)},xe.spread=Bl,xe.isAxiosError=Nl,xe.mergeConfig=bt,xe.AxiosHeaders=De,xe.formToJSON=e=>Gr(B.isHTMLForm(e)?new FormData(e):e),xe.getAdapter=dn.getAdapter,xe.HttpStatusCode=Zo,xe.default=xe;const _l=Lo("loading",{state:()=>({loading:!1}),actions:{setLoading(e){this.loading=e}}});function Rl(){const e=_l();return{onResponse(t){return e.setLoading(!1),["post","put","delete"].includes(t.config.method)&&console.log("🌐 Operation completed successfully"),t},onError(t){var n,a,i,l,d;e.setLoading(!1);const r=((a=(n=t.response)==null?void 0:n.data)==null?void 0:a.message)||t.message||"Unexpected error occurred";return console.error("🌐 API Error",{url:(i=t.config)==null?void 0:i.url,method:(l=t.config)==null?void 0:l.method,status:(d=t.response)==null?void 0:d.status,message:r}),Promise.reject(t)}}}function gn(e={}){return{"Content-Type":"application/json",...e}}function kt(){Ne();const e=Rl(),t=xe.create({headers:gn()});t.interceptors.response.use(u=>e.onResponse(u),u=>(e.onError(u),Promise.reject(u)));const r=()=>"",n=(u={})=>gn(u),a=(u={})=>({...u,requestSource:"web"}),i=u=>{const{data:s}=u;return console.log("API Response:",s),s!=null&&s.response||console.warn("Unexpected response format:",s),s},l=u=>{if(u.response){const{status:s,data:c}=u.response;return{success:!1,status:s,message:(c==null?void 0:c.message)||"Something went wrong",data:c||null}}return Promise.reject(u)},d=async({url:u,method:s="get",payload:c=null,headers:f={}})=>{const m=u.startsWith("http")?u:r()+u,p=n(f),g=c?a(c):null;console.log(`Making ${s.toUpperCase()} request to ${m}`),console.log("Payload:",g),console.log("Headers:",p);try{const h={url:m,method:s,headers:p,data:g},b=await t.request(h);return i(b)}catch(h){return l(h)}};return{get:(u,s={})=>d({url:u,method:"get",headers:s}),post:(u,s,c={})=>d({url:u,method:"post",payload:s,headers:c}),put:(u,s,c={})=>d({url:u,method:"put",payload:s,headers:c}),del:(u,s={},c={})=>d({url:u,method:"delete",payload:s,headers:c})}}function Ue(){const e=Ne(),{get:t,post:r,put:n,del:a}=kt(),i=()=>e.getAppId();return{getEntityRecords:async g=>{const h=i();return await t(`/api/app/v1/${h}/entity/${g}/record`)},searchEntityRecords:async(g,h)=>{const b=i();return await r(`/api/app/v1/${b}/entity/${g}/record/search`,h)},getRelatedEntityRecord:async(g,h)=>{const b=i();return await t(`/api/app/v1/${b}/entity/${g}/link/record/${h}?fetchRelatedEntities=true`)},saveRelatedEntityRecord:async(g,h,b)=>{const k=i();return await r(`/api/app/v1/${k}/entity/${g}/link/record/${h}`,b)},getRecord:async(g,h)=>{const b=i();return await t(`/api/app/v1/${b}/entity/${g}/record/${h}?fetchRelatedEntities=false`)},addRecord:async(g,h)=>{const b=i();return await r(`/api/app/v1/${b}/entity/${g}/record`,h)},updateRecord:async(g,h,b)=>{const k=i();return await n(`/api/app/v1/${k}/entity/${g}/record/${h}`,b)},deleteRecord:async(g,h)=>{const b=i();return await a(`/api/app/v1/${b}/entity/${g}/record/${h}`)}}}function Tl(e=""){const t=new Ue,r={gt:"GREATER_THAN",dateAfter:"GREATER_THAN",equals:"EQUAL",dateIs:"EQUAL",notEquals:"NOT_EQUAL",dateIsNot:"NOT_EQUAL",lt:"LESS_THAN",dateBefore:"LESS_THAN",lte:"LESS_THAN_EQUAL",gte:"GREATER_THAN_EQUAL",between:"BETWEEN",contains:"CONTAINS",startsWith:"STARTS_WITH",notContains:"NOT_CONTAINS",endsWith:"ENDS_WITH"};let n=o.ref({}),a=o.ref([]),i=o.ref([]),l=o.ref([]);const d=o.ref(""),u=o.ref(1),s=o.ref(25),c=o.ref(0),f=o.ref(0),m=o.ref(0),p=o.ref(!1),g=o.ref([]),h=o.ref(""),b=o.ref({}),k=async(_,D=!0)=>{p.value=!0;try{const P=await t.getEntityRecords(_);P&&P.response&&(n.value=P.response,a.value=P.response.result,l.value=P.response.entity.entityDefinition.columns,i.value=S(P.response.entity.entityDefinition.columns),f.value=P.response.totalRecords,V())}catch(P){console.error("Error fetching entity:",P.errorMessage)}finally{p.value=!1}},C=async(_=!0)=>{p.value=!0;try{const D={sortBy:[d.value],sortDirection:u.value===1?"ASC":"DESC",pageSize:s.value,currentPage:c.value,columnList:null,filter:g.value,fullTextSearch:h.value};Object.keys(D.filter).length===0&&(D.filter=[]);const P=await t.searchEntityRecords(e,D);P&&P.response&&(p.value=!1,n.value=P.response,a.value=P.response.result,f.value=P.response.totalRecords,m.value=c.value*s.value)}catch(D){console.error("Error fetching entity:",D.errorMessage)}finally{p.value=!1}},S=_=>_.map(D=>({field:D.name,name:D.displayName?D.displayName:D.name,filterable:D.filterable,datatype:D.type,sortable:!0,displayFormatKey:D.displayFormatKey,displayFormat:D.displayFormat})),L=_=>{d.value=_.sortField,u.value=_.sortOrder,m.value=0,C()},R=_=>{s.value=_.rows,c.value=_.page,m.value=_.first,C()},N=()=>{C()},w=()=>{C()},y=_=>{switch(_.toLowerCase()){case"integer":case"int":case"numeric":return"numeric";case"date":return"date";case"bool":case"boolean":return"boolean";default:return"text"}},E=_=>{const D=i.value.find(P=>P.field===_);return D?D.datatype:null},V=()=>{for(let _=0;_<l.value.length;_++){const D=l.value[_];if(D.primaryKey&&D.primaryKey==!0){b.value=D,d.value=D.name;break}}};return{items:a,headers:i,first:m,totalRecords:f,pageSize:s,loading:p,sortBy:d,sortDirection:u,operatorMap:r,filterToSend:g,fullTextSearch:h,listingResponse:n,primarayKeyColumn:b,onFullTextSearch:w,getDatatypeByField:E,getColumnDatatype:y,onSort:L,onPage:R,onFilter:N,fetchEntityFilterData:C,fetchEntityByName:k}}const Oe=(e,t)=>{const r=e.__vccOpts||e;for(const[n,a]of t)r[n]=a;return r},Dl={key:0,class:"field flex flex-col mb-3"},Ol=["for"],Vl={key:0},$l={key:0,class:"font-bold"},Fl={key:1,class:"font-bold text-color-hint"},Al={key:1,class:"flex items-center mb-3"},Il={class:"ml-2"},Pl={key:0},go=Oe({__name:"EntityForm",props:o.mergeModels({column:Object,errors:Array},{modelValue:{},modelModifiers:{}}),emits:o.mergeModels(["input"],["update:modelValue"]),setup(e,{emit:t}){const r=o.useModel(e,"modelValue"),n=t,a=i=>{n("input",i.name)};if(e.column&&!e.column.inputComponent){let i="";switch(e.column.type.toLowerCase()){case"text":i="INPUT_TEXT";break;case"int":i="INPUT_NUMBER";break;case"float":i="INPUT_FLOAT";break;case"boolean":i="INPUT_BOOLEAN";break;case"uuid":i="INPUT_UUID";break;case"date":i="INPUT_DATE";break;default:i="INPUT_STRING"}e.column.inputComponent=i}return(i,l)=>{var f,m,p,g,h;const d=o.resolveComponent("DatePicker"),u=o.resolveComponent("InputNumber"),s=o.resolveComponent("InputText"),c=o.resolveComponent("Checkbox");return o.openBlock(),o.createElementBlock(o.Fragment,null,[e.column.inputComponent.toLowerCase()!="input_boolean"?(o.openBlock(),o.createElementBlock("div",Dl,[o.createElementVNode("label",{class:"mb-1",for:e.column.name},[o.createTextVNode(o.toDisplayString(e.column.displayName||e.column.name)+" ",1),e.column.required?(o.openBlock(),o.createElementBlock("span",Vl,"*")):o.createCommentVNode("",!0)],8,Ol),e.column.inputComponent.toLowerCase()=="input_date"?(o.openBlock(),o.createBlock(d,{key:0,modelValue:r.value,"onUpdate:modelValue":l[0]||(l[0]=b=>r.value=b),id:e.column.name,name:e.column.name,onDateSelect:l[1]||(l[1]=b=>a(e.column)),invalid:((f=e.errors)==null?void 0:f.length)>0},null,8,["modelValue","id","name","invalid"])):e.column.inputComponent.toLowerCase()=="input_number"?(o.openBlock(),o.createBlock(u,{key:1,modelValue:r.value,"onUpdate:modelValue":l[2]||(l[2]=b=>r.value=b),id:e.column.name,name:e.column.name,allowEmpty:!0,format:!1,onInput:l[3]||(l[3]=b=>a(e.column)),invalid:((m=e.errors)==null?void 0:m.length)>0},null,8,["modelValue","id","name","invalid"])):e.column.type.toLowerCase()=="input_float"?(o.openBlock(),o.createBlock(u,{key:2,type:"decimal",minFractionDigits:1,id:e.column.name,allowEmpty:!0,format:!1,name:e.column.name,onInput:l[4]||(l[4]=b=>a(e.column)),invalid:((p=e.errors)==null?void 0:p.length)>0},null,8,["id","name","invalid"])):(o.openBlock(),o.createBlock(s,{key:3,modelValue:r.value,"onUpdate:modelValue":l[5]||(l[5]=b=>r.value=b),id:e.column.name,name:e.column.name,onInput:l[6]||(l[6]=b=>a(e.column)),invalid:((g=e.errors)==null?void 0:g.length)>0},null,8,["modelValue","id","name","invalid"])),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.errors,(b,k)=>(o.openBlock(),o.createElementBlock("div",{key:k,class:"text-red-500 mt-1 ml-2"},[b.includes("hint:")?(o.openBlock(),o.createElementBlock("small",Fl,o.toDisplayString(b.split(":")[1]),1)):(o.openBlock(),o.createElementBlock("small",$l,o.toDisplayString(b),1))]))),128))])):o.createCommentVNode("",!0),e.column.inputComponent.toLowerCase()=="input_boolean"?(o.openBlock(),o.createElementBlock("div",Al,[o.createVNode(c,{modelValue:r.value,"onUpdate:modelValue":l[7]||(l[7]=b=>r.value=b),invalid:((h=e.errors)==null?void 0:h.length)>0,onInput:l[8]||(l[8]=b=>a(e.column.name)),binary:""},null,8,["modelValue","invalid"]),o.createElementVNode("label",Il,[o.createTextVNode(o.toDisplayString(e.column.displayName||e.column.name)+" ",1),e.column.required?(o.openBlock(),o.createElementBlock("span",Pl,"*")):o.createCommentVNode("",!0)])])):o.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-8820d348"]]);/**
6
12
  * vee-validate v4.15.0
7
13
  * (c) 2024 Abdelrahman Awad
8
14
  * @license MIT
9
- */function Jt(n){return typeof n=="function"}function tr(n){return n==null}const un=n=>n!==null&&!!n&&typeof n=="object"&&!Array.isArray(n);function Ns(n){return Number(n)>=0}function Cd(n){return typeof n=="object"&&n!==null}function Od(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}function er(n){if(!Cd(n)||Od(n)!=="[object Object]")return!1;if(Object.getPrototypeOf(n)===null)return!0;let t=n;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(n)===t}function Mn(n,t){return Object.keys(t).forEach(e=>{if(er(t[e])&&er(n[e])){n[e]||(n[e]={}),Mn(n[e],t[e]);return}n[e]=t[e]}),n}function Ti(n){const t=n.split(".");if(!t.length)return"";let e=String(t[0]);for(let i=1;i<t.length;i++){if(Ns(t[i])){e+=`[${t[i]}]`;continue}e+=`.${t[i]}`}return e}const Dd={};function Nd(n){return Dd[n]}function nr(n,t,e){typeof e.value=="object"&&(e.value=ht(e.value)),!e.enumerable||e.get||e.set||!e.configurable||!e.writable||t==="__proto__"?Object.defineProperty(n,t,e):n[t]=e.value}function ht(n){if(typeof n!="object")return n;var t=0,e,i,s,o=Object.prototype.toString.call(n);if(o==="[object Object]"?s=Object.create(n.__proto__||null):o==="[object Array]"?s=Array(n.length):o==="[object Set]"?(s=new Set,n.forEach(function(r){s.add(ht(r))})):o==="[object Map]"?(s=new Map,n.forEach(function(r,a){s.set(ht(a),ht(r))})):o==="[object Date]"?s=new Date(+n):o==="[object RegExp]"?s=new RegExp(n.source,n.flags):o==="[object DataView]"?s=new n.constructor(ht(n.buffer)):o==="[object ArrayBuffer]"?s=n.slice(0):o.slice(-6)==="Array]"&&(s=new n.constructor(n)),s){for(i=Object.getOwnPropertySymbols(n);t<i.length;t++)nr(s,i[t],Object.getOwnPropertyDescriptor(n,i[t]));for(t=0,i=Object.getOwnPropertyNames(n);t<i.length;t++)Object.hasOwnProperty.call(s,e=i[t])&&s[e]===n[e]||nr(s,e,Object.getOwnPropertyDescriptor(n,e))}return s||n}const Td=Symbol("vee-validate-form"),Pd=Symbol("vee-validate-form-context"),Md=typeof window<"u";function Vd(n){return Jt(n)&&!!n.__locatorRef}function Te(n){return!!n&&Jt(n.parse)&&n.__type==="VVTypedSchema"}function ir(n){return!!n&&Jt(n.validate)}function Ad(n){return n==="checkbox"||n==="radio"}function Fd(n){return un(n)||Array.isArray(n)}function Bd(n){return Array.isArray(n)?n.length===0:un(n)&&Object.keys(n).length===0}function Pi(n){return/^\[.+\]$/i.test(n)}function $d(n){return sr(n)&&n.multiple}function sr(n){return n.tagName==="SELECT"}function Rd(n){return or(n)&&n.target&&"submit"in n.target}function or(n){return n?!!(typeof Event<"u"&&Jt(Event)&&n instanceof Event||n&&n.srcElement):!1}function Vn(n,t){if(n===t)return!0;if(n&&t&&typeof n=="object"&&typeof t=="object"){if(n.constructor!==t.constructor)return!1;var e,i,s;if(Array.isArray(n)){if(e=n.length,e!=t.length)return!1;for(i=e;i--!==0;)if(!Vn(n[i],t[i]))return!1;return!0}if(n instanceof Map&&t instanceof Map){if(n.size!==t.size)return!1;for(i of n.entries())if(!t.has(i[0]))return!1;for(i of n.entries())if(!Vn(i[1],t.get(i[0])))return!1;return!0}if(ar(n)&&ar(t))return!(n.size!==t.size||n.name!==t.name||n.lastModified!==t.lastModified||n.type!==t.type);if(n instanceof Set&&t instanceof Set){if(n.size!==t.size)return!1;for(i of n.entries())if(!t.has(i[0]))return!1;return!0}if(ArrayBuffer.isView(n)&&ArrayBuffer.isView(t)){if(e=n.length,e!=t.length)return!1;for(i=e;i--!==0;)if(n[i]!==t[i])return!1;return!0}if(n.constructor===RegExp)return n.source===t.source&&n.flags===t.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===t.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===t.toString();if(s=Object.keys(n),e=s.length-rr(n,s),e!==Object.keys(t).length-rr(t,Object.keys(t)))return!1;for(i=e;i--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[i]))return!1;for(i=e;i--!==0;){var o=s[i];if(!Vn(n[o],t[o]))return!1}return!0}return n!==n&&t!==t}function rr(n,t){let e=0;for(let s=t.length;s--!==0;){var i=t[s];n[i]===void 0&&e++}return e}function ar(n){return Md?n instanceof File:!1}function Ts(n){return Pi(n)?n.replace(/\[|\]/gi,""):n}function pe(n,t,e){return n?Pi(t)?n[Ts(t)]:(t||"").split(/\.|\[(\d+)\]/).filter(Boolean).reduce((s,o)=>Fd(s)&&o in s?s[o]:e,n):e}function ge(n,t,e){if(Pi(t)){n[Ts(t)]=e;return}const i=t.split(/\.|\[(\d+)\]/).filter(Boolean);let s=n;for(let o=0;o<i.length;o++){if(o===i.length-1){s[i[o]]=e;return}(!(i[o]in s)||tr(s[i[o]]))&&(s[i[o]]=Ns(i[o+1])?[]:{}),s=s[i[o]]}}function Ps(n,t){if(Array.isArray(n)&&Ns(t)){n.splice(Number(t),1);return}un(n)&&delete n[t]}function lr(n,t){if(Pi(t)){delete n[Ts(t)];return}const e=t.split(/\.|\[(\d+)\]/).filter(Boolean);let i=n;for(let o=0;o<e.length;o++){if(o===e.length-1){Ps(i,e[o]);break}if(!(e[o]in i)||tr(i[e[o]]))break;i=i[e[o]]}const s=e.map((o,r)=>pe(n,e.slice(0,r).join(".")));for(let o=s.length-1;o>=0;o--)if(Bd(s[o])){if(o===0){Ps(n,e[0]);continue}Ps(s[o-1],e[o-1])}}function qt(n){return Object.keys(n)}function cr(n,t=0){let e=null,i=[];return function(...s){return e&&clearTimeout(e),e=setTimeout(()=>{const o=n(...s);i.forEach(r=>r(o)),i=[]},t),new Promise(o=>i.push(o))}}function Ld(n,t){let e;return async function(...s){const o=n(...s);e=o;const r=await o;return o!==e?r:(e=void 0,t(r,s))}}function dr(n){return Array.isArray(n)?n:n?[n]:[]}function Mi(n,t){const e={};for(const i in n)t.includes(i)||(e[i]=n[i]);return e}function Id(n){let t=null,e=[];return function(...i){const s=l.nextTick(()=>{if(t!==s)return;const o=n(...i);e.forEach(r=>r(o)),e=[],t=null});return t=s,new Promise(o=>e.push(o))}}function Ms(n){if(ur(n))return n._value}function ur(n){return"_value"in n}function jd(n){return n.type==="number"||n.type==="range"?Number.isNaN(n.valueAsNumber)?n.value:n.valueAsNumber:n.value}function hr(n){if(!or(n))return n;const t=n.target;if(Ad(t.type)&&ur(t))return Ms(t);if(t.type==="file"&&t.files){const e=Array.from(t.files);return t.multiple?e:e[0]}if($d(t))return Array.from(t.options).filter(e=>e.selected&&!e.disabled).map(Ms);if(sr(t)){const e=Array.from(t.options).find(i=>i.selected);return e?Ms(e):t.value}return jd(t)}function zd(n){const t={};return Object.defineProperty(t,"_$$isNormalized",{value:!0,writable:!1,enumerable:!1,configurable:!1}),n?un(n)&&n._$$isNormalized?n:un(n)?Object.keys(n).reduce((e,i)=>{const s=Wd(n[i]);return n[i]!==!1&&(e[i]=fr(s)),e},t):typeof n!="string"?t:n.split("|").reduce((e,i)=>{const s=Hd(i);return s.name&&(e[s.name]=fr(s.params)),e},t):t}function Wd(n){return n===!0?[]:Array.isArray(n)||un(n)?n:[n]}function fr(n){const t=e=>typeof e=="string"&&e[0]==="@"?Ud(e.slice(1)):e;return Array.isArray(n)?n.map(t):n instanceof RegExp?[n]:Object.keys(n).reduce((e,i)=>(e[i]=t(n[i]),e),{})}const Hd=n=>{let t=[];const e=n.split(":")[0];return n.includes(":")&&(t=n.split(":").slice(1).join(":").split(",")),{name:e,params:t}};function Ud(n){const t=e=>{var i;return(i=pe(e,n))!==null&&i!==void 0?i:e[n]};return t.__locatorRef=n,t}let qd=Object.assign({},{generateMessage:({field:n})=>`${n} is not valid.`,bails:!0,validateOnBlur:!0,validateOnChange:!0,validateOnInput:!1,validateOnModelUpdate:!0});const An=()=>qd;async function Yd(n,t,e={}){const i=e==null?void 0:e.bails,s={name:(e==null?void 0:e.name)||"{field}",rules:t,label:e==null?void 0:e.label,bails:i??!0,formData:(e==null?void 0:e.values)||{}},o=await Kd(s,n);return Object.assign(Object.assign({},o),{valid:!o.errors.length})}async function Kd(n,t){const e=n.rules;if(Te(e)||ir(e))return Gd(t,Object.assign(Object.assign({},n),{rules:e}));if(Jt(e)||Array.isArray(e)){const a={field:n.label||n.name,name:n.name,label:n.label,form:n.formData,value:t},c=Array.isArray(e)?e:[e],d=c.length,u=[];for(let h=0;h<d;h++){const f=c[h],m=await f(t,a);if(!(typeof m!="string"&&!Array.isArray(m)&&m)){if(Array.isArray(m))u.push(...m);else{const g=typeof m=="string"?m:pr(a);u.push(g)}if(n.bails)return{errors:u}}}return{errors:u}}const i=Object.assign(Object.assign({},n),{rules:zd(e)}),s=[],o=Object.keys(i.rules),r=o.length;for(let a=0;a<r;a++){const c=o[a],d=await Qd(i,t,{name:c,params:i.rules[c]});if(d.error&&(s.push(d.error),n.bails))return{errors:s}}return{errors:s}}function Xd(n){return!!n&&n.name==="ValidationError"}function mr(n){return{__type:"VVTypedSchema",async parse(e,i){var s;try{return{output:await n.validate(e,{abortEarly:!1,context:(i==null?void 0:i.formData)||{}}),errors:[]}}catch(o){if(!Xd(o))throw o;if(!(!((s=o.inner)===null||s===void 0)&&s.length)&&o.errors.length)return{errors:[{path:o.path,errors:o.errors}]};const r=o.inner.reduce((a,c)=>{const d=c.path||"";return a[d]||(a[d]={errors:[],path:d}),a[d].errors.push(...c.errors),a},{});return{errors:Object.values(r)}}}}}async function Gd(n,t){const i=await(Te(t.rules)?t.rules:mr(t.rules)).parse(n,{formData:t.formData}),s=[];for(const o of i.errors)o.errors.length&&s.push(...o.errors);return{value:i.value,errors:s}}async function Qd(n,t,e){const i=Nd(e.name);if(!i)throw new Error(`No such validator '${e.name}' exists.`);const s=Jd(e.params,n.formData),o={field:n.label||n.name,name:n.name,label:n.label,value:t,form:n.formData,rule:Object.assign(Object.assign({},e),{params:s})},r=await i(t,s,o);return typeof r=="string"?{error:r}:{error:r?void 0:pr(o)}}function pr(n){const t=An().generateMessage;return t?t(n):"Field is invalid"}function Jd(n,t){const e=i=>Vd(i)?i(t):i;return Array.isArray(n)?n.map(e):Object.keys(n).reduce((i,s)=>(i[s]=e(n[s]),i),{})}async function Zd(n,t){const i=await(Te(n)?n:mr(n)).parse(ht(t),{formData:ht(t)}),s={},o={};for(const r of i.errors){const a=r.errors,c=(r.path||"").replace(/\["(\d+)"\]/g,(d,u)=>`[${u}]`);s[c]={valid:!a.length,errors:a},a.length&&(o[c]=a[0])}return{valid:!i.errors.length,results:s,errors:o,values:i.value,source:"schema"}}async function tu(n,t,e){const s=qt(n).map(async d=>{var u,h,f;const m=(u=e==null?void 0:e.names)===null||u===void 0?void 0:u[d],p=await Yd(pe(t,d),n[d],{name:(m==null?void 0:m.name)||d,label:m==null?void 0:m.label,values:t,bails:(f=(h=e==null?void 0:e.bailsMap)===null||h===void 0?void 0:h[d])!==null&&f!==void 0?f:!0});return Object.assign(Object.assign({},p),{path:d})});let o=!0;const r=await Promise.all(s),a={},c={};for(const d of r)a[d.path]={valid:d.valid,errors:d.errors},d.valid||(o=!1,c[d.path]=d.errors[0]);return{valid:o,results:a,errors:c,source:"schema"}}let eu=0;const Vi=["bails","fieldsCount","id","multiple","type","validate"];function gr(n){const t={},e=Object.assign({},l.toValue(t)),i=l.unref(void 0);return i&&Te(i)&&Jt(i.cast)?ht(i.cast(e)||{}):ht(e)}function yr(n){var t;const e=eu++,i="Form";let s=0;const o=l.ref(!1),r=l.ref(!1),a=l.ref(0),c=[],d=l.reactive(gr()),u=l.ref([]),h=l.ref({}),f=l.ref({}),m=Id(()=>{f.value=u.value.reduce((N,D)=>(N[Ti(l.toValue(D.path))]=D,N),{})});function p(N,D){const V=I(N);if(!V){typeof N=="string"&&(h.value[Ti(N)]=dr(D));return}if(typeof N=="string"){const z=Ti(N);h.value[z]&&delete h.value[z]}V.errors=dr(D),V.valid=!V.errors.length}function g(N){qt(N).forEach(D=>{p(D,N[D])})}const y=l.computed(()=>{const N=u.value.reduce((D,V)=>(V.errors.length&&(D[l.toValue(V.path)]=V.errors),D),{});return Object.assign(Object.assign({},h.value),N)}),b=l.computed(()=>qt(y.value).reduce((N,D)=>{const V=y.value[D];return V!=null&&V.length&&(N[D]=V[0]),N},{})),_=l.computed(()=>u.value.reduce((N,D)=>(N[l.toValue(D.path)]={name:l.toValue(D.path)||"",label:D.label||""},N),{})),w=l.computed(()=>u.value.reduce((N,D)=>{var V;return N[l.toValue(D.path)]=(V=D.bails)!==null&&V!==void 0?V:!0,N},{})),E=Object.assign({},{}),k=(t=void 0)!==null&&t!==void 0?t:!1,{initialValues:v,originalInitialValues:S,setInitialValues:x}=iu(u,d),O=nu(u,d,S,b),M=l.computed(()=>u.value.reduce((N,D)=>{const V=pe(d,l.toValue(D.path));return ge(N,l.toValue(D.path),V),N},{})),C=void 0;function T(N,D){var V,z;const K=l.computed(()=>pe(v.value,l.toValue(N))),Z=f.value[l.toValue(N)],q=(D==null?void 0:D.type)==="checkbox"||(D==null?void 0:D.type)==="radio";if(Z&&q){Z.multiple=!0;const Qt=s++;return Array.isArray(Z.id)?Z.id.push(Qt):Z.id=[Z.id,Qt],Z.fieldsCount++,Z.__flags.pendingUnmount[Qt]=!1,Z}const kt=l.computed(()=>pe(d,l.toValue(N))),Et=l.toValue(N),At=P.findIndex(Qt=>Qt===Et);At!==-1&&P.splice(At,1);const yt=l.computed(()=>{var Qt,Ci,zo,Wo;const Ho=l.toValue(C);if(Te(Ho))return(Ci=(Qt=Ho.describe)===null||Qt===void 0?void 0:Qt.call(Ho,l.toValue(N)).required)!==null&&Ci!==void 0?Ci:!1;const Uo=l.toValue(D==null?void 0:D.schema);return Te(Uo)&&(Wo=(zo=Uo.describe)===null||zo===void 0?void 0:zo.call(Uo).required)!==null&&Wo!==void 0?Wo:!1}),Ft=s++,It=l.reactive({id:Ft,path:N,touched:!1,pending:!1,valid:!0,validated:!!(!((V=E[Et])===null||V===void 0)&&V.length),required:yt,initialValue:K,errors:l.shallowRef([]),bails:(z=D==null?void 0:D.bails)!==null&&z!==void 0?z:!1,label:D==null?void 0:D.label,type:(D==null?void 0:D.type)||"default",value:kt,multiple:!1,__flags:{pendingUnmount:{[Ft]:!1},pendingReset:!1},fieldsCount:1,validate:D==null?void 0:D.validate,dirty:l.computed(()=>!Vn(l.unref(kt),l.unref(K)))});return u.value.push(It),f.value[Et]=It,m(),b.value[Et]&&!E[Et]&&l.nextTick(()=>{Ot(Et,{mode:"silent"})}),l.isRef(N)&&l.watch(N,Qt=>{m();const Ci=ht(kt.value);f.value[Qt]=It,l.nextTick(()=>{ge(d,Qt,Ci)})}),It}const $=cr(Nn,5),U=cr(Nn,5),H=Ld(async N=>await(N==="silent"?$():U()),(N,[D])=>{const V=qt(st.errorBag.value),K=[...new Set([...qt(N.results),...u.value.map(Z=>Z.path),...V])].sort().reduce((Z,q)=>{var kt;const Et=q,At=I(Et)||F(Et),yt=((kt=N.results[Et])===null||kt===void 0?void 0:kt.errors)||[],Ft=l.toValue(At==null?void 0:At.path)||Et,It=su({errors:yt,valid:!yt.length},Z.results[Ft]);return Z.results[Ft]=It,It.valid||(Z.errors[Ft]=It.errors[0]),At&&h.value[Ft]&&delete h.value[Ft],At?(At.valid=It.valid,D==="silent"||D==="validated-only"&&!At.validated||p(At,It.errors),Z):(p(Ft,yt),Z)},{valid:N.valid,results:{},errors:{},source:N.source});return N.values&&(K.values=N.values,K.source=N.source),qt(K.results).forEach(Z=>{var q;const kt=I(Z);kt&&D!=="silent"&&(D==="validated-only"&&!kt.validated||p(kt,(q=K.results[Z])===null||q===void 0?void 0:q.errors))}),K});function B(N){u.value.forEach(N)}function I(N){const D=typeof N=="string"?Ti(N):N;return typeof D=="string"?f.value[D]:D}function F(N){return u.value.filter(V=>N.startsWith(l.toValue(V.path))).reduce((V,z)=>V?z.path.length>V.path.length?z:V:z,void 0)}let P=[],R;function W(N){return P.push(N),R||(R=l.nextTick(()=>{[...P].sort().reverse().forEach(V=>{lr(d,V)}),P=[],R=null})),R}function J(N){return function(V,z){return function(Z){return Z instanceof Event&&(Z.preventDefault(),Z.stopPropagation()),B(q=>q.touched=!0),o.value=!0,a.value++,ct().then(q=>{const kt=ht(d);if(q.valid&&typeof V=="function"){const Et=ht(M.value);let At=N?Et:kt;return q.values&&(At=q.source==="schema"?q.values:Object.assign({},At,q.values)),V(At,{evt:Z,controlledValues:Et,setErrors:g,setFieldError:p,setTouched:Ht,setFieldTouched:fe,setValues:Gt,setFieldValue:ut,resetForm:dt,resetField:xt})}!q.valid&&typeof z=="function"&&z({values:kt,evt:Z,errors:q.errors,results:q.results})}).then(q=>(o.value=!1,q),q=>{throw o.value=!1,q})}}}const ot=J(!1);ot.withControlled=J(!0);function nt(N,D){const V=u.value.findIndex(K=>K.path===N&&(Array.isArray(K.id)?K.id.includes(D):K.id===D)),z=u.value[V];if(!(V===-1||!z)){if(l.nextTick(()=>{Ot(N,{mode:"silent",warn:!1})}),z.multiple&&z.fieldsCount&&z.fieldsCount--,Array.isArray(z.id)){const K=z.id.indexOf(D);K>=0&&z.id.splice(K,1),delete z.__flags.pendingUnmount[D]}(!z.multiple||z.fieldsCount<=0)&&(u.value.splice(V,1),Dn(N),m(),delete f.value[N])}}function Y(N){qt(f.value).forEach(D=>{D.startsWith(N)&&delete f.value[D]}),u.value=u.value.filter(D=>!D.path.startsWith(N)),l.nextTick(()=>{m()})}const st={name:i,formId:e,values:d,controlledValues:M,errorBag:y,errors:b,schema:C,submitCount:a,meta:O,isSubmitting:o,isValidating:r,fieldArrays:c,keepValuesOnUnmount:k,validateSchema:l.unref(C)?H:void 0,validate:ct,setFieldError:p,validateField:Ot,setFieldValue:ut,setValues:Gt,setErrors:g,setFieldTouched:fe,setTouched:Ht,resetForm:dt,resetField:xt,handleSubmit:ot,useFieldModel:Es,defineInputBinds:X,defineComponentBinds:cn,defineField:Tn,stageInitialValue:oe,unsetInitialValue:Dn,setFieldInitialValue:ln,createPathState:T,getPathState:I,unsetPathValue:W,removePathState:nt,initialValues:v,getAllPathStates:()=>u.value,destroyPath:Y,isFieldTouched:j,isFieldDirty:A,isFieldValid:rt};function ut(N,D,V=!0){const z=ht(D),K=typeof N=="string"?N:N.path;I(K)||T(K),ge(d,K,z),V&&Ot(K)}function Ue(N,D=!0){qt(d).forEach(V=>{delete d[V]}),qt(N).forEach(V=>{ut(V,N[V],!1)}),D&&ct()}function Gt(N,D=!0){Mn(d,N),c.forEach(V=>V&&V.reset()),D&&ct()}function De(N,D){const V=I(l.toValue(N))||T(N);return l.computed({get(){return V.value},set(z){var K;const Z=l.toValue(N);ut(Z,z,(K=l.toValue(D))!==null&&K!==void 0?K:!1)}})}function fe(N,D){const V=I(N);V&&(V.touched=D)}function j(N){const D=I(N);return D?D.touched:u.value.filter(V=>V.path.startsWith(N)).some(V=>V.touched)}function A(N){const D=I(N);return D?D.dirty:u.value.filter(V=>V.path.startsWith(N)).some(V=>V.dirty)}function rt(N){const D=I(N);return D?D.valid:u.value.filter(V=>V.path.startsWith(N)).every(V=>V.valid)}function Ht(N){if(typeof N=="boolean"){B(D=>{D.touched=N});return}qt(N).forEach(D=>{fe(D,!!N[D])})}function xt(N,D){var V;const z=D&&"value"in D?D.value:pe(v.value,N),K=I(N);K&&(K.__flags.pendingReset=!0),ln(N,ht(z),!0),ut(N,z,!1),fe(N,(V=D==null?void 0:D.touched)!==null&&V!==void 0?V:!1),p(N,(D==null?void 0:D.errors)||[]),l.nextTick(()=>{K&&(K.__flags.pendingReset=!1)})}function dt(N,D){let V=ht(N!=null&&N.values?N.values:S.value);V=D!=null&&D.force?V:Mn(S.value,V),V=Te(C)&&Jt(C.cast)?C.cast(V):V,x(V,{force:D==null?void 0:D.force}),B(z=>{var K;z.__flags.pendingReset=!0,z.validated=!1,z.touched=((K=N==null?void 0:N.touched)===null||K===void 0?void 0:K[l.toValue(z.path)])||!1,ut(l.toValue(z.path),pe(V,l.toValue(z.path)),!1),p(l.toValue(z.path),void 0)}),D!=null&&D.force?Ue(V,!1):Gt(V,!1),g((N==null?void 0:N.errors)||{}),a.value=(N==null?void 0:N.submitCount)||0,l.nextTick(()=>{ct({mode:"silent"}),B(z=>{z.__flags.pendingReset=!1})})}async function ct(N){const D=(N==null?void 0:N.mode)||"force";if(D==="force"&&B(q=>q.validated=!0),st.validateSchema)return st.validateSchema(D);r.value=!0;const V=await Promise.all(u.value.map(q=>q.validate?q.validate(N).then(kt=>({key:l.toValue(q.path),valid:kt.valid,errors:kt.errors,value:kt.value})):Promise.resolve({key:l.toValue(q.path),valid:!0,errors:[],value:void 0})));r.value=!1;const z={},K={},Z={};for(const q of V)z[q.key]={valid:q.valid,errors:q.errors},q.value&&ge(Z,q.key,q.value),q.errors.length&&(K[q.key]=q.errors[0]);return{valid:V.every(q=>q.valid),results:z,errors:K,values:Z,source:"fields"}}async function Ot(N,D){var V;const z=I(N);return z&&(D==null?void 0:D.mode)!=="silent"&&(z.validated=!0),z!=null&&z.validate?z.validate(D):(!z&&(V=D==null?void 0:D.warn),Promise.resolve({errors:[],valid:!0}))}function Dn(N){lr(v.value,N)}function oe(N,D,V=!1){ln(N,D),ge(d,N,D),V&&ge(S.value,N,ht(D))}function ln(N,D,V=!1){ge(v.value,N,ht(D)),V&&ge(S.value,N,ht(D))}async function Nn(){const N=l.unref(C);if(!N)return{valid:!0,results:{},errors:{},source:"none"};r.value=!0;const D=ir(N)||Te(N)?await Zd(N,d):await tu(N,d,{names:_.value,bailsMap:w.value});return r.value=!1,D}const jo=ot((N,{evt:D})=>{Rd(D)&&D.target.submit()});l.onMounted(()=>{st.validateSchema&&st.validateSchema("silent")}),l.isRef(C)&&l.watch(C,()=>{var N;(N=st.validateSchema)===null||N===void 0||N.call(st,"validated-only")}),l.provide(Td,st);function Tn(N,D){const V=Jt(D)||D==null?void 0:D.label,z=I(l.toValue(N))||T(N,{label:V}),K=()=>Jt(D)?D(Mi(z,Vi)):D||{};function Z(){var yt;z.touched=!0,((yt=K().validateOnBlur)!==null&&yt!==void 0?yt:An().validateOnBlur)&&Ot(l.toValue(z.path))}function q(){var yt;((yt=K().validateOnInput)!==null&&yt!==void 0?yt:An().validateOnInput)&&l.nextTick(()=>{Ot(l.toValue(z.path))})}function kt(){var yt;((yt=K().validateOnChange)!==null&&yt!==void 0?yt:An().validateOnChange)&&l.nextTick(()=>{Ot(l.toValue(z.path))})}const Et=l.computed(()=>{const yt={onChange:kt,onInput:q,onBlur:Z};return Jt(D)?Object.assign(Object.assign({},yt),D(Mi(z,Vi)).props||{}):D!=null&&D.props?Object.assign(Object.assign({},yt),D.props(Mi(z,Vi))):yt});return[De(N,()=>{var yt,Ft,It;return(It=(yt=K().validateOnModelUpdate)!==null&&yt!==void 0?yt:(Ft=An())===null||Ft===void 0?void 0:Ft.validateOnModelUpdate)!==null&&It!==void 0?It:!0}),Et]}function Es(N){return Array.isArray(N)?N.map(D=>De(D,!0)):De(N)}function X(N,D){const[V,z]=Tn(N,D);function K(){z.value.onBlur()}function Z(kt){const Et=hr(kt);ut(l.toValue(N),Et,!1),z.value.onInput()}function q(kt){const Et=hr(kt);ut(l.toValue(N),Et,!1),z.value.onChange()}return l.computed(()=>Object.assign(Object.assign({},z.value),{onBlur:K,onInput:Z,onChange:q,value:V.value}))}function cn(N,D){const[V,z]=Tn(N,D),K=I(l.toValue(N));function Z(q){V.value=q}return l.computed(()=>{const q=Jt(D)?D(Mi(K,Vi)):D||{};return Object.assign({[q.model||"modelValue"]:V.value,[`onUpdate:${q.model||"modelValue"}`]:Z},z.value)})}const Nt=Object.assign(Object.assign({},st),{values:l.readonly(d),handleReset:()=>dt(),submitForm:jo});return l.provide(Pd,Nt),Nt}function nu(n,t,e,i){const s={touched:"some",pending:"some",valid:"every"},o=l.computed(()=>!Vn(t,l.unref(e)));function r(){const c=n.value;return qt(s).reduce((d,u)=>{const h=s[u];return d[u]=c[h](f=>f[u]),d},{})}const a=l.reactive(r());return l.watchEffect(()=>{const c=r();a.touched=c.touched,a.valid=c.valid,a.pending=c.pending}),l.computed(()=>Object.assign(Object.assign({initialValues:l.unref(e)},a),{valid:a.valid&&!qt(i.value).length,dirty:o.value}))}function iu(n,t,e){const i=gr(),s=l.ref(i),o=l.ref(ht(i));function r(a,c){c!=null&&c.force?(s.value=ht(a),o.value=ht(a)):(s.value=Mn(ht(s.value)||{},ht(a)),o.value=Mn(ht(o.value)||{},ht(a))),c!=null&&c.updateFields&&n.value.forEach(d=>{if(d.touched)return;const h=pe(s.value,l.toValue(d.path));ge(t,l.toValue(d.path),ht(h))})}return{initialValues:s,originalInitialValues:o,setInitialValues:r}}function su(n,t){return t?{valid:n.valid&&t.valid,errors:[...n.errors,...t.errors]}:n}function ou(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Vs,br;function ru(){if(br)return Vs;br=1;function n(b){this._maxSize=b,this.clear()}n.prototype.clear=function(){this._size=0,this._values=Object.create(null)},n.prototype.get=function(b){return this._values[b]},n.prototype.set=function(b,_){return this._size>=this._maxSize&&this.clear(),b in this._values||this._size++,this._values[b]=_};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,e=/^\d+$/,i=/^\d/,s=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,o=/^\s*(['"]?)(.*?)(\1)\s*$/,r=512,a=new n(r),c=new n(r),d=new n(r);Vs={Cache:n,split:h,normalizePath:u,setter:function(b){var _=u(b);return c.get(b)||c.set(b,function(E,k){for(var v=0,S=_.length,x=E;v<S-1;){var O=_[v];if(O==="__proto__"||O==="constructor"||O==="prototype")return E;x=x[_[v++]]}x[_[v]]=k})},getter:function(b,_){var w=u(b);return d.get(b)||d.set(b,function(k){for(var v=0,S=w.length;v<S;)if(k!=null||!_)k=k[w[v++]];else return;return k})},join:function(b){return b.reduce(function(_,w){return _+(m(w)||e.test(w)?"["+w+"]":(_?".":"")+w)},"")},forEach:function(b,_,w){f(Array.isArray(b)?b:h(b),_,w)}};function u(b){return a.get(b)||a.set(b,h(b).map(function(_){return _.replace(o,"$2")}))}function h(b){return b.match(t)||[""]}function f(b,_,w){var E=b.length,k,v,S,x;for(v=0;v<E;v++)k=b[v],k&&(y(k)&&(k='"'+k+'"'),x=m(k),S=!x&&/^\d+$/.test(k),_.call(w,k,x,S,v,b))}function m(b){return typeof b=="string"&&b&&["'",'"'].indexOf(b.charAt(0))!==-1}function p(b){return b.match(i)&&!b.match(e)}function g(b){return s.test(b)}function y(b){return!m(b)&&(p(b)||g(b))}return Vs}var Ye=ru(),As,_r;function au(){if(_r)return As;_r=1;const n=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=u=>u.match(n)||[],e=u=>u[0].toUpperCase()+u.slice(1),i=(u,h)=>t(u).join(h).toLowerCase(),s=u=>t(u).reduce((h,f)=>`${h}${h?f[0].toUpperCase()+f.slice(1).toLowerCase():f.toLowerCase()}`,"");return As={words:t,upperFirst:e,camelCase:s,pascalCase:u=>e(s(u)),snakeCase:u=>i(u,"_"),kebabCase:u=>i(u,"-"),sentenceCase:u=>e(i(u," ")),titleCase:u=>t(u).map(e).join(" ")},As}var Fs=au(),Ai={exports:{}},xr;function lu(){if(xr)return Ai.exports;xr=1,Ai.exports=function(s){return n(t(s),s)},Ai.exports.array=n;function n(s,o){var r=s.length,a=new Array(r),c={},d=r,u=e(o),h=i(s);for(o.forEach(function(m){if(!h.has(m[0])||!h.has(m[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});d--;)c[d]||f(s[d],d,new Set);return a;function f(m,p,g){if(g.has(m)){var y;try{y=", node was:"+JSON.stringify(m)}catch{y=""}throw new Error("Cyclic dependency"+y)}if(!h.has(m))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(m));if(!c[p]){c[p]=!0;var b=u.get(m)||new Set;if(b=Array.from(b),p=b.length){g.add(m);do{var _=b[--p];f(_,h.get(_),g)}while(p);g.delete(m)}a[--r]=m}}}function t(s){for(var o=new Set,r=0,a=s.length;r<a;r++){var c=s[r];o.add(c[0]),o.add(c[1])}return Array.from(o)}function e(s){for(var o=new Map,r=0,a=s.length;r<a;r++){var c=s[r];o.has(c[0])||o.set(c[0],new Set),o.has(c[1])||o.set(c[1],new Set),o.get(c[0]).add(c[1])}return o}function i(s){for(var o=new Map,r=0,a=s.length;r<a;r++)o.set(s[r],r);return o}return Ai.exports}var cu=lu();const du=ou(cu),uu=Object.prototype.toString,hu=Error.prototype.toString,fu=RegExp.prototype.toString,mu=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",pu=/^Symbol\((.*)\)(.*)$/;function gu(n){return n!=+n?"NaN":n===0&&1/n<0?"-0":""+n}function kr(n,t=!1){if(n==null||n===!0||n===!1)return""+n;const e=typeof n;if(e==="number")return gu(n);if(e==="string")return t?`"${n}"`:n;if(e==="function")return"[Function "+(n.name||"anonymous")+"]";if(e==="symbol")return mu.call(n).replace(pu,"Symbol($1)");const i=uu.call(n).slice(8,-1);return i==="Date"?isNaN(n.getTime())?""+n:n.toISOString(n):i==="Error"||n instanceof Error?"["+hu.call(n)+"]":i==="RegExp"?fu.call(n):null}function Pe(n,t){let e=kr(n,t);return e!==null?e:JSON.stringify(n,function(i,s){let o=kr(this[i],t);return o!==null?o:s},2)}function Sr(n){return n==null?[]:[].concat(n)}let wr,Er,vr,yu=/\$\{\s*(\w+)\s*\}/g;wr=Symbol.toStringTag;class Cr{constructor(t,e,i,s){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[wr]="Error",this.name="ValidationError",this.value=e,this.path=i,this.type=s,this.errors=[],this.inner=[],Sr(t).forEach(o=>{if(Bt.isError(o)){this.errors.push(...o.errors);const r=o.inner.length?o.inner:[o];this.inner.push(...r)}else this.errors.push(o)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}Er=Symbol.hasInstance,vr=Symbol.toStringTag;class Bt extends Error{static formatError(t,e){const i=e.label||e.path||"this";return e=Object.assign({},e,{path:i,originalPath:e.path}),typeof t=="string"?t.replace(yu,(s,o)=>Pe(e[o])):typeof t=="function"?t(e):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,e,i,s,o){const r=new Cr(t,e,i,s);if(o)return r;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[vr]="Error",this.name=r.name,this.message=r.message,this.type=r.type,this.value=r.value,this.path=r.path,this.errors=r.errors,this.inner=r.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Bt)}static[Er](t){return Cr[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let re={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:n,type:t,value:e,originalValue:i})=>{const s=i!=null&&i!==e?` (cast from the value \`${Pe(i,!0)}\`).`:".";return t!=="mixed"?`${n} must be a \`${t}\` type, but the final value was: \`${Pe(e,!0)}\``+s:`${n} must match the configured type. The validated value was: \`${Pe(e,!0)}\``+s}},$t={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},bu={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},Bs={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},_u={isValue:"${path} field must be ${value}"},Fi={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"};Object.assign(Object.create(null),{mixed:re,string:$t,number:bu,date:Bs,object:Fi,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:_u,tuple:{notType:n=>{const{path:t,value:e,spec:i}=n,s=i.types.length;if(Array.isArray(e)){if(e.length<s)return`${t} tuple value has too few items, expected a length of ${s} but got ${e.length} for value: \`${Pe(e,!0)}\``;if(e.length>s)return`${t} tuple value has too many items, expected a length of ${s} but got ${e.length} for value: \`${Pe(e,!0)}\``}return Bt.formatError(re.notType,n)}}});const $s=n=>n&&n.__isYupSchema__;class Bi{static fromOptions(t,e){if(!e.then&&!e.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:i,then:s,otherwise:o}=e,r=typeof i=="function"?i:(...a)=>a.every(c=>c===i);return new Bi(t,(a,c)=>{var d;let u=r(...a)?s:o;return(d=u==null?void 0:u(c))!=null?d:c})}constructor(t,e){this.fn=void 0,this.refs=t,this.refs=t,this.fn=e}resolve(t,e){let i=this.refs.map(o=>o.getValue(e==null?void 0:e.value,e==null?void 0:e.parent,e==null?void 0:e.context)),s=this.fn(i,t,e);if(s===void 0||s===t)return t;if(!$s(s))throw new TypeError("conditions must return a schema object");return s.resolve(e)}}const $i={context:"$",value:"."};class Ke{constructor(t,e={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===$i.context,this.isValue=this.key[0]===$i.value,this.isSibling=!this.isContext&&!this.isValue;let i=this.isContext?$i.context:this.isValue?$i.value:"";this.path=this.key.slice(i.length),this.getter=this.path&&Ye.getter(this.path,!0),this.map=e.map}getValue(t,e,i){let s=this.isContext?i:this.isValue?t:e;return this.getter&&(s=this.getter(s||{})),this.map&&(s=this.map(s)),s}cast(t,e){return this.getValue(t,e==null?void 0:e.parent,e==null?void 0:e.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}Ke.prototype.__isYupRef=!0;const Xe=n=>n==null;function hn(n){function t({value:e,path:i="",options:s,originalValue:o,schema:r},a,c){const{name:d,test:u,params:h,message:f,skipAbsent:m}=n;let{parent:p,context:g,abortEarly:y=r.spec.abortEarly,disableStackTrace:b=r.spec.disableStackTrace}=s;function _(C){return Ke.isRef(C)?C.getValue(e,p,g):C}function w(C={}){const T=Object.assign({value:e,originalValue:o,label:r.spec.label,path:C.path||i,spec:r.spec,disableStackTrace:C.disableStackTrace||b},h,C.params);for(const U of Object.keys(T))T[U]=_(T[U]);const $=new Bt(Bt.formatError(C.message||f,T),e,T.path,C.type||d,T.disableStackTrace);return $.params=T,$}const E=y?a:c;let k={path:i,parent:p,type:d,from:s.from,createError:w,resolve:_,options:s,originalValue:o,schema:r};const v=C=>{Bt.isError(C)?E(C):C?c(null):E(w())},S=C=>{Bt.isError(C)?E(C):a(C)};if(m&&Xe(e))return v(!0);let O;try{var M;if(O=u.call(k,e,k),typeof((M=O)==null?void 0:M.then)=="function"){if(s.sync)throw new Error(`Validation test of type: "${k.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(O).then(v,S)}}catch(C){S(C);return}v(O)}return t.OPTIONS=n,t}function xu(n,t,e,i=e){let s,o,r;return t?(Ye.forEach(t,(a,c,d)=>{let u=c?a.slice(1,a.length-1):a;n=n.resolve({context:i,parent:s,value:e});let h=n.type==="tuple",f=d?parseInt(u,10):0;if(n.innerType||h){if(h&&!d)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${r}" must contain an index to the tuple element, e.g. "${r}[0]"`);if(e&&f>=e.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${a}, in the path: ${t}. because there is no value at that index. `);s=e,e=e&&e[f],n=h?n.spec.types[f]:n.innerType}if(!d){if(!n.fields||!n.fields[u])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${r} which is a type: "${n.type}")`);s=e,e=e&&e[u],n=n.fields[u]}o=u,r=c?"["+a+"]":"."+a}),{schema:n,parent:s,parentPath:o}):{parent:s,parentPath:t,schema:n}}class Ri extends Set{describe(){const t=[];for(const e of this.values())t.push(Ke.isRef(e)?e.describe():e);return t}resolveAll(t){let e=[];for(const i of this.values())e.push(t(i));return e}clone(){return new Ri(this.values())}merge(t,e){const i=this.clone();return t.forEach(s=>i.add(s)),e.forEach(s=>i.delete(s)),i}}function fn(n,t=new Map){if($s(n)||!n||typeof n!="object")return n;if(t.has(n))return t.get(n);let e;if(n instanceof Date)e=new Date(n.getTime()),t.set(n,e);else if(n instanceof RegExp)e=new RegExp(n),t.set(n,e);else if(Array.isArray(n)){e=new Array(n.length),t.set(n,e);for(let i=0;i<n.length;i++)e[i]=fn(n[i],t)}else if(n instanceof Map){e=new Map,t.set(n,e);for(const[i,s]of n.entries())e.set(i,fn(s,t))}else if(n instanceof Set){e=new Set,t.set(n,e);for(const i of n)e.add(fn(i,t))}else if(n instanceof Object){e={},t.set(n,e);for(const[i,s]of Object.entries(n))e[i]=fn(s,t)}else throw Error(`Unable to clone ${n}`);return e}class ae{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Ri,this._blacklist=new Ri,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(re.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(e=>{e.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const e=Object.create(Object.getPrototypeOf(this));return e.type=this.type,e._typeCheck=this._typeCheck,e._whitelist=this._whitelist.clone(),e._blacklist=this._blacklist.clone(),e.internalTests=Object.assign({},this.internalTests),e.exclusiveTests=Object.assign({},this.exclusiveTests),e.deps=[...this.deps],e.conditions=[...this.conditions],e.tests=[...this.tests],e.transforms=[...this.transforms],e.spec=fn(Object.assign({},this.spec,t)),e}label(t){let e=this.clone();return e.spec.label=t,e}meta(...t){if(t.length===0)return this.spec.meta;let e=this.clone();return e.spec.meta=Object.assign(e.spec.meta||{},t[0]),e}withMutation(t){let e=this._mutate;this._mutate=!0;let i=t(this);return this._mutate=e,i}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let e=this,i=t.clone();const s=Object.assign({},e.spec,i.spec);return i.spec=s,i.internalTests=Object.assign({},e.internalTests,i.internalTests),i._whitelist=e._whitelist.merge(t._whitelist,t._blacklist),i._blacklist=e._blacklist.merge(t._blacklist,t._whitelist),i.tests=e.tests,i.exclusiveTests=e.exclusiveTests,i.withMutation(o=>{t.tests.forEach(r=>{o.test(r.OPTIONS)})}),i.transforms=[...e.transforms,...i.transforms],i}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let e=this;if(e.conditions.length){let i=e.conditions;e=e.clone(),e.conditions=[],e=i.reduce((s,o)=>o.resolve(s,t),e),e=e.resolve(t)}return e}resolveOptions(t){var e,i,s,o;return Object.assign({},t,{from:t.from||[],strict:(e=t.strict)!=null?e:this.spec.strict,abortEarly:(i=t.abortEarly)!=null?i:this.spec.abortEarly,recursive:(s=t.recursive)!=null?s:this.spec.recursive,disableStackTrace:(o=t.disableStackTrace)!=null?o:this.spec.disableStackTrace})}cast(t,e={}){let i=this.resolve(Object.assign({value:t},e)),s=e.assert==="ignore-optionality",o=i._cast(t,e);if(e.assert!==!1&&!i.isType(o)){if(s&&Xe(o))return o;let r=Pe(t),a=Pe(o);throw new TypeError(`The value of ${e.path||"field"} could not be cast to a value that satisfies the schema type: "${i.type}".
15
+ */function We(e){return typeof e=="function"}function hn(e){return e==null}const Dt=e=>e!==null&&!!e&&typeof e=="object"&&!Array.isArray(e);function er(e){return Number(e)>=0}function Ll(e){return typeof e=="object"&&e!==null}function Ml(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}function bn(e){if(!Ll(e)||Ml(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Wt(e,t){return Object.keys(t).forEach(r=>{if(bn(t[r])&&bn(e[r])){e[r]||(e[r]={}),Wt(e[r],t[r]);return}e[r]=t[r]}),e}function ho(e){const t=e.split(".");if(!t.length)return"";let r=String(t[0]);for(let n=1;n<t.length;n++){if(er(t[n])){r+=`[${t[n]}]`;continue}r+=`.${t[n]}`}return r}const jl={};function zl(e){return jl[e]}function yn(e,t,r){typeof r.value=="object"&&(r.value=pe(r.value)),!r.enumerable||r.get||r.set||!r.configurable||!r.writable||t==="__proto__"?Object.defineProperty(e,t,r):e[t]=r.value}function pe(e){if(typeof e!="object")return e;var t=0,r,n,a,i=Object.prototype.toString.call(e);if(i==="[object Object]"?a=Object.create(e.__proto__||null):i==="[object Array]"?a=Array(e.length):i==="[object Set]"?(a=new Set,e.forEach(function(l){a.add(pe(l))})):i==="[object Map]"?(a=new Map,e.forEach(function(l,d){a.set(pe(d),pe(l))})):i==="[object Date]"?a=new Date(+e):i==="[object RegExp]"?a=new RegExp(e.source,e.flags):i==="[object DataView]"?a=new e.constructor(pe(e.buffer)):i==="[object ArrayBuffer]"?a=e.slice(0):i.slice(-6)==="Array]"&&(a=new e.constructor(e)),a){for(n=Object.getOwnPropertySymbols(e);t<n.length;t++)yn(a,n[t],Object.getOwnPropertyDescriptor(e,n[t]));for(t=0,n=Object.getOwnPropertyNames(e);t<n.length;t++)Object.hasOwnProperty.call(a,r=n[t])&&a[r]===e[r]||yn(a,r,Object.getOwnPropertyDescriptor(e,r))}return a||e}const Ul=Symbol("vee-validate-form"),Wl=Symbol("vee-validate-form-context"),ql=typeof window<"u";function Hl(e){return We(e)&&!!e.__locatorRef}function st(e){return!!e&&We(e.parse)&&e.__type==="VVTypedSchema"}function kn(e){return!!e&&We(e.validate)}function Kl(e){return e==="checkbox"||e==="radio"}function Yl(e){return Dt(e)||Array.isArray(e)}function Gl(e){return Array.isArray(e)?e.length===0:Dt(e)&&Object.keys(e).length===0}function bo(e){return/^\[.+\]$/i.test(e)}function Xl(e){return wn(e)&&e.multiple}function wn(e){return e.tagName==="SELECT"}function Jl(e){return xn(e)&&e.target&&"submit"in e.target}function xn(e){return e?!!(typeof Event<"u"&&We(Event)&&e instanceof Event||e&&e.srcElement):!1}function qt(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,a;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!qt(e[n],t[n]))return!1;return!0}if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;for(n of e.entries())if(!qt(n[1],t.get(n[0])))return!1;return!0}if(Cn(e)&&Cn(t))return!(e.size!==t.size||e.name!==t.name||e.lastModified!==t.lastModified||e.type!==t.type);if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(n of e.entries())if(!t.has(n[0]))return!1;return!0}if(ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(a=Object.keys(e),r=a.length-vn(e,a),r!==Object.keys(t).length-vn(t,Object.keys(t)))return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,a[n]))return!1;for(n=r;n--!==0;){var i=a[n];if(!qt(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function vn(e,t){let r=0;for(let a=t.length;a--!==0;){var n=t[a];e[n]===void 0&&r++}return r}function Cn(e){return ql?e instanceof File:!1}function tr(e){return bo(e)?e.replace(/\[|\]/gi,""):e}function et(e,t,r){return e?bo(t)?e[tr(t)]:(t||"").split(/\.|\[(\d+)\]/).filter(Boolean).reduce((a,i)=>Yl(a)&&i in a?a[i]:r,e):r}function tt(e,t,r){if(bo(t)){e[tr(t)]=r;return}const n=t.split(/\.|\[(\d+)\]/).filter(Boolean);let a=e;for(let i=0;i<n.length;i++){if(i===n.length-1){a[n[i]]=r;return}(!(n[i]in a)||hn(a[n[i]]))&&(a[n[i]]=er(n[i+1])?[]:{}),a=a[n[i]]}}function or(e,t){if(Array.isArray(e)&&er(t)){e.splice(Number(t),1);return}Dt(e)&&delete e[t]}function En(e,t){if(bo(t)){delete e[tr(t)];return}const r=t.split(/\.|\[(\d+)\]/).filter(Boolean);let n=e;for(let i=0;i<r.length;i++){if(i===r.length-1){or(n,r[i]);break}if(!(r[i]in n)||hn(n[r[i]]))break;n=n[r[i]]}const a=r.map((i,l)=>et(e,r.slice(0,l).join(".")));for(let i=a.length-1;i>=0;i--)if(Gl(a[i])){if(i===0){or(e,r[0]);continue}or(a[i-1],r[i-1])}}function Le(e){return Object.keys(e)}function Sn(e,t=0){let r=null,n=[];return function(...a){return r&&clearTimeout(r),r=setTimeout(()=>{const i=e(...a);n.forEach(l=>l(i)),n=[]},t),new Promise(i=>n.push(i))}}function Ql(e,t){let r;return async function(...a){const i=e(...a);r=i;const l=await i;return i!==r?l:(r=void 0,t(l,a))}}function Bn(e){return Array.isArray(e)?e:e?[e]:[]}function yo(e,t){const r={};for(const n in e)t.includes(n)||(r[n]=e[n]);return r}function Zl(e){let t=null,r=[];return function(...n){const a=o.nextTick(()=>{if(t!==a)return;const i=e(...n);r.forEach(l=>l(i)),r=[],t=null});return t=a,new Promise(i=>r.push(i))}}function rr(e){if(Nn(e))return e._value}function Nn(e){return"_value"in e}function es(e){return e.type==="number"||e.type==="range"?Number.isNaN(e.valueAsNumber)?e.value:e.valueAsNumber:e.value}function _n(e){if(!xn(e))return e;const t=e.target;if(Kl(t.type)&&Nn(t))return rr(t);if(t.type==="file"&&t.files){const r=Array.from(t.files);return t.multiple?r:r[0]}if(Xl(t))return Array.from(t.options).filter(r=>r.selected&&!r.disabled).map(rr);if(wn(t)){const r=Array.from(t.options).find(n=>n.selected);return r?rr(r):t.value}return es(t)}function ts(e){const t={};return Object.defineProperty(t,"_$$isNormalized",{value:!0,writable:!1,enumerable:!1,configurable:!1}),e?Dt(e)&&e._$$isNormalized?e:Dt(e)?Object.keys(e).reduce((r,n)=>{const a=os(e[n]);return e[n]!==!1&&(r[n]=Rn(a)),r},t):typeof e!="string"?t:e.split("|").reduce((r,n)=>{const a=rs(n);return a.name&&(r[a.name]=Rn(a.params)),r},t):t}function os(e){return e===!0?[]:Array.isArray(e)||Dt(e)?e:[e]}function Rn(e){const t=r=>typeof r=="string"&&r[0]==="@"?ns(r.slice(1)):r;return Array.isArray(e)?e.map(t):e instanceof RegExp?[e]:Object.keys(e).reduce((r,n)=>(r[n]=t(e[n]),r),{})}const rs=e=>{let t=[];const r=e.split(":")[0];return e.includes(":")&&(t=e.split(":").slice(1).join(":").split(",")),{name:r,params:t}};function ns(e){const t=r=>{var n;return(n=et(r,e))!==null&&n!==void 0?n:r[e]};return t.__locatorRef=e,t}let as=Object.assign({},{generateMessage:({field:e})=>`${e} is not valid.`,bails:!0,validateOnBlur:!0,validateOnChange:!0,validateOnInput:!1,validateOnModelUpdate:!0});const Ht=()=>as;async function is(e,t,r={}){const n=r==null?void 0:r.bails,a={name:(r==null?void 0:r.name)||"{field}",rules:t,label:r==null?void 0:r.label,bails:n??!0,formData:(r==null?void 0:r.values)||{}},i=await ls(a,e);return Object.assign(Object.assign({},i),{valid:!i.errors.length})}async function ls(e,t){const r=e.rules;if(st(r)||kn(r))return cs(t,Object.assign(Object.assign({},e),{rules:r}));if(We(r)||Array.isArray(r)){const d={field:e.label||e.name,name:e.name,label:e.label,form:e.formData,value:t},u=Array.isArray(r)?r:[r],s=u.length,c=[];for(let f=0;f<s;f++){const m=u[f],p=await m(t,d);if(!(typeof p!="string"&&!Array.isArray(p)&&p)){if(Array.isArray(p))c.push(...p);else{const h=typeof p=="string"?p:Dn(d);c.push(h)}if(e.bails)return{errors:c}}}return{errors:c}}const n=Object.assign(Object.assign({},e),{rules:ts(r)}),a=[],i=Object.keys(n.rules),l=i.length;for(let d=0;d<l;d++){const u=i[d],s=await ds(n,t,{name:u,params:n.rules[u]});if(s.error&&(a.push(s.error),e.bails))return{errors:a}}return{errors:a}}function ss(e){return!!e&&e.name==="ValidationError"}function Tn(e){return{__type:"VVTypedSchema",async parse(r,n){var a;try{return{output:await e.validate(r,{abortEarly:!1,context:(n==null?void 0:n.formData)||{}}),errors:[]}}catch(i){if(!ss(i))throw i;if(!(!((a=i.inner)===null||a===void 0)&&a.length)&&i.errors.length)return{errors:[{path:i.path,errors:i.errors}]};const l=i.inner.reduce((d,u)=>{const s=u.path||"";return d[s]||(d[s]={errors:[],path:s}),d[s].errors.push(...u.errors),d},{});return{errors:Object.values(l)}}}}}async function cs(e,t){const n=await(st(t.rules)?t.rules:Tn(t.rules)).parse(e,{formData:t.formData}),a=[];for(const i of n.errors)i.errors.length&&a.push(...i.errors);return{value:n.value,errors:a}}async function ds(e,t,r){const n=zl(r.name);if(!n)throw new Error(`No such validator '${r.name}' exists.`);const a=us(r.params,e.formData),i={field:e.label||e.name,name:e.name,label:e.label,value:t,form:e.formData,rule:Object.assign(Object.assign({},r),{params:a})},l=await n(t,a,i);return typeof l=="string"?{error:l}:{error:l?void 0:Dn(i)}}function Dn(e){const t=Ht().generateMessage;return t?t(e):"Field is invalid"}function us(e,t){const r=n=>Hl(n)?n(t):n;return Array.isArray(e)?e.map(r):Object.keys(e).reduce((n,a)=>(n[a]=r(e[a]),n),{})}async function fs(e,t){const n=await(st(e)?e:Tn(e)).parse(pe(t),{formData:pe(t)}),a={},i={};for(const l of n.errors){const d=l.errors,u=(l.path||"").replace(/\["(\d+)"\]/g,(s,c)=>`[${c}]`);a[u]={valid:!d.length,errors:d},d.length&&(i[u]=d[0])}return{valid:!n.errors.length,results:a,errors:i,values:n.value,source:"schema"}}async function ms(e,t,r){const a=Le(e).map(async s=>{var c,f,m;const p=(c=r==null?void 0:r.names)===null||c===void 0?void 0:c[s],g=await is(et(t,s),e[s],{name:(p==null?void 0:p.name)||s,label:p==null?void 0:p.label,values:t,bails:(m=(f=r==null?void 0:r.bailsMap)===null||f===void 0?void 0:f[s])!==null&&m!==void 0?m:!0});return Object.assign(Object.assign({},g),{path:s})});let i=!0;const l=await Promise.all(a),d={},u={};for(const s of l)d[s.path]={valid:s.valid,errors:s.errors},s.valid||(i=!1,u[s.path]=s.errors[0]);return{valid:i,results:d,errors:u,source:"schema"}}let ps=0;const ko=["bails","fieldsCount","id","multiple","type","validate"];function On(e){const t={},r=Object.assign({},o.toValue(t)),n=o.unref(void 0);return n&&st(n)&&We(n.cast)?pe(n.cast(r)||{}):pe(r)}function Vn(e){var t;const r=ps++,n="Form";let a=0;const i=o.ref(!1),l=o.ref(!1),d=o.ref(0),u=[],s=o.reactive(On()),c=o.ref([]),f=o.ref({}),m=o.ref({}),p=Zl(()=>{m.value=c.value.reduce((x,v)=>(x[ho(o.toValue(v.path))]=v,x),{})});function g(x,v){const F=Y(x);if(!F){typeof x=="string"&&(f.value[ho(x)]=Bn(v));return}if(typeof x=="string"){const q=ho(x);f.value[q]&&delete f.value[q]}F.errors=Bn(v),F.valid=!F.errors.length}function h(x){Le(x).forEach(v=>{g(v,x[v])})}const b=o.computed(()=>{const x=c.value.reduce((v,F)=>(F.errors.length&&(v[o.toValue(F.path)]=F.errors),v),{});return Object.assign(Object.assign({},f.value),x)}),k=o.computed(()=>Le(b.value).reduce((x,v)=>{const F=b.value[v];return F!=null&&F.length&&(x[v]=F[0]),x},{})),C=o.computed(()=>c.value.reduce((x,v)=>(x[o.toValue(v.path)]={name:o.toValue(v.path)||"",label:v.label||""},x),{})),S=o.computed(()=>c.value.reduce((x,v)=>{var F;return x[o.toValue(v.path)]=(F=v.bails)!==null&&F!==void 0?F:!0,x},{})),L=Object.assign({},{}),R=(t=void 0)!==null&&t!==void 0?t:!1,{initialValues:N,originalInitialValues:w,setInitialValues:y}=hs(c,s),E=gs(c,s,w,k),V=o.computed(()=>c.value.reduce((x,v)=>{const F=et(s,o.toValue(v.path));return tt(x,o.toValue(v.path),F),x},{})),_=void 0;function D(x,v){var F,q;const Z=o.computed(()=>et(N.value,o.toValue(x))),re=m.value[o.toValue(x)],X=(v==null?void 0:v.type)==="checkbox"||(v==null?void 0:v.type)==="radio";if(re&&X){re.multiple=!0;const be=a++;return Array.isArray(re.id)?re.id.push(be):re.id=[re.id,be],re.fieldsCount++,re.__flags.pendingUnmount[be]=!1,re}const O=o.computed(()=>et(s,o.toValue(x))),U=o.toValue(x),K=$.findIndex(be=>be===U);K!==-1&&$.splice(K,1);const H=o.computed(()=>{var be,Be,eo,to;const oo=o.toValue(_);if(st(oo))return(Be=(be=oo.describe)===null||be===void 0?void 0:be.call(oo,o.toValue(x)).required)!==null&&Be!==void 0?Be:!1;const vr=o.toValue(v==null?void 0:v.schema);return st(vr)&&(to=(eo=vr.describe)===null||eo===void 0?void 0:eo.call(vr).required)!==null&&to!==void 0?to:!1}),ee=a++,me=o.reactive({id:ee,path:x,touched:!1,pending:!1,valid:!0,validated:!!(!((F=L[U])===null||F===void 0)&&F.length),required:H,initialValue:Z,errors:o.shallowRef([]),bails:(q=v==null?void 0:v.bails)!==null&&q!==void 0?q:!1,label:v==null?void 0:v.label,type:(v==null?void 0:v.type)||"default",value:O,multiple:!1,__flags:{pendingUnmount:{[ee]:!1},pendingReset:!1},fieldsCount:1,validate:v==null?void 0:v.validate,dirty:o.computed(()=>!qt(o.unref(O),o.unref(Z)))});return c.value.push(me),m.value[U]=me,p(),k.value[U]&&!L[U]&&o.nextTick(()=>{Fe(U,{mode:"silent"})}),o.isRef(x)&&o.watch(x,be=>{p();const Be=pe(O.value);m.value[be]=me,o.nextTick(()=>{tt(s,be,Be)})}),me}const P=Sn(je,5),T=Sn(je,5),j=Ql(async x=>await(x==="silent"?P():T()),(x,[v])=>{const F=Le(le.errorBag.value),Z=[...new Set([...Le(x.results),...c.value.map(re=>re.path),...F])].sort().reduce((re,X)=>{var O;const U=X,K=Y(U)||M(U),H=((O=x.results[U])===null||O===void 0?void 0:O.errors)||[],ee=o.toValue(K==null?void 0:K.path)||U,me=bs({errors:H,valid:!H.length},re.results[ee]);return re.results[ee]=me,me.valid||(re.errors[ee]=me.errors[0]),K&&f.value[ee]&&delete f.value[ee],K?(K.valid=me.valid,v==="silent"||v==="validated-only"&&!K.validated||g(K,me.errors),re):(g(ee,H),re)},{valid:x.valid,results:{},errors:{},source:x.source});return x.values&&(Z.values=x.values,Z.source=x.source),Le(Z.results).forEach(re=>{var X;const O=Y(re);O&&v!=="silent"&&(v==="validated-only"&&!O.validated||g(O,(X=Z.results[re])===null||X===void 0?void 0:X.errors))}),Z});function I(x){c.value.forEach(x)}function Y(x){const v=typeof x=="string"?ho(x):x;return typeof v=="string"?m.value[v]:v}function M(x){return c.value.filter(F=>x.startsWith(o.toValue(F.path))).reduce((F,q)=>F?q.path.length>F.path.length?q:F:q,void 0)}let $=[],z;function te(x){return $.push(x),z||(z=o.nextTick(()=>{[...$].sort().reverse().forEach(F=>{En(s,F)}),$=[],z=null})),z}function ne(x){return function(F,q){return function(re){return re instanceof Event&&(re.preventDefault(),re.stopPropagation()),I(X=>X.touched=!0),i.value=!0,d.value++,ye().then(X=>{const O=pe(s);if(X.valid&&typeof F=="function"){const U=pe(V.value);let K=x?U:O;return X.values&&(K=X.source==="schema"?X.values:Object.assign({},K,X.values)),F(K,{evt:re,controlledValues:U,setErrors:h,setFieldError:g,setTouched:de,setFieldTouched:Me,setValues:Re,setFieldValue:he,resetForm:ue,resetField:ce})}!X.valid&&typeof q=="function"&&q({values:O,evt:re,errors:X.errors,results:X.results})}).then(X=>(i.value=!1,X),X=>{throw i.value=!1,X})}}}const G=ne(!1);G.withControlled=ne(!0);function J(x,v){const F=c.value.findIndex(Z=>Z.path===x&&(Array.isArray(Z.id)?Z.id.includes(v):Z.id===v)),q=c.value[F];if(!(F===-1||!q)){if(o.nextTick(()=>{Fe(x,{mode:"silent",warn:!1})}),q.multiple&&q.fieldsCount&&q.fieldsCount--,Array.isArray(q.id)){const Z=q.id.indexOf(v);Z>=0&&q.id.splice(Z,1),delete q.__flags.pendingUnmount[v]}(!q.multiple||q.fieldsCount<=0)&&(c.value.splice(F,1),Ze(x),p(),delete m.value[x])}}function ie(x){Le(m.value).forEach(v=>{v.startsWith(x)&&delete m.value[v]}),c.value=c.value.filter(v=>!v.path.startsWith(x)),o.nextTick(()=>{p()})}const le={name:n,formId:r,values:s,controlledValues:V,errorBag:b,errors:k,schema:_,submitCount:d,meta:E,isSubmitting:i,isValidating:l,fieldArrays:u,keepValuesOnUnmount:R,validateSchema:o.unref(_)?j:void 0,validate:ye,setFieldError:g,validateField:Fe,setFieldValue:he,setValues:Re,setErrors:h,setFieldTouched:Me,setTouched:de,resetForm:ue,resetField:ce,handleSubmit:G,useFieldModel:Nt,defineInputBinds:Q,defineComponentBinds:Ye,defineField:gt,stageInitialValue:Se,unsetInitialValue:Ze,setFieldInitialValue:Ae,createPathState:D,getPathState:Y,unsetPathValue:te,removePathState:J,initialValues:N,getAllPathStates:()=>c.value,destroyPath:ie,isFieldTouched:W,isFieldDirty:A,isFieldValid:se};function he(x,v,F=!0){const q=pe(v),Z=typeof x=="string"?x:x.path;Y(Z)||D(Z),tt(s,Z,q),F&&Fe(Z)}function Pe(x,v=!0){Le(s).forEach(F=>{delete s[F]}),Le(x).forEach(F=>{he(F,x[F],!1)}),v&&ye()}function Re(x,v=!0){Wt(s,x),u.forEach(F=>F&&F.reset()),v&&ye()}function Ke(x,v){const F=Y(o.toValue(x))||D(x);return o.computed({get(){return F.value},set(q){var Z;const re=o.toValue(x);he(re,q,(Z=o.toValue(v))!==null&&Z!==void 0?Z:!1)}})}function Me(x,v){const F=Y(x);F&&(F.touched=v)}function W(x){const v=Y(x);return v?v.touched:c.value.filter(F=>F.path.startsWith(x)).some(F=>F.touched)}function A(x){const v=Y(x);return v?v.dirty:c.value.filter(F=>F.path.startsWith(x)).some(F=>F.dirty)}function se(x){const v=Y(x);return v?v.valid:c.value.filter(F=>F.path.startsWith(x)).every(F=>F.valid)}function de(x){if(typeof x=="boolean"){I(v=>{v.touched=x});return}Le(x).forEach(v=>{Me(v,!!x[v])})}function ce(x,v){var F;const q=v&&"value"in v?v.value:et(N.value,x),Z=Y(x);Z&&(Z.__flags.pendingReset=!0),Ae(x,pe(q),!0),he(x,q,!1),Me(x,(F=v==null?void 0:v.touched)!==null&&F!==void 0?F:!1),g(x,(v==null?void 0:v.errors)||[]),o.nextTick(()=>{Z&&(Z.__flags.pendingReset=!1)})}function ue(x,v){let F=pe(x!=null&&x.values?x.values:w.value);F=v!=null&&v.force?F:Wt(w.value,F),F=st(_)&&We(_.cast)?_.cast(F):F,y(F,{force:v==null?void 0:v.force}),I(q=>{var Z;q.__flags.pendingReset=!0,q.validated=!1,q.touched=((Z=x==null?void 0:x.touched)===null||Z===void 0?void 0:Z[o.toValue(q.path)])||!1,he(o.toValue(q.path),et(F,o.toValue(q.path)),!1),g(o.toValue(q.path),void 0)}),v!=null&&v.force?Pe(F,!1):Re(F,!1),h((x==null?void 0:x.errors)||{}),d.value=(x==null?void 0:x.submitCount)||0,o.nextTick(()=>{ye({mode:"silent"}),I(q=>{q.__flags.pendingReset=!1})})}async function ye(x){const v=(x==null?void 0:x.mode)||"force";if(v==="force"&&I(X=>X.validated=!0),le.validateSchema)return le.validateSchema(v);l.value=!0;const F=await Promise.all(c.value.map(X=>X.validate?X.validate(x).then(O=>({key:o.toValue(X.path),valid:O.valid,errors:O.errors,value:O.value})):Promise.resolve({key:o.toValue(X.path),valid:!0,errors:[],value:void 0})));l.value=!1;const q={},Z={},re={};for(const X of F)q[X.key]={valid:X.valid,errors:X.errors},X.value&&tt(re,X.key,X.value),X.errors.length&&(Z[X.key]=X.errors[0]);return{valid:F.every(X=>X.valid),results:q,errors:Z,values:re,source:"fields"}}async function Fe(x,v){var F;const q=Y(x);return q&&(v==null?void 0:v.mode)!=="silent"&&(q.validated=!0),q!=null&&q.validate?q.validate(v):(!q&&(F=v==null?void 0:v.warn),Promise.resolve({errors:[],valid:!0}))}function Ze(x){En(N.value,x)}function Se(x,v,F=!1){Ae(x,v),tt(s,x,v),F&&tt(w.value,x,pe(v))}function Ae(x,v,F=!1){tt(N.value,x,pe(v)),F&&tt(w.value,x,pe(v))}async function je(){const x=o.unref(_);if(!x)return{valid:!0,results:{},errors:{},source:"none"};l.value=!0;const v=kn(x)||st(x)?await fs(x,s):await ms(x,s,{names:C.value,bailsMap:S.value});return l.value=!1,v}const pt=G((x,{evt:v})=>{Jl(v)&&v.target.submit()});o.onMounted(()=>{le.validateSchema&&le.validateSchema("silent")}),o.isRef(_)&&o.watch(_,()=>{var x;(x=le.validateSchema)===null||x===void 0||x.call(le,"validated-only")}),o.provide(Ul,le);function gt(x,v){const F=We(v)||v==null?void 0:v.label,q=Y(o.toValue(x))||D(x,{label:F}),Z=()=>We(v)?v(yo(q,ko)):v||{};function re(){var H;q.touched=!0,((H=Z().validateOnBlur)!==null&&H!==void 0?H:Ht().validateOnBlur)&&Fe(o.toValue(q.path))}function X(){var H;((H=Z().validateOnInput)!==null&&H!==void 0?H:Ht().validateOnInput)&&o.nextTick(()=>{Fe(o.toValue(q.path))})}function O(){var H;((H=Z().validateOnChange)!==null&&H!==void 0?H:Ht().validateOnChange)&&o.nextTick(()=>{Fe(o.toValue(q.path))})}const U=o.computed(()=>{const H={onChange:O,onInput:X,onBlur:re};return We(v)?Object.assign(Object.assign({},H),v(yo(q,ko)).props||{}):v!=null&&v.props?Object.assign(Object.assign({},H),v.props(yo(q,ko))):H});return[Ke(x,()=>{var H,ee,me;return(me=(H=Z().validateOnModelUpdate)!==null&&H!==void 0?H:(ee=Ht())===null||ee===void 0?void 0:ee.validateOnModelUpdate)!==null&&me!==void 0?me:!0}),U]}function Nt(x){return Array.isArray(x)?x.map(v=>Ke(v,!0)):Ke(x)}function Q(x,v){const[F,q]=gt(x,v);function Z(){q.value.onBlur()}function re(O){const U=_n(O);he(o.toValue(x),U,!1),q.value.onInput()}function X(O){const U=_n(O);he(o.toValue(x),U,!1),q.value.onChange()}return o.computed(()=>Object.assign(Object.assign({},q.value),{onBlur:Z,onInput:re,onChange:X,value:F.value}))}function Ye(x,v){const[F,q]=gt(x,v),Z=Y(o.toValue(x));function re(X){F.value=X}return o.computed(()=>{const X=We(v)?v(yo(Z,ko)):v||{};return Object.assign({[X.model||"modelValue"]:F.value,[`onUpdate:${X.model||"modelValue"}`]:re},q.value)})}const we=Object.assign(Object.assign({},le),{values:o.readonly(s),handleReset:()=>ue(),submitForm:pt});return o.provide(Wl,we),we}function gs(e,t,r,n){const a={touched:"some",pending:"some",valid:"every"},i=o.computed(()=>!qt(t,o.unref(r)));function l(){const u=e.value;return Le(a).reduce((s,c)=>{const f=a[c];return s[c]=u[f](m=>m[c]),s},{})}const d=o.reactive(l());return o.watchEffect(()=>{const u=l();d.touched=u.touched,d.valid=u.valid,d.pending=u.pending}),o.computed(()=>Object.assign(Object.assign({initialValues:o.unref(r)},d),{valid:d.valid&&!Le(n.value).length,dirty:i.value}))}function hs(e,t,r){const n=On(),a=o.ref(n),i=o.ref(pe(n));function l(d,u){u!=null&&u.force?(a.value=pe(d),i.value=pe(d)):(a.value=Wt(pe(a.value)||{},pe(d)),i.value=Wt(pe(i.value)||{},pe(d))),u!=null&&u.updateFields&&e.value.forEach(s=>{if(s.touched)return;const f=et(a.value,o.toValue(s.path));tt(t,o.toValue(s.path),pe(f))})}return{initialValues:a,originalInitialValues:i,setInitialValues:l}}function bs(e,t){return t?{valid:e.valid&&t.valid,errors:[...e.errors,...t.errors]}:e}function $n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var nr,Fn;function ys(){if(Fn)return nr;Fn=1;function e(k){this._maxSize=k,this.clear()}e.prototype.clear=function(){this._size=0,this._values=Object.create(null)},e.prototype.get=function(k){return this._values[k]},e.prototype.set=function(k,C){return this._size>=this._maxSize&&this.clear(),k in this._values||this._size++,this._values[k]=C};var t=/[^.^\]^[]+|(?=\[\]|\.\.)/g,r=/^\d+$/,n=/^\d/,a=/[~`!#$%\^&*+=\-\[\]\\';,/{}|\\":<>\?]/g,i=/^\s*(['"]?)(.*?)(\1)\s*$/,l=512,d=new e(l),u=new e(l),s=new e(l);nr={Cache:e,split:f,normalizePath:c,setter:function(k){var C=c(k);return u.get(k)||u.set(k,function(L,R){for(var N=0,w=C.length,y=L;N<w-1;){var E=C[N];if(E==="__proto__"||E==="constructor"||E==="prototype")return L;y=y[C[N++]]}y[C[N]]=R})},getter:function(k,C){var S=c(k);return s.get(k)||s.set(k,function(R){for(var N=0,w=S.length;N<w;)if(R!=null||!C)R=R[S[N++]];else return;return R})},join:function(k){return k.reduce(function(C,S){return C+(p(S)||r.test(S)?"["+S+"]":(C?".":"")+S)},"")},forEach:function(k,C,S){m(Array.isArray(k)?k:f(k),C,S)}};function c(k){return d.get(k)||d.set(k,f(k).map(function(C){return C.replace(i,"$2")}))}function f(k){return k.match(t)||[""]}function m(k,C,S){var L=k.length,R,N,w,y;for(N=0;N<L;N++)R=k[N],R&&(b(R)&&(R='"'+R+'"'),y=p(R),w=!y&&/^\d+$/.test(R),C.call(S,R,y,w,N,k))}function p(k){return typeof k=="string"&&k&&["'",'"'].indexOf(k.charAt(0))!==-1}function g(k){return k.match(n)&&!k.match(r)}function h(k){return a.test(k)}function b(k){return!p(k)&&(g(k)||h(k))}return nr}var wt=ys(),ar,An;function ks(){if(An)return ar;An=1;const e=/[A-Z\xc0-\xd6\xd8-\xde]?[a-z\xdf-\xf6\xf8-\xff]+(?:['’](?:d|ll|m|re|s|t|ve))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde]|$)|(?:[A-Z\xc0-\xd6\xd8-\xde]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?=[\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000]|[A-Z\xc0-\xd6\xd8-\xde](?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])|$)|[A-Z\xc0-\xd6\xd8-\xde]?(?:[a-z\xdf-\xf6\xf8-\xff]|[^\ud800-\udfff\xac\xb1\xd7\xf7\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\xbf\u2000-\u206f \t\x0b\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\d+\u2700-\u27bfa-z\xdf-\xf6\xf8-\xffA-Z\xc0-\xd6\xd8-\xde])+(?:['’](?:d|ll|m|re|s|t|ve))?|[A-Z\xc0-\xd6\xd8-\xde]+(?:['’](?:D|LL|M|RE|S|T|VE))?|\d*(?:1ST|2ND|3RD|(?![123])\dTH)(?=\b|[a-z_])|\d*(?:1st|2nd|3rd|(?![123])\dth)(?=\b|[A-Z_])|\d+|(?:[\u2700-\u27bf]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?(?:\u200d(?:[^\ud800-\udfff]|(?:\ud83c[\udde6-\uddff]){2}|[\ud800-\udbff][\udc00-\udfff])[\ufe0e\ufe0f]?(?:[\u0300-\u036f\ufe20-\ufe2f\u20d0-\u20ff]|\ud83c[\udffb-\udfff])?)*/g,t=c=>c.match(e)||[],r=c=>c[0].toUpperCase()+c.slice(1),n=(c,f)=>t(c).join(f).toLowerCase(),a=c=>t(c).reduce((f,m)=>`${f}${f?m[0].toUpperCase()+m.slice(1).toLowerCase():m.toLowerCase()}`,"");return ar={words:t,upperFirst:r,camelCase:a,pascalCase:c=>r(a(c)),snakeCase:c=>n(c,"_"),kebabCase:c=>n(c,"-"),sentenceCase:c=>r(n(c," ")),titleCase:c=>t(c).map(r).join(" ")},ar}var ir=ks(),wo={exports:{}},In;function ws(){if(In)return wo.exports;In=1,wo.exports=function(a){return e(t(a),a)},wo.exports.array=e;function e(a,i){var l=a.length,d=new Array(l),u={},s=l,c=r(i),f=n(a);for(i.forEach(function(p){if(!f.has(p[0])||!f.has(p[1]))throw new Error("Unknown node. There is an unknown node in the supplied edges.")});s--;)u[s]||m(a[s],s,new Set);return d;function m(p,g,h){if(h.has(p)){var b;try{b=", node was:"+JSON.stringify(p)}catch{b=""}throw new Error("Cyclic dependency"+b)}if(!f.has(p))throw new Error("Found unknown node. Make sure to provided all involved nodes. Unknown node: "+JSON.stringify(p));if(!u[g]){u[g]=!0;var k=c.get(p)||new Set;if(k=Array.from(k),g=k.length){h.add(p);do{var C=k[--g];m(C,f.get(C),h)}while(g);h.delete(p)}d[--l]=p}}}function t(a){for(var i=new Set,l=0,d=a.length;l<d;l++){var u=a[l];i.add(u[0]),i.add(u[1])}return Array.from(i)}function r(a){for(var i=new Map,l=0,d=a.length;l<d;l++){var u=a[l];i.has(u[0])||i.set(u[0],new Set),i.has(u[1])||i.set(u[1],new Set),i.get(u[0]).add(u[1])}return i}function n(a){for(var i=new Map,l=0,d=a.length;l<d;l++)i.set(a[l],l);return i}return wo.exports}var xs=ws();const vs=$n(xs),Cs=Object.prototype.toString,Es=Error.prototype.toString,Ss=RegExp.prototype.toString,Bs=typeof Symbol<"u"?Symbol.prototype.toString:()=>"",Ns=/^Symbol\((.*)\)(.*)$/;function _s(e){return e!=+e?"NaN":e===0&&1/e<0?"-0":""+e}function Pn(e,t=!1){if(e==null||e===!0||e===!1)return""+e;const r=typeof e;if(r==="number")return _s(e);if(r==="string")return t?`"${e}"`:e;if(r==="function")return"[Function "+(e.name||"anonymous")+"]";if(r==="symbol")return Bs.call(e).replace(Ns,"Symbol($1)");const n=Cs.call(e).slice(8,-1);return n==="Date"?isNaN(e.getTime())?""+e:e.toISOString(e):n==="Error"||e instanceof Error?"["+Es.call(e)+"]":n==="RegExp"?Ss.call(e):null}function ct(e,t){let r=Pn(e,t);return r!==null?r:JSON.stringify(e,function(n,a){let i=Pn(this[n],t);return i!==null?i:a},2)}function Ln(e){return e==null?[]:[].concat(e)}let Mn,jn,zn,Rs=/\$\{\s*(\w+)\s*\}/g;Mn=Symbol.toStringTag;class Un{constructor(t,r,n,a){this.name=void 0,this.message=void 0,this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=void 0,this.inner=void 0,this[Mn]="Error",this.name="ValidationError",this.value=r,this.path=n,this.type=a,this.errors=[],this.inner=[],Ln(t).forEach(i=>{if(Ve.isError(i)){this.errors.push(...i.errors);const l=i.inner.length?i.inner:[i];this.inner.push(...l)}else this.errors.push(i)}),this.message=this.errors.length>1?`${this.errors.length} errors occurred`:this.errors[0]}}jn=Symbol.hasInstance,zn=Symbol.toStringTag;class Ve extends Error{static formatError(t,r){const n=r.label||r.path||"this";return r=Object.assign({},r,{path:n,originalPath:r.path}),typeof t=="string"?t.replace(Rs,(a,i)=>ct(r[i])):typeof t=="function"?t(r):t}static isError(t){return t&&t.name==="ValidationError"}constructor(t,r,n,a,i){const l=new Un(t,r,n,a);if(i)return l;super(),this.value=void 0,this.path=void 0,this.type=void 0,this.params=void 0,this.errors=[],this.inner=[],this[zn]="Error",this.name=l.name,this.message=l.message,this.type=l.type,this.value=l.value,this.path=l.path,this.errors=l.errors,this.inner=l.inner,Error.captureStackTrace&&Error.captureStackTrace(this,Ve)}static[jn](t){return Un[Symbol.hasInstance](t)||super[Symbol.hasInstance](t)}}let Xe={default:"${path} is invalid",required:"${path} is a required field",defined:"${path} must be defined",notNull:"${path} cannot be null",oneOf:"${path} must be one of the following values: ${values}",notOneOf:"${path} must not be one of the following values: ${values}",notType:({path:e,type:t,value:r,originalValue:n})=>{const a=n!=null&&n!==r?` (cast from the value \`${ct(n,!0)}\`).`:".";return t!=="mixed"?`${e} must be a \`${t}\` type, but the final value was: \`${ct(r,!0)}\``+a:`${e} must match the configured type. The validated value was: \`${ct(r,!0)}\``+a}},$e={length:"${path} must be exactly ${length} characters",min:"${path} must be at least ${min} characters",max:"${path} must be at most ${max} characters",matches:'${path} must match the following: "${regex}"',email:"${path} must be a valid email",url:"${path} must be a valid URL",uuid:"${path} must be a valid UUID",datetime:"${path} must be a valid ISO date-time",datetime_precision:"${path} must be a valid ISO date-time with a sub-second precision of exactly ${precision} digits",datetime_offset:'${path} must be a valid ISO date-time with UTC "Z" timezone',trim:"${path} must be a trimmed string",lowercase:"${path} must be a lowercase string",uppercase:"${path} must be a upper case string"},Ts={min:"${path} must be greater than or equal to ${min}",max:"${path} must be less than or equal to ${max}",lessThan:"${path} must be less than ${less}",moreThan:"${path} must be greater than ${more}",positive:"${path} must be a positive number",negative:"${path} must be a negative number",integer:"${path} must be an integer"},lr={min:"${path} field must be later than ${min}",max:"${path} field must be at earlier than ${max}"},Ds={isValue:"${path} field must be ${value}"},xo={noUnknown:"${path} field has unspecified keys: ${unknown}",exact:"${path} object contains unknown properties: ${properties}"};Object.assign(Object.create(null),{mixed:Xe,string:$e,number:Ts,date:lr,object:xo,array:{min:"${path} field must have at least ${min} items",max:"${path} field must have less than or equal to ${max} items",length:"${path} must have ${length} items"},boolean:Ds,tuple:{notType:e=>{const{path:t,value:r,spec:n}=e,a=n.types.length;if(Array.isArray(r)){if(r.length<a)return`${t} tuple value has too few items, expected a length of ${a} but got ${r.length} for value: \`${ct(r,!0)}\``;if(r.length>a)return`${t} tuple value has too many items, expected a length of ${a} but got ${r.length} for value: \`${ct(r,!0)}\``}return Ve.formatError(Xe.notType,e)}}});const sr=e=>e&&e.__isYupSchema__;class vo{static fromOptions(t,r){if(!r.then&&!r.otherwise)throw new TypeError("either `then:` or `otherwise:` is required for `when()` conditions");let{is:n,then:a,otherwise:i}=r,l=typeof n=="function"?n:(...d)=>d.every(u=>u===n);return new vo(t,(d,u)=>{var s;let c=l(...d)?a:i;return(s=c==null?void 0:c(u))!=null?s:u})}constructor(t,r){this.fn=void 0,this.refs=t,this.refs=t,this.fn=r}resolve(t,r){let n=this.refs.map(i=>i.getValue(r==null?void 0:r.value,r==null?void 0:r.parent,r==null?void 0:r.context)),a=this.fn(n,t,r);if(a===void 0||a===t)return t;if(!sr(a))throw new TypeError("conditions must return a schema object");return a.resolve(r)}}const Co={context:"$",value:"."};class xt{constructor(t,r={}){if(this.key=void 0,this.isContext=void 0,this.isValue=void 0,this.isSibling=void 0,this.path=void 0,this.getter=void 0,this.map=void 0,typeof t!="string")throw new TypeError("ref must be a string, got: "+t);if(this.key=t.trim(),t==="")throw new TypeError("ref must be a non-empty string");this.isContext=this.key[0]===Co.context,this.isValue=this.key[0]===Co.value,this.isSibling=!this.isContext&&!this.isValue;let n=this.isContext?Co.context:this.isValue?Co.value:"";this.path=this.key.slice(n.length),this.getter=this.path&&wt.getter(this.path,!0),this.map=r.map}getValue(t,r,n){let a=this.isContext?n:this.isValue?t:r;return this.getter&&(a=this.getter(a||{})),this.map&&(a=this.map(a)),a}cast(t,r){return this.getValue(t,r==null?void 0:r.parent,r==null?void 0:r.context)}resolve(){return this}describe(){return{type:"ref",key:this.key}}toString(){return`Ref(${this.key})`}static isRef(t){return t&&t.__isYupRef}}xt.prototype.__isYupRef=!0;const vt=e=>e==null;function Ot(e){function t({value:r,path:n="",options:a,originalValue:i,schema:l},d,u){const{name:s,test:c,params:f,message:m,skipAbsent:p}=e;let{parent:g,context:h,abortEarly:b=l.spec.abortEarly,disableStackTrace:k=l.spec.disableStackTrace}=a;function C(_){return xt.isRef(_)?_.getValue(r,g,h):_}function S(_={}){const D=Object.assign({value:r,originalValue:i,label:l.spec.label,path:_.path||n,spec:l.spec,disableStackTrace:_.disableStackTrace||k},f,_.params);for(const T of Object.keys(D))D[T]=C(D[T]);const P=new Ve(Ve.formatError(_.message||m,D),r,D.path,_.type||s,D.disableStackTrace);return P.params=D,P}const L=b?d:u;let R={path:n,parent:g,type:s,from:a.from,createError:S,resolve:C,options:a,originalValue:i,schema:l};const N=_=>{Ve.isError(_)?L(_):_?u(null):L(S())},w=_=>{Ve.isError(_)?L(_):d(_)};if(p&&vt(r))return N(!0);let E;try{var V;if(E=c.call(R,r,R),typeof((V=E)==null?void 0:V.then)=="function"){if(a.sync)throw new Error(`Validation test of type: "${R.type}" returned a Promise during a synchronous validate. This test will finish after the validate call has returned`);return Promise.resolve(E).then(N,w)}}catch(_){w(_);return}N(E)}return t.OPTIONS=e,t}function Os(e,t,r,n=r){let a,i,l;return t?(wt.forEach(t,(d,u,s)=>{let c=u?d.slice(1,d.length-1):d;e=e.resolve({context:n,parent:a,value:r});let f=e.type==="tuple",m=s?parseInt(c,10):0;if(e.innerType||f){if(f&&!s)throw new Error(`Yup.reach cannot implicitly index into a tuple type. the path part "${l}" must contain an index to the tuple element, e.g. "${l}[0]"`);if(r&&m>=r.length)throw new Error(`Yup.reach cannot resolve an array item at index: ${d}, in the path: ${t}. because there is no value at that index. `);a=r,r=r&&r[m],e=f?e.spec.types[m]:e.innerType}if(!s){if(!e.fields||!e.fields[c])throw new Error(`The schema does not contain the path: ${t}. (failed at: ${l} which is a type: "${e.type}")`);a=r,r=r&&r[c],e=e.fields[c]}i=c,l=u?"["+d+"]":"."+d}),{schema:e,parent:a,parentPath:i}):{parent:a,parentPath:t,schema:e}}class Eo extends Set{describe(){const t=[];for(const r of this.values())t.push(xt.isRef(r)?r.describe():r);return t}resolveAll(t){let r=[];for(const n of this.values())r.push(t(n));return r}clone(){return new Eo(this.values())}merge(t,r){const n=this.clone();return t.forEach(a=>n.add(a)),r.forEach(a=>n.delete(a)),n}}function Vt(e,t=new Map){if(sr(e)||!e||typeof e!="object")return e;if(t.has(e))return t.get(e);let r;if(e instanceof Date)r=new Date(e.getTime()),t.set(e,r);else if(e instanceof RegExp)r=new RegExp(e),t.set(e,r);else if(Array.isArray(e)){r=new Array(e.length),t.set(e,r);for(let n=0;n<e.length;n++)r[n]=Vt(e[n],t)}else if(e instanceof Map){r=new Map,t.set(e,r);for(const[n,a]of e.entries())r.set(n,Vt(a,t))}else if(e instanceof Set){r=new Set,t.set(e,r);for(const n of e)r.add(Vt(n,t))}else if(e instanceof Object){r={},t.set(e,r);for(const[n,a]of Object.entries(e))r[n]=Vt(a,t)}else throw Error(`Unable to clone ${e}`);return r}class Je{constructor(t){this.type=void 0,this.deps=[],this.tests=void 0,this.transforms=void 0,this.conditions=[],this._mutate=void 0,this.internalTests={},this._whitelist=new Eo,this._blacklist=new Eo,this.exclusiveTests=Object.create(null),this._typeCheck=void 0,this.spec=void 0,this.tests=[],this.transforms=[],this.withMutation(()=>{this.typeError(Xe.notType)}),this.type=t.type,this._typeCheck=t.check,this.spec=Object.assign({strip:!1,strict:!1,abortEarly:!0,recursive:!0,disableStackTrace:!1,nullable:!1,optional:!0,coerce:!0},t==null?void 0:t.spec),this.withMutation(r=>{r.nonNullable()})}get _type(){return this.type}clone(t){if(this._mutate)return t&&Object.assign(this.spec,t),this;const r=Object.create(Object.getPrototypeOf(this));return r.type=this.type,r._typeCheck=this._typeCheck,r._whitelist=this._whitelist.clone(),r._blacklist=this._blacklist.clone(),r.internalTests=Object.assign({},this.internalTests),r.exclusiveTests=Object.assign({},this.exclusiveTests),r.deps=[...this.deps],r.conditions=[...this.conditions],r.tests=[...this.tests],r.transforms=[...this.transforms],r.spec=Vt(Object.assign({},this.spec,t)),r}label(t){let r=this.clone();return r.spec.label=t,r}meta(...t){if(t.length===0)return this.spec.meta;let r=this.clone();return r.spec.meta=Object.assign(r.spec.meta||{},t[0]),r}withMutation(t){let r=this._mutate;this._mutate=!0;let n=t(this);return this._mutate=r,n}concat(t){if(!t||t===this)return this;if(t.type!==this.type&&this.type!=="mixed")throw new TypeError(`You cannot \`concat()\` schema's of different types: ${this.type} and ${t.type}`);let r=this,n=t.clone();const a=Object.assign({},r.spec,n.spec);return n.spec=a,n.internalTests=Object.assign({},r.internalTests,n.internalTests),n._whitelist=r._whitelist.merge(t._whitelist,t._blacklist),n._blacklist=r._blacklist.merge(t._blacklist,t._whitelist),n.tests=r.tests,n.exclusiveTests=r.exclusiveTests,n.withMutation(i=>{t.tests.forEach(l=>{i.test(l.OPTIONS)})}),n.transforms=[...r.transforms,...n.transforms],n}isType(t){return t==null?!!(this.spec.nullable&&t===null||this.spec.optional&&t===void 0):this._typeCheck(t)}resolve(t){let r=this;if(r.conditions.length){let n=r.conditions;r=r.clone(),r.conditions=[],r=n.reduce((a,i)=>i.resolve(a,t),r),r=r.resolve(t)}return r}resolveOptions(t){var r,n,a,i;return Object.assign({},t,{from:t.from||[],strict:(r=t.strict)!=null?r:this.spec.strict,abortEarly:(n=t.abortEarly)!=null?n:this.spec.abortEarly,recursive:(a=t.recursive)!=null?a:this.spec.recursive,disableStackTrace:(i=t.disableStackTrace)!=null?i:this.spec.disableStackTrace})}cast(t,r={}){let n=this.resolve(Object.assign({value:t},r)),a=r.assert==="ignore-optionality",i=n._cast(t,r);if(r.assert!==!1&&!n.isType(i)){if(a&&vt(i))return i;let l=ct(t),d=ct(i);throw new TypeError(`The value of ${r.path||"field"} could not be cast to a value that satisfies the schema type: "${n.type}".
10
16
 
11
- attempted value: ${r}
12
- `+(a!==r?`result of cast: ${a}`:""))}return o}_cast(t,e){let i=t===void 0?t:this.transforms.reduce((s,o)=>o.call(this,s,t,this),t);return i===void 0&&(i=this.getDefault(e)),i}_validate(t,e={},i,s){let{path:o,originalValue:r=t,strict:a=this.spec.strict}=e,c=t;a||(c=this._cast(c,Object.assign({assert:!1},e)));let d=[];for(let u of Object.values(this.internalTests))u&&d.push(u);this.runTests({path:o,value:c,originalValue:r,options:e,tests:d},i,u=>{if(u.length)return s(u,c);this.runTests({path:o,value:c,originalValue:r,options:e,tests:this.tests},i,s)})}runTests(t,e,i){let s=!1,{tests:o,value:r,originalValue:a,path:c,options:d}=t,u=g=>{s||(s=!0,e(g,r))},h=g=>{s||(s=!0,i(g,r))},f=o.length,m=[];if(!f)return h([]);let p={value:r,originalValue:a,path:c,options:d,schema:this};for(let g=0;g<o.length;g++){const y=o[g];y(p,u,function(_){_&&(Array.isArray(_)?m.push(..._):m.push(_)),--f<=0&&h(m)})}}asNestedTest({key:t,index:e,parent:i,parentPath:s,originalParent:o,options:r}){const a=t??e;if(a==null)throw TypeError("Must include `key` or `index` for nested validations");const c=typeof a=="number";let d=i[a];const u=Object.assign({},r,{strict:!0,parent:i,value:d,originalValue:o[a],key:void 0,[c?"index":"key"]:a,path:c||a.includes(".")?`${s||""}[${c?a:`"${a}"`}]`:(s?`${s}.`:"")+t});return(h,f,m)=>this.resolve(u)._validate(d,u,f,m)}validate(t,e){var i;let s=this.resolve(Object.assign({},e,{value:t})),o=(i=e==null?void 0:e.disableStackTrace)!=null?i:s.spec.disableStackTrace;return new Promise((r,a)=>s._validate(t,e,(c,d)=>{Bt.isError(c)&&(c.value=d),a(c)},(c,d)=>{c.length?a(new Bt(c,d,void 0,void 0,o)):r(d)}))}validateSync(t,e){var i;let s=this.resolve(Object.assign({},e,{value:t})),o,r=(i=e==null?void 0:e.disableStackTrace)!=null?i:s.spec.disableStackTrace;return s._validate(t,Object.assign({},e,{sync:!0}),(a,c)=>{throw Bt.isError(a)&&(a.value=c),a},(a,c)=>{if(a.length)throw new Bt(a,t,void 0,void 0,r);o=c}),o}isValid(t,e){return this.validate(t,e).then(()=>!0,i=>{if(Bt.isError(i))return!1;throw i})}isValidSync(t,e){try{return this.validateSync(t,e),!0}catch(i){if(Bt.isError(i))return!1;throw i}}_getDefault(t){let e=this.spec.default;return e==null?e:typeof e=="function"?e.call(this,t):fn(e)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,e){const i=this.clone({nullable:t});return i.internalTests.nullable=hn({message:e,name:"nullable",test(s){return s===null?this.schema.spec.nullable:!0}}),i}optionality(t,e){const i=this.clone({optional:t});return i.internalTests.optionality=hn({message:e,name:"optionality",test(s){return s===void 0?this.schema.spec.optional:!0}}),i}optional(){return this.optionality(!0)}defined(t=re.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=re.notNull){return this.nullability(!1,t)}required(t=re.required){return this.clone().withMutation(e=>e.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let e=this.clone();return e.transforms.push(t),e}test(...t){let e;if(t.length===1?typeof t[0]=="function"?e={test:t[0]}:e=t[0]:t.length===2?e={name:t[0],test:t[1]}:e={name:t[0],message:t[1],test:t[2]},e.message===void 0&&(e.message=re.default),typeof e.test!="function")throw new TypeError("`test` is a required parameters");let i=this.clone(),s=hn(e),o=e.exclusive||e.name&&i.exclusiveTests[e.name]===!0;if(e.exclusive&&!e.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return e.name&&(i.exclusiveTests[e.name]=!!e.exclusive),i.tests=i.tests.filter(r=>!(r.OPTIONS.name===e.name&&(o||r.OPTIONS.test===s.OPTIONS.test))),i.tests.push(s),i}when(t,e){!Array.isArray(t)&&typeof t!="string"&&(e=t,t=".");let i=this.clone(),s=Sr(t).map(o=>new Ke(o));return s.forEach(o=>{o.isSibling&&i.deps.push(o.key)}),i.conditions.push(typeof e=="function"?new Bi(s,e):Bi.fromOptions(s,e)),i}typeError(t){let e=this.clone();return e.internalTests.typeError=hn({message:t,name:"typeError",skipAbsent:!0,test(i){return this.schema._typeCheck(i)?!0:this.createError({params:{type:this.schema.type}})}}),e}oneOf(t,e=re.oneOf){let i=this.clone();return t.forEach(s=>{i._whitelist.add(s),i._blacklist.delete(s)}),i.internalTests.whiteList=hn({message:e,name:"oneOf",skipAbsent:!0,test(s){let o=this.schema._whitelist,r=o.resolveAll(this.resolve);return r.includes(s)?!0:this.createError({params:{values:Array.from(o).join(", "),resolved:r}})}}),i}notOneOf(t,e=re.notOneOf){let i=this.clone();return t.forEach(s=>{i._blacklist.add(s),i._whitelist.delete(s)}),i.internalTests.blacklist=hn({message:e,name:"notOneOf",test(s){let o=this.schema._blacklist,r=o.resolveAll(this.resolve);return r.includes(s)?this.createError({params:{values:Array.from(o).join(", "),resolved:r}}):!0}}),i}strip(t=!0){let e=this.clone();return e.spec.strip=t,e}describe(t){const e=(t?this.resolve(t):this).clone(),{label:i,meta:s,optional:o,nullable:r}=e.spec;return{meta:s,label:i,optional:o,nullable:r,default:e.getDefault(t),type:e.type,oneOf:e._whitelist.describe(),notOneOf:e._blacklist.describe(),tests:e.tests.map(c=>({name:c.OPTIONS.name,params:c.OPTIONS.params})).filter((c,d,u)=>u.findIndex(h=>h.name===c.name)===d)}}}ae.prototype.__isYupSchema__=!0;for(const n of["validate","validateSync"])ae.prototype[`${n}At`]=function(t,e,i={}){const{parent:s,parentPath:o,schema:r}=xu(this,t,e,i.context);return r[n](s&&s[o],Object.assign({},i,{parent:s,path:t}))};for(const n of["equals","is"])ae.prototype[n]=ae.prototype.oneOf;for(const n of["not","nope"])ae.prototype[n]=ae.prototype.notOneOf;const ku=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function Su(n){const t=Rs(n);if(!t)return Date.parse?Date.parse(n):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let e=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(e=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(e=0-e)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+e,t.second,t.millisecond)}function Rs(n){var t,e;const i=ku.exec(n);return i?{year:ye(i[1]),month:ye(i[2],1)-1,day:ye(i[3],1),hour:ye(i[4]),minute:ye(i[5]),second:ye(i[6]),millisecond:i[7]?ye(i[7].substring(0,3)):0,precision:(t=(e=i[7])==null?void 0:e.length)!=null?t:void 0,z:i[8]||void 0,plusMinus:i[9]||void 0,hourOffset:ye(i[10]),minuteOffset:ye(i[11])}:null}function ye(n,t=0){return Number(n)||t}let wu=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Eu=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,vu=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Cu="^\\d{4}-\\d{2}-\\d{2}",Ou="\\d{2}:\\d{2}:\\d{2}",Du="(([+-]\\d{2}(:?\\d{2})?)|Z)",Nu=new RegExp(`${Cu}T${Ou}(\\.\\d+)?${Du}$`),Tu=n=>Xe(n)||n===n.trim(),Pu={}.toString();function Ls(){return new Or}class Or extends ae{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,e,i)=>{if(!i.spec.coerce||i.isType(t)||Array.isArray(t))return t;const s=t!=null&&t.toString?t.toString():t;return s===Pu?t:s})})}required(t){return super.required(t).withMutation(e=>e.test({message:t||re.required,name:"required",skipAbsent:!0,test:i=>!!i.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(e=>e.OPTIONS.name!=="required"),t))}length(t,e=$t.length){return this.test({message:e,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(i){return i.length===this.resolve(t)}})}min(t,e=$t.min){return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(i){return i.length>=this.resolve(t)}})}max(t,e=$t.max){return this.test({name:"max",exclusive:!0,message:e,params:{max:t},skipAbsent:!0,test(i){return i.length<=this.resolve(t)}})}matches(t,e){let i=!1,s,o;return e&&(typeof e=="object"?{excludeEmptyString:i=!1,message:s,name:o}=e:s=e),this.test({name:o||"matches",message:s||$t.matches,params:{regex:t},skipAbsent:!0,test:r=>r===""&&i||r.search(t)!==-1})}email(t=$t.email){return this.matches(wu,{name:"email",message:t,excludeEmptyString:!0})}url(t=$t.url){return this.matches(Eu,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=$t.uuid){return this.matches(vu,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let e="",i,s;return t&&(typeof t=="object"?{message:e="",allowOffset:i=!1,precision:s=void 0}=t:e=t),this.matches(Nu,{name:"datetime",message:e||$t.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:e||$t.datetime_offset,params:{allowOffset:i},skipAbsent:!0,test:o=>{if(!o||i)return!0;const r=Rs(o);return r?!!r.z:!1}}).test({name:"datetime_precision",message:e||$t.datetime_precision,params:{precision:s},skipAbsent:!0,test:o=>{if(!o||s==null)return!0;const r=Rs(o);return r?r.precision===s:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=$t.trim){return this.transform(e=>e!=null?e.trim():e).test({message:t,name:"trim",test:Tu})}lowercase(t=$t.lowercase){return this.transform(e=>Xe(e)?e:e.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Xe(e)||e===e.toLowerCase()})}uppercase(t=$t.uppercase){return this.transform(e=>Xe(e)?e:e.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:e=>Xe(e)||e===e.toUpperCase()})}}Ls.prototype=Or.prototype;let Mu=new Date(""),Vu=n=>Object.prototype.toString.call(n)==="[object Date]";class Li extends ae{constructor(){super({type:"date",check(t){return Vu(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,e,i)=>!i.spec.coerce||i.isType(t)||t===null?t:(t=Su(t),isNaN(t)?Li.INVALID_DATE:new Date(t)))})}prepareParam(t,e){let i;if(Ke.isRef(t))i=t;else{let s=this.cast(t);if(!this._typeCheck(s))throw new TypeError(`\`${e}\` must be a Date or a value that can be \`cast()\` to a Date`);i=s}return i}min(t,e=Bs.min){let i=this.prepareParam(t,"min");return this.test({message:e,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(s){return s>=this.resolve(i)}})}max(t,e=Bs.max){let i=this.prepareParam(t,"max");return this.test({message:e,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(s){return s<=this.resolve(i)}})}}Li.INVALID_DATE=Mu,Li.prototype;function Au(n,t=[]){let e=[],i=new Set,s=new Set(t.map(([r,a])=>`${r}-${a}`));function o(r,a){let c=Ye.split(r)[0];i.add(c),s.has(`${a}-${c}`)||e.push([a,c])}for(const r of Object.keys(n)){let a=n[r];i.add(r),Ke.isRef(a)&&a.isSibling?o(a.path,r):$s(a)&&"deps"in a&&a.deps.forEach(c=>o(c,r))}return du.array(Array.from(i),e).reverse()}function Dr(n,t){let e=1/0;return n.some((i,s)=>{var o;if((o=t.path)!=null&&o.includes(i))return e=s,!0}),e}function Nr(n){return(t,e)=>Dr(n,t)-Dr(n,e)}const Fu=(n,t,e)=>{if(typeof n!="string")return n;let i=n;try{i=JSON.parse(n)}catch{}return e.isType(i)?i:n};function Ii(n){if("fields"in n){const t={};for(const[e,i]of Object.entries(n.fields))t[e]=Ii(i);return n.setFields(t)}if(n.type==="array"){const t=n.optional();return t.innerType&&(t.innerType=Ii(t.innerType)),t}return n.type==="tuple"?n.optional().clone({types:n.spec.types.map(Ii)}):"optional"in n?n.optional():n}const Bu=(n,t)=>{const e=[...Ye.normalizePath(t)];if(e.length===1)return e[0]in n;let i=e.pop(),s=Ye.getter(Ye.join(e),!0)(n);return!!(s&&i in s)};let Tr=n=>Object.prototype.toString.call(n)==="[object Object]";function Pr(n,t){let e=Object.keys(n.fields);return Object.keys(t).filter(i=>e.indexOf(i)===-1)}const $u=Nr([]);function Is(n){return new Mr(n)}class Mr extends ae{constructor(t){super({type:"object",check(e){return Tr(e)||typeof e=="function"}}),this.fields=Object.create(null),this._sortErrors=$u,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,e={}){var i;let s=super._cast(t,e);if(s===void 0)return this.getDefault(e);if(!this._typeCheck(s))return s;let o=this.fields,r=(i=e.stripUnknown)!=null?i:this.spec.noUnknown,a=[].concat(this._nodes,Object.keys(s).filter(h=>!this._nodes.includes(h))),c={},d=Object.assign({},e,{parent:c,__validating:e.__validating||!1}),u=!1;for(const h of a){let f=o[h],m=h in s;if(f){let p,g=s[h];d.path=(e.path?`${e.path}.`:"")+h,f=f.resolve({value:g,context:e.context,parent:c});let y=f instanceof ae?f.spec:void 0,b=y==null?void 0:y.strict;if(y!=null&&y.strip){u=u||h in s;continue}p=!e.__validating||!b?f.cast(s[h],d):s[h],p!==void 0&&(c[h]=p)}else m&&!r&&(c[h]=s[h]);(m!==h in c||c[h]!==s[h])&&(u=!0)}return u?c:s}_validate(t,e={},i,s){let{from:o=[],originalValue:r=t,recursive:a=this.spec.recursive}=e;e.from=[{schema:this,value:r},...o],e.__validating=!0,e.originalValue=r,super._validate(t,e,i,(c,d)=>{if(!a||!Tr(d)){s(c,d);return}r=r||d;let u=[];for(let h of this._nodes){let f=this.fields[h];!f||Ke.isRef(f)||u.push(f.asNestedTest({options:e,key:h,parent:d,parentPath:e.path,originalParent:r}))}this.runTests({tests:u,value:d,originalValue:r,options:e},i,h=>{s(h.sort(this._sortErrors).concat(c),d)})})}clone(t){const e=super.clone(t);return e.fields=Object.assign({},this.fields),e._nodes=this._nodes,e._excludedEdges=this._excludedEdges,e._sortErrors=this._sortErrors,e}concat(t){let e=super.concat(t),i=e.fields;for(let[s,o]of Object.entries(this.fields)){const r=i[s];i[s]=r===void 0?o:r}return e.withMutation(s=>s.setFields(i,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let e={};return this._nodes.forEach(i=>{var s;const o=this.fields[i];let r=t;(s=r)!=null&&s.value&&(r=Object.assign({},r,{parent:r.value,value:r.value[i]})),e[i]=o&&"getDefault"in o?o.getDefault(r):void 0}),e}setFields(t,e){let i=this.clone();return i.fields=t,i._nodes=Au(t,e),i._sortErrors=Nr(Object.keys(t)),e&&(i._excludedEdges=e),i}shape(t,e=[]){return this.clone().withMutation(i=>{let s=i._excludedEdges;return e.length&&(Array.isArray(e[0])||(e=[e]),s=[...i._excludedEdges,...e]),i.setFields(Object.assign(i.fields,t),s)})}partial(){const t={};for(const[e,i]of Object.entries(this.fields))t[e]="optional"in i&&i.optional instanceof Function?i.optional():i;return this.setFields(t)}deepPartial(){return Ii(this)}pick(t){const e={};for(const i of t)this.fields[i]&&(e[i]=this.fields[i]);return this.setFields(e,this._excludedEdges.filter(([i,s])=>t.includes(i)&&t.includes(s)))}omit(t){const e=[];for(const i of Object.keys(this.fields))t.includes(i)||e.push(i);return this.pick(e)}from(t,e,i){let s=Ye.getter(t,!0);return this.transform(o=>{if(!o)return o;let r=o;return Bu(o,t)&&(r=Object.assign({},o),i||delete r[t],r[e]=s(o)),r})}json(){return this.transform(Fu)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||Fi.exact,test(e){if(e==null)return!0;const i=Pr(this.schema,e);return i.length===0||this.createError({params:{properties:i.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,e=Fi.noUnknown){typeof t!="boolean"&&(e=t,t=!0);let i=this.test({name:"noUnknown",exclusive:!0,message:e,test(s){if(s==null)return!0;const o=Pr(this.schema,s);return!t||o.length===0||this.createError({params:{unknown:o.join(", ")}})}});return i.spec.noUnknown=t,i}unknown(t=!0,e=Fi.noUnknown){return this.noUnknown(!t,e)}transformKeys(t){return this.transform(e=>{if(!e)return e;const i={};for(const s of Object.keys(e))i[t(s)]=e[s];return i})}camelCase(){return this.transformKeys(Fs.camelCase)}snakeCase(){return this.transformKeys(Fs.snakeCase)}constantCase(){return this.transformKeys(t=>Fs.snakeCase(t).toUpperCase())}describe(t){const e=(t?this.resolve(t):this).clone(),i=super.describe(t);i.fields={};for(const[o,r]of Object.entries(e.fields)){var s;let a=t;(s=a)!=null&&s.value&&(a=Object.assign({},a,{parent:a.value,value:a.value[o]})),i.fields[o]=r.describe(a)}return i}}Is.prototype=Mr.prototype;function js(n,t,e){const i=new qe;let s=l.ref({});const o=l.ref({}),r=l.ref({});let a=l.ref([]);const c=l.ref(null),d=l.ref([]);let u=l.ref([]),h=l.ref(!1);const f=l.ref({});let{handleSubmit:m,errors:p,setErrors:g}=yr();const y=async()=>{var F;try{const P=await i.getEntityRecords(n);P&&P.response&&(s.value=P.response,a.value=(F=P.response.entity.entityDefinition)==null?void 0:F.columns,I(),S(),C())}catch(P){toast.add({severity:"error",summary:"Error",detail:P.errorMessage,life:3e3})}finally{}},b=async()=>{var F;try{const P=await i.getRecord(n,t);P&&P.response&&(s.value=P.response,a.value=(F=P.response.entity.entityDefinition)==null?void 0:F.columns,I(),o.value=JSON.parse(JSON.stringify(P.response.result[0])),C())}catch(P){console.error("Error fetching entity:",P.errorMessage)}finally{}},_=async()=>{var F,P;try{const R=await i.getRelatedEntityRecord(n,t);R&&R.response&&(s.value=R.response,a.value=(P=(F=R.response.entity)==null?void 0:F.entityDefinition)==null?void 0:P.columns,I(),o.value=JSON.parse(JSON.stringify(R.response.result[0])),o.value.entityName&&delete o.value.entityName,o.value.linkedEntities&&delete o.value.linkedEntities,u.value=R.response.result[0].linkedEntities,r.value=JSON.parse(JSON.stringify(o.value)),C())}catch(R){console.error("Error fetching entity:",R.errorMessage)}finally{}},w=async F=>{try{let P=await i.addRecord(n,F);P&&P.response&&e("onSaveDialog",{entityName:n,recordId:t})}catch(P){P.validationErrors&&(d.value=JSON.parse(JSON.stringify(P.validationErrors))),console.error("Error fetching entity:",P.errorMessage)}finally{}},E=async(F,P)=>{try{let R=await i.addRecord(n,P);if(R&&R.response){let W=await i.saveRelatedEntityRecord(n,R.response.recordId,F.linkedEntities);W&&W.response&&e("onSaveDialog",{entityName:n,recordId:t})}}catch(R){R.validationErrors&&(d.value=JSON.parse(JSON.stringify(R.validationErrors))),console.error("Error fetching entity:",R.errorMessage)}finally{}},k=async F=>{try{const P=await i.updateRecord(n,t,F);P&&P.response&&(h.value=!1,r.value=JSON.parse(JSON.stringify(o.value)),e("onSaveDialog",{entityName:n,recordId:t}))}catch(P){P.validationErrors&&(d.value=JSON.parse(JSON.stringify(P.errvalidationErrorsors))),console.error("Error fetching entity:",P.errorMessage)}finally{}},v=async(F,P,R)=>{try{let W=await i.saveRelatedEntityRecord(F,P,R);W&&W.response&&e("onSaveDialog",{entityName:n,enityRecordId:P})}catch(W){W.validationErrors&&(d.value=JSON.parse(JSON.stringify(W.validationErrors))),console.error("Error fetching entity:",W.errorMessage)}finally{}},S=()=>{for(let F=0;F<a.value.length;F++){let P=a.value[F];P.autoGenerated||(o.value[P.name]="")}},x=F=>{let P="";for(let R=0;R<a.value.length;R++){let W=a.value[R];if(F==W.name){P=W.type;break}}return P},O=()=>{const F=a.value.filter(R=>R.autoGenerated).map(R=>R.name);return Object.entries(o.value).filter(([R])=>!F.includes(R)).map(([R,W])=>({recordColumnName:R,recordColumnValue:W,columnType:x(R)}))},M=async(F={})=>{try{await c.value.validate(o.value,{abortEarly:!1}),g({})}catch(R){const W=R.inner.reduce((G,ot)=>(G[ot.path]||(G[ot.path]={messages:[]}),G[ot.path].messages.push(...ot.errors),G),{}),J=Object.entries(W).reduce((G,[ot,nt])=>(G[ot]={messages:nt.messages},G),{});g(J);return}const P={dataDefinitions:O()};t?await k(P):F.relationType=="MANY_TO_ONE"?await E(F,P):await w(P)},C=()=>{c.value=Is().shape(a.value.reduce((F,P)=>(P.autoGenerated||(F[P.name]=Ls().nullable(!1).test({name:"custom-validation",test:function(R){const W=[];let J="";if(P.required&&(!R||R.trim()===""))if(P.validations){J=T(P.validations,"VALIDATE_REQUIRED"),W.push(J);let G=U(P.validations,"VALIDATE_REQUIRED");G&&(G="hint:"+G,W.push(G))}else J=P.displayName+" is required.",W.push(J);else{if(P.maxLength&&R.length>P.maxLength)if(P.validations){J=T(P.validations,"VALIDATE_MAXLENGTH"),W.push(J);let G=U(P.validations,"VALIDATE_MAXLENGTH");G&&(G="hint:"+G,W.push(G))}else J=P.displayName+" cannot exceed from "+P.maxLength+" characters",W.push(J);if(P.regxId&&!new RegExp($(P.validations,"VALIDATE_REGX")).test(R))if(P.validations){J=T(P.validations,"VALIDATE_REGX"),W.push(J);let G=U(P.validations,"VALIDATE_REGX");G&&(G="hint:"+G,W.push(G))}else J=P.displayName+" invalid format.",W.push(J)}return W.length>0?this.createError({message:W}):!0}})),F),{}))},T=(F,P)=>{for(let R=0;R<F.length;R++)if(P==F[R].type)return F[R].message},$=(F,P)=>{for(let R=0;R<F.length;R++)if(P==F[R].type)return F[R].regx},U=(F,P)=>{for(let R=0;R<F.length;R++)if(P==F[R].type)return F[R].hint},H=F=>{g({...p.value,[F]:null}),h.value=!0},B=()=>{h.value=!1;for(let F in o.value)o.value.hasOwnProperty(F)&&g({...p.value,[F]:null});o.value=JSON.parse(JSON.stringify(r.value))},I=()=>{for(let F=0;F<a.value.length;F++){const P=a.value[F];if(P.primaryKey&&P.primaryKey==!0){f.value=P;break}}};return{formData:o,columns:a,errors:p,backendErrors:d,isDataChange:h,linkedEntities:u,primarayKeyColumn:f,clearErrors:H,saveRecord:M,fetchAllRecords:y,fetchRecord:b,getRelatedEntityRecordById:_,cancleRecord:B,saveRelatedEntityRecord:v}}const Ru={key:0,class:"surface-card"},Lu={class:"info"},Iu={key:0,class:"list-none p-0"},Vr={__name:"EntityFormErrors",props:{errors:Array},setup(n){let t=l.ref(!0);const e=()=>{t.value=!t.value};return(i,s)=>{var r;const o=l.resolveComponent("Message");return((r=n.errors)==null?void 0:r.length)>0?(l.openBlock(),l.createElementBlock("div",Ru,[s[1]||(s[1]=l.createElementVNode("h4",{class:"flex-1 font-bold text-red-500"},"Errors",-1)),l.createElementVNode("div",Lu,[l.createElementVNode("span",{onClick:s[0]||(s[0]=a=>e()),class:"cursor-pointer underline showHideColor"},l.toDisplayString(l.unref(t)?"Hide":"Show"),1)]),l.unref(t)?(l.openBlock(),l.createElementBlock("ul",Iu,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.errors,(a,c)=>(l.openBlock(),l.createElementBlock("li",{key:c,class:"mb-2"},[l.createVNode(o,{style:{"word-break":"break-all"},closable:!1,severity:"error"},{default:l.withCtx(()=>[l.createTextVNode(l.toDisplayString(a.message),1)]),_:2},1024)]))),128))])):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)}}},ju={class:"field flex flex-col"},zu=["for"],Wu={key:0,class:"flex items-center"},Hu={key:1},Uu={class:"flex items-center"},Ar={__name:"EntitySelection",props:{modelValue:{required:!0},entityName:{type:String,required:!0},columnName:{type:String,required:!0},relatedEntityColumn:{type:String,required:!0}},emits:["update:modelValue"],setup(n,{emit:t}){const e=n,i=new qe,s=l.ref({});let o=l.ref("");const r=t;l.onMounted(()=>{a()});const a=async()=>{try{const u=await i.getEntityRecords(e.entityName);u&&u.response&&(s.value=u.response,d())}catch{}finally{}},c=()=>{r("update:modelValue",o.value[e.relatedEntityColumn])},d=()=>{for(let u=0;u<s.value.result.length;u++){const h=s.value.result[u];if(h[e.relatedEntityColumn]==e.modelValue){o.value=h;break}}};return(u,h)=>{const f=l.resolveComponent("Select");return l.openBlock(),l.createElementBlock("div",ju,[l.createElementVNode("label",{for:n.columnName},l.toDisplayString(n.columnName),9,zu),l.createVNode(f,{modelValue:l.unref(o),"onUpdate:modelValue":[h[0]||(h[0]=m=>l.isRef(o)?o.value=m:o=m),c],"item-value":n.relatedEntityColumn,options:s.value.result,filter:"",optionLabel:n.relatedEntityColumn,placeholder:"Select "+n.relatedEntityColumn,class:"w-full"},{value:l.withCtx(m=>[m.value?(l.openBlock(),l.createElementBlock("div",Wu,[l.createElementVNode("div",null,l.toDisplayString(m.value[n.relatedEntityColumn]),1)])):(l.openBlock(),l.createElementBlock("span",Hu,l.toDisplayString(m.placeholder),1))]),option:l.withCtx(m=>[l.createElementVNode("div",Uu,[l.createElementVNode("div",null,l.toDisplayString(m.option[n.relatedEntityColumn]),1)])]),_:1},8,["modelValue","item-value","options","optionLabel","placeholder"])])}}},qu={key:0,style:{"font-weight":"700","font-size":"1.25rem"}},Yu={key:1,style:{"font-weight":"700","font-size":"1.25rem"}},Ku={__name:"EntityDialog",props:l.mergeModels({entityName:{type:String,required:!0},recordId:{type:[String,Number],default:null}},{showForm:{},showFormModifiers:{}}),emits:l.mergeModels(["onSaveDialog"],["update:showForm"]),setup(n,{emit:t}){const e=l.useModel(n,"showForm"),i=t,{formData:s,columns:o,errors:r,backendErrors:a,clearErrors:c,saveRecord:d,fetchAllRecords:u,fetchRecord:h}=js(n.entityName,n.recordId,i);return l.onMounted(()=>{n.recordId?h():u()}),(f,m)=>{const p=l.resolveComponent("Button"),g=l.resolveComponent("Dialog");return e.value?(l.openBlock(),l.createBlock(g,{key:0,showFooter:!1,visible:e.value,"onUpdate:visible":m[2]||(m[2]=y=>e.value=y),style:{width:"50rem"},breakpoints:{"1199px":"75vw","575px":"90vw"},modal:!0,class:"p-fluid"},{header:l.withCtx(()=>[n.recordId?(l.openBlock(),l.createElementBlock("span",qu,"Edit "+l.toDisplayString(n.entityName)+" record details",1)):l.createCommentVNode("",!0),n.recordId?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("span",Yu,"Add "+l.toDisplayString(n.entityName)+" record details",1))]),footer:l.withCtx(()=>[l.createVNode(p,{type:"button",icon:"",label:"Cancel",severity:"secondary",onClick:m[0]||(m[0]=y=>e.value=!1)}),l.createVNode(p,{type:"button",icon:"",label:"Save",severity:"success",onClick:m[1]||(m[1]=y=>l.unref(d)())})]),default:l.withCtx(()=>{var y;return[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(o),(b,_)=>{var w;return l.openBlock(),l.createElementBlock("div",{key:_},[!b.autoGenerated&&!b.foreignKey?(l.openBlock(),l.createBlock(Ni,{key:0,modelValue:l.unref(s)[b.name],"onUpdate:modelValue":E=>l.unref(s)[b.name]=E,column:b,errors:(w=l.unref(r)[b.name])==null?void 0:w.messages,onInput:l.unref(c)},null,8,["modelValue","onUpdate:modelValue","column","errors","onInput"])):l.createCommentVNode("",!0),!b.autoGenerated&&b.foreignKey?(l.openBlock(),l.createBlock(Ar,{key:1,modelValue:l.unref(s)[b.name],"onUpdate:modelValue":E=>l.unref(s)[b.name]=E,entityName:b.foreignKey.referencedEntityName,columnName:b.name,relatedEntityColumn:b.foreignKey.referencedColumnName},null,8,["modelValue","onUpdate:modelValue","entityName","columnName","relatedEntityColumn"])):l.createCommentVNode("",!0)])}),128)),((y=l.unref(a))==null?void 0:y.length)>0?(l.openBlock(),l.createBlock(Vr,{key:0,errors:l.unref(a)},null,8,["errors"])):l.createCommentVNode("",!0)]}),_:1},8,["visible"])):l.createCommentVNode("",!0)}}},Xu={__name:"DeleteConfirmationDialog",props:l.mergeModels({entityName:{type:String,required:!0},recordId:{type:[String,Number],default:null}},{showDeleteDialog:{},showDeleteDialogModifiers:{}}),emits:l.mergeModels(["onDeleteItem"],["update:showDeleteDialog"]),setup(n,{emit:t}){const e=new qe,i=l.useModel(n,"showDeleteDialog"),s=t,o=async()=>{try{const r=await e.deleteRecord(n.entityName,n.recordId);r&&r.response&&s("onDeleteItem")}catch(r){console.error("Error deleting record:",r.errorMessage)}finally{}};return(r,a)=>{const c=l.resolveComponent("Button"),d=l.resolveComponent("Dialog");return l.openBlock(),l.createBlock(d,{visible:i.value,"onUpdate:visible":a[1]||(a[1]=u=>i.value=u),style:{width:"450px"},header:"Confirm",modal:!0},{footer:l.withCtx(()=>[l.createVNode(c,{label:"No",icon:"pi pi-times",text:"",onClick:a[0]||(a[0]=u=>i.value=!1)}),l.createVNode(c,{label:"Yes",icon:"pi pi-check",text:"",onClick:o})]),default:l.withCtx(()=>[a[2]||(a[2]=l.createElementVNode("div",{class:"flex items-center justify-center"},[l.createElementVNode("i",{class:"pi pi-exclamation-triangle mr-3",style:{"font-size":"2rem"}}),l.createElementVNode("span",null,"Are you sure you want to delete the selected item?")],-1))]),_:1},8,["visible"])}}};function zs(n){return n==null||n===""||Array.isArray(n)&&n.length===0||!(n instanceof Date)&&typeof n=="object"&&Object.keys(n).length===0}function Fr(n){return!!(n&&n.constructor&&n.call&&n.apply)}function bt(n){return!zs(n)}function mn(n,t=!0){return n instanceof Object&&n.constructor===Object&&(t||Object.keys(n).length!==0)}function Zt(n,...t){return Fr(n)?n(...t):n}function le(n,t=!0){return typeof n=="string"&&(t||n!=="")}function Me(n){return le(n)?n.replace(/(-|_)/g,"").toLowerCase():n}function Br(n,t="",e={}){const i=Me(t).split("."),s=i.shift();return s?mn(n)?Br(Zt(n[Object.keys(n).find(o=>Me(o)===s)||""],e),i.join("."),e):void 0:Zt(n,e)}function Ws(n,t=!0){return Array.isArray(n)&&(t||n.length!==0)}function Gu(n){return bt(n)&&!isNaN(n)}function be(n,t){if(t){const e=t.test(n);return t.lastIndex=0,e}return!1}function Fn(n){return n&&n.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,"").replace(/ {2,}/g," ").replace(/ ([{:}]) /g,"$1").replace(/([;,]) /g,"$1").replace(/ !/g,"!").replace(/: /g,":")}function $r(n){return le(n)?n.replace(/(_)/g,"-").replace(/[A-Z]/g,(t,e)=>e===0?t:"-"+t.toLowerCase()).toLowerCase():n}function Rr(n){return le(n)?n.replace(/[A-Z]/g,(t,e)=>e===0?t:"."+t.toLowerCase()).toLowerCase():n}var pn={STARTS_WITH:"startsWith",CONTAINS:"contains",NOT_CONTAINS:"notContains",ENDS_WITH:"endsWith",EQUALS:"equals",NOT_EQUALS:"notEquals",IN:"in",LESS_THAN:"lt",LESS_THAN_OR_EQUAL_TO:"lte",GREATER_THAN:"gt",GREATER_THAN_OR_EQUAL_TO:"gte",BETWEEN:"between",DATE_IS:"dateIs",DATE_IS_NOT:"dateIsNot",DATE_BEFORE:"dateBefore",DATE_AFTER:"dateAfter"},Qu={AND:"and",OR:"or"};const Ju={key:0},Zu={key:1},Hs={__name:"RecordColumnRenderer",props:{column:Object,value:null},setup(n){const t=l.ref(null),e=Object.assign({"/src/directives/dateFormat.js":()=>Promise.resolve().then(()=>uy),"/src/directives/textFormatUpperCase.js":()=>Promise.resolve().then(()=>hy)});async function i(){await l.nextTick();const s=e[`/src/directives/${n.column.displayFormatKey}.js`];s&&t.value&&s().then(o=>{o.default.beforeMount(t.value,{value:n.value,arg:n.column.displayFormat})})}return l.onMounted(()=>{i()}),l.onUpdated(()=>{i()}),(s,o)=>n.column.displayFormatKey?(l.openBlock(),l.createElementBlock("span",Ju,[l.createElementVNode("span",{ref_key:"el",ref:t},l.toDisplayString(n.value),513)])):(l.openBlock(),l.createElementBlock("span",Zu,l.toDisplayString(n.value),1))}};class th{constructor(){this.httpService=new Zo}async getEntities(){return await this.getAppId(),await this.httpService.get(`/api/app/v1/${this.appId}/entity`)}getEntity(t){}saveEntity(){}async getAppId(){const t=me();this.appId=t.getAppId()}}const Lr=Jo("entitiesStore",{state:()=>({entities:[],entityService:new th}),actions:{async fetchEntities(){try{return await this.entityService.getEntities()}catch(n){console.error("Error fetching entities:",n)}finally{}},async getEntities(){if(this.entities.length===0){const n=await this.fetchEntities();return this.setEntities(n.response),this.entities}else return this.entities},setEntities(n){this.entities=n}},getters:{}}),eh={class:"field flex flex-col w-full"},nh={key:0,class:"flex items-center"},ih={key:1},sh={class:"flex items-center"},oh={__name:"EntityExplorer",props:{entityName:String,onEntityChangeCallback:Function},setup(n){const t=me(),e=l.ref(""),i=Lr(),s=l.ref([]),o=async()=>{s.value=await i.getEntities(),r()},r=()=>{for(let c=0;c<s.value.length;c++){const d=s.value[c];d.name.toLowerCase()==n.entityName.toLowerCase()&&(e.value=d)}},a=()=>{n.onEntityChangeCallback(e.value.name)};return l.watch(()=>t.globalConfigs.appId,async c=>{c&&await o()},{immediate:!0}),(c,d)=>{const u=l.resolveComponent("Select");return l.openBlock(),l.createElementBlock("div",eh,[l.createVNode(u,{modelValue:e.value,"onUpdate:modelValue":[d[0]||(d[0]=h=>e.value=h),a],options:s.value,filter:"",optionLabel:"name",placeholder:"Select entity",class:"w-full"},{value:l.withCtx(h=>[h.value?(l.openBlock(),l.createElementBlock("div",nh,[l.createElementVNode("div",null,l.toDisplayString(h.value.name),1)])):(l.openBlock(),l.createElementBlock("span",ih,l.toDisplayString(h.placeholder),1))]),option:l.withCtx(h=>[l.createElementVNode("div",sh,[l.createElementVNode("div",null,l.toDisplayString(h.option.name),1)])]),_:1},8,["modelValue","options"])])}}},rh={class:"card"},ah={class:"flex flex-row w-1/6"},lh={class:"my-2"},ch={class:"flex flex-col md:flex-row md:justify-between md:items-center"},dh={class:"flex flex-row items-center"},uh={class:"ml-2"},hh={class:"flex flex-row gap-2"},Ir={__name:"Grid",props:{entityName:String},setup(n){const t=me(),e=n,i=Ut.useRoute(),s=l.ref(e.entityName||i.params.entityName),o=l.ref({}),r=l.ref(""),a=l.ref(!1),c=l.ref(!1),{items:d,headers:u,first:h,totalRecords:f,pageSize:m,loading:p,sortBy:g,sortDirection:y,operatorMap:b,filterToSend:_,primarayKeyColumn:w,fullTextSearch:E,listingResponse:k,onFullTextSearch:v,getDatatypeByField:S,getColumnDatatype:x,onSort:O,onPage:M,onFilter:C,fetchEntityFilterData:T,fetchEntityByName:$}=yd(s.value),U=l.ref();let H=l.ref(!1);const B=nt=>{o.value=nt.reduce((Y,st)=>{if(!st.filterable)return Y;let ut=pn.CONTAINS;switch(st.datatype.toLowerCase()){case"string":case"uuid":ut=pn.STARTS_WITH;break;case"date":ut=pn.DATE_IS;break;case"numeric":case"int":case"integer":ut=pn.EQUALS;break;case"bool":case"boolean":ut=pn.EQUALS;break}return st.datatype=="bool"||st.datatype=="boolean"?Y[st.field]={value:null,matchMode:pn.EQUALS}:Y[st.field]={operator:Qu.AND,constraints:[{value:null,matchMode:ut}]},Y},{})},I=()=>{B(u.value),_.value=G(o.value),C()},F=nt=>{_.value=G(o.value),C()},P=nt=>{nt?r.value=nt[w.value.name]:r.value="",a.value=!a.value},R=()=>{a.value=!1,T(!1)},W=nt=>{r.value=nt[w.value.name],c.value=!0},J=()=>{c.value=!1,T(!1)},G=nt=>Object.keys(nt).map(Y=>{const st=nt[Y];return st.constraints?st.constraints.filter(ut=>ut.value!==null&&ut.value!=="").map(ut=>({columnName:Y,operator:b[ut.matchMode]??ut.matchMode,value:ut.value,columnType:S(Y)})):st.value!==null&&st.value!==""?{columnName:Y,operator:b[st.matchMode]??st.matchMode,value:st.value,columnType:S(Y)}:[]}).flat(),ot=nt=>{s.value=nt,$(nt)};return l.watch(()=>t.globalConfigs.appId,async nt=>{nt&&$(s.value)},{immediate:!0}),l.watch(()=>u.value,nt=>{!H.value&&nt&&nt.length&&(B(nt),H.value=!0)},{immediate:!0}),(nt,Y)=>{const st=l.resolveComponent("Button"),ut=l.resolveComponent("Toolbar"),Ue=l.resolveComponent("ProgressSpinner"),Gt=l.resolveComponent("InputIcon"),De=l.resolveComponent("IconField"),fe=l.resolveComponent("Calendar"),j=l.resolveComponent("InputNumber"),A=l.resolveComponent("Checkbox"),rt=l.resolveComponent("Column"),Ht=l.resolveComponent("DataTable");return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",rh,[l.createElementVNode("div",ah,[(l.openBlock(),l.createBlock(oh,{key:s.value,entityName:s.value,onEntityChangeCallback:ot},null,8,["entityName"]))]),l.createVNode(ut,{class:"mb-4 mt-4"},{start:l.withCtx(()=>[l.createElementVNode("div",lh,[l.createVNode(st,{type:"button",icon:"pi pi-filter-slash",label:"Clear",severity:"warning",onClick:Y[0]||(Y[0]=xt=>I())})])]),end:l.withCtx(()=>[l.createVNode(st,{label:"Add",icon:"pi pi-plus",class:"mr-2",severity:"success",onClick:Y[1]||(Y[1]=xt=>P())})]),_:1}),l.createVNode(Ht,{lazy:"",value:l.unref(d),loading:l.unref(p),ref_key:"dt",ref:U,stripedRows:!0,showGridlines:"",rowHover:!0,paginator:!0,rows:l.unref(m),rowsPerPageOptions:[10,25,50,100],totalRecords:l.unref(f),first:l.unref(h),sortField:l.unref(g),sortOrder:l.unref(y),filters:o.value,"onUpdate:filters":Y[5]||(Y[5]=xt=>o.value=xt),filterDisplay:"menu",scrollable:"",scrollHeight:"400px",onSort:l.unref(O),onPage:l.unref(M),onFilter:Y[6]||(Y[6]=xt=>F()),size:"large",paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown",currentPageReportTemplate:"Showing {first} to {last} of {totalRecords} items"},{empty:l.withCtx(()=>Y[9]||(Y[9]=[l.createTextVNode(" No data found. ")])),loading:l.withCtx(()=>[l.createVNode(Ue)]),header:l.withCtx(()=>[l.createElementVNode("div",ch,[l.createElementVNode("div",dh,[Y[10]||(Y[10]=l.createElementVNode("h5",{class:"m-0 text-xl font-semibold"},"Entity Name:",-1)),l.createElementVNode("span",uh,l.toDisplayString(s.value),1)]),l.createVNode(De,{iconPosition:"left",class:"block mt-2 md:mt-0"},{default:l.withCtx(()=>[l.createVNode(Gt,{class:"pi pi-search",onClick:Y[2]||(Y[2]=xt=>l.unref(v)())}),l.createVNode(l.unref(qo.InputText),{class:"w-full sm:w-auto",onKeyup:Y[3]||(Y[3]=l.withKeys(xt=>l.unref(v)(),["enter"])),modelValue:l.unref(E),"onUpdate:modelValue":Y[4]||(Y[4]=xt=>l.isRef(E)?E.value=xt:null),placeholder:"Search..."},null,8,["modelValue"])]),_:1})])]),default:l.withCtx(()=>{var xt;return[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(u),dt=>(l.openBlock(),l.createBlock(rt,{key:dt.field,dataType:l.unref(x)(dt.datatype),field:dt.field,header:dt.name,sortable:dt.sortable,showAddButton:!1,showFilterOperator:!1,style:{"text-wrap":"nowrap"}},l.createSlots({body:l.withCtx(({data:ct})=>[l.createVNode(Hs,{column:dt,value:ct[dt.field]},null,8,["column","value"])]),_:2},[dt.datatype.toLowerCase()==="date"&&dt.filterable?{name:"filter",fn:l.withCtx(({filterModel:ct})=>[l.createVNode(fe,{modelValue:ct.value,"onUpdate:modelValue":Ot=>ct.value=Ot,dateFormat:"mm/dd/yy",placeholder:"mm/dd/yyyy"},null,8,["modelValue","onUpdate:modelValue"])]),key:"0"}:dt.datatype.toLowerCase()==="int"&&dt.filterable?{name:"filter",fn:l.withCtx(({filterModel:ct})=>[l.createVNode(j,{modelValue:ct.value,"onUpdate:modelValue":Ot=>ct.value=Ot,placeholder:"Search..."},null,8,["modelValue","onUpdate:modelValue"])]),key:"1"}:dt.datatype.toLowerCase()==="boolean"&&dt.filterable?{name:"filter",fn:l.withCtx(({filterModel:ct})=>[l.createVNode(A,{modelValue:ct.value,"onUpdate:modelValue":Ot=>ct.value=Ot,indeterminate:ct.value===null,binary:""},null,8,["modelValue","onUpdate:modelValue","indeterminate"])]),key:"2"}:dt.filterable?{name:"filter",fn:l.withCtx(({filterModel:ct})=>[l.createVNode(l.unref(qo.InputText),{style:{width:"150px"},type:"text",modelValue:ct.value,"onUpdate:modelValue":Ot=>ct.value=Ot,class:"p-column-filter",placeholder:"Search..."},null,8,["modelValue","onUpdate:modelValue"])]),key:"3"}:void 0]),1032,["dataType","field","header","sortable"]))),128)),((xt=l.unref(d))==null?void 0:xt.length)>0?(l.openBlock(),l.createBlock(rt,{key:0,header:"Actions"},{body:l.withCtx(({data:dt})=>[l.createElementVNode("div",hh,[l.createVNode(st,{onClick:ct=>P(dt),icon:"pi pi-pencil",severity:"success",size:"",rounded:"","aria-label":"Edit"},null,8,["onClick"]),l.createVNode(st,{onClick:ct=>W(dt),icon:"pi pi-trash",severity:"danger",rounded:"","aria-label":"Delete"},null,8,["onClick"])])]),_:1})):l.createCommentVNode("",!0)]}),_:1},8,["value","loading","rows","totalRecords","first","sortField","sortOrder","filters","onSort","onPage"])]),a.value?(l.openBlock(),l.createBlock(Ku,{key:0,showForm:a.value,"onUpdate:showForm":Y[7]||(Y[7]=xt=>a.value=xt),entityName:l.unref(k).entityName,recordId:r.value,onOnSaveDialog:R},null,8,["showForm","entityName","recordId"])):l.createCommentVNode("",!0),c.value?(l.openBlock(),l.createBlock(Xu,{key:1,showDeleteDialog:c.value,"onUpdate:showDeleteDialog":Y[8]||(Y[8]=xt=>c.value=xt),entityName:l.unref(k).entityName,recordId:r.value,onOnDeleteItem:J},null,8,["showDeleteDialog","entityName","recordId"])):l.createCommentVNode("",!0)],64)}}};function fh(){const n=new Map;return{on(t,e){let i=n.get(t);return i?i.push(e):i=[e],n.set(t,i),this},off(t,e){let i=n.get(t);return i&&i.splice(i.indexOf(e)>>>0,1),this},emit(t,e){let i=n.get(t);i&&i.slice().map(s=>{s(e)})},clear(){n.clear()}}}var mh=Object.defineProperty,ph=Object.defineProperties,gh=Object.getOwnPropertyDescriptors,ji=Object.getOwnPropertySymbols,jr=Object.prototype.hasOwnProperty,zr=Object.prototype.propertyIsEnumerable,Wr=(n,t,e)=>t in n?mh(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,te=(n,t)=>{for(var e in t||(t={}))jr.call(t,e)&&Wr(n,e,t[e]);if(ji)for(var e of ji(t))zr.call(t,e)&&Wr(n,e,t[e]);return n},Us=(n,t)=>ph(n,gh(t)),_e=(n,t)=>{var e={};for(var i in n)jr.call(n,i)&&t.indexOf(i)<0&&(e[i]=n[i]);if(n!=null&&ji)for(var i of ji(n))t.indexOf(i)<0&&zr.call(n,i)&&(e[i]=n[i]);return e},yh=fh(),Ve=yh;function Hr(n,t){Ws(n)?n.push(...t||[]):mn(n)&&Object.assign(n,t)}function bh(n){return mn(n)&&n.hasOwnProperty("value")&&n.hasOwnProperty("type")?n.value:n}function _h(n){return n.replaceAll(/ /g,"").replace(/[^\w]/g,"-")}function qs(n="",t=""){return _h(`${le(n,!1)&&le(t,!1)?`${n}-`:n}${t}`)}function Ur(n="",t=""){return`--${qs(n,t)}`}function xh(n=""){const t=(n.match(/{/g)||[]).length,e=(n.match(/}/g)||[]).length;return(t+e)%2!==0}function qr(n,t="",e="",i=[],s){if(le(n)){const o=/{([^}]*)}/g,r=n.trim();if(xh(r))return;if(be(r,o)){const a=r.replaceAll(o,u=>{const f=u.replace(/{|}/g,"").split(".").filter(m=>!i.some(p=>be(m,p)));return`var(${Ur(e,$r(f.join("-")))}${bt(s)?`, ${s}`:""})`}),c=/(\d+\s+[\+\-\*\/]\s+\d+)/g,d=/var\([^)]+\)/g;return be(a.replace(d,"0"),c)?`calc(${a})`:a}return r}else if(Gu(n))return n}function kh(n,t,e){le(t,!1)&&n.push(`${t}:${e};`)}function gn(n,t){return n?`${n}{${t}}`:""}var Bn=(...n)=>Sh(vt.getTheme(),...n),Sh=(n={},t,e,i)=>{if(t){const{variable:s,options:o}=vt.defaults||{},{prefix:r,transform:a}=(n==null?void 0:n.options)||o||{},d=be(t,/{([^}]*)}/g)?t:`{${t}}`;return i==="value"||zs(i)&&a==="strict"?vt.getTokenValue(t):qr(d,void 0,r,[s.excludedKeyRegex],e)}return""};function wh(n,t={}){const e=vt.defaults.variable,{prefix:i=e.prefix,selector:s=e.selector,excludedKeyRegex:o=e.excludedKeyRegex}=t,r=(d,u="")=>Object.entries(d).reduce((h,[f,m])=>{const p=be(f,o)?qs(u):qs(u,$r(f)),g=bh(m);if(mn(g)){const{variables:y,tokens:b}=r(g,p);Hr(h.tokens,b),Hr(h.variables,y)}else h.tokens.push((i?p.replace(`${i}-`,""):p).replaceAll("-",".")),kh(h.variables,Ur(p),qr(g,p,i,[o]));return h},{variables:[],tokens:[]}),{variables:a,tokens:c}=r(n,i);return{value:a,tokens:c,declarations:a.join(""),css:gn(s,a.join(""))}}var ee={regex:{rules:{class:{pattern:/^\.([a-zA-Z][\w-]*)$/,resolve(n){return{type:"class",selector:n,matched:this.pattern.test(n.trim())}}},attr:{pattern:/^\[(.*)\]$/,resolve(n){return{type:"attr",selector:`:root${n}`,matched:this.pattern.test(n.trim())}}},media:{pattern:/^@media (.*)$/,resolve(n){return{type:"media",selector:`${n}{:root{[CSS]}}`,matched:this.pattern.test(n.trim())}}},system:{pattern:/^system$/,resolve(n){return{type:"system",selector:"@media (prefers-color-scheme: dark){:root{[CSS]}}",matched:this.pattern.test(n.trim())}}},custom:{resolve(n){return{type:"custom",selector:n,matched:!0}}}},resolve(n){const t=Object.keys(this.rules).filter(e=>e!=="custom").map(e=>this.rules[e]);return[n].flat().map(e=>{var i;return(i=t.map(s=>s.resolve(e)).find(s=>s.matched))!=null?i:this.rules.custom.resolve(e)})}},_toVariables(n,t){return wh(n,{prefix:t==null?void 0:t.prefix})},getCommon({name:n="",theme:t={},params:e,set:i,defaults:s}){var o,r,a,c,d,u,h;const{preset:f,options:m}=t;let p,g,y,b,_,w,E;if(bt(f)&&m.transform!=="strict"){const{primitive:k,semantic:v,extend:S}=f,x=v||{},{colorScheme:O}=x,M=_e(x,["colorScheme"]),C=S||{},{colorScheme:T}=C,$=_e(C,["colorScheme"]),U=O||{},{dark:H}=U,B=_e(U,["dark"]),I=T||{},{dark:F}=I,P=_e(I,["dark"]),R=bt(k)?this._toVariables({primitive:k},m):{},W=bt(M)?this._toVariables({semantic:M},m):{},J=bt(B)?this._toVariables({light:B},m):{},G=bt(H)?this._toVariables({dark:H},m):{},ot=bt($)?this._toVariables({semantic:$},m):{},nt=bt(P)?this._toVariables({light:P},m):{},Y=bt(F)?this._toVariables({dark:F},m):{},[st,ut]=[(o=R.declarations)!=null?o:"",R.tokens],[Ue,Gt]=[(r=W.declarations)!=null?r:"",W.tokens||[]],[De,fe]=[(a=J.declarations)!=null?a:"",J.tokens||[]],[j,A]=[(c=G.declarations)!=null?c:"",G.tokens||[]],[rt,Ht]=[(d=ot.declarations)!=null?d:"",ot.tokens||[]],[xt,dt]=[(u=nt.declarations)!=null?u:"",nt.tokens||[]],[ct,Ot]=[(h=Y.declarations)!=null?h:"",Y.tokens||[]];p=this.transformCSS(n,st,"light","variable",m,i,s),g=ut;const Dn=this.transformCSS(n,`${Ue}${De}`,"light","variable",m,i,s),oe=this.transformCSS(n,`${j}`,"dark","variable",m,i,s);y=`${Dn}${oe}`,b=[...new Set([...Gt,...fe,...A])];const ln=this.transformCSS(n,`${rt}${xt}color-scheme:light`,"light","variable",m,i,s),Nn=this.transformCSS(n,`${ct}color-scheme:dark`,"dark","variable",m,i,s);_=`${ln}${Nn}`,w=[...new Set([...Ht,...dt,...Ot])],E=Zt(f.css,{dt:Bn})}return{primitive:{css:p,tokens:g},semantic:{css:y,tokens:b},global:{css:_,tokens:w},style:E}},getPreset({name:n="",preset:t={},options:e,params:i,set:s,defaults:o,selector:r}){var a,c,d;let u,h,f;if(bt(t)&&e.transform!=="strict"){const m=n.replace("-directive",""),p=t,{colorScheme:g,extend:y,css:b}=p,_=_e(p,["colorScheme","extend","css"]),w=y||{},{colorScheme:E}=w,k=_e(w,["colorScheme"]),v=g||{},{dark:S}=v,x=_e(v,["dark"]),O=E||{},{dark:M}=O,C=_e(O,["dark"]),T=bt(_)?this._toVariables({[m]:te(te({},_),k)},e):{},$=bt(x)?this._toVariables({[m]:te(te({},x),C)},e):{},U=bt(S)?this._toVariables({[m]:te(te({},S),M)},e):{},[H,B]=[(a=T.declarations)!=null?a:"",T.tokens||[]],[I,F]=[(c=$.declarations)!=null?c:"",$.tokens||[]],[P,R]=[(d=U.declarations)!=null?d:"",U.tokens||[]],W=this.transformCSS(m,`${H}${I}`,"light","variable",e,s,o,r),J=this.transformCSS(m,P,"dark","variable",e,s,o,r);u=`${W}${J}`,h=[...new Set([...B,...F,...R])],f=Zt(b,{dt:Bn})}return{css:u,tokens:h,style:f}},getPresetC({name:n="",theme:t={},params:e,set:i,defaults:s}){var o;const{preset:r,options:a}=t,c=(o=r==null?void 0:r.components)==null?void 0:o[n];return this.getPreset({name:n,preset:c,options:a,params:e,set:i,defaults:s})},getPresetD({name:n="",theme:t={},params:e,set:i,defaults:s}){var o;const r=n.replace("-directive",""),{preset:a,options:c}=t,d=(o=a==null?void 0:a.directives)==null?void 0:o[r];return this.getPreset({name:r,preset:d,options:c,params:e,set:i,defaults:s})},applyDarkColorScheme(n){return!(n.darkModeSelector==="none"||n.darkModeSelector===!1)},getColorSchemeOption(n,t){var e;return this.applyDarkColorScheme(n)?this.regex.resolve(n.darkModeSelector===!0?t.options.darkModeSelector:(e=n.darkModeSelector)!=null?e:t.options.darkModeSelector):[]},getLayerOrder(n,t={},e,i){const{cssLayer:s}=t;return s?`@layer ${Zt(s.order||"primeui",e)}`:""},getCommonStyleSheet({name:n="",theme:t={},params:e,props:i={},set:s,defaults:o}){const r=this.getCommon({name:n,theme:t,params:e,set:s,defaults:o}),a=Object.entries(i).reduce((c,[d,u])=>c.push(`${d}="${u}"`)&&c,[]).join(" ");return Object.entries(r||{}).reduce((c,[d,u])=>{if(u!=null&&u.css){const h=Fn(u==null?void 0:u.css),f=`${d}-variables`;c.push(`<style type="text/css" data-primevue-style-id="${f}" ${a}>${h}</style>`)}return c},[]).join("")},getStyleSheet({name:n="",theme:t={},params:e,props:i={},set:s,defaults:o}){var r;const a={name:n,theme:t,params:e,set:s,defaults:o},c=(r=n.includes("-directive")?this.getPresetD(a):this.getPresetC(a))==null?void 0:r.css,d=Object.entries(i).reduce((u,[h,f])=>u.push(`${h}="${f}"`)&&u,[]).join(" ");return c?`<style type="text/css" data-primevue-style-id="${n}-variables" ${d}>${Fn(c)}</style>`:""},createTokens(n={},t,e="",i="",s={}){return Object.entries(n).forEach(([o,r])=>{const a=be(o,t.variable.excludedKeyRegex)?e:e?`${e}.${Rr(o)}`:Rr(o),c=i?`${i}.${o}`:o;mn(r)?this.createTokens(r,t,a,c,s):(s[a]||(s[a]={paths:[],computed(d,u={}){var h,f;return this.paths.length===1?(h=this.paths[0])==null?void 0:h.computed(this.paths[0].scheme,u.binding):d&&d!=="none"?(f=this.paths.find(m=>m.scheme===d))==null?void 0:f.computed(d,u.binding):this.paths.map(m=>m.computed(m.scheme,u[m.scheme]))}}),s[a].paths.push({path:c,value:r,scheme:c.includes("colorScheme.light")?"light":c.includes("colorScheme.dark")?"dark":"none",computed(d,u={}){const h=/{([^}]*)}/g;let f=r;if(u.name=this.path,u.binding||(u.binding={}),be(r,h)){const p=r.trim().replaceAll(h,b=>{var _;const w=b.replace(/{|}/g,""),E=(_=s[w])==null?void 0:_.computed(d,u);return Ws(E)&&E.length===2?`light-dark(${E[0].value},${E[1].value})`:E==null?void 0:E.value}),g=/(\d+\w*\s+[\+\-\*\/]\s+\d+\w*)/g,y=/var\([^)]+\)/g;f=be(p.replace(y,"0"),g)?`calc(${p})`:p}return zs(u.binding)&&delete u.binding,{colorScheme:d,path:this.path,paths:u,value:f.includes("undefined")?void 0:f}}}))}),s},getTokenValue(n,t,e){var i;const o=(c=>c.split(".").filter(u=>!be(u.toLowerCase(),e.variable.excludedKeyRegex)).join("."))(t),r=t.includes("colorScheme.light")?"light":t.includes("colorScheme.dark")?"dark":void 0,a=[(i=n[o])==null?void 0:i.computed(r)].flat().filter(c=>c);return a.length===1?a[0].value:a.reduce((c={},d)=>{const u=d,{colorScheme:h}=u,f=_e(u,["colorScheme"]);return c[h]=f,c},void 0)},getSelectorRule(n,t,e,i){return e==="class"||e==="attr"?gn(bt(t)?`${n}${t},${n} ${t}`:n,i):gn(n,bt(t)?gn(t,i):i)},transformCSS(n,t,e,i,s={},o,r,a){if(bt(t)){const{cssLayer:c}=s;if(i!=="style"){const d=this.getColorSchemeOption(s,r);t=e==="dark"?d.reduce((u,{type:h,selector:f})=>(bt(f)&&(u+=f.includes("[CSS]")?f.replace("[CSS]",t):this.getSelectorRule(f,a,h,t)),u),""):gn(a??":root",t)}if(c){const d={name:"primeui",order:"primeui"};mn(c)&&(d.name=Zt(c.name,{name:n,type:i})),bt(d.name)&&(t=gn(`@layer ${d.name}`,t),o==null||o.layerNames(d.name))}return t}return""}},vt={defaults:{variable:{prefix:"p",selector:":root",excludedKeyRegex:/^(primitive|semantic|components|directives|variables|colorscheme|light|dark|common|root|states|extend|css)$/gi},options:{prefix:"p",darkModeSelector:"system",cssLayer:!1}},_theme:void 0,_layerNames:new Set,_loadedStyleNames:new Set,_loadingStyles:new Set,_tokens:{},update(n={}){const{theme:t}=n;t&&(this._theme=Us(te({},t),{options:te(te({},this.defaults.options),t.options)}),this._tokens=ee.createTokens(this.preset,this.defaults),this.clearLoadedStyleNames())},get theme(){return this._theme},get preset(){var n;return((n=this.theme)==null?void 0:n.preset)||{}},get options(){var n;return((n=this.theme)==null?void 0:n.options)||{}},get tokens(){return this._tokens},getTheme(){return this.theme},setTheme(n){this.update({theme:n}),Ve.emit("theme:change",n)},getPreset(){return this.preset},setPreset(n){this._theme=Us(te({},this.theme),{preset:n}),this._tokens=ee.createTokens(n,this.defaults),this.clearLoadedStyleNames(),Ve.emit("preset:change",n),Ve.emit("theme:change",this.theme)},getOptions(){return this.options},setOptions(n){this._theme=Us(te({},this.theme),{options:n}),this.clearLoadedStyleNames(),Ve.emit("options:change",n),Ve.emit("theme:change",this.theme)},getLayerNames(){return[...this._layerNames]},setLayerNames(n){this._layerNames.add(n)},getLoadedStyleNames(){return this._loadedStyleNames},isStyleNameLoaded(n){return this._loadedStyleNames.has(n)},setLoadedStyleName(n){this._loadedStyleNames.add(n)},deleteLoadedStyleName(n){this._loadedStyleNames.delete(n)},clearLoadedStyleNames(){this._loadedStyleNames.clear()},getTokenValue(n){return ee.getTokenValue(this.tokens,n,this.defaults)},getCommon(n="",t){return ee.getCommon({name:n,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getComponent(n="",t){const e={name:n,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return ee.getPresetC(e)},getDirective(n="",t){const e={name:n,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return ee.getPresetD(e)},getCustomPreset(n="",t,e,i){const s={name:n,preset:t,options:this.options,selector:e,params:i,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return ee.getPreset(s)},getLayerOrderCSS(n=""){return ee.getLayerOrder(n,this.options,{names:this.getLayerNames()},this.defaults)},transformCSS(n="",t,e="style",i){return ee.transformCSS(n,t,i,e,this.options,{layerNames:this.setLayerNames.bind(this)},this.defaults)},getCommonStyleSheet(n="",t,e={}){return ee.getCommonStyleSheet({name:n,theme:this.theme,params:t,props:e,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getStyleSheet(n,t,e={}){return ee.getStyleSheet({name:n,theme:this.theme,params:t,props:e,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},onStyleMounted(n){this._loadingStyles.add(n)},onStyleUpdated(n){this._loadingStyles.add(n)},onStyleLoaded(n,{name:t}){this._loadingStyles.size&&(this._loadingStyles.delete(t),Ve.emit(`theme:${t}:load`,n),!this._loadingStyles.size&&Ve.emit("theme:load"))}};function Ys(n){return typeof HTMLElement=="object"?n instanceof HTMLElement:n&&typeof n=="object"&&n!==null&&n.nodeType===1&&typeof n.nodeName=="string"}function Ks(n,t={}){if(Ys(n)){const e=(i,s)=>{var o,r;const a=(o=n==null?void 0:n.$attrs)!=null&&o[i]?[(r=n==null?void 0:n.$attrs)==null?void 0:r[i]]:[];return[s].flat().reduce((c,d)=>{if(d!=null){const u=typeof d;if(u==="string"||u==="number")c.push(d);else if(u==="object"){const h=Array.isArray(d)?e(i,d):Object.entries(d).map(([f,m])=>i==="style"&&(m||m===0)?`${f.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}:${m}`:m?f:void 0);c=h.length?c.concat(h.filter(f=>!!f)):c}}return c},a)};Object.entries(t).forEach(([i,s])=>{if(s!=null){const o=i.match(/^on(.+)/);o?n.addEventListener(o[1].toLowerCase(),s):i==="p-bind"||i==="pBind"?Ks(n,s):(s=i==="class"?[...new Set(e("class",s))].join(" ").trim():i==="style"?e("style",s).join(";").trim():s,(n.$attrs=n.$attrs||{})&&(n.$attrs[i]=s),n.setAttribute(i,s))}})}}function Eh(n,t){return Ys(n)?n.matches(t)?n:n.querySelector(t):null}function vh(n){if(n){let t=n.parentNode;return t&&t instanceof ShadowRoot&&t.host&&(t=t.host),t}return null}function Ch(n){return!!(n!==null&&typeof n<"u"&&n.nodeName&&vh(n))}function Yr(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Oh(n,t="",e){Ys(n)&&e!==null&&e!==void 0&&n.setAttribute(t,e)}var zi={};function Dh(n="pui_id_"){return zi.hasOwnProperty(n)||(zi[n]=0),zi[n]++,`${n}${zi[n]}`}var $n={_loadedStyleNames:new Set,getLoadedStyleNames:function(){return this._loadedStyleNames},isStyleNameLoaded:function(t){return this._loadedStyleNames.has(t)},setLoadedStyleName:function(t){this._loadedStyleNames.add(t)},deleteLoadedStyleName:function(t){this._loadedStyleNames.delete(t)},clearLoadedStyleNames:function(){this._loadedStyleNames.clear()}};function Rn(n){"@babel/helpers - typeof";return Rn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rn(n)}function Kr(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),e.push.apply(e,i)}return e}function Xr(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?Kr(Object(e),!0).forEach(function(i){Nh(n,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):Kr(Object(e)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(e,i))})}return n}function Nh(n,t,e){return(t=Th(t))in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function Th(n){var t=Ph(n,"string");return Rn(t)=="symbol"?t:t+""}function Ph(n,t){if(Rn(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var i=e.call(n,t||"default");if(Rn(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(n)}function Mh(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;l.getCurrentInstance()?l.onMounted(n):t?n():l.nextTick(n)}var Vh=0;function Ah(n){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},e=l.ref(!1),i=l.ref(n),s=l.ref(null),o=Yr()?window.document:void 0,r=t.document,a=r===void 0?o:r,c=t.immediate,d=c===void 0?!0:c,u=t.manual,h=u===void 0?!1:u,f=t.name,m=f===void 0?"style_".concat(++Vh):f,p=t.id,g=p===void 0?void 0:p,y=t.media,b=y===void 0?void 0:y,_=t.nonce,w=_===void 0?void 0:_,E=t.first,k=E===void 0?!1:E,v=t.onMounted,S=v===void 0?void 0:v,x=t.onUpdated,O=x===void 0?void 0:x,M=t.onLoad,C=M===void 0?void 0:M,T=t.props,$=T===void 0?{}:T,U=function(){},H=function(F){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(a){var R=Xr(Xr({},$),P),W=R.name||m,J=R.id||g,G=R.nonce||w;s.value=a.querySelector('style[data-primevue-style-id="'.concat(W,'"]'))||a.getElementById(J)||a.createElement("style"),s.value.isConnected||(i.value=F||n,Ks(s.value,{type:"text/css",id:J,media:b,nonce:G}),k?a.head.prepend(s.value):a.head.appendChild(s.value),Oh(s.value,"data-primevue-style-id",W),Ks(s.value,R),s.value.onload=function(ot){return C==null?void 0:C(ot,{name:W})},S==null||S(W)),!e.value&&(U=l.watch(i,function(ot){s.value.textContent=ot,O==null||O(W)},{immediate:!0}),e.value=!0)}},B=function(){!a||!e.value||(U(),Ch(s.value)&&a.head.removeChild(s.value),e.value=!1)};return d&&!h&&Mh(H),{id:g,name:m,el:s,css:i,unload:B,load:H,isLoaded:l.readonly(e)}}function Ln(n){"@babel/helpers - typeof";return Ln=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ln(n)}function Gr(n,t){return Rh(n)||$h(n,t)||Bh(n,t)||Fh()}function Fh(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
13
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bh(n,t){if(n){if(typeof n=="string")return Qr(n,t);var e={}.toString.call(n).slice(8,-1);return e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set"?Array.from(n):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Qr(n,t):void 0}}function Qr(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,i=Array(t);e<t;e++)i[e]=n[e];return i}function $h(n,t){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var i,s,o,r,a=[],c=!0,d=!1;try{if(o=(e=e.call(n)).next,t!==0)for(;!(c=(i=o.call(e)).done)&&(a.push(i.value),a.length!==t);c=!0);}catch(u){d=!0,s=u}finally{try{if(!c&&e.return!=null&&(r=e.return(),Object(r)!==r))return}finally{if(d)throw s}}return a}}function Rh(n){if(Array.isArray(n))return n}function Jr(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),e.push.apply(e,i)}return e}function Xs(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?Jr(Object(e),!0).forEach(function(i){Lh(n,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):Jr(Object(e)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(e,i))})}return n}function Lh(n,t,e){return(t=Ih(t))in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function Ih(n){var t=jh(n,"string");return Ln(t)=="symbol"?t:t+""}function jh(n,t){if(Ln(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var i=e.call(n,t||"default");if(Ln(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(n)}var zh=function(t){var e=t.dt;return`
14
- *,
15
- ::before,
16
- ::after {
17
- box-sizing: border-box;
18
- }
19
-
20
- /* Non vue overlay animations */
21
- .p-connected-overlay {
22
- opacity: 0;
23
- transform: scaleY(0.8);
24
- transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1),
25
- opacity 0.12s cubic-bezier(0, 0, 0.2, 1);
26
- }
27
-
28
- .p-connected-overlay-visible {
29
- opacity: 1;
30
- transform: scaleY(1);
31
- }
32
-
33
- .p-connected-overlay-hidden {
34
- opacity: 0;
35
- transform: scaleY(1);
36
- transition: opacity 0.1s linear;
37
- }
38
-
39
- /* Vue based overlay animations */
40
- .p-connected-overlay-enter-from {
41
- opacity: 0;
42
- transform: scaleY(0.8);
43
- }
44
-
45
- .p-connected-overlay-leave-to {
46
- opacity: 0;
47
- }
48
-
49
- .p-connected-overlay-enter-active {
50
- transition: transform 0.12s cubic-bezier(0, 0, 0.2, 1),
51
- opacity 0.12s cubic-bezier(0, 0, 0.2, 1);
52
- }
53
-
54
- .p-connected-overlay-leave-active {
55
- transition: opacity 0.1s linear;
56
- }
57
-
58
- /* Toggleable Content */
59
- .p-toggleable-content-enter-from,
60
- .p-toggleable-content-leave-to {
61
- max-height: 0;
62
- }
63
-
64
- .p-toggleable-content-enter-to,
65
- .p-toggleable-content-leave-from {
66
- max-height: 1000px;
67
- }
68
-
69
- .p-toggleable-content-leave-active {
70
- overflow: hidden;
71
- transition: max-height 0.45s cubic-bezier(0, 1, 0, 1);
72
- }
73
-
74
- .p-toggleable-content-enter-active {
75
- overflow: hidden;
76
- transition: max-height 1s ease-in-out;
77
- }
78
-
79
- .p-disabled,
80
- .p-disabled * {
81
- cursor: default;
82
- pointer-events: none;
83
- user-select: none;
84
- }
85
-
86
- .p-disabled,
87
- .p-component:disabled {
88
- opacity: `.concat(e("disabled.opacity"),`;
89
- }
90
-
91
- .pi {
92
- font-size: `).concat(e("icon.size"),`;
93
- }
94
-
95
- .p-icon {
96
- width: `).concat(e("icon.size"),`;
97
- height: `).concat(e("icon.size"),`;
98
- }
99
-
100
- .p-overlay-mask {
101
- background: `).concat(e("mask.background"),`;
102
- color: `).concat(e("mask.color"),`;
103
- position: fixed;
104
- top: 0;
105
- left: 0;
106
- width: 100%;
107
- height: 100%;
108
- }
109
-
110
- .p-overlay-mask-enter {
111
- animation: p-overlay-mask-enter-animation `).concat(e("mask.transition.duration"),` forwards;
112
- }
113
-
114
- .p-overlay-mask-leave {
115
- animation: p-overlay-mask-leave-animation `).concat(e("mask.transition.duration"),` forwards;
116
- }
117
-
118
- @keyframes p-overlay-mask-enter-animation {
119
- from {
120
- background: transparent;
121
- }
122
- to {
123
- background: `).concat(e("mask.background"),`;
124
- }
125
- }
126
- @keyframes p-overlay-mask-leave-animation {
127
- from {
128
- background: `).concat(e("mask.background"),`;
129
- }
130
- to {
131
- background: transparent;
132
- }
133
- }
134
- `)},Wh=function(t){var e=t.dt;return`
135
- .p-hidden-accessible {
136
- border: 0;
137
- clip: rect(0 0 0 0);
138
- height: 1px;
139
- margin: -1px;
140
- overflow: hidden;
141
- padding: 0;
142
- position: absolute;
143
- width: 1px;
144
- }
145
-
146
- .p-hidden-accessible input,
147
- .p-hidden-accessible select {
148
- transform: scale(0);
149
- }
150
-
151
- .p-overflow-hidden {
152
- overflow: hidden;
153
- padding-right: `.concat(e("scrollbar.width"),`;
154
- }
155
- `)},Hh={},Uh={},xe={name:"base",css:Wh,theme:zh,classes:Hh,inlineStyles:Uh,load:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(o){return o},s=i(Zt(t,{dt:Bn}));return bt(s)?Ah(Fn(s),Xs({name:this.name},e)):{}},loadCSS:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.load(this.css,t)},loadTheme:function(){var t=this,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return this.load(this.theme,e,function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return vt.transformCSS(e.name||t.name,"".concat(s).concat(i))})},getCommonTheme:function(t){return vt.getCommon(this.name,t)},getComponentTheme:function(t){return vt.getComponent(this.name,t)},getDirectiveTheme:function(t){return vt.getDirective(this.name,t)},getPresetTheme:function(t,e,i){return vt.getCustomPreset(this.name,t,e,i)},getLayerOrderThemeCSS:function(){return vt.getLayerOrderCSS(this.name)},getStyleSheet:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.css){var i=Zt(this.css,{dt:Bn})||"",s=Fn("".concat(i).concat(t)),o=Object.entries(e).reduce(function(r,a){var c=Gr(a,2),d=c[0],u=c[1];return r.push("".concat(d,'="').concat(u,'"'))&&r},[]).join(" ");return bt(s)?'<style type="text/css" data-primevue-style-id="'.concat(this.name,'" ').concat(o,">").concat(s,"</style>"):""}return""},getCommonThemeStyleSheet:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return vt.getCommonStyleSheet(this.name,t,e)},getThemeStyleSheet:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=[vt.getStyleSheet(this.name,t,e)];if(this.theme){var s=this.name==="base"?"global-style":"".concat(this.name,"-style"),o=Zt(this.theme,{dt:Bn}),r=Fn(vt.transformCSS(s,o)),a=Object.entries(e).reduce(function(c,d){var u=Gr(d,2),h=u[0],f=u[1];return c.push("".concat(h,'="').concat(f,'"'))&&c},[]).join(" ");bt(r)&&i.push('<style type="text/css" data-primevue-style-id="'.concat(s,'" ').concat(a,">").concat(r,"</style>"))}return i.join("")},extend:function(t){return Xs(Xs({},this),{},{css:void 0,theme:void 0},t)}},Zr=xe.extend({name:"common"});function In(n){"@babel/helpers - typeof";return In=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},In(n)}function qh(n){return ia(n)||Yh(n)||ea(n)||ta()}function Yh(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function jn(n,t){return ia(n)||Kh(n,t)||ea(n,t)||ta()}function ta(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
156
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ea(n,t){if(n){if(typeof n=="string")return na(n,t);var e={}.toString.call(n).slice(8,-1);return e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set"?Array.from(n):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?na(n,t):void 0}}function na(n,t){(t==null||t>n.length)&&(t=n.length);for(var e=0,i=Array(t);e<t;e++)i[e]=n[e];return i}function Kh(n,t){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var i,s,o,r,a=[],c=!0,d=!1;try{if(o=(e=e.call(n)).next,t===0){if(Object(e)!==e)return;c=!1}else for(;!(c=(i=o.call(e)).done)&&(a.push(i.value),a.length!==t);c=!0);}catch(u){d=!0,s=u}finally{try{if(!c&&e.return!=null&&(r=e.return(),Object(r)!==r))return}finally{if(d)throw s}}return a}}function ia(n){if(Array.isArray(n))return n}function sa(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),e.push.apply(e,i)}return e}function tt(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?sa(Object(e),!0).forEach(function(i){zn(n,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):sa(Object(e)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(e,i))})}return n}function zn(n,t,e){return(t=Xh(t))in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function Xh(n){var t=Gh(n,"string");return In(t)=="symbol"?t:t+""}function Gh(n,t){if(In(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var i=e.call(n,t||"default");if(In(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(n)}var Qh={name:"BaseComponent",props:{pt:{type:Object,default:void 0},ptOptions:{type:Object,default:void 0},unstyled:{type:Boolean,default:void 0},dt:{type:Object,default:void 0}},inject:{$parentInstance:{default:void 0}},watch:{isUnstyled:{immediate:!0,handler:function(t){t||(this._loadCoreStyles(),this._themeChangeListener(this._loadCoreStyles))}},dt:{immediate:!0,handler:function(t){var e=this;t?(this._loadScopedThemeStyles(t),this._themeChangeListener(function(){return e._loadScopedThemeStyles(t)})):this._unloadScopedThemeStyles()}}},scopedStyleEl:void 0,rootEl:void 0,$attrSelector:void 0,beforeCreate:function(){var t,e,i,s,o,r,a,c,d,u,h,f=(t=this.pt)===null||t===void 0?void 0:t._usept,m=f?(e=this.pt)===null||e===void 0||(e=e.originalValue)===null||e===void 0?void 0:e[this.$.type.name]:void 0,p=f?(i=this.pt)===null||i===void 0||(i=i.value)===null||i===void 0?void 0:i[this.$.type.name]:this.pt;(s=p||m)===null||s===void 0||(s=s.hooks)===null||s===void 0||(o=s.onBeforeCreate)===null||o===void 0||o.call(s);var g=(r=this.$primevueConfig)===null||r===void 0||(r=r.pt)===null||r===void 0?void 0:r._usept,y=g?(a=this.$primevue)===null||a===void 0||(a=a.config)===null||a===void 0||(a=a.pt)===null||a===void 0?void 0:a.originalValue:void 0,b=g?(c=this.$primevue)===null||c===void 0||(c=c.config)===null||c===void 0||(c=c.pt)===null||c===void 0?void 0:c.value:(d=this.$primevue)===null||d===void 0||(d=d.config)===null||d===void 0?void 0:d.pt;(u=b||y)===null||u===void 0||(u=u[this.$.type.name])===null||u===void 0||(u=u.hooks)===null||u===void 0||(h=u.onBeforeCreate)===null||h===void 0||h.call(u),this.$attrSelector=Dh("pc")},created:function(){this._hook("onCreated")},beforeMount:function(){this.rootEl=Eh(this.$el,'[data-pc-name="'.concat(Me(this.$.type.name),'"]')),this.rootEl&&(this.$attrSelector&&!this.rootEl.hasAttribute(this.$attrSelector)&&this.rootEl.setAttribute(this.$attrSelector,""),this.rootEl.$pc=tt({name:this.$.type.name,attrSelector:this.$attrSelector},this.$params)),this._loadStyles(),this._hook("onBeforeMount")},mounted:function(){this._hook("onMounted")},beforeUpdate:function(){this._hook("onBeforeUpdate")},updated:function(){this._hook("onUpdated")},beforeUnmount:function(){this._hook("onBeforeUnmount")},unmounted:function(){this._unloadScopedThemeStyles(),this._hook("onUnmounted")},methods:{_hook:function(t){if(!this.$options.hostName){var e=this._usePT(this._getPT(this.pt,this.$.type.name),this._getOptionValue,"hooks.".concat(t)),i=this._useDefaultPT(this._getOptionValue,"hooks.".concat(t));e==null||e(),i==null||i()}},_mergeProps:function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),s=1;s<e;s++)i[s-1]=arguments[s];return Fr(t)?t.apply(void 0,i):l.mergeProps.apply(void 0,i)},_loadStyles:function(){var t=this,e=function(){$n.isStyleNameLoaded("base")||(xe.loadCSS(t.$styleOptions),t._loadGlobalStyles(),$n.setLoadedStyleName("base")),t._loadThemeStyles()};e(),this._themeChangeListener(e)},_loadCoreStyles:function(){var t,e;!$n.isStyleNameLoaded((t=this.$style)===null||t===void 0?void 0:t.name)&&(e=this.$style)!==null&&e!==void 0&&e.name&&(Zr.loadCSS(this.$styleOptions),this.$options.style&&this.$style.loadCSS(this.$styleOptions),$n.setLoadedStyleName(this.$style.name))},_loadGlobalStyles:function(){var t=this._useGlobalPT(this._getOptionValue,"global.css",this.$params);bt(t)&&xe.load(t,tt({name:"global"},this.$styleOptions))},_loadThemeStyles:function(){var t,e;if(!(this.isUnstyled||this.$theme==="none")){if(!vt.isStyleNameLoaded("common")){var i,s,o=((i=this.$style)===null||i===void 0||(s=i.getCommonTheme)===null||s===void 0?void 0:s.call(i))||{},r=o.primitive,a=o.semantic,c=o.global,d=o.style;xe.load(r==null?void 0:r.css,tt({name:"primitive-variables"},this.$styleOptions)),xe.load(a==null?void 0:a.css,tt({name:"semantic-variables"},this.$styleOptions)),xe.load(c==null?void 0:c.css,tt({name:"global-variables"},this.$styleOptions)),xe.loadTheme(tt({name:"global-style"},this.$styleOptions),d),vt.setLoadedStyleName("common")}if(!vt.isStyleNameLoaded((t=this.$style)===null||t===void 0?void 0:t.name)&&(e=this.$style)!==null&&e!==void 0&&e.name){var u,h,f,m,p=((u=this.$style)===null||u===void 0||(h=u.getComponentTheme)===null||h===void 0?void 0:h.call(u))||{},g=p.css,y=p.style;(f=this.$style)===null||f===void 0||f.load(g,tt({name:"".concat(this.$style.name,"-variables")},this.$styleOptions)),(m=this.$style)===null||m===void 0||m.loadTheme(tt({name:"".concat(this.$style.name,"-style")},this.$styleOptions),y),vt.setLoadedStyleName(this.$style.name)}if(!vt.isStyleNameLoaded("layer-order")){var b,_,w=(b=this.$style)===null||b===void 0||(_=b.getLayerOrderThemeCSS)===null||_===void 0?void 0:_.call(b);xe.load(w,tt({name:"layer-order",first:!0},this.$styleOptions)),vt.setLoadedStyleName("layer-order")}}},_loadScopedThemeStyles:function(t){var e,i,s,o=((e=this.$style)===null||e===void 0||(i=e.getPresetTheme)===null||i===void 0?void 0:i.call(e,t,"[".concat(this.$attrSelector,"]")))||{},r=o.css,a=(s=this.$style)===null||s===void 0?void 0:s.load(r,tt({name:"".concat(this.$attrSelector,"-").concat(this.$style.name)},this.$styleOptions));this.scopedStyleEl=a.el},_unloadScopedThemeStyles:function(){var t;(t=this.scopedStyleEl)===null||t===void 0||(t=t.value)===null||t===void 0||t.remove()},_themeChangeListener:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(){};$n.clearLoadedStyleNames(),Ve.on("theme:change",t)},_getHostInstance:function(t){return t?this.$options.hostName?t.$.type.name===this.$options.hostName?t:this._getHostInstance(t.$parentInstance):t.$parentInstance:void 0},_getPropValue:function(t){var e;return this[t]||((e=this._getHostInstance(this))===null||e===void 0?void 0:e[t])},_getOptionValue:function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Br(t,e,i)},_getPTValue:function(){var t,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,r=/./g.test(i)&&!!s[i.split(".")[0]],a=this._getPropValue("ptOptions")||((t=this.$primevueConfig)===null||t===void 0?void 0:t.ptOptions)||{},c=a.mergeSections,d=c===void 0?!0:c,u=a.mergeProps,h=u===void 0?!1:u,f=o?r?this._useGlobalPT(this._getPTClassValue,i,s):this._useDefaultPT(this._getPTClassValue,i,s):void 0,m=r?void 0:this._getPTSelf(e,this._getPTClassValue,i,tt(tt({},s),{},{global:f||{}})),p=this._getPTDatasets(i);return d||!d&&m?h?this._mergeProps(h,f,m,p):tt(tt(tt({},f),m),p):tt(tt({},m),p)},_getPTSelf:function(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length,i=new Array(e>1?e-1:0),s=1;s<e;s++)i[s-1]=arguments[s];return l.mergeProps(this._usePT.apply(this,[this._getPT(t,this.$name)].concat(i)),this._usePT.apply(this,[this.$_attrsPT].concat(i)))},_getPTDatasets:function(){var t,e,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",s="data-pc-",o=i==="root"&&bt((t=this.pt)===null||t===void 0?void 0:t["data-pc-section"]);return i!=="transition"&&tt(tt({},i==="root"&&tt(tt(zn({},"".concat(s,"name"),Me(o?(e=this.pt)===null||e===void 0?void 0:e["data-pc-section"]:this.$.type.name)),o&&zn({},"".concat(s,"extend"),Me(this.$.type.name))),Yr()&&zn({},"".concat(this.$attrSelector),""))),{},zn({},"".concat(s,"section"),Me(i)))},_getPTClassValue:function(){var t=this._getOptionValue.apply(this,arguments);return le(t)||Ws(t)?{class:t}:t},_getPT:function(t){var e=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=arguments.length>2?arguments[2]:void 0,o=function(a){var c,d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,u=s?s(a):a,h=Me(i),f=Me(e.$name);return(c=d?h!==f?u==null?void 0:u[h]:void 0:u==null?void 0:u[h])!==null&&c!==void 0?c:u};return t!=null&&t.hasOwnProperty("_usept")?{_usept:t._usept,originalValue:o(t.originalValue),value:o(t.value)}:o(t,!0)},_usePT:function(t,e,i,s){var o=function(g){return e(g,i,s)};if(t!=null&&t.hasOwnProperty("_usept")){var r,a=t._usept||((r=this.$primevueConfig)===null||r===void 0?void 0:r.ptOptions)||{},c=a.mergeSections,d=c===void 0?!0:c,u=a.mergeProps,h=u===void 0?!1:u,f=o(t.originalValue),m=o(t.value);return f===void 0&&m===void 0?void 0:le(m)?m:le(f)?f:d||!d&&m?h?this._mergeProps(h,f,m):tt(tt({},f),m):m}return o(t)},_useGlobalPT:function(t,e,i){return this._usePT(this.globalPT,t,e,i)},_useDefaultPT:function(t,e,i){return this._usePT(this.defaultPT,t,e,i)},ptm:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this._getPTValue(this.pt,t,tt(tt({},this.$params),e))},ptmi:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return l.mergeProps(this.$_attrsWithoutPT,this.ptm(t,e))},ptmo:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this._getPTValue(t,e,tt({instance:this},i),!1)},cx:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.isUnstyled?void 0:this._getOptionValue(this.$style.classes,t,tt(tt({},this.$params),e))},sx:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(e){var s=this._getOptionValue(this.$style.inlineStyles,t,tt(tt({},this.$params),i)),o=this._getOptionValue(Zr.inlineStyles,t,tt(tt({},this.$params),i));return[o,s]}}},computed:{globalPT:function(){var t,e=this;return this._getPT((t=this.$primevueConfig)===null||t===void 0?void 0:t.pt,void 0,function(i){return Zt(i,{instance:e})})},defaultPT:function(){var t,e=this;return this._getPT((t=this.$primevueConfig)===null||t===void 0?void 0:t.pt,void 0,function(i){return e._getOptionValue(i,e.$name,tt({},e.$params))||Zt(i,tt({},e.$params))})},isUnstyled:function(){var t;return this.unstyled!==void 0?this.unstyled:(t=this.$primevueConfig)===null||t===void 0?void 0:t.unstyled},$inProps:function(){var t,e=Object.keys(((t=this.$.vnode)===null||t===void 0?void 0:t.props)||{});return Object.fromEntries(Object.entries(this.$props).filter(function(i){var s=jn(i,1),o=s[0];return e==null?void 0:e.includes(o)}))},$theme:function(){var t;return(t=this.$primevueConfig)===null||t===void 0?void 0:t.theme},$style:function(){return tt(tt({classes:void 0,inlineStyles:void 0,load:function(){},loadCSS:function(){},loadTheme:function(){}},(this._getHostInstance(this)||{}).$style),this.$options.style)},$styleOptions:function(){var t;return{nonce:(t=this.$primevueConfig)===null||t===void 0||(t=t.csp)===null||t===void 0?void 0:t.nonce}},$primevueConfig:function(){var t;return(t=this.$primevue)===null||t===void 0?void 0:t.config},$name:function(){return this.$options.hostName||this.$.type.name},$params:function(){var t=this._getHostInstance(this)||this.$parent;return{instance:this,props:this.$props,state:this.$data,attrs:this.$attrs,parent:{instance:t,props:t==null?void 0:t.$props,state:t==null?void 0:t.$data,attrs:t==null?void 0:t.$attrs}}},$_attrsPT:function(){return Object.entries(this.$attrs||{}).filter(function(t){var e=jn(t,1),i=e[0];return i==null?void 0:i.startsWith("pt:")}).reduce(function(t,e){var i=jn(e,2),s=i[0],o=i[1],r=s.split(":"),a=qh(r),c=a.slice(1);return c==null||c.reduce(function(d,u,h,f){return!d[u]&&(d[u]=h===f.length-1?o:{}),d[u]},t),t},{})},$_attrsWithoutPT:function(){return Object.entries(this.$attrs||{}).filter(function(t){var e=jn(t,1),i=e[0];return!(i!=null&&i.startsWith("pt:"))}).reduce(function(t,e){var i=jn(e,2),s=i[0],o=i[1];return t[s]=o,t},{})}}},Jh={root:{position:"relative"}},Zh={root:"p-chart"},tf=xe.extend({name:"chart",classes:Zh,inlineStyles:Jh}),ef={name:"BaseChart",extends:Qh,props:{type:String,data:null,options:null,plugins:null,width:{type:Number,default:300},height:{type:Number,default:150},canvasProps:{type:null,default:null}},style:tf,provide:function(){return{$pcChart:this,$parentInstance:this}}},oa={name:"Chart",extends:ef,inheritAttrs:!1,emits:["select","loaded"],chart:null,watch:{data:{handler:function(){this.reinit()},deep:!0},type:function(){this.reinit()},options:function(){this.reinit()}},mounted:function(){this.initChart()},beforeUnmount:function(){this.chart&&(this.chart.destroy(),this.chart=null)},methods:{initChart:function(){var t=this;Promise.resolve().then(()=>ek).then(function(e){t.chart&&(t.chart.destroy(),t.chart=null),e&&e.default&&(t.chart=new e.default(t.$refs.canvas,{type:t.type,data:t.data,options:t.options,plugins:t.plugins})),t.$emit("loaded",t.chart)})},getCanvas:function(){return this.$canvas},getChart:function(){return this.chart},getBase64Image:function(){return this.chart.toBase64Image()},refresh:function(){this.chart&&this.chart.update()},reinit:function(){this.initChart()},onCanvasClick:function(t){if(this.chart){var e=this.chart.getElementsAtEventForMode(t,"nearest",{intersect:!0},!1),i=this.chart.getElementsAtEventForMode(t,"dataset",{intersect:!0},!1);e&&e[0]&&i&&this.$emit("select",{originalEvent:t,element:e[0],dataset:i})}},generateLegend:function(){if(this.chart)return this.chart.generateLegend()}}};function Wn(n){"@babel/helpers - typeof";return Wn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wn(n)}function ra(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);t&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),e.push.apply(e,i)}return e}function aa(n){for(var t=1;t<arguments.length;t++){var e=arguments[t]!=null?arguments[t]:{};t%2?ra(Object(e),!0).forEach(function(i){nf(n,i,e[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):ra(Object(e)).forEach(function(i){Object.defineProperty(n,i,Object.getOwnPropertyDescriptor(e,i))})}return n}function nf(n,t,e){return(t=sf(t))in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function sf(n){var t=of(n,"string");return Wn(t)=="symbol"?t:t+""}function of(n,t){if(Wn(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var i=e.call(n,t||"default");if(Wn(i)!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(n)}var rf=["width","height"];function af(n,t,e,i,s,o){return l.openBlock(),l.createElementBlock("div",l.mergeProps({class:n.cx("root"),style:n.sx("root")},n.ptmi("root")),[l.createElementVNode("canvas",l.mergeProps({ref:"canvas",width:n.width,height:n.height,onClick:t[0]||(t[0]=function(r){return o.onCanvasClick(r)})},aa(aa({},n.canvasProps),n.ptm("canvas"))),null,16,rf)],16)}oa.render=af;function lf(){const n={primary:"#0efcf1",primaryBorder:"#388E3C",secondary:"#0ec6fc",secondaryBorder:"#FBC02D",tertiary:"#f1fc0e",tertiaryBorder:"#FFA000"},t=["linear","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInBounce","easeOutBounce","easeInOutBounce","easeInOutElastic"],e=l.ref("easeInOutElastic"),i=l.computed(()=>({responsive:!0,maintainAspectRatio:!0,plugins:{legend:{position:"top",labels:{font:{size:16}}},tooltip:{enabled:!0,titleFont:{size:14},bodyFont:{size:12}},zoom:{zoom:{wheel:{enabled:!0},drag:{enabled:!0},mode:"xy"},pan:{enabled:!0,mode:"xy"}}},scales:{x:{grid:{display:!1},ticks:{font:{size:14}}},y:{grid:{display:!0,color:"#e0e0e0"},ticks:{font:{size:14}}}},animation:{duration:2e3,easing:e.value,delay:500,loop:!1,animateRotate:!0,animateScale:!0},elements:{point:{radius:6,hoverRadius:10,backgroundColor:n.secondary},line:{tension:.4,borderWidth:2},bar:{borderWidth:2,borderRadius:4}}}));return{colorConfig:n,animationOptions:t,selectedAnimation:e,defaultChartOptions:i}}const cf={components:{Chart:oa},props:{type:{type:String,required:!0},chartData:{type:Object,required:!0},chartOptions:{type:Object,default:()=>({})}},setup(n){const{colorConfig:t,defaultChartOptions:e}=lf(),i=l.computed(()=>{const o=n.chartData.datasets.map((r,a)=>{const c=Object.values(t);return{...r,backgroundColor:c[a%c.length],borderColor:c[a%c.length+1]}});return{...n.chartData,datasets:o}}),s=l.computed(()=>({...e.value,maintainAspectRatio:!0,...n.chartOptions}));return{computedChartData:i,computedChartOptions:s}}},df={class:"chart-container"},uf={key:0},hf={key:1};function ff(n,t,e,i,s,o){const r=l.resolveComponent("Chart",!0);return l.openBlock(),l.createElementBlock("div",df,[e.chartData?(l.openBlock(),l.createElementBlock("div",uf,[l.createVNode(r,{type:e.type,data:i.computedChartData,options:i.computedChartOptions},null,8,["type","data","options"])])):(l.openBlock(),l.createElementBlock("div",hf,t[0]||(t[0]=[l.createElementVNode("p",null,"No data available for the chart.",-1)])))])}const Hn=jt(cf,[["render",ff],["__scopeId","data-v-8e3e786b"]]);function Un(){const n=l.ref(null),t=l.ref(!1),e=l.ref(null);return{chartData:n,fetchChartData:async({entityName:s,xaxis:o=null,yaxis:r=null})=>{t.value=!0,e.value=null;const a="https://mocki.io/v1/1ab17035-c115-4049-8ebf-a1e1b92d739a";try{const d=await(await fetch(a)).json();if(!d||!d.response||!d.response.result)throw new Error("Invalid data structure from API.");const u=d.response.result;if(!o&&!r){const h=Object.keys(u[0]);o=h[1],r=h.slice(4);const f=u.reduce((g,y)=>(r.forEach(b=>{g[b]||(g[b]=0),g[b]+=y[b]||0}),g),{}),m=Object.keys(f),p=Object.values(f);n.value={labels:m,datasets:[{label:"Default Data",data:p,borderWidth:1}]}}else{const h=u.map(p=>p[o]),m=(Array.isArray(r)?r:[r]).map(p=>({label:p,data:u.map(g=>g[p]||0),borderWidth:1}));n.value={labels:h,datasets:m}}}catch(c){e.value=c.message,n.value=null}finally{t.value=!1}},loading:t,error:e}}const mf={components:{chart:Hn},props:{entityName:{type:String,required:!0},title:{type:String,default:"Bar Chart"},yaxis:{type:String,required:!0},xaxis:{type:String,required:!0}},setup(n){const{chartData:t,fetchChartData:e,loading:i,error:s}=Un(),o=l.ref({responsive:!0,plugins:{legend:{position:"top"},tooltip:{callbacks:{label:function(a){return`${a.dataset.label}: ${a.raw}`}}}}}),r=async()=>{if(!n.yaxis||!n.xaxis){console.error("xaxis or yaxis is not defined."),s.value="x-axis or y-axis is not properly configured.";return}await e({entityName:n.entityName,yaxis:n.yaxis,xaxis:n.xaxis})};return l.onMounted(()=>{console.log("Fetching data for yAxis:",n.yaxis),console.log("Fetching data for xAxis:",n.xaxis),r()}),{chartData:t,chartOptions:o,loading:i,error:s}}},pf={key:0,class:"chart-container"},gf={key:1},yf={key:0},bf={key:1},_f={key:2};function xf(n,t,e,i,s,o){const r=l.resolveComponent("chart");return l.openBlock(),l.createElementBlock("div",null,[l.createElementVNode("div",null,[l.createElementVNode("h2",null,"Entity name: "+l.toDisplayString(e.entityName),1)]),i.chartData?(l.openBlock(),l.createElementBlock("div",pf,[l.createElementVNode("h3",null,l.toDisplayString(e.title)+" , x-axis : "+l.toDisplayString(e.xaxis)+" , y-axis : "+l.toDisplayString(e.yaxis),1),l.createVNode(r,{type:"bar",chartData:i.chartData,chartOptions:i.chartOptions},null,8,["chartData","chartOptions"])])):(l.openBlock(),l.createElementBlock("div",gf,[i.loading?(l.openBlock(),l.createElementBlock("p",yf,"Loading chart data...")):i.error?(l.openBlock(),l.createElementBlock("p",bf,l.toDisplayString(i.error),1)):(l.openBlock(),l.createElementBlock("p",_f,"No data available for the chart."))]))])}const la=jt(mf,[["render",xf],["__scopeId","data-v-67577a46"]]),kf={components:{chart:Hn},props:{entityName:{type:String,required:!0},title:{type:String,default:"Bar Chart"},yaxis:{type:String,required:!0},xaxis:{type:String,required:!0}},setup(n){const{chartData:t,fetchChartData:e,loading:i,error:s}=Un(),o=l.ref({responsive:!0,plugins:{legend:{position:"top"},tooltip:{callbacks:{label:function(a){return`${a.dataset.label}: ${a.raw}`}}}}}),r=async()=>{if(!n.yaxis||!n.xaxis){console.error("xaxis or yaxis is not defined."),s.value="x-axis or y-axis is not properly configured.";return}await e({entityName:n.entityName,yaxis:n.yaxis,xaxis:n.xaxis})};return l.onMounted(()=>{console.log("Fetching data for yAxis:",n.yaxis),console.log("Fetching data for xAxis:",n.xaxis),r()}),{chartData:t,chartOptions:o,loading:i,error:s}}},Sf={key:0,class:"chart-container"},wf={key:1},Ef={key:0},vf={key:1},Cf={key:2};function Of(n,t,e,i,s,o){const r=l.resolveComponent("chart");return l.openBlock(),l.createElementBlock("div",null,[l.createElementVNode("div",null,[l.createElementVNode("h2",null,"Entity name: "+l.toDisplayString(e.entityName),1)]),i.chartData?(l.openBlock(),l.createElementBlock("div",Sf,[l.createElementVNode("h3",null,l.toDisplayString(e.title)+" , x-axis : "+l.toDisplayString(e.xaxis)+" , y-axis : "+l.toDisplayString(e.yaxis),1),l.createVNode(r,{type:"line",chartData:i.chartData,chartOptions:i.chartOptions},null,8,["chartData","chartOptions"])])):(l.openBlock(),l.createElementBlock("div",wf,[i.loading?(l.openBlock(),l.createElementBlock("p",Ef,"Loading chart data...")):i.error?(l.openBlock(),l.createElementBlock("p",vf,l.toDisplayString(i.error),1)):(l.openBlock(),l.createElementBlock("p",Cf,"No data available for the chart."))]))])}const ca=jt(kf,[["render",Of],["__scopeId","data-v-2cfe3d4d"]]),Df={components:{chart:Hn},props:{entityName:{type:String,required:!0},title:{type:String,default:"Pie Chart"},yaxis:{type:String,default:null},xaxis:{type:String,default:null}},setup(n){const{chartData:t,fetchChartData:e,loading:i,error:s}=Un(),o=l.ref({responsive:!0,plugins:{legend:{position:"top"},tooltip:{callbacks:{label:function(a){return`${a.label}: ${a.raw}`}}}}}),r=async()=>{await e({entityName:n.entityName,xaxis:n.xaxis,yaxis:n.yaxis})};return l.onMounted(()=>{r()}),{chartData:t,chartOptions:o,loading:i,error:s}}},Nf={key:0,class:"chart-container"},Tf={key:1},Pf={key:0},Mf={key:1},Vf={key:2};function Af(n,t,e,i,s,o){const r=l.resolveComponent("chart");return l.openBlock(),l.createElementBlock("div",null,[l.createElementVNode("div",null,[l.createElementVNode("h2",null,"Entity name: "+l.toDisplayString(e.entityName),1)]),i.chartData?(l.openBlock(),l.createElementBlock("div",Nf,[l.createElementVNode("h3",null,l.toDisplayString(e.title),1),l.createVNode(r,{type:"pie",chartData:i.chartData,chartOptions:i.chartOptions},null,8,["chartData","chartOptions"])])):(l.openBlock(),l.createElementBlock("div",Tf,[i.loading?(l.openBlock(),l.createElementBlock("p",Pf,"Loading chart data...")):i.error?(l.openBlock(),l.createElementBlock("p",Mf,l.toDisplayString(i.error),1)):(l.openBlock(),l.createElementBlock("p",Vf,"No data available for the chart."))]))])}const da=jt(Df,[["render",Af],["__scopeId","data-v-27f5ea01"]]),Ff={components:{chart:Hn},props:{entityName:{type:String,required:!0},title:{type:String,default:"Pie Chart"},yaxis:{type:String,default:null},xaxis:{type:String,default:null}},setup(n){const{chartData:t,fetchChartData:e,loading:i,error:s}=Un(),o=l.ref({responsive:!0,plugins:{legend:{position:"top"},tooltip:{callbacks:{label:function(a){return`${a.label}: ${a.raw}`}}}}}),r=async()=>{await e({entityName:n.entityName,xaxis:n.xaxis,yaxis:n.yaxis})};return l.onMounted(()=>{r()}),{chartData:t,chartOptions:o,loading:i,error:s}}},Bf={key:0,class:"chart-container"},$f={key:1},Rf={key:0},Lf={key:1},If={key:2};function jf(n,t,e,i,s,o){const r=l.resolveComponent("chart");return l.openBlock(),l.createElementBlock("div",null,[l.createElementVNode("div",null,[l.createElementVNode("h2",null,"Entity name: "+l.toDisplayString(e.entityName),1)]),i.chartData?(l.openBlock(),l.createElementBlock("div",Bf,[l.createElementVNode("h3",null,l.toDisplayString(e.title),1),l.createVNode(r,{type:"polarArea",chartData:i.chartData,chartOptions:i.chartOptions},null,8,["chartData","chartOptions"])])):(l.openBlock(),l.createElementBlock("div",$f,[i.loading?(l.openBlock(),l.createElementBlock("p",Rf,"Loading chart data...")):i.error?(l.openBlock(),l.createElementBlock("p",Lf,l.toDisplayString(i.error),1)):(l.openBlock(),l.createElementBlock("p",If,"No data available for the chart."))]))])}const ua=jt(Ff,[["render",jf],["__scopeId","data-v-941f0d0a"]]),zf={components:{chart:Hn},props:{entityName:{type:String,required:!0},title:{type:String,default:"Bar Chart"},yaxis:{type:String,required:!0},xaxis:{type:String,required:!0}},setup(n){const{chartData:t,fetchChartData:e,loading:i,error:s}=Un(),o=l.ref({responsive:!0,plugins:{legend:{position:"top"},tooltip:{callbacks:{label:function(a){return`${a.dataset.label}: ${a.raw}`}}}}}),r=async()=>{if(!n.yaxis||!n.xaxis){console.error("xaxis or yaxis is not defined."),s.value="x-axis or y-axis is not properly configured.";return}await e({entityName:n.entityName,yaxis:n.yaxis,xaxis:n.xaxis})};return l.onMounted(()=>{console.log("Fetching data for yAxis:",n.yaxis),console.log("Fetching data for xAxis:",n.xaxis),r()}),{chartData:t,chartOptions:o,loading:i,error:s}}},Wf={key:0,class:"chart-container"},Hf={key:1},Uf={key:0},qf={key:1},Yf={key:2};function Kf(n,t,e,i,s,o){const r=l.resolveComponent("chart");return l.openBlock(),l.createElementBlock("div",null,[l.createElementVNode("div",null,[l.createElementVNode("h2",null,"Entity name: "+l.toDisplayString(e.entityName),1)]),i.chartData?(l.openBlock(),l.createElementBlock("div",Wf,[l.createElementVNode("h3",null,l.toDisplayString(e.title)+" , x-axis : "+l.toDisplayString(e.xaxis)+" , y-axis : "+l.toDisplayString(e.yaxis),1),l.createVNode(r,{type:"radar",chartData:i.chartData,chartOptions:i.chartOptions},null,8,["chartData","chartOptions"])])):(l.openBlock(),l.createElementBlock("div",Hf,[i.loading?(l.openBlock(),l.createElementBlock("p",Uf,"Loading chart data...")):i.error?(l.openBlock(),l.createElementBlock("p",qf,l.toDisplayString(i.error),1)):(l.openBlock(),l.createElementBlock("p",Yf,"No data available for the chart."))]))])}const ha=jt(zf,[["render",Kf],["__scopeId","data-v-80750171"]]),Xf={class:"flex flex-col p-3"},Gf={class:"flex justify-center flex-row mb-2 cursor-pointer"},Qf={style:{"word-break":"break-all"}},Jf={__name:"LinkEntityContent",props:{linkEntityListItem:{type:Object,required:!0}},setup(n){Ut.useRoute();const t=me(),e=l.ref("");t.getAppId()!=null&&t.getAppId()!=""&&(e.value=t.getAppId());const i=l.ref(),s=l.ref(!1),o=l.ref(!1),r=l.ref({}),a=l.ref([{label:"Remove association",icon:"",command:h=>{c()}}]),c=()=>{console.log(r.value),console.log("Function is calling")},d=(h,f)=>{r.value=f,i.value.show(h),o.value=!0},u=()=>{r.value={},o.value=!1};return(h,f)=>{const m=l.resolveComponent("Button"),p=l.resolveComponent("ContextMenu"),g=l.resolveComponent("router-link");return l.openBlock(),l.createElementBlock("div",{onMouseenter:f[4]||(f[4]=l.withModifiers(y=>s.value=!0,["prevent"])),onMouseleave:f[5]||(f[5]=l.withModifiers(y=>s.value=!1,["prevent"])),class:"flex relative m-3",style:{border:"1px solid var(--surface-border)","border-radius":"5px"}},[l.withDirectives(l.createVNode(m,{onClick:f[0]||(f[0]=y=>d(y,n.linkEntityListItem)),class:"!absolute right-0",size:"small",style:{width:"55px",height:"25px","border-radius":"5px","font-size":"12px"}},{default:l.withCtx(()=>f[6]||(f[6]=[l.createTextVNode(" More")])),_:1},512),[[l.vShow,s.value||o.value]]),l.createVNode(p,{ref_key:"menu",ref:i,model:a.value,onMouseenter:f[1]||(f[1]=l.withModifiers(y=>s.value=!0,["prevent"])),onMouseleave:f[2]||(f[2]=l.withModifiers(y=>s.value=!1,["prevent"])),onHide:f[3]||(f[3]=y=>u())},null,8,["model"]),l.createElementVNode("div",Xf,[l.createElementVNode("div",Gf,[l.createElementVNode("div",Qf,l.toDisplayString(n.linkEntityListItem.entityName),1),l.createVNode(g,{to:{name:"entity360view",params:{entityName:n.linkEntityListItem.entityName,id:n.linkEntityListItem.id,appId:e.value}},target:"_blank"},{default:l.withCtx(()=>f[7]||(f[7]=[l.createElementVNode("div",{class:"pi pi-external-link ml-3"},null,-1)])),_:1},8,["to"])]),l.createElementVNode("div",null,"Id: "+l.toDisplayString(n.linkEntityListItem.id),1)])],32)}}},Zf={class:"flex flex-col mt-3"},tm={class:"flex flex-row items-center"},em={class:"flex items-center justify-center mt-5"},nm={key:0,class:"pi pi-caret-right"},im={key:1,class:"pi pi-caret-down"},sm={key:0},om={class:"flex flex-col mt-5"},rm={class:"col-12"},am={class:"flex flex-col mt-5"},lm={class:"col-12 font-bold"},cm={key:0},dm={class:"flex flex-col mt-5"},um={class:"col-12"},hm={class:"flex flex-col mt-5"},fm={class:"col-12"},mm={class:"flex flex-col mt-5"},pm={class:"col-12"},gm={class:"flex flex-row justify-between items-center mt-5"},ym={key:1,class:"mt-2"},bm={class:"flex flex-row justify-between items-center"},_m={key:1,class:"text-red-500"},xm={class:"flex flex-col mt-5"},km={class:"flex flex-row justify-between items-center mt-2"},Sm={class:"flex flex-row items-center mt-5 mb-5"},wm={class:"font-bold"},Em={class:"font-bold ml-2 flex-1"},vm={class:"flex flex-row justify-center items-center mb-2"},Cm={class:"ml-2 flex-1"},Om={key:0,class:"pi pi-exclamation-circle"},Dm={class:"flex flex-col justify-center"},Nm={class:"flex flex-row justify-between items-center"},Tm={class:"justify-start"},Pm={class:"justify-start"},Mm=jt({__name:"EntityLookup",props:l.mergeModels({linkedEntity:{type:Object,required:!0},entity360Name:{type:String,required:!0},entity360Id:{required:!0},saveExistingRelatedEntityRecord:{type:Function,required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){Ut.useRoute();const t=n,e=l.useModel(n,"modelValue"),i=new qe,s=l.ref({}),o=l.ref([]),r=l.ref({}),a=l.ref([]),c=l.ref([]),d=l.ref({}),u=l.ref("id"),h=l.ref(1),f=l.ref([]),m=l.ref(25),p=l.ref(0),g=l.ref(0),y=l.ref(0);let b=l.ref([]);const _=l.ref(!1),w={gt:"GREATER_THAN",dateAfter:"GREATER_THAN",equals:"EQUAL",dateIs:"EQUAL",notEquals:"NOT_EQUAL",dateIsNot:"NOT_EQUAL",lt:"LESS_THAN",dateBefore:"LESS_THAN",lte:"LESS_THAN_EQUAL",gte:"GREATER_THAN_EQUAL",between:"BETWEEN",contains:"CONTAINS",startsWith:"STARTS_WITH",notContains:"NOT_CONTAINS",endsWith:"ENDS_WITH"},E={gt:"is greater than",dateAfter:"is after",equals:"is equals",dateIs:"is equals",notEquals:"is not equals",dateIsNot:"is not equals",lt:"is less than",dateBefore:"is before",lte:"is less than or equal to",gte:"is greater than or equal to",between:"between",contains:"contains",startsWith:"starts with",notContains:"not contains",endsWith:"ends with"};l.onMounted(()=>{v()});const k=j=>t.linkedEntity.list.some(A=>A[d.value.name]===j),v=async()=>{try{const j={sortBy:[u.value],sortDirection:h.value===1?"ASC":"DESC",pageSize:m.value,currentPage:p.value,columnList:null,filter:b.value,fullTextSearch:""},A=await i.searchEntityRecords(t.linkedEntity.entityName,j);A&&A.response&&(s.value=A.response,a.value=A.response.entity.entityDefinition.columns,c.value=ut(A.response.entity.entityDefinition.columns),g.value=A.response.totalRecords,await S(),await x(),O())}catch{}finally{}},S=async()=>{for(let j=0;j<a.value.length;j++){const A=a.value[j];!A.autoGeneerated&&A.foreignKey&&A.foreignKey.referencedEntityName.toLowerCase()==t.entity360Name.toLowerCase()&&(r.value=A)}},x=async()=>{for(let j=0;j<a.value.length;j++){const A=a.value[j];if(A.primaryKey&&A.primaryKey==!0){d.value=A;break}}},O=()=>{for(let j=0;j<t.linkedEntity.list.length;j++){const A=t.linkedEntity.list[j];A.is_deleted==!1&&A[r.value.name]==t.entity360Id&&o.value.push(A[d.value.name])}},M=()=>{let j=JSON.parse(JSON.stringify(o.value));j=j.filter(rt=>!k(rt));let A={linkEntityName:s.value.entityName,linkRecordIdList:[]};for(let rt=0;rt<j.length;rt++){const Ht=j[rt];A.linkRecordIdList.push(Ht)}t.saveExistingRelatedEntityRecord(A)},C=()=>{_.value=!_.value},T=[{label:"Starts with",value:"startsWith"},{label:"Contains",value:"contains"},{label:"Not contains",value:"notContains"},{label:"Ends with",value:"endsWith"},{label:"Equals",value:"equals"},{label:"Not equals",value:"notEquals"}],$=[{label:"Equals",value:"equals"},{label:"Not equals",value:"notEquals"},{label:"Less than",value:"lt"},{label:"Less than or equal to",value:"lte"},{label:"Greater than",value:"gt"},{label:"Greater than or equal to",value:"gte"}],U=[{label:"Equals",value:"equals"},{label:"Not equals",value:"notEquals"}],H=[{label:"Date is",value:"dateIs"},{label:"Date is not",value:"dateIsNot"},{label:"Date is before",value:"dateBefore"},{label:"Date is after",value:"dateAfter"}],B=[{label:"ASC",value:1},{label:"DESC",value:-1}];let I=[];const F=l.computed(()=>c.value.filter(j=>j.sortable)),P=l.computed(()=>c.value.filter(j=>j.filterable)),R=j=>c.value.filter(A=>{var rt;return A.filterable?((rt=f.value[j])==null?void 0:rt.columnName)===A.name?!0:!f.value.some((Ht,xt)=>xt!==j&&Ht.columnName===A.name):!1}).map(A=>({label:A.name,value:A.field})),W=j=>{let A="";switch(Gt(j.columnName).toLowerCase()){case"string":case"uuid":A="startsWith";break;case"date":A="dateIs";break;case"numeric":case"int":case"integer":A="equals";break;case"bool":case"boolean":A="equals";break}j.operator=A,j.value=""},J=j=>{const A=Gt(j.columnName);switch(A&&A.toLowerCase()){case"integer":case"int":case"numeric":I=$;break;case"date":I=H;break;case"bool":case"boolean":I=U;break;default:I=T}return I},G=j=>{if(j&&j.columnName){const A=Gt(j.columnName);return De(A)}else return""},ot=()=>{for(let j=0;j<f.value.length;j++){const A=f.value[j];A.editing=!1}f.value.push({columnName:"",value:"",operator:"",editing:!0})},nt=j=>{f.value.splice(j,1)},Y=j=>{j.editing=!j.editing},st=()=>{let j=JSON.parse(JSON.stringify(f.value));b.value=[];for(let A=0;A<j.length;A++){const rt=j[A];delete rt.editing,rt.columnName&&rt.operator&&rt.value&&(rt.columnType=Gt(rt.columnName),rt.operator=w[rt.operator],b.value.push(rt))}v()},ut=j=>j.map(A=>({field:A.name,name:A.displayName?A.displayName:A.name,filterable:A.filterable,datatype:A.type,sortable:!0,displayFormatKey:A.displayFormatKey,displayFormat:A.displayFormat})),Ue=()=>{v()},Gt=j=>{const A=c.value.find(rt=>rt.field===j);return A?A.datatype:null},De=j=>{switch(j.toLowerCase()){case"integer":case"int":case"numeric":return"numeric";case"date":return"date";case"bool":case"boolean":return"boolean";default:return"text"}},fe=j=>{m.value=j.rows,p.value=j.page,y.value=j.first,v()};return(j,A)=>{var Tn,Es;const rt=l.resolveComponent("InputIcon"),Ht=l.resolveComponent("InputText"),xt=l.resolveComponent("IconField"),dt=l.resolveComponent("Select"),ct=l.resolveComponent("Divider"),Ot=l.resolveComponent("InputNumber"),Dn=l.resolveComponent("Calendar"),oe=l.resolveComponent("Button"),ln=l.resolveComponent("Checkbox"),Nn=l.resolveComponent("Paginator"),jo=l.resolveDirective("tooltip");return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",Zf,[l.createElementVNode("div",tm,[l.createVNode(xt,{class:"block mt-2 md:mt-0 w-full"},{default:l.withCtx(()=>[l.createVNode(rt,{onClick:A[0]||(A[0]=()=>{}),class:"pi pi-search"}),l.createVNode(Ht,{class:"w-full",onKeyup:A[1]||(A[1]=l.withKeys(()=>{},["enter"])),placeholder:`Search ${s.value.entityName}`},null,8,["placeholder"])]),_:1})]),l.createElementVNode("div",em,[l.createElementVNode("div",{class:"flex items-center cursor-pointer sorting-filter-section flex-1 line-height-4",onClick:A[2]||(A[2]=X=>C())},[_.value?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",nm)),_.value?(l.openBlock(),l.createElementBlock("div",im)):l.createCommentVNode("",!0),A[9]||(A[9]=l.createElementVNode("div",{class:"ml-3 font-bold"}," Sorting & Filters ",-1))])]),_.value?(l.openBlock(),l.createElementBlock("div",sm,[l.createElementVNode("div",om,[A[10]||(A[10]=l.createElementVNode("div",{class:"col-12 font-bold"},"Sort Column",-1)),l.createElementVNode("div",rm,[l.createVNode(dt,{modelValue:u.value,"onUpdate:modelValue":A[3]||(A[3]=X=>u.value=X),options:F.value,optionLabel:"name",optionValue:"field",highlightOnSelect:!1,class:"w-full",onChange:A[4]||(A[4]=X=>Ue(j.event))},null,8,["modelValue","options"])])]),l.createElementVNode("div",am,[A[11]||(A[11]=l.createElementVNode("div",{class:"col-12 font-bold"},[l.createElementVNode("div",{class:"col-12 font-bold"},"Sort Direction")],-1)),l.createElementVNode("div",lm,[l.createVNode(dt,{modelValue:h.value,"onUpdate:modelValue":A[5]||(A[5]=X=>h.value=X),options:B,optionLabel:"label",optionValue:"value",highlightOnSelect:!1,class:"w-full",onChange:A[6]||(A[6]=X=>Ue(j.event))},null,8,["modelValue"])])]),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(f.value,(X,cn)=>(l.openBlock(),l.createElementBlock("div",{key:cn},[X.editing?(l.openBlock(),l.createElementBlock("div",cm,[l.createVNode(ct,{class:"mt-5"}),l.createElementVNode("div",dm,[A[12]||(A[12]=l.createElementVNode("div",{class:"col-12 font-bold"},"Filter Column",-1)),l.createElementVNode("div",um,[l.createVNode(dt,{modelValue:X.columnName,"onUpdate:modelValue":Nt=>X.columnName=Nt,options:R(cn),optionLabel:"label",placeholder:"Select column",optionValue:"value",highlightOnSelect:!1,class:"w-full",onChange:Nt=>W(X)},null,8,["modelValue","onUpdate:modelValue","options","onChange"])])]),l.createElementVNode("div",hm,[A[13]||(A[13]=l.createElementVNode("div",{class:"col-12 font-bold"},"Filter Operator",-1)),l.createElementVNode("div",fm,[l.createVNode(dt,{modelValue:X.operator,"onUpdate:modelValue":Nt=>X.operator=Nt,options:J(X),optionLabel:"label",placeholder:"Select operator",optionValue:"value",highlightOnSelect:!1,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","options"])])]),l.createElementVNode("div",mm,[A[14]||(A[14]=l.createElementVNode("div",{class:"col-12 font-bold"},"Filter value",-1)),l.createElementVNode("div",pm,[G(X)=="numeric"?(l.openBlock(),l.createBlock(Ot,{key:0,format:!1,class:"w-full",modelValue:X.value,"onUpdate:modelValue":Nt=>X.value=Nt,placeholder:"Search value"},null,8,["modelValue","onUpdate:modelValue"])):G(X)=="date"?(l.openBlock(),l.createBlock(Dn,{key:1,class:"w-full",modelValue:X.value,"onUpdate:modelValue":Nt=>X.value=Nt,dateFormat:"mm/dd/yy",placeholder:"mm/dd/yyyy"},null,8,["modelValue","onUpdate:modelValue"])):(l.openBlock(),l.createBlock(Ht,{key:2,modelValue:X.value,"onUpdate:modelValue":Nt=>X.value=Nt,class:"w-full",placeholder:"Search value"},null,8,["modelValue","onUpdate:modelValue"]))])]),l.createElementVNode("div",gm,[l.createVNode(oe,{style:{width:"100px"},label:"Hide",icon:"",severity:"warning",onClick:Nt=>Y(X)},null,8,["onClick"]),l.createVNode(oe,{style:{width:"100px"},label:"Delete",icon:"",severity:"danger",onClick:Nt=>nt(cn)},null,8,["onClick"])])])):l.createCommentVNode("",!0),X.editing?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",ym,[l.createVNode(ct),l.createElementVNode("div",bm,[l.createElementVNode("span",null,[X.columnName||X.operator||X.value?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createElementVNode("span",{class:l.normalizeClass({"text-red-500":!X.columnName})},l.toDisplayString(X.columnName?" "+X.columnName:" column"),3),l.createElementVNode("span",{class:l.normalizeClass({"text-red-500":!E[X.operator]})},l.toDisplayString(X.operator?" "+E[X.operator]:" operator"),3),l.createElementVNode("span",{class:l.normalizeClass({"text-red-500":!X.value})},l.toDisplayString(X.value?" "+X.value:" value"),3)],64)):(l.openBlock(),l.createElementBlock("span",_m,"Filter is empty"))]),l.createVNode(oe,{style:{width:"100px"},label:"Edit",icon:"",severity:"info",onClick:Nt=>Y(X)},null,8,["onClick"])])]))]))),128)),l.createElementVNode("div",xm,[l.createVNode(ct),l.createElementVNode("div",km,[l.createVNode(oe,{style:{width:"100px"},label:"Add",disabled:P.value.length===f.value.length,icon:"",severity:"success",onClick:ot},null,8,["disabled"]),l.createVNode(oe,{style:{width:"100px"},label:"Apply",severity:"info",onClick:st})])])])):l.createCommentVNode("",!0),l.createElementVNode("div",Sm,[l.createElementVNode("div",wm,l.toDisplayString((Tn=s.value)==null?void 0:Tn.totalRecords),1),l.createElementVNode("div",Em,l.toDisplayString((Es=s.value)==null?void 0:Es.entityName),1)]),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.value.result,(X,cn)=>(l.openBlock(),l.createElementBlock("div",{key:cn},[l.createElementVNode("div",vm,[l.createVNode(ln,{disabled:k(X[d.value.name]),modelValue:o.value,"onUpdate:modelValue":A[7]||(A[7]=Nt=>o.value=Nt),value:X[d.value.name]},null,8,["disabled","modelValue","value"]),l.createElementVNode("div",Cm,[l.createTextVNode(l.toDisplayString(n.linkedEntity.entityName)+" ",1),l.createElementVNode("span",null,l.toDisplayString(X[d.value.name]),1)]),k(X[d.value.name])?l.withDirectives((l.openBlock(),l.createElementBlock("div",Om,null,512)),[[jo,"This record is already associated.",void 0,{left:!0}]]):l.createCommentVNode("",!0)])]))),128)),l.createVNode(Nn,{rows:m.value,totalRecords:g.value,rowsPerPageOptions:[10,25,50,100],onPage:fe,template:"FirstPageLink PageLinks LastPageLink CurrentPageReport RowsPerPageDropdown",currentPageReportTemplate:""},null,8,["rows","totalRecords"])]),l.createElementVNode("div",Dm,[l.createVNode(ct,{class:"mt-5"}),l.createElementVNode("div",Nm,[l.createElementVNode("div",Tm,[l.createVNode(oe,{label:"Cancel",icon:"",severity:"secondary",onClick:A[8]||(A[8]=X=>e.value=!1)})]),l.createElementVNode("div",Pm,[l.createVNode(oe,{label:"Save",severity:"success",onClick:M})])])])],64)}}},[["__scopeId","data-v-7fd52649"]]),Vm={class:"field flex flex-col"},Am={key:0,class:"flex items-center"},Fm={key:1},Bm={class:"flex items-center"},$m={class:"flex flex-col justify-center"},Rm={class:"flex flex-row justify-between items-center"},Lm={class:"justify-start"},Im={class:"justify-start"},jm={__name:"EntityLookupObject",props:l.mergeModels({linkedEntity:{type:Object,required:!0},entity360Name:{type:String,required:!0},entity360Id:{type:[String,Number]},saveExistingEntityObject:{type:Function}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){Ut.useRoute();const t=n,e=l.useModel(n,"modelValue"),i=new qe,s=l.ref({}),o=l.ref({});let r=l.ref("");const a=l.ref({}),c=l.ref({});l.onMounted(async()=>{console.log("linkedEntity"),console.log(t.linkedEntity),console.log("entity360Name"),console.log(t.entity360Name),console.log("entity360Id"),console.log(t.entity360Id),await u(),await d()});const d=async()=>{try{const g=await i.getEntityRecords(t.linkedEntity.entityName);g&&g.response&&(s.value=g.response,await h(g.response.entity.entityDefinition.columns),await m(),console.log(s.value))}catch{}finally{}},u=async()=>{try{const g=await i.getRecord(t.entity360Name,t.entity360Id);g&&g.response&&(o.value=g.response,await f(g.response.entity.entityDefinition.columns),console.log(o.value))}catch{}finally{}},h=async g=>{for(let y=0;y<g.length;y++){const b=g[y];if(b.primaryKey&&b.primaryKey==!0){a.value=b;break}}},f=async g=>{for(let y=0;y<g.length;y++){const b=g[y];if(!b.autoGeneerated&&b.foreignKey&&b.foreignKey.referencedEntityName.toLowerCase()==t.linkedEntity.entityName.toLowerCase()){c.value=b;break}}},m=async()=>{for(let g=0;g<s.value.result.length;g++){const y=s.value.result[g];if(y[a.value.name]==o.value.result[0][c.value.name]){r.value=y;break}}},p=()=>{const g={linkedEntityRecordId:r.value[a.value.name],linkedEntityName:t.linkedEntity.entityName,relationType:"ManyToOne"};t.saveExistingEntityObject(g)};return(g,y)=>{const b=l.resolveComponent("Select"),_=l.resolveComponent("Divider"),w=l.resolveComponent("Button");return l.openBlock(),l.createElementBlock("div",Vm,[l.createVNode(b,{modelValue:l.unref(r),"onUpdate:modelValue":y[0]||(y[0]=E=>l.isRef(r)?r.value=E:r=E),"item-value":a.value.name,options:s.value.result,filter:"",optionLabel:a.value.name,placeholder:"Select "+a.value.name,class:"w-full"},{value:l.withCtx(E=>[E.value?(l.openBlock(),l.createElementBlock("div",Am,[l.createElementVNode("div",null,l.toDisplayString(E.value[a.value.name]),1)])):(l.openBlock(),l.createElementBlock("span",Fm,l.toDisplayString(E.placeholder),1))]),option:l.withCtx(E=>[l.createElementVNode("div",Bm,[l.createElementVNode("div",null,l.toDisplayString(E.option[a.value.name]),1)])]),_:1},8,["modelValue","item-value","options","optionLabel","placeholder"]),l.createElementVNode("div",$m,[l.createVNode(_),l.createElementVNode("div",Rm,[l.createElementVNode("div",Lm,[l.createVNode(w,{label:"Cancel",icon:"",severity:"secondary",onClick:y[1]||(y[1]=E=>e.value=!1)})]),l.createElementVNode("div",Im,[l.createVNode(w,{label:"Save",severity:"success",onClick:p})])])])])}}},zm={style:{"font-weight":"700","font-size":"1.25rem"}},Wm={class:"flex flex-col"},Hm={class:"flex flex-row justify-between items-center"},Um={class:"justify-start"},qm={class:"justify-start"},Ym="",Km={__name:"CreateRelatedentity",props:l.mergeModels({entity360Id:{required:!0},entity360Name:{type:String,required:!0},linkedEntity:{type:Object,required:!0}},{showCreateRelatedEntityForm:{},showCreateRelatedEntityFormModifiers:{}}),emits:l.mergeModels(["onSaveDialog"],["update:showCreateRelatedEntityForm"]),setup(n,{emit:t}){const e=l.useModel(n,"showCreateRelatedEntityForm");Ut.useRoute();const i=n,s=i.linkedEntity.entityName,o=t,r=l.ref("Add existing");l.onMounted(()=>{m()});const{formData:a,columns:c,errors:d,backendErrors:u,clearErrors:h,saveRecord:f,fetchAllRecords:m,saveRelatedEntityRecord:p}=js(s,Ym,o),g=()=>{for(let w=0;w<c.value.length;w++){const E=c.value[w];!E.autoGenerated&&E.foreignKey&&(a.value[E.name]=i.entity360Id)}const _={relationType:i.linkedEntity.relationType,linkedEntities:{entityLinkage:[{linkEntityName:i.entity360Name,linkRecordIdList:[i.entity360Id]}]}};f(_)},y=_=>{var w;if(((w=_==null?void 0:_.linkRecordIdList)==null?void 0:w.length)>0){const E={entityLinkage:[{linkEntityName:_.linkEntityName,linkRecordIdList:_.linkRecordIdList}]};p(i.entity360Name,i.entity360Id,E)}},b=_=>{const w={entityLinkage:[{linkEntityName:i.entity360Name,linkRecordIdList:[i.entity360Id]}]};p(_.linkedEntityName,_.linkedEntityRecordId,w)};return(_,w)=>{const E=l.resolveComponent("Tab"),k=l.resolveComponent("TabList"),v=l.resolveComponent("Divider"),S=l.resolveComponent("Button"),x=l.resolveComponent("TabPanel"),O=l.resolveComponent("TabPanels"),M=l.resolveComponent("Tabs"),C=l.resolveComponent("Drawer");return l.openBlock(),l.createBlock(C,{visible:e.value,"onUpdate:visible":w[3]||(w[3]=T=>e.value=T),blockScroll:!0,position:"right",class:"p-fluid layout-profile-sidebar",style:{width:"40%"},pt:{closeButton:"ml-auto"}},{header:l.withCtx(()=>[l.createElementVNode("span",zm,l.toDisplayString(r.value)+" "+l.toDisplayString(n.linkedEntity.entityName),1)]),default:l.withCtx(()=>[l.createVNode(M,{value:"1"},{default:l.withCtx(()=>[l.createVNode(k,null,{default:l.withCtx(()=>[l.createVNode(E,{value:"0"},{default:l.withCtx(()=>w[4]||(w[4]=[l.createTextVNode("Create new")])),_:1}),l.createVNode(E,{value:"1"},{default:l.withCtx(()=>w[5]||(w[5]=[l.createTextVNode("Add existing")])),_:1})]),_:1}),l.createVNode(O,null,{default:l.withCtx(()=>[l.createVNode(x,{value:"0"},{default:l.withCtx(()=>[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(c),(T,$)=>{var U;return l.openBlock(),l.createElementBlock("div",{key:$,class:"mt-3"},[!T.autoGenerated&&!T.foreignKey?(l.openBlock(),l.createBlock(Ni,{key:0,modelValue:l.unref(a)[T.name],"onUpdate:modelValue":H=>l.unref(a)[T.name]=H,column:T,errors:(U=l.unref(d)[T.name])==null?void 0:U.messages,onInput:l.unref(h)},null,8,["modelValue","onUpdate:modelValue","column","errors","onInput"])):l.createCommentVNode("",!0)])}),128)),l.createElementVNode("div",Wm,[l.createVNode(v),l.createElementVNode("div",Hm,[l.createElementVNode("div",Um,[l.createVNode(S,{label:"Cancel",icon:"",severity:"secondary",onClick:w[0]||(w[0]=T=>e.value=!1)})]),l.createElementVNode("div",qm,[l.createVNode(S,{label:"Save",severity:"success",onClick:g})])])])]),_:1}),l.createVNode(x,{value:"1"},{default:l.withCtx(()=>[n.linkedEntity.relationType=="ONE_TO_MANY"?(l.openBlock(),l.createBlock(Mm,{key:0,modelValue:e.value,"onUpdate:modelValue":w[1]||(w[1]=T=>e.value=T),linkedEntity:n.linkedEntity,entity360Name:n.entity360Name,entity360Id:n.entity360Id,saveExistingRelatedEntityRecord:y},null,8,["modelValue","linkedEntity","entity360Name","entity360Id"])):l.createCommentVNode("",!0),n.linkedEntity.relationType=="MANY_TO_ONE"?(l.openBlock(),l.createBlock(jm,{key:1,modelValue:e.value,"onUpdate:modelValue":w[2]||(w[2]=T=>e.value=T),linkedEntity:n.linkedEntity,entity360Name:n.entity360Name,entity360Id:n.entity360Id,saveExistingEntityObject:b},null,8,["modelValue","linkedEntity","entity360Name","entity360Id"])):l.createCommentVNode("",!0)]),_:1})]),_:1})]),_:1})]),_:1},8,["visible"])}}},Xm={class:"flex flex-col border-bottom-section pb-3 pt-3"},Gm={class:"flex items-center pl-3 pr-3 justify-between"},Qm={key:0,class:"pi pi-caret-right"},Jm={key:1,class:"pi pi-caret-down"},Zm={class:"ml-3 font-bold"},tp={class:"ml-1"},ep={class:"text-right"},np={key:0},ip=jt({__name:"LinkEntitySection",props:{entity360Id:{required:!0},entity360Name:{type:String,required:!0},linkedEntity:{type:Object,required:!0},entity360Name:{type:[String,Number]},onSaveRelatedEnttity:{type:Function}},setup(n){Ut.useRoute();const t=n,e=l.ref(!1),i=l.ref(!1),s=()=>{e.value=!e.value},o=()=>{i.value=!i.value},r=()=>{i.value=!1,t.onSaveRelatedEnttity()},a=l.computed(()=>t.linkedEntity.list.filter(c=>!c.is_deleted).length);return(c,d)=>{const u=l.resolveComponent("Button");return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",Xm,[l.createElementVNode("div",Gm,[l.createElementVNode("div",{class:"flex cursor-pointer items-center linked-entity-section grow line-height-4",onClick:d[0]||(d[0]=h=>s())},[e.value?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",Qm)),e.value?(l.openBlock(),l.createElementBlock("div",Jm)):l.createCommentVNode("",!0),l.createElementVNode("div",Zm,l.toDisplayString(n.linkedEntity.entityName),1),l.createElementVNode("div",tp," ("+l.toDisplayString(a.value)+") ",1)]),l.createElementVNode("div",ep,[l.createVNode(u,{label:"Add",icon:"pi pi-plus",size:"small",onClick:d[1]||(d[1]=h=>o())})])]),e.value?(l.openBlock(),l.createElementBlock("div",np,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(n.linkedEntity.list,(h,f)=>(l.openBlock(),l.createElementBlock("div",{class:"flex flex-col",key:f},[h.is_deleted?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Jf,{key:0,linkEntityListItem:h},null,8,["linkEntityListItem"]))]))),128))])):l.createCommentVNode("",!0)]),i.value?(l.openBlock(),l.createBlock(Km,{key:0,showCreateRelatedEntityForm:i.value,"onUpdate:showCreateRelatedEntityForm":d[2]||(d[2]=h=>i.value=h),linkedEntity:n.linkedEntity,entity360Name:n.entity360Name,entity360Id:n.entity360Id,onOnSaveDialog:r},null,8,["showCreateRelatedEntityForm","linkedEntity","entity360Name","entity360Id"])):l.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-412eec44"]]),sp={class:"flex"},op={class:"p-3 mt-3 flex-col items-center"},rp={key:0,class:"pi pi-caret-right"},ap={key:1,class:"pi pi-caret-down"},lp={class:"font-bold ml-2"},cp={key:0,class:"flex flex-col mt-4"},dp={class:"flex flex-col mt-2"},up={class:"flex flex-row flex-wrap justify-between pl-5"},hp={class:"flex flex-col"},fp={class:"font-bold"},mp={class:"mt-2"},pp={key:0,class:"flex flex-col",style:{position:"relative","max-width":"400px","background-color":"var(--surface-card)"}},gp={key:2,style:{width:"350px"},class:"flex flex-col justify-center"},yp={key:0,class:"custom-sidebar"},bp={class:"custom-sidebar-content"},_p={class:"custom-sidebar-button"},xp={class:"custom-sidebar-text"},fa=jt({__name:"Entity360",props:{entityName:{type:String},recordId:{type:String}},emits:["onSaveDialog"],setup(n,{emit:t}){var x,O;const e=me(),i=Ut.useRoute(),s=n,o=l.ref(!0),r=l.ref(!1);let a=(x=i==null?void 0:i.params)==null?void 0:x.entityName,c=(O=i==null?void 0:i.params)==null?void 0:O.id;s.entityName&&(a=s.entityName),s.recordId&&(c=s.recordId);const d=t,{formData:u,columns:h,errors:f,backendErrors:m,isDataChange:p,linkedEntities:g,primarayColumn:y,clearErrors:b,saveRecord:_,getRelatedEntityRecordById:w,cancleRecord:E}=js(a,c,d);l.watch(()=>e.globalConfigs.appId,async M=>{M&&w()},{immediate:!0});const k=()=>{o.value=!o.value},v=()=>{r.value=!r.value},S=()=>{w()};return(M,C)=>{var R;const T=l.resolveComponent("SplitterPanel"),$=l.resolveComponent("Tab"),U=l.resolveComponent("TabList"),H=l.resolveComponent("TabPanel"),B=l.resolveComponent("TabPanels"),I=l.resolveComponent("Tabs"),F=l.resolveComponent("Splitter"),P=l.resolveComponent("Button");return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",sp,[l.createVNode(F,{class:"flex-1",layout:"horizontal",gutterSize:8,size:100},{default:l.withCtx(()=>[l.createVNode(T,{size:20,minSize:10,maxSize:20},{default:l.withCtx(()=>[l.createElementVNode("div",op,[l.createElementVNode("div",{onClick:C[0]||(C[0]=W=>k()),class:"section-heading cursor-pointer"},[o.value?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("i",rp)),o.value?(l.openBlock(),l.createElementBlock("i",ap)):l.createCommentVNode("",!0),l.createElementVNode("span",lp," About this "+l.toDisplayString(l.unref(a)),1)]),o.value?(l.openBlock(),l.createElementBlock("div",cp,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(h),(W,J)=>{var G;return l.openBlock(),l.createElementBlock("div",{key:J},[W.autoGenerated?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(Ni,{key:0,modelValue:l.unref(u)[W.name],"onUpdate:modelValue":ot=>l.unref(u)[W.name]=ot,column:W,errors:(G=l.unref(f)[W.name])==null?void 0:G.messages,onInput:l.unref(b)},null,8,["modelValue","onUpdate:modelValue","column","errors","onInput"]))])}),128))])):l.createCommentVNode("",!0)])]),_:1}),l.createVNode(T,{size:55,minSize:35,style:{height:"100%"}},{default:l.withCtx(()=>[l.createVNode(I,{value:"0"},{default:l.withCtx(()=>[l.createVNode(U,null,{default:l.withCtx(()=>[l.createVNode($,{value:"0"},{default:l.withCtx(()=>C[3]||(C[3]=[l.createTextVNode("Overview")])),_:1}),l.createVNode($,{value:"1"},{default:l.withCtx(()=>C[4]||(C[4]=[l.createTextVNode("Activity")])),_:1})]),_:1}),l.createVNode(B,null,{default:l.withCtx(()=>[l.createVNode(H,{value:"0"},{default:l.withCtx(()=>[l.createElementVNode("div",dp,[C[5]||(C[5]=l.createElementVNode("h3",{class:"mt-2 text-xl font-semibold"},"Data highlights",-1)),l.createElementVNode("div",up,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(h).filter(W=>W.autoGenerated),(W,J)=>(l.openBlock(),l.createElementBlock("div",{key:J,class:"column-item"},[l.createElementVNode("div",hp,[l.createElementVNode("div",fp,l.toDisplayString(W.name),1),l.createElementVNode("div",mp,[l.createVNode(Hs,{column:W,value:l.unref(u)[W.name]},null,8,["column","value"])])])]))),128))])])]),_:1}),l.createVNode(H,{value:"1"})]),_:1})]),_:1})]),_:1})]),_:1}),((R=l.unref(g))==null?void 0:R.length)>0?(l.openBlock(),l.createElementBlock("div",pp,[r.value?(l.openBlock(),l.createBlock(P,{key:0,icon:"pi pi-caret-right",rounded:"",onClick:v,"aria-label":"Filter",style:{height:"2rem",width:"2rem",left:"-20px"}})):l.createCommentVNode("",!0),r.value?l.createCommentVNode("",!0):(l.openBlock(),l.createBlock(P,{key:1,icon:"pi pi-caret-left",rounded:"",onClick:v,"aria-label":"Filter",style:{height:"2rem",width:"2rem",left:"-20px"}})),r.value?(l.openBlock(),l.createElementBlock("div",gp,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(g),(W,J)=>(l.openBlock(),l.createElementBlock("div",{key:J},[l.createVNode(ip,{entity360Name:l.unref(a),entity360Id:l.unref(c),linkedEntity:W,onSaveRelatedEnttity:S},null,8,["entity360Name","entity360Id","linkedEntity"])]))),128))])):l.createCommentVNode("",!0)])):l.createCommentVNode("",!0)]),l.unref(p)?(l.openBlock(),l.createElementBlock("div",yp,[l.createElementVNode("div",bp,[l.createElementVNode("div",_p,[l.createVNode(P,{severity:"primary",onClick:C[1]||(C[1]=W=>l.unref(_)())},{default:l.withCtx(()=>C[6]||(C[6]=[l.createTextVNode("Save")])),_:1}),l.createVNode(P,{style:{"margin-left":"10px"},severity:"secondary",onClick:C[2]||(C[2]=W=>l.unref(E)())},{default:l.withCtx(()=>C[7]||(C[7]=[l.createTextVNode("Cancel")])),_:1})]),l.createElementVNode("div",xp," You've changed property in the "+l.toDisplayString(l.unref(a))+". ",1)])])):l.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-8d31dd1c"]]);function kp(){const n=new qe;let{errors:t,setErrors:e}=yr(),i=l.reactive({data:null});const s=v=>{i.data=v},o=async v=>{try{const S=await n.getEntityRecords(v);if(S&&S.response)return S}catch(S){return console.error("Error fetching entity:",S.errorMessage),S}finally{}},r=async(v,S)=>{try{let x=await n.addRecord(v.entityName,S);if(x)return x}catch(x){return x}finally{}},a=async(v,S,x)=>{try{const O=await n.updateRecord(v.entityName,S,x);if(O&&O.response)return O}catch(O){return O}finally{}},c=async(v,S)=>{try{S.filter==null&&(S.filter={}),Object.keys(S.filter).length===0&&(S.filter=[]);const x=await n.searchEntityRecords(v.entityName,S);if(x)return x.response.sortBy=S.sortBy,x.response.filters=S.filter,x.response.sortDirection=S.sortDirection,x.response.fullTextSearch=S.fullTextSearch,x}catch(x){return x}finally{}},d=async(v,S)=>{try{const x=await n.deleteRecord(v.entityName,S);if(x)return x}catch(x){console.error("Error on deleting record:",x.errorMessage)}finally{}},u=v=>v.result,h=v=>v.entity.entityDefinition.columns,f=v=>{const S=v.entity.entityDefinition.columns;let x={};for(let O=0;O<S.length;O++){const M=S[O];if(M.primaryKey&&M.primaryKey==!0){x=M;break}}return x},m=v=>{const S=v.entity.entityDefinition.columns;let x={};for(let O=0;O<S.length;O++){let M=S[O];M.autoGenerated||(x[M.name]="")}return x},p=(v,S)=>{let x="";const O=v.entity.entityDefinition.columns;for(let M=0;M<O.length;M++){let C=O[M];if(S==C.name){x=C.type;break}}return x},g=(v,S)=>{const O=v.entity.entityDefinition.columns.filter(C=>C.autoGenerated).map(C=>C.name);return Object.entries(S).filter(([C])=>!O.includes(C)).map(([C,T])=>({recordColumnName:C,recordColumnValue:T,columnType:p(i.data,C)}))},y=()=>{const v=i.data.entity.entityDefinition.columns;return Is().shape(v.reduce((x,O)=>(O.autoGenerated||(x[O.name]=Ls().nullable(!1).test({name:"custom-validation",test:function(M){const C=[];let T="";if(O.required&&(!M||M.trim()===""))if(O.validations){T=b(O.validations,"VALIDATE_REQUIRED"),C.push(T);let $=w(O.validations,"VALIDATE_REQUIRED");$&&($="hint:"+$,C.push($))}else T=O.displayName+" is required.",C.push(T);else{if(O.maxLength&&M.length>O.maxLength)if(O.validations){T=b(O.validations,"VALIDATE_MAXLENGTH"),C.push(T);let $=w(O.validations,"VALIDATE_MAXLENGTH");$&&($="hint:"+$,C.push($))}else T=O.displayName+" cannot exceed from "+O.maxLength+" characters",C.push(T);if(O.regxId&&!new RegExp(_(O.validations,"VALIDATE_REGX")).test(M))if(O.validations){T=b(O.validations,"VALIDATE_REGX"),C.push(T);let $=w(O.validations,"VALIDATE_REGX");$&&($="hint:"+$,C.push($))}else T=O.displayName+" invalid format.",C.push(T)}return C.length>0?this.createError({message:C}):!0}})),x),{}))},b=(v,S)=>{for(let x=0;x<v.length;x++)if(S==v[x].type)return v[x].message},_=(v,S)=>{for(let x=0;x<v.length;x++)if(S==v[x].type)return v[x].regx},w=(v,S)=>{for(let x=0;x<v.length;x++)if(S==v[x].type)return v[x].hint};return{state:i,setEntity:s,getEntity:o,addRecord:r,updateRecord:a,searchRecord:c,entityRecordDelete:d,getEntityItems:u,getEntityColumns:h,getPrimaryKeyColumn:f,getFormData:m,createDataToSave:g,createValidationSchema:y,clearErrors:v=>(e({...t.value,[v]:null}),t.value),validateData:async(v,S)=>{try{return await v.validate(S,{abortEarly:!1}),e({}),{validate:!0}}catch(x){const O=x.inner.reduce((T,$)=>(T[$.path]||(T[$.path]={messages:[]}),T[$.path].messages.push(...$.errors),T),{}),M=Object.entries(O).reduce((T,[$,U])=>(T[$]={messages:U.messages},T),{});return e(M),{validate:!1,errors:t.value}}}}}const Sp={__name:"ConfirmDeleteDialog",props:{showDeleteDialog:{},showDeleteDialogModifiers:{}},emits:l.mergeModels(["onDeleteItem"],["update:showDeleteDialog"]),setup(n,{emit:t}){const e=l.useModel(n,"showDeleteDialog"),i=t,s=o=>{i("onDeleteItem",{remove:o})};return(o,r)=>{const a=l.resolveComponent("Button"),c=l.resolveComponent("Dialog");return l.openBlock(),l.createBlock(c,{visible:e.value,"onUpdate:visible":r[2]||(r[2]=d=>e.value=d),style:{width:"450px"},header:"Confirm",modal:!0},{footer:l.withCtx(()=>[l.createVNode(a,{label:"No",icon:"pi pi-times",text:"",onClick:r[0]||(r[0]=d=>s(!1))}),l.createVNode(a,{label:"Yes",icon:"pi pi-check",text:"",onClick:r[1]||(r[1]=d=>s(!0))})]),default:l.withCtx(()=>[r[3]||(r[3]=l.createElementVNode("div",{class:"flex items-center justify-center"},[l.createElementVNode("i",{class:"pi pi-exclamation-triangle mr-3",style:{"font-size":"2rem"}}),l.createElementVNode("span",null,"Are you sure you want to delete the selected item?")],-1))]),_:1},8,["visible"])}}},wp={key:0,style:{"font-weight":"700","font-size":"1.25rem"}},Ep={key:1,style:{"font-weight":"700","font-size":"1.25rem"}},ma={__name:"EntityFormDialog",props:l.mergeModels({item:Object},{showEntityForm:{},showEntityFormModifiers:{}}),emits:["update:showEntityForm"],setup(n){const t=l.useModel(n,"showEntityForm"),e=l.inject("entityObject"),i=n;let s=l.ref([]),o=l.ref({}),r=l.ref([]),a=l.ref(null),c=l.ref({});l.onMounted(()=>{s.value=e.getEntityColumns(e.state.data),i.item?o.value=JSON.parse(JSON.stringify(i.item)):o.value=e.getFormData(e.state.data),a.value=e.createValidationSchema()});const d=async()=>{const m=await e.validateData(a.value,o.value);if(!m.validate){c.value=m.errors;return}const p=e.getPrimaryKeyColumn(e.state.data),g=i.item[p.name],y={dataDefinitions:e.createDataToSave(e.state.data,o.value)},b=await e.updateRecord(e.state.data,g,y);if(b&&b.success){t.value=!1;const _={sortBy:e.state.data.sortBy,sortDirection:e.state.data.sortDirection,pageSize:e.state.data.pageSize,currentPage:e.state.data.currentPage,columnList:null,filter:e.state.data.filters,fullTextSearch:e.state.data.fullTextSearch},w=await e.searchRecord(e.state.data,_);if(w!=null&&w.response){let E=w==null?void 0:w.response;e.setEntity(E)}}else b.validationErrors&&(r.value=JSON.parse(JSON.stringify(b.errvalidationErrorsors)))},u=async()=>{const m=await e.validateData(a.value,o.value);if(!m.validate){c.value=m.errors;return}const p={dataDefinitions:e.createDataToSave(e.state.data,o.value)},g=await e.addRecord(e.state.data,p);g&&g.success?(t.value=!1,e.state.data=await e.getEntity(e.state.data.entityName)):g.validationErrors&&(r.value=JSON.parse(JSON.stringify(g.errvalidationErrorsors)))},h=async()=>{i.item?d():u()},f=m=>{c.value=e.clearErrors(m)};return(m,p)=>{const g=l.resolveComponent("Button"),y=l.resolveComponent("Dialog");return t.value?(l.openBlock(),l.createBlock(y,{key:0,showFooter:!1,visible:t.value,"onUpdate:visible":p[2]||(p[2]=b=>t.value=b),style:{width:"50rem"},breakpoints:{"1199px":"75vw","575px":"90vw"},modal:!0,class:"p-fluid"},{header:l.withCtx(()=>[n.item?(l.openBlock(),l.createElementBlock("span",wp,"Edit "+l.toDisplayString(l.unref(e).state.data.entityName)+" record details",1)):l.createCommentVNode("",!0),n.item?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("span",Ep,"Add "+l.toDisplayString(l.unref(e).state.data.entityName)+" record details",1))]),footer:l.withCtx(()=>[l.createVNode(g,{type:"button",icon:"",label:"Cancel",severity:"secondary",onClick:p[0]||(p[0]=b=>t.value=!1)}),l.createVNode(g,{type:"button",icon:"",label:"Save",severity:"success",onClick:p[1]||(p[1]=b=>h())})]),default:l.withCtx(()=>{var b;return[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(l.unref(s),(_,w)=>{var E;return l.openBlock(),l.createElementBlock("div",{key:w},[!_.autoGenerated&&!_.foreignKey?(l.openBlock(),l.createBlock(Ni,{key:0,modelValue:l.unref(o)[_.name],"onUpdate:modelValue":k=>l.unref(o)[_.name]=k,column:_,errors:(E=l.unref(c)[_.name])==null?void 0:E.messages,onInput:f},null,8,["modelValue","onUpdate:modelValue","column","errors"])):l.createCommentVNode("",!0),!_.autoGenerated&&_.foreignKey?(l.openBlock(),l.createBlock(Ar,{key:1,modelValue:l.unref(o)[_.name],"onUpdate:modelValue":k=>l.unref(o)[_.name]=k,entityName:_.foreignKey.referencedEntityName,columnName:_.name,relatedEntityColumn:_.foreignKey.referencedColumnName},null,8,["modelValue","onUpdate:modelValue","entityName","columnName","relatedEntityColumn"])):l.createCommentVNode("",!0)])}),128)),((b=l.unref(r))==null?void 0:b.length)>0?(l.openBlock(),l.createBlock(Vr,{key:0,errors:l.unref(r)},null,8,["errors"])):l.createCommentVNode("",!0)]}),_:1},8,["visible"])):l.createCommentVNode("",!0)}}},vp={class:"flex justify-between items-start"},Cp={class:"flex-grow-1"},Op={class:"tile-grid"},Dp={class:"font-bold text-lg text-700"},Np={class:"flex flex-col gap-2"},Tp=jt({__name:"EntityListSingleRecord",props:{item:Object},setup(n){const t=n,e=l.inject("entityObject"),i=l.ref([]),s=l.ref(!1),o=l.ref(!1);l.onMounted(()=>{i.value=e.getEntityColumns(e.state.data)});const r=()=>{s.value=!0},a=()=>{o.value=!0},c=u=>{u.remove==!0?d():s.value=!1},d=async()=>{const u=e.getPrimaryKeyColumn(e.state.data),h=t.item[u.name],f=await e.entityRecordDelete(e.state.data,h);if(f!=null&&f.success){s.value=!1;const m={sortBy:e.state.data.sortBy,sortDirection:e.state.data.sortDirection,pageSize:e.state.data.pageSize,currentPage:e.state.data.currentPage,columnList:null,filter:e.state.data.filters,fullTextSearch:e.state.data.fullTextSearch},p=await e.searchRecord(e.state.data,m);if(p!=null&&p.response){let g=p==null?void 0:p.response;e.setEntity(g)}console.log(f)}};return(u,h)=>{const f=l.resolveComponent("Button");return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",vp,[l.createElementVNode("div",Cp,[l.createElementVNode("div",Op,[(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(i.value,(m,p)=>(l.openBlock(),l.createElementBlock("div",{key:p},[l.createElementVNode("span",Dp,l.toDisplayString(m.name)+" : ",1),l.createVNode(Hs,{column:m,value:n.item[m.name]},null,8,["column","value"])]))),128))])]),l.createElementVNode("div",Np,[l.createVNode(f,{onClick:h[0]||(h[0]=m=>a()),icon:"pi pi-pencil",severity:"success",size:"",rounded:"","aria-label":"Edit"}),l.createVNode(f,{onClick:h[1]||(h[1]=m=>r()),icon:"pi pi-trash",severity:"danger",rounded:"","aria-label":"Delete"})])]),o.value?(l.openBlock(),l.createBlock(ma,{key:0,showEntityForm:o.value,"onUpdate:showEntityForm":h[2]||(h[2]=m=>o.value=m),item:n.item},null,8,["showEntityForm","item"])):l.createCommentVNode("",!0),s.value?(l.openBlock(),l.createBlock(Sp,{key:1,showDeleteDialog:s.value,"onUpdate:showDeleteDialog":h[3]||(h[3]=m=>s.value=m),onOnDeleteItem:c},null,8,["showDeleteDialog"])):l.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-ea3b758f"]]),Pp=jt({__name:"EntityListRecordParent",props:{listItemDisplay:String},setup(n){const t=l.inject("entityObject"),e=l.ref([]);return l.watch(()=>t.state.data,i=>{i&&(e.value=i.result,console.log("Entity state updated in child:",t))},{immediate:!0}),(i,s)=>(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(e.value,(o,r)=>(l.openBlock(),l.createElementBlock("div",{key:r,class:"card rounded-md p-5 my-2 shadow-lg relative tile"},[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.listItemDisplay!=null&&n.listItemDisplay!=""?n.listItemDisplay:Tp),l.mergeProps({ref_for:!0},{item:o}),null,16))]))),128))}},[["__scopeId","data-v-b13f837f"]]),Mp={};function Vp(n,t){return null}const Ap=jt(Mp,[["render",Vp]]),Fp={class:"my-2"},Bp={class:"m-0"},$p={__name:"EntityListHeaderSlot",setup(n){const t=l.inject("entityObject");let e=l.ref("");return l.watch(()=>t.state.data,i=>{i&&(e.value=i.entityName)},{immediate:!0}),(i,s)=>{const o=l.resolveComponent("Toolbar");return l.openBlock(),l.createBlock(o,{class:"p-2 my-2"},{start:l.withCtx(()=>[l.createElementVNode("div",Fp,[l.createElementVNode("h2",Bp,"EntityName: "+l.toDisplayString(l.unref(e)),1)])]),end:l.withCtx(()=>s[0]||(s[0]=[])),_:1})}}},Rp={class:"flex flex-col mb-5"},Lp={class:"col-12"},Ip={class:"flex flex-col mb-5"},jp={class:"col-12"},zp={key:0},Wp={class:"flex flex-col mb-5"},Hp={class:"col-12"},Up={class:"flex flex-col mb-5"},qp={class:"col-12"},Yp={class:"flex flex-col mb-5"},Kp={class:"col-12"},Xp={class:"flex flex-row justify-between items-center"},Gp={key:1},Qp={class:"flex flex-row justify-between items-center"},Jp={key:1,class:"text-red-500"},Zp={class:"flex flex-col"},tg={class:"flex flex-row justify-between items-center"},eg={__name:"FilterSortSidebar",props:l.mergeModels({headers:Array,operatorMap:Object,sortCallback:Function,filterCallback:Function,getColumnDatatype:Function,getDatatypeByField:Function},{sortBy:{},sortByModifiers:{},sortDirection:{},sortDirectionModifiers:{},showFilter:{},showFilterModifiers:{},filters:{},filtersModifiers:{}}),emits:["update:sortBy","update:sortDirection","update:showFilter","update:filters"],setup(n){const t=l.useModel(n,"sortBy"),e=l.useModel(n,"sortDirection"),i=l.useModel(n,"showFilter"),s=l.useModel(n,"filters"),o={gt:"is greater than",dateAfter:"is after",equals:"is equals",dateIs:"is equals",notEquals:"is not equals",dateIsNot:"is not equals",lt:"is less than",dateBefore:"is before",lte:"is less than or equal to",gte:"is greater than or equal to",between:"between",contains:"contains",startsWith:"starts with",notContains:"not contains",endsWith:"ends with"},r=[{label:"Starts with",value:"startsWith"},{label:"Contains",value:"contains"},{label:"Not contains",value:"notContains"},{label:"Ends with",value:"endsWith"},{label:"Equals",value:"equals"},{label:"Not equals",value:"notEquals"}],a=[{label:"Equals",value:"equals"},{label:"Not equals",value:"notEquals"},{label:"Less than",value:"lt"},{label:"Less than or equal to",value:"lte"},{label:"Greater than",value:"gt"},{label:"Greater than or equal to",value:"gte"}],c=[{label:"Equals",value:"equals"},{label:"Not equals",value:"notEquals"}],d=[{label:"Date is",value:"dateIs"},{label:"Date is not",value:"dateIsNot"},{label:"Date is before",value:"dateBefore"},{label:"Date is after",value:"dateAfter"}],u=[{label:"ASC",value:1},{label:"DESC",value:-1}];let h=[];const f=l.computed(()=>n.headers.filter(S=>S.sortable)),m=l.computed(()=>n.headers.filter(S=>S.filterable)),p=S=>n.headers.filter(x=>{var O;return x.filterable?((O=s.value[S])==null?void 0:O.columnName)===x.name?!0:!s.value.some((M,C)=>C!==S&&M.columnName===x.name):!1}).map(x=>({label:x.name,value:x.field})),g=S=>{let x="";switch(n.getDatatypeByField(S.columnName).toLowerCase()){case"string":case"uuid":x="startsWith";break;case"date":x="dateIs";break;case"numeric":case"int":case"integer":x="equals";break;case"bool":case"boolean":x="equals";break}S.operator=x,S.value=""},y=S=>{const x=n.getDatatypeByField(S.columnName);switch(x&&x.toLowerCase()){case"integer":case"int":case"numeric":h=a;break;case"date":h=d;break;case"bool":case"boolean":h=c;break;default:h=r}return h},b=S=>{if(S&&S.columnName){const x=n.getDatatypeByField(S.columnName);return n.getColumnDatatype(x)}else return""},_=()=>{for(let S=0;S<s.value.length;S++){const x=s.value[S];x.editing=!1}s.value.push({columnName:"",value:"",operator:"",editing:!0})},w=S=>{s.value.splice(S,1)},E=S=>{S.editing=!S.editing},k=()=>{let S=[],x=JSON.parse(JSON.stringify(s.value));for(let O=0;O<x.length;O++){const M=x[O];delete M.editing,M.columnName&&M.operator&&M.value&&(M.columnType=n.getDatatypeByField(M.columnName),M.operator=n.operatorMap[M.operator],S.push(M))}n.filterCallback(S)},v=()=>{n.sortCallback()};return(S,x)=>{const O=l.resolveComponent("Select"),M=l.resolveComponent("Divider"),C=l.resolveComponent("InputNumber"),T=l.resolveComponent("Calendar"),$=l.resolveComponent("InputText"),U=l.resolveComponent("Button"),H=l.resolveComponent("Drawer");return l.openBlock(),l.createBlock(H,{visible:i.value,"onUpdate:visible":x[4]||(x[4]=B=>i.value=B),header:"Sorting and Filter",blockScroll:!0,position:"right",class:"layout-profile-sidebar !w-full md:!w-80 lg:!w-[30rem]",pt:{closeButton:"ml-auto"}},{default:l.withCtx(()=>[l.createElementVNode("div",Rp,[x[5]||(x[5]=l.createElementVNode("div",{class:"col-12 font-bold"},"Sort Column",-1)),l.createElementVNode("div",Lp,[l.createVNode(O,{modelValue:t.value,"onUpdate:modelValue":x[0]||(x[0]=B=>t.value=B),options:f.value,optionLabel:"name",optionValue:"field",highlightOnSelect:!1,class:"w-full",onChange:x[1]||(x[1]=B=>v(S.event))},null,8,["modelValue","options"])])]),l.createElementVNode("div",Ip,[x[6]||(x[6]=l.createElementVNode("div",{class:"col-12 font-bold"},[l.createElementVNode("div",{class:"col-12 font-bold"},"Sort Direction")],-1)),l.createElementVNode("div",jp,[l.createVNode(O,{modelValue:e.value,"onUpdate:modelValue":x[2]||(x[2]=B=>e.value=B),options:u,optionLabel:"label",optionValue:"value",highlightOnSelect:!1,class:"w-full",onChange:x[3]||(x[3]=B=>v(S.event))},null,8,["modelValue"])])]),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(s.value,(B,I)=>(l.openBlock(),l.createElementBlock("div",{key:I},[B.editing?(l.openBlock(),l.createElementBlock("div",zp,[l.createVNode(M),l.createElementVNode("div",Wp,[x[7]||(x[7]=l.createElementVNode("div",{class:"col-12 font-bold"},"Filter Column",-1)),l.createElementVNode("div",Hp,[l.createVNode(O,{modelValue:B.columnName,"onUpdate:modelValue":F=>B.columnName=F,options:p(I),optionLabel:"label",placeholder:"Select column",optionValue:"value",highlightOnSelect:!1,class:"w-full",onChange:F=>g(B)},null,8,["modelValue","onUpdate:modelValue","options","onChange"])])]),l.createElementVNode("div",Up,[x[8]||(x[8]=l.createElementVNode("div",{class:"col-12 font-bold"},"Filter Operator",-1)),l.createElementVNode("div",qp,[l.createVNode(O,{modelValue:B.operator,"onUpdate:modelValue":F=>B.operator=F,options:y(B),optionLabel:"label",placeholder:"Select operator",optionValue:"value",highlightOnSelect:!1,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","options"])])]),l.createElementVNode("div",Yp,[x[9]||(x[9]=l.createElementVNode("div",{class:"col-12 font-bold"},"Filter value",-1)),l.createElementVNode("div",Kp,[b(B)=="numeric"?(l.openBlock(),l.createBlock(C,{key:0,format:!1,class:"w-full",modelValue:B.value,"onUpdate:modelValue":F=>B.value=F,placeholder:"Search value"},null,8,["modelValue","onUpdate:modelValue"])):b(B)=="date"?(l.openBlock(),l.createBlock(T,{key:1,class:"w-full",modelValue:B.value,"onUpdate:modelValue":F=>B.value=F,dateFormat:"mm/dd/yy",placeholder:"mm/dd/yyyy"},null,8,["modelValue","onUpdate:modelValue"])):(l.openBlock(),l.createBlock($,{key:2,modelValue:B.value,"onUpdate:modelValue":F=>B.value=F,class:"w-full",placeholder:"Search value"},null,8,["modelValue","onUpdate:modelValue"]))])]),l.createElementVNode("div",Xp,[l.createVNode(U,{label:"Hide",icon:"",severity:"warn",onClick:F=>E(B)},null,8,["onClick"]),l.createVNode(U,{label:"Delete",icon:"",severity:"danger",onClick:F=>w(I)},null,8,["onClick"])])])):l.createCommentVNode("",!0),B.editing?l.createCommentVNode("",!0):(l.openBlock(),l.createElementBlock("div",Gp,[l.createVNode(M),l.createElementVNode("div",Qp,[l.createElementVNode("span",null,[B.columnName||B.operator||B.value?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[l.createElementVNode("span",{class:l.normalizeClass({"text-red-500":!B.columnName})},l.toDisplayString(B.columnName?" "+B.columnName:" column"),3),l.createElementVNode("span",{class:l.normalizeClass({"text-red-500":!o[B.operator]})},l.toDisplayString(B.operator?" "+o[B.operator]:" operator"),3),l.createElementVNode("span",{class:l.normalizeClass({"text-red-500":!B.value})},l.toDisplayString(B.value?" "+B.value:" value"),3)],64)):(l.openBlock(),l.createElementBlock("span",Jp,"Filter is empty"))]),l.createVNode(U,{label:"Edit",icon:"",severity:"info",onClick:F=>E(B)},null,8,["onClick"])])]))]))),128)),l.createElementVNode("div",Zp,[l.createVNode(M),l.createElementVNode("div",tg,[l.createVNode(U,{label:"Add",disabled:m.value.length===s.value.length,icon:"",severity:"success",onClick:_},null,8,["disabled"]),l.createVNode(U,{label:"Apply",severity:"info",onClick:k})])])]),_:1},8,["visible"])}}},ng={class:"my-2"},pa={__name:"EntityListFilters",setup(n){const t=l.inject("entityObject"),e=l.ref(!1),i=l.ref([]),s=l.ref([]),o=l.ref(""),r=l.ref(1);let a=l.ref("");const c=l.ref([]),d=l.ref([]),u={gt:"GREATER_THAN",dateAfter:"GREATER_THAN",equals:"EQUAL",dateIs:"EQUAL",notEquals:"NOT_EQUAL",dateIsNot:"NOT_EQUAL",lt:"LESS_THAN",dateBefore:"LESS_THAN",lte:"LESS_THAN_EQUAL",gte:"GREATER_THAN_EQUAL",between:"BETWEEN",contains:"CONTAINS",startsWith:"STARTS_WITH",notContains:"NOT_CONTAINS",endsWith:"ENDS_WITH"};l.watch(()=>t.state.data,E=>{if(E&&(c.value=t.getEntityColumns(E),d.value=b(c.value),o.value=="")){const k=t.getPrimaryKeyColumn(E);o.value=k.name}},{immediate:!0});const h=()=>{e.value=!e.value},f=E=>{s.value=E,m()},m=async()=>{const E={sortBy:[o.value],sortDirection:r.value===1?"ASC":"DESC",pageSize:t.state.data.pageSize,currentPage:t.state.data.currentPage,columnList:null,filter:s.value,fullTextSearch:a.value},k=await t.searchRecord(t.state.data,E);if(k!=null&&k.success){let v=k==null?void 0:k.response;t.setEntity(v)}},p=()=>{m()},g=()=>{i.value=[],s.value=[],m()},y=()=>{m()},b=E=>E.map(k=>({field:k.name,name:k.displayName?k.displayName:k.name,filterable:k.filterable,datatype:k.type,sortable:k.indexColumn,displayFormatKey:k.displayFormatKey,displayFormat:k.displayFormat})),_=E=>{switch(E.toLowerCase()){case"integer":case"int":case"numeric":return"numeric";case"date":return"date";case"bool":case"boolean":return"boolean";default:return"text"}},w=E=>{const k=c.value.find(v=>v.name===E);return k?k.type:null};return(E,k)=>{const v=l.resolveComponent("Button"),S=l.resolveComponent("InputIcon"),x=l.resolveComponent("InputText"),O=l.resolveComponent("IconField"),M=l.resolveComponent("Toolbar");return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createVNode(M,{class:"p-2 my-2"},{start:l.withCtx(()=>[l.createElementVNode("div",ng,[l.createVNode(v,{type:"button",size:"medium",icon:"pi pi-filter",label:"Filter",severity:"info",onClick:k[0]||(k[0]=C=>h())})]),l.createVNode(v,{class:"ml-3",size:"medium",type:"button",icon:"pi pi-filter-slash",label:"Clear",severity:"warn",onClick:k[1]||(k[1]=C=>g())})]),end:l.withCtx(()=>[l.createVNode(O,{iconPosition:"right",class:"block mt-2 md:mt-0"},{default:l.withCtx(()=>[l.createVNode(S,{onClick:k[2]||(k[2]=C=>y()),class:"pi pi-search"}),l.createVNode(x,{class:"w-full sm:w-auto",onKeyup:k[3]||(k[3]=l.withKeys(C=>y(),["enter"])),modelValue:l.unref(a),"onUpdate:modelValue":k[4]||(k[4]=C=>l.isRef(a)?a.value=C:a=C),placeholder:"Search..."},null,8,["modelValue"])]),_:1})]),_:1}),l.createVNode(eg,{sortBy:o.value,"onUpdate:sortBy":k[5]||(k[5]=C=>o.value=C),sortDirection:r.value,"onUpdate:sortDirection":k[6]||(k[6]=C=>r.value=C),showFilter:e.value,"onUpdate:showFilter":k[7]||(k[7]=C=>e.value=C),filters:i.value,"onUpdate:filters":k[8]||(k[8]=C=>i.value=C),headers:d.value,operatorMap:u,sortCallback:p,filterCallback:f,getColumnDatatype:_,getDatatypeByField:w},null,8,["sortBy","sortDirection","showFilter","filters","headers"])],64)}}},ig={__name:"EntityListPagination",setup(n){const t=l.ref(25),e=l.ref(0),i=l.ref(0),s=l.ref(0);let o=l.inject("entityObject");const r=async a=>{t.value=a.rows,e.value=a.page,s.value=a.first;const c={sortBy:o.state.data.sortBy,sortDirection:o.state.data.sortDirection,columnList:null,filter:o.state.data.filters,fullTextSearch:o.state.data.fullTextSearch,pageSize:t.value,currentPage:e.value},d=await o.searchRecord(o.state.data,c);if(d!=null&&d.success){let u=d==null?void 0:d.response;o.setEntity(u),i.value=d.response.totalRecords,s.value=e.value*t.value}};return l.watch(()=>{var a,c;return(c=(a=o==null?void 0:o.state)==null?void 0:a.data)==null?void 0:c.totalRecords},a=>{i&&(i.value=a)},{immediate:!0}),(a,c)=>{const d=l.resolveComponent("Paginator");return l.openBlock(),l.createBlock(d,{class:"my-4",rows:t.value,totalRecords:i.value,rowsPerPageOptions:[10,25,50,100],onPage:r,template:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown",currentPageReportTemplate:"Showing {first} to {last} of {totalRecords} items"},null,8,["rows","totalRecords"])}}},sg={class:"flex flex-row justify-end p-2 my-2"},ga={__name:"EntityListAddButton",setup(n){const t=l.ref(!1),e=()=>{t.value=!0};return(i,s)=>{const o=l.resolveComponent("Button");return l.openBlock(),l.createElementBlock(l.Fragment,null,[l.createElementVNode("div",sg,[l.createVNode(o,{label:"Add",size:"medium",icon:"pi pi-plus",severity:"success",onClick:s[0]||(s[0]=r=>e())})]),t.value?(l.openBlock(),l.createBlock(ma,{key:0,showEntityForm:t.value,"onUpdate:showEntityForm":s[1]||(s[1]=r=>t.value=r)},null,8,["showEntityForm"])):l.createCommentVNode("",!0)],64)}}},og={class:"flex flex-col"},ya={__name:"EntityList",props:{entityName:String,listDisplay:String,listItemDisplay:String,listHeader:String,listFooter:String,listFilter:String,listPagination:String,listAddBtn:Boolean,listFilerSlot:Boolean,className:{type:String,default:"default-class"}},setup(n){const t=kp(),e=me();l.provide("entityObject",t);const i=n;return l.watch(()=>e.globalConfigs.appId,async s=>{if(s){const o=await t.getEntity(i.entityName);o.success?t.setEntity(o.response):t.setEntity({result:[]})}},{immediate:!0}),(s,o)=>{var r,a,c;return l.openBlock(),l.createElementBlock("div",og,[s.$slots["list-display"]?(l.openBlock(),l.createElementBlock(l.Fragment,{key:0},[n.listAddBtn?(l.openBlock(),l.createBlock(ga,{key:0})):l.createCommentVNode("",!0),n.listFilerSlot?(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.listFilter||pa),{key:1})):l.createCommentVNode("",!0),(l.openBlock(!0),l.createElementBlock(l.Fragment,null,l.renderList(((c=(a=(r=l.unref(t))==null?void 0:r.state)==null?void 0:a.data)==null?void 0:c.result)||[],d=>l.renderSlot(s.$slots,"list-display",{key:d.id,firstName:d.first_name,lastName:d.last_name,email:d.email,customerId:d.id})),128))],64)):(l.openBlock(),l.createElementBlock(l.Fragment,{key:1},[(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.listHeader||$p))),(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.listFilter||pa))),n.listAddBtn?(l.openBlock(),l.createBlock(ga,{key:0})):l.createCommentVNode("",!0),(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.listDisplay||Pp),l.normalizeProps(l.guardReactiveProps({listItemDisplay:n.listItemDisplay})),null,16)),(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.listPagination||ig))),(l.openBlock(),l.createBlock(l.resolveDynamicComponent(n.listFooter||Ap)))],64))])}}},rg={install(n,t){n.component("CSEntityGrid",Ir),n.component("csentitygrid",Ir),n.component("CSEntityList",ya),n.component("csentitylist",ya),n.component("CSEntityBarChart",la),n.component("csentitybarchart",la),n.component("CSEntityLineChart",ca),n.component("csentitylinechart",ca),n.component("CSEntityPieChart",da),n.component("csentitypiechart",da),n.component("CSEntityPolarChart",ua),n.component("csentitypolarchart",ua),n.component("CSEntityRadarChart",ha),n.component("csentityradarchart",ha),n.component("CSEntity360View",fa),n.component("csentity360view",fa)}},ba=6048e5,ag=864e5,_a=Symbol.for("constructDateFrom");function Ae(n,t){return typeof n=="function"?n(t):n&&typeof n=="object"&&_a in n?n[_a](t):n instanceof Date?new n.constructor(t):new Date(t)}function ne(n,t){return Ae(t||n,n)}let lg={};function Wi(){return lg}function qn(n,t){var a,c,d,u;const e=Wi(),i=(t==null?void 0:t.weekStartsOn)??((c=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:c.weekStartsOn)??e.weekStartsOn??((u=(d=e.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??0,s=ne(n,t==null?void 0:t.in),o=s.getDay(),r=(o<i?7:0)+o-i;return s.setDate(s.getDate()-r),s.setHours(0,0,0,0),s}function Hi(n,t){return qn(n,{...t,weekStartsOn:1})}function xa(n,t){const e=ne(n,t==null?void 0:t.in),i=e.getFullYear(),s=Ae(e,0);s.setFullYear(i+1,0,4),s.setHours(0,0,0,0);const o=Hi(s),r=Ae(e,0);r.setFullYear(i,0,4),r.setHours(0,0,0,0);const a=Hi(r);return e.getTime()>=o.getTime()?i+1:e.getTime()>=a.getTime()?i:i-1}function ka(n){const t=ne(n),e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),+n-+e}function cg(n,...t){const e=Ae.bind(null,t.find(i=>typeof i=="object"));return t.map(e)}function Sa(n,t){const e=ne(n,t==null?void 0:t.in);return e.setHours(0,0,0,0),e}function dg(n,t,e){const[i,s]=cg(e==null?void 0:e.in,n,t),o=Sa(i),r=Sa(s),a=+o-ka(o),c=+r-ka(r);return Math.round((a-c)/ag)}function ug(n,t){const e=xa(n,t),i=Ae(n,0);return i.setFullYear(e,0,4),i.setHours(0,0,0,0),Hi(i)}function hg(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function fg(n){return!(!hg(n)&&typeof n!="number"||isNaN(+ne(n)))}function mg(n,t){const e=ne(n,t==null?void 0:t.in);return e.setFullYear(e.getFullYear(),0,1),e.setHours(0,0,0,0),e}const pg={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},gg=(n,t,e)=>{let i;const s=pg[n];return typeof s=="string"?i=s:t===1?i=s.one:i=s.other.replace("{{count}}",t.toString()),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"in "+i:i+" ago":i};function Gs(n){return(t={})=>{const e=t.width?String(t.width):n.defaultWidth;return n.formats[e]||n.formats[n.defaultWidth]}}const yg={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},bg={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},_g={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},xg={date:Gs({formats:yg,defaultWidth:"full"}),time:Gs({formats:bg,defaultWidth:"full"}),dateTime:Gs({formats:_g,defaultWidth:"full"})},kg={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Sg=(n,t,e,i)=>kg[n];function Yn(n){return(t,e)=>{const i=e!=null&&e.context?String(e.context):"standalone";let s;if(i==="formatting"&&n.formattingValues){const r=n.defaultFormattingWidth||n.defaultWidth,a=e!=null&&e.width?String(e.width):r;s=n.formattingValues[a]||n.formattingValues[r]}else{const r=n.defaultWidth,a=e!=null&&e.width?String(e.width):n.defaultWidth;s=n.values[a]||n.values[r]}const o=n.argumentCallback?n.argumentCallback(t):t;return s[o]}}const wg={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Eg={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},vg={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Cg={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Og={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Dg={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Ng={ordinalNumber:(n,t)=>{const e=Number(n),i=e%100;if(i>20||i<10)switch(i%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"},era:Yn({values:wg,defaultWidth:"wide"}),quarter:Yn({values:Eg,defaultWidth:"wide",argumentCallback:n=>n-1}),month:Yn({values:vg,defaultWidth:"wide"}),day:Yn({values:Cg,defaultWidth:"wide"}),dayPeriod:Yn({values:Og,defaultWidth:"wide",formattingValues:Dg,defaultFormattingWidth:"wide"})};function Kn(n){return(t,e={})=>{const i=e.width,s=i&&n.matchPatterns[i]||n.matchPatterns[n.defaultMatchWidth],o=t.match(s);if(!o)return null;const r=o[0],a=i&&n.parsePatterns[i]||n.parsePatterns[n.defaultParseWidth],c=Array.isArray(a)?Pg(a,h=>h.test(r)):Tg(a,h=>h.test(r));let d;d=n.valueCallback?n.valueCallback(c):c,d=e.valueCallback?e.valueCallback(d):d;const u=t.slice(r.length);return{value:d,rest:u}}}function Tg(n,t){for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&t(n[e]))return e}function Pg(n,t){for(let e=0;e<n.length;e++)if(t(n[e]))return e}function Mg(n){return(t,e={})=>{const i=t.match(n.matchPattern);if(!i)return null;const s=i[0],o=t.match(n.parsePattern);if(!o)return null;let r=n.valueCallback?n.valueCallback(o[0]):o[0];r=e.valueCallback?e.valueCallback(r):r;const a=t.slice(s.length);return{value:r,rest:a}}}const Vg=/^(\d+)(th|st|nd|rd)?/i,Ag=/\d+/i,Fg={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Bg={any:[/^b/i,/^(a|c)/i]},$g={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Rg={any:[/1/i,/2/i,/3/i,/4/i]},Lg={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Ig={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},jg={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},zg={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Wg={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Hg={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Ug={ordinalNumber:Mg({matchPattern:Vg,parsePattern:Ag,valueCallback:n=>parseInt(n,10)}),era:Kn({matchPatterns:Fg,defaultMatchWidth:"wide",parsePatterns:Bg,defaultParseWidth:"any"}),quarter:Kn({matchPatterns:$g,defaultMatchWidth:"wide",parsePatterns:Rg,defaultParseWidth:"any",valueCallback:n=>n+1}),month:Kn({matchPatterns:Lg,defaultMatchWidth:"wide",parsePatterns:Ig,defaultParseWidth:"any"}),day:Kn({matchPatterns:jg,defaultMatchWidth:"wide",parsePatterns:zg,defaultParseWidth:"any"}),dayPeriod:Kn({matchPatterns:Wg,defaultMatchWidth:"any",parsePatterns:Hg,defaultParseWidth:"any"})},qg={code:"en-US",formatDistance:gg,formatLong:xg,formatRelative:Sg,localize:Ng,match:Ug,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Yg(n,t){const e=ne(n,t==null?void 0:t.in);return dg(e,mg(e))+1}function Kg(n,t){const e=ne(n,t==null?void 0:t.in),i=+Hi(e)-+ug(e);return Math.round(i/ba)+1}function wa(n,t){var u,h,f,m;const e=ne(n,t==null?void 0:t.in),i=e.getFullYear(),s=Wi(),o=(t==null?void 0:t.firstWeekContainsDate)??((h=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:h.firstWeekContainsDate)??s.firstWeekContainsDate??((m=(f=s.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??1,r=Ae((t==null?void 0:t.in)||n,0);r.setFullYear(i+1,0,o),r.setHours(0,0,0,0);const a=qn(r,t),c=Ae((t==null?void 0:t.in)||n,0);c.setFullYear(i,0,o),c.setHours(0,0,0,0);const d=qn(c,t);return+e>=+a?i+1:+e>=+d?i:i-1}function Xg(n,t){var a,c,d,u;const e=Wi(),i=(t==null?void 0:t.firstWeekContainsDate)??((c=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:c.firstWeekContainsDate)??e.firstWeekContainsDate??((u=(d=e.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)??1,s=wa(n,t),o=Ae((t==null?void 0:t.in)||n,0);return o.setFullYear(s,0,i),o.setHours(0,0,0,0),qn(o,t)}function Gg(n,t){const e=ne(n,t==null?void 0:t.in),i=+qn(e,t)-+Xg(e,t);return Math.round(i/ba)+1}function at(n,t){const e=n<0?"-":"",i=Math.abs(n).toString().padStart(t,"0");return e+i}const Fe={y(n,t){const e=n.getFullYear(),i=e>0?e:1-e;return at(t==="yy"?i%100:i,t.length)},M(n,t){const e=n.getMonth();return t==="M"?String(e+1):at(e+1,2)},d(n,t){return at(n.getDate(),t.length)},a(n,t){const e=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.toUpperCase();case"aaa":return e;case"aaaaa":return e[0];case"aaaa":default:return e==="am"?"a.m.":"p.m."}},h(n,t){return at(n.getHours()%12||12,t.length)},H(n,t){return at(n.getHours(),t.length)},m(n,t){return at(n.getMinutes(),t.length)},s(n,t){return at(n.getSeconds(),t.length)},S(n,t){const e=t.length,i=n.getMilliseconds(),s=Math.trunc(i*Math.pow(10,e-3));return at(s,t.length)}},yn={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ea={G:function(n,t,e){const i=n.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return e.era(i,{width:"abbreviated"});case"GGGGG":return e.era(i,{width:"narrow"});case"GGGG":default:return e.era(i,{width:"wide"})}},y:function(n,t,e){if(t==="yo"){const i=n.getFullYear(),s=i>0?i:1-i;return e.ordinalNumber(s,{unit:"year"})}return Fe.y(n,t)},Y:function(n,t,e,i){const s=wa(n,i),o=s>0?s:1-s;if(t==="YY"){const r=o%100;return at(r,2)}return t==="Yo"?e.ordinalNumber(o,{unit:"year"}):at(o,t.length)},R:function(n,t){const e=xa(n);return at(e,t.length)},u:function(n,t){const e=n.getFullYear();return at(e,t.length)},Q:function(n,t,e){const i=Math.ceil((n.getMonth()+1)/3);switch(t){case"Q":return String(i);case"QQ":return at(i,2);case"Qo":return e.ordinalNumber(i,{unit:"quarter"});case"QQQ":return e.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return e.quarter(i,{width:"narrow",context:"formatting"});case"QQQQ":default:return e.quarter(i,{width:"wide",context:"formatting"})}},q:function(n,t,e){const i=Math.ceil((n.getMonth()+1)/3);switch(t){case"q":return String(i);case"qq":return at(i,2);case"qo":return e.ordinalNumber(i,{unit:"quarter"});case"qqq":return e.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return e.quarter(i,{width:"narrow",context:"standalone"});case"qqqq":default:return e.quarter(i,{width:"wide",context:"standalone"})}},M:function(n,t,e){const i=n.getMonth();switch(t){case"M":case"MM":return Fe.M(n,t);case"Mo":return e.ordinalNumber(i+1,{unit:"month"});case"MMM":return e.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return e.month(i,{width:"narrow",context:"formatting"});case"MMMM":default:return e.month(i,{width:"wide",context:"formatting"})}},L:function(n,t,e){const i=n.getMonth();switch(t){case"L":return String(i+1);case"LL":return at(i+1,2);case"Lo":return e.ordinalNumber(i+1,{unit:"month"});case"LLL":return e.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return e.month(i,{width:"narrow",context:"standalone"});case"LLLL":default:return e.month(i,{width:"wide",context:"standalone"})}},w:function(n,t,e,i){const s=Gg(n,i);return t==="wo"?e.ordinalNumber(s,{unit:"week"}):at(s,t.length)},I:function(n,t,e){const i=Kg(n);return t==="Io"?e.ordinalNumber(i,{unit:"week"}):at(i,t.length)},d:function(n,t,e){return t==="do"?e.ordinalNumber(n.getDate(),{unit:"date"}):Fe.d(n,t)},D:function(n,t,e){const i=Yg(n);return t==="Do"?e.ordinalNumber(i,{unit:"dayOfYear"}):at(i,t.length)},E:function(n,t,e){const i=n.getDay();switch(t){case"E":case"EE":case"EEE":return e.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return e.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return e.day(i,{width:"short",context:"formatting"});case"EEEE":default:return e.day(i,{width:"wide",context:"formatting"})}},e:function(n,t,e,i){const s=n.getDay(),o=(s-i.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return at(o,2);case"eo":return e.ordinalNumber(o,{unit:"day"});case"eee":return e.day(s,{width:"abbreviated",context:"formatting"});case"eeeee":return e.day(s,{width:"narrow",context:"formatting"});case"eeeeee":return e.day(s,{width:"short",context:"formatting"});case"eeee":default:return e.day(s,{width:"wide",context:"formatting"})}},c:function(n,t,e,i){const s=n.getDay(),o=(s-i.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return at(o,t.length);case"co":return e.ordinalNumber(o,{unit:"day"});case"ccc":return e.day(s,{width:"abbreviated",context:"standalone"});case"ccccc":return e.day(s,{width:"narrow",context:"standalone"});case"cccccc":return e.day(s,{width:"short",context:"standalone"});case"cccc":default:return e.day(s,{width:"wide",context:"standalone"})}},i:function(n,t,e){const i=n.getDay(),s=i===0?7:i;switch(t){case"i":return String(s);case"ii":return at(s,t.length);case"io":return e.ordinalNumber(s,{unit:"day"});case"iii":return e.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return e.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return e.day(i,{width:"short",context:"formatting"});case"iiii":default:return e.day(i,{width:"wide",context:"formatting"})}},a:function(n,t,e){const s=n.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return e.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"aaa":return e.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return e.dayPeriod(s,{width:"narrow",context:"formatting"});case"aaaa":default:return e.dayPeriod(s,{width:"wide",context:"formatting"})}},b:function(n,t,e){const i=n.getHours();let s;switch(i===12?s=yn.noon:i===0?s=yn.midnight:s=i/12>=1?"pm":"am",t){case"b":case"bb":return e.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"bbb":return e.dayPeriod(s,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return e.dayPeriod(s,{width:"narrow",context:"formatting"});case"bbbb":default:return e.dayPeriod(s,{width:"wide",context:"formatting"})}},B:function(n,t,e){const i=n.getHours();let s;switch(i>=17?s=yn.evening:i>=12?s=yn.afternoon:i>=4?s=yn.morning:s=yn.night,t){case"B":case"BB":case"BBB":return e.dayPeriod(s,{width:"abbreviated",context:"formatting"});case"BBBBB":return e.dayPeriod(s,{width:"narrow",context:"formatting"});case"BBBB":default:return e.dayPeriod(s,{width:"wide",context:"formatting"})}},h:function(n,t,e){if(t==="ho"){let i=n.getHours()%12;return i===0&&(i=12),e.ordinalNumber(i,{unit:"hour"})}return Fe.h(n,t)},H:function(n,t,e){return t==="Ho"?e.ordinalNumber(n.getHours(),{unit:"hour"}):Fe.H(n,t)},K:function(n,t,e){const i=n.getHours()%12;return t==="Ko"?e.ordinalNumber(i,{unit:"hour"}):at(i,t.length)},k:function(n,t,e){let i=n.getHours();return i===0&&(i=24),t==="ko"?e.ordinalNumber(i,{unit:"hour"}):at(i,t.length)},m:function(n,t,e){return t==="mo"?e.ordinalNumber(n.getMinutes(),{unit:"minute"}):Fe.m(n,t)},s:function(n,t,e){return t==="so"?e.ordinalNumber(n.getSeconds(),{unit:"second"}):Fe.s(n,t)},S:function(n,t){return Fe.S(n,t)},X:function(n,t,e){const i=n.getTimezoneOffset();if(i===0)return"Z";switch(t){case"X":return Ca(i);case"XXXX":case"XX":return Ge(i);case"XXXXX":case"XXX":default:return Ge(i,":")}},x:function(n,t,e){const i=n.getTimezoneOffset();switch(t){case"x":return Ca(i);case"xxxx":case"xx":return Ge(i);case"xxxxx":case"xxx":default:return Ge(i,":")}},O:function(n,t,e){const i=n.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+va(i,":");case"OOOO":default:return"GMT"+Ge(i,":")}},z:function(n,t,e){const i=n.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+va(i,":");case"zzzz":default:return"GMT"+Ge(i,":")}},t:function(n,t,e){const i=Math.trunc(+n/1e3);return at(i,t.length)},T:function(n,t,e){return at(+n,t.length)}};function va(n,t=""){const e=n>0?"-":"+",i=Math.abs(n),s=Math.trunc(i/60),o=i%60;return o===0?e+String(s):e+String(s)+t+at(o,2)}function Ca(n,t){return n%60===0?(n>0?"-":"+")+at(Math.abs(n)/60,2):Ge(n,t)}function Ge(n,t=""){const e=n>0?"-":"+",i=Math.abs(n),s=at(Math.trunc(i/60),2),o=at(i%60,2);return e+s+t+o}const Oa=(n,t)=>{switch(n){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Da=(n,t)=>{switch(n){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Qg={p:Da,P:(n,t)=>{const e=n.match(/(P+)(p+)?/)||[],i=e[1],s=e[2];if(!s)return Oa(n,t);let o;switch(i){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",Oa(i,t)).replace("{{time}}",Da(s,t))}},Jg=/^D+$/,Zg=/^Y+$/,ty=["D","DD","YY","YYYY"];function ey(n){return Jg.test(n)}function ny(n){return Zg.test(n)}function iy(n,t,e){const i=sy(n,t,e);if(console.warn(i),ty.includes(n))throw new RangeError(i)}function sy(n,t,e){const i=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${t}\`) for formatting ${i} to the input \`${e}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const oy=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,ry=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ay=/^'([^]*?)'?$/,ly=/''/g,cy=/[a-zA-Z]/;function Na(n,t,e){var u,h,f,m;const i=Wi(),s=i.locale??qg,o=i.firstWeekContainsDate??((h=(u=i.locale)==null?void 0:u.options)==null?void 0:h.firstWeekContainsDate)??1,r=i.weekStartsOn??((m=(f=i.locale)==null?void 0:f.options)==null?void 0:m.weekStartsOn)??0,a=ne(n,e==null?void 0:e.in);if(!fg(a))throw new RangeError("Invalid time value");let c=t.match(ry).map(p=>{const g=p[0];if(g==="p"||g==="P"){const y=Qg[g];return y(p,s.formatLong)}return p}).join("").match(oy).map(p=>{if(p==="''")return{isToken:!1,value:"'"};const g=p[0];if(g==="'")return{isToken:!1,value:dy(p)};if(Ea[g])return{isToken:!0,value:p};if(g.match(cy))throw new RangeError("Format string contains an unescaped latin alphabet character `"+g+"`");return{isToken:!1,value:p}});s.localize.preprocessor&&(c=s.localize.preprocessor(a,c));const d={firstWeekContainsDate:o,weekStartsOn:r,locale:s};return c.map(p=>{if(!p.isToken)return p.value;const g=p.value;(ny(g)||ey(g))&&iy(g,t,String(n));const y=Ea[g[0]];return y(a,g,s.localize,d)}).join("")}function dy(n){const t=n.match(ay);return t?t[1].replace(ly,"'"):n}const uy=Object.freeze(Object.defineProperty({__proto__:null,default:{beforeMount(n,t){const{value:e,arg:i}=t;if(n&&e){const s=Na(new Date(e),i||"yyyy-MM-dd");n.textContent=s}},updated(n,t){const{value:e,arg:i}=t;if(n&&e){const s=Na(new Date(e),i||"yyyy-MM-dd");n.textContent=s}}}},Symbol.toStringTag,{value:"Module"})),hy=Object.freeze(Object.defineProperty({__proto__:null,default:{beforeMount(n,t){const{value:e,arg:i}=t;e&&(n.textContent=n.textContent.toUpperCase())},updated(n,t){const{value:e,arg:i}=t;e&&(n.textContent=n.textContent.toUpperCase())}}},Symbol.toStringTag,{value:"Module"}));/*!
157
- * @kurkle/color v0.3.4
158
- * https://github.com/kurkle/color#readme
159
- * (c) 2024 Jukka Kurkela
160
- * Released under the MIT License
161
- */function Xn(n){return n+.5|0}const Be=(n,t,e)=>Math.max(Math.min(n,e),t);function Gn(n){return Be(Xn(n*2.55),0,255)}function $e(n){return Be(Xn(n*255),0,255)}function ke(n){return Be(Xn(n/2.55)/100,0,1)}function Ta(n){return Be(Xn(n*100),0,100)}const Yt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Qs=[..."0123456789ABCDEF"],fy=n=>Qs[n&15],my=n=>Qs[(n&240)>>4]+Qs[n&15],Ui=n=>(n&240)>>4===(n&15),py=n=>Ui(n.r)&&Ui(n.g)&&Ui(n.b)&&Ui(n.a);function gy(n){var t=n.length,e;return n[0]==="#"&&(t===4||t===5?e={r:255&Yt[n[1]]*17,g:255&Yt[n[2]]*17,b:255&Yt[n[3]]*17,a:t===5?Yt[n[4]]*17:255}:(t===7||t===9)&&(e={r:Yt[n[1]]<<4|Yt[n[2]],g:Yt[n[3]]<<4|Yt[n[4]],b:Yt[n[5]]<<4|Yt[n[6]],a:t===9?Yt[n[7]]<<4|Yt[n[8]]:255})),e}const yy=(n,t)=>n<255?t(n):"";function by(n){var t=py(n)?fy:my;return n?"#"+t(n.r)+t(n.g)+t(n.b)+yy(n.a,t):void 0}const _y=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Pa(n,t,e){const i=t*Math.min(e,1-e),s=(o,r=(o+n/30)%12)=>e-i*Math.max(Math.min(r-3,9-r,1),-1);return[s(0),s(8),s(4)]}function xy(n,t,e){const i=(s,o=(s+n/60)%6)=>e-e*t*Math.max(Math.min(o,4-o,1),0);return[i(5),i(3),i(1)]}function ky(n,t,e){const i=Pa(n,1,.5);let s;for(t+e>1&&(s=1/(t+e),t*=s,e*=s),s=0;s<3;s++)i[s]*=1-t-e,i[s]+=t;return i}function Sy(n,t,e,i,s){return n===s?(t-e)/i+(t<e?6:0):t===s?(e-n)/i+2:(n-t)/i+4}function Js(n){const e=n.r/255,i=n.g/255,s=n.b/255,o=Math.max(e,i,s),r=Math.min(e,i,s),a=(o+r)/2;let c,d,u;return o!==r&&(u=o-r,d=a>.5?u/(2-o-r):u/(o+r),c=Sy(e,i,s,u,o),c=c*60+.5),[c|0,d||0,a]}function Zs(n,t,e,i){return(Array.isArray(t)?n(t[0],t[1],t[2]):n(t,e,i)).map($e)}function to(n,t,e){return Zs(Pa,n,t,e)}function wy(n,t,e){return Zs(ky,n,t,e)}function Ey(n,t,e){return Zs(xy,n,t,e)}function Ma(n){return(n%360+360)%360}function vy(n){const t=_y.exec(n);let e=255,i;if(!t)return;t[5]!==i&&(e=t[6]?Gn(+t[5]):$e(+t[5]));const s=Ma(+t[2]),o=+t[3]/100,r=+t[4]/100;return t[1]==="hwb"?i=wy(s,o,r):t[1]==="hsv"?i=Ey(s,o,r):i=to(s,o,r),{r:i[0],g:i[1],b:i[2],a:e}}function Cy(n,t){var e=Js(n);e[0]=Ma(e[0]+t),e=to(e),n.r=e[0],n.g=e[1],n.b=e[2]}function Oy(n){if(!n)return;const t=Js(n),e=t[0],i=Ta(t[1]),s=Ta(t[2]);return n.a<255?`hsla(${e}, ${i}%, ${s}%, ${ke(n.a)})`:`hsl(${e}, ${i}%, ${s}%)`}const Va={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Aa={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Dy(){const n={},t=Object.keys(Aa),e=Object.keys(Va);let i,s,o,r,a;for(i=0;i<t.length;i++){for(r=a=t[i],s=0;s<e.length;s++)o=e[s],a=a.replace(o,Va[o]);o=parseInt(Aa[r],16),n[a]=[o>>16&255,o>>8&255,o&255]}return n}let qi;function Ny(n){qi||(qi=Dy(),qi.transparent=[0,0,0,0]);const t=qi[n.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const Ty=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function Py(n){const t=Ty.exec(n);let e=255,i,s,o;if(t){if(t[7]!==i){const r=+t[7];e=t[8]?Gn(r):Be(r*255,0,255)}return i=+t[1],s=+t[3],o=+t[5],i=255&(t[2]?Gn(i):Be(i,0,255)),s=255&(t[4]?Gn(s):Be(s,0,255)),o=255&(t[6]?Gn(o):Be(o,0,255)),{r:i,g:s,b:o,a:e}}}function My(n){return n&&(n.a<255?`rgba(${n.r}, ${n.g}, ${n.b}, ${ke(n.a)})`:`rgb(${n.r}, ${n.g}, ${n.b})`)}const eo=n=>n<=.0031308?n*12.92:Math.pow(n,1/2.4)*1.055-.055,bn=n=>n<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4);function Vy(n,t,e){const i=bn(ke(n.r)),s=bn(ke(n.g)),o=bn(ke(n.b));return{r:$e(eo(i+e*(bn(ke(t.r))-i))),g:$e(eo(s+e*(bn(ke(t.g))-s))),b:$e(eo(o+e*(bn(ke(t.b))-o))),a:n.a+e*(t.a-n.a)}}function Yi(n,t,e){if(n){let i=Js(n);i[t]=Math.max(0,Math.min(i[t]+i[t]*e,t===0?360:1)),i=to(i),n.r=i[0],n.g=i[1],n.b=i[2]}}function Fa(n,t){return n&&Object.assign(t||{},n)}function Ba(n){var t={r:0,g:0,b:0,a:255};return Array.isArray(n)?n.length>=3&&(t={r:n[0],g:n[1],b:n[2],a:255},n.length>3&&(t.a=$e(n[3]))):(t=Fa(n,{r:0,g:0,b:0,a:1}),t.a=$e(t.a)),t}function Ay(n){return n.charAt(0)==="r"?Py(n):vy(n)}class Qn{constructor(t){if(t instanceof Qn)return t;const e=typeof t;let i;e==="object"?i=Ba(t):e==="string"&&(i=gy(t)||Ny(t)||Ay(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=Fa(this._rgb);return t&&(t.a=ke(t.a)),t}set rgb(t){this._rgb=Ba(t)}rgbString(){return this._valid?My(this._rgb):void 0}hexString(){return this._valid?by(this._rgb):void 0}hslString(){return this._valid?Oy(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,s=t.rgb;let o;const r=e===o?.5:e,a=2*r-1,c=i.a-s.a,d=((a*c===-1?a:(a+c)/(1+a*c))+1)/2;o=1-d,i.r=255&d*i.r+o*s.r+.5,i.g=255&d*i.g+o*s.g+.5,i.b=255&d*i.b+o*s.b+.5,i.a=r*i.a+(1-r)*s.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=Vy(this._rgb,t._rgb,e)),this}clone(){return new Qn(this.rgb)}alpha(t){return this._rgb.a=$e(t),this}clearer(t){const e=this._rgb;return e.a*=1-t,this}greyscale(){const t=this._rgb,e=Xn(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=e,this}opaquer(t){const e=this._rgb;return e.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return Yi(this._rgb,2,t),this}darken(t){return Yi(this._rgb,2,-t),this}saturate(t){return Yi(this._rgb,1,t),this}desaturate(t){return Yi(this._rgb,1,-t),this}rotate(t){return Cy(this._rgb,t),this}}/*!
162
- * Chart.js v4.4.7
163
- * https://www.chartjs.org
164
- * (c) 2024 Chart.js Contributors
165
- * Released under the MIT License
166
- */function Se(){}const Fy=(()=>{let n=0;return()=>n++})();function it(n){return n==null}function _t(n){if(Array.isArray&&Array.isArray(n))return!0;const t=Object.prototype.toString.call(n);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function et(n){return n!==null&&Object.prototype.toString.call(n)==="[object Object]"}function St(n){return(typeof n=="number"||n instanceof Number)&&isFinite(+n)}function zt(n,t){return St(n)?n:t}function Q(n,t){return typeof n>"u"?t:n}const By=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100:+n/t,$a=(n,t)=>typeof n=="string"&&n.endsWith("%")?parseFloat(n)/100*t:+n;function ft(n,t,e){if(n&&typeof n.call=="function")return n.apply(e,t)}function lt(n,t,e,i){let s,o,r;if(_t(n))for(o=n.length,s=0;s<o;s++)t.call(e,n[s],s);else if(et(n))for(r=Object.keys(n),o=r.length,s=0;s<o;s++)t.call(e,n[r[s]],r[s])}function Ki(n,t){let e,i,s,o;if(!n||!t||n.length!==t.length)return!1;for(e=0,i=n.length;e<i;++e)if(s=n[e],o=t[e],s.datasetIndex!==o.datasetIndex||s.index!==o.index)return!1;return!0}function Xi(n){if(_t(n))return n.map(Xi);if(et(n)){const t=Object.create(null),e=Object.keys(n),i=e.length;let s=0;for(;s<i;++s)t[e[s]]=Xi(n[e[s]]);return t}return n}function Ra(n){return["__proto__","prototype","constructor"].indexOf(n)===-1}function $y(n,t,e,i){if(!Ra(n))return;const s=t[n],o=e[n];et(s)&&et(o)?Jn(s,o,i):t[n]=Xi(o)}function Jn(n,t,e){const i=_t(t)?t:[t],s=i.length;if(!et(n))return n;e=e||{};const o=e.merger||$y;let r;for(let a=0;a<s;++a){if(r=i[a],!et(r))continue;const c=Object.keys(r);for(let d=0,u=c.length;d<u;++d)o(c[d],n,r,e)}return n}function Zn(n,t){return Jn(n,t,{merger:Ry})}function Ry(n,t,e){if(!Ra(n))return;const i=t[n],s=e[n];et(i)&&et(s)?Zn(i,s):Object.prototype.hasOwnProperty.call(t,n)||(t[n]=Xi(s))}const La={"":n=>n,x:n=>n.x,y:n=>n.y};function Ly(n){const t=n.split("."),e=[];let i="";for(const s of t)i+=s,i.endsWith("\\")?i=i.slice(0,-1)+".":(e.push(i),i="");return e}function Iy(n){const t=Ly(n);return e=>{for(const i of t){if(i==="")break;e=e&&e[i]}return e}}function Re(n,t){return(La[t]||(La[t]=Iy(t)))(n)}function no(n){return n.charAt(0).toUpperCase()+n.slice(1)}const ti=n=>typeof n<"u",Le=n=>typeof n=="function",Ia=(n,t)=>{if(n.size!==t.size)return!1;for(const e of n)if(!t.has(e))return!1;return!0};function jy(n){return n.type==="mouseup"||n.type==="click"||n.type==="contextmenu"}const mt=Math.PI,pt=2*mt,zy=pt+mt,Gi=Number.POSITIVE_INFINITY,Wy=mt/180,wt=mt/2,Qe=mt/4,ja=mt*2/3,Ie=Math.log10,ce=Math.sign;function ei(n,t,e){return Math.abs(n-t)<e}function za(n){const t=Math.round(n);n=ei(n,t,n/1e3)?t:n;const e=Math.pow(10,Math.floor(Ie(n))),i=n/e;return(i<=1?1:i<=2?2:i<=5?5:10)*e}function Hy(n){const t=[],e=Math.sqrt(n);let i;for(i=1;i<e;i++)n%i===0&&(t.push(i),t.push(n/i));return e===(e|0)&&t.push(e),t.sort((s,o)=>s-o).pop(),t}function _n(n){return!isNaN(parseFloat(n))&&isFinite(n)}function Uy(n,t){const e=Math.round(n);return e-t<=n&&e+t>=n}function Wa(n,t,e){let i,s,o;for(i=0,s=n.length;i<s;i++)o=n[i][e],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function ie(n){return n*(mt/180)}function io(n){return n*(180/mt)}function Ha(n){if(!St(n))return;let t=1,e=0;for(;Math.round(n*t)/t!==n;)t*=10,e++;return e}function Ua(n,t){const e=t.x-n.x,i=t.y-n.y,s=Math.sqrt(e*e+i*i);let o=Math.atan2(i,e);return o<-.5*mt&&(o+=pt),{angle:o,distance:s}}function so(n,t){return Math.sqrt(Math.pow(t.x-n.x,2)+Math.pow(t.y-n.y,2))}function qy(n,t){return(n-t+zy)%pt-mt}function Wt(n){return(n%pt+pt)%pt}function ni(n,t,e,i){const s=Wt(n),o=Wt(t),r=Wt(e),a=Wt(o-s),c=Wt(r-s),d=Wt(s-o),u=Wt(s-r);return s===o||s===r||i&&o===r||a>c&&d<u}function Dt(n,t,e){return Math.max(t,Math.min(e,n))}function Yy(n){return Dt(n,-32768,32767)}function we(n,t,e,i=1e-6){return n>=Math.min(t,e)-i&&n<=Math.max(t,e)+i}function oo(n,t,e){e=e||(r=>n[r]<t);let i=n.length-1,s=0,o;for(;i-s>1;)o=s+i>>1,e(o)?s=o:i=o;return{lo:s,hi:i}}const Ee=(n,t,e,i)=>oo(n,e,i?s=>{const o=n[s][t];return o<e||o===e&&n[s+1][t]===e}:s=>n[s][t]<e),Ky=(n,t,e)=>oo(n,e,i=>n[i][t]>=e);function Xy(n,t,e){let i=0,s=n.length;for(;i<s&&n[i]<t;)i++;for(;s>i&&n[s-1]>e;)s--;return i>0||s<n.length?n.slice(i,s):n}const qa=["push","pop","shift","splice","unshift"];function Gy(n,t){if(n._chartjs){n._chartjs.listeners.push(t);return}Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),qa.forEach(e=>{const i="_onData"+no(e),s=n[e];Object.defineProperty(n,e,{configurable:!0,enumerable:!1,value(...o){const r=s.apply(this,o);return n._chartjs.listeners.forEach(a=>{typeof a[i]=="function"&&a[i](...o)}),r}})})}function Ya(n,t){const e=n._chartjs;if(!e)return;const i=e.listeners,s=i.indexOf(t);s!==-1&&i.splice(s,1),!(i.length>0)&&(qa.forEach(o=>{delete n[o]}),delete n._chartjs)}function Ka(n){const t=new Set(n);return t.size===n.length?n:Array.from(t)}const Xa=function(){return typeof window>"u"?function(n){return n()}:window.requestAnimationFrame}();function Ga(n,t){let e=[],i=!1;return function(...s){e=s,i||(i=!0,Xa.call(window,()=>{i=!1,n.apply(t,e)}))}}function Qy(n,t){let e;return function(...i){return t?(clearTimeout(e),e=setTimeout(n,t,i)):n.apply(this,i),t}}const ro=n=>n==="start"?"left":n==="end"?"right":"center",Mt=(n,t,e)=>n==="start"?t:n==="end"?e:(t+e)/2,Jy=(n,t,e,i)=>n===(i?"left":"right")?e:n==="center"?(t+e)/2:t;function Qa(n,t,e){const i=t.length;let s=0,o=i;if(n._sorted){const{iScale:r,_parsed:a}=n,c=r.axis,{min:d,max:u,minDefined:h,maxDefined:f}=r.getUserBounds();h&&(s=Dt(Math.min(Ee(a,c,d).lo,e?i:Ee(t,c,r.getPixelForValue(d)).lo),0,i-1)),f?o=Dt(Math.max(Ee(a,r.axis,u,!0).hi+1,e?0:Ee(t,c,r.getPixelForValue(u),!0).hi+1),s,i)-s:o=i-s}return{start:s,count:o}}function Ja(n){const{xScale:t,yScale:e,_scaleRanges:i}=n,s={xmin:t.min,xmax:t.max,ymin:e.min,ymax:e.max};if(!i)return n._scaleRanges=s,!0;const o=i.xmin!==t.min||i.xmax!==t.max||i.ymin!==e.min||i.ymax!==e.max;return Object.assign(i,s),o}const Qi=n=>n===0||n===1,Za=(n,t,e)=>-(Math.pow(2,10*(n-=1))*Math.sin((n-t)*pt/e)),tl=(n,t,e)=>Math.pow(2,-10*n)*Math.sin((n-t)*pt/e)+1,ii={linear:n=>n,easeInQuad:n=>n*n,easeOutQuad:n=>-n*(n-2),easeInOutQuad:n=>(n/=.5)<1?.5*n*n:-.5*(--n*(n-2)-1),easeInCubic:n=>n*n*n,easeOutCubic:n=>(n-=1)*n*n+1,easeInOutCubic:n=>(n/=.5)<1?.5*n*n*n:.5*((n-=2)*n*n+2),easeInQuart:n=>n*n*n*n,easeOutQuart:n=>-((n-=1)*n*n*n-1),easeInOutQuart:n=>(n/=.5)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2),easeInQuint:n=>n*n*n*n*n,easeOutQuint:n=>(n-=1)*n*n*n*n+1,easeInOutQuint:n=>(n/=.5)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2),easeInSine:n=>-Math.cos(n*wt)+1,easeOutSine:n=>Math.sin(n*wt),easeInOutSine:n=>-.5*(Math.cos(mt*n)-1),easeInExpo:n=>n===0?0:Math.pow(2,10*(n-1)),easeOutExpo:n=>n===1?1:-Math.pow(2,-10*n)+1,easeInOutExpo:n=>Qi(n)?n:n<.5?.5*Math.pow(2,10*(n*2-1)):.5*(-Math.pow(2,-10*(n*2-1))+2),easeInCirc:n=>n>=1?n:-(Math.sqrt(1-n*n)-1),easeOutCirc:n=>Math.sqrt(1-(n-=1)*n),easeInOutCirc:n=>(n/=.5)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1),easeInElastic:n=>Qi(n)?n:Za(n,.075,.3),easeOutElastic:n=>Qi(n)?n:tl(n,.075,.3),easeInOutElastic(n){return Qi(n)?n:n<.5?.5*Za(n*2,.1125,.45):.5+.5*tl(n*2-1,.1125,.45)},easeInBack(n){return n*n*((1.70158+1)*n-1.70158)},easeOutBack(n){return(n-=1)*n*((1.70158+1)*n+1.70158)+1},easeInOutBack(n){let t=1.70158;return(n/=.5)<1?.5*(n*n*(((t*=1.525)+1)*n-t)):.5*((n-=2)*n*(((t*=1.525)+1)*n+t)+2)},easeInBounce:n=>1-ii.easeOutBounce(1-n),easeOutBounce(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},easeInOutBounce:n=>n<.5?ii.easeInBounce(n*2)*.5:ii.easeOutBounce(n*2-1)*.5+.5};function ao(n){if(n&&typeof n=="object"){const t=n.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function el(n){return ao(n)?n:new Qn(n)}function lo(n){return ao(n)?n:new Qn(n).saturate(.5).darken(.1).hexString()}const Zy=["x","y","borderWidth","radius","tension"],tb=["color","borderColor","backgroundColor"];function eb(n){n.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),n.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),n.set("animations",{colors:{type:"color",properties:tb},numbers:{type:"number",properties:Zy}}),n.describe("animations",{_fallback:"animation"}),n.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function nb(n){n.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const nl=new Map;function ib(n,t){t=t||{};const e=n+JSON.stringify(t);let i=nl.get(e);return i||(i=new Intl.NumberFormat(n,t),nl.set(e,i)),i}function si(n,t,e){return ib(t,e).format(n)}const il={values(n){return _t(n)?n:""+n},numeric(n,t,e){if(n===0)return"0";const i=this.chart.options.locale;let s,o=n;if(e.length>1){const d=Math.max(Math.abs(e[0].value),Math.abs(e[e.length-1].value));(d<1e-4||d>1e15)&&(s="scientific"),o=sb(n,e)}const r=Ie(Math.abs(o)),a=isNaN(r)?1:Math.max(Math.min(-1*Math.floor(r),20),0),c={notation:s,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(c,this.options.ticks.format),si(n,i,c)},logarithmic(n,t,e){if(n===0)return"0";const i=e[t].significand||n/Math.pow(10,Math.floor(Ie(n)));return[1,2,3,5,10,15].includes(i)||t>.8*e.length?il.numeric.call(this,n,t,e):""}};function sb(n,t){let e=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(e)>=1&&n!==Math.floor(n)&&(e=n-Math.floor(n)),e}var oi={formatters:il};function ob(n){n.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:oi.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),n.route("scale.ticks","color","","color"),n.route("scale.grid","color","","borderColor"),n.route("scale.border","color","","borderColor"),n.route("scale.title","color","","color"),n.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),n.describe("scales",{_fallback:"scale"}),n.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const Je=Object.create(null),co=Object.create(null);function ri(n,t){if(!t)return n;const e=t.split(".");for(let i=0,s=e.length;i<s;++i){const o=e[i];n=n[o]||(n[o]=Object.create(null))}return n}function uo(n,t,e){return typeof t=="string"?Jn(ri(n,t),e):Jn(ri(n,""),t)}class rb{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=i=>i.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,s)=>lo(s.backgroundColor),this.hoverBorderColor=(i,s)=>lo(s.borderColor),this.hoverColor=(i,s)=>lo(s.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return uo(this,t,e)}get(t){return ri(this,t)}describe(t,e){return uo(co,t,e)}override(t,e){return uo(Je,t,e)}route(t,e,i,s){const o=ri(this,t),r=ri(this,i),a="_"+e;Object.defineProperties(o,{[a]:{value:o[e],writable:!0},[e]:{enumerable:!0,get(){const c=this[a],d=r[s];return et(c)?Object.assign({},d,c):Q(c,d)},set(c){this[a]=c}}})}apply(t){t.forEach(e=>e(this))}}var gt=new rb({_scriptable:n=>!n.startsWith("on"),_indexable:n=>n!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[eb,nb,ob]);function ab(n){return!n||it(n.size)||it(n.family)?null:(n.style?n.style+" ":"")+(n.weight?n.weight+" ":"")+n.size+"px "+n.family}function Ji(n,t,e,i,s){let o=t[s];return o||(o=t[s]=n.measureText(s).width,e.push(s)),o>i&&(i=o),i}function lb(n,t,e,i){i=i||{};let s=i.data=i.data||{},o=i.garbageCollect=i.garbageCollect||[];i.font!==t&&(s=i.data={},o=i.garbageCollect=[],i.font=t),n.save(),n.font=t;let r=0;const a=e.length;let c,d,u,h,f;for(c=0;c<a;c++)if(h=e[c],h!=null&&!_t(h))r=Ji(n,s,o,r,h);else if(_t(h))for(d=0,u=h.length;d<u;d++)f=h[d],f!=null&&!_t(f)&&(r=Ji(n,s,o,r,f));n.restore();const m=o.length/2;if(m>e.length){for(c=0;c<m;c++)delete s[o[c]];o.splice(0,m)}return r}function Ze(n,t,e){const i=n.currentDevicePixelRatio,s=e!==0?Math.max(e/2,.5):0;return Math.round((t-s)*i)/i+s}function sl(n,t){!t&&!n||(t=t||n.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,n.width,n.height),t.restore())}function ho(n,t,e,i){ol(n,t,e,i,null)}function ol(n,t,e,i,s){let o,r,a,c,d,u,h,f;const m=t.pointStyle,p=t.rotation,g=t.radius;let y=(p||0)*Wy;if(m&&typeof m=="object"&&(o=m.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){n.save(),n.translate(e,i),n.rotate(y),n.drawImage(m,-m.width/2,-m.height/2,m.width,m.height),n.restore();return}if(!(isNaN(g)||g<=0)){switch(n.beginPath(),m){default:s?n.ellipse(e,i,s/2,g,0,0,pt):n.arc(e,i,g,0,pt),n.closePath();break;case"triangle":u=s?s/2:g,n.moveTo(e+Math.sin(y)*u,i-Math.cos(y)*g),y+=ja,n.lineTo(e+Math.sin(y)*u,i-Math.cos(y)*g),y+=ja,n.lineTo(e+Math.sin(y)*u,i-Math.cos(y)*g),n.closePath();break;case"rectRounded":d=g*.516,c=g-d,r=Math.cos(y+Qe)*c,h=Math.cos(y+Qe)*(s?s/2-d:c),a=Math.sin(y+Qe)*c,f=Math.sin(y+Qe)*(s?s/2-d:c),n.arc(e-h,i-a,d,y-mt,y-wt),n.arc(e+f,i-r,d,y-wt,y),n.arc(e+h,i+a,d,y,y+wt),n.arc(e-f,i+r,d,y+wt,y+mt),n.closePath();break;case"rect":if(!p){c=Math.SQRT1_2*g,u=s?s/2:c,n.rect(e-u,i-c,2*u,2*c);break}y+=Qe;case"rectRot":h=Math.cos(y)*(s?s/2:g),r=Math.cos(y)*g,a=Math.sin(y)*g,f=Math.sin(y)*(s?s/2:g),n.moveTo(e-h,i-a),n.lineTo(e+f,i-r),n.lineTo(e+h,i+a),n.lineTo(e-f,i+r),n.closePath();break;case"crossRot":y+=Qe;case"cross":h=Math.cos(y)*(s?s/2:g),r=Math.cos(y)*g,a=Math.sin(y)*g,f=Math.sin(y)*(s?s/2:g),n.moveTo(e-h,i-a),n.lineTo(e+h,i+a),n.moveTo(e+f,i-r),n.lineTo(e-f,i+r);break;case"star":h=Math.cos(y)*(s?s/2:g),r=Math.cos(y)*g,a=Math.sin(y)*g,f=Math.sin(y)*(s?s/2:g),n.moveTo(e-h,i-a),n.lineTo(e+h,i+a),n.moveTo(e+f,i-r),n.lineTo(e-f,i+r),y+=Qe,h=Math.cos(y)*(s?s/2:g),r=Math.cos(y)*g,a=Math.sin(y)*g,f=Math.sin(y)*(s?s/2:g),n.moveTo(e-h,i-a),n.lineTo(e+h,i+a),n.moveTo(e+f,i-r),n.lineTo(e-f,i+r);break;case"line":r=s?s/2:Math.cos(y)*g,a=Math.sin(y)*g,n.moveTo(e-r,i-a),n.lineTo(e+r,i+a);break;case"dash":n.moveTo(e,i),n.lineTo(e+Math.cos(y)*(s?s/2:g),i+Math.sin(y)*g);break;case!1:n.closePath();break}n.fill(),t.borderWidth>0&&n.stroke()}}function ve(n,t,e){return e=e||.5,!t||n&&n.x>t.left-e&&n.x<t.right+e&&n.y>t.top-e&&n.y<t.bottom+e}function Zi(n,t){n.save(),n.beginPath(),n.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),n.clip()}function ts(n){n.restore()}function cb(n,t,e,i,s){if(!t)return n.lineTo(e.x,e.y);if(s==="middle"){const o=(t.x+e.x)/2;n.lineTo(o,t.y),n.lineTo(o,e.y)}else s==="after"!=!!i?n.lineTo(t.x,e.y):n.lineTo(e.x,t.y);n.lineTo(e.x,e.y)}function db(n,t,e,i){if(!t)return n.lineTo(e.x,e.y);n.bezierCurveTo(i?t.cp1x:t.cp2x,i?t.cp1y:t.cp2y,i?e.cp2x:e.cp1x,i?e.cp2y:e.cp1y,e.x,e.y)}function ub(n,t){t.translation&&n.translate(t.translation[0],t.translation[1]),it(t.rotation)||n.rotate(t.rotation),t.color&&(n.fillStyle=t.color),t.textAlign&&(n.textAlign=t.textAlign),t.textBaseline&&(n.textBaseline=t.textBaseline)}function hb(n,t,e,i,s){if(s.strikethrough||s.underline){const o=n.measureText(i),r=t-o.actualBoundingBoxLeft,a=t+o.actualBoundingBoxRight,c=e-o.actualBoundingBoxAscent,d=e+o.actualBoundingBoxDescent,u=s.strikethrough?(c+d)/2:d;n.strokeStyle=n.fillStyle,n.beginPath(),n.lineWidth=s.decorationWidth||2,n.moveTo(r,u),n.lineTo(a,u),n.stroke()}}function fb(n,t){const e=n.fillStyle;n.fillStyle=t.color,n.fillRect(t.left,t.top,t.width,t.height),n.fillStyle=e}function tn(n,t,e,i,s,o={}){const r=_t(t)?t:[t],a=o.strokeWidth>0&&o.strokeColor!=="";let c,d;for(n.save(),n.font=s.string,ub(n,o),c=0;c<r.length;++c)d=r[c],o.backdrop&&fb(n,o.backdrop),a&&(o.strokeColor&&(n.strokeStyle=o.strokeColor),it(o.strokeWidth)||(n.lineWidth=o.strokeWidth),n.strokeText(d,e,i,o.maxWidth)),n.fillText(d,e,i,o.maxWidth),hb(n,e,i,d,o),i+=Number(s.lineHeight);n.restore()}function ai(n,t){const{x:e,y:i,w:s,h:o,radius:r}=t;n.arc(e+r.topLeft,i+r.topLeft,r.topLeft,1.5*mt,mt,!0),n.lineTo(e,i+o-r.bottomLeft),n.arc(e+r.bottomLeft,i+o-r.bottomLeft,r.bottomLeft,mt,wt,!0),n.lineTo(e+s-r.bottomRight,i+o),n.arc(e+s-r.bottomRight,i+o-r.bottomRight,r.bottomRight,wt,0,!0),n.lineTo(e+s,i+r.topRight),n.arc(e+s-r.topRight,i+r.topRight,r.topRight,0,-wt,!0),n.lineTo(e+r.topLeft,i)}const mb=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,pb=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function gb(n,t){const e=(""+n).match(mb);if(!e||e[1]==="normal")return t*1.2;switch(n=+e[2],e[3]){case"px":return n;case"%":n/=100;break}return t*n}const yb=n=>+n||0;function fo(n,t){const e={},i=et(t),s=i?Object.keys(t):t,o=et(n)?i?r=>Q(n[r],n[t[r]]):r=>n[r]:()=>n;for(const r of s)e[r]=yb(o(r));return e}function rl(n){return fo(n,{top:"y",right:"x",bottom:"y",left:"x"})}function en(n){return fo(n,["topLeft","topRight","bottomLeft","bottomRight"])}function Vt(n){const t=rl(n);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Ct(n,t){n=n||{},t=t||gt.font;let e=Q(n.size,t.size);typeof e=="string"&&(e=parseInt(e,10));let i=Q(n.style,t.style);i&&!(""+i).match(pb)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const s={family:Q(n.family,t.family),lineHeight:gb(Q(n.lineHeight,t.lineHeight),e),size:e,style:i,weight:Q(n.weight,t.weight),string:""};return s.string=ab(s),s}function li(n,t,e,i){let s,o,r;for(s=0,o=n.length;s<o;++s)if(r=n[s],r!==void 0&&r!==void 0)return r}function bb(n,t,e){const{min:i,max:s}=n,o=$a(t,(s-i)/2),r=(a,c)=>e&&a===0?0:a+c;return{min:r(i,-Math.abs(o)),max:r(s,o)}}function je(n,t){return Object.assign(Object.create(n),t)}function mo(n,t=[""],e,i,s=()=>n[0]){const o=e||n;typeof i>"u"&&(i=ul("_fallback",n));const r={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:n,_rootScopes:o,_fallback:i,_getTarget:s,override:a=>mo([a,...n],t,o,i)};return new Proxy(r,{deleteProperty(a,c){return delete a[c],delete a._keys,delete n[0][c],!0},get(a,c){return ll(a,c,()=>Cb(c,t,n,a))},getOwnPropertyDescriptor(a,c){return Reflect.getOwnPropertyDescriptor(a._scopes[0],c)},getPrototypeOf(){return Reflect.getPrototypeOf(n[0])},has(a,c){return hl(a).includes(c)},ownKeys(a){return hl(a)},set(a,c,d){const u=a._storage||(a._storage=s());return a[c]=u[c]=d,delete a._keys,!0}})}function xn(n,t,e,i){const s={_cacheable:!1,_proxy:n,_context:t,_subProxy:e,_stack:new Set,_descriptors:al(n,i),setContext:o=>xn(n,o,e,i),override:o=>xn(n.override(o),t,e,i)};return new Proxy(s,{deleteProperty(o,r){return delete o[r],delete n[r],!0},get(o,r,a){return ll(o,r,()=>xb(o,r,a))},getOwnPropertyDescriptor(o,r){return o._descriptors.allKeys?Reflect.has(n,r)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(n,r)},getPrototypeOf(){return Reflect.getPrototypeOf(n)},has(o,r){return Reflect.has(n,r)},ownKeys(){return Reflect.ownKeys(n)},set(o,r,a){return n[r]=a,delete o[r],!0}})}function al(n,t={scriptable:!0,indexable:!0}){const{_scriptable:e=t.scriptable,_indexable:i=t.indexable,_allKeys:s=t.allKeys}=n;return{allKeys:s,scriptable:e,indexable:i,isScriptable:Le(e)?e:()=>e,isIndexable:Le(i)?i:()=>i}}const _b=(n,t)=>n?n+no(t):t,po=(n,t)=>et(t)&&n!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function ll(n,t,e){if(Object.prototype.hasOwnProperty.call(n,t)||t==="constructor")return n[t];const i=e();return n[t]=i,i}function xb(n,t,e){const{_proxy:i,_context:s,_subProxy:o,_descriptors:r}=n;let a=i[t];return Le(a)&&r.isScriptable(t)&&(a=kb(t,a,n,e)),_t(a)&&a.length&&(a=Sb(t,a,n,r.isIndexable)),po(t,a)&&(a=xn(a,s,o&&o[t],r)),a}function kb(n,t,e,i){const{_proxy:s,_context:o,_subProxy:r,_stack:a}=e;if(a.has(n))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+n);a.add(n);let c=t(o,r||i);return a.delete(n),po(n,c)&&(c=go(s._scopes,s,n,c)),c}function Sb(n,t,e,i){const{_proxy:s,_context:o,_subProxy:r,_descriptors:a}=e;if(typeof o.index<"u"&&i(n))return t[o.index%t.length];if(et(t[0])){const c=t,d=s._scopes.filter(u=>u!==c);t=[];for(const u of c){const h=go(d,s,n,u);t.push(xn(h,o,r&&r[n],a))}}return t}function cl(n,t,e){return Le(n)?n(t,e):n}const wb=(n,t)=>n===!0?t:typeof n=="string"?Re(t,n):void 0;function Eb(n,t,e,i,s){for(const o of t){const r=wb(e,o);if(r){n.add(r);const a=cl(r._fallback,e,s);if(typeof a<"u"&&a!==e&&a!==i)return a}else if(r===!1&&typeof i<"u"&&e!==i)return null}return!1}function go(n,t,e,i){const s=t._rootScopes,o=cl(t._fallback,e,i),r=[...n,...s],a=new Set;a.add(i);let c=dl(a,r,e,o||e,i);return c===null||typeof o<"u"&&o!==e&&(c=dl(a,r,o,c,i),c===null)?!1:mo(Array.from(a),[""],s,o,()=>vb(t,e,i))}function dl(n,t,e,i,s){for(;e;)e=Eb(n,t,e,i,s);return e}function vb(n,t,e){const i=n._getTarget();t in i||(i[t]={});const s=i[t];return _t(s)&&et(e)?e:s||{}}function Cb(n,t,e,i){let s;for(const o of t)if(s=ul(_b(o,n),e),typeof s<"u")return po(n,s)?go(e,i,n,s):s}function ul(n,t){for(const e of t){if(!e)continue;const i=e[n];if(typeof i<"u")return i}}function hl(n){let t=n._keys;return t||(t=n._keys=Ob(n._scopes)),t}function Ob(n){const t=new Set;for(const e of n)for(const i of Object.keys(e).filter(s=>!s.startsWith("_")))t.add(i);return Array.from(t)}function fl(n,t,e,i){const{iScale:s}=n,{key:o="r"}=this._parsing,r=new Array(i);let a,c,d,u;for(a=0,c=i;a<c;++a)d=a+e,u=t[d],r[a]={r:s.parse(Re(u,o),d)};return r}const Db=Number.EPSILON||1e-14,kn=(n,t)=>t<n.length&&!n[t].skip&&n[t],ml=n=>n==="x"?"y":"x";function Nb(n,t,e,i){const s=n.skip?t:n,o=t,r=e.skip?t:e,a=so(o,s),c=so(r,o);let d=a/(a+c),u=c/(a+c);d=isNaN(d)?0:d,u=isNaN(u)?0:u;const h=i*d,f=i*u;return{previous:{x:o.x-h*(r.x-s.x),y:o.y-h*(r.y-s.y)},next:{x:o.x+f*(r.x-s.x),y:o.y+f*(r.y-s.y)}}}function Tb(n,t,e){const i=n.length;let s,o,r,a,c,d=kn(n,0);for(let u=0;u<i-1;++u)if(c=d,d=kn(n,u+1),!(!c||!d)){if(ei(t[u],0,Db)){e[u]=e[u+1]=0;continue}s=e[u]/t[u],o=e[u+1]/t[u],a=Math.pow(s,2)+Math.pow(o,2),!(a<=9)&&(r=3/Math.sqrt(a),e[u]=s*r*t[u],e[u+1]=o*r*t[u])}}function Pb(n,t,e="x"){const i=ml(e),s=n.length;let o,r,a,c=kn(n,0);for(let d=0;d<s;++d){if(r=a,a=c,c=kn(n,d+1),!a)continue;const u=a[e],h=a[i];r&&(o=(u-r[e])/3,a[`cp1${e}`]=u-o,a[`cp1${i}`]=h-o*t[d]),c&&(o=(c[e]-u)/3,a[`cp2${e}`]=u+o,a[`cp2${i}`]=h+o*t[d])}}function Mb(n,t="x"){const e=ml(t),i=n.length,s=Array(i).fill(0),o=Array(i);let r,a,c,d=kn(n,0);for(r=0;r<i;++r)if(a=c,c=d,d=kn(n,r+1),!!c){if(d){const u=d[t]-c[t];s[r]=u!==0?(d[e]-c[e])/u:0}o[r]=a?d?ce(s[r-1])!==ce(s[r])?0:(s[r-1]+s[r])/2:s[r-1]:s[r]}Tb(n,s,o),Pb(n,o,t)}function es(n,t,e){return Math.max(Math.min(n,e),t)}function Vb(n,t){let e,i,s,o,r,a=ve(n[0],t);for(e=0,i=n.length;e<i;++e)r=o,o=a,a=e<i-1&&ve(n[e+1],t),o&&(s=n[e],r&&(s.cp1x=es(s.cp1x,t.left,t.right),s.cp1y=es(s.cp1y,t.top,t.bottom)),a&&(s.cp2x=es(s.cp2x,t.left,t.right),s.cp2y=es(s.cp2y,t.top,t.bottom)))}function Ab(n,t,e,i,s){let o,r,a,c;if(t.spanGaps&&(n=n.filter(d=>!d.skip)),t.cubicInterpolationMode==="monotone")Mb(n,s);else{let d=i?n[n.length-1]:n[0];for(o=0,r=n.length;o<r;++o)a=n[o],c=Nb(d,a,n[Math.min(o+1,r-(i?0:1))%r],t.tension),a.cp1x=c.previous.x,a.cp1y=c.previous.y,a.cp2x=c.next.x,a.cp2y=c.next.y,d=a}t.capBezierPoints&&Vb(n,e)}function yo(){return typeof window<"u"&&typeof document<"u"}function bo(n){let t=n.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function ns(n,t,e){let i;return typeof n=="string"?(i=parseInt(n,10),n.indexOf("%")!==-1&&(i=i/100*t.parentNode[e])):i=n,i}const is=n=>n.ownerDocument.defaultView.getComputedStyle(n,null);function Fb(n,t){return is(n).getPropertyValue(t)}const Bb=["top","right","bottom","left"];function nn(n,t,e){const i={};e=e?"-"+e:"";for(let s=0;s<4;s++){const o=Bb[s];i[o]=parseFloat(n[t+"-"+o+e])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const $b=(n,t,e)=>(n>0||t>0)&&(!e||!e.shadowRoot);function Rb(n,t){const e=n.touches,i=e&&e.length?e[0]:n,{offsetX:s,offsetY:o}=i;let r=!1,a,c;if($b(s,o,n.target))a=s,c=o;else{const d=t.getBoundingClientRect();a=i.clientX-d.left,c=i.clientY-d.top,r=!0}return{x:a,y:c,box:r}}function sn(n,t){if("native"in n)return n;const{canvas:e,currentDevicePixelRatio:i}=t,s=is(e),o=s.boxSizing==="border-box",r=nn(s,"padding"),a=nn(s,"border","width"),{x:c,y:d,box:u}=Rb(n,e),h=r.left+(u&&a.left),f=r.top+(u&&a.top);let{width:m,height:p}=t;return o&&(m-=r.width+a.width,p-=r.height+a.height),{x:Math.round((c-h)/m*e.width/i),y:Math.round((d-f)/p*e.height/i)}}function Lb(n,t,e){let i,s;if(t===void 0||e===void 0){const o=n&&bo(n);if(!o)t=n.clientWidth,e=n.clientHeight;else{const r=o.getBoundingClientRect(),a=is(o),c=nn(a,"border","width"),d=nn(a,"padding");t=r.width-d.width-c.width,e=r.height-d.height-c.height,i=ns(a.maxWidth,o,"clientWidth"),s=ns(a.maxHeight,o,"clientHeight")}}return{width:t,height:e,maxWidth:i||Gi,maxHeight:s||Gi}}const ss=n=>Math.round(n*10)/10;function Ib(n,t,e,i){const s=is(n),o=nn(s,"margin"),r=ns(s.maxWidth,n,"clientWidth")||Gi,a=ns(s.maxHeight,n,"clientHeight")||Gi,c=Lb(n,t,e);let{width:d,height:u}=c;if(s.boxSizing==="content-box"){const f=nn(s,"border","width"),m=nn(s,"padding");d-=m.width+f.width,u-=m.height+f.height}return d=Math.max(0,d-o.width),u=Math.max(0,i?d/i:u-o.height),d=ss(Math.min(d,r,c.maxWidth)),u=ss(Math.min(u,a,c.maxHeight)),d&&!u&&(u=ss(d/2)),(t!==void 0||e!==void 0)&&i&&c.height&&u>c.height&&(u=c.height,d=ss(Math.floor(u*i))),{width:d,height:u}}function pl(n,t,e){const i=t||1,s=Math.floor(n.height*i),o=Math.floor(n.width*i);n.height=Math.floor(n.height),n.width=Math.floor(n.width);const r=n.canvas;return r.style&&(e||!r.style.height&&!r.style.width)&&(r.style.height=`${n.height}px`,r.style.width=`${n.width}px`),n.currentDevicePixelRatio!==i||r.height!==s||r.width!==o?(n.currentDevicePixelRatio=i,r.height=s,r.width=o,n.ctx.setTransform(i,0,0,i,0,0),!0):!1}const jb=function(){let n=!1;try{const t={get passive(){return n=!0,!1}};yo()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return n}();function gl(n,t){const e=Fb(n,t),i=e&&e.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function on(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:n.y+e*(t.y-n.y)}}function zb(n,t,e,i){return{x:n.x+e*(t.x-n.x),y:i==="middle"?e<.5?n.y:t.y:i==="after"?e<1?n.y:t.y:e>0?t.y:n.y}}function Wb(n,t,e,i){const s={x:n.cp2x,y:n.cp2y},o={x:t.cp1x,y:t.cp1y},r=on(n,s,e),a=on(s,o,e),c=on(o,t,e),d=on(r,a,e),u=on(a,c,e);return on(d,u,e)}const Hb=function(n,t){return{x(e){return n+n+t-e},setWidth(e){t=e},textAlign(e){return e==="center"?e:e==="right"?"left":"right"},xPlus(e,i){return e-i},leftForLtr(e,i){return e-i}}},Ub=function(){return{x(n){return n},setWidth(n){},textAlign(n){return n},xPlus(n,t){return n+t},leftForLtr(n,t){return n}}};function Sn(n,t,e){return n?Hb(t,e):Ub()}function yl(n,t){let e,i;(t==="ltr"||t==="rtl")&&(e=n.canvas.style,i=[e.getPropertyValue("direction"),e.getPropertyPriority("direction")],e.setProperty("direction",t,"important"),n.prevTextDirection=i)}function bl(n,t){t!==void 0&&(delete n.prevTextDirection,n.canvas.style.setProperty("direction",t[0],t[1]))}function _l(n){return n==="angle"?{between:ni,compare:qy,normalize:Wt}:{between:we,compare:(t,e)=>t-e,normalize:t=>t}}function xl({start:n,end:t,count:e,loop:i,style:s}){return{start:n%e,end:t%e,loop:i&&(t-n+1)%e===0,style:s}}function qb(n,t,e){const{property:i,start:s,end:o}=e,{between:r,normalize:a}=_l(i),c=t.length;let{start:d,end:u,loop:h}=n,f,m;if(h){for(d+=c,u+=c,f=0,m=c;f<m&&r(a(t[d%c][i]),s,o);++f)d--,u--;d%=c,u%=c}return u<d&&(u+=c),{start:d,end:u,loop:h,style:n.style}}function kl(n,t,e){if(!e)return[n];const{property:i,start:s,end:o}=e,r=t.length,{compare:a,between:c,normalize:d}=_l(i),{start:u,end:h,loop:f,style:m}=qb(n,t,e),p=[];let g=!1,y=null,b,_,w;const E=()=>c(s,w,b)&&a(s,w)!==0,k=()=>a(o,b)===0||c(o,w,b),v=()=>g||E(),S=()=>!g||k();for(let x=u,O=u;x<=h;++x)_=t[x%r],!_.skip&&(b=d(_[i]),b!==w&&(g=c(b,s,o),y===null&&v()&&(y=a(b,s)===0?x:O),y!==null&&S()&&(p.push(xl({start:y,end:x,loop:f,count:r,style:m})),y=null),O=x,w=b));return y!==null&&p.push(xl({start:y,end:h,loop:f,count:r,style:m})),p}function Sl(n,t){const e=[],i=n.segments;for(let s=0;s<i.length;s++){const o=kl(i[s],n.points,t);o.length&&e.push(...o)}return e}function Yb(n,t,e,i){let s=0,o=t-1;if(e&&!i)for(;s<t&&!n[s].skip;)s++;for(;s<t&&n[s].skip;)s++;for(s%=t,e&&(o+=s);o>s&&n[o%t].skip;)o--;return o%=t,{start:s,end:o}}function Kb(n,t,e,i){const s=n.length,o=[];let r=t,a=n[t],c;for(c=t+1;c<=e;++c){const d=n[c%s];d.skip||d.stop?a.skip||(i=!1,o.push({start:t%s,end:(c-1)%s,loop:i}),t=r=d.stop?c:null):(r=c,a.skip&&(t=c)),a=d}return r!==null&&o.push({start:t%s,end:r%s,loop:i}),o}function Xb(n,t){const e=n.points,i=n.options.spanGaps,s=e.length;if(!s)return[];const o=!!n._loop,{start:r,end:a}=Yb(e,s,o,i);if(i===!0)return wl(n,[{start:r,end:a,loop:o}],e,t);const c=a<r?a+s:a,d=!!n._fullLoop&&r===0&&a===s-1;return wl(n,Kb(e,r,c,d),e,t)}function wl(n,t,e,i){return!i||!i.setContext||!e?t:Gb(n,t,e,i)}function Gb(n,t,e,i){const s=n._chart.getContext(),o=El(n.options),{_datasetIndex:r,options:{spanGaps:a}}=n,c=e.length,d=[];let u=o,h=t[0].start,f=h;function m(p,g,y,b){const _=a?-1:1;if(p!==g){for(p+=c;e[p%c].skip;)p-=_;for(;e[g%c].skip;)g+=_;p%c!==g%c&&(d.push({start:p%c,end:g%c,loop:y,style:b}),u=b,h=g%c)}}for(const p of t){h=a?h:p.start;let g=e[h%c],y;for(f=h+1;f<=p.end;f++){const b=e[f%c];y=El(i.setContext(je(s,{type:"segment",p0:g,p1:b,p0DataIndex:(f-1)%c,p1DataIndex:f%c,datasetIndex:r}))),Qb(y,u)&&m(h,f-1,p.loop,u),g=b,u=y}h<f-1&&m(h,f-1,p.loop,u)}return d}function El(n){return{backgroundColor:n.backgroundColor,borderCapStyle:n.borderCapStyle,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderJoinStyle:n.borderJoinStyle,borderWidth:n.borderWidth,borderColor:n.borderColor}}function Qb(n,t){if(!t)return!1;const e=[],i=function(s,o){return ao(o)?(e.includes(o)||e.push(o),e.indexOf(o)):o};return JSON.stringify(n,i)!==JSON.stringify(t,i)}/*!
167
- * Chart.js v4.4.7
168
- * https://www.chartjs.org
169
- * (c) 2024 Chart.js Contributors
170
- * Released under the MIT License
171
- */class Jb{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,s){const o=e.listeners[s],r=e.duration;o.forEach(a=>a({chart:t,initial:e.initial,numSteps:r,currentStep:Math.min(i-e.start,r)}))}_refresh(){this._request||(this._running=!0,this._request=Xa.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,s)=>{if(!i.running||!i.items.length)return;const o=i.items;let r=o.length-1,a=!1,c;for(;r>=0;--r)c=o[r],c._active?(c._total>i.duration&&(i.duration=c._total),c.tick(t),a=!0):(o[r]=o[o.length-1],o.pop());a&&(s.draw(),this._notify(s,i,t,"progress")),o.length||(i.running=!1,this._notify(s,i,t,"complete"),i.initial=!1),e+=o.length}),this._lastDate=t,e===0&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){!e||!e.length||this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((i,s)=>Math.max(i,s._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!(!e||!e.running||!e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let s=i.length-1;for(;s>=0;--s)i[s].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var de=new Jb;const vl="transparent",Zb={boolean(n,t,e){return e>.5?t:n},color(n,t,e){const i=el(n||vl),s=i.valid&&el(t||vl);return s&&s.valid?s.mix(i,e).hexString():t},number(n,t,e){return n+(t-n)*e}};class Cl{constructor(t,e,i,s){const o=e[i];s=li([t.to,s,o,t.from]);const r=li([t.from,o,s]);this._active=!0,this._fn=t.fn||Zb[t.type||typeof r],this._easing=ii[t.easing]||ii.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=r,this._to=s,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const s=this._target[this._prop],o=i-this._start,r=this._duration-o;this._start=i,this._duration=Math.floor(Math.max(r,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=li([t.to,e,s,t.from]),this._from=li([t.from,s,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,s=this._prop,o=this._from,r=this._loop,a=this._to;let c;if(this._active=o!==a&&(r||e<i),!this._active){this._target[s]=a,this._notify(!0);return}if(e<0){this._target[s]=o;return}c=e/i%2,c=r&&c>1?2-c:c,c=this._easing(Math.min(1,Math.max(0,c))),this._target[s]=this._fn(o,a,c)}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let s=0;s<i.length;s++)i[s][e]()}}class _o{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!et(t))return;const e=Object.keys(gt.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(s=>{const o=t[s];if(!et(o))return;const r={};for(const a of e)r[a]=o[a];(_t(o.properties)&&o.properties||[s]).forEach(a=>{(a===s||!i.has(a))&&i.set(a,r)})})}_animateOptions(t,e){const i=e.options,s=e_(t,i);if(!s)return[];const o=this._createAnimations(s,i);return i.$shared&&t_(t.options.$animations,i).then(()=>{t.options=i},()=>{}),o}_createAnimations(t,e){const i=this._properties,s=[],o=t.$animations||(t.$animations={}),r=Object.keys(e),a=Date.now();let c;for(c=r.length-1;c>=0;--c){const d=r[c];if(d.charAt(0)==="$")continue;if(d==="options"){s.push(...this._animateOptions(t,e));continue}const u=e[d];let h=o[d];const f=i.get(d);if(h)if(f&&h.active()){h.update(f,u,a);continue}else h.cancel();if(!f||!f.duration){t[d]=u;continue}o[d]=h=new Cl(f,t,d,u),s.push(h)}return s}update(t,e){if(this._properties.size===0){Object.assign(t,e);return}const i=this._createAnimations(t,e);if(i.length)return de.add(this._chart,i),!0}}function t_(n,t){const e=[],i=Object.keys(t);for(let s=0;s<i.length;s++){const o=n[i[s]];o&&o.active()&&e.push(o.wait())}return Promise.all(e)}function e_(n,t){if(!t)return;let e=n.options;if(!e){n.options=t;return}return e.$shared&&(n.options=e=Object.assign({},e,{$shared:!1,$animations:{}})),e}function Ol(n,t){const e=n&&n.options||{},i=e.reverse,s=e.min===void 0?t:0,o=e.max===void 0?t:0;return{start:i?o:s,end:i?s:o}}function n_(n,t,e){if(e===!1)return!1;const i=Ol(n,e),s=Ol(t,e);return{top:s.end,right:i.end,bottom:s.start,left:i.start}}function i_(n){let t,e,i,s;return et(n)?(t=n.top,e=n.right,i=n.bottom,s=n.left):t=e=i=s=n,{top:t,right:e,bottom:i,left:s,disabled:n===!1}}function Dl(n,t){const e=[],i=n._getSortedDatasetMetas(t);let s,o;for(s=0,o=i.length;s<o;++s)e.push(i[s].index);return e}function Nl(n,t,e,i={}){const s=n.keys,o=i.mode==="single";let r,a,c,d;if(t===null)return;let u=!1;for(r=0,a=s.length;r<a;++r){if(c=+s[r],c===e){if(u=!0,i.all)continue;break}d=n.values[c],St(d)&&(o||t===0||ce(t)===ce(d))&&(t+=d)}return!u&&!i.all?0:t}function s_(n,t){const{iScale:e,vScale:i}=t,s=e.axis==="x"?"x":"y",o=i.axis==="x"?"x":"y",r=Object.keys(n),a=new Array(r.length);let c,d,u;for(c=0,d=r.length;c<d;++c)u=r[c],a[c]={[s]:u,[o]:n[u]};return a}function xo(n,t){const e=n&&n.options.stacked;return e||e===void 0&&t.stack!==void 0}function o_(n,t,e){return`${n.id}.${t.id}.${e.stack||e.type}`}function r_(n){const{min:t,max:e,minDefined:i,maxDefined:s}=n.getUserBounds();return{min:i?t:Number.NEGATIVE_INFINITY,max:s?e:Number.POSITIVE_INFINITY}}function a_(n,t,e){const i=n[t]||(n[t]={});return i[e]||(i[e]={})}function Tl(n,t,e,i){for(const s of t.getMatchingVisibleMetas(i).reverse()){const o=n[s.index];if(e&&o>0||!e&&o<0)return s.index}return null}function Pl(n,t){const{chart:e,_cachedMeta:i}=n,s=e._stacks||(e._stacks={}),{iScale:o,vScale:r,index:a}=i,c=o.axis,d=r.axis,u=o_(o,r,i),h=t.length;let f;for(let m=0;m<h;++m){const p=t[m],{[c]:g,[d]:y}=p,b=p._stacks||(p._stacks={});f=b[d]=a_(s,u,g),f[a]=y,f._top=Tl(f,r,!0,i.type),f._bottom=Tl(f,r,!1,i.type);const _=f._visualValues||(f._visualValues={});_[a]=y}}function ko(n,t){const e=n.scales;return Object.keys(e).filter(i=>e[i].axis===t).shift()}function l_(n,t){return je(n,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function c_(n,t,e){return je(n,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:e,index:t,mode:"default",type:"data"})}function ci(n,t){const e=n.controller.index,i=n.vScale&&n.vScale.axis;if(i){t=t||n._parsed;for(const s of t){const o=s._stacks;if(!o||o[i]===void 0||o[i][e]===void 0)return;delete o[i][e],o[i]._visualValues!==void 0&&o[i]._visualValues[e]!==void 0&&delete o[i]._visualValues[e]}}}const So=n=>n==="reset"||n==="none",Ml=(n,t)=>t?n:Object.assign({},n),d_=(n,t,e)=>n&&!t.hidden&&t._stacked&&{keys:Dl(e,!0),values:null};class Kt{constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=xo(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&ci(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),s=(h,f,m,p)=>h==="x"?f:h==="r"?p:m,o=e.xAxisID=Q(i.xAxisID,ko(t,"x")),r=e.yAxisID=Q(i.yAxisID,ko(t,"y")),a=e.rAxisID=Q(i.rAxisID,ko(t,"r")),c=e.indexAxis,d=e.iAxisID=s(c,o,r,a),u=e.vAxisID=s(c,r,o,a);e.xScale=this.getScaleForId(o),e.yScale=this.getScaleForId(r),e.rScale=this.getScaleForId(a),e.iScale=this.getScaleForId(d),e.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&Ya(this._data,this),t._stacked&&ci(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(et(e)){const s=this._cachedMeta;this._data=s_(e,s)}else if(i!==e){if(i){Ya(i,this);const s=this._cachedMeta;ci(s),s._parsed=[]}e&&Object.isExtensible(e)&&Gy(e,this),this._syncList=[],this._data=e}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let s=!1;this._dataCheck();const o=e._stacked;e._stacked=xo(e.vScale,e),e.stack!==i.stack&&(s=!0,ci(e),e.stack=i.stack),this._resyncElements(t),(s||o!==e._stacked)&&(Pl(this,e._parsed),e._stacked=xo(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:s}=this,{iScale:o,_stacked:r}=i,a=o.axis;let c=t===0&&e===s.length?!0:i._sorted,d=t>0&&i._parsed[t-1],u,h,f;if(this._parsing===!1)i._parsed=s,i._sorted=!0,f=s;else{_t(s[t])?f=this.parseArrayData(i,s,t,e):et(s[t])?f=this.parseObjectData(i,s,t,e):f=this.parsePrimitiveData(i,s,t,e);const m=()=>h[a]===null||d&&h[a]<d[a];for(u=0;u<e;++u)i._parsed[u+t]=h=f[u],c&&(m()&&(c=!1),d=h);i._sorted=c}r&&Pl(this,f)}parsePrimitiveData(t,e,i,s){const{iScale:o,vScale:r}=t,a=o.axis,c=r.axis,d=o.getLabels(),u=o===r,h=new Array(s);let f,m,p;for(f=0,m=s;f<m;++f)p=f+i,h[f]={[a]:u||o.parse(d[p],p),[c]:r.parse(e[p],p)};return h}parseArrayData(t,e,i,s){const{xScale:o,yScale:r}=t,a=new Array(s);let c,d,u,h;for(c=0,d=s;c<d;++c)u=c+i,h=e[u],a[c]={x:o.parse(h[0],u),y:r.parse(h[1],u)};return a}parseObjectData(t,e,i,s){const{xScale:o,yScale:r}=t,{xAxisKey:a="x",yAxisKey:c="y"}=this._parsing,d=new Array(s);let u,h,f,m;for(u=0,h=s;u<h;++u)f=u+i,m=e[f],d[u]={x:o.parse(Re(m,a),f),y:r.parse(Re(m,c),f)};return d}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const s=this.chart,o=this._cachedMeta,r=e[t.axis],a={keys:Dl(s,!0),values:e._stacks[t.axis]._visualValues};return Nl(a,r,o.index,{mode:i})}updateRangeFromParsed(t,e,i,s){const o=i[e.axis];let r=o===null?NaN:o;const a=s&&i._stacks[e.axis];s&&a&&(s.values=a,r=Nl(s,o,this._cachedMeta.index)),t.min=Math.min(t.min,r),t.max=Math.max(t.max,r)}getMinMax(t,e){const i=this._cachedMeta,s=i._parsed,o=i._sorted&&t===i.iScale,r=s.length,a=this._getOtherScale(t),c=d_(e,i,this.chart),d={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:h}=r_(a);let f,m;function p(){m=s[f];const g=m[a.axis];return!St(m[t.axis])||u>g||h<g}for(f=0;f<r&&!(!p()&&(this.updateRangeFromParsed(d,t,m,c),o));++f);if(o){for(f=r-1;f>=0;--f)if(!p()){this.updateRangeFromParsed(d,t,m,c);break}}return d}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let s,o,r;for(s=0,o=e.length;s<o;++s)r=e[s][t.axis],St(r)&&i.push(r);return i}getMaxOverflow(){return!1}getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,s=e.vScale,o=this.getParsed(t);return{label:i?""+i.getLabelForValue(o[i.axis]):"",value:s?""+s.getLabelForValue(o[s.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=i_(Q(this.options.clip,n_(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,s=i.data||[],o=e.chartArea,r=[],a=this._drawStart||0,c=this._drawCount||s.length-a,d=this.options.drawActiveElementsOnTop;let u;for(i.dataset&&i.dataset.draw(t,o,a,c),u=a;u<a+c;++u){const h=s[u];h.hidden||(h.active&&d?r.push(h):h.draw(t,o))}for(u=0;u<r.length;++u)r[u].draw(t,o)}getStyle(t,e){const i=e?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const s=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const r=this._cachedMeta.data[t];o=r.$context||(r.$context=c_(this.getContext(),t,r)),o.parsed=this.getParsed(t),o.raw=s.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=l_(this.chart.getContext(),this.index)),o.dataset=s,o.index=o.datasetIndex=this.index;return o.active=!!e,o.mode=i,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const s=e==="active",o=this._cachedDataOpts,r=t+"-"+e,a=o[r],c=this.enableOptionSharing&&ti(i);if(a)return Ml(a,c);const d=this.chart.config,u=d.datasetElementScopeKeys(this._type,t),h=s?[`${t}Hover`,"hover",t,""]:[t,""],f=d.getOptionScopes(this.getDataset(),u),m=Object.keys(gt.elements[t]),p=()=>this.getContext(i,s,e),g=d.resolveNamedOptions(f,m,p,h);return g.$shared&&(g.$shared=c,o[r]=Object.freeze(Ml(g,c))),g}_resolveAnimations(t,e,i){const s=this.chart,o=this._cachedDataOpts,r=`animation-${e}`,a=o[r];if(a)return a;let c;if(s.options.animation!==!1){const u=this.chart.config,h=u.datasetAnimationScopeKeys(this._type,e),f=u.getOptionScopes(this.getDataset(),h);c=u.createResolver(f,this.getContext(t,i,e))}const d=new _o(s,c&&c.animations);return c&&c._cacheable&&(o[r]=Object.freeze(d)),d}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||So(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),s=this._sharedOptions,o=this.getSharedOptions(i),r=this.includeOptions(e,o)||o!==s;return this.updateSharedOptions(o,e,i),{sharedOptions:o,includeOptions:r}}updateElement(t,e,i,s){So(s)?Object.assign(t,i):this._resolveAnimations(e,s).update(t,i)}updateSharedOptions(t,e,i){t&&!So(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,s){t.active=s;const o=this.getStyle(e,s);this._resolveAnimations(e,i,s).update(t,{options:!s&&this.getSharedOptions(o)||o})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[a,c,d]of this._syncList)this[a](c,d);this._syncList=[];const s=i.length,o=e.length,r=Math.min(o,s);r&&this.parse(0,r),o>s?this._insertElements(s,o-s,t):o<s&&this._removeElements(o,s-o)}_insertElements(t,e,i=!0){const s=this._cachedMeta,o=s.data,r=t+e;let a;const c=d=>{for(d.length+=e,a=d.length-1;a>=r;a--)d[a]=d[a-e]};for(c(o),a=t;a<r;++a)o[a]=new this.dataElementType;this._parsing&&c(s._parsed),this.parse(t,e),i&&this.updateElements(o,t,e,"reset")}updateElements(t,e,i,s){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const s=i._parsed.splice(t,e);i._stacked&&ci(i,s)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,s]=t;this[e](i,s)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}L(Kt,"defaults",{}),L(Kt,"datasetElementType",null),L(Kt,"dataElementType",null);function u_(n,t){if(!n._cache.$bar){const e=n.getMatchingVisibleMetas(t);let i=[];for(let s=0,o=e.length;s<o;s++)i=i.concat(e[s].controller.getAllParsedValues(n));n._cache.$bar=Ka(i.sort((s,o)=>s-o))}return n._cache.$bar}function h_(n){const t=n.iScale,e=u_(t,n.type);let i=t._length,s,o,r,a;const c=()=>{r===32767||r===-32768||(ti(a)&&(i=Math.min(i,Math.abs(r-a)||i)),a=r)};for(s=0,o=e.length;s<o;++s)r=t.getPixelForValue(e[s]),c();for(a=void 0,s=0,o=t.ticks.length;s<o;++s)r=t.getPixelForTick(s),c();return i}function f_(n,t,e,i){const s=e.barThickness;let o,r;return it(s)?(o=t.min*e.categoryPercentage,r=e.barPercentage):(o=s*i,r=1),{chunk:o/i,ratio:r,start:t.pixels[n]-o/2}}function m_(n,t,e,i){const s=t.pixels,o=s[n];let r=n>0?s[n-1]:null,a=n<s.length-1?s[n+1]:null;const c=e.categoryPercentage;r===null&&(r=o-(a===null?t.end-t.start:a-o)),a===null&&(a=o+o-r);const d=o-(o-Math.min(r,a))/2*c;return{chunk:Math.abs(a-r)/2*c/i,ratio:e.barPercentage,start:d}}function p_(n,t,e,i){const s=e.parse(n[0],i),o=e.parse(n[1],i),r=Math.min(s,o),a=Math.max(s,o);let c=r,d=a;Math.abs(r)>Math.abs(a)&&(c=a,d=r),t[e.axis]=d,t._custom={barStart:c,barEnd:d,start:s,end:o,min:r,max:a}}function Vl(n,t,e,i){return _t(n)?p_(n,t,e,i):t[e.axis]=e.parse(n,i),t}function Al(n,t,e,i){const s=n.iScale,o=n.vScale,r=s.getLabels(),a=s===o,c=[];let d,u,h,f;for(d=e,u=e+i;d<u;++d)f=t[d],h={},h[s.axis]=a||s.parse(r[d],d),c.push(Vl(f,h,o,d));return c}function wo(n){return n&&n.barStart!==void 0&&n.barEnd!==void 0}function g_(n,t,e){return n!==0?ce(n):(t.isHorizontal()?1:-1)*(t.min>=e?1:-1)}function y_(n){let t,e,i,s,o;return n.horizontal?(t=n.base>n.x,e="left",i="right"):(t=n.base<n.y,e="bottom",i="top"),t?(s="end",o="start"):(s="start",o="end"),{start:e,end:i,reverse:t,top:s,bottom:o}}function b_(n,t,e,i){let s=t.borderSkipped;const o={};if(!s){n.borderSkipped=o;return}if(s===!0){n.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:r,end:a,reverse:c,top:d,bottom:u}=y_(n);s==="middle"&&e&&(n.enableBorderRadius=!0,(e._top||0)===i?s=d:(e._bottom||0)===i?s=u:(o[Fl(u,r,a,c)]=!0,s=d)),o[Fl(s,r,a,c)]=!0,n.borderSkipped=o}function Fl(n,t,e,i){return i?(n=__(n,t,e),n=Bl(n,e,t)):n=Bl(n,t,e),n}function __(n,t,e){return n===t?e:n===e?t:n}function Bl(n,t,e){return n==="start"?t:n==="end"?e:n}function x_(n,{inflateAmount:t},e){n.inflateAmount=t==="auto"?e===1?.33:0:t}class di extends Kt{parsePrimitiveData(t,e,i,s){return Al(t,e,i,s)}parseArrayData(t,e,i,s){return Al(t,e,i,s)}parseObjectData(t,e,i,s){const{iScale:o,vScale:r}=t,{xAxisKey:a="x",yAxisKey:c="y"}=this._parsing,d=o.axis==="x"?a:c,u=r.axis==="x"?a:c,h=[];let f,m,p,g;for(f=i,m=i+s;f<m;++f)g=e[f],p={},p[o.axis]=o.parse(Re(g,d),f),h.push(Vl(Re(g,u),p,r,f));return h}updateRangeFromParsed(t,e,i,s){super.updateRangeFromParsed(t,e,i,s);const o=i._custom;o&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:s}=e,o=this.getParsed(t),r=o._custom,a=wo(r)?"["+r.start+", "+r.end+"]":""+s.getLabelForValue(o[s.axis]);return{label:""+i.getLabelForValue(o[i.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,s){const o=s==="reset",{index:r,_cachedMeta:{vScale:a}}=this,c=a.getBasePixel(),d=a.isHorizontal(),u=this._getRuler(),{sharedOptions:h,includeOptions:f}=this._getSharedOptions(e,s);for(let m=e;m<e+i;m++){const p=this.getParsed(m),g=o||it(p[a.axis])?{base:c,head:c}:this._calculateBarValuePixels(m),y=this._calculateBarIndexPixels(m,u),b=(p._stacks||{})[a.axis],_={horizontal:d,base:g.base,enableBorderRadius:!b||wo(p._custom)||r===b._top||r===b._bottom,x:d?g.head:y.center,y:d?y.center:g.head,height:d?y.size:Math.abs(g.size),width:d?Math.abs(g.size):y.size};f&&(_.options=h||this.resolveDataElementOptions(m,t[m].active?"active":s));const w=_.options||t[m].options;b_(_,w,b,r),x_(_,w,u.ratio),this.updateElement(t[m],m,_,s)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,s=i.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),o=i.options.stacked,r=[],a=this._cachedMeta.controller.getParsed(e),c=a&&a[i.axis],d=u=>{const h=u._parsed.find(m=>m[i.axis]===c),f=h&&h[u.vScale.axis];if(it(f)||isNaN(f))return!0};for(const u of s)if(!(e!==void 0&&d(u))&&((o===!1||r.indexOf(u.stack)===-1||o===void 0&&u.stack===void 0)&&r.push(u.stack),u.index===t))break;return r.length||r.push(void 0),r}_getStackCount(t){return this._getStacks(void 0,t).length}_getStackIndex(t,e,i){const s=this._getStacks(t,i),o=e!==void 0?s.indexOf(e):-1;return o===-1?s.length-1:o}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,s=[];let o,r;for(o=0,r=e.data.length;o<r;++o)s.push(i.getPixelForValue(this.getParsed(o)[i.axis],o));const a=t.barThickness;return{min:a||h_(e),pixels:s,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:s},options:{base:o,minBarLength:r}}=this,a=o||0,c=this.getParsed(t),d=c._custom,u=wo(d);let h=c[e.axis],f=0,m=i?this.applyStack(e,c,i):h,p,g;m!==h&&(f=m-h,m=h),u&&(h=d.barStart,m=d.barEnd-d.barStart,h!==0&&ce(h)!==ce(d.barEnd)&&(f=0),f+=h);const y=!it(o)&&!u?o:f;let b=e.getPixelForValue(y);if(this.chart.getDataVisibility(t)?p=e.getPixelForValue(f+m):p=b,g=p-b,Math.abs(g)<r){g=g_(g,e,a)*r,h===a&&(b-=g/2);const _=e.getPixelForDecimal(0),w=e.getPixelForDecimal(1),E=Math.min(_,w),k=Math.max(_,w);b=Math.max(Math.min(b,k),E),p=b+g,i&&!u&&(c._stacks[e.axis]._visualValues[s]=e.getValueForPixel(p)-e.getValueForPixel(b))}if(b===e.getPixelForValue(a)){const _=ce(g)*e.getLineWidthForValue(a)/2;b+=_,g-=_}return{size:g,base:b,head:p,center:p+g/2}}_calculateBarIndexPixels(t,e){const i=e.scale,s=this.options,o=s.skipNull,r=Q(s.maxBarThickness,1/0);let a,c;if(e.grouped){const d=o?this._getStackCount(t):e.stackCount,u=s.barThickness==="flex"?m_(t,e,s,d):f_(t,e,s,d),h=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0);a=u.start+u.chunk*h+u.chunk/2,c=Math.min(r,u.chunk*u.ratio)}else a=i.getPixelForValue(this.getParsed(t)[i.axis],t),c=Math.min(r,e.min*e.ratio);return{base:a-c/2,head:a+c/2,center:a,size:c}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,s=i.length;let o=0;for(;o<s;++o)this.getParsed(o)[e.axis]!==null&&!i[o].hidden&&i[o].draw(this._ctx)}}L(di,"id","bar"),L(di,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),L(di,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});class ui extends Kt{initialize(){this.enableOptionSharing=!0,super.initialize()}parsePrimitiveData(t,e,i,s){const o=super.parsePrimitiveData(t,e,i,s);for(let r=0;r<o.length;r++)o[r]._custom=this.resolveDataElementOptions(r+i).radius;return o}parseArrayData(t,e,i,s){const o=super.parseArrayData(t,e,i,s);for(let r=0;r<o.length;r++){const a=e[i+r];o[r]._custom=Q(a[2],this.resolveDataElementOptions(r+i).radius)}return o}parseObjectData(t,e,i,s){const o=super.parseObjectData(t,e,i,s);for(let r=0;r<o.length;r++){const a=e[i+r];o[r]._custom=Q(a&&a.r&&+a.r,this.resolveDataElementOptions(r+i).radius)}return o}getMaxOverflow(){const t=this._cachedMeta.data;let e=0;for(let i=t.length-1;i>=0;--i)e=Math.max(e,t[i].size(this.resolveDataElementOptions(i))/2);return e>0&&e}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:o}=e,r=this.getParsed(t),a=s.getLabelForValue(r.x),c=o.getLabelForValue(r.y),d=r._custom;return{label:i[t]||"",value:"("+a+", "+c+(d?", "+d:"")+")"}}update(t){const e=this._cachedMeta.data;this.updateElements(e,0,e.length,t)}updateElements(t,e,i,s){const o=s==="reset",{iScale:r,vScale:a}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(e,s),u=r.axis,h=a.axis;for(let f=e;f<e+i;f++){const m=t[f],p=!o&&this.getParsed(f),g={},y=g[u]=o?r.getPixelForDecimal(.5):r.getPixelForValue(p[u]),b=g[h]=o?a.getBasePixel():a.getPixelForValue(p[h]);g.skip=isNaN(y)||isNaN(b),d&&(g.options=c||this.resolveDataElementOptions(f,m.active?"active":s),o&&(g.options.radius=0)),this.updateElement(m,f,g,s)}}resolveDataElementOptions(t,e){const i=this.getParsed(t);let s=super.resolveDataElementOptions(t,e);s.$shared&&(s=Object.assign({},s,{$shared:!1}));const o=s.radius;return e!=="active"&&(s.radius=0),s.radius+=Q(i&&i._custom,o),s}}L(ui,"id","bubble"),L(ui,"defaults",{datasetElementType:!1,dataElementType:"point",animations:{numbers:{type:"number",properties:["x","y","borderWidth","radius"]}}}),L(ui,"overrides",{scales:{x:{type:"linear"},y:{type:"linear"}}});function k_(n,t,e){let i=1,s=1,o=0,r=0;if(t<pt){const a=n,c=a+t,d=Math.cos(a),u=Math.sin(a),h=Math.cos(c),f=Math.sin(c),m=(w,E,k)=>ni(w,a,c,!0)?1:Math.max(E,E*e,k,k*e),p=(w,E,k)=>ni(w,a,c,!0)?-1:Math.min(E,E*e,k,k*e),g=m(0,d,h),y=m(wt,u,f),b=p(mt,d,h),_=p(mt+wt,u,f);i=(g-b)/2,s=(y-_)/2,o=-(g+b)/2,r=-(y+_)/2}return{ratioX:i,ratioY:s,offsetX:o,offsetY:r}}class ze extends Kt{constructor(t,e){super(t,e),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,e){const i=this.getDataset().data,s=this._cachedMeta;if(this._parsing===!1)s._parsed=i;else{let o=c=>+i[c];if(et(i[t])){const{key:c="value"}=this._parsing;o=d=>+Re(i[d],c)}let r,a;for(r=t,a=t+e;r<a;++r)s._parsed[r]=o(r)}}_getRotation(){return ie(this.options.rotation-90)}_getCircumference(){return ie(this.options.circumference)}_getRotationExtents(){let t=pt,e=-pt;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const s=this.chart.getDatasetMeta(i).controller,o=s._getRotation(),r=s._getCircumference();t=Math.min(t,o),e=Math.max(e,o+r)}return{rotation:t,circumference:e-t}}update(t){const e=this.chart,{chartArea:i}=e,s=this._cachedMeta,o=s.data,r=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,a=Math.max((Math.min(i.width,i.height)-r)/2,0),c=Math.min(By(this.options.cutout,a),1),d=this._getRingWeight(this.index),{circumference:u,rotation:h}=this._getRotationExtents(),{ratioX:f,ratioY:m,offsetX:p,offsetY:g}=k_(h,u,c),y=(i.width-r)/f,b=(i.height-r)/m,_=Math.max(Math.min(y,b)/2,0),w=$a(this.options.radius,_),E=Math.max(w*c,0),k=(w-E)/this._getVisibleDatasetWeightTotal();this.offsetX=p*w,this.offsetY=g*w,s.total=this.calculateTotal(),this.outerRadius=w-k*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-k*d,0),this.updateElements(o,0,o.length,t)}_circumference(t,e){const i=this.options,s=this._cachedMeta,o=this._getCircumference();return e&&i.animation.animateRotate||!this.chart.getDataVisibility(t)||s._parsed[t]===null||s.data[t].hidden?0:this.calculateCircumference(s._parsed[t]*o/pt)}updateElements(t,e,i,s){const o=s==="reset",r=this.chart,a=r.chartArea,d=r.options.animation,u=(a.left+a.right)/2,h=(a.top+a.bottom)/2,f=o&&d.animateScale,m=f?0:this.innerRadius,p=f?0:this.outerRadius,{sharedOptions:g,includeOptions:y}=this._getSharedOptions(e,s);let b=this._getRotation(),_;for(_=0;_<e;++_)b+=this._circumference(_,o);for(_=e;_<e+i;++_){const w=this._circumference(_,o),E=t[_],k={x:u+this.offsetX,y:h+this.offsetY,startAngle:b,endAngle:b+w,circumference:w,outerRadius:p,innerRadius:m};y&&(k.options=g||this.resolveDataElementOptions(_,E.active?"active":s)),b+=w,this.updateElement(E,_,k,s)}}calculateTotal(){const t=this._cachedMeta,e=t.data;let i=0,s;for(s=0;s<e.length;s++){const o=t._parsed[s];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(s)&&!e[s].hidden&&(i+=Math.abs(o))}return i}calculateCircumference(t){const e=this._cachedMeta.total;return e>0&&!isNaN(t)?pt*(Math.abs(t)/e):0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],o=si(e._parsed[t],i.options.locale);return{label:s[t]||"",value:o}}getMaxBorderWidth(t){let e=0;const i=this.chart;let s,o,r,a,c;if(!t){for(s=0,o=i.data.datasets.length;s<o;++s)if(i.isDatasetVisible(s)){r=i.getDatasetMeta(s),t=r.data,a=r.controller;break}}if(!t)return 0;for(s=0,o=t.length;s<o;++s)c=a.resolveDataElementOptions(s),c.borderAlign!=="inner"&&(e=Math.max(e,c.borderWidth||0,c.hoverBorderWidth||0));return e}getMaxOffset(t){let e=0;for(let i=0,s=t.length;i<s;++i){const o=this.resolveDataElementOptions(i);e=Math.max(e,o.offset||0,o.hoverOffset||0)}return e}_getRingWeightOffset(t){let e=0;for(let i=0;i<t;++i)this.chart.isDatasetVisible(i)&&(e+=this._getRingWeight(i));return e}_getRingWeight(t){return Math.max(Q(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}L(ze,"id","doughnut"),L(ze,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),L(ze,"descriptors",{_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")}),L(ze,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map((o,r)=>{const c=t.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:s,lineWidth:c.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}}});class hi extends Kt{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:s=[],_dataset:o}=e,r=this.chart._animationsDisabled;let{start:a,count:c}=Qa(e,s,r);this._drawStart=a,this._drawCount=c,Ja(e)&&(a=0,c=s.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!o._decimated,i.points=s;const d=this.resolveDatasetElementOptions(t);this.options.showLine||(d.borderWidth=0),d.segment=this.options.segment,this.updateElement(i,void 0,{animated:!r,options:d},t),this.updateElements(s,a,c,t)}updateElements(t,e,i,s){const o=s==="reset",{iScale:r,vScale:a,_stacked:c,_dataset:d}=this._cachedMeta,{sharedOptions:u,includeOptions:h}=this._getSharedOptions(e,s),f=r.axis,m=a.axis,{spanGaps:p,segment:g}=this.options,y=_n(p)?p:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||s==="none",_=e+i,w=t.length;let E=e>0&&this.getParsed(e-1);for(let k=0;k<w;++k){const v=t[k],S=b?v:{};if(k<e||k>=_){S.skip=!0;continue}const x=this.getParsed(k),O=it(x[m]),M=S[f]=r.getPixelForValue(x[f],k),C=S[m]=o||O?a.getBasePixel():a.getPixelForValue(c?this.applyStack(a,x,c):x[m],k);S.skip=isNaN(M)||isNaN(C)||O,S.stop=k>0&&Math.abs(x[f]-E[f])>y,g&&(S.parsed=x,S.raw=d.data[k]),h&&(S.options=u||this.resolveDataElementOptions(k,v.active?"active":s)),b||this.updateElement(v,k,S,s),E=x}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,s=t.data||[];if(!s.length)return i;const o=s[0].size(this.resolveDataElementOptions(0)),r=s[s.length-1].size(this.resolveDataElementOptions(s.length-1));return Math.max(i,o,r)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}L(hi,"id","line"),L(hi,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),L(hi,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class wn extends Kt{constructor(t,e){super(t,e),this.innerRadius=void 0,this.outerRadius=void 0}getLabelAndValue(t){const e=this._cachedMeta,i=this.chart,s=i.data.labels||[],o=si(e._parsed[t].r,i.options.locale);return{label:s[t]||"",value:o}}parseObjectData(t,e,i,s){return fl.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta.data;this._updateRadius(),this.updateElements(e,0,e.length,t)}getMinMax(){const t=this._cachedMeta,e={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY};return t.data.forEach((i,s)=>{const o=this.getParsed(s).r;!isNaN(o)&&this.chart.getDataVisibility(s)&&(o<e.min&&(e.min=o),o>e.max&&(e.max=o))}),e}_updateRadius(){const t=this.chart,e=t.chartArea,i=t.options,s=Math.min(e.right-e.left,e.bottom-e.top),o=Math.max(s/2,0),r=Math.max(i.cutoutPercentage?o/100*i.cutoutPercentage:1,0),a=(o-r)/t.getVisibleDatasetCount();this.outerRadius=o-a*this.index,this.innerRadius=this.outerRadius-a}updateElements(t,e,i,s){const o=s==="reset",r=this.chart,c=r.options.animation,d=this._cachedMeta.rScale,u=d.xCenter,h=d.yCenter,f=d.getIndexAngle(0)-.5*mt;let m=f,p;const g=360/this.countVisibleElements();for(p=0;p<e;++p)m+=this._computeAngle(p,s,g);for(p=e;p<e+i;p++){const y=t[p];let b=m,_=m+this._computeAngle(p,s,g),w=r.getDataVisibility(p)?d.getDistanceFromCenterForValue(this.getParsed(p).r):0;m=_,o&&(c.animateScale&&(w=0),c.animateRotate&&(b=_=f));const E={x:u,y:h,innerRadius:0,outerRadius:w,startAngle:b,endAngle:_,options:this.resolveDataElementOptions(p,y.active?"active":s)};this.updateElement(y,p,E,s)}}countVisibleElements(){const t=this._cachedMeta;let e=0;return t.data.forEach((i,s)=>{!isNaN(this.getParsed(s).r)&&this.chart.getDataVisibility(s)&&e++}),e}_computeAngle(t,e,i){return this.chart.getDataVisibility(t)?ie(this.resolveDataElementOptions(t,e).angle||i):0}}L(wn,"id","polarArea"),L(wn,"defaults",{dataElementType:"arc",animation:{animateRotate:!0,animateScale:!0},animations:{numbers:{type:"number",properties:["x","y","startAngle","endAngle","innerRadius","outerRadius"]}},indexAxis:"r",startAngle:0}),L(wn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const e=t.data;if(e.labels.length&&e.datasets.length){const{labels:{pointStyle:i,color:s}}=t.legend.options;return e.labels.map((o,r)=>{const c=t.getDatasetMeta(0).controller.getStyle(r);return{text:o,fillStyle:c.backgroundColor,strokeStyle:c.borderColor,fontColor:s,lineWidth:c.borderWidth,pointStyle:i,hidden:!t.getDataVisibility(r),index:r}})}return[]}},onClick(t,e,i){i.chart.toggleDataVisibility(e.index),i.chart.update()}}},scales:{r:{type:"radialLinear",angleLines:{display:!1},beginAtZero:!0,grid:{circular:!0},pointLabels:{display:!1},startAngle:0}}});class os extends ze{}L(os,"id","pie"),L(os,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class fi extends Kt{getLabelAndValue(t){const e=this._cachedMeta.vScale,i=this.getParsed(t);return{label:e.getLabels()[t],value:""+e.getLabelForValue(i[e.axis])}}parseObjectData(t,e,i,s){return fl.bind(this)(t,e,i,s)}update(t){const e=this._cachedMeta,i=e.dataset,s=e.data||[],o=e.iScale.getLabels();if(i.points=s,t!=="resize"){const r=this.resolveDatasetElementOptions(t);this.options.showLine||(r.borderWidth=0);const a={_loop:!0,_fullLoop:o.length===s.length,options:r};this.updateElement(i,void 0,a,t)}this.updateElements(s,0,s.length,t)}updateElements(t,e,i,s){const o=this._cachedMeta.rScale,r=s==="reset";for(let a=e;a<e+i;a++){const c=t[a],d=this.resolveDataElementOptions(a,c.active?"active":s),u=o.getPointPositionForValue(a,this.getParsed(a).r),h=r?o.xCenter:u.x,f=r?o.yCenter:u.y,m={x:h,y:f,angle:u.angle,skip:isNaN(h)||isNaN(f),options:d};this.updateElement(c,a,m,s)}}}L(fi,"id","radar"),L(fi,"defaults",{datasetElementType:"line",dataElementType:"point",indexAxis:"r",showLine:!0,elements:{line:{fill:"start"}}}),L(fi,"overrides",{aspectRatio:1,scales:{r:{type:"radialLinear"}}});class mi extends Kt{getLabelAndValue(t){const e=this._cachedMeta,i=this.chart.data.labels||[],{xScale:s,yScale:o}=e,r=this.getParsed(t),a=s.getLabelForValue(r.x),c=o.getLabelForValue(r.y);return{label:i[t]||"",value:"("+a+", "+c+")"}}update(t){const e=this._cachedMeta,{data:i=[]}=e,s=this.chart._animationsDisabled;let{start:o,count:r}=Qa(e,i,s);if(this._drawStart=o,this._drawCount=r,Ja(e)&&(o=0,r=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:c}=e;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!c._decimated,a.points=i;const d=this.resolveDatasetElementOptions(t);d.segment=this.options.segment,this.updateElement(a,void 0,{animated:!s,options:d},t)}else this.datasetElementType&&(delete e.dataset,this.datasetElementType=!1);this.updateElements(i,o,r,t)}addElements(){const{showLine:t}=this.options;!this.datasetElementType&&t&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(t,e,i,s){const o=s==="reset",{iScale:r,vScale:a,_stacked:c,_dataset:d}=this._cachedMeta,u=this.resolveDataElementOptions(e,s),h=this.getSharedOptions(u),f=this.includeOptions(s,h),m=r.axis,p=a.axis,{spanGaps:g,segment:y}=this.options,b=_n(g)?g:Number.POSITIVE_INFINITY,_=this.chart._animationsDisabled||o||s==="none";let w=e>0&&this.getParsed(e-1);for(let E=e;E<e+i;++E){const k=t[E],v=this.getParsed(E),S=_?k:{},x=it(v[p]),O=S[m]=r.getPixelForValue(v[m],E),M=S[p]=o||x?a.getBasePixel():a.getPixelForValue(c?this.applyStack(a,v,c):v[p],E);S.skip=isNaN(O)||isNaN(M)||x,S.stop=E>0&&Math.abs(v[m]-w[m])>b,y&&(S.parsed=v,S.raw=d.data[E]),f&&(S.options=h||this.resolveDataElementOptions(E,k.active?"active":s)),_||this.updateElement(k,E,S,s),w=v}this.updateSharedOptions(h,s,u)}getMaxOverflow(){const t=this._cachedMeta,e=t.data||[];if(!this.options.showLine){let a=0;for(let c=e.length-1;c>=0;--c)a=Math.max(a,e[c].size(this.resolveDataElementOptions(c))/2);return a>0&&a}const i=t.dataset,s=i.options&&i.options.borderWidth||0;if(!e.length)return s;const o=e[0].size(this.resolveDataElementOptions(0)),r=e[e.length-1].size(this.resolveDataElementOptions(e.length-1));return Math.max(s,o,r)/2}}L(mi,"id","scatter"),L(mi,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),L(mi,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});var $l=Object.freeze({__proto__:null,BarController:di,BubbleController:ui,DoughnutController:ze,LineController:hi,PieController:os,PolarAreaController:wn,RadarController:fi,ScatterController:mi});function rn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Eo{constructor(t){L(this,"options");this.options=t||{}}static override(t){Object.assign(Eo.prototype,t)}init(){}formats(){return rn()}parse(){return rn()}format(){return rn()}add(){return rn()}diff(){return rn()}startOf(){return rn()}endOf(){return rn()}}var Rl={_date:Eo};function S_(n,t,e,i){const{controller:s,data:o,_sorted:r}=n,a=s._cachedMeta.iScale;if(a&&t===a.axis&&t!=="r"&&r&&o.length){const c=a._reversePixels?Ky:Ee;if(i){if(s._sharedOptions){const d=o[0],u=typeof d.getRange=="function"&&d.getRange(t);if(u){const h=c(o,t,e-u),f=c(o,t,e+u);return{lo:h.lo,hi:f.hi}}}}else return c(o,t,e)}return{lo:0,hi:o.length-1}}function pi(n,t,e,i,s){const o=n.getSortedVisibleDatasetMetas(),r=e[t];for(let a=0,c=o.length;a<c;++a){const{index:d,data:u}=o[a],{lo:h,hi:f}=S_(o[a],t,r,s);for(let m=h;m<=f;++m){const p=u[m];p.skip||i(p,d,m)}}}function w_(n){const t=n.indexOf("x")!==-1,e=n.indexOf("y")!==-1;return function(i,s){const o=t?Math.abs(i.x-s.x):0,r=e?Math.abs(i.y-s.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(r,2))}}function vo(n,t,e,i,s){const o=[];return!s&&!n.isPointInArea(t)||pi(n,e,t,function(a,c,d){!s&&!ve(a,n.chartArea,0)||a.inRange(t.x,t.y,i)&&o.push({element:a,datasetIndex:c,index:d})},!0),o}function E_(n,t,e,i){let s=[];function o(r,a,c){const{startAngle:d,endAngle:u}=r.getProps(["startAngle","endAngle"],i),{angle:h}=Ua(r,{x:t.x,y:t.y});ni(h,d,u)&&s.push({element:r,datasetIndex:a,index:c})}return pi(n,e,t,o),s}function v_(n,t,e,i,s,o){let r=[];const a=w_(e);let c=Number.POSITIVE_INFINITY;function d(u,h,f){const m=u.inRange(t.x,t.y,s);if(i&&!m)return;const p=u.getCenterPoint(s);if(!(!!o||n.isPointInArea(p))&&!m)return;const y=a(t,p);y<c?(r=[{element:u,datasetIndex:h,index:f}],c=y):y===c&&r.push({element:u,datasetIndex:h,index:f})}return pi(n,e,t,d),r}function Co(n,t,e,i,s,o){return!o&&!n.isPointInArea(t)?[]:e==="r"&&!i?E_(n,t,e,s):v_(n,t,e,i,s,o)}function Ll(n,t,e,i,s){const o=[],r=e==="x"?"inXRange":"inYRange";let a=!1;return pi(n,e,t,(c,d,u)=>{c[r]&&c[r](t[e],s)&&(o.push({element:c,datasetIndex:d,index:u}),a=a||c.inRange(t.x,t.y,s))}),i&&!a?[]:o}var Il={evaluateInteractionItems:pi,modes:{index(n,t,e,i){const s=sn(t,n),o=e.axis||"x",r=e.includeInvisible||!1,a=e.intersect?vo(n,s,o,i,r):Co(n,s,o,!1,i,r),c=[];return a.length?(n.getSortedVisibleDatasetMetas().forEach(d=>{const u=a[0].index,h=d.data[u];h&&!h.skip&&c.push({element:h,datasetIndex:d.index,index:u})}),c):[]},dataset(n,t,e,i){const s=sn(t,n),o=e.axis||"xy",r=e.includeInvisible||!1;let a=e.intersect?vo(n,s,o,i,r):Co(n,s,o,!1,i,r);if(a.length>0){const c=a[0].datasetIndex,d=n.getDatasetMeta(c).data;a=[];for(let u=0;u<d.length;++u)a.push({element:d[u],datasetIndex:c,index:u})}return a},point(n,t,e,i){const s=sn(t,n),o=e.axis||"xy",r=e.includeInvisible||!1;return vo(n,s,o,i,r)},nearest(n,t,e,i){const s=sn(t,n),o=e.axis||"xy",r=e.includeInvisible||!1;return Co(n,s,o,e.intersect,i,r)},x(n,t,e,i){const s=sn(t,n);return Ll(n,s,"x",e.intersect,i)},y(n,t,e,i){const s=sn(t,n);return Ll(n,s,"y",e.intersect,i)}}};const jl=["left","top","right","bottom"];function gi(n,t){return n.filter(e=>e.pos===t)}function zl(n,t){return n.filter(e=>jl.indexOf(e.pos)===-1&&e.box.axis===t)}function yi(n,t){return n.sort((e,i)=>{const s=t?i:e,o=t?e:i;return s.weight===o.weight?s.index-o.index:s.weight-o.weight})}function C_(n){const t=[];let e,i,s,o,r,a;for(e=0,i=(n||[]).length;e<i;++e)s=n[e],{position:o,options:{stack:r,stackWeight:a=1}}=s,t.push({index:e,box:s,pos:o,horizontal:s.isHorizontal(),weight:s.weight,stack:r&&o+r,stackWeight:a});return t}function O_(n){const t={};for(const e of n){const{stack:i,pos:s,stackWeight:o}=e;if(!i||!jl.includes(s))continue;const r=t[i]||(t[i]={count:0,placed:0,weight:0,size:0});r.count++,r.weight+=o}return t}function D_(n,t){const e=O_(n),{vBoxMaxWidth:i,hBoxMaxHeight:s}=t;let o,r,a;for(o=0,r=n.length;o<r;++o){a=n[o];const{fullSize:c}=a.box,d=e[a.stack],u=d&&a.stackWeight/d.weight;a.horizontal?(a.width=u?u*i:c&&t.availableWidth,a.height=s):(a.width=i,a.height=u?u*s:c&&t.availableHeight)}return e}function N_(n){const t=C_(n),e=yi(t.filter(d=>d.box.fullSize),!0),i=yi(gi(t,"left"),!0),s=yi(gi(t,"right")),o=yi(gi(t,"top"),!0),r=yi(gi(t,"bottom")),a=zl(t,"x"),c=zl(t,"y");return{fullSize:e,leftAndTop:i.concat(o),rightAndBottom:s.concat(c).concat(r).concat(a),chartArea:gi(t,"chartArea"),vertical:i.concat(s).concat(c),horizontal:o.concat(r).concat(a)}}function Wl(n,t,e,i){return Math.max(n[e],t[e])+Math.max(n[i],t[i])}function Hl(n,t){n.top=Math.max(n.top,t.top),n.left=Math.max(n.left,t.left),n.bottom=Math.max(n.bottom,t.bottom),n.right=Math.max(n.right,t.right)}function T_(n,t,e,i){const{pos:s,box:o}=e,r=n.maxPadding;if(!et(s)){e.size&&(n[s]-=e.size);const h=i[e.stack]||{size:0,count:1};h.size=Math.max(h.size,e.horizontal?o.height:o.width),e.size=h.size/h.count,n[s]+=e.size}o.getPadding&&Hl(r,o.getPadding());const a=Math.max(0,t.outerWidth-Wl(r,n,"left","right")),c=Math.max(0,t.outerHeight-Wl(r,n,"top","bottom")),d=a!==n.w,u=c!==n.h;return n.w=a,n.h=c,e.horizontal?{same:d,other:u}:{same:u,other:d}}function P_(n){const t=n.maxPadding;function e(i){const s=Math.max(t[i]-n[i],0);return n[i]+=s,s}n.y+=e("top"),n.x+=e("left"),e("right"),e("bottom")}function M_(n,t){const e=t.maxPadding;function i(s){const o={left:0,top:0,right:0,bottom:0};return s.forEach(r=>{o[r]=Math.max(t[r],e[r])}),o}return i(n?["left","right"]:["top","bottom"])}function bi(n,t,e,i){const s=[];let o,r,a,c,d,u;for(o=0,r=n.length,d=0;o<r;++o){a=n[o],c=a.box,c.update(a.width||t.w,a.height||t.h,M_(a.horizontal,t));const{same:h,other:f}=T_(t,e,a,i);d|=h&&s.length,u=u||f,c.fullSize||s.push(a)}return d&&bi(s,t,e,i)||u}function rs(n,t,e,i,s){n.top=e,n.left=t,n.right=t+i,n.bottom=e+s,n.width=i,n.height=s}function Ul(n,t,e,i){const s=e.padding;let{x:o,y:r}=t;for(const a of n){const c=a.box,d=i[a.stack]||{count:1,placed:0,weight:1},u=a.stackWeight/d.weight||1;if(a.horizontal){const h=t.w*u,f=d.size||c.height;ti(d.start)&&(r=d.start),c.fullSize?rs(c,s.left,r,e.outerWidth-s.right-s.left,f):rs(c,t.left+d.placed,r,h,f),d.start=r,d.placed+=h,r=c.bottom}else{const h=t.h*u,f=d.size||c.width;ti(d.start)&&(o=d.start),c.fullSize?rs(c,o,s.top,f,e.outerHeight-s.bottom-s.top):rs(c,o,t.top+d.placed,f,h),d.start=o,d.placed+=h,o=c.right}}t.x=o,t.y=r}var Pt={addBox(n,t){n.boxes||(n.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(e){t.draw(e)}}]},n.boxes.push(t)},removeBox(n,t){const e=n.boxes?n.boxes.indexOf(t):-1;e!==-1&&n.boxes.splice(e,1)},configure(n,t,e){t.fullSize=e.fullSize,t.position=e.position,t.weight=e.weight},update(n,t,e,i){if(!n)return;const s=Vt(n.options.layout.padding),o=Math.max(t-s.width,0),r=Math.max(e-s.height,0),a=N_(n.boxes),c=a.vertical,d=a.horizontal;lt(n.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const u=c.reduce((g,y)=>y.box.options&&y.box.options.display===!1?g:g+1,0)||1,h=Object.freeze({outerWidth:t,outerHeight:e,padding:s,availableWidth:o,availableHeight:r,vBoxMaxWidth:o/2/u,hBoxMaxHeight:r/2}),f=Object.assign({},s);Hl(f,Vt(i));const m=Object.assign({maxPadding:f,w:o,h:r,x:s.left,y:s.top},s),p=D_(c.concat(d),h);bi(a.fullSize,m,h,p),bi(c,m,h,p),bi(d,m,h,p)&&bi(c,m,h,p),P_(m),Ul(a.leftAndTop,m,h,p),m.x+=m.w,m.y+=m.h,Ul(a.rightAndBottom,m,h,p),n.chartArea={left:m.left,top:m.top,right:m.left+m.w,bottom:m.top+m.h,height:m.h,width:m.w},lt(a.chartArea,g=>{const y=g.box;Object.assign(y,n.chartArea),y.update(m.w,m.h,{left:0,top:0,right:0,bottom:0})})}};class Oo{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,s){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,s?Math.floor(e/s):i)}}isAttached(t){return!0}updateConfig(t){}}class ql extends Oo{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const as="$chartjs",V_={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Yl=n=>n===null||n==="";function A_(n,t){const e=n.style,i=n.getAttribute("height"),s=n.getAttribute("width");if(n[as]={initial:{height:i,width:s,style:{display:e.display,height:e.height,width:e.width}}},e.display=e.display||"block",e.boxSizing=e.boxSizing||"border-box",Yl(s)){const o=gl(n,"width");o!==void 0&&(n.width=o)}if(Yl(i))if(n.style.height==="")n.height=n.width/(t||2);else{const o=gl(n,"height");o!==void 0&&(n.height=o)}return n}const Kl=jb?{passive:!0}:!1;function F_(n,t,e){n&&n.addEventListener(t,e,Kl)}function B_(n,t,e){n&&n.canvas&&n.canvas.removeEventListener(t,e,Kl)}function $_(n,t){const e=V_[n.type]||n.type,{x:i,y:s}=sn(n,t);return{type:e,chart:t,native:n,x:i!==void 0?i:null,y:s!==void 0?s:null}}function ls(n,t){for(const e of n)if(e===t||e.contains(t))return!0}function R_(n,t,e){const i=n.canvas,s=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||ls(a.addedNodes,i),r=r&&!ls(a.removedNodes,i);r&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}function L_(n,t,e){const i=n.canvas,s=new MutationObserver(o=>{let r=!1;for(const a of o)r=r||ls(a.removedNodes,i),r=r&&!ls(a.addedNodes,i);r&&e()});return s.observe(document,{childList:!0,subtree:!0}),s}const _i=new Map;let Xl=0;function Gl(){const n=window.devicePixelRatio;n!==Xl&&(Xl=n,_i.forEach((t,e)=>{e.currentDevicePixelRatio!==n&&t()}))}function I_(n,t){_i.size||window.addEventListener("resize",Gl),_i.set(n,t)}function j_(n){_i.delete(n),_i.size||window.removeEventListener("resize",Gl)}function z_(n,t,e){const i=n.canvas,s=i&&bo(i);if(!s)return;const o=Ga((a,c)=>{const d=s.clientWidth;e(a,c),d<s.clientWidth&&e()},window),r=new ResizeObserver(a=>{const c=a[0],d=c.contentRect.width,u=c.contentRect.height;d===0&&u===0||o(d,u)});return r.observe(s),I_(n,o),r}function Do(n,t,e){e&&e.disconnect(),t==="resize"&&j_(n)}function W_(n,t,e){const i=n.canvas,s=Ga(o=>{n.ctx!==null&&e($_(o,n))},n);return F_(i,t,s),s}class Ql extends Oo{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(A_(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[as])return!1;const i=e[as].initial;["height","width"].forEach(o=>{const r=i[o];it(r)?e.removeAttribute(o):e.setAttribute(o,r)});const s=i.style||{};return Object.keys(s).forEach(o=>{e.style[o]=s[o]}),e.width=e.width,delete e[as],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const s=t.$proxies||(t.$proxies={}),r={attach:R_,detach:L_,resize:z_}[e]||W_;s[e]=r(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),s=i[e];if(!s)return;({attach:Do,detach:Do,resize:Do}[e]||B_)(t,e,s),i[e]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,s){return Ib(t,e,i,s)}isAttached(t){const e=t&&bo(t);return!!(e&&e.isConnected)}}function Jl(n){return!yo()||typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas?ql:Ql}class Xt{constructor(){L(this,"x");L(this,"y");L(this,"active",!1);L(this,"options");L(this,"$animations")}tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return _n(this.x)&&_n(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const s={};return t.forEach(o=>{s[o]=i[o]&&i[o].active()?i[o]._to:this[o]}),s}}L(Xt,"defaults",{}),L(Xt,"defaultRoutes");function H_(n,t){const e=n.options.ticks,i=U_(n),s=Math.min(e.maxTicksLimit||i,i),o=e.major.enabled?Y_(t):[],r=o.length,a=o[0],c=o[r-1],d=[];if(r>s)return K_(t,d,o,r/s),d;const u=q_(o,t,s);if(r>0){let h,f;const m=r>1?Math.round((c-a)/(r-1)):null;for(cs(t,d,u,it(m)?0:a-m,a),h=0,f=r-1;h<f;h++)cs(t,d,u,o[h],o[h+1]);return cs(t,d,u,c,it(m)?t.length:c+m),d}return cs(t,d,u),d}function U_(n){const t=n.options.offset,e=n._tickSize(),i=n._length/e+(t?0:1),s=n._maxLength/e;return Math.floor(Math.min(i,s))}function q_(n,t,e){const i=X_(n),s=t.length/e;if(!i)return Math.max(s,1);const o=Hy(i);for(let r=0,a=o.length-1;r<a;r++){const c=o[r];if(c>s)return c}return Math.max(s,1)}function Y_(n){const t=[];let e,i;for(e=0,i=n.length;e<i;e++)n[e].major&&t.push(e);return t}function K_(n,t,e,i){let s=0,o=e[0],r;for(i=Math.ceil(i),r=0;r<n.length;r++)r===o&&(t.push(n[r]),s++,o=e[s*i])}function cs(n,t,e,i,s){const o=Q(i,0),r=Math.min(Q(s,n.length),n.length);let a=0,c,d,u;for(e=Math.ceil(e),s&&(c=s-i,e=c/Math.floor(c/e)),u=o;u<0;)a++,u=Math.round(o+a*e);for(d=Math.max(o,0);d<r;d++)d===u&&(t.push(n[d]),a++,u=Math.round(o+a*e))}function X_(n){const t=n.length;let e,i;if(t<2)return!1;for(i=n[0],e=1;e<t;++e)if(n[e]-n[e-1]!==i)return!1;return i}const G_=n=>n==="left"?"right":n==="right"?"left":n,Zl=(n,t,e)=>t==="top"||t==="left"?n[t]+e:n[t]-e,tc=(n,t)=>Math.min(t||n,n);function ec(n,t){const e=[],i=n.length/t,s=n.length;let o=0;for(;o<s;o+=i)e.push(n[Math.floor(o)]);return e}function Q_(n,t,e){const i=n.ticks.length,s=Math.min(t,i-1),o=n._startPixel,r=n._endPixel,a=1e-6;let c=n.getPixelForTick(s),d;if(!(e&&(i===1?d=Math.max(c-o,r-c):t===0?d=(n.getPixelForTick(1)-c)/2:d=(c-n.getPixelForTick(s-1))/2,c+=s<t?d:-d,c<o-a||c>r+a)))return c}function J_(n,t){lt(n,e=>{const i=e.gc,s=i.length/2;let o;if(s>t){for(o=0;o<s;++o)delete e.data[i[o]];i.splice(0,s)}})}function xi(n){return n.drawTicks?n.tickLength:0}function nc(n,t){if(!n.display)return 0;const e=Ct(n.font,t),i=Vt(n.padding);return(_t(n.text)?n.text.length:1)*e.lineHeight+i.height}function Z_(n,t){return je(n,{scale:t,type:"scale"})}function t0(n,t,e){return je(n,{tick:e,index:t,type:"tick"})}function e0(n,t,e){let i=ro(n);return(e&&t!=="right"||!e&&t==="right")&&(i=G_(i)),i}function n0(n,t,e,i){const{top:s,left:o,bottom:r,right:a,chart:c}=n,{chartArea:d,scales:u}=c;let h=0,f,m,p;const g=r-s,y=a-o;if(n.isHorizontal()){if(m=Mt(i,o,a),et(e)){const b=Object.keys(e)[0],_=e[b];p=u[b].getPixelForValue(_)+g-t}else e==="center"?p=(d.bottom+d.top)/2+g-t:p=Zl(n,e,t);f=a-o}else{if(et(e)){const b=Object.keys(e)[0],_=e[b];m=u[b].getPixelForValue(_)-y+t}else e==="center"?m=(d.left+d.right)/2-y+t:m=Zl(n,e,t);p=Mt(i,r,s),h=e==="left"?-wt:wt}return{titleX:m,titleY:p,maxWidth:f,rotation:h}}class We extends Xt{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:s}=this;return t=zt(t,Number.POSITIVE_INFINITY),e=zt(e,Number.NEGATIVE_INFINITY),i=zt(i,Number.POSITIVE_INFINITY),s=zt(s,Number.NEGATIVE_INFINITY),{min:zt(t,i),max:zt(e,s),minDefined:St(t),maxDefined:St(e)}}getMinMax(t){let{min:e,max:i,minDefined:s,maxDefined:o}=this.getUserBounds(),r;if(s&&o)return{min:e,max:i};const a=this.getMatchingVisibleMetas();for(let c=0,d=a.length;c<d;++c)r=a[c].controller.getMinMax(this,t),s||(e=Math.min(e,r.min)),o||(i=Math.max(i,r.max));return e=o&&e>i?i:e,i=s&&e>i?e:i,{min:zt(e,zt(i,e)),max:zt(i,zt(e,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){ft(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:s,grace:o,ticks:r}=this.options,a=r.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=bb(this,o,s),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const c=a<this.ticks.length;this._convertTicksToLabels(c?ec(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),r.display&&(r.autoSkip||r.source==="auto")&&(this.ticks=H_(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),c&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,e,i;this.isHorizontal()?(e=this.left,i=this.right):(e=this.top,i=this.bottom,t=!t),this._startPixel=e,this._endPixel=i,this._reversePixels=t,this._length=i-e,this._alignToPixels=this.options.alignToPixels}afterUpdate(){ft(this.options.afterUpdate,[this])}beforeSetDimensions(){ft(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){ft(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),ft(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){ft(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,s,o;for(i=0,s=t.length;i<s;i++)o=t[i],o.label=ft(e.callback,[o.value,i,t],this)}afterTickToLabelConversion(){ft(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){ft(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=tc(this.ticks.length,t.ticks.maxTicksLimit),s=e.minRotation||0,o=e.maxRotation;let r=s,a,c,d;if(!this._isVisible()||!e.display||s>=o||i<=1||!this.isHorizontal()){this.labelRotation=s;return}const u=this._getLabelSizes(),h=u.widest.width,f=u.highest.height,m=Dt(this.chart.width-h,0,this.maxWidth);a=t.offset?this.maxWidth/i:m/(i-1),h+6>a&&(a=m/(i-(t.offset?.5:1)),c=this.maxHeight-xi(t.grid)-e.padding-nc(t.title,this.chart.options.font),d=Math.sqrt(h*h+f*f),r=io(Math.min(Math.asin(Dt((u.highest.height+6)/a,-1,1)),Math.asin(Dt(c/d,-1,1))-Math.asin(Dt(f/d,-1,1)))),r=Math.max(s,Math.min(o,r))),this.labelRotation=r}afterCalculateLabelRotation(){ft(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){ft(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:s,grid:o}}=this,r=this._isVisible(),a=this.isHorizontal();if(r){const c=nc(s,e.options.font);if(a?(t.width=this.maxWidth,t.height=xi(o)+c):(t.height=this.maxHeight,t.width=xi(o)+c),i.display&&this.ticks.length){const{first:d,last:u,widest:h,highest:f}=this._getLabelSizes(),m=i.padding*2,p=ie(this.labelRotation),g=Math.cos(p),y=Math.sin(p);if(a){const b=i.mirror?0:y*h.width+g*f.height;t.height=Math.min(this.maxHeight,t.height+b+m)}else{const b=i.mirror?0:g*h.width+y*f.height;t.width=Math.min(this.maxWidth,t.width+b+m)}this._calculatePadding(d,u,y,g)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,s){const{ticks:{align:o,padding:r},position:a}=this.options,c=this.labelRotation!==0,d=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,m=0;c?d?(f=s*t.width,m=i*e.height):(f=i*t.height,m=s*e.width):o==="start"?m=e.width:o==="end"?f=t.width:o!=="inner"&&(f=t.width/2,m=e.width/2),this.paddingLeft=Math.max((f-u+r)*this.width/(this.width-u),0),this.paddingRight=Math.max((m-h+r)*this.width/(this.width-h),0)}else{let u=e.height/2,h=t.height/2;o==="start"?(u=0,h=t.height):o==="end"&&(u=e.height,h=0),this.paddingTop=u+r,this.paddingBottom=h+r}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){ft(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return e==="top"||e==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let e,i;for(e=0,i=t.length;e<i;e++)it(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=ec(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:s,_longestTextCache:o}=this,r=[],a=[],c=Math.floor(e/tc(e,i));let d=0,u=0,h,f,m,p,g,y,b,_,w,E,k;for(h=0;h<e;h+=c){if(p=t[h].label,g=this._resolveTickFontOptions(h),s.font=y=g.string,b=o[y]=o[y]||{data:{},gc:[]},_=g.lineHeight,w=E=0,!it(p)&&!_t(p))w=Ji(s,b.data,b.gc,w,p),E=_;else if(_t(p))for(f=0,m=p.length;f<m;++f)k=p[f],!it(k)&&!_t(k)&&(w=Ji(s,b.data,b.gc,w,k),E+=_);r.push(w),a.push(E),d=Math.max(w,d),u=Math.max(E,u)}J_(o,e);const v=r.indexOf(d),S=a.indexOf(u),x=O=>({width:r[O]||0,height:a[O]||0});return{first:x(0),last:x(e-1),widest:x(v),highest:x(S),widths:r,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return Yy(this._alignToPixels?Ze(this.chart,e,0):e)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=t0(this.getContext(),t,i))}return this.$context||(this.$context=Z_(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,e=ie(this.labelRotation),i=Math.abs(Math.cos(e)),s=Math.abs(Math.sin(e)),o=this._getLabelSizes(),r=t.autoSkipPadding||0,a=o?o.widest.width+r:0,c=o?o.highest.height+r:0;return this.isHorizontal()?c*i>a*s?a/i:c/s:c*s<a*i?c/i:a/s}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,s=this.options,{grid:o,position:r,border:a}=s,c=o.offset,d=this.isHorizontal(),h=this.ticks.length+(c?1:0),f=xi(o),m=[],p=a.setContext(this.getContext()),g=p.display?p.width:0,y=g/2,b=function(B){return Ze(i,B,g)};let _,w,E,k,v,S,x,O,M,C,T,$;if(r==="top")_=b(this.bottom),S=this.bottom-f,O=_-y,C=b(t.top)+y,$=t.bottom;else if(r==="bottom")_=b(this.top),C=t.top,$=b(t.bottom)-y,S=_+y,O=this.top+f;else if(r==="left")_=b(this.right),v=this.right-f,x=_-y,M=b(t.left)+y,T=t.right;else if(r==="right")_=b(this.left),M=t.left,T=b(t.right)-y,v=_+y,x=this.left+f;else if(e==="x"){if(r==="center")_=b((t.top+t.bottom)/2+.5);else if(et(r)){const B=Object.keys(r)[0],I=r[B];_=b(this.chart.scales[B].getPixelForValue(I))}C=t.top,$=t.bottom,S=_+y,O=S+f}else if(e==="y"){if(r==="center")_=b((t.left+t.right)/2);else if(et(r)){const B=Object.keys(r)[0],I=r[B];_=b(this.chart.scales[B].getPixelForValue(I))}v=_-y,x=v-f,M=t.left,T=t.right}const U=Q(s.ticks.maxTicksLimit,h),H=Math.max(1,Math.ceil(h/U));for(w=0;w<h;w+=H){const B=this.getContext(w),I=o.setContext(B),F=a.setContext(B),P=I.lineWidth,R=I.color,W=F.dash||[],J=F.dashOffset,G=I.tickWidth,ot=I.tickColor,nt=I.tickBorderDash||[],Y=I.tickBorderDashOffset;E=Q_(this,w,c),E!==void 0&&(k=Ze(i,E,P),d?v=x=M=T=k:S=O=C=$=k,m.push({tx1:v,ty1:S,tx2:x,ty2:O,x1:M,y1:C,x2:T,y2:$,width:P,color:R,borderDash:W,borderDashOffset:J,tickWidth:G,tickColor:ot,tickBorderDash:nt,tickBorderDashOffset:Y}))}return this._ticksLength=h,this._borderValue=_,m}_computeLabelItems(t){const e=this.axis,i=this.options,{position:s,ticks:o}=i,r=this.isHorizontal(),a=this.ticks,{align:c,crossAlign:d,padding:u,mirror:h}=o,f=xi(i.grid),m=f+u,p=h?-u:m,g=-ie(this.labelRotation),y=[];let b,_,w,E,k,v,S,x,O,M,C,T,$="middle";if(s==="top")v=this.bottom-p,S=this._getXAxisLabelAlignment();else if(s==="bottom")v=this.top+p,S=this._getXAxisLabelAlignment();else if(s==="left"){const H=this._getYAxisLabelAlignment(f);S=H.textAlign,k=H.x}else if(s==="right"){const H=this._getYAxisLabelAlignment(f);S=H.textAlign,k=H.x}else if(e==="x"){if(s==="center")v=(t.top+t.bottom)/2+m;else if(et(s)){const H=Object.keys(s)[0],B=s[H];v=this.chart.scales[H].getPixelForValue(B)+m}S=this._getXAxisLabelAlignment()}else if(e==="y"){if(s==="center")k=(t.left+t.right)/2-m;else if(et(s)){const H=Object.keys(s)[0],B=s[H];k=this.chart.scales[H].getPixelForValue(B)}S=this._getYAxisLabelAlignment(f).textAlign}e==="y"&&(c==="start"?$="top":c==="end"&&($="bottom"));const U=this._getLabelSizes();for(b=0,_=a.length;b<_;++b){w=a[b],E=w.label;const H=o.setContext(this.getContext(b));x=this.getPixelForTick(b)+o.labelOffset,O=this._resolveTickFontOptions(b),M=O.lineHeight,C=_t(E)?E.length:1;const B=C/2,I=H.color,F=H.textStrokeColor,P=H.textStrokeWidth;let R=S;r?(k=x,S==="inner"&&(b===_-1?R=this.options.reverse?"left":"right":b===0?R=this.options.reverse?"right":"left":R="center"),s==="top"?d==="near"||g!==0?T=-C*M+M/2:d==="center"?T=-U.highest.height/2-B*M+M:T=-U.highest.height+M/2:d==="near"||g!==0?T=M/2:d==="center"?T=U.highest.height/2-B*M:T=U.highest.height-C*M,h&&(T*=-1),g!==0&&!H.showLabelBackdrop&&(k+=M/2*Math.sin(g))):(v=x,T=(1-C)*M/2);let W;if(H.showLabelBackdrop){const J=Vt(H.backdropPadding),G=U.heights[b],ot=U.widths[b];let nt=T-J.top,Y=0-J.left;switch($){case"middle":nt-=G/2;break;case"bottom":nt-=G;break}switch(S){case"center":Y-=ot/2;break;case"right":Y-=ot;break;case"inner":b===_-1?Y-=ot:b>0&&(Y-=ot/2);break}W={left:Y,top:nt,width:ot+J.width,height:G+J.height,color:H.backdropColor}}y.push({label:E,font:O,textOffset:T,options:{rotation:g,color:I,strokeColor:F,strokeWidth:P,textAlign:R,textBaseline:$,translation:[k,v],backdrop:W}})}return y}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-ie(this.labelRotation))return t==="top"?"left":"right";let s="center";return e.align==="start"?s="left":e.align==="end"?s="right":e.align==="inner"&&(s="inner"),s}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:s,padding:o}}=this.options,r=this._getLabelSizes(),a=t+o,c=r.widest.width;let d,u;return e==="left"?s?(u=this.right+o,i==="near"?d="left":i==="center"?(d="center",u+=c/2):(d="right",u+=c)):(u=this.right-a,i==="near"?d="right":i==="center"?(d="center",u-=c/2):(d="left",u=this.left)):e==="right"?s?(u=this.left+o,i==="near"?d="right":i==="center"?(d="center",u-=c/2):(d="left",u-=c)):(u=this.left+a,i==="near"?d="left":i==="center"?(d="center",u+=c/2):(d="right",u=this.right)):d="right",{textAlign:d,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;if(e==="left"||e==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(e==="top"||e==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:s,width:o,height:r}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,s,o,r),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const s=this.ticks.findIndex(o=>o.value===t);return s>=0?e.setContext(this.getContext(s)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,s=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,r;const a=(c,d,u)=>{!u.width||!u.color||(i.save(),i.lineWidth=u.width,i.strokeStyle=u.color,i.setLineDash(u.borderDash||[]),i.lineDashOffset=u.borderDashOffset,i.beginPath(),i.moveTo(c.x,c.y),i.lineTo(d.x,d.y),i.stroke(),i.restore())};if(e.display)for(o=0,r=s.length;o<r;++o){const c=s[o];e.drawOnChartArea&&a({x:c.x1,y:c.y1},{x:c.x2,y:c.y2},c),e.drawTicks&&a({x:c.tx1,y:c.ty1},{x:c.tx2,y:c.ty2},{color:c.tickColor,width:c.tickWidth,borderDash:c.tickBorderDash,borderDashOffset:c.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:s}}=this,o=i.setContext(this.getContext()),r=i.display?o.width:0;if(!r)return;const a=s.setContext(this.getContext(0)).lineWidth,c=this._borderValue;let d,u,h,f;this.isHorizontal()?(d=Ze(t,this.left,r)-r/2,u=Ze(t,this.right,a)+a/2,h=f=c):(h=Ze(t,this.top,r)-r/2,f=Ze(t,this.bottom,a)+a/2,d=u=c),e.save(),e.lineWidth=o.width,e.strokeStyle=o.color,e.beginPath(),e.moveTo(d,h),e.lineTo(u,f),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const i=this.ctx,s=this._computeLabelArea();s&&Zi(i,s);const o=this.getLabelItems(t);for(const r of o){const a=r.options,c=r.font,d=r.label,u=r.textOffset;tn(i,d,0,u,c,a)}s&&ts(i)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:s}}=this;if(!i.display)return;const o=Ct(i.font),r=Vt(i.padding),a=i.align;let c=o.lineHeight/2;e==="bottom"||e==="center"||et(e)?(c+=r.bottom,_t(i.text)&&(c+=o.lineHeight*(i.text.length-1))):c+=r.top;const{titleX:d,titleY:u,maxWidth:h,rotation:f}=n0(this,c,e,a);tn(t,i.text,0,0,o,{color:i.color,maxWidth:h,rotation:f,textAlign:e0(a,e,s),textBaseline:"middle",translation:[d,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=Q(t.grid&&t.grid.z,-1),s=Q(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==We.prototype.draw?[{z:e,draw:o=>{this.draw(o)}}]:[{z:i,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:s,draw:()=>{this.drawBorder()}},{z:e,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",s=[];let o,r;for(o=0,r=e.length;o<r;++o){const a=e[o];a[i]===this.id&&(!t||a.type===t)&&s.push(a)}return s}_resolveTickFontOptions(t){const e=this.options.ticks.setContext(this.getContext(t));return Ct(e.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class ds{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;o0(e)&&(i=this.register(e));const s=this.items,o=t.id,r=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in s||(s[o]=t,i0(t,r,i),this.override&&gt.override(t.id,t.overrides)),r}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,s=this.scope;i in e&&delete e[i],s&&i in gt[s]&&(delete gt[s][i],this.override&&delete Je[i])}}function i0(n,t,e){const i=Jn(Object.create(null),[e?gt.get(e):{},gt.get(t),n.defaults]);gt.set(t,i),n.defaultRoutes&&s0(t,n.defaultRoutes),n.descriptors&&gt.describe(t,n.descriptors)}function s0(n,t){Object.keys(t).forEach(e=>{const i=e.split("."),s=i.pop(),o=[n].concat(i).join("."),r=t[e].split("."),a=r.pop(),c=r.join(".");gt.route(o,s,c,a)})}function o0(n){return"id"in n&&"defaults"in n}class r0{constructor(){this.controllers=new ds(Kt,"datasets",!0),this.elements=new ds(Xt,"elements"),this.plugins=new ds(Object,"plugins"),this.scales=new ds(We,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(s=>{const o=i||this._getRegistryForType(s);i||o.isForType(s)||o===this.plugins&&s.id?this._exec(t,o,s):lt(s,r=>{const a=i||this._getRegistryForType(r);this._exec(t,a,r)})})}_exec(t,e,i){const s=no(t);ft(i["before"+s],[],i),e[t](i),ft(i["after"+s],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const s=e.get(t);if(s===void 0)throw new Error('"'+t+'" is not a registered '+i+".");return s}}var se=new r0;class a0{constructor(){this._init=[]}notify(t,e,i,s){e==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=s?this._descriptors(t).filter(s):this._descriptors(t),r=this._notify(o,t,e,i);return e==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),r}_notify(t,e,i,s){s=s||{};for(const o of t){const r=o.plugin,a=r[i],c=[e,s,o.options];if(ft(a,c,r)===!1&&s.cancelable)return!1}return!0}invalidate(){it(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,s=Q(i.options&&i.options.plugins,{}),o=l0(i);return s===!1&&!e?[]:d0(t,o,s,e)}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,s=(o,r)=>o.filter(a=>!r.some(c=>a.plugin.id===c.plugin.id));this._notify(s(e,i),t,"stop"),this._notify(s(i,e),t,"start")}}function l0(n){const t={},e=[],i=Object.keys(se.plugins.items);for(let o=0;o<i.length;o++)e.push(se.getPlugin(i[o]));const s=n.plugins||[];for(let o=0;o<s.length;o++){const r=s[o];e.indexOf(r)===-1&&(e.push(r),t[r.id]=!0)}return{plugins:e,localIds:t}}function c0(n,t){return!t&&n===!1?null:n===!0?{}:n}function d0(n,{plugins:t,localIds:e},i,s){const o=[],r=n.getContext();for(const a of t){const c=a.id,d=c0(i[c],s);d!==null&&o.push({plugin:a,options:u0(n.config,{plugin:a,local:e[c]},d,r)})}return o}function u0(n,{plugin:t,local:e},i,s){const o=n.pluginScopeKeys(t),r=n.getOptionScopes(i,o);return e&&t.defaults&&r.push(t.defaults),n.createResolver(r,s,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function No(n,t){const e=gt.datasets[n]||{};return((t.datasets||{})[n]||{}).indexAxis||t.indexAxis||e.indexAxis||"x"}function h0(n,t){let e=n;return n==="_index_"?e=t:n==="_value_"&&(e=t==="x"?"y":"x"),e}function f0(n,t){return n===t?"_index_":"_value_"}function ic(n){if(n==="x"||n==="y"||n==="r")return n}function m0(n){if(n==="top"||n==="bottom")return"x";if(n==="left"||n==="right")return"y"}function To(n,...t){if(ic(n))return n;for(const e of t){const i=e.axis||m0(e.position)||n.length>1&&ic(n[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${n}' axis. Please provide 'axis' or 'position' option.`)}function sc(n,t,e){if(e[t+"AxisID"]===n)return{axis:t}}function p0(n,t){if(t.data&&t.data.datasets){const e=t.data.datasets.filter(i=>i.xAxisID===n||i.yAxisID===n);if(e.length)return sc(n,"x",e[0])||sc(n,"y",e[0])}return{}}function g0(n,t){const e=Je[n.type]||{scales:{}},i=t.scales||{},s=No(n.type,t),o=Object.create(null);return Object.keys(i).forEach(r=>{const a=i[r];if(!et(a))return console.error(`Invalid scale configuration for scale: ${r}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${r}`);const c=To(r,a,p0(r,n),gt.scales[a.type]),d=f0(c,s),u=e.scales||{};o[r]=Zn(Object.create(null),[{axis:c},a,u[c],u[d]])}),n.data.datasets.forEach(r=>{const a=r.type||n.type,c=r.indexAxis||No(a,t),u=(Je[a]||{}).scales||{};Object.keys(u).forEach(h=>{const f=h0(h,c),m=r[f+"AxisID"]||f;o[m]=o[m]||Object.create(null),Zn(o[m],[{axis:f},i[m],u[h]])})}),Object.keys(o).forEach(r=>{const a=o[r];Zn(a,[gt.scales[a.type],gt.scale])}),o}function oc(n){const t=n.options||(n.options={});t.plugins=Q(t.plugins,{}),t.scales=g0(n,t)}function rc(n){return n=n||{},n.datasets=n.datasets||[],n.labels=n.labels||[],n}function y0(n){return n=n||{},n.data=rc(n.data),oc(n),n}const ac=new Map,lc=new Set;function us(n,t){let e=ac.get(n);return e||(e=t(),ac.set(n,e),lc.add(e)),e}const ki=(n,t,e)=>{const i=Re(t,e);i!==void 0&&n.add(i)};class b0{constructor(t){this._config=y0(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=rc(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),oc(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return us(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return us(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return us(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id,i=this.type;return us(`${i}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let s=i.get(t);return(!s||e)&&(s=new Map,i.set(t,s)),s}getOptionScopes(t,e,i){const{options:s,type:o}=this,r=this._cachedScopes(t,i),a=r.get(e);if(a)return a;const c=new Set;e.forEach(u=>{t&&(c.add(t),u.forEach(h=>ki(c,t,h))),u.forEach(h=>ki(c,s,h)),u.forEach(h=>ki(c,Je[o]||{},h)),u.forEach(h=>ki(c,gt,h)),u.forEach(h=>ki(c,co,h))});const d=Array.from(c);return d.length===0&&d.push(Object.create(null)),lc.has(e)&&r.set(e,d),d}chartOptionScopes(){const{options:t,type:e}=this;return[t,Je[e]||{},gt.datasets[e]||{},{type:e},gt,co]}resolveNamedOptions(t,e,i,s=[""]){const o={$shared:!0},{resolver:r,subPrefixes:a}=cc(this._resolverCache,t,s);let c=r;if(x0(r,e)){o.$shared=!1,i=Le(i)?i():i;const d=this.createResolver(t,i,a);c=xn(r,i,d)}for(const d of e)o[d]=c[d];return o}createResolver(t,e,i=[""],s){const{resolver:o}=cc(this._resolverCache,t,i);return et(e)?xn(o,e,void 0,s):o}}function cc(n,t,e){let i=n.get(t);i||(i=new Map,n.set(t,i));const s=e.join();let o=i.get(s);return o||(o={resolver:mo(t,e),subPrefixes:e.filter(a=>!a.toLowerCase().includes("hover"))},i.set(s,o)),o}const _0=n=>et(n)&&Object.getOwnPropertyNames(n).some(t=>Le(n[t]));function x0(n,t){const{isScriptable:e,isIndexable:i}=al(n);for(const s of t){const o=e(s),r=i(s),a=(r||o)&&n[s];if(o&&(Le(a)||_0(a))||r&&_t(a))return!0}return!1}var k0="4.4.7";const S0=["top","bottom","left","right","chartArea"];function dc(n,t){return n==="top"||n==="bottom"||S0.indexOf(n)===-1&&t==="x"}function uc(n,t){return function(e,i){return e[n]===i[n]?e[t]-i[t]:e[n]-i[n]}}function hc(n){const t=n.chart,e=t.options.animation;t.notifyPlugins("afterRender"),ft(e&&e.onComplete,[n],t)}function w0(n){const t=n.chart,e=t.options.animation;ft(e&&e.onProgress,[n],t)}function fc(n){return yo()&&typeof n=="string"?n=document.getElementById(n):n&&n.length&&(n=n[0]),n&&n.canvas&&(n=n.canvas),n}const hs={},mc=n=>{const t=fc(n);return Object.values(hs).filter(e=>e.canvas===t).pop()};function E0(n,t,e){const i=Object.keys(n);for(const s of i){const o=+s;if(o>=t){const r=n[s];delete n[s],(e>0||o>t)&&(n[o+e]=r)}}}function v0(n,t,e,i){return!e||n.type==="mouseout"?null:i?t:n}function fs(n,t,e){return n.options.clip?n[e]:t[e]}function C0(n,t){const{xScale:e,yScale:i}=n;return e&&i?{left:fs(e,t,"left"),right:fs(e,t,"right"),top:fs(i,t,"top"),bottom:fs(i,t,"bottom")}:t}class ue{static register(...t){se.add(...t),pc()}static unregister(...t){se.remove(...t),pc()}constructor(t,e){const i=this.config=new b0(e),s=fc(t),o=mc(s);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const r=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||Jl(s)),this.platform.updateConfig(i);const a=this.platform.acquireContext(s,r.aspectRatio),c=a&&a.canvas,d=c&&c.height,u=c&&c.width;if(this.id=Fy(),this.ctx=a,this.canvas=c,this.width=u,this.height=d,this._options=r,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new a0,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Qy(h=>this.update(h),r.resizeDelay||0),this._dataChanges=[],hs[this.id]=this,!a||!c){console.error("Failed to create chart: can't acquire context from the given item");return}de.listen(this,"complete",hc),de.listen(this,"progress",w0),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:s,_aspectRatio:o}=this;return it(t)?e&&o?o:s?i/s:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return se}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():pl(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return sl(this.canvas,this.ctx),this}stop(){return de.stop(this),this}resize(t,e){de.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,s=this.canvas,o=i.maintainAspectRatio&&this.aspectRatio,r=this.platform.getMaximumSize(s,t,e,o),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),c=this.width?"resize":"attach";this.width=r.width,this.height=r.height,this._aspectRatio=this.aspectRatio,pl(this,a,!0)&&(this.notifyPlugins("resize",{size:r}),ft(i.onResize,[this,r],this),this.attached&&this._doResize(c)&&this.render())}ensureScalesHaveIDs(){const e=this.options.scales||{};lt(e,(i,s)=>{i.id=s})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,s=Object.keys(i).reduce((r,a)=>(r[a]=!1,r),{});let o=[];e&&(o=o.concat(Object.keys(e).map(r=>{const a=e[r],c=To(r,a),d=c==="r",u=c==="x";return{options:a,dposition:d?"chartArea":u?"bottom":"left",dtype:d?"radialLinear":u?"category":"linear"}}))),lt(o,r=>{const a=r.options,c=a.id,d=To(c,a),u=Q(a.type,r.dtype);(a.position===void 0||dc(a.position,d)!==dc(r.dposition))&&(a.position=r.dposition),s[c]=!0;let h=null;if(c in i&&i[c].type===u)h=i[c];else{const f=se.getScale(u);h=new f({id:c,type:u,ctx:this.ctx,chart:this}),i[h.id]=h}h.init(a,t)}),lt(s,(r,a)=>{r||delete i[a]}),lt(i,r=>{Pt.configure(this,r,r.options),Pt.addBox(this,r)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((s,o)=>s.index-o.index),i>e){for(let s=e;s<i;++s)this._destroyDatasetMeta(s);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(uc("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((i,s)=>{e.filter(o=>o===i._dataset).length===0&&this._destroyDatasetMeta(s)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,s;for(this._removeUnreferencedMetasets(),i=0,s=e.length;i<s;i++){const o=e[i];let r=this.getDatasetMeta(i);const a=o.type||this.config.type;if(r.type&&r.type!==a&&(this._destroyDatasetMeta(i),r=this.getDatasetMeta(i)),r.type=a,r.indexAxis=o.indexAxis||No(a,this.options),r.order=o.order||0,r.index=i,r.label=""+o.label,r.visible=this.isDatasetVisible(i),r.controller)r.controller.updateIndex(i),r.controller.linkScales();else{const c=se.getController(a),{datasetElementType:d,dataElementType:u}=gt.datasets[a];Object.assign(c,{dataElementType:se.getElement(u),datasetElementType:d&&se.getElement(d)}),r.controller=new c(this,i),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){lt(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),s=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let r=0;for(let d=0,u=this.data.datasets.length;d<u;d++){const{controller:h}=this.getDatasetMeta(d),f=!s&&o.indexOf(h)===-1;h.buildOrUpdateElements(f),r=Math.max(+h.getMaxOverflow(),r)}r=this._minPadding=i.layout.autoPadding?r:0,this._updateLayout(r),s||lt(o,d=>{d.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(uc("z","_idx"));const{_active:a,_lastEvent:c}=this;c?this._eventHandler(c,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){lt(this.scales,t=>{Pt.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);(!Ia(e,i)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:s,count:o}of e){const r=i==="_removeElements"?-o:o;E0(t,s,r)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=o=>new Set(t.filter(r=>r[0]===o).map((r,a)=>a+","+r.splice(1).join(","))),s=i(0);for(let o=1;o<e;o++)if(!Ia(s,i(o)))return;return Array.from(s).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Pt.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],lt(this.boxes,s=>{i&&s.position==="chartArea"||(s.configure&&s.configure(),this._layers.push(...s._layers()))},this),this._layers.forEach((s,o)=>{s._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let e=0,i=this.data.datasets.length;e<i;++e)this.getDatasetMeta(e).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,Le(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),s={meta:i,index:t,mode:e,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",s)!==!1&&(i.controller._update(e),s.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",s))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(de.has(this)?this.attached&&!de.running(this)&&de.start(this):(this.draw(),hc({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:i,height:s}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(i,s)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let s,o;for(s=0,o=e.length;s<o;++s){const r=e[s];(!t||r.visible)&&i.push(r)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i=t._clip,s=!i.disabled,o=C0(t,this.chartArea),r={meta:t,index:t.index,cancelable:!0};this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(s&&Zi(e,{left:i.left===!1?0:o.left-i.left,right:i.right===!1?this.width:o.right+i.right,top:i.top===!1?0:o.top-i.top,bottom:i.bottom===!1?this.height:o.bottom+i.bottom}),t.controller.draw(),s&&ts(e),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return ve(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,s){const o=Il.modes[e];return typeof o=="function"?o(this,t,i,s):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let s=i.filter(o=>o&&o._dataset===e).pop();return s||(s={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(s)),s}getContext(){return this.$context||(this.$context=je(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return typeof i.hidden=="boolean"?!i.hidden:!e.hidden}setDatasetVisibility(t,e){const i=this.getDatasetMeta(t);i.hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const s=i?"show":"hide",o=this.getDatasetMeta(t),r=o.controller._resolveAnimations(void 0,s);ti(e)?(o.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),r.update(o,{visible:i}),this.update(a=>a.datasetIndex===t?s:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),de.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),sl(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete hs[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(o,r)=>{e.addEventListener(this,o,r),t[o]=r},s=(o,r,a)=>{o.offsetX=r,o.offsetY=a,this._eventHandler(o)};lt(this.options.events,o=>i(o,s))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(c,d)=>{e.addEventListener(this,c,d),t[c]=d},s=(c,d)=>{t[c]&&(e.removeEventListener(this,c,d),delete t[c])},o=(c,d)=>{this.canvas&&this.resize(c,d)};let r;const a=()=>{s("attach",a),this.attached=!0,this.resize(),i("resize",o),i("detach",r)};r=()=>{this.attached=!1,s("resize",o),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():r()}unbindEvents(){lt(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},lt(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const s=i?"set":"remove";let o,r,a,c;for(e==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+s+"DatasetHoverStyle"]()),a=0,c=t.length;a<c;++a){r=t[a];const d=r&&this.getDatasetMeta(r.datasetIndex).controller;d&&d[s+"HoverStyle"](r.element,r.datasetIndex,r.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map(({datasetIndex:o,index:r})=>{const a=this.getDatasetMeta(o);if(!a)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:a.data[r],index:r}});!Ki(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return this._plugins._cache.filter(e=>e.plugin.id===t).length===1}_updateHoverStyles(t,e,i){const s=this.options.hover,o=(c,d)=>c.filter(u=>!d.some(h=>u.datasetIndex===h.datasetIndex&&u.index===h.index)),r=o(e,t),a=i?t:o(t,e);r.length&&this.updateHoverStyle(r,s.mode,!1),a.length&&s.mode&&this.updateHoverStyle(a,s.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},s=r=>(r.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",i,s)===!1)return;const o=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,s),(o||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:s=[],options:o}=this,r=e,a=this._getActiveElements(t,s,i,r),c=jy(t),d=v0(t,this._lastEvent,i,c);i&&(this._lastEvent=null,ft(o.onHover,[t,a,this],this),c&&ft(o.onClick,[t,a,this],this));const u=!Ki(a,s);return(u||e)&&(this._active=a,this._updateHoverStyles(a,s,e)),this._lastEvent=d,u}_getActiveElements(t,e,i,s){if(t.type==="mouseout")return[];if(!i)return e;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,s)}}L(ue,"defaults",gt),L(ue,"instances",hs),L(ue,"overrides",Je),L(ue,"registry",se),L(ue,"version",k0),L(ue,"getChart",mc);function pc(){return lt(ue.instances,n=>n._plugins.invalidate())}function O0(n,t,e){const{startAngle:i,pixelMargin:s,x:o,y:r,outerRadius:a,innerRadius:c}=t;let d=s/a;n.beginPath(),n.arc(o,r,a,i-d,e+d),c>s?(d=s/c,n.arc(o,r,c,e+d,i-d,!0)):n.arc(o,r,s,e+wt,i-wt),n.closePath(),n.clip()}function D0(n){return fo(n,["outerStart","outerEnd","innerStart","innerEnd"])}function N0(n,t,e,i){const s=D0(n.options.borderRadius),o=(e-t)/2,r=Math.min(o,i*t/2),a=c=>{const d=(e-Math.min(o,c))*i/2;return Dt(c,0,Math.min(o,d))};return{outerStart:a(s.outerStart),outerEnd:a(s.outerEnd),innerStart:Dt(s.innerStart,0,r),innerEnd:Dt(s.innerEnd,0,r)}}function En(n,t,e,i){return{x:e+n*Math.cos(t),y:i+n*Math.sin(t)}}function ms(n,t,e,i,s,o){const{x:r,y:a,startAngle:c,pixelMargin:d,innerRadius:u}=t,h=Math.max(t.outerRadius+i+e-d,0),f=u>0?u+i+e+d:0;let m=0;const p=s-c;if(i){const H=u>0?u-i:0,B=h>0?h-i:0,I=(H+B)/2,F=I!==0?p*I/(I+i):p;m=(p-F)/2}const g=Math.max(.001,p*h-e/mt)/h,y=(p-g)/2,b=c+y+m,_=s-y-m,{outerStart:w,outerEnd:E,innerStart:k,innerEnd:v}=N0(t,f,h,_-b),S=h-w,x=h-E,O=b+w/S,M=_-E/x,C=f+k,T=f+v,$=b+k/C,U=_-v/T;if(n.beginPath(),o){const H=(O+M)/2;if(n.arc(r,a,h,O,H),n.arc(r,a,h,H,M),E>0){const P=En(x,M,r,a);n.arc(P.x,P.y,E,M,_+wt)}const B=En(T,_,r,a);if(n.lineTo(B.x,B.y),v>0){const P=En(T,U,r,a);n.arc(P.x,P.y,v,_+wt,U+Math.PI)}const I=(_-v/f+(b+k/f))/2;if(n.arc(r,a,f,_-v/f,I,!0),n.arc(r,a,f,I,b+k/f,!0),k>0){const P=En(C,$,r,a);n.arc(P.x,P.y,k,$+Math.PI,b-wt)}const F=En(S,b,r,a);if(n.lineTo(F.x,F.y),w>0){const P=En(S,O,r,a);n.arc(P.x,P.y,w,b-wt,O)}}else{n.moveTo(r,a);const H=Math.cos(O)*h+r,B=Math.sin(O)*h+a;n.lineTo(H,B);const I=Math.cos(M)*h+r,F=Math.sin(M)*h+a;n.lineTo(I,F)}n.closePath()}function T0(n,t,e,i,s){const{fullCircles:o,startAngle:r,circumference:a}=t;let c=t.endAngle;if(o){ms(n,t,e,i,c,s);for(let d=0;d<o;++d)n.fill();isNaN(a)||(c=r+(a%pt||pt))}return ms(n,t,e,i,c,s),n.fill(),c}function P0(n,t,e,i,s){const{fullCircles:o,startAngle:r,circumference:a,options:c}=t,{borderWidth:d,borderJoinStyle:u,borderDash:h,borderDashOffset:f}=c,m=c.borderAlign==="inner";if(!d)return;n.setLineDash(h||[]),n.lineDashOffset=f,m?(n.lineWidth=d*2,n.lineJoin=u||"round"):(n.lineWidth=d,n.lineJoin=u||"bevel");let p=t.endAngle;if(o){ms(n,t,e,i,p,s);for(let g=0;g<o;++g)n.stroke();isNaN(a)||(p=r+(a%pt||pt))}m&&O0(n,t,p),o||(ms(n,t,e,i,p,s),n.stroke())}class vn extends Xt{constructor(e){super();L(this,"circumference");L(this,"endAngle");L(this,"fullCircles");L(this,"innerRadius");L(this,"outerRadius");L(this,"pixelMargin");L(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,e&&Object.assign(this,e)}inRange(e,i,s){const o=this.getProps(["x","y"],s),{angle:r,distance:a}=Ua(o,{x:e,y:i}),{startAngle:c,endAngle:d,innerRadius:u,outerRadius:h,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],s),m=(this.options.spacing+this.options.borderWidth)/2,p=Q(f,d-c),g=ni(r,c,d)&&c!==d,y=p>=pt||g,b=we(a,u+m,h+m);return y&&b}getCenterPoint(e){const{x:i,y:s,startAngle:o,endAngle:r,innerRadius:a,outerRadius:c}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],e),{offset:d,spacing:u}=this.options,h=(o+r)/2,f=(a+c+u+d)/2;return{x:i+Math.cos(h)*f,y:s+Math.sin(h)*f}}tooltipPosition(e){return this.getCenterPoint(e)}draw(e){const{options:i,circumference:s}=this,o=(i.offset||0)/4,r=(i.spacing||0)/2,a=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=s>pt?Math.floor(s/pt):0,s===0||this.innerRadius<0||this.outerRadius<0)return;e.save();const c=(this.startAngle+this.endAngle)/2;e.translate(Math.cos(c)*o,Math.sin(c)*o);const d=1-Math.sin(Math.min(mt,s||0)),u=o*d;e.fillStyle=i.backgroundColor,e.strokeStyle=i.borderColor,T0(e,this,u,r,a),P0(e,this,u,r,a),e.restore()}}L(vn,"id","arc"),L(vn,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0}),L(vn,"defaultRoutes",{backgroundColor:"backgroundColor"}),L(vn,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"});function gc(n,t,e=t){n.lineCap=Q(e.borderCapStyle,t.borderCapStyle),n.setLineDash(Q(e.borderDash,t.borderDash)),n.lineDashOffset=Q(e.borderDashOffset,t.borderDashOffset),n.lineJoin=Q(e.borderJoinStyle,t.borderJoinStyle),n.lineWidth=Q(e.borderWidth,t.borderWidth),n.strokeStyle=Q(e.borderColor,t.borderColor)}function M0(n,t,e){n.lineTo(e.x,e.y)}function V0(n){return n.stepped?cb:n.tension||n.cubicInterpolationMode==="monotone"?db:M0}function yc(n,t,e={}){const i=n.length,{start:s=0,end:o=i-1}=e,{start:r,end:a}=t,c=Math.max(s,r),d=Math.min(o,a),u=s<r&&o<r||s>a&&o>a;return{count:i,start:c,loop:t.loop,ilen:d<c&&!u?i+d-c:d-c}}function A0(n,t,e,i){const{points:s,options:o}=t,{count:r,start:a,loop:c,ilen:d}=yc(s,e,i),u=V0(o);let{move:h=!0,reverse:f}=i||{},m,p,g;for(m=0;m<=d;++m)p=s[(a+(f?d-m:m))%r],!p.skip&&(h?(n.moveTo(p.x,p.y),h=!1):u(n,g,p,f,o.stepped),g=p);return c&&(p=s[(a+(f?d:0))%r],u(n,g,p,f,o.stepped)),!!c}function F0(n,t,e,i){const s=t.points,{count:o,start:r,ilen:a}=yc(s,e,i),{move:c=!0,reverse:d}=i||{};let u=0,h=0,f,m,p,g,y,b;const _=E=>(r+(d?a-E:E))%o,w=()=>{g!==y&&(n.lineTo(u,y),n.lineTo(u,g),n.lineTo(u,b))};for(c&&(m=s[_(0)],n.moveTo(m.x,m.y)),f=0;f<=a;++f){if(m=s[_(f)],m.skip)continue;const E=m.x,k=m.y,v=E|0;v===p?(k<g?g=k:k>y&&(y=k),u=(h*u+E)/++h):(w(),n.lineTo(E,k),p=v,h=0,g=y=k),b=k}w()}function Po(n){const t=n.options,e=t.borderDash&&t.borderDash.length;return!n._decimated&&!n._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!e?F0:A0}function B0(n){return n.stepped?zb:n.tension||n.cubicInterpolationMode==="monotone"?Wb:on}function $0(n,t,e,i){let s=t._path;s||(s=t._path=new Path2D,t.path(s,e,i)&&s.closePath()),gc(n,t.options),n.stroke(s)}function R0(n,t,e,i){const{segments:s,options:o}=t,r=Po(t);for(const a of s)gc(n,o,a.style),n.beginPath(),r(n,t,a,{start:e,end:e+i-1})&&n.closePath(),n.stroke()}const L0=typeof Path2D=="function";function I0(n,t,e,i){L0&&!t.options.segment?$0(n,t,e,i):R0(n,t,e,i)}class Ce extends Xt{constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const s=i.spanGaps?this._loop:this._fullLoop;Ab(this._points,i,t,s,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=Xb(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,s=t[e],o=this.points,r=Sl(this,{property:e,start:s,end:s});if(!r.length)return;const a=[],c=B0(i);let d,u;for(d=0,u=r.length;d<u;++d){const{start:h,end:f}=r[d],m=o[h],p=o[f];if(m===p){a.push(m);continue}const g=Math.abs((s-m[e])/(p[e]-m[e])),y=c(m,p,g,i.stepped);y[e]=t[e],a.push(y)}return a.length===1?a[0]:a}pathSegment(t,e,i){return Po(this)(t,this,e,i)}path(t,e,i){const s=this.segments,o=Po(this);let r=this._loop;e=e||0,i=i||this.points.length-e;for(const a of s)r&=o(t,this,a,{start:e,end:e+i-1});return!!r}draw(t,e,i,s){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),I0(t,this,i,s),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}L(Ce,"id","line"),L(Ce,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),L(Ce,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),L(Ce,"descriptors",{_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"});function bc(n,t,e,i){const s=n.options,{[e]:o}=n.getProps([e],i);return Math.abs(t-o)<s.radius+s.hitRadius}class Si extends Xt{constructor(e){super();L(this,"parsed");L(this,"skip");L(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,e&&Object.assign(this,e)}inRange(e,i,s){const o=this.options,{x:r,y:a}=this.getProps(["x","y"],s);return Math.pow(e-r,2)+Math.pow(i-a,2)<Math.pow(o.hitRadius+o.radius,2)}inXRange(e,i){return bc(this,e,"x",i)}inYRange(e,i){return bc(this,e,"y",i)}getCenterPoint(e){const{x:i,y:s}=this.getProps(["x","y"],e);return{x:i,y:s}}size(e){e=e||this.options||{};let i=e.radius||0;i=Math.max(i,i&&e.hoverRadius||0);const s=i&&e.borderWidth||0;return(i+s)*2}draw(e,i){const s=this.options;this.skip||s.radius<.1||!ve(this,i,this.size(s)/2)||(e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.fillStyle=s.backgroundColor,ho(e,s,this.x,this.y))}getRange(){const e=this.options||{};return e.radius+e.hitRadius}}L(Si,"id","point"),L(Si,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),L(Si,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function _c(n,t){const{x:e,y:i,base:s,width:o,height:r}=n.getProps(["x","y","base","width","height"],t);let a,c,d,u,h;return n.horizontal?(h=r/2,a=Math.min(e,s),c=Math.max(e,s),d=i-h,u=i+h):(h=o/2,a=e-h,c=e+h,d=Math.min(i,s),u=Math.max(i,s)),{left:a,top:d,right:c,bottom:u}}function He(n,t,e,i){return n?0:Dt(t,e,i)}function j0(n,t,e){const i=n.options.borderWidth,s=n.borderSkipped,o=rl(i);return{t:He(s.top,o.top,0,e),r:He(s.right,o.right,0,t),b:He(s.bottom,o.bottom,0,e),l:He(s.left,o.left,0,t)}}function z0(n,t,e){const{enableBorderRadius:i}=n.getProps(["enableBorderRadius"]),s=n.options.borderRadius,o=en(s),r=Math.min(t,e),a=n.borderSkipped,c=i||et(s);return{topLeft:He(!c||a.top||a.left,o.topLeft,0,r),topRight:He(!c||a.top||a.right,o.topRight,0,r),bottomLeft:He(!c||a.bottom||a.left,o.bottomLeft,0,r),bottomRight:He(!c||a.bottom||a.right,o.bottomRight,0,r)}}function W0(n){const t=_c(n),e=t.right-t.left,i=t.bottom-t.top,s=j0(n,e/2,i/2),o=z0(n,e/2,i/2);return{outer:{x:t.left,y:t.top,w:e,h:i,radius:o},inner:{x:t.left+s.l,y:t.top+s.t,w:e-s.l-s.r,h:i-s.t-s.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(s.t,s.l)),topRight:Math.max(0,o.topRight-Math.max(s.t,s.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(s.b,s.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(s.b,s.r))}}}}function Mo(n,t,e,i){const s=t===null,o=e===null,a=n&&!(s&&o)&&_c(n,i);return a&&(s||we(t,a.left,a.right))&&(o||we(e,a.top,a.bottom))}function H0(n){return n.topLeft||n.topRight||n.bottomLeft||n.bottomRight}function U0(n,t){n.rect(t.x,t.y,t.w,t.h)}function Vo(n,t,e={}){const i=n.x!==e.x?-t:0,s=n.y!==e.y?-t:0,o=(n.x+n.w!==e.x+e.w?t:0)-i,r=(n.y+n.h!==e.y+e.h?t:0)-s;return{x:n.x+i,y:n.y+s,w:n.w+o,h:n.h+r,radius:n.radius}}class wi extends Xt{constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:s}}=this,{inner:o,outer:r}=W0(this),a=H0(r.radius)?ai:U0;t.save(),(r.w!==o.w||r.h!==o.h)&&(t.beginPath(),a(t,Vo(r,e,o)),t.clip(),a(t,Vo(o,-e,r)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),a(t,Vo(o,e)),t.fillStyle=s,t.fill(),t.restore()}inRange(t,e,i){return Mo(this,t,e,i)}inXRange(t,e){return Mo(this,t,null,e)}inYRange(t,e){return Mo(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:s,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(e+s)/2:e,y:o?i:(i+s)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}L(wi,"id","bar"),L(wi,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),L(wi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});var xc=Object.freeze({__proto__:null,ArcElement:vn,BarElement:wi,LineElement:Ce,PointElement:Si});const Ao=["rgb(54, 162, 235)","rgb(255, 99, 132)","rgb(255, 159, 64)","rgb(255, 205, 86)","rgb(75, 192, 192)","rgb(153, 102, 255)","rgb(201, 203, 207)"],kc=Ao.map(n=>n.replace("rgb(","rgba(").replace(")",", 0.5)"));function Sc(n){return Ao[n%Ao.length]}function wc(n){return kc[n%kc.length]}function q0(n,t){return n.borderColor=Sc(t),n.backgroundColor=wc(t),++t}function Y0(n,t){return n.backgroundColor=n.data.map(()=>Sc(t++)),t}function K0(n,t){return n.backgroundColor=n.data.map(()=>wc(t++)),t}function X0(n){let t=0;return(e,i)=>{const s=n.getDatasetMeta(i).controller;s instanceof ze?t=Y0(e,t):s instanceof wn?t=K0(e,t):s&&(t=q0(e,t))}}function Ec(n){let t;for(t in n)if(n[t].borderColor||n[t].backgroundColor)return!0;return!1}function G0(n){return n&&(n.borderColor||n.backgroundColor)}function Q0(){return gt.borderColor!=="rgba(0,0,0,0.1)"||gt.backgroundColor!=="rgba(0,0,0,0.1)"}var vc={id:"colors",defaults:{enabled:!0,forceOverride:!1},beforeLayout(n,t,e){if(!e.enabled)return;const{data:{datasets:i},options:s}=n.config,{elements:o}=s,r=Ec(i)||G0(s)||o&&Ec(o)||Q0();if(!e.forceOverride&&r)return;const a=X0(n);i.forEach(a)}};function J0(n,t,e,i,s){const o=s.samples||i;if(o>=e)return n.slice(t,t+e);const r=[],a=(e-2)/(o-2);let c=0;const d=t+e-1;let u=t,h,f,m,p,g;for(r[c++]=n[u],h=0;h<o-2;h++){let y=0,b=0,_;const w=Math.floor((h+1)*a)+1+t,E=Math.min(Math.floor((h+2)*a)+1,e)+t,k=E-w;for(_=w;_<E;_++)y+=n[_].x,b+=n[_].y;y/=k,b/=k;const v=Math.floor(h*a)+1+t,S=Math.min(Math.floor((h+1)*a)+1,e)+t,{x,y:O}=n[u];for(m=p=-1,_=v;_<S;_++)p=.5*Math.abs((x-y)*(n[_].y-O)-(x-n[_].x)*(b-O)),p>m&&(m=p,f=n[_],g=_);r[c++]=f,u=g}return r[c++]=n[d],r}function Z0(n,t,e,i){let s=0,o=0,r,a,c,d,u,h,f,m,p,g;const y=[],b=t+e-1,_=n[t].x,E=n[b].x-_;for(r=t;r<t+e;++r){a=n[r],c=(a.x-_)/E*i,d=a.y;const k=c|0;if(k===u)d<p?(p=d,h=r):d>g&&(g=d,f=r),s=(o*s+a.x)/++o;else{const v=r-1;if(!it(h)&&!it(f)){const S=Math.min(h,f),x=Math.max(h,f);S!==m&&S!==v&&y.push({...n[S],x:s}),x!==m&&x!==v&&y.push({...n[x],x:s})}r>0&&v!==m&&y.push(n[v]),y.push(a),u=k,o=0,p=g=d,h=f=m=r}}return y}function Cc(n){if(n._decimated){const t=n._data;delete n._decimated,delete n._data,Object.defineProperty(n,"data",{configurable:!0,enumerable:!0,writable:!0,value:t})}}function Oc(n){n.data.datasets.forEach(t=>{Cc(t)})}function tx(n,t){const e=t.length;let i=0,s;const{iScale:o}=n,{min:r,max:a,minDefined:c,maxDefined:d}=o.getUserBounds();return c&&(i=Dt(Ee(t,o.axis,r).lo,0,e-1)),d?s=Dt(Ee(t,o.axis,a).hi+1,i,e)-i:s=e-i,{start:i,count:s}}var Dc={id:"decimation",defaults:{algorithm:"min-max",enabled:!1},beforeElementsUpdate:(n,t,e)=>{if(!e.enabled){Oc(n);return}const i=n.width;n.data.datasets.forEach((s,o)=>{const{_data:r,indexAxis:a}=s,c=n.getDatasetMeta(o),d=r||s.data;if(li([a,n.options.indexAxis])==="y"||!c.controller.supportsDecimation)return;const u=n.scales[c.xAxisID];if(u.type!=="linear"&&u.type!=="time"||n.options.parsing)return;let{start:h,count:f}=tx(c,d);const m=e.threshold||4*i;if(f<=m){Cc(s);return}it(r)&&(s._data=d,delete s.data,Object.defineProperty(s,"data",{configurable:!0,enumerable:!0,get:function(){return this._decimated},set:function(g){this._data=g}}));let p;switch(e.algorithm){case"lttb":p=J0(d,h,f,i,e);break;case"min-max":p=Z0(d,h,f,i);break;default:throw new Error(`Unsupported decimation algorithm '${e.algorithm}'`)}s._decimated=p})},destroy(n){Oc(n)}};function ex(n,t,e){const i=n.segments,s=n.points,o=t.points,r=[];for(const a of i){let{start:c,end:d}=a;d=Bo(c,d,s);const u=Fo(e,s[c],s[d],a.loop);if(!t.segments){r.push({source:a,target:u,start:s[c],end:s[d]});continue}const h=Sl(t,u);for(const f of h){const m=Fo(e,o[f.start],o[f.end],f.loop),p=kl(a,s,m);for(const g of p)r.push({source:g,target:f,start:{[e]:Nc(u,m,"start",Math.max)},end:{[e]:Nc(u,m,"end",Math.min)}})}}return r}function Fo(n,t,e,i){if(i)return;let s=t[n],o=e[n];return n==="angle"&&(s=Wt(s),o=Wt(o)),{property:n,start:s,end:o}}function nx(n,t){const{x:e=null,y:i=null}=n||{},s=t.points,o=[];return t.segments.forEach(({start:r,end:a})=>{a=Bo(r,a,s);const c=s[r],d=s[a];i!==null?(o.push({x:c.x,y:i}),o.push({x:d.x,y:i})):e!==null&&(o.push({x:e,y:c.y}),o.push({x:e,y:d.y}))}),o}function Bo(n,t,e){for(;t>n;t--){const i=e[t];if(!isNaN(i.x)&&!isNaN(i.y))break}return t}function Nc(n,t,e,i){return n&&t?i(n[e],t[e]):n?n[e]:t?t[e]:0}function Tc(n,t){let e=[],i=!1;return _t(n)?(i=!0,e=n):e=nx(n,t),e.length?new Ce({points:e,options:{tension:0},_loop:i,_fullLoop:i}):null}function Pc(n){return n&&n.fill!==!1}function ix(n,t,e){let s=n[t].fill;const o=[t];let r;if(!e)return s;for(;s!==!1&&o.indexOf(s)===-1;){if(!St(s))return s;if(r=n[s],!r)return!1;if(r.visible)return s;o.push(s),s=r.fill}return!1}function sx(n,t,e){const i=lx(n);if(et(i))return isNaN(i.value)?!1:i;let s=parseFloat(i);return St(s)&&Math.floor(s)===s?ox(i[0],t,s,e):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function ox(n,t,e,i){return(n==="-"||n==="+")&&(e=t+e),e===t||e<0||e>=i?!1:e}function rx(n,t){let e=null;return n==="start"?e=t.bottom:n==="end"?e=t.top:et(n)?e=t.getPixelForValue(n.value):t.getBasePixel&&(e=t.getBasePixel()),e}function ax(n,t,e){let i;return n==="start"?i=e:n==="end"?i=t.options.reverse?t.min:t.max:et(n)?i=n.value:i=t.getBaseValue(),i}function lx(n){const t=n.options,e=t.fill;let i=Q(e&&e.target,e);return i===void 0&&(i=!!t.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function cx(n){const{scale:t,index:e,line:i}=n,s=[],o=i.segments,r=i.points,a=dx(t,e);a.push(Tc({x:null,y:t.bottom},i));for(let c=0;c<o.length;c++){const d=o[c];for(let u=d.start;u<=d.end;u++)ux(s,r[u],a)}return new Ce({points:s,options:{}})}function dx(n,t){const e=[],i=n.getMatchingVisibleMetas("line");for(let s=0;s<i.length;s++){const o=i[s];if(o.index===t)break;o.hidden||e.unshift(o.dataset)}return e}function ux(n,t,e){const i=[];for(let s=0;s<e.length;s++){const o=e[s],{first:r,last:a,point:c}=hx(o,t,"x");if(!(!c||r&&a)){if(r)i.unshift(c);else if(n.push(c),!a)break}}n.push(...i)}function hx(n,t,e){const i=n.interpolate(t,e);if(!i)return{};const s=i[e],o=n.segments,r=n.points;let a=!1,c=!1;for(let d=0;d<o.length;d++){const u=o[d],h=r[u.start][e],f=r[u.end][e];if(we(s,h,f)){a=s===h,c=s===f;break}}return{first:a,last:c,point:i}}class Mc{constructor(t){this.x=t.x,this.y=t.y,this.radius=t.radius}pathSegment(t,e,i){const{x:s,y:o,radius:r}=this;return e=e||{start:0,end:pt},t.arc(s,o,r,e.end,e.start,!0),!i.bounds}interpolate(t){const{x:e,y:i,radius:s}=this,o=t.angle;return{x:e+Math.cos(o)*s,y:i+Math.sin(o)*s,angle:o}}}function fx(n){const{chart:t,fill:e,line:i}=n;if(St(e))return mx(t,e);if(e==="stack")return cx(n);if(e==="shape")return!0;const s=px(n);return s instanceof Mc?s:Tc(s,i)}function mx(n,t){const e=n.getDatasetMeta(t);return e&&n.isDatasetVisible(t)?e.dataset:null}function px(n){return(n.scale||{}).getPointPositionForValue?yx(n):gx(n)}function gx(n){const{scale:t={},fill:e}=n,i=rx(e,t);if(St(i)){const s=t.isHorizontal();return{x:s?i:null,y:s?null:i}}return null}function yx(n){const{scale:t,fill:e}=n,i=t.options,s=t.getLabels().length,o=i.reverse?t.max:t.min,r=ax(e,t,o),a=[];if(i.grid.circular){const c=t.getPointPositionForValue(0,o);return new Mc({x:c.x,y:c.y,radius:t.getDistanceFromCenterForValue(r)})}for(let c=0;c<s;++c)a.push(t.getPointPositionForValue(c,r));return a}function $o(n,t,e){const i=fx(t),{line:s,scale:o,axis:r}=t,a=s.options,c=a.fill,d=a.backgroundColor,{above:u=d,below:h=d}=c||{};i&&s.points.length&&(Zi(n,e),bx(n,{line:s,target:i,above:u,below:h,area:e,scale:o,axis:r}),ts(n))}function bx(n,t){const{line:e,target:i,above:s,below:o,area:r,scale:a}=t,c=e._loop?"angle":t.axis;n.save(),c==="x"&&o!==s&&(Vc(n,i,r.top),Ac(n,{line:e,target:i,color:s,scale:a,property:c}),n.restore(),n.save(),Vc(n,i,r.bottom)),Ac(n,{line:e,target:i,color:o,scale:a,property:c}),n.restore()}function Vc(n,t,e){const{segments:i,points:s}=t;let o=!0,r=!1;n.beginPath();for(const a of i){const{start:c,end:d}=a,u=s[c],h=s[Bo(c,d,s)];o?(n.moveTo(u.x,u.y),o=!1):(n.lineTo(u.x,e),n.lineTo(u.x,u.y)),r=!!t.pathSegment(n,a,{move:r}),r?n.closePath():n.lineTo(h.x,e)}n.lineTo(t.first().x,e),n.closePath(),n.clip()}function Ac(n,t){const{line:e,target:i,property:s,color:o,scale:r}=t,a=ex(e,i,s);for(const{source:c,target:d,start:u,end:h}of a){const{style:{backgroundColor:f=o}={}}=c,m=i!==!0;n.save(),n.fillStyle=f,_x(n,r,m&&Fo(s,u,h)),n.beginPath();const p=!!e.pathSegment(n,c);let g;if(m){p?n.closePath():Fc(n,i,h,s);const y=!!i.pathSegment(n,d,{move:p,reverse:!0});g=p&&y,g||Fc(n,i,u,s)}n.closePath(),n.fill(g?"evenodd":"nonzero"),n.restore()}}function _x(n,t,e){const{top:i,bottom:s}=t.chart.chartArea,{property:o,start:r,end:a}=e||{};o==="x"&&(n.beginPath(),n.rect(r,i,a-r,s-i),n.clip())}function Fc(n,t,e,i){const s=t.interpolate(e,i);s&&n.lineTo(s.x,s.y)}var Bc={id:"filler",afterDatasetsUpdate(n,t,e){const i=(n.data.datasets||[]).length,s=[];let o,r,a,c;for(r=0;r<i;++r)o=n.getDatasetMeta(r),a=o.dataset,c=null,a&&a.options&&a instanceof Ce&&(c={visible:n.isDatasetVisible(r),index:r,fill:sx(a,r,i),chart:n,axis:o.controller.options.indexAxis,scale:o.vScale,line:a}),o.$filler=c,s.push(c);for(r=0;r<i;++r)c=s[r],!(!c||c.fill===!1)&&(c.fill=ix(s,r,e.propagate))},beforeDraw(n,t,e){const i=e.drawTime==="beforeDraw",s=n.getSortedVisibleDatasetMetas(),o=n.chartArea;for(let r=s.length-1;r>=0;--r){const a=s[r].$filler;a&&(a.line.updateControlPoints(o,a.axis),i&&a.fill&&$o(n.ctx,a,o))}},beforeDatasetsDraw(n,t,e){if(e.drawTime!=="beforeDatasetsDraw")return;const i=n.getSortedVisibleDatasetMetas();for(let s=i.length-1;s>=0;--s){const o=i[s].$filler;Pc(o)&&$o(n.ctx,o,n.chartArea)}},beforeDatasetDraw(n,t,e){const i=t.meta.$filler;!Pc(i)||e.drawTime!=="beforeDatasetDraw"||$o(n.ctx,i,n.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const $c=(n,t)=>{let{boxHeight:e=t,boxWidth:i=t}=n;return n.usePointStyle&&(e=Math.min(e,t),i=n.pointStyleWidth||Math.min(i,t)),{boxWidth:i,boxHeight:e,itemHeight:Math.max(t,e)}},xx=(n,t)=>n!==null&&t!==null&&n.datasetIndex===t.datasetIndex&&n.index===t.index;class Rc extends Xt{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=ft(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(i=>t.filter(i,this.chart.data))),t.sort&&(e=e.sort((i,s)=>t.sort(i,s,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display){this.width=this.height=0;return}const i=t.labels,s=Ct(i.font),o=s.size,r=this._computeTitleHeight(),{boxWidth:a,itemHeight:c}=$c(i,o);let d,u;e.font=s.string,this.isHorizontal()?(d=this.maxWidth,u=this._fitRows(r,o,a,c)+10):(u=this.maxHeight,d=this._fitCols(r,s,a,c)+10),this.width=Math.min(d,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,s){const{ctx:o,maxWidth:r,options:{labels:{padding:a}}}=this,c=this.legendHitBoxes=[],d=this.lineWidths=[0],u=s+a;let h=t;o.textAlign="left",o.textBaseline="middle";let f=-1,m=-u;return this.legendItems.forEach((p,g)=>{const y=i+e/2+o.measureText(p.text).width;(g===0||d[d.length-1]+y+2*a>r)&&(h+=u,d[d.length-(g>0?0:1)]=0,m+=u,f++),c[g]={left:0,top:m,row:f,width:y,height:s},d[d.length-1]+=y+a}),h}_fitCols(t,e,i,s){const{ctx:o,maxHeight:r,options:{labels:{padding:a}}}=this,c=this.legendHitBoxes=[],d=this.columnSizes=[],u=r-t;let h=a,f=0,m=0,p=0,g=0;return this.legendItems.forEach((y,b)=>{const{itemWidth:_,itemHeight:w}=kx(i,e,o,y,s);b>0&&m+w+2*a>u&&(h+=f+a,d.push({width:f,height:m}),p+=f+a,g++,f=m=0),c[b]={left:p,top:m,col:g,width:_,height:w},f=Math.max(f,_),m+=w+a}),h+=f,d.push({width:f,height:m}),h}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:s},rtl:o}}=this,r=Sn(o,this.left,this.width);if(this.isHorizontal()){let a=0,c=Mt(i,this.left+s,this.right-this.lineWidths[a]);for(const d of e)a!==d.row&&(a=d.row,c=Mt(i,this.left+s,this.right-this.lineWidths[a])),d.top+=this.top+t+s,d.left=r.leftForLtr(r.x(c),d.width),c+=d.width+s}else{let a=0,c=Mt(i,this.top+t+s,this.bottom-this.columnSizes[a].height);for(const d of e)d.col!==a&&(a=d.col,c=Mt(i,this.top+t+s,this.bottom-this.columnSizes[a].height)),d.top=c,d.left+=this.left+s,d.left=r.leftForLtr(r.x(d.left),d.width),c+=d.height+s}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Zi(t,this),this._draw(),ts(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:s}=this,{align:o,labels:r}=t,a=gt.color,c=Sn(t.rtl,this.left,this.width),d=Ct(r.font),{padding:u}=r,h=d.size,f=h/2;let m;this.drawTitle(),s.textAlign=c.textAlign("left"),s.textBaseline="middle",s.lineWidth=.5,s.font=d.string;const{boxWidth:p,boxHeight:g,itemHeight:y}=$c(r,h),b=function(v,S,x){if(isNaN(p)||p<=0||isNaN(g)||g<0)return;s.save();const O=Q(x.lineWidth,1);if(s.fillStyle=Q(x.fillStyle,a),s.lineCap=Q(x.lineCap,"butt"),s.lineDashOffset=Q(x.lineDashOffset,0),s.lineJoin=Q(x.lineJoin,"miter"),s.lineWidth=O,s.strokeStyle=Q(x.strokeStyle,a),s.setLineDash(Q(x.lineDash,[])),r.usePointStyle){const M={radius:g*Math.SQRT2/2,pointStyle:x.pointStyle,rotation:x.rotation,borderWidth:O},C=c.xPlus(v,p/2),T=S+f;ol(s,M,C,T,r.pointStyleWidth&&p)}else{const M=S+Math.max((h-g)/2,0),C=c.leftForLtr(v,p),T=en(x.borderRadius);s.beginPath(),Object.values(T).some($=>$!==0)?ai(s,{x:C,y:M,w:p,h:g,radius:T}):s.rect(C,M,p,g),s.fill(),O!==0&&s.stroke()}s.restore()},_=function(v,S,x){tn(s,x.text,v,S+y/2,d,{strikethrough:x.hidden,textAlign:c.textAlign(x.textAlign)})},w=this.isHorizontal(),E=this._computeTitleHeight();w?m={x:Mt(o,this.left+u,this.right-i[0]),y:this.top+u+E,line:0}:m={x:this.left+u,y:Mt(o,this.top+E+u,this.bottom-e[0].height),line:0},yl(this.ctx,t.textDirection);const k=y+u;this.legendItems.forEach((v,S)=>{s.strokeStyle=v.fontColor,s.fillStyle=v.fontColor;const x=s.measureText(v.text).width,O=c.textAlign(v.textAlign||(v.textAlign=r.textAlign)),M=p+f+x;let C=m.x,T=m.y;c.setWidth(this.width),w?S>0&&C+M+u>this.right&&(T=m.y+=k,m.line++,C=m.x=Mt(o,this.left+u,this.right-i[m.line])):S>0&&T+k>this.bottom&&(C=m.x=C+e[m.line].width+u,m.line++,T=m.y=Mt(o,this.top+E+u,this.bottom-e[m.line].height));const $=c.x(C);if(b($,T,v),C=Jy(O,C+p+f,w?C+M:this.right,t.rtl),_(c.x(C),T,v),w)m.x+=M+u;else if(typeof v.text!="string"){const U=d.lineHeight;m.y+=Lc(v,U)+u}else m.y+=k}),bl(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=Ct(e.font),s=Vt(e.padding);if(!e.display)return;const o=Sn(t.rtl,this.left,this.width),r=this.ctx,a=e.position,c=i.size/2,d=s.top+c;let u,h=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+d,h=Mt(t.align,h,this.right-f);else{const p=this.columnSizes.reduce((g,y)=>Math.max(g,y.height),0);u=d+Mt(t.align,this.top,this.bottom-p-t.labels.padding-this._computeTitleHeight())}const m=Mt(a,h,h+f);r.textAlign=o.textAlign(ro(a)),r.textBaseline="middle",r.strokeStyle=e.color,r.fillStyle=e.color,r.font=i.string,tn(r,e.text,m,u,i)}_computeTitleHeight(){const t=this.options.title,e=Ct(t.font),i=Vt(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,s,o;if(we(t,this.left,this.right)&&we(e,this.top,this.bottom)){for(o=this.legendHitBoxes,i=0;i<o.length;++i)if(s=o[i],we(t,s.left,s.left+s.width)&&we(e,s.top,s.top+s.height))return this.legendItems[i]}return null}handleEvent(t){const e=this.options;if(!Ex(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const s=this._hoveredItem,o=xx(s,i);s&&!o&&ft(e.onLeave,[t,s,this],this),this._hoveredItem=i,i&&!o&&ft(e.onHover,[t,i,this],this)}else i&&ft(e.onClick,[t,i,this],this)}}function kx(n,t,e,i,s){const o=Sx(i,n,t,e),r=wx(s,i,t.lineHeight);return{itemWidth:o,itemHeight:r}}function Sx(n,t,e,i){let s=n.text;return s&&typeof s!="string"&&(s=s.reduce((o,r)=>o.length>r.length?o:r)),t+e.size/2+i.measureText(s).width}function wx(n,t,e){let i=n;return typeof t.text!="string"&&(i=Lc(t,e)),i}function Lc(n,t){const e=n.text?n.text.length:0;return t*e}function Ex(n,t){return!!((n==="mousemove"||n==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(n==="click"||n==="mouseup"))}var Ic={id:"legend",_element:Rc,start(n,t,e){const i=n.legend=new Rc({ctx:n.ctx,options:e,chart:n});Pt.configure(n,i,e),Pt.addBox(n,i)},stop(n){Pt.removeBox(n,n.legend),delete n.legend},beforeUpdate(n,t,e){const i=n.legend;Pt.configure(n,i,e),i.options=e},afterUpdate(n){const t=n.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(n,t){t.replay||n.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(n,t,e){const i=t.datasetIndex,s=e.chart;s.isDatasetVisible(i)?(s.hide(i),t.hidden=!0):(s.show(i),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:n=>n.chart.options.color,boxWidth:40,padding:10,generateLabels(n){const t=n.data.datasets,{labels:{usePointStyle:e,pointStyle:i,textAlign:s,color:o,useBorderRadius:r,borderRadius:a}}=n.legend.options;return n._getSortedDatasetMetas().map(c=>{const d=c.controller.getStyle(e?0:void 0),u=Vt(d.borderWidth);return{text:t[c.index].label,fillStyle:d.backgroundColor,fontColor:o,hidden:!c.visible,lineCap:d.borderCapStyle,lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:d.borderColor,pointStyle:i||d.pointStyle,rotation:d.rotation,textAlign:s||d.textAlign,borderRadius:r&&(a||d.borderRadius),datasetIndex:c.index}},this)}},title:{color:n=>n.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:n=>!n.startsWith("on"),labels:{_scriptable:n=>!["generateLabels","filter","sort"].includes(n)}}};class Ro extends Xt{constructor(t){super(),this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this._padding=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e){const i=this.options;if(this.left=0,this.top=0,!i.display){this.width=this.height=this.right=this.bottom=0;return}this.width=this.right=t,this.height=this.bottom=e;const s=_t(i.text)?i.text.length:1;this._padding=Vt(i.padding);const o=s*Ct(i.font).lineHeight+this._padding.height;this.isHorizontal()?this.height=o:this.width=o}isHorizontal(){const t=this.options.position;return t==="top"||t==="bottom"}_drawArgs(t){const{top:e,left:i,bottom:s,right:o,options:r}=this,a=r.align;let c=0,d,u,h;return this.isHorizontal()?(u=Mt(a,i,o),h=e+t,d=o-i):(r.position==="left"?(u=i+t,h=Mt(a,s,e),c=mt*-.5):(u=o-t,h=Mt(a,e,s),c=mt*.5),d=s-e),{titleX:u,titleY:h,maxWidth:d,rotation:c}}draw(){const t=this.ctx,e=this.options;if(!e.display)return;const i=Ct(e.font),o=i.lineHeight/2+this._padding.top,{titleX:r,titleY:a,maxWidth:c,rotation:d}=this._drawArgs(o);tn(t,e.text,0,0,i,{color:e.color,maxWidth:c,rotation:d,textAlign:ro(e.align),textBaseline:"middle",translation:[r,a]})}}function vx(n,t){const e=new Ro({ctx:n.ctx,options:t,chart:n});Pt.configure(n,e,t),Pt.addBox(n,e),n.titleBlock=e}var jc={id:"title",_element:Ro,start(n,t,e){vx(n,e)},stop(n){const t=n.titleBlock;Pt.removeBox(n,t),delete n.titleBlock},beforeUpdate(n,t,e){const i=n.titleBlock;Pt.configure(n,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"bold"},fullSize:!0,padding:10,position:"top",text:"",weight:2e3},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const ps=new WeakMap;var zc={id:"subtitle",start(n,t,e){const i=new Ro({ctx:n.ctx,options:e,chart:n});Pt.configure(n,i,e),Pt.addBox(n,i),ps.set(n,i)},stop(n){Pt.removeBox(n,ps.get(n)),ps.delete(n)},beforeUpdate(n,t,e){const i=ps.get(n);Pt.configure(n,i,e),i.options=e},defaults:{align:"center",display:!1,font:{weight:"normal"},fullSize:!0,padding:0,position:"top",text:"",weight:1500},defaultRoutes:{color:"color"},descriptors:{_scriptable:!0,_indexable:!1}};const Ei={average(n){if(!n.length)return!1;let t,e,i=new Set,s=0,o=0;for(t=0,e=n.length;t<e;++t){const a=n[t].element;if(a&&a.hasValue()){const c=a.tooltipPosition();i.add(c.x),s+=c.y,++o}}return o===0||i.size===0?!1:{x:[...i].reduce((a,c)=>a+c)/i.size,y:s/o}},nearest(n,t){if(!n.length)return!1;let e=t.x,i=t.y,s=Number.POSITIVE_INFINITY,o,r,a;for(o=0,r=n.length;o<r;++o){const c=n[o].element;if(c&&c.hasValue()){const d=c.getCenterPoint(),u=so(t,d);u<s&&(s=u,a=c)}}if(a){const c=a.tooltipPosition();e=c.x,i=c.y}return{x:e,y:i}}};function he(n,t){return t&&(_t(t)?Array.prototype.push.apply(n,t):n.push(t)),n}function Oe(n){return(typeof n=="string"||n instanceof String)&&n.indexOf(`
172
- `)>-1?n.split(`
173
- `):n}function Cx(n,t){const{element:e,datasetIndex:i,index:s}=t,o=n.getDatasetMeta(i).controller,{label:r,value:a}=o.getLabelAndValue(s);return{chart:n,label:r,parsed:o.getParsed(s),raw:n.data.datasets[i].data[s],formattedValue:a,dataset:o.getDataset(),dataIndex:s,datasetIndex:i,element:e}}function Wc(n,t){const e=n.chart.ctx,{body:i,footer:s,title:o}=n,{boxWidth:r,boxHeight:a}=t,c=Ct(t.bodyFont),d=Ct(t.titleFont),u=Ct(t.footerFont),h=o.length,f=s.length,m=i.length,p=Vt(t.padding);let g=p.height,y=0,b=i.reduce((E,k)=>E+k.before.length+k.lines.length+k.after.length,0);if(b+=n.beforeBody.length+n.afterBody.length,h&&(g+=h*d.lineHeight+(h-1)*t.titleSpacing+t.titleMarginBottom),b){const E=t.displayColors?Math.max(a,c.lineHeight):c.lineHeight;g+=m*E+(b-m)*c.lineHeight+(b-1)*t.bodySpacing}f&&(g+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let _=0;const w=function(E){y=Math.max(y,e.measureText(E).width+_)};return e.save(),e.font=d.string,lt(n.title,w),e.font=c.string,lt(n.beforeBody.concat(n.afterBody),w),_=t.displayColors?r+2+t.boxPadding:0,lt(i,E=>{lt(E.before,w),lt(E.lines,w),lt(E.after,w)}),_=0,e.font=u.string,lt(n.footer,w),e.restore(),y+=p.width,{width:y,height:g}}function Ox(n,t){const{y:e,height:i}=t;return e<i/2?"top":e>n.height-i/2?"bottom":"center"}function Dx(n,t,e,i){const{x:s,width:o}=i,r=e.caretSize+e.caretPadding;if(n==="left"&&s+o+r>t.width||n==="right"&&s-o-r<0)return!0}function Nx(n,t,e,i){const{x:s,width:o}=e,{width:r,chartArea:{left:a,right:c}}=n;let d="center";return i==="center"?d=s<=(a+c)/2?"left":"right":s<=o/2?d="left":s>=r-o/2&&(d="right"),Dx(d,n,t,e)&&(d="center"),d}function Hc(n,t,e){const i=e.yAlign||t.yAlign||Ox(n,e);return{xAlign:e.xAlign||t.xAlign||Nx(n,t,e,i),yAlign:i}}function Tx(n,t){let{x:e,width:i}=n;return t==="right"?e-=i:t==="center"&&(e-=i/2),e}function Px(n,t,e){let{y:i,height:s}=n;return t==="top"?i+=e:t==="bottom"?i-=s+e:i-=s/2,i}function Uc(n,t,e,i){const{caretSize:s,caretPadding:o,cornerRadius:r}=n,{xAlign:a,yAlign:c}=e,d=s+o,{topLeft:u,topRight:h,bottomLeft:f,bottomRight:m}=en(r);let p=Tx(t,a);const g=Px(t,c,d);return c==="center"?a==="left"?p+=d:a==="right"&&(p-=d):a==="left"?p-=Math.max(u,f)+s:a==="right"&&(p+=Math.max(h,m)+s),{x:Dt(p,0,i.width-t.width),y:Dt(g,0,i.height-t.height)}}function gs(n,t,e){const i=Vt(e.padding);return t==="center"?n.x+n.width/2:t==="right"?n.x+n.width-i.right:n.x+i.left}function qc(n){return he([],Oe(n))}function Mx(n,t,e){return je(n,{tooltip:t,tooltipItems:e,type:"tooltip"})}function Yc(n,t){const e=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return e?n.override(e):n}const Kc={beforeTitle:Se,title(n){if(n.length>0){const t=n[0],e=t.chart.data.labels,i=e?e.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(i>0&&t.dataIndex<i)return e[t.dataIndex]}return""},afterTitle:Se,beforeBody:Se,beforeLabel:Se,label(n){if(this&&this.options&&this.options.mode==="dataset")return n.label+": "+n.formattedValue||n.formattedValue;let t=n.dataset.label||"";t&&(t+=": ");const e=n.formattedValue;return it(e)||(t+=e),t},labelColor(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(n){const e=n.chart.getDatasetMeta(n.datasetIndex).controller.getStyle(n.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:Se,afterBody:Se,beforeFooter:Se,footer:Se,afterFooter:Se};function Rt(n,t,e,i){const s=n[t].call(e,i);return typeof s>"u"?Kc[t].call(e,i):s}class Lo extends Xt{constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),s=i.enabled&&e.options.animation&&i.animations,o=new _o(this.chart,s);return s._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=Mx(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,e){const{callbacks:i}=e,s=Rt(i,"beforeTitle",this,t),o=Rt(i,"title",this,t),r=Rt(i,"afterTitle",this,t);let a=[];return a=he(a,Oe(s)),a=he(a,Oe(o)),a=he(a,Oe(r)),a}getBeforeBody(t,e){return qc(Rt(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,s=[];return lt(t,o=>{const r={before:[],lines:[],after:[]},a=Yc(i,o);he(r.before,Oe(Rt(a,"beforeLabel",this,o))),he(r.lines,Rt(a,"label",this,o)),he(r.after,Oe(Rt(a,"afterLabel",this,o))),s.push(r)}),s}getAfterBody(t,e){return qc(Rt(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,s=Rt(i,"beforeFooter",this,t),o=Rt(i,"footer",this,t),r=Rt(i,"afterFooter",this,t);let a=[];return a=he(a,Oe(s)),a=he(a,Oe(o)),a=he(a,Oe(r)),a}_createItems(t){const e=this._active,i=this.chart.data,s=[],o=[],r=[];let a=[],c,d;for(c=0,d=e.length;c<d;++c)a.push(Cx(this.chart,e[c]));return t.filter&&(a=a.filter((u,h,f)=>t.filter(u,h,f,i))),t.itemSort&&(a=a.sort((u,h)=>t.itemSort(u,h,i))),lt(a,u=>{const h=Yc(t.callbacks,u);s.push(Rt(h,"labelColor",this,u)),o.push(Rt(h,"labelPointStyle",this,u)),r.push(Rt(h,"labelTextColor",this,u))}),this.labelColors=s,this.labelPointStyles=o,this.labelTextColors=r,this.dataPoints=a,a}update(t,e){const i=this.options.setContext(this.getContext()),s=this._active;let o,r=[];if(!s.length)this.opacity!==0&&(o={opacity:0});else{const a=Ei[i.position].call(this,s,this._eventPosition);r=this._createItems(i),this.title=this.getTitle(r,i),this.beforeBody=this.getBeforeBody(r,i),this.body=this.getBody(r,i),this.afterBody=this.getAfterBody(r,i),this.footer=this.getFooter(r,i);const c=this._size=Wc(this,i),d=Object.assign({},a,c),u=Hc(this.chart,i,d),h=Uc(i,d,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:h.x,y:h.y,width:c.width,height:c.height,caretX:a.x,caretY:a.y}}this._tooltipItems=r,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,s){const o=this.getCaretPosition(t,i,s);e.lineTo(o.x1,o.y1),e.lineTo(o.x2,o.y2),e.lineTo(o.x3,o.y3)}getCaretPosition(t,e,i){const{xAlign:s,yAlign:o}=this,{caretSize:r,cornerRadius:a}=i,{topLeft:c,topRight:d,bottomLeft:u,bottomRight:h}=en(a),{x:f,y:m}=t,{width:p,height:g}=e;let y,b,_,w,E,k;return o==="center"?(E=m+g/2,s==="left"?(y=f,b=y-r,w=E+r,k=E-r):(y=f+p,b=y+r,w=E-r,k=E+r),_=y):(s==="left"?b=f+Math.max(c,u)+r:s==="right"?b=f+p-Math.max(d,h)-r:b=this.caretX,o==="top"?(w=m,E=w-r,y=b-r,_=b+r):(w=m+g,E=w+r,y=b+r,_=b-r),k=w),{x1:y,x2:b,x3:_,y1:w,y2:E,y3:k}}drawTitle(t,e,i){const s=this.title,o=s.length;let r,a,c;if(o){const d=Sn(i.rtl,this.x,this.width);for(t.x=gs(this,i.titleAlign,i),e.textAlign=d.textAlign(i.titleAlign),e.textBaseline="middle",r=Ct(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=r.string,c=0;c<o;++c)e.fillText(s[c],d.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+a,c+1===o&&(t.y+=i.titleMarginBottom-a)}}_drawColorBox(t,e,i,s,o){const r=this.labelColors[i],a=this.labelPointStyles[i],{boxHeight:c,boxWidth:d}=o,u=Ct(o.bodyFont),h=gs(this,"left",o),f=s.x(h),m=c<u.lineHeight?(u.lineHeight-c)/2:0,p=e.y+m;if(o.usePointStyle){const g={radius:Math.min(d,c)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},y=s.leftForLtr(f,d)+d/2,b=p+c/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,ho(t,g,y,b),t.strokeStyle=r.borderColor,t.fillStyle=r.backgroundColor,ho(t,g,y,b)}else{t.lineWidth=et(r.borderWidth)?Math.max(...Object.values(r.borderWidth)):r.borderWidth||1,t.strokeStyle=r.borderColor,t.setLineDash(r.borderDash||[]),t.lineDashOffset=r.borderDashOffset||0;const g=s.leftForLtr(f,d),y=s.leftForLtr(s.xPlus(f,1),d-2),b=en(r.borderRadius);Object.values(b).some(_=>_!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,ai(t,{x:g,y:p,w:d,h:c,radius:b}),t.fill(),t.stroke(),t.fillStyle=r.backgroundColor,t.beginPath(),ai(t,{x:y,y:p+1,w:d-2,h:c-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(g,p,d,c),t.strokeRect(g,p,d,c),t.fillStyle=r.backgroundColor,t.fillRect(y,p+1,d-2,c-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:s}=this,{bodySpacing:o,bodyAlign:r,displayColors:a,boxHeight:c,boxWidth:d,boxPadding:u}=i,h=Ct(i.bodyFont);let f=h.lineHeight,m=0;const p=Sn(i.rtl,this.x,this.width),g=function(x){e.fillText(x,p.x(t.x+m),t.y+f/2),t.y+=f+o},y=p.textAlign(r);let b,_,w,E,k,v,S;for(e.textAlign=r,e.textBaseline="middle",e.font=h.string,t.x=gs(this,y,i),e.fillStyle=i.bodyColor,lt(this.beforeBody,g),m=a&&y!=="right"?r==="center"?d/2+u:d+2+u:0,E=0,v=s.length;E<v;++E){for(b=s[E],_=this.labelTextColors[E],e.fillStyle=_,lt(b.before,g),w=b.lines,a&&w.length&&(this._drawColorBox(e,t,E,p,i),f=Math.max(h.lineHeight,c)),k=0,S=w.length;k<S;++k)g(w[k]),f=h.lineHeight;lt(b.after,g)}m=0,f=h.lineHeight,lt(this.afterBody,g),t.y-=o}drawFooter(t,e,i){const s=this.footer,o=s.length;let r,a;if(o){const c=Sn(i.rtl,this.x,this.width);for(t.x=gs(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=c.textAlign(i.footerAlign),e.textBaseline="middle",r=Ct(i.footerFont),e.fillStyle=i.footerColor,e.font=r.string,a=0;a<o;++a)e.fillText(s[a],c.x(t.x),t.y+r.lineHeight/2),t.y+=r.lineHeight+i.footerSpacing}}drawBackground(t,e,i,s){const{xAlign:o,yAlign:r}=this,{x:a,y:c}=t,{width:d,height:u}=i,{topLeft:h,topRight:f,bottomLeft:m,bottomRight:p}=en(s.cornerRadius);e.fillStyle=s.backgroundColor,e.strokeStyle=s.borderColor,e.lineWidth=s.borderWidth,e.beginPath(),e.moveTo(a+h,c),r==="top"&&this.drawCaret(t,e,i,s),e.lineTo(a+d-f,c),e.quadraticCurveTo(a+d,c,a+d,c+f),r==="center"&&o==="right"&&this.drawCaret(t,e,i,s),e.lineTo(a+d,c+u-p),e.quadraticCurveTo(a+d,c+u,a+d-p,c+u),r==="bottom"&&this.drawCaret(t,e,i,s),e.lineTo(a+m,c+u),e.quadraticCurveTo(a,c+u,a,c+u-m),r==="center"&&o==="left"&&this.drawCaret(t,e,i,s),e.lineTo(a,c+h),e.quadraticCurveTo(a,c,a+h,c),e.closePath(),e.fill(),s.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,s=i&&i.x,o=i&&i.y;if(s||o){const r=Ei[t.position].call(this,this._active,this._eventPosition);if(!r)return;const a=this._size=Wc(this,t),c=Object.assign({},r,this._size),d=Hc(e,t,c),u=Uc(t,c,d,e);(s._to!==u.x||o._to!==u.y)&&(this.xAlign=d.xAlign,this.yAlign=d.yAlign,this.width=a.width,this.height=a.height,this.caretX=r.x,this.caretY=r.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const s={width:this.width,height:this.height},o={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const r=Vt(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(o,t,s,e),yl(t,e.textDirection),o.y+=r.top,this.drawTitle(o,t,e),this.drawBody(o,t,e),this.drawFooter(o,t,e),bl(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,s=t.map(({datasetIndex:a,index:c})=>{const d=this.chart.getDatasetMeta(a);if(!d)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:d.data[c],index:c}}),o=!Ki(i,s),r=this._positionChanged(s,e);(o||r)&&(this._active=s,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const s=this.options,o=this._active||[],r=this._getActiveElements(t,o,e,i),a=this._positionChanged(r,t),c=e||!Ki(r,o)||a;return c&&(this._active=r,(s.enabled||s.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),c}_getActiveElements(t,e,i,s){const o=this.options;if(t.type==="mouseout")return[];if(!s)return e.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const r=this.chart.getElementsAtEventForMode(t,o.mode,o,i);return o.reverse&&r.reverse(),r}_positionChanged(t,e){const{caretX:i,caretY:s,options:o}=this,r=Ei[o.position].call(this,t,e);return r!==!1&&(i!==r.x||s!==r.y)}}L(Lo,"positioners",Ei);var Xc={id:"tooltip",_element:Lo,positioners:Ei,afterInit(n,t,e){e&&(n.tooltip=new Lo({chart:n,options:e}))},beforeUpdate(n,t,e){n.tooltip&&n.tooltip.initialize(e)},reset(n,t,e){n.tooltip&&n.tooltip.initialize(e)},afterDraw(n){const t=n.tooltip;if(t&&t._willRender()){const e={tooltip:t};if(n.notifyPlugins("beforeTooltipDraw",{...e,cancelable:!0})===!1)return;t.draw(n.ctx),n.notifyPlugins("afterTooltipDraw",e)}},afterEvent(n,t){if(n.tooltip){const e=t.replay;n.tooltip.handleEvent(t.event,e,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(n,t)=>t.bodyFont.size,boxWidth:(n,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:Kc},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:n=>n!=="filter"&&n!=="itemSort"&&n!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]},Gc=Object.freeze({__proto__:null,Colors:vc,Decimation:Dc,Filler:Bc,Legend:Ic,SubTitle:zc,Title:jc,Tooltip:Xc});const Vx=(n,t,e,i)=>(typeof t=="string"?(e=n.push(t)-1,i.unshift({index:e,label:t})):isNaN(t)&&(e=null),e);function Ax(n,t,e,i){const s=n.indexOf(t);if(s===-1)return Vx(n,t,e,i);const o=n.lastIndexOf(t);return s!==o?e:s}const Fx=(n,t)=>n===null?null:Dt(Math.round(n),0,t);function Qc(n){const t=this.getLabels();return n>=0&&n<t.length?t[n]:n}class ys extends We{constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const i=this.getLabels();for(const{index:s,label:o}of e)i[s]===o&&i.splice(s,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(it(t))return null;const i=this.getLabels();return e=isFinite(e)&&i[e]===t?e:Ax(i,t,Q(e,t),this._addedLabels),Fx(e,i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:s}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(i=0),e||(s=this.getLabels().length-1)),this.min=i,this.max=s}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,s=[];let o=this.getLabels();o=t===0&&e===o.length-1?o:o.slice(t,e+1),this._valueRange=Math.max(o.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let r=t;r<=e;r++)s.push({value:r});return s}getLabelForValue(t){return Qc.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}L(ys,"id","category"),L(ys,"defaults",{ticks:{callback:Qc}});function Bx(n,t){const e=[],{bounds:s,step:o,min:r,max:a,precision:c,count:d,maxTicks:u,maxDigits:h,includeBounds:f}=n,m=o||1,p=u-1,{min:g,max:y}=t,b=!it(r),_=!it(a),w=!it(d),E=(y-g)/(h+1);let k=za((y-g)/p/m)*m,v,S,x,O;if(k<1e-14&&!b&&!_)return[{value:g},{value:y}];O=Math.ceil(y/k)-Math.floor(g/k),O>p&&(k=za(O*k/p/m)*m),it(c)||(v=Math.pow(10,c),k=Math.ceil(k*v)/v),s==="ticks"?(S=Math.floor(g/k)*k,x=Math.ceil(y/k)*k):(S=g,x=y),b&&_&&o&&Uy((a-r)/o,k/1e3)?(O=Math.round(Math.min((a-r)/k,u)),k=(a-r)/O,S=r,x=a):w?(S=b?r:S,x=_?a:x,O=d-1,k=(x-S)/O):(O=(x-S)/k,ei(O,Math.round(O),k/1e3)?O=Math.round(O):O=Math.ceil(O));const M=Math.max(Ha(k),Ha(S));v=Math.pow(10,it(c)?M:c),S=Math.round(S*v)/v,x=Math.round(x*v)/v;let C=0;for(b&&(f&&S!==r?(e.push({value:r}),S<r&&C++,ei(Math.round((S+C*k)*v)/v,r,Jc(r,E,n))&&C++):S<r&&C++);C<O;++C){const T=Math.round((S+C*k)*v)/v;if(_&&T>a)break;e.push({value:T})}return _&&f&&x!==a?e.length&&ei(e[e.length-1].value,a,Jc(a,E,n))?e[e.length-1].value=a:e.push({value:a}):(!_||x===a)&&e.push({value:x}),e}function Jc(n,t,{horizontal:e,minRotation:i}){const s=ie(i),o=(e?Math.sin(s):Math.cos(s))||.001,r=.75*t*(""+n).length;return Math.min(t/o,r)}class bs extends We{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return it(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:s,max:o}=this;const r=c=>s=e?s:c,a=c=>o=i?o:c;if(t){const c=ce(s),d=ce(o);c<0&&d<0?a(0):c>0&&d>0&&r(0)}if(s===o){let c=o===0?1:Math.abs(o*.05);a(o+c),t||r(s-c)}this.min=s,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:e,stepSize:i}=t,s;return i?(s=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,s>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${s} ticks. Limiting to 1000.`),s=1e3)):(s=this.computeTickLimit(),e=e||11),e&&(s=Math.min(e,s)),s}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const s={maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:e.includeBounds!==!1},o=this._range||this,r=Bx(s,o);return t.bounds==="ticks"&&Wa(r,this,"value"),t.reverse?(r.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),r}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const s=(i-e)/Math.max(t.length-1,1)/2;e-=s,i+=s}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return si(t,this.chart.options.locale,this.options.ticks.format)}}class _s extends bs{determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=St(t)?t:0,this.max=St(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=ie(this.options.ticks.minRotation),s=(t?Math.sin(i):Math.cos(i))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,o.lineHeight/s))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}L(_s,"id","linear"),L(_s,"defaults",{ticks:{callback:oi.formatters.numeric}});const vi=n=>Math.floor(Ie(n)),an=(n,t)=>Math.pow(10,vi(n)+t);function Zc(n){return n/Math.pow(10,vi(n))===1}function td(n,t,e){const i=Math.pow(10,e),s=Math.floor(n/i);return Math.ceil(t/i)-s}function $x(n,t){const e=t-n;let i=vi(e);for(;td(n,t,i)>10;)i++;for(;td(n,t,i)<10;)i--;return Math.min(i,vi(n))}function Rx(n,{min:t,max:e}){t=zt(n.min,t);const i=[],s=vi(t);let o=$x(t,e),r=o<0?Math.pow(10,Math.abs(o)):1;const a=Math.pow(10,o),c=s>o?Math.pow(10,s):0,d=Math.round((t-c)*r)/r,u=Math.floor((t-c)/a/10)*a*10;let h=Math.floor((d-u)/Math.pow(10,o)),f=zt(n.min,Math.round((c+u+h*Math.pow(10,o))*r)/r);for(;f<e;)i.push({value:f,major:Zc(f),significand:h}),h>=10?h=h<15?15:20:h++,h>=20&&(o++,h=2,r=o>=0?1:r),f=Math.round((c+u+h*Math.pow(10,o))*r)/r;const m=zt(n.max,f);return i.push({value:m,major:Zc(m),significand:h}),i}class xs extends We{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._valueRange=0}parse(t,e){const i=bs.prototype.parse.apply(this,[t,e]);if(i===0){this._zero=!0;return}return St(i)&&i>0?i:null}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=St(t)?Math.max(0,t):null,this.max=St(e)?Math.max(0,e):null,this.options.beginAtZero&&(this._zero=!0),this._zero&&this.min!==this._suggestedMin&&!St(this._userMin)&&(this.min=t===an(this.min,0)?an(this.min,-1):an(this.min,0)),this.handleTickRangeOptions()}handleTickRangeOptions(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let i=this.min,s=this.max;const o=a=>i=t?i:a,r=a=>s=e?s:a;i===s&&(i<=0?(o(1),r(10)):(o(an(i,-1)),r(an(s,1)))),i<=0&&o(an(s,-1)),s<=0&&r(an(i,1)),this.min=i,this.max=s}buildTicks(){const t=this.options,e={min:this._userMin,max:this._userMax},i=Rx(e,this);return t.bounds==="ticks"&&Wa(i,this,"value"),t.reverse?(i.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),i}getLabelForValue(t){return t===void 0?"0":si(t,this.chart.options.locale,this.options.ticks.format)}configure(){const t=this.min;super.configure(),this._startValue=Ie(t),this._valueRange=Ie(this.max)-Ie(t)}getPixelForValue(t){return(t===void 0||t===0)&&(t=this.min),t===null||isNaN(t)?NaN:this.getPixelForDecimal(t===this.min?0:(Ie(t)-this._startValue)/this._valueRange)}getValueForPixel(t){const e=this.getDecimalForPixel(t);return Math.pow(10,this._startValue+e*this._valueRange)}}L(xs,"id","logarithmic"),L(xs,"defaults",{ticks:{callback:oi.formatters.logarithmic,major:{enabled:!0}}});function Io(n){const t=n.ticks;if(t.display&&n.display){const e=Vt(t.backdropPadding);return Q(t.font&&t.font.size,gt.font.size)+e.height}return 0}function Lx(n,t,e){return e=_t(e)?e:[e],{w:lb(n,t.string,e),h:e.length*t.lineHeight}}function ed(n,t,e,i,s){return n===i||n===s?{start:t-e/2,end:t+e/2}:n<i||n>s?{start:t-e,end:t}:{start:t,end:t+e}}function Ix(n){const t={l:n.left+n._padding.left,r:n.right-n._padding.right,t:n.top+n._padding.top,b:n.bottom-n._padding.bottom},e=Object.assign({},t),i=[],s=[],o=n._pointLabels.length,r=n.options.pointLabels,a=r.centerPointLabels?mt/o:0;for(let c=0;c<o;c++){const d=r.setContext(n.getPointLabelContext(c));s[c]=d.padding;const u=n.getPointPosition(c,n.drawingArea+s[c],a),h=Ct(d.font),f=Lx(n.ctx,h,n._pointLabels[c]);i[c]=f;const m=Wt(n.getIndexAngle(c)+a),p=Math.round(io(m)),g=ed(p,u.x,f.w,0,180),y=ed(p,u.y,f.h,90,270);jx(e,t,m,g,y)}n.setCenterPoint(t.l-e.l,e.r-t.r,t.t-e.t,e.b-t.b),n._pointLabelItems=Hx(n,i,s)}function jx(n,t,e,i,s){const o=Math.abs(Math.sin(e)),r=Math.abs(Math.cos(e));let a=0,c=0;i.start<t.l?(a=(t.l-i.start)/o,n.l=Math.min(n.l,t.l-a)):i.end>t.r&&(a=(i.end-t.r)/o,n.r=Math.max(n.r,t.r+a)),s.start<t.t?(c=(t.t-s.start)/r,n.t=Math.min(n.t,t.t-c)):s.end>t.b&&(c=(s.end-t.b)/r,n.b=Math.max(n.b,t.b+c))}function zx(n,t,e){const i=n.drawingArea,{extra:s,additionalAngle:o,padding:r,size:a}=e,c=n.getPointPosition(t,i+s+r,o),d=Math.round(io(Wt(c.angle+wt))),u=Yx(c.y,a.h,d),h=Ux(d),f=qx(c.x,a.w,h);return{visible:!0,x:c.x,y:u,textAlign:h,left:f,top:u,right:f+a.w,bottom:u+a.h}}function Wx(n,t){if(!t)return!0;const{left:e,top:i,right:s,bottom:o}=n;return!(ve({x:e,y:i},t)||ve({x:e,y:o},t)||ve({x:s,y:i},t)||ve({x:s,y:o},t))}function Hx(n,t,e){const i=[],s=n._pointLabels.length,o=n.options,{centerPointLabels:r,display:a}=o.pointLabels,c={extra:Io(o)/2,additionalAngle:r?mt/s:0};let d;for(let u=0;u<s;u++){c.padding=e[u],c.size=t[u];const h=zx(n,u,c);i.push(h),a==="auto"&&(h.visible=Wx(h,d),h.visible&&(d=h))}return i}function Ux(n){return n===0||n===180?"center":n<180?"left":"right"}function qx(n,t,e){return e==="right"?n-=t:e==="center"&&(n-=t/2),n}function Yx(n,t,e){return e===90||e===270?n-=t/2:(e>270||e<90)&&(n-=t),n}function Kx(n,t,e){const{left:i,top:s,right:o,bottom:r}=e,{backdropColor:a}=t;if(!it(a)){const c=en(t.borderRadius),d=Vt(t.backdropPadding);n.fillStyle=a;const u=i-d.left,h=s-d.top,f=o-i+d.width,m=r-s+d.height;Object.values(c).some(p=>p!==0)?(n.beginPath(),ai(n,{x:u,y:h,w:f,h:m,radius:c}),n.fill()):n.fillRect(u,h,f,m)}}function Xx(n,t){const{ctx:e,options:{pointLabels:i}}=n;for(let s=t-1;s>=0;s--){const o=n._pointLabelItems[s];if(!o.visible)continue;const r=i.setContext(n.getPointLabelContext(s));Kx(e,r,o);const a=Ct(r.font),{x:c,y:d,textAlign:u}=o;tn(e,n._pointLabels[s],c,d+a.lineHeight/2,a,{color:r.color,textAlign:u,textBaseline:"middle"})}}function nd(n,t,e,i){const{ctx:s}=n;if(e)s.arc(n.xCenter,n.yCenter,t,0,pt);else{let o=n.getPointPosition(0,t);s.moveTo(o.x,o.y);for(let r=1;r<i;r++)o=n.getPointPosition(r,t),s.lineTo(o.x,o.y)}}function Gx(n,t,e,i,s){const o=n.ctx,r=t.circular,{color:a,lineWidth:c}=t;!r&&!i||!a||!c||e<0||(o.save(),o.strokeStyle=a,o.lineWidth=c,o.setLineDash(s.dash||[]),o.lineDashOffset=s.dashOffset,o.beginPath(),nd(n,e,r,i),o.closePath(),o.stroke(),o.restore())}function Qx(n,t,e){return je(n,{label:e,index:t,type:"pointLabel"})}class Cn extends bs{constructor(t){super(t),this.xCenter=void 0,this.yCenter=void 0,this.drawingArea=void 0,this._pointLabels=[],this._pointLabelItems=[]}setDimensions(){const t=this._padding=Vt(Io(this.options)/2),e=this.width=this.maxWidth-t.width,i=this.height=this.maxHeight-t.height;this.xCenter=Math.floor(this.left+e/2+t.left),this.yCenter=Math.floor(this.top+i/2+t.top),this.drawingArea=Math.floor(Math.min(e,i)/2)}determineDataLimits(){const{min:t,max:e}=this.getMinMax(!1);this.min=St(t)&&!isNaN(t)?t:0,this.max=St(e)&&!isNaN(e)?e:0,this.handleTickRangeOptions()}computeTickLimit(){return Math.ceil(this.drawingArea/Io(this.options))}generateTickLabels(t){bs.prototype.generateTickLabels.call(this,t),this._pointLabels=this.getLabels().map((e,i)=>{const s=ft(this.options.pointLabels.callback,[e,i],this);return s||s===0?s:""}).filter((e,i)=>this.chart.getDataVisibility(i))}fit(){const t=this.options;t.display&&t.pointLabels.display?Ix(this):this.setCenterPoint(0,0,0,0)}setCenterPoint(t,e,i,s){this.xCenter+=Math.floor((t-e)/2),this.yCenter+=Math.floor((i-s)/2),this.drawingArea-=Math.min(this.drawingArea/2,Math.max(t,e,i,s))}getIndexAngle(t){const e=pt/(this._pointLabels.length||1),i=this.options.startAngle||0;return Wt(t*e+ie(i))}getDistanceFromCenterForValue(t){if(it(t))return NaN;const e=this.drawingArea/(this.max-this.min);return this.options.reverse?(this.max-t)*e:(t-this.min)*e}getValueForDistanceFromCenter(t){if(it(t))return NaN;const e=t/(this.drawingArea/(this.max-this.min));return this.options.reverse?this.max-e:this.min+e}getPointLabelContext(t){const e=this._pointLabels||[];if(t>=0&&t<e.length){const i=e[t];return Qx(this.getContext(),t,i)}}getPointPosition(t,e,i=0){const s=this.getIndexAngle(t)-wt+i;return{x:Math.cos(s)*e+this.xCenter,y:Math.sin(s)*e+this.yCenter,angle:s}}getPointPositionForValue(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))}getBasePosition(t){return this.getPointPositionForValue(t||0,this.getBaseValue())}getPointLabelPosition(t){const{left:e,top:i,right:s,bottom:o}=this._pointLabelItems[t];return{left:e,top:i,right:s,bottom:o}}drawBackground(){const{backgroundColor:t,grid:{circular:e}}=this.options;if(t){const i=this.ctx;i.save(),i.beginPath(),nd(this,this.getDistanceFromCenterForValue(this._endValue),e,this._pointLabels.length),i.closePath(),i.fillStyle=t,i.fill(),i.restore()}}drawGrid(){const t=this.ctx,e=this.options,{angleLines:i,grid:s,border:o}=e,r=this._pointLabels.length;let a,c,d;if(e.pointLabels.display&&Xx(this,r),s.display&&this.ticks.forEach((u,h)=>{if(h!==0||h===0&&this.min<0){c=this.getDistanceFromCenterForValue(u.value);const f=this.getContext(h),m=s.setContext(f),p=o.setContext(f);Gx(this,m,c,r,p)}}),i.display){for(t.save(),a=r-1;a>=0;a--){const u=i.setContext(this.getPointLabelContext(a)),{color:h,lineWidth:f}=u;!f||!h||(t.lineWidth=f,t.strokeStyle=h,t.setLineDash(u.borderDash),t.lineDashOffset=u.borderDashOffset,c=this.getDistanceFromCenterForValue(e.reverse?this.min:this.max),d=this.getPointPosition(a,c),t.beginPath(),t.moveTo(this.xCenter,this.yCenter),t.lineTo(d.x,d.y),t.stroke())}t.restore()}}drawBorder(){}drawLabels(){const t=this.ctx,e=this.options,i=e.ticks;if(!i.display)return;const s=this.getIndexAngle(0);let o,r;t.save(),t.translate(this.xCenter,this.yCenter),t.rotate(s),t.textAlign="center",t.textBaseline="middle",this.ticks.forEach((a,c)=>{if(c===0&&this.min>=0&&!e.reverse)return;const d=i.setContext(this.getContext(c)),u=Ct(d.font);if(o=this.getDistanceFromCenterForValue(this.ticks[c].value),d.showLabelBackdrop){t.font=u.string,r=t.measureText(a.label).width,t.fillStyle=d.backdropColor;const h=Vt(d.backdropPadding);t.fillRect(-r/2-h.left,-o-u.size/2-h.top,r+h.width,u.size+h.height)}tn(t,a.label,0,-o,u,{color:d.color,strokeColor:d.textStrokeColor,strokeWidth:d.textStrokeWidth})}),t.restore()}drawTitle(){}}L(Cn,"id","radialLinear"),L(Cn,"defaults",{display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,lineWidth:1,borderDash:[],borderDashOffset:0},grid:{circular:!1},startAngle:0,ticks:{showLabelBackdrop:!0,callback:oi.formatters.numeric},pointLabels:{backdropColor:void 0,backdropPadding:2,display:!0,font:{size:10},callback(t){return t},padding:5,centerPointLabels:!1}}),L(Cn,"defaultRoutes",{"angleLines.color":"borderColor","pointLabels.color":"color","ticks.color":"color"}),L(Cn,"descriptors",{angleLines:{_fallback:"grid"}});const ks={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Lt=Object.keys(ks);function id(n,t){return n-t}function sd(n,t){if(it(t))return null;const e=n._adapter,{parser:i,round:s,isoWeekday:o}=n._parseOpts;let r=t;return typeof i=="function"&&(r=i(r)),St(r)||(r=typeof i=="string"?e.parse(r,i):e.parse(r)),r===null?null:(s&&(r=s==="week"&&(_n(o)||o===!0)?e.startOf(r,"isoWeek",o):e.startOf(r,s)),+r)}function od(n,t,e,i){const s=Lt.length;for(let o=Lt.indexOf(n);o<s-1;++o){const r=ks[Lt[o]],a=r.steps?r.steps:Number.MAX_SAFE_INTEGER;if(r.common&&Math.ceil((e-t)/(a*r.size))<=i)return Lt[o]}return Lt[s-1]}function Jx(n,t,e,i,s){for(let o=Lt.length-1;o>=Lt.indexOf(e);o--){const r=Lt[o];if(ks[r].common&&n._adapter.diff(s,i,r)>=t-1)return r}return Lt[e?Lt.indexOf(e):0]}function Zx(n){for(let t=Lt.indexOf(n)+1,e=Lt.length;t<e;++t)if(ks[Lt[t]].common)return Lt[t]}function rd(n,t,e){if(!e)n[t]=!0;else if(e.length){const{lo:i,hi:s}=oo(e,t),o=e[i]>=t?e[i]:e[s];n[o]=!0}}function tk(n,t,e,i){const s=n._adapter,o=+s.startOf(t[0].value,i),r=t[t.length-1].value;let a,c;for(a=o;a<=r;a=+s.add(a,1,i))c=e[a],c>=0&&(t[c].major=!0);return t}function ad(n,t,e){const i=[],s={},o=t.length;let r,a;for(r=0;r<o;++r)a=t[r],s[a]=r,i.push({value:a,major:!1});return o===0||!e?i:tk(n,i,s,e)}class On extends We{constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,e={}){const i=t.time||(t.time={}),s=this._adapter=new Rl._date(t.adapters.date);s.init(e),Zn(i.displayFormats,s.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(t),this._normalized=e.normalized}parse(t,e){return t===void 0?null:sd(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,e=this._adapter,i=t.time.unit||"day";let{min:s,max:o,minDefined:r,maxDefined:a}=this.getUserBounds();function c(d){!r&&!isNaN(d.min)&&(s=Math.min(s,d.min)),!a&&!isNaN(d.max)&&(o=Math.max(o,d.max))}(!r||!a)&&(c(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&c(this.getMinMax(!1))),s=St(s)&&!isNaN(s)?s:+e.startOf(Date.now(),i),o=St(o)&&!isNaN(o)?o:+e.endOf(Date.now(),i)+1,this.min=Math.min(s,o-1),this.max=Math.max(s+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return t.length&&(e=t[0],i=t[t.length-1]),{min:e,max:i}}buildTicks(){const t=this.options,e=t.time,i=t.ticks,s=i.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&s.length&&(this.min=this._userMin||s[0],this.max=this._userMax||s[s.length-1]);const o=this.min,r=this.max,a=Xy(s,o,r);return this._unit=e.unit||(i.autoSkip?od(e.minUnit,this.min,this.max,this._getLabelCapacity(o)):Jx(this,a.length,e.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:Zx(this._unit),this.initOffsets(s),t.reverse&&a.reverse(),ad(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let e=0,i=0,s,o;this.options.offset&&t.length&&(s=this.getDecimalForValue(t[0]),t.length===1?e=1-s:e=(this.getDecimalForValue(t[1])-s)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?i=o:i=(o-this.getDecimalForValue(t[t.length-2]))/2);const r=t.length<3?.5:.25;e=Dt(e,0,r),i=Dt(i,0,r),this._offsets={start:e,end:i,factor:1/(e+1+i)}}_generate(){const t=this._adapter,e=this.min,i=this.max,s=this.options,o=s.time,r=o.unit||od(o.minUnit,e,i,this._getLabelCapacity(e)),a=Q(s.ticks.stepSize,1),c=r==="week"?o.isoWeekday:!1,d=_n(c)||c===!0,u={};let h=e,f,m;if(d&&(h=+t.startOf(h,"isoWeek",c)),h=+t.startOf(h,d?"day":r),t.diff(i,e,r)>1e5*a)throw new Error(e+" and "+i+" are too far apart with stepSize of "+a+" "+r);const p=s.ticks.source==="data"&&this.getDataTimestamps();for(f=h,m=0;f<i;f=+t.add(f,a,r),m++)rd(u,f,p);return(f===i||s.bounds==="ticks"||m===1)&&rd(u,f,p),Object.keys(u).sort(id).map(g=>+g)}getLabelForValue(t){const e=this._adapter,i=this.options.time;return i.tooltipFormat?e.format(t,i.tooltipFormat):e.format(t,i.displayFormats.datetime)}format(t,e){const s=this.options.time.displayFormats,o=this._unit,r=e||s[o];return this._adapter.format(t,r)}_tickFormatFunction(t,e,i,s){const o=this.options,r=o.ticks.callback;if(r)return ft(r,[t,e,i],this);const a=o.time.displayFormats,c=this._unit,d=this._majorUnit,u=c&&a[c],h=d&&a[d],f=i[e],m=d&&h&&f&&f.major;return this._adapter.format(t,s||(m?h:u))}generateTickLabels(t){let e,i,s;for(e=0,i=t.length;e<i;++e)s=t[e],s.label=this._tickFormatFunction(s.value,e,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const e=this._offsets,i=this.getDecimalForValue(t);return this.getPixelForDecimal((e.start+i)*e.factor)}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return this.min+i*(this.max-this.min)}_getLabelSize(t){const e=this.options.ticks,i=this.ctx.measureText(t).width,s=ie(this.isHorizontal()?e.maxRotation:e.minRotation),o=Math.cos(s),r=Math.sin(s),a=this._resolveTickFontOptions(0).size;return{w:i*o+a*r,h:i*r+a*o}}_getLabelCapacity(t){const e=this.options.time,i=e.displayFormats,s=i[e.unit]||i.millisecond,o=this._tickFormatFunction(t,0,ad(this,[t],this._majorUnit),s),r=this._getLabelSize(o),a=Math.floor(this.isHorizontal()?this.width/r.w:this.height/r.h)-1;return a>0?a:1}getDataTimestamps(){let t=this._cache.data||[],e,i;if(t.length)return t;const s=this.getMatchingVisibleMetas();if(this._normalized&&s.length)return this._cache.data=s[0].controller.getAllParsedValues(this);for(e=0,i=s.length;e<i;++e)t=t.concat(s[e].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let e,i;if(t.length)return t;const s=this.getLabels();for(e=0,i=s.length;e<i;++e)t.push(sd(this,s[e]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return Ka(t.sort(id))}}L(On,"id","time"),L(On,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function Ss(n,t,e){let i=0,s=n.length-1,o,r,a,c;e?(t>=n[i].pos&&t<=n[s].pos&&({lo:i,hi:s}=Ee(n,"pos",t)),{pos:o,time:a}=n[i],{pos:r,time:c}=n[s]):(t>=n[i].time&&t<=n[s].time&&({lo:i,hi:s}=Ee(n,"time",t)),{time:o,pos:a}=n[i],{time:r,pos:c}=n[s]);const d=r-o;return d?a+(c-a)*(t-o)/d:a}class ws extends On{constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),e=this._table=this.buildLookupTable(t);this._minPos=Ss(e,this.min),this._tableRange=Ss(e,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:e,max:i}=this,s=[],o=[];let r,a,c,d,u;for(r=0,a=t.length;r<a;++r)d=t[r],d>=e&&d<=i&&s.push(d);if(s.length<2)return[{time:e,pos:0},{time:i,pos:1}];for(r=0,a=s.length;r<a;++r)u=s[r+1],c=s[r-1],d=s[r],Math.round((u+c)/2)!==d&&o.push({time:d,pos:r/(a-1)});return o}_generate(){const t=this.min,e=this.max;let i=super.getDataTimestamps();return(!i.includes(t)||!i.length)&&i.splice(0,0,t),(!i.includes(e)||i.length===1)&&i.push(e),i.sort((s,o)=>s-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const e=this.getDataTimestamps(),i=this.getLabelTimestamps();return e.length&&i.length?t=this.normalize(e.concat(i)):t=e.length?e:i,t=this._cache.all=t,t}getDecimalForValue(t){return(Ss(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const e=this._offsets,i=this.getDecimalForPixel(t)/e.factor-e.end;return Ss(this._table,i*this._tableRange+this._minPos,!0)}}L(ws,"id","timeseries"),L(ws,"defaults",On.defaults);var ld=Object.freeze({__proto__:null,CategoryScale:ys,LinearScale:_s,LogarithmicScale:xs,RadialLinearScale:Cn,TimeScale:On,TimeSeriesScale:ws});const cd=[$l,xc,Gc,ld];ue.register(...cd);const ek=Object.freeze(Object.defineProperty({__proto__:null,Animation:Cl,Animations:_o,ArcElement:vn,BarController:di,BarElement:wi,BasePlatform:Oo,BasicPlatform:ql,BubbleController:ui,CategoryScale:ys,Chart:ue,Colors:vc,DatasetController:Kt,Decimation:Dc,DomPlatform:Ql,DoughnutController:ze,Element:Xt,Filler:Bc,Interaction:Il,Legend:Ic,LineController:hi,LineElement:Ce,LinearScale:_s,LogarithmicScale:xs,PieController:os,PointElement:Si,PolarAreaController:wn,RadarController:fi,RadialLinearScale:Cn,Scale:We,ScatterController:mi,SubTitle:zc,Ticks:oi,TimeScale:On,TimeSeriesScale:ws,Title:jc,Tooltip:Xc,_adapters:Rl,_detectPlatform:Jl,animator:de,controllers:$l,default:ue,defaults:gt,elements:xc,layouts:Pt,plugins:Gc,registerables:cd,registry:se,scales:ld},Symbol.toStringTag,{value:"Module"}));Tt.default=rg,Tt.useEntitiesStore=Lr,Tt.useGlobalConfigsStore=me,Object.defineProperties(Tt,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
17
+ attempted value: ${l}
18
+ `+(d!==l?`result of cast: ${d}`:""))}return i}_cast(t,r){let n=t===void 0?t:this.transforms.reduce((a,i)=>i.call(this,a,t,this),t);return n===void 0&&(n=this.getDefault(r)),n}_validate(t,r={},n,a){let{path:i,originalValue:l=t,strict:d=this.spec.strict}=r,u=t;d||(u=this._cast(u,Object.assign({assert:!1},r)));let s=[];for(let c of Object.values(this.internalTests))c&&s.push(c);this.runTests({path:i,value:u,originalValue:l,options:r,tests:s},n,c=>{if(c.length)return a(c,u);this.runTests({path:i,value:u,originalValue:l,options:r,tests:this.tests},n,a)})}runTests(t,r,n){let a=!1,{tests:i,value:l,originalValue:d,path:u,options:s}=t,c=h=>{a||(a=!0,r(h,l))},f=h=>{a||(a=!0,n(h,l))},m=i.length,p=[];if(!m)return f([]);let g={value:l,originalValue:d,path:u,options:s,schema:this};for(let h=0;h<i.length;h++){const b=i[h];b(g,c,function(C){C&&(Array.isArray(C)?p.push(...C):p.push(C)),--m<=0&&f(p)})}}asNestedTest({key:t,index:r,parent:n,parentPath:a,originalParent:i,options:l}){const d=t??r;if(d==null)throw TypeError("Must include `key` or `index` for nested validations");const u=typeof d=="number";let s=n[d];const c=Object.assign({},l,{strict:!0,parent:n,value:s,originalValue:i[d],key:void 0,[u?"index":"key"]:d,path:u||d.includes(".")?`${a||""}[${u?d:`"${d}"`}]`:(a?`${a}.`:"")+t});return(f,m,p)=>this.resolve(c)._validate(s,c,m,p)}validate(t,r){var n;let a=this.resolve(Object.assign({},r,{value:t})),i=(n=r==null?void 0:r.disableStackTrace)!=null?n:a.spec.disableStackTrace;return new Promise((l,d)=>a._validate(t,r,(u,s)=>{Ve.isError(u)&&(u.value=s),d(u)},(u,s)=>{u.length?d(new Ve(u,s,void 0,void 0,i)):l(s)}))}validateSync(t,r){var n;let a=this.resolve(Object.assign({},r,{value:t})),i,l=(n=r==null?void 0:r.disableStackTrace)!=null?n:a.spec.disableStackTrace;return a._validate(t,Object.assign({},r,{sync:!0}),(d,u)=>{throw Ve.isError(d)&&(d.value=u),d},(d,u)=>{if(d.length)throw new Ve(d,t,void 0,void 0,l);i=u}),i}isValid(t,r){return this.validate(t,r).then(()=>!0,n=>{if(Ve.isError(n))return!1;throw n})}isValidSync(t,r){try{return this.validateSync(t,r),!0}catch(n){if(Ve.isError(n))return!1;throw n}}_getDefault(t){let r=this.spec.default;return r==null?r:typeof r=="function"?r.call(this,t):Vt(r)}getDefault(t){return this.resolve(t||{})._getDefault(t)}default(t){return arguments.length===0?this._getDefault():this.clone({default:t})}strict(t=!0){return this.clone({strict:t})}nullability(t,r){const n=this.clone({nullable:t});return n.internalTests.nullable=Ot({message:r,name:"nullable",test(a){return a===null?this.schema.spec.nullable:!0}}),n}optionality(t,r){const n=this.clone({optional:t});return n.internalTests.optionality=Ot({message:r,name:"optionality",test(a){return a===void 0?this.schema.spec.optional:!0}}),n}optional(){return this.optionality(!0)}defined(t=Xe.defined){return this.optionality(!1,t)}nullable(){return this.nullability(!0)}nonNullable(t=Xe.notNull){return this.nullability(!1,t)}required(t=Xe.required){return this.clone().withMutation(r=>r.nonNullable(t).defined(t))}notRequired(){return this.clone().withMutation(t=>t.nullable().optional())}transform(t){let r=this.clone();return r.transforms.push(t),r}test(...t){let r;if(t.length===1?typeof t[0]=="function"?r={test:t[0]}:r=t[0]:t.length===2?r={name:t[0],test:t[1]}:r={name:t[0],message:t[1],test:t[2]},r.message===void 0&&(r.message=Xe.default),typeof r.test!="function")throw new TypeError("`test` is a required parameters");let n=this.clone(),a=Ot(r),i=r.exclusive||r.name&&n.exclusiveTests[r.name]===!0;if(r.exclusive&&!r.name)throw new TypeError("Exclusive tests must provide a unique `name` identifying the test");return r.name&&(n.exclusiveTests[r.name]=!!r.exclusive),n.tests=n.tests.filter(l=>!(l.OPTIONS.name===r.name&&(i||l.OPTIONS.test===a.OPTIONS.test))),n.tests.push(a),n}when(t,r){!Array.isArray(t)&&typeof t!="string"&&(r=t,t=".");let n=this.clone(),a=Ln(t).map(i=>new xt(i));return a.forEach(i=>{i.isSibling&&n.deps.push(i.key)}),n.conditions.push(typeof r=="function"?new vo(a,r):vo.fromOptions(a,r)),n}typeError(t){let r=this.clone();return r.internalTests.typeError=Ot({message:t,name:"typeError",skipAbsent:!0,test(n){return this.schema._typeCheck(n)?!0:this.createError({params:{type:this.schema.type}})}}),r}oneOf(t,r=Xe.oneOf){let n=this.clone();return t.forEach(a=>{n._whitelist.add(a),n._blacklist.delete(a)}),n.internalTests.whiteList=Ot({message:r,name:"oneOf",skipAbsent:!0,test(a){let i=this.schema._whitelist,l=i.resolveAll(this.resolve);return l.includes(a)?!0:this.createError({params:{values:Array.from(i).join(", "),resolved:l}})}}),n}notOneOf(t,r=Xe.notOneOf){let n=this.clone();return t.forEach(a=>{n._blacklist.add(a),n._whitelist.delete(a)}),n.internalTests.blacklist=Ot({message:r,name:"notOneOf",test(a){let i=this.schema._blacklist,l=i.resolveAll(this.resolve);return l.includes(a)?this.createError({params:{values:Array.from(i).join(", "),resolved:l}}):!0}}),n}strip(t=!0){let r=this.clone();return r.spec.strip=t,r}describe(t){const r=(t?this.resolve(t):this).clone(),{label:n,meta:a,optional:i,nullable:l}=r.spec;return{meta:a,label:n,optional:i,nullable:l,default:r.getDefault(t),type:r.type,oneOf:r._whitelist.describe(),notOneOf:r._blacklist.describe(),tests:r.tests.map(u=>({name:u.OPTIONS.name,params:u.OPTIONS.params})).filter((u,s,c)=>c.findIndex(f=>f.name===u.name)===s)}}}Je.prototype.__isYupSchema__=!0;for(const e of["validate","validateSync"])Je.prototype[`${e}At`]=function(t,r,n={}){const{parent:a,parentPath:i,schema:l}=Os(this,t,r,n.context);return l[e](a&&a[i],Object.assign({},n,{parent:a,path:t}))};for(const e of["equals","is"])Je.prototype[e]=Je.prototype.oneOf;for(const e of["not","nope"])Je.prototype[e]=Je.prototype.notOneOf;const Vs=/^(\d{4}|[+-]\d{6})(?:-?(\d{2})(?:-?(\d{2}))?)?(?:[ T]?(\d{2}):?(\d{2})(?::?(\d{2})(?:[,.](\d{1,}))?)?(?:(Z)|([+-])(\d{2})(?::?(\d{2}))?)?)?$/;function $s(e){const t=cr(e);if(!t)return Date.parse?Date.parse(e):Number.NaN;if(t.z===void 0&&t.plusMinus===void 0)return new Date(t.year,t.month,t.day,t.hour,t.minute,t.second,t.millisecond).valueOf();let r=0;return t.z!=="Z"&&t.plusMinus!==void 0&&(r=t.hourOffset*60+t.minuteOffset,t.plusMinus==="+"&&(r=0-r)),Date.UTC(t.year,t.month,t.day,t.hour,t.minute+r,t.second,t.millisecond)}function cr(e){var t,r;const n=Vs.exec(e);return n?{year:ot(n[1]),month:ot(n[2],1)-1,day:ot(n[3],1),hour:ot(n[4]),minute:ot(n[5]),second:ot(n[6]),millisecond:n[7]?ot(n[7].substring(0,3)):0,precision:(t=(r=n[7])==null?void 0:r.length)!=null?t:void 0,z:n[8]||void 0,plusMinus:n[9]||void 0,hourOffset:ot(n[10]),minuteOffset:ot(n[11])}:null}function ot(e,t=0){return Number(e)||t}let Fs=/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,As=/^((https?|ftp):)?\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i,Is=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Ps="^\\d{4}-\\d{2}-\\d{2}",Ls="\\d{2}:\\d{2}:\\d{2}",Ms="(([+-]\\d{2}(:?\\d{2})?)|Z)",js=new RegExp(`${Ps}T${Ls}(\\.\\d+)?${Ms}$`),zs=e=>vt(e)||e===e.trim(),Us={}.toString();function dr(){return new Wn}class Wn extends Je{constructor(){super({type:"string",check(t){return t instanceof String&&(t=t.valueOf()),typeof t=="string"}}),this.withMutation(()=>{this.transform((t,r,n)=>{if(!n.spec.coerce||n.isType(t)||Array.isArray(t))return t;const a=t!=null&&t.toString?t.toString():t;return a===Us?t:a})})}required(t){return super.required(t).withMutation(r=>r.test({message:t||Xe.required,name:"required",skipAbsent:!0,test:n=>!!n.length}))}notRequired(){return super.notRequired().withMutation(t=>(t.tests=t.tests.filter(r=>r.OPTIONS.name!=="required"),t))}length(t,r=$e.length){return this.test({message:r,name:"length",exclusive:!0,params:{length:t},skipAbsent:!0,test(n){return n.length===this.resolve(t)}})}min(t,r=$e.min){return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(n){return n.length>=this.resolve(t)}})}max(t,r=$e.max){return this.test({name:"max",exclusive:!0,message:r,params:{max:t},skipAbsent:!0,test(n){return n.length<=this.resolve(t)}})}matches(t,r){let n=!1,a,i;return r&&(typeof r=="object"?{excludeEmptyString:n=!1,message:a,name:i}=r:a=r),this.test({name:i||"matches",message:a||$e.matches,params:{regex:t},skipAbsent:!0,test:l=>l===""&&n||l.search(t)!==-1})}email(t=$e.email){return this.matches(Fs,{name:"email",message:t,excludeEmptyString:!0})}url(t=$e.url){return this.matches(As,{name:"url",message:t,excludeEmptyString:!0})}uuid(t=$e.uuid){return this.matches(Is,{name:"uuid",message:t,excludeEmptyString:!1})}datetime(t){let r="",n,a;return t&&(typeof t=="object"?{message:r="",allowOffset:n=!1,precision:a=void 0}=t:r=t),this.matches(js,{name:"datetime",message:r||$e.datetime,excludeEmptyString:!0}).test({name:"datetime_offset",message:r||$e.datetime_offset,params:{allowOffset:n},skipAbsent:!0,test:i=>{if(!i||n)return!0;const l=cr(i);return l?!!l.z:!1}}).test({name:"datetime_precision",message:r||$e.datetime_precision,params:{precision:a},skipAbsent:!0,test:i=>{if(!i||a==null)return!0;const l=cr(i);return l?l.precision===a:!1}})}ensure(){return this.default("").transform(t=>t===null?"":t)}trim(t=$e.trim){return this.transform(r=>r!=null?r.trim():r).test({message:t,name:"trim",test:zs})}lowercase(t=$e.lowercase){return this.transform(r=>vt(r)?r:r.toLowerCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>vt(r)||r===r.toLowerCase()})}uppercase(t=$e.uppercase){return this.transform(r=>vt(r)?r:r.toUpperCase()).test({message:t,name:"string_case",exclusive:!0,skipAbsent:!0,test:r=>vt(r)||r===r.toUpperCase()})}}dr.prototype=Wn.prototype;let Ws=new Date(""),qs=e=>Object.prototype.toString.call(e)==="[object Date]";class So extends Je{constructor(){super({type:"date",check(t){return qs(t)&&!isNaN(t.getTime())}}),this.withMutation(()=>{this.transform((t,r,n)=>!n.spec.coerce||n.isType(t)||t===null?t:(t=$s(t),isNaN(t)?So.INVALID_DATE:new Date(t)))})}prepareParam(t,r){let n;if(xt.isRef(t))n=t;else{let a=this.cast(t);if(!this._typeCheck(a))throw new TypeError(`\`${r}\` must be a Date or a value that can be \`cast()\` to a Date`);n=a}return n}min(t,r=lr.min){let n=this.prepareParam(t,"min");return this.test({message:r,name:"min",exclusive:!0,params:{min:t},skipAbsent:!0,test(a){return a>=this.resolve(n)}})}max(t,r=lr.max){let n=this.prepareParam(t,"max");return this.test({message:r,name:"max",exclusive:!0,params:{max:t},skipAbsent:!0,test(a){return a<=this.resolve(n)}})}}So.INVALID_DATE=Ws,So.prototype;function Hs(e,t=[]){let r=[],n=new Set,a=new Set(t.map(([l,d])=>`${l}-${d}`));function i(l,d){let u=wt.split(l)[0];n.add(u),a.has(`${d}-${u}`)||r.push([d,u])}for(const l of Object.keys(e)){let d=e[l];n.add(l),xt.isRef(d)&&d.isSibling?i(d.path,l):sr(d)&&"deps"in d&&d.deps.forEach(u=>i(u,l))}return vs.array(Array.from(n),r).reverse()}function qn(e,t){let r=1/0;return e.some((n,a)=>{var i;if((i=t.path)!=null&&i.includes(n))return r=a,!0}),r}function Hn(e){return(t,r)=>qn(e,t)-qn(e,r)}const Ks=(e,t,r)=>{if(typeof e!="string")return e;let n=e;try{n=JSON.parse(e)}catch{}return r.isType(n)?n:e};function Bo(e){if("fields"in e){const t={};for(const[r,n]of Object.entries(e.fields))t[r]=Bo(n);return e.setFields(t)}if(e.type==="array"){const t=e.optional();return t.innerType&&(t.innerType=Bo(t.innerType)),t}return e.type==="tuple"?e.optional().clone({types:e.spec.types.map(Bo)}):"optional"in e?e.optional():e}const Ys=(e,t)=>{const r=[...wt.normalizePath(t)];if(r.length===1)return r[0]in e;let n=r.pop(),a=wt.getter(wt.join(r),!0)(e);return!!(a&&n in a)};let Kn=e=>Object.prototype.toString.call(e)==="[object Object]";function Yn(e,t){let r=Object.keys(e.fields);return Object.keys(t).filter(n=>r.indexOf(n)===-1)}const Gs=Hn([]);function ur(e){return new Gn(e)}class Gn extends Je{constructor(t){super({type:"object",check(r){return Kn(r)||typeof r=="function"}}),this.fields=Object.create(null),this._sortErrors=Gs,this._nodes=[],this._excludedEdges=[],this.withMutation(()=>{t&&this.shape(t)})}_cast(t,r={}){var n;let a=super._cast(t,r);if(a===void 0)return this.getDefault(r);if(!this._typeCheck(a))return a;let i=this.fields,l=(n=r.stripUnknown)!=null?n:this.spec.noUnknown,d=[].concat(this._nodes,Object.keys(a).filter(f=>!this._nodes.includes(f))),u={},s=Object.assign({},r,{parent:u,__validating:r.__validating||!1}),c=!1;for(const f of d){let m=i[f],p=f in a;if(m){let g,h=a[f];s.path=(r.path?`${r.path}.`:"")+f,m=m.resolve({value:h,context:r.context,parent:u});let b=m instanceof Je?m.spec:void 0,k=b==null?void 0:b.strict;if(b!=null&&b.strip){c=c||f in a;continue}g=!r.__validating||!k?m.cast(a[f],s):a[f],g!==void 0&&(u[f]=g)}else p&&!l&&(u[f]=a[f]);(p!==f in u||u[f]!==a[f])&&(c=!0)}return c?u:a}_validate(t,r={},n,a){let{from:i=[],originalValue:l=t,recursive:d=this.spec.recursive}=r;r.from=[{schema:this,value:l},...i],r.__validating=!0,r.originalValue=l,super._validate(t,r,n,(u,s)=>{if(!d||!Kn(s)){a(u,s);return}l=l||s;let c=[];for(let f of this._nodes){let m=this.fields[f];!m||xt.isRef(m)||c.push(m.asNestedTest({options:r,key:f,parent:s,parentPath:r.path,originalParent:l}))}this.runTests({tests:c,value:s,originalValue:l,options:r},n,f=>{a(f.sort(this._sortErrors).concat(u),s)})})}clone(t){const r=super.clone(t);return r.fields=Object.assign({},this.fields),r._nodes=this._nodes,r._excludedEdges=this._excludedEdges,r._sortErrors=this._sortErrors,r}concat(t){let r=super.concat(t),n=r.fields;for(let[a,i]of Object.entries(this.fields)){const l=n[a];n[a]=l===void 0?i:l}return r.withMutation(a=>a.setFields(n,[...this._excludedEdges,...t._excludedEdges]))}_getDefault(t){if("default"in this.spec)return super._getDefault(t);if(!this._nodes.length)return;let r={};return this._nodes.forEach(n=>{var a;const i=this.fields[n];let l=t;(a=l)!=null&&a.value&&(l=Object.assign({},l,{parent:l.value,value:l.value[n]})),r[n]=i&&"getDefault"in i?i.getDefault(l):void 0}),r}setFields(t,r){let n=this.clone();return n.fields=t,n._nodes=Hs(t,r),n._sortErrors=Hn(Object.keys(t)),r&&(n._excludedEdges=r),n}shape(t,r=[]){return this.clone().withMutation(n=>{let a=n._excludedEdges;return r.length&&(Array.isArray(r[0])||(r=[r]),a=[...n._excludedEdges,...r]),n.setFields(Object.assign(n.fields,t),a)})}partial(){const t={};for(const[r,n]of Object.entries(this.fields))t[r]="optional"in n&&n.optional instanceof Function?n.optional():n;return this.setFields(t)}deepPartial(){return Bo(this)}pick(t){const r={};for(const n of t)this.fields[n]&&(r[n]=this.fields[n]);return this.setFields(r,this._excludedEdges.filter(([n,a])=>t.includes(n)&&t.includes(a)))}omit(t){const r=[];for(const n of Object.keys(this.fields))t.includes(n)||r.push(n);return this.pick(r)}from(t,r,n){let a=wt.getter(t,!0);return this.transform(i=>{if(!i)return i;let l=i;return Ys(i,t)&&(l=Object.assign({},i),n||delete l[t],l[r]=a(i)),l})}json(){return this.transform(Ks)}exact(t){return this.test({name:"exact",exclusive:!0,message:t||xo.exact,test(r){if(r==null)return!0;const n=Yn(this.schema,r);return n.length===0||this.createError({params:{properties:n.join(", ")}})}})}stripUnknown(){return this.clone({noUnknown:!0})}noUnknown(t=!0,r=xo.noUnknown){typeof t!="boolean"&&(r=t,t=!0);let n=this.test({name:"noUnknown",exclusive:!0,message:r,test(a){if(a==null)return!0;const i=Yn(this.schema,a);return!t||i.length===0||this.createError({params:{unknown:i.join(", ")}})}});return n.spec.noUnknown=t,n}unknown(t=!0,r=xo.noUnknown){return this.noUnknown(!t,r)}transformKeys(t){return this.transform(r=>{if(!r)return r;const n={};for(const a of Object.keys(r))n[t(a)]=r[a];return n})}camelCase(){return this.transformKeys(ir.camelCase)}snakeCase(){return this.transformKeys(ir.snakeCase)}constantCase(){return this.transformKeys(t=>ir.snakeCase(t).toUpperCase())}describe(t){const r=(t?this.resolve(t):this).clone(),n=super.describe(t);n.fields={};for(const[i,l]of Object.entries(r.fields)){var a;let d=t;(a=d)!=null&&a.value&&(d=Object.assign({},d,{parent:d.value,value:d.value[i]})),n.fields[i]=l.describe(d)}return n}}ur.prototype=Gn.prototype;function fr(e,t,r){const n=new Ue;let a=o.ref({});const i=o.ref({}),l=o.ref({});let d=o.ref([]);const u=o.ref(null),s=o.ref([]);let c=o.ref([]),f=o.ref(!1);const m=o.ref({});let{handleSubmit:p,errors:g,setErrors:h}=Vn();const b=async()=>{var M;try{const $=await n.getEntityRecords(e);$&&$.response&&(a.value=$.response,d.value=(M=$.response.entity.entityDefinition)==null?void 0:M.columns,Y(),w(),_())}catch($){toast.add({severity:"error",summary:"Error",detail:$.errorMessage,life:3e3})}finally{}},k=async()=>{var M;try{const $=await n.getRecord(e,t);$&&$.response&&(a.value=$.response,d.value=(M=$.response.entity.entityDefinition)==null?void 0:M.columns,Y(),i.value=JSON.parse(JSON.stringify($.response.result[0])),_())}catch($){console.error("Error fetching entity:",$.errorMessage)}finally{}},C=async()=>{var M,$;try{const z=await n.getRelatedEntityRecord(e,t);z&&z.response&&(a.value=z.response,d.value=($=(M=z.response.entity)==null?void 0:M.entityDefinition)==null?void 0:$.columns,Y(),i.value=JSON.parse(JSON.stringify(z.response.result[0])),i.value.entityName&&delete i.value.entityName,i.value.linkedEntities&&delete i.value.linkedEntities,c.value=z.response.result[0].linkedEntities,l.value=JSON.parse(JSON.stringify(i.value)),_())}catch(z){console.error("Error fetching entity:",z.errorMessage)}finally{}},S=async M=>{try{let $=await n.addRecord(e,M);$&&$.response&&r("onSaveDialog",{entityName:e,recordId:t})}catch($){$.validationErrors&&(s.value=JSON.parse(JSON.stringify($.validationErrors))),console.error("Error fetching entity:",$.errorMessage)}finally{}},L=async(M,$)=>{try{let z=await n.addRecord(e,$);if(z&&z.response){let te=await n.saveRelatedEntityRecord(e,z.response.recordId,M.linkedEntities);te&&te.response&&r("onSaveDialog",{entityName:e,recordId:t})}}catch(z){z.validationErrors&&(s.value=JSON.parse(JSON.stringify(z.validationErrors))),console.error("Error fetching entity:",z.errorMessage)}finally{}},R=async M=>{try{const $=await n.updateRecord(e,t,M);$&&$.response&&(f.value=!1,l.value=JSON.parse(JSON.stringify(i.value)),r("onSaveDialog",{entityName:e,recordId:t}))}catch($){$.validationErrors&&(s.value=JSON.parse(JSON.stringify($.errvalidationErrorsors))),console.error("Error fetching entity:",$.errorMessage)}finally{}},N=async(M,$,z)=>{try{let te=await n.saveRelatedEntityRecord(M,$,z);te&&te.response&&r("onSaveDialog",{entityName:e,enityRecordId:$})}catch(te){te.validationErrors&&(s.value=JSON.parse(JSON.stringify(te.validationErrors))),console.error("Error fetching entity:",te.errorMessage)}finally{}},w=()=>{for(let M=0;M<d.value.length;M++){let $=d.value[M];$.autoGenerated||(i.value[$.name]="")}},y=M=>{let $="";for(let z=0;z<d.value.length;z++){let te=d.value[z];if(M==te.name){$=te.type;break}}return $},E=()=>{const M=d.value.filter(z=>z.autoGenerated).map(z=>z.name);return Object.entries(i.value).filter(([z])=>!M.includes(z)).map(([z,te])=>({recordColumnName:z,recordColumnValue:te,columnType:y(z)}))},V=async(M={})=>{try{await u.value.validate(i.value,{abortEarly:!1}),h({})}catch(z){const te=z.inner.reduce((ae,G)=>(ae[G.path]||(ae[G.path]={messages:[]}),ae[G.path].messages.push(...G.errors),ae),{}),ne=Object.entries(te).reduce((ae,[G,J])=>(ae[G]={messages:J.messages},ae),{});h(ne);return}const $={dataDefinitions:E()};t?await R($):M.relationType=="MANY_TO_ONE"?await L(M,$):await S($)},_=()=>{u.value=ur().shape(d.value.reduce((M,$)=>($.autoGenerated||(M[$.name]=dr().nullable(!1).test({name:"custom-validation",test:function(z){const te=[];let ne="";if($.required&&(!z||z.trim()===""))if($.validations){ne=D($.validations,"VALIDATE_REQUIRED"),te.push(ne);let ae=T($.validations,"VALIDATE_REQUIRED");ae&&(ae="hint:"+ae,te.push(ae))}else ne=$.displayName+" is required.",te.push(ne);else{if($.maxLength&&z.length>$.maxLength)if($.validations){ne=D($.validations,"VALIDATE_MAXLENGTH"),te.push(ne);let ae=T($.validations,"VALIDATE_MAXLENGTH");ae&&(ae="hint:"+ae,te.push(ae))}else ne=$.displayName+" cannot exceed from "+$.maxLength+" characters",te.push(ne);if($.regxId&&!new RegExp(P($.validations,"VALIDATE_REGX")).test(z))if($.validations){ne=D($.validations,"VALIDATE_REGX"),te.push(ne);let ae=T($.validations,"VALIDATE_REGX");ae&&(ae="hint:"+ae,te.push(ae))}else ne=$.displayName+" invalid format.",te.push(ne)}return te.length>0?this.createError({message:te}):!0}})),M),{}))},D=(M,$)=>{for(let z=0;z<M.length;z++)if($==M[z].type)return M[z].message},P=(M,$)=>{for(let z=0;z<M.length;z++)if($==M[z].type)return M[z].regx},T=(M,$)=>{for(let z=0;z<M.length;z++)if($==M[z].type)return M[z].hint},j=M=>{h({...g.value,[M]:null}),f.value=!0},I=()=>{f.value=!1;for(let M in i.value)i.value.hasOwnProperty(M)&&h({...g.value,[M]:null});i.value=JSON.parse(JSON.stringify(l.value))},Y=()=>{for(let M=0;M<d.value.length;M++){const $=d.value[M];if($.primaryKey&&$.primaryKey==!0){m.value=$;break}}};return{formData:i,columns:d,errors:g,backendErrors:s,isDataChange:f,linkedEntities:c,primarayKeyColumn:m,clearErrors:j,saveRecord:V,fetchAllRecords:b,fetchRecord:k,getRelatedEntityRecordById:C,cancleRecord:I,saveRelatedEntityRecord:N}}const Xs={key:0,class:"surface-card"},Js={class:"info"},Qs={key:0,class:"list-none p-0"},Xn={__name:"EntityFormErrors",props:{errors:Array},setup(e){let t=o.ref(!0);const r=()=>{t.value=!t.value};return(n,a)=>{var l;const i=o.resolveComponent("Message");return((l=e.errors)==null?void 0:l.length)>0?(o.openBlock(),o.createElementBlock("div",Xs,[a[1]||(a[1]=o.createElementVNode("h4",{class:"flex-1 font-bold text-red-500"},"Errors",-1)),o.createElementVNode("div",Js,[o.createElementVNode("span",{onClick:a[0]||(a[0]=d=>r()),class:"cursor-pointer underline showHideColor"},o.toDisplayString(o.unref(t)?"Hide":"Show"),1)]),o.unref(t)?(o.openBlock(),o.createElementBlock("ul",Qs,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.errors,(d,u)=>(o.openBlock(),o.createElementBlock("li",{key:u,class:"mb-2"},[o.createVNode(i,{style:{"word-break":"break-all"},closable:!1,severity:"error"},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(d.message),1)]),_:2},1024)]))),128))])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)}}},Zs={class:"field flex flex-col mb-3"},ec=["for"],tc={key:0,class:"flex items-center"},oc={key:1},rc={class:"flex items-center"},Jn={__name:"RelatedEntitySelection",props:{modelValue:{required:!0},entityName:{type:String,required:!0},columnName:{type:String,required:!0},relatedEntityColumn:{type:String,required:!0}},emits:["update:modelValue"],setup(e,{emit:t}){useRoute();const{getEntityRecords:r,searchEntityRecords:n,saveRelatedEntityRecord:a,getRecord:i,addRecord:l,updateRecord:d,deleteRecord:u}=Ue(),s=e,c=o.ref({});let f=o.ref("");const m=t;o.onMounted(()=>{p()});const p=async()=>{try{const b=await r(s.entityName);b&&b.response&&(c.value=b.response,h())}catch{}finally{}},g=()=>{m("update:modelValue",f.value[s.relatedEntityColumn])},h=()=>{for(let b=0;b<c.value.result.length;b++){const k=c.value.result[b];if(k[s.relatedEntityColumn]==s.modelValue){f.value=k;break}}};return(b,k)=>{const C=o.resolveComponent("Select");return o.openBlock(),o.createElementBlock("div",Zs,[o.createElementVNode("label",{for:e.columnName},o.toDisplayString(e.columnName),9,ec),o.createVNode(C,{modelValue:o.unref(f),"onUpdate:modelValue":[k[0]||(k[0]=S=>o.isRef(f)?f.value=S:f=S),g],"item-value":e.relatedEntityColumn,options:c.value.result,filter:"",optionLabel:e.relatedEntityColumn,placeholder:"Select "+e.relatedEntityColumn,class:"w-full"},{value:o.withCtx(S=>[S.value?(o.openBlock(),o.createElementBlock("div",tc,[o.createElementVNode("div",null,o.toDisplayString(S.value[e.relatedEntityColumn]),1)])):(o.openBlock(),o.createElementBlock("span",oc,o.toDisplayString(S.placeholder),1))]),option:o.withCtx(S=>[o.createElementVNode("div",rc,[o.createElementVNode("div",null,o.toDisplayString(S.option[e.relatedEntityColumn]),1)])]),_:1},8,["modelValue","item-value","options","optionLabel","placeholder"])])}}},nc={key:0,style:{"font-weight":"700","font-size":"1.25rem"}},ac={key:1,style:{"font-weight":"700","font-size":"1.25rem"}},ic={__name:"EntityDialog",props:o.mergeModels({entityName:{type:String,required:!0},recordId:{type:[String,Number],default:null}},{showForm:{},showFormModifiers:{}}),emits:o.mergeModels(["onSaveDialog"],["update:showForm"]),setup(e,{emit:t}){const r=o.useModel(e,"showForm"),n=t,{formData:a,columns:i,errors:l,backendErrors:d,clearErrors:u,saveRecord:s,fetchAllRecords:c,fetchRecord:f}=fr(e.entityName,e.recordId,n);return o.onMounted(()=>{e.recordId?f():c()}),(m,p)=>{const g=o.resolveComponent("Button"),h=o.resolveComponent("Dialog");return r.value?(o.openBlock(),o.createBlock(h,{key:0,showFooter:!1,visible:r.value,"onUpdate:visible":p[2]||(p[2]=b=>r.value=b),style:{width:"50rem"},breakpoints:{"1199px":"75vw","575px":"90vw"},modal:!0,class:"p-fluid"},{header:o.withCtx(()=>[e.recordId?(o.openBlock(),o.createElementBlock("span",nc,"Edit "+o.toDisplayString(e.entityName)+" record details",1)):o.createCommentVNode("",!0),e.recordId?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",ac,"Add "+o.toDisplayString(e.entityName)+" record details",1))]),footer:o.withCtx(()=>[o.createVNode(g,{type:"button",icon:"",label:"Cancel",severity:"secondary",onClick:p[0]||(p[0]=b=>r.value=!1)}),o.createVNode(g,{type:"button",icon:"",label:"Save",severity:"success",onClick:p[1]||(p[1]=b=>o.unref(s)())})]),default:o.withCtx(()=>{var b;return[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(i),(k,C)=>{var S;return o.openBlock(),o.createElementBlock("div",{key:C},[!k.autoGenerated&&!k.foreignKey?(o.openBlock(),o.createBlock(go,{key:0,modelValue:o.unref(a)[k.name],"onUpdate:modelValue":L=>o.unref(a)[k.name]=L,column:k,errors:(S=o.unref(l)[k.name])==null?void 0:S.messages,onInput:o.unref(u)},null,8,["modelValue","onUpdate:modelValue","column","errors","onInput"])):o.createCommentVNode("",!0),!k.autoGenerated&&k.foreignKey?(o.openBlock(),o.createBlock(Jn,{key:1,modelValue:o.unref(a)[k.name],"onUpdate:modelValue":L=>o.unref(a)[k.name]=L,entityName:k.foreignKey.referencedEntityName,columnName:k.name,relatedEntityColumn:k.foreignKey.referencedColumnName},null,8,["modelValue","onUpdate:modelValue","entityName","columnName","relatedEntityColumn"])):o.createCommentVNode("",!0)])}),128)),((b=o.unref(d))==null?void 0:b.length)>0?(o.openBlock(),o.createBlock(Xn,{key:0,errors:o.unref(d)},null,8,["errors"])):o.createCommentVNode("",!0)]}),_:1},8,["visible"])):o.createCommentVNode("",!0)}}},lc={__name:"DeleteConfirmationDialog",props:o.mergeModels({entityName:{type:String,required:!0},recordId:{type:[String,Number],default:null}},{showDeleteDialog:{},showDeleteDialogModifiers:{}}),emits:o.mergeModels(["onDeleteItem"],["update:showDeleteDialog"]),setup(e,{emit:t}){const r=new Ue,n=o.useModel(e,"showDeleteDialog"),a=t,i=async()=>{try{const l=await r.deleteRecord(e.entityName,e.recordId);l&&l.response&&a("onDeleteItem")}catch(l){console.error("Error deleting record:",l.errorMessage)}finally{}};return(l,d)=>{const u=o.resolveComponent("Button"),s=o.resolveComponent("Dialog");return o.openBlock(),o.createBlock(s,{visible:n.value,"onUpdate:visible":d[1]||(d[1]=c=>n.value=c),style:{width:"450px"},header:"Confirm",modal:!0},{footer:o.withCtx(()=>[o.createVNode(u,{label:"No",icon:"pi pi-times",text:"",onClick:d[0]||(d[0]=c=>n.value=!1)}),o.createVNode(u,{label:"Yes",icon:"pi pi-check",text:"",onClick:i})]),default:o.withCtx(()=>[d[2]||(d[2]=o.createElementVNode("div",{class:"flex items-center justify-center"},[o.createElementVNode("i",{class:"pi pi-exclamation-triangle mr-3",style:{"font-size":"2rem"}}),o.createElementVNode("span",null,"Are you sure you want to delete the selected item?")],-1))]),_:1},8,["visible"])}}};var sc=Object.defineProperty,Qn=Object.getOwnPropertySymbols,cc=Object.prototype.hasOwnProperty,dc=Object.prototype.propertyIsEnumerable,Zn=(e,t,r)=>t in e?sc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,uc=(e,t)=>{for(var r in t||(t={}))cc.call(t,r)&&Zn(e,r,t[r]);if(Qn)for(var r of Qn(t))dc.call(t,r)&&Zn(e,r,t[r]);return e};function mr(e){return e==null||e===""||Array.isArray(e)&&e.length===0||!(e instanceof Date)&&typeof e=="object"&&Object.keys(e).length===0}function fc(e){return!!(e&&e.constructor&&e.call&&e.apply)}function Ce(e){return!mr(e)}function Ct(e,t=!0){return e instanceof Object&&e.constructor===Object&&(t||Object.keys(e).length!==0)}function No(e,...t){return fc(e)?e(...t):e}function $t(e,t=!0){return typeof e=="string"&&(t||e!=="")}function ea(e,t=!0){return Array.isArray(e)&&(t||e.length!==0)}function mc(e){return Ce(e)&&!isNaN(e)}function rt(e,t){if(t){const r=t.test(e);return t.lastIndex=0,r}return!1}function ta(...e){const t=(r={},n={})=>{const a=uc({},r);return Object.keys(n).forEach(i=>{Ct(n[i])&&i in r&&Ct(r[i])?a[i]=t(r[i],n[i]):a[i]=n[i]}),a};return e.reduce((r,n,a)=>a===0?n:t(r,n),{})}function oa(e){return e&&e.replace(/\/\*(?:(?!\*\/)[\s\S])*\*\/|[\r\n\t]+/g,"").replace(/ {2,}/g," ").replace(/ ([{:}]) /g,"$1").replace(/([;,]) /g,"$1").replace(/ !/g,"!").replace(/: /g,":")}function ra(e){return $t(e)?e.replace(/(_)/g,"-").replace(/[A-Z]/g,(t,r)=>r===0?t:"-"+t.toLowerCase()).toLowerCase():e}function na(e){return $t(e)?e.replace(/[A-Z]/g,(t,r)=>r===0?t:"."+t.toLowerCase()).toLowerCase():e}var Ft={STARTS_WITH:"startsWith",CONTAINS:"contains",NOT_CONTAINS:"notContains",ENDS_WITH:"endsWith",EQUALS:"equals",NOT_EQUALS:"notEquals",IN:"in",LESS_THAN:"lt",LESS_THAN_OR_EQUAL_TO:"lte",GREATER_THAN:"gt",GREATER_THAN_OR_EQUAL_TO:"gte",BETWEEN:"between",DATE_IS:"dateIs",DATE_IS_NOT:"dateIsNot",DATE_BEFORE:"dateBefore",DATE_AFTER:"dateAfter"},pc={AND:"and",OR:"or"};const gc={key:0},hc={key:1},pr={__name:"RecordColumnRenderer",props:{column:Object,value:null},setup(e){const t=o.ref(null),r=Object.assign({});async function n(){await o.nextTick();const a=r[`/src/directives/${e.column.displayFormatKey}.js`];a&&t.value&&a().then(i=>{i.default.beforeMount(t.value,{value:e.value,arg:e.column.displayFormat})})}return o.onMounted(()=>{n()}),o.onUpdated(()=>{n()}),(a,i)=>e.column.displayFormatKey?(o.openBlock(),o.createElementBlock("span",gc,[o.createElementVNode("span",{ref_key:"el",ref:t},o.toDisplayString(e.value),513)])):(o.openBlock(),o.createElementBlock("span",hc,o.toDisplayString(e.value),1))}},bc={class:"my-2"},yc={class:"flex flex-col md:flex-row md:justify-between md:items-center"},kc={class:"flex flex-row gap-2"},gr={__name:"Grid",props:{entityName:String,showAddButton:Boolean,showClearFilters:Boolean,columnsToShow:Array,editable:Boolean,deleteable:Boolean,showPagination:Boolean},setup(e){const t=Ne(),r=e;console.log("columnsToShow",r.columnsToShow);const n=it.useRoute(),a=o.ref(r.entityName||n.params.entityName),i=o.ref({}),l=o.ref(""),d=o.ref(!1),u=o.ref(!1),{items:s,headers:c,first:f,totalRecords:m,pageSize:p,loading:g,sortBy:h,sortDirection:b,operatorMap:k,filterToSend:C,primarayKeyColumn:S,fullTextSearch:L,listingResponse:R,onFullTextSearch:N,getDatatypeByField:w,getColumnDatatype:y,onSort:E,onPage:V,onFilter:_,fetchEntityFilterData:D,fetchEntityByName:P}=Tl(a.value),T=o.ref();let j=o.ref(!1);const I=G=>{i.value=G.reduce((J,ie)=>{if(!ie.filterable)return J;let le=Ft.CONTAINS;switch(ie.datatype.toLowerCase()){case"string":case"uuid":le=Ft.STARTS_WITH;break;case"date":le=Ft.DATE_IS;break;case"numeric":case"int":case"integer":le=Ft.EQUALS;break;case"bool":case"boolean":le=Ft.EQUALS;break}return ie.datatype=="bool"||ie.datatype=="boolean"?J[ie.field]={value:null,matchMode:Ft.EQUALS}:J[ie.field]={operator:pc.AND,constraints:[{value:null,matchMode:le}]},J},{})},Y=()=>{I(c.value),C.value=ae(i.value),_()},M=G=>{C.value=ae(i.value),_()},$=G=>{G?l.value=G[S.value.name]:l.value="",d.value=!d.value},z=()=>{d.value=!1,D(!1)},te=G=>{l.value=G[S.value.name],u.value=!0},ne=()=>{u.value=!1,D(!1)},ae=G=>Object.keys(G).map(J=>{const ie=G[J];return ie.constraints?ie.constraints.filter(le=>le.value!==null&&le.value!=="").map(le=>({columnName:J,operator:k[le.matchMode]??le.matchMode,value:le.value,columnType:w(J)})):ie.value!==null&&ie.value!==""?{columnName:J,operator:k[ie.matchMode]??ie.matchMode,value:ie.value,columnType:w(J)}:[]}).flat();return o.watch(()=>t.globalConfigs.appId,async G=>{G&&P(a.value)},{immediate:!0}),o.watch(()=>c.value,G=>{!j.value&&G&&G.length&&(I(G),j.value=!0)},{immediate:!0}),(G,J)=>{const ie=o.resolveComponent("Button"),le=o.resolveComponent("Toolbar"),he=o.resolveComponent("ProgressSpinner"),Pe=o.resolveComponent("InputIcon"),Re=o.resolveComponent("IconField"),Ke=o.resolveComponent("DatePicker"),Me=o.resolveComponent("InputNumber"),W=o.resolveComponent("Checkbox"),A=o.resolveComponent("Column"),se=o.resolveComponent("DataTable");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",o.normalizeProps(o.guardReactiveProps(G.$attrs)),[o.renderSlot(G.$slots,"header"),e.showClearFilters||e.showAddButton?(o.openBlock(),o.createBlock(le,{key:0,class:"mb-4 mt-4"},o.createSlots({_:2},[e.showClearFilters?{name:"start",fn:o.withCtx(()=>[o.createElementVNode("div",bc,[o.createVNode(ie,{type:"button",icon:"pi pi-filter-slash",label:"Clear",severity:"warning",onClick:J[0]||(J[0]=de=>Y())})])]),key:"0"}:void 0,e.showAddButton?{name:"end",fn:o.withCtx(()=>[o.createVNode(ie,{label:"Add",icon:"pi pi-plus",class:"mr-2",severity:"success",onClick:J[1]||(J[1]=de=>$())})]),key:"1"}:void 0]),1024)):o.createCommentVNode("",!0),o.createVNode(se,{lazy:"",value:o.unref(s),loading:o.unref(g),ref_key:"dt",ref:T,stripedRows:!0,showGridlines:"",rowHover:!0,paginator:e.showPagination,rows:o.unref(p),rowsPerPageOptions:[10,25,50,100],totalRecords:o.unref(m),first:o.unref(f),sortField:o.unref(h),sortOrder:o.unref(b),filters:i.value,"onUpdate:filters":J[5]||(J[5]=de=>i.value=de),filterDisplay:"menu",scrollable:"",scrollHeight:"400px",onSort:o.unref(E),onPage:o.unref(V),onFilter:J[6]||(J[6]=de=>M()),size:"large",paginatorTemplate:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown",currentPageReportTemplate:"Showing {first} to {last} of {totalRecords} items"},{empty:o.withCtx(()=>J[9]||(J[9]=[o.createTextVNode(" No data found. ")])),loading:o.withCtx(()=>[o.createVNode(he)]),header:o.withCtx(()=>[o.createElementVNode("div",yc,[o.createVNode(Re,{iconPosition:"left",class:"block mt-2 md:mt-0"},{default:o.withCtx(()=>[o.createVNode(Pe,{class:"pi pi-search",onClick:J[2]||(J[2]=de=>o.unref(N)())}),o.createVNode(o.unref(Cr.InputText),{class:"w-full sm:w-auto",onKeyup:J[3]||(J[3]=o.withKeys(de=>o.unref(N)(),["enter"])),modelValue:o.unref(L),"onUpdate:modelValue":J[4]||(J[4]=de=>o.isRef(L)?L.value=de:null),placeholder:"Search..."},null,8,["modelValue"])]),_:1})])]),default:o.withCtx(()=>{var de;return[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(c).filter(ce=>!r.columnsToShow||r.columnsToShow.length===0||r.columnsToShow.includes(ce.field)),ce=>(o.openBlock(),o.createBlock(A,{key:ce.field,dataType:o.unref(y)(ce.datatype),field:ce.field,header:ce.name,sortable:ce.sortable,showAddButton:!1,showFilterOperator:!1,style:{"text-wrap":"nowrap"}},o.createSlots({body:o.withCtx(({data:ue})=>[o.createVNode(pr,{column:ce,value:ue[ce.field]},null,8,["column","value"])]),_:2},[ce.datatype.toLowerCase()==="date"&&ce.filterable?{name:"filter",fn:o.withCtx(({filterModel:ue})=>[o.createVNode(Ke,{modelValue:ue.value,"onUpdate:modelValue":ye=>ue.value=ye,dateFormat:"mm/dd/yy",placeholder:"mm/dd/yyyy"},null,8,["modelValue","onUpdate:modelValue"])]),key:"0"}:ce.datatype.toLowerCase()==="int"&&ce.filterable?{name:"filter",fn:o.withCtx(({filterModel:ue})=>[o.createVNode(Me,{modelValue:ue.value,"onUpdate:modelValue":ye=>ue.value=ye,placeholder:"Search..."},null,8,["modelValue","onUpdate:modelValue"])]),key:"1"}:ce.datatype.toLowerCase()==="boolean"&&ce.filterable?{name:"filter",fn:o.withCtx(({filterModel:ue})=>[o.createVNode(W,{modelValue:ue.value,"onUpdate:modelValue":ye=>ue.value=ye,indeterminate:ue.value===null,binary:""},null,8,["modelValue","onUpdate:modelValue","indeterminate"])]),key:"2"}:ce.filterable?{name:"filter",fn:o.withCtx(({filterModel:ue})=>[o.createVNode(o.unref(Cr.InputText),{style:{width:"150px"},type:"text",modelValue:ue.value,"onUpdate:modelValue":ye=>ue.value=ye,class:"p-column-filter",placeholder:"Search..."},null,8,["modelValue","onUpdate:modelValue"])]),key:"3"}:void 0]),1032,["dataType","field","header","sortable"]))),128)),((de=o.unref(s))==null?void 0:de.length)>0&&(e.editable||e.deleteable)?(o.openBlock(),o.createBlock(A,{key:0,header:"Actions"},{body:o.withCtx(({data:ce})=>[o.createElementVNode("div",kc,[e.editable?(o.openBlock(),o.createBlock(ie,{key:0,onClick:ue=>$(ce),icon:"pi pi-pencil",severity:"success",size:"",rounded:"","aria-label":"Edit"},null,8,["onClick"])):o.createCommentVNode("",!0),e.deleteable?(o.openBlock(),o.createBlock(ie,{key:1,onClick:ue=>te(ce),icon:"pi pi-trash",severity:"danger",rounded:"","aria-label":"Delete"},null,8,["onClick"])):o.createCommentVNode("",!0)])]),_:1})):o.createCommentVNode("",!0)]}),_:1},8,["value","loading","paginator","rows","totalRecords","first","sortField","sortOrder","filters","onSort","onPage"]),o.renderSlot(G.$slots,"footer")],16),d.value?(o.openBlock(),o.createBlock(ic,{key:0,showForm:d.value,"onUpdate:showForm":J[7]||(J[7]=de=>d.value=de),entityName:o.unref(R).entityName,recordId:l.value,onOnSaveDialog:z},null,8,["showForm","entityName","recordId"])):o.createCommentVNode("",!0),u.value?(o.openBlock(),o.createBlock(lc,{key:1,showDeleteDialog:u.value,"onUpdate:showDeleteDialog":J[8]||(J[8]=de=>u.value=de),entityName:o.unref(R).entityName,recordId:l.value,onOnDeleteItem:ne},null,8,["showDeleteDialog","entityName","recordId"])):o.createCommentVNode("",!0)],64)}}},wc={class:"flex flex-col p-3"},xc={class:"flex justify-center flex-row mb-2 cursor-pointer"},vc={style:{"word-break":"break-all"}},Cc={__name:"LinkEntityContent",props:{linkEntityListItem:{type:Object,required:!0}},setup(e){it.useRoute();const t=Ne(),r=o.ref("");t.getAppId()!=null&&t.getAppId()!=""&&(r.value=t.getAppId());const n=o.ref(),a=o.ref(!1),i=o.ref(!1),l=o.ref({}),d=o.ref([{label:"Remove association",icon:"",command:f=>{u()}}]),u=()=>{console.log(l.value),console.log("Function is calling")},s=(f,m)=>{l.value=m,n.value.show(f),i.value=!0},c=()=>{l.value={},i.value=!1};return(f,m)=>{const p=o.resolveComponent("Button"),g=o.resolveComponent("ContextMenu"),h=o.resolveComponent("router-link");return o.openBlock(),o.createElementBlock("div",{onMouseenter:m[4]||(m[4]=o.withModifiers(b=>a.value=!0,["prevent"])),onMouseleave:m[5]||(m[5]=o.withModifiers(b=>a.value=!1,["prevent"])),class:"flex relative m-3",style:{border:"1px solid var(--surface-border)","border-radius":"5px"}},[o.withDirectives(o.createVNode(p,{onClick:m[0]||(m[0]=b=>s(b,e.linkEntityListItem)),class:"!absolute right-0",size:"small",style:{width:"55px",height:"25px","border-radius":"5px","font-size":"12px"}},{default:o.withCtx(()=>m[6]||(m[6]=[o.createTextVNode(" More")])),_:1},512),[[o.vShow,a.value||i.value]]),o.createVNode(g,{ref_key:"menu",ref:n,model:d.value,onMouseenter:m[1]||(m[1]=o.withModifiers(b=>a.value=!0,["prevent"])),onMouseleave:m[2]||(m[2]=o.withModifiers(b=>a.value=!1,["prevent"])),onHide:m[3]||(m[3]=b=>c())},null,8,["model"]),o.createElementVNode("div",wc,[o.createElementVNode("div",xc,[o.createElementVNode("div",vc,o.toDisplayString(e.linkEntityListItem.entityName),1),o.createVNode(h,{to:{name:"entity360view",params:{entityName:e.linkEntityListItem.entityName,id:e.linkEntityListItem.id,appId:r.value}},target:"_blank"},{default:o.withCtx(()=>m[7]||(m[7]=[o.createElementVNode("div",{class:"pi pi-external-link ml-3"},null,-1)])),_:1},8,["to"])]),o.createElementVNode("div",null,"Id: "+o.toDisplayString(e.linkEntityListItem.id),1)])],32)}}},Ec={class:"flex flex-col mt-3"},Sc={class:"flex flex-row items-center"},Bc={class:"flex items-center justify-center mt-5"},Nc={key:0,class:"pi pi-caret-right"},_c={key:1,class:"pi pi-caret-down"},Rc={key:0},Tc={class:"flex flex-col mt-5"},Dc={class:"col-12"},Oc={class:"flex flex-col mt-5"},Vc={class:"col-12 font-bold"},$c={key:0},Fc={class:"flex flex-col mt-5"},Ac={class:"col-12"},Ic={class:"flex flex-col mt-5"},Pc={class:"col-12"},Lc={class:"flex flex-col mt-5"},Mc={class:"col-12"},jc={class:"flex flex-row justify-between items-center mt-5"},zc={key:1,class:"mt-2"},Uc={class:"flex flex-row justify-between items-center"},Wc={key:1,class:"text-red-500"},qc={class:"flex flex-col mt-5"},Hc={class:"flex flex-row justify-between items-center mt-2"},Kc={class:"flex flex-row items-center mt-5 mb-5"},Yc={class:"font-bold"},Gc={class:"font-bold ml-2 flex-1"},Xc={class:"flex flex-row justify-center items-center mb-2"},Jc={class:"ml-2 flex-1"},Qc={key:0,class:"pi pi-exclamation-circle"},Zc={class:"flex flex-col justify-center"},ed={class:"flex flex-row justify-between items-center"},td={class:"justify-start"},od={class:"justify-start"},rd=Oe({__name:"EntityLookup",props:o.mergeModels({linkedEntity:{type:Object,required:!0},entity360Name:{type:String,required:!0},entity360Id:{required:!0},saveExistingRelatedEntityRecord:{type:Function,required:!0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){it.useRoute();const t=e,r=o.useModel(e,"modelValue"),n=new Ue,a=o.ref({}),i=o.ref([]),l=o.ref({}),d=o.ref([]),u=o.ref([]),s=o.ref({}),c=o.ref("id"),f=o.ref(1),m=o.ref([]),p=o.ref(25),g=o.ref(0),h=o.ref(0),b=o.ref(0);let k=o.ref([]);const C=o.ref(!1),S={gt:"GREATER_THAN",dateAfter:"GREATER_THAN",equals:"EQUAL",dateIs:"EQUAL",notEquals:"NOT_EQUAL",dateIsNot:"NOT_EQUAL",lt:"LESS_THAN",dateBefore:"LESS_THAN",lte:"LESS_THAN_EQUAL",gte:"GREATER_THAN_EQUAL",between:"BETWEEN",contains:"CONTAINS",startsWith:"STARTS_WITH",notContains:"NOT_CONTAINS",endsWith:"ENDS_WITH"},L={gt:"is greater than",dateAfter:"is after",equals:"is equals",dateIs:"is equals",notEquals:"is not equals",dateIsNot:"is not equals",lt:"is less than",dateBefore:"is before",lte:"is less than or equal to",gte:"is greater than or equal to",between:"between",contains:"contains",startsWith:"starts with",notContains:"not contains",endsWith:"ends with"};o.onMounted(()=>{N()});const R=W=>t.linkedEntity.list.some(A=>A[s.value.name]===W),N=async()=>{try{const W={sortBy:[c.value],sortDirection:f.value===1?"ASC":"DESC",pageSize:p.value,currentPage:g.value,columnList:null,filter:k.value,fullTextSearch:""},A=await n.searchEntityRecords(t.linkedEntity.entityName,W);A&&A.response&&(a.value=A.response,d.value=A.response.entity.entityDefinition.columns,u.value=he(A.response.entity.entityDefinition.columns),h.value=A.response.totalRecords,await w(),await y(),E())}catch{}finally{}},w=async()=>{for(let W=0;W<d.value.length;W++){const A=d.value[W];!A.autoGeneerated&&A.foreignKey&&A.foreignKey.referencedEntityName.toLowerCase()==t.entity360Name.toLowerCase()&&(l.value=A)}},y=async()=>{for(let W=0;W<d.value.length;W++){const A=d.value[W];if(A.primaryKey&&A.primaryKey==!0){s.value=A;break}}},E=()=>{for(let W=0;W<t.linkedEntity.list.length;W++){const A=t.linkedEntity.list[W];A.is_deleted==!1&&A[l.value.name]==t.entity360Id&&i.value.push(A[s.value.name])}},V=()=>{let W=JSON.parse(JSON.stringify(i.value));W=W.filter(se=>!R(se));let A={linkEntityName:a.value.entityName,linkRecordIdList:[]};for(let se=0;se<W.length;se++){const de=W[se];A.linkRecordIdList.push(de)}t.saveExistingRelatedEntityRecord(A)},_=()=>{C.value=!C.value},D=[{label:"Starts with",value:"startsWith"},{label:"Contains",value:"contains"},{label:"Not contains",value:"notContains"},{label:"Ends with",value:"endsWith"},{label:"Equals",value:"equals"},{label:"Not equals",value:"notEquals"}],P=[{label:"Equals",value:"equals"},{label:"Not equals",value:"notEquals"},{label:"Less than",value:"lt"},{label:"Less than or equal to",value:"lte"},{label:"Greater than",value:"gt"},{label:"Greater than or equal to",value:"gte"}],T=[{label:"Equals",value:"equals"},{label:"Not equals",value:"notEquals"}],j=[{label:"Date is",value:"dateIs"},{label:"Date is not",value:"dateIsNot"},{label:"Date is before",value:"dateBefore"},{label:"Date is after",value:"dateAfter"}],I=[{label:"ASC",value:1},{label:"DESC",value:-1}];let Y=[];const M=o.computed(()=>u.value.filter(W=>W.sortable)),$=o.computed(()=>u.value.filter(W=>W.filterable)),z=W=>u.value.filter(A=>{var se;return A.filterable?((se=m.value[W])==null?void 0:se.columnName)===A.name?!0:!m.value.some((de,ce)=>ce!==W&&de.columnName===A.name):!1}).map(A=>({label:A.name,value:A.field})),te=W=>{let A="";switch(Re(W.columnName).toLowerCase()){case"string":case"uuid":A="startsWith";break;case"date":A="dateIs";break;case"numeric":case"int":case"integer":A="equals";break;case"bool":case"boolean":A="equals";break}W.operator=A,W.value=""},ne=W=>{const A=Re(W.columnName);switch(A&&A.toLowerCase()){case"integer":case"int":case"numeric":Y=P;break;case"date":Y=j;break;case"bool":case"boolean":Y=T;break;default:Y=D}return Y},ae=W=>{if(W&&W.columnName){const A=Re(W.columnName);return Ke(A)}else return""},G=()=>{for(let W=0;W<m.value.length;W++){const A=m.value[W];A.editing=!1}m.value.push({columnName:"",value:"",operator:"",editing:!0})},J=W=>{m.value.splice(W,1)},ie=W=>{W.editing=!W.editing},le=()=>{let W=JSON.parse(JSON.stringify(m.value));k.value=[];for(let A=0;A<W.length;A++){const se=W[A];delete se.editing,se.columnName&&se.operator&&se.value&&(se.columnType=Re(se.columnName),se.operator=S[se.operator],k.value.push(se))}N()},he=W=>W.map(A=>({field:A.name,name:A.displayName?A.displayName:A.name,filterable:A.filterable,datatype:A.type,sortable:!0,displayFormatKey:A.displayFormatKey,displayFormat:A.displayFormat})),Pe=()=>{N()},Re=W=>{const A=u.value.find(se=>se.field===W);return A?A.datatype:null},Ke=W=>{switch(W.toLowerCase()){case"integer":case"int":case"numeric":return"numeric";case"date":return"date";case"bool":case"boolean":return"boolean";default:return"text"}},Me=W=>{p.value=W.rows,g.value=W.page,b.value=W.first,N()};return(W,A)=>{var gt,Nt;const se=o.resolveComponent("InputIcon"),de=o.resolveComponent("InputText"),ce=o.resolveComponent("IconField"),ue=o.resolveComponent("Select"),ye=o.resolveComponent("Divider"),Fe=o.resolveComponent("InputNumber"),Ze=o.resolveComponent("DatePicker"),Se=o.resolveComponent("Button"),Ae=o.resolveComponent("Checkbox"),je=o.resolveComponent("Paginator"),pt=o.resolveDirective("tooltip");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",Ec,[o.createElementVNode("div",Sc,[o.createVNode(ce,{class:"block mt-2 md:mt-0 w-full"},{default:o.withCtx(()=>[o.createVNode(se,{onClick:A[0]||(A[0]=()=>{}),class:"pi pi-search"}),o.createVNode(de,{class:"w-full",onKeyup:A[1]||(A[1]=o.withKeys(()=>{},["enter"])),placeholder:`Search ${a.value.entityName}`},null,8,["placeholder"])]),_:1})]),o.createElementVNode("div",Bc,[o.createElementVNode("div",{class:"flex items-center cursor-pointer sorting-filter-section flex-1 line-height-4",onClick:A[2]||(A[2]=Q=>_())},[C.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",Nc)),C.value?(o.openBlock(),o.createElementBlock("div",_c)):o.createCommentVNode("",!0),A[9]||(A[9]=o.createElementVNode("div",{class:"ml-3 font-bold"}," Sorting & Filters ",-1))])]),C.value?(o.openBlock(),o.createElementBlock("div",Rc,[o.createElementVNode("div",Tc,[A[10]||(A[10]=o.createElementVNode("div",{class:"col-12 font-bold"},"Sort Column",-1)),o.createElementVNode("div",Dc,[o.createVNode(ue,{modelValue:c.value,"onUpdate:modelValue":A[3]||(A[3]=Q=>c.value=Q),options:M.value,optionLabel:"name",optionValue:"field",highlightOnSelect:!1,class:"w-full",onChange:A[4]||(A[4]=Q=>Pe(W.event))},null,8,["modelValue","options"])])]),o.createElementVNode("div",Oc,[A[11]||(A[11]=o.createElementVNode("div",{class:"col-12 font-bold"},[o.createElementVNode("div",{class:"col-12 font-bold"},"Sort Direction")],-1)),o.createElementVNode("div",Vc,[o.createVNode(ue,{modelValue:f.value,"onUpdate:modelValue":A[5]||(A[5]=Q=>f.value=Q),options:I,optionLabel:"label",optionValue:"value",highlightOnSelect:!1,class:"w-full",onChange:A[6]||(A[6]=Q=>Pe(W.event))},null,8,["modelValue"])])]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(m.value,(Q,Ye)=>(o.openBlock(),o.createElementBlock("div",{key:Ye},[Q.editing?(o.openBlock(),o.createElementBlock("div",$c,[o.createVNode(ye,{class:"mt-5"}),o.createElementVNode("div",Fc,[A[12]||(A[12]=o.createElementVNode("div",{class:"col-12 font-bold"},"Filter Column",-1)),o.createElementVNode("div",Ac,[o.createVNode(ue,{modelValue:Q.columnName,"onUpdate:modelValue":we=>Q.columnName=we,options:z(Ye),optionLabel:"label",placeholder:"Select column",optionValue:"value",highlightOnSelect:!1,class:"w-full",onChange:we=>te(Q)},null,8,["modelValue","onUpdate:modelValue","options","onChange"])])]),o.createElementVNode("div",Ic,[A[13]||(A[13]=o.createElementVNode("div",{class:"col-12 font-bold"},"Filter Operator",-1)),o.createElementVNode("div",Pc,[o.createVNode(ue,{modelValue:Q.operator,"onUpdate:modelValue":we=>Q.operator=we,options:ne(Q),optionLabel:"label",placeholder:"Select operator",optionValue:"value",highlightOnSelect:!1,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","options"])])]),o.createElementVNode("div",Lc,[A[14]||(A[14]=o.createElementVNode("div",{class:"col-12 font-bold"},"Filter value",-1)),o.createElementVNode("div",Mc,[ae(Q)=="numeric"?(o.openBlock(),o.createBlock(Fe,{key:0,format:!1,class:"w-full",modelValue:Q.value,"onUpdate:modelValue":we=>Q.value=we,placeholder:"Search value"},null,8,["modelValue","onUpdate:modelValue"])):ae(Q)=="date"?(o.openBlock(),o.createBlock(Ze,{key:1,class:"w-full",modelValue:Q.value,"onUpdate:modelValue":we=>Q.value=we,dateFormat:"mm/dd/yy",placeholder:"mm/dd/yyyy"},null,8,["modelValue","onUpdate:modelValue"])):(o.openBlock(),o.createBlock(de,{key:2,modelValue:Q.value,"onUpdate:modelValue":we=>Q.value=we,class:"w-full",placeholder:"Search value"},null,8,["modelValue","onUpdate:modelValue"]))])]),o.createElementVNode("div",jc,[o.createVNode(Se,{style:{width:"100px"},label:"Hide",icon:"",severity:"warning",onClick:we=>ie(Q)},null,8,["onClick"]),o.createVNode(Se,{style:{width:"100px"},label:"Delete",icon:"",severity:"danger",onClick:we=>J(Ye)},null,8,["onClick"])])])):o.createCommentVNode("",!0),Q.editing?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",zc,[o.createVNode(ye),o.createElementVNode("div",Uc,[o.createElementVNode("span",null,[Q.columnName||Q.operator||Q.value?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("span",{class:o.normalizeClass({"text-red-500":!Q.columnName})},o.toDisplayString(Q.columnName?" "+Q.columnName:" column"),3),o.createElementVNode("span",{class:o.normalizeClass({"text-red-500":!L[Q.operator]})},o.toDisplayString(Q.operator?" "+L[Q.operator]:" operator"),3),o.createElementVNode("span",{class:o.normalizeClass({"text-red-500":!Q.value})},o.toDisplayString(Q.value?" "+Q.value:" value"),3)],64)):(o.openBlock(),o.createElementBlock("span",Wc,"Filter is empty"))]),o.createVNode(Se,{style:{width:"100px"},label:"Edit",icon:"",severity:"info",onClick:we=>ie(Q)},null,8,["onClick"])])]))]))),128)),o.createElementVNode("div",qc,[o.createVNode(ye),o.createElementVNode("div",Hc,[o.createVNode(Se,{style:{width:"100px"},label:"Add",disabled:$.value.length===m.value.length,icon:"",severity:"success",onClick:G},null,8,["disabled"]),o.createVNode(Se,{style:{width:"100px"},label:"Apply",severity:"info",onClick:le})])])])):o.createCommentVNode("",!0),o.createElementVNode("div",Kc,[o.createElementVNode("div",Yc,o.toDisplayString((gt=a.value)==null?void 0:gt.totalRecords),1),o.createElementVNode("div",Gc,o.toDisplayString((Nt=a.value)==null?void 0:Nt.entityName),1)]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.value.result,(Q,Ye)=>(o.openBlock(),o.createElementBlock("div",{key:Ye},[o.createElementVNode("div",Xc,[o.createVNode(Ae,{disabled:R(Q[s.value.name]),modelValue:i.value,"onUpdate:modelValue":A[7]||(A[7]=we=>i.value=we),value:Q[s.value.name]},null,8,["disabled","modelValue","value"]),o.createElementVNode("div",Jc,[o.createTextVNode(o.toDisplayString(e.linkedEntity.entityName)+" ",1),o.createElementVNode("span",null,o.toDisplayString(Q[s.value.name]),1)]),R(Q[s.value.name])?o.withDirectives((o.openBlock(),o.createElementBlock("div",Qc,null,512)),[[pt,"This record is already associated.",void 0,{left:!0}]]):o.createCommentVNode("",!0)])]))),128)),o.createVNode(je,{rows:p.value,totalRecords:h.value,rowsPerPageOptions:[10,25,50,100],onPage:Me,template:"FirstPageLink PageLinks LastPageLink CurrentPageReport RowsPerPageDropdown",currentPageReportTemplate:""},null,8,["rows","totalRecords"])]),o.createElementVNode("div",Zc,[o.createVNode(ye,{class:"mt-5"}),o.createElementVNode("div",ed,[o.createElementVNode("div",td,[o.createVNode(Se,{label:"Cancel",icon:"",severity:"secondary",onClick:A[8]||(A[8]=Q=>r.value=!1)})]),o.createElementVNode("div",od,[o.createVNode(Se,{label:"Save",severity:"success",onClick:V})])])])],64)}}},[["__scopeId","data-v-a358808d"]]),nd={class:"field flex flex-col"},ad={key:0,class:"flex items-center"},id={key:1},ld={class:"flex items-center"},sd={class:"flex flex-col justify-center"},cd={class:"flex flex-row justify-between items-center"},dd={class:"justify-start"},ud={class:"justify-start"},fd={__name:"EntityLookupObject",props:o.mergeModels({linkedEntity:{type:Object,required:!0},entity360Name:{type:String,required:!0},entity360Id:{type:[String,Number]},saveExistingEntityObject:{type:Function}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(e){it.useRoute();const{getEntityRecords:t,searchEntityRecords:r,saveRelatedEntityRecord:n,getRecord:a,addRecord:i,updateRecord:l,deleteRecord:d}=Ue(),u=e,s=o.useModel(e,"modelValue");new EntityRecordService;const c=o.ref({}),f=o.ref({});let m=o.ref("");const p=o.ref({}),g=o.ref({});o.onMounted(async()=>{console.log("linkedEntity"),console.log(u.linkedEntity),console.log("entity360Name"),console.log(u.entity360Name),console.log("entity360Id"),console.log(u.entity360Id),await b(),await h()});const h=async()=>{try{const R=await t(u.linkedEntity.entityName);R&&R.response&&(c.value=R.response,await k(R.response.entity.entityDefinition.columns),await S(),console.log(c.value))}catch{}finally{}},b=async()=>{try{const R=await a(u.entity360Name,u.entity360Id);R&&R.response&&(f.value=R.response,await C(R.response.entity.entityDefinition.columns),console.log(f.value))}catch{}finally{}},k=async R=>{for(let N=0;N<R.length;N++){const w=R[N];if(w.primaryKey&&w.primaryKey==!0){p.value=w;break}}},C=async R=>{for(let N=0;N<R.length;N++){const w=R[N];if(!w.autoGeneerated&&w.foreignKey&&w.foreignKey.referencedEntityName.toLowerCase()==u.linkedEntity.entityName.toLowerCase()){g.value=w;break}}},S=async()=>{for(let R=0;R<c.value.result.length;R++){const N=c.value.result[R];if(N[p.value.name]==f.value.result[0][g.value.name]){m.value=N;break}}},L=()=>{const R={linkedEntityRecordId:m.value[p.value.name],linkedEntityName:u.linkedEntity.entityName,relationType:"ManyToOne"};u.saveExistingEntityObject(R)};return(R,N)=>{const w=o.resolveComponent("Select"),y=o.resolveComponent("Divider"),E=o.resolveComponent("Button");return o.openBlock(),o.createElementBlock("div",nd,[o.createVNode(w,{modelValue:o.unref(m),"onUpdate:modelValue":N[0]||(N[0]=V=>o.isRef(m)?m.value=V:m=V),"item-value":p.value.name,options:c.value.result,filter:"",optionLabel:p.value.name,placeholder:"Select "+p.value.name,class:"w-full"},{value:o.withCtx(V=>[V.value?(o.openBlock(),o.createElementBlock("div",ad,[o.createElementVNode("div",null,o.toDisplayString(V.value[p.value.name]),1)])):(o.openBlock(),o.createElementBlock("span",id,o.toDisplayString(V.placeholder),1))]),option:o.withCtx(V=>[o.createElementVNode("div",ld,[o.createElementVNode("div",null,o.toDisplayString(V.option[p.value.name]),1)])]),_:1},8,["modelValue","item-value","options","optionLabel","placeholder"]),o.createElementVNode("div",sd,[o.createVNode(y),o.createElementVNode("div",cd,[o.createElementVNode("div",dd,[o.createVNode(E,{label:"Cancel",icon:"",severity:"secondary",onClick:N[1]||(N[1]=V=>s.value=!1)})]),o.createElementVNode("div",ud,[o.createVNode(E,{label:"Save",severity:"success",onClick:L})])])])])}}},md={style:{"font-weight":"700","font-size":"1.25rem"}},pd={class:"flex flex-col"},gd={class:"flex flex-row justify-between items-center"},hd={class:"justify-start"},bd={class:"justify-start"},yd="",kd={__name:"CreateRelatedentity",props:o.mergeModels({entity360Id:{required:!0},entity360Name:{type:String,required:!0},linkedEntity:{type:Object,required:!0}},{showCreateRelatedEntityForm:{},showCreateRelatedEntityFormModifiers:{}}),emits:o.mergeModels(["onSaveDialog"],["update:showCreateRelatedEntityForm"]),setup(e,{emit:t}){const r=o.useModel(e,"showCreateRelatedEntityForm");it.useRoute();const n=e,a=n.linkedEntity.entityName,i=t,l=o.ref("Add existing");o.onMounted(()=>{p()});const{formData:d,columns:u,errors:s,backendErrors:c,clearErrors:f,saveRecord:m,fetchAllRecords:p,saveRelatedEntityRecord:g}=fr(a,yd,i),h=()=>{for(let S=0;S<u.value.length;S++){const L=u.value[S];!L.autoGenerated&&L.foreignKey&&(d.value[L.name]=n.entity360Id)}const C={relationType:n.linkedEntity.relationType,linkedEntities:{entityLinkage:[{linkEntityName:n.entity360Name,linkRecordIdList:[n.entity360Id]}]}};m(C)},b=C=>{var S;if(((S=C==null?void 0:C.linkRecordIdList)==null?void 0:S.length)>0){const L={entityLinkage:[{linkEntityName:C.linkEntityName,linkRecordIdList:C.linkRecordIdList}]};g(n.entity360Name,n.entity360Id,L)}},k=C=>{const S={entityLinkage:[{linkEntityName:n.entity360Name,linkRecordIdList:[n.entity360Id]}]};g(C.linkedEntityName,C.linkedEntityRecordId,S)};return(C,S)=>{const L=o.resolveComponent("Tab"),R=o.resolveComponent("TabList"),N=o.resolveComponent("Divider"),w=o.resolveComponent("Button"),y=o.resolveComponent("TabPanel"),E=o.resolveComponent("TabPanels"),V=o.resolveComponent("Tabs"),_=o.resolveComponent("Drawer");return o.openBlock(),o.createBlock(_,{visible:r.value,"onUpdate:visible":S[3]||(S[3]=D=>r.value=D),blockScroll:!0,position:"right",class:"p-fluid layout-profile-sidebar",style:{width:"40%"},pt:{closeButton:"ml-auto"}},{header:o.withCtx(()=>[o.createElementVNode("span",md,o.toDisplayString(l.value)+" "+o.toDisplayString(e.linkedEntity.entityName),1)]),default:o.withCtx(()=>[o.createVNode(V,{value:"1"},{default:o.withCtx(()=>[o.createVNode(R,null,{default:o.withCtx(()=>[o.createVNode(L,{value:"0"},{default:o.withCtx(()=>S[4]||(S[4]=[o.createTextVNode("Create new")])),_:1}),o.createVNode(L,{value:"1"},{default:o.withCtx(()=>S[5]||(S[5]=[o.createTextVNode("Add existing")])),_:1})]),_:1}),o.createVNode(E,null,{default:o.withCtx(()=>[o.createVNode(y,{value:"0"},{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(u),(D,P)=>{var T;return o.openBlock(),o.createElementBlock("div",{key:P,class:"mt-3"},[!D.autoGenerated&&!D.foreignKey?(o.openBlock(),o.createBlock(go,{key:0,modelValue:o.unref(d)[D.name],"onUpdate:modelValue":j=>o.unref(d)[D.name]=j,column:D,errors:(T=o.unref(s)[D.name])==null?void 0:T.messages,onInput:o.unref(f)},null,8,["modelValue","onUpdate:modelValue","column","errors","onInput"])):o.createCommentVNode("",!0)])}),128)),o.createElementVNode("div",pd,[o.createVNode(N),o.createElementVNode("div",gd,[o.createElementVNode("div",hd,[o.createVNode(w,{label:"Cancel",icon:"",severity:"secondary",onClick:S[0]||(S[0]=D=>r.value=!1)})]),o.createElementVNode("div",bd,[o.createVNode(w,{label:"Save",severity:"success",onClick:h})])])])]),_:1}),o.createVNode(y,{value:"1"},{default:o.withCtx(()=>[e.linkedEntity.relationType=="ONE_TO_MANY"?(o.openBlock(),o.createBlock(rd,{key:0,modelValue:r.value,"onUpdate:modelValue":S[1]||(S[1]=D=>r.value=D),linkedEntity:e.linkedEntity,entity360Name:e.entity360Name,entity360Id:e.entity360Id,saveExistingRelatedEntityRecord:b},null,8,["modelValue","linkedEntity","entity360Name","entity360Id"])):o.createCommentVNode("",!0),e.linkedEntity.relationType=="MANY_TO_ONE"?(o.openBlock(),o.createBlock(fd,{key:1,modelValue:r.value,"onUpdate:modelValue":S[2]||(S[2]=D=>r.value=D),linkedEntity:e.linkedEntity,entity360Name:e.entity360Name,entity360Id:e.entity360Id,saveExistingEntityObject:k},null,8,["modelValue","linkedEntity","entity360Name","entity360Id"])):o.createCommentVNode("",!0)]),_:1})]),_:1})]),_:1})]),_:1},8,["visible"])}}},wd={class:"flex flex-col border-bottom-section pb-3 pt-3"},xd={class:"flex items-center pl-3 pr-3 justify-between"},vd={key:0,class:"pi pi-caret-right"},Cd={key:1,class:"pi pi-caret-down"},Ed={class:"ml-3 font-bold"},Sd={class:"ml-1"},Bd={class:"text-right"},Nd={key:0},_d=Oe({__name:"LinkEntitySection",props:{entity360Id:{required:!0},entity360Name:{type:String,required:!0},linkedEntity:{type:Object,required:!0},entity360Name:{type:[String,Number]},onSaveRelatedEnttity:{type:Function}},setup(e){it.useRoute();const t=e,r=o.ref(!1),n=o.ref(!1),a=()=>{r.value=!r.value},i=()=>{n.value=!n.value},l=()=>{n.value=!1,t.onSaveRelatedEnttity()},d=o.computed(()=>t.linkedEntity.list.filter(u=>!u.is_deleted).length);return(u,s)=>{const c=o.resolveComponent("Button");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",wd,[o.createElementVNode("div",xd,[o.createElementVNode("div",{class:"flex cursor-pointer items-center linked-entity-section grow line-height-4",onClick:s[0]||(s[0]=f=>a())},[r.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",vd)),r.value?(o.openBlock(),o.createElementBlock("div",Cd)):o.createCommentVNode("",!0),o.createElementVNode("div",Ed,o.toDisplayString(e.linkedEntity.entityName),1),o.createElementVNode("div",Sd," ("+o.toDisplayString(d.value)+") ",1)]),o.createElementVNode("div",Bd,[o.createVNode(c,{label:"Add",icon:"pi pi-plus",size:"small",onClick:s[1]||(s[1]=f=>i())})])]),r.value?(o.openBlock(),o.createElementBlock("div",Nd,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.linkedEntity.list,(f,m)=>(o.openBlock(),o.createElementBlock("div",{class:"flex flex-col",key:m},[f.is_deleted?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(Cc,{key:0,linkEntityListItem:f},null,8,["linkEntityListItem"]))]))),128))])):o.createCommentVNode("",!0)]),n.value?(o.openBlock(),o.createBlock(kd,{key:0,showCreateRelatedEntityForm:n.value,"onUpdate:showCreateRelatedEntityForm":s[2]||(s[2]=f=>n.value=f),linkedEntity:e.linkedEntity,entity360Name:e.entity360Name,entity360Id:e.entity360Id,onOnSaveDialog:l},null,8,["showCreateRelatedEntityForm","linkedEntity","entity360Name","entity360Id"])):o.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-412eec44"]]),Rd={key:0},Td={class:"flex"},Dd={class:"p-3 mt-3 flex-col items-center"},Od={key:0,class:"pi pi-caret-right"},Vd={key:1,class:"pi pi-caret-down"},$d={class:"font-bold ml-2"},Fd={key:0,class:"flex flex-col mt-4"},Ad={class:"flex flex-col mt-2"},Id={class:"flex flex-row flex-wrap justify-between pl-5"},Pd={class:"flex flex-col"},Ld={class:"font-bold"},Md={class:"mt-2"},jd={key:0,class:"flex flex-col",style:{position:"relative","max-width":"400px","background-color":"var(--surface-card)"}},zd={key:2,style:{width:"350px"},class:"flex flex-col justify-center"},Ud={key:0,class:"custom-sidebar"},Wd={class:"custom-sidebar-content"},qd={class:"custom-sidebar-button"},Hd={class:"custom-sidebar-text"},aa=Oe({__name:"Entity360",props:{entityName:{type:String},recordId:{type:String},variable:{type:String,default:"item"},linkedEntity:Array},emits:["onSaveDialog"],setup(e,{expose:t,emit:r}){var _,D;const n=Ne(),a=it.useRoute(),i=e,l=o.ref(!0),d=o.ref(!1),u=o.ref([]);let s=(_=a==null?void 0:a.params)==null?void 0:_.entityName,c=(D=a==null?void 0:a.params)==null?void 0:D.id;i.entityName&&(s=i.entityName),i.recordId&&(c=i.recordId);const f=r,{formData:m,columns:p,errors:g,backendErrors:h,isDataChange:b,linkedEntities:k,primarayColumn:C,clearErrors:S,saveRecord:L,getRelatedEntityRecordById:R,cancleRecord:N}=fr(s,c,f);o.watch(()=>n.globalConfigs.appId,async P=>{P&&R()},{immediate:!0});const w=()=>{l.value=!l.value},y=()=>{d.value=!d.value},E=()=>{R()},V=P=>{if(!u.value||u.value.length===0)return[];const T=u.value.find(j=>j.entityName===P);return T&&T.list?T.list:(console.log("No related entity found"),[])};return t({getRelatedEntity:V}),o.watch(()=>k.value,P=>{Array.isArray(P)&&P.length>0&&P[0]&&(u.value=P)},{immediate:!0,deep:!0}),(P,T)=>{var ae;const j=o.resolveComponent("SplitterPanel"),I=o.resolveComponent("Tab"),Y=o.resolveComponent("TabList"),M=o.resolveComponent("TabPanel"),$=o.resolveComponent("TabPanels"),z=o.resolveComponent("Tabs"),te=o.resolveComponent("Splitter"),ne=o.resolveComponent("Button");return P.$slots["list-item-display-360"]?(o.openBlock(),o.createElementBlock("div",Rd,[o.renderSlot(P.$slots,"header",{},void 0,!0),o.createElementVNode("div",null,[o.renderSlot(P.$slots,"list-item-display-360",o.normalizeProps({[e.variable||""]:{formData:o.unref(m),columns:o.unref(p),linkedEntities:o.unref(k),errors:o.unref(g),recordId:o.unref(c),entityName:o.unref(s),getRelatedEntity:V}}),void 0,!0)]),o.renderSlot(P.$slots,"footer",{},void 0,!0)])):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.createElementVNode("div",Td,[o.createVNode(te,{class:"flex-1",layout:"horizontal",gutterSize:8,size:100},{default:o.withCtx(()=>[o.createVNode(j,{size:20,minSize:10,maxSize:20},{default:o.withCtx(()=>[o.createElementVNode("div",Dd,[o.createElementVNode("div",{onClick:T[0]||(T[0]=G=>w()),class:"section-heading cursor-pointer"},[l.value?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("i",Od)),l.value?(o.openBlock(),o.createElementBlock("i",Vd)):o.createCommentVNode("",!0),o.createElementVNode("span",$d," About this "+o.toDisplayString(o.unref(s)),1)]),l.value?(o.openBlock(),o.createElementBlock("div",Fd,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(p),(G,J)=>{var ie;return o.openBlock(),o.createElementBlock("div",{key:J},[G.autoGenerated?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(go,{key:0,modelValue:o.unref(m)[G.name],"onUpdate:modelValue":le=>o.unref(m)[G.name]=le,column:G,errors:(ie=o.unref(g)[G.name])==null?void 0:ie.messages,onInput:o.unref(S)},null,8,["modelValue","onUpdate:modelValue","column","errors","onInput"]))])}),128))])):o.createCommentVNode("",!0)])]),_:1}),o.createVNode(j,{size:55,minSize:35,style:{height:"100%"}},{default:o.withCtx(()=>[o.createVNode(z,{value:"0"},{default:o.withCtx(()=>[o.createVNode(Y,null,{default:o.withCtx(()=>[o.createVNode(I,{value:"0"},{default:o.withCtx(()=>T[3]||(T[3]=[o.createTextVNode("Overview")])),_:1}),o.createVNode(I,{value:"1"},{default:o.withCtx(()=>T[4]||(T[4]=[o.createTextVNode("Activity")])),_:1})]),_:1}),o.createVNode($,null,{default:o.withCtx(()=>[o.createVNode(M,{value:"0"},{default:o.withCtx(()=>[o.createElementVNode("div",Ad,[T[5]||(T[5]=o.createElementVNode("h3",{class:"mt-2 text-xl font-semibold"},"Data highlights",-1)),o.createElementVNode("div",Id,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(p).filter(G=>G.autoGenerated),(G,J)=>(o.openBlock(),o.createElementBlock("div",{key:J,class:"column-item"},[o.createElementVNode("div",Pd,[o.createElementVNode("div",Ld,o.toDisplayString(G.name),1),o.createElementVNode("div",Md,[o.createVNode(pr,{column:G,value:o.unref(m)[G.name]},null,8,["column","value"])])])]))),128))])])]),_:1}),o.createVNode(M,{value:"1"})]),_:1})]),_:1})]),_:1})]),_:1}),((ae=o.unref(k))==null?void 0:ae.length)>0?(o.openBlock(),o.createElementBlock("div",jd,[d.value?(o.openBlock(),o.createBlock(ne,{key:0,icon:"pi pi-caret-right",rounded:"",onClick:y,"aria-label":"Filter",style:{height:"2rem",width:"2rem",left:"-20px"}})):o.createCommentVNode("",!0),d.value?o.createCommentVNode("",!0):(o.openBlock(),o.createBlock(ne,{key:1,icon:"pi pi-caret-left",rounded:"",onClick:y,"aria-label":"Filter",style:{height:"2rem",width:"2rem",left:"-20px"}})),d.value?(o.openBlock(),o.createElementBlock("div",zd,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(k),(G,J)=>(o.openBlock(),o.createElementBlock("div",{key:J},[o.createVNode(_d,{entity360Name:o.unref(s),entity360Id:o.unref(c),linkedEntity:G,onSaveRelatedEnttity:E},null,8,["entity360Name","entity360Id","linkedEntity"])]))),128))])):o.createCommentVNode("",!0)])):o.createCommentVNode("",!0)]),o.unref(b)?(o.openBlock(),o.createElementBlock("div",Ud,[o.createElementVNode("div",Wd,[o.createElementVNode("div",qd,[o.createVNode(ne,{severity:"primary",onClick:T[1]||(T[1]=G=>o.unref(L)())},{default:o.withCtx(()=>T[6]||(T[6]=[o.createTextVNode("Save")])),_:1}),o.createVNode(ne,{style:{"margin-left":"10px"},severity:"secondary",onClick:T[2]||(T[2]=G=>o.unref(N)())},{default:o.withCtx(()=>T[7]||(T[7]=[o.createTextVNode("Cancel")])),_:1})]),o.createElementVNode("div",Hd," You've changed property in the "+o.toDisplayString(o.unref(s))+". ",1)])])):o.createCommentVNode("",!0)],64))}}},[["__scopeId","data-v-12a444f4"]]);function _o(){const e=new Ue;let{errors:t,setErrors:r}=Vn(),n=o.reactive({data:null});const a=N=>{n.data=N},i=async N=>{try{const w=await e.getEntityRecords(N);if(w&&w.response)return w}catch(w){return console.error("Error fetching entity:",w.errorMessage),w}finally{}},l=async(N,w)=>{try{let y=await e.addRecord(N.entityName,w);if(y)return y}catch(y){return y}finally{}},d=async(N,w,y)=>{try{const E=await e.updateRecord(N.entityName,w,y);if(E&&E.response)return E}catch(E){return E}finally{}},u=async(N,w)=>{try{w.filter==null&&(w.filter={}),Object.keys(w.filter).length===0&&(w.filter=[]);const y=await e.searchEntityRecords(N.entityName,w);if(y)return y.response.sortBy=w.sortBy,y.response.filters=w.filter,y.response.sortDirection=w.sortDirection,y.response.fullTextSearch=w.fullTextSearch,y}catch(y){return y}finally{}},s=async(N,w)=>{try{const y=await e.deleteRecord(N.entityName,w);if(y)return y}catch(y){console.error("Error on deleting record:",y.errorMessage)}finally{}},c=N=>N.result,f=N=>{var w,y;return(y=(w=N==null?void 0:N.entity)==null?void 0:w.entityDefinition)==null?void 0:y.columns},m=N=>{const w=N.entity.entityDefinition.columns;let y={};for(let E=0;E<w.length;E++){const V=w[E];if(V.primaryKey&&V.primaryKey==!0){y=V;break}}return y},p=N=>{const w=N.entity.entityDefinition.columns;let y={};for(let E=0;E<w.length;E++){let V=w[E];V.autoGenerated||(y[V.name]="")}return y},g=(N,w)=>{let y="";const E=N.entity.entityDefinition.columns;for(let V=0;V<E.length;V++){let _=E[V];if(w==_.name){y=_.type;break}}return y},h=(N,w)=>{const E=N.entity.entityDefinition.columns.filter(_=>_.autoGenerated).map(_=>_.name);return Object.entries(w).filter(([_])=>!E.includes(_)).map(([_,D])=>({recordColumnName:_,recordColumnValue:D,columnType:g(n.data,_)}))},b=()=>{const N=n.data.entity.entityDefinition.columns;return ur().shape(N.reduce((y,E)=>(E.autoGenerated||(y[E.name]=dr().nullable(!1).test({name:"custom-validation",test:function(V){const _=[];let D="";if(E.required&&(!V||V.trim()===""))if(E.validations){D=k(E.validations,"VALIDATE_REQUIRED"),_.push(D);let P=S(E.validations,"VALIDATE_REQUIRED");P&&(P="hint:"+P,_.push(P))}else D=E.displayName+" is required.",_.push(D);else{if(E.maxLength&&V.length>E.maxLength)if(E.validations){D=k(E.validations,"VALIDATE_MAXLENGTH"),_.push(D);let P=S(E.validations,"VALIDATE_MAXLENGTH");P&&(P="hint:"+P,_.push(P))}else D=E.displayName+" cannot exceed from "+E.maxLength+" characters",_.push(D);if(E.regxId&&!new RegExp(C(E.validations,"VALIDATE_REGX")).test(V))if(E.validations){D=k(E.validations,"VALIDATE_REGX"),_.push(D);let P=S(E.validations,"VALIDATE_REGX");P&&(P="hint:"+P,_.push(P))}else D=E.displayName+" invalid format.",_.push(D)}return _.length>0?this.createError({message:_}):!0}})),y),{}))},k=(N,w)=>{for(let y=0;y<N.length;y++)if(w==N[y].type)return N[y].message},C=(N,w)=>{for(let y=0;y<N.length;y++)if(w==N[y].type)return N[y].regx},S=(N,w)=>{for(let y=0;y<N.length;y++)if(w==N[y].type)return N[y].hint};return{state:n,setEntity:a,getEntity:i,addRecord:l,updateRecord:d,searchRecord:u,entityRecordDelete:s,getEntityItems:c,getEntityColumns:f,getPrimaryKeyColumn:m,getFormData:p,createDataToSave:h,createValidationSchema:b,clearErrors:N=>(r({...t.value,[N]:null}),t.value),validateData:async(N,w)=>{try{return await N.validate(w,{abortEarly:!1}),r({}),{validate:!0}}catch(y){const E=y.inner.reduce((D,P)=>(D[P.path]||(D[P.path]={messages:[]}),D[P.path].messages.push(...P.errors),D),{}),V=Object.entries(E).reduce((D,[P,T])=>(D[P]={messages:T.messages},D),{});return r(V),{validate:!1,errors:t.value}}}}}const Ro={__name:"ConfirmDeleteDialog",props:{showDeleteDialog:{},showDeleteDialogModifiers:{}},emits:o.mergeModels(["onDeleteItem"],["update:showDeleteDialog"]),setup(e,{emit:t}){const r=o.useModel(e,"showDeleteDialog"),n=t,a=i=>{n("onDeleteItem",{remove:i})};return(i,l)=>{const d=o.resolveComponent("Button"),u=o.resolveComponent("Dialog");return o.openBlock(),o.createBlock(u,{visible:r.value,"onUpdate:visible":l[2]||(l[2]=s=>r.value=s),style:{width:"450px"},header:"Confirm",modal:!0},{footer:o.withCtx(()=>[o.createVNode(d,{label:"No",icon:"pi pi-times",text:"",onClick:l[0]||(l[0]=s=>a(!1))}),o.createVNode(d,{label:"Yes",icon:"pi pi-check",text:"",onClick:l[1]||(l[1]=s=>a(!0))})]),default:o.withCtx(()=>[l[3]||(l[3]=o.createElementVNode("div",{class:"flex items-center justify-center"},[o.createElementVNode("i",{class:"pi pi-exclamation-triangle mr-3",style:{"font-size":"2rem"}}),o.createElementVNode("span",null,"Are you sure you want to delete the selected item?")],-1))]),_:1},8,["visible"])}}},Kd={key:0,style:{"font-weight":"700","font-size":"1.25rem"}},Yd={key:1,style:{"font-weight":"700","font-size":"1.25rem"}},Kt={__name:"EntityFormDialog",props:o.mergeModels({item:Object},{showEntityForm:{},showEntityFormModifiers:{}}),emits:["update:showEntityForm"],setup(e){const t=o.useModel(e,"showEntityForm"),r=o.inject("entityObject"),n=e;let a=o.ref([]),i=o.ref({}),l=o.ref([]),d=o.ref(null),u=o.ref({});o.onMounted(()=>{a.value=r.getEntityColumns(r.state.data),n.item?i.value=JSON.parse(JSON.stringify(n.item)):i.value=r.getFormData(r.state.data),d.value=r.createValidationSchema()});const s=async()=>{const p=await r.validateData(d.value,i.value);if(!p.validate){u.value=p.errors;return}const g=r.getPrimaryKeyColumn(r.state.data),h=n.item[g.name],b={dataDefinitions:r.createDataToSave(r.state.data,i.value)},k=await r.updateRecord(r.state.data,h,b);if(k&&k.success){t.value=!1;const C={sortBy:r.state.data.sortBy,sortDirection:r.state.data.sortDirection,pageSize:r.state.data.pageSize,currentPage:r.state.data.currentPage,columnList:null,filter:r.state.data.filters,fullTextSearch:r.state.data.fullTextSearch},S=await r.searchRecord(r.state.data,C);if(S!=null&&S.response){let L=S==null?void 0:S.response;r.setEntity(L)}}else k.validationErrors&&(l.value=JSON.parse(JSON.stringify(k.errvalidationErrorsors)))},c=async()=>{const p=await r.validateData(d.value,i.value);if(!p.validate){u.value=p.errors;return}const g={dataDefinitions:r.createDataToSave(r.state.data,i.value)},h=await r.addRecord(r.state.data,g);h&&h.success?(t.value=!1,r.state.data=await r.getEntity(r.state.data.entityName)):h.validationErrors&&(l.value=JSON.parse(JSON.stringify(h.errvalidationErrorsors)))},f=async()=>{n.item?s():c()},m=p=>{u.value=r.clearErrors(p)};return(p,g)=>{const h=o.resolveComponent("Button"),b=o.resolveComponent("Dialog");return t.value?(o.openBlock(),o.createBlock(b,{key:0,showFooter:!1,visible:t.value,"onUpdate:visible":g[2]||(g[2]=k=>t.value=k),style:{width:"50rem"},breakpoints:{"1199px":"75vw","575px":"90vw"},modal:!0,class:"p-fluid"},{header:o.withCtx(()=>[e.item?(o.openBlock(),o.createElementBlock("span",Kd,"Edit "+o.toDisplayString(o.unref(r).state.data.entityName)+" record details",1)):o.createCommentVNode("",!0),e.item?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",Yd,"Add "+o.toDisplayString(o.unref(r).state.data.entityName)+" record details",1))]),footer:o.withCtx(()=>[o.createVNode(h,{type:"button",icon:"",label:"Cancel",severity:"secondary",onClick:g[0]||(g[0]=k=>t.value=!1)}),o.createVNode(h,{type:"button",icon:"",label:"Save",severity:"success",onClick:g[1]||(g[1]=k=>f())})]),default:o.withCtx(()=>{var k;return[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(o.unref(a),(C,S)=>{var L;return o.openBlock(),o.createElementBlock("div",{key:S},[!C.autoGenerated&&!C.foreignKey?(o.openBlock(),o.createBlock(go,{key:0,modelValue:o.unref(i)[C.name],"onUpdate:modelValue":R=>o.unref(i)[C.name]=R,column:C,errors:(L=o.unref(u)[C.name])==null?void 0:L.messages,onInput:m},null,8,["modelValue","onUpdate:modelValue","column","errors"])):o.createCommentVNode("",!0),!C.autoGenerated&&C.foreignKey?(o.openBlock(),o.createBlock(Jn,{key:1,modelValue:o.unref(i)[C.name],"onUpdate:modelValue":R=>o.unref(i)[C.name]=R,entityName:C.foreignKey.referencedEntityName,columnName:C.name,relatedEntityColumn:C.foreignKey.referencedColumnName},null,8,["modelValue","onUpdate:modelValue","entityName","columnName","relatedEntityColumn"])):o.createCommentVNode("",!0)])}),128)),((k=o.unref(l))==null?void 0:k.length)>0?(o.openBlock(),o.createBlock(Xn,{key:0,errors:o.unref(l)},null,8,["errors"])):o.createCommentVNode("",!0)]}),_:1},8,["visible"])):o.createCommentVNode("",!0)}}},Gd={class:"flex justify-between items-start"},Xd={class:"flex-grow-1"},Jd={class:"tile-grid"},Qd={class:"font-bold text-lg text-700"},Zd={class:"flex flex-col gap-2"},eu=Oe({__name:"EntityListSingleRecord",props:{item:Object},setup(e){const t=e,r=o.inject("entityObject"),n=o.ref([]),a=o.ref(!1),i=o.ref(!1);o.onMounted(()=>{n.value=r.getEntityColumns(r.state.data)});const l=()=>{a.value=!0},d=()=>{i.value=!0},u=c=>{c.remove==!0?s():a.value=!1},s=async()=>{const c=r.getPrimaryKeyColumn(r.state.data),f=t.item[c.name],m=await r.entityRecordDelete(r.state.data,f);if(m!=null&&m.success){a.value=!1;const p={sortBy:r.state.data.sortBy,sortDirection:r.state.data.sortDirection,pageSize:r.state.data.pageSize,currentPage:r.state.data.currentPage,columnList:null,filter:r.state.data.filters,fullTextSearch:r.state.data.fullTextSearch},g=await r.searchRecord(r.state.data,p);if(g!=null&&g.response){let h=g==null?void 0:g.response;r.setEntity(h)}console.log(m)}};return(c,f)=>{const m=o.resolveComponent("Button");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",Gd,[o.createElementVNode("div",Xd,[o.createElementVNode("div",Jd,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.value,(p,g)=>(o.openBlock(),o.createElementBlock("div",{key:g},[o.createElementVNode("span",Qd,o.toDisplayString(p.name)+" : ",1),o.createVNode(pr,{column:p,value:e.item[p.name]},null,8,["column","value"])]))),128))])]),o.createElementVNode("div",Zd,[o.createVNode(m,{onClick:f[0]||(f[0]=p=>d()),icon:"pi pi-pencil",severity:"success",size:"",rounded:"","aria-label":"Edit"}),o.createVNode(m,{onClick:f[1]||(f[1]=p=>l()),icon:"pi pi-trash",severity:"danger",rounded:"","aria-label":"Delete"})])]),i.value?(o.openBlock(),o.createBlock(Kt,{key:0,showEntityForm:i.value,"onUpdate:showEntityForm":f[2]||(f[2]=p=>i.value=p),item:e.item},null,8,["showEntityForm","item"])):o.createCommentVNode("",!0),a.value?(o.openBlock(),o.createBlock(Ro,{key:1,showDeleteDialog:a.value,"onUpdate:showDeleteDialog":f[3]||(f[3]=p=>a.value=p),onOnDeleteItem:u},null,8,["showDeleteDialog"])):o.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-bce4d0f0"]]),tu=Oe({__name:"EntityListRecordParent",props:{listItemDisplay:String},setup(e){const t=o.inject("entityObject"),r=o.ref([]);return o.watch(()=>t.state.data,n=>{n&&(r.value=n.result,console.log("Entity state updated in child:",t))},{immediate:!0}),(n,a)=>(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(r.value,(i,l)=>(o.openBlock(),o.createElementBlock("div",{key:l,class:"card rounded-md p-5 my-2 shadow-lg relative tile"},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listItemDisplay!=null&&e.listItemDisplay!=""?e.listItemDisplay:eu),o.mergeProps({ref_for:!0},{item:i}),null,16))]))),128))}},[["__scopeId","data-v-f59ea2d9"]]),ou={};function ru(e,t){return null}const nu=Oe(ou,[["render",ru]]),au={class:"my-2"},iu={class:"m-0"},lu={__name:"EntityListHeaderSlot",setup(e){const t=o.inject("entityObject");let r=o.ref("");return o.watch(()=>t.state.data,n=>{n&&(r.value=n.entityName)},{immediate:!0}),(n,a)=>{const i=o.resolveComponent("Toolbar");return o.openBlock(),o.createBlock(i,{class:"p-2 my-2"},{start:o.withCtx(()=>[o.createElementVNode("div",au,[o.createElementVNode("h2",iu,"EntityName: "+o.toDisplayString(o.unref(r)),1)])]),end:o.withCtx(()=>a[0]||(a[0]=[])),_:1})}}},su={class:"flex flex-col mb-5"},cu={class:"col-12"},du={class:"flex flex-col mb-5"},uu={class:"col-12"},fu={key:0},mu={class:"flex flex-col mb-5"},pu={class:"col-12"},gu={class:"flex flex-col mb-5"},hu={class:"col-12"},bu={class:"flex flex-col mb-5"},yu={class:"col-12"},ku={class:"flex flex-row justify-between items-center"},wu={key:1},xu={class:"flex flex-row justify-between items-center"},vu={key:1,class:"text-red-500"},Cu={class:"flex flex-col"},Eu={class:"flex flex-row justify-between items-center"},Su={__name:"FilterSortSidebar",props:o.mergeModels({headers:Array,operatorMap:Object,sortCallback:Function,filterCallback:Function,getColumnDatatype:Function,getDatatypeByField:Function},{sortBy:{},sortByModifiers:{},sortDirection:{},sortDirectionModifiers:{},showFilter:{},showFilterModifiers:{},filters:{},filtersModifiers:{}}),emits:["update:sortBy","update:sortDirection","update:showFilter","update:filters"],setup(e){const t=o.useModel(e,"sortBy"),r=o.useModel(e,"sortDirection"),n=o.useModel(e,"showFilter"),a=o.useModel(e,"filters"),i={GREATER_THAN:"is greater than",dateAfter:"is after",EQUAL:"is equals",dateIs:"is equals",NOT_EQUAL:"is not equals",dateIsNot:"is not equals",LESS_THAN:"is less than",dateBefore:"is before",LESS_THAN_EQUAL:"is less than or equal to",GREATER_THAN_EQUAL:"is greater than or equal to",between:"between",CONTAINS:"contains",STARTS_WITH:"starts with",NOT_CONTAINS:"not contains",ENDS_WITH:"ends with"},l=[{label:"Starts with",value:"STARTS_WITH"},{label:"Contains",value:"CONTAINS"},{label:"Not contains",value:"NOT_CONTAINS"},{label:"Ends with",value:"ENDS_WITH"},{label:"Equals",value:"EQUAL"},{label:"Not equals",value:"NOT_EQUAL"}],d=[{label:"Equals",value:"EQUAL"},{label:"Not equals",value:"NOT_EQUAL"},{label:"Less than",value:"LESS_THAN"},{label:"Less than or equal to",value:"LESS_THAN_EQUAL"},{label:"Greater than",value:"GREATER_THAN_EQUAL"},{label:"Greater than or equal to",value:"gte"}],u=[{label:"Equals",value:"EQUAL"},{label:"Not equals",value:"NOT_EQUAL"}],s=[{label:"Date is",value:"dateIs"},{label:"Date is not",value:"dateIsNot"},{label:"Date is before",value:"dateBefore"},{label:"Date is after",value:"dateAfter"}],c=[{label:"ASC",value:1},{label:"DESC",value:-1}];let f=[];const m=o.computed(()=>e.headers.filter(w=>w.sortable)),p=o.computed(()=>e.headers.filter(w=>w.filterable)),g=w=>e.headers.filter(y=>{var E;return y.filterable?((E=a.value[w])==null?void 0:E.columnName)===y.name?!0:!a.value.some((V,_)=>_!==w&&V.columnName===y.name):!1}).map(y=>({label:y.name,value:y.field})),h=w=>{let y="";switch(e.getDatatypeByField(w.columnName).toLowerCase()){case"string":case"uuid":y="startsWith";break;case"date":y="dateIs";break;case"numeric":case"int":case"integer":y="equals";break;case"bool":case"boolean":y="equals";break}w.operator=y,w.value=""},b=w=>{const y=e.getDatatypeByField(w.columnName);switch(y&&y.toLowerCase()){case"integer":case"int":case"numeric":f=d;break;case"date":f=s;break;case"bool":case"boolean":f=u;break;default:f=l}return f},k=w=>{if(w&&w.columnName){const y=e.getDatatypeByField(w.columnName);return e.getColumnDatatype(y)}else return""},C=()=>{for(let w=0;w<a.value.length;w++){const y=a.value[w];y.editing=!1}a.value.push({columnName:"",value:"",operator:"",editing:!0})},S=w=>{a.value.splice(w,1)},L=w=>{w.editing=!w.editing},R=()=>{let w=[],y=JSON.parse(JSON.stringify(a.value));for(let E=0;E<y.length;E++){const V=y[E];delete V.editing,V.columnName&&V.operator&&V.value&&(V.columnType=e.getDatatypeByField(V.columnName),V.operator=e.operatorMap[V.operator],w.push(V))}e.filterCallback(w)},N=()=>{e.sortCallback()};return(w,y)=>{const E=o.resolveComponent("Select"),V=o.resolveComponent("Divider"),_=o.resolveComponent("InputNumber"),D=o.resolveComponent("DatePicker"),P=o.resolveComponent("InputText"),T=o.resolveComponent("Button"),j=o.resolveComponent("Drawer");return o.openBlock(),o.createBlock(j,{visible:n.value,"onUpdate:visible":y[4]||(y[4]=I=>n.value=I),header:"Sorting and Filter",blockScroll:!0,position:"right",class:"layout-profile-sidebar !w-full md:!w-80 lg:!w-[30rem]",pt:{closeButton:"ml-auto"}},{default:o.withCtx(()=>[o.createElementVNode("div",su,[y[5]||(y[5]=o.createElementVNode("div",{class:"col-12 font-bold"},"Sort Column",-1)),o.createElementVNode("div",cu,[o.createVNode(E,{modelValue:t.value,"onUpdate:modelValue":y[0]||(y[0]=I=>t.value=I),options:m.value,optionLabel:"name",optionValue:"field",highlightOnSelect:!1,class:"w-full",onChange:y[1]||(y[1]=I=>N(w.event))},null,8,["modelValue","options"])])]),o.createElementVNode("div",du,[y[6]||(y[6]=o.createElementVNode("div",{class:"col-12 font-bold"},[o.createElementVNode("div",{class:"col-12 font-bold"},"Sort Direction")],-1)),o.createElementVNode("div",uu,[o.createVNode(E,{modelValue:r.value,"onUpdate:modelValue":y[2]||(y[2]=I=>r.value=I),options:c,optionLabel:"label",optionValue:"value",highlightOnSelect:!1,class:"w-full",onChange:y[3]||(y[3]=I=>N(w.event))},null,8,["modelValue"])])]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.value,(I,Y)=>(o.openBlock(),o.createElementBlock("div",{key:Y},[I.editing?(o.openBlock(),o.createElementBlock("div",fu,[o.createVNode(V),o.createElementVNode("div",mu,[y[7]||(y[7]=o.createElementVNode("div",{class:"col-12 font-bold"},"Filter Column",-1)),o.createElementVNode("div",pu,[o.createVNode(E,{modelValue:I.columnName,"onUpdate:modelValue":M=>I.columnName=M,options:g(Y),optionLabel:"label",placeholder:"Select column",optionValue:"value",highlightOnSelect:!1,class:"w-full",onChange:M=>h(I)},null,8,["modelValue","onUpdate:modelValue","options","onChange"])])]),o.createElementVNode("div",gu,[y[8]||(y[8]=o.createElementVNode("div",{class:"col-12 font-bold"},"Filter Operator",-1)),o.createElementVNode("div",hu,[o.createVNode(E,{modelValue:I.operator,"onUpdate:modelValue":M=>I.operator=M,options:b(I),optionLabel:"label",placeholder:"Select operator",optionValue:"value",highlightOnSelect:!1,class:"w-full"},null,8,["modelValue","onUpdate:modelValue","options"])])]),o.createElementVNode("div",bu,[y[9]||(y[9]=o.createElementVNode("div",{class:"col-12 font-bold"},"Filter value",-1)),o.createElementVNode("div",yu,[k(I)=="numeric"?(o.openBlock(),o.createBlock(_,{key:0,format:!1,class:"w-full",modelValue:I.value,"onUpdate:modelValue":M=>I.value=M,placeholder:"Search value"},null,8,["modelValue","onUpdate:modelValue"])):k(I)=="date"?(o.openBlock(),o.createBlock(D,{key:1,class:"w-full",modelValue:I.value,"onUpdate:modelValue":M=>I.value=M,dateFormat:"mm/dd/yy",placeholder:"mm/dd/yyyy"},null,8,["modelValue","onUpdate:modelValue"])):(o.openBlock(),o.createBlock(P,{key:2,modelValue:I.value,"onUpdate:modelValue":M=>I.value=M,class:"w-full",placeholder:"Search value"},null,8,["modelValue","onUpdate:modelValue"]))])]),o.createElementVNode("div",ku,[o.createVNode(T,{label:"Hide",icon:"",severity:"warn",onClick:M=>L(I)},null,8,["onClick"]),o.createVNode(T,{label:"Delete",icon:"",severity:"danger",onClick:M=>S(Y)},null,8,["onClick"])])])):o.createCommentVNode("",!0),I.editing?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("div",wu,[o.createVNode(V),o.createElementVNode("div",xu,[o.createElementVNode("span",null,[I.columnName||I.operator||I.value?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.createElementVNode("span",{class:o.normalizeClass({"text-red-500":!I.columnName})},o.toDisplayString(I.columnName?" "+I.columnName:" column"),3),o.createElementVNode("span",{class:o.normalizeClass({"text-red-500":!i[I.operator]})},o.toDisplayString(I.operator?" "+i[I.operator]:" operator"),3),o.createElementVNode("span",{class:o.normalizeClass({"text-red-500":!I.value})},o.toDisplayString(I.value?" "+I.value:" value"),3)],64)):(o.openBlock(),o.createElementBlock("span",vu,"Filter is empty"))]),o.createVNode(T,{label:"Edit",icon:"",severity:"info",onClick:M=>L(I)},null,8,["onClick"])])]))]))),128)),o.createElementVNode("div",Cu,[o.createVNode(V),o.createElementVNode("div",Eu,[o.createVNode(T,{label:"Add",disabled:p.value.length===a.value.length,icon:"",severity:"success",onClick:C},null,8,["disabled"]),o.createVNode(T,{label:"Apply",severity:"info",onClick:R})])])]),_:1},8,["visible"])}}},Bu={class:"my-2"},dt={__name:"EntityListFilters",props:{externalFilterPayload:Object},setup(e){const t=o.inject("entityObject"),r=o.ref(!1),n=o.ref([]),a=o.ref([]),i=o.ref(""),l=o.ref(1),d=o.ref(""),u=o.ref([]),s=o.ref([]),c=o.ref(!1),f=e;console.log("props externalFilterPayload list filte",f.externalFilterPayload);const m={GREATER_THAN:"GREATER_THAN",dateAfter:"GREATER_THAN",EQUAL:"EQUAL",dateIs:"EQUAL",NOT_EQUAL:"NOT_EQUAL",dateIsNot:"NOT_EQUAL",LESS_THAN:"LESS_THAN",dateBefore:"LESS_THAN",LESS_THAN_EQUAL:"LESS_THAN_EQUAL",GREATER_THAN_EQUAL:"GREATER_THAN_EQUAL",between:"BETWEEN",CONTAINS:"CONTAINS",STARTS_WITH:"STARTS_WITH",NOT_CONTAINS:"NOT_CONTAINS",ENDS_WITH:"ENDS_WITH"},p=()=>{var y;const w=f.externalFilterPayload;i.value=((y=w.sortBy)==null?void 0:y[0])||"",l.value=w.sortDirection==="DESC"?-1:1,d.value=w.fullTextSearch||"",n.value=w.filter||[],a.value=w.filter||[],b()};o.watch(()=>t.state.data,w=>{if(w&&!c.value){if(u.value=t.getEntityColumns(w),s.value=L(u.value),!i.value){const y=t.getPrimaryKeyColumn(w);i.value=(y==null?void 0:y.name)||""}f.externalFilterPayload&&p(),c.value=!0}},{immediate:!0});const g=()=>{r.value=!r.value},h=w=>{a.value=w,b()},b=async()=>{const w=t.state.data,y={sortBy:[i.value],sortDirection:l.value===1?"ASC":"DESC",pageSize:(w==null?void 0:w.pageSize)||25,currentPage:(w==null?void 0:w.currentPage)||0,columnList:null,filter:a.value,fullTextSearch:d.value},E=await t.searchRecord(w,y);E!=null&&E.success&&t.setEntity(E.response)},k=()=>{b()},C=()=>{n.value=[],a.value=[],b()},S=()=>{b()},L=w=>w.map(y=>({field:y.name,name:y.displayName||y.name,filterable:y.filterable,datatype:y.type,sortable:y.indexColumn,displayFormatKey:y.displayFormatKey,displayFormat:y.displayFormat})),R=w=>{switch(w.toLowerCase()){case"integer":case"int":case"numeric":return"numeric";case"date":return"date";case"bool":case"boolean":return"boolean";default:return"text"}},N=w=>{const y=u.value.find(E=>E.name===w);return y?y.type:null};return(w,y)=>{const E=o.resolveComponent("Button"),V=o.resolveComponent("InputIcon"),_=o.resolveComponent("InputText"),D=o.resolveComponent("IconField"),P=o.resolveComponent("Toolbar");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createVNode(P,{class:"p-2 my-2"},{start:o.withCtx(()=>[o.createElementVNode("div",Bu,[o.createVNode(E,{type:"button",size:"medium",icon:"pi pi-filter",label:"Filter",severity:"info",onClick:y[0]||(y[0]=T=>g())})]),o.createVNode(E,{class:"ml-3",size:"medium",type:"button",icon:"pi pi-filter-slash",label:"Clear",severity:"warn",onClick:y[1]||(y[1]=T=>C())})]),end:o.withCtx(()=>[o.createVNode(D,{iconPosition:"right",class:"block mt-2 md:mt-0"},{default:o.withCtx(()=>[o.createVNode(V,{onClick:y[2]||(y[2]=T=>S()),class:"pi pi-search"}),o.createVNode(_,{class:"w-full sm:w-auto",onKeyup:y[3]||(y[3]=o.withKeys(T=>S(),["enter"])),modelValue:d.value,"onUpdate:modelValue":y[4]||(y[4]=T=>d.value=T),placeholder:"Search..."},null,8,["modelValue"])]),_:1})]),_:1}),o.createVNode(Su,{sortBy:i.value,"onUpdate:sortBy":y[5]||(y[5]=T=>i.value=T),sortDirection:l.value,"onUpdate:sortDirection":y[6]||(y[6]=T=>l.value=T),showFilter:r.value,"onUpdate:showFilter":y[7]||(y[7]=T=>r.value=T),filters:n.value,"onUpdate:filters":y[8]||(y[8]=T=>n.value=T),headers:s.value,operatorMap:m,sortCallback:k,filterCallback:h,getColumnDatatype:R,getDatatypeByField:N},null,8,["sortBy","sortDirection","showFilter","filters","headers"])],64)}}},Yt={__name:"EntityListPagination",setup(e){const t=o.ref(25),r=o.ref(0),n=o.ref(0),a=o.ref(0);let i=o.inject("entityObject");const l=async d=>{t.value=d.rows,r.value=d.page,a.value=d.first;const u={sortBy:i.state.data.sortBy,sortDirection:i.state.data.sortDirection,columnList:null,filter:i.state.data.filters,fullTextSearch:i.state.data.fullTextSearch,pageSize:t.value,currentPage:r.value},s=await i.searchRecord(i.state.data,u);if(s!=null&&s.success){let c=s==null?void 0:s.response;i.setEntity(c),n.value=s.response.totalRecords,a.value=r.value*t.value}};return o.watch(()=>{var d,u;return(u=(d=i==null?void 0:i.state)==null?void 0:d.data)==null?void 0:u.totalRecords},d=>{n&&(n.value=d)},{immediate:!0}),(d,u)=>{const s=o.resolveComponent("Paginator");return o.openBlock(),o.createBlock(s,{class:"my-4",rows:t.value,totalRecords:n.value,rowsPerPageOptions:[10,25,50,100],onPage:l,template:"FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown",currentPageReportTemplate:"Showing {first} to {last} of {totalRecords} items"},null,8,["rows","totalRecords"])}}},Nu={class:"flex flex-row justify-end p-2 my-2"},ut={__name:"EntityListAddButton",setup(e){const t=o.ref(!1),r=()=>{t.value=!0};return(n,a)=>{const i=o.resolveComponent("Button");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",Nu,[o.createVNode(i,{label:"Add",size:"medium",icon:"pi pi-plus",onClick:a[0]||(a[0]=l=>r())})]),t.value?(o.openBlock(),o.createBlock(Kt,{key:0,showEntityForm:t.value,"onUpdate:showEntityForm":a[1]||(a[1]=l=>t.value=l)},null,8,["showEntityForm"])):o.createCommentVNode("",!0)],64)}}},ia={__name:"EntityList",props:{entityName:String,listDisplay:String,listItemDisplay:String,listHeader:String,listFooter:String,listFilter:String,listPagination:String,showAddButton:Boolean,listFilerSlot:Boolean,className:{type:String,default:"default-class"}},setup(e,{expose:t}){const r=_o(),n=Ne();o.provide("entityObject",r);const a=e;return t({props:a,reload:()=>{console.log("reload data")}}),o.watch(()=>n.globalConfigs.appId,async l=>{if(l){const d=await r.getEntity(a.entityName);d.success?r.setEntity(d.response):r.setEntity({result:[]})}},{immediate:!0}),(l,d)=>{var u,s,c;return l.$slots["list-item-display"]?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[e.showAddButton?(o.openBlock(),o.createBlock(ut,{key:0})):o.createCommentVNode("",!0),e.listFilerSlot?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||dt),{key:1})):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(((c=(s=(u=o.unref(r))==null?void 0:u.state)==null?void 0:s.data)==null?void 0:c.result)||[],f=>o.renderSlot(l.$slots,"list-item-display",{item:f})),256))],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listHeader||lu))),(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||dt))),e.showAddButton?(o.openBlock(),o.createBlock(ut,{key:0})):o.createCommentVNode("",!0),(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listDisplay||tu),o.normalizeProps(o.guardReactiveProps({listItemDisplay:e.listItemDisplay})),null,16)),(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listPagination||Yt))),(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFooter||nu)))],64))}}},_u={key:0},Ru=["href"],Tu={key:1},Du={class:"action-buttons"},Ou=Oe({__name:"EntityListingSingleRecord",props:{item:Object,entityName:String,showAddButton:Boolean,showFilters:Boolean,className:String,listDisplay:String,listHeader:String,listClass:String,listItemClass:String,listFooter:String,listFilter:String,listPagination:String,displayField:String,baseUrl:String,hrefKey:String,listItemDisplay:String,listHeaderSlot:Boolean,showPagination:Boolean,className:{type:String,default:"default-class"},editable:Boolean,deletable:Boolean,linkedEntity:Array,externalFilterPayload:Object},setup(e){const t=e;console.log("props entitylistsingle record",t.item);const r=o.inject("entityObject"),n=o.ref([]),a=o.ref(null),i=o.ref(null),l=o.ref(!1),d=o.ref(!1);o.onMounted(()=>{var m;t.linkedEntity&&t.linkedEntity.length>0?n.value=Object.keys(t.linkedEntity[0]).map(p=>({name:p})):n.value=r==null?void 0:r.getEntityColumns(r.state.data),a.value=((m=n==null?void 0:n.value)==null?void 0:m.find(p=>p.name===t.displayField))||null,a.value&&(i.value=t==null?void 0:t.item[a.value.name])});const u=()=>{l.value=!0},s=()=>{d.value=!0},c=async m=>{m.remove?f():l.value=!1},f=async()=>{const m=r.getPrimaryKeyColumn(r.state.data),p=t.item[m.name],g=await r.entityRecordDelete(r.state.data,p);if(g!=null&&g.success){l.value=!1;const h=await r.searchRecord(r.state.data,{sortBy:r.state.data.sortBy,sortDirection:r.state.data.sortDirection,pageSize:r.state.data.pageSize,currentPage:r.state.data.currentPage,columnList:null,filter:r.state.data.filters,fullTextSearch:r.state.data.fullTextSearch});h!=null&&h.response&&r.setEntity(h.response)}};return(m,p)=>{const g=o.resolveComponent("Button");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("ul",{class:o.normalizeClass(t.className)},[a.value?(o.openBlock(),o.createElementBlock("li",_u,[o.createElementVNode("a",{href:`${e.baseUrl}/${e.item[e.hrefKey]}`,target:"_blank",class:"hover:underline"},o.toDisplayString(i.value),9,Ru)])):(o.openBlock(),o.createElementBlock("li",Tu,[o.createElementVNode("span",null,"No matching field found for '"+o.toDisplayString(i.value)+"'.",1)])),o.createElementVNode("li",Du,[e.editable?(o.openBlock(),o.createBlock(g,{key:0,onClick:p[0]||(p[0]=h=>s()),icon:"pi pi-pencil",severity:"success",rounded:"","aria-label":"Edit"})):o.createCommentVNode("",!0),e.deletable?(o.openBlock(),o.createBlock(g,{key:1,onClick:p[1]||(p[1]=h=>u()),icon:"pi pi-trash",severity:"danger",rounded:"","aria-label":"Delete"})):o.createCommentVNode("",!0)])],2),d.value?(o.openBlock(),o.createBlock(Kt,{key:0,showEntityForm:d.value,"onUpdate:showEntityForm":p[2]||(p[2]=h=>d.value=h),item:e.item},null,8,["showEntityForm","item"])):o.createCommentVNode("",!0),l.value?(o.openBlock(),o.createBlock(Ro,{key:1,showDeleteDialog:l.value,"onUpdate:showDeleteDialog":p[3]||(p[3]=h=>l.value=h),onOnDeleteItem:c},null,8,["showDeleteDialog"])):o.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-066206a2"]]),Vu={key:0,class:"error-message"},$u={class:"text-red-500 font-bold"},Fu={key:0},Au={key:1},Iu={key:2},Pu={key:3},Lu={key:1},la=Oe({__name:"EntityListing",props:{entityName:String,listClass:String,listItemClass:String,listHeader:String,listFooter:String,listFilter:String,listPagination:String,listItemDisplay:String,showAddButton:Boolean,showFilters:Boolean,listHeaderSlot:Boolean,showPagination:Boolean,className:{type:String,default:"default-class"},displayField:String,baseUrl:String,hrefKey:String,editable:Boolean,deletable:Boolean,linkedEntity:Array,externalFilterPayload:Object},setup(e,{expose:t,emit:r}){const n=_o(),a=Ne();o.provide("entityObject",n);const i=r,l=e;console.log("props externalFilterPayload",l.externalFilterPayload);const d=o.ref([]);return l.linkedEntity?o.watch(()=>l.linkedEntity,c=>{c&&(d.value=c,i("linkedEntityChanged",c))},{immediate:!0}):o.watch(()=>n.state.data,c=>{c&&(d.value=c.result,i("linkedEntityChanged",c.result))},{immediate:!0}),t({props:l,reload:()=>{console.log("reload data")},filter:c=>{console.log("filter data in unordered",c)}}),o.watch(()=>a.globalConfigs.appId,async c=>{if(c)if(l.linkedEntity&&l.linkedEntity.length>0)n.setEntity(l.linkedEntity);else{const f=await n.getEntity(l.entityName);n.setEntity(f.success?f.response:{result:[]})}},{immediate:!0}),(c,f)=>{var m,p,g;return o.openBlock(),o.createElementBlock("div",o.mergeProps(c.$attrs,{class:"flex flex-col"}),[o.renderSlot(c.$slots,"header",{},void 0,!0),c.$slots["list-item-display"]?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[e.showAddButton?(o.openBlock(),o.createBlock(ut,{key:0})):o.createCommentVNode("",!0),e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||dt),{key:1,externalFilterPayload:l.externalFilterPayload},null,8,["externalFilterPayload"])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:o.normalizeClass(e.listClass)},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.linkedEntity&&e.linkedEntity.length>0?e.linkedEntity:((g=(p=(m=o.unref(n))==null?void 0:m.state)==null?void 0:p.data)==null?void 0:g.result)||[],h=>o.renderSlot(c.$slots,"list-item-display",{item:h,class:o.normalizeClass(e.listItemClass)},void 0,!0)),256))],2),e.showPagination?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listPagination||Yt),{key:2})):o.createCommentVNode("",!0)],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[!e.displayField||!e.baseUrl||!e.hrefKey?(o.openBlock(),o.createElementBlock("div",Vu,[o.createElementVNode("p",$u,[f[0]||(f[0]=o.createTextVNode(" Error: Missing required props - ")),e.entityName?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",Fu,"Entity Name")),e.displayField?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",Au,"Display Field")),e.baseUrl?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",Iu,"Base Url")),e.hrefKey?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",Pu,"Href Key"))])])):(o.openBlock(),o.createElementBlock("div",Lu,[e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||dt),{key:0,externalFilterPayload:l.externalFilterPayload},null,8,["externalFilterPayload"])):o.createCommentVNode("",!0),e.showAddButton?(o.openBlock(),o.createBlock(ut,{key:1})):o.createCommentVNode("",!0),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(d.value,(h,b)=>(o.openBlock(),o.createElementBlock("div",{key:b},[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listItemDisplay!=null&&e.listItemDisplay!=""?e.listItemDisplay:Ou),o.mergeProps({key:h,ref_for:!0},{item:h,...l}),null,16))]))),128)),e.showPagination?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listPagination||Yt),{key:2})):o.createCommentVNode("",!0)])),o.renderSlot(c.$slots,"footer",{},void 0,!0)],64)),o.renderSlot(c.$slots,"footer",{},void 0,!0)],16)}}},[["__scopeId","data-v-edc5e5a2"]]),Mu={class:"p-6 bg-white shadow-md rounded-lg border border-gray-300 flex flex-col"},ju={class:"flex justify-between items-start gap-4"},zu={class:"flex-grow"},Uu={class:"flex flex-col gap-2"},Wu={class:"font-bold text-gray-700"},qu={class:"text-gray-600"},Hu={class:"flex flex-col gap-2"},Ku=Oe({__name:"EntityListingTileSingleRecord",props:{item:Object,entityName:String,showAddButton:Boolean,showFilters:Boolean,className:String,listDisplay:String,listHeader:String,listFooter:String,listFilter:String,listPagination:String,listItemDisplay:String,listHeaderSlot:Boolean,showPagination:Boolean,className:{type:String,default:"default-class"},editable:Boolean,deletable:Boolean},setup(e){const t=e,r=o.inject("entityObject"),n=o.ref([]),a=o.ref(null),i=o.ref(null),l=o.ref(!1),d=o.ref(!1);o.onMounted(()=>{n.value=r.getEntityColumns(r.state.data),a.value=n.value.find(m=>m.name===t.displayField)||null,a.value&&(i.value=t.item[a.value.name])});const u=()=>{l.value=!0},s=()=>{d.value=!0},c=async m=>{m.remove?f():l.value=!1},f=async()=>{const m=r.getPrimaryKeyColumn(r.state.data),p=t.item[m.name],g=await r.entityRecordDelete(r.state.data,p);if(g!=null&&g.success){l.value=!1;const h=await r.searchRecord(r.state.data,{sortBy:r.state.data.sortBy,sortDirection:r.state.data.sortDirection,pageSize:r.state.data.pageSize,currentPage:r.state.data.currentPage,columnList:null,filter:r.state.data.filters,fullTextSearch:r.state.data.fullTextSearch});h!=null&&h.response&&r.setEntity(h.response)}};return(m,p)=>{const g=o.resolveComponent("Button");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",Mu,[o.createElementVNode("div",ju,[o.createElementVNode("div",zu,[o.createElementVNode("div",Uu,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.value,(h,b)=>(o.openBlock(),o.createElementBlock("div",{key:b,class:"flex flex-col"},[o.createElementVNode("span",Wu,o.toDisplayString(h.displayName||h.name)+":",1),o.createElementVNode("span",qu,o.toDisplayString(e.item[h.name]),1)]))),128))])]),o.createElementVNode("div",Hu,[e.editable?(o.openBlock(),o.createBlock(g,{key:0,onClick:p[0]||(p[0]=h=>s()),icon:"pi pi-pencil",severity:"success",rounded:"","aria-label":"Edit"})):o.createCommentVNode("",!0),e.deletable?(o.openBlock(),o.createBlock(g,{key:1,onClick:p[1]||(p[1]=h=>u()),icon:"pi pi-trash",severity:"danger",rounded:"","aria-label":"Delete"})):o.createCommentVNode("",!0)])])]),d.value?(o.openBlock(),o.createBlock(Kt,{key:0,showEntityForm:d.value,"onUpdate:showEntityForm":p[2]||(p[2]=h=>d.value=h),item:e.item},null,8,["showEntityForm","item"])):o.createCommentVNode("",!0),l.value?(o.openBlock(),o.createBlock(Ro,{key:1,showDeleteDialog:l.value,"onUpdate:showDeleteDialog":p[3]||(p[3]=h=>l.value=h),onOnDeleteItem:c},null,8,["showDeleteDialog"])):o.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-c78e676f"]]),Yu={class:"flex flex-wrap gap-4 p-2"},Gu={key:0,class:"error-message"},Xu={class:"text-red-500 font-bold"},Ju={key:0},Qu={key:1},Zu={class:"flex flex-wrap gap-4 p-4"},sa=Oe({__name:"EntityListingTile",props:{entityName:String,listDisplay:String,listItemDisplay:String,listHeader:String,listFooter:String,listFilter:String,listPagination:String,showAddButton:Boolean,showFilters:Boolean,listHeaderSlot:Boolean,showPagination:Boolean,className:{type:String,default:"default-class"},editable:Boolean,deletable:Boolean,dynamicPropName:{type:String,default:"item"}},setup(e,{expose:t}){const r=_o(),n=Ne();o.provide("entityObject",r);const a=e,i=o.ref([]);return o.watch(()=>r.state.data,u=>{u&&(i.value=u.result)},{immediate:!0}),t({props:a,reload:()=>{console.log("reload data")},filter:()=>{console.log("filter data in unordered")}}),o.watch(()=>n.globalConfigs.appId,async u=>{if(u){const s=await r.getEntity(a.entityName);r.setEntity(s.success?s.response:{result:[]})}},{immediate:!0}),(u,s)=>{var c,f,m;return o.openBlock(),o.createElementBlock("div",o.normalizeProps(o.guardReactiveProps(u.$attrs)),[u.$slots["list-item-display-tile"]?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.renderSlot(u.$slots,"header",{},void 0,!0),e.showAddButton?(o.openBlock(),o.createBlock(ut,{key:0})):o.createCommentVNode("",!0),e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||dt),{key:1})):o.createCommentVNode("",!0),o.createElementVNode("div",Yu,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(((m=(f=(c=o.unref(r))==null?void 0:c.state)==null?void 0:f.data)==null?void 0:m.result)||[],(p,g)=>(o.openBlock(),o.createElementBlock("div",{key:g,class:"flex flex-col p-6 border border-gray-300 shadow-md rounded-lg bg-white w-full sm:w-1/2 md:w-1/3 lg:w-1/4 xl:w-1/5 2xl:w-1/8"},[o.renderSlot(u.$slots,"list-item-display-tile",o.normalizeProps({[e.dynamicPropName||""]:p}),void 0,!0)]))),128))]),o.renderSlot(u.$slots,"footer",{},void 0,!0)],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.renderSlot(u.$slots,"header",{},void 0,!0),e.entityName?(o.openBlock(),o.createElementBlock("div",Qu,[e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||dt),{key:0})):o.createCommentVNode("",!0),e.showAddButton?(o.openBlock(),o.createBlock(ut,{key:1})):o.createCommentVNode("",!0),o.createElementVNode("div",Zu,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,(p,g)=>(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listItemDisplay!=null&&e.listItemDisplay!=""?e.listItemDisplay:Ku),o.mergeProps({key:g,ref_for:!0},{item:p,...a}),null,16))),128))]),e.showPagination?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listPagination||Yt),{key:2})):o.createCommentVNode("",!0)])):(o.openBlock(),o.createElementBlock("div",Gu,[o.createElementVNode("p",Xu,[s[0]||(s[0]=o.createTextVNode(" Error: Missing required props - ")),e.entityName?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",Ju,"Entity Name"))])])),o.renderSlot(u.$slots,"footer",{},void 0,!0)],64))],16)}}},[["__scopeId","data-v-037944bc"]]),ef={class:"p-6 bg-white shadow-md rounded-lg border border-gray-300 flex flex-col responsive-box"},tf={class:"flex justify-between items-start gap-4"},of={class:"flex-grow"},rf={class:"flex flex-col gap-2"},nf={class:"font-bold text-gray-700"},af={class:"text-gray-600"},lf={class:"flex flex-col gap-2"},sf=Oe({__name:"EntityListingCarouselSingleRecord",props:{item:Object,entityName:String,showAddButton:Boolean,showFilters:Boolean,className:String,listDisplay:String,listHeader:String,listFooter:String,listFilter:String,listPagination:String,listItemDisplay:String,listHeaderSlot:Boolean,showPagination:Boolean,className:{type:String,default:"default-class"},editable:Boolean,deletable:Boolean},setup(e){const t=e,r=o.inject("entityObject"),n=o.ref([]),a=o.ref(null),i=o.ref(null),l=o.ref(!1),d=o.ref(!1);o.onMounted(()=>{n.value=r.getEntityColumns(r.state.data),a.value=n.value.find(m=>m.name===t.displayField)||null,a.value&&(i.value=t.item[a.value.name])});const u=()=>{l.value=!0},s=()=>{d.value=!0},c=async m=>{m.remove?f():l.value=!1},f=async()=>{const m=r.getPrimaryKeyColumn(r.state.data),p=t.item[m.name],g=await r.entityRecordDelete(r.state.data,p);if(g!=null&&g.success){l.value=!1;const h=await r.searchRecord(r.state.data,{sortBy:r.state.data.sortBy,sortDirection:r.state.data.sortDirection,pageSize:r.state.data.pageSize,currentPage:r.state.data.currentPage,columnList:null,filter:r.state.data.filters,fullTextSearch:r.state.data.fullTextSearch});h!=null&&h.response&&r.setEntity(h.response)}};return(m,p)=>{const g=o.resolveComponent("Button");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",ef,[o.createElementVNode("div",tf,[o.createElementVNode("div",of,[o.createElementVNode("div",rf,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.value,(h,b)=>(o.openBlock(),o.createElementBlock("div",{key:b,class:"flex flex-col"},[o.createElementVNode("span",nf,o.toDisplayString(h.displayName||h.name)+":",1),o.createElementVNode("span",af,o.toDisplayString(e.item[h.name]),1)]))),128))])]),o.createElementVNode("div",lf,[e.editable?(o.openBlock(),o.createBlock(g,{key:0,onClick:p[0]||(p[0]=h=>s()),icon:"pi pi-pencil",severity:"success",rounded:"","aria-label":"Edit"})):o.createCommentVNode("",!0),e.deletable?(o.openBlock(),o.createBlock(g,{key:1,onClick:p[1]||(p[1]=h=>u()),icon:"pi pi-trash",severity:"danger",rounded:"","aria-label":"Delete"})):o.createCommentVNode("",!0)])])]),d.value?(o.openBlock(),o.createBlock(Kt,{key:0,showEntityForm:d.value,"onUpdate:showEntityForm":p[2]||(p[2]=h=>d.value=h),item:e.item},null,8,["showEntityForm","item"])):o.createCommentVNode("",!0),l.value?(o.openBlock(),o.createBlock(Ro,{key:1,showDeleteDialog:l.value,"onUpdate:showDeleteDialog":p[3]||(p[3]=h=>l.value=h),onOnDeleteItem:c},null,8,["showDeleteDialog"])):o.createCommentVNode("",!0)],64)}}},[["__scopeId","data-v-27c0e644"]]);/**
19
+ * Vue 3 Carousel 0.13.0
20
+ * (c) 2025
21
+ * @license MIT
22
+ */const ca=["viewport","carousel"],Gt={"bottom-to-top":"btt","left-to-right":"ltr","right-to-left":"rtl","top-to-bottom":"ttb"},da=["ltr","left-to-right","rtl","right-to-left","ttb","top-to-bottom","btt","bottom-to-top"],cf={ariaGallery:"Gallery",ariaNavigateToPage:"Navigate to page {slideNumber}",ariaNavigateToSlide:"Navigate to slide {slideNumber}",ariaNextSlide:"Navigate to next slide",ariaPreviousSlide:"Navigate to previous slide",iconArrowDown:"Arrow pointing downwards",iconArrowLeft:"Arrow pointing to the left",iconArrowRight:"Arrow pointing to the right",iconArrowUp:"Arrow pointing upwards",itemXofY:"Item {currentSlide} of {slidesCount}"};Object.values(Gt);const ua=["slide","fade"],fa=["center","start","end","center-even","center-odd"],ve={autoplay:0,breakpointMode:ca[0],breakpoints:void 0,dir:da[0],enabled:!0,gap:0,height:"auto",i18n:cf,ignoreAnimations:!1,itemsToScroll:1,itemsToShow:1,modelValue:0,mouseDrag:!0,pauseAutoplayOnHover:!1,preventExcessiveDragging:!1,slideEffect:ua[0],snapAlign:fa[0],touchDrag:!0,transition:300,wrapAround:!1},Et=Symbol("carousel"),df=e=>{const t=o.shallowReactive([]),r=n=>{n!==void 0?t.slice(n).forEach((a,i)=>{var l;(l=a.exposed)===null||l===void 0||l.setIndex(n+i)}):t.forEach((a,i)=>{var l;(l=a.exposed)===null||l===void 0||l.setIndex(i)})};return{cleanup:()=>{t.splice(0,t.length)},getSlides:()=>t,registerSlide:(n,a)=>{if(!n||n.props.isClone)return;const i=a??t.length;t.splice(i,0,n),r(i),e("slide-registered",{slide:n,index:i})},unregisterSlide:n=>{const a=t.indexOf(n);a!==-1&&(e("slide-unregistered",{slide:n,index:a}),t.splice(a,1),r(a))}}};function uf(e){return e.length===0?0:e.reduce((r,n)=>r+n,0)/e.length}function ma({slides:e,position:t,toShow:r}){const n=[],a=t==="before",i=a?-r:0,l=a?0:r;if(e.length<=0)return n;for(let d=i;d<l;d++){const s={index:a?d:d+e.length,isClone:!0,position:t,id:void 0,key:`clone-${t}-${d}`},c=e[(d%e.length+e.length)%e.length].vnode,f=o.cloneVNode(c,s);f.el=null,n.push(f)}return n}const ff='a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])';function pa(e){if(!e.el||!(e.el instanceof Element))return;const t=e.el.querySelectorAll(ff);for(const r of t)r instanceof HTMLElement&&!r.hasAttribute("disabled")&&r.getAttribute("aria-hidden")!=="true"&&r.setAttribute("tabindex","-1")}function mf(e,t){return Object.keys(e).filter(r=>!t.includes(r)).reduce((r,n)=>(r[n]=e[n],r),{})}function pf(e){const{isVertical:t,isReversed:r,dragged:n,effectiveSlideSize:a}=e,i=t?n.y:n.x;if(i===0)return 0;const l=Math.round(i/a);return r?l:-l}function nt({val:e,max:t,min:r}){return t<r?e:Math.min(Math.max(e,isNaN(r)?e:r),isNaN(t)?e:t)}function gf(e){const{transform:t}=window.getComputedStyle(e);return t.split(/[(,)]/).slice(1,-1).map(r=>parseFloat(r))}function hf(e){let t=1,r=1;return e.forEach(n=>{const a=gf(n);a.length===6&&(t/=a[0],r/=a[3])}),{widthMultiplier:t,heightMultiplier:r}}function bf(e,t){switch(e){case"start":return 0;case"center":case"center-odd":return(t-1)/2;case"center-even":return(t-2)/2;case"end":return t-1;default:return 0}}function yf(e,t,r){switch(e){case"start":return 0;case"center":case"center-odd":return(r-t)/2;case"center-even":return r/2-t;case"end":return r-t;default:return 0}}function hr({slideSize:e,viewportSize:t,align:r,itemsToShow:n}){return n!==void 0?bf(r,n):e!==void 0&&t!==void 0?yf(r,e,t):0}function ga(e="",t={}){return Object.entries(t).reduce((r,[n,a])=>r.replace(`{${n}}`,String(a)),e)}function ha({val:e,max:t,min:r=0}){const n=t-r+1;return((e-r)%n+n)%n+r}function br(e,t=0){let r=!1,n=0,a=null;function i(...l){if(r)return;r=!0;const d=()=>{a=requestAnimationFrame(u=>{u-n>t?(n=u,e(...l),r=!1):d()})};d()}return i.cancel=()=>{a&&(cancelAnimationFrame(a),a=null,r=!1)},i}function To(e,t="px"){if(!(e==null||e===""))return typeof e=="number"||parseFloat(e).toString()===e?`${e}${t}`:e}const kf=o.defineComponent({name:"CarouselAria",setup(){const e=o.inject(Et);return e?()=>o.h("div",{class:["carousel__liveregion","carousel__sr-only"],"aria-live":"polite","aria-atomic":"true"},ga(e.config.i18n.itemXofY,{currentSlide:e.currentSlide+1,slidesCount:e.slidesCount})):()=>""}}),wf={autoplay:{default:ve.autoplay,type:Number},breakpoints:{default:ve.breakpoints,type:Object},breakpointMode:{default:ve.breakpointMode,validator(e){return ca.includes(e)}},enabled:{default:ve.enabled,type:Boolean},gap:{default:ve.gap,type:Number},height:{default:ve.height,type:[Number,String]},ignoreAnimations:{default:!1,type:[Array,Boolean,String]},itemsToScroll:{default:ve.itemsToScroll,type:Number},itemsToShow:{default:ve.itemsToShow,type:[Number,String]},i18n:{default:ve.i18n,type:Object},modelValue:{default:void 0,type:Number},mouseDrag:{default:ve.mouseDrag,type:Boolean},touchDrag:{default:ve.touchDrag,type:Boolean},pauseAutoplayOnHover:{default:ve.pauseAutoplayOnHover,type:Boolean},preventExcessiveDragging:{default:!1,type:Boolean,validator(e,t){return e&&t.wrapAround&&console.warn('[vue3-carousel warn]: "preventExcessiveDragging" cannot be used with wrapAround. The setting will be ignored.'),!0}},snapAlign:{default:ve.snapAlign,validator(e){return fa.includes(e)}},slideEffect:{type:String,default:ve.slideEffect,validator(e){return ua.includes(e)}},transition:{default:ve.transition,type:Number},dir:{type:String,default:ve.dir,validator(e,t){if(!da.includes(e))return!1;const r=e in Gt?Gt[e]:e;return["ttb","btt"].includes(r)&&(!t.height||t.height==="auto")&&console.warn(`[vue3-carousel warn]: The dir "${e}" is not supported with height "auto".`),!0}},wrapAround:{default:ve.wrapAround,type:Boolean}},ba=o.defineComponent({name:"VueCarousel",props:wf,emits:["before-init","drag","init","loop","slide-end","slide-registered","slide-start","slide-unregistered","update:modelValue"],setup(e,{slots:t,emit:r,expose:n}){var a;const i=df(r),l=i.getSlides(),d=o.computed(()=>l.length),u=o.ref(null),s=o.ref(null),c=o.ref(0),f=o.computed(()=>Object.assign(Object.assign(Object.assign({},ve),mf(e,["breakpoints","modelValue"])),{i18n:Object.assign(Object.assign({},ve.i18n),e.i18n)})),m=o.shallowReactive(Object.assign({},f.value)),p=o.ref((a=e.modelValue)!==null&&a!==void 0?a:0),g=o.ref(p.value);o.watch(p,O=>g.value=O);const h=o.ref(0),b=o.computed(()=>Math.ceil((d.value-1)/2)),k=o.computed(()=>d.value-1),C=o.computed(()=>0);let S=null,L=null,R=null;const N=o.computed(()=>c.value+m.gap),w=o.computed(()=>{const O=m.dir||"ltr";return O in Gt?Gt[O]:O}),y=o.computed(()=>["rtl","btt"].includes(w.value)),E=o.computed(()=>["ttb","btt"].includes(w.value)),V=o.computed(()=>m.itemsToShow==="auto"),_=o.computed(()=>E.value?"height":"width");function D(){var O;if(!J.value)return;const U=(f.value.breakpointMode==="carousel"?(O=u.value)===null||O===void 0?void 0:O.getBoundingClientRect().width:typeof window<"u"?window.innerWidth:0)||0,K=Object.keys(e.breakpoints||{}).map(ee=>Number(ee)).sort((ee,me)=>+me-+ee),H={};K.some(ee=>U>=ee?(Object.assign(H,e.breakpoints[ee]),H.i18n&&Object.assign(H.i18n,f.value.i18n,e.breakpoints[ee].i18n),!0):!1),Object.assign(m,f.value,H)}const P=br(()=>{D(),z(),$()}),T=o.shallowReactive(new Set),j=o.ref([]);function I({widthMultiplier:O,heightMultiplier:U}){j.value=l.map(K=>{var H;const ee=(H=K.exposed)===null||H===void 0?void 0:H.getBoundingRect();return{width:ee.width*O,height:ee.height*U}})}const Y=o.ref({width:0,height:0});function M({widthMultiplier:O,heightMultiplier:U}){var K;const H=((K=s.value)===null||K===void 0?void 0:K.getBoundingClientRect())||{width:0,height:0};Y.value={width:H.width*O,height:H.height*U}}function $(){if(!s.value)return;const O=hf(T);if(M(O),I(O),V.value)c.value=uf(j.value.map(U=>U[_.value]));else{const U=Number(m.itemsToShow),K=(U-1)*m.gap;c.value=(Y.value[_.value]-K)/U}}function z(){!m.wrapAround&&d.value>0&&(p.value=nt({val:p.value,max:k.value,min:C.value})),V.value||(m.itemsToShow=nt({val:Number(m.itemsToShow),max:d.value,min:1}))}const te=o.computed(()=>typeof e.ignoreAnimations=="string"?e.ignoreAnimations.split(","):Array.isArray(e.ignoreAnimations)?e.ignoreAnimations:e.ignoreAnimations?!1:[]);o.watchEffect(()=>z()),o.watchEffect(()=>{$()});let ne;const ae=O=>{const U=O.target;if(!(!(U!=null&&U.contains(u.value))||Array.isArray(te.value)&&te.value.includes(O.animationName))&&(T.add(U),!ne)){const K=()=>{ne=requestAnimationFrame(()=>{$(),K()})};K()}},G=O=>{const U=O.target;U&&T.delete(U),ne&&T.size===0&&(cancelAnimationFrame(ne),$())},J=o.ref(!1);typeof document<"u"&&o.watchEffect(()=>{J.value&&te.value!==!1?(document.addEventListener("animationstart",ae),document.addEventListener("animationend",G)):(document.removeEventListener("animationstart",ae),document.removeEventListener("animationend",G))}),o.onMounted(()=>{J.value=!0,D(),ye(),u.value&&(R=new ResizeObserver(P),R.observe(u.value)),r("init")}),o.onBeforeUnmount(()=>{J.value=!1,i.cleanup(),L&&clearTimeout(L),ne&&cancelAnimationFrame(ne),S&&clearInterval(S),R&&(R.disconnect(),R=null),typeof document<"u"&&se(),u.value&&(u.value.removeEventListener("transitionend",$),u.value.removeEventListener("animationiteration",$))});let ie=!1;const le={x:0,y:0},he=o.reactive({x:0,y:0}),Pe=o.ref(!1),Re=o.ref(!1),Ke=()=>{Pe.value=!0},Me=()=>{Pe.value=!1},W=br(O=>{if(!O.ctrlKey)switch(O.key){case"ArrowLeft":case"ArrowUp":E.value===O.key.endsWith("Up")&&(y.value?je(!0):pt(!0));break;case"ArrowRight":case"ArrowDown":E.value===O.key.endsWith("Down")&&(y.value?pt(!0):je(!0));break}},200),A=()=>{document.addEventListener("keydown",W)},se=()=>{document.removeEventListener("keydown",W)};function de(O){const U=O.target.tagName;if(["INPUT","TEXTAREA","SELECT"].includes(U)||Se.value||(ie=O.type==="touchstart",!ie&&(O.preventDefault(),O.button!==0)))return;le.x="touches"in O?O.touches[0].clientX:O.clientX,le.y="touches"in O?O.touches[0].clientY:O.clientY;const K=ie?"touchmove":"mousemove",H=ie?"touchend":"mouseup";document.addEventListener(K,ce,{passive:!1}),document.addEventListener(H,ue,{passive:!0})}const ce=br(O=>{Re.value=!0;const U="touches"in O?O.touches[0].clientX:O.clientX,K="touches"in O?O.touches[0].clientY:O.clientY;he.x=U-le.x,he.y=K-le.y;const H=pf({isVertical:E.value,isReversed:y.value,dragged:he,effectiveSlideSize:N.value});g.value=m.wrapAround?p.value+H:nt({val:p.value+H,max:k.value,min:C.value}),r("drag",{deltaX:he.x,deltaY:he.y})});function ue(){if(ce.cancel(),g.value!==p.value&&!ie){const K=H=>{H.preventDefault(),window.removeEventListener("click",K)};window.addEventListener("click",K)}Ae(g.value),he.x=0,he.y=0,Re.value=!1;const O=ie?"touchmove":"mousemove",U=ie?"touchend":"mouseup";document.removeEventListener(O,ce),document.removeEventListener(U,ue)}function ye(){!m.autoplay||m.autoplay<=0||(S=setInterval(()=>{m.pauseAutoplayOnHover&&Pe.value||je()},m.autoplay))}function Fe(){S&&(clearInterval(S),S=null)}function Ze(){Fe(),ye()}const Se=o.ref(!1);function Ae(O,U=!1){if(!U&&Se.value)return;let K=O,H=O;h.value=p.value,m.wrapAround?H=ha({val:K,max:k.value,min:C.value}):K=nt({val:K,max:k.value,min:C.value}),r("slide-start",{slidingToIndex:O,currentSlideIndex:p.value,prevSlideIndex:h.value,slidesCount:d.value}),Fe(),Se.value=!0,p.value=K,H!==K&&Nt.pause(),r("update:modelValue",H),L=setTimeout(()=>{m.wrapAround&&H!==K&&(Nt.resume(),p.value=H,r("loop",{currentSlideIndex:p.value,slidingToIndex:O})),r("slide-end",{currentSlideIndex:p.value,prevSlideIndex:h.value,slidesCount:d.value}),Se.value=!1,Ze()},m.transition)}function je(O=!1){Ae(p.value+m.itemsToScroll,O)}function pt(O=!1){Ae(p.value-m.itemsToScroll,O)}function gt(){D(),z(),$(),Ze()}o.watch(()=>[f.value,e.breakpoints],()=>D(),{deep:!0}),o.watch(()=>e.autoplay,()=>Ze());const Nt=o.watch(()=>e.modelValue,O=>{O!==p.value&&Ae(Number(O),!0)});r("before-init");const Q=o.computed(()=>{if(!m.wrapAround)return{before:0,after:0};if(V.value)return{before:l.length,after:l.length};const O=Number(m.itemsToShow),U=Math.ceil(O+(m.itemsToScroll-1)),K=U-g.value,H=U-(d.value-(g.value+1));return{before:Math.max(0,K),after:Math.max(0,H)}}),Ye=o.computed(()=>Q.value.before?V.value?j.value.slice(-1*Q.value.before).reduce((O,U)=>O+U[_.value]+m.gap,0)*-1:Q.value.before*N.value*-1:0),we=o.computed(()=>{var O;if(V.value){const U=(p.value%l.length+l.length)%l.length;return hr({slideSize:(O=j.value[U])===null||O===void 0?void 0:O[_.value],viewportSize:Y.value[_.value],align:m.snapAlign})}return hr({align:m.snapAlign,itemsToShow:+m.itemsToShow})}),x=o.computed(()=>{let O=0;if(V.value){if(p.value<0?O=j.value.slice(p.value).reduce((U,K)=>U+K[_.value]+m.gap,0)*-1:O=j.value.slice(0,p.value).reduce((U,K)=>U+K[_.value]+m.gap,0),O-=we.value,!m.wrapAround){const U=j.value.reduce((K,H)=>K+H[_.value]+m.gap,0)-Y.value[_.value]-m.gap;O=nt({val:O,max:U,min:0})}}else{let U=p.value-we.value;m.wrapAround||(U=nt({val:U,max:d.value-+m.itemsToShow,min:0})),O=U*N.value}return O*(y.value?1:-1)}),v=o.computed(()=>{var O,U;if(!V.value){const ee=p.value-we.value;return m.wrapAround?{min:Math.floor(ee),max:Math.ceil(ee+Number(m.itemsToShow)-1)}:{min:Math.floor(nt({val:ee,max:d.value-Number(m.itemsToShow),min:0})),max:Math.ceil(nt({val:ee+Number(m.itemsToShow)-1,max:d.value-1,min:0}))}}let K=0;{let ee=0,me=0-Q.value.before;const be=Math.abs(x.value+Ye.value);for(;ee<=be;){const Be=(me%l.length+l.length)%l.length;ee+=((O=j.value[Be])===null||O===void 0?void 0:O[_.value])+m.gap,me++}K=me-1}let H=0;{let ee=K,me=0;for(ee<0?me=j.value.slice(0,ee).reduce((be,Be)=>be+Be[_.value]+m.gap,0)-Math.abs(x.value+Ye.value):me=j.value.slice(0,ee).reduce((be,Be)=>be+Be[_.value]+m.gap,0)-Math.abs(x.value);me<Y.value[_.value];){const be=(ee%l.length+l.length)%l.length;me+=((U=j.value[be])===null||U===void 0?void 0:U[_.value])+m.gap,ee++}H=ee-1}return{min:Math.floor(K),max:Math.ceil(H)}}),F=o.computed(()=>{if(m.slideEffect==="fade")return;const O=E.value?"Y":"X",U=E.value?he.y:he.x;let K=x.value+U;if(!m.wrapAround&&m.preventExcessiveDragging){let H=0;V.value?H=j.value.reduce((be,Be)=>be+Be[_.value],0):H=(d.value-Number(m.itemsToShow))*N.value;const ee=y.value?0:-1*H,me=y.value?H:0;K=nt({val:K,min:ee,max:me})}return`translate${O}(${K}px)`}),q=o.computed(()=>({"--vc-transition-duration":Se.value?To(m.transition,"ms"):void 0,"--vc-slide-gap":To(m.gap),"--vc-carousel-height":To(m.height),"--vc-cloned-offset":To(Ye.value)})),Z={slideTo:Ae,next:je,prev:pt},re=o.reactive({activeSlide:g,config:m,currentSlide:p,isSliding:Se,isVertical:E,maxSlide:k,minSlide:C,nav:Z,normalizedDir:w,slideRegistry:i,slideSize:c,slides:l,slidesCount:d,viewport:s,visibleRange:v});o.provide(Et,re);const X=o.reactive({config:m,currentSlide:p,maxSlide:k,middleSlide:b,minSlide:C,slideSize:c,slidesCount:d});return n({data:X,nav:Z,next:je,prev:pt,restartCarousel:gt,slideTo:Ae,updateBreakpointsConfig:D,updateSlideSize:$,updateSlidesData:z}),()=>{var O;const U=t.default||t.slides,K=(U==null?void 0:U(X))||[],{before:H,after:ee}=Q.value,me=ma({slides:l,position:"before",toShow:H}),be=ma({slides:l,position:"after",toShow:ee}),Be=[...me,...K,...be];if(!m.enabled||!Be.length)return o.h("section",{ref:u,class:["carousel","is-disabled"]},Be);const eo=((O=t.addons)===null||O===void 0?void 0:O.call(t,X))||[],to=o.h("ol",{class:"carousel__track",style:{transform:F.value},onMousedownCapture:m.mouseDrag?de:null,onTouchstartPassiveCapture:m.touchDrag?de:null},Be),oo=o.h("div",{class:"carousel__viewport",ref:s},to);return o.h("section",{ref:u,class:["carousel",`is-${w.value}`,`is-effect-${m.slideEffect}`,{"is-vertical":E.value,"is-sliding":Se.value,"is-dragging":Re.value,"is-hover":Pe.value}],dir:w.value,style:q.value,"aria-label":m.i18n.ariaGallery,tabindex:"0",onFocus:A,onBlur:se,onMouseenter:Ke,onMouseleave:Me},[oo,eo,o.h(kf)])}}});var yr;(function(e){e.arrowDown="arrowDown",e.arrowLeft="arrowLeft",e.arrowRight="arrowRight",e.arrowUp="arrowUp"})(yr||(yr={}));const ya=e=>`icon${e.charAt(0).toUpperCase()+e.slice(1)}`,xf={arrowDown:"M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z",arrowLeft:"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z",arrowRight:"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z",arrowUp:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z"};function vf(e){return e in yr}const ka=e=>e&&vf(e),wa=o.defineComponent({props:{name:{type:String,required:!0,validator:ka},title:{type:String,default:e=>e.name?ve.i18n[ya(e.name)]:""}},setup(e){const t=o.inject(Et,null);return()=>{const r=e.name;if(!r||!ka(r))return;const n=xf[r],a=o.h("path",{d:n}),i=(t==null?void 0:t.config.i18n[ya(r)])||e.title,l=o.h("title",i);return o.h("svg",{class:"carousel__icon",viewBox:"0 0 24 24",role:"img","aria-label":i},[l,a])}}}),xa=o.defineComponent({name:"CarouselNavigation",inheritAttrs:!1,setup(e,{slots:t,attrs:r}){const n=o.inject(Et);if(!n)return()=>"";const{next:a,prev:i}=t,l=()=>({btt:"arrowDown",ltr:"arrowLeft",rtl:"arrowRight",ttb:"arrowUp"})[n.normalizedDir],d=()=>({btt:"arrowUp",ltr:"arrowRight",rtl:"arrowLeft",ttb:"arrowDown"})[n.normalizedDir],u=o.computed(()=>!n.config.wrapAround&&n.currentSlide<=n.minSlide),s=o.computed(()=>!n.config.wrapAround&&n.currentSlide>=n.maxSlide);return()=>{const{i18n:c}=n.config,f=o.h("button",Object.assign(Object.assign({type:"button",disabled:u.value,"aria-label":c.ariaPreviousSlide,title:c.ariaPreviousSlide,onClick:n.nav.prev},r),{class:["carousel__prev",{"carousel__prev--disabled":u.value},r.class]}),(i==null?void 0:i())||o.h(wa,{name:l()})),m=o.h("button",Object.assign(Object.assign({type:"button",disabled:s.value,"aria-label":c.ariaNextSlide,title:c.ariaNextSlide,onClick:n.nav.next},r),{class:["carousel__next",{"carousel__next--disabled":s.value},r.class]}),(a==null?void 0:a())||o.h(wa,{name:d()}));return[f,m]}}});o.defineComponent({name:"CarouselPagination",props:{disableOnClick:{type:Boolean},paginateByItemsToShow:{type:Boolean}},setup(e){const t=o.inject(Et);if(!t)return()=>"";const r=o.computed(()=>t.config.itemsToShow),n=o.computed(()=>hr({align:t.config.snapAlign,itemsToShow:r.value})),a=o.computed(()=>e.paginateByItemsToShow&&r.value>1),i=o.computed(()=>Math.ceil((t.activeSlide-n.value)/r.value)),l=o.computed(()=>Math.ceil(t.slidesCount/r.value)),d=u=>ha(a.value?{val:i.value,max:l.value-1,min:0}:{val:t.activeSlide,max:t.maxSlide,min:t.minSlide})===u;return()=>{var u,s;const c=[];for(let f=a.value?0:t.minSlide;f<=(a.value?l.value-1:t.maxSlide);f++){const m=ga(t.config.i18n[a.value?"ariaNavigateToPage":"ariaNavigateToSlide"],{slideNumber:f+1}),p=d(f),g=o.h("button",{type:"button",class:{"carousel__pagination-button":!0,"carousel__pagination-button--active":p},"aria-label":m,"aria-pressed":p,"aria-controls":(s=(u=t.slides[f])===null||u===void 0?void 0:u.exposed)===null||s===void 0?void 0:s.id,title:m,disabled:e.disableOnClick,onClick:()=>t.nav.slideTo(a.value?Math.floor(f*+t.config.itemsToShow+n.value):f)}),h=o.h("li",{class:"carousel__pagination-item",key:f},g);c.push(h)}return o.h("ol",{class:"carousel__pagination"},c)}}});const va=o.defineComponent({name:"CarouselSlide",props:{id:{type:String,default:e=>e.isClone?void 0:o.useId()},index:{type:Number,default:void 0},isClone:{type:Boolean,default:!1},position:{type:String,default:void 0}},setup(e,{attrs:t,slots:r,expose:n}){const a=o.inject(Et);if(o.provide(Et,void 0),!a)return()=>"";const i=o.ref(e.index),l=g=>{i.value=g},d=o.getCurrentInstance(),u=()=>{const g=d.vnode.el;return g?g.getBoundingClientRect():{width:0,height:0}};n({id:e.id,setIndex:l,getBoundingRect:u});const s=o.computed(()=>i.value===a.activeSlide),c=o.computed(()=>i.value===a.activeSlide-1),f=o.computed(()=>i.value===a.activeSlide+1),m=o.computed(()=>i.value>=a.visibleRange.min&&i.value<=a.visibleRange.max),p=o.computed(()=>{if(a.config.itemsToShow==="auto")return;const g=a.config.itemsToShow,h=a.config.gap>0&&g>1?`calc(${100/g}% - ${a.config.gap*(g-1)/g}px)`:`${100/g}%`;return a.isVertical?{height:h}:{width:h}});return a.slideRegistry.registerSlide(d,e.index),o.onUnmounted(()=>{a.slideRegistry.unregisterSlide(d)}),e.isClone&&(o.onMounted(()=>{pa(d.vnode)}),o.onUpdated(()=>{pa(d.vnode)})),()=>{var g,h;return a.config.enabled?o.h("li",{style:[t.style,Object.assign({},p.value)],class:{carousel__slide:!0,"carousel__slide--clone":e.isClone,"carousel__slide--visible":m.value,"carousel__slide--active":s.value,"carousel__slide--prev":c.value,"carousel__slide--next":f.value,"carousel__slide--sliding":a.isSliding},onFocusin:()=>{a.viewport&&(a.viewport.scrollLeft=0),a.nav.slideTo(i.value)},id:e.isClone?void 0:e.id,"aria-hidden":e.isClone||void 0},(h=r.default)===null||h===void 0?void 0:h.call(r,{currentIndex:i.value,isActive:s.value,isClone:e.isClone,isPrev:c.value,isNext:f.value,isSliding:a.isSliding,isVisible:m.value})):(g=r.default)===null||g===void 0?void 0:g.call(r)}}}),Cf={class:"p-4 mb-4 flex flex-wrap gap-2 border border-gray-300 shadow-md rounded-lg"},Ef={key:0,class:"error-message"},Sf={class:"text-red-500 font-bold"},Bf={key:0},Nf={key:1,class:"mb-4 mt-4"},Ca=Oe({__name:"EntityListingCarousel",props:{entityName:String,listDisplay:String,listItemDisplay:String,listHeader:String,listFooter:String,listFilter:String,listPagination:String,showAddButton:Boolean,showFilters:Boolean,listHeaderSlot:Boolean,showPagination:Boolean,className:{type:String,default:"default-class"},editable:Boolean,deletable:Boolean},setup(e,{expose:t}){const r=_o(),n=Ne();o.provide("entityObject",r);const a=e,i=o.ref([]);return o.watch(()=>r.state.data,u=>{u&&(i.value=u.result)},{immediate:!0}),t({props:a,reload:()=>{console.log("reload data")},filter:()=>{console.log("filter data in unordered")}}),o.watch(()=>n.globalConfigs.appId,async u=>{if(u){const s=await r.getEntity(a.entityName);r.setEntity(s.success?s.response:{result:[]})}},{immediate:!0}),(u,s)=>(o.openBlock(),o.createElementBlock("div",o.normalizeProps(o.guardReactiveProps(u.$attrs)),[u.$slots["list-item-display-carousel"]?(o.openBlock(),o.createElementBlock(o.Fragment,{key:0},[o.renderSlot(u.$slots,"header",{},void 0,!0),e.showAddButton?(o.openBlock(),o.createBlock(ut,{key:0})):o.createCommentVNode("",!0),e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||dt),{key:1})):o.createCommentVNode("",!0),i.value.length>1?(o.openBlock(),o.createBlock(o.unref(ba),{key:2,"items-to-show":5,"wrap-around":!0,autoplay:2e3,pauseAutoplayOnHover:!0,transition:500},{addons:o.withCtx(()=>[o.createVNode(o.unref(xa))]),default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,(c,f)=>(o.openBlock(),o.createBlock(o.unref(va),{key:f},{default:o.withCtx(()=>[o.createElementVNode("div",Cf,[o.renderSlot(u.$slots,"list-item-display-carousel",{item:c},void 0,!0)])]),_:2},1024))),128))]),_:3})):o.createCommentVNode("",!0),o.renderSlot(u.$slots,"footer",{},void 0,!0)],64)):(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.renderSlot(u.$slots,"header",{},void 0,!0),e.entityName?(o.openBlock(),o.createElementBlock("div",Nf,[e.showFilters?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listFilter||dt),{key:0})):o.createCommentVNode("",!0),e.showAddButton?(o.openBlock(),o.createBlock(ut,{key:1})):o.createCommentVNode("",!0),i.value.length?(o.openBlock(),o.createBlock(o.unref(ba),{key:2,"items-to-show":3,"wrap-around":!1,mouseDrag:!0,pauseAutoplayOnHover:!0,breakpoints:{1024:{itemsToShow:3},950:{itemsToShow:2},768:{itemsToShow:1},340:{itemsToShow:1}}},{addons:o.withCtx(()=>[o.createVNode(o.unref(xa))]),default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,(c,f)=>(o.openBlock(),o.createBlock(o.unref(va),{key:f},{default:o.withCtx(()=>[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listItemDisplay&&e.listItemDisplay!==""?e.listItemDisplay:sf),o.mergeProps({ref_for:!0},{item:c,...a}),null,16))]),_:2},1024))),128))]),_:1})):o.createCommentVNode("",!0),e.showPagination?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.listPagination||Yt),{key:3})):o.createCommentVNode("",!0)])):(o.openBlock(),o.createElementBlock("div",Ef,[o.createElementVNode("p",Sf,[s[0]||(s[0]=o.createTextVNode(" Error: Missing required props - ")),e.entityName?o.createCommentVNode("",!0):(o.openBlock(),o.createElementBlock("span",Bf,"Entity Name"))])])),o.renderSlot(u.$slots,"footer",{},void 0,!0)],64))],16))}},[["__scopeId","data-v-2c25fd02"]]);function Ea(){const e=Ne(),{get:t,post:r,put:n,del:a}=kt(),i=()=>e.getAppId();return{getEntities:async()=>{const T=i();return await t(`/api/app/v1/${T}/entity`)},getEntity:async T=>{const j=i();return await t(`/api/app/v1/${j}/entity/${T}`)},saveEntity:async T=>{const j=i();return await r(`/api/app/v1/${j}/entity`,T)},updateEntityGeneralSettings:async(T,j)=>{const I=i();return await n(`/api/app/v1/${I}/entity/${T}/rename`,j)},updateEntityAuditable:async(T,j)=>{const I=i();return await n(`/api/app/v1/${I}/entity/${T}/auditable`,j)},updateEntityRevisionEnabled:async(T,j)=>{const I=i();return await n(`/api/app/v1/${I}/entity/${T}/revision`,j)},updateEntitySoftDelete:async(T,j)=>{const I=i();return await n(`/api/app/v1/${I}/entity/${T}/soft-delete`,j)},updateEntityDeleteProtected:async(T,j)=>{const I=i();return await n(`/api/app/v1/${I}/entity/${T}/delete-protect`,j)},updateEntityColumn:async(T,j)=>{const I=i();return await n(`/api/app/v1/${I}/entity/${T}/column`,j)},saveEntityColumn:async(T,j)=>{const I=i();return await r(`/api/app/v1/${I}/entity/${T}/column`,j)},dropEntityColumn:async(T,j)=>{const I=i();return await a(`/api/app/v1/${I}/entity/${T}/column/${j}`)},saveForeignKey:async(T,j)=>{const I=i();return await n(`/api/app/v1/${I}/entity/foreignKey`,j)},dropForeignKey:async T=>{const j=i();return await a(`/api/app/v1/${j}/entity/foreignKey`,T)},saveUniqueConstraint:async(T,j)=>{const I=i();return await r(`/api/app/v1/${I}/entity/${T}/column/${j}/constraint`)},dropUniqueConstraint:async(T,j)=>{const I=i();return await a(`/api/app/v1/${I}/entity/${T}/column/${j}/constraint`)},saveIndex:async(T,j)=>{const I=i();return await r(`/api/app/v1/${I}/entity/${T}/column-index`,j)},dropIndex:async(T,j)=>{const I=i();return await a(`/api/app/v1/${I}/entity/${T}/column-index`,j)},deleteEntity:async T=>{const j=i();return await a(`/api/app/v1/${j}/entity/${T}`)},getEntityEvents:async T=>{const j=i();return await t(`/api/app/v1/${j}/entity/${T}/event`)},saveEntityEvent:async(T,j)=>{const I=i();return await r(`/api/app/v1/${I}/entity/${T}/event`,j)},deleteEntityEvent:async(T,j)=>{const I=i();return await a(`/api/app/v1/${I}/entity/${T}/event/${j}`)},updateEntityEvent:async(T,j,I)=>{const Y=i();return await n(`/api/app/v1/${Y}/entity/${T}/event/${j}`,I)},getActionTypes:async()=>{const T=i();return await t(`/api/app/v1/${T}/action-type`)},getActionConfigByType:async T=>{const j=i();return await t(`/api/app/v1/${j}/notification-config/${T}`)}}}const Sa=Lo("entitiesStore",{state:()=>({entities:[],entityService:new Ea}),actions:{async fetchEntities(){try{return await this.entityService.getEntities()}catch(e){console.error("Error fetching entities:",e)}finally{}},async getEntities(){if(this.entities.length===0){const e=await this.fetchEntities();return this.setEntities(e.response),this.entities}else return this.entities},setEntities(e){this.entities=e}},getters:{}}),_f={class:"field flex flex-col w-full"},Rf={key:0,class:"flex items-center"},Tf={key:1},Df={class:"flex items-center"},kr={__name:"EntitySelection",props:{entityName:String,onEntityChangeCallback:Function},setup(e){const t=Ne(),r=o.ref(""),n=Sa(),a=o.ref([]),i=async()=>{a.value=await n.getEntities(),l()},l=()=>{for(let u=0;u<a.value.length;u++){const s=a.value[u];s.name.toLowerCase()==e.entityName.toLowerCase()&&(r.value=s)}},d=()=>{e.onEntityChangeCallback(r.value.name)};return o.watch(()=>t.globalConfigs.appId,async u=>{u&&await i()},{immediate:!0}),(u,s)=>{const c=o.resolveComponent("Select");return o.openBlock(),o.createElementBlock("div",_f,[o.createVNode(c,{modelValue:r.value,"onUpdate:modelValue":[s[0]||(s[0]=f=>r.value=f),d],options:a.value,filter:"",optionLabel:"name",placeholder:"Select entity",class:"w-full"},{value:o.withCtx(f=>[f.value?(o.openBlock(),o.createElementBlock("div",Rf,[o.createElementVNode("div",null,o.toDisplayString(f.value.name),1)])):(o.openBlock(),o.createElementBlock("span",Tf,o.toDisplayString(f.placeholder),1))]),option:o.withCtx(f=>[o.createElementVNode("div",Df,[o.createElementVNode("div",null,o.toDisplayString(f.option.name),1)])]),_:1},8,["modelValue","options"])])}}},Ba=6048e5,Of=864e5,Na=Symbol.for("constructDateFrom");function ft(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Na in e?e[Na](t):e instanceof Date?new e.constructor(t):new Date(t)}function qe(e,t){return ft(t||e,e)}let Vf={};function Do(){return Vf}function Xt(e,t){var d,u,s,c;const r=Do(),n=(t==null?void 0:t.weekStartsOn)??((u=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:u.weekStartsOn)??r.weekStartsOn??((c=(s=r.locale)==null?void 0:s.options)==null?void 0:c.weekStartsOn)??0,a=qe(e,t==null?void 0:t.in),i=a.getDay(),l=(i<n?7:0)+i-n;return a.setDate(a.getDate()-l),a.setHours(0,0,0,0),a}function Oo(e,t){return Xt(e,{...t,weekStartsOn:1})}function _a(e,t){const r=qe(e,t==null?void 0:t.in),n=r.getFullYear(),a=ft(r,0);a.setFullYear(n+1,0,4),a.setHours(0,0,0,0);const i=Oo(a),l=ft(r,0);l.setFullYear(n,0,4),l.setHours(0,0,0,0);const d=Oo(l);return r.getTime()>=i.getTime()?n+1:r.getTime()>=d.getTime()?n:n-1}function Ra(e){const t=qe(e),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return r.setUTCFullYear(t.getFullYear()),+e-+r}function $f(e,...t){const r=ft.bind(null,t.find(n=>typeof n=="object"));return t.map(r)}function Ta(e,t){const r=qe(e,t==null?void 0:t.in);return r.setHours(0,0,0,0),r}function Ff(e,t,r){const[n,a]=$f(r==null?void 0:r.in,e,t),i=Ta(n),l=Ta(a),d=+i-Ra(i),u=+l-Ra(l);return Math.round((d-u)/Of)}function Af(e,t){const r=_a(e,t),n=ft(e,0);return n.setFullYear(r,0,4),n.setHours(0,0,0,0),Oo(n)}function If(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Pf(e){return!(!If(e)&&typeof e!="number"||isNaN(+qe(e)))}function Lf(e,t){const r=qe(e,t==null?void 0:t.in);return r.setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r}const Mf={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},jf=(e,t,r)=>{let n;const a=Mf[e];return typeof a=="string"?n=a:t===1?n=a.one:n=a.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};function wr(e){return(t={})=>{const r=t.width?String(t.width):e.defaultWidth;return e.formats[r]||e.formats[e.defaultWidth]}}const zf={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Uf={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Wf={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},qf={date:wr({formats:zf,defaultWidth:"full"}),time:wr({formats:Uf,defaultWidth:"full"}),dateTime:wr({formats:Wf,defaultWidth:"full"})},Hf={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Kf=(e,t,r,n)=>Hf[e];function Jt(e){return(t,r)=>{const n=r!=null&&r.context?String(r.context):"standalone";let a;if(n==="formatting"&&e.formattingValues){const l=e.defaultFormattingWidth||e.defaultWidth,d=r!=null&&r.width?String(r.width):l;a=e.formattingValues[d]||e.formattingValues[l]}else{const l=e.defaultWidth,d=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[d]||e.values[l]}const i=e.argumentCallback?e.argumentCallback(t):t;return a[i]}}const Yf={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Gf={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Xf={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Jf={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Qf={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Zf={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},em={ordinalNumber:(e,t)=>{const r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},era:Jt({values:Yf,defaultWidth:"wide"}),quarter:Jt({values:Gf,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Jt({values:Xf,defaultWidth:"wide"}),day:Jt({values:Jf,defaultWidth:"wide"}),dayPeriod:Jt({values:Qf,defaultWidth:"wide",formattingValues:Zf,defaultFormattingWidth:"wide"})};function Qt(e){return(t,r={})=>{const n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;const l=i[0],d=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(d)?om(d,f=>f.test(l)):tm(d,f=>f.test(l));let s;s=e.valueCallback?e.valueCallback(u):u,s=r.valueCallback?r.valueCallback(s):s;const c=t.slice(l.length);return{value:s,rest:c}}}function tm(e,t){for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return r}function om(e,t){for(let r=0;r<e.length;r++)if(t(e[r]))return r}function rm(e){return(t,r={})=>{const n=t.match(e.matchPattern);if(!n)return null;const a=n[0],i=t.match(e.parsePattern);if(!i)return null;let l=e.valueCallback?e.valueCallback(i[0]):i[0];l=r.valueCallback?r.valueCallback(l):l;const d=t.slice(a.length);return{value:l,rest:d}}}const nm=/^(\d+)(th|st|nd|rd)?/i,am=/\d+/i,im={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},lm={any:[/^b/i,/^(a|c)/i]},sm={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},cm={any:[/1/i,/2/i,/3/i,/4/i]},dm={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},um={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},fm={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},mm={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},pm={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},gm={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},hm={ordinalNumber:rm({matchPattern:nm,parsePattern:am,valueCallback:e=>parseInt(e,10)}),era:Qt({matchPatterns:im,defaultMatchWidth:"wide",parsePatterns:lm,defaultParseWidth:"any"}),quarter:Qt({matchPatterns:sm,defaultMatchWidth:"wide",parsePatterns:cm,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Qt({matchPatterns:dm,defaultMatchWidth:"wide",parsePatterns:um,defaultParseWidth:"any"}),day:Qt({matchPatterns:fm,defaultMatchWidth:"wide",parsePatterns:mm,defaultParseWidth:"any"}),dayPeriod:Qt({matchPatterns:pm,defaultMatchWidth:"any",parsePatterns:gm,defaultParseWidth:"any"})},bm={code:"en-US",formatDistance:jf,formatLong:qf,formatRelative:Kf,localize:em,match:hm,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ym(e,t){const r=qe(e,t==null?void 0:t.in);return Ff(r,Lf(r))+1}function km(e,t){const r=qe(e,t==null?void 0:t.in),n=+Oo(r)-+Af(r);return Math.round(n/Ba)+1}function Da(e,t){var c,f,m,p;const r=qe(e,t==null?void 0:t.in),n=r.getFullYear(),a=Do(),i=(t==null?void 0:t.firstWeekContainsDate)??((f=(c=t==null?void 0:t.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??a.firstWeekContainsDate??((p=(m=a.locale)==null?void 0:m.options)==null?void 0:p.firstWeekContainsDate)??1,l=ft((t==null?void 0:t.in)||e,0);l.setFullYear(n+1,0,i),l.setHours(0,0,0,0);const d=Xt(l,t),u=ft((t==null?void 0:t.in)||e,0);u.setFullYear(n,0,i),u.setHours(0,0,0,0);const s=Xt(u,t);return+r>=+d?n+1:+r>=+s?n:n-1}function wm(e,t){var d,u,s,c;const r=Do(),n=(t==null?void 0:t.firstWeekContainsDate)??((u=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:u.firstWeekContainsDate)??r.firstWeekContainsDate??((c=(s=r.locale)==null?void 0:s.options)==null?void 0:c.firstWeekContainsDate)??1,a=Da(e,t),i=ft((t==null?void 0:t.in)||e,0);return i.setFullYear(a,0,n),i.setHours(0,0,0,0),Xt(i,t)}function xm(e,t){const r=qe(e,t==null?void 0:t.in),n=+Xt(r,t)-+wm(r,t);return Math.round(n/Ba)+1}function fe(e,t){const r=e<0?"-":"",n=Math.abs(e).toString().padStart(t,"0");return r+n}const mt={y(e,t){const r=e.getFullYear(),n=r>0?r:1-r;return fe(t==="yy"?n%100:n,t.length)},M(e,t){const r=e.getMonth();return t==="M"?String(r+1):fe(r+1,2)},d(e,t){return fe(e.getDate(),t.length)},a(e,t){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h(e,t){return fe(e.getHours()%12||12,t.length)},H(e,t){return fe(e.getHours(),t.length)},m(e,t){return fe(e.getMinutes(),t.length)},s(e,t){return fe(e.getSeconds(),t.length)},S(e,t){const r=t.length,n=e.getMilliseconds(),a=Math.trunc(n*Math.pow(10,r-3));return fe(a,t.length)}},At={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Oa={G:function(e,t,r){const n=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){const n=e.getFullYear(),a=n>0?n:1-n;return r.ordinalNumber(a,{unit:"year"})}return mt.y(e,t)},Y:function(e,t,r,n){const a=Da(e,n),i=a>0?a:1-a;if(t==="YY"){const l=i%100;return fe(l,2)}return t==="Yo"?r.ordinalNumber(i,{unit:"year"}):fe(i,t.length)},R:function(e,t){const r=_a(e);return fe(r,t.length)},u:function(e,t){const r=e.getFullYear();return fe(r,t.length)},Q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return fe(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){const n=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return fe(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){const n=e.getMonth();switch(t){case"M":case"MM":return mt.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){const n=e.getMonth();switch(t){case"L":return String(n+1);case"LL":return fe(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){const a=xm(e,n);return t==="wo"?r.ordinalNumber(a,{unit:"week"}):fe(a,t.length)},I:function(e,t,r){const n=km(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):fe(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getDate(),{unit:"date"}):mt.d(e,t)},D:function(e,t,r){const n=ym(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):fe(n,t.length)},E:function(e,t,r){const n=e.getDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){const a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return fe(i,2);case"eo":return r.ordinalNumber(i,{unit:"day"});case"eee":return r.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(a,{width:"short",context:"formatting"});case"eeee":default:return r.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){const a=e.getDay(),i=(a-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return fe(i,t.length);case"co":return r.ordinalNumber(i,{unit:"day"});case"ccc":return r.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(a,{width:"narrow",context:"standalone"});case"cccccc":return r.day(a,{width:"short",context:"standalone"});case"cccc":default:return r.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,r){const n=e.getDay(),a=n===0?7:n;switch(t){case"i":return String(a);case"ii":return fe(a,t.length);case"io":return r.ordinalNumber(a,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){const a=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(e,t,r){const n=e.getHours();let a;switch(n===12?a=At.noon:n===0?a=At.midnight:a=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,r){const n=e.getHours();let a;switch(n>=17?a=At.evening:n>=12?a=At.afternoon:n>=4?a=At.morning:a=At.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){let n=e.getHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return mt.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getHours(),{unit:"hour"}):mt.H(e,t)},K:function(e,t,r){const n=e.getHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):fe(n,t.length)},k:function(e,t,r){let n=e.getHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):fe(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getMinutes(),{unit:"minute"}):mt.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getSeconds(),{unit:"second"}):mt.s(e,t)},S:function(e,t){return mt.S(e,t)},X:function(e,t,r){const n=e.getTimezoneOffset();if(n===0)return"Z";switch(t){case"X":return $a(n);case"XXXX":case"XX":return St(n);case"XXXXX":case"XXX":default:return St(n,":")}},x:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"x":return $a(n);case"xxxx":case"xx":return St(n);case"xxxxx":case"xxx":default:return St(n,":")}},O:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Va(n,":");case"OOOO":default:return"GMT"+St(n,":")}},z:function(e,t,r){const n=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Va(n,":");case"zzzz":default:return"GMT"+St(n,":")}},t:function(e,t,r){const n=Math.trunc(+e/1e3);return fe(n,t.length)},T:function(e,t,r){return fe(+e,t.length)}};function Va(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=Math.trunc(n/60),i=n%60;return i===0?r+String(a):r+String(a)+t+fe(i,2)}function $a(e,t){return e%60===0?(e>0?"-":"+")+fe(Math.abs(e)/60,2):St(e,t)}function St(e,t=""){const r=e>0?"-":"+",n=Math.abs(e),a=fe(Math.trunc(n/60),2),i=fe(n%60,2);return r+a+t+i}const Fa=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Aa=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},vm={p:Aa,P:(e,t)=>{const r=e.match(/(P+)(p+)?/)||[],n=r[1],a=r[2];if(!a)return Fa(e,t);let i;switch(n){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;case"PPPP":default:i=t.dateTime({width:"full"});break}return i.replace("{{date}}",Fa(n,t)).replace("{{time}}",Aa(a,t))}},Cm=/^D+$/,Em=/^Y+$/,Sm=["D","DD","YY","YYYY"];function Bm(e){return Cm.test(e)}function Nm(e){return Em.test(e)}function _m(e,t,r){const n=Rm(e,t,r);if(console.warn(n),Sm.includes(e))throw new RangeError(n)}function Rm(e,t,r){const n=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Tm=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Dm=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Om=/^'([^]*?)'?$/,Vm=/''/g,$m=/[a-zA-Z]/;function Fm(e,t,r){var c,f,m,p;const n=Do(),a=n.locale??bm,i=n.firstWeekContainsDate??((f=(c=n.locale)==null?void 0:c.options)==null?void 0:f.firstWeekContainsDate)??1,l=n.weekStartsOn??((p=(m=n.locale)==null?void 0:m.options)==null?void 0:p.weekStartsOn)??0,d=qe(e,r==null?void 0:r.in);if(!Pf(d))throw new RangeError("Invalid time value");let u=t.match(Dm).map(g=>{const h=g[0];if(h==="p"||h==="P"){const b=vm[h];return b(g,a.formatLong)}return g}).join("").match(Tm).map(g=>{if(g==="''")return{isToken:!1,value:"'"};const h=g[0];if(h==="'")return{isToken:!1,value:Am(g)};if(Oa[h])return{isToken:!0,value:g};if(h.match($m))throw new RangeError("Format string contains an unescaped latin alphabet character `"+h+"`");return{isToken:!1,value:g}});a.localize.preprocessor&&(u=a.localize.preprocessor(d,u));const s={firstWeekContainsDate:i,weekStartsOn:l,locale:a};return u.map(g=>{if(!g.isToken)return g.value;const h=g.value;(Nm(h)||Bm(h))&&_m(h,t,String(e));const b=Oa[h[0]];return b(d,h,a.localize,s)}).join("")}function Am(e){const t=e.match(Om);return t?t[1].replace(Vm,"'"):e}var Vo={exports:{}};/*! @preserve
23
+ * numeral.js
24
+ * version : 2.0.6
25
+ * author : Adam Draper
26
+ * license : MIT
27
+ * http://adamwdraper.github.com/Numeral-js/
28
+ */var Im=Vo.exports,Ia;function Pm(){return Ia||(Ia=1,function(e){(function(t,r){e.exports?e.exports=r():t.numeral=r()})(Im,function(){var t,r,n="2.0.6",a={},i={},l={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},d={currentLocale:l.currentLocale,zeroFormat:l.zeroFormat,nullFormat:l.nullFormat,defaultFormat:l.defaultFormat,scalePercentBy100:l.scalePercentBy100};function u(s,c){this._input=s,this._value=c}return t=function(s){var c,f,m,p;if(t.isNumeral(s))c=s.value();else if(s===0||typeof s>"u")c=0;else if(s===null||r.isNaN(s))c=null;else if(typeof s=="string")if(d.zeroFormat&&s===d.zeroFormat)c=0;else if(d.nullFormat&&s===d.nullFormat||!s.replace(/[^0-9]+/g,"").length)c=null;else{for(f in a)if(p=typeof a[f].regexps.unformat=="function"?a[f].regexps.unformat():a[f].regexps.unformat,p&&s.match(p)){m=a[f].unformat;break}m=m||t._.stringToNumber,c=m(s)}else c=Number(s)||null;return new u(s,c)},t.version=n,t.isNumeral=function(s){return s instanceof u},t._=r={numberToFormat:function(s,c,f){var m=i[t.options.currentLocale],p=!1,g=!1,h=0,b="",k=1e12,C=1e9,S=1e6,L=1e3,R="",N=!1,w,y,E,V,_,D,P;if(s=s||0,y=Math.abs(s),t._.includes(c,"(")?(p=!0,c=c.replace(/[\(|\)]/g,"")):(t._.includes(c,"+")||t._.includes(c,"-"))&&(_=t._.includes(c,"+")?c.indexOf("+"):s<0?c.indexOf("-"):-1,c=c.replace(/[\+|\-]/g,"")),t._.includes(c,"a")&&(w=c.match(/a(k|m|b|t)?/),w=w?w[1]:!1,t._.includes(c," a")&&(b=" "),c=c.replace(new RegExp(b+"a[kmbt]?"),""),y>=k&&!w||w==="t"?(b+=m.abbreviations.trillion,s=s/k):y<k&&y>=C&&!w||w==="b"?(b+=m.abbreviations.billion,s=s/C):y<C&&y>=S&&!w||w==="m"?(b+=m.abbreviations.million,s=s/S):(y<S&&y>=L&&!w||w==="k")&&(b+=m.abbreviations.thousand,s=s/L)),t._.includes(c,"[.]")&&(g=!0,c=c.replace("[.]",".")),E=s.toString().split(".")[0],V=c.split(".")[1],D=c.indexOf(","),h=(c.split(".")[0].split(",")[0].match(/0/g)||[]).length,V?(t._.includes(V,"[")?(V=V.replace("]",""),V=V.split("["),R=t._.toFixed(s,V[0].length+V[1].length,f,V[1].length)):R=t._.toFixed(s,V.length,f),E=R.split(".")[0],t._.includes(R,".")?R=m.delimiters.decimal+R.split(".")[1]:R="",g&&Number(R.slice(1))===0&&(R="")):E=t._.toFixed(s,0,f),b&&!w&&Number(E)>=1e3&&b!==m.abbreviations.trillion)switch(E=String(Number(E)/1e3),b){case m.abbreviations.thousand:b=m.abbreviations.million;break;case m.abbreviations.million:b=m.abbreviations.billion;break;case m.abbreviations.billion:b=m.abbreviations.trillion;break}if(t._.includes(E,"-")&&(E=E.slice(1),N=!0),E.length<h)for(var T=h-E.length;T>0;T--)E="0"+E;return D>-1&&(E=E.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+m.delimiters.thousands)),c.indexOf(".")===0&&(E=""),P=E+R+(b||""),p?P=(p&&N?"(":"")+P+(p&&N?")":""):_>=0?P=_===0?(N?"-":"+")+P:P+(N?"-":"+"):N&&(P="-"+P),P},stringToNumber:function(s){var c=i[d.currentLocale],f=s,m={thousand:3,million:6,billion:9,trillion:12},p,g,h;if(d.zeroFormat&&s===d.zeroFormat)g=0;else if(d.nullFormat&&s===d.nullFormat||!s.replace(/[^0-9]+/g,"").length)g=null;else{g=1,c.delimiters.decimal!=="."&&(s=s.replace(/\./g,"").replace(c.delimiters.decimal,"."));for(p in m)if(h=new RegExp("[^a-zA-Z]"+c.abbreviations[p]+"(?:\\)|(\\"+c.currency.symbol+")?(?:\\))?)?$"),f.match(h)){g*=Math.pow(10,m[p]);break}g*=(s.split("-").length+Math.min(s.split("(").length-1,s.split(")").length-1))%2?1:-1,s=s.replace(/[^0-9\.]+/g,""),g*=Number(s)}return g},isNaN:function(s){return typeof s=="number"&&isNaN(s)},includes:function(s,c){return s.indexOf(c)!==-1},insert:function(s,c,f){return s.slice(0,f)+c+s.slice(f)},reduce:function(s,c){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof c!="function")throw new TypeError(c+" is not a function");var f=Object(s),m=f.length>>>0,p=0,g;if(arguments.length===3)g=arguments[2];else{for(;p<m&&!(p in f);)p++;if(p>=m)throw new TypeError("Reduce of empty array with no initial value");g=f[p++]}for(;p<m;p++)p in f&&(g=c(g,f[p],p,f));return g},multiplier:function(s){var c=s.toString().split(".");return c.length<2?1:Math.pow(10,c[1].length)},correctionFactor:function(){var s=Array.prototype.slice.call(arguments);return s.reduce(function(c,f){var m=r.multiplier(f);return c>m?c:m},1)},toFixed:function(s,c,f,m){var p=s.toString().split("."),g=c-(m||0),h,b,k,C;return p.length===2?h=Math.min(Math.max(p[1].length,g),c):h=g,k=Math.pow(10,h),C=(f(s+"e+"+h)/k).toFixed(h),m>c-h&&(b=new RegExp("\\.?0{1,"+(m-(c-h))+"}$"),C=C.replace(b,"")),C}},t.options=d,t.formats=a,t.locales=i,t.locale=function(s){return s&&(d.currentLocale=s.toLowerCase()),d.currentLocale},t.localeData=function(s){if(!s)return i[d.currentLocale];if(s=s.toLowerCase(),!i[s])throw new Error("Unknown locale : "+s);return i[s]},t.reset=function(){for(var s in l)d[s]=l[s]},t.zeroFormat=function(s){d.zeroFormat=typeof s=="string"?s:null},t.nullFormat=function(s){d.nullFormat=typeof s=="string"?s:null},t.defaultFormat=function(s){d.defaultFormat=typeof s=="string"?s:"0.0"},t.register=function(s,c,f){if(c=c.toLowerCase(),this[s+"s"][c])throw new TypeError(c+" "+s+" already registered.");return this[s+"s"][c]=f,f},t.validate=function(s,c){var f,m,p,g,h,b,k,C;if(typeof s!="string"&&(s+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",s)),s=s.trim(),s.match(/^\d+$/))return!0;if(s==="")return!1;try{k=t.localeData(c)}catch{k=t.localeData(t.locale())}return p=k.currency.symbol,h=k.abbreviations,f=k.delimiters.decimal,k.delimiters.thousands==="."?m="\\.":m=k.delimiters.thousands,C=s.match(/^[^\d]+/),C!==null&&(s=s.substr(1),C[0]!==p)||(C=s.match(/[^\d]+$/),C!==null&&(s=s.slice(0,-1),C[0]!==h.thousand&&C[0]!==h.million&&C[0]!==h.billion&&C[0]!==h.trillion))?!1:(b=new RegExp(m+"{2}"),s.match(/[^\d.,]/g)?!1:(g=s.split(f),g.length>2?!1:g.length<2?!!g[0].match(/^\d+.*\d$/)&&!g[0].match(b):g[0].length===1?!!g[0].match(/^\d+$/)&&!g[0].match(b)&&!!g[1].match(/^\d+$/):!!g[0].match(/^\d+.*\d$/)&&!g[0].match(b)&&!!g[1].match(/^\d+$/)))},t.fn=u.prototype={clone:function(){return t(this)},format:function(s,c){var f=this._value,m=s||d.defaultFormat,p,g,h;if(c=c||Math.round,f===0&&d.zeroFormat!==null)g=d.zeroFormat;else if(f===null&&d.nullFormat!==null)g=d.nullFormat;else{for(p in a)if(m.match(a[p].regexps.format)){h=a[p].format;break}h=h||t._.numberToFormat,g=h(f,m,c)}return g},value:function(){return this._value},input:function(){return this._input},set:function(s){return this._value=Number(s),this},add:function(s){var c=r.correctionFactor.call(null,this._value,s);function f(m,p,g,h){return m+Math.round(c*p)}return this._value=r.reduce([this._value,s],f,0)/c,this},subtract:function(s){var c=r.correctionFactor.call(null,this._value,s);function f(m,p,g,h){return m-Math.round(c*p)}return this._value=r.reduce([s],f,Math.round(this._value*c))/c,this},multiply:function(s){function c(f,m,p,g){var h=r.correctionFactor(f,m);return Math.round(f*h)*Math.round(m*h)/Math.round(h*h)}return this._value=r.reduce([this._value,s],c,1),this},divide:function(s){function c(f,m,p,g){var h=r.correctionFactor(f,m);return Math.round(f*h)/Math.round(m*h)}return this._value=r.reduce([this._value,s],c),this},difference:function(s){return Math.abs(t(this._value).subtract(s).value())}},t.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(s){var c=s%10;return~~(s%100/10)===1?"th":c===1?"st":c===2?"nd":c===3?"rd":"th"},currency:{symbol:"$"}}),function(){t.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(s,c,f){var m=t._.includes(c," BPS")?" ":"",p;return s=s*1e4,c=c.replace(/\s?BPS/,""),p=t._.numberToFormat(s,c,f),t._.includes(p,")")?(p=p.split(""),p.splice(-1,0,m+"BPS"),p=p.join("")):p=p+m+"BPS",p},unformat:function(s){return+(t._.stringToNumber(s)*1e-4).toFixed(15)}})}(),function(){var s={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},c={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},f=s.suffixes.concat(c.suffixes.filter(function(p){return s.suffixes.indexOf(p)<0})),m=f.join("|");m="("+m.replace("B","B(?!PS)")+")",t.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(m)},format:function(p,g,h){var b,k=t._.includes(g,"ib")?c:s,C=t._.includes(g," b")||t._.includes(g," ib")?" ":"",S,L,R;for(g=g.replace(/\s?i?b/,""),S=0;S<=k.suffixes.length;S++)if(L=Math.pow(k.base,S),R=Math.pow(k.base,S+1),p===null||p===0||p>=L&&p<R){C+=k.suffixes[S],L>0&&(p=p/L);break}return b=t._.numberToFormat(p,g,h),b+C},unformat:function(p){var g=t._.stringToNumber(p),h,b;if(g){for(h=s.suffixes.length-1;h>=0;h--){if(t._.includes(p,s.suffixes[h])){b=Math.pow(s.base,h);break}if(t._.includes(p,c.suffixes[h])){b=Math.pow(c.base,h);break}}g*=b||1}return g}})}(),function(){t.register("format","currency",{regexps:{format:/(\$)/},format:function(s,c,f){var m=t.locales[t.options.currentLocale],p={before:c.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:c.match(/([\+|\-|\)|\s|\$]*)$/)[0]},g,h,b;for(c=c.replace(/\s?\$\s?/,""),g=t._.numberToFormat(s,c,f),s>=0?(p.before=p.before.replace(/[\-\(]/,""),p.after=p.after.replace(/[\-\)]/,"")):s<0&&!t._.includes(p.before,"-")&&!t._.includes(p.before,"(")&&(p.before="-"+p.before),b=0;b<p.before.length;b++)switch(h=p.before[b],h){case"$":g=t._.insert(g,m.currency.symbol,b);break;case" ":g=t._.insert(g," ",b+m.currency.symbol.length-1);break}for(b=p.after.length-1;b>=0;b--)switch(h=p.after[b],h){case"$":g=b===p.after.length-1?g+m.currency.symbol:t._.insert(g,m.currency.symbol,-(p.after.length-(1+b)));break;case" ":g=b===p.after.length-1?g+" ":t._.insert(g," ",-(p.after.length-(1+b)+m.currency.symbol.length-1));break}return g}})}(),function(){t.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(s,c,f){var m,p=typeof s=="number"&&!t._.isNaN(s)?s.toExponential():"0e+0",g=p.split("e");return c=c.replace(/e[\+|\-]{1}0/,""),m=t._.numberToFormat(Number(g[0]),c,f),m+"e"+g[1]},unformat:function(s){var c=t._.includes(s,"e+")?s.split("e+"):s.split("e-"),f=Number(c[0]),m=Number(c[1]);m=t._.includes(s,"e-")?m*=-1:m;function p(g,h,b,k){var C=t._.correctionFactor(g,h),S=g*C*(h*C)/(C*C);return S}return t._.reduce([f,Math.pow(10,m)],p,1)}})}(),function(){t.register("format","ordinal",{regexps:{format:/(o)/},format:function(s,c,f){var m=t.locales[t.options.currentLocale],p,g=t._.includes(c," o")?" ":"";return c=c.replace(/\s?o/,""),g+=m.ordinal(s),p=t._.numberToFormat(s,c,f),p+g}})}(),function(){t.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(s,c,f){var m=t._.includes(c," %")?" ":"",p;return t.options.scalePercentBy100&&(s=s*100),c=c.replace(/\s?\%/,""),p=t._.numberToFormat(s,c,f),t._.includes(p,")")?(p=p.split(""),p.splice(-1,0,m+"%"),p=p.join("")):p=p+m+"%",p},unformat:function(s){var c=t._.stringToNumber(s);return t.options.scalePercentBy100?c*.01:c}})}(),function(){t.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(s,c,f){var m=Math.floor(s/60/60),p=Math.floor((s-m*60*60)/60),g=Math.round(s-m*60*60-p*60);return m+":"+(p<10?"0"+p:p)+":"+(g<10?"0"+g:g)},unformat:function(s){var c=s.split(":"),f=0;return c.length===3?(f=f+Number(c[0])*60*60,f=f+Number(c[1])*60,f=f+Number(c[2])):c.length===2&&(f=f+Number(c[0])*60,f=f+Number(c[1])),Number(f)}})}(),t})}(Vo)),Vo.exports}var Lm=Pm();const Pa=$n(Lm),La={__name:"FieldExpression",props:["value","type","displayFormat"],setup(e){const t=o.computed(()=>r()),r=()=>e.type==="DATE"?n():e.type==="NUMBER"?a():e.value,n=()=>Fm(e.value,e.displayFormat?e.displayFormat:"MM/dd/yyyy"),a=()=>e.displayFormat?e.displayFormat==="currency"?Pa(e.value).format("$0,0.00"):Pa(e.value).format(e.displayFormat):e.value;return(i,l)=>(o.openBlock(),o.createElementBlock("span",null,o.toDisplayString(t.value),1))}},Mm={class:"flex flex-col w-full"},jm={class:"w-1/4"},zm={class:"w-full mt-5"},Ma={__name:"EntityExplorer",props:{entityName:String},setup(e){const t=e,r=o.ref(t.entityName);o.watch(r,a=>{console.log("Entity changed to:",a)});const n=a=>{r.value=a};return(a,i)=>(o.openBlock(),o.createElementBlock("div",Mm,[o.createElementVNode("div",jm,[(o.openBlock(),o.createBlock(kr,{key:r.value,entityName:r.value,onEntityChangeCallback:n},null,8,["entityName"]))]),o.createElementVNode("div",zm,[(o.openBlock(),o.createBlock(gr,{key:r.value,entityName:r.value},null,8,["entityName"]))])]))}},Um=["onClick"],Wm=["onClick","href"],qm={class:"layout-menuitem-text text-xs font-medium leading-tight break-words"},Hm=["onClick"],Km=["href"],ja=Oe({__name:"Menu",props:{menuName:{type:String,required:!0},layoutType:{type:String,default:"vertical",validator:e=>["vertical","horizontal"].includes(e)}},setup(e){const t=it.useRouter(),r=e,n=o.ref([]),a=async()=>{try{const d={response:[{displayLabel:"Dashboard",icon:"pi pi-home",url:"/"},{displayLabel:"Entity List",icon:"pi pi-building",url:"/entity-list",children:[{displayLabel:"All Entities",url:"/entity-list/all"},{displayLabel:"Create Entity",url:"/entity-list/create"}],isOpen:!1},{displayLabel:"Entity Grid",icon:"pi pi-user",url:"/entity-grid"},{displayLabel:"Entity Tile",icon:"pi pi-building",url:"/entity-tile"},{displayLabel:"Entity Carousel",icon:"pi pi-building",url:"/entity-carousel"},{displayLabel:"Entity Form",icon:"pi pi-building",url:"/entity-form"},{displayLabel:"Entity 360",icon:"pi pi-bars",url:"/entity360"},{displayLabel:"Entity Explorer",icon:"pi pi-bars",url:"/entity-explorer"},{displayLabel:"Panels",icon:"pi pi-cog",url:"/panels"},{displayLabel:"Menu",icon:"pi pi-cog",url:"/menu",children:[{displayLabel:"Main Menu",url:"/menu/main"},{displayLabel:"Sub Menu",url:"/menu/sub"}],isOpen:!1},{displayLabel:"Components",icon:"pi pi-bars",url:"/components"}]};console.log("[Menu] Fetching menu data...",r.menuName),n.value=d.response||[],n.value.forEach(u=>{u.children&&u.children.length>0&&(u.isOpen=!1)}),console.log("[Menu] Loaded menu:",n.value)}catch(d){console.error("[Menu] Failed to load menu:",d)}};o.onMounted(()=>{a()});const i=d=>{n.value.forEach((u,s)=>{u.isOpen=s===d?!u.isOpen:!1})},l=d=>{const u=n.value[d];u.children&&u.children.length>0?i(d):u!=null&&u.url&&t.push(u.url)};return(d,u)=>(o.openBlock(),o.createElementBlock("div",{class:"card rounded-none p-0",style:o.normalizeStyle(e.layoutType==="horizontal"?"width: 100%;":"width: 12rem;")},[o.createElementVNode("ul",{class:o.normalizeClass(["layout-menu list-none",[e.layoutType==="horizontal"?"layout-menu-horizontal p-0 m-0 flex flex-row items-center gap-6":"layout-menu-vertical p-0 m-0 flex flex-col gap-2"]])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(n.value,(s,c)=>(o.openBlock(),o.createElementBlock("li",{key:s.id,class:o.normalizeClass(["layout-root-menuitem relative",{"is-open":s.isOpen}])},[d.$slots["list-item-menu-parent"]?(o.openBlock(),o.createElementBlock("a",{key:0,onClick:f=>l(c)},[o.renderSlot(d.$slots,"list-item-menu-parent",{item:s},void 0,!0)],8,Um)):(o.openBlock(),o.createElementBlock("a",{key:1,onClick:f=>l(c),href:s.children&&s.children.length>0?"#":s.url,class:"flex flex-col items-center text-center px-3 py-2 text-gray-700 hover:text-purple-700 cursor-pointer transition-colors duration-300"},[o.createElementVNode("i",{class:o.normalizeClass([s.icon+" text-2xl mb-1","layout-menuitem-icon"])},null,2),o.createElementVNode("span",qm,o.toDisplayString(s.displayLabel),1)],8,Wm)),s.isOpen?(o.openBlock(),o.createElementBlock("ul",{key:2,style:o.normalizeStyle([{width:"12rem"},[e.layoutType==="horizontal"?"left: 0; top: 49px;":"left: 9rem; top: 0;"]]),class:o.normalizeClass(["submenu rounded-xl bg-white list-none",[e.layoutType==="horizontal"?"submenu-horizontal absolute top-full left-0 mt-2 bg-white shadow-md rounded z-50":"submenu-vertical absolute left-[144px] ml-4 space-y-1"]])},[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.children,(f,m)=>(o.openBlock(),o.createElementBlock("li",{key:f.id},[d.$slots["list-item-menu-child"]?(o.openBlock(),o.createElementBlock("a",{key:0,onClick:p=>i(c)},[o.renderSlot(d.$slots,"list-item-menu-child",{item:f},void 0,!0)],8,Hm)):(o.openBlock(),o.createElementBlock("a",{key:1,href:f.url,class:"layout-submenu-item flex items-center gap-2 text-sm text-gray-700 hover:bg-gray-100 px-3 py-2 rounded transition"},[o.createElementVNode("i",{class:o.normalizeClass([f.icon?f.icon:"pi pi-bars","text-base"])},null,2),o.createElementVNode("span",null,o.toDisplayString(f.displayLabel),1)],8,Km))]))),128))],6)):o.createCommentVNode("",!0)],2))),128))],2)],4))}},[["__scopeId","data-v-918f9cb5"]]),Ym={class:"absolute left-3 top-[-10px] bg-[var(--bg-label-color)] px-1 text-xs text-gray-600 text"},Gm={class:"absolute left-3 top-1/2 transform -translate-y-1/2 text-[var(--span-color)]"},Xm=["placeholder"],Jm={key:0,style:{color:"var(--secondary-color)"},class:"absolute left-3 top-full mt-1 text-xs"},za={__name:"TextInput",props:o.mergeModels({label:{type:String,default:"Label"},placeholder:{type:String,default:"Enter value"},editable:{type:Boolean,default:!0},icon:{type:String,default:""},error:{type:Boolean,default:!1}},{inputValue:{},inputValueModifiers:{}}),emits:o.mergeModels(["update:error"],["update:inputValue"]),setup(e,{emit:t}){const r=t,n=e,a=o.useModel(e,"inputValue");return o.watch(a,i=>{i&&n.error&&r("update:error",!1)}),(i,l)=>(o.openBlock(),o.createElementBlock("div",o.mergeProps({class:"relative"},i.$attrs),[o.createElementVNode("label",Ym,o.toDisplayString(e.label),1),o.createElementVNode("span",Gm,[o.createElementVNode("i",{class:o.normalizeClass(e.icon),style:{"font-size":"1rem"}},null,2)]),o.withDirectives(o.createElementVNode("input",{class:"w-full h-[40px] pl-10 py-2 border border-[var(--border-color)] rounded-lg placeholder:text-xs focus:border-[var(--primary-fore-color)] focus:ring-0 focus:outline-none text","onUpdate:modelValue":l[0]||(l[0]=d=>a.value=d),placeholder:e.placeholder},null,8,Xm),[[o.vModelText,a.value]]),e.error===!0?(o.openBlock(),o.createElementBlock("small",Jm,[o.createElementVNode("pre",null,o.toDisplayString(e.label)+" is required",1)])):o.createCommentVNode("",!0)],16))}},Te=o.reactive({preset:"Aura",primary:"emerald",surface:null,darkTheme:!1,menuMode:"slim-plus",menuTheme:"light"}),Ee=o.reactive({staticMenuDesktopInactive:!1,overlayMenuActive:!1,configSidebarVisible:!1,staticMenuMobileActive:!1,menuHoverActive:!1,rightMenuActive:!1,topbarMenuActive:!1,sidebarActive:!1,anchored:!1,activeMenuItem:null,overlaySubmenuActive:!1});function Qm(){const e=p=>{if(Te.menuMode=p,p==="static"&&(Ee.staticMenuDesktopInactive=!1),p==="horizontal")if(Te.darkTheme){if(!document.startViewTransition){Te.menuTheme="dark";return}document.startViewTransition(()=>Te.menuTheme="dark")}else{if(!document.startViewTransition){Te.menuTheme="light";return}document.startViewTransition(()=>Te.menuTheme="light")}},t=p=>{Ee.activeMenuItem=p.value||p},r=()=>{Te.menuMode==="overlay"&&(Ee.overlayMenuActive=!Ee.overlayMenuActive),window.innerWidth>991?Ee.staticMenuDesktopInactive=!Ee.staticMenuDesktopInactive:Ee.staticMenuMobileActive=!Ee.staticMenuMobileActive},n=()=>{a.value&&(Ee.overlayMenuActive=!1,Ee.overlaySubmenuActive=!1,Ee.staticMenuMobileActive=!1,Ee.menuHoverActive=!1,Ee.configSidebarVisible=!1),Ee.configSidebarVisible=!Ee.configSidebarVisible},a=o.computed(()=>Ee.overlayMenuActive||Ee.staticMenuMobileActive||Ee.overlaySubmenuActive),i=o.computed(()=>window.innerWidth>991),l=o.computed(()=>Te.menuMode==="slim"),d=o.computed(()=>Te.menuMode==="slim-plus"),u=o.computed(()=>Te.menuMode==="horizontal"),s=o.computed(()=>Te.menuMode==="overlay"),c=o.computed(()=>Te.darkTheme),f=o.computed(()=>Te.primary),m=o.computed(()=>Te.surface);return{layoutConfig:Te,layoutState:Ee,getPrimary:f,getSurface:m,isDarkTheme:c,setMenuMode:e,toggleMenu:r,isSidebarActive:a,setActiveMenuItem:t,toggleConfigSidebar:n,isSlim:l,isSlimPlus:d,isHorizontal:u,isDesktop:i,isOverlay:s}}function Zm(){const e=new Map;return{on(t,r){let n=e.get(t);return n?n.push(r):n=[r],e.set(t,n),this},off(t,r){let n=e.get(t);return n&&n.splice(n.indexOf(r)>>>0,1),this},emit(t,r){let n=e.get(t);n&&n.slice().map(a=>{a(r)})},clear(){e.clear()}}}var ep=Object.defineProperty,tp=Object.defineProperties,op=Object.getOwnPropertyDescriptors,$o=Object.getOwnPropertySymbols,Ua=Object.prototype.hasOwnProperty,Wa=Object.prototype.propertyIsEnumerable,qa=(e,t,r)=>t in e?ep(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ge=(e,t)=>{for(var r in t||(t={}))Ua.call(t,r)&&qa(e,r,t[r]);if($o)for(var r of $o(t))Wa.call(t,r)&&qa(e,r,t[r]);return e},It=(e,t)=>tp(e,op(t)),at=(e,t)=>{var r={};for(var n in e)Ua.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&$o)for(var n of $o(e))t.indexOf(n)<0&&Wa.call(e,n)&&(r[n]=e[n]);return r},rp=Zm(),Bt=rp;function Ha(e,t){ea(e)?e.push(...t||[]):Ct(e)&&Object.assign(e,t)}function np(e){return Ct(e)&&e.hasOwnProperty("value")&&e.hasOwnProperty("type")?e.value:e}function ap(e){return e.replaceAll(/ /g,"").replace(/[^\w]/g,"-")}function xr(e="",t=""){return ap(`${$t(e,!1)&&$t(t,!1)?`${e}-`:e}${t}`)}function Ka(e="",t=""){return`--${xr(e,t)}`}function ip(e=""){const t=(e.match(/{/g)||[]).length,r=(e.match(/}/g)||[]).length;return(t+r)%2!==0}function Ya(e,t="",r="",n=[],a){if($t(e)){const i=/{([^}]*)}/g,l=e.trim();if(ip(l))return;if(rt(l,i)){const d=l.replaceAll(i,c=>{const m=c.replace(/{|}/g,"").split(".").filter(p=>!n.some(g=>rt(p,g)));return`var(${Ka(r,ra(m.join("-")))}${Ce(a)?`, ${a}`:""})`}),u=/(\d+\s+[\+\-\*\/]\s+\d+)/g,s=/var\([^)]+\)/g;return rt(d.replace(s,"0"),u)?`calc(${d})`:d}return l}else if(mc(e))return e}function lp(e,t,r){$t(t,!1)&&e.push(`${t}:${r};`)}function Pt(e,t){return e?`${e}{${t}}`:""}var Ga=(...e)=>sp(Qe.getTheme(),...e),sp=(e={},t,r,n)=>{if(t){const{variable:a,options:i}=Qe.defaults||{},{prefix:l,transform:d}=(e==null?void 0:e.options)||i||{},s=rt(t,/{([^}]*)}/g)?t:`{${t}}`;return n==="value"||mr(n)&&d==="strict"?Qe.getTokenValue(t):Ya(s,void 0,l,[a.excludedKeyRegex],r)}return""},Xa=(e={})=>{let{preset:t,options:r}=e;return{preset(n){return t=t?ta(t,n):n,this},options(n){return r=r?ge(ge({},r),n):n,this},primaryPalette(n){const{semantic:a}=t||{};return t=It(ge({},t),{semantic:It(ge({},a),{primary:n})}),this},surfacePalette(n){var a,i;const{semantic:l}=t||{},d=n!=null&&n.hasOwnProperty("light")?n==null?void 0:n.light:n,u=n!=null&&n.hasOwnProperty("dark")?n==null?void 0:n.dark:n,s={colorScheme:{light:ge(ge({},(a=l==null?void 0:l.colorScheme)==null?void 0:a.light),!!d&&{surface:d}),dark:ge(ge({},(i=l==null?void 0:l.colorScheme)==null?void 0:i.dark),!!u&&{surface:u})}};return t=It(ge({},t),{semantic:ge(ge({},l),s)}),this},define({useDefaultPreset:n=!1,useDefaultOptions:a=!1}={}){return{preset:n?Qe.getPreset():t,options:a?Qe.getOptions():r}},update({mergePresets:n=!0,mergeOptions:a=!0}={}){const i={preset:n?ta(Qe.getPreset(),t):t,options:a?ge(ge({},Qe.getOptions()),r):r};return Qe.setTheme(i),i},use(n){const a=this.define(n);return Qe.setTheme(a),a}}};function cp(e,t={}){const r=Qe.defaults.variable,{prefix:n=r.prefix,selector:a=r.selector,excludedKeyRegex:i=r.excludedKeyRegex}=t,l=(s,c="")=>Object.entries(s).reduce((f,[m,p])=>{const g=rt(m,i)?xr(c):xr(c,ra(m)),h=np(p);if(Ct(h)){const{variables:b,tokens:k}=l(h,g);Ha(f.tokens,k),Ha(f.variables,b)}else f.tokens.push((n?g.replace(`${n}-`,""):g).replaceAll("-",".")),lp(f.variables,Ka(g),Ya(h,g,n,[i]));return f},{variables:[],tokens:[]}),{variables:d,tokens:u}=l(e,n);return{value:d,tokens:u,declarations:d.join(""),css:Pt(a,d.join(""))}}var He={regex:{rules:{class:{pattern:/^\.([a-zA-Z][\w-]*)$/,resolve(e){return{type:"class",selector:e,matched:this.pattern.test(e.trim())}}},attr:{pattern:/^\[(.*)\]$/,resolve(e){return{type:"attr",selector:`:root${e}`,matched:this.pattern.test(e.trim())}}},media:{pattern:/^@media (.*)$/,resolve(e){return{type:"media",selector:`${e}{:root{[CSS]}}`,matched:this.pattern.test(e.trim())}}},system:{pattern:/^system$/,resolve(e){return{type:"system",selector:"@media (prefers-color-scheme: dark){:root{[CSS]}}",matched:this.pattern.test(e.trim())}}},custom:{resolve(e){return{type:"custom",selector:e,matched:!0}}}},resolve(e){const t=Object.keys(this.rules).filter(r=>r!=="custom").map(r=>this.rules[r]);return[e].flat().map(r=>{var n;return(n=t.map(a=>a.resolve(r)).find(a=>a.matched))!=null?n:this.rules.custom.resolve(r)})}},_toVariables(e,t){return cp(e,{prefix:t==null?void 0:t.prefix})},getCommon({name:e="",theme:t={},params:r,set:n,defaults:a}){var i,l,d,u,s,c,f;const{preset:m,options:p}=t;let g,h,b,k,C,S,L;if(Ce(m)&&p.transform!=="strict"){const{primitive:R,semantic:N,extend:w}=m,y=N||{},{colorScheme:E}=y,V=at(y,["colorScheme"]),_=w||{},{colorScheme:D}=_,P=at(_,["colorScheme"]),T=E||{},{dark:j}=T,I=at(T,["dark"]),Y=D||{},{dark:M}=Y,$=at(Y,["dark"]),z=Ce(R)?this._toVariables({primitive:R},p):{},te=Ce(V)?this._toVariables({semantic:V},p):{},ne=Ce(I)?this._toVariables({light:I},p):{},ae=Ce(j)?this._toVariables({dark:j},p):{},G=Ce(P)?this._toVariables({semantic:P},p):{},J=Ce($)?this._toVariables({light:$},p):{},ie=Ce(M)?this._toVariables({dark:M},p):{},[le,he]=[(i=z.declarations)!=null?i:"",z.tokens],[Pe,Re]=[(l=te.declarations)!=null?l:"",te.tokens||[]],[Ke,Me]=[(d=ne.declarations)!=null?d:"",ne.tokens||[]],[W,A]=[(u=ae.declarations)!=null?u:"",ae.tokens||[]],[se,de]=[(s=G.declarations)!=null?s:"",G.tokens||[]],[ce,ue]=[(c=J.declarations)!=null?c:"",J.tokens||[]],[ye,Fe]=[(f=ie.declarations)!=null?f:"",ie.tokens||[]];g=this.transformCSS(e,le,"light","variable",p,n,a),h=he;const Ze=this.transformCSS(e,`${Pe}${Ke}`,"light","variable",p,n,a),Se=this.transformCSS(e,`${W}`,"dark","variable",p,n,a);b=`${Ze}${Se}`,k=[...new Set([...Re,...Me,...A])];const Ae=this.transformCSS(e,`${se}${ce}color-scheme:light`,"light","variable",p,n,a),je=this.transformCSS(e,`${ye}color-scheme:dark`,"dark","variable",p,n,a);C=`${Ae}${je}`,S=[...new Set([...de,...ue,...Fe])],L=No(m.css,{dt:Ga})}return{primitive:{css:g,tokens:h},semantic:{css:b,tokens:k},global:{css:C,tokens:S},style:L}},getPreset({name:e="",preset:t={},options:r,params:n,set:a,defaults:i,selector:l}){var d,u,s;let c,f,m;if(Ce(t)&&r.transform!=="strict"){const p=e.replace("-directive",""),g=t,{colorScheme:h,extend:b,css:k}=g,C=at(g,["colorScheme","extend","css"]),S=b||{},{colorScheme:L}=S,R=at(S,["colorScheme"]),N=h||{},{dark:w}=N,y=at(N,["dark"]),E=L||{},{dark:V}=E,_=at(E,["dark"]),D=Ce(C)?this._toVariables({[p]:ge(ge({},C),R)},r):{},P=Ce(y)?this._toVariables({[p]:ge(ge({},y),_)},r):{},T=Ce(w)?this._toVariables({[p]:ge(ge({},w),V)},r):{},[j,I]=[(d=D.declarations)!=null?d:"",D.tokens||[]],[Y,M]=[(u=P.declarations)!=null?u:"",P.tokens||[]],[$,z]=[(s=T.declarations)!=null?s:"",T.tokens||[]],te=this.transformCSS(p,`${j}${Y}`,"light","variable",r,a,i,l),ne=this.transformCSS(p,$,"dark","variable",r,a,i,l);c=`${te}${ne}`,f=[...new Set([...I,...M,...z])],m=No(k,{dt:Ga})}return{css:c,tokens:f,style:m}},getPresetC({name:e="",theme:t={},params:r,set:n,defaults:a}){var i;const{preset:l,options:d}=t,u=(i=l==null?void 0:l.components)==null?void 0:i[e];return this.getPreset({name:e,preset:u,options:d,params:r,set:n,defaults:a})},getPresetD({name:e="",theme:t={},params:r,set:n,defaults:a}){var i;const l=e.replace("-directive",""),{preset:d,options:u}=t,s=(i=d==null?void 0:d.directives)==null?void 0:i[l];return this.getPreset({name:l,preset:s,options:u,params:r,set:n,defaults:a})},applyDarkColorScheme(e){return!(e.darkModeSelector==="none"||e.darkModeSelector===!1)},getColorSchemeOption(e,t){var r;return this.applyDarkColorScheme(e)?this.regex.resolve(e.darkModeSelector===!0?t.options.darkModeSelector:(r=e.darkModeSelector)!=null?r:t.options.darkModeSelector):[]},getLayerOrder(e,t={},r,n){const{cssLayer:a}=t;return a?`@layer ${No(a.order||"primeui",r)}`:""},getCommonStyleSheet({name:e="",theme:t={},params:r,props:n={},set:a,defaults:i}){const l=this.getCommon({name:e,theme:t,params:r,set:a,defaults:i}),d=Object.entries(n).reduce((u,[s,c])=>u.push(`${s}="${c}"`)&&u,[]).join(" ");return Object.entries(l||{}).reduce((u,[s,c])=>{if(c!=null&&c.css){const f=oa(c==null?void 0:c.css),m=`${s}-variables`;u.push(`<style type="text/css" data-primevue-style-id="${m}" ${d}>${f}</style>`)}return u},[]).join("")},getStyleSheet({name:e="",theme:t={},params:r,props:n={},set:a,defaults:i}){var l;const d={name:e,theme:t,params:r,set:a,defaults:i},u=(l=e.includes("-directive")?this.getPresetD(d):this.getPresetC(d))==null?void 0:l.css,s=Object.entries(n).reduce((c,[f,m])=>c.push(`${f}="${m}"`)&&c,[]).join(" ");return u?`<style type="text/css" data-primevue-style-id="${e}-variables" ${s}>${oa(u)}</style>`:""},createTokens(e={},t,r="",n="",a={}){return Object.entries(e).forEach(([i,l])=>{const d=rt(i,t.variable.excludedKeyRegex)?r:r?`${r}.${na(i)}`:na(i),u=n?`${n}.${i}`:i;Ct(l)?this.createTokens(l,t,d,u,a):(a[d]||(a[d]={paths:[],computed(s,c={}){var f,m;return this.paths.length===1?(f=this.paths[0])==null?void 0:f.computed(this.paths[0].scheme,c.binding):s&&s!=="none"?(m=this.paths.find(p=>p.scheme===s))==null?void 0:m.computed(s,c.binding):this.paths.map(p=>p.computed(p.scheme,c[p.scheme]))}}),a[d].paths.push({path:u,value:l,scheme:u.includes("colorScheme.light")?"light":u.includes("colorScheme.dark")?"dark":"none",computed(s,c={}){const f=/{([^}]*)}/g;let m=l;if(c.name=this.path,c.binding||(c.binding={}),rt(l,f)){const g=l.trim().replaceAll(f,k=>{var C;const S=k.replace(/{|}/g,""),L=(C=a[S])==null?void 0:C.computed(s,c);return ea(L)&&L.length===2?`light-dark(${L[0].value},${L[1].value})`:L==null?void 0:L.value}),h=/(\d+\w*\s+[\+\-\*\/]\s+\d+\w*)/g,b=/var\([^)]+\)/g;m=rt(g.replace(b,"0"),h)?`calc(${g})`:g}return mr(c.binding)&&delete c.binding,{colorScheme:s,path:this.path,paths:c,value:m.includes("undefined")?void 0:m}}}))}),a},getTokenValue(e,t,r){var n;const i=(u=>u.split(".").filter(c=>!rt(c.toLowerCase(),r.variable.excludedKeyRegex)).join("."))(t),l=t.includes("colorScheme.light")?"light":t.includes("colorScheme.dark")?"dark":void 0,d=[(n=e[i])==null?void 0:n.computed(l)].flat().filter(u=>u);return d.length===1?d[0].value:d.reduce((u={},s)=>{const c=s,{colorScheme:f}=c,m=at(c,["colorScheme"]);return u[f]=m,u},void 0)},getSelectorRule(e,t,r,n){return r==="class"||r==="attr"?Pt(Ce(t)?`${e}${t},${e} ${t}`:e,n):Pt(e,Ce(t)?Pt(t,n):n)},transformCSS(e,t,r,n,a={},i,l,d){if(Ce(t)){const{cssLayer:u}=a;if(n!=="style"){const s=this.getColorSchemeOption(a,l);t=r==="dark"?s.reduce((c,{type:f,selector:m})=>(Ce(m)&&(c+=m.includes("[CSS]")?m.replace("[CSS]",t):this.getSelectorRule(m,d,f,t)),c),""):Pt(d??":root",t)}if(u){const s={name:"primeui",order:"primeui"};Ct(u)&&(s.name=No(u.name,{name:e,type:n})),Ce(s.name)&&(t=Pt(`@layer ${s.name}`,t),i==null||i.layerNames(s.name))}return t}return""}},Qe={defaults:{variable:{prefix:"p",selector:":root",excludedKeyRegex:/^(primitive|semantic|components|directives|variables|colorscheme|light|dark|common|root|states|extend|css)$/gi},options:{prefix:"p",darkModeSelector:"system",cssLayer:!1}},_theme:void 0,_layerNames:new Set,_loadedStyleNames:new Set,_loadingStyles:new Set,_tokens:{},update(e={}){const{theme:t}=e;t&&(this._theme=It(ge({},t),{options:ge(ge({},this.defaults.options),t.options)}),this._tokens=He.createTokens(this.preset,this.defaults),this.clearLoadedStyleNames())},get theme(){return this._theme},get preset(){var e;return((e=this.theme)==null?void 0:e.preset)||{}},get options(){var e;return((e=this.theme)==null?void 0:e.options)||{}},get tokens(){return this._tokens},getTheme(){return this.theme},setTheme(e){this.update({theme:e}),Bt.emit("theme:change",e)},getPreset(){return this.preset},setPreset(e){this._theme=It(ge({},this.theme),{preset:e}),this._tokens=He.createTokens(e,this.defaults),this.clearLoadedStyleNames(),Bt.emit("preset:change",e),Bt.emit("theme:change",this.theme)},getOptions(){return this.options},setOptions(e){this._theme=It(ge({},this.theme),{options:e}),this.clearLoadedStyleNames(),Bt.emit("options:change",e),Bt.emit("theme:change",this.theme)},getLayerNames(){return[...this._layerNames]},setLayerNames(e){this._layerNames.add(e)},getLoadedStyleNames(){return this._loadedStyleNames},isStyleNameLoaded(e){return this._loadedStyleNames.has(e)},setLoadedStyleName(e){this._loadedStyleNames.add(e)},deleteLoadedStyleName(e){this._loadedStyleNames.delete(e)},clearLoadedStyleNames(){this._loadedStyleNames.clear()},getTokenValue(e){return He.getTokenValue(this.tokens,e,this.defaults)},getCommon(e="",t){return He.getCommon({name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getComponent(e="",t){const r={name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return He.getPresetC(r)},getDirective(e="",t){const r={name:e,theme:this.theme,params:t,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return He.getPresetD(r)},getCustomPreset(e="",t,r,n){const a={name:e,preset:t,options:this.options,selector:r,params:n,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}};return He.getPreset(a)},getLayerOrderCSS(e=""){return He.getLayerOrder(e,this.options,{names:this.getLayerNames()},this.defaults)},transformCSS(e="",t,r="style",n){return He.transformCSS(e,t,n,r,this.options,{layerNames:this.setLayerNames.bind(this)},this.defaults)},getCommonStyleSheet(e="",t,r={}){return He.getCommonStyleSheet({name:e,theme:this.theme,params:t,props:r,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},getStyleSheet(e,t,r={}){return He.getStyleSheet({name:e,theme:this.theme,params:t,props:r,defaults:this.defaults,set:{layerNames:this.setLayerNames.bind(this)}})},onStyleMounted(e){this._loadingStyles.add(e)},onStyleUpdated(e){this._loadingStyles.add(e)},onStyleLoaded(e,{name:t}){this._loadingStyles.size&&(this._loadingStyles.delete(t),Bt.emit(`theme:${t}:load`,e),!this._loadingStyles.size&&Bt.emit("theme:load"))}};function dp(e){return Xa().surfacePalette(e).update().preset}var up={root:{transitionDuration:"{transition.duration}"},panel:{borderWidth:"0 0 1px 0",borderColor:"{content.border.color}"},header:{color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{text.color}",padding:"1.125rem",fontWeight:"600",borderRadius:"0",borderWidth:"0",borderColor:"{content.border.color}",background:"{content.background}",hoverBackground:"{content.background}",activeBackground:"{content.background}",activeHoverBackground:"{content.background}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"},toggleIcon:{color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{text.color}",activeHoverColor:"{text.color}"},first:{topBorderRadius:"{content.border.radius}",borderWidth:"0"},last:{bottomBorderRadius:"{content.border.radius}",activeBottomBorderRadius:"0"}},content:{borderWidth:"0",borderColor:"{content.border.color}",background:"{content.background}",color:"{text.color}",padding:"0 1.125rem 1.125rem 1.125rem"}},fp={root:{background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}"},overlay:{background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},list:{padding:"{list.padding}",gap:"{list.gap}"},option:{focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}"},optionGroup:{background:"{list.option.group.background}",color:"{list.option.group.color}",fontWeight:"{list.option.group.font.weight}",padding:"{list.option.group.padding}"},dropdown:{width:"2.5rem",sm:{width:"2rem"},lg:{width:"3rem"},borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.border.color}",activeBorderColor:"{form.field.border.color}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},chip:{borderRadius:"{border.radius.sm}"},emptyMessage:{padding:"{list.option.padding}"},colorScheme:{light:{chip:{focusBackground:"{surface.200}",focusColor:"{surface.800}"},dropdown:{background:"{surface.100}",hoverBackground:"{surface.200}",activeBackground:"{surface.300}",color:"{surface.600}",hoverColor:"{surface.700}",activeColor:"{surface.800}"}},dark:{chip:{focusBackground:"{surface.700}",focusColor:"{surface.0}"},dropdown:{background:"{surface.800}",hoverBackground:"{surface.700}",activeBackground:"{surface.600}",color:"{surface.300}",hoverColor:"{surface.200}",activeColor:"{surface.100}"}}}},mp={root:{width:"2rem",height:"2rem",fontSize:"1rem",background:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}"},icon:{size:"1rem"},group:{borderColor:"{content.background}",offset:"-0.75rem"},lg:{width:"3rem",height:"3rem",fontSize:"1.5rem",icon:{size:"1.5rem"},group:{offset:"-1rem"}},xl:{width:"4rem",height:"4rem",fontSize:"2rem",icon:{size:"2rem"},group:{offset:"-1.5rem"}}},pp={root:{borderRadius:"{border.radius.md}",padding:"0 0.5rem",fontSize:"0.75rem",fontWeight:"700",minWidth:"1.5rem",height:"1.5rem"},dot:{size:"0.5rem"},sm:{fontSize:"0.625rem",minWidth:"1.25rem",height:"1.25rem"},lg:{fontSize:"0.875rem",minWidth:"1.75rem",height:"1.75rem"},xl:{fontSize:"1rem",minWidth:"2rem",height:"2rem"},colorScheme:{light:{primary:{background:"{primary.color}",color:"{primary.contrast.color}"},secondary:{background:"{surface.100}",color:"{surface.600}"},success:{background:"{green.500}",color:"{surface.0}"},info:{background:"{sky.500}",color:"{surface.0}"},warn:{background:"{orange.500}",color:"{surface.0}"},danger:{background:"{red.500}",color:"{surface.0}"},contrast:{background:"{surface.950}",color:"{surface.0}"}},dark:{primary:{background:"{primary.color}",color:"{primary.contrast.color}"},secondary:{background:"{surface.800}",color:"{surface.300}"},success:{background:"{green.400}",color:"{green.950}"},info:{background:"{sky.400}",color:"{sky.950}"},warn:{background:"{orange.400}",color:"{orange.950}"},danger:{background:"{red.400}",color:"{red.950}"},contrast:{background:"{surface.0}",color:"{surface.950}"}}}},gp={primitive:{borderRadius:{none:"0",xs:"2px",sm:"4px",md:"6px",lg:"8px",xl:"12px"},emerald:{50:"#ecfdf5",100:"#d1fae5",200:"#a7f3d0",300:"#6ee7b7",400:"#34d399",500:"#10b981",600:"#059669",700:"#047857",800:"#065f46",900:"#064e3b",950:"#022c22"},green:{50:"#f0fdf4",100:"#dcfce7",200:"#bbf7d0",300:"#86efac",400:"#4ade80",500:"#22c55e",600:"#16a34a",700:"#15803d",800:"#166534",900:"#14532d",950:"#052e16"},lime:{50:"#f7fee7",100:"#ecfccb",200:"#d9f99d",300:"#bef264",400:"#a3e635",500:"#84cc16",600:"#65a30d",700:"#4d7c0f",800:"#3f6212",900:"#365314",950:"#1a2e05"},red:{50:"#fef2f2",100:"#fee2e2",200:"#fecaca",300:"#fca5a5",400:"#f87171",500:"#ef4444",600:"#dc2626",700:"#b91c1c",800:"#991b1b",900:"#7f1d1d",950:"#450a0a"},orange:{50:"#fff7ed",100:"#ffedd5",200:"#fed7aa",300:"#fdba74",400:"#fb923c",500:"#f97316",600:"#ea580c",700:"#c2410c",800:"#9a3412",900:"#7c2d12",950:"#431407"},amber:{50:"#fffbeb",100:"#fef3c7",200:"#fde68a",300:"#fcd34d",400:"#fbbf24",500:"#f59e0b",600:"#d97706",700:"#b45309",800:"#92400e",900:"#78350f",950:"#451a03"},yellow:{50:"#fefce8",100:"#fef9c3",200:"#fef08a",300:"#fde047",400:"#facc15",500:"#eab308",600:"#ca8a04",700:"#a16207",800:"#854d0e",900:"#713f12",950:"#422006"},teal:{50:"#f0fdfa",100:"#ccfbf1",200:"#99f6e4",300:"#5eead4",400:"#2dd4bf",500:"#14b8a6",600:"#0d9488",700:"#0f766e",800:"#115e59",900:"#134e4a",950:"#042f2e"},cyan:{50:"#ecfeff",100:"#cffafe",200:"#a5f3fc",300:"#67e8f9",400:"#22d3ee",500:"#06b6d4",600:"#0891b2",700:"#0e7490",800:"#155e75",900:"#164e63",950:"#083344"},sky:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},blue:{50:"#eff6ff",100:"#dbeafe",200:"#bfdbfe",300:"#93c5fd",400:"#60a5fa",500:"#3b82f6",600:"#2563eb",700:"#1d4ed8",800:"#1e40af",900:"#1e3a8a",950:"#172554"},indigo:{50:"#eef2ff",100:"#e0e7ff",200:"#c7d2fe",300:"#a5b4fc",400:"#818cf8",500:"#6366f1",600:"#4f46e5",700:"#4338ca",800:"#3730a3",900:"#312e81",950:"#1e1b4b"},violet:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},purple:{50:"#faf5ff",100:"#f3e8ff",200:"#e9d5ff",300:"#d8b4fe",400:"#c084fc",500:"#a855f7",600:"#9333ea",700:"#7e22ce",800:"#6b21a8",900:"#581c87",950:"#3b0764"},fuchsia:{50:"#fdf4ff",100:"#fae8ff",200:"#f5d0fe",300:"#f0abfc",400:"#e879f9",500:"#d946ef",600:"#c026d3",700:"#a21caf",800:"#86198f",900:"#701a75",950:"#4a044e"},pink:{50:"#fdf2f8",100:"#fce7f3",200:"#fbcfe8",300:"#f9a8d4",400:"#f472b6",500:"#ec4899",600:"#db2777",700:"#be185d",800:"#9d174d",900:"#831843",950:"#500724"},rose:{50:"#fff1f2",100:"#ffe4e6",200:"#fecdd3",300:"#fda4af",400:"#fb7185",500:"#f43f5e",600:"#e11d48",700:"#be123c",800:"#9f1239",900:"#881337",950:"#4c0519"},slate:{50:"#f8fafc",100:"#f1f5f9",200:"#e2e8f0",300:"#cbd5e1",400:"#94a3b8",500:"#64748b",600:"#475569",700:"#334155",800:"#1e293b",900:"#0f172a",950:"#020617"},gray:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#1f2937",900:"#111827",950:"#030712"},zinc:{50:"#fafafa",100:"#f4f4f5",200:"#e4e4e7",300:"#d4d4d8",400:"#a1a1aa",500:"#71717a",600:"#52525b",700:"#3f3f46",800:"#27272a",900:"#18181b",950:"#09090b"},neutral:{50:"#fafafa",100:"#f5f5f5",200:"#e5e5e5",300:"#d4d4d4",400:"#a3a3a3",500:"#737373",600:"#525252",700:"#404040",800:"#262626",900:"#171717",950:"#0a0a0a"},stone:{50:"#fafaf9",100:"#f5f5f4",200:"#e7e5e4",300:"#d6d3d1",400:"#a8a29e",500:"#78716c",600:"#57534e",700:"#44403c",800:"#292524",900:"#1c1917",950:"#0c0a09"}},semantic:{transitionDuration:"0.2s",focusRing:{width:"1px",style:"solid",color:"{primary.color}",offset:"2px",shadow:"none"},disabledOpacity:"0.6",iconSize:"1rem",anchorGutter:"2px",primary:{50:"{emerald.50}",100:"{emerald.100}",200:"{emerald.200}",300:"{emerald.300}",400:"{emerald.400}",500:"{emerald.500}",600:"{emerald.600}",700:"{emerald.700}",800:"{emerald.800}",900:"{emerald.900}",950:"{emerald.950}"},formField:{paddingX:"0.75rem",paddingY:"0.5rem",sm:{fontSize:"0.875rem",paddingX:"0.625rem",paddingY:"0.375rem"},lg:{fontSize:"1.125rem",paddingX:"0.875rem",paddingY:"0.625rem"},borderRadius:"{border.radius.md}",focusRing:{width:"0",style:"none",color:"transparent",offset:"0",shadow:"none"},transitionDuration:"{transition.duration}"},list:{padding:"0.25rem 0.25rem",gap:"2px",header:{padding:"0.5rem 1rem 0.25rem 1rem"},option:{padding:"0.5rem 0.75rem",borderRadius:"{border.radius.sm}"},optionGroup:{padding:"0.5rem 0.75rem",fontWeight:"600"}},content:{borderRadius:"{border.radius.md}"},mask:{transitionDuration:"0.15s"},navigation:{list:{padding:"0.25rem 0.25rem",gap:"2px"},item:{padding:"0.5rem 0.75rem",borderRadius:"{border.radius.sm}",gap:"0.5rem"},submenuLabel:{padding:"0.5rem 0.75rem",fontWeight:"600"},submenuIcon:{size:"0.875rem"}},overlay:{select:{borderRadius:"{border.radius.md}",shadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)"},popover:{borderRadius:"{border.radius.md}",padding:"0.75rem",shadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)"},modal:{borderRadius:"{border.radius.xl}",padding:"1.25rem",shadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)"},navigation:{shadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1)"}},colorScheme:{light:{surface:{0:"#ffffff",50:"{slate.50}",100:"{slate.100}",200:"{slate.200}",300:"{slate.300}",400:"{slate.400}",500:"{slate.500}",600:"{slate.600}",700:"{slate.700}",800:"{slate.800}",900:"{slate.900}",950:"{slate.950}"},primary:{color:"{primary.500}",contrastColor:"#ffffff",hoverColor:"{primary.600}",activeColor:"{primary.700}"},highlight:{background:"{primary.50}",focusBackground:"{primary.100}",color:"{primary.700}",focusColor:"{primary.800}"},mask:{background:"rgba(0,0,0,0.4)",color:"{surface.200}"},formField:{background:"{surface.0}",disabledBackground:"{surface.200}",filledBackground:"{surface.50}",filledHoverBackground:"{surface.50}",filledFocusBackground:"{surface.50}",borderColor:"{surface.300}",hoverBorderColor:"{surface.400}",focusBorderColor:"{primary.color}",invalidBorderColor:"{red.400}",color:"{surface.700}",disabledColor:"{surface.500}",placeholderColor:"{surface.500}",invalidPlaceholderColor:"{red.600}",floatLabelColor:"{surface.500}",floatLabelFocusColor:"{primary.600}",floatLabelActiveColor:"{surface.500}",floatLabelInvalidColor:"{form.field.invalid.placeholder.color}",iconColor:"{surface.400}",shadow:"0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)"},text:{color:"{surface.700}",hoverColor:"{surface.800}",mutedColor:"{surface.500}",hoverMutedColor:"{surface.600}"},content:{background:"{surface.0}",hoverBackground:"{surface.100}",borderColor:"{surface.200}",color:"{text.color}",hoverColor:"{text.hover.color}"},overlay:{select:{background:"{surface.0}",borderColor:"{surface.200}",color:"{text.color}"},popover:{background:"{surface.0}",borderColor:"{surface.200}",color:"{text.color}"},modal:{background:"{surface.0}",borderColor:"{surface.200}",color:"{text.color}"}},list:{option:{focusBackground:"{surface.100}",selectedBackground:"{highlight.background}",selectedFocusBackground:"{highlight.focus.background}",color:"{text.color}",focusColor:"{text.hover.color}",selectedColor:"{highlight.color}",selectedFocusColor:"{highlight.focus.color}",icon:{color:"{surface.400}",focusColor:"{surface.500}"}},optionGroup:{background:"transparent",color:"{text.muted.color}"}},navigation:{item:{focusBackground:"{surface.100}",activeBackground:"{surface.100}",color:"{text.color}",focusColor:"{text.hover.color}",activeColor:"{text.hover.color}",icon:{color:"{surface.400}",focusColor:"{surface.500}",activeColor:"{surface.500}"}},submenuLabel:{background:"transparent",color:"{text.muted.color}"},submenuIcon:{color:"{surface.400}",focusColor:"{surface.500}",activeColor:"{surface.500}"}}},dark:{surface:{0:"#ffffff",50:"{zinc.50}",100:"{zinc.100}",200:"{zinc.200}",300:"{zinc.300}",400:"{zinc.400}",500:"{zinc.500}",600:"{zinc.600}",700:"{zinc.700}",800:"{zinc.800}",900:"{zinc.900}",950:"{zinc.950}"},primary:{color:"{primary.400}",contrastColor:"{surface.900}",hoverColor:"{primary.300}",activeColor:"{primary.200}"},highlight:{background:"color-mix(in srgb, {primary.400}, transparent 84%)",focusBackground:"color-mix(in srgb, {primary.400}, transparent 76%)",color:"rgba(255,255,255,.87)",focusColor:"rgba(255,255,255,.87)"},mask:{background:"rgba(0,0,0,0.6)",color:"{surface.200}"},formField:{background:"{surface.950}",disabledBackground:"{surface.700}",filledBackground:"{surface.800}",filledHoverBackground:"{surface.800}",filledFocusBackground:"{surface.800}",borderColor:"{surface.600}",hoverBorderColor:"{surface.500}",focusBorderColor:"{primary.color}",invalidBorderColor:"{red.300}",color:"{surface.0}",disabledColor:"{surface.400}",placeholderColor:"{surface.400}",invalidPlaceholderColor:"{red.400}",floatLabelColor:"{surface.400}",floatLabelFocusColor:"{primary.color}",floatLabelActiveColor:"{surface.400}",floatLabelInvalidColor:"{form.field.invalid.placeholder.color}",iconColor:"{surface.400}",shadow:"0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05)"},text:{color:"{surface.0}",hoverColor:"{surface.0}",mutedColor:"{surface.400}",hoverMutedColor:"{surface.300}"},content:{background:"{surface.900}",hoverBackground:"{surface.800}",borderColor:"{surface.700}",color:"{text.color}",hoverColor:"{text.hover.color}"},overlay:{select:{background:"{surface.900}",borderColor:"{surface.700}",color:"{text.color}"},popover:{background:"{surface.900}",borderColor:"{surface.700}",color:"{text.color}"},modal:{background:"{surface.900}",borderColor:"{surface.700}",color:"{text.color}"}},list:{option:{focusBackground:"{surface.800}",selectedBackground:"{highlight.background}",selectedFocusBackground:"{highlight.focus.background}",color:"{text.color}",focusColor:"{text.hover.color}",selectedColor:"{highlight.color}",selectedFocusColor:"{highlight.focus.color}",icon:{color:"{surface.500}",focusColor:"{surface.400}"}},optionGroup:{background:"transparent",color:"{text.muted.color}"}},navigation:{item:{focusBackground:"{surface.800}",activeBackground:"{surface.800}",color:"{text.color}",focusColor:"{text.hover.color}",activeColor:"{text.hover.color}",icon:{color:"{surface.500}",focusColor:"{surface.400}",activeColor:"{surface.400}"}},submenuLabel:{background:"transparent",color:"{text.muted.color}"},submenuIcon:{color:"{surface.500}",focusColor:"{surface.400}",activeColor:"{surface.400}"}}}}}},hp={root:{borderRadius:"{content.border.radius}"}},bp={root:{padding:"1rem",background:"{content.background}",gap:"0.5rem",transitionDuration:"{transition.duration}"},item:{color:"{text.muted.color}",hoverColor:"{text.color}",borderRadius:"{content.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",hoverColor:"{navigation.item.icon.focus.color}"},focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},separator:{color:"{navigation.item.icon.color}"}},yp={root:{borderRadius:"{form.field.border.radius}",roundedBorderRadius:"2rem",gap:"0.5rem",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",iconOnlyWidth:"2.5rem",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"},label:{fontWeight:"500"},raisedShadow:"0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",offset:"{focus.ring.offset}"},badgeSize:"1rem",transitionDuration:"{form.field.transition.duration}"},colorScheme:{light:{root:{primary:{background:"{primary.color}",hoverBackground:"{primary.hover.color}",activeBackground:"{primary.active.color}",borderColor:"{primary.color}",hoverBorderColor:"{primary.hover.color}",activeBorderColor:"{primary.active.color}",color:"{primary.contrast.color}",hoverColor:"{primary.contrast.color}",activeColor:"{primary.contrast.color}",focusRing:{color:"{primary.color}",shadow:"none"}},secondary:{background:"{surface.100}",hoverBackground:"{surface.200}",activeBackground:"{surface.300}",borderColor:"{surface.100}",hoverBorderColor:"{surface.200}",activeBorderColor:"{surface.300}",color:"{surface.600}",hoverColor:"{surface.700}",activeColor:"{surface.800}",focusRing:{color:"{surface.600}",shadow:"none"}},info:{background:"{sky.500}",hoverBackground:"{sky.600}",activeBackground:"{sky.700}",borderColor:"{sky.500}",hoverBorderColor:"{sky.600}",activeBorderColor:"{sky.700}",color:"#ffffff",hoverColor:"#ffffff",activeColor:"#ffffff",focusRing:{color:"{sky.500}",shadow:"none"}},success:{background:"{green.500}",hoverBackground:"{green.600}",activeBackground:"{green.700}",borderColor:"{green.500}",hoverBorderColor:"{green.600}",activeBorderColor:"{green.700}",color:"#ffffff",hoverColor:"#ffffff",activeColor:"#ffffff",focusRing:{color:"{green.500}",shadow:"none"}},warn:{background:"{orange.500}",hoverBackground:"{orange.600}",activeBackground:"{orange.700}",borderColor:"{orange.500}",hoverBorderColor:"{orange.600}",activeBorderColor:"{orange.700}",color:"#ffffff",hoverColor:"#ffffff",activeColor:"#ffffff",focusRing:{color:"{orange.500}",shadow:"none"}},help:{background:"{purple.500}",hoverBackground:"{purple.600}",activeBackground:"{purple.700}",borderColor:"{purple.500}",hoverBorderColor:"{purple.600}",activeBorderColor:"{purple.700}",color:"#ffffff",hoverColor:"#ffffff",activeColor:"#ffffff",focusRing:{color:"{purple.500}",shadow:"none"}},danger:{background:"{red.500}",hoverBackground:"{red.600}",activeBackground:"{red.700}",borderColor:"{red.500}",hoverBorderColor:"{red.600}",activeBorderColor:"{red.700}",color:"#ffffff",hoverColor:"#ffffff",activeColor:"#ffffff",focusRing:{color:"{red.500}",shadow:"none"}},contrast:{background:"{surface.950}",hoverBackground:"{surface.900}",activeBackground:"{surface.800}",borderColor:"{surface.950}",hoverBorderColor:"{surface.900}",activeBorderColor:"{surface.800}",color:"{surface.0}",hoverColor:"{surface.0}",activeColor:"{surface.0}",focusRing:{color:"{surface.950}",shadow:"none"}}},outlined:{primary:{hoverBackground:"{primary.50}",activeBackground:"{primary.100}",borderColor:"{primary.200}",color:"{primary.color}"},secondary:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",borderColor:"{surface.200}",color:"{surface.500}"},success:{hoverBackground:"{green.50}",activeBackground:"{green.100}",borderColor:"{green.200}",color:"{green.500}"},info:{hoverBackground:"{sky.50}",activeBackground:"{sky.100}",borderColor:"{sky.200}",color:"{sky.500}"},warn:{hoverBackground:"{orange.50}",activeBackground:"{orange.100}",borderColor:"{orange.200}",color:"{orange.500}"},help:{hoverBackground:"{purple.50}",activeBackground:"{purple.100}",borderColor:"{purple.200}",color:"{purple.500}"},danger:{hoverBackground:"{red.50}",activeBackground:"{red.100}",borderColor:"{red.200}",color:"{red.500}"},contrast:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",borderColor:"{surface.700}",color:"{surface.950}"},plain:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",borderColor:"{surface.200}",color:"{surface.700}"}},text:{primary:{hoverBackground:"{primary.50}",activeBackground:"{primary.100}",color:"{primary.color}"},secondary:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",color:"{surface.500}"},success:{hoverBackground:"{green.50}",activeBackground:"{green.100}",color:"{green.500}"},info:{hoverBackground:"{sky.50}",activeBackground:"{sky.100}",color:"{sky.500}"},warn:{hoverBackground:"{orange.50}",activeBackground:"{orange.100}",color:"{orange.500}"},help:{hoverBackground:"{purple.50}",activeBackground:"{purple.100}",color:"{purple.500}"},danger:{hoverBackground:"{red.50}",activeBackground:"{red.100}",color:"{red.500}"},contrast:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",color:"{surface.950}"},plain:{hoverBackground:"{surface.50}",activeBackground:"{surface.100}",color:"{surface.700}"}},link:{color:"{primary.color}",hoverColor:"{primary.color}",activeColor:"{primary.color}"}},dark:{root:{primary:{background:"{primary.color}",hoverBackground:"{primary.hover.color}",activeBackground:"{primary.active.color}",borderColor:"{primary.color}",hoverBorderColor:"{primary.hover.color}",activeBorderColor:"{primary.active.color}",color:"{primary.contrast.color}",hoverColor:"{primary.contrast.color}",activeColor:"{primary.contrast.color}",focusRing:{color:"{primary.color}",shadow:"none"}},secondary:{background:"{surface.800}",hoverBackground:"{surface.700}",activeBackground:"{surface.600}",borderColor:"{surface.800}",hoverBorderColor:"{surface.700}",activeBorderColor:"{surface.600}",color:"{surface.300}",hoverColor:"{surface.200}",activeColor:"{surface.100}",focusRing:{color:"{surface.300}",shadow:"none"}},info:{background:"{sky.400}",hoverBackground:"{sky.300}",activeBackground:"{sky.200}",borderColor:"{sky.400}",hoverBorderColor:"{sky.300}",activeBorderColor:"{sky.200}",color:"{sky.950}",hoverColor:"{sky.950}",activeColor:"{sky.950}",focusRing:{color:"{sky.400}",shadow:"none"}},success:{background:"{green.400}",hoverBackground:"{green.300}",activeBackground:"{green.200}",borderColor:"{green.400}",hoverBorderColor:"{green.300}",activeBorderColor:"{green.200}",color:"{green.950}",hoverColor:"{green.950}",activeColor:"{green.950}",focusRing:{color:"{green.400}",shadow:"none"}},warn:{background:"{orange.400}",hoverBackground:"{orange.300}",activeBackground:"{orange.200}",borderColor:"{orange.400}",hoverBorderColor:"{orange.300}",activeBorderColor:"{orange.200}",color:"{orange.950}",hoverColor:"{orange.950}",activeColor:"{orange.950}",focusRing:{color:"{orange.400}",shadow:"none"}},help:{background:"{purple.400}",hoverBackground:"{purple.300}",activeBackground:"{purple.200}",borderColor:"{purple.400}",hoverBorderColor:"{purple.300}",activeBorderColor:"{purple.200}",color:"{purple.950}",hoverColor:"{purple.950}",activeColor:"{purple.950}",focusRing:{color:"{purple.400}",shadow:"none"}},danger:{background:"{red.400}",hoverBackground:"{red.300}",activeBackground:"{red.200}",borderColor:"{red.400}",hoverBorderColor:"{red.300}",activeBorderColor:"{red.200}",color:"{red.950}",hoverColor:"{red.950}",activeColor:"{red.950}",focusRing:{color:"{red.400}",shadow:"none"}},contrast:{background:"{surface.0}",hoverBackground:"{surface.100}",activeBackground:"{surface.200}",borderColor:"{surface.0}",hoverBorderColor:"{surface.100}",activeBorderColor:"{surface.200}",color:"{surface.950}",hoverColor:"{surface.950}",activeColor:"{surface.950}",focusRing:{color:"{surface.0}",shadow:"none"}}},outlined:{primary:{hoverBackground:"color-mix(in srgb, {primary.color}, transparent 96%)",activeBackground:"color-mix(in srgb, {primary.color}, transparent 84%)",borderColor:"{primary.700}",color:"{primary.color}"},secondary:{hoverBackground:"rgba(255,255,255,0.04)",activeBackground:"rgba(255,255,255,0.16)",borderColor:"{surface.700}",color:"{surface.400}"},success:{hoverBackground:"color-mix(in srgb, {green.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {green.400}, transparent 84%)",borderColor:"{green.700}",color:"{green.400}"},info:{hoverBackground:"color-mix(in srgb, {sky.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {sky.400}, transparent 84%)",borderColor:"{sky.700}",color:"{sky.400}"},warn:{hoverBackground:"color-mix(in srgb, {orange.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {orange.400}, transparent 84%)",borderColor:"{orange.700}",color:"{orange.400}"},help:{hoverBackground:"color-mix(in srgb, {purple.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {purple.400}, transparent 84%)",borderColor:"{purple.700}",color:"{purple.400}"},danger:{hoverBackground:"color-mix(in srgb, {red.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {red.400}, transparent 84%)",borderColor:"{red.700}",color:"{red.400}"},contrast:{hoverBackground:"{surface.800}",activeBackground:"{surface.700}",borderColor:"{surface.500}",color:"{surface.0}"},plain:{hoverBackground:"{surface.800}",activeBackground:"{surface.700}",borderColor:"{surface.600}",color:"{surface.0}"}},text:{primary:{hoverBackground:"color-mix(in srgb, {primary.color}, transparent 96%)",activeBackground:"color-mix(in srgb, {primary.color}, transparent 84%)",color:"{primary.color}"},secondary:{hoverBackground:"{surface.800}",activeBackground:"{surface.700}",color:"{surface.400}"},success:{hoverBackground:"color-mix(in srgb, {green.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {green.400}, transparent 84%)",color:"{green.400}"},info:{hoverBackground:"color-mix(in srgb, {sky.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {sky.400}, transparent 84%)",color:"{sky.400}"},warn:{hoverBackground:"color-mix(in srgb, {orange.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {orange.400}, transparent 84%)",color:"{orange.400}"},help:{hoverBackground:"color-mix(in srgb, {purple.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {purple.400}, transparent 84%)",color:"{purple.400}"},danger:{hoverBackground:"color-mix(in srgb, {red.400}, transparent 96%)",activeBackground:"color-mix(in srgb, {red.400}, transparent 84%)",color:"{red.400}"},contrast:{hoverBackground:"{surface.800}",activeBackground:"{surface.700}",color:"{surface.0}"},plain:{hoverBackground:"{surface.800}",activeBackground:"{surface.700}",color:"{surface.0}"}},link:{color:"{primary.color}",hoverColor:"{primary.color}",activeColor:"{primary.color}"}}}},kp={root:{background:"{content.background}",borderRadius:"{border.radius.xl}",color:"{content.color}",shadow:"0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1)"},body:{padding:"1.25rem",gap:"0.5rem"},caption:{gap:"0.5rem"},title:{fontSize:"1.25rem",fontWeight:"500"},subtitle:{color:"{text.muted.color}"}},wp={root:{transitionDuration:"{transition.duration}"},content:{gap:"0.25rem"},indicatorList:{padding:"1rem",gap:"0.5rem"},indicator:{width:"2rem",height:"0.5rem",borderRadius:"{content.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},colorScheme:{light:{indicator:{background:"{surface.200}",hoverBackground:"{surface.300}",activeBackground:"{primary.color}"}},dark:{indicator:{background:"{surface.700}",hoverBackground:"{surface.600}",activeBackground:"{primary.color}"}}}},xp={root:{background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}},dropdown:{width:"2.5rem",color:"{form.field.icon.color}"},overlay:{background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},list:{padding:"{list.padding}",gap:"{list.gap}",mobileIndent:"1rem"},option:{focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}",icon:{color:"{list.option.icon.color}",focusColor:"{list.option.icon.focus.color}",size:"0.875rem"}},clearIcon:{color:"{form.field.icon.color}"}},vp={root:{borderRadius:"{border.radius.sm}",width:"1.25rem",height:"1.25rem",background:"{form.field.background}",checkedBackground:"{primary.color}",checkedHoverBackground:"{primary.hover.color}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.border.color}",checkedBorderColor:"{primary.color}",checkedHoverBorderColor:"{primary.hover.color}",checkedFocusBorderColor:"{primary.color}",checkedDisabledBorderColor:"{form.field.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",shadow:"{form.field.shadow}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{width:"1rem",height:"1rem"},lg:{width:"1.5rem",height:"1.5rem"}},icon:{size:"0.875rem",color:"{form.field.color}",checkedColor:"{primary.contrast.color}",checkedHoverColor:"{primary.contrast.color}",disabledColor:"{form.field.disabled.color}",sm:{size:"0.75rem"},lg:{size:"1rem"}}},Cp={root:{borderRadius:"16px",paddingX:"0.75rem",paddingY:"0.5rem",gap:"0.5rem",transitionDuration:"{transition.duration}"},image:{width:"2rem",height:"2rem"},icon:{size:"1rem"},removeIcon:{size:"1rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"}},colorScheme:{light:{root:{background:"{surface.100}",color:"{surface.800}"},icon:{color:"{surface.800}"},removeIcon:{color:"{surface.800}"}},dark:{root:{background:"{surface.800}",color:"{surface.0}"},icon:{color:"{surface.0}"},removeIcon:{color:"{surface.0}"}}}},Ep={root:{transitionDuration:"{transition.duration}"},preview:{width:"1.5rem",height:"1.5rem",borderRadius:"{form.field.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},panel:{shadow:"{overlay.popover.shadow}",borderRadius:"{overlay.popover.borderRadius}"},colorScheme:{light:{panel:{background:"{surface.800}",borderColor:"{surface.900}"},handle:{color:"{surface.0}"}},dark:{panel:{background:"{surface.900}",borderColor:"{surface.700}"},handle:{color:"{surface.0}"}}}},Sp={icon:{size:"2rem",color:"{overlay.modal.color}"},content:{gap:"1rem"}},Bp={root:{background:"{overlay.popover.background}",borderColor:"{overlay.popover.border.color}",color:"{overlay.popover.color}",borderRadius:"{overlay.popover.border.radius}",shadow:"{overlay.popover.shadow}",gutter:"10px",arrowOffset:"1.25rem"},content:{padding:"{overlay.popover.padding}",gap:"1rem"},icon:{size:"1.5rem",color:"{overlay.popover.color}"},footer:{gap:"0.5rem",padding:"0 {overlay.popover.padding} {overlay.popover.padding} {overlay.popover.padding}"}},Np={root:{background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}",shadow:"{overlay.navigation.shadow}",transitionDuration:"{transition.duration}"},list:{padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},item:{focusBackground:"{navigation.item.focus.background}",activeBackground:"{navigation.item.active.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",activeColor:"{navigation.item.active.color}",padding:"{navigation.item.padding}",borderRadius:"{navigation.item.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}",activeColor:"{navigation.item.icon.active.color}"}},submenu:{mobileIndent:"1rem"},submenuIcon:{size:"{navigation.submenu.icon.size}",color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}",activeColor:"{navigation.submenu.icon.active.color}"},separator:{borderColor:"{content.border.color}"}},_p={root:{transitionDuration:"{transition.duration}"},header:{background:"{content.background}",borderColor:"{datatable.border.color}",color:"{content.color}",borderWidth:"0 0 1px 0",padding:"0.75rem 1rem"},headerCell:{background:"{content.background}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",borderColor:"{datatable.border.color}",color:"{content.color}",hoverColor:"{content.hover.color}",selectedColor:"{highlight.color}",gap:"0.5rem",padding:"0.75rem 1rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"}},columnTitle:{fontWeight:"600"},row:{background:"{content.background}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",color:"{content.color}",hoverColor:"{content.hover.color}",selectedColor:"{highlight.color}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"}},bodyCell:{borderColor:"{datatable.border.color}",padding:"0.75rem 1rem"},footerCell:{background:"{content.background}",borderColor:"{datatable.border.color}",color:"{content.color}",padding:"0.75rem 1rem"},columnFooter:{fontWeight:"600"},footer:{background:"{content.background}",borderColor:"{datatable.border.color}",color:"{content.color}",borderWidth:"0 0 1px 0",padding:"0.75rem 1rem"},dropPoint:{color:"{primary.color}"},columnResizerWidth:"0.5rem",resizeIndicator:{width:"1px",color:"{primary.color}"},sortIcon:{color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",size:"0.875rem"},loadingIcon:{size:"2rem"},rowToggleButton:{hoverBackground:"{content.hover.background}",selectedHoverBackground:"{content.background}",color:"{text.muted.color}",hoverColor:"{text.color}",selectedHoverColor:"{primary.color}",size:"1.75rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},filter:{inlineGap:"0.5rem",overlaySelect:{background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},overlayPopover:{background:"{overlay.popover.background}",borderColor:"{overlay.popover.border.color}",borderRadius:"{overlay.popover.border.radius}",color:"{overlay.popover.color}",shadow:"{overlay.popover.shadow}",padding:"{overlay.popover.padding}",gap:"0.5rem"},rule:{borderColor:"{content.border.color}"},constraintList:{padding:"{list.padding}",gap:"{list.gap}"},constraint:{focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",separator:{borderColor:"{content.border.color}"},padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}"}},paginatorTop:{borderColor:"{datatable.border.color}",borderWidth:"0 0 1px 0"},paginatorBottom:{borderColor:"{datatable.border.color}",borderWidth:"0 0 1px 0"},colorScheme:{light:{root:{borderColor:"{content.border.color}"},row:{stripedBackground:"{surface.50}"},bodyCell:{selectedBorderColor:"{primary.100}"}},dark:{root:{borderColor:"{surface.800}"},row:{stripedBackground:"{surface.950}"},bodyCell:{selectedBorderColor:"{primary.900}"}}}},Rp={root:{borderColor:"transparent",borderWidth:"0",borderRadius:"0",padding:"0"},header:{background:"{content.background}",color:"{content.color}",borderColor:"{content.border.color}",borderWidth:"0 0 1px 0",padding:"0.75rem 1rem",borderRadius:"0"},content:{background:"{content.background}",color:"{content.color}",borderColor:"transparent",borderWidth:"0",padding:"0",borderRadius:"0"},footer:{background:"{content.background}",color:"{content.color}",borderColor:"{content.border.color}",borderWidth:"1px 0 0 0",padding:"0.75rem 1rem",borderRadius:"0"},paginatorTop:{borderColor:"{content.border.color}",borderWidth:"0 0 1px 0"},paginatorBottom:{borderColor:"{content.border.color}",borderWidth:"1px 0 0 0"}},Tp={root:{transitionDuration:"{transition.duration}"},panel:{background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}",shadow:"{overlay.popover.shadow}",padding:"{overlay.popover.padding}"},header:{background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",padding:"0 0 0.5rem 0"},title:{gap:"0.5rem",fontWeight:"500"},dropdown:{width:"2.5rem",sm:{width:"2rem"},lg:{width:"3rem"},borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.border.color}",activeBorderColor:"{form.field.border.color}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},inputIcon:{color:"{form.field.icon.color}"},selectMonth:{hoverBackground:"{content.hover.background}",color:"{content.color}",hoverColor:"{content.hover.color}",padding:"0.25rem 0.5rem",borderRadius:"{content.border.radius}"},selectYear:{hoverBackground:"{content.hover.background}",color:"{content.color}",hoverColor:"{content.hover.color}",padding:"0.25rem 0.5rem",borderRadius:"{content.border.radius}"},group:{borderColor:"{content.border.color}",gap:"{overlay.popover.padding}"},dayView:{margin:"0.5rem 0 0 0"},weekDay:{padding:"0.25rem",fontWeight:"500",color:"{content.color}"},date:{hoverBackground:"{content.hover.background}",selectedBackground:"{primary.color}",rangeSelectedBackground:"{highlight.background}",color:"{content.color}",hoverColor:"{content.hover.color}",selectedColor:"{primary.contrast.color}",rangeSelectedColor:"{highlight.color}",width:"2rem",height:"2rem",borderRadius:"50%",padding:"0.25rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},monthView:{margin:"0.5rem 0 0 0"},month:{padding:"0.375rem",borderRadius:"{content.border.radius}"},yearView:{margin:"0.5rem 0 0 0"},year:{padding:"0.375rem",borderRadius:"{content.border.radius}"},buttonbar:{padding:"0.5rem 0 0 0",borderColor:"{content.border.color}"},timePicker:{padding:"0.5rem 0 0 0",borderColor:"{content.border.color}",gap:"0.5rem",buttonGap:"0.25rem"},colorScheme:{light:{dropdown:{background:"{surface.100}",hoverBackground:"{surface.200}",activeBackground:"{surface.300}",color:"{surface.600}",hoverColor:"{surface.700}",activeColor:"{surface.800}"},today:{background:"{surface.200}",color:"{surface.900}"}},dark:{dropdown:{background:"{surface.800}",hoverBackground:"{surface.700}",activeBackground:"{surface.600}",color:"{surface.300}",hoverColor:"{surface.200}",activeColor:"{surface.100}"},today:{background:"{surface.700}",color:"{surface.0}"}}}},Dp={root:{background:"{overlay.modal.background}",borderColor:"{overlay.modal.border.color}",color:"{overlay.modal.color}",borderRadius:"{overlay.modal.border.radius}",shadow:"{overlay.modal.shadow}"},header:{padding:"{overlay.modal.padding}",gap:"0.5rem"},title:{fontSize:"1.25rem",fontWeight:"600"},content:{padding:"0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}"},footer:{padding:"0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}",gap:"0.5rem"}},Op={root:{borderColor:"{content.border.color}"},content:{background:"{content.background}",color:"{text.color}"},horizontal:{margin:"1rem 0",padding:"0 1rem",content:{padding:"0 0.5rem"}},vertical:{margin:"0 1rem",padding:"0.5rem 0",content:{padding:"0.5rem 0"}}},Vp={root:{background:"rgba(255, 255, 255, 0.1)",borderColor:"rgba(255, 255, 255, 0.2)",padding:"0.5rem",borderRadius:"{border.radius.xl}"},item:{borderRadius:"{content.border.radius}",padding:"0.5rem",size:"3rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}}},$p={root:{background:"{overlay.modal.background}",borderColor:"{overlay.modal.border.color}",color:"{overlay.modal.color}",shadow:"{overlay.modal.shadow}"},header:{padding:"{overlay.modal.padding}"},title:{fontSize:"1.5rem",fontWeight:"600"},content:{padding:"0 {overlay.modal.padding} {overlay.modal.padding} {overlay.modal.padding}"},footer:{padding:"{overlay.modal.padding}"}},Fp={toolbar:{background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}"},toolbarItem:{color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{primary.color}"},overlay:{background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}",padding:"{list.padding}"},overlayOption:{focusBackground:"{list.option.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}"},content:{background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}"}},Ap={root:{background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",color:"{content.color}",padding:"0 1.125rem 1.125rem 1.125rem",transitionDuration:"{transition.duration}"},legend:{background:"{content.background}",hoverBackground:"{content.hover.background}",color:"{content.color}",hoverColor:"{content.hover.color}",borderRadius:"{content.border.radius}",borderWidth:"1px",borderColor:"transparent",padding:"0.5rem 0.75rem",gap:"0.5rem",fontWeight:"600",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},toggleIcon:{color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}"},content:{padding:"0"}},Ip={root:{background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}",transitionDuration:"{transition.duration}"},header:{background:"transparent",color:"{text.color}",padding:"1.125rem",borderColor:"unset",borderWidth:"0",borderRadius:"0",gap:"0.5rem"},content:{highlightBorderColor:"{primary.color}",padding:"0 1.125rem 1.125rem 1.125rem",gap:"1rem"},file:{padding:"1rem",gap:"1rem",borderColor:"{content.border.color}",info:{gap:"0.5rem"}},fileList:{gap:"0.5rem"},progressbar:{height:"0.25rem"},basic:{gap:"0.5rem"}},Pp={root:{color:"{form.field.float.label.color}",focusColor:"{form.field.float.label.focus.color}",activeColor:"{form.field.float.label.active.color}",invalidColor:"{form.field.float.label.invalid.color}",transitionDuration:"0.2s",positionX:"{form.field.padding.x}",positionY:"{form.field.padding.y}",fontWeight:"500",active:{fontSize:"0.75rem",fontWeight:"400"}},over:{active:{top:"-1.25rem"}},in:{input:{paddingTop:"1.5rem",paddingBottom:"{form.field.padding.y}"},active:{top:"{form.field.padding.y}"}},on:{borderRadius:"{border.radius.xs}",active:{background:"{form.field.background}",padding:"0 0.125rem"}}},Lp={root:{borderWidth:"1px",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",transitionDuration:"{transition.duration}"},navButton:{background:"rgba(255, 255, 255, 0.1)",hoverBackground:"rgba(255, 255, 255, 0.2)",color:"{surface.100}",hoverColor:"{surface.0}",size:"3rem",gutter:"0.5rem",prev:{borderRadius:"50%"},next:{borderRadius:"50%"},focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},navIcon:{size:"1.5rem"},thumbnailsContent:{background:"{content.background}",padding:"1rem 0.25rem"},thumbnailNavButton:{size:"2rem",borderRadius:"{content.border.radius}",gutter:"0.5rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},thumbnailNavButtonIcon:{size:"1rem"},caption:{background:"rgba(0, 0, 0, 0.5)",color:"{surface.100}",padding:"1rem"},indicatorList:{gap:"0.5rem",padding:"1rem"},indicatorButton:{width:"1rem",height:"1rem",activeBackground:"{primary.color}",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},insetIndicatorList:{background:"rgba(0, 0, 0, 0.5)"},insetIndicatorButton:{background:"rgba(255, 255, 255, 0.4)",hoverBackground:"rgba(255, 255, 255, 0.6)",activeBackground:"rgba(255, 255, 255, 0.9)"},closeButton:{size:"3rem",gutter:"0.5rem",background:"rgba(255, 255, 255, 0.1)",hoverBackground:"rgba(255, 255, 255, 0.2)",color:"{surface.50}",hoverColor:"{surface.0}",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},closeButtonIcon:{size:"1.5rem"},colorScheme:{light:{thumbnailNavButton:{hoverBackground:"{surface.100}",color:"{surface.600}",hoverColor:"{surface.700}"},indicatorButton:{background:"{surface.200}",hoverBackground:"{surface.300}"}},dark:{thumbnailNavButton:{hoverBackground:"{surface.700}",color:"{surface.400}",hoverColor:"{surface.0}"},indicatorButton:{background:"{surface.700}",hoverBackground:"{surface.600}"}}}},Mp={icon:{color:"{form.field.icon.color}"}},jp={root:{color:"{form.field.float.label.color}",focusColor:"{form.field.float.label.focus.color}",invalidColor:"{form.field.float.label.invalid.color}",transitionDuration:"0.2s",positionX:"{form.field.padding.x}",top:"{form.field.padding.y}",fontSize:"0.75rem",fontWeight:"400"},input:{paddingTop:"1.5rem",paddingBottom:"{form.field.padding.y}"}},zp={root:{transitionDuration:"{transition.duration}"},preview:{icon:{size:"1.5rem"},mask:{background:"{mask.background}",color:"{mask.color}"}},toolbar:{position:{left:"auto",right:"1rem",top:"1rem",bottom:"auto"},blur:"8px",background:"rgba(255,255,255,0.1)",borderColor:"rgba(255,255,255,0.2)",borderWidth:"1px",borderRadius:"30px",padding:".5rem",gap:"0.5rem"},action:{hoverBackground:"rgba(255,255,255,0.1)",color:"{surface.50}",hoverColor:"{surface.0}",size:"3rem",iconSize:"1.5rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}}},Up={handle:{size:"15px",hoverSize:"30px",background:"rgba(255,255,255,0.3)",hoverBackground:"rgba(255,255,255,0.3)",borderColor:"unset",hoverBorderColor:"unset",borderWidth:"0",borderRadius:"50%",transitionDuration:"{transition.duration}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"rgba(255,255,255,0.3)",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}}},Wp={root:{padding:"{form.field.padding.y} {form.field.padding.x}",borderRadius:"{content.border.radius}",gap:"0.5rem"},text:{fontWeight:"500"},icon:{size:"1rem"},colorScheme:{light:{info:{background:"color-mix(in srgb, {blue.50}, transparent 5%)",borderColor:"{blue.200}",color:"{blue.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)"},success:{background:"color-mix(in srgb, {green.50}, transparent 5%)",borderColor:"{green.200}",color:"{green.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)"},warn:{background:"color-mix(in srgb,{yellow.50}, transparent 5%)",borderColor:"{yellow.200}",color:"{yellow.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)"},error:{background:"color-mix(in srgb, {red.50}, transparent 5%)",borderColor:"{red.200}",color:"{red.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)"},secondary:{background:"{surface.100}",borderColor:"{surface.200}",color:"{surface.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)"},contrast:{background:"{surface.900}",borderColor:"{surface.950}",color:"{surface.50}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)"}},dark:{info:{background:"color-mix(in srgb, {blue.500}, transparent 84%)",borderColor:"color-mix(in srgb, {blue.700}, transparent 64%)",color:"{blue.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)"},success:{background:"color-mix(in srgb, {green.500}, transparent 84%)",borderColor:"color-mix(in srgb, {green.700}, transparent 64%)",color:"{green.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)"},warn:{background:"color-mix(in srgb, {yellow.500}, transparent 84%)",borderColor:"color-mix(in srgb, {yellow.700}, transparent 64%)",color:"{yellow.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)"},error:{background:"color-mix(in srgb, {red.500}, transparent 84%)",borderColor:"color-mix(in srgb, {red.700}, transparent 64%)",color:"{red.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)"},secondary:{background:"{surface.800}",borderColor:"{surface.700}",color:"{surface.300}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)"},contrast:{background:"{surface.0}",borderColor:"{surface.100}",color:"{surface.950}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)"}}}},qp={root:{padding:"{form.field.padding.y} {form.field.padding.x}",borderRadius:"{content.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"},transitionDuration:"{transition.duration}"},display:{hoverBackground:"{content.hover.background}",hoverColor:"{content.hover.color}"}},Hp={root:{background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}"},chip:{borderRadius:"{border.radius.sm}"},colorScheme:{light:{chip:{focusBackground:"{surface.200}",color:"{surface.800}"}},dark:{chip:{focusBackground:"{surface.700}",color:"{surface.0}"}}}},Kp={addon:{background:"{form.field.background}",borderColor:"{form.field.border.color}",color:"{form.field.icon.color}",borderRadius:"{form.field.border.radius}",padding:"0.5rem",minWidth:"2.5rem"}},Yp={root:{transitionDuration:"{transition.duration}"},button:{width:"2.5rem",borderRadius:"{form.field.border.radius}",verticalPadding:"{form.field.padding.y}"},colorScheme:{light:{button:{background:"transparent",hoverBackground:"{surface.100}",activeBackground:"{surface.200}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.border.color}",activeBorderColor:"{form.field.border.color}",color:"{surface.400}",hoverColor:"{surface.500}",activeColor:"{surface.600}"}},dark:{button:{background:"transparent",hoverBackground:"{surface.800}",activeBackground:"{surface.700}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.border.color}",activeBorderColor:"{form.field.border.color}",color:"{surface.400}",hoverColor:"{surface.300}",activeColor:"{surface.200}"}}}},Gp={root:{gap:"0.5rem"},input:{width:"2.5rem",sm:{width:"2rem"},lg:{width:"3rem"}}},Xp={root:{background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}}},Jp={root:{transitionDuration:"{transition.duration}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},value:{background:"{primary.color}"},range:{background:"{content.border.color}"},text:{color:"{text.muted.color}"}},Qp={root:{background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",borderColor:"{form.field.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",shadow:"{form.field.shadow}",borderRadius:"{form.field.border.radius}",transitionDuration:"{form.field.transition.duration}"},list:{padding:"{list.padding}",gap:"{list.gap}",header:{padding:"{list.header.padding}"}},option:{focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}"},optionGroup:{background:"{list.option.group.background}",color:"{list.option.group.color}",fontWeight:"{list.option.group.font.weight}",padding:"{list.option.group.padding}"},checkmark:{color:"{list.option.color}",gutterStart:"-0.375rem",gutterEnd:"0.375rem"},emptyMessage:{padding:"{list.option.padding}"},colorScheme:{light:{option:{stripedBackground:"{surface.50}"}},dark:{option:{stripedBackground:"{surface.900}"}}}},Zp={root:{background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",color:"{content.color}",gap:"0.5rem",verticalOrientation:{padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},horizontalOrientation:{padding:"0.5rem 0.75rem",gap:"0.5rem"},transitionDuration:"{transition.duration}"},baseItem:{borderRadius:"{content.border.radius}",padding:"{navigation.item.padding}"},item:{focusBackground:"{navigation.item.focus.background}",activeBackground:"{navigation.item.active.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",activeColor:"{navigation.item.active.color}",padding:"{navigation.item.padding}",borderRadius:"{navigation.item.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}",activeColor:"{navigation.item.icon.active.color}"}},overlay:{padding:"0",background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",color:"{content.color}",shadow:"{overlay.navigation.shadow}",gap:"0.5rem"},submenu:{padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},submenuLabel:{padding:"{navigation.submenu.label.padding}",fontWeight:"{navigation.submenu.label.font.weight}",background:"{navigation.submenu.label.background.}",color:"{navigation.submenu.label.color}"},submenuIcon:{size:"{navigation.submenu.icon.size}",color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}",activeColor:"{navigation.submenu.icon.active.color}"},separator:{borderColor:"{content.border.color}"},mobileButton:{borderRadius:"50%",size:"1.75rem",color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",hoverBackground:"{content.hover.background}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}}},eg={root:{background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}",shadow:"{overlay.navigation.shadow}",transitionDuration:"{transition.duration}"},list:{padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},item:{focusBackground:"{navigation.item.focus.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",padding:"{navigation.item.padding}",borderRadius:"{navigation.item.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}"}},submenuLabel:{padding:"{navigation.submenu.label.padding}",fontWeight:"{navigation.submenu.label.font.weight}",background:"{navigation.submenu.label.background}",color:"{navigation.submenu.label.color}"},separator:{borderColor:"{content.border.color}"}},tg={root:{background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",color:"{content.color}",gap:"0.5rem",padding:"0.5rem 0.75rem",transitionDuration:"{transition.duration}"},baseItem:{borderRadius:"{content.border.radius}",padding:"{navigation.item.padding}"},item:{focusBackground:"{navigation.item.focus.background}",activeBackground:"{navigation.item.active.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",activeColor:"{navigation.item.active.color}",padding:"{navigation.item.padding}",borderRadius:"{navigation.item.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}",activeColor:"{navigation.item.icon.active.color}"}},submenu:{padding:"{navigation.list.padding}",gap:"{navigation.list.gap}",background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",shadow:"{overlay.navigation.shadow}",mobileIndent:"1rem",icon:{size:"{navigation.submenu.icon.size}",color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}",activeColor:"{navigation.submenu.icon.active.color}"}},separator:{borderColor:"{content.border.color}"},mobileButton:{borderRadius:"50%",size:"1.75rem",color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",hoverBackground:"{content.hover.background}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}}},og={root:{borderRadius:"{content.border.radius}",borderWidth:"1px",transitionDuration:"{transition.duration}"},content:{padding:"0.5rem 0.75rem",gap:"0.5rem",sm:{padding:"0.375rem 0.625rem"},lg:{padding:"0.625rem 0.875rem"}},text:{fontSize:"1rem",fontWeight:"500",sm:{fontSize:"0.875rem"},lg:{fontSize:"1.125rem"}},icon:{size:"1.125rem",sm:{size:"1rem"},lg:{size:"1.25rem"}},closeButton:{width:"1.75rem",height:"1.75rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",offset:"{focus.ring.offset}"}},closeIcon:{size:"1rem",sm:{size:"0.875rem"},lg:{size:"1.125rem"}},outlined:{root:{borderWidth:"1px"}},simple:{content:{padding:"0"}},colorScheme:{light:{info:{background:"color-mix(in srgb, {blue.50}, transparent 5%)",borderColor:"{blue.200}",color:"{blue.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)",closeButton:{hoverBackground:"{blue.100}",focusRing:{color:"{blue.600}",shadow:"none"}},outlined:{color:"{blue.600}",borderColor:"{blue.600}"},simple:{color:"{blue.600}"}},success:{background:"color-mix(in srgb, {green.50}, transparent 5%)",borderColor:"{green.200}",color:"{green.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)",closeButton:{hoverBackground:"{green.100}",focusRing:{color:"{green.600}",shadow:"none"}},outlined:{color:"{green.600}",borderColor:"{green.600}"},simple:{color:"{green.600}"}},warn:{background:"color-mix(in srgb,{yellow.50}, transparent 5%)",borderColor:"{yellow.200}",color:"{yellow.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)",closeButton:{hoverBackground:"{yellow.100}",focusRing:{color:"{yellow.600}",shadow:"none"}},outlined:{color:"{yellow.600}",borderColor:"{yellow.600}"},simple:{color:"{yellow.600}"}},error:{background:"color-mix(in srgb, {red.50}, transparent 5%)",borderColor:"{red.200}",color:"{red.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)",closeButton:{hoverBackground:"{red.100}",focusRing:{color:"{red.600}",shadow:"none"}},outlined:{color:"{red.600}",borderColor:"{red.600}"},simple:{color:"{red.600}"}},secondary:{background:"{surface.100}",borderColor:"{surface.200}",color:"{surface.600}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)",closeButton:{hoverBackground:"{surface.200}",focusRing:{color:"{surface.600}",shadow:"none"}},outlined:{color:"{surface.500}",borderColor:"{surface.500}"},simple:{color:"{surface.500}"}},contrast:{background:"{surface.900}",borderColor:"{surface.950}",color:"{surface.50}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)",closeButton:{hoverBackground:"{surface.800}",focusRing:{color:"{surface.50}",shadow:"none"}},outlined:{color:"{surface.950}",borderColor:"{surface.950}"},simple:{color:"{surface.950}"}}},dark:{info:{background:"color-mix(in srgb, {blue.500}, transparent 84%)",borderColor:"color-mix(in srgb, {blue.700}, transparent 64%)",color:"{blue.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{blue.500}",shadow:"none"}},outlined:{color:"{blue.500}",borderColor:"{blue.500}"},simple:{color:"{blue.500}"}},success:{background:"color-mix(in srgb, {green.500}, transparent 84%)",borderColor:"color-mix(in srgb, {green.700}, transparent 64%)",color:"{green.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{green.500}",shadow:"none"}},outlined:{color:"{green.500}",borderColor:"{green.500}"},simple:{color:"{green.500}"}},warn:{background:"color-mix(in srgb, {yellow.500}, transparent 84%)",borderColor:"color-mix(in srgb, {yellow.700}, transparent 64%)",color:"{yellow.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{yellow.500}",shadow:"none"}},outlined:{color:"{yellow.500}",borderColor:"{yellow.500}"},simple:{color:"{yellow.500}"}},error:{background:"color-mix(in srgb, {red.500}, transparent 84%)",borderColor:"color-mix(in srgb, {red.700}, transparent 64%)",color:"{red.500}",shadow:"0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{red.500}",shadow:"none"}},outlined:{color:"{red.500}",borderColor:"{red.500}"},simple:{color:"{red.500}"}},secondary:{background:"{surface.800}",borderColor:"{surface.700}",color:"{surface.300}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)",closeButton:{hoverBackground:"{surface.700}",focusRing:{color:"{surface.300}",shadow:"none"}},outlined:{color:"{surface.400}",borderColor:"{surface.400}"},simple:{color:"{surface.400}"}},contrast:{background:"{surface.0}",borderColor:"{surface.100}",color:"{surface.950}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)",closeButton:{hoverBackground:"{surface.100}",focusRing:{color:"{surface.950}",shadow:"none"}},outlined:{color:"{surface.0}",borderColor:"{surface.0}"},simple:{color:"{surface.0}"}}}}},rg={root:{borderRadius:"{content.border.radius}",gap:"1rem"},meters:{background:"{content.border.color}",size:"0.5rem"},label:{gap:"0.5rem"},labelMarker:{size:"0.5rem"},labelIcon:{size:"1rem"},labelList:{verticalGap:"0.5rem",horizontalGap:"1rem"}},ng={root:{background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}},dropdown:{width:"2.5rem",color:"{form.field.icon.color}"},overlay:{background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},list:{padding:"{list.padding}",gap:"{list.gap}",header:{padding:"{list.header.padding}"}},option:{focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}",gap:"0.5rem"},optionGroup:{background:"{list.option.group.background}",color:"{list.option.group.color}",fontWeight:"{list.option.group.font.weight}",padding:"{list.option.group.padding}"},clearIcon:{color:"{form.field.icon.color}"},chip:{borderRadius:"{border.radius.sm}"},emptyMessage:{padding:"{list.option.padding}"}},ag={root:{gap:"1.125rem"},controls:{gap:"0.5rem"}},ig={root:{gutter:"0.75rem",transitionDuration:"{transition.duration}"},node:{background:"{content.background}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",borderColor:"{content.border.color}",color:"{content.color}",selectedColor:"{highlight.color}",hoverColor:"{content.hover.color}",padding:"0.75rem 1rem",toggleablePadding:"0.75rem 1rem 1.25rem 1rem",borderRadius:"{content.border.radius}"},nodeToggleButton:{background:"{content.background}",hoverBackground:"{content.hover.background}",borderColor:"{content.border.color}",color:"{text.muted.color}",hoverColor:"{text.color}",size:"1.5rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},connector:{color:"{content.border.color}",borderRadius:"{content.border.radius}",height:"24px"}},lg={root:{outline:{width:"2px",color:"{content.background}"}}},sg={root:{padding:"0.5rem 1rem",gap:"0.25rem",borderRadius:"{content.border.radius}",background:"{content.background}",color:"{content.color}",transitionDuration:"{transition.duration}"},navButton:{background:"transparent",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",selectedColor:"{highlight.color}",width:"2.5rem",height:"2.5rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},currentPageReport:{color:"{text.muted.color}"},jumpToPageInput:{maxWidth:"2.5rem"}},cg={root:{background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}"},header:{background:"transparent",color:"{text.color}",padding:"1.125rem",borderColor:"{content.border.color}",borderWidth:"0",borderRadius:"0"},toggleableHeader:{padding:"0.375rem 1.125rem"},title:{fontWeight:"600"},content:{padding:"0 1.125rem 1.125rem 1.125rem"},footer:{padding:"0 1.125rem 1.125rem 1.125rem"}},dg={root:{gap:"0.5rem",transitionDuration:"{transition.duration}"},panel:{background:"{content.background}",borderColor:"{content.border.color}",borderWidth:"1px",color:"{content.color}",padding:"0.25rem 0.25rem",borderRadius:"{content.border.radius}",first:{borderWidth:"1px",topBorderRadius:"{content.border.radius}"},last:{borderWidth:"1px",bottomBorderRadius:"{content.border.radius}"}},item:{focusBackground:"{navigation.item.focus.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",gap:"0.5rem",padding:"{navigation.item.padding}",borderRadius:"{content.border.radius}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}"}},submenu:{indent:"1rem"},submenuIcon:{color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}"}},ug={meter:{background:"{content.border.color}",borderRadius:"{content.border.radius}",height:".75rem"},icon:{color:"{form.field.icon.color}"},overlay:{background:"{overlay.popover.background}",borderColor:"{overlay.popover.border.color}",borderRadius:"{overlay.popover.border.radius}",color:"{overlay.popover.color}",padding:"{overlay.popover.padding}",shadow:"{overlay.popover.shadow}"},content:{gap:"0.5rem"},colorScheme:{light:{strength:{weakBackground:"{red.500}",mediumBackground:"{amber.500}",strongBackground:"{green.500}"}},dark:{strength:{weakBackground:"{red.400}",mediumBackground:"{amber.400}",strongBackground:"{green.400}"}}}},fg={root:{gap:"1.125rem"},controls:{gap:"0.5rem"}},mg={root:{background:"{overlay.popover.background}",borderColor:"{overlay.popover.border.color}",color:"{overlay.popover.color}",borderRadius:"{overlay.popover.border.radius}",shadow:"{overlay.popover.shadow}",gutter:"10px",arrowOffset:"1.25rem"},content:{padding:"{overlay.popover.padding}"}},pg={root:{background:"{content.border.color}",borderRadius:"{content.border.radius}",height:"1.25rem"},value:{background:"{primary.color}"},label:{color:"{primary.contrast.color}",fontSize:"0.75rem",fontWeight:"600"}},gg={colorScheme:{light:{root:{"color.1":"{red.500}","color.2":"{blue.500}","color.3":"{green.500}","color.4":"{yellow.500}"}},dark:{root:{"color.1":"{red.400}","color.2":"{blue.400}","color.3":"{green.400}","color.4":"{yellow.400}"}}}},hg={root:{width:"1.25rem",height:"1.25rem",background:"{form.field.background}",checkedBackground:"{primary.color}",checkedHoverBackground:"{primary.hover.color}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.border.color}",checkedBorderColor:"{primary.color}",checkedHoverBorderColor:"{primary.hover.color}",checkedFocusBorderColor:"{primary.color}",checkedDisabledBorderColor:"{form.field.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",shadow:"{form.field.shadow}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{width:"1rem",height:"1rem"},lg:{width:"1.5rem",height:"1.5rem"}},icon:{size:"0.75rem",checkedColor:"{primary.contrast.color}",checkedHoverColor:"{primary.contrast.color}",disabledColor:"{form.field.disabled.color}",sm:{size:"0.5rem"},lg:{size:"1rem"}}},bg={root:{gap:"0.25rem",transitionDuration:"{transition.duration}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},icon:{size:"1rem",color:"{text.muted.color}",hoverColor:"{primary.color}",activeColor:"{primary.color}"}},yg={colorScheme:{light:{root:{background:"rgba(0,0,0,0.1)"}},dark:{root:{background:"rgba(255,255,255,0.3)"}}}},kg={root:{transitionDuration:"{transition.duration}"},bar:{size:"9px",borderRadius:"{border.radius.sm}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},colorScheme:{light:{bar:{background:"{surface.100}"}},dark:{bar:{background:"{surface.800}"}}}},wg={root:{background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}},dropdown:{width:"2.5rem",color:"{form.field.icon.color}"},overlay:{background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},list:{padding:"{list.padding}",gap:"{list.gap}",header:{padding:"{list.header.padding}"}},option:{focusBackground:"{list.option.focus.background}",selectedBackground:"{list.option.selected.background}",selectedFocusBackground:"{list.option.selected.focus.background}",color:"{list.option.color}",focusColor:"{list.option.focus.color}",selectedColor:"{list.option.selected.color}",selectedFocusColor:"{list.option.selected.focus.color}",padding:"{list.option.padding}",borderRadius:"{list.option.border.radius}"},optionGroup:{background:"{list.option.group.background}",color:"{list.option.group.color}",fontWeight:"{list.option.group.font.weight}",padding:"{list.option.group.padding}"},clearIcon:{color:"{form.field.icon.color}"},checkmark:{color:"{list.option.color}",gutterStart:"-0.375rem",gutterEnd:"0.375rem"},emptyMessage:{padding:"{list.option.padding}"}},xg={root:{borderRadius:"{form.field.border.radius}"},colorScheme:{light:{root:{invalidBorderColor:"{form.field.invalid.border.color}"}},dark:{root:{invalidBorderColor:"{form.field.invalid.border.color}"}}}},vg={root:{borderRadius:"{content.border.radius}"},colorScheme:{light:{root:{background:"{surface.200}",animationBackground:"rgba(255,255,255,0.4)"}},dark:{root:{background:"rgba(255, 255, 255, 0.06)",animationBackground:"rgba(255, 255, 255, 0.04)"}}}},Cg={root:{transitionDuration:"{transition.duration}"},track:{background:"{content.border.color}",borderRadius:"{content.border.radius}",size:"3px"},range:{background:"{primary.color}"},handle:{width:"20px",height:"20px",borderRadius:"50%",background:"{content.border.color}",hoverBackground:"{content.border.color}",content:{borderRadius:"50%",hoverBackground:"{content.background}",width:"16px",height:"16px",shadow:"0px 0.5px 0px 0px rgba(0, 0, 0, 0.08), 0px 1px 1px 0px rgba(0, 0, 0, 0.14)"},focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},colorScheme:{light:{handle:{contentBackground:"{surface.0}"}},dark:{handle:{contentBackground:"{surface.950}"}}}},Eg={root:{gap:"0.5rem",transitionDuration:"{transition.duration}"}},Sg={root:{borderRadius:"{form.field.border.radius}",roundedBorderRadius:"2rem",raisedShadow:"0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12)"}},Bg={root:{background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",transitionDuration:"{transition.duration}"},gutter:{background:"{content.border.color}"},handle:{size:"24px",background:"transparent",borderRadius:"{content.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}}},Ng={root:{transitionDuration:"{transition.duration}"},separator:{background:"{content.border.color}",activeBackground:"{primary.color}",margin:"0 0 0 1.625rem",size:"2px"},step:{padding:"0.5rem",gap:"1rem"},stepHeader:{padding:"0",borderRadius:"{content.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"},gap:"0.5rem"},stepTitle:{color:"{text.muted.color}",activeColor:"{primary.color}",fontWeight:"500"},stepNumber:{background:"{content.background}",activeBackground:"{content.background}",borderColor:"{content.border.color}",activeBorderColor:"{content.border.color}",color:"{text.muted.color}",activeColor:"{primary.color}",size:"2rem",fontSize:"1.143rem",fontWeight:"500",borderRadius:"50%",shadow:"0px 0.5px 0px 0px rgba(0, 0, 0, 0.06), 0px 1px 1px 0px rgba(0, 0, 0, 0.12)"},steppanels:{padding:"0.875rem 0.5rem 1.125rem 0.5rem"},steppanel:{background:"{content.background}",color:"{content.color}",padding:"0",indent:"1rem"}},_g={root:{transitionDuration:"{transition.duration}"},separator:{background:"{content.border.color}"},itemLink:{borderRadius:"{content.border.radius}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"},gap:"0.5rem"},itemLabel:{color:"{text.muted.color}",activeColor:"{primary.color}",fontWeight:"500"},itemNumber:{background:"{content.background}",activeBackground:"{content.background}",borderColor:"{content.border.color}",activeBorderColor:"{content.border.color}",color:"{text.muted.color}",activeColor:"{primary.color}",size:"2rem",fontSize:"1.143rem",fontWeight:"500",borderRadius:"50%",shadow:"0px 0.5px 0px 0px rgba(0, 0, 0, 0.06), 0px 1px 1px 0px rgba(0, 0, 0, 0.12)"}},Rg={root:{transitionDuration:"{transition.duration}"},tablist:{borderWidth:"0 0 1px 0",background:"{content.background}",borderColor:"{content.border.color}"},item:{background:"transparent",hoverBackground:"transparent",activeBackground:"transparent",borderWidth:"0 0 1px 0",borderColor:"{content.border.color}",hoverBorderColor:"{content.border.color}",activeBorderColor:"{primary.color}",color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{primary.color}",padding:"1rem 1.125rem",fontWeight:"600",margin:"0 0 -1px 0",gap:"0.5rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},itemIcon:{color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{primary.color}"},activeBar:{height:"1px",bottom:"-1px",background:"{primary.color}"}},Tg={root:{transitionDuration:"{transition.duration}"},tablist:{borderWidth:"0 0 1px 0",background:"{content.background}",borderColor:"{content.border.color}"},tab:{background:"transparent",hoverBackground:"transparent",activeBackground:"transparent",borderWidth:"0 0 1px 0",borderColor:"{content.border.color}",hoverBorderColor:"{content.border.color}",activeBorderColor:"{primary.color}",color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{primary.color}",padding:"1rem 1.125rem",fontWeight:"600",margin:"0 0 -1px 0",gap:"0.5rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"}},tabpanel:{background:"{content.background}",color:"{content.color}",padding:"0.875rem 1.125rem 1.125rem 1.125rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"inset {focus.ring.shadow}"}},navButton:{background:"{content.background}",color:"{text.muted.color}",hoverColor:"{text.color}",width:"2.5rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"}},activeBar:{height:"1px",bottom:"-1px",background:"{primary.color}"},colorScheme:{light:{navButton:{shadow:"0px 0px 10px 50px rgba(255, 255, 255, 0.6)"}},dark:{navButton:{shadow:"0px 0px 10px 50px color-mix(in srgb, {content.background}, transparent 50%)"}}}},Dg={root:{transitionDuration:"{transition.duration}"},tabList:{background:"{content.background}",borderColor:"{content.border.color}"},tab:{borderColor:"{content.border.color}",activeBorderColor:"{primary.color}",color:"{text.muted.color}",hoverColor:"{text.color}",activeColor:"{primary.color}"},tabPanel:{background:"{content.background}",color:"{content.color}"},navButton:{background:"{content.background}",color:"{text.muted.color}",hoverColor:"{text.color}"},colorScheme:{light:{navButton:{shadow:"0px 0px 10px 50px rgba(255, 255, 255, 0.6)"}},dark:{navButton:{shadow:"0px 0px 10px 50px color-mix(in srgb, {content.background}, transparent 50%)"}}}},Og={root:{fontSize:"0.875rem",fontWeight:"700",padding:"0.25rem 0.5rem",gap:"0.25rem",borderRadius:"{content.border.radius}",roundedBorderRadius:"{border.radius.xl}"},icon:{size:"0.75rem"},colorScheme:{light:{primary:{background:"{primary.100}",color:"{primary.700}"},secondary:{background:"{surface.100}",color:"{surface.600}"},success:{background:"{green.100}",color:"{green.700}"},info:{background:"{sky.100}",color:"{sky.700}"},warn:{background:"{orange.100}",color:"{orange.700}"},danger:{background:"{red.100}",color:"{red.700}"},contrast:{background:"{surface.950}",color:"{surface.0}"}},dark:{primary:{background:"color-mix(in srgb, {primary.500}, transparent 84%)",color:"{primary.300}"},secondary:{background:"{surface.800}",color:"{surface.300}"},success:{background:"color-mix(in srgb, {green.500}, transparent 84%)",color:"{green.300}"},info:{background:"color-mix(in srgb, {sky.500}, transparent 84%)",color:"{sky.300}"},warn:{background:"color-mix(in srgb, {orange.500}, transparent 84%)",color:"{orange.300}"},danger:{background:"color-mix(in srgb, {red.500}, transparent 84%)",color:"{red.300}"},contrast:{background:"{surface.0}",color:"{surface.950}"}}}},Vg={root:{background:"{form.field.background}",borderColor:"{form.field.border.color}",color:"{form.field.color}",height:"18rem",padding:"{form.field.padding.y} {form.field.padding.x}",borderRadius:"{form.field.border.radius}"},prompt:{gap:"0.25rem"},commandResponse:{margin:"2px 0"}},$g={root:{background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}}},Fg={root:{background:"{content.background}",borderColor:"{content.border.color}",color:"{content.color}",borderRadius:"{content.border.radius}",shadow:"{overlay.navigation.shadow}",transitionDuration:"{transition.duration}"},list:{padding:"{navigation.list.padding}",gap:"{navigation.list.gap}"},item:{focusBackground:"{navigation.item.focus.background}",activeBackground:"{navigation.item.active.background}",color:"{navigation.item.color}",focusColor:"{navigation.item.focus.color}",activeColor:"{navigation.item.active.color}",padding:"{navigation.item.padding}",borderRadius:"{navigation.item.border.radius}",gap:"{navigation.item.gap}",icon:{color:"{navigation.item.icon.color}",focusColor:"{navigation.item.icon.focus.color}",activeColor:"{navigation.item.icon.active.color}"}},submenu:{mobileIndent:"1rem"},submenuIcon:{size:"{navigation.submenu.icon.size}",color:"{navigation.submenu.icon.color}",focusColor:"{navigation.submenu.icon.focus.color}",activeColor:"{navigation.submenu.icon.active.color}"},separator:{borderColor:"{content.border.color}"}},Ag={event:{minHeight:"5rem"},horizontal:{eventContent:{padding:"1rem 0"}},vertical:{eventContent:{padding:"0 1rem"}},eventMarker:{size:"1.125rem",borderRadius:"50%",borderWidth:"2px",background:"{content.background}",borderColor:"{content.border.color}",content:{borderRadius:"50%",size:"0.375rem",background:"{primary.color}",insetShadow:"0px 0.5px 0px 0px rgba(0, 0, 0, 0.06), 0px 1px 1px 0px rgba(0, 0, 0, 0.12)"}},eventConnector:{color:"{content.border.color}",size:"2px"}},Ig={root:{width:"25rem",borderRadius:"{content.border.radius}",borderWidth:"1px",transitionDuration:"{transition.duration}"},icon:{size:"1.125rem"},content:{padding:"{overlay.popover.padding}",gap:"0.5rem"},text:{gap:"0.5rem"},summary:{fontWeight:"500",fontSize:"1rem"},detail:{fontWeight:"500",fontSize:"0.875rem"},closeButton:{width:"1.75rem",height:"1.75rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",offset:"{focus.ring.offset}"}},closeIcon:{size:"1rem"},colorScheme:{light:{blur:"1.5px",info:{background:"color-mix(in srgb, {blue.50}, transparent 5%)",borderColor:"{blue.200}",color:"{blue.600}",detailColor:"{surface.700}",shadow:"0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)",closeButton:{hoverBackground:"{blue.100}",focusRing:{color:"{blue.600}",shadow:"none"}}},success:{background:"color-mix(in srgb, {green.50}, transparent 5%)",borderColor:"{green.200}",color:"{green.600}",detailColor:"{surface.700}",shadow:"0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)",closeButton:{hoverBackground:"{green.100}",focusRing:{color:"{green.600}",shadow:"none"}}},warn:{background:"color-mix(in srgb,{yellow.50}, transparent 5%)",borderColor:"{yellow.200}",color:"{yellow.600}",detailColor:"{surface.700}",shadow:"0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)",closeButton:{hoverBackground:"{yellow.100}",focusRing:{color:"{yellow.600}",shadow:"none"}}},error:{background:"color-mix(in srgb, {red.50}, transparent 5%)",borderColor:"{red.200}",color:"{red.600}",detailColor:"{surface.700}",shadow:"0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)",closeButton:{hoverBackground:"{red.100}",focusRing:{color:"{red.600}",shadow:"none"}}},secondary:{background:"{surface.100}",borderColor:"{surface.200}",color:"{surface.600}",detailColor:"{surface.700}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)",closeButton:{hoverBackground:"{surface.200}",focusRing:{color:"{surface.600}",shadow:"none"}}},contrast:{background:"{surface.900}",borderColor:"{surface.950}",color:"{surface.50}",detailColor:"{surface.0}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)",closeButton:{hoverBackground:"{surface.800}",focusRing:{color:"{surface.50}",shadow:"none"}}}},dark:{blur:"10px",info:{background:"color-mix(in srgb, {blue.500}, transparent 84%)",borderColor:"color-mix(in srgb, {blue.700}, transparent 64%)",color:"{blue.500}",detailColor:"{surface.0}",shadow:"0px 4px 8px 0px color-mix(in srgb, {blue.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{blue.500}",shadow:"none"}}},success:{background:"color-mix(in srgb, {green.500}, transparent 84%)",borderColor:"color-mix(in srgb, {green.700}, transparent 64%)",color:"{green.500}",detailColor:"{surface.0}",shadow:"0px 4px 8px 0px color-mix(in srgb, {green.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{green.500}",shadow:"none"}}},warn:{background:"color-mix(in srgb, {yellow.500}, transparent 84%)",borderColor:"color-mix(in srgb, {yellow.700}, transparent 64%)",color:"{yellow.500}",detailColor:"{surface.0}",shadow:"0px 4px 8px 0px color-mix(in srgb, {yellow.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{yellow.500}",shadow:"none"}}},error:{background:"color-mix(in srgb, {red.500}, transparent 84%)",borderColor:"color-mix(in srgb, {red.700}, transparent 64%)",color:"{red.500}",detailColor:"{surface.0}",shadow:"0px 4px 8px 0px color-mix(in srgb, {red.500}, transparent 96%)",closeButton:{hoverBackground:"rgba(255, 255, 255, 0.05)",focusRing:{color:"{red.500}",shadow:"none"}}},secondary:{background:"{surface.800}",borderColor:"{surface.700}",color:"{surface.300}",detailColor:"{surface.0}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.500}, transparent 96%)",closeButton:{hoverBackground:"{surface.700}",focusRing:{color:"{surface.300}",shadow:"none"}}},contrast:{background:"{surface.0}",borderColor:"{surface.100}",color:"{surface.950}",detailColor:"{surface.950}",shadow:"0px 4px 8px 0px color-mix(in srgb, {surface.950}, transparent 96%)",closeButton:{hoverBackground:"{surface.100}",focusRing:{color:"{surface.950}",shadow:"none"}}}}}},Pg={root:{padding:"0.5rem 1rem",borderRadius:"{content.border.radius}",gap:"0.5rem",fontWeight:"500",disabledBackground:"{form.field.disabled.background}",disabledBorderColor:"{form.field.disabled.background}",disabledColor:"{form.field.disabled.color}",invalidBorderColor:"{form.field.invalid.border.color}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",padding:"0.375rem 0.75rem"},lg:{fontSize:"{form.field.lg.font.size}",padding:"0.625rem 1.25rem"}},icon:{disabledColor:"{form.field.disabled.color}"},content:{left:"0.25rem",top:"0.25rem",checkedShadow:"0px 1px 2px 0px rgba(0, 0, 0, 0.02), 0px 1px 2px 0px rgba(0, 0, 0, 0.04)"},colorScheme:{light:{root:{background:"{surface.100}",checkedBackground:"{surface.100}",hoverBackground:"{surface.100}",borderColor:"{surface.100}",color:"{surface.500}",hoverColor:"{surface.700}",checkedColor:"{surface.900}",checkedBorderColor:"{surface.100}"},content:{checkedBackground:"{surface.0}"},icon:{color:"{surface.500}",hoverColor:"{surface.700}",checkedColor:"{surface.900}"}},dark:{root:{background:"{surface.950}",checkedBackground:"{surface.950}",hoverBackground:"{surface.950}",borderColor:"{surface.950}",color:"{surface.400}",hoverColor:"{surface.300}",checkedColor:"{surface.0}",checkedBorderColor:"{surface.950}"},content:{checkedBackground:"{surface.800}"},icon:{color:"{surface.400}",hoverColor:"{surface.300}",checkedColor:"{surface.0}"}}}},Lg={root:{width:"2.5rem",height:"1.5rem",borderRadius:"30px",gap:"0.25rem",shadow:"{form.field.shadow}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"},borderWidth:"1px",borderColor:"transparent",hoverBorderColor:"transparent",checkedBorderColor:"transparent",checkedHoverBorderColor:"transparent",invalidBorderColor:"{form.field.invalid.border.color}",transitionDuration:"{form.field.transition.duration}",slideDuration:"0.2s"},handle:{borderRadius:"50%",size:"1rem"},colorScheme:{light:{root:{background:"{surface.300}",disabledBackground:"{form.field.disabled.background}",hoverBackground:"{surface.400}",checkedBackground:"{primary.color}",checkedHoverBackground:"{primary.hover.color}"},handle:{background:"{surface.0}",disabledBackground:"{form.field.disabled.color}",hoverBackground:"{surface.0}",checkedBackground:"{surface.0}",checkedHoverBackground:"{surface.0}",color:"{text.muted.color}",hoverColor:"{text.color}",checkedColor:"{primary.color}",checkedHoverColor:"{primary.hover.color}"}},dark:{root:{background:"{surface.700}",disabledBackground:"{surface.600}",hoverBackground:"{surface.600}",checkedBackground:"{primary.color}",checkedHoverBackground:"{primary.hover.color}"},handle:{background:"{surface.400}",disabledBackground:"{surface.900}",hoverBackground:"{surface.300}",checkedBackground:"{surface.900}",checkedHoverBackground:"{surface.900}",color:"{surface.900}",hoverColor:"{surface.800}",checkedColor:"{primary.color}",checkedHoverColor:"{primary.hover.color}"}}}},Mg={root:{background:"{content.background}",borderColor:"{content.border.color}",borderRadius:"{content.border.radius}",color:"{content.color}",gap:"0.5rem",padding:"0.75rem"}},jg={root:{maxWidth:"12.5rem",gutter:"0.25rem",shadow:"{overlay.popover.shadow}",padding:"0.5rem 0.75rem",borderRadius:"{overlay.popover.border.radius}"},colorScheme:{light:{root:{background:"{surface.700}",color:"{surface.0}"}},dark:{root:{background:"{surface.700}",color:"{surface.0}"}}}},zg={root:{background:"{content.background}",color:"{content.color}",padding:"1rem",gap:"2px",indent:"1rem",transitionDuration:"{transition.duration}"},node:{padding:"0.25rem 0.5rem",borderRadius:"{content.border.radius}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",color:"{text.color}",hoverColor:"{text.hover.color}",selectedColor:"{highlight.color}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"},gap:"0.25rem"},nodeIcon:{color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",selectedColor:"{highlight.color}"},nodeToggleButton:{borderRadius:"50%",size:"1.75rem",hoverBackground:"{content.hover.background}",selectedHoverBackground:"{content.background}",color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",selectedHoverColor:"{primary.color}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},loadingIcon:{size:"2rem"},filter:{margin:"0 0 0.5rem 0"}},Ug={root:{background:"{form.field.background}",disabledBackground:"{form.field.disabled.background}",filledBackground:"{form.field.filled.background}",filledHoverBackground:"{form.field.filled.hover.background}",filledFocusBackground:"{form.field.filled.focus.background}",borderColor:"{form.field.border.color}",hoverBorderColor:"{form.field.hover.border.color}",focusBorderColor:"{form.field.focus.border.color}",invalidBorderColor:"{form.field.invalid.border.color}",color:"{form.field.color}",disabledColor:"{form.field.disabled.color}",placeholderColor:"{form.field.placeholder.color}",invalidPlaceholderColor:"{form.field.invalid.placeholder.color}",shadow:"{form.field.shadow}",paddingX:"{form.field.padding.x}",paddingY:"{form.field.padding.y}",borderRadius:"{form.field.border.radius}",focusRing:{width:"{form.field.focus.ring.width}",style:"{form.field.focus.ring.style}",color:"{form.field.focus.ring.color}",offset:"{form.field.focus.ring.offset}",shadow:"{form.field.focus.ring.shadow}"},transitionDuration:"{form.field.transition.duration}",sm:{fontSize:"{form.field.sm.font.size}",paddingX:"{form.field.sm.padding.x}",paddingY:"{form.field.sm.padding.y}"},lg:{fontSize:"{form.field.lg.font.size}",paddingX:"{form.field.lg.padding.x}",paddingY:"{form.field.lg.padding.y}"}},dropdown:{width:"2.5rem",color:"{form.field.icon.color}"},overlay:{background:"{overlay.select.background}",borderColor:"{overlay.select.border.color}",borderRadius:"{overlay.select.border.radius}",color:"{overlay.select.color}",shadow:"{overlay.select.shadow}"},tree:{padding:"{list.padding}"},clearIcon:{color:"{form.field.icon.color}"},emptyMessage:{padding:"{list.option.padding}"},chip:{borderRadius:"{border.radius.sm}"}},Wg={root:{transitionDuration:"{transition.duration}"},header:{background:"{content.background}",borderColor:"{treetable.border.color}",color:"{content.color}",borderWidth:"0 0 1px 0",padding:"0.75rem 1rem"},headerCell:{background:"{content.background}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",borderColor:"{treetable.border.color}",color:"{content.color}",hoverColor:"{content.hover.color}",selectedColor:"{highlight.color}",gap:"0.5rem",padding:"0.75rem 1rem",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"}},columnTitle:{fontWeight:"600"},row:{background:"{content.background}",hoverBackground:"{content.hover.background}",selectedBackground:"{highlight.background}",color:"{content.color}",hoverColor:"{content.hover.color}",selectedColor:"{highlight.color}",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"-1px",shadow:"{focus.ring.shadow}"}},bodyCell:{borderColor:"{treetable.border.color}",padding:"0.75rem 1rem",gap:"0.5rem"},footerCell:{background:"{content.background}",borderColor:"{treetable.border.color}",color:"{content.color}",padding:"0.75rem 1rem"},columnFooter:{fontWeight:"600"},footer:{background:"{content.background}",borderColor:"{treetable.border.color}",color:"{content.color}",borderWidth:"0 0 1px 0",padding:"0.75rem 1rem"},columnResizerWidth:"0.5rem",resizeIndicator:{width:"1px",color:"{primary.color}"},sortIcon:{color:"{text.muted.color}",hoverColor:"{text.hover.muted.color}",size:"0.875rem"},loadingIcon:{size:"2rem"},nodeToggleButton:{hoverBackground:"{content.hover.background}",selectedHoverBackground:"{content.background}",color:"{text.muted.color}",hoverColor:"{text.color}",selectedHoverColor:"{primary.color}",size:"1.75rem",borderRadius:"50%",focusRing:{width:"{focus.ring.width}",style:"{focus.ring.style}",color:"{focus.ring.color}",offset:"{focus.ring.offset}",shadow:"{focus.ring.shadow}"}},paginatorTop:{borderColor:"{content.border.color}",borderWidth:"0 0 1px 0"},paginatorBottom:{borderColor:"{content.border.color}",borderWidth:"0 0 1px 0"},colorScheme:{light:{root:{borderColor:"{content.border.color}"},bodyCell:{selectedBorderColor:"{primary.100}"}},dark:{root:{borderColor:"{surface.800}"},bodyCell:{selectedBorderColor:"{primary.900}"}}}},qg={loader:{mask:{background:"{content.background}",color:"{text.muted.color}"},icon:{size:"2rem"}}};function Zt(e){"@babel/helpers - typeof";return Zt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zt(e)}function Ja(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Qa(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ja(Object(r),!0).forEach(function(n){Hg(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ja(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hg(e,t,r){return(t=Kg(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Kg(e){var t=Yg(e,"string");return Zt(t)=="symbol"?t:t+""}function Yg(e,t){if(Zt(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(Zt(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Gg=Qa(Qa({},gp),{},{components:{accordion:up,autocomplete:fp,avatar:mp,badge:pp,blockui:hp,breadcrumb:bp,button:yp,datepicker:Tp,card:kp,carousel:wp,cascadeselect:xp,checkbox:vp,chip:Cp,colorpicker:Ep,confirmdialog:Sp,confirmpopup:Bp,contextmenu:Np,dataview:Rp,datatable:_p,dialog:Dp,divider:Op,dock:Vp,drawer:$p,editor:Fp,fieldset:Ap,fileupload:Ip,iftalabel:jp,floatlabel:Pp,galleria:Lp,iconfield:Mp,image:zp,imagecompare:Up,inlinemessage:Wp,inplace:qp,inputchips:Hp,inputgroup:Kp,inputnumber:Yp,inputotp:Gp,inputtext:Xp,knob:Jp,listbox:Qp,megamenu:Zp,menu:eg,menubar:tg,message:og,metergroup:rg,multiselect:ng,orderlist:ag,organizationchart:ig,overlaybadge:lg,popover:mg,paginator:sg,password:ug,panel:cg,panelmenu:dg,picklist:fg,progressbar:pg,progressspinner:gg,radiobutton:hg,rating:bg,scrollpanel:kg,select:wg,selectbutton:xg,skeleton:vg,slider:Cg,speeddial:Eg,splitter:Bg,splitbutton:Sg,stepper:Ng,steps:_g,tabmenu:Rg,tabs:Tg,tabview:Dg,textarea:$g,tieredmenu:Fg,tag:Og,terminal:Vg,timeline:Ag,togglebutton:Pg,toggleswitch:Lg,tree:zg,treeselect:Ug,treetable:Wg,toast:Ig,toolbar:Mg,virtualscroller:qg},directives:{tooltip:jg,ripple:yg}});function Xg(){const{layoutState:e,layoutConfig:t,setMenuMode:r,isDarkTheme:n}=Qm(),a={Aura:Gg};o.ref(Object.keys(a));const i=o.ref(t.preset);o.ref(t.darkTheme),o.ref(t.menuMode),o.ref([{name:"Light",value:!1},{name:"Dark",value:!0}]);const l=o.ref([{name:"noir",palette:{}},{name:"emerald",palette:{500:"#10b981"}},{name:"green",palette:{500:"#22c55e"}},{name:"lime",palette:{500:"#84cc16"}},{name:"orange",palette:{500:"#f97316"}},{name:"amber",palette:{500:"#f59e0b"}},{name:"yellow",palette:{500:"#eab308"}},{name:"teal",palette:{500:"#14b8a6"}},{name:"cyan",palette:{500:"#06b6d4"}},{name:"sky",palette:{500:"#0ea5e9"}},{name:"blue",palette:{500:"#3b82f6"}},{name:"indigo",palette:{500:"#6366f1"}},{name:"violet",palette:{500:"#8b5cf6"}},{name:"purple",palette:{500:"#a855f7"}},{name:"fuchsia",palette:{500:"#d946ef"}},{name:"pink",palette:{500:"#ec4899"}},{name:"rose",palette:{500:"#f43f5e"}}]),d=o.ref([{name:"slate",palette:{500:"#64748b"}},{name:"gray",palette:{500:"#6b7280"}},{name:"zinc",palette:{500:"#71717a"}},{name:"neutral",palette:{500:"#737373"}},{name:"stone",palette:{500:"#78716c"}},{name:"soho",palette:{500:"#8e8f93"}},{name:"viva",palette:{500:"#87898a"}},{name:"ocean",palette:{500:"#828787"}}]);function u(){if(!document.startViewTransition){s();return}document.startViewTransition(()=>s())}function s(){t.darkTheme=!t.darkTheme,t.menuTheme=n.value?"dark":"light",document.documentElement.classList.toggle("app-dark")}function c(){const g=l.value.find(h=>h.name===t.primary);if(g.name==="noir"){const h=[50,100,200,300,400,500,600,700,800,900,950],b={};return h.forEach(k=>{b[k]=`{surface.${k}}`}),{semantic:{primary:b,colorScheme:{light:{primary:{color:"{primary.950}",contrastColor:"#ffffff",hoverColor:"{primary.800}",activeColor:"{primary.700}"},highlight:{background:"{primary.950}",focusBackground:"{primary.700}",color:"#ffffff",focusColor:"#ffffff"}},dark:{primary:{color:"{primary.50}",contrastColor:"{primary.950}",hoverColor:"{primary.200}",activeColor:"{primary.300}"},highlight:{background:"{primary.50}",focusBackground:"{primary.300}",color:"{primary.950}",focusColor:"{primary.950}"}}}}}}else return{semantic:{primary:g.palette,colorScheme:{light:{primary:{color:"{primary.500}",contrastColor:"#ffffff",hoverColor:"{primary.600}",activeColor:"{primary.700}"},highlight:{background:"{primary.50}",focusBackground:"{primary.100}",color:"{primary.700}",focusColor:"{primary.800}"}},dark:{primary:{color:"{primary.400}",contrastColor:"{surface.900}",hoverColor:"{primary.300}",activeColor:"{primary.200}"},highlight:{background:"color-mix(in srgb, {primary.400}, transparent 84%)",focusBackground:"color-mix(in srgb, {primary.400}, transparent 76%)",color:"rgba(255,255,255,.87)",focusColor:"rgba(255,255,255,.87)"}}}}}}function f(g){var h;if((h=g.semantic)!=null&&h.primary){const b=g.semantic.primary[500];document.documentElement.style.setProperty("--p-button-primary-background",b),document.documentElement.style.setProperty("--p-button-primary-border-color",b)}}function m(g,h){let b;if(g==="primary"){if(b=l.value.find(k=>k.name===h),!b)return;t.primary=b.name,f({semantic:{primary:b.palette}})}if(g==="surface"){if(b=d.value.find(k=>k.name===h),!b)return;t.surface=b.name,dp(b.palette)}}function p(){var b;t.preset=i.value;const g=a[i.value],h=(b=d.value.find(k=>k.name===t.surface))==null?void 0:b.palette;Xa().preset(g).preset(c()).surfacePalette(h).use({useDefaultOptions:!0})}return{toggleDarkMode:u,updateColors:m,onPresetChange:p}}function Jg(e){const t=new Ue;return{getEntityRecord:async(n,a,i)=>{try{const l=await t.getRecord(n,a);if(l&&l.response)return i!=null&&i!=""&&e(i,l.response),l}catch(l){return l}finally{}}}}function Qg(e){const t=new Ue;return{addEntityRecord:async(n,a,i)=>{const l={dataDefinitions:Object.entries(a).map(([d,u])=>({recordColumnName:d,recordColumnValue:u}))};try{const d=await t.addRecord(n,l);if(d&&d.response)return i!=null&&i!=""&&e(i,d.response),d}catch(d){return d}finally{}}}}function Zg(e){const t=new Ue;return{deleteEntityRecord:async(n,a,i)=>{try{const l=await t.deleteRecord(n,a);if(l&&l.response)return i!=null&&i!=""&&e(i,l.response),l}catch(l){return l}finally{}}}}function e0(){const e=Ne(),{get:t,post:r,put:n,del:a}=kt(),i=()=>e.getAppId();return{getThemes:async()=>{const c=i();return await t(`/api/app/v1/${c}/theme`)},getThemesData:async c=>(i(),await t(`/api/platform/v1/theme/${c}`)),saveTheme:async c=>{const f=i();return await r(`/api/app/v1/${f}/theme`,c)},updatetheme:async c=>{const f=i();return await n(`/api/app/v1/${f}/theme`,c)}}}function t0(){const e=Ne(),{get:t,post:r,put:n,del:a}=kt(),i=()=>e.getAppId();return{getPlatformComponents:async()=>await t("/api/platform/v1/search/COMPONENT_PALLET?page=0&size=50&continue"),getComponent:async f=>{const m=i();return await t(`/api/app/v1/${m}/content/component/${f}`)},getAllComponents:async f=>{const m=i();return await t(`/api/app/v1/${m}/content/component`)},createComponent:async f=>{const m=i();return await r(`/api/app/v1/${m}/content/component`,f)},getComponentTemplates:async f=>await t(`api/platform/v1/search/COMPONENT_TEMPLATE?keyword=${f}&page=0&size=50`)}}function o0(){Ne();const{get:e,post:t,put:r,del:n}=kt();return{getActiveUser:async()=>await e("/users/me")}}function r0(){const e=Ne(),{get:t,post:r,put:n,del:a}=kt(),i=()=>e.getAppId();return{getPage:async s=>{const c=i();return await t(`/api/app/v1/${c}/content/page/${s}`)},getPages:async()=>{const s=i();return await t(`/api/app/v1/${s}/content/page`)},createPage:async s=>{const c=i();return await r(`/api/app/v1/${c}/content/page`,s)}}}function n0(){const{get:e,post:t,put:r,del:n}=kt();return{getLayoutTemplates:async d=>await e("/page/layout"),saveLayout:async d=>await t("/page/layout",d),updateLayout:async d=>await r("/page/layout/layout",d)}}const a0={install(e,t){e.component("CSEntityGrid",gr),e.component("csentitygrid",gr),e.component("CSEntityList",ia),e.component("csentitylist",ia),e.component("CSFieldExpression",La),e.component("csfieldexpression",La),e.component("CSEntity360View",aa),e.component("csentity360view",aa),e.component("CSEntityListing",la),e.component("csentitylisting",la),e.component("CSEntityListingTile",sa),e.component("csentitylistingtile",sa),e.component("CSEntityListingCarousel",Ca),e.component("csentitylistingcarousel",Ca),e.component("CSEntitySelection",kr),e.component("csentityselection",kr),e.component("CSEntityExplorer",Ma),e.component("csentityexplorer",Ma),e.component("CSMenu",ja),e.component("csmenu",ja),e.component("CSTextInput",za),e.component("cstextinput",za)}};ke.default=a0,ke.useAddEntityRecord=Qg,ke.useComponentService=t0,ke.useDeleteEntityRecord=Zg,ke.useEntitiesStore=Sa,ke.useEntityRecordService=Ue,ke.useEntityService=Ea,ke.useGetEntityRecord=Jg,ke.useGlobalConfigsStore=Ne,ke.useLayoutService=n0,ke.usePageService=r0,ke.useSecurityService=o0,ke.useThemeConfig=Xg,ke.useThemeService=e0,Object.defineProperties(ke,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});