@platforma-sdk/ui-vue 1.14.0 → 1.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/lib.js +11921 -10921
- package/dist/lib.umd.cjs +37 -37
- package/dist/src/components/PlTableFilters/PlTableAddFilter.vue.d.ts +20 -0
- package/dist/src/components/PlTableFilters/PlTableAddFilter.vue.d.ts.map +1 -0
- package/dist/src/components/PlTableFilters/PlTableFilterEntry.vue.d.ts +16 -0
- package/dist/src/components/PlTableFilters/PlTableFilterEntry.vue.d.ts.map +1 -0
- package/dist/src/components/{PlAgDataTable → PlTableFilters}/PlTableFilters.vue.d.ts +2 -1
- package/dist/src/components/PlTableFilters/PlTableFilters.vue.d.ts.map +1 -0
- package/dist/src/components/PlTableFilters/filters_logic.d.ts +18 -0
- package/dist/src/components/PlTableFilters/filters_logic.d.ts.map +1 -0
- package/dist/src/components/PlTableFilters/index.d.ts +2 -0
- package/dist/src/components/PlTableFilters/index.d.ts.map +1 -0
- package/dist/src/lib.d.ts +2 -2
- package/dist/src/lib.d.ts.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +5 -3
- package/src/components/PlAgDataTable/pl-table-filters.scss +98 -0
- package/src/components/PlAgGridColumnManager/PlAgGridColumnManager.vue +1 -1
- package/src/components/PlTableFilters/PlTableAddFilter.vue +60 -0
- package/src/components/PlTableFilters/PlTableFilterEntry.vue +61 -0
- package/src/components/PlTableFilters/PlTableFilters.vue +249 -0
- package/src/components/PlTableFilters/filters_logic.ts +347 -0
- package/src/components/PlTableFilters/index.ts +1 -0
- package/src/components/PlTableFilters/pl-table-filters.scss +98 -0
- package/src/lib.ts +3 -2
- package/dist/src/components/PlAgDataTable/PlTableFilters.vue.d.ts.map +0 -1
- package/src/components/PlAgDataTable/PlTableFilters.vue +0 -559
package/dist/lib.umd.cjs
CHANGED
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(L,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("vue"),require("@ag-grid-enterprise/core"),require("@ag-grid-community/core"),require("@ag-grid-community/client-side-row-model"),require("@ag-grid-community/infinite-row-model"),require("@ag-grid-enterprise/server-side-row-model"),require("@ag-grid-community/csv-export"),require("@ag-grid-enterprise/clipboard"),require("@ag-grid-enterprise/range-selection"),require("@ag-grid-enterprise/rich-select"),require("@ag-grid-enterprise/menu"),require("@ag-grid-enterprise/excel-export"),require("@ag-grid-community/theming"),require("@ag-grid-community/vue3")):typeof define=="function"&&define.amd?define(["exports","vue","@ag-grid-enterprise/core","@ag-grid-community/core","@ag-grid-community/client-side-row-model","@ag-grid-community/infinite-row-model","@ag-grid-enterprise/server-side-row-model","@ag-grid-community/csv-export","@ag-grid-enterprise/clipboard","@ag-grid-enterprise/range-selection","@ag-grid-enterprise/rich-select","@ag-grid-enterprise/menu","@ag-grid-enterprise/excel-export","@ag-grid-community/theming","@ag-grid-community/vue3"],r):(L=typeof globalThis<"u"?globalThis:L||self,r(L.SdkVueLib={},L.Vue,L.core$1,L.core,L.clientSideRowModel,L.infiniteRowModel,L.serverSideRowModel,L.csvExport,L.clipboard,L.rangeSelection,L.richSelect,L.menu,L.excelExport,L.theming,L.vue3))})(this,function(L,r,Me,T,hs,kg,Zd,Sg,jd,Wd,Eg,Tg,Ng,Hd,Ag){"use strict";var BM=Object.defineProperty;var wg=L=>{throw TypeError(L)};var PM=(L,r,Me)=>r in L?BM(L,r,{enumerable:!0,configurable:!0,writable:!0,value:Me}):L[r]=Me;var We=(L,r,Me)=>PM(L,typeof r!="symbol"?r+"":r,Me),Md=(L,r,Me)=>r.has(L)||wg("Cannot "+Me);var k=(L,r,Me)=>(Md(L,r,"read from private field"),Me?Me.call(L):r.get(L)),Ue=(L,r,Me)=>r.has(L)?wg("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(L):r.set(L,Me),ye=(L,r,Me,T)=>(Md(L,r,"write to private field"),T?T.call(L,Me):r.set(L,Me),Me),ue=(L,r,Me)=>(Md(L,r,"access private method"),Me);var ja=(L,r,Me,T)=>({set _(hs){ye(L,r,hs,Me)},get _(){return k(L,r,T)}});var Gh,Bo,$h,zh,Cn,Wt,wn,bn,Po,Ro,pt,xn,dt,Je,Ee,Pt,Ht,Et,yt,kn,vt,Sn,En,qt,Tn,Tr,Rt,re,Gd,Xr,Jn,zi,Kt,xg,Yr,Do,Ui,Or,Lr,$d,Wa,Ha,et,zd,ps,Mr,Ud;function Vg(t,e){if(t==null)throw Error(e??"Empty (null | undefined) value");return t}function Bg(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function Pg(t){let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(Bg(65,91));return e}function Rg(){return Pg(42)}const qd=Array.isArray;function Dg(t){return t!==null&&typeof t=="object"}function Kd(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null}function Dn(t){if(Array.isArray(t)){const e=[];for(let n=0;n<t.length;n++)e[n]=Dn(t[n]);return e}else if(Dg(t)){const e={};return Object.keys(t).forEach(n=>{e[n]=Dn(t[n])}),e}else return t}function Xd(t,e){return new Set([...Object.keys(t),...Object.keys(e)]).forEach(n=>{const o=t[n],i=e[n];Kd(o)&&Kd(i)||qd(o)&&qd(i)&&o.length===i.length?Xd(o,i):t[n]=i}),t}function qa(t,e,n=!0){let o=0,i;return function(...l){i=()=>{t.apply(this,l),o=new Date().getTime()+e,i=null,n&&setTimeout(()=>{i&&i()},e)},new Date().getTime()>o&&i()}}function Ig(t){let e=0n,n;return async function(...o){const i=++e;try{await n}catch{}if(e!==i)return{ok:!1};const l=t(...o);return n=l,{ok:!0,value:await l}}}var Xo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yd(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Fg=function t(e){if(typeof e=="number"&&isNaN(e))throw new Error("NaN is not allowed");if(typeof e=="number"&&!isFinite(e))throw new Error("Infinity is not allowed");return e===null||typeof e!="object"?JSON.stringify(e):e.toJSON instanceof Function?t(e.toJSON()):Array.isArray(e)?`[${e.reduce((i,l,c)=>`${i}${c===0?"":","}${t(l===void 0||typeof l=="symbol"?null:l)}`,"")}]`:`{${Object.keys(e).sort().reduce((o,i)=>{if(e[i]===void 0||typeof e[i]=="symbol")return o;const l=o.length===0?"":",";return`${o}${l}${t(i)}:${t(e[i])}`},"")}}`};const Gr=Yd(Fg);class Ka extends Error{}class Xa extends Error{constructor(e){super(e.join(`
|
|
2
2
|
`)),this.errors=e}toString(){return this.errors.join(`
|
|
3
|
-
`)}}function Vm(t){return{ok:!0,value:t}}function vd(t){if(!t)throw new Da;if(!t.ok)throw Error(t.errors.join(";"));return t.value}function Cd(t){return{value:t,errors:void 0}}function Nm(t){if(t.errors)throw new Fa(t.errors);if(!t.value)throw new Da;return t.value}function Am(t){return t!==void 0}function Ra(t,e){return Or(t)===Or(e)}const Ma=t=>t,Ia=t=>t instanceof Error?t:Error(String(t)),Oa=t=>t.name==="ZodError",La=t=>{const{formErrors:e,fieldErrors:n}=t.flatten(),o=Object.entries(n).map(([s,l])=>s+":"+(l==null?void 0:l.join(",")));return e.concat(o).join("; ")};function Ga(t){const e=t.validate??Ma,{autoSave:n}=t,o=r.ref(),s=r.ref(),l=A=>{s.value={model:Bn(A)}};r.watch(()=>t.get(),A=>l(A),{immediate:!0});const c=()=>{var A;t.onSave(e(Bn((A=s.value)==null?void 0:A.model)))},u=()=>{l(t.get()),o.value=void 0},p=A=>{const I=Ia(A);Oa(I)?o.value=Error(La(I)):o.value=I},f=A=>{o.value=void 0;try{e(A),n&&c()}catch(I){p(I)}},m=r.computed({get:()=>{var A;return(A=s.value)==null?void 0:A.model},set(A){l(A),f(A)}});r.watch(s,(A,I)=>{A&&A===I&&f(A.model)},{deep:!0});const y=r.computed(()=>!o.value),T=r.computed(()=>!Ra(t.get(),r.unref(s))),B=r.computed(()=>o.value?o.value.message:"");return r.reactive({model:m,valid:y,isChanged:T,error:o,errorString:B,save:c,revert:u,setError:p})}function Pm(t,e,n){const o=t.validate??Ma,{autoSave:s}=t,l=r.ref(),c=r.ref(),u=L=>{var C;if(n.deepPatchModel){const R=(C=c.value)==null?void 0:C.model,O=Object.assign(Bn(L),e??{});c.value={model:R?_d(R,O):O,stage:Symbol()}}else c.value={model:Object.assign(Bn(L),e??{}),stage:Symbol()}};r.watch(()=>t.get(),L=>u(L),{immediate:!0});const p=()=>{var L;t.onSave(o(Bn((L=c.value)==null?void 0:L.model)))},f=()=>{u(t.get()),l.value=void 0},m=L=>{const C=Ia(L);Oa(C)?l.value=Error(La(C)):l.value=C},y=L=>{l.value=void 0;try{o(L),s&&p()}catch(C){m(C)}},T=r.computed({get:()=>{var L;return(L=c.value)==null?void 0:L.model},set(){throw Error("Cannot replace base model")}});r.watch([()=>({args:T.value.args,ui:T.value.ui}),()=>{var L;return(L=c.value)==null?void 0:L.stage}],([L,C],[R,O])=>{C===O&&y(L)},{deep:!0});const B=r.computed(()=>!l.value),A=r.computed(()=>{var R;const{args:L,ui:C}=((R=r.unref(c))==null?void 0:R.model)??{};return!Ra(t.get(),{args:L,ui:C})}),I=r.computed(()=>l.value?l.value.message:"");return r.reactive({model:T,valid:B,isChanged:A,error:l,errorString:I,save:p,revert:f,setError:m})}const Dm=t=>Object.fromEntries(new URL(t,"http://dummy").searchParams);function Fm(t,e,n){const o=(C,...R)=>{n.debug&&console.log(`%c>>> %c${C}`,"color: orange; font-weight: bold","color: orange",...R)},l=Pa(e.setBlockArgs,100),c=Pa(e.setBlockUiState,100),u=Pa(e.setBlockArgsAndUiState,100),p=r.reactive({args:Object.freeze(t.args),outputs:Object.freeze(t.outputs),ui:Object.freeze(t.ui),navigationState:Object.freeze(t.navigationState)});e.onStateUpdates(async C=>{C.forEach(R=>{R.key==="args"&&(p.args=Object.freeze(R.value),o("args patch",p.args)),R.key==="ui"&&(p.ui=Object.freeze(R.value),o("ui patch",p.ui)),R.key==="outputs"&&(p.outputs=Object.freeze(R.value),o("outputs patch",p.outputs)),R.key==="navigationState"&&(p.navigationState=Object.freeze(R.value),o("navigationState patch",p.navigationState))}),await r.nextTick()});const f=()=>Bn(p.args),m=()=>Bn(p.ui),y=()=>Bn(p.navigationState),T={createArgsModel(C={}){return Ga({get(){return C.transform?C.transform(p.args):p.args},validate:C.validate,autoSave:!0,onSave(R){l(R)}})},createUiModel(C={},R){return Ga({get(){return C.transform?C.transform(p.ui):p.ui??R()},validate:C.validate,autoSave:!0,onSave(O){c(O)}})},useOutputs(...C){const R=r.reactive({errors:void 0,value:void 0});return r.watch(()=>p.outputs,()=>{try{Object.assign(R,{value:this.unwrapOutputs(...C),errors:void 0})}catch(O){Object.assign(R,{value:void 0,errors:[String(O)]})}},{immediate:!0,deep:!0}),R},unwrapOutputs(...C){const R=p.outputs,O=C.map(F=>[F,vd(R[F])]);return Object.fromEntries(O)},getOutputField(C){return p.outputs[C]},getOutputFieldOkOptional(C){console.warn("use reactive app.outputValues.fieldName instead instead of getOutputFieldOkOptional(fieldName)");const R=this.getOutputField(C);if(R&&R.ok)return R.value},getOutputFieldErrorsOptional(C){console.warn("use reactive app.outputErrors.fieldName instead instead of getOutputFieldErrorsOptional(fieldName)");const R=this.getOutputField(C);if(R&&!R.ok)return R.errors},updateArgs(C){const R=f();return C(R),e.setBlockArgs(R)},updateUiState(C){const R=m();return e.setBlockUiState(C(R))},updateNavigationState(C){const R=y();return C(R),e.setNavigationState(R)},navigateTo(C){const R=y();return R.href=C,e.setNavigationState(R)}},B=r.computed(()=>{const C=Object.entries(p.outputs).map(([R,O])=>[R,O.ok&&O.value!==void 0?O.value:void 0]);return Object.fromEntries(C)}),A=r.computed(()=>{const C=Object.entries(p.outputs).map(([R,O])=>[R,O&&!O.ok?new Fa(O.errors):void 0]);return Object.fromEntries(C)}),I={snapshot:p,queryParams:r.computed(()=>Dm(p.navigationState.href)),href:r.computed(()=>p.navigationState.href),hasErrors:r.computed(()=>Object.values(p.outputs).some(C=>!(C!=null&&C.ok))),outputValues:r.computed(()=>(console.warn("Change app.outputValues to app.model.outputs"),B.value)),outputErrors:r.computed(()=>(console.warn("Change app.outputErrors to app.model.outputErrors"),A.value)),args:r.computed(()=>(console.warn("Change app.args to app.snapshot.args"),p.args)),outputs:r.computed(()=>(console.warn("Change app.outputs to app.snapshot.outputs"),p.outputs)),ui:r.computed(()=>(console.warn("Change app.ui to app.snapshot.ui"),p.ui)),navigationState:r.computed(()=>(console.warn("Change app.navigationState to app.snapshot.navigationState"),p.navigationState))},L=Pm({get(){return{args:p.args,ui:p.ui}},autoSave:!0,onSave(C){u(C.args,C.ui)}},{outputs:B,outputErrors:A},n);return r.reactive(Object.assign(L,T,I))}var Oe;(function(t){t.assertEqual=s=>s;function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{const l={};for(const c of s)l[c]=c;return l},t.getValidEnumValues=s=>{const l=t.objectKeys(s).filter(u=>typeof s[s[u]]!="number"),c={};for(const u of l)c[u]=s[u];return t.objectValues(c)},t.objectValues=s=>t.objectKeys(s).map(function(l){return s[l]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const l=[];for(const c in s)Object.prototype.hasOwnProperty.call(s,c)&&l.push(c);return l},t.find=(s,l)=>{for(const c of s)if(l(c))return c},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function o(s,l=" | "){return s.map(c=>typeof c=="string"?`'${c}'`:c).join(l)}t.joinValues=o,t.jsonStringifyReplacer=(s,l)=>typeof l=="bigint"?l.toString():l})(Oe||(Oe={}));var za;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(za||(za={}));const ae=Oe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),or=t=>{switch(typeof t){case"undefined":return ae.undefined;case"string":return ae.string;case"number":return isNaN(t)?ae.nan:ae.number;case"boolean":return ae.boolean;case"function":return ae.function;case"bigint":return ae.bigint;case"symbol":return ae.symbol;case"object":return Array.isArray(t)?ae.array:t===null?ae.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ae.promise:typeof Map<"u"&&t instanceof Map?ae.map:typeof Set<"u"&&t instanceof Set?ae.set:typeof Date<"u"&&t instanceof Date?ae.date:ae.object;default:return ae.unknown}},J=Oe.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Rm=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Ot extends Error{constructor(e){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(l){return l.message},o={_errors:[]},s=l=>{for(const c of l.issues)if(c.code==="invalid_union")c.unionErrors.map(s);else if(c.code==="invalid_return_type")s(c.returnTypeError);else if(c.code==="invalid_arguments")s(c.argumentsError);else if(c.path.length===0)o._errors.push(n(c));else{let u=o,p=0;for(;p<c.path.length;){const f=c.path[p];p===c.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(c))):u[f]=u[f]||{_errors:[]},u=u[f],p++}}};return s(this),o}static assert(e){if(!(e instanceof Ot))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Oe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},o=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(e(s))):o.push(e(s));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}}Ot.create=t=>new Ot(t);const lo=(t,e)=>{let n;switch(t.code){case J.invalid_type:t.received===ae.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case J.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Oe.jsonStringifyReplacer)}`;break;case J.unrecognized_keys:n=`Unrecognized key(s) in object: ${Oe.joinValues(t.keys,", ")}`;break;case J.invalid_union:n="Invalid input";break;case J.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Oe.joinValues(t.options)}`;break;case J.invalid_enum_value:n=`Invalid enum value. Expected ${Oe.joinValues(t.options)}, received '${t.received}'`;break;case J.invalid_arguments:n="Invalid function arguments";break;case J.invalid_return_type:n="Invalid function return type";break;case J.invalid_date:n="Invalid date";break;case J.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Oe.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case J.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case J.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case J.custom:n="Invalid input";break;case J.invalid_intersection_types:n="Intersection results could not be merged";break;case J.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case J.not_finite:n="Number must be finite";break;default:n=e.defaultError,Oe.assertNever(t)}return{message:n}};let wd=lo;function Mm(t){wd=t}function ss(){return wd}const as=t=>{const{data:e,path:n,errorMaps:o,issueData:s}=t,l=[...n,...s.path||[]],c={...s,path:l};if(s.message!==void 0)return{...s,path:l,message:s.message};let u="";const p=o.filter(f=>!!f).slice().reverse();for(const f of p)u=f(c,{data:e,defaultError:u}).message;return{...s,path:l,message:u}},Im=[];function ie(t,e){const n=ss(),o=as({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===lo?void 0:lo].filter(s=>!!s)});t.common.issues.push(o)}class vt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const o=[];for(const s of n){if(s.status==="aborted")return Ce;s.status==="dirty"&&e.dirty(),o.push(s.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,n){const o=[];for(const s of n){const l=await s.key,c=await s.value;o.push({key:l,value:c})}return vt.mergeObjectSync(e,o)}static mergeObjectSync(e,n){const o={};for(const s of n){const{key:l,value:c}=s;if(l.status==="aborted"||c.status==="aborted")return Ce;l.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof c.value<"u"||s.alwaysSet)&&(o[l.value]=c.value)}return{status:e.value,value:o}}}const Ce=Object.freeze({status:"aborted"}),co=t=>({status:"dirty",value:t}),Et=t=>({status:"valid",value:t}),$a=t=>t.status==="aborted",Ua=t=>t.status==="dirty",jo=t=>t.status==="valid",qo=t=>typeof Promise<"u"&&t instanceof Promise;function ls(t,e,n,o){if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function bd(t,e,n,o,s){if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}typeof SuppressedError=="function"&&SuppressedError;var pe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(pe||(pe={}));var Ko,Yo;class Vn{constructor(e,n,o,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=o,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const xd=(t,e)=>{if(jo(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ot(t.common.issues);return this._error=n,this._error}}};function Te(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:o,description:s}=t;if(e&&(n||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(c,u)=>{var p,f;const{message:m}=t;return c.code==="invalid_enum_value"?{message:m??u.defaultError}:typeof u.data>"u"?{message:(p=m??o)!==null&&p!==void 0?p:u.defaultError}:c.code!=="invalid_type"?{message:u.defaultError}:{message:(f=m??n)!==null&&f!==void 0?f:u.defaultError}},description:s}}class Ne{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return or(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:or(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new vt,ctx:{common:e.parent.common,data:e.data,parsedType:or(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(qo(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const o=this.safeParse(e,n);if(o.success)return o.data;throw o.error}safeParse(e,n){var o;const s={common:{issues:[],async:(o=n==null?void 0:n.async)!==null&&o!==void 0?o:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:or(e)},l=this._parseSync({data:e,path:s.path,parent:s});return xd(s,l)}async parseAsync(e,n){const o=await this.safeParseAsync(e,n);if(o.success)return o.data;throw o.error}async safeParseAsync(e,n){const o={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:or(e)},s=this._parse({data:e,path:o.path,parent:o}),l=await(qo(s)?s:Promise.resolve(s));return xd(o,l)}refine(e,n){const o=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,l)=>{const c=e(s),u=()=>l.addIssue({code:J.custom,...o(s)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(u(),!1)):c?!0:(u(),!1)})}refinement(e,n){return this._refinement((o,s)=>e(o)?!0:(s.addIssue(typeof n=="function"?n(o,s):n),!1))}_refinement(e){return new ln({schema:this,typeName:_e.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return An.create(this,this._def)}nullable(){return lr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return an.create(this,this._def)}promise(){return fo.create(this,this._def)}or(e){return ei.create([this,e],this._def)}and(e){return ti.create(this,e,this._def)}transform(e){return new ln({...Te(this._def),schema:this,typeName:_e.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new si({...Te(this._def),innerType:this,defaultValue:n,typeName:_e.ZodDefault})}brand(){return new Ha({typeName:_e.ZodBranded,type:this,...Te(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new ai({...Te(this._def),innerType:this,catchValue:n,typeName:_e.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return li.create(this,e)}readonly(){return ci.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Om=/^c[^\s-]{8,}$/i,Lm=/^[0-9a-z]+$/,Gm=/^[0-9A-HJKMNP-TV-Z]{26}$/,zm=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,$m=/^[a-z0-9_-]{21}$/i,Um=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Zm=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Wm="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Za;const Hm=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,jm=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,qm=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,kd="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Km=new RegExp(`^${kd}$`);function Sd(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Ym(t){return new RegExp(`^${Sd(t)}$`)}function Ed(t){let e=`${kd}T${Sd(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function Jm(t,e){return!!((e==="v4"||!e)&&Hm.test(t)||(e==="v6"||!e)&&jm.test(t))}class sn extends Ne{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ae.string){const l=this._getOrReturnCtx(e);return ie(l,{code:J.invalid_type,expected:ae.string,received:l.parsedType}),Ce}const o=new vt;let s;for(const l of this._def.checks)if(l.kind==="min")e.data.length<l.value&&(s=this._getOrReturnCtx(e,s),ie(s,{code:J.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if(l.kind==="max")e.data.length>l.value&&(s=this._getOrReturnCtx(e,s),ie(s,{code:J.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if(l.kind==="length"){const c=e.data.length>l.value,u=e.data.length<l.value;(c||u)&&(s=this._getOrReturnCtx(e,s),c?ie(s,{code:J.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):u&&ie(s,{code:J.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),o.dirty())}else if(l.kind==="email")Zm.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"email",code:J.invalid_string,message:l.message}),o.dirty());else if(l.kind==="emoji")Za||(Za=new RegExp(Wm,"u")),Za.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"emoji",code:J.invalid_string,message:l.message}),o.dirty());else if(l.kind==="uuid")zm.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"uuid",code:J.invalid_string,message:l.message}),o.dirty());else if(l.kind==="nanoid")$m.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"nanoid",code:J.invalid_string,message:l.message}),o.dirty());else if(l.kind==="cuid")Om.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"cuid",code:J.invalid_string,message:l.message}),o.dirty());else if(l.kind==="cuid2")Lm.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"cuid2",code:J.invalid_string,message:l.message}),o.dirty());else if(l.kind==="ulid")Gm.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"ulid",code:J.invalid_string,message:l.message}),o.dirty());else if(l.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),ie(s,{validation:"url",code:J.invalid_string,message:l.message}),o.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"regex",code:J.invalid_string,message:l.message}),o.dirty())):l.kind==="trim"?e.data=e.data.trim():l.kind==="includes"?e.data.includes(l.value,l.position)||(s=this._getOrReturnCtx(e,s),ie(s,{code:J.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),o.dirty()):l.kind==="toLowerCase"?e.data=e.data.toLowerCase():l.kind==="toUpperCase"?e.data=e.data.toUpperCase():l.kind==="startsWith"?e.data.startsWith(l.value)||(s=this._getOrReturnCtx(e,s),ie(s,{code:J.invalid_string,validation:{startsWith:l.value},message:l.message}),o.dirty()):l.kind==="endsWith"?e.data.endsWith(l.value)||(s=this._getOrReturnCtx(e,s),ie(s,{code:J.invalid_string,validation:{endsWith:l.value},message:l.message}),o.dirty()):l.kind==="datetime"?Ed(l).test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{code:J.invalid_string,validation:"datetime",message:l.message}),o.dirty()):l.kind==="date"?Km.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{code:J.invalid_string,validation:"date",message:l.message}),o.dirty()):l.kind==="time"?Ym(l).test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{code:J.invalid_string,validation:"time",message:l.message}),o.dirty()):l.kind==="duration"?Um.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"duration",code:J.invalid_string,message:l.message}),o.dirty()):l.kind==="ip"?Jm(e.data,l.version)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"ip",code:J.invalid_string,message:l.message}),o.dirty()):l.kind==="base64"?qm.test(e.data)||(s=this._getOrReturnCtx(e,s),ie(s,{validation:"base64",code:J.invalid_string,message:l.message}),o.dirty()):Oe.assertNever(l);return{status:o.value,value:e.data}}_regex(e,n,o){return this.refinement(s=>e.test(s),{validation:n,code:J.invalid_string,...pe.errToObj(o)})}_addCheck(e){return new sn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...pe.errToObj(e)})}url(e){return this._addCheck({kind:"url",...pe.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...pe.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...pe.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...pe.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...pe.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...pe.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...pe.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...pe.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...pe.errToObj(e)})}datetime(e){var n,o;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(o=e==null?void 0:e.local)!==null&&o!==void 0?o:!1,...pe.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...pe.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...pe.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...pe.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...pe.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...pe.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...pe.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...pe.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...pe.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...pe.errToObj(n)})}nonempty(e){return this.min(1,pe.errToObj(e))}trim(){return new sn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new sn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new sn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}sn.create=t=>{var e;return new sn({checks:[],typeName:_e.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Te(t)})};function Xm(t,e){const n=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,s=n>o?n:o,l=parseInt(t.toFixed(s).replace(".","")),c=parseInt(e.toFixed(s).replace(".",""));return l%c/Math.pow(10,s)}class ir extends Ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ae.number){const l=this._getOrReturnCtx(e);return ie(l,{code:J.invalid_type,expected:ae.number,received:l.parsedType}),Ce}let o;const s=new vt;for(const l of this._def.checks)l.kind==="int"?Oe.isInteger(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{code:J.invalid_type,expected:"integer",received:"float",message:l.message}),s.dirty()):l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:J.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),s.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:J.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),s.dirty()):l.kind==="multipleOf"?Xm(e.data,l.value)!==0&&(o=this._getOrReturnCtx(e,o),ie(o,{code:J.not_multiple_of,multipleOf:l.value,message:l.message}),s.dirty()):l.kind==="finite"?Number.isFinite(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{code:J.not_finite,message:l.message}),s.dirty()):Oe.assertNever(l);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,pe.toString(n))}gt(e,n){return this.setLimit("min",e,!1,pe.toString(n))}lte(e,n){return this.setLimit("max",e,!0,pe.toString(n))}lt(e,n){return this.setLimit("max",e,!1,pe.toString(n))}setLimit(e,n,o,s){return new ir({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:pe.toString(s)}]})}_addCheck(e){return new ir({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:pe.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:pe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:pe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:pe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:pe.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:pe.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:pe.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:pe.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:pe.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Oe.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(n===null||o.value>n)&&(n=o.value):o.kind==="max"&&(e===null||o.value<e)&&(e=o.value)}return Number.isFinite(n)&&Number.isFinite(e)}}ir.create=t=>new ir({checks:[],typeName:_e.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Te(t)});class sr extends Ne{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==ae.bigint){const l=this._getOrReturnCtx(e);return ie(l,{code:J.invalid_type,expected:ae.bigint,received:l.parsedType}),Ce}let o;const s=new vt;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:J.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),s.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:J.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),s.dirty()):l.kind==="multipleOf"?e.data%l.value!==BigInt(0)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:J.not_multiple_of,multipleOf:l.value,message:l.message}),s.dirty()):Oe.assertNever(l);return{status:s.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,pe.toString(n))}gt(e,n){return this.setLimit("min",e,!1,pe.toString(n))}lte(e,n){return this.setLimit("max",e,!0,pe.toString(n))}lt(e,n){return this.setLimit("max",e,!1,pe.toString(n))}setLimit(e,n,o,s){return new sr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:pe.toString(s)}]})}_addCheck(e){return new sr({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:pe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:pe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:pe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:pe.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:pe.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}sr.create=t=>{var e;return new sr({checks:[],typeName:_e.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Te(t)})};class Jo extends Ne{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ae.boolean){const o=this._getOrReturnCtx(e);return ie(o,{code:J.invalid_type,expected:ae.boolean,received:o.parsedType}),Ce}return Et(e.data)}}Jo.create=t=>new Jo({typeName:_e.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Te(t)});class Lr extends Ne{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ae.date){const l=this._getOrReturnCtx(e);return ie(l,{code:J.invalid_type,expected:ae.date,received:l.parsedType}),Ce}if(isNaN(e.data.getTime())){const l=this._getOrReturnCtx(e);return ie(l,{code:J.invalid_date}),Ce}const o=new vt;let s;for(const l of this._def.checks)l.kind==="min"?e.data.getTime()<l.value&&(s=this._getOrReturnCtx(e,s),ie(s,{code:J.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),o.dirty()):l.kind==="max"?e.data.getTime()>l.value&&(s=this._getOrReturnCtx(e,s),ie(s,{code:J.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),o.dirty()):Oe.assertNever(l);return{status:o.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Lr({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:pe.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:pe.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Lr.create=t=>new Lr({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:_e.ZodDate,...Te(t)});class cs extends Ne{_parse(e){if(this._getType(e)!==ae.symbol){const o=this._getOrReturnCtx(e);return ie(o,{code:J.invalid_type,expected:ae.symbol,received:o.parsedType}),Ce}return Et(e.data)}}cs.create=t=>new cs({typeName:_e.ZodSymbol,...Te(t)});class Xo extends Ne{_parse(e){if(this._getType(e)!==ae.undefined){const o=this._getOrReturnCtx(e);return ie(o,{code:J.invalid_type,expected:ae.undefined,received:o.parsedType}),Ce}return Et(e.data)}}Xo.create=t=>new Xo({typeName:_e.ZodUndefined,...Te(t)});class Qo extends Ne{_parse(e){if(this._getType(e)!==ae.null){const o=this._getOrReturnCtx(e);return ie(o,{code:J.invalid_type,expected:ae.null,received:o.parsedType}),Ce}return Et(e.data)}}Qo.create=t=>new Qo({typeName:_e.ZodNull,...Te(t)});class uo extends Ne{constructor(){super(...arguments),this._any=!0}_parse(e){return Et(e.data)}}uo.create=t=>new uo({typeName:_e.ZodAny,...Te(t)});class Gr extends Ne{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Et(e.data)}}Gr.create=t=>new Gr({typeName:_e.ZodUnknown,...Te(t)});class zn extends Ne{_parse(e){const n=this._getOrReturnCtx(e);return ie(n,{code:J.invalid_type,expected:ae.never,received:n.parsedType}),Ce}}zn.create=t=>new zn({typeName:_e.ZodNever,...Te(t)});class ds extends Ne{_parse(e){if(this._getType(e)!==ae.undefined){const o=this._getOrReturnCtx(e);return ie(o,{code:J.invalid_type,expected:ae.void,received:o.parsedType}),Ce}return Et(e.data)}}ds.create=t=>new ds({typeName:_e.ZodVoid,...Te(t)});class an extends Ne{_parse(e){const{ctx:n,status:o}=this._processInputParams(e),s=this._def;if(n.parsedType!==ae.array)return ie(n,{code:J.invalid_type,expected:ae.array,received:n.parsedType}),Ce;if(s.exactLength!==null){const c=n.data.length>s.exactLength.value,u=n.data.length<s.exactLength.value;(c||u)&&(ie(n,{code:c?J.too_big:J.too_small,minimum:u?s.exactLength.value:void 0,maximum:c?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),o.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(ie(n,{code:J.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),o.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(ie(n,{code:J.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((c,u)=>s.type._parseAsync(new Vn(n,c,n.path,u)))).then(c=>vt.mergeArray(o,c));const l=[...n.data].map((c,u)=>s.type._parseSync(new Vn(n,c,n.path,u)));return vt.mergeArray(o,l)}get element(){return this._def.type}min(e,n){return new an({...this._def,minLength:{value:e,message:pe.toString(n)}})}max(e,n){return new an({...this._def,maxLength:{value:e,message:pe.toString(n)}})}length(e,n){return new an({...this._def,exactLength:{value:e,message:pe.toString(n)}})}nonempty(e){return this.min(1,e)}}an.create=(t,e)=>new an({type:t,minLength:null,maxLength:null,exactLength:null,typeName:_e.ZodArray,...Te(e)});function po(t){if(t instanceof Qe){const e={};for(const n in t.shape){const o=t.shape[n];e[n]=An.create(po(o))}return new Qe({...t._def,shape:()=>e})}else return t instanceof an?new an({...t._def,type:po(t.element)}):t instanceof An?An.create(po(t.unwrap())):t instanceof lr?lr.create(po(t.unwrap())):t instanceof Nn?Nn.create(t.items.map(e=>po(e))):t}class Qe extends Ne{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Oe.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==ae.object){const f=this._getOrReturnCtx(e);return ie(f,{code:J.invalid_type,expected:ae.object,received:f.parsedType}),Ce}const{status:o,ctx:s}=this._processInputParams(e),{shape:l,keys:c}=this._getCached(),u=[];if(!(this._def.catchall instanceof zn&&this._def.unknownKeys==="strip"))for(const f in s.data)c.includes(f)||u.push(f);const p=[];for(const f of c){const m=l[f],y=s.data[f];p.push({key:{status:"valid",value:f},value:m._parse(new Vn(s,y,s.path,f)),alwaysSet:f in s.data})}if(this._def.catchall instanceof zn){const f=this._def.unknownKeys;if(f==="passthrough")for(const m of u)p.push({key:{status:"valid",value:m},value:{status:"valid",value:s.data[m]}});else if(f==="strict")u.length>0&&(ie(s,{code:J.unrecognized_keys,keys:u}),o.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const m of u){const y=s.data[m];p.push({key:{status:"valid",value:m},value:f._parse(new Vn(s,y,s.path,m)),alwaysSet:m in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const f=[];for(const m of p){const y=await m.key,T=await m.value;f.push({key:y,value:T,alwaysSet:m.alwaysSet})}return f}).then(f=>vt.mergeObjectSync(o,f)):vt.mergeObjectSync(o,p)}get shape(){return this._def.shape()}strict(e){return pe.errToObj,new Qe({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,o)=>{var s,l,c,u;const p=(c=(l=(s=this._def).errorMap)===null||l===void 0?void 0:l.call(s,n,o).message)!==null&&c!==void 0?c:o.defaultError;return n.code==="unrecognized_keys"?{message:(u=pe.errToObj(e).message)!==null&&u!==void 0?u:p}:{message:p}}}:{}})}strip(){return new Qe({...this._def,unknownKeys:"strip"})}passthrough(){return new Qe({...this._def,unknownKeys:"passthrough"})}extend(e){return new Qe({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Qe({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:_e.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Qe({...this._def,catchall:e})}pick(e){const n={};return Oe.objectKeys(e).forEach(o=>{e[o]&&this.shape[o]&&(n[o]=this.shape[o])}),new Qe({...this._def,shape:()=>n})}omit(e){const n={};return Oe.objectKeys(this.shape).forEach(o=>{e[o]||(n[o]=this.shape[o])}),new Qe({...this._def,shape:()=>n})}deepPartial(){return po(this)}partial(e){const n={};return Oe.objectKeys(this.shape).forEach(o=>{const s=this.shape[o];e&&!e[o]?n[o]=s:n[o]=s.optional()}),new Qe({...this._def,shape:()=>n})}required(e){const n={};return Oe.objectKeys(this.shape).forEach(o=>{if(e&&!e[o])n[o]=this.shape[o];else{let l=this.shape[o];for(;l instanceof An;)l=l._def.innerType;n[o]=l}}),new Qe({...this._def,shape:()=>n})}keyof(){return Td(Oe.objectKeys(this.shape))}}Qe.create=(t,e)=>new Qe({shape:()=>t,unknownKeys:"strip",catchall:zn.create(),typeName:_e.ZodObject,...Te(e)}),Qe.strictCreate=(t,e)=>new Qe({shape:()=>t,unknownKeys:"strict",catchall:zn.create(),typeName:_e.ZodObject,...Te(e)}),Qe.lazycreate=(t,e)=>new Qe({shape:t,unknownKeys:"strip",catchall:zn.create(),typeName:_e.ZodObject,...Te(e)});class ei extends Ne{_parse(e){const{ctx:n}=this._processInputParams(e),o=this._def.options;function s(l){for(const u of l)if(u.result.status==="valid")return u.result;for(const u of l)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const c=l.map(u=>new Ot(u.ctx.common.issues));return ie(n,{code:J.invalid_union,unionErrors:c}),Ce}if(n.common.async)return Promise.all(o.map(async l=>{const c={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:c}),ctx:c}})).then(s);{let l;const c=[];for(const p of o){const f={...n,common:{...n.common,issues:[]},parent:null},m=p._parseSync({data:n.data,path:n.path,parent:f});if(m.status==="valid")return m;m.status==="dirty"&&!l&&(l={result:m,ctx:f}),f.common.issues.length&&c.push(f.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const u=c.map(p=>new Ot(p));return ie(n,{code:J.invalid_union,unionErrors:u}),Ce}}get options(){return this._def.options}}ei.create=(t,e)=>new ei({options:t,typeName:_e.ZodUnion,...Te(e)});const $n=t=>t instanceof ri?$n(t.schema):t instanceof ln?$n(t.innerType()):t instanceof oi?[t.value]:t instanceof ar?t.options:t instanceof ii?Oe.objectValues(t.enum):t instanceof si?$n(t._def.innerType):t instanceof Xo?[void 0]:t instanceof Qo?[null]:t instanceof An?[void 0,...$n(t.unwrap())]:t instanceof lr?[null,...$n(t.unwrap())]:t instanceof Ha||t instanceof ci?$n(t.unwrap()):t instanceof ai?$n(t._def.innerType):[];class us extends Ne{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ae.object)return ie(n,{code:J.invalid_type,expected:ae.object,received:n.parsedType}),Ce;const o=this.discriminator,s=n.data[o],l=this.optionsMap.get(s);return l?n.common.async?l._parseAsync({data:n.data,path:n.path,parent:n}):l._parseSync({data:n.data,path:n.path,parent:n}):(ie(n,{code:J.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),Ce)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,o){const s=new Map;for(const l of n){const c=$n(l.shape[e]);if(!c.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const u of c){if(s.has(u))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(u)}`);s.set(u,l)}}return new us({typeName:_e.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:s,...Te(o)})}}function Wa(t,e){const n=or(t),o=or(e);if(t===e)return{valid:!0,data:t};if(n===ae.object&&o===ae.object){const s=Oe.objectKeys(e),l=Oe.objectKeys(t).filter(u=>s.indexOf(u)!==-1),c={...t,...e};for(const u of l){const p=Wa(t[u],e[u]);if(!p.valid)return{valid:!1};c[u]=p.data}return{valid:!0,data:c}}else if(n===ae.array&&o===ae.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let l=0;l<t.length;l++){const c=t[l],u=e[l],p=Wa(c,u);if(!p.valid)return{valid:!1};s.push(p.data)}return{valid:!0,data:s}}else return n===ae.date&&o===ae.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ti extends Ne{_parse(e){const{status:n,ctx:o}=this._processInputParams(e),s=(l,c)=>{if($a(l)||$a(c))return Ce;const u=Wa(l.value,c.value);return u.valid?((Ua(l)||Ua(c))&&n.dirty(),{status:n.value,value:u.data}):(ie(o,{code:J.invalid_intersection_types}),Ce)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([l,c])=>s(l,c)):s(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}ti.create=(t,e,n)=>new ti({left:t,right:e,typeName:_e.ZodIntersection,...Te(n)});class Nn extends Ne{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.array)return ie(o,{code:J.invalid_type,expected:ae.array,received:o.parsedType}),Ce;if(o.data.length<this._def.items.length)return ie(o,{code:J.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ce;!this._def.rest&&o.data.length>this._def.items.length&&(ie(o,{code:J.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const l=[...o.data].map((c,u)=>{const p=this._def.items[u]||this._def.rest;return p?p._parse(new Vn(o,c,o.path,u)):null}).filter(c=>!!c);return o.common.async?Promise.all(l).then(c=>vt.mergeArray(n,c)):vt.mergeArray(n,l)}get items(){return this._def.items}rest(e){return new Nn({...this._def,rest:e})}}Nn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Nn({items:t,typeName:_e.ZodTuple,rest:null,...Te(e)})};class ni extends Ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.object)return ie(o,{code:J.invalid_type,expected:ae.object,received:o.parsedType}),Ce;const s=[],l=this._def.keyType,c=this._def.valueType;for(const u in o.data)s.push({key:l._parse(new Vn(o,u,o.path,u)),value:c._parse(new Vn(o,o.data[u],o.path,u)),alwaysSet:u in o.data});return o.common.async?vt.mergeObjectAsync(n,s):vt.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(e,n,o){return n instanceof Ne?new ni({keyType:e,valueType:n,typeName:_e.ZodRecord,...Te(o)}):new ni({keyType:sn.create(),valueType:e,typeName:_e.ZodRecord,...Te(n)})}}class ps extends Ne{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.map)return ie(o,{code:J.invalid_type,expected:ae.map,received:o.parsedType}),Ce;const s=this._def.keyType,l=this._def.valueType,c=[...o.data.entries()].map(([u,p],f)=>({key:s._parse(new Vn(o,u,o.path,[f,"key"])),value:l._parse(new Vn(o,p,o.path,[f,"value"]))}));if(o.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const p of c){const f=await p.key,m=await p.value;if(f.status==="aborted"||m.status==="aborted")return Ce;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const p of c){const f=p.key,m=p.value;if(f.status==="aborted"||m.status==="aborted")return Ce;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}}}}ps.create=(t,e,n)=>new ps({valueType:e,keyType:t,typeName:_e.ZodMap,...Te(n)});class zr extends Ne{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.set)return ie(o,{code:J.invalid_type,expected:ae.set,received:o.parsedType}),Ce;const s=this._def;s.minSize!==null&&o.data.size<s.minSize.value&&(ie(o,{code:J.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&o.data.size>s.maxSize.value&&(ie(o,{code:J.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const l=this._def.valueType;function c(p){const f=new Set;for(const m of p){if(m.status==="aborted")return Ce;m.status==="dirty"&&n.dirty(),f.add(m.value)}return{status:n.value,value:f}}const u=[...o.data.values()].map((p,f)=>l._parse(new Vn(o,p,o.path,f)));return o.common.async?Promise.all(u).then(p=>c(p)):c(u)}min(e,n){return new zr({...this._def,minSize:{value:e,message:pe.toString(n)}})}max(e,n){return new zr({...this._def,maxSize:{value:e,message:pe.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}zr.create=(t,e)=>new zr({valueType:t,minSize:null,maxSize:null,typeName:_e.ZodSet,...Te(e)});class ho extends Ne{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ae.function)return ie(n,{code:J.invalid_type,expected:ae.function,received:n.parsedType}),Ce;function o(u,p){return as({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ss(),lo].filter(f=>!!f),issueData:{code:J.invalid_arguments,argumentsError:p}})}function s(u,p){return as({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ss(),lo].filter(f=>!!f),issueData:{code:J.invalid_return_type,returnTypeError:p}})}const l={errorMap:n.common.contextualErrorMap},c=n.data;if(this._def.returns instanceof fo){const u=this;return Et(async function(...p){const f=new Ot([]),m=await u._def.args.parseAsync(p,l).catch(B=>{throw f.addIssue(o(p,B)),f}),y=await Reflect.apply(c,this,m);return await u._def.returns._def.type.parseAsync(y,l).catch(B=>{throw f.addIssue(s(y,B)),f})})}else{const u=this;return Et(function(...p){const f=u._def.args.safeParse(p,l);if(!f.success)throw new Ot([o(p,f.error)]);const m=Reflect.apply(c,this,f.data),y=u._def.returns.safeParse(m,l);if(!y.success)throw new Ot([s(m,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ho({...this._def,args:Nn.create(e).rest(Gr.create())})}returns(e){return new ho({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,o){return new ho({args:e||Nn.create([]).rest(Gr.create()),returns:n||Gr.create(),typeName:_e.ZodFunction,...Te(o)})}}class ri extends Ne{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ri.create=(t,e)=>new ri({getter:t,typeName:_e.ZodLazy,...Te(e)});class oi extends Ne{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return ie(n,{received:n.data,code:J.invalid_literal,expected:this._def.value}),Ce}return{status:"valid",value:e.data}}get value(){return this._def.value}}oi.create=(t,e)=>new oi({value:t,typeName:_e.ZodLiteral,...Te(e)});function Td(t,e){return new ar({values:t,typeName:_e.ZodEnum,...Te(e)})}class ar extends Ne{constructor(){super(...arguments),Ko.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),o=this._def.values;return ie(n,{expected:Oe.joinValues(o),received:n.parsedType,code:J.invalid_type}),Ce}if(ls(this,Ko)||bd(this,Ko,new Set(this._def.values)),!ls(this,Ko).has(e.data)){const n=this._getOrReturnCtx(e),o=this._def.values;return ie(n,{received:n.data,code:J.invalid_enum_value,options:o}),Ce}return Et(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return ar.create(e,{...this._def,...n})}exclude(e,n=this._def){return ar.create(this.options.filter(o=>!e.includes(o)),{...this._def,...n})}}Ko=new WeakMap,ar.create=Td;class ii extends Ne{constructor(){super(...arguments),Yo.set(this,void 0)}_parse(e){const n=Oe.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==ae.string&&o.parsedType!==ae.number){const s=Oe.objectValues(n);return ie(o,{expected:Oe.joinValues(s),received:o.parsedType,code:J.invalid_type}),Ce}if(ls(this,Yo)||bd(this,Yo,new Set(Oe.getValidEnumValues(this._def.values))),!ls(this,Yo).has(e.data)){const s=Oe.objectValues(n);return ie(o,{received:o.data,code:J.invalid_enum_value,options:s}),Ce}return Et(e.data)}get enum(){return this._def.values}}Yo=new WeakMap,ii.create=(t,e)=>new ii({values:t,typeName:_e.ZodNativeEnum,...Te(e)});class fo extends Ne{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ae.promise&&n.common.async===!1)return ie(n,{code:J.invalid_type,expected:ae.promise,received:n.parsedType}),Ce;const o=n.parsedType===ae.promise?n.data:Promise.resolve(n.data);return Et(o.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}fo.create=(t,e)=>new fo({type:t,typeName:_e.ZodPromise,...Te(e)});class ln extends Ne{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_e.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:o}=this._processInputParams(e),s=this._def.effect||null,l={addIssue:c=>{ie(o,c),c.fatal?n.abort():n.dirty()},get path(){return o.path}};if(l.addIssue=l.addIssue.bind(l),s.type==="preprocess"){const c=s.transform(o.data,l);if(o.common.async)return Promise.resolve(c).then(async u=>{if(n.value==="aborted")return Ce;const p=await this._def.schema._parseAsync({data:u,path:o.path,parent:o});return p.status==="aborted"?Ce:p.status==="dirty"||n.value==="dirty"?co(p.value):p});{if(n.value==="aborted")return Ce;const u=this._def.schema._parseSync({data:c,path:o.path,parent:o});return u.status==="aborted"?Ce:u.status==="dirty"||n.value==="dirty"?co(u.value):u}}if(s.type==="refinement"){const c=u=>{const p=s.refinement(u,l);if(o.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(o.common.async===!1){const u=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return u.status==="aborted"?Ce:(u.status==="dirty"&&n.dirty(),c(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(u=>u.status==="aborted"?Ce:(u.status==="dirty"&&n.dirty(),c(u.value).then(()=>({status:n.value,value:u.value}))))}if(s.type==="transform")if(o.common.async===!1){const c=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!jo(c))return c;const u=s.transform(c.value,l);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(c=>jo(c)?Promise.resolve(s.transform(c.value,l)).then(u=>({status:n.value,value:u})):c);Oe.assertNever(s)}}ln.create=(t,e,n)=>new ln({schema:t,typeName:_e.ZodEffects,effect:e,...Te(n)}),ln.createWithPreprocess=(t,e,n)=>new ln({schema:e,effect:{type:"preprocess",transform:t},typeName:_e.ZodEffects,...Te(n)});class An extends Ne{_parse(e){return this._getType(e)===ae.undefined?Et(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}An.create=(t,e)=>new An({innerType:t,typeName:_e.ZodOptional,...Te(e)});class lr extends Ne{_parse(e){return this._getType(e)===ae.null?Et(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}lr.create=(t,e)=>new lr({innerType:t,typeName:_e.ZodNullable,...Te(e)});class si extends Ne{_parse(e){const{ctx:n}=this._processInputParams(e);let o=n.data;return n.parsedType===ae.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}si.create=(t,e)=>new si({innerType:t,typeName:_e.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Te(e)});class ai extends Ne{_parse(e){const{ctx:n}=this._processInputParams(e),o={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return qo(s)?s.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Ot(o.common.issues)},input:o.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ot(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}ai.create=(t,e)=>new ai({innerType:t,typeName:_e.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Te(e)});class hs extends Ne{_parse(e){if(this._getType(e)!==ae.nan){const o=this._getOrReturnCtx(e);return ie(o,{code:J.invalid_type,expected:ae.nan,received:o.parsedType}),Ce}return{status:"valid",value:e.data}}}hs.create=t=>new hs({typeName:_e.ZodNaN,...Te(t)});const Qm=Symbol("zod_brand");class Ha extends Ne{_parse(e){const{ctx:n}=this._processInputParams(e),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}}class li extends Ne{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return l.status==="aborted"?Ce:l.status==="dirty"?(n.dirty(),co(l.value)):this._def.out._parseAsync({data:l.value,path:o.path,parent:o})})();{const s=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return s.status==="aborted"?Ce:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:o.path,parent:o})}}static create(e,n){return new li({in:e,out:n,typeName:_e.ZodPipeline})}}class ci extends Ne{_parse(e){const n=this._def.innerType._parse(e),o=s=>(jo(s)&&(s.value=Object.freeze(s.value)),s);return qo(n)?n.then(s=>o(s)):o(n)}unwrap(){return this._def.innerType}}ci.create=(t,e)=>new ci({innerType:t,typeName:_e.ZodReadonly,...Te(e)});function Bd(t,e={},n){return t?uo.create().superRefine((o,s)=>{var l,c;if(!t(o)){const u=typeof e=="function"?e(o):typeof e=="string"?{message:e}:e,p=(c=(l=u.fatal)!==null&&l!==void 0?l:n)!==null&&c!==void 0?c:!0,f=typeof u=="string"?{message:u}:u;s.addIssue({code:"custom",...f,fatal:p})}}):uo.create()}const eg={object:Qe.lazycreate};var _e;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(_e||(_e={}));const tg=(t,e={message:`Input not instance of ${t.name}`})=>Bd(n=>n instanceof t,e),Vd=sn.create,Nd=ir.create,ng=hs.create,rg=sr.create,Ad=Jo.create,og=Lr.create,ig=cs.create,sg=Xo.create,ag=Qo.create,lg=uo.create,cg=Gr.create,dg=zn.create,ug=ds.create,pg=an.create,hg=Qe.create,fg=Qe.strictCreate,mg=ei.create,gg=us.create,yg=ti.create,_g=Nn.create,vg=ni.create,Cg=ps.create,wg=zr.create,bg=ho.create,xg=ri.create,kg=oi.create,Sg=ar.create,Eg=ii.create,Tg=fo.create,Pd=ln.create,Bg=An.create,Vg=lr.create,Ng=ln.createWithPreprocess,Ag=li.create;var Pn=Object.freeze({__proto__:null,defaultErrorMap:lo,setErrorMap:Mm,getErrorMap:ss,makeIssue:as,EMPTY_PATH:Im,addIssueToContext:ie,ParseStatus:vt,INVALID:Ce,DIRTY:co,OK:Et,isAborted:$a,isDirty:Ua,isValid:jo,isAsync:qo,get util(){return Oe},get objectUtil(){return za},ZodParsedType:ae,getParsedType:or,ZodType:Ne,datetimeRegex:Ed,ZodString:sn,ZodNumber:ir,ZodBigInt:sr,ZodBoolean:Jo,ZodDate:Lr,ZodSymbol:cs,ZodUndefined:Xo,ZodNull:Qo,ZodAny:uo,ZodUnknown:Gr,ZodNever:zn,ZodVoid:ds,ZodArray:an,ZodObject:Qe,ZodUnion:ei,ZodDiscriminatedUnion:us,ZodIntersection:ti,ZodTuple:Nn,ZodRecord:ni,ZodMap:ps,ZodSet:zr,ZodFunction:ho,ZodLazy:ri,ZodLiteral:oi,ZodEnum:ar,ZodNativeEnum:ii,ZodPromise:fo,ZodEffects:ln,ZodTransformer:ln,ZodOptional:An,ZodNullable:lr,ZodDefault:si,ZodCatch:ai,ZodNaN:hs,BRAND:Qm,ZodBranded:Ha,ZodPipeline:li,ZodReadonly:ci,custom:Bd,Schema:Ne,ZodSchema:Ne,late:eg,get ZodFirstPartyTypeKind(){return _e},coerce:{string:t=>sn.create({...t,coerce:!0}),number:t=>ir.create({...t,coerce:!0}),boolean:t=>Jo.create({...t,coerce:!0}),bigint:t=>sr.create({...t,coerce:!0}),date:t=>Lr.create({...t,coerce:!0})},any:lg,array:pg,bigint:rg,boolean:Ad,date:og,discriminatedUnion:gg,effect:Pd,enum:Sg,function:bg,instanceof:tg,intersection:yg,lazy:xg,literal:kg,map:Cg,nan:ng,nativeEnum:Eg,never:dg,null:ag,nullable:Vg,number:Nd,object:hg,oboolean:()=>Ad().optional(),onumber:()=>Nd().optional(),optional:Bg,ostring:()=>Vd().optional(),pipeline:Ag,preprocess:Ng,promise:Tg,record:vg,set:wg,strictObject:fg,string:Vd,symbol:ig,transformer:Pd,tuple:_g,undefined:sg,union:mg,unknown:cg,void:ug,NEVER:Ce,ZodIssueCode:J,quotelessJson:Rm,ZodError:Ot});function Pg(t){throw new Error("Unexpected object: "+t)}const Dg=-2147483648,Dd=-9007199254740991n,Fg=NaN,Rg=NaN,Mg=null,Ig=null;function Fd(t,e){switch(e){case"Int":return t===Dg;case"Long":return t===Number(Dd)||t===Dd;case"Float":return t===Fg;case"Double":return t===Rg;case"String":return t===Mg;case"Bytes":return t===Ig;default:throw Error(`unsupported data type: ${e}`)}}function Og(t,e){const n=Math.floor(e/8),o=1<<7-e%8;return(t[n]&o)>0}function ja(t){const{type:e,name:n,domain:o}=t;return{type:e,name:n,...o&&{domain:o}}}function Rd(t){return t.map(ja)}function fs(t,e){switch(t.type){case"column":return{type:"column",column:e(t.column)};case"inner":case"full":return{type:t.type,entries:t.entries.map(n=>fs(n,e))};case"outer":return{type:"outer",primary:fs(t.primary,e),secondary:t.secondary.map(n=>fs(n,e))};default:Pg(t)}}Pn.object({__isRef:Pn.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:Pn.string().describe("Upstream block id"),name:Pn.string().describe("Name of the output provided to the upstream block's output context")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").strict().readonly();function Lg(t){if(t&&typeof globalThis.getPlatforma=="function")return globalThis.getPlatforma(t);if(typeof globalThis.platforma<"u")return globalThis.platforma;throw new Error("Can't get platforma instance.")}const Gg=Pn.object({type:Pn.string(),importance:Pn.number().optional(),id:Pn.string().optional(),label:Pn.string()});Pn.array(Gg);const zg="1.14.0";function $g(){return Lg({sdkVersion:zg})}function Ug(t){if(typeof globalThis.getEnvironmentValue=="function")return globalThis.getEnvironmentValue(t)}function mo(t){return!!t&&typeof t.children<"u"}function cr(t){return mo(t)?t.groupId:t.colId}function Md(t,e,n){const o=(c,u)=>{const p=c.children.map(cr),f=x._includes(p,cr(u)),m=x._last(c.children),y=m&&cr(m)!==cr(u);return f&&y};if(!mo(t))return!0;const s=t,l=n;if(o(s,l))return s.children.push(l),!0;if(s.groupId===e){const c=s.children.map(cr);if(!x._includes(c,cr(l)))return s.children.push(l),!0}for(let c=s.children.length-1;c>=0&&!Md(s.children[c],e,n);c--);return!1}function Zg(t){const e=(s,l)=>mo(s)&&mo(l)&&cr(s)===cr(l),n=(s,l)=>{if(!mo(l))return s;const c=s,u=l;return u.children&&u.groupId&&Md(c,u.groupId,u.children[0])||u.children.forEach(p=>n(c,p)),c},o=[];for(let s=1;s<=t.length;s++){const l=t[s-1],c=t[s];e(l,c)?t[s]=n(l,c):o.push(l)}return o}var Wg=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="toolPanelColDefService"}wireBeans(t){this.columnModel=t.columnModel}createColumnTree(t){const e=[],n=(s,l)=>{if(mo(s)){const c=s,u=typeof c.groupId<"u"?c.groupId:c.headerName,p=new x.AgProvidedColumnGroup(c,u,!1,l),f=[];return c.children.forEach(m=>{const y=n(m,l+1);y&&f.push(y)}),p.setChildren(f),p}else{const c=s,u=c.colId?c.colId:c.field,p=this.columnModel.getColDefCol(u);return p||e.push(c),p}},o=[];return t.forEach(s=>{const l=n(s,0);l&&o.push(l)}),e.length>0&&x._warnOnce("unable to find grid columns for the supplied colDef(s):",e),o}syncLayoutWithGrid(t){const e=this.getLeafPathTrees(),n=Zg(e);t(n)}getLeafPathTrees(){const t=(o,s)=>{let l;if(x.isProvidedColumnGroup(o))if(o.isPadding())l=s;else{const u=Object.assign({},o.getColGroupDef());u.groupId=o.getGroupId(),u.children=[s],l=u}else{const u=Object.assign({},o.getColDef());u.colId=o.getColId(),l=u}const c=o.getOriginalParent();return c?t(c,l):l};return this.columnModel.getCols().filter(o=>{const s=o.getColDef();return o.isPrimary()&&!s.showRowGroup}).map(o=>t(o,o.getColDef()))}};function Hg(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().isDisplayed())??!1}function jg(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().setDisplayed(e)}function qg(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().setSideBarPosition(e)}function Kg(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().openToolPanel(e,"api")}function Yg(t){var e;(e=t.sideBarService)==null||e.getSideBarComp().close("api")}function Jg(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().openedItem())??null}function Xg(t){var e;(e=t.sideBarService)==null||e.getSideBarComp().refresh()}function Qg(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().isToolPanelShowing())??!1}function ey(t,e){var o;const n=(o=t.sideBarService)==null?void 0:o.getSideBarComp().getToolPanelInstance(e);return x._unwrapUserComp(n)}function ty(t){var e;return(e=t.sideBarService)==null?void 0:e.getSideBarComp().getDef()}var ny=class extends x.Component{constructor(t){super(),this.eToggleButton=x.RefPlaceholder,this.eIconWrapper=x.RefPlaceholder,this.eLabel=x.RefPlaceholder,this.toolPanelDef=t}getToolPanelId(){return this.toolPanelDef.id}postConstruct(){const t=this.createTemplate();this.setTemplate(t,[]),this.setLabel(),this.setIcon(),this.addManagedElementListeners(this.eToggleButton,{click:this.onButtonPressed.bind(this)}),this.eToggleButton.setAttribute("id",`ag-${this.getCompId()}-button`)}createTemplate(){return`<div class="ag-side-button" role="presentation">
|
|
3
|
+
`)}}function Og(t){return{ok:!0,value:t}}function Jd(t){if(!t)throw new Ka;if(!t.ok)throw Error(t.errors.join(";"));return t.value}function Qd(t){return{value:t,errors:void 0}}function Lg(t){if(t.errors)throw new Xa(t.errors);if(!t.value)throw new Ka;return t.value}function Mg(t){return t!==void 0}function Ya(t,e){return Gr(t)===Gr(e)}const Ja=t=>t,Qa=t=>t instanceof Error?t:Error(String(t)),el=t=>t.name==="ZodError",tl=t=>{const{formErrors:e,fieldErrors:n}=t.flatten(),o=Object.entries(n).map(([i,l])=>i+":"+(l==null?void 0:l.join(",")));return e.concat(o).join("; ")};function nl(t){const e=t.validate??Ja,{autoSave:n}=t,o=r.ref(),i=r.ref(),l=S=>{i.value={model:Dn(S)}};r.watch(()=>t.get(),S=>l(S),{immediate:!0});const c=()=>{var S;t.onSave(e(Dn((S=i.value)==null?void 0:S.model)))},d=()=>{l(t.get()),o.value=void 0},p=S=>{const O=Qa(S);el(O)?o.value=Error(tl(O)):o.value=O},h=S=>{o.value=void 0;try{e(S),n&&c()}catch(O){p(O)}},m=r.computed({get:()=>{var S;return(S=i.value)==null?void 0:S.model},set(S){l(S),h(S)}});r.watch(i,(S,O)=>{S&&S===O&&h(S.model)},{deep:!0});const y=r.computed(()=>!o.value),x=r.computed(()=>!Ya(t.get(),r.unref(i))),w=r.computed(()=>o.value?o.value.message:"");return r.reactive({model:m,valid:y,isChanged:x,error:o,errorString:w,save:c,revert:d,setError:p})}function Gg(t,e,n){const o=t.validate??Ja,{autoSave:i}=t,l=r.ref(),c=r.ref(),d=G=>{var b;if(n.deepPatchModel){const R=(b=c.value)==null?void 0:b.model,F=Object.assign(Dn(G),e??{});c.value={model:R?Xd(R,F):F,stage:Symbol()}}else c.value={model:Object.assign(Dn(G),e??{}),stage:Symbol()}};r.watch(()=>t.get(),G=>d(G),{immediate:!0});const p=()=>{var G;t.onSave(o(Dn((G=c.value)==null?void 0:G.model)))},h=()=>{d(t.get()),l.value=void 0},m=G=>{const b=Qa(G);el(b)?l.value=Error(tl(b)):l.value=b},y=G=>{l.value=void 0;try{o(G),i&&p()}catch(b){m(b)}},x=r.computed({get:()=>{var G;return(G=c.value)==null?void 0:G.model},set(){throw Error("Cannot replace base model")}});r.watch([()=>({args:x.value.args,ui:x.value.ui}),()=>{var G;return(G=c.value)==null?void 0:G.stage}],([G,b],[R,F])=>{b===F&&y(G)},{deep:!0});const w=r.computed(()=>!l.value),S=r.computed(()=>{var R;const{args:G,ui:b}=((R=r.unref(c))==null?void 0:R.model)??{};return!Ya(t.get(),{args:G,ui:b})}),O=r.computed(()=>l.value?l.value.message:"");return r.reactive({model:x,valid:w,isChanged:S,error:l,errorString:O,save:p,revert:h,setError:m})}const $g=t=>Object.fromEntries(new URL(t,"http://dummy").searchParams);function zg(t,e,n){const o=(b,...R)=>{n.debug&&console.log(`%c>>> %c${b}`,"color: orange; font-weight: bold","color: orange",...R)},l=qa(e.setBlockArgs,100),c=qa(e.setBlockUiState,100),d=qa(e.setBlockArgsAndUiState,100),p=r.reactive({args:Object.freeze(t.args),outputs:Object.freeze(t.outputs),ui:Object.freeze(t.ui),navigationState:Object.freeze(t.navigationState)});e.onStateUpdates(async b=>{b.forEach(R=>{R.key==="args"&&(p.args=Object.freeze(R.value),o("args patch",p.args)),R.key==="ui"&&(p.ui=Object.freeze(R.value),o("ui patch",p.ui)),R.key==="outputs"&&(p.outputs=Object.freeze(R.value),o("outputs patch",p.outputs)),R.key==="navigationState"&&(p.navigationState=Object.freeze(R.value),o("navigationState patch",p.navigationState))}),await r.nextTick()});const h=()=>Dn(p.args),m=()=>Dn(p.ui),y=()=>Dn(p.navigationState),x={createArgsModel(b={}){return nl({get(){return b.transform?b.transform(p.args):p.args},validate:b.validate,autoSave:!0,onSave(R){l(R)}})},createUiModel(b={},R){return nl({get(){return b.transform?b.transform(p.ui):p.ui??R()},validate:b.validate,autoSave:!0,onSave(F){c(F)}})},useOutputs(...b){const R=r.reactive({errors:void 0,value:void 0});return r.watch(()=>p.outputs,()=>{try{Object.assign(R,{value:this.unwrapOutputs(...b),errors:void 0})}catch(F){Object.assign(R,{value:void 0,errors:[String(F)]})}},{immediate:!0,deep:!0}),R},unwrapOutputs(...b){const R=p.outputs,F=b.map(D=>[D,Jd(R[D])]);return Object.fromEntries(F)},getOutputField(b){return p.outputs[b]},getOutputFieldOkOptional(b){console.warn("use reactive app.outputValues.fieldName instead instead of getOutputFieldOkOptional(fieldName)");const R=this.getOutputField(b);if(R&&R.ok)return R.value},getOutputFieldErrorsOptional(b){console.warn("use reactive app.outputErrors.fieldName instead instead of getOutputFieldErrorsOptional(fieldName)");const R=this.getOutputField(b);if(R&&!R.ok)return R.errors},updateArgs(b){const R=h();return b(R),e.setBlockArgs(R)},updateUiState(b){const R=m();return e.setBlockUiState(b(R))},updateNavigationState(b){const R=y();return b(R),e.setNavigationState(R)},navigateTo(b){const R=y();return R.href=b,e.setNavigationState(R)}},w=r.computed(()=>{const b=Object.entries(p.outputs).map(([R,F])=>[R,F.ok&&F.value!==void 0?F.value:void 0]);return Object.fromEntries(b)}),S=r.computed(()=>{const b=Object.entries(p.outputs).map(([R,F])=>[R,F&&!F.ok?new Xa(F.errors):void 0]);return Object.fromEntries(b)}),O={snapshot:p,queryParams:r.computed(()=>$g(p.navigationState.href)),href:r.computed(()=>p.navigationState.href),hasErrors:r.computed(()=>Object.values(p.outputs).some(b=>!(b!=null&&b.ok))),outputValues:r.computed(()=>(console.warn("Change app.outputValues to app.model.outputs"),w.value)),outputErrors:r.computed(()=>(console.warn("Change app.outputErrors to app.model.outputErrors"),S.value)),args:r.computed(()=>(console.warn("Change app.args to app.snapshot.args"),p.args)),outputs:r.computed(()=>(console.warn("Change app.outputs to app.snapshot.outputs"),p.outputs)),ui:r.computed(()=>(console.warn("Change app.ui to app.snapshot.ui"),p.ui)),navigationState:r.computed(()=>(console.warn("Change app.navigationState to app.snapshot.navigationState"),p.navigationState))},G=Gg({get(){return{args:p.args,ui:p.ui}},autoSave:!0,onSave(b){d(b.args,b.ui)}},{outputs:w,outputErrors:S},n);return r.reactive(Object.assign(G,x,O))}var Ge;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const l={};for(const c of i)l[c]=c;return l},t.getValidEnumValues=i=>{const l=t.objectKeys(i).filter(d=>typeof i[i[d]]!="number"),c={};for(const d of l)c[d]=i[d];return t.objectValues(c)},t.objectValues=i=>t.objectKeys(i).map(function(l){return i[l]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const l=[];for(const c in i)Object.prototype.hasOwnProperty.call(i,c)&&l.push(c);return l},t.find=(i,l)=>{for(const c of i)if(l(c))return c},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function o(i,l=" | "){return i.map(c=>typeof c=="string"?`'${c}'`:c).join(l)}t.joinValues=o,t.jsonStringifyReplacer=(i,l)=>typeof l=="bigint"?l.toString():l})(Ge||(Ge={}));var rl;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(rl||(rl={}));const ae=Ge.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),cr=t=>{switch(typeof t){case"undefined":return ae.undefined;case"string":return ae.string;case"number":return isNaN(t)?ae.nan:ae.number;case"boolean":return ae.boolean;case"function":return ae.function;case"bigint":return ae.bigint;case"symbol":return ae.symbol;case"object":return Array.isArray(t)?ae.array:t===null?ae.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ae.promise:typeof Map<"u"&&t instanceof Map?ae.map:typeof Set<"u"&&t instanceof Set?ae.set:typeof Date<"u"&&t instanceof Date?ae.date:ae.object;default:return ae.unknown}},ee=Ge.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),Ug=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Ut extends Error{constructor(e){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(l){return l.message},o={_errors:[]},i=l=>{for(const c of l.issues)if(c.code==="invalid_union")c.unionErrors.map(i);else if(c.code==="invalid_return_type")i(c.returnTypeError);else if(c.code==="invalid_arguments")i(c.argumentsError);else if(c.path.length===0)o._errors.push(n(c));else{let d=o,p=0;for(;p<c.path.length;){const h=c.path[p];p===c.path.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(n(c))):d[h]=d[h]||{_errors:[]},d=d[h],p++}}};return i(this),o}static assert(e){if(!(e instanceof Ut))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ge.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},o=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):o.push(e(i));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}}Ut.create=t=>new Ut(t);const lo=(t,e)=>{let n;switch(t.code){case ee.invalid_type:t.received===ae.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case ee.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Ge.jsonStringifyReplacer)}`;break;case ee.unrecognized_keys:n=`Unrecognized key(s) in object: ${Ge.joinValues(t.keys,", ")}`;break;case ee.invalid_union:n="Invalid input";break;case ee.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Ge.joinValues(t.options)}`;break;case ee.invalid_enum_value:n=`Invalid enum value. Expected ${Ge.joinValues(t.options)}, received '${t.received}'`;break;case ee.invalid_arguments:n="Invalid function arguments";break;case ee.invalid_return_type:n="Invalid function return type";break;case ee.invalid_date:n="Invalid date";break;case ee.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Ge.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case ee.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case ee.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case ee.custom:n="Invalid input";break;case ee.invalid_intersection_types:n="Intersection results could not be merged";break;case ee.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case ee.not_finite:n="Number must be finite";break;default:n=e.defaultError,Ge.assertNever(t)}return{message:n}};let eu=lo;function Zg(t){eu=t}function fs(){return eu}const ms=t=>{const{data:e,path:n,errorMaps:o,issueData:i}=t,l=[...n,...i.path||[]],c={...i,path:l};if(i.message!==void 0)return{...i,path:l,message:i.message};let d="";const p=o.filter(h=>!!h).slice().reverse();for(const h of p)d=h(c,{data:e,defaultError:d}).message;return{...i,path:l,message:d}},jg=[];function ie(t,e){const n=fs(),o=ms({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===lo?void 0:lo].filter(i=>!!i)});t.common.issues.push(o)}class bt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const o=[];for(const i of n){if(i.status==="aborted")return be;i.status==="dirty"&&e.dirty(),o.push(i.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,n){const o=[];for(const i of n){const l=await i.key,c=await i.value;o.push({key:l,value:c})}return bt.mergeObjectSync(e,o)}static mergeObjectSync(e,n){const o={};for(const i of n){const{key:l,value:c}=i;if(l.status==="aborted"||c.status==="aborted")return be;l.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof c.value<"u"||i.alwaysSet)&&(o[l.value]=c.value)}return{status:e.value,value:o}}}const be=Object.freeze({status:"aborted"}),co=t=>({status:"dirty",value:t}),At=t=>({status:"valid",value:t}),ol=t=>t.status==="aborted",il=t=>t.status==="dirty",Yo=t=>t.status==="valid",Jo=t=>typeof Promise<"u"&&t instanceof Promise;function gs(t,e,n,o){if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function tu(t,e,n,o,i){if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}typeof SuppressedError=="function"&&SuppressedError;var fe;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(fe||(fe={}));var Qo,ei;class In{constructor(e,n,o,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=o,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const nu=(t,e)=>{if(Yo(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ut(t.common.issues);return this._error=n,this._error}}};function Ae(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:o,description:i}=t;if(e&&(n||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(c,d)=>{var p,h;const{message:m}=t;return c.code==="invalid_enum_value"?{message:m??d.defaultError}:typeof d.data>"u"?{message:(p=m??o)!==null&&p!==void 0?p:d.defaultError}:c.code!=="invalid_type"?{message:d.defaultError}:{message:(h=m??n)!==null&&h!==void 0?h:d.defaultError}},description:i}}class Pe{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return cr(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:cr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new bt,ctx:{common:e.parent.common,data:e.data,parsedType:cr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Jo(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const o=this.safeParse(e,n);if(o.success)return o.data;throw o.error}safeParse(e,n){var o;const i={common:{issues:[],async:(o=n==null?void 0:n.async)!==null&&o!==void 0?o:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:cr(e)},l=this._parseSync({data:e,path:i.path,parent:i});return nu(i,l)}async parseAsync(e,n){const o=await this.safeParseAsync(e,n);if(o.success)return o.data;throw o.error}async safeParseAsync(e,n){const o={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:cr(e)},i=this._parse({data:e,path:o.path,parent:o}),l=await(Jo(i)?i:Promise.resolve(i));return nu(o,l)}refine(e,n){const o=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,l)=>{const c=e(i),d=()=>l.addIssue({code:ee.custom,...o(i)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(d(),!1)):c?!0:(d(),!1)})}refinement(e,n){return this._refinement((o,i)=>e(o)?!0:(i.addIssue(typeof n=="function"?n(o,i):n),!1))}_refinement(e){return new hn({schema:this,typeName:Ce.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return On.create(this,this._def)}nullable(){return hr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return pn.create(this,this._def)}promise(){return fo.create(this,this._def)}or(e){return oi.create([this,e],this._def)}and(e){return ii.create(this,e,this._def)}transform(e){return new hn({...Ae(this._def),schema:this,typeName:Ce.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new di({...Ae(this._def),innerType:this,defaultValue:n,typeName:Ce.ZodDefault})}brand(){return new ll({typeName:Ce.ZodBranded,type:this,...Ae(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new ui({...Ae(this._def),innerType:this,catchValue:n,typeName:Ce.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return pi.create(this,e)}readonly(){return hi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Wg=/^c[^\s-]{8,}$/i,Hg=/^[0-9a-z]+$/,qg=/^[0-9A-HJKMNP-TV-Z]{26}$/,Kg=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Xg=/^[a-z0-9_-]{21}$/i,Yg=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Jg=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Qg="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let sl;const ey=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ty=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ny=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ru="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ry=new RegExp(`^${ru}$`);function ou(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function oy(t){return new RegExp(`^${ou(t)}$`)}function iu(t){let e=`${ru}T${ou(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function iy(t,e){return!!((e==="v4"||!e)&&ey.test(t)||(e==="v6"||!e)&&ty.test(t))}class un extends Pe{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==ae.string){const l=this._getOrReturnCtx(e);return ie(l,{code:ee.invalid_type,expected:ae.string,received:l.parsedType}),be}const o=new bt;let i;for(const l of this._def.checks)if(l.kind==="min")e.data.length<l.value&&(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if(l.kind==="max")e.data.length>l.value&&(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if(l.kind==="length"){const c=e.data.length>l.value,d=e.data.length<l.value;(c||d)&&(i=this._getOrReturnCtx(e,i),c?ie(i,{code:ee.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):d&&ie(i,{code:ee.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),o.dirty())}else if(l.kind==="email")Jg.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"email",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="emoji")sl||(sl=new RegExp(Qg,"u")),sl.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"emoji",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="uuid")Kg.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"uuid",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="nanoid")Xg.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"nanoid",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="cuid")Wg.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"cuid",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="cuid2")Hg.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"cuid2",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="ulid")qg.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"ulid",code:ee.invalid_string,message:l.message}),o.dirty());else if(l.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),ie(i,{validation:"url",code:ee.invalid_string,message:l.message}),o.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"regex",code:ee.invalid_string,message:l.message}),o.dirty())):l.kind==="trim"?e.data=e.data.trim():l.kind==="includes"?e.data.includes(l.value,l.position)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),o.dirty()):l.kind==="toLowerCase"?e.data=e.data.toLowerCase():l.kind==="toUpperCase"?e.data=e.data.toUpperCase():l.kind==="startsWith"?e.data.startsWith(l.value)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.invalid_string,validation:{startsWith:l.value},message:l.message}),o.dirty()):l.kind==="endsWith"?e.data.endsWith(l.value)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.invalid_string,validation:{endsWith:l.value},message:l.message}),o.dirty()):l.kind==="datetime"?iu(l).test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.invalid_string,validation:"datetime",message:l.message}),o.dirty()):l.kind==="date"?ry.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.invalid_string,validation:"date",message:l.message}),o.dirty()):l.kind==="time"?oy(l).test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.invalid_string,validation:"time",message:l.message}),o.dirty()):l.kind==="duration"?Yg.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"duration",code:ee.invalid_string,message:l.message}),o.dirty()):l.kind==="ip"?iy(e.data,l.version)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"ip",code:ee.invalid_string,message:l.message}),o.dirty()):l.kind==="base64"?ny.test(e.data)||(i=this._getOrReturnCtx(e,i),ie(i,{validation:"base64",code:ee.invalid_string,message:l.message}),o.dirty()):Ge.assertNever(l);return{status:o.value,value:e.data}}_regex(e,n,o){return this.refinement(i=>e.test(i),{validation:n,code:ee.invalid_string,...fe.errToObj(o)})}_addCheck(e){return new un({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...fe.errToObj(e)})}url(e){return this._addCheck({kind:"url",...fe.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...fe.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...fe.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...fe.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...fe.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...fe.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...fe.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...fe.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...fe.errToObj(e)})}datetime(e){var n,o;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(o=e==null?void 0:e.local)!==null&&o!==void 0?o:!1,...fe.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...fe.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...fe.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...fe.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...fe.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...fe.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...fe.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...fe.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...fe.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...fe.errToObj(n)})}nonempty(e){return this.min(1,fe.errToObj(e))}trim(){return new un({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new un({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new un({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}un.create=t=>{var e;return new un({checks:[],typeName:Ce.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ae(t)})};function sy(t,e){const n=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,i=n>o?n:o,l=parseInt(t.toFixed(i).replace(".","")),c=parseInt(e.toFixed(i).replace(".",""));return l%c/Math.pow(10,i)}class dr extends Pe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==ae.number){const l=this._getOrReturnCtx(e);return ie(l,{code:ee.invalid_type,expected:ae.number,received:l.parsedType}),be}let o;const i=new bt;for(const l of this._def.checks)l.kind==="int"?Ge.isInteger(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.invalid_type,expected:"integer",received:"float",message:l.message}),i.dirty()):l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),i.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),i.dirty()):l.kind==="multipleOf"?sy(e.data,l.value)!==0&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.not_multiple_of,multipleOf:l.value,message:l.message}),i.dirty()):l.kind==="finite"?Number.isFinite(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.not_finite,message:l.message}),i.dirty()):Ge.assertNever(l);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,fe.toString(n))}gt(e,n){return this.setLimit("min",e,!1,fe.toString(n))}lte(e,n){return this.setLimit("max",e,!0,fe.toString(n))}lt(e,n){return this.setLimit("max",e,!1,fe.toString(n))}setLimit(e,n,o,i){return new dr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:fe.toString(i)}]})}_addCheck(e){return new dr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:fe.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:fe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:fe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:fe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:fe.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:fe.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:fe.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:fe.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:fe.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ge.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(n===null||o.value>n)&&(n=o.value):o.kind==="max"&&(e===null||o.value<e)&&(e=o.value)}return Number.isFinite(n)&&Number.isFinite(e)}}dr.create=t=>new dr({checks:[],typeName:Ce.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Ae(t)});class ur extends Pe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==ae.bigint){const l=this._getOrReturnCtx(e);return ie(l,{code:ee.invalid_type,expected:ae.bigint,received:l.parsedType}),be}let o;const i=new bt;for(const l of this._def.checks)l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),i.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),i.dirty()):l.kind==="multipleOf"?e.data%l.value!==BigInt(0)&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ee.not_multiple_of,multipleOf:l.value,message:l.message}),i.dirty()):Ge.assertNever(l);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,fe.toString(n))}gt(e,n){return this.setLimit("min",e,!1,fe.toString(n))}lte(e,n){return this.setLimit("max",e,!0,fe.toString(n))}lt(e,n){return this.setLimit("max",e,!1,fe.toString(n))}setLimit(e,n,o,i){return new ur({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:fe.toString(i)}]})}_addCheck(e){return new ur({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:fe.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:fe.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:fe.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:fe.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:fe.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}ur.create=t=>{var e;return new ur({checks:[],typeName:Ce.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ae(t)})};class ti extends Pe{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==ae.boolean){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.boolean,received:o.parsedType}),be}return At(e.data)}}ti.create=t=>new ti({typeName:Ce.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ae(t)});class $r extends Pe{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==ae.date){const l=this._getOrReturnCtx(e);return ie(l,{code:ee.invalid_type,expected:ae.date,received:l.parsedType}),be}if(isNaN(e.data.getTime())){const l=this._getOrReturnCtx(e);return ie(l,{code:ee.invalid_date}),be}const o=new bt;let i;for(const l of this._def.checks)l.kind==="min"?e.data.getTime()<l.value&&(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),o.dirty()):l.kind==="max"?e.data.getTime()>l.value&&(i=this._getOrReturnCtx(e,i),ie(i,{code:ee.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),o.dirty()):Ge.assertNever(l);return{status:o.value,value:new Date(e.data.getTime())}}_addCheck(e){return new $r({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:fe.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:fe.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}$r.create=t=>new $r({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Ce.ZodDate,...Ae(t)});class ys extends Pe{_parse(e){if(this._getType(e)!==ae.symbol){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.symbol,received:o.parsedType}),be}return At(e.data)}}ys.create=t=>new ys({typeName:Ce.ZodSymbol,...Ae(t)});class ni extends Pe{_parse(e){if(this._getType(e)!==ae.undefined){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.undefined,received:o.parsedType}),be}return At(e.data)}}ni.create=t=>new ni({typeName:Ce.ZodUndefined,...Ae(t)});class ri extends Pe{_parse(e){if(this._getType(e)!==ae.null){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.null,received:o.parsedType}),be}return At(e.data)}}ri.create=t=>new ri({typeName:Ce.ZodNull,...Ae(t)});class uo extends Pe{constructor(){super(...arguments),this._any=!0}_parse(e){return At(e.data)}}uo.create=t=>new uo({typeName:Ce.ZodAny,...Ae(t)});class zr extends Pe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return At(e.data)}}zr.create=t=>new zr({typeName:Ce.ZodUnknown,...Ae(t)});class qn extends Pe{_parse(e){const n=this._getOrReturnCtx(e);return ie(n,{code:ee.invalid_type,expected:ae.never,received:n.parsedType}),be}}qn.create=t=>new qn({typeName:Ce.ZodNever,...Ae(t)});class vs extends Pe{_parse(e){if(this._getType(e)!==ae.undefined){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.void,received:o.parsedType}),be}return At(e.data)}}vs.create=t=>new vs({typeName:Ce.ZodVoid,...Ae(t)});class pn extends Pe{_parse(e){const{ctx:n,status:o}=this._processInputParams(e),i=this._def;if(n.parsedType!==ae.array)return ie(n,{code:ee.invalid_type,expected:ae.array,received:n.parsedType}),be;if(i.exactLength!==null){const c=n.data.length>i.exactLength.value,d=n.data.length<i.exactLength.value;(c||d)&&(ie(n,{code:c?ee.too_big:ee.too_small,minimum:d?i.exactLength.value:void 0,maximum:c?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),o.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(ie(n,{code:ee.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),o.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(ie(n,{code:ee.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((c,d)=>i.type._parseAsync(new In(n,c,n.path,d)))).then(c=>bt.mergeArray(o,c));const l=[...n.data].map((c,d)=>i.type._parseSync(new In(n,c,n.path,d)));return bt.mergeArray(o,l)}get element(){return this._def.type}min(e,n){return new pn({...this._def,minLength:{value:e,message:fe.toString(n)}})}max(e,n){return new pn({...this._def,maxLength:{value:e,message:fe.toString(n)}})}length(e,n){return new pn({...this._def,exactLength:{value:e,message:fe.toString(n)}})}nonempty(e){return this.min(1,e)}}pn.create=(t,e)=>new pn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ce.ZodArray,...Ae(e)});function po(t){if(t instanceof nt){const e={};for(const n in t.shape){const o=t.shape[n];e[n]=On.create(po(o))}return new nt({...t._def,shape:()=>e})}else return t instanceof pn?new pn({...t._def,type:po(t.element)}):t instanceof On?On.create(po(t.unwrap())):t instanceof hr?hr.create(po(t.unwrap())):t instanceof Fn?Fn.create(t.items.map(e=>po(e))):t}class nt extends Pe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Ge.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==ae.object){const h=this._getOrReturnCtx(e);return ie(h,{code:ee.invalid_type,expected:ae.object,received:h.parsedType}),be}const{status:o,ctx:i}=this._processInputParams(e),{shape:l,keys:c}=this._getCached(),d=[];if(!(this._def.catchall instanceof qn&&this._def.unknownKeys==="strip"))for(const h in i.data)c.includes(h)||d.push(h);const p=[];for(const h of c){const m=l[h],y=i.data[h];p.push({key:{status:"valid",value:h},value:m._parse(new In(i,y,i.path,h)),alwaysSet:h in i.data})}if(this._def.catchall instanceof qn){const h=this._def.unknownKeys;if(h==="passthrough")for(const m of d)p.push({key:{status:"valid",value:m},value:{status:"valid",value:i.data[m]}});else if(h==="strict")d.length>0&&(ie(i,{code:ee.unrecognized_keys,keys:d}),o.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const m of d){const y=i.data[m];p.push({key:{status:"valid",value:m},value:h._parse(new In(i,y,i.path,m)),alwaysSet:m in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const h=[];for(const m of p){const y=await m.key,x=await m.value;h.push({key:y,value:x,alwaysSet:m.alwaysSet})}return h}).then(h=>bt.mergeObjectSync(o,h)):bt.mergeObjectSync(o,p)}get shape(){return this._def.shape()}strict(e){return fe.errToObj,new nt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,o)=>{var i,l,c,d;const p=(c=(l=(i=this._def).errorMap)===null||l===void 0?void 0:l.call(i,n,o).message)!==null&&c!==void 0?c:o.defaultError;return n.code==="unrecognized_keys"?{message:(d=fe.errToObj(e).message)!==null&&d!==void 0?d:p}:{message:p}}}:{}})}strip(){return new nt({...this._def,unknownKeys:"strip"})}passthrough(){return new nt({...this._def,unknownKeys:"passthrough"})}extend(e){return new nt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new nt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Ce.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new nt({...this._def,catchall:e})}pick(e){const n={};return Ge.objectKeys(e).forEach(o=>{e[o]&&this.shape[o]&&(n[o]=this.shape[o])}),new nt({...this._def,shape:()=>n})}omit(e){const n={};return Ge.objectKeys(this.shape).forEach(o=>{e[o]||(n[o]=this.shape[o])}),new nt({...this._def,shape:()=>n})}deepPartial(){return po(this)}partial(e){const n={};return Ge.objectKeys(this.shape).forEach(o=>{const i=this.shape[o];e&&!e[o]?n[o]=i:n[o]=i.optional()}),new nt({...this._def,shape:()=>n})}required(e){const n={};return Ge.objectKeys(this.shape).forEach(o=>{if(e&&!e[o])n[o]=this.shape[o];else{let l=this.shape[o];for(;l instanceof On;)l=l._def.innerType;n[o]=l}}),new nt({...this._def,shape:()=>n})}keyof(){return su(Ge.objectKeys(this.shape))}}nt.create=(t,e)=>new nt({shape:()=>t,unknownKeys:"strip",catchall:qn.create(),typeName:Ce.ZodObject,...Ae(e)}),nt.strictCreate=(t,e)=>new nt({shape:()=>t,unknownKeys:"strict",catchall:qn.create(),typeName:Ce.ZodObject,...Ae(e)}),nt.lazycreate=(t,e)=>new nt({shape:t,unknownKeys:"strip",catchall:qn.create(),typeName:Ce.ZodObject,...Ae(e)});class oi extends Pe{_parse(e){const{ctx:n}=this._processInputParams(e),o=this._def.options;function i(l){for(const d of l)if(d.result.status==="valid")return d.result;for(const d of l)if(d.result.status==="dirty")return n.common.issues.push(...d.ctx.common.issues),d.result;const c=l.map(d=>new Ut(d.ctx.common.issues));return ie(n,{code:ee.invalid_union,unionErrors:c}),be}if(n.common.async)return Promise.all(o.map(async l=>{const c={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:c}),ctx:c}})).then(i);{let l;const c=[];for(const p of o){const h={...n,common:{...n.common,issues:[]},parent:null},m=p._parseSync({data:n.data,path:n.path,parent:h});if(m.status==="valid")return m;m.status==="dirty"&&!l&&(l={result:m,ctx:h}),h.common.issues.length&&c.push(h.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const d=c.map(p=>new Ut(p));return ie(n,{code:ee.invalid_union,unionErrors:d}),be}}get options(){return this._def.options}}oi.create=(t,e)=>new oi({options:t,typeName:Ce.ZodUnion,...Ae(e)});const Kn=t=>t instanceof ai?Kn(t.schema):t instanceof hn?Kn(t.innerType()):t instanceof li?[t.value]:t instanceof pr?t.options:t instanceof ci?Ge.objectValues(t.enum):t instanceof di?Kn(t._def.innerType):t instanceof ni?[void 0]:t instanceof ri?[null]:t instanceof On?[void 0,...Kn(t.unwrap())]:t instanceof hr?[null,...Kn(t.unwrap())]:t instanceof ll||t instanceof hi?Kn(t.unwrap()):t instanceof ui?Kn(t._def.innerType):[];class _s extends Pe{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ae.object)return ie(n,{code:ee.invalid_type,expected:ae.object,received:n.parsedType}),be;const o=this.discriminator,i=n.data[o],l=this.optionsMap.get(i);return l?n.common.async?l._parseAsync({data:n.data,path:n.path,parent:n}):l._parseSync({data:n.data,path:n.path,parent:n}):(ie(n,{code:ee.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),be)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,o){const i=new Map;for(const l of n){const c=Kn(l.shape[e]);if(!c.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const d of c){if(i.has(d))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(d)}`);i.set(d,l)}}return new _s({typeName:Ce.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...Ae(o)})}}function al(t,e){const n=cr(t),o=cr(e);if(t===e)return{valid:!0,data:t};if(n===ae.object&&o===ae.object){const i=Ge.objectKeys(e),l=Ge.objectKeys(t).filter(d=>i.indexOf(d)!==-1),c={...t,...e};for(const d of l){const p=al(t[d],e[d]);if(!p.valid)return{valid:!1};c[d]=p.data}return{valid:!0,data:c}}else if(n===ae.array&&o===ae.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let l=0;l<t.length;l++){const c=t[l],d=e[l],p=al(c,d);if(!p.valid)return{valid:!1};i.push(p.data)}return{valid:!0,data:i}}else return n===ae.date&&o===ae.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class ii extends Pe{_parse(e){const{status:n,ctx:o}=this._processInputParams(e),i=(l,c)=>{if(ol(l)||ol(c))return be;const d=al(l.value,c.value);return d.valid?((il(l)||il(c))&&n.dirty(),{status:n.value,value:d.data}):(ie(o,{code:ee.invalid_intersection_types}),be)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([l,c])=>i(l,c)):i(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}ii.create=(t,e,n)=>new ii({left:t,right:e,typeName:Ce.ZodIntersection,...Ae(n)});class Fn extends Pe{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.array)return ie(o,{code:ee.invalid_type,expected:ae.array,received:o.parsedType}),be;if(o.data.length<this._def.items.length)return ie(o,{code:ee.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),be;!this._def.rest&&o.data.length>this._def.items.length&&(ie(o,{code:ee.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const l=[...o.data].map((c,d)=>{const p=this._def.items[d]||this._def.rest;return p?p._parse(new In(o,c,o.path,d)):null}).filter(c=>!!c);return o.common.async?Promise.all(l).then(c=>bt.mergeArray(n,c)):bt.mergeArray(n,l)}get items(){return this._def.items}rest(e){return new Fn({...this._def,rest:e})}}Fn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Fn({items:t,typeName:Ce.ZodTuple,rest:null,...Ae(e)})};class si extends Pe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.object)return ie(o,{code:ee.invalid_type,expected:ae.object,received:o.parsedType}),be;const i=[],l=this._def.keyType,c=this._def.valueType;for(const d in o.data)i.push({key:l._parse(new In(o,d,o.path,d)),value:c._parse(new In(o,o.data[d],o.path,d)),alwaysSet:d in o.data});return o.common.async?bt.mergeObjectAsync(n,i):bt.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,o){return n instanceof Pe?new si({keyType:e,valueType:n,typeName:Ce.ZodRecord,...Ae(o)}):new si({keyType:un.create(),valueType:e,typeName:Ce.ZodRecord,...Ae(n)})}}class Cs extends Pe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.map)return ie(o,{code:ee.invalid_type,expected:ae.map,received:o.parsedType}),be;const i=this._def.keyType,l=this._def.valueType,c=[...o.data.entries()].map(([d,p],h)=>({key:i._parse(new In(o,d,o.path,[h,"key"])),value:l._parse(new In(o,p,o.path,[h,"value"]))}));if(o.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const p of c){const h=await p.key,m=await p.value;if(h.status==="aborted"||m.status==="aborted")return be;(h.status==="dirty"||m.status==="dirty")&&n.dirty(),d.set(h.value,m.value)}return{status:n.value,value:d}})}else{const d=new Map;for(const p of c){const h=p.key,m=p.value;if(h.status==="aborted"||m.status==="aborted")return be;(h.status==="dirty"||m.status==="dirty")&&n.dirty(),d.set(h.value,m.value)}return{status:n.value,value:d}}}}Cs.create=(t,e,n)=>new Cs({valueType:e,keyType:t,typeName:Ce.ZodMap,...Ae(n)});class Ur extends Pe{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==ae.set)return ie(o,{code:ee.invalid_type,expected:ae.set,received:o.parsedType}),be;const i=this._def;i.minSize!==null&&o.data.size<i.minSize.value&&(ie(o,{code:ee.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&o.data.size>i.maxSize.value&&(ie(o,{code:ee.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const l=this._def.valueType;function c(p){const h=new Set;for(const m of p){if(m.status==="aborted")return be;m.status==="dirty"&&n.dirty(),h.add(m.value)}return{status:n.value,value:h}}const d=[...o.data.values()].map((p,h)=>l._parse(new In(o,p,o.path,h)));return o.common.async?Promise.all(d).then(p=>c(p)):c(d)}min(e,n){return new Ur({...this._def,minSize:{value:e,message:fe.toString(n)}})}max(e,n){return new Ur({...this._def,maxSize:{value:e,message:fe.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Ur.create=(t,e)=>new Ur({valueType:t,minSize:null,maxSize:null,typeName:Ce.ZodSet,...Ae(e)});class ho extends Pe{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ae.function)return ie(n,{code:ee.invalid_type,expected:ae.function,received:n.parsedType}),be;function o(d,p){return ms({data:d,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,fs(),lo].filter(h=>!!h),issueData:{code:ee.invalid_arguments,argumentsError:p}})}function i(d,p){return ms({data:d,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,fs(),lo].filter(h=>!!h),issueData:{code:ee.invalid_return_type,returnTypeError:p}})}const l={errorMap:n.common.contextualErrorMap},c=n.data;if(this._def.returns instanceof fo){const d=this;return At(async function(...p){const h=new Ut([]),m=await d._def.args.parseAsync(p,l).catch(w=>{throw h.addIssue(o(p,w)),h}),y=await Reflect.apply(c,this,m);return await d._def.returns._def.type.parseAsync(y,l).catch(w=>{throw h.addIssue(i(y,w)),h})})}else{const d=this;return At(function(...p){const h=d._def.args.safeParse(p,l);if(!h.success)throw new Ut([o(p,h.error)]);const m=Reflect.apply(c,this,h.data),y=d._def.returns.safeParse(m,l);if(!y.success)throw new Ut([i(m,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ho({...this._def,args:Fn.create(e).rest(zr.create())})}returns(e){return new ho({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,o){return new ho({args:e||Fn.create([]).rest(zr.create()),returns:n||zr.create(),typeName:Ce.ZodFunction,...Ae(o)})}}class ai extends Pe{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ai.create=(t,e)=>new ai({getter:t,typeName:Ce.ZodLazy,...Ae(e)});class li extends Pe{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return ie(n,{received:n.data,code:ee.invalid_literal,expected:this._def.value}),be}return{status:"valid",value:e.data}}get value(){return this._def.value}}li.create=(t,e)=>new li({value:t,typeName:Ce.ZodLiteral,...Ae(e)});function su(t,e){return new pr({values:t,typeName:Ce.ZodEnum,...Ae(e)})}class pr extends Pe{constructor(){super(...arguments),Qo.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),o=this._def.values;return ie(n,{expected:Ge.joinValues(o),received:n.parsedType,code:ee.invalid_type}),be}if(gs(this,Qo)||tu(this,Qo,new Set(this._def.values)),!gs(this,Qo).has(e.data)){const n=this._getOrReturnCtx(e),o=this._def.values;return ie(n,{received:n.data,code:ee.invalid_enum_value,options:o}),be}return At(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return pr.create(e,{...this._def,...n})}exclude(e,n=this._def){return pr.create(this.options.filter(o=>!e.includes(o)),{...this._def,...n})}}Qo=new WeakMap,pr.create=su;class ci extends Pe{constructor(){super(...arguments),ei.set(this,void 0)}_parse(e){const n=Ge.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==ae.string&&o.parsedType!==ae.number){const i=Ge.objectValues(n);return ie(o,{expected:Ge.joinValues(i),received:o.parsedType,code:ee.invalid_type}),be}if(gs(this,ei)||tu(this,ei,new Set(Ge.getValidEnumValues(this._def.values))),!gs(this,ei).has(e.data)){const i=Ge.objectValues(n);return ie(o,{received:o.data,code:ee.invalid_enum_value,options:i}),be}return At(e.data)}get enum(){return this._def.values}}ei=new WeakMap,ci.create=(t,e)=>new ci({values:t,typeName:Ce.ZodNativeEnum,...Ae(e)});class fo extends Pe{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==ae.promise&&n.common.async===!1)return ie(n,{code:ee.invalid_type,expected:ae.promise,received:n.parsedType}),be;const o=n.parsedType===ae.promise?n.data:Promise.resolve(n.data);return At(o.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}fo.create=(t,e)=>new fo({type:t,typeName:Ce.ZodPromise,...Ae(e)});class hn extends Pe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ce.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:o}=this._processInputParams(e),i=this._def.effect||null,l={addIssue:c=>{ie(o,c),c.fatal?n.abort():n.dirty()},get path(){return o.path}};if(l.addIssue=l.addIssue.bind(l),i.type==="preprocess"){const c=i.transform(o.data,l);if(o.common.async)return Promise.resolve(c).then(async d=>{if(n.value==="aborted")return be;const p=await this._def.schema._parseAsync({data:d,path:o.path,parent:o});return p.status==="aborted"?be:p.status==="dirty"||n.value==="dirty"?co(p.value):p});{if(n.value==="aborted")return be;const d=this._def.schema._parseSync({data:c,path:o.path,parent:o});return d.status==="aborted"?be:d.status==="dirty"||n.value==="dirty"?co(d.value):d}}if(i.type==="refinement"){const c=d=>{const p=i.refinement(d,l);if(o.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return d};if(o.common.async===!1){const d=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return d.status==="aborted"?be:(d.status==="dirty"&&n.dirty(),c(d.value),{status:n.value,value:d.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(d=>d.status==="aborted"?be:(d.status==="dirty"&&n.dirty(),c(d.value).then(()=>({status:n.value,value:d.value}))))}if(i.type==="transform")if(o.common.async===!1){const c=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!Yo(c))return c;const d=i.transform(c.value,l);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:d}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(c=>Yo(c)?Promise.resolve(i.transform(c.value,l)).then(d=>({status:n.value,value:d})):c);Ge.assertNever(i)}}hn.create=(t,e,n)=>new hn({schema:t,typeName:Ce.ZodEffects,effect:e,...Ae(n)}),hn.createWithPreprocess=(t,e,n)=>new hn({schema:e,effect:{type:"preprocess",transform:t},typeName:Ce.ZodEffects,...Ae(n)});class On extends Pe{_parse(e){return this._getType(e)===ae.undefined?At(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}On.create=(t,e)=>new On({innerType:t,typeName:Ce.ZodOptional,...Ae(e)});class hr extends Pe{_parse(e){return this._getType(e)===ae.null?At(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}hr.create=(t,e)=>new hr({innerType:t,typeName:Ce.ZodNullable,...Ae(e)});class di extends Pe{_parse(e){const{ctx:n}=this._processInputParams(e);let o=n.data;return n.parsedType===ae.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}di.create=(t,e)=>new di({innerType:t,typeName:Ce.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ae(e)});class ui extends Pe{_parse(e){const{ctx:n}=this._processInputParams(e),o={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return Jo(i)?i.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Ut(o.common.issues)},input:o.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ut(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}ui.create=(t,e)=>new ui({innerType:t,typeName:Ce.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ae(e)});class ws extends Pe{_parse(e){if(this._getType(e)!==ae.nan){const o=this._getOrReturnCtx(e);return ie(o,{code:ee.invalid_type,expected:ae.nan,received:o.parsedType}),be}return{status:"valid",value:e.data}}}ws.create=t=>new ws({typeName:Ce.ZodNaN,...Ae(t)});const ay=Symbol("zod_brand");class ll extends Pe{_parse(e){const{ctx:n}=this._processInputParams(e),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}}class pi extends Pe{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.common.async)return(async()=>{const l=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return l.status==="aborted"?be:l.status==="dirty"?(n.dirty(),co(l.value)):this._def.out._parseAsync({data:l.value,path:o.path,parent:o})})();{const i=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?be:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:o.path,parent:o})}}static create(e,n){return new pi({in:e,out:n,typeName:Ce.ZodPipeline})}}class hi extends Pe{_parse(e){const n=this._def.innerType._parse(e),o=i=>(Yo(i)&&(i.value=Object.freeze(i.value)),i);return Jo(n)?n.then(i=>o(i)):o(n)}unwrap(){return this._def.innerType}}hi.create=(t,e)=>new hi({innerType:t,typeName:Ce.ZodReadonly,...Ae(e)});function au(t,e={},n){return t?uo.create().superRefine((o,i)=>{var l,c;if(!t(o)){const d=typeof e=="function"?e(o):typeof e=="string"?{message:e}:e,p=(c=(l=d.fatal)!==null&&l!==void 0?l:n)!==null&&c!==void 0?c:!0,h=typeof d=="string"?{message:d}:d;i.addIssue({code:"custom",...h,fatal:p})}}):uo.create()}const ly={object:nt.lazycreate};var Ce;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Ce||(Ce={}));const cy=(t,e={message:`Input not instance of ${t.name}`})=>au(n=>n instanceof t,e),lu=un.create,cu=dr.create,dy=ws.create,uy=ur.create,du=ti.create,py=$r.create,hy=ys.create,fy=ni.create,my=ri.create,gy=uo.create,yy=zr.create,vy=qn.create,_y=vs.create,Cy=pn.create,wy=nt.create,by=nt.strictCreate,xy=oi.create,ky=_s.create,Sy=ii.create,Ey=Fn.create,Ty=si.create,Ny=Cs.create,Ay=Ur.create,Vy=ho.create,By=ai.create,Py=li.create,Ry=pr.create,Dy=ci.create,Iy=fo.create,uu=hn.create,Fy=On.create,Oy=hr.create,Ly=hn.createWithPreprocess,My=pi.create;var Ln=Object.freeze({__proto__:null,defaultErrorMap:lo,setErrorMap:Zg,getErrorMap:fs,makeIssue:ms,EMPTY_PATH:jg,addIssueToContext:ie,ParseStatus:bt,INVALID:be,DIRTY:co,OK:At,isAborted:ol,isDirty:il,isValid:Yo,isAsync:Jo,get util(){return Ge},get objectUtil(){return rl},ZodParsedType:ae,getParsedType:cr,ZodType:Pe,datetimeRegex:iu,ZodString:un,ZodNumber:dr,ZodBigInt:ur,ZodBoolean:ti,ZodDate:$r,ZodSymbol:ys,ZodUndefined:ni,ZodNull:ri,ZodAny:uo,ZodUnknown:zr,ZodNever:qn,ZodVoid:vs,ZodArray:pn,ZodObject:nt,ZodUnion:oi,ZodDiscriminatedUnion:_s,ZodIntersection:ii,ZodTuple:Fn,ZodRecord:si,ZodMap:Cs,ZodSet:Ur,ZodFunction:ho,ZodLazy:ai,ZodLiteral:li,ZodEnum:pr,ZodNativeEnum:ci,ZodPromise:fo,ZodEffects:hn,ZodTransformer:hn,ZodOptional:On,ZodNullable:hr,ZodDefault:di,ZodCatch:ui,ZodNaN:ws,BRAND:ay,ZodBranded:ll,ZodPipeline:pi,ZodReadonly:hi,custom:au,Schema:Pe,ZodSchema:Pe,late:ly,get ZodFirstPartyTypeKind(){return Ce},coerce:{string:t=>un.create({...t,coerce:!0}),number:t=>dr.create({...t,coerce:!0}),boolean:t=>ti.create({...t,coerce:!0}),bigint:t=>ur.create({...t,coerce:!0}),date:t=>$r.create({...t,coerce:!0})},any:gy,array:Cy,bigint:uy,boolean:du,date:py,discriminatedUnion:ky,effect:uu,enum:Ry,function:Vy,instanceof:cy,intersection:Sy,lazy:By,literal:Py,map:Ny,nan:dy,nativeEnum:Dy,never:vy,null:my,nullable:Oy,number:cu,object:wy,oboolean:()=>du().optional(),onumber:()=>cu().optional(),optional:Fy,ostring:()=>lu().optional(),pipeline:My,preprocess:Ly,promise:Iy,record:Ty,set:Ay,strictObject:by,string:lu,symbol:hy,transformer:uu,tuple:Ey,undefined:fy,union:xy,unknown:yy,void:_y,NEVER:be,ZodIssueCode:ee,quotelessJson:Ug,ZodError:Ut});function Gy(t){throw new Error("Unexpected object: "+t)}const $y=-2147483648,pu=-9007199254740991n,zy=NaN,Uy=NaN,Zy=null,jy=null;function hu(t,e){switch(e){case"Int":return t===$y;case"Long":return t===Number(pu)||t===pu;case"Float":return t===zy;case"Double":return t===Uy;case"String":return t===Zy;case"Bytes":return t===jy;default:throw Error(`unsupported data type: ${e}`)}}function Wy(t,e){const n=Math.floor(e/8),o=1<<7-e%8;return(t[n]&o)>0}function cl(t){const{type:e,name:n,domain:o}=t;return{type:e,name:n,...o&&{domain:o}}}function fu(t){return t.map(cl)}function bs(t,e){switch(t.type){case"column":return{type:"column",column:e(t.column)};case"inner":case"full":return{type:t.type,entries:t.entries.map(n=>bs(n,e))};case"outer":return{type:"outer",primary:bs(t.primary,e),secondary:t.secondary.map(n=>bs(n,e))};default:Gy(t)}}Ln.object({__isRef:Ln.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:Ln.string().describe("Upstream block id"),name:Ln.string().describe("Name of the output provided to the upstream block's output context")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").strict().readonly();function Hy(t){if(t&&typeof globalThis.getPlatforma=="function")return globalThis.getPlatforma(t);if(typeof globalThis.platforma<"u")return globalThis.platforma;throw new Error("Can't get platforma instance.")}const qy=Ln.object({type:Ln.string(),importance:Ln.number().optional(),id:Ln.string().optional(),label:Ln.string()});Ln.array(qy);const Ky="1.14.1";function mu(){return Hy({sdkVersion:Ky})}function Xy(t){if(typeof globalThis.getEnvironmentValue=="function")return globalThis.getEnvironmentValue(t)}function mo(t){return!!t&&typeof t.children<"u"}function fr(t){return mo(t)?t.groupId:t.colId}function gu(t,e,n){const o=(c,d)=>{const p=c.children.map(fr),h=T._includes(p,fr(d)),m=T._last(c.children),y=m&&fr(m)!==fr(d);return h&&y};if(!mo(t))return!0;const i=t,l=n;if(o(i,l))return i.children.push(l),!0;if(i.groupId===e){const c=i.children.map(fr);if(!T._includes(c,fr(l)))return i.children.push(l),!0}for(let c=i.children.length-1;c>=0&&!gu(i.children[c],e,n);c--);return!1}function Yy(t){const e=(i,l)=>mo(i)&&mo(l)&&fr(i)===fr(l),n=(i,l)=>{if(!mo(l))return i;const c=i,d=l;return d.children&&d.groupId&&gu(c,d.groupId,d.children[0])||d.children.forEach(p=>n(c,p)),c},o=[];for(let i=1;i<=t.length;i++){const l=t[i-1],c=t[i];e(l,c)?t[i]=n(l,c):o.push(l)}return o}var Jy=class extends T.BeanStub{constructor(){super(...arguments),this.beanName="toolPanelColDefService"}wireBeans(t){this.columnModel=t.columnModel}createColumnTree(t){const e=[],n=(i,l)=>{if(mo(i)){const c=i,d=typeof c.groupId<"u"?c.groupId:c.headerName,p=new T.AgProvidedColumnGroup(c,d,!1,l),h=[];return c.children.forEach(m=>{const y=n(m,l+1);y&&h.push(y)}),p.setChildren(h),p}else{const c=i,d=c.colId?c.colId:c.field,p=this.columnModel.getColDefCol(d);return p||e.push(c),p}},o=[];return t.forEach(i=>{const l=n(i,0);l&&o.push(l)}),e.length>0&&T._warnOnce("unable to find grid columns for the supplied colDef(s):",e),o}syncLayoutWithGrid(t){const e=this.getLeafPathTrees(),n=Yy(e);t(n)}getLeafPathTrees(){const t=(o,i)=>{let l;if(T.isProvidedColumnGroup(o))if(o.isPadding())l=i;else{const d=Object.assign({},o.getColGroupDef());d.groupId=o.getGroupId(),d.children=[i],l=d}else{const d=Object.assign({},o.getColDef());d.colId=o.getColId(),l=d}const c=o.getOriginalParent();return c?t(c,l):l};return this.columnModel.getCols().filter(o=>{const i=o.getColDef();return o.isPrimary()&&!i.showRowGroup}).map(o=>t(o,o.getColDef()))}};function Qy(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().isDisplayed())??!1}function ev(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().setDisplayed(e)}function tv(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().setSideBarPosition(e)}function nv(t,e){var n;(n=t.sideBarService)==null||n.getSideBarComp().openToolPanel(e,"api")}function rv(t){var e;(e=t.sideBarService)==null||e.getSideBarComp().close("api")}function ov(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().openedItem())??null}function iv(t){var e;(e=t.sideBarService)==null||e.getSideBarComp().refresh()}function sv(t){var e;return((e=t.sideBarService)==null?void 0:e.getSideBarComp().isToolPanelShowing())??!1}function av(t,e){var o;const n=(o=t.sideBarService)==null?void 0:o.getSideBarComp().getToolPanelInstance(e);return T._unwrapUserComp(n)}function lv(t){var e;return(e=t.sideBarService)==null?void 0:e.getSideBarComp().getDef()}var cv=class extends T.Component{constructor(t){super(),this.eToggleButton=T.RefPlaceholder,this.eIconWrapper=T.RefPlaceholder,this.eLabel=T.RefPlaceholder,this.toolPanelDef=t}getToolPanelId(){return this.toolPanelDef.id}postConstruct(){const t=this.createTemplate();this.setTemplate(t,[]),this.setLabel(),this.setIcon(),this.addManagedElementListeners(this.eToggleButton,{click:this.onButtonPressed.bind(this)}),this.eToggleButton.setAttribute("id",`ag-${this.getCompId()}-button`)}createTemplate(){return`<div class="ag-side-button" role="presentation">
|
|
4
4
|
<button type="button" data-ref="eToggleButton" tabindex="-1" role="tab" aria-expanded="false" class="ag-button ag-side-button-button">
|
|
5
5
|
<div data-ref="eIconWrapper" class="ag-side-button-icon-wrapper" aria-hidden="true"></div>
|
|
6
6
|
<span data-ref="eLabel" class="ag-side-button-label"></span>
|
|
7
7
|
</button>
|
|
8
|
-
</div>`}setLabel(){const t=this.localeService.getLocaleTextFunc(),e=this.toolPanelDef,n=t(e.labelKey,e.labelDefault);this.eLabel.innerText=n}setIcon(){this.eIconWrapper.insertAdjacentElement("afterbegin",
|
|
8
|
+
</div>`}setLabel(){const t=this.localeService.getLocaleTextFunc(),e=this.toolPanelDef,n=t(e.labelKey,e.labelDefault);this.eLabel.innerText=n}setIcon(){this.eIconWrapper.insertAdjacentElement("afterbegin",T._createIconNoSpan(this.toolPanelDef.iconKey,this.gos))}onButtonPressed(){this.dispatchLocalEvent({type:"toggleButtonClicked"})}setSelected(t){this.addOrRemoveCssClass("ag-selected",t),T._setAriaExpanded(this.eToggleButton,t)}getButtonElement(){return this.eToggleButton}},dv=class extends T.Component{constructor(){super('<div class="ag-side-buttons" role="tablist"></div>'),this.buttonComps=[]}wireBeans(t){this.focusService=t.focusService,this.visibleColsService=t.visibleColsService}postConstruct(){this.addManagedElementListeners(this.getFocusableElement(),{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(t){if(!(t.key!==T.KeyCode.TAB||!t.shiftKey)){if(this.focusService.focusNextGridCoreContainer(!0)){t.preventDefault();return}T._stopPropagationForAgGrid(t)}}setActiveButton(t){this.buttonComps.forEach(e=>{e.setSelected(t===e.getToolPanelId())})}addButtonComp(t){const e=this.createBean(new cv(t));return this.buttonComps.push(e),this.appendChild(e),e.addEventListener("toggleButtonClicked",()=>{this.dispatchLocalEvent({type:"sideBarButtonClicked",toolPanelId:t.id})}),e}clearButtons(){this.buttonComps=this.destroyBeans(this.buttonComps),T._clearElement(this.getGui()),super.destroy()}destroy(){this.clearButtons(),super.destroy()}},uv={selector:"AG-SIDE-BAR-BUTTONS",component:dv},yu={id:"columns",labelDefault:"Columns",labelKey:"columns",iconKey:"columns",toolPanel:"agColumnsToolPanel"},vu={id:"filters",labelDefault:"Filters",labelKey:"filters",iconKey:"filter",toolPanel:"agFiltersToolPanel"},dl={columns:yu,filters:vu};function ul(t){if(!t)return;if(t===!0)return{toolPanels:[yu,vu],defaultToolPanel:"columns"};if(typeof t=="string")return ul([t]);if(Array.isArray(t)){const n=[];return t.forEach(o=>{const i=dl[o];if(!i){_u(o);return}n.push(i)}),n.length===0?void 0:{toolPanels:n,defaultToolPanel:n[0].id}}return{toolPanels:pv(t.toolPanels),defaultToolPanel:t.defaultToolPanel,hiddenByDefault:t.hiddenByDefault,position:t.position}}function _u(t){T._warnOnce(`the key ${t} is not a valid key for specifying a tool panel, valid keys are: ${Object.keys(dl).join(",")}`)}function pv(t){const e=[];return t&&t.forEach(n=>{let o=null;if(typeof n=="string"){const i=dl[n];if(!i){_u(n);return}o=i}else o=n;e.push(o)}),e}var hv=class extends T.Component{constructor(){super('<div class="ag-tool-panel-horizontal-resize"></div>'),this.minWidth=100,this.maxWidth=null}wireBeans(t){this.horizontalResizeService=t.horizontalResizeService}setElementToResize(t){this.elementToResize=t}postConstruct(){const t=this.horizontalResizeService.addResizeBar({eResizeBar:this.getGui(),dragStartPixels:1,onResizeStart:this.onResizeStart.bind(this),onResizing:this.onResizing.bind(this),onResizeEnd:this.onResizeEnd.bind(this)});this.addDestroyFunc(t),this.setInverted(this.gos.get("enableRtl"))}dispatchResizeEvent(t,e,n){this.eventService.dispatchEvent({type:"toolPanelSizeChanged",width:n,started:t,ended:e})}onResizeStart(){this.startingWidth=this.elementToResize.offsetWidth,this.dispatchResizeEvent(!0,!1,this.startingWidth)}onResizeEnd(t){return this.onResizing(t,!0)}onResizing(t,e=!1){const n=this.inverted?-1:1;let o=Math.max(this.minWidth,Math.floor(this.startingWidth-t*n));this.maxWidth!=null&&(o=Math.min(this.maxWidth,o)),this.elementToResize.style.width=`${o}px`,this.dispatchResizeEvent(!1,e,o)}setInverted(t){this.inverted=t}setMaxWidth(t){this.maxWidth=t}setMinWidth(t){t!=null?this.minWidth=t:this.minWidth=100}},fv=class extends T.Component{wireBeans(t){this.userComponentFactory=t.userComponentFactory}constructor(){super('<div class="ag-tool-panel-wrapper" role="tabpanel"/>')}postConstruct(){const t=this.getGui(),e=this.resizeBar=this.createManagedBean(new hv);t.setAttribute("id",`ag-${this.getCompId()}`),e.setElementToResize(t),this.appendChild(e)}getToolPanelId(){return this.toolPanelId}setToolPanelDef(t,e){const{id:n,minWidth:o,maxWidth:i,width:l}=t;this.toolPanelId=n,this.width=l;const c=this.userComponentFactory.getToolPanelCompDetails(t,e),d=c.newAgStackInstance();if(this.params=c.params,d==null){T._warnOnce(`error processing tool panel component ${n}. You need to specify 'toolPanel'`);return}d.then(this.setToolPanelComponent.bind(this)),o!=null&&this.resizeBar.setMinWidth(o),i!=null&&this.resizeBar.setMaxWidth(i)}setToolPanelComponent(t){this.toolPanelCompInstance=t,this.appendChild(t.getGui()),this.addDestroyFunc(()=>{this.destroyBean(t)}),this.width&&(this.getGui().style.width=`${this.width}px`)}getToolPanelInstance(){return this.toolPanelCompInstance}setResizerSizerSide(t){const e=this.gos.get("enableRtl"),n=t==="left",o=e?n:!n;this.resizeBar.setInverted(o)}refresh(){var t;(t=this.toolPanelCompInstance)==null||t.refresh(this.params)}},mv=class extends T.Component{constructor(){super(`<div class="ag-side-bar ag-unselectable">
|
|
9
9
|
<ag-side-bar-buttons data-ref="sideBarButtons"></ag-side-bar-buttons>
|
|
10
|
-
</div>`,[oy]),this.sideBarButtons=x.RefPlaceholder,this.toolPanelWrappers=[]}wireBeans(t){this.focusService=t.focusService,this.filterManager=t.filterManager,this.sideBarService=t.sideBarService}postConstruct(){this.sideBarButtons.addEventListener("sideBarButtonClicked",this.onToolPanelButtonClicked.bind(this));const{sideBar:t}=this.gos.get("initialState")??{};this.setSideBarDef({sideBarDef:Ka(this.gos.get("sideBar")),sideBarState:t}),this.addManagedPropertyListener("sideBar",this.onSideBarUpdated.bind(this)),this.sideBarService.registerSideBarComp(this);const e=this.getFocusableElement();this.createManagedBean(new x.ManagedFocusFeature(e,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)})),x._addFocusableContainerListener(this,e,this.focusService)}onTabKeyDown(t){if(t.defaultPrevented)return;const{focusService:e,sideBarButtons:n}=this,o=this.getGui(),s=n.getGui(),l=x._getActiveDomElement(this.gos),c=o.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)"),u=t.target;if(!c)return e.focusNextGridCoreContainer(t.shiftKey,!0);if(s.contains(l)){e.focusInto(c,t.shiftKey)&&t.preventDefault();return}if(!t.shiftKey)return;let p=null;c.contains(l)?p=this.focusService.findNextFocusableElement(c,void 0,!0):e.isTargetUnderManagedComponent(c,u)&&t.shiftKey&&(p=this.focusService.findFocusableElementBeforeTabGuard(c,u)),p||(p=s.querySelector(".ag-selected button")),p&&p!==t.target&&(t.preventDefault(),p.focus())}handleKeyDown(t){const e=x._getActiveDomElement(this.gos);if(!this.sideBarButtons.getGui().contains(e))return;const n=this.sideBarButtons.getGui(),o=Array.prototype.slice.call(n.querySelectorAll(".ag-side-button")),s=o.findIndex(u=>u.contains(e));let l=null;switch(t.key){case x.KeyCode.LEFT:case x.KeyCode.UP:l=Math.max(0,s-1);break;case x.KeyCode.RIGHT:case x.KeyCode.DOWN:l=Math.min(s+1,o.length-1);break}if(l===null)return;const c=o[l].querySelector("button");c&&(c.focus(),t.preventDefault())}onToolPanelButtonClicked(t){const e=t.toolPanelId;this.openedItem()===e?this.openToolPanel(void 0,"sideBarButtonClicked"):this.openToolPanel(e,"sideBarButtonClicked")}clearDownUi(){this.sideBarButtons.clearButtons(),this.destroyToolPanelWrappers()}setSideBarDef({sideBarDef:t,sideBarState:e,existingToolPanelWrappers:n}){if(this.setDisplayed(!1),this.sideBar=t,this.sideBar&&this.sideBar.toolPanels){const o=this.sideBar.toolPanels;if(this.createToolPanelsAndSideButtons(o,e,n),!this.toolPanelWrappers.length)return;const s=e?e.visible:!this.sideBar.hiddenByDefault;if(this.setDisplayed(s),this.setSideBarPosition(e?e.position:this.sideBar.position),s)if(e){const{openToolPanel:l}=e;l&&this.openToolPanel(l,"sideBarInitializing")}else this.openToolPanel(this.sideBar.defaultToolPanel,"sideBarInitializing")}}getDef(){return this.sideBar}setSideBarPosition(t){t||(t="right"),this.position=t;const e=t==="left",n=e?"right":"left";return this.addOrRemoveCssClass("ag-side-bar-left",e),this.addOrRemoveCssClass("ag-side-bar-right",!e),this.toolPanelWrappers.forEach(o=>{o.setResizerSizerSide(n)}),this.dispatchSideBarUpdated(),this}setDisplayed(t,e){super.setDisplayed(t,e),this.dispatchSideBarUpdated()}getState(){const t={};return this.toolPanelWrappers.forEach(e=>{var n,o;t[e.getToolPanelId()]=(o=(n=e.getToolPanelInstance())==null?void 0:n.getState)==null?void 0:o.call(n)}),{visible:this.isDisplayed(),position:this.position,openToolPanel:this.openedItem(),toolPanels:t}}createToolPanelsAndSideButtons(t,e,n){var o;for(const s of t)this.createToolPanelAndSideButton(s,(o=e==null?void 0:e.toolPanels)==null?void 0:o[s.id],n==null?void 0:n[s.id])}validateDef(t){var e;if(t.id==null)return x._warnOnce("please review all your toolPanel components, it seems like at least one of them doesn't have an id"),!1;if(t.toolPanel==="agColumnsToolPanel"&&!this.gos.assertModuleRegistered(x.ModuleNames.ColumnsToolPanelModule,"Column Tool Panel"))return!1;if(t.toolPanel==="agFiltersToolPanel"){if(!this.gos.assertModuleRegistered(x.ModuleNames.FiltersToolPanelModule,"Filters Tool Panel"))return!1;if((e=this.filterManager)!=null&&e.isAdvancedFilterEnabled())return x._warnOnce("Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled."),!1}return!0}createToolPanelAndSideButton(t,e,n){if(!this.validateDef(t))return;const o=this.sideBarButtons.addButtonComp(t);let s;n?s=n:(s=this.createBean(new ay),s.setToolPanelDef(t,{initialState:e,onStateUpdated:()=>this.dispatchSideBarUpdated()})),s.setDisplayed(!1);const l=s.getGui();this.appendChild(l),this.toolPanelWrappers.push(s),x._setAriaControls(o.getButtonElement(),l)}refresh(){this.toolPanelWrappers.forEach(t=>t.refresh())}openToolPanel(t,e="api"){const n=this.openedItem();if(n===t)return;this.toolPanelWrappers.forEach(l=>{const c=t===l.getToolPanelId();l.setDisplayed(c)});const o=this.openedItem();n!==o&&(this.sideBarButtons.setActiveButton(t),this.raiseToolPanelVisibleEvent(t,n??void 0,e))}getToolPanelInstance(t){const e=this.toolPanelWrappers.filter(n=>n.getToolPanelId()===t)[0];if(!e){x._warnOnce(`unable to lookup Tool Panel as invalid key supplied: ${t}`);return}return e.getToolPanelInstance()}raiseToolPanelVisibleEvent(t,e,n){const o=!!t&&!!e;e&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:n,key:e,visible:!1,switchingToolPanel:o}),t&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:n,key:t,visible:!0,switchingToolPanel:o})}close(t="api"){this.openToolPanel(void 0,t)}isToolPanelShowing(){return!!this.openedItem()}openedItem(){let t=null;return this.toolPanelWrappers.forEach(e=>{e.isDisplayed()&&(t=e.getToolPanelId())}),t}onSideBarUpdated(){var n;const t=Ka(this.gos.get("sideBar")),e={};t&&this.sideBar&&((n=t.toolPanels)==null||n.forEach(o=>{var f,m;const{id:s}=o;if(!s)return;const l=(f=this.sideBar.toolPanels)==null?void 0:f.find(y=>y.id===s);if(!l||o.toolPanel!==l.toolPanel)return;const c=this.toolPanelWrappers.find(y=>y.getToolPanelId()===s);if(!c)return;const u=this.gos.addGridCommonParams({...o.toolPanelParams??{},onStateUpdated:()=>this.dispatchSideBarUpdated()});((m=c.getToolPanelInstance())==null?void 0:m.refresh(u))===!0&&(this.toolPanelWrappers=this.toolPanelWrappers.filter(y=>y!==c),x._removeFromParent(c.getGui()),e[s]=c)})),this.clearDownUi(),this.setSideBarDef({sideBarDef:t,existingToolPanelWrappers:e})}dispatchSideBarUpdated(){this.eventService.dispatchEvent({type:"sideBarUpdated"})}destroyToolPanelWrappers(){this.toolPanelWrappers.forEach(t=>{x._removeFromParent(t.getGui()),this.destroyBean(t)}),this.toolPanelWrappers.length=0}destroy(){this.destroyToolPanelWrappers(),super.destroy()}},cy={selector:"AG-SIDE-BAR",component:ly},dy=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="sideBarService"}registerSideBarComp(t){this.sideBarComp=t}getSideBarComp(){return this.sideBarComp}getSideBarSelector(){return cy}},Ya="32.3.3",Gd=x._defineModule({version:Ya,moduleName:`${x.ModuleNames.SideBarModule}-core`,beans:[Wg,dy],dependantModules:[Ie.EnterpriseCoreModule]}),uy=x._defineModule({version:Ya,moduleName:`${x.ModuleNames.SideBarModule}-api`,apiFunctions:{isSideBarVisible:Hg,setSideBarVisible:jg,setSideBarPosition:qg,openToolPanel:Kg,closeToolPanel:Yg,getOpenedToolPanel:Jg,refreshToolPanel:Xg,isToolPanelShowing:Qg,getToolPanelInstance:ey,getSideBar:ty},dependantModules:[Gd]}),Ja=x._defineModule({version:Ya,moduleName:x.ModuleNames.SideBarModule,dependantModules:[Gd,uy]}),py={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},hy=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="aggFuncService",this.aggFuncsMap={},this.initialised=!1}postConstruct(){this.init()}init(){this.initialised||(this.initialiseWithDefaultAggregations(),this.addAggFuncs(this.gos.get("aggFuncs")))}initialiseWithDefaultAggregations(){const t=this.aggFuncsMap;t.sum=fy,t.first=my,t.last=gy,t.min=yy,t.max=_y,t.count=vy,t.avg=Cy,this.initialised=!0}isAggFuncPossible(t,e){const n=this.getFuncNames(t),o=x._includes(n,e),s=x._exists(this.aggFuncsMap[e]);return o&&s}getDefaultFuncLabel(t){return py[t]??t}getDefaultAggFunc(t){const e=t.getColDef().defaultAggFunc;if(x._exists(e)&&this.isAggFuncPossible(t,e))return e;if(this.isAggFuncPossible(t,"sum"))return"sum";const n=this.getFuncNames(t);return x._existsAndNotEmpty(n)?n[0]:null}addAggFuncs(t){this.init(),x._iterateObject(t,(e,n)=>{this.aggFuncsMap[e]=n})}getAggFunc(t){return this.init(),this.aggFuncsMap[t]}getFuncNames(t){const e=t.getColDef().allowedAggFuncs;return e??Object.keys(this.aggFuncsMap).sort()}clear(){this.aggFuncsMap={}}};function fy(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const s=e[o];typeof s=="number"?n===null?n=s:n+=typeof n=="number"?s:BigInt(s):typeof s=="bigint"&&(n===null?n=s:n=(typeof n=="bigint"?n:BigInt(n))+s)}return n}function my(t){return t.values.length>0?t.values[0]:null}function gy(t){return t.values.length>0?x._last(t.values):null}function yy(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const s=e[o];(typeof s=="number"||typeof s=="bigint")&&(n===null||n>s)&&(n=s)}return n}function _y(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const s=e[o];(typeof s=="number"||typeof s=="bigint")&&(n===null||n<s)&&(n=s)}return n}function vy(t){var s,l;const{values:e}=t;let n=0;for(let c=0;c<e.length;c++){const u=e[c];n+=u!=null&&typeof u.value=="number"?u.value:1}const o=(l=(s=t.rowNode)==null?void 0:s.aggData)==null?void 0:l[t.column.getColId()];return o&&o.value===n?o:{value:n,toString:function(){return this.value.toString()},toNumber:function(){return this.value}}}function Cy(t){var c,u,p;const{values:e}=t;let n=0,o=0;for(let f=0;f<e.length;f++){const m=e[f];let y=null;typeof m=="number"||typeof m=="bigint"?(y=m,o++):m!=null&&(typeof m.value=="number"||typeof m.value=="bigint")&&typeof m.count=="number"&&(y=m.value*(typeof m.value=="number"?m.count:BigInt(m.count)),o+=m.count),typeof y=="number"?n+=typeof n=="number"?y:BigInt(y):typeof y=="bigint"&&(n=(typeof n=="bigint"?n:BigInt(n))+y)}let s=null;o>0&&(s=n/(typeof n=="number"?o:BigInt(o)));const l=(p=(c=t.rowNode)==null?void 0:c.aggData)==null?void 0:p[(u=t.column)==null?void 0:u.getColId()];return l&&l.count===o&&l.value===s?l:{count:o,value:s,toString:function(){return typeof this.value=="number"||typeof this.value=="bigint"?this.value.toString():""},toNumber:function(){return this.value}}}var wy=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="aggregationStage"}wireBeans(t){this.columnModel=t.columnModel,this.aggFuncService=t.aggFuncService,this.funcColsService=t.funcColsService,this.pivotResultColsService=t.pivotResultColsService,this.valueService=t.valueService}execute(t){const e=x._missingOrEmpty(this.funcColsService.getValueColumns()),n=!this.gos.getCallback("getGroupRowAgg"),o=t.changedPath&&t.changedPath.isActive();if(e&&n&&o)return;const s=this.createAggDetails(t);this.recursivelyCreateAggData(s)}createAggDetails(t){const e=this.columnModel.isPivotActive(),n=this.funcColsService.getValueColumns(),o=e?this.funcColsService.getPivotColumns():[];return{alwaysAggregateAtRootLevel:this.gos.get("alwaysAggregateAtRootLevel"),groupIncludeTotalFooter:!!x._getGrandTotalRow(this.gos),changedPath:t.changedPath,valueColumns:n,pivotColumns:o,filteredOnly:!this.isSuppressAggFilteredOnly(),userAggFunc:this.gos.getCallback("getGroupRowAgg")}}isSuppressAggFilteredOnly(){return x._getGroupAggFiltering(this.gos)!==void 0||this.gos.get("suppressAggFilteredOnly")}recursivelyCreateAggData(t){const e=n=>{if(!n.hasChildren()){n.aggData&&n.setAggData(null);return}if(n.level===-1&&!t.groupIncludeTotalFooter){const l=!this.columnModel.isPivotMode();if(!t.alwaysAggregateAtRootLevel&&l){n.setAggData(null);return}}this.aggregateRowNode(n,t)};t.changedPath.forEachChangedNodeDepthFirst(e,!0)}aggregateRowNode(t,e){const n=e.valueColumns.length===0,o=e.pivotColumns.length===0;let s;e.userAggFunc?s=e.userAggFunc({nodes:t.childrenAfterFilter}):n?s=null:o?s=this.aggregateRowNodeUsingValuesOnly(t,e):s=this.aggregateRowNodeUsingValuesAndPivot(t),t.setAggData(s),t.sibling&&t.sibling.setAggData(s)}aggregateRowNodeUsingValuesAndPivot(t){var s;const e={},n=((s=this.pivotResultColsService.getPivotResultCols())==null?void 0:s.list)??[];let o=!0;for(let l=0;l<n.length;l++){const c=n[l],u=c.getColDef();if(u.pivotTotalColumnIds!=null){o=!1;continue}const p=u.pivotKeys??[];let f;t.leafGroup?f=this.getValuesFromMappedSet(t.childrenMapped,p,u.pivotValueColumn):f=this.getValuesPivotNonLeaf(t,u.colId),e[u.colId]=this.aggregateValues(f,u.pivotValueColumn.getAggFunc(),u.pivotValueColumn,t,c)}if(!o)for(let l=0;l<n.length;l++){const c=n[l],u=c.getColDef();if(u.pivotTotalColumnIds==null||!u.pivotTotalColumnIds.length)continue;const p=u.pivotTotalColumnIds.map(f=>e[f]);e[u.colId]=this.aggregateValues(p,u.pivotValueColumn.getAggFunc(),u.pivotValueColumn,t,c)}return e}aggregateRowNodeUsingValuesOnly(t,e){const n={},o=e.changedPath.isActive()?e.changedPath.getValueColumnsForNode(t,e.valueColumns):e.valueColumns,s=e.changedPath.isActive()?e.changedPath.getNotValueColumnsForNode(t,e.valueColumns):null,l=this.getValuesNormal(t,o,e.filteredOnly),c=t.aggData;return o.forEach((u,p)=>{n[u.getId()]=this.aggregateValues(l[p],u.getAggFunc(),u,t)}),s&&c&&s.forEach(u=>{n[u.getId()]=c[u.getId()]}),n}getValuesPivotNonLeaf(t,e){return t.childrenAfterFilter.map(n=>n.aggData[e])}getValuesFromMappedSet(t,e,n){let o=t;for(let s=0;s<e.length;s++){const l=e[s];o=o?o[l]:null}return o?o.map(s=>this.valueService.getValue(n,s)):[]}getValuesNormal(t,e,n){const o=[];e.forEach(()=>o.push([]));const s=e.length,l=n?t.childrenAfterFilter:t.childrenAfterGroup,c=l.length;for(let u=0;u<c;u++){const p=l[u];for(let f=0;f<s;f++){const m=e[f],y=this.valueService.getValue(m,p);o[f].push(y)}}return o}aggregateValues(t,e,n,o,s){const l=typeof e=="string"?this.aggFuncService.getAggFunc(e):e;if(typeof l!="function")return x._errorOnce(`unrecognised aggregation function ${e}`),null;const c=l,u=this.gos.addGridCommonParams({values:t,column:n,colDef:n?n.getColDef():void 0,pivotResultColumn:s,rowNode:o,data:o?o.data:void 0});return c(u)}},by=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="autoColService"}wireBeans(t){this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.columnFactory=t.columnFactory}createAutoCols(t){const e=[],n=this.gos.get("treeData");let o=x._isGroupMultiAutoColumn(this.gos);return n&&o&&(x._warnOnce('you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),o=!1),o?t.forEach((s,l)=>{e.push(this.createOneAutoCol(s,l))}):e.push(this.createOneAutoCol()),e}updateAutoCols(t,e){t.forEach((n,o)=>this.updateOneAutoCol(n,o,e))}createOneAutoCol(t,e){let n;t?n=`${x.GROUP_AUTO_COLUMN_ID}-${t.getId()}`:n=x.GROUP_AUTO_COLUMN_ID;const o=this.createAutoColDef(n,t,e);o.colId=n;const s=new x.AgColumn(o,null,n,!0);return this.createBean(s),s}updateOneAutoCol(t,e,n){const o=t.getColDef(),s=typeof o.showRowGroup=="string"?o.showRowGroup:void 0,l=s!=null?this.columnModel.getColDefCol(s):void 0,c=this.createAutoColDef(t.getId(),l??void 0,e);t.setColDef(c,null,n),this.columnFactory.applyColumnState(t,c,n)}createAutoColDef(t,e,n){let o=this.createBaseColDef(e);const s=this.gos.get("autoGroupColumnDef");x._mergeDeep(o,s),o=this.columnFactory.addColumnDefaultAndTypes(o,t),this.gos.get("treeData")||x._missing(o.field)&&x._missing(o.valueGetter)&&x._missing(o.filterValueGetter)&&o.filter!=="agGroupColumnFilter"&&(o.filter=!1),n&&n>0&&(o.headerCheckboxSelection=!1);const l=x._isColumnsSortingCoupledToGroup(this.gos),c=o.valueGetter||o.field!=null;return l&&!c&&(o.sortIndex=void 0,o.initialSort=void 0),o}createBaseColDef(t){const e=this.gos.get("autoGroupColumnDef"),o={headerName:this.localeService.getLocaleTextFunc()("group","Group")};if(e&&(e.cellRenderer||e.cellRendererSelector)||(o.cellRenderer="agGroupCellRenderer"),t){const l=t.getColDef();Object.assign(o,{headerName:this.columnNameService.getDisplayNameForColumn(t,"header"),headerValueGetter:l.headerValueGetter}),l.cellRenderer&&Object.assign(o,{cellRendererParams:{innerRenderer:l.cellRenderer,innerRendererParams:l.cellRendererParams}}),o.showRowGroup=t.getColId()}else o.showRowGroup=!0;return o}},xy=class extends Ie.PillDragComp{constructor(t,e,n,o,s){super(e,n,s,`
|
|
10
|
+
</div>`,[uv]),this.sideBarButtons=T.RefPlaceholder,this.toolPanelWrappers=[]}wireBeans(t){this.focusService=t.focusService,this.filterManager=t.filterManager,this.sideBarService=t.sideBarService}postConstruct(){this.sideBarButtons.addEventListener("sideBarButtonClicked",this.onToolPanelButtonClicked.bind(this));const{sideBar:t}=this.gos.get("initialState")??{};this.setSideBarDef({sideBarDef:ul(this.gos.get("sideBar")),sideBarState:t}),this.addManagedPropertyListener("sideBar",this.onSideBarUpdated.bind(this)),this.sideBarService.registerSideBarComp(this);const e=this.getFocusableElement();this.createManagedBean(new T.ManagedFocusFeature(e,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this)})),T._addFocusableContainerListener(this,e,this.focusService)}onTabKeyDown(t){if(t.defaultPrevented)return;const{focusService:e,sideBarButtons:n}=this,o=this.getGui(),i=n.getGui(),l=T._getActiveDomElement(this.gos),c=o.querySelector(".ag-tool-panel-wrapper:not(.ag-hidden)"),d=t.target;if(!c)return e.focusNextGridCoreContainer(t.shiftKey,!0);if(i.contains(l)){e.focusInto(c,t.shiftKey)&&t.preventDefault();return}if(!t.shiftKey)return;let p=null;c.contains(l)?p=this.focusService.findNextFocusableElement(c,void 0,!0):e.isTargetUnderManagedComponent(c,d)&&t.shiftKey&&(p=this.focusService.findFocusableElementBeforeTabGuard(c,d)),p||(p=i.querySelector(".ag-selected button")),p&&p!==t.target&&(t.preventDefault(),p.focus())}handleKeyDown(t){const e=T._getActiveDomElement(this.gos);if(!this.sideBarButtons.getGui().contains(e))return;const n=this.sideBarButtons.getGui(),o=Array.prototype.slice.call(n.querySelectorAll(".ag-side-button")),i=o.findIndex(d=>d.contains(e));let l=null;switch(t.key){case T.KeyCode.LEFT:case T.KeyCode.UP:l=Math.max(0,i-1);break;case T.KeyCode.RIGHT:case T.KeyCode.DOWN:l=Math.min(i+1,o.length-1);break}if(l===null)return;const c=o[l].querySelector("button");c&&(c.focus(),t.preventDefault())}onToolPanelButtonClicked(t){const e=t.toolPanelId;this.openedItem()===e?this.openToolPanel(void 0,"sideBarButtonClicked"):this.openToolPanel(e,"sideBarButtonClicked")}clearDownUi(){this.sideBarButtons.clearButtons(),this.destroyToolPanelWrappers()}setSideBarDef({sideBarDef:t,sideBarState:e,existingToolPanelWrappers:n}){if(this.setDisplayed(!1),this.sideBar=t,this.sideBar&&this.sideBar.toolPanels){const o=this.sideBar.toolPanels;if(this.createToolPanelsAndSideButtons(o,e,n),!this.toolPanelWrappers.length)return;const i=e?e.visible:!this.sideBar.hiddenByDefault;if(this.setDisplayed(i),this.setSideBarPosition(e?e.position:this.sideBar.position),i)if(e){const{openToolPanel:l}=e;l&&this.openToolPanel(l,"sideBarInitializing")}else this.openToolPanel(this.sideBar.defaultToolPanel,"sideBarInitializing")}}getDef(){return this.sideBar}setSideBarPosition(t){t||(t="right"),this.position=t;const e=t==="left",n=e?"right":"left";return this.addOrRemoveCssClass("ag-side-bar-left",e),this.addOrRemoveCssClass("ag-side-bar-right",!e),this.toolPanelWrappers.forEach(o=>{o.setResizerSizerSide(n)}),this.dispatchSideBarUpdated(),this}setDisplayed(t,e){super.setDisplayed(t,e),this.dispatchSideBarUpdated()}getState(){const t={};return this.toolPanelWrappers.forEach(e=>{var n,o;t[e.getToolPanelId()]=(o=(n=e.getToolPanelInstance())==null?void 0:n.getState)==null?void 0:o.call(n)}),{visible:this.isDisplayed(),position:this.position,openToolPanel:this.openedItem(),toolPanels:t}}createToolPanelsAndSideButtons(t,e,n){var o;for(const i of t)this.createToolPanelAndSideButton(i,(o=e==null?void 0:e.toolPanels)==null?void 0:o[i.id],n==null?void 0:n[i.id])}validateDef(t){var e;if(t.id==null)return T._warnOnce("please review all your toolPanel components, it seems like at least one of them doesn't have an id"),!1;if(t.toolPanel==="agColumnsToolPanel"&&!this.gos.assertModuleRegistered(T.ModuleNames.ColumnsToolPanelModule,"Column Tool Panel"))return!1;if(t.toolPanel==="agFiltersToolPanel"){if(!this.gos.assertModuleRegistered(T.ModuleNames.FiltersToolPanelModule,"Filters Tool Panel"))return!1;if((e=this.filterManager)!=null&&e.isAdvancedFilterEnabled())return T._warnOnce("Advanced Filter does not work with Filters Tool Panel. Filters Tool Panel has been disabled."),!1}return!0}createToolPanelAndSideButton(t,e,n){if(!this.validateDef(t))return;const o=this.sideBarButtons.addButtonComp(t);let i;n?i=n:(i=this.createBean(new fv),i.setToolPanelDef(t,{initialState:e,onStateUpdated:()=>this.dispatchSideBarUpdated()})),i.setDisplayed(!1);const l=i.getGui();this.appendChild(l),this.toolPanelWrappers.push(i),T._setAriaControls(o.getButtonElement(),l)}refresh(){this.toolPanelWrappers.forEach(t=>t.refresh())}openToolPanel(t,e="api"){const n=this.openedItem();if(n===t)return;this.toolPanelWrappers.forEach(l=>{const c=t===l.getToolPanelId();l.setDisplayed(c)});const o=this.openedItem();n!==o&&(this.sideBarButtons.setActiveButton(t),this.raiseToolPanelVisibleEvent(t,n??void 0,e))}getToolPanelInstance(t){const e=this.toolPanelWrappers.filter(n=>n.getToolPanelId()===t)[0];if(!e){T._warnOnce(`unable to lookup Tool Panel as invalid key supplied: ${t}`);return}return e.getToolPanelInstance()}raiseToolPanelVisibleEvent(t,e,n){const o=!!t&&!!e;e&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:n,key:e,visible:!1,switchingToolPanel:o}),t&&this.eventService.dispatchEvent({type:"toolPanelVisibleChanged",source:n,key:t,visible:!0,switchingToolPanel:o})}close(t="api"){this.openToolPanel(void 0,t)}isToolPanelShowing(){return!!this.openedItem()}openedItem(){let t=null;return this.toolPanelWrappers.forEach(e=>{e.isDisplayed()&&(t=e.getToolPanelId())}),t}onSideBarUpdated(){var n;const t=ul(this.gos.get("sideBar")),e={};t&&this.sideBar&&((n=t.toolPanels)==null||n.forEach(o=>{var h,m;const{id:i}=o;if(!i)return;const l=(h=this.sideBar.toolPanels)==null?void 0:h.find(y=>y.id===i);if(!l||o.toolPanel!==l.toolPanel)return;const c=this.toolPanelWrappers.find(y=>y.getToolPanelId()===i);if(!c)return;const d=this.gos.addGridCommonParams({...o.toolPanelParams??{},onStateUpdated:()=>this.dispatchSideBarUpdated()});((m=c.getToolPanelInstance())==null?void 0:m.refresh(d))===!0&&(this.toolPanelWrappers=this.toolPanelWrappers.filter(y=>y!==c),T._removeFromParent(c.getGui()),e[i]=c)})),this.clearDownUi(),this.setSideBarDef({sideBarDef:t,existingToolPanelWrappers:e})}dispatchSideBarUpdated(){this.eventService.dispatchEvent({type:"sideBarUpdated"})}destroyToolPanelWrappers(){this.toolPanelWrappers.forEach(t=>{T._removeFromParent(t.getGui()),this.destroyBean(t)}),this.toolPanelWrappers.length=0}destroy(){this.destroyToolPanelWrappers(),super.destroy()}},gv={selector:"AG-SIDE-BAR",component:mv},yv=class extends T.BeanStub{constructor(){super(...arguments),this.beanName="sideBarService"}registerSideBarComp(t){this.sideBarComp=t}getSideBarComp(){return this.sideBarComp}getSideBarSelector(){return gv}},pl="32.3.3",Cu=T._defineModule({version:pl,moduleName:`${T.ModuleNames.SideBarModule}-core`,beans:[Jy,yv],dependantModules:[Me.EnterpriseCoreModule]}),vv=T._defineModule({version:pl,moduleName:`${T.ModuleNames.SideBarModule}-api`,apiFunctions:{isSideBarVisible:Qy,setSideBarVisible:ev,setSideBarPosition:tv,openToolPanel:nv,closeToolPanel:rv,getOpenedToolPanel:ov,refreshToolPanel:iv,isToolPanelShowing:sv,getToolPanelInstance:av,getSideBar:lv},dependantModules:[Cu]}),hl=T._defineModule({version:pl,moduleName:T.ModuleNames.SideBarModule,dependantModules:[Cu,vv]}),_v={sum:"Sum",first:"First",last:"Last",min:"Min",max:"Max",count:"Count",avg:"Average"},Cv=class extends T.BeanStub{constructor(){super(...arguments),this.beanName="aggFuncService",this.aggFuncsMap={},this.initialised=!1}postConstruct(){this.init()}init(){this.initialised||(this.initialiseWithDefaultAggregations(),this.addAggFuncs(this.gos.get("aggFuncs")))}initialiseWithDefaultAggregations(){const t=this.aggFuncsMap;t.sum=wv,t.first=bv,t.last=xv,t.min=kv,t.max=Sv,t.count=Ev,t.avg=Tv,this.initialised=!0}isAggFuncPossible(t,e){const n=this.getFuncNames(t),o=T._includes(n,e),i=T._exists(this.aggFuncsMap[e]);return o&&i}getDefaultFuncLabel(t){return _v[t]??t}getDefaultAggFunc(t){const e=t.getColDef().defaultAggFunc;if(T._exists(e)&&this.isAggFuncPossible(t,e))return e;if(this.isAggFuncPossible(t,"sum"))return"sum";const n=this.getFuncNames(t);return T._existsAndNotEmpty(n)?n[0]:null}addAggFuncs(t){this.init(),T._iterateObject(t,(e,n)=>{this.aggFuncsMap[e]=n})}getAggFunc(t){return this.init(),this.aggFuncsMap[t]}getFuncNames(t){const e=t.getColDef().allowedAggFuncs;return e??Object.keys(this.aggFuncsMap).sort()}clear(){this.aggFuncsMap={}}};function wv(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const i=e[o];typeof i=="number"?n===null?n=i:n+=typeof n=="number"?i:BigInt(i):typeof i=="bigint"&&(n===null?n=i:n=(typeof n=="bigint"?n:BigInt(n))+i)}return n}function bv(t){return t.values.length>0?t.values[0]:null}function xv(t){return t.values.length>0?T._last(t.values):null}function kv(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const i=e[o];(typeof i=="number"||typeof i=="bigint")&&(n===null||n>i)&&(n=i)}return n}function Sv(t){const{values:e}=t;let n=null;for(let o=0;o<e.length;o++){const i=e[o];(typeof i=="number"||typeof i=="bigint")&&(n===null||n<i)&&(n=i)}return n}function Ev(t){var i,l;const{values:e}=t;let n=0;for(let c=0;c<e.length;c++){const d=e[c];n+=d!=null&&typeof d.value=="number"?d.value:1}const o=(l=(i=t.rowNode)==null?void 0:i.aggData)==null?void 0:l[t.column.getColId()];return o&&o.value===n?o:{value:n,toString:function(){return this.value.toString()},toNumber:function(){return this.value}}}function Tv(t){var c,d,p;const{values:e}=t;let n=0,o=0;for(let h=0;h<e.length;h++){const m=e[h];let y=null;typeof m=="number"||typeof m=="bigint"?(y=m,o++):m!=null&&(typeof m.value=="number"||typeof m.value=="bigint")&&typeof m.count=="number"&&(y=m.value*(typeof m.value=="number"?m.count:BigInt(m.count)),o+=m.count),typeof y=="number"?n+=typeof n=="number"?y:BigInt(y):typeof y=="bigint"&&(n=(typeof n=="bigint"?n:BigInt(n))+y)}let i=null;o>0&&(i=n/(typeof n=="number"?o:BigInt(o)));const l=(p=(c=t.rowNode)==null?void 0:c.aggData)==null?void 0:p[(d=t.column)==null?void 0:d.getColId()];return l&&l.count===o&&l.value===i?l:{count:o,value:i,toString:function(){return typeof this.value=="number"||typeof this.value=="bigint"?this.value.toString():""},toNumber:function(){return this.value}}}var Nv=class extends T.BeanStub{constructor(){super(...arguments),this.beanName="aggregationStage"}wireBeans(t){this.columnModel=t.columnModel,this.aggFuncService=t.aggFuncService,this.funcColsService=t.funcColsService,this.pivotResultColsService=t.pivotResultColsService,this.valueService=t.valueService}execute(t){const e=T._missingOrEmpty(this.funcColsService.getValueColumns()),n=!this.gos.getCallback("getGroupRowAgg"),o=t.changedPath&&t.changedPath.isActive();if(e&&n&&o)return;const i=this.createAggDetails(t);this.recursivelyCreateAggData(i)}createAggDetails(t){const e=this.columnModel.isPivotActive(),n=this.funcColsService.getValueColumns(),o=e?this.funcColsService.getPivotColumns():[];return{alwaysAggregateAtRootLevel:this.gos.get("alwaysAggregateAtRootLevel"),groupIncludeTotalFooter:!!T._getGrandTotalRow(this.gos),changedPath:t.changedPath,valueColumns:n,pivotColumns:o,filteredOnly:!this.isSuppressAggFilteredOnly(),userAggFunc:this.gos.getCallback("getGroupRowAgg")}}isSuppressAggFilteredOnly(){return T._getGroupAggFiltering(this.gos)!==void 0||this.gos.get("suppressAggFilteredOnly")}recursivelyCreateAggData(t){const e=n=>{if(!n.hasChildren()){n.aggData&&n.setAggData(null);return}if(n.level===-1&&!t.groupIncludeTotalFooter){const l=!this.columnModel.isPivotMode();if(!t.alwaysAggregateAtRootLevel&&l){n.setAggData(null);return}}this.aggregateRowNode(n,t)};t.changedPath.forEachChangedNodeDepthFirst(e,!0)}aggregateRowNode(t,e){const n=e.valueColumns.length===0,o=e.pivotColumns.length===0;let i;e.userAggFunc?i=e.userAggFunc({nodes:t.childrenAfterFilter}):n?i=null:o?i=this.aggregateRowNodeUsingValuesOnly(t,e):i=this.aggregateRowNodeUsingValuesAndPivot(t),t.setAggData(i),t.sibling&&t.sibling.setAggData(i)}aggregateRowNodeUsingValuesAndPivot(t){var i;const e={},n=((i=this.pivotResultColsService.getPivotResultCols())==null?void 0:i.list)??[];let o=!0;for(let l=0;l<n.length;l++){const c=n[l],d=c.getColDef();if(d.pivotTotalColumnIds!=null){o=!1;continue}const p=d.pivotKeys??[];let h;t.leafGroup?h=this.getValuesFromMappedSet(t.childrenMapped,p,d.pivotValueColumn):h=this.getValuesPivotNonLeaf(t,d.colId),e[d.colId]=this.aggregateValues(h,d.pivotValueColumn.getAggFunc(),d.pivotValueColumn,t,c)}if(!o)for(let l=0;l<n.length;l++){const c=n[l],d=c.getColDef();if(d.pivotTotalColumnIds==null||!d.pivotTotalColumnIds.length)continue;const p=d.pivotTotalColumnIds.map(h=>e[h]);e[d.colId]=this.aggregateValues(p,d.pivotValueColumn.getAggFunc(),d.pivotValueColumn,t,c)}return e}aggregateRowNodeUsingValuesOnly(t,e){const n={},o=e.changedPath.isActive()?e.changedPath.getValueColumnsForNode(t,e.valueColumns):e.valueColumns,i=e.changedPath.isActive()?e.changedPath.getNotValueColumnsForNode(t,e.valueColumns):null,l=this.getValuesNormal(t,o,e.filteredOnly),c=t.aggData;return o.forEach((d,p)=>{n[d.getId()]=this.aggregateValues(l[p],d.getAggFunc(),d,t)}),i&&c&&i.forEach(d=>{n[d.getId()]=c[d.getId()]}),n}getValuesPivotNonLeaf(t,e){return t.childrenAfterFilter.map(n=>n.aggData[e])}getValuesFromMappedSet(t,e,n){let o=t;for(let i=0;i<e.length;i++){const l=e[i];o=o?o[l]:null}return o?o.map(i=>this.valueService.getValue(n,i)):[]}getValuesNormal(t,e,n){const o=[];e.forEach(()=>o.push([]));const i=e.length,l=n?t.childrenAfterFilter:t.childrenAfterGroup,c=l.length;for(let d=0;d<c;d++){const p=l[d];for(let h=0;h<i;h++){const m=e[h],y=this.valueService.getValue(m,p);o[h].push(y)}}return o}aggregateValues(t,e,n,o,i){const l=typeof e=="string"?this.aggFuncService.getAggFunc(e):e;if(typeof l!="function")return T._errorOnce(`unrecognised aggregation function ${e}`),null;const c=l,d=this.gos.addGridCommonParams({values:t,column:n,colDef:n?n.getColDef():void 0,pivotResultColumn:i,rowNode:o,data:o?o.data:void 0});return c(d)}},Av=class extends T.BeanStub{constructor(){super(...arguments),this.beanName="autoColService"}wireBeans(t){this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.columnFactory=t.columnFactory}createAutoCols(t){const e=[],n=this.gos.get("treeData");let o=T._isGroupMultiAutoColumn(this.gos);return n&&o&&(T._warnOnce('you cannot mix groupDisplayType = "multipleColumns" with treeData, only one column can be used to display groups when doing tree data'),o=!1),o?t.forEach((i,l)=>{e.push(this.createOneAutoCol(i,l))}):e.push(this.createOneAutoCol()),e}updateAutoCols(t,e){t.forEach((n,o)=>this.updateOneAutoCol(n,o,e))}createOneAutoCol(t,e){let n;t?n=`${T.GROUP_AUTO_COLUMN_ID}-${t.getId()}`:n=T.GROUP_AUTO_COLUMN_ID;const o=this.createAutoColDef(n,t,e);o.colId=n;const i=new T.AgColumn(o,null,n,!0);return this.createBean(i),i}updateOneAutoCol(t,e,n){const o=t.getColDef(),i=typeof o.showRowGroup=="string"?o.showRowGroup:void 0,l=i!=null?this.columnModel.getColDefCol(i):void 0,c=this.createAutoColDef(t.getId(),l??void 0,e);t.setColDef(c,null,n),this.columnFactory.applyColumnState(t,c,n)}createAutoColDef(t,e,n){let o=this.createBaseColDef(e);const i=this.gos.get("autoGroupColumnDef");T._mergeDeep(o,i),o=this.columnFactory.addColumnDefaultAndTypes(o,t),this.gos.get("treeData")||T._missing(o.field)&&T._missing(o.valueGetter)&&T._missing(o.filterValueGetter)&&o.filter!=="agGroupColumnFilter"&&(o.filter=!1),n&&n>0&&(o.headerCheckboxSelection=!1);const l=T._isColumnsSortingCoupledToGroup(this.gos),c=o.valueGetter||o.field!=null;return l&&!c&&(o.sortIndex=void 0,o.initialSort=void 0),o}createBaseColDef(t){const e=this.gos.get("autoGroupColumnDef"),o={headerName:this.localeService.getLocaleTextFunc()("group","Group")};if(e&&(e.cellRenderer||e.cellRendererSelector)||(o.cellRenderer="agGroupCellRenderer"),t){const l=t.getColDef();Object.assign(o,{headerName:this.columnNameService.getDisplayNameForColumn(t,"header"),headerValueGetter:l.headerValueGetter}),l.cellRenderer&&Object.assign(o,{cellRendererParams:{innerRenderer:l.cellRenderer,innerRendererParams:l.cellRendererParams}}),o.showRowGroup=t.getColId()}else o.showRowGroup=!0;return o}},Vv=class extends Me.PillDragComp{constructor(t,e,n,o,i){super(e,n,i,`
|
|
11
11
|
<span role="option">
|
|
12
12
|
<span data-ref="eDragHandle" class="ag-drag-handle ag-column-drop-cell-drag-handle" role="presentation"></span>
|
|
13
13
|
<span data-ref="eText" class="ag-column-drop-cell-text" aria-hidden="true"></span>
|
|
14
14
|
<ag-sort-indicator data-ref="eSortIndicator"></ag-sort-indicator>
|
|
15
15
|
<span data-ref="eButton" class="ag-column-drop-cell-button" role="presentation"></span>
|
|
16
16
|
</span>
|
|
17
|
-
`,[x.SortIndicatorSelector]),this.column=t,this.dropZonePurpose=o,this.eSortIndicator=x.RefPlaceholder,this.popupShowing=!1}wireBeans(t){super.wireBeans(t),this.popupService=t.popupService,this.sortController=t.sortController,this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.funcColsService=t.funcColsService,this.aggFuncService=t.aggFuncService}postConstruct(){this.displayName=this.columnNameService.getDisplayNameForColumn(this.column,"columnDrop"),super.postConstruct(),this.setupSort(),this.addManagedEventListeners({sortChanged:()=>{this.setupAria()}}),this.isGroupingZone()&&this.addManagedPropertyListener("groupLockGroupColumns",()=>{this.refreshRemove(),this.refreshDraggable(),this.setupAria()})}getItem(){return this.column}getDisplayName(){return this.displayName}getTooltip(){return this.column.getColDef().headerTooltip}addAdditionalAriaInstructions(t,e){const n=this.gos.get("rowGroupPanelSuppressSort"),o=this.gos.get("functionsReadOnly");if(this.isAggregationZone()&&!o){const s=e("ariaDropZoneColumnValueItemDescription","Press ENTER to change the aggregation type");t.push(s)}if(this.isGroupingZone()&&this.column.isSortable()&&!n){const s=e("ariaDropZoneColumnGroupItemDescription","Press ENTER to sort");t.push(s)}super.addAdditionalAriaInstructions(t,e)}isDraggable(){return this.isReadOnly()}isRemovable(){return this.isReadOnly()}isReadOnly(){return!this.isGroupingAndLocked()&&!this.gos.get("functionsReadOnly")}getAriaDisplayName(){const t=this.localeService.getLocaleTextFunc(),{name:e,aggFuncName:n}=this.getColumnAndAggFuncName(),o=t("ariaDropZoneColumnComponentAggFuncSeparator"," of "),s={asc:t("ariaDropZoneColumnComponentSortAscending","ascending"),desc:t("ariaDropZoneColumnComponentSortDescending","descending")},l=this.column.getSort(),c=this.gos.get("rowGroupPanelSuppressSort");return[n&&`${n}${o}`,e,this.isGroupingZone()&&!c&&l&&`, ${s[l]}`].filter(u=>!!u).join("")}getColumnAndAggFuncName(){const t=this.displayName;let e="";if(this.isAggregationZone()){const n=this.column.getAggFunc(),o=typeof n=="string"?n:"agg";e=this.localeService.getLocaleTextFunc()(o,o)}return{name:t,aggFuncName:e}}setupSort(){const t=this.column.isSortable(),e=this.isGroupingZone();if(!(!t||!e)&&!this.gos.get("rowGroupPanelSuppressSort")){this.eSortIndicator.setupSort(this.column,!0);const n=o=>{o.preventDefault();const l=this.gos.get("multiSortKey")==="ctrl"?o.ctrlKey||o.metaKey:o.shiftKey;this.sortController.progressSort(this.column,l,"uiColumnSorted")};this.addGuiEventListener("click",n),this.addGuiEventListener("keydown",o=>{o.key===x.KeyCode.ENTER&&this.isGroupingZone()&&n(o)})}}getDefaultIconName(){return"hide"}createGetDragItem(){const{column:t}=this;return()=>{const e={};return e[t.getId()]=t.isVisible(),{columns:[t],visibleState:e}}}setupComponents(){super.setupComponents(),this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&this.addGuiEventListener("click",this.onShowAggFuncSelection.bind(this))}onKeyDown(t){super.onKeyDown(t),t.key===x.KeyCode.ENTER&&this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&(t.preventDefault(),this.onShowAggFuncSelection())}getDisplayValue(){const{name:t,aggFuncName:e}=this.getColumnAndAggFuncName();return this.isAggregationZone()?`${e}(${t})`:t}onShowAggFuncSelection(){if(this.popupShowing)return;this.popupShowing=!0;const t=new Ie.VirtualList({cssIdentifier:"select-agg-func"}),e=this.aggFuncService.getFuncNames(this.column),n=this.getGui(),o=t.getGui();t.setModel({getRow:function(m){return e[m]},getRowCount:function(){return e.length}}),this.createBean(t);const s=x._loadTemplate('<div class="ag-select-agg-func-popup"></div>');s.style.top="0px",s.style.left="0px",s.appendChild(o),s.style.width=`${n.clientWidth}px`;const[l]=this.addManagedElementListeners(s,{focusout:m=>{!s.contains(m.relatedTarget)&&p&&p.hideFunc()}}),c=m=>{this.destroyBean(t),this.popupShowing=!1,(m==null?void 0:m.key)==="Escape"&&n.focus(),l&&l()},u=this.localeService.getLocaleTextFunc(),p=this.popupService.addPopup({modal:!0,eChild:s,closeOnEsc:!0,closedCallback:c,ariaLabel:u("ariaLabelAggregationFunction","Aggregation Function")});p&&t.setComponentCreator(this.createAggSelect.bind(this,p.hideFunc)),t.addGuiEventListener("keydown",m=>{if(m.key===x.KeyCode.ENTER||m.key===x.KeyCode.SPACE){const y=t.getLastFocusedRow();if(y==null)return;const T=t.getComponentAt(y);T&&T.selectItem()}}),this.popupService.positionPopupByComponent({type:"aggFuncSelect",eventSource:n,ePopup:s,keepWithinBounds:!0,column:this.column,position:"under"}),t.refresh();let f=e.findIndex(m=>m===this.column.getAggFunc());f===-1&&(f=0),t.focusRow(f)}createAggSelect(t,e){const n=()=>{t(),this.getGui().focus(),this.funcColsService.setColumnAggFunc(this.column,e,"toolPanelDragAndDrop")},o=this.localeService.getLocaleTextFunc(),s=e.toString(),l=o(s,s);return new ky(n,l)}isGroupingAndLocked(){return this.isGroupingZone()&&this.columnModel.isColGroupLocked(this.column)}isAggregationZone(){return this.dropZonePurpose==="aggregation"}isGroupingZone(){return this.dropZonePurpose==="rowGroup"}getDragSourceType(){return x.DragSourceType.ToolPanel}destroy(){super.destroy(),this.column=null}},ky=class extends x.Component{constructor(t,e){super('<div class="ag-select-agg-func-item"/>'),this.selectItem=t,this.getGui().innerText=e,this.addGuiEventListener("click",this.selectItem)}},Xa=class extends Ie.PillDropZonePanel{constructor(t,e){super(t),this.dropZonePurpose=e}wireBeans(t){super.wireBeans(t),this.columnModel=t.columnModel,this.funcColsService=t.funcColsService}init(t){super.init(t),this.addManagedEventListeners({newColumnsLoaded:this.refreshGui.bind(this)}),this.addManagedPropertyListeners(["functionsReadOnly","rowGroupPanelSuppressSort","groupLockGroupColumns"],this.refreshGui.bind(this))}getItems(t){return t.columns??[]}isInterestedIn(t){return t===x.DragSourceType.HeaderCell||t===x.DragSourceType.ToolPanel}minimumAllowedNewInsertIndex(){const t=this.gos.get("groupLockGroupColumns"),e=this.funcColsService.getRowGroupColumns().length;return t===-1?e:Math.min(t,e)}showOrHideColumnOnExit(t){return this.isRowGroupPanel()&&!this.gos.get("suppressRowGroupHidesColumns")&&!t.fromNudge}handleDragEnterEnd(t){if(this.showOrHideColumnOnExit(t)){const o=t.dragSource.getDragItem().columns;this.setColumnsVisible(o,!1,"uiColumnDragged")}}handleDragLeaveEnd(t){if(this.showOrHideColumnOnExit(t)){const n=t.dragSource.getDragItem();this.setColumnsVisible(n.columns,!0,"uiColumnDragged")}}setColumnsVisible(t,e,n){if(t){const o=t.filter(s=>!s.getColDef().lockVisible);this.columnModel.setColsVisible(o,e,n)}}isRowGroupPanel(){return this.dropZonePurpose==="rowGroup"}createPillComponent(t,e,n,o){return new xy(t,e,n,this.dropZonePurpose,o)}},Qa=class extends Xa{constructor(t){super(t,"pivot")}postConstruct(){const t=this.localeService.getLocaleTextFunc(),e=t("pivotColumnsEmptyMessage","Drag here to set column labels"),n=t("pivots","Column Labels");super.init({icon:x._createIconNoSpan("pivotPanel",this.gos,null),emptyMessage:e,title:n}),this.addManagedEventListeners({newColumnsLoaded:this.refresh.bind(this),columnPivotChanged:this.refresh.bind(this),columnPivotModeChanged:this.checkVisibility.bind(this)}),this.refresh()}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaPivotDropZonePanelLabel","Column Labels")}getTooltipParams(){const t=super.getTooltipParams();return t.location="pivotColumnsList",t}refresh(){this.checkVisibility(),this.refreshGui()}checkVisibility(){const t=this.columnModel.isPivotMode();if(this.isHorizontal())switch(this.gos.get("pivotPanelShow")){case"always":this.setDisplayed(t);break;case"onlyWhenPivoting":{const e=this.columnModel.isPivotActive();this.setDisplayed(t&&e);break}default:this.setDisplayed(!1);break}else this.setDisplayed(t)}isItemDroppable(t,e){return this.gos.get("functionsReadOnly")||!t.isPrimary()?!1:t.isAllowPivot()&&(!t.isPivotActive()||this.isSourceEventFromTarget(e))}updateItems(t){this.funcColsService.setPivotColumns(t,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?"pivot":"notAllowed"}getExistingItems(){return this.funcColsService.getPivotColumns()}},el=class extends Xa{constructor(t){super(t,"rowGroup")}postConstruct(){const t=this.localeService.getLocaleTextFunc(),e=t("rowGroupColumnsEmptyMessage","Drag here to set row groups"),n=t("groups","Row Groups");super.init({icon:x._createIconNoSpan("rowGroupPanel",this.gos,null),emptyMessage:e,title:n}),this.addManagedEventListeners({columnRowGroupChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaRowGroupDropZonePanelLabel","Row Groups")}getTooltipParams(){const t=super.getTooltipParams();return t.location="rowGroupColumnsList",t}isItemDroppable(t,e){return this.gos.get("functionsReadOnly")||!t.isPrimary()?!1:t.isAllowRowGroup()&&(!t.isRowGroupActive()||this.isSourceEventFromTarget(e))}updateItems(t){this.funcColsService.setRowGroupColumns(t,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?"group":"notAllowed"}getExistingItems(){return this.funcColsService.getRowGroupColumns()}},Sy=class extends x.Component{wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService}constructor(){super()}postConstruct(){this.setGui(this.createNorthPanel());const t=this.onRowGroupChanged.bind(this);this.addManagedEventListeners({columnRowGroupChanged:t,newColumnsLoaded:t}),this.addManagedPropertyListener("rowGroupPanelShow",t),this.addManagedPropertyListener("pivotPanelShow",()=>this.onPivotPanelShow()),this.onRowGroupChanged()}createNorthPanel(){const t=document.createElement("div");t.classList.add("ag-column-drop-wrapper"),x._setAriaRole(t,"presentation"),this.rowGroupComp=new el(!0),this.createManagedBean(this.rowGroupComp),this.pivotComp=new Qa(!0),this.createManagedBean(this.pivotComp),t.appendChild(this.rowGroupComp.getGui()),t.appendChild(this.pivotComp.getGui());const e=this.onDropPanelVisible.bind(this);return this.addManagedListeners(this.rowGroupComp,{displayChanged:e}),this.addManagedListeners(this.pivotComp,{displayChanged:e}),this.onDropPanelVisible(),t}onDropPanelVisible(){const t=this.rowGroupComp.isDisplayed()&&this.pivotComp.isDisplayed(),e="ag-column-drop-horizontal-half-width";this.rowGroupComp.addOrRemoveCssClass(e,t),this.pivotComp.addOrRemoveCssClass(e,t)}onRowGroupChanged(){if(!this.rowGroupComp)return;const t=this.gos.get("rowGroupPanelShow");if(t==="always")this.rowGroupComp.setDisplayed(!0);else if(t==="onlyWhenGrouping"){const e=!this.funcColsService.isRowGroupEmpty();this.rowGroupComp.setDisplayed(e)}else this.rowGroupComp.setDisplayed(!1)}onPivotPanelShow(){if(!this.pivotComp)return;const t=this.gos.get("pivotPanelShow");if(t==="always")this.pivotComp.setDisplayed(!0);else if(t==="onlyWhenPivoting"){const e=this.columnModel.isPivotActive();this.pivotComp.setDisplayed(e)}else this.pivotComp.setDisplayed(!1)}},Ey={selector:"AG-GRID-HEADER-DROP-ZONES",component:Sy},Ty=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="columnDropZonesService"}getDropZoneSelector(){return Ey}},By=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="filterAggregatesStage"}wireBeans(t){this.filterManager=t.filterManager,this.columnModel=t.columnModel}execute(t){var f,m;const e=this.columnModel.isPivotMode(),n=((f=this.filterManager)==null?void 0:f.isAggregateFilterPresent())||((m=this.filterManager)==null?void 0:m.isAggregateQuickFilterPresent()),o=y=>!y.node.group,s=y=>y.node.leafGroup,l=x._getGroupAggFiltering(this.gos)||(e?s:o),{changedPath:c}=t,u=(y,T=!1)=>{y.childrenAfterFilter&&(y.childrenAfterAggFilter=y.childrenAfterFilter,T&&y.childrenAfterAggFilter.forEach(B=>u(B,T)),this.setAllChildrenCount(y)),y.sibling&&(y.sibling.childrenAfterAggFilter=y.childrenAfterAggFilter)},p=y=>{var T;y.childrenAfterAggFilter=((T=y.childrenAfterFilter)==null?void 0:T.filter(B=>{var L;return l({node:B})&&this.filterManager.doesRowPassAggregateFilters({rowNode:B})?(u(B,!0),!0):(L=B.childrenAfterAggFilter)==null?void 0:L.length}))||null,this.setAllChildrenCount(y),y.sibling&&(y.sibling.childrenAfterAggFilter=y.childrenAfterAggFilter)};c.forEachChangedNodeDepthFirst(n?p:u,!0)}setAllChildrenCountTreeData(t){const e=t.childrenAfterAggFilter;let n=0;if(e){const o=e.length;n=o;for(let s=0;s<o;++s)n+=e[s].allChildrenCount??0}t.setAllChildrenCount(n===0&&t.level>=0?null:n)}setAllChildrenCountGridGrouping(t){let e=0;t.childrenAfterAggFilter.forEach(n=>{n.group?e+=n.allChildrenCount:e++}),t.setAllChildrenCount(e)}setAllChildrenCount(t){if(!t.hasChildren()){t.setAllChildrenCount(null);return}this.gos.get("treeData")?this.setAllChildrenCountTreeData(t):this.setAllChildrenCountGridGrouping(t)}},Vy=class extends x.TabGuardComp{constructor(){super(`
|
|
17
|
+
`,[T.SortIndicatorSelector]),this.column=t,this.dropZonePurpose=o,this.eSortIndicator=T.RefPlaceholder,this.popupShowing=!1}wireBeans(t){super.wireBeans(t),this.popupService=t.popupService,this.sortController=t.sortController,this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.funcColsService=t.funcColsService,this.aggFuncService=t.aggFuncService}postConstruct(){this.displayName=this.columnNameService.getDisplayNameForColumn(this.column,"columnDrop"),super.postConstruct(),this.setupSort(),this.addManagedEventListeners({sortChanged:()=>{this.setupAria()}}),this.isGroupingZone()&&this.addManagedPropertyListener("groupLockGroupColumns",()=>{this.refreshRemove(),this.refreshDraggable(),this.setupAria()})}getItem(){return this.column}getDisplayName(){return this.displayName}getTooltip(){return this.column.getColDef().headerTooltip}addAdditionalAriaInstructions(t,e){const n=this.gos.get("rowGroupPanelSuppressSort"),o=this.gos.get("functionsReadOnly");if(this.isAggregationZone()&&!o){const i=e("ariaDropZoneColumnValueItemDescription","Press ENTER to change the aggregation type");t.push(i)}if(this.isGroupingZone()&&this.column.isSortable()&&!n){const i=e("ariaDropZoneColumnGroupItemDescription","Press ENTER to sort");t.push(i)}super.addAdditionalAriaInstructions(t,e)}isDraggable(){return this.isReadOnly()}isRemovable(){return this.isReadOnly()}isReadOnly(){return!this.isGroupingAndLocked()&&!this.gos.get("functionsReadOnly")}getAriaDisplayName(){const t=this.localeService.getLocaleTextFunc(),{name:e,aggFuncName:n}=this.getColumnAndAggFuncName(),o=t("ariaDropZoneColumnComponentAggFuncSeparator"," of "),i={asc:t("ariaDropZoneColumnComponentSortAscending","ascending"),desc:t("ariaDropZoneColumnComponentSortDescending","descending")},l=this.column.getSort(),c=this.gos.get("rowGroupPanelSuppressSort");return[n&&`${n}${o}`,e,this.isGroupingZone()&&!c&&l&&`, ${i[l]}`].filter(d=>!!d).join("")}getColumnAndAggFuncName(){const t=this.displayName;let e="";if(this.isAggregationZone()){const n=this.column.getAggFunc(),o=typeof n=="string"?n:"agg";e=this.localeService.getLocaleTextFunc()(o,o)}return{name:t,aggFuncName:e}}setupSort(){const t=this.column.isSortable(),e=this.isGroupingZone();if(!(!t||!e)&&!this.gos.get("rowGroupPanelSuppressSort")){this.eSortIndicator.setupSort(this.column,!0);const n=o=>{o.preventDefault();const l=this.gos.get("multiSortKey")==="ctrl"?o.ctrlKey||o.metaKey:o.shiftKey;this.sortController.progressSort(this.column,l,"uiColumnSorted")};this.addGuiEventListener("click",n),this.addGuiEventListener("keydown",o=>{o.key===T.KeyCode.ENTER&&this.isGroupingZone()&&n(o)})}}getDefaultIconName(){return"hide"}createGetDragItem(){const{column:t}=this;return()=>{const e={};return e[t.getId()]=t.isVisible(),{columns:[t],visibleState:e}}}setupComponents(){super.setupComponents(),this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&this.addGuiEventListener("click",this.onShowAggFuncSelection.bind(this))}onKeyDown(t){super.onKeyDown(t),t.key===T.KeyCode.ENTER&&this.isAggregationZone()&&!this.gos.get("functionsReadOnly")&&(t.preventDefault(),this.onShowAggFuncSelection())}getDisplayValue(){const{name:t,aggFuncName:e}=this.getColumnAndAggFuncName();return this.isAggregationZone()?`${e}(${t})`:t}onShowAggFuncSelection(){if(this.popupShowing)return;this.popupShowing=!0;const t=new Me.VirtualList({cssIdentifier:"select-agg-func"}),e=this.aggFuncService.getFuncNames(this.column),n=this.getGui(),o=t.getGui();t.setModel({getRow:function(m){return e[m]},getRowCount:function(){return e.length}}),this.createBean(t);const i=T._loadTemplate('<div class="ag-select-agg-func-popup"></div>');i.style.top="0px",i.style.left="0px",i.appendChild(o),i.style.width=`${n.clientWidth}px`;const[l]=this.addManagedElementListeners(i,{focusout:m=>{!i.contains(m.relatedTarget)&&p&&p.hideFunc()}}),c=m=>{this.destroyBean(t),this.popupShowing=!1,(m==null?void 0:m.key)==="Escape"&&n.focus(),l&&l()},d=this.localeService.getLocaleTextFunc(),p=this.popupService.addPopup({modal:!0,eChild:i,closeOnEsc:!0,closedCallback:c,ariaLabel:d("ariaLabelAggregationFunction","Aggregation Function")});p&&t.setComponentCreator(this.createAggSelect.bind(this,p.hideFunc)),t.addGuiEventListener("keydown",m=>{if(m.key===T.KeyCode.ENTER||m.key===T.KeyCode.SPACE){const y=t.getLastFocusedRow();if(y==null)return;const x=t.getComponentAt(y);x&&x.selectItem()}}),this.popupService.positionPopupByComponent({type:"aggFuncSelect",eventSource:n,ePopup:i,keepWithinBounds:!0,column:this.column,position:"under"}),t.refresh();let h=e.findIndex(m=>m===this.column.getAggFunc());h===-1&&(h=0),t.focusRow(h)}createAggSelect(t,e){const n=()=>{t(),this.getGui().focus(),this.funcColsService.setColumnAggFunc(this.column,e,"toolPanelDragAndDrop")},o=this.localeService.getLocaleTextFunc(),i=e.toString(),l=o(i,i);return new Bv(n,l)}isGroupingAndLocked(){return this.isGroupingZone()&&this.columnModel.isColGroupLocked(this.column)}isAggregationZone(){return this.dropZonePurpose==="aggregation"}isGroupingZone(){return this.dropZonePurpose==="rowGroup"}getDragSourceType(){return T.DragSourceType.ToolPanel}destroy(){super.destroy(),this.column=null}},Bv=class extends T.Component{constructor(t,e){super('<div class="ag-select-agg-func-item"/>'),this.selectItem=t,this.getGui().innerText=e,this.addGuiEventListener("click",this.selectItem)}},fl=class extends Me.PillDropZonePanel{constructor(t,e){super(t),this.dropZonePurpose=e}wireBeans(t){super.wireBeans(t),this.columnModel=t.columnModel,this.funcColsService=t.funcColsService}init(t){super.init(t),this.addManagedEventListeners({newColumnsLoaded:this.refreshGui.bind(this)}),this.addManagedPropertyListeners(["functionsReadOnly","rowGroupPanelSuppressSort","groupLockGroupColumns"],this.refreshGui.bind(this))}getItems(t){return t.columns??[]}isInterestedIn(t){return t===T.DragSourceType.HeaderCell||t===T.DragSourceType.ToolPanel}minimumAllowedNewInsertIndex(){const t=this.gos.get("groupLockGroupColumns"),e=this.funcColsService.getRowGroupColumns().length;return t===-1?e:Math.min(t,e)}showOrHideColumnOnExit(t){return this.isRowGroupPanel()&&!this.gos.get("suppressRowGroupHidesColumns")&&!t.fromNudge}handleDragEnterEnd(t){if(this.showOrHideColumnOnExit(t)){const o=t.dragSource.getDragItem().columns;this.setColumnsVisible(o,!1,"uiColumnDragged")}}handleDragLeaveEnd(t){if(this.showOrHideColumnOnExit(t)){const n=t.dragSource.getDragItem();this.setColumnsVisible(n.columns,!0,"uiColumnDragged")}}setColumnsVisible(t,e,n){if(t){const o=t.filter(i=>!i.getColDef().lockVisible);this.columnModel.setColsVisible(o,e,n)}}isRowGroupPanel(){return this.dropZonePurpose==="rowGroup"}createPillComponent(t,e,n,o){return new Vv(t,e,n,this.dropZonePurpose,o)}},ml=class extends fl{constructor(t){super(t,"pivot")}postConstruct(){const t=this.localeService.getLocaleTextFunc(),e=t("pivotColumnsEmptyMessage","Drag here to set column labels"),n=t("pivots","Column Labels");super.init({icon:T._createIconNoSpan("pivotPanel",this.gos,null),emptyMessage:e,title:n}),this.addManagedEventListeners({newColumnsLoaded:this.refresh.bind(this),columnPivotChanged:this.refresh.bind(this),columnPivotModeChanged:this.checkVisibility.bind(this)}),this.refresh()}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaPivotDropZonePanelLabel","Column Labels")}getTooltipParams(){const t=super.getTooltipParams();return t.location="pivotColumnsList",t}refresh(){this.checkVisibility(),this.refreshGui()}checkVisibility(){const t=this.columnModel.isPivotMode();if(this.isHorizontal())switch(this.gos.get("pivotPanelShow")){case"always":this.setDisplayed(t);break;case"onlyWhenPivoting":{const e=this.columnModel.isPivotActive();this.setDisplayed(t&&e);break}default:this.setDisplayed(!1);break}else this.setDisplayed(t)}isItemDroppable(t,e){return this.gos.get("functionsReadOnly")||!t.isPrimary()?!1:t.isAllowPivot()&&(!t.isPivotActive()||this.isSourceEventFromTarget(e))}updateItems(t){this.funcColsService.setPivotColumns(t,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?"pivot":"notAllowed"}getExistingItems(){return this.funcColsService.getPivotColumns()}},gl=class extends fl{constructor(t){super(t,"rowGroup")}postConstruct(){const t=this.localeService.getLocaleTextFunc(),e=t("rowGroupColumnsEmptyMessage","Drag here to set row groups"),n=t("groups","Row Groups");super.init({icon:T._createIconNoSpan("rowGroupPanel",this.gos,null),emptyMessage:e,title:n}),this.addManagedEventListeners({columnRowGroupChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaRowGroupDropZonePanelLabel","Row Groups")}getTooltipParams(){const t=super.getTooltipParams();return t.location="rowGroupColumnsList",t}isItemDroppable(t,e){return this.gos.get("functionsReadOnly")||!t.isPrimary()?!1:t.isAllowRowGroup()&&(!t.isRowGroupActive()||this.isSourceEventFromTarget(e))}updateItems(t){this.funcColsService.setRowGroupColumns(t,"toolPanelUi")}getIconName(){return this.isPotentialDndItems()?"group":"notAllowed"}getExistingItems(){return this.funcColsService.getRowGroupColumns()}},Pv=class extends T.Component{wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService}constructor(){super()}postConstruct(){this.setGui(this.createNorthPanel());const t=this.onRowGroupChanged.bind(this);this.addManagedEventListeners({columnRowGroupChanged:t,newColumnsLoaded:t}),this.addManagedPropertyListener("rowGroupPanelShow",t),this.addManagedPropertyListener("pivotPanelShow",()=>this.onPivotPanelShow()),this.onRowGroupChanged()}createNorthPanel(){const t=document.createElement("div");t.classList.add("ag-column-drop-wrapper"),T._setAriaRole(t,"presentation"),this.rowGroupComp=new gl(!0),this.createManagedBean(this.rowGroupComp),this.pivotComp=new ml(!0),this.createManagedBean(this.pivotComp),t.appendChild(this.rowGroupComp.getGui()),t.appendChild(this.pivotComp.getGui());const e=this.onDropPanelVisible.bind(this);return this.addManagedListeners(this.rowGroupComp,{displayChanged:e}),this.addManagedListeners(this.pivotComp,{displayChanged:e}),this.onDropPanelVisible(),t}onDropPanelVisible(){const t=this.rowGroupComp.isDisplayed()&&this.pivotComp.isDisplayed(),e="ag-column-drop-horizontal-half-width";this.rowGroupComp.addOrRemoveCssClass(e,t),this.pivotComp.addOrRemoveCssClass(e,t)}onRowGroupChanged(){if(!this.rowGroupComp)return;const t=this.gos.get("rowGroupPanelShow");if(t==="always")this.rowGroupComp.setDisplayed(!0);else if(t==="onlyWhenGrouping"){const e=!this.funcColsService.isRowGroupEmpty();this.rowGroupComp.setDisplayed(e)}else this.rowGroupComp.setDisplayed(!1)}onPivotPanelShow(){if(!this.pivotComp)return;const t=this.gos.get("pivotPanelShow");if(t==="always")this.pivotComp.setDisplayed(!0);else if(t==="onlyWhenPivoting"){const e=this.columnModel.isPivotActive();this.pivotComp.setDisplayed(e)}else this.pivotComp.setDisplayed(!1)}},Rv={selector:"AG-GRID-HEADER-DROP-ZONES",component:Pv},Dv=class extends T.BeanStub{constructor(){super(...arguments),this.beanName="columnDropZonesService"}getDropZoneSelector(){return Rv}},Iv=class extends T.BeanStub{constructor(){super(...arguments),this.beanName="filterAggregatesStage"}wireBeans(t){this.filterManager=t.filterManager,this.columnModel=t.columnModel}execute(t){var h,m;const e=this.columnModel.isPivotMode(),n=((h=this.filterManager)==null?void 0:h.isAggregateFilterPresent())||((m=this.filterManager)==null?void 0:m.isAggregateQuickFilterPresent()),o=y=>!y.node.group,i=y=>y.node.leafGroup,l=T._getGroupAggFiltering(this.gos)||(e?i:o),{changedPath:c}=t,d=(y,x=!1)=>{y.childrenAfterFilter&&(y.childrenAfterAggFilter=y.childrenAfterFilter,x&&y.childrenAfterAggFilter.forEach(w=>d(w,x)),this.setAllChildrenCount(y)),y.sibling&&(y.sibling.childrenAfterAggFilter=y.childrenAfterAggFilter)},p=y=>{var x;y.childrenAfterAggFilter=((x=y.childrenAfterFilter)==null?void 0:x.filter(w=>{var G;return l({node:w})&&this.filterManager.doesRowPassAggregateFilters({rowNode:w})?(d(w,!0),!0):(G=w.childrenAfterAggFilter)==null?void 0:G.length}))||null,this.setAllChildrenCount(y),y.sibling&&(y.sibling.childrenAfterAggFilter=y.childrenAfterAggFilter)};c.forEachChangedNodeDepthFirst(n?p:d,!0)}setAllChildrenCountTreeData(t){const e=t.childrenAfterAggFilter;let n=0;if(e){const o=e.length;n=o;for(let i=0;i<o;++i)n+=e[i].allChildrenCount??0}t.setAllChildrenCount(n===0&&t.level>=0?null:n)}setAllChildrenCountGridGrouping(t){let e=0;t.childrenAfterAggFilter.forEach(n=>{n.group?e+=n.allChildrenCount:e++}),t.setAllChildrenCount(e)}setAllChildrenCount(t){if(!t.hasChildren()){t.setAllChildrenCount(null);return}this.gos.get("treeData")?this.setAllChildrenCountTreeData(t):this.setAllChildrenCountGridGrouping(t)}},Fv=class extends T.TabGuardComp{constructor(){super(`
|
|
18
18
|
<div class="ag-group-filter">
|
|
19
19
|
<div data-ref="eGroupField"></div>
|
|
20
20
|
<div data-ref="eUnderlyingFilter"></div>
|
|
21
21
|
</div>
|
|
22
|
-
`),this.eGroupField=
|
|
22
|
+
`),this.eGroupField=T.RefPlaceholder,this.eUnderlyingFilter=T.RefPlaceholder}wireBeans(t){this.filterManager=t.filterManager,this.columnNameService=t.columnNameService,this.funcColsService=t.funcColsService}postConstruct(){this.initialiseTabGuard({})}init(t){return this.updateParams(t).then(()=>{this.addManagedEventListeners({columnRowGroupChanged:()=>this.onColumnRowGroupChanged(),filterDestroyed:e=>this.onFilterDestroyed(e)})})}refresh(t){return this.updateParams(t),!0}updateParams(t){return this.params=t,this.validateParams(),this.updateGroups()}validateParams(){const{colDef:t}=this.params;t.field&&T._warnOnce('Group Column Filter does not work with the colDef property "field". This property will be ignored.'),t.filterValueGetter&&T._warnOnce('Group Column Filter does not work with the colDef property "filterValueGetter". This property will be ignored.'),t.filterParams&&T._warnOnce('Group Column Filter does not work with the colDef property "filterParams". This property will be ignored.')}updateGroups(){const t=this.updateGroupField();return this.getUnderlyingFilters(t)}getSourceColumns(){if(this.groupColumn=this.params.column,this.gos.get("treeData"))return T._warnOnce("Group Column Filter does not work with Tree Data enabled. Please disable Tree Data, or use a different filter."),[];const t=this.funcColsService.getSourceColumnsForGroupColumn(this.groupColumn);return t||(T._warnOnce("Group Column Filter only works on group columns. Please use a different filter."),[])}updateGroupField(){T._clearElement(this.eGroupField),this.eGroupFieldSelect&&this.destroyBean(this.eGroupFieldSelect);const t=this.getSourceColumns(),e=t.filter(n=>n.isFilterAllowed());return e.length?(t.length===1?(this.selectedColumn=e[0],T._setDisplayed(this.eGroupField,!1)):((!this.selectedColumn||!e.some(n=>n.getId()===this.selectedColumn.getId()))&&(this.selectedColumn=e[0]),this.createGroupFieldSelectElement(e),this.eGroupField.appendChild(this.eGroupFieldSelect.getGui()),this.eGroupField.appendChild(T._loadTemplate('<div class="ag-filter-separator"></div>')),T._setDisplayed(this.eGroupField,!0)),e):(this.selectedColumn=void 0,T._setDisplayed(this.eGroupField,!1),null)}createGroupFieldSelectElement(t){this.eGroupFieldSelect=this.createManagedBean(new T.AgSelect);const e=this.localeService.getLocaleTextFunc();this.eGroupFieldSelect.setLabel(e("groupFilterSelect","Select field:")),this.eGroupFieldSelect.setLabelAlignment("top"),this.eGroupFieldSelect.addOptions(t.map(n=>({value:n.getId(),text:this.columnNameService.getDisplayNameForColumn(n,"groupFilter",!1)??void 0}))),this.eGroupFieldSelect.setValue(this.selectedColumn.getId()),this.eGroupFieldSelect.onValueChange(n=>this.updateSelectedColumn(n)),this.eGroupFieldSelect.addCssClass("ag-group-filter-field-select-wrapper"),t.length===1&&this.eGroupFieldSelect.setDisabled(!0)}getUnderlyingFilters(t){if(!t)return this.filterColumnPairs=void 0,this.selectedFilter=void 0,this.groupColumn.setFilterActive(!1,"columnRowGroupChanged"),T.AgPromise.resolve();const e=[],n=[];return t.forEach(o=>{const i=this.filterManager.getOrCreateFilterWrapper(o);i!=null&&i.filterPromise&&e.push(i.filterPromise.then(l=>(l&&n.push({filter:l,column:o}),o.getId()===this.selectedColumn.getId()&&(this.selectedFilter=l??void 0),l)))}),T.AgPromise.all(e).then(()=>{this.filterColumnPairs=n,this.groupColumn.setFilterActive(this.isFilterActive(),"columnRowGroupChanged")})}addUnderlyingFilterElement(){var e;if(T._clearElement(this.eUnderlyingFilter),!this.selectedColumn)return T.AgPromise.resolve();const t=this.createManagedBean(new T.FilterWrapperComp(this.selectedColumn,"COLUMN_MENU"));return this.filterWrapperComp=t,t.hasFilter()?(this.eUnderlyingFilter.appendChild(t.getGui()),((e=t.getFilter())==null?void 0:e.then(()=>{var n,o;(n=t.afterGuiAttached)==null||n.call(t,this.afterGuiAttachedParams),!((o=this.afterGuiAttachedParams)!=null&&o.suppressFocus)&&this.eGroupFieldSelect&&!this.eGroupFieldSelect.isDisabled()&&this.eGroupFieldSelect.getFocusableElement().focus()}))??T.AgPromise.resolve()):T.AgPromise.resolve()}updateSelectedColumn(t){var n;if(!t)return;(n=this.filterWrapperComp)==null||n.afterGuiDetached(),this.destroyBean(this.filterWrapperComp);const e=this.getFilterColumnPair(t);this.selectedColumn=e==null?void 0:e.column,this.selectedFilter=e==null?void 0:e.filter,this.dispatchLocalEvent({type:"selectedColumnChanged"}),this.addUnderlyingFilterElement()}isFilterActive(){var t;return!!((t=this.filterColumnPairs)!=null&&t.some(({filter:e})=>e.isFilterActive()))}doesFilterPass(){return!0}getModel(){return null}setModel(){return T.AgPromise.resolve()}afterGuiAttached(t){this.afterGuiAttachedParams=t,this.addUnderlyingFilterElement()}afterGuiDetached(){var t,e;T._clearElement(this.eUnderlyingFilter),(e=(t=this.selectedFilter)==null?void 0:t.afterGuiDetached)==null||e.call(t)}onColumnRowGroupChanged(){this.updateGroups().then(()=>{this.dispatchLocalEvent({type:"columnRowGroupChanged"})})}onFilterDestroyed({column:t,source:e}){var o;if(e==="gridDestroyed")return;const n=t.getColId();(o=this.filterColumnPairs)!=null&&o.some(({column:i})=>i.getColId()===n)&&setTimeout(()=>{this.isAlive()&&this.updateGroups()})}getFilterColumnPair(t){var e;if(t)return(e=this.filterColumnPairs)==null?void 0:e.find(({column:n})=>n.getId()===t)}getSelectedFilter(){return this.selectedFilter}getSelectedColumn(){return this.selectedColumn}isFilterAllowed(){return!!this.selectedColumn}destroy(){super.destroy()}},Ov=class extends T.Component{constructor(){super(`
|
|
23
23
|
<div data-ref="eFloatingFilter" class="ag-group-floating-filter ag-floating-filter-input" role="presentation"></div>
|
|
24
|
-
`),this.eFloatingFilter=x.RefPlaceholder,this.haveAddedColumnListeners=!1}wireBeans(t){this.columnNameService=t.columnNameService,this.filterManager=t.filterManager}init(t){this.params=t;const e=this.gos.get("groupDisplayType")==="multipleColumns";return new x.AgPromise(n=>{this.params.parentFilterInstance(o=>{this.parentFilterInstance=o,e?this.setupUnderlyingFloatingFilterElement().then(()=>n()):(this.setupReadOnlyFloatingFilterElement(),n())})}).then(()=>{this.addManagedListeners(this.parentFilterInstance,{selectedColumnChanged:this.onSelectedColumnChanged.bind(this),columnRowGroupChanged:this.onColumnRowGroupChanged.bind(this)})})}onParamsUpdated(t){this.refresh(t)}refresh(t){this.params=t,this.setParams()}setParams(){var n;const t=this.columnNameService.getDisplayNameForColumn(this.params.column,"header",!0),e=this.localeService.getLocaleTextFunc();(n=this.eFloatingFilterText)==null||n.setInputAriaLabel(`${t} ${e("ariaFilterInput","Filter Input")}`)}setupReadOnlyFloatingFilterElement(){this.eFloatingFilterText||(this.eFloatingFilterText=this.createManagedBean(new x.AgInputTextField),this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams()),this.updateDisplayedValue(),this.eFloatingFilter.appendChild(this.eFloatingFilterText.getGui())}setupUnderlyingFloatingFilterElement(){this.showingUnderlyingFloatingFilter=!1,this.underlyingFloatingFilter=void 0,x._clearElement(this.eFloatingFilter);const t=this.parentFilterInstance.getSelectedColumn();if(t&&!t.isVisible()){const e=this.filterManager.getFloatingFilterCompDetails(t,this.params.showParentFilter);if(e)return this.haveAddedColumnListeners||(this.haveAddedColumnListeners=!0,this.addManagedListeners(t,{visibleChanged:this.onColumnVisibleChanged.bind(this),colDefChanged:this.onColDefChanged.bind(this)})),e.newAgStackInstance().then(n=>{var o,s;this.underlyingFloatingFilter=n,(s=this.underlyingFloatingFilter)==null||s.onParentModelChanged((o=this.parentFilterInstance.getSelectedFilter())==null?void 0:o.getModel()),this.appendChild(n.getGui()),this.showingUnderlyingFloatingFilter=!0})}return this.setupReadOnlyFloatingFilterElement(),x.AgPromise.resolve()}onColumnVisibleChanged(){this.setupUnderlyingFloatingFilterElement()}onColDefChanged(t){var n,o,s;if(!t.column)return;const e=this.filterManager.getFloatingFilterCompDetails(t.column,this.params.showParentFilter);e&&((n=this.underlyingFloatingFilter)!=null&&n.refresh?this.underlyingFloatingFilter.refresh(e.params):(s=(o=this.underlyingFloatingFilter)==null?void 0:o.onParamsUpdated)==null||s.call(o,e.params))}onParentModelChanged(t,e){var n,o;this.showingUnderlyingFloatingFilter?(o=this.underlyingFloatingFilter)==null||o.onParentModelChanged((n=this.parentFilterInstance.getSelectedFilter())==null?void 0:n.getModel(),e):this.updateDisplayedValue()}updateDisplayedValue(){if(!this.parentFilterInstance||!this.eFloatingFilterText)return;const t=this.parentFilterInstance.getSelectedFilter();if(!t){this.eFloatingFilterText.setValue(""),this.eFloatingFilterText.setDisplayed(!1);return}if(this.eFloatingFilterText.setDisplayed(!0),t.getModelAsString){const e=t.getModel();this.eFloatingFilterText.setValue(e==null?"":t.getModelAsString(e))}else this.eFloatingFilterText.setValue("")}onSelectedColumnChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}onColumnRowGroupChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}destroy(){super.destroy()}},tl=class{constructor(){this.allSets={},this.allParents=[]}removeFromChildrenAfterGroup(t,e){const n=this.getSet(t);n.removeFromChildrenAfterGroup[e.id]=!0}isRemoveFromAllLeafChildren(t,e){return!!this.getSet(t).removeFromAllLeafChildren[e.id]}preventRemoveFromAllLeafChildren(t,e){const n=this.getSet(t);delete n.removeFromAllLeafChildren[e.id]}removeFromAllLeafChildren(t,e){const n=this.getSet(t);n.removeFromAllLeafChildren[e.id]=!0}getSet(t){return this.allSets[t.id]||(this.allSets[t.id]={removeFromAllLeafChildren:{},removeFromChildrenAfterGroup:{}},this.allParents.push(t)),this.allSets[t.id]}getAllParents(){return this.allParents}flush(){this.allParents.forEach(t=>{var o;const e=this.allSets[t.id];t.childrenAfterGroup=t.childrenAfterGroup.filter(s=>!e.removeFromChildrenAfterGroup[s.id]),t.allLeafChildren=((o=t.allLeafChildren)==null?void 0:o.filter(s=>!e.removeFromAllLeafChildren[s.id]))??null,t.updateHasChildren();const n=t.sibling;n&&(n.childrenAfterGroup=t.childrenAfterGroup,n.allLeafChildren=t.allLeafChildren)}),this.allSets={},this.allParents.length=0}};function Ay(t){if(!t)return!1;const e=t.length;if(e<2)return!1;let n=!1;for(let o=1;o<e;o++)if(zd(t[o-1],t[o])>0){n=!0;break}return n?(t.sort(zd),!0):!1}function zd(t,e){const n=t.sourceRowIndex,o=e.sourceRowIndex,s=n>=0,l=o>=0,c=s&&l,u=!s&&!l;return c?n-o:u?t.__objectId-e.__objectId:s?1:-1}var Py=class extends x.BeanStub{wireBeans(t){this.beans=t,this.columnModel=t.columnModel,this.funcColsService=t.funcColsService,this.valueService=t.valueService,this.selectionService=t.selectionService,this.showRowGroupColsService=t.showRowGroupColsService}execute(t){const e=this.createGroupingDetails(t);if(e.transactions)this.handleTransaction(e);else{const n=t.afterColumnsChanged===!0;this.shotgunResetEverything(e,n)}this.positionLeafsAndGroups(t.changedPath),this.orderGroups(e)}positionLeafsAndGroups(t){t.forEachChangedNodeDepthFirst(e=>{if(e.childrenAfterGroup){const n=[],o=[];let s;e.childrenAfterGroup.forEach(l=>{var c;(c=l.childrenAfterGroup)!=null&&c.length?l.key===""&&!s?s=l:o.push(l):n.push(l)}),s&&o.push(s),e.childrenAfterGroup=[...n,...o]}},!1)}createGroupingDetails(t){const{rowNode:e,changedPath:n,rowNodeTransactions:o,rowNodesOrderChanged:s}=t,l=this.funcColsService.getRowGroupColumns();return{expandByDefault:this.gos.get("groupDefaultExpanded"),groupedCols:l,rootNode:e,pivotMode:this.columnModel.isPivotMode(),groupedColCount:(l==null?void 0:l.length)??0,transactions:o,rowNodesOrderChanged:!!s,changedPath:n,groupAllowUnbalanced:this.gos.get("groupAllowUnbalanced"),isGroupOpenByDefault:this.gos.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:this.gos.getCallback("initialGroupOrderComparator"),suppressGroupMaintainValueType:this.gos.get("suppressGroupMaintainValueType"),keyCreators:(l==null?void 0:l.map(u=>u.getColDef().keyCreator))??[]}}handleTransaction(t){t.transactions.forEach(e=>{const n=new tl;x._existsAndNotEmpty(e.remove)&&this.removeNodes(e.remove,t,n),x._existsAndNotEmpty(e.update)&&this.moveNodesInWrongPath(e.update,t,n),x._existsAndNotEmpty(e.add)&&this.insertNodes(e.add,t);const o=n.getAllParents().slice();n.flush(),this.removeEmptyGroups(o,t)}),t.rowNodesOrderChanged&&this.sortChildren(t)}sortChildren(t){t.changedPath.forEachChangedNodeDepthFirst(e=>{Ay(e.childrenAfterGroup)&&t.changedPath.addParentNode(e)},!1,!0)}orderGroups(t){const e=t.initialGroupOrderComparator;x._exists(e)&&n(t.rootNode);function n(o){x._exists(o.childrenAfterGroup)&&!o.leafGroup&&(o.childrenAfterGroup.sort((l,c)=>e({nodeA:l,nodeB:c})),o.childrenAfterGroup.forEach(l=>n(l)))}}getExistingPathForNode(t,e){const n=[];let o=t.parent;for(;o&&o!==e.rootNode;)n.push({key:o.key,rowGroupColumn:o.rowGroupColumn,field:o.field}),o=o.parent;return n.reverse(),n}moveNodesInWrongPath(t,e,n){t.forEach(o=>{e.changedPath.isActive()&&e.changedPath.addParentNode(o.parent);const s=p=>p.key,l=this.getExistingPathForNode(o,e).map(s),c=this.getGroupInfo(o,e).map(s);x._areEqual(l,c)||this.moveNode(o,e,n)})}moveNode(t,e,n){if(this.removeNodesFromParents([t],e,n),this.insertOneNode(t,e,n),t.setData(t.data),e.changedPath.isActive()){const o=t.parent;e.changedPath.addParentNode(o)}}removeNodes(t,e,n){this.removeNodesFromParents(t,e,n),e.changedPath.isActive()&&t.forEach(o=>e.changedPath.addParentNode(o.parent))}forEachParentGroup(t,e,n){let o=e;for(;o&&o!==t.rootNode;)n(o),o=o.parent}removeNodesFromParents(t,e,n){const o=n==null,s=n||new tl;t.forEach(l=>{this.removeFromParent(l,s),this.forEachParentGroup(e,l.parent,c=>{s.removeFromAllLeafChildren(c,l)})}),o&&s.flush()}removeEmptyGroups(t,e){let n=!0;const o=s=>{var p;const l=this.getChildrenMappedKey(s.key,s.rowGroupColumn),c=s.parent;return(c!=null&&c.childrenMapped?!c.childrenMapped[l]:!0)?!1:!!s.group&&(((p=s.childrenAfterGroup)==null?void 0:p.length)??0)===0};for(;n;){n=!1;const s=new tl;t.forEach(l=>{this.forEachParentGroup(e,l,c=>{o(c)&&(n=!0,this.removeFromParent(c,s),c.setSelectedParams({newValue:!1,source:"rowGroupChanged"}))})}),s.flush()}}removeFromParent(t,e){var o;t.parent&&(e?e.removeFromChildrenAfterGroup(t.parent,t):(x._removeFromArray(t.parent.childrenAfterGroup,t),t.parent.updateHasChildren()));const n=this.getChildrenMappedKey(t.key,t.rowGroupColumn);(o=t.parent)!=null&&o.childrenMapped&&delete t.parent.childrenMapped[n],t.setRowTop(null),t.setRowIndex(null)}addToParent(t,e){const n=this.getChildrenMappedKey(t.key,t.rowGroupColumn);e!=null&&e.childrenMapped&&e.childrenMapped[n]!==t&&(e.childrenMapped[n]=t,e.childrenAfterGroup.push(t),e.setGroup(!0))}areGroupColsEqual(t,e){return t==null||e==null||t.pivotMode!==e.pivotMode?!1:x._areEqual(t.groupedCols,e.groupedCols)&&x._areEqual(t.keyCreators,e.keyCreators)}checkAllGroupDataAfterColsChanged(t){const e=n=>{n&&n.forEach(o=>{var c;if(!o.group)return;const l={field:o.field,key:o.key,rowGroupColumn:o.rowGroupColumn,leafNode:(c=o.allLeafChildren)==null?void 0:c[0]};this.setGroupData(o,l,t),e(o.childrenAfterGroup)})};e(t.rootNode.childrenAfterGroup)}shotgunResetEverything(t,e){if(this.noChangeInGroupingColumns(t,e))return;this.selectionService.filterFromSelection(l=>l&&!l.group);const{groupedCols:n}=t,o=t.rootNode;o.leafGroup=n.length===0,o.childrenAfterGroup=[],o.childrenMapped={},o.updateHasChildren();const s=o.sibling;s&&(s.childrenAfterGroup=o.childrenAfterGroup,s.childrenMapped=o.childrenMapped),this.insertNodes(o.allLeafChildren,t)}noChangeInGroupingColumns(t,e){let n=!1;const o=this.showRowGroupColsService.getShowRowGroupCols(),s=o?o.map(l=>l.getId()).join("-"):"";return e&&(n=this.areGroupColsEqual(t,this.oldGroupingDetails),this.oldGroupDisplayColIds!==s&&this.checkAllGroupDataAfterColsChanged(t)),this.oldGroupingDetails=t,this.oldGroupDisplayColIds=s,n}insertNodes(t,e){t.forEach(n=>{this.insertOneNode(n,e),e.changedPath.isActive()&&e.changedPath.addParentNode(n.parent)})}insertOneNode(t,e,n){const o=this.getGroupInfo(t,e),s=this.findParentForNode(t,o,e,n);s.group||x._warnOnce("duplicate group keys for row data, keys should be unique",[s.data,t.data]),t.parent=s,t.level=o.length,s.childrenAfterGroup.push(t),s.updateHasChildren()}findParentForNode(t,e,n,o){let s=n.rootNode;return e.forEach((l,c)=>{s=this.getOrCreateNextNode(s,l,c,n),o!=null&&o.isRemoveFromAllLeafChildren(s,t)?o==null||o.preventRemoveFromAllLeafChildren(s,t):s.allLeafChildren.push(t)}),s}getOrCreateNextNode(t,e,n,o){var c;const s=this.getChildrenMappedKey(e.key,e.rowGroupColumn);let l=(c=t==null?void 0:t.childrenMapped)==null?void 0:c[s];return l||(l=this.createGroup(e,t,n,o),this.addToParent(l,t)),l}createGroup(t,e,n,o){const s=new x.RowNode(this.beans);return s.group=!0,s.field=t.field,s.rowGroupColumn=t.rowGroupColumn,this.setGroupData(s,t,o),s.key=t.key,s.id=this.createGroupId(s,e,n),s.level=n,s.leafGroup=n===o.groupedColCount-1,s.allLeafChildren=[],s.setAllChildrenCount(0),s.rowGroupIndex=n,s.childrenAfterGroup=[],s.childrenMapped={},s.updateHasChildren(),s.parent=e,this.setExpandedInitialValue(o,s),s}createGroupId(t,e,n){const o=(s,l)=>{if(!s.rowGroupColumn)return null;const c=l?o(l,l.parent):null;return`${c==null?"":c+"-"}${s.rowGroupColumn.getColId()}-${s.key}`};return x.RowNode.ID_PREFIX_ROW_GROUP+o(t,e)}setGroupData(t,e,n){t.groupData={},this.showRowGroupColsService.getShowRowGroupCols().forEach(s=>{const l=t.rowGroupColumn;l!==null&&s.isRowGroupDisplayed(l.getId())&&(n.suppressGroupMaintainValueType?t.groupData[s.getColId()]=e.key:t.groupData[s.getColId()]=this.valueService.getValue(l,e.leafNode))})}getChildrenMappedKey(t,e){return e?e.getId()+"-"+t:t}setExpandedInitialValue(t,e){if(t.pivotMode&&e.leafGroup){e.expanded=!1;return}const n=t.isGroupOpenByDefault;if(n){const o={rowNode:e,field:e.field,key:e.key,level:e.level,rowGroupColumn:e.rowGroupColumn};e.expanded=n(o)==!0;return}if(t.expandByDefault===-1){e.expanded=!0;return}e.expanded=e.level<t.expandByDefault}getGroupInfo(t,e){const n=[];return e.groupedCols.forEach(o=>{let s=this.valueService.getKeyForNode(o,t),l=s!=null&&s!=="";if((e.pivotMode||!e.groupAllowUnbalanced)&&!l&&(s="",l=!0),l){const u={key:s,field:o.getColDef().field,rowGroupColumn:o,leafNode:t};n.push(u)}}),n}},Dy=(t,e)=>t.treeNode.oldSourceRowIndex-e.treeNode.oldSourceRowIndex,ht=Object.freeze([]),Fy=ht.values(),ms=(t,e)=>{t.parent=null,t.treeNode=null,e?t.childrenAfterGroup=[]:(t.level=0,t.childrenAfterGroup=null,t.allLeafChildren=null)},Ry=class hm{constructor(e,n,o){this.parent=e,this.key=n,this.level=o,this.children=null,this.invalidatedHead=null,this.invalidatedNext=void 0,this.row=null,this.oldRow=null,this.duplicateRows=null,this.childrenAfterGroup=ht,this.allLeafChildren=ht,this.childrenChanged=!1,this.leafChildrenChanged=!1,this.oldSourceRowIndex=-1}isEmptyFillerNode(){var e,n;return!((e=this.row)!=null&&e.data)&&!((n=this.children)!=null&&n.size)}hasChildren(){var e;return!!((e=this.children)!=null&&e.size)}enumChildren(){var e;return((e=this.children)==null?void 0:e.values())??Fy}upsertKey(e){var o,s;typeof e!="string"&&(e=String(e));let n=(o=this.children)==null?void 0:o.get(e);return n||(n=new hm(this,e,this.level+1),(s=this.children??(this.children=new Map))==null||s.set(n.key,n)),n}destroy(){var o;const{row:e,parent:n}=this;n!==null&&((o=n==null?void 0:n.children)==null||o.delete(this.key),e!==null&&ms(e,!0),this.parent=null)}setRow(e){const{level:n,row:o,childrenAfterGroup:s}=this;if(n<0)o!==null&&o!==e&&ms(o,!0);else{if(o===e)return!1;o!==null?(e.allLeafChildren=o.allLeafChildren??this.allLeafChildren??ht,ms(o,!1)):e.allLeafChildren=this.allLeafChildren??ht}return e.level=n,e.childrenAfterGroup=s,e.treeNode=this,this.row=e,!0}removeRow(e){const{level:n,row:o,duplicateRows:s,childrenAfterGroup:l}=this;if(o===e){const c=this.popDuplicateRow();c?(this.row=c,c.childrenAfterGroup=l,n>=0&&(c.allLeafChildren=o.allLeafChildren??this.allLeafChildren??ht)):this.row=null}else{if(!(s!=null&&s.delete(e)))return!1;s.size===0&&(this.duplicateRows=null)}return ms(e,n<0),!0}addDuplicateRow(e){const{level:n}=this;let o=this.duplicateRows;if(o===null)o=new Set,this.duplicateRows=o;else if(o.has(e))return!1;return o.add(e),e.treeNode=this,e.level=n,n>=0&&(e.allLeafChildren=ht),e.childrenAfterGroup=ht,!0}sortFirstDuplicateRow(){const e=this.duplicateRows,n=this.row;if(!n||!e)return n;let o=n;for(const s of e)s.sourceRowIndex<o.sourceRowIndex&&(o=s);return o!==n&&(o.childrenAfterGroup=this.childrenAfterGroup,o.allLeafChildren=n.allLeafChildren??this.allLeafChildren??ht,n.childrenAfterGroup=ht,n.allLeafChildren=ht,e.delete(o),e.add(n),this.row=o),o}popDuplicateRow(){let e=null;const n=this.duplicateRows;return n!==null&&(e=n.values().next().value,e!==null&&n.delete(e)&&n.size===0&&(this.duplicateRows=null)),e}dequeueInvalidated(){const e=this.invalidatedHead;return e!==null&&(this.invalidatedHead=e.invalidatedNext??null,e.invalidatedNext=void 0),e}invalidate(){let e=this,n=this.parent;for(;n!==null&&e.invalidatedNext===void 0;)e.invalidatedNext=n.invalidatedHead,n.invalidatedHead=e,e=n,n=e.parent}invalidateOrder(){var n,o;const e=this.parent;e!==null&&!e.childrenChanged&&((((n=this.children)==null?void 0:n.size)??0)>1||!((o=e.row)!=null&&o.data))&&(e.childrenChanged=!0,e.invalidate())}getRowPosition(){var n,o;const e=this.row;return e!=null&&e.data?e.sourceRowIndex:((o=(n=this.childrenAfterGroup[0])==null?void 0:n.treeNode)==null?void 0:o.oldSourceRowIndex)??this.oldSourceRowIndex}updateChildrenAfterGroup(){var u;this.childrenChanged=!1;const e=((u=this.children)==null?void 0:u.size)??0;if(e===0)return this.childrenAfterGroup.length===0?!1:(this.leafChildrenChanged=!0,this.childrenAfterGroup=ht,this.row.childrenAfterGroup=ht,!0);let n=!1,o=this.childrenAfterGroup;o===ht?(o=new Array(e),this.childrenAfterGroup=o,this.row.childrenAfterGroup=o,n=!0):o.length!==e&&(o.length=e,n=!0);let s=0,l=-1,c=!1;for(const p of this.enumChildren()){const f=p.getRowPosition();f<l&&(c=!0),l=f,p.oldSourceRowIndex=f;const m=p.row;o[s]!==m&&(o[s]=m,n=!0),++s}return n&&(this.leafChildrenChanged=!0),c&&this.reorderChildrenList(o),n||c}reorderChildrenList(e){const n=e.length,o=this.children;e.sort(Dy),o.clear();for(let s=0;s<n;++s){const l=e[s].treeNode;o.set(l.key,l)}}updateAllLeafChildren(){var c,u;const{parent:e,row:n,childrenAfterGroup:o}=this;this.leafChildrenChanged=!1;let s=!1;const l=o.length;if(l===0)s=((c=n.allLeafChildren)==null?void 0:c.length)!==0,n.allLeafChildren=ht,this.allLeafChildren=ht;else if(l===1&&((u=o[0].allLeafChildren)!=null&&u.length))n.allLeafChildren=o[0].allLeafChildren,this.allLeafChildren=null,s=!0;else{let p=this.allLeafChildren;(p===ht||p===null)&&(p=[],this.allLeafChildren=p);const f=p.length;let m=0;for(let y=0;y<l;++y){const T=o[y],B=T.allLeafChildren,A=B.length;if(A)for(let I=0;I<A;++I){const L=B[I];(m>=f||p[m]!==L)&&(p[m]=L,s=!0),++m}else(m>=f||p[m]!==T)&&T&&(p[m]=T,s=!0),++m}f!==m&&(p.length=m,s=!0),n.allLeafChildren!==p&&(n.allLeafChildren=p,s=!0)}s&&e&&(e.leafChildrenChanged=!0)}},$d=t=>(t.treeNodeFlags&1)!==0,Ud=t=>(t.treeNodeFlags&2)!==0,Zd=t=>(t.treeNodeFlags&4)!==0,My=t=>(t.treeNodeFlags&8)!==0,Wd=t=>(t.treeNodeFlags&16)!==0,Hd=(t,e)=>{e?t.treeNodeFlags|=2:t.treeNodeFlags&=-3},Iy=t=>{const e=t.treeNodeFlags;e&1&&(t.treeNodeFlags=e|4)},Oy=t=>{const e=t.treeNodeFlags;e&1&&(t.treeNodeFlags=e|12)},dr=t=>{t.treeNodeFlags|=16},jd=t=>{t.treeNodeFlags=1|t.treeNodeFlags&-29},di=t=>{t.treeNodeFlags=0},Ly=class extends x.BeanStub{constructor(){super(...arguments),this.rowsPendingDestruction=null,this.root=new Ry(null,"",-1)}wireBeans(t){this.beans=t,this.showRowGroupColsService=t.showRowGroupColsService}destroy(){const t=this.root.row;t!==null&&(this.root.removeRow(t),di(t)),this.destroyTree(this.root),this.commitDestroyedRows(),super.destroy()}execute(t){const{rowNodeTransactions:e,rowNodesOrderChanged:n,changedPath:o}=t,s=t.rowNode,l=this.gos,c={changedPath:o,expandByDefault:l.get("groupDefaultExpanded"),suppressGroupMaintainValueType:l.get("suppressGroupMaintainValueType"),getDataPath:l.get("getDataPath"),isGroupOpenByDefault:l.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:l.getCallback("initialGroupOrderComparator")};this.root.setRow(s),s.leafGroup=!1;const p=s.sibling;p&&(p.childrenAfterGroup=s.childrenAfterGroup,p.childrenMapped=s.childrenMapped),e?this.handleTransaction(c,e,n):this.handleRowData(c,s,t.afterColumnsChanged===!0)}handleRowData(t,e,n){var s,l,c;const o=this.root;if(n||this.oldGroupDisplayColIds===void 0){const u=((l=(s=this.showRowGroupColsService)==null?void 0:s.getShowRowGroupCols())==null?void 0:l.map(p=>p.getId()).join("-"))??"";if(n){this.oldGroupDisplayColIds!==u&&this.checkAllGroupDataAfterColsChanged((c=o.row)==null?void 0:c.childrenAfterGroup);return}this.oldGroupDisplayColIds=u}this.clearTree(o),this.addOrUpdateRows(t,e.allLeafChildren,!1),this.commitTree(t)}handleTransaction(t,e,n){for(const{remove:o,update:s,add:l}of e)this.removeRows(o),this.addOrUpdateRows(t,s,!0),this.addOrUpdateRows(t,l,!1);n&&this.handleRowNodesOrderChanged(),this.commitTree(t)}handleRowNodesOrderChanged(){var e;const t=(e=this.root.row)==null?void 0:e.allLeafChildren;if(t)for(let n=0,o=t.length;n<o;++n){const s=t[n].treeNode;s&&s.oldSourceRowIndex!==n&&s.invalidateOrder()}}checkAllGroupDataAfterColsChanged(t){var e;for(let n=0,o=(t==null?void 0:t.length)??0;n<o;++n){const s=t[n];this.setGroupData(s,((e=s.treeNode)==null?void 0:e.key)??s.key),this.checkAllGroupDataAfterColsChanged(s.childrenAfterGroup)}}addOrUpdateRows(t,e,n){for(let o=0,s=(e==null?void 0:e.length)??0;o<s;++o){const l=e[o],c=this.upsertPath(this.getDataPath(t,l));c&&this.addOrUpdateRow(c,l,n)}}removeRows(t){for(let e=0,n=(t==null?void 0:t.length)??0;e<n;++e){const o=t[e],s=o.treeNode;s!==null&&this.removeRow(s,o)}}getDataPath({getDataPath:t},{data:e}){const n=(t==null?void 0:t(e))||ht;return n.length||x._warnOnce("getDataPath() should not return an empty path",[e]),n}upsertPath(t){let e=this.root;const n=t.length-1;for(let o=0;o<=n;++o){const s=e.upsertKey(t[o]);if(o>=n)return s.invalidate(),s;e=s}return null}addOrUpdateRow(t,e,n){var c;const{level:o,row:s}=t;if(o<0)return;let l=!1;if(s!==e){const u=e.treeNode;u!==null&&u!==t&&(u.removeRow(e),u.invalidate()),s===null?(t.setRow(e),l=!0):s.data?t.addDuplicateRow(e)&&(l=!0):(t.setRow(e),this.destroyRow(s,!0),l=!0)}n&&!Zd(e)&&(Iy(e),l=!0),l&&t.invalidate(),(c=this.rowsPendingDestruction)==null||c.delete(e)}removeRow(t,e){const{parent:n,level:o}=t;if(o<0)return;let s=!1;t.removeRow(e)&&(s=!0,n&&(n.childrenChanged=!0),this.destroyRow(e,!e.data)),s&&t.invalidate()}commitTree(t){var o;const e=this.root;this.commitInvalidatedChildren(t,e);const n=e.row;e.childrenChanged&&e.updateChildrenAfterGroup()&&dr(n),n.updateHasChildren(),Wd(n)&&(o=t.changedPath)!=null&&o.isActive()&&t.changedPath.addParentNode(n),jd(n),this.commitDestroyedRows()}commitInvalidatedChildren(t,e){for(;;){const n=e.dequeueInvalidated();if(n===null)break;n.parent===e&&this.commitChild(t,e,n)}}commitChild(t,e,n){if(n.isEmptyFillerNode()){this.clearTree(n);return}this.commitNodePreOrder(e,n),this.commitInvalidatedChildren(t,n),this.commitNodePostOrder(t,e,n)}commitNodePreOrder(t,e){let n=e.row;if(n===null?(n=this.createFillerRow(e),e.setRow(n)):(n=e.sortFirstDuplicateRow(),n.allChildrenCount===void 0&&(n.allChildrenCount=null)),n.parent=t.row,e.oldRow!==n)for(const s of e.enumChildren()){const l=s.row;l!==null&&(l.parent=n)}const o=e.key;n.key!==o?(n.key=o,Oy(n),this.setGroupData(n,o)):n.groupData||this.setGroupData(n,o)}commitNodePostOrder(t,e,n){var f,m,y;const o=n.row,s=n.oldRow;if(n.isEmptyFillerNode()){this.clearTree(n);return}n.childrenChanged&&n.updateChildrenAfterGroup()&&dr(o),n.leafChildrenChanged&&n.updateAllLeafChildren();const l=n.getRowPosition();n.oldSourceRowIndex!==l&&(n.oldSourceRowIndex=l,e.childrenChanged=!0);const c=!!((f=o.childrenAfterGroup)!=null&&f.length),u=c||!o.data,p=o.group;p!==u?(dr(o),o.setGroup(u),!u&&!o.expanded&&Hd(o,!1)):o.hasChildren()!==c&&(dr(o),o.updateHasChildren()),o.group&&!Ud(o)&&(s!==o&&s!==null&&s.group&&Ud(s)&&!t.isGroupOpenByDefault?o.expanded=s.expanded:o.expanded=this.getExpandedInitialValue(t,o),Hd(o,!0)),Zd(o)&&(dr(e.row),My(o)&&o.setData(o.data)),s!==o&&(n.oldRow=o,s!==null&&(p||n.hasChildren())&&dr(o),e.childrenChanged=!0,dr(e.row)),Wd(o)?(m=t.changedPath)!=null&&m.isActive()&&t.changedPath.addParentNode(o):$d(o)||(o.childrenAfterFilter||(o.childrenAfterFilter=o.childrenAfterGroup.slice()),o.childrenAfterAggFilter||(o.childrenAfterAggFilter=o.childrenAfterFilter.slice()),o.childrenAfterSort||(o.childrenAfterSort=o.childrenAfterAggFilter.slice())),jd(o),(y=n.duplicateRows)!=null&&y.size&&!n.duplicateRowsWarned&&(n.duplicateRowsWarned=!0,x._warnOnce("duplicate group keys for row data, keys should be unique",[o.id,o.data,...Array.from(n.duplicateRows).map(T=>T.data)]))}createFillerRow(t){const e=new x.RowNode(this.beans);e.key=t.key,e.group=!0,e.field=null,e.leafGroup=!1,e.rowGroupIndex=null,e.allChildrenCount=null;let n=t.level+"-"+t.key,o=t.parent;for(;o!==null;){const s=o.parent;if(s===null)break;n=`${o.level}-${o.key}-${n}`,o=s}return e.id=x.RowNode.ID_PREFIX_ROW_GROUP+n,e}setGroupData(t,e){var s;const n={};t.groupData=n;const o=(s=this.showRowGroupColsService)==null?void 0:s.getShowRowGroupCols();if(o)for(const l of o)n[l.getColId()]=e}getExpandedInitialValue(t,e){const n=t.isGroupOpenByDefault;return n?n({rowNode:e,field:e.field,key:e.key,level:e.level,rowGroupColumn:e.rowGroupColumn})==!0:t.expandByDefault===-1||e.level<t.expandByDefault}clearTree(t){const{parent:e,oldRow:n,row:o,level:s}=t;if(e!==null&&n!==null&&(e.childrenChanged=!0,e.row!==null&&dr(e.row)),o!==null&&s>=0){let l=t.row;for(;l!==null&&t.removeRow(l);)this.destroyRow(l,!l.data),l=t.row}for(const l of t.enumChildren())this.clearTree(l);t.destroy()}destroyTree(t){const{row:e,level:n,duplicateRows:o}=t;if(e&&(n>=0&&!e.data?this.destroyRow(e,!0):di(e)),o)for(const s of o)n>=0&&!s.data?this.destroyRow(s,!0):di(s);for(const s of t.enumChildren())this.destroyTree(s);t.destroy()}destroyRow(t,e){if(!$d(t)){di(t);return}if(!e){(this.rowsPendingDestruction??(this.rowsPendingDestruction=new Set)).add(t);return}di(t),t.setRowIndex(null),t.setRowTop(null),!t.data&&t.isSelected()&&t.setSelectedParams({newValue:!1,source:"rowGroupChanged"})}commitDestroyedRows(){const{rowsPendingDestruction:t}=this;if(t!==null){this.rowsPendingDestruction=null;for(const e of t)this.destroyRow(e,!0)}}},Gy=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="groupStage"}wireBeans(t){this.selectableService=t.selectableService}execute(t){const e=this.gos.get("treeData")?Ly:Py;let n=this.strategy;(n==null?void 0:n.constructor)!==e&&(this.destroyBean(n),n=this.createManagedBean(new e),this.strategy=n),n.execute(t),this.selectableService.updateSelectableAfterGrouping()}destroy(){this.destroyBean(this.strategy),this.strategy=void 0,super.destroy()}},qd="PivotRowTotal_",zy=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="pivotColDefService"}wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService,this.columnNameService=t.columnNameService}postConstruct(){const t=()=>this.gos.get("serverSidePivotResultFieldSeparator")??"_";this.fieldSeparator=t(),this.addManagedPropertyListener("serverSidePivotResultFieldSeparator",()=>{this.fieldSeparator=t()});const e=()=>this.gos.get("pivotDefaultExpanded");this.pivotDefaultExpanded=e(),this.addManagedPropertyListener("pivotDefaultExpanded",()=>{this.pivotDefaultExpanded=e()})}createPivotColumnDefs(t){const e=this.createPivotColumnsFromUniqueValues(t);function n(l,c=[]){return l.forEach(u=>{u.children!==void 0?n(u.children,c):c.push(u)}),c}const o=n(e);this.addRowGroupTotals(e,o),this.addExpandablePivotGroups(e,o),this.addPivotTotalsToGroups(e,o);const s=o.map(l=>x._cloneObject(l));return{pivotColumnGroupDefs:e,pivotColumnDefs:s}}createPivotColumnsFromUniqueValues(t){const e=this.funcColsService.getPivotColumns(),n=e.length;return this.recursivelyBuildGroup(0,t,[],n,e)}recursivelyBuildGroup(t,e,n,o,s){const l=this.funcColsService.getValueColumns();if(t>=o)return this.buildMeasureCols(n);const c=s[t].getColDef(),u=this.headerNameComparator.bind(this,c.pivotComparator);if(l.length===1&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&t===o-1){const f=[];return x._iterateObject(e,m=>{const y=[...n,m],T=this.createColDef(l[0],m,y);T.columnGroupShow="open",f.push(T)}),f.sort(u),f}const p=[];return x._iterateObject(e,(f,m)=>{const y=this.pivotDefaultExpanded===-1||t<this.pivotDefaultExpanded,T=[...n,f];p.push({children:this.recursivelyBuildGroup(t+1,m,T,o,s),headerName:f,pivotKeys:T,columnGroupShow:"open",openByDefault:y,groupId:this.generateColumnGroupId(T)})}),p.sort(u),p}buildMeasureCols(t){const e=this.funcColsService.getValueColumns();return e.length===0?[this.createColDef(null,"-",t)]:e.map(n=>{const o=this.columnNameService.getDisplayNameForColumn(n,"header");return{...this.createColDef(n,o,t),columnGroupShow:"open"}})}addExpandablePivotGroups(t,e){const n=this.gos.get("suppressExpandablePivotGroups");if(n||this.gos.get("pivotColumnGroupTotals"))return;const o=(s,l,c)=>{if("children"in s){const f=new Map;s.children.forEach(y=>{o(y,l,f)});const m=!s.children.some(y=>y.children);this.funcColsService.getValueColumns().forEach(y=>{const T=this.columnNameService.getDisplayNameForColumn(y,"header"),B=this.createColDef(y,T,s.pivotKeys);B.pivotTotalColumnIds=f.get(y.getColId()),B.columnGroupShow=n?"open":"closed",B.aggFunc=y.getAggFunc(),m||(s.children.push(B),l.push(B))}),this.merge(c,f);return}if(!s.pivotValueColumn)return;const u=s.pivotValueColumn.getColId();c.has(u)?c.get(u).push(s.colId):c.set(u,[s.colId])};t.forEach(s=>{o(s,e,new Map)})}addPivotTotalsToGroups(t,e){if(!this.gos.get("pivotColumnGroupTotals"))return;const n=this.gos.get("pivotColumnGroupTotals")==="after",o=this.funcColsService.getValueColumns(),s=o.map(c=>c.getAggFunc());if(!s||s.length<1||!this.sameAggFuncs(s))return;const l=o[0];t.forEach(c=>{this.recursivelyAddPivotTotal(c,e,l,n)})}recursivelyAddPivotTotal(t,e,n,o){const s=t;if(!s.children){const c=t;return c.colId?[c.colId]:null}let l=[];if(s.children.forEach(c=>{const u=this.recursivelyAddPivotTotal(c,e,n,o);u&&(l=l.concat(u))}),s.children.length>1){const u=this.localeService.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),p=this.createColDef(n,u,t.pivotKeys,!0);p.pivotTotalColumnIds=l,p.aggFunc=n.getAggFunc(),p.columnGroupShow=this.gos.get("suppressExpandablePivotGroups")?"open":void 0;const f=t.children;o?f.push(p):f.unshift(p),e.push(p)}return l}addRowGroupTotals(t,e){if(!this.gos.get("pivotRowTotals"))return;const n=this.gos.get("pivotRowTotals")==="after",s=this.funcColsService.getValueColumns().slice();n||s.reverse();const l=s.length>1||!this.gos.get("removePivotHeaderRowWhenSingleValueColumn");for(let c=0;c<s.length;c++){const u=s[c],p=this.columnNameService.getDisplayNameForColumn(u,"header"),f=this.createColDef(u,p,[]),m=[];for(let T=0;T<e.length;T++){const B=e[T];B.pivotValueColumn===u&&m.push(B.colId)}f.pivotTotalColumnIds=m,f.colId=qd+f.colId;const y=l?{children:[f],pivotKeys:[],groupId:`${qd}_pivotGroup_${u.getColId()}`}:f;e.push(f),n?t.push(y):t.unshift(y)}}createColDef(t,e,n,o=!1){const s={};if(t){const l=t.getColDef();Object.assign(s,l),s.hide=!1}return s.headerName=e,s.colId=this.generateColumnId(n||[],t&&!o?t.getColId():""),s.field=s.colId,s.valueGetter=l=>{var c;return(c=l.data)==null?void 0:c[l.colDef.field]},s.pivotKeys=n,s.pivotValueColumn=t,s.filter===!0&&(s.filter="agNumberColumnFilter"),s}sameAggFuncs(t){if(t.length==1)return!0;for(let e=1;e<t.length;e++)if(t[e]!==t[0])return!1;return!0}headerNameComparator(t,e,n){return t?t(e.headerName,n.headerName):e.headerName&&!n.headerName?1:!e.headerName&&n.headerName?-1:!e.headerName||!n.headerName?0:e.headerName<n.headerName?-1:e.headerName>n.headerName?1:0}merge(t,e){e.forEach((n,o)=>{const l=[...t.has(o)?t.get(o):[],...n];t.set(o,l)})}generateColumnGroupId(t){return`pivotGroup_${this.funcColsService.getPivotColumns().map(n=>n.getColId()).join("-")}_${t.join("-")}`}generateColumnId(t,e){return`pivot_${this.funcColsService.getPivotColumns().map(o=>o.getColId()).join("-")}_${t.join("-")}_${e}`}createColDefsFromFields(t){const e={};for(let s=0;s<t.length;s++){const c=t[s].split(this.fieldSeparator);let u=e;for(let p=0;p<c.length;p++){const f=c[p];u[f]==null&&(u[f]={}),u=u[f]}}const n=(s,l,c,u)=>{const p=[];for(const y in c){const T=c[y],B=n(`${s}${this.fieldSeparator}${y}`,y,T,u+1);p.push(B)}if(p.length===0){const y=this.columnModel.getColDefCol(l);if(y){const B=this.columnNameService.getDisplayNameForColumn(y,"header")??l,A=this.createColDef(y,B,void 0,!1);return A.colId=s,A.aggFunc=y.getAggFunc(),A.valueGetter=I=>{var L;return(L=I.data)==null?void 0:L[s]},A}return{colId:s,headerName:l,valueGetter:B=>{var A;return(A=B.data)==null?void 0:A[s]}}}return this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&p.length===1&&"colId"in p[0]?(p[0].headerName=l,p[0]):{openByDefault:this.pivotDefaultExpanded===-1||u<this.pivotDefaultExpanded,groupId:s,headerName:l,children:p}},o=[];for(const s in e){const l=e[s],c=n(s,s,l,0);o.push(c)}return o}},Kd="Exceeded maximum allowed pivot column count.",$y=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="pivotStage",this.uniqueValues={},this.lastTimeFailed=!1,this.maxUniqueValues=-1,this.currentUniqueCount=0}wireBeans(t){this.valueService=t.valueService,this.columnModel=t.columnModel,this.pivotResultColsService=t.pivotResultColsService,this.funcColsService=t.funcColsService,this.pivotColDefService=t.pivotColDefService}execute(t){const e=t.changedPath;this.columnModel.isPivotActive()?this.executePivotOn(e):this.executePivotOff(e)}executePivotOff(t){this.aggregationColumnsHashLastTime=null,this.uniqueValues={},this.pivotResultColsService.isPivotResultColsPresent()&&(this.pivotResultColsService.setPivotResultCols(null,"rowModelUpdated"),t&&t.setInactive())}executePivotOn(t){const e=this.funcColsService.getValueColumns().length??1,n=this.gos.get("pivotMaxGeneratedColumns");this.maxUniqueValues=n===-1?-1:n/e;let o;try{o=this.bucketUpRowNodes(t)}catch(C){if(C.message===Kd){this.pivotResultColsService.setPivotResultCols([],"rowModelUpdated"),this.eventService.dispatchEvent({type:"pivotMaxColumnsExceeded",message:C.message}),this.lastTimeFailed=!0;return}throw C}const s=this.setUniqueValues(o),l=this.funcColsService.getValueColumns(),c=l.map(C=>`${C.getId()}-${C.getColDef().headerName}`).join("#"),u=l.map(C=>C.getAggFunc().toString()).join("#"),p=this.aggregationColumnsHashLastTime!==c,f=this.aggregationFuncsHashLastTime!==u;this.aggregationColumnsHashLastTime=c,this.aggregationFuncsHashLastTime=u;const m=this.funcColsService.getRowGroupColumns().map(C=>C.getId()).join("#"),y=m!==this.groupColumnsHashLastTime;this.groupColumnsHashLastTime=m;const T=this.gos.get("pivotRowTotals"),B=this.gos.get("pivotColumnGroupTotals"),A=this.gos.get("suppressExpandablePivotGroups"),I=this.gos.get("removePivotHeaderRowWhenSingleValueColumn"),L=T!==this.pivotRowTotalsLastTime||B!==this.pivotColumnGroupTotalsLastTime||A!==this.suppressExpandablePivotGroupsLastTime||I!==this.removePivotHeaderRowWhenSingleValueColumnLastTime;if(this.pivotRowTotalsLastTime=T,this.pivotColumnGroupTotalsLastTime=B,this.suppressExpandablePivotGroupsLastTime=A,this.removePivotHeaderRowWhenSingleValueColumnLastTime=I,this.lastTimeFailed||s||p||y||f||L){const{pivotColumnGroupDefs:C,pivotColumnDefs:R}=this.pivotColDefService.createPivotColumnDefs(this.uniqueValues);this.pivotColumnDefs=R,this.pivotResultColsService.setPivotResultCols(C,"rowModelUpdated"),t&&t.setInactive()}this.lastTimeFailed=!1}setUniqueValues(t){const e=JSON.stringify(t),n=JSON.stringify(this.uniqueValues);return e!==n?(this.uniqueValues=t,!0):!1}bucketUpRowNodes(t){this.currentUniqueCount=0;const e={};t.forEachChangedNodeDepthFirst(o=>{o.leafGroup&&(o.childrenMapped=null)});const n=o=>{var s;o.leafGroup?this.bucketRowNode(o,e):(s=o.childrenAfterFilter)==null||s.forEach(n)};return t.executeFromRootNode(n),e}bucketRowNode(t,e){const n=this.funcColsService.getPivotColumns();n.length===0?t.childrenMapped=null:t.childrenMapped=this.bucketChildren(t.childrenAfterFilter,n,0,e),t.sibling&&(t.sibling.childrenMapped=t.childrenMapped)}bucketChildren(t,e,n,o){const s={},l=e[n];if(t.forEach(c=>{let u=this.valueService.getKeyForNode(l,c);if(x._missing(u)&&(u=""),!o[u]){this.currentUniqueCount+=1,o[u]={};const p=this.maxUniqueValues!==-1,f=this.currentUniqueCount>this.maxUniqueValues;if(p&&f)throw Error(Kd)}s[u]||(s[u]=[]),s[u].push(c)}),n===e.length-1)return s;{const c={};return x._iterateObject(s,(u,p)=>{c[u]=this.bucketChildren(p,e,n+1,o[u])}),c}}getPivotColumnDefs(){return this.pivotColumnDefs}};function Uy(t,e,n){t.aggFuncService&&t.aggFuncService.addAggFuncs({key:n})}function Zy(t,e){t.aggFuncService&&t.aggFuncService.addAggFuncs(e)}function Wy(t){t.aggFuncService&&t.aggFuncService.clear()}function Hy(t,e,n){t.funcColsService.setColumnAggFunc(e,n,"api")}function jy(t){return t.columnModel.isPivotMode()}function qy(t,e,n){return t.pivotResultColsService.lookupPivotResultCol(e,n)}function Ky(t,e){t.funcColsService.setValueColumns(e,"api")}function Yy(t){return t.funcColsService.getValueColumns()}function Jy(t,e){t.funcColsService.removeValueColumns([e],"api")}function Xy(t,e){t.funcColsService.removeValueColumns(e,"api")}function Qy(t,e){t.funcColsService.addValueColumns([e],"api")}function e_(t,e){t.funcColsService.addValueColumns(e,"api")}function t_(t,e){t.funcColsService.setRowGroupColumns(e,"api")}function n_(t,e){t.funcColsService.removeRowGroupColumns([e],"api")}function r_(t,e){t.funcColsService.removeRowGroupColumns(e,"api")}function o_(t,e){t.funcColsService.addRowGroupColumns([e],"api")}function i_(t,e){t.funcColsService.addRowGroupColumns(e,"api")}function s_(t,e,n){t.funcColsService.moveRowGroupColumn(e,n,"api")}function a_(t){return t.funcColsService.getRowGroupColumns()}function l_(t,e){t.funcColsService.setPivotColumns(e,"api")}function c_(t,e){t.funcColsService.removePivotColumns([e],"api")}function d_(t,e){t.funcColsService.removePivotColumns(e,"api")}function u_(t,e){t.funcColsService.addPivotColumns([e],"api")}function p_(t,e){t.funcColsService.addPivotColumns(e,"api")}function h_(t){return t.funcColsService.getPivotColumns()}function f_(t,e){t.pivotResultColsService.setPivotResultCols(e,"api")}function m_(t){const e=t.pivotResultColsService.getPivotResultCols();return e?e.list:null}var g_=class extends x.BeanStub{constructor(){super(...arguments),this.beanName="showRowGroupColsService"}wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService}refresh(){this.showRowGroupCols=[],this.showRowGroupColsMap={},this.columnModel.getCols().forEach(t=>{const n=t.getColDef().showRowGroup,o=typeof n=="string";!o&&!(n===!0)||(this.showRowGroupCols.push(t),o?this.showRowGroupColsMap[n]=t:this.funcColsService.getRowGroupColumns().forEach(c=>{this.showRowGroupColsMap[c.getId()]=t}))})}getShowRowGroupCols(){return this.showRowGroupCols}getShowRowGroupCol(t){return this.showRowGroupColsMap[t]}},ui="32.3.3",nl=x._defineModule({version:ui,moduleName:`${x.ModuleNames.RowGroupingModule}-core`,beans:[wy,By,Gy,zy,$y,hy,by,g_,Ty],userComponents:[{name:"agGroupRowRenderer",classImp:Ie.GroupCellRenderer},{name:"agGroupCellRenderer",classImp:Ie.GroupCellRenderer}],controllers:[{name:"groupCellRendererCtrl",classImp:Ie.GroupCellRendererCtrl}],dependantModules:[Ie.EnterpriseCoreModule]}),y_=x._defineModule({version:ui,moduleName:`${x.ModuleNames.RowGroupingModule}-api`,apiFunctions:{addAggFunc:Uy,addAggFuncs:Zy,clearAggFuncs:Wy,setColumnAggFunc:Hy,isPivotMode:jy,getPivotResultColumn:qy,setValueColumns:Ky,getValueColumns:Yy,removeValueColumn:Jy,removeValueColumns:Xy,addValueColumn:Qy,addValueColumns:e_,setRowGroupColumns:t_,removeRowGroupColumn:n_,removeRowGroupColumns:r_,addRowGroupColumn:o_,addRowGroupColumns:i_,getRowGroupColumns:a_,moveRowGroupColumn:s_,setPivotColumns:l_,removePivotColumn:c_,removePivotColumns:d_,addPivotColumn:u_,addPivotColumns:p_,getPivotColumns:h_,setPivotResultColumns:f_,getPivotResultColumns:m_},dependantModules:[nl]}),Yd=x._defineModule({version:ui,moduleName:"@ag-grid-enterprise/group-filter",userComponents:[{name:"agGroupColumnFilter",classImp:Vy}],dependantModules:[nl,x._ColumnFilterModule]}),__=x._defineModule({version:ui,moduleName:"@ag-grid-enterprise/group-floating-filter",userComponents:[{name:"agGroupColumnFloatingFilter",classImp:Ny}],dependantModules:[Yd,x._FloatingFilterModule]}),v_=x._defineModule({version:ui,moduleName:x.ModuleNames.RowGroupingModule,dependantModules:[nl,y_,Yd,__]}),Jd=class extends Xa{constructor(t){super(t,"aggregation")}postConstruct(){const t=this.localeService.getLocaleTextFunc(),e=t("valueColumnsEmptyMessage","Drag here to aggregate"),n=t("values","Values");super.init({icon:x._createIconNoSpan("valuePanel",this.gos,null),emptyMessage:e,title:n}),this.addManagedEventListeners({columnValueChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaValuesDropZonePanelLabel","Values")}getTooltipParams(){const t=super.getTooltipParams();return t.location="valueColumnsList",t}getIconName(){return this.isPotentialDndItems()?"aggregate":"notAllowed"}isItemDroppable(t,e){return this.gos.get("functionsReadOnly")||!t.isPrimary()?!1:t.isAllowValue()&&(!t.isValueActive()||this.isSourceEventFromTarget(e))}updateItems(t){this.funcColsService.setValueColumns(t,"toolPanelUi")}getExistingItems(){return this.funcColsService.getValueColumns()}},Xd=300,C_=class extends x.Component{constructor(){super(`<div class="ag-column-select-header" role="presentation">
|
|
24
|
+
`),this.eFloatingFilter=T.RefPlaceholder,this.haveAddedColumnListeners=!1}wireBeans(t){this.columnNameService=t.columnNameService,this.filterManager=t.filterManager}init(t){this.params=t;const e=this.gos.get("groupDisplayType")==="multipleColumns";return new T.AgPromise(n=>{this.params.parentFilterInstance(o=>{this.parentFilterInstance=o,e?this.setupUnderlyingFloatingFilterElement().then(()=>n()):(this.setupReadOnlyFloatingFilterElement(),n())})}).then(()=>{this.addManagedListeners(this.parentFilterInstance,{selectedColumnChanged:this.onSelectedColumnChanged.bind(this),columnRowGroupChanged:this.onColumnRowGroupChanged.bind(this)})})}onParamsUpdated(t){this.refresh(t)}refresh(t){this.params=t,this.setParams()}setParams(){var n;const t=this.columnNameService.getDisplayNameForColumn(this.params.column,"header",!0),e=this.localeService.getLocaleTextFunc();(n=this.eFloatingFilterText)==null||n.setInputAriaLabel(`${t} ${e("ariaFilterInput","Filter Input")}`)}setupReadOnlyFloatingFilterElement(){this.eFloatingFilterText||(this.eFloatingFilterText=this.createManagedBean(new T.AgInputTextField),this.eFloatingFilterText.setDisabled(!0).addGuiEventListener("click",()=>this.params.showParentFilter()),this.setParams()),this.updateDisplayedValue(),this.eFloatingFilter.appendChild(this.eFloatingFilterText.getGui())}setupUnderlyingFloatingFilterElement(){this.showingUnderlyingFloatingFilter=!1,this.underlyingFloatingFilter=void 0,T._clearElement(this.eFloatingFilter);const t=this.parentFilterInstance.getSelectedColumn();if(t&&!t.isVisible()){const e=this.filterManager.getFloatingFilterCompDetails(t,this.params.showParentFilter);if(e)return this.haveAddedColumnListeners||(this.haveAddedColumnListeners=!0,this.addManagedListeners(t,{visibleChanged:this.onColumnVisibleChanged.bind(this),colDefChanged:this.onColDefChanged.bind(this)})),e.newAgStackInstance().then(n=>{var o,i;this.underlyingFloatingFilter=n,(i=this.underlyingFloatingFilter)==null||i.onParentModelChanged((o=this.parentFilterInstance.getSelectedFilter())==null?void 0:o.getModel()),this.appendChild(n.getGui()),this.showingUnderlyingFloatingFilter=!0})}return this.setupReadOnlyFloatingFilterElement(),T.AgPromise.resolve()}onColumnVisibleChanged(){this.setupUnderlyingFloatingFilterElement()}onColDefChanged(t){var n,o,i;if(!t.column)return;const e=this.filterManager.getFloatingFilterCompDetails(t.column,this.params.showParentFilter);e&&((n=this.underlyingFloatingFilter)!=null&&n.refresh?this.underlyingFloatingFilter.refresh(e.params):(i=(o=this.underlyingFloatingFilter)==null?void 0:o.onParamsUpdated)==null||i.call(o,e.params))}onParentModelChanged(t,e){var n,o;this.showingUnderlyingFloatingFilter?(o=this.underlyingFloatingFilter)==null||o.onParentModelChanged((n=this.parentFilterInstance.getSelectedFilter())==null?void 0:n.getModel(),e):this.updateDisplayedValue()}updateDisplayedValue(){if(!this.parentFilterInstance||!this.eFloatingFilterText)return;const t=this.parentFilterInstance.getSelectedFilter();if(!t){this.eFloatingFilterText.setValue(""),this.eFloatingFilterText.setDisplayed(!1);return}if(this.eFloatingFilterText.setDisplayed(!0),t.getModelAsString){const e=t.getModel();this.eFloatingFilterText.setValue(e==null?"":t.getModelAsString(e))}else this.eFloatingFilterText.setValue("")}onSelectedColumnChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}onColumnRowGroupChanged(){this.showingUnderlyingFloatingFilter||this.updateDisplayedValue()}destroy(){super.destroy()}},yl=class{constructor(){this.allSets={},this.allParents=[]}removeFromChildrenAfterGroup(t,e){const n=this.getSet(t);n.removeFromChildrenAfterGroup[e.id]=!0}isRemoveFromAllLeafChildren(t,e){return!!this.getSet(t).removeFromAllLeafChildren[e.id]}preventRemoveFromAllLeafChildren(t,e){const n=this.getSet(t);delete n.removeFromAllLeafChildren[e.id]}removeFromAllLeafChildren(t,e){const n=this.getSet(t);n.removeFromAllLeafChildren[e.id]=!0}getSet(t){return this.allSets[t.id]||(this.allSets[t.id]={removeFromAllLeafChildren:{},removeFromChildrenAfterGroup:{}},this.allParents.push(t)),this.allSets[t.id]}getAllParents(){return this.allParents}flush(){this.allParents.forEach(t=>{var o;const e=this.allSets[t.id];t.childrenAfterGroup=t.childrenAfterGroup.filter(i=>!e.removeFromChildrenAfterGroup[i.id]),t.allLeafChildren=((o=t.allLeafChildren)==null?void 0:o.filter(i=>!e.removeFromAllLeafChildren[i.id]))??null,t.updateHasChildren();const n=t.sibling;n&&(n.childrenAfterGroup=t.childrenAfterGroup,n.allLeafChildren=t.allLeafChildren)}),this.allSets={},this.allParents.length=0}};function Lv(t){if(!t)return!1;const e=t.length;if(e<2)return!1;let n=!1;for(let o=1;o<e;o++)if(wu(t[o-1],t[o])>0){n=!0;break}return n?(t.sort(wu),!0):!1}function wu(t,e){const n=t.sourceRowIndex,o=e.sourceRowIndex,i=n>=0,l=o>=0,c=i&&l,d=!i&&!l;return c?n-o:d?t.__objectId-e.__objectId:i?1:-1}var Mv=class extends T.BeanStub{wireBeans(t){this.beans=t,this.columnModel=t.columnModel,this.funcColsService=t.funcColsService,this.valueService=t.valueService,this.selectionService=t.selectionService,this.showRowGroupColsService=t.showRowGroupColsService}execute(t){const e=this.createGroupingDetails(t);if(e.transactions)this.handleTransaction(e);else{const n=t.afterColumnsChanged===!0;this.shotgunResetEverything(e,n)}this.positionLeafsAndGroups(t.changedPath),this.orderGroups(e)}positionLeafsAndGroups(t){t.forEachChangedNodeDepthFirst(e=>{if(e.childrenAfterGroup){const n=[],o=[];let i;e.childrenAfterGroup.forEach(l=>{var c;(c=l.childrenAfterGroup)!=null&&c.length?l.key===""&&!i?i=l:o.push(l):n.push(l)}),i&&o.push(i),e.childrenAfterGroup=[...n,...o]}},!1)}createGroupingDetails(t){const{rowNode:e,changedPath:n,rowNodeTransactions:o,rowNodesOrderChanged:i}=t,l=this.funcColsService.getRowGroupColumns();return{expandByDefault:this.gos.get("groupDefaultExpanded"),groupedCols:l,rootNode:e,pivotMode:this.columnModel.isPivotMode(),groupedColCount:(l==null?void 0:l.length)??0,transactions:o,rowNodesOrderChanged:!!i,changedPath:n,groupAllowUnbalanced:this.gos.get("groupAllowUnbalanced"),isGroupOpenByDefault:this.gos.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:this.gos.getCallback("initialGroupOrderComparator"),suppressGroupMaintainValueType:this.gos.get("suppressGroupMaintainValueType"),keyCreators:(l==null?void 0:l.map(d=>d.getColDef().keyCreator))??[]}}handleTransaction(t){t.transactions.forEach(e=>{const n=new yl;T._existsAndNotEmpty(e.remove)&&this.removeNodes(e.remove,t,n),T._existsAndNotEmpty(e.update)&&this.moveNodesInWrongPath(e.update,t,n),T._existsAndNotEmpty(e.add)&&this.insertNodes(e.add,t);const o=n.getAllParents().slice();n.flush(),this.removeEmptyGroups(o,t)}),t.rowNodesOrderChanged&&this.sortChildren(t)}sortChildren(t){t.changedPath.forEachChangedNodeDepthFirst(e=>{Lv(e.childrenAfterGroup)&&t.changedPath.addParentNode(e)},!1,!0)}orderGroups(t){const e=t.initialGroupOrderComparator;T._exists(e)&&n(t.rootNode);function n(o){T._exists(o.childrenAfterGroup)&&!o.leafGroup&&(o.childrenAfterGroup.sort((l,c)=>e({nodeA:l,nodeB:c})),o.childrenAfterGroup.forEach(l=>n(l)))}}getExistingPathForNode(t,e){const n=[];let o=t.parent;for(;o&&o!==e.rootNode;)n.push({key:o.key,rowGroupColumn:o.rowGroupColumn,field:o.field}),o=o.parent;return n.reverse(),n}moveNodesInWrongPath(t,e,n){t.forEach(o=>{e.changedPath.isActive()&&e.changedPath.addParentNode(o.parent);const i=p=>p.key,l=this.getExistingPathForNode(o,e).map(i),c=this.getGroupInfo(o,e).map(i);T._areEqual(l,c)||this.moveNode(o,e,n)})}moveNode(t,e,n){if(this.removeNodesFromParents([t],e,n),this.insertOneNode(t,e,n),t.setData(t.data),e.changedPath.isActive()){const o=t.parent;e.changedPath.addParentNode(o)}}removeNodes(t,e,n){this.removeNodesFromParents(t,e,n),e.changedPath.isActive()&&t.forEach(o=>e.changedPath.addParentNode(o.parent))}forEachParentGroup(t,e,n){let o=e;for(;o&&o!==t.rootNode;)n(o),o=o.parent}removeNodesFromParents(t,e,n){const o=n==null,i=n||new yl;t.forEach(l=>{this.removeFromParent(l,i),this.forEachParentGroup(e,l.parent,c=>{i.removeFromAllLeafChildren(c,l)})}),o&&i.flush()}removeEmptyGroups(t,e){let n=!0;const o=i=>{var p;const l=this.getChildrenMappedKey(i.key,i.rowGroupColumn),c=i.parent;return(c!=null&&c.childrenMapped?!c.childrenMapped[l]:!0)?!1:!!i.group&&(((p=i.childrenAfterGroup)==null?void 0:p.length)??0)===0};for(;n;){n=!1;const i=new yl;t.forEach(l=>{this.forEachParentGroup(e,l,c=>{o(c)&&(n=!0,this.removeFromParent(c,i),c.setSelectedParams({newValue:!1,source:"rowGroupChanged"}))})}),i.flush()}}removeFromParent(t,e){var o;t.parent&&(e?e.removeFromChildrenAfterGroup(t.parent,t):(T._removeFromArray(t.parent.childrenAfterGroup,t),t.parent.updateHasChildren()));const n=this.getChildrenMappedKey(t.key,t.rowGroupColumn);(o=t.parent)!=null&&o.childrenMapped&&delete t.parent.childrenMapped[n],t.setRowTop(null),t.setRowIndex(null)}addToParent(t,e){const n=this.getChildrenMappedKey(t.key,t.rowGroupColumn);e!=null&&e.childrenMapped&&e.childrenMapped[n]!==t&&(e.childrenMapped[n]=t,e.childrenAfterGroup.push(t),e.setGroup(!0))}areGroupColsEqual(t,e){return t==null||e==null||t.pivotMode!==e.pivotMode?!1:T._areEqual(t.groupedCols,e.groupedCols)&&T._areEqual(t.keyCreators,e.keyCreators)}checkAllGroupDataAfterColsChanged(t){const e=n=>{n&&n.forEach(o=>{var c;if(!o.group)return;const l={field:o.field,key:o.key,rowGroupColumn:o.rowGroupColumn,leafNode:(c=o.allLeafChildren)==null?void 0:c[0]};this.setGroupData(o,l,t),e(o.childrenAfterGroup)})};e(t.rootNode.childrenAfterGroup)}shotgunResetEverything(t,e){if(this.noChangeInGroupingColumns(t,e))return;this.selectionService.filterFromSelection(l=>l&&!l.group);const{groupedCols:n}=t,o=t.rootNode;o.leafGroup=n.length===0,o.childrenAfterGroup=[],o.childrenMapped={},o.updateHasChildren();const i=o.sibling;i&&(i.childrenAfterGroup=o.childrenAfterGroup,i.childrenMapped=o.childrenMapped),this.insertNodes(o.allLeafChildren,t)}noChangeInGroupingColumns(t,e){let n=!1;const o=this.showRowGroupColsService.getShowRowGroupCols(),i=o?o.map(l=>l.getId()).join("-"):"";return e&&(n=this.areGroupColsEqual(t,this.oldGroupingDetails),this.oldGroupDisplayColIds!==i&&this.checkAllGroupDataAfterColsChanged(t)),this.oldGroupingDetails=t,this.oldGroupDisplayColIds=i,n}insertNodes(t,e){t.forEach(n=>{this.insertOneNode(n,e),e.changedPath.isActive()&&e.changedPath.addParentNode(n.parent)})}insertOneNode(t,e,n){const o=this.getGroupInfo(t,e),i=this.findParentForNode(t,o,e,n);i.group||T._warnOnce("duplicate group keys for row data, keys should be unique",[i.data,t.data]),t.parent=i,t.level=o.length,i.childrenAfterGroup.push(t),i.updateHasChildren()}findParentForNode(t,e,n,o){let i=n.rootNode;return e.forEach((l,c)=>{i=this.getOrCreateNextNode(i,l,c,n),o!=null&&o.isRemoveFromAllLeafChildren(i,t)?o==null||o.preventRemoveFromAllLeafChildren(i,t):i.allLeafChildren.push(t)}),i}getOrCreateNextNode(t,e,n,o){var c;const i=this.getChildrenMappedKey(e.key,e.rowGroupColumn);let l=(c=t==null?void 0:t.childrenMapped)==null?void 0:c[i];return l||(l=this.createGroup(e,t,n,o),this.addToParent(l,t)),l}createGroup(t,e,n,o){const i=new T.RowNode(this.beans);return i.group=!0,i.field=t.field,i.rowGroupColumn=t.rowGroupColumn,this.setGroupData(i,t,o),i.key=t.key,i.id=this.createGroupId(i,e,n),i.level=n,i.leafGroup=n===o.groupedColCount-1,i.allLeafChildren=[],i.setAllChildrenCount(0),i.rowGroupIndex=n,i.childrenAfterGroup=[],i.childrenMapped={},i.updateHasChildren(),i.parent=e,this.setExpandedInitialValue(o,i),i}createGroupId(t,e,n){const o=(i,l)=>{if(!i.rowGroupColumn)return null;const c=l?o(l,l.parent):null;return`${c==null?"":c+"-"}${i.rowGroupColumn.getColId()}-${i.key}`};return T.RowNode.ID_PREFIX_ROW_GROUP+o(t,e)}setGroupData(t,e,n){t.groupData={},this.showRowGroupColsService.getShowRowGroupCols().forEach(i=>{const l=t.rowGroupColumn;l!==null&&i.isRowGroupDisplayed(l.getId())&&(n.suppressGroupMaintainValueType?t.groupData[i.getColId()]=e.key:t.groupData[i.getColId()]=this.valueService.getValue(l,e.leafNode))})}getChildrenMappedKey(t,e){return e?e.getId()+"-"+t:t}setExpandedInitialValue(t,e){if(t.pivotMode&&e.leafGroup){e.expanded=!1;return}const n=t.isGroupOpenByDefault;if(n){const o={rowNode:e,field:e.field,key:e.key,level:e.level,rowGroupColumn:e.rowGroupColumn};e.expanded=n(o)==!0;return}if(t.expandByDefault===-1){e.expanded=!0;return}e.expanded=e.level<t.expandByDefault}getGroupInfo(t,e){const n=[];return e.groupedCols.forEach(o=>{let i=this.valueService.getKeyForNode(o,t),l=i!=null&&i!=="";if((e.pivotMode||!e.groupAllowUnbalanced)&&!l&&(i="",l=!0),l){const d={key:i,field:o.getColDef().field,rowGroupColumn:o,leafNode:t};n.push(d)}}),n}},Gv=(t,e)=>t.treeNode.oldSourceRowIndex-e.treeNode.oldSourceRowIndex,gt=Object.freeze([]),$v=gt.values(),xs=(t,e)=>{t.parent=null,t.treeNode=null,e?t.childrenAfterGroup=[]:(t.level=0,t.childrenAfterGroup=null,t.allLeafChildren=null)},zv=class bg{constructor(e,n,o){this.parent=e,this.key=n,this.level=o,this.children=null,this.invalidatedHead=null,this.invalidatedNext=void 0,this.row=null,this.oldRow=null,this.duplicateRows=null,this.childrenAfterGroup=gt,this.allLeafChildren=gt,this.childrenChanged=!1,this.leafChildrenChanged=!1,this.oldSourceRowIndex=-1}isEmptyFillerNode(){var e,n;return!((e=this.row)!=null&&e.data)&&!((n=this.children)!=null&&n.size)}hasChildren(){var e;return!!((e=this.children)!=null&&e.size)}enumChildren(){var e;return((e=this.children)==null?void 0:e.values())??$v}upsertKey(e){var o,i;typeof e!="string"&&(e=String(e));let n=(o=this.children)==null?void 0:o.get(e);return n||(n=new bg(this,e,this.level+1),(i=this.children??(this.children=new Map))==null||i.set(n.key,n)),n}destroy(){var o;const{row:e,parent:n}=this;n!==null&&((o=n==null?void 0:n.children)==null||o.delete(this.key),e!==null&&xs(e,!0),this.parent=null)}setRow(e){const{level:n,row:o,childrenAfterGroup:i}=this;if(n<0)o!==null&&o!==e&&xs(o,!0);else{if(o===e)return!1;o!==null?(e.allLeafChildren=o.allLeafChildren??this.allLeafChildren??gt,xs(o,!1)):e.allLeafChildren=this.allLeafChildren??gt}return e.level=n,e.childrenAfterGroup=i,e.treeNode=this,this.row=e,!0}removeRow(e){const{level:n,row:o,duplicateRows:i,childrenAfterGroup:l}=this;if(o===e){const c=this.popDuplicateRow();c?(this.row=c,c.childrenAfterGroup=l,n>=0&&(c.allLeafChildren=o.allLeafChildren??this.allLeafChildren??gt)):this.row=null}else{if(!(i!=null&&i.delete(e)))return!1;i.size===0&&(this.duplicateRows=null)}return xs(e,n<0),!0}addDuplicateRow(e){const{level:n}=this;let o=this.duplicateRows;if(o===null)o=new Set,this.duplicateRows=o;else if(o.has(e))return!1;return o.add(e),e.treeNode=this,e.level=n,n>=0&&(e.allLeafChildren=gt),e.childrenAfterGroup=gt,!0}sortFirstDuplicateRow(){const e=this.duplicateRows,n=this.row;if(!n||!e)return n;let o=n;for(const i of e)i.sourceRowIndex<o.sourceRowIndex&&(o=i);return o!==n&&(o.childrenAfterGroup=this.childrenAfterGroup,o.allLeafChildren=n.allLeafChildren??this.allLeafChildren??gt,n.childrenAfterGroup=gt,n.allLeafChildren=gt,e.delete(o),e.add(n),this.row=o),o}popDuplicateRow(){let e=null;const n=this.duplicateRows;return n!==null&&(e=n.values().next().value,e!==null&&n.delete(e)&&n.size===0&&(this.duplicateRows=null)),e}dequeueInvalidated(){const e=this.invalidatedHead;return e!==null&&(this.invalidatedHead=e.invalidatedNext??null,e.invalidatedNext=void 0),e}invalidate(){let e=this,n=this.parent;for(;n!==null&&e.invalidatedNext===void 0;)e.invalidatedNext=n.invalidatedHead,n.invalidatedHead=e,e=n,n=e.parent}invalidateOrder(){var n,o;const e=this.parent;e!==null&&!e.childrenChanged&&((((n=this.children)==null?void 0:n.size)??0)>1||!((o=e.row)!=null&&o.data))&&(e.childrenChanged=!0,e.invalidate())}getRowPosition(){var n,o;const e=this.row;return e!=null&&e.data?e.sourceRowIndex:((o=(n=this.childrenAfterGroup[0])==null?void 0:n.treeNode)==null?void 0:o.oldSourceRowIndex)??this.oldSourceRowIndex}updateChildrenAfterGroup(){var d;this.childrenChanged=!1;const e=((d=this.children)==null?void 0:d.size)??0;if(e===0)return this.childrenAfterGroup.length===0?!1:(this.leafChildrenChanged=!0,this.childrenAfterGroup=gt,this.row.childrenAfterGroup=gt,!0);let n=!1,o=this.childrenAfterGroup;o===gt?(o=new Array(e),this.childrenAfterGroup=o,this.row.childrenAfterGroup=o,n=!0):o.length!==e&&(o.length=e,n=!0);let i=0,l=-1,c=!1;for(const p of this.enumChildren()){const h=p.getRowPosition();h<l&&(c=!0),l=h,p.oldSourceRowIndex=h;const m=p.row;o[i]!==m&&(o[i]=m,n=!0),++i}return n&&(this.leafChildrenChanged=!0),c&&this.reorderChildrenList(o),n||c}reorderChildrenList(e){const n=e.length,o=this.children;e.sort(Gv),o.clear();for(let i=0;i<n;++i){const l=e[i].treeNode;o.set(l.key,l)}}updateAllLeafChildren(){var c,d;const{parent:e,row:n,childrenAfterGroup:o}=this;this.leafChildrenChanged=!1;let i=!1;const l=o.length;if(l===0)i=((c=n.allLeafChildren)==null?void 0:c.length)!==0,n.allLeafChildren=gt,this.allLeafChildren=gt;else if(l===1&&((d=o[0].allLeafChildren)!=null&&d.length))n.allLeafChildren=o[0].allLeafChildren,this.allLeafChildren=null,i=!0;else{let p=this.allLeafChildren;(p===gt||p===null)&&(p=[],this.allLeafChildren=p);const h=p.length;let m=0;for(let y=0;y<l;++y){const x=o[y],w=x.allLeafChildren,S=w.length;if(S)for(let O=0;O<S;++O){const G=w[O];(m>=h||p[m]!==G)&&(p[m]=G,i=!0),++m}else(m>=h||p[m]!==x)&&x&&(p[m]=x,i=!0),++m}h!==m&&(p.length=m,i=!0),n.allLeafChildren!==p&&(n.allLeafChildren=p,i=!0)}i&&e&&(e.leafChildrenChanged=!0)}},bu=t=>(t.treeNodeFlags&1)!==0,xu=t=>(t.treeNodeFlags&2)!==0,ku=t=>(t.treeNodeFlags&4)!==0,Uv=t=>(t.treeNodeFlags&8)!==0,Su=t=>(t.treeNodeFlags&16)!==0,Eu=(t,e)=>{e?t.treeNodeFlags|=2:t.treeNodeFlags&=-3},Zv=t=>{const e=t.treeNodeFlags;e&1&&(t.treeNodeFlags=e|4)},jv=t=>{const e=t.treeNodeFlags;e&1&&(t.treeNodeFlags=e|12)},mr=t=>{t.treeNodeFlags|=16},Tu=t=>{t.treeNodeFlags=1|t.treeNodeFlags&-29},fi=t=>{t.treeNodeFlags=0},Wv=class extends T.BeanStub{constructor(){super(...arguments),this.rowsPendingDestruction=null,this.root=new zv(null,"",-1)}wireBeans(t){this.beans=t,this.showRowGroupColsService=t.showRowGroupColsService}destroy(){const t=this.root.row;t!==null&&(this.root.removeRow(t),fi(t)),this.destroyTree(this.root),this.commitDestroyedRows(),super.destroy()}execute(t){const{rowNodeTransactions:e,rowNodesOrderChanged:n,changedPath:o}=t,i=t.rowNode,l=this.gos,c={changedPath:o,expandByDefault:l.get("groupDefaultExpanded"),suppressGroupMaintainValueType:l.get("suppressGroupMaintainValueType"),getDataPath:l.get("getDataPath"),isGroupOpenByDefault:l.getCallback("isGroupOpenByDefault"),initialGroupOrderComparator:l.getCallback("initialGroupOrderComparator")};this.root.setRow(i),i.leafGroup=!1;const p=i.sibling;p&&(p.childrenAfterGroup=i.childrenAfterGroup,p.childrenMapped=i.childrenMapped),e?this.handleTransaction(c,e,n):this.handleRowData(c,i,t.afterColumnsChanged===!0)}handleRowData(t,e,n){var i,l,c;const o=this.root;if(n||this.oldGroupDisplayColIds===void 0){const d=((l=(i=this.showRowGroupColsService)==null?void 0:i.getShowRowGroupCols())==null?void 0:l.map(p=>p.getId()).join("-"))??"";if(n){this.oldGroupDisplayColIds!==d&&this.checkAllGroupDataAfterColsChanged((c=o.row)==null?void 0:c.childrenAfterGroup);return}this.oldGroupDisplayColIds=d}this.clearTree(o),this.addOrUpdateRows(t,e.allLeafChildren,!1),this.commitTree(t)}handleTransaction(t,e,n){for(const{remove:o,update:i,add:l}of e)this.removeRows(o),this.addOrUpdateRows(t,i,!0),this.addOrUpdateRows(t,l,!1);n&&this.handleRowNodesOrderChanged(),this.commitTree(t)}handleRowNodesOrderChanged(){var e;const t=(e=this.root.row)==null?void 0:e.allLeafChildren;if(t)for(let n=0,o=t.length;n<o;++n){const i=t[n].treeNode;i&&i.oldSourceRowIndex!==n&&i.invalidateOrder()}}checkAllGroupDataAfterColsChanged(t){var e;for(let n=0,o=(t==null?void 0:t.length)??0;n<o;++n){const i=t[n];this.setGroupData(i,((e=i.treeNode)==null?void 0:e.key)??i.key),this.checkAllGroupDataAfterColsChanged(i.childrenAfterGroup)}}addOrUpdateRows(t,e,n){for(let o=0,i=(e==null?void 0:e.length)??0;o<i;++o){const l=e[o],c=this.upsertPath(this.getDataPath(t,l));c&&this.addOrUpdateRow(c,l,n)}}removeRows(t){for(let e=0,n=(t==null?void 0:t.length)??0;e<n;++e){const o=t[e],i=o.treeNode;i!==null&&this.removeRow(i,o)}}getDataPath({getDataPath:t},{data:e}){const n=(t==null?void 0:t(e))||gt;return n.length||T._warnOnce("getDataPath() should not return an empty path",[e]),n}upsertPath(t){let e=this.root;const n=t.length-1;for(let o=0;o<=n;++o){const i=e.upsertKey(t[o]);if(o>=n)return i.invalidate(),i;e=i}return null}addOrUpdateRow(t,e,n){var c;const{level:o,row:i}=t;if(o<0)return;let l=!1;if(i!==e){const d=e.treeNode;d!==null&&d!==t&&(d.removeRow(e),d.invalidate()),i===null?(t.setRow(e),l=!0):i.data?t.addDuplicateRow(e)&&(l=!0):(t.setRow(e),this.destroyRow(i,!0),l=!0)}n&&!ku(e)&&(Zv(e),l=!0),l&&t.invalidate(),(c=this.rowsPendingDestruction)==null||c.delete(e)}removeRow(t,e){const{parent:n,level:o}=t;if(o<0)return;let i=!1;t.removeRow(e)&&(i=!0,n&&(n.childrenChanged=!0),this.destroyRow(e,!e.data)),i&&t.invalidate()}commitTree(t){var o;const e=this.root;this.commitInvalidatedChildren(t,e);const n=e.row;e.childrenChanged&&e.updateChildrenAfterGroup()&&mr(n),n.updateHasChildren(),Su(n)&&(o=t.changedPath)!=null&&o.isActive()&&t.changedPath.addParentNode(n),Tu(n),this.commitDestroyedRows()}commitInvalidatedChildren(t,e){for(;;){const n=e.dequeueInvalidated();if(n===null)break;n.parent===e&&this.commitChild(t,e,n)}}commitChild(t,e,n){if(n.isEmptyFillerNode()){this.clearTree(n);return}this.commitNodePreOrder(e,n),this.commitInvalidatedChildren(t,n),this.commitNodePostOrder(t,e,n)}commitNodePreOrder(t,e){let n=e.row;if(n===null?(n=this.createFillerRow(e),e.setRow(n)):(n=e.sortFirstDuplicateRow(),n.allChildrenCount===void 0&&(n.allChildrenCount=null)),n.parent=t.row,e.oldRow!==n)for(const i of e.enumChildren()){const l=i.row;l!==null&&(l.parent=n)}const o=e.key;n.key!==o?(n.key=o,jv(n),this.setGroupData(n,o)):n.groupData||this.setGroupData(n,o)}commitNodePostOrder(t,e,n){var h,m,y;const o=n.row,i=n.oldRow;if(n.isEmptyFillerNode()){this.clearTree(n);return}n.childrenChanged&&n.updateChildrenAfterGroup()&&mr(o),n.leafChildrenChanged&&n.updateAllLeafChildren();const l=n.getRowPosition();n.oldSourceRowIndex!==l&&(n.oldSourceRowIndex=l,e.childrenChanged=!0);const c=!!((h=o.childrenAfterGroup)!=null&&h.length),d=c||!o.data,p=o.group;p!==d?(mr(o),o.setGroup(d),!d&&!o.expanded&&Eu(o,!1)):o.hasChildren()!==c&&(mr(o),o.updateHasChildren()),o.group&&!xu(o)&&(i!==o&&i!==null&&i.group&&xu(i)&&!t.isGroupOpenByDefault?o.expanded=i.expanded:o.expanded=this.getExpandedInitialValue(t,o),Eu(o,!0)),ku(o)&&(mr(e.row),Uv(o)&&o.setData(o.data)),i!==o&&(n.oldRow=o,i!==null&&(p||n.hasChildren())&&mr(o),e.childrenChanged=!0,mr(e.row)),Su(o)?(m=t.changedPath)!=null&&m.isActive()&&t.changedPath.addParentNode(o):bu(o)||(o.childrenAfterFilter||(o.childrenAfterFilter=o.childrenAfterGroup.slice()),o.childrenAfterAggFilter||(o.childrenAfterAggFilter=o.childrenAfterFilter.slice()),o.childrenAfterSort||(o.childrenAfterSort=o.childrenAfterAggFilter.slice())),Tu(o),(y=n.duplicateRows)!=null&&y.size&&!n.duplicateRowsWarned&&(n.duplicateRowsWarned=!0,T._warnOnce("duplicate group keys for row data, keys should be unique",[o.id,o.data,...Array.from(n.duplicateRows).map(x=>x.data)]))}createFillerRow(t){const e=new T.RowNode(this.beans);e.key=t.key,e.group=!0,e.field=null,e.leafGroup=!1,e.rowGroupIndex=null,e.allChildrenCount=null;let n=t.level+"-"+t.key,o=t.parent;for(;o!==null;){const i=o.parent;if(i===null)break;n=`${o.level}-${o.key}-${n}`,o=i}return e.id=T.RowNode.ID_PREFIX_ROW_GROUP+n,e}setGroupData(t,e){var i;const n={};t.groupData=n;const o=(i=this.showRowGroupColsService)==null?void 0:i.getShowRowGroupCols();if(o)for(const l of o)n[l.getColId()]=e}getExpandedInitialValue(t,e){const n=t.isGroupOpenByDefault;return n?n({rowNode:e,field:e.field,key:e.key,level:e.level,rowGroupColumn:e.rowGroupColumn})==!0:t.expandByDefault===-1||e.level<t.expandByDefault}clearTree(t){const{parent:e,oldRow:n,row:o,level:i}=t;if(e!==null&&n!==null&&(e.childrenChanged=!0,e.row!==null&&mr(e.row)),o!==null&&i>=0){let l=t.row;for(;l!==null&&t.removeRow(l);)this.destroyRow(l,!l.data),l=t.row}for(const l of t.enumChildren())this.clearTree(l);t.destroy()}destroyTree(t){const{row:e,level:n,duplicateRows:o}=t;if(e&&(n>=0&&!e.data?this.destroyRow(e,!0):fi(e)),o)for(const i of o)n>=0&&!i.data?this.destroyRow(i,!0):fi(i);for(const i of t.enumChildren())this.destroyTree(i);t.destroy()}destroyRow(t,e){if(!bu(t)){fi(t);return}if(!e){(this.rowsPendingDestruction??(this.rowsPendingDestruction=new Set)).add(t);return}fi(t),t.setRowIndex(null),t.setRowTop(null),!t.data&&t.isSelected()&&t.setSelectedParams({newValue:!1,source:"rowGroupChanged"})}commitDestroyedRows(){const{rowsPendingDestruction:t}=this;if(t!==null){this.rowsPendingDestruction=null;for(const e of t)this.destroyRow(e,!0)}}},Hv=class extends T.BeanStub{constructor(){super(...arguments),this.beanName="groupStage"}wireBeans(t){this.selectableService=t.selectableService}execute(t){const e=this.gos.get("treeData")?Wv:Mv;let n=this.strategy;(n==null?void 0:n.constructor)!==e&&(this.destroyBean(n),n=this.createManagedBean(new e),this.strategy=n),n.execute(t),this.selectableService.updateSelectableAfterGrouping()}destroy(){this.destroyBean(this.strategy),this.strategy=void 0,super.destroy()}},Nu="PivotRowTotal_",qv=class extends T.BeanStub{constructor(){super(...arguments),this.beanName="pivotColDefService"}wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService,this.columnNameService=t.columnNameService}postConstruct(){const t=()=>this.gos.get("serverSidePivotResultFieldSeparator")??"_";this.fieldSeparator=t(),this.addManagedPropertyListener("serverSidePivotResultFieldSeparator",()=>{this.fieldSeparator=t()});const e=()=>this.gos.get("pivotDefaultExpanded");this.pivotDefaultExpanded=e(),this.addManagedPropertyListener("pivotDefaultExpanded",()=>{this.pivotDefaultExpanded=e()})}createPivotColumnDefs(t){const e=this.createPivotColumnsFromUniqueValues(t);function n(l,c=[]){return l.forEach(d=>{d.children!==void 0?n(d.children,c):c.push(d)}),c}const o=n(e);this.addRowGroupTotals(e,o),this.addExpandablePivotGroups(e,o),this.addPivotTotalsToGroups(e,o);const i=o.map(l=>T._cloneObject(l));return{pivotColumnGroupDefs:e,pivotColumnDefs:i}}createPivotColumnsFromUniqueValues(t){const e=this.funcColsService.getPivotColumns(),n=e.length;return this.recursivelyBuildGroup(0,t,[],n,e)}recursivelyBuildGroup(t,e,n,o,i){const l=this.funcColsService.getValueColumns();if(t>=o)return this.buildMeasureCols(n);const c=i[t].getColDef(),d=this.headerNameComparator.bind(this,c.pivotComparator);if(l.length===1&&this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&t===o-1){const h=[];return T._iterateObject(e,m=>{const y=[...n,m],x=this.createColDef(l[0],m,y);x.columnGroupShow="open",h.push(x)}),h.sort(d),h}const p=[];return T._iterateObject(e,(h,m)=>{const y=this.pivotDefaultExpanded===-1||t<this.pivotDefaultExpanded,x=[...n,h];p.push({children:this.recursivelyBuildGroup(t+1,m,x,o,i),headerName:h,pivotKeys:x,columnGroupShow:"open",openByDefault:y,groupId:this.generateColumnGroupId(x)})}),p.sort(d),p}buildMeasureCols(t){const e=this.funcColsService.getValueColumns();return e.length===0?[this.createColDef(null,"-",t)]:e.map(n=>{const o=this.columnNameService.getDisplayNameForColumn(n,"header");return{...this.createColDef(n,o,t),columnGroupShow:"open"}})}addExpandablePivotGroups(t,e){const n=this.gos.get("suppressExpandablePivotGroups");if(n||this.gos.get("pivotColumnGroupTotals"))return;const o=(i,l,c)=>{if("children"in i){const h=new Map;i.children.forEach(y=>{o(y,l,h)});const m=!i.children.some(y=>y.children);this.funcColsService.getValueColumns().forEach(y=>{const x=this.columnNameService.getDisplayNameForColumn(y,"header"),w=this.createColDef(y,x,i.pivotKeys);w.pivotTotalColumnIds=h.get(y.getColId()),w.columnGroupShow=n?"open":"closed",w.aggFunc=y.getAggFunc(),m||(i.children.push(w),l.push(w))}),this.merge(c,h);return}if(!i.pivotValueColumn)return;const d=i.pivotValueColumn.getColId();c.has(d)?c.get(d).push(i.colId):c.set(d,[i.colId])};t.forEach(i=>{o(i,e,new Map)})}addPivotTotalsToGroups(t,e){if(!this.gos.get("pivotColumnGroupTotals"))return;const n=this.gos.get("pivotColumnGroupTotals")==="after",o=this.funcColsService.getValueColumns(),i=o.map(c=>c.getAggFunc());if(!i||i.length<1||!this.sameAggFuncs(i))return;const l=o[0];t.forEach(c=>{this.recursivelyAddPivotTotal(c,e,l,n)})}recursivelyAddPivotTotal(t,e,n,o){const i=t;if(!i.children){const c=t;return c.colId?[c.colId]:null}let l=[];if(i.children.forEach(c=>{const d=this.recursivelyAddPivotTotal(c,e,n,o);d&&(l=l.concat(d))}),i.children.length>1){const d=this.localeService.getLocaleTextFunc()("pivotColumnGroupTotals","Total"),p=this.createColDef(n,d,t.pivotKeys,!0);p.pivotTotalColumnIds=l,p.aggFunc=n.getAggFunc(),p.columnGroupShow=this.gos.get("suppressExpandablePivotGroups")?"open":void 0;const h=t.children;o?h.push(p):h.unshift(p),e.push(p)}return l}addRowGroupTotals(t,e){if(!this.gos.get("pivotRowTotals"))return;const n=this.gos.get("pivotRowTotals")==="after",i=this.funcColsService.getValueColumns().slice();n||i.reverse();const l=i.length>1||!this.gos.get("removePivotHeaderRowWhenSingleValueColumn");for(let c=0;c<i.length;c++){const d=i[c],p=this.columnNameService.getDisplayNameForColumn(d,"header"),h=this.createColDef(d,p,[]),m=[];for(let x=0;x<e.length;x++){const w=e[x];w.pivotValueColumn===d&&m.push(w.colId)}h.pivotTotalColumnIds=m,h.colId=Nu+h.colId;const y=l?{children:[h],pivotKeys:[],groupId:`${Nu}_pivotGroup_${d.getColId()}`}:h;e.push(h),n?t.push(y):t.unshift(y)}}createColDef(t,e,n,o=!1){const i={};if(t){const l=t.getColDef();Object.assign(i,l),i.hide=!1}return i.headerName=e,i.colId=this.generateColumnId(n||[],t&&!o?t.getColId():""),i.field=i.colId,i.valueGetter=l=>{var c;return(c=l.data)==null?void 0:c[l.colDef.field]},i.pivotKeys=n,i.pivotValueColumn=t,i.filter===!0&&(i.filter="agNumberColumnFilter"),i}sameAggFuncs(t){if(t.length==1)return!0;for(let e=1;e<t.length;e++)if(t[e]!==t[0])return!1;return!0}headerNameComparator(t,e,n){return t?t(e.headerName,n.headerName):e.headerName&&!n.headerName?1:!e.headerName&&n.headerName?-1:!e.headerName||!n.headerName?0:e.headerName<n.headerName?-1:e.headerName>n.headerName?1:0}merge(t,e){e.forEach((n,o)=>{const l=[...t.has(o)?t.get(o):[],...n];t.set(o,l)})}generateColumnGroupId(t){return`pivotGroup_${this.funcColsService.getPivotColumns().map(n=>n.getColId()).join("-")}_${t.join("-")}`}generateColumnId(t,e){return`pivot_${this.funcColsService.getPivotColumns().map(o=>o.getColId()).join("-")}_${t.join("-")}_${e}`}createColDefsFromFields(t){const e={};for(let i=0;i<t.length;i++){const c=t[i].split(this.fieldSeparator);let d=e;for(let p=0;p<c.length;p++){const h=c[p];d[h]==null&&(d[h]={}),d=d[h]}}const n=(i,l,c,d)=>{const p=[];for(const y in c){const x=c[y],w=n(`${i}${this.fieldSeparator}${y}`,y,x,d+1);p.push(w)}if(p.length===0){const y=this.columnModel.getColDefCol(l);if(y){const w=this.columnNameService.getDisplayNameForColumn(y,"header")??l,S=this.createColDef(y,w,void 0,!1);return S.colId=i,S.aggFunc=y.getAggFunc(),S.valueGetter=O=>{var G;return(G=O.data)==null?void 0:G[i]},S}return{colId:i,headerName:l,valueGetter:w=>{var S;return(S=w.data)==null?void 0:S[i]}}}return this.gos.get("removePivotHeaderRowWhenSingleValueColumn")&&p.length===1&&"colId"in p[0]?(p[0].headerName=l,p[0]):{openByDefault:this.pivotDefaultExpanded===-1||d<this.pivotDefaultExpanded,groupId:i,headerName:l,children:p}},o=[];for(const i in e){const l=e[i],c=n(i,i,l,0);o.push(c)}return o}},Au="Exceeded maximum allowed pivot column count.",Kv=class extends T.BeanStub{constructor(){super(...arguments),this.beanName="pivotStage",this.uniqueValues={},this.lastTimeFailed=!1,this.maxUniqueValues=-1,this.currentUniqueCount=0}wireBeans(t){this.valueService=t.valueService,this.columnModel=t.columnModel,this.pivotResultColsService=t.pivotResultColsService,this.funcColsService=t.funcColsService,this.pivotColDefService=t.pivotColDefService}execute(t){const e=t.changedPath;this.columnModel.isPivotActive()?this.executePivotOn(e):this.executePivotOff(e)}executePivotOff(t){this.aggregationColumnsHashLastTime=null,this.uniqueValues={},this.pivotResultColsService.isPivotResultColsPresent()&&(this.pivotResultColsService.setPivotResultCols(null,"rowModelUpdated"),t&&t.setInactive())}executePivotOn(t){const e=this.funcColsService.getValueColumns().length??1,n=this.gos.get("pivotMaxGeneratedColumns");this.maxUniqueValues=n===-1?-1:n/e;let o;try{o=this.bucketUpRowNodes(t)}catch(b){if(b.message===Au){this.pivotResultColsService.setPivotResultCols([],"rowModelUpdated"),this.eventService.dispatchEvent({type:"pivotMaxColumnsExceeded",message:b.message}),this.lastTimeFailed=!0;return}throw b}const i=this.setUniqueValues(o),l=this.funcColsService.getValueColumns(),c=l.map(b=>`${b.getId()}-${b.getColDef().headerName}`).join("#"),d=l.map(b=>b.getAggFunc().toString()).join("#"),p=this.aggregationColumnsHashLastTime!==c,h=this.aggregationFuncsHashLastTime!==d;this.aggregationColumnsHashLastTime=c,this.aggregationFuncsHashLastTime=d;const m=this.funcColsService.getRowGroupColumns().map(b=>b.getId()).join("#"),y=m!==this.groupColumnsHashLastTime;this.groupColumnsHashLastTime=m;const x=this.gos.get("pivotRowTotals"),w=this.gos.get("pivotColumnGroupTotals"),S=this.gos.get("suppressExpandablePivotGroups"),O=this.gos.get("removePivotHeaderRowWhenSingleValueColumn"),G=x!==this.pivotRowTotalsLastTime||w!==this.pivotColumnGroupTotalsLastTime||S!==this.suppressExpandablePivotGroupsLastTime||O!==this.removePivotHeaderRowWhenSingleValueColumnLastTime;if(this.pivotRowTotalsLastTime=x,this.pivotColumnGroupTotalsLastTime=w,this.suppressExpandablePivotGroupsLastTime=S,this.removePivotHeaderRowWhenSingleValueColumnLastTime=O,this.lastTimeFailed||i||p||y||h||G){const{pivotColumnGroupDefs:b,pivotColumnDefs:R}=this.pivotColDefService.createPivotColumnDefs(this.uniqueValues);this.pivotColumnDefs=R,this.pivotResultColsService.setPivotResultCols(b,"rowModelUpdated"),t&&t.setInactive()}this.lastTimeFailed=!1}setUniqueValues(t){const e=JSON.stringify(t),n=JSON.stringify(this.uniqueValues);return e!==n?(this.uniqueValues=t,!0):!1}bucketUpRowNodes(t){this.currentUniqueCount=0;const e={};t.forEachChangedNodeDepthFirst(o=>{o.leafGroup&&(o.childrenMapped=null)});const n=o=>{var i;o.leafGroup?this.bucketRowNode(o,e):(i=o.childrenAfterFilter)==null||i.forEach(n)};return t.executeFromRootNode(n),e}bucketRowNode(t,e){const n=this.funcColsService.getPivotColumns();n.length===0?t.childrenMapped=null:t.childrenMapped=this.bucketChildren(t.childrenAfterFilter,n,0,e),t.sibling&&(t.sibling.childrenMapped=t.childrenMapped)}bucketChildren(t,e,n,o){const i={},l=e[n];if(t.forEach(c=>{let d=this.valueService.getKeyForNode(l,c);if(T._missing(d)&&(d=""),!o[d]){this.currentUniqueCount+=1,o[d]={};const p=this.maxUniqueValues!==-1,h=this.currentUniqueCount>this.maxUniqueValues;if(p&&h)throw Error(Au)}i[d]||(i[d]=[]),i[d].push(c)}),n===e.length-1)return i;{const c={};return T._iterateObject(i,(d,p)=>{c[d]=this.bucketChildren(p,e,n+1,o[d])}),c}}getPivotColumnDefs(){return this.pivotColumnDefs}};function Xv(t,e,n){t.aggFuncService&&t.aggFuncService.addAggFuncs({key:n})}function Yv(t,e){t.aggFuncService&&t.aggFuncService.addAggFuncs(e)}function Jv(t){t.aggFuncService&&t.aggFuncService.clear()}function Qv(t,e,n){t.funcColsService.setColumnAggFunc(e,n,"api")}function e_(t){return t.columnModel.isPivotMode()}function t_(t,e,n){return t.pivotResultColsService.lookupPivotResultCol(e,n)}function n_(t,e){t.funcColsService.setValueColumns(e,"api")}function r_(t){return t.funcColsService.getValueColumns()}function o_(t,e){t.funcColsService.removeValueColumns([e],"api")}function i_(t,e){t.funcColsService.removeValueColumns(e,"api")}function s_(t,e){t.funcColsService.addValueColumns([e],"api")}function a_(t,e){t.funcColsService.addValueColumns(e,"api")}function l_(t,e){t.funcColsService.setRowGroupColumns(e,"api")}function c_(t,e){t.funcColsService.removeRowGroupColumns([e],"api")}function d_(t,e){t.funcColsService.removeRowGroupColumns(e,"api")}function u_(t,e){t.funcColsService.addRowGroupColumns([e],"api")}function p_(t,e){t.funcColsService.addRowGroupColumns(e,"api")}function h_(t,e,n){t.funcColsService.moveRowGroupColumn(e,n,"api")}function f_(t){return t.funcColsService.getRowGroupColumns()}function m_(t,e){t.funcColsService.setPivotColumns(e,"api")}function g_(t,e){t.funcColsService.removePivotColumns([e],"api")}function y_(t,e){t.funcColsService.removePivotColumns(e,"api")}function v_(t,e){t.funcColsService.addPivotColumns([e],"api")}function __(t,e){t.funcColsService.addPivotColumns(e,"api")}function C_(t){return t.funcColsService.getPivotColumns()}function w_(t,e){t.pivotResultColsService.setPivotResultCols(e,"api")}function b_(t){const e=t.pivotResultColsService.getPivotResultCols();return e?e.list:null}var x_=class extends T.BeanStub{constructor(){super(...arguments),this.beanName="showRowGroupColsService"}wireBeans(t){this.columnModel=t.columnModel,this.funcColsService=t.funcColsService}refresh(){this.showRowGroupCols=[],this.showRowGroupColsMap={},this.columnModel.getCols().forEach(t=>{const n=t.getColDef().showRowGroup,o=typeof n=="string";!o&&!(n===!0)||(this.showRowGroupCols.push(t),o?this.showRowGroupColsMap[n]=t:this.funcColsService.getRowGroupColumns().forEach(c=>{this.showRowGroupColsMap[c.getId()]=t}))})}getShowRowGroupCols(){return this.showRowGroupCols}getShowRowGroupCol(t){return this.showRowGroupColsMap[t]}},mi="32.3.3",vl=T._defineModule({version:mi,moduleName:`${T.ModuleNames.RowGroupingModule}-core`,beans:[Nv,Iv,Hv,qv,Kv,Cv,Av,x_,Dv],userComponents:[{name:"agGroupRowRenderer",classImp:Me.GroupCellRenderer},{name:"agGroupCellRenderer",classImp:Me.GroupCellRenderer}],controllers:[{name:"groupCellRendererCtrl",classImp:Me.GroupCellRendererCtrl}],dependantModules:[Me.EnterpriseCoreModule]}),k_=T._defineModule({version:mi,moduleName:`${T.ModuleNames.RowGroupingModule}-api`,apiFunctions:{addAggFunc:Xv,addAggFuncs:Yv,clearAggFuncs:Jv,setColumnAggFunc:Qv,isPivotMode:e_,getPivotResultColumn:t_,setValueColumns:n_,getValueColumns:r_,removeValueColumn:o_,removeValueColumns:i_,addValueColumn:s_,addValueColumns:a_,setRowGroupColumns:l_,removeRowGroupColumn:c_,removeRowGroupColumns:d_,addRowGroupColumn:u_,addRowGroupColumns:p_,getRowGroupColumns:f_,moveRowGroupColumn:h_,setPivotColumns:m_,removePivotColumn:g_,removePivotColumns:y_,addPivotColumn:v_,addPivotColumns:__,getPivotColumns:C_,setPivotResultColumns:w_,getPivotResultColumns:b_},dependantModules:[vl]}),Vu=T._defineModule({version:mi,moduleName:"@ag-grid-enterprise/group-filter",userComponents:[{name:"agGroupColumnFilter",classImp:Fv}],dependantModules:[vl,T._ColumnFilterModule]}),S_=T._defineModule({version:mi,moduleName:"@ag-grid-enterprise/group-floating-filter",userComponents:[{name:"agGroupColumnFloatingFilter",classImp:Ov}],dependantModules:[Vu,T._FloatingFilterModule]}),E_=T._defineModule({version:mi,moduleName:T.ModuleNames.RowGroupingModule,dependantModules:[vl,k_,Vu,S_]}),Bu=class extends fl{constructor(t){super(t,"aggregation")}postConstruct(){const t=this.localeService.getLocaleTextFunc(),e=t("valueColumnsEmptyMessage","Drag here to aggregate"),n=t("values","Values");super.init({icon:T._createIconNoSpan("valuePanel",this.gos,null),emptyMessage:e,title:n}),this.addManagedEventListeners({columnValueChanged:this.refreshGui.bind(this)})}getAriaLabel(){return this.localeService.getLocaleTextFunc()("ariaValuesDropZonePanelLabel","Values")}getTooltipParams(){const t=super.getTooltipParams();return t.location="valueColumnsList",t}getIconName(){return this.isPotentialDndItems()?"aggregate":"notAllowed"}isItemDroppable(t,e){return this.gos.get("functionsReadOnly")||!t.isPrimary()?!1:t.isAllowValue()&&(!t.isValueActive()||this.isSourceEventFromTarget(e))}updateItems(t){this.funcColsService.setValueColumns(t,"toolPanelUi")}getExistingItems(){return this.funcColsService.getValueColumns()}},Pu=300,T_=class extends T.Component{constructor(){super(`<div class="ag-column-select-header" role="presentation">
|
|
25
25
|
<div data-ref="eExpand" class="ag-column-select-header-icon"></div>
|
|
26
26
|
<ag-checkbox data-ref="eSelect" class="ag-column-select-header-checkbox"></ag-checkbox>
|
|
27
27
|
<ag-input-text-field class="ag-column-select-header-filter-wrapper" data-ref="eFilterTextField"></ag-input-text-field>
|
|
28
|
-
</div>`,[
|
|
28
|
+
</div>`,[T.AgCheckboxSelector,T.AgInputTextFieldSelector]),this.eExpand=T.RefPlaceholder,this.eSelect=T.RefPlaceholder,this.eFilterTextField=T.RefPlaceholder}wireBeans(t){this.columnModel=t.columnModel}postConstruct(){this.createExpandIcons(),this.addManagedListeners(this.eExpand,{click:this.onExpandClicked.bind(this),keydown:e=>{e.key===T.KeyCode.SPACE&&(e.preventDefault(),this.onExpandClicked())}}),this.addManagedElementListeners(this.eSelect.getInputElement(),{click:this.onSelectClicked.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",()=>this.onFunctionsReadOnlyPropChanged()),this.eFilterTextField.setAutoComplete(!1).onValueChange(()=>this.onFilterTextChanged()),this.addManagedElementListeners(this.eFilterTextField.getInputElement(),{keydown:this.onMiniFilterKeyDown.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.showOrHideOptions.bind(this)});const t=this.localeService.getLocaleTextFunc();this.eSelect.setInputAriaLabel(t("ariaColumnSelectAll","Toggle All Columns Visibility")),this.eFilterTextField.setInputAriaLabel(t("ariaFilterColumnsInput","Filter Columns Input")),this.activateTabIndex([this.eExpand])}onFunctionsReadOnlyPropChanged(){const t=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(t),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",t)}init(t){this.params=t;const e=this.gos.get("functionsReadOnly");this.eSelect.setReadOnly(e),this.eSelect.addOrRemoveCssClass("ag-column-select-column-readonly",e),this.columnModel.isReady()&&this.showOrHideOptions()}createExpandIcons(){this.eExpand.appendChild(this.eExpandChecked=T._createIconNoSpan("columnSelectOpen",this.gos)),this.eExpand.appendChild(this.eExpandUnchecked=T._createIconNoSpan("columnSelectClosed",this.gos)),this.eExpand.appendChild(this.eExpandIndeterminate=T._createIconNoSpan("columnSelectIndeterminate",this.gos)),this.setExpandState(0)}showOrHideOptions(){const t=!this.params.suppressColumnFilter,e=!this.params.suppressColumnSelectAll,n=!this.params.suppressColumnExpandAll,o=this.columnModel.isProvidedColGroupsPresent(),i=this.localeService.getLocaleTextFunc();this.eFilterTextField.setInputPlaceholder(i("searchOoo","Search...")),T._setDisplayed(this.eFilterTextField.getGui(),t),T._setDisplayed(this.eSelect.getGui(),e),T._setDisplayed(this.eExpand,n&&o)}onFilterTextChanged(){this.onFilterTextChangedDebounced||(this.onFilterTextChangedDebounced=T._debounce(()=>{const t=this.eFilterTextField.getValue();this.dispatchLocalEvent({type:"filterChanged",filterText:t})},Pu)),this.onFilterTextChangedDebounced()}onMiniFilterKeyDown(t){t.key===T.KeyCode.ENTER&&setTimeout(()=>this.onSelectClicked(),Pu)}onSelectClicked(){this.dispatchLocalEvent({type:this.selectState?"unselectAll":"selectAll"})}onExpandClicked(){this.dispatchLocalEvent({type:this.expandState===0?"collapseAll":"expandAll"})}setExpandState(t){this.expandState=t,T._setDisplayed(this.eExpandChecked,this.expandState===0),T._setDisplayed(this.eExpandUnchecked,this.expandState===1),T._setDisplayed(this.eExpandIndeterminate,this.expandState===2)}setSelectionState(t){this.selectState=t,this.eSelect.setValue(this.selectState)}},N_={selector:"AG-PRIMARY-COLS-HEADER",component:T_},Ru=class{constructor(t,e,n,o=!1,i){this.localEventService=new T.LocalEventService,this.displayName=t,this.dept=n,this.group=o,o?(this.columnGroup=e,this.expanded=i,this.children=[]):this.column=e}isGroup(){return this.group}getDisplayName(){return this.displayName}getColumnGroup(){return this.columnGroup}getColumn(){return this.column}getDept(){return this.dept}isExpanded(){return!!this.expanded}getChildren(){return this.children}isPassesFilter(){return this.passesFilter}setExpanded(t){t!==this.expanded&&(this.expanded=t,this.localEventService.dispatchEvent({type:"expandedChanged"}))}setPassesFilter(t){this.passesFilter=t}addEventListener(t,e){this.localEventService.addEventListener(t,e)}removeEventListener(t,e){this.localEventService.removeEventListener(t,e)}},Du=class extends T.Component{constructor(t,e,n){super('<div class="ag-menu"></div>'),this.column=t,this.mouseEvent=e,this.parentEl=n,this.displayName=null}wireBeans(t){this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.funcColsService=t.funcColsService,this.popupService=t.popupService,this.focusService=t.focusService}postConstruct(){if(this.initializeProperties(this.column),this.buildMenuItemMap(),T.isColumn(this.column)?this.displayName=this.columnNameService.getDisplayNameForColumn(this.column,"columnToolPanel"):this.displayName=this.columnNameService.getDisplayNameForProvidedColumnGroup(null,this.column,"columnToolPanel"),this.isActive()){this.mouseEvent.preventDefault();const t=this.getMappedMenuItems();if(t.length===0)return;this.displayContextMenu(t)}}initializeProperties(t){T.isProvidedColumnGroup(t)?this.columns=t.getLeafColumns():this.columns=[t],this.allowGrouping=this.columns.some(e=>e.isPrimary()&&e.isAllowRowGroup()),this.allowValues=this.columns.some(e=>e.isPrimary()&&e.isAllowValue()),this.allowPivoting=this.columnModel.isPivotMode()&&this.columns.some(e=>e.isPrimary()&&e.isAllowPivot())}buildMenuItemMap(){const t=this.localeService.getLocaleTextFunc();this.menuItemMap=new Map,this.menuItemMap.set("rowGroup",{allowedFunction:e=>e.isPrimary()&&e.isAllowRowGroup()&&!this.columnModel.isColGroupLocked(e),activeFunction:e=>e.isRowGroupActive(),activateLabel:()=>`${t("groupBy","Group by")} ${this.displayName}`,deactivateLabel:()=>`${t("ungroupBy","Un-Group by")} ${this.displayName}`,activateFunction:()=>{const e=this.funcColsService.getRowGroupColumns();this.funcColsService.setRowGroupColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{const e=this.funcColsService.getRowGroupColumns();this.funcColsService.setRowGroupColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"menuAddRowGroup",removeIcon:"menuRemoveRowGroup"}),this.menuItemMap.set("value",{allowedFunction:e=>e.isPrimary()&&e.isAllowValue(),activeFunction:e=>e.isValueActive(),activateLabel:()=>t("addToValues",`Add ${this.displayName} to values`,[this.displayName]),deactivateLabel:()=>t("removeFromValues",`Remove ${this.displayName} from values`,[this.displayName]),activateFunction:()=>{const e=this.funcColsService.getValueColumns();this.funcColsService.setValueColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{const e=this.funcColsService.getValueColumns();this.funcColsService.setValueColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"valuePanel",removeIcon:"valuePanel"}),this.menuItemMap.set("pivot",{allowedFunction:e=>this.columnModel.isPivotMode()&&e.isPrimary()&&e.isAllowPivot(),activeFunction:e=>e.isPivotActive(),activateLabel:()=>t("addToLabels",`Add ${this.displayName} to labels`,[this.displayName]),deactivateLabel:()=>t("removeFromLabels",`Remove ${this.displayName} from labels`,[this.displayName]),activateFunction:()=>{const e=this.funcColsService.getPivotColumns();this.funcColsService.setPivotColumns(this.addColumnsToList(e),"toolPanelUi")},deActivateFunction:()=>{const e=this.funcColsService.getPivotColumns();this.funcColsService.setPivotColumns(this.removeColumnsFromList(e),"toolPanelUi")},addIcon:"pivotPanel",removeIcon:"pivotPanel"})}addColumnsToList(t){return[...t].concat(this.columns.filter(e=>t.indexOf(e)===-1))}removeColumnsFromList(t){return t.filter(e=>this.columns.indexOf(e)===-1)}displayContextMenu(t){const e=this.getGui(),n=this.createBean(new Me.AgMenuList),o=this.localeService.getLocaleTextFunc();let i=()=>{};e.appendChild(n.getGui()),n.addMenuItems(t),n.addManagedListeners(n,{closeMenu:()=>{this.parentEl.focus(),i()}});const l=this.popupService.addPopup({modal:!0,eChild:e,closeOnEsc:!0,afterGuiAttached:()=>this.focusService.focusInto(n.getGui()),ariaLabel:o("ariaLabelContextMenu","Context Menu"),closedCallback:c=>{c instanceof KeyboardEvent&&this.parentEl.focus(),this.destroyBean(n)}});l&&(i=l.hideFunc),this.popupService.positionPopupUnderMouseEvent({type:"columnContextMenu",mouseEvent:this.mouseEvent,ePopup:e})}isActive(){return this.allowGrouping||this.allowValues||this.allowPivoting}getMappedMenuItems(){const t=[];for(const e of this.menuItemMap.values()){const n=this.columns.some(i=>e.allowedFunction(i)&&!e.activeFunction(i)),o=this.columns.some(i=>e.allowedFunction(i)&&e.activeFunction(i));n&&t.push({name:e.activateLabel(this.displayName),icon:T._createIconNoSpan(e.addIcon,this.gos,null),action:()=>e.activateFunction()}),o&&t.push({name:e.deactivateLabel(this.displayName),icon:T._createIconNoSpan(e.removeIcon,this.gos,null),action:()=>e.deActivateFunction()})}return t}},Iu=class extends T.Component{constructor(t,e,n,o){super(),this.modelItem=t,this.allowDragging=e,this.eventType=n,this.focusWrapper=o,this.cbSelect=T.RefPlaceholder,this.eLabel=T.RefPlaceholder,this.eGroupOpenedIcon=T.RefPlaceholder,this.eGroupClosedIcon=T.RefPlaceholder,this.eColumnGroupIcons=T.RefPlaceholder,this.processingColumnStateChange=!1,this.modelItem=t,this.columnGroup=t.getColumnGroup(),this.columnDept=t.getDept(),this.displayName=t.getDisplayName(),this.allowDragging=e}wireBeans(t){this.columnModel=t.columnModel,this.dragAndDropService=t.dragAndDropService,this.modelItemUtils=t.modelItemUtils}postConstruct(){this.setTemplate(`<div class="ag-column-select-column-group">
|
|
29
29
|
<span class="ag-column-group-icons" data-ref="eColumnGroupIcons" >
|
|
30
30
|
<span class="ag-column-group-closed-icon" data-ref="eGroupClosedIcon"></span>
|
|
31
31
|
<span class="ag-column-group-opened-icon" data-ref="eGroupOpenedIcon"></span>
|
|
32
32
|
</span>
|
|
33
33
|
<ag-checkbox data-ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>
|
|
34
34
|
<span class="ag-column-select-column-label" data-ref="eLabel"></span>
|
|
35
|
-
</div>`,[
|
|
35
|
+
</div>`,[T.AgCheckboxSelector]),this.eDragHandle=T._createIconNoSpan("columnDrag",this.gos),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-group-drag-handle");const t=this.cbSelect.getGui(),e=this.cbSelect.getInputElement();t.insertAdjacentElement("afterend",this.eDragHandle),e.setAttribute("tabindex","-1"),this.eLabel.innerHTML=this.displayName?this.displayName:"",this.setupExpandContract(),this.addCssClass("ag-column-select-indent-"+this.columnDept),this.getGui().style.setProperty("--ag-indentation-level",String(this.columnDept)),this.addManagedEventListeners({columnPivotModeChanged:this.onColumnStateChanged.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.onLabelClicked.bind(this)}),this.addManagedListeners(this.cbSelect,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedListeners(this.modelItem,{expandedChanged:this.onExpandChanged.bind(this)}),this.addManagedListeners(this.focusWrapper,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.setOpenClosedIcons(),this.setupDragging(),this.onColumnStateChanged(),this.addVisibilityListenersToAllChildren(),this.refreshAriaExpanded(),this.refreshAriaLabel(),this.setupTooltip(),T._getToolPanelClassesFromColDef(this.columnGroup.getColGroupDef(),this.gos,null,this.columnGroup).forEach(o=>this.addOrRemoveCssClass(o,!0))}getColumns(){return this.columnGroup.getLeafColumns()}setupTooltip(){const t=this.columnGroup.getColGroupDef();if(!t)return;const e=this.gos.get("tooltipShowMode")==="whenTruncated";let n;e&&(n=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);const o=()=>{const i=t.headerTooltip;this.setTooltip({newTooltipText:i,location:"columnToolPanelColumnGroup",shouldDisplayTooltip:n})};o(),this.addManagedEventListeners({newColumnsLoaded:o})}getTooltipParams(){const t=super.getTooltipParams();return t.location="columnToolPanelColumnGroup",t}handleKeyDown(t){switch(t.key){case T.KeyCode.LEFT:t.preventDefault(),this.modelItem.setExpanded(!1);break;case T.KeyCode.RIGHT:t.preventDefault(),this.modelItem.setExpanded(!0);break;case T.KeyCode.SPACE:t.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected());break}}onContextMenu(t){const{columnGroup:e,gos:n}=this;if(n.get("functionsReadOnly"))return;const o=this.createBean(new Du(e,t,this.focusWrapper));this.addDestroyFunc(()=>{o.isAlive()&&this.destroyBean(o)})}addVisibilityListenersToAllChildren(){const t=this.onColumnStateChanged.bind(this);this.columnGroup.getLeafColumns().forEach(e=>{this.addManagedListeners(e,{visibleChanged:t,columnValueChanged:t,columnPivotChanged:t,columnRowGroupChanged:t})})}setupDragging(){if(!this.allowDragging){T._setDisplayed(this.eDragHandle,!1);return}let t=!this.gos.get("suppressDragLeaveHidesColumns");const e={type:T.DragSourceType.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>t?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{t=!this.gos.get("suppressDragLeaveHidesColumns"),this.eventService.dispatchEvent({type:"columnPanelItemDragStart",column:this.columnGroup})},onDragStopped:()=>{this.eventService.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:n=>{t&&this.modelItemUtils.updateColumns({columns:this.columnGroup.getLeafColumns(),visibleState:n==null?void 0:n.visibleState,pivotState:n==null?void 0:n.pivotState,eventType:this.eventType})},onGridExit:()=>{t&&this.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(e,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(e))}createDragItem(){const t=this.columnGroup.getLeafColumns(),e={},n={};return t.forEach(o=>{const i=o.getId();e[i]=o.isVisible(),n[i]=this.modelItemUtils.createPivotState(o)}),{columns:t,visibleState:e,pivotState:n}}setupExpandContract(){this.eGroupClosedIcon.appendChild(T._createIcon("columnSelectClosed",this.gos,null)),this.eGroupOpenedIcon.appendChild(T._createIcon("columnSelectOpen",this.gos,null));const t=this.onExpandOrContractClicked.bind(this);this.addManagedElementListeners(this.eGroupClosedIcon,{click:t}),this.addManagedElementListeners(this.eGroupOpenedIcon,{click:t});const e=new T.TouchListener(this.eColumnGroupIcons,!0);this.addManagedListeners(e,{tap:t}),this.addDestroyFunc(e.destroy.bind(e))}onLabelClicked(){const t=!this.cbSelect.getValue();this.onChangeCommon(t)}onCheckboxChanged(t){this.onChangeCommon(t.selected)}getVisibleLeafColumns(){const t=[],e=n=>{n.forEach(o=>{o.isPassesFilter()&&(o.isGroup()?e(o.getChildren()):t.push(o.getColumn()))})};return e(this.modelItem.getChildren()),t}onChangeCommon(t){this.refreshAriaLabel(),!this.processingColumnStateChange&&this.modelItemUtils.selectAllChildren(this.modelItem.getChildren(),t,this.eventType)}refreshAriaLabel(){const t=this.localeService.getLocaleTextFunc(),e=t("ariaColumnGroup","Column Group"),n=this.cbSelect.getValue(),o=n===void 0?t("ariaIndeterminate","indeterminate"):n?t("ariaVisible","visible"):t("ariaHidden","hidden"),i=t("ariaToggleVisibility","Press SPACE to toggle visibility");T._setAriaLabel(this.focusWrapper,`${this.displayName} ${e}`),this.cbSelect.setInputAriaLabel(`${i} (${o})`),T._setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)}onColumnStateChanged(){const t=this.workOutSelectedValue(),e=this.workOutReadOnlyValue();this.processingColumnStateChange=!0,this.cbSelect.setValue(t),this.cbSelect.setReadOnly(e),this.addOrRemoveCssClass("ag-column-select-column-group-readonly",e),this.processingColumnStateChange=!1}workOutSelectedValue(){const t=this.columnModel.isPivotMode(),e=this.getVisibleLeafColumns();let n=0,o=0;if(e.forEach(i=>{!t&&i.getColDef().lockVisible||(this.isColumnChecked(i,t)?n++:o++)}),!(n>0&&o>0))return n>0}workOutReadOnlyValue(){const t=this.columnModel.isPivotMode();let e=0;return this.columnGroup.getLeafColumns().forEach(n=>{t?n.isAnyFunctionAllowed()&&e++:n.getColDef().lockVisible||e++}),e===0}isColumnChecked(t,e){if(e){const n=t.isPivotActive(),o=t.isRowGroupActive(),i=t.isValueActive();return n||o||i}return t.isVisible()}onExpandOrContractClicked(){const t=this.modelItem.isExpanded();this.modelItem.setExpanded(!t)}onExpandChanged(){this.setOpenClosedIcons(),this.refreshAriaExpanded()}setOpenClosedIcons(){const t=this.modelItem.isExpanded();T._setDisplayed(this.eGroupClosedIcon,!t),T._setDisplayed(this.eGroupOpenedIcon,t)}refreshAriaExpanded(){T._setAriaExpanded(this.focusWrapper,this.modelItem.isExpanded())}getDisplayName(){return this.displayName}onSelectAllChanged(t){const e=this.cbSelect.getValue();!this.cbSelect.isReadOnly()&&(t&&!e||!t&&e)&&this.cbSelect.toggle()}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}setSelected(t){this.cbSelect.setValue(t,!0)}},A_=class extends T.BeanStub{constructor(t,e){super(),this.comp=t,this.virtualList=e}wireBeans(t){this.columnMoveService=t.columnMoveService,this.columnModel=t.columnModel}postConstruct(){this.createManagedBean(new Me.VirtualListDragFeature(this.comp,this.virtualList,{dragSourceType:T.DragSourceType.ToolPanel,listItemDragStartEvent:"columnPanelItemDragStart",listItemDragEndEvent:"columnPanelItemDragEnd",eventSource:this.eventService,getCurrentDragValue:t=>this.getCurrentDragValue(t),isMoveBlocked:t=>this.isMoveBlocked(t),getNumRows:t=>t.getDisplayedColsList().length,moveItem:(t,e)=>this.moveItem(this.getCurrentColumnsBeingMoved(t),e)}))}getCurrentDragValue(t){return t.column}getCurrentColumnsBeingMoved(t){return T.isProvidedColumnGroup(t)?t.getLeafColumns():t?[t]:[]}isMoveBlocked(t){return this.gos.get("suppressMovableColumns")?!0:!!this.getCurrentColumnsBeingMoved(t).find(i=>{const l=i.getColDef();return!!l.suppressMovable||!!l.lockPosition})}moveItem(t,e){if(!e)return;const{component:n}=e;let o=null,i=e.position==="top";if(n instanceof Iu?(o=n.getColumns()[0],i=!0):n&&(o=n.getColumn()),!o)return;const l=this.getMoveTargetIndex({currentColumns:t,lastHoveredColumn:o,isBefore:i});l!=null&&this.columnMoveService.moveColumns(t,l,"toolPanelUi")}getMoveTargetIndex(t){const{currentColumns:e,lastHoveredColumn:n,isBefore:o}=t;if(!n||!e)return null;const i=this.columnModel.getCols().indexOf(n),l=o?i:i+1,c=this.getMoveDiff(e,l);return l-c}getMoveDiff(t,e){const n=this.columnModel.getCols();if(!t)return 0;const o=t[0],i=t.length;return n.indexOf(o)<e?i:0}},V_=class extends T.Component{constructor(t,e,n,o){super(),this.allowDragging=e,this.groupsExist=n,this.focusWrapper=o,this.eLabel=T.RefPlaceholder,this.cbSelect=T.RefPlaceholder,this.processingColumnStateChange=!1,this.column=t.getColumn(),this.columnDept=t.getDept(),this.displayName=t.getDisplayName()}wireBeans(t){this.columnModel=t.columnModel,this.dragAndDropService=t.dragAndDropService,this.modelItemUtils=t.modelItemUtils}postConstruct(){this.setTemplate(`<div class="ag-column-select-column">
|
|
36
36
|
<ag-checkbox data-ref="cbSelect" class="ag-column-select-checkbox"></ag-checkbox>
|
|
37
37
|
<span class="ag-column-select-column-label" data-ref="eLabel"></span>
|
|
38
|
-
</div>`,[x.AgCheckboxSelector]),this.eDragHandle=x._createIconNoSpan("columnDrag",this.gos),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-drag-handle");const t=this.cbSelect.getGui(),e=this.cbSelect.getInputElement();t.insertAdjacentElement("afterend",this.eDragHandle),e.setAttribute("tabindex","-1");const n=x._escapeString(this.displayName);this.eLabel.innerHTML=n;const o=this.columnDept;this.groupsExist&&this.addCssClass("ag-column-select-add-group-indent"),this.addCssClass(`ag-column-select-indent-${o}`),this.getGui().style.setProperty("--ag-indentation-level",String(o)),this.setupDragging();const s=this.onColumnStateChanged.bind(this);this.addManagedEventListeners({columnPivotModeChanged:s}),this.addManagedListeners(this.column,{columnValueChanged:s,columnPivotChanged:s,columnRowGroupChanged:s,visibleChanged:s}),this.addManagedListeners(this.focusWrapper,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",this.onColumnStateChanged.bind(this)),this.addManagedListeners(this.cbSelect,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.onLabelClicked.bind(this)}),this.onColumnStateChanged(),this.refreshAriaLabel(),this.setupTooltip(),x._getToolPanelClassesFromColDef(this.column.getColDef(),this.gos,this.column,null).forEach(c=>this.addOrRemoveCssClass(c,!0))}getColumn(){return this.column}setupTooltip(){const t=this.gos.get("tooltipShowMode")==="whenTruncated";let e;t&&(e=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);const n=()=>{const o=this.column.getColDef().headerTooltip;this.setTooltip({newTooltipText:o,location:"columnToolPanelColumn",shouldDisplayTooltip:e})};n(),this.addManagedEventListeners({newColumnsLoaded:n})}getTooltipParams(){const t=super.getTooltipParams();return t.location="columnToolPanelColumn",t.colDef=this.column.getColDef(),t}onContextMenu(t){const{column:e,gos:n}=this;if(n.get("functionsReadOnly"))return;const o=this.createBean(new eu(e,t,this.focusWrapper));this.addDestroyFunc(()=>{o.isAlive()&&this.destroyBean(o)})}handleKeyDown(t){t.key===x.KeyCode.SPACE&&(t.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected()))}onLabelClicked(){if(this.gos.get("functionsReadOnly"))return;const t=!this.cbSelect.getValue();this.onChangeCommon(t)}onCheckboxChanged(t){this.onChangeCommon(t.selected)}onChangeCommon(t){this.cbSelect.isReadOnly()||(this.refreshAriaLabel(),!this.processingColumnStateChange&&this.modelItemUtils.setColumn(this.column,t,"toolPanelUi"))}refreshAriaLabel(){const t=this.localeService.getLocaleTextFunc(),e=t("ariaColumn","Column"),n=this.cbSelect.getValue()?t("ariaVisible","visible"):t("ariaHidden","hidden"),o=t("ariaToggleVisibility","Press SPACE to toggle visibility");x._setAriaLabel(this.focusWrapper,`${this.displayName} ${e}`),this.cbSelect.setInputAriaLabel(`${o} (${n})`),x._setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)}setupDragging(){if(!this.allowDragging){x._setDisplayed(this.eDragHandle,!1);return}let t=!this.gos.get("suppressDragLeaveHidesColumns");const e={type:x.DragSourceType.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>t?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{t=!this.gos.get("suppressDragLeaveHidesColumns"),this.eventService.dispatchEvent({type:"columnPanelItemDragStart",column:this.column})},onDragStopped:()=>{this.eventService.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:n=>{t&&this.modelItemUtils.updateColumns({columns:[this.column],visibleState:n==null?void 0:n.visibleState,pivotState:n==null?void 0:n.pivotState,eventType:"toolPanelUi"})},onGridExit:()=>{t&&this.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(e,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(e))}createDragItem(){const t=this.column.getColId(),e={[t]:this.column.isVisible()},n={[t]:this.modelItemUtils.createPivotState(this.column)};return{columns:[this.column],visibleState:e,pivotState:n}}onColumnStateChanged(){this.processingColumnStateChange=!0;const t=this.columnModel.isPivotMode();if(t){const o=this.column.isAnyFunctionActive();this.cbSelect.setValue(o)}else this.cbSelect.setValue(this.column.isVisible());let e=!0,n=!0;if(t){const o=this.gos.get("functionsReadOnly"),s=!this.column.isAnyFunctionAllowed();e=!o&&!s,n=e}else{const{enableRowGroup:o,enableValue:s,lockPosition:l,suppressMovable:c,lockVisible:u}=this.column.getColDef(),p=!!o||!!s,f=!!l||!!c;e=!u,n=p||!f}this.cbSelect.setReadOnly(!e),this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!n),this.addOrRemoveCssClass("ag-column-select-column-readonly",!n&&!e),this.cbSelect.setPassive(!1),this.processingColumnStateChange=!1}getDisplayName(){return this.displayName}onSelectAllChanged(t){t!==this.cbSelect.getValue()&&(this.cbSelect.isReadOnly()||this.cbSelect.toggle())}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}isExpandable(){return!1}setExpanded(t){x._warnOnce("can not expand a column item that does not represent a column group header")}},k_=class{constructor(t){this.items=t}getRowCount(){return this.items.length}getRow(t){return this.items[t]}},S_="ag-column-select-list",E_=class extends x.Component{constructor(){super(`<div class="${S_}" role="presentation"></div>`),this.destroyColumnItemFuncs=[],this.hasLoadedInitialState=!1,this.isInitialState=!1}wireBeans(t){this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.colDefService=t.toolPanelColDefService,this.modelItemUtils=t.modelItemUtils}destroy(){this.destroyColumnTree(),super.destroy()}destroyColumnTree(){this.allColsTree=[],this.destroyColumnItemFuncs.forEach(t=>t()),this.destroyColumnItemFuncs=[]}init(t,e,n){this.params=t,this.allowDragging=e,this.eventType=n,this.params.suppressSyncLayoutWithGrid||this.addManagedEventListeners({columnMoved:this.onColumnsChanged.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.onColumnsChanged.bind(this)});const o=this.fireSelectionChangedEvent.bind(this);this.addManagedEventListeners({columnPivotChanged:o,columnPivotModeChanged:o,columnRowGroupChanged:o,columnValueChanged:o,columnVisible:o,newColumnsLoaded:o}),this.expandGroupsByDefault=!this.params.contractColumnSelection,this.virtualList=this.createManagedBean(new Ie.VirtualList({cssIdentifier:"column-select",ariaRole:"tree"})),this.appendChild(this.virtualList.getGui()),this.virtualList.setComponentCreator((s,l)=>(x._setAriaLevel(l,s.getDept()+1),this.createComponentFromItem(s,l))),this.columnModel.isReady()&&this.onColumnsChanged(),!this.params.suppressColumnMove&&this.createManagedBean(new b_(this,this.virtualList))}createComponentFromItem(t,e){if(t.isGroup()){const o=new tu(t,this.allowDragging,this.eventType,e);return this.createBean(o),o}const n=new x_(t,this.allowDragging,this.groupsExist,e);return this.createBean(n),n}onColumnsChanged(){this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!this.params.initialState);const t=this.getExpandedStates(),e=this.columnModel.isPivotMode();!this.params.suppressSyncLayoutWithGrid&&!e?this.buildTreeFromWhatGridIsDisplaying():this.buildTreeFromProvidedColumnDefs(),this.setExpandedStates(t),this.markFilteredColumns(),this.flattenAndFilterModel(),this.isInitialState=!1}getDisplayedColsList(){return this.displayedColsList}getExpandedStates(){const t={};if(this.isInitialState){const{expandedGroupIds:e}=this.params.initialState;return e.forEach(n=>{t[n]=!0}),t}return this.allColsTree?(this.forEachItem(e=>{if(!e.isGroup())return;const n=e.getColumnGroup();n&&(t[n.getId()]=e.isExpanded())}),t):{}}setExpandedStates(t){if(!this.allColsTree)return;const{isInitialState:e}=this;this.forEachItem(n=>{if(!n.isGroup())return;const o=n.getColumnGroup();if(o){const s=t[o.getId()];(s!=null||e)&&n.setExpanded(!!s)}})}buildTreeFromWhatGridIsDisplaying(){this.colDefService.syncLayoutWithGrid(this.setColumnLayout.bind(this))}setColumnLayout(t){const e=this.colDefService.createColumnTree(t);this.buildListModel(e),this.groupsExist=t.some(n=>n&&typeof n.children<"u"),this.markFilteredColumns(),this.flattenAndFilterModel()}buildTreeFromProvidedColumnDefs(){this.buildListModel(this.columnModel.getColDefColTree()),this.groupsExist=this.columnModel.isProvidedColGroupsPresent()}buildListModel(t){const e=this.onColumnExpanded.bind(this),n=c=>{c.addEventListener("expandedChanged",e);const u=c.removeEventListener.bind(c,"expandedChanged",e);this.destroyColumnItemFuncs.push(u)},o=(c,u,p)=>{c.forEach(f=>{x.isProvidedColumnGroup(f)?s(f,u,p):l(f,u,p)})},s=(c,u,p)=>{const f=c.getColGroupDef();if(f&&f.suppressColumnsToolPanel)return;if(c.isPadding()){o(c.getChildren(),u,p);return}const y=this.columnNameService.getDisplayNameForProvidedColumnGroup(null,c,"columnToolPanel"),T=new Qd(y,c,u,!0,this.expandGroupsByDefault);p.push(T),n(T),o(c.getChildren(),u+1,T.getChildren())},l=(c,u,p)=>{if(c.getColDef()&&c.getColDef().suppressColumnsToolPanel)return;const m=this.columnNameService.getDisplayNameForColumn(c,"columnToolPanel");p.push(new Qd(m,c,u))};this.destroyColumnTree(),o(t,0,this.allColsTree)}onColumnExpanded(){this.flattenAndFilterModel()}flattenAndFilterModel(){this.displayedColsList=[];const t=n=>{n.isPassesFilter()&&(this.displayedColsList.push(n),n.isGroup()&&n.isExpanded()&&n.getChildren().forEach(t))};this.allColsTree.forEach(t),this.virtualList.setModel(new k_(this.displayedColsList));const e=this.virtualList.getLastFocusedRow();this.virtualList.refresh(),e!=null&&this.focusRowIfAlive(e),this.notifyListeners(),this.refreshAriaLabel()}refreshAriaLabel(){const t=this.localeService.getLocaleTextFunc(),e=t("ariaColumnPanelList","Column List"),n=t("columns","Columns"),o=this.displayedColsList.length;x._setAriaLabel(this.virtualList.getAriaElement(),`${e} ${o} ${n}`)}focusRowIfAlive(t){window.setTimeout(()=>{this.isAlive()&&this.virtualList.focusRow(t)},0)}forEachItem(t){const e=n=>{n.forEach(o=>{t(o),o.isGroup()&&e(o.getChildren())})};this.allColsTree&&e(this.allColsTree)}doSetExpandedAll(t){this.forEachItem(e=>{e.isGroup()&&e.setExpanded(t)})}setGroupsExpanded(t,e){if(!e){this.doSetExpandedAll(t);return}const n=[];this.forEachItem(s=>{if(!s.isGroup())return;const l=s.getColumnGroup().getId();e.indexOf(l)>=0&&(s.setExpanded(t),n.push(l))});const o=e.filter(s=>!x._includes(n,s));o.length>0&&x._warnOnce("unable to find group(s) for supplied groupIds:",o)}getExpandState(){let t=0,e=0;return this.forEachItem(n=>{n.isGroup()&&(n.isExpanded()?t++:e++)}),t>0&&e>0?2:e>0?1:0}doSetSelectedAll(t){this.modelItemUtils.selectAllChildren(this.allColsTree,t,this.eventType)}getSelectionState(){let t=0,e=0;const n=this.columnModel.isPivotMode();if(this.forEachItem(o=>{if(o.isGroup()||!o.isPassesFilter())return;const s=o.getColumn(),l=s.getColDef();let c;if(n){if(!s.isAllowPivot()&&!s.isAllowRowGroup()&&!s.isAllowValue())return;c=s.isValueActive()||s.isPivotActive()||s.isRowGroupActive()}else{if(l.lockVisible)return;c=s.isVisible()}c?t++:e++}),!(t>0&&e>0))return!(t===0||e>0)}setFilterText(t){this.filterText=x._exists(t)?t.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()}markFilteredColumns(){const t=n=>{if(!x._exists(this.filterText))return!0;const o=n.getDisplayName();return o==null||o.toLowerCase().indexOf(this.filterText)!==-1},e=(n,o)=>{let s=!1;if(n.isGroup()){const c=t(n);n.getChildren().forEach(u=>{const p=e(u,c||o);p&&(s=p)})}const l=o||s?!0:t(n);return n.setPassesFilter(l),l};this.allColsTree.forEach(n=>e(n,!1))}notifyListeners(){this.fireGroupExpandedEvent(),this.fireSelectionChangedEvent()}fireGroupExpandedEvent(){const t=this.getExpandState();this.dispatchLocalEvent({type:"groupExpanded",state:t})}fireSelectionChangedEvent(){if(!this.allColsTree)return;const t=this.getSelectionState();this.dispatchLocalEvent({type:"selectionChanged",state:t})}getExpandedGroups(){const t=[];return this.allColsTree&&this.forEachItem(e=>{e.isGroup()&&e.isExpanded()&&t.push(e.getColumnGroup().getId())}),t}},T_={selector:"AG-PRIMARY-COLS-LIST",component:E_},B_=class extends x.Component{constructor(){super(`<div class="ag-column-select">
|
|
38
|
+
</div>`,[T.AgCheckboxSelector]),this.eDragHandle=T._createIconNoSpan("columnDrag",this.gos),this.eDragHandle.classList.add("ag-drag-handle","ag-column-select-column-drag-handle");const t=this.cbSelect.getGui(),e=this.cbSelect.getInputElement();t.insertAdjacentElement("afterend",this.eDragHandle),e.setAttribute("tabindex","-1");const n=T._escapeString(this.displayName);this.eLabel.innerHTML=n;const o=this.columnDept;this.groupsExist&&this.addCssClass("ag-column-select-add-group-indent"),this.addCssClass(`ag-column-select-indent-${o}`),this.getGui().style.setProperty("--ag-indentation-level",String(o)),this.setupDragging();const i=this.onColumnStateChanged.bind(this);this.addManagedEventListeners({columnPivotModeChanged:i}),this.addManagedListeners(this.column,{columnValueChanged:i,columnPivotChanged:i,columnRowGroupChanged:i,visibleChanged:i}),this.addManagedListeners(this.focusWrapper,{keydown:this.handleKeyDown.bind(this),contextmenu:this.onContextMenu.bind(this)}),this.addManagedPropertyListener("functionsReadOnly",this.onColumnStateChanged.bind(this)),this.addManagedListeners(this.cbSelect,{fieldValueChanged:this.onCheckboxChanged.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.onLabelClicked.bind(this)}),this.onColumnStateChanged(),this.refreshAriaLabel(),this.setupTooltip(),T._getToolPanelClassesFromColDef(this.column.getColDef(),this.gos,this.column,null).forEach(c=>this.addOrRemoveCssClass(c,!0))}getColumn(){return this.column}setupTooltip(){const t=this.gos.get("tooltipShowMode")==="whenTruncated";let e;t&&(e=()=>this.eLabel.scrollWidth>this.eLabel.clientWidth);const n=()=>{const o=this.column.getColDef().headerTooltip;this.setTooltip({newTooltipText:o,location:"columnToolPanelColumn",shouldDisplayTooltip:e})};n(),this.addManagedEventListeners({newColumnsLoaded:n})}getTooltipParams(){const t=super.getTooltipParams();return t.location="columnToolPanelColumn",t.colDef=this.column.getColDef(),t}onContextMenu(t){const{column:e,gos:n}=this;if(n.get("functionsReadOnly"))return;const o=this.createBean(new Du(e,t,this.focusWrapper));this.addDestroyFunc(()=>{o.isAlive()&&this.destroyBean(o)})}handleKeyDown(t){t.key===T.KeyCode.SPACE&&(t.preventDefault(),this.isSelectable()&&this.onSelectAllChanged(!this.isSelected()))}onLabelClicked(){if(this.gos.get("functionsReadOnly"))return;const t=!this.cbSelect.getValue();this.onChangeCommon(t)}onCheckboxChanged(t){this.onChangeCommon(t.selected)}onChangeCommon(t){this.cbSelect.isReadOnly()||(this.refreshAriaLabel(),!this.processingColumnStateChange&&this.modelItemUtils.setColumn(this.column,t,"toolPanelUi"))}refreshAriaLabel(){const t=this.localeService.getLocaleTextFunc(),e=t("ariaColumn","Column"),n=this.cbSelect.getValue()?t("ariaVisible","visible"):t("ariaHidden","hidden"),o=t("ariaToggleVisibility","Press SPACE to toggle visibility");T._setAriaLabel(this.focusWrapper,`${this.displayName} ${e}`),this.cbSelect.setInputAriaLabel(`${o} (${n})`),T._setAriaDescribedBy(this.focusWrapper,this.cbSelect.getInputElement().id)}setupDragging(){if(!this.allowDragging){T._setDisplayed(this.eDragHandle,!1);return}let t=!this.gos.get("suppressDragLeaveHidesColumns");const e={type:T.DragSourceType.ToolPanel,eElement:this.eDragHandle,dragItemName:this.displayName,getDefaultIconName:()=>t?"hide":"notAllowed",getDragItem:()=>this.createDragItem(),onDragStarted:()=>{t=!this.gos.get("suppressDragLeaveHidesColumns"),this.eventService.dispatchEvent({type:"columnPanelItemDragStart",column:this.column})},onDragStopped:()=>{this.eventService.dispatchEvent({type:"columnPanelItemDragEnd"})},onGridEnter:n=>{t&&this.modelItemUtils.updateColumns({columns:[this.column],visibleState:n==null?void 0:n.visibleState,pivotState:n==null?void 0:n.pivotState,eventType:"toolPanelUi"})},onGridExit:()=>{t&&this.onChangeCommon(!1)}};this.dragAndDropService.addDragSource(e,!0),this.addDestroyFunc(()=>this.dragAndDropService.removeDragSource(e))}createDragItem(){const t=this.column.getColId(),e={[t]:this.column.isVisible()},n={[t]:this.modelItemUtils.createPivotState(this.column)};return{columns:[this.column],visibleState:e,pivotState:n}}onColumnStateChanged(){this.processingColumnStateChange=!0;const t=this.columnModel.isPivotMode();if(t){const o=this.column.isAnyFunctionActive();this.cbSelect.setValue(o)}else this.cbSelect.setValue(this.column.isVisible());let e=!0,n=!0;if(t){const o=this.gos.get("functionsReadOnly"),i=!this.column.isAnyFunctionAllowed();e=!o&&!i,n=e}else{const{enableRowGroup:o,enableValue:i,lockPosition:l,suppressMovable:c,lockVisible:d}=this.column.getColDef(),p=!!o||!!i,h=!!l||!!c;e=!d,n=p||!h}this.cbSelect.setReadOnly(!e),this.eDragHandle.classList.toggle("ag-column-select-column-readonly",!n),this.addOrRemoveCssClass("ag-column-select-column-readonly",!n&&!e),this.cbSelect.setPassive(!1),this.processingColumnStateChange=!1}getDisplayName(){return this.displayName}onSelectAllChanged(t){t!==this.cbSelect.getValue()&&(this.cbSelect.isReadOnly()||this.cbSelect.toggle())}isSelected(){return this.cbSelect.getValue()}isSelectable(){return!this.cbSelect.isReadOnly()}isExpandable(){return!1}setExpanded(t){T._warnOnce("can not expand a column item that does not represent a column group header")}},B_=class{constructor(t){this.items=t}getRowCount(){return this.items.length}getRow(t){return this.items[t]}},P_="ag-column-select-list",R_=class extends T.Component{constructor(){super(`<div class="${P_}" role="presentation"></div>`),this.destroyColumnItemFuncs=[],this.hasLoadedInitialState=!1,this.isInitialState=!1}wireBeans(t){this.columnModel=t.columnModel,this.columnNameService=t.columnNameService,this.colDefService=t.toolPanelColDefService,this.modelItemUtils=t.modelItemUtils}destroy(){this.destroyColumnTree(),super.destroy()}destroyColumnTree(){this.allColsTree=[],this.destroyColumnItemFuncs.forEach(t=>t()),this.destroyColumnItemFuncs=[]}init(t,e,n){this.params=t,this.allowDragging=e,this.eventType=n,this.params.suppressSyncLayoutWithGrid||this.addManagedEventListeners({columnMoved:this.onColumnsChanged.bind(this)}),this.addManagedEventListeners({newColumnsLoaded:this.onColumnsChanged.bind(this)});const o=this.fireSelectionChangedEvent.bind(this);this.addManagedEventListeners({columnPivotChanged:o,columnPivotModeChanged:o,columnRowGroupChanged:o,columnValueChanged:o,columnVisible:o,newColumnsLoaded:o}),this.expandGroupsByDefault=!this.params.contractColumnSelection,this.virtualList=this.createManagedBean(new Me.VirtualList({cssIdentifier:"column-select",ariaRole:"tree"})),this.appendChild(this.virtualList.getGui()),this.virtualList.setComponentCreator((i,l)=>(T._setAriaLevel(l,i.getDept()+1),this.createComponentFromItem(i,l))),this.columnModel.isReady()&&this.onColumnsChanged(),!this.params.suppressColumnMove&&this.createManagedBean(new A_(this,this.virtualList))}createComponentFromItem(t,e){if(t.isGroup()){const o=new Iu(t,this.allowDragging,this.eventType,e);return this.createBean(o),o}const n=new V_(t,this.allowDragging,this.groupsExist,e);return this.createBean(n),n}onColumnsChanged(){this.hasLoadedInitialState||(this.hasLoadedInitialState=!0,this.isInitialState=!!this.params.initialState);const t=this.getExpandedStates(),e=this.columnModel.isPivotMode();!this.params.suppressSyncLayoutWithGrid&&!e?this.buildTreeFromWhatGridIsDisplaying():this.buildTreeFromProvidedColumnDefs(),this.setExpandedStates(t),this.markFilteredColumns(),this.flattenAndFilterModel(),this.isInitialState=!1}getDisplayedColsList(){return this.displayedColsList}getExpandedStates(){const t={};if(this.isInitialState){const{expandedGroupIds:e}=this.params.initialState;return e.forEach(n=>{t[n]=!0}),t}return this.allColsTree?(this.forEachItem(e=>{if(!e.isGroup())return;const n=e.getColumnGroup();n&&(t[n.getId()]=e.isExpanded())}),t):{}}setExpandedStates(t){if(!this.allColsTree)return;const{isInitialState:e}=this;this.forEachItem(n=>{if(!n.isGroup())return;const o=n.getColumnGroup();if(o){const i=t[o.getId()];(i!=null||e)&&n.setExpanded(!!i)}})}buildTreeFromWhatGridIsDisplaying(){this.colDefService.syncLayoutWithGrid(this.setColumnLayout.bind(this))}setColumnLayout(t){const e=this.colDefService.createColumnTree(t);this.buildListModel(e),this.groupsExist=t.some(n=>n&&typeof n.children<"u"),this.markFilteredColumns(),this.flattenAndFilterModel()}buildTreeFromProvidedColumnDefs(){this.buildListModel(this.columnModel.getColDefColTree()),this.groupsExist=this.columnModel.isProvidedColGroupsPresent()}buildListModel(t){const e=this.onColumnExpanded.bind(this),n=c=>{c.addEventListener("expandedChanged",e);const d=c.removeEventListener.bind(c,"expandedChanged",e);this.destroyColumnItemFuncs.push(d)},o=(c,d,p)=>{c.forEach(h=>{T.isProvidedColumnGroup(h)?i(h,d,p):l(h,d,p)})},i=(c,d,p)=>{const h=c.getColGroupDef();if(h&&h.suppressColumnsToolPanel)return;if(c.isPadding()){o(c.getChildren(),d,p);return}const y=this.columnNameService.getDisplayNameForProvidedColumnGroup(null,c,"columnToolPanel"),x=new Ru(y,c,d,!0,this.expandGroupsByDefault);p.push(x),n(x),o(c.getChildren(),d+1,x.getChildren())},l=(c,d,p)=>{if(c.getColDef()&&c.getColDef().suppressColumnsToolPanel)return;const m=this.columnNameService.getDisplayNameForColumn(c,"columnToolPanel");p.push(new Ru(m,c,d))};this.destroyColumnTree(),o(t,0,this.allColsTree)}onColumnExpanded(){this.flattenAndFilterModel()}flattenAndFilterModel(){this.displayedColsList=[];const t=n=>{n.isPassesFilter()&&(this.displayedColsList.push(n),n.isGroup()&&n.isExpanded()&&n.getChildren().forEach(t))};this.allColsTree.forEach(t),this.virtualList.setModel(new B_(this.displayedColsList));const e=this.virtualList.getLastFocusedRow();this.virtualList.refresh(),e!=null&&this.focusRowIfAlive(e),this.notifyListeners(),this.refreshAriaLabel()}refreshAriaLabel(){const t=this.localeService.getLocaleTextFunc(),e=t("ariaColumnPanelList","Column List"),n=t("columns","Columns"),o=this.displayedColsList.length;T._setAriaLabel(this.virtualList.getAriaElement(),`${e} ${o} ${n}`)}focusRowIfAlive(t){window.setTimeout(()=>{this.isAlive()&&this.virtualList.focusRow(t)},0)}forEachItem(t){const e=n=>{n.forEach(o=>{t(o),o.isGroup()&&e(o.getChildren())})};this.allColsTree&&e(this.allColsTree)}doSetExpandedAll(t){this.forEachItem(e=>{e.isGroup()&&e.setExpanded(t)})}setGroupsExpanded(t,e){if(!e){this.doSetExpandedAll(t);return}const n=[];this.forEachItem(i=>{if(!i.isGroup())return;const l=i.getColumnGroup().getId();e.indexOf(l)>=0&&(i.setExpanded(t),n.push(l))});const o=e.filter(i=>!T._includes(n,i));o.length>0&&T._warnOnce("unable to find group(s) for supplied groupIds:",o)}getExpandState(){let t=0,e=0;return this.forEachItem(n=>{n.isGroup()&&(n.isExpanded()?t++:e++)}),t>0&&e>0?2:e>0?1:0}doSetSelectedAll(t){this.modelItemUtils.selectAllChildren(this.allColsTree,t,this.eventType)}getSelectionState(){let t=0,e=0;const n=this.columnModel.isPivotMode();if(this.forEachItem(o=>{if(o.isGroup()||!o.isPassesFilter())return;const i=o.getColumn(),l=i.getColDef();let c;if(n){if(!i.isAllowPivot()&&!i.isAllowRowGroup()&&!i.isAllowValue())return;c=i.isValueActive()||i.isPivotActive()||i.isRowGroupActive()}else{if(l.lockVisible)return;c=i.isVisible()}c?t++:e++}),!(t>0&&e>0))return!(t===0||e>0)}setFilterText(t){this.filterText=T._exists(t)?t.toLowerCase():null,this.markFilteredColumns(),this.flattenAndFilterModel()}markFilteredColumns(){const t=n=>{if(!T._exists(this.filterText))return!0;const o=n.getDisplayName();return o==null||o.toLowerCase().indexOf(this.filterText)!==-1},e=(n,o)=>{let i=!1;if(n.isGroup()){const c=t(n);n.getChildren().forEach(d=>{const p=e(d,c||o);p&&(i=p)})}const l=o||i?!0:t(n);return n.setPassesFilter(l),l};this.allColsTree.forEach(n=>e(n,!1))}notifyListeners(){this.fireGroupExpandedEvent(),this.fireSelectionChangedEvent()}fireGroupExpandedEvent(){const t=this.getExpandState();this.dispatchLocalEvent({type:"groupExpanded",state:t})}fireSelectionChangedEvent(){if(!this.allColsTree)return;const t=this.getSelectionState();this.dispatchLocalEvent({type:"selectionChanged",state:t})}getExpandedGroups(){const t=[];return this.allColsTree&&this.forEachItem(e=>{e.isGroup()&&e.isExpanded()&&t.push(e.getColumnGroup().getId())}),t}},D_={selector:"AG-PRIMARY-COLS-LIST",component:R_},I_=class extends T.Component{constructor(){super(`<div class="ag-column-select">
|
|
39
39
|
<ag-primary-cols-header data-ref="primaryColsHeaderPanel"></ag-primary-cols-header>
|
|
40
40
|
<ag-primary-cols-list data-ref="primaryColsListPanel"></ag-primary-cols-list>
|
|
41
|
-
</div>`,[
|
|
41
|
+
</div>`,[N_,D_]),this.primaryColsHeaderPanel=T.RefPlaceholder,this.primaryColsListPanel=T.RefPlaceholder}init(t,e,n){this.allowDragging=t,this.params=e,this.eventType=n,this.primaryColsHeaderPanel.init(this.params);const o=this.params.suppressColumnFilter,i=this.params.suppressColumnSelectAll;this.params.suppressColumnExpandAll&&o&&i&&this.primaryColsHeaderPanel.setDisplayed(!1),this.addManagedListeners(this.primaryColsListPanel,{groupExpanded:this.onGroupExpanded.bind(this),selectionChanged:this.onSelectionChange.bind(this)}),this.primaryColsListPanel.init(this.params,this.allowDragging,this.eventType),this.addManagedListeners(this.primaryColsHeaderPanel,{expandAll:this.onExpandAll.bind(this),collapseAll:this.onCollapseAll.bind(this),selectAll:this.onSelectAll.bind(this),unselectAll:this.onUnselectAll.bind(this),filterChanged:this.onFilterChanged.bind(this)}),this.positionableFeature=new T.PositionableFeature(this.getGui(),{minHeight:100}),this.createManagedBean(this.positionableFeature)}toggleResizable(t){this.positionableFeature.setResizable(t?{bottom:!0}:!1)}onExpandAll(){this.primaryColsListPanel.doSetExpandedAll(!0)}onCollapseAll(){this.primaryColsListPanel.doSetExpandedAll(!1)}expandGroups(t){this.primaryColsListPanel.setGroupsExpanded(!0,t)}collapseGroups(t){this.primaryColsListPanel.setGroupsExpanded(!1,t)}setColumnLayout(t){this.primaryColsListPanel.setColumnLayout(t)}onFilterChanged(t){this.primaryColsListPanel.setFilterText(t.filterText)}syncLayoutWithGrid(){this.primaryColsListPanel.onColumnsChanged()}onSelectAll(){this.primaryColsListPanel.doSetSelectedAll(!0)}onUnselectAll(){this.primaryColsListPanel.doSetSelectedAll(!1)}onGroupExpanded(t){this.primaryColsHeaderPanel.setExpandState(t.state),this.params.onStateUpdated()}onSelectionChange(t){this.primaryColsHeaderPanel.setSelectionState(t.state)}getExpandedGroups(){return this.primaryColsListPanel.getExpandedGroups()}},Fu=class extends T.Component{constructor(){super(...arguments),this.cbPivotMode=T.RefPlaceholder}wireBeans(t){this.columnModel=t.columnModel,this.ctrlsService=t.ctrlsService}createTemplate(){return`<div class="ag-pivot-mode-panel">
|
|
42
42
|
<ag-toggle-button data-ref="cbPivotMode" class="ag-pivot-mode-select"></ag-toggle-button>
|
|
43
|
-
</div>`}postConstruct(){this.setTemplate(this.createTemplate(),[
|
|
43
|
+
</div>`}postConstruct(){this.setTemplate(this.createTemplate(),[T.AgToggleButtonSelector]),this.cbPivotMode.setValue(this.columnModel.isPivotMode());const t=this.localeService.getLocaleTextFunc();this.cbPivotMode.setLabel(t("pivotMode","Pivot Mode")),this.addManagedListeners(this.cbPivotMode,{fieldValueChanged:this.onBtPivotMode.bind(this)});const e=this.onPivotModeChanged.bind(this);this.addManagedEventListeners({newColumnsLoaded:e,columnPivotModeChanged:e})}onBtPivotMode(){const t=!!this.cbPivotMode.getValue();t!==this.columnModel.isPivotMode()&&(this.gos.updateGridOptions({options:{pivotMode:t},source:"toolPanelUi"}),this.ctrlsService.getHeaderRowContainerCtrls().forEach(e=>e.refresh()))}onPivotModeChanged(){const t=this.columnModel.isPivotMode();this.cbPivotMode.setValue(t)}},F_=class extends T.Component{constructor(){super('<div class="ag-column-panel"></div>'),this.initialised=!1,this.childDestroyFuncs=[]}setVisible(t){super.setDisplayed(t),t&&!this.initialised&&this.init(this.params)}init(t){const e=this.gos.addGridCommonParams({suppressColumnMove:!1,suppressColumnSelectAll:!1,suppressColumnFilter:!1,suppressColumnExpandAll:!1,contractColumnSelection:!1,suppressPivotMode:!1,suppressRowGroups:!1,suppressValues:!1,suppressPivots:!1,suppressSyncLayoutWithGrid:!1});if(this.params={...e,...t},this.isRowGroupingModuleLoaded()&&!this.params.suppressPivotMode&&(this.pivotModePanel=this.createBean(new Fu),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel)),this.appendChild(this.pivotModePanel)),this.primaryColsPanel=this.createBean(new I_),this.childDestroyFuncs.push(()=>this.destroyBean(this.primaryColsPanel)),this.primaryColsPanel.init(!0,this.params,"toolPanelUi"),this.primaryColsPanel.addCssClass("ag-column-panel-column-select"),this.appendChild(this.primaryColsPanel),this.isRowGroupingModuleLoaded()){this.params.suppressRowGroups||(this.rowGroupDropZonePanel=this.createBean(new gl(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.rowGroupDropZonePanel)),this.appendChild(this.rowGroupDropZonePanel)),this.params.suppressValues||(this.valuesDropZonePanel=this.createBean(new Bu(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.valuesDropZonePanel)),this.appendChild(this.valuesDropZonePanel)),this.params.suppressPivots||(this.pivotDropZonePanel=this.createBean(new ml(!1)),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotDropZonePanel)),this.appendChild(this.pivotDropZonePanel)),this.setLastVisible();const[n]=this.addManagedEventListeners({columnPivotModeChanged:()=>{this.resetChildrenHeight(),this.setLastVisible()}});this.childDestroyFuncs.push(()=>n())}this.initialised=!0}setPivotModeSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.pivotModePanel?this.pivotModePanel.setDisplayed(t):t&&(this.pivotModePanel=this.createBean(new Fu),this.getGui().insertBefore(this.pivotModePanel.getGui(),this.getGui().firstChild),this.childDestroyFuncs.push(()=>this.destroyBean(this.pivotModePanel))),this.setLastVisible())}setRowGroupsSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.rowGroupDropZonePanel?this.rowGroupDropZonePanel.setDisplayed(t):t&&(this.rowGroupDropZonePanel=this.createManagedBean(new gl(!1)),this.appendChild(this.rowGroupDropZonePanel)),this.setLastVisible())}setValuesSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.valuesDropZonePanel?this.valuesDropZonePanel.setDisplayed(t):t&&(this.valuesDropZonePanel=this.createManagedBean(new Bu(!1)),this.appendChild(this.valuesDropZonePanel)),this.setLastVisible())}setPivotSectionVisible(t){this.isRowGroupingModuleLoaded()&&(this.pivotDropZonePanel?this.pivotDropZonePanel.setDisplayed(t):t&&(this.pivotDropZonePanel=this.createManagedBean(new ml(!1)),this.appendChild(this.pivotDropZonePanel),this.pivotDropZonePanel.setDisplayed(t)),this.setLastVisible())}setResizers(){[this.primaryColsPanel,this.rowGroupDropZonePanel,this.valuesDropZonePanel,this.pivotDropZonePanel].forEach(t=>{if(!t)return;const e=t.getGui();t.toggleResizable(!e.classList.contains("ag-last-column-drop")&&!e.classList.contains("ag-hidden"))})}setLastVisible(){const t=this.getGui();Array.prototype.slice.call(t.querySelectorAll(".ag-column-drop")).forEach(i=>i.classList.remove("ag-last-column-drop"));const n=t.querySelectorAll(".ag-column-drop:not(.ag-hidden)"),o=T._last(n);o&&o.classList.add("ag-last-column-drop"),this.setResizers()}resetChildrenHeight(){const e=this.getGui().children;for(let n=0;n<e.length;n++){const o=e[n];o.style.removeProperty("height"),o.style.removeProperty("flex")}}isRowGroupingModuleLoaded(){return this.gos.assertModuleRegistered(T.ModuleNames.RowGroupingModule,"Row Grouping")}expandColumnGroups(t){this.primaryColsPanel.expandGroups(t)}collapseColumnGroups(t){this.primaryColsPanel.collapseGroups(t)}setColumnLayout(t){this.primaryColsPanel.setColumnLayout(t)}syncLayoutWithGrid(){this.primaryColsPanel.syncLayoutWithGrid()}destroyChildren(){this.childDestroyFuncs.forEach(t=>t()),this.childDestroyFuncs.length=0,T._clearElement(this.getGui())}refresh(t){return this.destroyChildren(),this.init(t),!0}getState(){return{expandedGroupIds:this.primaryColsPanel.getExpandedGroups()}}destroy(){this.destroyChildren(),super.destroy()}},O_=class extends T.BeanStub{constructor(){super(...arguments),this.beanName="modelItemUtils"}wireBeans(t){this.aggFuncService=t.aggFuncService,this.columnModel=t.columnModel,this.columnApplyStateService=t.columnApplyStateService}selectAllChildren(t,e,n){const o=this.extractAllLeafColumns(t);this.setAllColumns(o,e,n)}setColumn(t,e,n){this.setAllColumns([t],e,n)}setAllColumns(t,e,n){this.columnModel.isPivotMode()?this.setAllPivot(t,e,n):this.setAllVisible(t,e,n)}extractAllLeafColumns(t){const e=[],n=o=>{o.forEach(i=>{i.isPassesFilter()&&(i.isGroup()?n(i.getChildren()):e.push(i.getColumn()))})};return n(t),e}setAllVisible(t,e,n){const o=[];t.forEach(i=>{i.getColDef().lockVisible||i.isVisible()!=e&&o.push({colId:i.getId(),hide:!e})}),o.length>0&&this.columnApplyStateService.applyColumnState({state:o},n)}setAllPivot(t,e,n){this.setAllPivotActive(t,e,n)}setAllPivotActive(t,e,n){const o=[],c=e?d=>{var p;if(!d.isAnyFunctionActive())if(d.isAllowValue()){const h=typeof d.getAggFunc()=="string"?d.getAggFunc():(p=this.aggFuncService)==null?void 0:p.getDefaultAggFunc(d);o.push({colId:d.getId(),aggFunc:h})}else d.isAllowRowGroup()?o.push({colId:d.getId(),rowGroup:!0}):d.isAllowPivot()&&o.push({colId:d.getId(),pivot:!0})}:d=>{(d.isPivotActive()||d.isRowGroupActive()||d.isValueActive())&&o.push({colId:d.getId(),pivot:!1,rowGroup:!1,aggFunc:null})};t.forEach(c),o.length>0&&this.columnApplyStateService.applyColumnState({state:o},n)}updateColumns(t){const{columns:e,visibleState:n,pivotState:o,eventType:i}=t,l=e.map(c=>{const d=c.getColId();if(this.columnModel.isPivotMode()){const p=o==null?void 0:o[d];return{colId:d,pivot:p==null?void 0:p.pivot,rowGroup:p==null?void 0:p.rowGroup,aggFunc:p==null?void 0:p.aggFunc}}else return{colId:d,hide:!(n!=null&&n[d])}});this.columnApplyStateService.applyColumnState({state:l},i)}createPivotState(t){return{pivot:t.isPivotActive(),rowGroup:t.isRowGroupActive(),aggFunc:t.isValueActive()?t.getAggFunc():void 0}}},L_="32.3.3",Ou=T._defineModule({version:L_,moduleName:T.ModuleNames.ColumnsToolPanelModule,beans:[O_],userComponents:[{name:"agColumnsToolPanel",classImp:F_},{name:"agMenuItem",classImp:Me.AgMenuItemRenderer}],dependantModules:[Me.EnterpriseCoreModule,E_,hl]});const M_=`.ag-header {
|
|
44
44
|
border-bottom: 1px solid var(--border-color-default);
|
|
45
|
-
}`;function ou(){x.ModuleRegistry.registerModules([is.ClientSideRowModelModule,mm.InfiniteRowModelModule,pd.ServerSideRowModelModule,gm.CsvExportModule,hd.ClipboardModule,fd.RangeSelectionModule,ym.RichSelectModule,_m.MenuModule,vm.ExcelExportModule,Ja,ru]);const t=Ug("AGGRID_LICENSE");t?(Ie.LicenseManager.setLicenseKey(t),console.log("AG Grid Activated")):console.log("AG Grid License not found")}const D_=md.createPart("headerBottomBorder").withCSS(P_),iu=md.themeQuartz.withParams({headerColumnResizeHandleColor:"transparent",accentColor:"#49cc49",borderColor:"#E1E3EB",cellHorizontalPaddingScale:1,checkboxBorderRadius:"3px",checkboxCheckedBackgroundColor:"#110529",checkboxCheckedBorderColor:"#110529",checkboxIndeterminateBackgroundColor:"#110529",checkboxIndeterminateBorderColor:"#110529",checkboxUncheckedBorderColor:"#CFD1DB",columnBorder:!0,columnHoverColor:"#9BABCC16",fontFamily:"inherit",foregroundColor:"#110529",headerBackgroundColor:"#F7F8FA",headerColumnBorder:!0,headerFontWeight:600,headerRowBorder:!0,headerVerticalPaddingScale:.8,iconButtonHoverColor:"#9BABCC32",iconSize:"16px",menuBackgroundColor:"#FFFFFF",menuBorder:!0,menuTextColor:"#110529",rowHoverColor:"#9BABCC16",rowVerticalPaddingScale:1,selectedRowBackgroundColor:"#63E02424",sidePanelBorder:!1,spacing:"8px",tooltipBackgroundColor:"#110529",tooltipTextColor:"#FFFFFF",wrapperBorderRadius:"6px"}).withPart(D_),su=Symbol("sdk-vue");function rl(){return r.inject(su)}function F_(t,e,n={}){let o;ou();const s=()=>{t.loadBlockState().then(c=>{l.loaded=!0;const u=Fm(c,t,n),p=e(u),f=Object.fromEntries(Object.entries(p.routes).map(([m,y])=>{const T=typeof y=="function"?y():y;return[m,r.markRaw(T)]}));o=Object.assign(u,{...p,getRoute(m){return f[m]}})}).catch(c=>{console.error("load initial state error",c),l.error=c})},l=r.reactive({loaded:!1,error:void 0,useApp(){return wm(o,"App is not loaded")},install(c){c.provide(su,this),s()}});return l}var R_=Object.defineProperty,M_=(t,e,n)=>e in t?R_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,I_=(t,e,n)=>M_(t,e+"",n);function gs(t,e){if(t==null)throw Error("Empty (null | undefined) value");return t}function O_(t,e,n){const o=Math.min(e,n),s=Math.max(e,n);return t>=o&&t<=s}function L_(t){return new Promise(e=>setTimeout(e,t))}function G_(t){return t()}function ys(t,e,n){return e>t?e:t>n?n:t}function au(t,e){return e(t)}function $r(t,e){if(t!=null)return e(t)}function z_(t){if(t&&t.ok)return t.value}async function $_(t){return Object.fromEntries(await Promise.all(Object.entries(t).map(async([e,n])=>[e,await n])))}const lu=t=>t;function U_(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function Z_(t,e=[]){for(t=t?String(t):"";e.includes(t.charAt(0));)t=t.substring(1);return t}function W_(t){let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(U_(65,91));return e}function cu(){return W_(42)}const ol=Array.isArray;function pi(t){return t!==null&&typeof t=="object"}function il(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null}function H_(t,e){return Object.keys(t).map(n=>e(t[n],n))}function hi(t,e){return pi(t)&&pi(e)?Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>hi(t[n],e[n])):t===e}function fi(t){if(Array.isArray(t)){const e=[];for(let n=0;n<t.length;n++)e[n]=fi(t[n]);return e}else if(pi(t)){const e={};return Object.keys(t).forEach(n=>{e[n]=fi(t[n])}),e}else return t}function j_(t){return Array.isArray(t)?Object.assign([],t):pi(t)?Object.assign({},t):t}function q_(t,e){const n={};for(const o in e)e[o]!==t[o]&&(n[o]=t[o]);return n}function K_(t){return Object.entries(t).forEach(([e,n])=>{n instanceof Function&&(t[e]=n.bind(t))}),t}function Y_(t,e,n){return t[e]=n,t}function J_(t,e){return t[e]}function X_(t,e){t={...t};const n=t[e];return delete t[e],[n,t]}function Q_(t,...e){return Object.assign({},...e.map(n=>({[n]:t[n]})))}function ev(t,...e){return e.map(n=>t[n])}function tv(t,...e){const n=Object.assign({},t);return e.forEach(o=>delete n[o]),n}function du(t,e){return new Set([...Object.keys(t),...Object.keys(e)]).forEach(n=>{const o=t[n],s=e[n];il(o)&&il(s)||ol(o)&&ol(s)&&o.length===s.length?du(o,s):t[n]=s}),t}const sl=Object.freeze(Object.defineProperty({__proto__:null,bindMethods:K_,deepClone:fi,deepEqual:hi,deepPatch:du,getProp:J_,isArray:ol,isObject:pi,isPlainObject:il,map:H_,omit:tv,pick:Q_,pickValues:ev,setProp:Y_,shallowClone:j_,shallowDiff:q_,shiftProp:X_},Symbol.toStringTag,{value:"Module"}));function nv(t,e){const n=t.findIndex(e);if(n<0)return[];const o=(()=>{for(let s=n;s<t.length;s++)if(!e(t[s],s))return s;return t.length})();return t.slice(n,o)}function rv(t,e,n){let o;return function(...s){o&&clearTimeout(o),o=setTimeout(()=>{o=void 0,t.apply(this,s)},e)}}const ov=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],iv=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],sv=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],av=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],uu=(t,e)=>{let n=String(t);return typeof e=="string"||Array.isArray(e)?n=t.toLocaleString(e):e===!0&&(n=t.toLocaleString(void 0)),n};function al(t,e){if(t=typeof t=="bigint"?Number(t):t,!Number.isFinite(t))throw new TypeError(`Expected a finite number, got ${typeof t}: ${t}`);Object.assign(e,{bits:!1,binary:!1});const n=e.bits?e.binary?av:sv:e.binary?iv:ov;if(e.signed&&t===0)return` 0 ${n[0]}`;const o=t<0,s=o?"-":e.signed?"+":"";if(o&&(t=-t),t<1){const p=uu(t,e.locale);return s+p+" "+n[0]}const l=Math.min(Math.floor(e.binary?Math.log(t)/Math.log(1024):Math.log10(t)/3),n.length-1);t/=(e.binary?1024:1e3)**l,t=Number(t.toPrecision(3));const c=uu(Number(t),e.locale),u=n[l];return s+c+" "+u}const lv={class:"context-menu"},cv=["onClick"],dv=r.defineComponent({__name:"Menu",props:{options:{}},emits:["close"],setup(t,{emit:e}){const n=e,o=s=>{s.cb(),n("close")};return(s,l)=>(r.openBlock(),r.createElementBlock("div",lv,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.options,(c,u)=>(r.openBlock(),r.createElementBlock("div",{key:u,onClick:r.withModifiers(p=>o(c),["stop"])},[r.createElementVNode("span",null,r.toDisplayString(c.text),1)],8,cv))),128))]))}}),Lt=(t,e)=>{const n=t.__vccOpts||t;for(const[o,s]of e)n[o]=s;return n},uv=Lt(dv,[["__scopeId","data-v-12530966"]]);function ll(t,e){t.preventDefault();const n=()=>{r.render(null,document.body)},o=r.h(uv,{options:e,onClose:()=>{n()}});r.render(o,document.body);const s=o.el;return s.style.top=t.clientY+"px",s.style.left=t.clientX+"px",document.addEventListener("click",l=>{s.contains(l.target)||n()}),n}const pu=Symbol(),_s=()=>r.inject(pu),pv=["value"],hv={key:1},fv=r.defineComponent({__name:"BaseCellComponent",props:{modelValue:{},valueType:{},editable:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,s=r.reactive({edit:!1}),l=r.computed(()=>o.valueType),c=f=>{var m;let y=(m=f.target)==null?void 0:m.value;const T=r.unref(l),B=G_(()=>T==="integer"?parseInt(y,10):T==="float"?Number(y):y);n("update:modelValue",B),s.edit=!1},u=r.ref(),p=f=>{!f.metaKey&&o.editable&&(s.edit=!0,requestAnimationFrame(()=>{var m,y;(y=(m=u.value)==null?void 0:m.querySelector("input"))==null||y.focus()}))};return(f,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"baseRef",ref:u,class:r.normalizeClass(["base-cell",{"base-cell__edit":s.edit}]),onClick:p},[s.edit?(r.openBlock(),r.createElementBlock("input",{key:0,value:f.modelValue,onFocusout:m[0]||(m[0]=y=>s.edit=!1),onChange:c},null,40,pv)):(r.openBlock(),r.createElementBlock("div",hv,r.toDisplayString(f.modelValue),1))],2))}}),mv=["^data-row-index"],gv={key:0,class:"control-cell"},yv=r.defineComponent({__name:"TdCell",props:{cell:{}},setup(t){const e=t,n=_s(),o=r.computed(()=>e.cell.column.valueType),s=f=>{$r(n.settings.value.onUpdatedRow,m=>{const y=e.cell.row,T={...y.dataRow,[e.cell.id]:f};m({...y,dataRow:T})})},l=f=>{f.metaKey&&n.selectRow(e.cell.row.primaryKey)},c=(f,m)=>{if(f.type==="contextmenu")f.preventDefault();else return;const y=n.settings??{},T=[],{onSelectedRows:B,onSelectedColumns:A}=y.value,I=n.data.selectedRows.has(m.primaryKey);B&&B.length&&(I?T.push({text:"Deselect row",cb(){n.data.selectedRows.delete(e.cell.row.primaryKey)}}):T.push({text:"Select row",cb(){n.selectRow(e.cell.row.primaryKey)}})),A&&A.length&&(T.push({text:"Select column",cb(){n.selectColumn(e.cell.column.id)}}),T.push({text:"Unselect column",cb(){n.unselectColumn(e.cell.column.id)}})),T.length&&ll(f,T)},u=r.ref(),p=r.computed(()=>e.cell.column.component?e.cell.column.component():void 0);return(f,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"cellRef",ref:u,class:r.normalizeClass(["td-cell",{[f.cell.class]:!0}]),"^data-row-index":f.cell.row.index,onClick:l,onContextmenu:m[0]||(m[0]=y=>c(y,f.cell.row))},[f.cell.control?(r.openBlock(),r.createElementBlock("div",gv,r.toDisplayString(f.cell.row.index),1)):p.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(p.value),{key:1,"model-value":f.cell.value,"onUpdate:modelValue":s},null,8,["model-value"])):(r.openBlock(),r.createBlock(fv,{key:2,"model-value":f.cell.value,"value-type":o.value,editable:f.cell.column.editable,"onUpdate:modelValue":s},null,8,["model-value","value-type","editable"]))],42,mv))}}),_v={},vv={width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Cv(t,e){return r.openBlock(),r.createElementBlock("svg",vv,e[0]||(e[0]=[r.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M24 41.5H9C7.61929 41.5 6.5 40.3807 6.5 39V24H9.5V38.5H24V41.5Z",fill:"#CFD1DB"},null,-1),r.createTextVNode(),r.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M41.5 9C41.5 7.61929 40.3807 6.5 39 6.5H9C7.61929 6.5 6.5 7.61929 6.5 9V19.5H9.5H28.5V38.5V41.5H39C40.3807 41.5 41.5 40.3807 41.5 39V9ZM38.5 9.5V16.5H31.5V9.5H38.5ZM38.5 38.5V19.5H31.5V38.5H38.5ZM9.5 9.5V16.5H28.5V9.5H9.5Z",fill:"#CFD1DB"},null,-1)]))}const wv=Lt(_v,[["render",Cv]]),bv={class:"tr-head"},xv=r.defineComponent({__name:"TrHead",setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",bv,[r.renderSlot(e.$slots,"default")]))}});function kv(t,e){const n=e.indexOf(t)+1;return e[n>=e.length?0:n]}function Sv(t,e){const n=t.findIndex(e);if(n<0)return[];const o=(()=>{for(let s=n;s<t.length;s++)if(!e(t[s],s))return s;return t.length})();return t.slice(n,o)}const Ev=["^data-col-id"],Tv=r.defineComponent({__name:"ThCell",props:{col:{}},emits:["delete:column","expand:column","change:sort"],setup(t,{emit:e}){const n=e;function o(l){l.preventDefault();const c=[];c.length&&ll(l,c)}function s(l){var c;const u=((c=l.sort)==null?void 0:c.direction)??"DESC";n("change:sort",{colId:l.id,direction:kv(u,["DESC","ASC"])})}return(l,c)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["cell th-cell",{"justify-center":l.col.justify,frozen:l.col.frozen}]),"^data-col-id":l.col.id,onContextmenu:o},[l.col.valueType?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(l.col.valueType)},null,2)):r.createCommentVNode("",!0),r.createTextVNode(" "+r.toDisplayString(l.col.label)+" ",1),l.col.sort?(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(["sort",l.col.sort.direction]),onClick:c[0]||(c[0]=r.withModifiers(()=>s(l.col),["stop"]))},null,2)):r.createCommentVNode("",!0)],42,Ev))}}),Bv=r.defineComponent({__name:"TrBody",props:{row:{}},setup(t){const e=r.ref(),n=()=>{r.nextTick().then(()=>{$r(e.value,o=>o.scrollLeft=0)})};return(o,s)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"trRef",ref:e,class:r.normalizeClass(["tr-body",{selected:o.row.selected}]),scroll:"no",style:r.normalizeStyle(o.row.style),onScroll:n},[r.renderSlot(o.$slots,"default")],38))}}),Vv=r.defineComponent({__name:"ColumnCaret",props:{column:{}},setup(t){const e=_s(),n=t,o=r.computed(()=>e.data.selectedColumns.has(n.column.id));return(s,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["column-caret",{selected:o.value,frozen:s.column.frozen}])},null,2))}});function rt(t,e,n,o){r.onMounted(()=>{var s;return(s=r.unref(t))==null?void 0:s.addEventListener(e,n,o)}),r.onUnmounted(()=>{var s;return(s=r.unref(t))==null?void 0:s.removeEventListener(e,n,o)})}function Nv(t){r.onMounted(()=>window.addEventListener("mouseup",t)),r.onUnmounted(()=>window.removeEventListener("mouseup",t))}function Av(t){let e=!1;return function(...n){e?console.log("handle pressure"):(requestAnimationFrame(()=>{t(...n),e=!1}),e=!0)}}function Pv(t,e){let n;function o(l){n={...l}}Nv(()=>{n=void 0,e()});const s=Av(t);return rt(window,"mousemove",l=>{n&&s({x:n.x,width:n.width,diff:l.x-n.x})}),{start:o}}const go=1,Dv=10,Fv=30,hu=60;function fu(){const t=r.reactive({x:0,y:0});function e(n){t.x=n.pageX,t.y=n.pageY}return r.onMounted(()=>window.addEventListener("mousemove",e)),r.onUnmounted(()=>window.removeEventListener("mousemove",e)),t}function mu(t,e={}){const{delayEnter:n=0,delayLeave:o=0}=e,s=r.ref(!1);let l;const c=u=>{const p=u?n:o;l&&(clearTimeout(l),l=void 0),p?l=setTimeout(()=>s.value=u,p):s.value=u};return window&&(rt(t,"mouseenter",()=>c(!0)),rt(t,"mouseleave",()=>c(!1))),s}function Rv(t){var e;const n=$r((e=r.unref(t))==null?void 0:e.querySelectorAll(".th-cell"),o=>[...o])??[];return n.map(o=>{const{width:s,x:l}=o.getBoundingClientRect(),c=o.getAttribute("data-col-id");return lu({colId:c,width:s,x:l,right:l+s})}).slice(0,n.length-1)}function Mv(t,e){const n=fu(),o=mu(e,{}),{data:s}=t,l=Pv(u=>{$r(s.resizeTh,p=>{const f=s.columns.find(m=>m.id===p.colId);f&&(f.width=ys(u.width+u.diff,Fv,1e4),t.adjustWidth())})},()=>{s.resize=!1,s.resizeTh=void 0,document.body.style.cursor=""}),c=u=>{s.resizeTh&&(s.resize=!0,l.start({x:u.x,width:s.resizeTh.width}))};return r.watchEffect(()=>{if(!o.value){document.body.style.cursor="";return}if(s.resize)return;const u=Rv(e).find(p=>Math.abs(n.x-p.right)<Dv);u?(document.body.style.cursor="col-resize",s.resizeTh=u):(s.resizeTh=void 0,document.body.style.cursor="")}),{mouseDown:c}}const Iv={key:0,class:"command-menu"},Ov={key:0},Lv=["onClick"],Gv=r.defineComponent({__name:"RowsCommandMenu",setup(t){const e=_s(),n=r.computed(()=>e.getSelectedRows()),o=r.computed(()=>n.value.length>0),s=r.computed(()=>{var c;return((c=e.settings)==null?void 0:c.value.onSelectedRows)??[]}),l=r.computed(()=>s.value.map(c=>({label:c.label,cb:()=>{c.cb(n.value),e.data.selectedRows.clear(),e.data.rows=[]}})));return(c,u)=>o.value?(r.openBlock(),r.createElementBlock("div",Iv,[n.value.length?(r.openBlock(),r.createElementBlock("span",Ov,r.toDisplayString(n.value.length)+" rows selected",1)):r.createCommentVNode("",!0),u[0]||(u[0]=r.createTextVNode()),u[1]||(u[1]=r.createElementVNode("hr",null,null,-1)),u[2]||(u[2]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(p,f)=>(r.openBlock(),r.createElementBlock("span",{key:f,class:"command",onClick:r.withModifiers(p.cb,["stop"])},r.toDisplayString(p.label),9,Lv))),128))])):r.createCommentVNode("",!0)}}),zv={key:0,class:"command-menu"},$v={key:0},Uv=["onClick"],Zv=r.defineComponent({__name:"ColumnsCommandMenu",setup(t){const e=_s(),n=r.computed(()=>e.getSelectedColumns()),o=r.computed(()=>n.value.length>0),s=r.computed(()=>{var c;return((c=e.settings)==null?void 0:c.value.onSelectedColumns)??[]}),l=r.computed(()=>s.value.map(c=>({label:c.label,cb:()=>{c.cb(n.value),e.data.selectedColumns.clear()}})));return(c,u)=>o.value?(r.openBlock(),r.createElementBlock("div",zv,[n.value.length?(r.openBlock(),r.createElementBlock("span",$v,"selected columns "+r.toDisplayString(n.value.length),1)):r.createCommentVNode("",!0),u[0]||(u[0]=r.createTextVNode()),u[1]||(u[1]=r.createElementVNode("hr",null,null,-1)),u[2]||(u[2]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(p,f)=>(r.openBlock(),r.createElementBlock("span",{key:f,class:"command",onClick:r.withModifiers(p.cb,["stop"])},r.toDisplayString(p.label),9,Uv))),128))])):r.createCommentVNode("",!0)}});function ur(t,e){const n={el:void 0,x:0,y:0},o=s=>({x:s.x,y:s.y,dx:s.x-n.x,dy:s.y-n.y});rt(document,"mousedown",s=>{s.target===r.unref(t)&&(s.stopPropagation&&s.stopPropagation(),s.preventDefault&&s.preventDefault(),n.el=r.unref(t),n.x=s.x,n.y=s.y)}),rt(document,"mouseup",s=>{n.el&&(n.el=void 0,e({...o(s),stop:!0},n))}),rt(document,"mousemove",s=>{n.el&&e(o(s),n)})}const Wv=r.defineComponent({__name:"TScroll",props:{offset:{},windowSize:{},dataSize:{}},emits:["change:offset"],setup(t,{emit:e}){const n=e,o=t,s=r.ref(),l=r.computed(()=>o.windowSize-12),c=r.computed(()=>o.windowSize<o.dataSize),u=r.computed(()=>Math.ceil(o.offset*(l.value/o.dataSize))),p=r.computed(()=>Math.ceil(l.value*l.value/o.dataSize)),f=r.computed(()=>({top:`${u.value}px`,height:`${p.value}px`}));return ur(s,(m,y)=>{const T=(u.value+m.dy)*o.dataSize/l.value;n("change:offset",T),y.x=m.x,y.y=m.y}),(m,y)=>(r.openBlock(),r.createElementBlock("div",{class:"t-scroll",style:r.normalizeStyle({height:`${m.windowSize}px`})},[r.createElementVNode("div",null,[c.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"handleRef",ref:s,class:"t-scroll__handle",style:r.normalizeStyle(f.value)},null,4)):r.createCommentVNode("",!0)])],4))}});function Hv(t){return r.computed(()=>{const{data:e,settings:n}=t,{bodyWidth:o,scrollLeft:s}=e,l=[...e.columns],c=cu();n.value.controlColumn&&l.unshift({id:c,label:"#",width:60,frozen:!0});let u=0;const p=l.map(m=>{const y={...m,offset:u};return u+=m.width+go,y}),f=p.filter(m=>m.frozen);return nv(p,m=>m.frozen?!1:s<m.offset+m.width&&m.offset<o+s).concat(f).map(m=>({...m,style:{left:m.frozen?`${m.offset}px`:`${m.offset-e.scrollLeft}px`,width:`${m.width}px`},control:m.id===c}))})}function jv(t,e){const n=r.computed(()=>e.value.reduce((o,s)=>(o[s.id]=s.justify?"justify-"+s.justify:"",o),{}));return r.computed(()=>t.rows.map(o=>{const s=n.value,{primaryKey:l,offset:c,dataRow:u,height:p}=o,f=e.value.map(m=>({id:m.id,column:m,row:o,value:u[m.id],class:s[m.id],editable:m.editable,width:m.width,style:m.style,control:m.control}));return lu({style:{top:`${c-t.scrollTop}px`,height:`${o.height}px`},primaryKey:l,offset:c,height:p,cells:f,selected:t.selectedRows.has(l)})}))}const qv=async(t,e)=>{const{scrollTop:n,bodyHeight:o}=t;return await L_(0),$_({rows:e.getRows(n,o),dataWindow:t})};function Kv(t){const e=r.reactive({rowIndex:-1,columns:[],pendingLoads:0,currentWindow:void 0,rows:[],resize:!1,resizeTh:void 0,dataHeight:0,bodyHeight:t.settings.height,bodyWidth:0,scrollTop:0,scrollLeft:0,selectedRows:new Set,selectedColumns:new Set});r.watch(()=>t.settings,m=>{e.columns=fi(m.columns),e.currentWindow=void 0,m.dataSource.getHeight().then(y=>{e.dataHeight=y,f.updateBodyHeight()}).catch(y=>e.error=y)},{immediate:!0});const n=r.computed(()=>t.settings),o=r.computed(()=>e.columns.reduce((m,y)=>m+y.width+go,0)),s=r.computed(()=>au(f.data.dataHeight-f.data.bodyHeight,m=>m>0?m:0)),l=r.computed(()=>au(o.value-f.data.bodyWidth,m=>m>0?m:0)),c=r.computed(()=>({bodyHeight:e.bodyHeight,scrollTop:e.scrollTop,current:e.currentWindow})),u=Hv({data:e,settings:n}),p=jv(e,u),f={data:e,settings:n,tableColumns:u,tableRows:p,adjustWidth:()=>{const m=e.columns.reduce((T,B)=>T+B.width+go,0),y=e.bodyWidth+e.scrollLeft;if(m<y){const T=e.columns[e.columns.length-1];T.width=T.width+(y-m)}},updateOffsets(m){this.updateScrollTop(e.scrollTop+m.deltaY),this.updateScrollLeft(e.scrollLeft+m.deltaX)},getSelectedRows(){return e.rows.filter(m=>e.selectedRows.has(m.primaryKey))},getSelectedColumns(){return e.columns.filter(m=>e.selectedColumns.has(m.id))},selectRow(m){e.selectedRows.add(m)},unselectRow(m){e.selectedRows.delete(m)},selectColumn(m){e.selectedColumns.add(m)},unselectColumn(m){e.selectedColumns.delete(m)},updateScrollTop(m){e.scrollTop=ys(m,0,s.value)},updateScrollLeft(m){e.scrollLeft=ys(m,0,l.value)},updateBodyHeight(){const{height:m}=t.settings,{dataHeight:y}=e,T=m>y?y:m;e.bodyHeight=T},updateDimensions(m){this.updateBodyHeight(),f.data.bodyWidth=m.width,f.adjustWidth(),e.rows=[],e.currentWindow=void 0}};return r.watch(c,(m,y)=>{const T=m.current;(!T||m.scrollTop<T.scrollTop||m.scrollTop+m.bodyHeight>T.bodyHeight+T.scrollTop)&&(e.currentWindow={scrollTop:m.scrollTop-hu,bodyHeight:m.bodyHeight+hu*2},qv(fi(e.currentWindow),n.value.dataSource).then(({rows:B,dataWindow:A})=>{hi(e.currentWindow,A)&&(e.rows=B)}))},{deep:!0,immediate:!0}),r.provide(pu,f),f}const Yv={class:"command-menu__container"},Jv={key:0,class:"table-body__no-data"},Xv={class:"carets"},cl=r.defineComponent({__name:"TableComponent",props:{settings:{}},emits:["update:data","change:sort"],setup(t,{emit:e}){const n=e,o=t,s=Kv(o),l=r.computed(()=>s.data.rows.length===0),c=r.computed(()=>({height:l.value?"212px":s.data.bodyHeight+"px"}));r.watch(s.data,I=>n("update:data",I),{deep:!0}),r.watch(o,()=>m);const u=r.ref(),p=r.ref(),f=r.ref(),m=()=>{$r(f.value,I=>{s.updateDimensions(I.getBoundingClientRect())})},y=s.tableColumns,T=s.tableRows,{mouseDown:B}=Mv(s,u);r.onMounted(()=>{r.nextTick(m)}),r.watchPostEffect(()=>{r.unref(o.settings),r.nextTick(m)}),rt(window,"resize",()=>r.nextTick(m));const A=I=>{I.preventDefault(),s.updateOffsets(I)};return(I,L)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"tableRef",ref:u,class:"data-table",onMousedown:L[2]||(L[2]=(...C)=>r.unref(B)&&r.unref(B)(...C))},[r.createElementVNode("div",Yv,[r.createVNode(Gv),L[3]||(L[3]=r.createTextVNode()),r.createVNode(Zv)]),L[7]||(L[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"headRef",ref:p,class:"table-head"},[r.createVNode(xv,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(y),(C,R)=>(r.openBlock(),r.createBlock(Tv,{key:R,col:C,style:r.normalizeStyle(C.style),"onChange:sort":L[0]||(L[0]=O=>I.$emit("change:sort",O))},null,8,["col","style"]))),128))]),_:1})],512),L[8]||(L[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"bodyRef",ref:f,class:"table-body",style:r.normalizeStyle(c.value),onWheel:A},[l.value?(r.openBlock(),r.createElementBlock("div",Jv,[r.createElementVNode("div",null,[r.createVNode(wv),L[4]||(L[4]=r.createTextVNode()),L[5]||(L[5]=r.createElementVNode("div",null,"No Data To Show",-1))])])):r.createCommentVNode("",!0),L[6]||(L[6]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(T),(C,R)=>(r.openBlock(),r.createBlock(Bv,{key:R,row:C},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(C.cells,O=>(r.openBlock(),r.createBlock(yv,{key:O.column.id+":"+R,cell:O,style:r.normalizeStyle(O.style)},null,8,["cell","style"]))),128))]),_:2},1032,["row"]))),128))],36),L[9]||(L[9]=r.createTextVNode()),r.createElementVNode("div",Xv,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(y),(C,R)=>(r.openBlock(),r.createBlock(Vv,{key:R,column:C,style:r.normalizeStyle(C.style),"onChange:sort":L[1]||(L[1]=O=>I.$emit("change:sort",O))},null,8,["column","style"]))),128))]),L[10]||(L[10]=r.createTextVNode()),r.createVNode(Wv,{offset:r.unref(s).data.scrollTop,"window-size":r.unref(s).data.bodyHeight,"data-size":r.unref(s).data.dataHeight,"onChange:offset":r.unref(s).updateScrollTop},null,8,["offset","window-size","data-size","onChange:offset"])],544))}}),gu=new WeakMap;class Qv{constructor(e,n,o){I_(this,"dataHeight"),this.datum=e,this.resolveHeight=n,this.resolvePrimaryKey=o;const s=e.reduce((c,u,p)=>(c.indices.set(p,c.total),c.total+=this.resolveHeight(u,p)+go,c),{total:0,indices:new Map});this.dataHeight=s.total;const l=e.map((c,u)=>({dataRow:c,index:u,primaryKey:this.resolvePrimaryKey(c,u),offset:gs(s.indices.get(u)),height:this.resolveHeight(c,u)}));gu.set(this,l)}get rows(){return gu.get(this)}async getHeight(){return this.dataHeight}async getRows(e,n){return Sv(this.rows,o=>{const s=o.offset;return e<s+o.height&&s<n+e})}}class eC{constructor(e,n,o){this.api=e,this.rowHeight=n,this.resolvePrimaryKey=o}get height(){return this.rowHeight+go}async getHeight(){return await this.api.count()*this.height}async getRows(e,n){const o=ys(Math.floor(e/this.height),0,Number.POSITIVE_INFINITY),s=Math.ceil(n+40/this.height);return(await this.api.query({offset:o,limit:s})).map((l,c)=>({dataRow:l,index:o+c,primaryKey:this.resolvePrimaryKey(l,o+c),offset:(o+c)*(this.rowHeight+go),height:this.rowHeight}))}}function tC(t){return Object.freeze(t)}function nC(t){return r.h(cl,{settings:Object.freeze(t)})}function dl(t,e){const n=new Qv(t,e.resolveRowHeight,e.resolvePrimaryKey);return{...e,dataSource:n}}function rC(t,e){return r.computed(()=>{const n=r.unref(t);return dl(n,r.unref(e))})}function oC(t,e){const n=r.computed(()=>{const s=r.unref(t);return dl(s,r.unref(e))}),o=r.reactive({settings:n});return r.computed(()=>r.h(cl,o))}const iC=Object.freeze(Object.defineProperty({__proto__:null,AsyncData:eC,Component:cl,factory:nC,rawDataSettings:dl,settings:tC,useRawData:rC,useRawDataComponent:oC},Symbol.toStringTag,{value:"Module"}));function*sC(t,e){for(const n of t)yield e(n)}function aC(t){const e=[];for(const n of t)e.push(n);return e}function yu(t){return t()}function ul(t,e){if(t==null)throw Error(e);return t}function pl(t){let e=!1;return function(...n){e||(requestAnimationFrame(()=>{t(...n),e=!1}),e=!0)}}function _u(t){return new Promise(e=>setTimeout(e,t))}function vu(t,e){const n=setTimeout(t,e);return()=>{clearTimeout(n)}}function Cu(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function lC(t){let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(Cu(65,91));return e}function wu(t){return function(e){return 1-t(1-e)}}function cC(t){return function(e){return e<.5?t(2*e)/2:(2-t(2*(1-e)))/2}}function bu(t){const{duration:e,draw:n,timing:o}=t,s=performance.now();let l=!1;return requestAnimationFrame(function c(u){let p=(u-s)/e;(p>1||l)&&(p=1);const f=o(p);n(f),p<1&&requestAnimationFrame(c)}),function(){l=!0}}function dC(t){const{getFraction:e,draw:n,timing:o}=t,s=performance.now();let l=!1;return requestAnimationFrame(function c(u){let p=e(u-s);if(l)return;p>1&&(p=1);const f=o(p);n(f),p<1&&requestAnimationFrame(c)}),function(){l=!0}}function xu(t,e){let n=-1;return(...o)=>{n!==-1&&(clearTimeout(n),n=-1),n=window.setTimeout(()=>t(...o),e)}}function ku(t,e,n=!0){let o=0,s;return function(...l){s=()=>{t.apply(this,l),o=new Date().getTime()+e,s=null,n&&setTimeout(()=>{s&&s()},e)},new Date().getTime()>o&&s()}}function uC(t){return t.map(e=>({text:String(e),value:e}))}function pr(t){return t.map(e=>({label:"label"in e?e.label:e.text,value:e.value,description:e.description}))}const hl=new Map;function pC(t){return hl.has(t)||hl.set(t,r.ref(localStorage.getItem(t))),ul(hl.get(t),"...")}function hC(t,e){e==null?localStorage.removeItem(t):localStorage.setItem(t,e)}function Su(t){const e=pC(t);return r.watch(e,n=>hC(t,n)),e}const fl=new Set;window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{aC(sC(fl.values(),e=>e(t.matches?"dark":"light")))});const fC=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",Eu=r.ref(fC),ml=Su("theme");function Tu(t){const e=r.computed(()=>ml.value?ml.value:Eu.value),n=s=>{Eu.value=s,t&&t(s)};function o(){ml.value=e.value==="light"?"dark":(e.value,"light")}return r.watch(e,s=>{t&&t(r.unref(s))}),r.onMounted(()=>{fl.add(n)}),r.onUnmounted(()=>{fl.delete(n)}),[e,o]}const mC=r.defineComponent({__name:"ThemeSwitcher",setup(t){const[e,n]=Tu();return(o,s)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-theme-switcher",r.unref(e)]),onClick:s[0]||(s[0]=(...l)=>r.unref(n)&&r.unref(n)(...l))},s[1]||(s[1]=[r.createElementVNode("div",null,null,-1)]),2))}}),gC={key:0,class:"pl-block-page__title"},yC={class:"pl-block-page__title__default"},_C={class:"pl-block-page__title__append"},vC={key:1},CC={class:"pl-block-page__body"},wC={name:"PlBlockPage"},bC=r.defineComponent({...wC,props:{noBodyGutters:{type:Boolean}},setup(t){const e=r.useSlots();return(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-layout-component pl-block-page",{noBodyGutters:n.noBodyGutters}])},[r.unref(e).title?(r.openBlock(),r.createElementBlock("div",gC,[r.createElementVNode("div",yC,[r.renderSlot(n.$slots,"title")]),o[0]||(o[0]=r.createTextVNode()),r.createElementVNode("div",_C,[r.renderSlot(n.$slots,"append")])])):(r.openBlock(),r.createElementBlock("div",vC)),o[1]||(o[1]=r.createTextVNode()),r.createElementVNode("div",CC,[r.renderSlot(n.$slots,"default")])],2))}}),xC={name:"PlContainer"},kC=r.defineComponent({...xC,props:{width:{}},setup(t){const e=t,n=r.computed(()=>({width:e.width}));return(o,s)=>(r.openBlock(),r.createElementBlock("div",{class:"pl-container pl-layout-component",style:r.normalizeStyle(n.value)},[r.renderSlot(o.$slots,"default")],4))}}),SC={name:"PlRow"},EC=r.defineComponent({...SC,props:{wrap:{type:Boolean},alignCenter:{type:Boolean},noGap:{type:Boolean}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-layout-component pl-row",{wrap:e.wrap,"align-center":e.alignCenter}])},[r.renderSlot(e.$slots,"default")],2))}}),TC={class:"pl-layout-component",style:{"flex-grow":"1"}},BC={name:"PlSpacer"},Bu=r.defineComponent({...BC,setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",TC))}}),VC={name:"PlGrid"},NC=r.defineComponent({...VC,props:{columns:{}},setup(t){const e=t,n=r.computed(()=>({gridTemplateColumns:`repeat(${e.columns}, minmax(0, 1fr))`}));return(o,s)=>(r.openBlock(),r.createElementBlock("div",{class:"pl-layout-component pl-grid",style:r.normalizeStyle(n.value)},[r.renderSlot(o.$slots,"default")],4))}}),AC={key:0,class:"pl-alert__icon"},PC={class:"pl-alert__main"},DC={key:0},FC={class:"pl-alert__main__text"},RC={name:"PlAlert"},MC=r.defineComponent({...RC,props:{modelValue:{type:Boolean,default:!0},type:{default:void 0},label:{default:void 0},icon:{type:Boolean,default:void 0},closeable:{type:Boolean,default:void 0},monospace:{type:Boolean,default:void 0},whiteSpacePre:{type:Boolean,default:void 0},maxHeight:{default:void 0}},emits:["update:modelValue"],setup(t){const e={success:"success",warn:"warning",info:"edit",error:"error"};return(n,o)=>n.modelValue?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["pl-alert",[{monospace:n.monospace,whiteSpacePre:n.whiteSpacePre},n.type?`pl-alert__${n.type}`:""]]),style:r.normalizeStyle({maxHeight:n.maxHeight})},[n.icon&&n.type?(r.openBlock(),r.createElementBlock("div",AC,[r.createElementVNode("div",{class:r.normalizeClass(`icon-24 icon-${e[n.type]}`)},null,2)])):r.createCommentVNode("",!0),o[2]||(o[2]=r.createTextVNode()),r.createElementVNode("div",PC,[n.label?(r.openBlock(),r.createElementBlock("label",DC,r.toDisplayString(n.label),1)):r.createCommentVNode("",!0),o[1]||(o[1]=r.createTextVNode()),r.createElementVNode("div",FC,[r.renderSlot(n.$slots,"default")])]),o[3]||(o[3]=r.createTextVNode()),n.closeable?(r.openBlock(),r.createElementBlock("div",{key:1,class:"pl-alert__close-btn","aria-label":"Close alert",role:"button",onClick:o[0]||(o[0]=s=>n.$emit("update:modelValue",!1))})):r.createCommentVNode("",!0)],6)):r.createCommentVNode("",!0)}}),IC=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
45
|
+
}`;function Lu(){T.ModuleRegistry.registerModules([hs.ClientSideRowModelModule,kg.InfiniteRowModelModule,Zd.ServerSideRowModelModule,Sg.CsvExportModule,jd.ClipboardModule,Wd.RangeSelectionModule,Eg.RichSelectModule,Tg.MenuModule,Ng.ExcelExportModule,hl,Ou]);const t=Xy("AGGRID_LICENSE");t?(Me.LicenseManager.setLicenseKey(t),console.log("AG Grid Activated")):console.log("AG Grid License not found")}const G_=Hd.createPart("headerBottomBorder").withCSS(M_),Mu=Hd.themeQuartz.withParams({headerColumnResizeHandleColor:"transparent",accentColor:"#49cc49",borderColor:"#E1E3EB",cellHorizontalPaddingScale:1,checkboxBorderRadius:"3px",checkboxCheckedBackgroundColor:"#110529",checkboxCheckedBorderColor:"#110529",checkboxIndeterminateBackgroundColor:"#110529",checkboxIndeterminateBorderColor:"#110529",checkboxUncheckedBorderColor:"#CFD1DB",columnBorder:!0,columnHoverColor:"#9BABCC16",fontFamily:"inherit",foregroundColor:"#110529",headerBackgroundColor:"#F7F8FA",headerColumnBorder:!0,headerFontWeight:600,headerRowBorder:!0,headerVerticalPaddingScale:.8,iconButtonHoverColor:"#9BABCC32",iconSize:"16px",menuBackgroundColor:"#FFFFFF",menuBorder:!0,menuTextColor:"#110529",rowHoverColor:"#9BABCC16",rowVerticalPaddingScale:1,selectedRowBackgroundColor:"#63E02424",sidePanelBorder:!1,spacing:"8px",tooltipBackgroundColor:"#110529",tooltipTextColor:"#FFFFFF",wrapperBorderRadius:"6px"}).withPart(G_),Gu=Symbol("sdk-vue");function _l(){return r.inject(Gu)}function $_(t,e,n={}){let o;Lu();const i=()=>{t.loadBlockState().then(c=>{l.loaded=!0;const d=zg(c,t,n),p=e(d),h=Object.fromEntries(Object.entries(p.routes).map(([m,y])=>{const x=typeof y=="function"?y():y;return[m,r.markRaw(x)]}));o=Object.assign(d,{...p,getRoute(m){return h[m]}})}).catch(c=>{console.error("load initial state error",c),l.error=c})},l=r.reactive({loaded:!1,error:void 0,useApp(){return Vg(o,"App is not loaded")},install(c){c.provide(Gu,this),i()}});return l}var z_=Object.defineProperty,U_=(t,e,n)=>e in t?z_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Z_=(t,e,n)=>U_(t,e+"",n);function ks(t,e){if(t==null)throw Error("Empty (null | undefined) value");return t}function j_(t,e,n){const o=Math.min(e,n),i=Math.max(e,n);return t>=o&&t<=i}function W_(t){return new Promise(e=>setTimeout(e,t))}function H_(t){return t()}function Ss(t,e,n){return e>t?e:t>n?n:t}function $u(t,e){return e(t)}function Zr(t,e){if(t!=null)return e(t)}function q_(t){if(t&&t.ok)return t.value}async function K_(t){return Object.fromEntries(await Promise.all(Object.entries(t).map(async([e,n])=>[e,await n])))}const zu=t=>t;function X_(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function Y_(t,e=[]){for(t=t?String(t):"";e.includes(t.charAt(0));)t=t.substring(1);return t}function J_(t){let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(X_(65,91));return e}function Uu(){return J_(42)}const Cl=Array.isArray;function gi(t){return t!==null&&typeof t=="object"}function wl(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null}function Q_(t,e){return Object.keys(t).map(n=>e(t[n],n))}function yi(t,e){return gi(t)&&gi(e)?Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>yi(t[n],e[n])):t===e}function vi(t){if(Array.isArray(t)){const e=[];for(let n=0;n<t.length;n++)e[n]=vi(t[n]);return e}else if(gi(t)){const e={};return Object.keys(t).forEach(n=>{e[n]=vi(t[n])}),e}else return t}function eC(t){return Array.isArray(t)?Object.assign([],t):gi(t)?Object.assign({},t):t}function tC(t,e){const n={};for(const o in e)e[o]!==t[o]&&(n[o]=t[o]);return n}function nC(t){return Object.entries(t).forEach(([e,n])=>{n instanceof Function&&(t[e]=n.bind(t))}),t}function rC(t,e,n){return t[e]=n,t}function oC(t,e){return t[e]}function iC(t,e){t={...t};const n=t[e];return delete t[e],[n,t]}function sC(t,...e){return Object.assign({},...e.map(n=>({[n]:t[n]})))}function aC(t,...e){return e.map(n=>t[n])}function lC(t,...e){const n=Object.assign({},t);return e.forEach(o=>delete n[o]),n}function Zu(t,e){return new Set([...Object.keys(t),...Object.keys(e)]).forEach(n=>{const o=t[n],i=e[n];wl(o)&&wl(i)||Cl(o)&&Cl(i)&&o.length===i.length?Zu(o,i):t[n]=i}),t}const bl=Object.freeze(Object.defineProperty({__proto__:null,bindMethods:nC,deepClone:vi,deepEqual:yi,deepPatch:Zu,getProp:oC,isArray:Cl,isObject:gi,isPlainObject:wl,map:Q_,omit:lC,pick:sC,pickValues:aC,setProp:rC,shallowClone:eC,shallowDiff:tC,shiftProp:iC},Symbol.toStringTag,{value:"Module"}));function cC(t,e){const n=t.findIndex(e);if(n<0)return[];const o=(()=>{for(let i=n;i<t.length;i++)if(!e(t[i],i))return i;return t.length})();return t.slice(n,o)}function dC(t,e,n){let o;return function(...i){o&&clearTimeout(o),o=setTimeout(()=>{o=void 0,t.apply(this,i)},e)}}const uC=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],pC=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],hC=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],fC=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],ju=(t,e)=>{let n=String(t);return typeof e=="string"||Array.isArray(e)?n=t.toLocaleString(e):e===!0&&(n=t.toLocaleString(void 0)),n};function xl(t,e){if(t=typeof t=="bigint"?Number(t):t,!Number.isFinite(t))throw new TypeError(`Expected a finite number, got ${typeof t}: ${t}`);Object.assign(e,{bits:!1,binary:!1});const n=e.bits?e.binary?fC:hC:e.binary?pC:uC;if(e.signed&&t===0)return` 0 ${n[0]}`;const o=t<0,i=o?"-":e.signed?"+":"";if(o&&(t=-t),t<1){const p=ju(t,e.locale);return i+p+" "+n[0]}const l=Math.min(Math.floor(e.binary?Math.log(t)/Math.log(1024):Math.log10(t)/3),n.length-1);t/=(e.binary?1024:1e3)**l,t=Number(t.toPrecision(3));const c=ju(Number(t),e.locale),d=n[l];return i+c+" "+d}const mC={class:"context-menu"},gC=["onClick"],yC=r.defineComponent({__name:"Menu",props:{options:{}},emits:["close"],setup(t,{emit:e}){const n=e,o=i=>{i.cb(),n("close")};return(i,l)=>(r.openBlock(),r.createElementBlock("div",mC,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.options,(c,d)=>(r.openBlock(),r.createElementBlock("div",{key:d,onClick:r.withModifiers(p=>o(c),["stop"])},[r.createElementVNode("span",null,r.toDisplayString(c.text),1)],8,gC))),128))]))}}),Zt=(t,e)=>{const n=t.__vccOpts||t;for(const[o,i]of e)n[o]=i;return n},vC=Zt(yC,[["__scopeId","data-v-12530966"]]);function kl(t,e){t.preventDefault();const n=()=>{r.render(null,document.body)},o=r.h(vC,{options:e,onClose:()=>{n()}});r.render(o,document.body);const i=o.el;return i.style.top=t.clientY+"px",i.style.left=t.clientX+"px",document.addEventListener("click",l=>{i.contains(l.target)||n()}),n}const Wu=Symbol(),Es=()=>r.inject(Wu),_C=["value"],CC={key:1},wC=r.defineComponent({__name:"BaseCellComponent",props:{modelValue:{},valueType:{},editable:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,i=r.reactive({edit:!1}),l=r.computed(()=>o.valueType),c=h=>{var m;let y=(m=h.target)==null?void 0:m.value;const x=r.unref(l),w=H_(()=>x==="integer"?parseInt(y,10):x==="float"?Number(y):y);n("update:modelValue",w),i.edit=!1},d=r.ref(),p=h=>{!h.metaKey&&o.editable&&(i.edit=!0,requestAnimationFrame(()=>{var m,y;(y=(m=d.value)==null?void 0:m.querySelector("input"))==null||y.focus()}))};return(h,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"baseRef",ref:d,class:r.normalizeClass(["base-cell",{"base-cell__edit":i.edit}]),onClick:p},[i.edit?(r.openBlock(),r.createElementBlock("input",{key:0,value:h.modelValue,onFocusout:m[0]||(m[0]=y=>i.edit=!1),onChange:c},null,40,_C)):(r.openBlock(),r.createElementBlock("div",CC,r.toDisplayString(h.modelValue),1))],2))}}),bC=["^data-row-index"],xC={key:0,class:"control-cell"},kC=r.defineComponent({__name:"TdCell",props:{cell:{}},setup(t){const e=t,n=Es(),o=r.computed(()=>e.cell.column.valueType),i=h=>{Zr(n.settings.value.onUpdatedRow,m=>{const y=e.cell.row,x={...y.dataRow,[e.cell.id]:h};m({...y,dataRow:x})})},l=h=>{h.metaKey&&n.selectRow(e.cell.row.primaryKey)},c=(h,m)=>{if(h.type==="contextmenu")h.preventDefault();else return;const y=n.settings??{},x=[],{onSelectedRows:w,onSelectedColumns:S}=y.value,O=n.data.selectedRows.has(m.primaryKey);w&&w.length&&(O?x.push({text:"Deselect row",cb(){n.data.selectedRows.delete(e.cell.row.primaryKey)}}):x.push({text:"Select row",cb(){n.selectRow(e.cell.row.primaryKey)}})),S&&S.length&&(x.push({text:"Select column",cb(){n.selectColumn(e.cell.column.id)}}),x.push({text:"Unselect column",cb(){n.unselectColumn(e.cell.column.id)}})),x.length&&kl(h,x)},d=r.ref(),p=r.computed(()=>e.cell.column.component?e.cell.column.component():void 0);return(h,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"cellRef",ref:d,class:r.normalizeClass(["td-cell",{[h.cell.class]:!0}]),"^data-row-index":h.cell.row.index,onClick:l,onContextmenu:m[0]||(m[0]=y=>c(y,h.cell.row))},[h.cell.control?(r.openBlock(),r.createElementBlock("div",xC,r.toDisplayString(h.cell.row.index),1)):p.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(p.value),{key:1,"model-value":h.cell.value,"onUpdate:modelValue":i},null,8,["model-value"])):(r.openBlock(),r.createBlock(wC,{key:2,"model-value":h.cell.value,"value-type":o.value,editable:h.cell.column.editable,"onUpdate:modelValue":i},null,8,["model-value","value-type","editable"]))],42,bC))}}),SC={},EC={width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function TC(t,e){return r.openBlock(),r.createElementBlock("svg",EC,e[0]||(e[0]=[r.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M24 41.5H9C7.61929 41.5 6.5 40.3807 6.5 39V24H9.5V38.5H24V41.5Z",fill:"#CFD1DB"},null,-1),r.createTextVNode(),r.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M41.5 9C41.5 7.61929 40.3807 6.5 39 6.5H9C7.61929 6.5 6.5 7.61929 6.5 9V19.5H9.5H28.5V38.5V41.5H39C40.3807 41.5 41.5 40.3807 41.5 39V9ZM38.5 9.5V16.5H31.5V9.5H38.5ZM38.5 38.5V19.5H31.5V38.5H38.5ZM9.5 9.5V16.5H28.5V9.5H9.5Z",fill:"#CFD1DB"},null,-1)]))}const NC=Zt(SC,[["render",TC]]),AC={class:"tr-head"},VC=r.defineComponent({__name:"TrHead",setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",AC,[r.renderSlot(e.$slots,"default")]))}});function BC(t,e){const n=e.indexOf(t)+1;return e[n>=e.length?0:n]}function PC(t,e){const n=t.findIndex(e);if(n<0)return[];const o=(()=>{for(let i=n;i<t.length;i++)if(!e(t[i],i))return i;return t.length})();return t.slice(n,o)}const RC=["^data-col-id"],DC=r.defineComponent({__name:"ThCell",props:{col:{}},emits:["delete:column","expand:column","change:sort"],setup(t,{emit:e}){const n=e;function o(l){l.preventDefault();const c=[];c.length&&kl(l,c)}function i(l){var c;const d=((c=l.sort)==null?void 0:c.direction)??"DESC";n("change:sort",{colId:l.id,direction:BC(d,["DESC","ASC"])})}return(l,c)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["cell th-cell",{"justify-center":l.col.justify,frozen:l.col.frozen}]),"^data-col-id":l.col.id,onContextmenu:o},[l.col.valueType?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(l.col.valueType)},null,2)):r.createCommentVNode("",!0),r.createTextVNode(" "+r.toDisplayString(l.col.label)+" ",1),l.col.sort?(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(["sort",l.col.sort.direction]),onClick:c[0]||(c[0]=r.withModifiers(()=>i(l.col),["stop"]))},null,2)):r.createCommentVNode("",!0)],42,RC))}}),IC=r.defineComponent({__name:"TrBody",props:{row:{}},setup(t){const e=r.ref(),n=()=>{r.nextTick().then(()=>{Zr(e.value,o=>o.scrollLeft=0)})};return(o,i)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"trRef",ref:e,class:r.normalizeClass(["tr-body",{selected:o.row.selected}]),scroll:"no",style:r.normalizeStyle(o.row.style),onScroll:n},[r.renderSlot(o.$slots,"default")],38))}}),FC=r.defineComponent({__name:"ColumnCaret",props:{column:{}},setup(t){const e=Es(),n=t,o=r.computed(()=>e.data.selectedColumns.has(n.column.id));return(i,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["column-caret",{selected:o.value,frozen:i.column.frozen}])},null,2))}});function st(t,e,n,o){r.onMounted(()=>{var i;return(i=r.unref(t))==null?void 0:i.addEventListener(e,n,o)}),r.onUnmounted(()=>{var i;return(i=r.unref(t))==null?void 0:i.removeEventListener(e,n,o)})}function OC(t){r.onMounted(()=>window.addEventListener("mouseup",t)),r.onUnmounted(()=>window.removeEventListener("mouseup",t))}function LC(t){let e=!1;return function(...n){e?console.log("handle pressure"):(requestAnimationFrame(()=>{t(...n),e=!1}),e=!0)}}function MC(t,e){let n;function o(l){n={...l}}OC(()=>{n=void 0,e()});const i=LC(t);return st(window,"mousemove",l=>{n&&i({x:n.x,width:n.width,diff:l.x-n.x})}),{start:o}}const go=1,GC=10,$C=30,Hu=60;function qu(){const t=r.reactive({x:0,y:0});function e(n){t.x=n.pageX,t.y=n.pageY}return r.onMounted(()=>window.addEventListener("mousemove",e)),r.onUnmounted(()=>window.removeEventListener("mousemove",e)),t}function Ku(t,e={}){const{delayEnter:n=0,delayLeave:o=0}=e,i=r.ref(!1);let l;const c=d=>{const p=d?n:o;l&&(clearTimeout(l),l=void 0),p?l=setTimeout(()=>i.value=d,p):i.value=d};return window&&(st(t,"mouseenter",()=>c(!0)),st(t,"mouseleave",()=>c(!1))),i}function zC(t){var e;const n=Zr((e=r.unref(t))==null?void 0:e.querySelectorAll(".th-cell"),o=>[...o])??[];return n.map(o=>{const{width:i,x:l}=o.getBoundingClientRect(),c=o.getAttribute("data-col-id");return zu({colId:c,width:i,x:l,right:l+i})}).slice(0,n.length-1)}function UC(t,e){const n=qu(),o=Ku(e,{}),{data:i}=t,l=MC(d=>{Zr(i.resizeTh,p=>{const h=i.columns.find(m=>m.id===p.colId);h&&(h.width=Ss(d.width+d.diff,$C,1e4),t.adjustWidth())})},()=>{i.resize=!1,i.resizeTh=void 0,document.body.style.cursor=""}),c=d=>{i.resizeTh&&(i.resize=!0,l.start({x:d.x,width:i.resizeTh.width}))};return r.watchEffect(()=>{if(!o.value){document.body.style.cursor="";return}if(i.resize)return;const d=zC(e).find(p=>Math.abs(n.x-p.right)<GC);d?(document.body.style.cursor="col-resize",i.resizeTh=d):(i.resizeTh=void 0,document.body.style.cursor="")}),{mouseDown:c}}const ZC={key:0,class:"command-menu"},jC={key:0},WC=["onClick"],HC=r.defineComponent({__name:"RowsCommandMenu",setup(t){const e=Es(),n=r.computed(()=>e.getSelectedRows()),o=r.computed(()=>n.value.length>0),i=r.computed(()=>{var c;return((c=e.settings)==null?void 0:c.value.onSelectedRows)??[]}),l=r.computed(()=>i.value.map(c=>({label:c.label,cb:()=>{c.cb(n.value),e.data.selectedRows.clear(),e.data.rows=[]}})));return(c,d)=>o.value?(r.openBlock(),r.createElementBlock("div",ZC,[n.value.length?(r.openBlock(),r.createElementBlock("span",jC,r.toDisplayString(n.value.length)+" rows selected",1)):r.createCommentVNode("",!0),d[0]||(d[0]=r.createTextVNode()),d[1]||(d[1]=r.createElementVNode("hr",null,null,-1)),d[2]||(d[2]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(p,h)=>(r.openBlock(),r.createElementBlock("span",{key:h,class:"command",onClick:r.withModifiers(p.cb,["stop"])},r.toDisplayString(p.label),9,WC))),128))])):r.createCommentVNode("",!0)}}),qC={key:0,class:"command-menu"},KC={key:0},XC=["onClick"],YC=r.defineComponent({__name:"ColumnsCommandMenu",setup(t){const e=Es(),n=r.computed(()=>e.getSelectedColumns()),o=r.computed(()=>n.value.length>0),i=r.computed(()=>{var c;return((c=e.settings)==null?void 0:c.value.onSelectedColumns)??[]}),l=r.computed(()=>i.value.map(c=>({label:c.label,cb:()=>{c.cb(n.value),e.data.selectedColumns.clear()}})));return(c,d)=>o.value?(r.openBlock(),r.createElementBlock("div",qC,[n.value.length?(r.openBlock(),r.createElementBlock("span",KC,"selected columns "+r.toDisplayString(n.value.length),1)):r.createCommentVNode("",!0),d[0]||(d[0]=r.createTextVNode()),d[1]||(d[1]=r.createElementVNode("hr",null,null,-1)),d[2]||(d[2]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(l.value,(p,h)=>(r.openBlock(),r.createElementBlock("span",{key:h,class:"command",onClick:r.withModifiers(p.cb,["stop"])},r.toDisplayString(p.label),9,XC))),128))])):r.createCommentVNode("",!0)}});function gr(t,e){const n={el:void 0,x:0,y:0},o=i=>({x:i.x,y:i.y,dx:i.x-n.x,dy:i.y-n.y});st(document,"mousedown",i=>{i.target===r.unref(t)&&(i.stopPropagation&&i.stopPropagation(),i.preventDefault&&i.preventDefault(),n.el=r.unref(t),n.x=i.x,n.y=i.y)}),st(document,"mouseup",i=>{n.el&&(n.el=void 0,e({...o(i),stop:!0},n))}),st(document,"mousemove",i=>{n.el&&e(o(i),n)})}const JC=r.defineComponent({__name:"TScroll",props:{offset:{},windowSize:{},dataSize:{}},emits:["change:offset"],setup(t,{emit:e}){const n=e,o=t,i=r.ref(),l=r.computed(()=>o.windowSize-12),c=r.computed(()=>o.windowSize<o.dataSize),d=r.computed(()=>Math.ceil(o.offset*(l.value/o.dataSize))),p=r.computed(()=>Math.ceil(l.value*l.value/o.dataSize)),h=r.computed(()=>({top:`${d.value}px`,height:`${p.value}px`}));return gr(i,(m,y)=>{const x=(d.value+m.dy)*o.dataSize/l.value;n("change:offset",x),y.x=m.x,y.y=m.y}),(m,y)=>(r.openBlock(),r.createElementBlock("div",{class:"t-scroll",style:r.normalizeStyle({height:`${m.windowSize}px`})},[r.createElementVNode("div",null,[c.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"handleRef",ref:i,class:"t-scroll__handle",style:r.normalizeStyle(h.value)},null,4)):r.createCommentVNode("",!0)])],4))}});function QC(t){return r.computed(()=>{const{data:e,settings:n}=t,{bodyWidth:o,scrollLeft:i}=e,l=[...e.columns],c=Uu();n.value.controlColumn&&l.unshift({id:c,label:"#",width:60,frozen:!0});let d=0;const p=l.map(m=>{const y={...m,offset:d};return d+=m.width+go,y}),h=p.filter(m=>m.frozen);return cC(p,m=>m.frozen?!1:i<m.offset+m.width&&m.offset<o+i).concat(h).map(m=>({...m,style:{left:m.frozen?`${m.offset}px`:`${m.offset-e.scrollLeft}px`,width:`${m.width}px`},control:m.id===c}))})}function e0(t,e){const n=r.computed(()=>e.value.reduce((o,i)=>(o[i.id]=i.justify?"justify-"+i.justify:"",o),{}));return r.computed(()=>t.rows.map(o=>{const i=n.value,{primaryKey:l,offset:c,dataRow:d,height:p}=o,h=e.value.map(m=>({id:m.id,column:m,row:o,value:d[m.id],class:i[m.id],editable:m.editable,width:m.width,style:m.style,control:m.control}));return zu({style:{top:`${c-t.scrollTop}px`,height:`${o.height}px`},primaryKey:l,offset:c,height:p,cells:h,selected:t.selectedRows.has(l)})}))}const t0=async(t,e)=>{const{scrollTop:n,bodyHeight:o}=t;return await W_(0),K_({rows:e.getRows(n,o),dataWindow:t})};function n0(t){const e=r.reactive({rowIndex:-1,columns:[],pendingLoads:0,currentWindow:void 0,rows:[],resize:!1,resizeTh:void 0,dataHeight:0,bodyHeight:t.settings.height,bodyWidth:0,scrollTop:0,scrollLeft:0,selectedRows:new Set,selectedColumns:new Set});r.watch(()=>t.settings,m=>{e.columns=vi(m.columns),e.currentWindow=void 0,m.dataSource.getHeight().then(y=>{e.dataHeight=y,h.updateBodyHeight()}).catch(y=>e.error=y)},{immediate:!0});const n=r.computed(()=>t.settings),o=r.computed(()=>e.columns.reduce((m,y)=>m+y.width+go,0)),i=r.computed(()=>$u(h.data.dataHeight-h.data.bodyHeight,m=>m>0?m:0)),l=r.computed(()=>$u(o.value-h.data.bodyWidth,m=>m>0?m:0)),c=r.computed(()=>({bodyHeight:e.bodyHeight,scrollTop:e.scrollTop,current:e.currentWindow})),d=QC({data:e,settings:n}),p=e0(e,d),h={data:e,settings:n,tableColumns:d,tableRows:p,adjustWidth:()=>{const m=e.columns.reduce((x,w)=>x+w.width+go,0),y=e.bodyWidth+e.scrollLeft;if(m<y){const x=e.columns[e.columns.length-1];x.width=x.width+(y-m)}},updateOffsets(m){this.updateScrollTop(e.scrollTop+m.deltaY),this.updateScrollLeft(e.scrollLeft+m.deltaX)},getSelectedRows(){return e.rows.filter(m=>e.selectedRows.has(m.primaryKey))},getSelectedColumns(){return e.columns.filter(m=>e.selectedColumns.has(m.id))},selectRow(m){e.selectedRows.add(m)},unselectRow(m){e.selectedRows.delete(m)},selectColumn(m){e.selectedColumns.add(m)},unselectColumn(m){e.selectedColumns.delete(m)},updateScrollTop(m){e.scrollTop=Ss(m,0,i.value)},updateScrollLeft(m){e.scrollLeft=Ss(m,0,l.value)},updateBodyHeight(){const{height:m}=t.settings,{dataHeight:y}=e,x=m>y?y:m;e.bodyHeight=x},updateDimensions(m){this.updateBodyHeight(),h.data.bodyWidth=m.width,h.adjustWidth(),e.rows=[],e.currentWindow=void 0}};return r.watch(c,(m,y)=>{const x=m.current;(!x||m.scrollTop<x.scrollTop||m.scrollTop+m.bodyHeight>x.bodyHeight+x.scrollTop)&&(e.currentWindow={scrollTop:m.scrollTop-Hu,bodyHeight:m.bodyHeight+Hu*2},t0(vi(e.currentWindow),n.value.dataSource).then(({rows:w,dataWindow:S})=>{yi(e.currentWindow,S)&&(e.rows=w)}))},{deep:!0,immediate:!0}),r.provide(Wu,h),h}const r0={class:"command-menu__container"},o0={key:0,class:"table-body__no-data"},i0={class:"carets"},Sl=r.defineComponent({__name:"TableComponent",props:{settings:{}},emits:["update:data","change:sort"],setup(t,{emit:e}){const n=e,o=t,i=n0(o),l=r.computed(()=>i.data.rows.length===0),c=r.computed(()=>({height:l.value?"212px":i.data.bodyHeight+"px"}));r.watch(i.data,O=>n("update:data",O),{deep:!0}),r.watch(o,()=>m);const d=r.ref(),p=r.ref(),h=r.ref(),m=()=>{Zr(h.value,O=>{i.updateDimensions(O.getBoundingClientRect())})},y=i.tableColumns,x=i.tableRows,{mouseDown:w}=UC(i,d);r.onMounted(()=>{r.nextTick(m)}),r.watchPostEffect(()=>{r.unref(o.settings),r.nextTick(m)}),st(window,"resize",()=>r.nextTick(m));const S=O=>{O.preventDefault(),i.updateOffsets(O)};return(O,G)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"tableRef",ref:d,class:"data-table",onMousedown:G[2]||(G[2]=(...b)=>r.unref(w)&&r.unref(w)(...b))},[r.createElementVNode("div",r0,[r.createVNode(HC),G[3]||(G[3]=r.createTextVNode()),r.createVNode(YC)]),G[7]||(G[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"headRef",ref:p,class:"table-head"},[r.createVNode(VC,null,{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(y),(b,R)=>(r.openBlock(),r.createBlock(DC,{key:R,col:b,style:r.normalizeStyle(b.style),"onChange:sort":G[0]||(G[0]=F=>O.$emit("change:sort",F))},null,8,["col","style"]))),128))]),_:1})],512),G[8]||(G[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"bodyRef",ref:h,class:"table-body",style:r.normalizeStyle(c.value),onWheel:S},[l.value?(r.openBlock(),r.createElementBlock("div",o0,[r.createElementVNode("div",null,[r.createVNode(NC),G[4]||(G[4]=r.createTextVNode()),G[5]||(G[5]=r.createElementVNode("div",null,"No Data To Show",-1))])])):r.createCommentVNode("",!0),G[6]||(G[6]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(x),(b,R)=>(r.openBlock(),r.createBlock(IC,{key:R,row:b},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(b.cells,F=>(r.openBlock(),r.createBlock(kC,{key:F.column.id+":"+R,cell:F,style:r.normalizeStyle(F.style)},null,8,["cell","style"]))),128))]),_:2},1032,["row"]))),128))],36),G[9]||(G[9]=r.createTextVNode()),r.createElementVNode("div",i0,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(y),(b,R)=>(r.openBlock(),r.createBlock(FC,{key:R,column:b,style:r.normalizeStyle(b.style),"onChange:sort":G[1]||(G[1]=F=>O.$emit("change:sort",F))},null,8,["column","style"]))),128))]),G[10]||(G[10]=r.createTextVNode()),r.createVNode(JC,{offset:r.unref(i).data.scrollTop,"window-size":r.unref(i).data.bodyHeight,"data-size":r.unref(i).data.dataHeight,"onChange:offset":r.unref(i).updateScrollTop},null,8,["offset","window-size","data-size","onChange:offset"])],544))}}),Xu=new WeakMap;class s0{constructor(e,n,o){Z_(this,"dataHeight"),this.datum=e,this.resolveHeight=n,this.resolvePrimaryKey=o;const i=e.reduce((c,d,p)=>(c.indices.set(p,c.total),c.total+=this.resolveHeight(d,p)+go,c),{total:0,indices:new Map});this.dataHeight=i.total;const l=e.map((c,d)=>({dataRow:c,index:d,primaryKey:this.resolvePrimaryKey(c,d),offset:ks(i.indices.get(d)),height:this.resolveHeight(c,d)}));Xu.set(this,l)}get rows(){return Xu.get(this)}async getHeight(){return this.dataHeight}async getRows(e,n){return PC(this.rows,o=>{const i=o.offset;return e<i+o.height&&i<n+e})}}class a0{constructor(e,n,o){this.api=e,this.rowHeight=n,this.resolvePrimaryKey=o}get height(){return this.rowHeight+go}async getHeight(){return await this.api.count()*this.height}async getRows(e,n){const o=Ss(Math.floor(e/this.height),0,Number.POSITIVE_INFINITY),i=Math.ceil(n+40/this.height);return(await this.api.query({offset:o,limit:i})).map((l,c)=>({dataRow:l,index:o+c,primaryKey:this.resolvePrimaryKey(l,o+c),offset:(o+c)*(this.rowHeight+go),height:this.rowHeight}))}}function l0(t){return Object.freeze(t)}function c0(t){return r.h(Sl,{settings:Object.freeze(t)})}function El(t,e){const n=new s0(t,e.resolveRowHeight,e.resolvePrimaryKey);return{...e,dataSource:n}}function d0(t,e){return r.computed(()=>{const n=r.unref(t);return El(n,r.unref(e))})}function u0(t,e){const n=r.computed(()=>{const i=r.unref(t);return El(i,r.unref(e))}),o=r.reactive({settings:n});return r.computed(()=>r.h(Sl,o))}const p0=Object.freeze(Object.defineProperty({__proto__:null,AsyncData:a0,Component:Sl,factory:c0,rawDataSettings:El,settings:l0,useRawData:d0,useRawDataComponent:u0},Symbol.toStringTag,{value:"Module"}));function*h0(t,e){for(const n of t)yield e(n)}function f0(t){const e=[];for(const n of t)e.push(n);return e}function Yu(t){return t()}function Tl(t,e){if(t==null)throw Error(e);return t}function Nl(t){let e=!1;return function(...n){e||(requestAnimationFrame(()=>{t(...n),e=!1}),e=!0)}}function Ju(t){return new Promise(e=>setTimeout(e,t))}function Qu(t,e){const n=setTimeout(t,e);return()=>{clearTimeout(n)}}function ep(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t))+t}function m0(t){let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(ep(65,91));return e}function tp(t){return function(e){return 1-t(1-e)}}function g0(t){return function(e){return e<.5?t(2*e)/2:(2-t(2*(1-e)))/2}}function np(t){const{duration:e,draw:n,timing:o}=t,i=performance.now();let l=!1;return requestAnimationFrame(function c(d){let p=(d-i)/e;(p>1||l)&&(p=1);const h=o(p);n(h),p<1&&requestAnimationFrame(c)}),function(){l=!0}}function y0(t){const{getFraction:e,draw:n,timing:o}=t,i=performance.now();let l=!1;return requestAnimationFrame(function c(d){let p=e(d-i);if(l)return;p>1&&(p=1);const h=o(p);n(h),p<1&&requestAnimationFrame(c)}),function(){l=!0}}function rp(t,e){let n=-1;return(...o)=>{n!==-1&&(clearTimeout(n),n=-1),n=window.setTimeout(()=>t(...o),e)}}function op(t,e,n=!0){let o=0,i;return function(...l){i=()=>{t.apply(this,l),o=new Date().getTime()+e,i=null,n&&setTimeout(()=>{i&&i()},e)},new Date().getTime()>o&&i()}}function v0(t){return t.map(e=>({text:String(e),value:e}))}function yr(t){return t.map(e=>({label:"label"in e?e.label:e.text,value:e.value,description:e.description}))}const Al=new Map;function _0(t){return Al.has(t)||Al.set(t,r.ref(localStorage.getItem(t))),Tl(Al.get(t),"...")}function C0(t,e){e==null?localStorage.removeItem(t):localStorage.setItem(t,e)}function ip(t){const e=_0(t);return r.watch(e,n=>C0(t,n)),e}const Vl=new Set;window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{f0(h0(Vl.values(),e=>e(t.matches?"dark":"light")))});const w0=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",sp=r.ref(w0),Bl=ip("theme");function ap(t){const e=r.computed(()=>Bl.value?Bl.value:sp.value),n=i=>{sp.value=i,t&&t(i)};function o(){Bl.value=e.value==="light"?"dark":(e.value,"light")}return r.watch(e,i=>{t&&t(r.unref(i))}),r.onMounted(()=>{Vl.add(n)}),r.onUnmounted(()=>{Vl.delete(n)}),[e,o]}const b0=r.defineComponent({__name:"ThemeSwitcher",setup(t){const[e,n]=ap();return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-theme-switcher",r.unref(e)]),onClick:i[0]||(i[0]=(...l)=>r.unref(n)&&r.unref(n)(...l))},i[1]||(i[1]=[r.createElementVNode("div",null,null,-1)]),2))}}),x0={key:0,class:"pl-block-page__title"},k0={class:"pl-block-page__title__default"},S0={class:"pl-block-page__title__append"},E0={key:1},T0={class:"pl-block-page__body"},N0={name:"PlBlockPage"},A0=r.defineComponent({...N0,props:{noBodyGutters:{type:Boolean}},setup(t){const e=r.useSlots();return(n,o)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-layout-component pl-block-page",{noBodyGutters:n.noBodyGutters}])},[r.unref(e).title?(r.openBlock(),r.createElementBlock("div",x0,[r.createElementVNode("div",k0,[r.renderSlot(n.$slots,"title")]),o[0]||(o[0]=r.createTextVNode()),r.createElementVNode("div",S0,[r.renderSlot(n.$slots,"append")])])):(r.openBlock(),r.createElementBlock("div",E0)),o[1]||(o[1]=r.createTextVNode()),r.createElementVNode("div",T0,[r.renderSlot(n.$slots,"default")])],2))}}),V0={name:"PlContainer"},B0=r.defineComponent({...V0,props:{width:{}},setup(t){const e=t,n=r.computed(()=>({width:e.width}));return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:"pl-container pl-layout-component",style:r.normalizeStyle(n.value)},[r.renderSlot(o.$slots,"default")],4))}}),P0={name:"PlRow"},R0=r.defineComponent({...P0,props:{wrap:{type:Boolean},alignCenter:{type:Boolean},noGap:{type:Boolean}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-layout-component pl-row",{wrap:e.wrap,"align-center":e.alignCenter}])},[r.renderSlot(e.$slots,"default")],2))}}),D0={class:"pl-layout-component",style:{"flex-grow":"1"}},I0={name:"PlSpacer"},lp=r.defineComponent({...I0,setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",D0))}}),F0={name:"PlGrid"},O0=r.defineComponent({...F0,props:{columns:{}},setup(t){const e=t,n=r.computed(()=>({gridTemplateColumns:`repeat(${e.columns}, minmax(0, 1fr))`}));return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:"pl-layout-component pl-grid",style:r.normalizeStyle(n.value)},[r.renderSlot(o.$slots,"default")],4))}}),L0={key:0,class:"pl-alert__icon"},M0={class:"pl-alert__main"},G0={key:0},$0={class:"pl-alert__main__text"},z0={name:"PlAlert"},U0=r.defineComponent({...z0,props:{modelValue:{type:Boolean,default:!0},type:{default:void 0},label:{default:void 0},icon:{type:Boolean,default:void 0},closeable:{type:Boolean,default:void 0},monospace:{type:Boolean,default:void 0},whiteSpacePre:{type:Boolean,default:void 0},maxHeight:{default:void 0}},emits:["update:modelValue"],setup(t){const e={success:"success",warn:"warning",info:"edit",error:"error"};return(n,o)=>n.modelValue?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["pl-alert",[{monospace:n.monospace,whiteSpacePre:n.whiteSpacePre},n.type?`pl-alert__${n.type}`:""]]),style:r.normalizeStyle({maxHeight:n.maxHeight})},[n.icon&&n.type?(r.openBlock(),r.createElementBlock("div",L0,[r.createElementVNode("div",{class:r.normalizeClass(`icon-24 icon-${e[n.type]}`)},null,2)])):r.createCommentVNode("",!0),o[2]||(o[2]=r.createTextVNode()),r.createElementVNode("div",M0,[n.label?(r.openBlock(),r.createElementBlock("label",G0,r.toDisplayString(n.label),1)):r.createCommentVNode("",!0),o[1]||(o[1]=r.createTextVNode()),r.createElementVNode("div",$0,[r.renderSlot(n.$slots,"default")])]),o[3]||(o[3]=r.createTextVNode()),n.closeable?(r.openBlock(),r.createElementBlock("div",{key:1,class:"pl-alert__close-btn","aria-label":"Close alert",role:"button",onClick:o[0]||(o[0]=i=>n.$emit("update:modelValue",!1))})):r.createCommentVNode("",!0)],6)):r.createCommentVNode("",!0)}}),Z0=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
46
46
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.5 4.5H4.5L4.5 19.5H19.5V4.5ZM4.5 3C3.67157 3 3 3.67157 3 4.5V19.5C3 20.3284 3.67157 21 4.5 21H19.5C20.3284 21 21 20.3284 21 19.5V4.5C21 3.67157 20.3284 3 19.5 3H4.5Z" fill="#110529"/>
|
|
47
47
|
</svg>
|
|
48
|
-
`,
|
|
48
|
+
`,j0=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
49
49
|
<rect x="3" y="3" width="18" height="18" rx="2" fill="#110529"/>
|
|
50
50
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.5431 8.51724L10.3333 16.0875L6.45691 12.0172L7.54312 10.9828L10.3333 13.9125L16.4569 7.48276L17.5431 8.51724Z" fill="white"/>
|
|
51
51
|
</svg>
|
|
52
|
-
`,LC=["innerHTML"],GC={class:"dropdown-list-item__title-container"},zC={class:"dropdown-list-item__title text-s"},$C={key:0,class:"dropdown-list-item__description text-description"},UC={key:1,class:"dropdown-list-item__icon flex-self-start"},yo=r.defineComponent({__name:"DropdownListItem",props:{option:{},isSelected:{type:Boolean,default:!1},size:{default:"small"},isHovered:{type:Boolean,default:!1},useCheckbox:{type:Boolean,default:!1}},setup(t){const e=t,n=r.computed(()=>{const l=[];return e.size==="small"&&l.push("dropdown-list-item__small"),e.isSelected&&l.push("dropdown-list-item__selected"),e.isHovered&&l.push("hovered-item"),l.join(" ")}),o=r.computed(()=>{const l=["dropdown-list-item__checkbox","flex-self-start"];return e.isSelected&&l.push("checked"),l.join(" ")}),s=r.computed(()=>e.isSelected?OC:IC);return(l,c)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([n.value,"dropdown-list-item"])},[e.useCheckbox?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(o.value),innerHTML:s.value},null,10,LC)):r.createCommentVNode("",!0),c[1]||(c[1]=r.createTextVNode()),r.createElementVNode("div",GC,[r.createElementVNode("div",zC,r.toDisplayString(l.option.label),1),c[0]||(c[0]=r.createTextVNode()),l.option.description?(r.openBlock(),r.createElementBlock("div",$C,r.toDisplayString(l.option.description),1)):r.createCommentVNode("",!0)]),c[2]||(c[2]=r.createTextVNode()),!e.useCheckbox&&e.isSelected?(r.openBlock(),r.createElementBlock("div",UC)):r.createCommentVNode("",!0)],2))}});function _o(t,e){const n=pl(()=>{if(t.value){const{scrollTop:o,scrollLeft:s,scrollHeight:l,scrollWidth:c,clientHeight:u,clientWidth:p}=document.documentElement,f=t.value.getBoundingClientRect();e({scrollTop:o,scrollLeft:s,scrollHeight:l,scrollWidth:c,clientHeight:u,clientWidth:p,offsetY:o+f.y,offsetX:s+f.x,top:f.top,right:f.right,bottom:f.bottom,left:f.left,width:f.width,height:f.height,x:f.x,y:f.y})}});r.onMounted(n),rt(window,"scroll",n,{capture:!0,passive:!0}),rt(window,"resize",n,{passive:!0}),rt(window,"adjust",n,!0)}const ZC=r.defineComponent({__name:"PlMaskIcon16",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>e.size==="large"?"--mask-size: 24px":""),o=r.computed(()=>`mask-16 mask-${e.name}`);return(s,l)=>(r.openBlock(),r.createElementBlock("i",{style:r.normalizeStyle(n.value),class:r.normalizeClass([o.value,s.$style.icon])},null,6))}}),WC="_icon_1ugxm_2",HC={icon:WC},jC={$style:HC},Un=Lt(ZC,[["__cssModules",jC]]),qC=["onKeyup"],KC=r.defineComponent({__name:"PlBtnSplit",props:r.mergeModels({options:{},disabled:{type:Boolean},loading:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:r.mergeModels(["click"],["update:modelValue"]),setup(t,{expose:e,emit:n}){const o=t,s=n,l=r.useModel(t,"modelValue"),c=r.ref(),u=r.ref(),p=r.ref(),f=r.ref(),m=r.reactive({open:!1,optionsHeight:0,activeIndex:-1});e({data:m});const y=r.reactive({top:"0px",left:"0px",width:"0px"});r.watch(u,N=>{if(N){const U=N.getBoundingClientRect();m.optionsHeight=U.height,window.dispatchEvent(new CustomEvent("adjust"))}},{immediate:!0});const T=r.computed(()=>m.open?"mask-24 mask-chevron-up":"mask-24 mask-chevron-down"),B=r.computed(()=>(o.options??[]).findIndex(N=>hi(N.value,l.value))),A=r.computed(()=>pr(o.options??[]).map((N,U)=>({...N,index:U,isSelected:U===B.value,isActive:U===m.activeIndex}))),I=r.computed(()=>o.loading||o.options===void 0),L=r.computed(()=>{var N;return((N=A.value.find(U=>hi(U.value,l.value)))==null?void 0:N.label)??(o.options===void 0?"...":"")});_o(c,N=>{const U=N.top+N.height+3;U+m.optionsHeight>N.clientHeight?y.top=N.top-m.optionsHeight-3+"px":y.top=U+"px",y.left=N.left+"px",y.width=N.width+"px"});const C=N=>{var U;l.value=N,m.open=!1,(U=c==null?void 0:c.value)==null||U.focus()};function R(){s("click")}const O=N=>{var U,te;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(N.code))N.preventDefault();else return;if(N.target===f.value&&N.code==="Enter"){R();return}const{open:j,activeIndex:Y}=m;if(!j&&N.target===p.value){N.code==="Enter"&&(m.open=!0);return}N.code==="Escape"&&(m.open=!1,(U=c.value)==null||U.focus());const q=r.unref(A),{length:ee}=q;if(!ee)return;N.code==="Enter"&&C((te=q.find(k=>k.index===Y))==null?void 0:te.value);const G=q.findIndex(k=>k.index===Y)??-1,S=N.code==="ArrowDown"?1:N.code==="ArrowUp"?-1:0,w=Math.abs(G+S+ee)%ee;m.activeIndex=A.value[w].index??-1},F=N=>{var U,te;const j=N.relatedTarget;!((U=c.value)!=null&&U.contains(j))&&!((te=u.value)!=null&&te.contains(j))&&(m.open=!1)};return(N,U)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:c,class:r.normalizeClass([{disabled:N.disabled||I.value,loading:I.value},"pl-btn-split d-flex"]),onFocusout:F,onKeydown:O},[r.createElementVNode("div",{ref_key:"buttonAction",ref:f,class:"pl-btn-split__title flex-grow-1 d-flex align-center text-s-btn",tabindex:"0",onClick:R,onKeyup:r.withKeys(r.withModifiers(R,["stop"]),["enter"])},r.toDisplayString(L.value),41,qC),U[1]||(U[1]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"menuActivator",ref:p,class:"pl-btn-split__icon-container d-flex align-center justify-center",tabindex:"0",onClick:U[0]||(U[0]=te=>m.open=!m.open)},[I.value?(r.openBlock(),r.createBlock(Un,{key:0,name:"loading"})):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass([T.value,"pl-btn-split__icon"])},null,2))],512),U[2]||(U[2]=r.createTextVNode()),m.open?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:"body"},[r.createElementVNode("div",{ref_key:"list",ref:u,class:"pl-dropdown__options",style:r.normalizeStyle(y),tabindex:"-1"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(A.value,(te,j)=>(r.openBlock(),r.createBlock(yo,{key:j,option:te,"is-selected":te.isSelected,"is-hovered":te.isActive,size:"medium",onClick:r.withModifiers(Y=>C(te.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128))],4)])):r.createCommentVNode("",!0)],34))}});function Vu(t){function e(n){const o=n.currentTarget,s=document.createElement("span"),l=Math.max(o.clientWidth,o.clientHeight),c=l/2;s.style.width=s.style.height=`${l}px`,s.style.left=`${n.clientX-o.offsetLeft-c}px`,s.style.top=`${n.clientY-o.offsetTop-c}px`,s.classList.add("ripple");const u=o.getElementsByClassName("ripple")[0];u&&u.remove(),o.appendChild(s)}r.onMounted(()=>{var n;(n=t.value)==null||n.addEventListener("click",e)})}const YC={key:0},JC={inheritAttrs:!1},vs=r.defineComponent({...JC,__name:"BtnBase",props:{loading:{type:Boolean},small:{type:Boolean},large:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t,n=r.ref(),o=r.computed(()=>e.small||e.size==="small"),s=r.computed(()=>e.large||e.size==="large");return Vu(n),(l,c)=>(r.openBlock(),r.createElementBlock("button",r.mergeProps({ref_key:"btn",ref:n,tabindex:"0",class:{loading:l.loading,small:o.value,large:s.value,round:l.round,reverse:l.reverse,justifyCenter:l.justifyCenter,[l.$attrs.class+""]:!0}},{...l.$attrs,disabled:!!l.$attrs.disabled||l.loading}),[l.round?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("span",YC,[r.renderSlot(l.$slots,"default")])),c[0]||(c[0]=r.createTextVNode()),l.loading?(r.openBlock(),r.createBlock(r.unref(Un),{key:1,name:"loading",size:l.size},null,8,["size"])):l.icon?(r.openBlock(),r.createBlock(r.unref(Un),{key:2,name:l.icon,size:l.size},null,8,["name","size"])):r.createCommentVNode("",!0)],16))}}),XC={name:"PlBtnPrimary"},gl=r.defineComponent({...XC,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(vs,r.mergeProps({class:"pl-btn-primary"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),QC={name:"PlBtnAccent"},e0=r.defineComponent({...QC,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(vs,r.mergeProps({class:"pl-btn-accent"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),t0={name:"PlBtnDanger"},n0=r.defineComponent({...t0,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(vs,r.mergeProps({class:"pl-btn-danger"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),r0={name:"PlBtnSecondary"},yl=r.defineComponent({...r0,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(vs,r.mergeProps(e,{class:"pl-btn-secondary"}),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),o0={key:0},i0={name:"PlBtnGhost"},Cs=r.defineComponent({...i0,props:{loading:{type:Boolean},size:{default:void 0},round:{type:Boolean},icon:{default:void 0},reverse:{type:Boolean},justifyCenter:{type:Boolean,default:!1}},setup(t){const e=t,n=r.computed(()=>e.size==="small"),o=r.computed(()=>e.size==="large"),s=r.ref(),l=r.useSlots();return Vu(s),(c,u)=>(r.openBlock(),r.createElementBlock("button",r.mergeProps({ref_key:"btnRef",ref:s,tabindex:"0",class:["pl-btn-ghost",{loading:c.loading,small:n.value,large:o.value,round:c.round,reverse:c.reverse,justifyCenter:c.justifyCenter,[c.$attrs.class+""]:!0}]},{...c.$attrs,disabled:!!c.$attrs.disabled||c.loading}),[r.unref(l).default&&!c.round?(r.openBlock(),r.createElementBlock("span",o0,[r.renderSlot(c.$slots,"default")])):r.createCommentVNode("",!0),u[0]||(u[0]=r.createTextVNode()),c.loading?(r.openBlock(),r.createBlock(r.unref(Un),{key:1,name:"loading",size:c.size},null,8,["size"])):c.icon?(r.openBlock(),r.createBlock(r.unref(Un),{key:2,name:c.icon,size:c.size},null,8,["name","size"])):r.createCommentVNode("",!0),u[1]||(u[1]=r.createTextVNode()),r.renderSlot(c.$slots,"append")],16))}}),s0=r.defineComponent({__name:"PlBtnLink",props:{loading:{type:Boolean},size:{},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean},disabled:{type:Boolean}},setup(t){const e=t,n=r.ref(!1);return(o,s)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-btn-link",{disabled:o.disabled,loading:o.loading,hover:n.value}]),onMouseover:s[0]||(s[0]=l=>n.value=!0),onMouseleave:s[1]||(s[1]=l=>n.value=!1)},[r.createVNode(yl,r.mergeProps({round:"",hover:n.value},e),null,16,["hover"]),s[2]||(s[2]=r.createTextVNode()),r.renderSlot(o.$slots,"default")],34))}});function a0(t,e){const n=r.ref();return _o(t,o=>{n.value=o}),r.computed(()=>{const o=r.unref(n),s=r.unref(e),l=s.position??"top",c=s.gap??8;if(!o)return"";const u=o.offsetY+Math.floor(o.height/2),p=o.offsetX+Math.floor(o.width/2);return l==="top-left"?`left: ${o.offsetX}px; top: ${o.offsetY-c}px;`:l==="top"?`left: ${p}px; top: ${o.offsetY-c}px;`:l==="right"?`left: ${o.offsetX+o.width+c}px; top: ${u}px;`:l==="left"?`right: ${o.scrollWidth-o.x+c}px; top: ${u}px;`:""})}function mi(t,e){return e(t)}function ct(t,e){if(t!=null)return e(t)}function l0(t){return Array.isArray(t)?t:[t]}function c0(t,e,...n){n.forEach(o=>{t[o]=e[o]})}function ws(t,e){rt(document,"click",n=>{document.contains(n.target)&&(l0(t).map(o=>o.value).filter(o=>!!o).some(o=>o==null?void 0:o.contains(n.target))||e())})}const d0={},u0={class:"beak",width:"5",height:"9",viewBox:"0 0 3 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function p0(t,e){return r.openBlock(),r.createElementBlock("svg",u0,e[0]||(e[0]=[r.createElementVNode("path",{d:"M4.00222 8.00933L0 4.00711L4.00222 0.00488281L4.00222 8.00933Z",fill:"#24223D"},null,-1)]))}const h0=Lt(d0,[["render",p0]]),_l=new Map,f0={name:"PlTooltip"},Ct=r.defineComponent({...f0,props:{openDelay:{default:100},closeDelay:{default:1e3},position:{default:"top"},hide:{type:Boolean},gap:{default:8},element:{default:"div"}},emits:["tooltip:close"],setup(t,{emit:e}){const n=e,o=Symbol(),s=t,l=r.reactive({open:!1,over:!1,tooltipOpen:!1,key:Symbol()});_l.set(o,()=>f()),r.watch(()=>l.open,I=>{requestAnimationFrame(()=>{l.tooltipOpen=I})});let c=()=>{};const u=ku(()=>window.dispatchEvent(new CustomEvent("adjust")),1e3),p=()=>{l.open=!0;for(let[I,L]of _l.entries())I!==o&&L()},f=()=>{l.open=!1,n("tooltip:close")},m=async()=>{s.hide||(u(),l.over=!0,c(),await _u(100),l.over&&p())},y=()=>{l.over=!1,c=vu(()=>{l.over||f()},s.closeDelay)};r.watch(()=>s.hide,I=>{I&&f()});const T=r.ref(),B=r.ref(),A=a0(T,r.toRef(s));return ws([T,B],()=>f()),r.onUnmounted(()=>{_l.delete(o)}),(I,L)=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(I.element),r.mergeProps(I.$attrs,{ref_key:"rootRef",ref:T,onClick:m,onMouseover:m,onMouseleave:y}),{default:r.withCtx(()=>[r.renderSlot(I.$slots,"default"),L[1]||(L[1]=r.createTextVNode()),I.$slots.tooltip&&l.open?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:"body"},[r.createVNode(r.Transition,{name:"tooltip-transition"},{default:r.withCtx(()=>[l.tooltipOpen?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-tooltip__container",style:r.normalizeStyle(r.unref(A))},[r.createElementVNode("div",{ref_key:"tooltip",ref:B,class:r.normalizeClass(["pl-tooltip",I.position]),onMouseover:m,onMouseleave:y},[r.createElementVNode("div",null,[r.renderSlot(I.$slots,"tooltip")]),L[0]||(L[0]=r.createTextVNode()),r.createVNode(h0)],34)],4)):r.createCommentVNode("",!0)]),_:3})])):r.createCommentVNode("",!0)]),_:3},16))}}),m0={},g0={class:"inner-border"};function y0(t,e,n,o,s,l){return r.openBlock(),r.createElementBlock("div",g0,[r.renderSlot(t.$slots,"default")])}const _0=Lt(m0,[["render",y0]]),v0={key:0},C0=["tabindex","onKeydown","onClick"],w0={key:1,class:"pl-btn-group__helper"},b0={key:2,class:"pl-btn-group__error"},x0={name:"PlBtnGroup"},Nu=r.defineComponent({...x0,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean},compact:{type:Boolean},helper:{},error:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,s=u=>o("update:modelValue",u),l=t,c=r.computed(()=>l.options.map(u=>({label:"label"in u?u.label:u.text,value:u.value})));return(u,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-btn-group",{disabled:u.disabled,compact:u.compact}])},[u.label?(r.openBlock(),r.createElementBlock("label",v0,[r.createElementVNode("span",null,r.toDisplayString(u.label),1),p[0]||(p[0]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(Ct),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(u.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),p[1]||(p[1]=r.createTextVNode()),r.createVNode(_0,{class:"pl-btn-group__container"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.value,(f,m)=>(r.openBlock(),r.createElementBlock("div",{key:m,class:r.normalizeClass(["pl-btn-group__option text-s",{active:u.modelValue===f.value}]),tabindex:u.modelValue===f.value||u.disabled?void 0:0,onKeydown:r.withKeys(y=>s(f.value),["enter"]),onClick:y=>s(f.value)},r.toDisplayString(f.label),43,C0))),128))]),_:1}),p[2]||(p[2]=r.createTextVNode()),u.helper?(r.openBlock(),r.createElementBlock("div",w0,r.toDisplayString(u.helper),1)):u.error?(r.openBlock(),r.createElementBlock("div",b0,r.toDisplayString(u.error),1)):r.createCommentVNode("",!0)],2))}});function k0(t,e){const n=r.ref(),o=r.ref(),{parse:s,update:l}=e,c=()=>{n.value=void 0,o.value=void 0},u=r.computed({get(){return n.value!==void 0?n.value:t.value},set(p){c();try{const f=s?s(p):p;!l||l(f)?t.value=f:n.value=f}catch(f){n.value=p,o.value=f instanceof Error?f.message:String(f)}}});return r.reactive({value:u,error:o,reset:c})}const S0="_component_1abv8_1",E0="_container_1abv8_15",T0="_error_1abv8_69",vl={component:S0,container:E0,error:T0},B0={key:0},V0=["placeholder"],N0=r.defineComponent({__name:"PlEditableTitle",props:r.mergeModels({placeholder:{default:"Title"},maxWidth:{default:"80%"},prefix:{default:void 0},maxLength:{default:1e3},minLength:{default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t,o=k0(e,{update(){return!1},parse:u=>{if(typeof u!="string")throw Error("value should be a string");if(n.maxLength&&u.length>n.maxLength)throw Error(`Max title length is ${n.maxLength} characters`);if(n.minLength&&u.length<n.minLength)throw Error(`Min title length is ${n.minLength} characters`);return u.trim()}}),s=r.computed(()=>({maxWidth:n.maxWidth??"80%"})),l=()=>{e.value=o.value&&!o.error?o.value:e.value,o.reset()},c=r.ref();return(u,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-editable-title",r.unref(vl).component]),style:r.normalizeStyle(s.value)},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(vl).container),onClick:p[3]||(p[3]=()=>{var f;return(f=c.value)==null?void 0:f.focus()})},[u.prefix?(r.openBlock(),r.createElementBlock("span",B0,r.toDisplayString(u.prefix.trim())+" ",1)):r.createCommentVNode("",!0),p[4]||(p[4]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"inputRef",ref:c,"onUpdate:modelValue":p[0]||(p[0]=f=>r.unref(o).value=f),placeholder:u.placeholder,onFocusout:l,onKeydown:[p[1]||(p[1]=r.withKeys((...f)=>r.unref(o).reset&&r.unref(o).reset(...f),["escape"])),p[2]||(p[2]=r.withKeys(f=>{var m;return(m=f.target)==null?void 0:m.blur()},["enter"]))]},null,40,V0),[[r.vModelText,r.unref(o).value]])],2),p[5]||(p[5]=r.createTextVNode()),r.unref(o).error?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(r.unref(vl).error)},r.toDisplayString(r.unref(o).error),3)):r.createCommentVNode("",!0)],6))}}),A0={inheritAttrs:!1},P0={class:"double-contour"};function D0(t,e,n,o,s,l){return r.openBlock(),r.createElementBlock("div",P0,[r.createElementVNode("div",r.normalizeProps(r.guardReactiveProps(t.$attrs)),[r.renderSlot(t.$slots,"default")],16)])}const hr=Lt(A0,[["render",D0]]);function Au(t){r.onMounted(t),r.onUpdated(t)}const Cl=new WeakMap,wl=new ResizeObserver(t=>{for(const e of t)ct(Cl.get(e.target),n=>n(e))});function Pu(t,e){Cl.set(t,e),wl.unobserve(t),wl.observe(t)}function Du(t){wl.unobserve(t),Cl.delete(t)}const F0=8,Fu=4;function Zn(t,e="label"){const n=new Set;Au(()=>{ct(t==null?void 0:t.value,o=>{const s=o.querySelector(e);s&&(n.add(s),Pu(s,()=>{const l=yu(()=>s.getBoundingClientRect().width+mi(F0,c=>Number.isNaN(c)?Fu:c+Fu));o.style.getPropertyValue("--label-offset-right-x")!==`${l}px`&&o.style.setProperty("--label-offset-right-x",`${l}px`)}))})}),r.onBeforeUnmount(()=>{Array.from(n.values()).map(o=>Du(o))})}function R0(t,e){const n=[];return e&&e.length>0&&e.forEach(o=>{const s=o(t);typeof s=="string"&&n.push(s)}),{isValid:n.length===0,errors:n}}function Ru(t,e){return r.computed(()=>R0(t.value,e))}const M0=r.defineComponent({__name:"PlIcon16",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>e.size==="large"?"--icon-size: 24px":""),o=r.computed(()=>`icon-16 icon-${e.name}`);return(s,l)=>(r.openBlock(),r.createElementBlock("i",{style:r.normalizeStyle(n.value),class:r.normalizeClass([o.value,s.$style.icon])},null,6))}}),I0="_icon_1ugxm_2",O0={icon:I0},L0={$style:O0},vo=Lt(M0,[["__cssModules",L0]]),G0=r.defineComponent({__name:"PlIcon24",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>`icon-24 icon-${e.name}`);return(o,s)=>(r.openBlock(),r.createElementBlock("i",{class:r.normalizeClass([n.value,o.$style.icon])},null,2))}}),z0="_icon_1ugxm_2",$0={icon:z0},U0={$style:$0},bs=Lt(G0,[["__cssModules",U0]]),Z0={class:"pl-text-field__envelope"},W0={key:0,ref:"label"},H0={key:0,class:"required-icon"},j0={key:1,class:"pl-text-field__prefix"},q0=["disabled","placeholder","type"],K0={class:"pl-text-field__append"},Y0={key:0,class:"pl-text-field__error"},J0={key:1,class:"pl-text-field__helper"},X0={name:"PlTextField"},Ur=r.defineComponent({...X0,props:r.mergeModels({label:{},clearable:{type:[Boolean,Function]},parse:{type:Function},required:{type:Boolean},error:{},helper:{},placeholder:{},disabled:{type:Boolean},dashed:{type:Boolean},prefix:{},rules:{},type:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useSlots(),n=r.useModel(t,"modelValue"),o=t,s=r.ref(void 0),l=r.ref(),c=r.ref(!1),u=r.reactive({cached:void 0}),p=r.computed({get(){return u.cached?u.cached.value:n.value===void 0||n.value===null?"":String(n.value)},set(F){if(u.cached=void 0,o.parse)try{n.value=o.parse(F)}catch(N){u.cached={error:N instanceof Error?N.message:String(N),value:F}}else n.value=F}}),f=r.computed(()=>o.type&&o.type==="password"?c.value?"text":o.type:"text"),m=r.computed(()=>c.value?"view-show":"view-hide"),y=()=>{o.clearable&&(u.cached=void 0,n.value=o.clearable===!0?"":o.clearable())},T=Ru(p,o.rules||[]),B=r.computed(()=>o.clearable?o.clearable===!0?n.value==="":n.value===o.clearable():n.value===""),A=r.computed(()=>!B.value),I=r.computed(()=>{const F=[];return o.error&&F.push(o.error),u.cached&&F.push(u.cached.error),T.value.isValid||F.push(...T.value.errors),F}),L=r.computed(()=>I.value.length>0),C=r.computed(()=>o.clearable&&A.value&&o.type!=="password"),R=()=>c.value=!c.value,O=()=>{u.cached=void 0};return Zn(s),(F,N)=>(r.openBlock(),r.createElementBlock("div",Z0,[r.createElementVNode("div",{ref_key:"rootRef",ref:s,class:r.normalizeClass(["pl-text-field",{error:L.value,disabled:F.disabled,dashed:F.dashed,nonEmpty:A.value}])},[F.label?(r.openBlock(),r.createElementBlock("label",W0,[F.required?(r.openBlock(),r.createElementBlock("i",H0)):r.createCommentVNode("",!0),N[1]||(N[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(F.label),1),N[2]||(N[2]=r.createTextVNode()),r.unref(e).tooltip?(r.openBlock(),r.createBlock(r.unref(Ct),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(F.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),N[5]||(N[5]=r.createTextVNode()),F.prefix?(r.openBlock(),r.createElementBlock("div",j0,r.toDisplayString(F.prefix),1)):r.createCommentVNode("",!0),N[6]||(N[6]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":N[0]||(N[0]=U=>p.value=U),disabled:F.disabled,placeholder:F.placeholder||"...",type:f.value,spellcheck:"false",onFocusout:O},null,40,q0),[[r.vModelDynamic,p.value]]),N[7]||(N[7]=r.createTextVNode()),r.createElementVNode("div",K0,[C.value?(r.openBlock(),r.createBlock(r.unref(vo),{key:0,class:"pl-text-field__clearable",name:"delete-clear",onClick:y})):r.createCommentVNode("",!0),N[3]||(N[3]=r.createTextVNode()),F.type==="password"?(r.openBlock(),r.createBlock(r.unref(bs),{key:1,name:m.value,style:{cursor:"pointer"},onClick:R},null,8,["name"])):r.createCommentVNode("",!0),N[4]||(N[4]=r.createTextVNode()),r.renderSlot(F.$slots,"append")]),N[8]||(N[8]=r.createTextVNode()),r.createVNode(hr,{class:"pl-text-field__contour"})],2),N[9]||(N[9]=r.createTextVNode()),L.value?(r.openBlock(),r.createElementBlock("div",Y0,r.toDisplayString(I.value.join(" ")),1)):F.helper?(r.openBlock(),r.createElementBlock("div",J0,r.toDisplayString(F.helper),1)):r.createCommentVNode("",!0)]))}}),Q0=["disabled","placeholder"],ew=r.defineComponent({__name:"PlSearchField",props:{modelValue:{},clearable:{type:Boolean},placeholder:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,s=r.ref(void 0),l=r.ref(),c=r.computed({get(){return o.modelValue??""},set(f){n("update:modelValue",f)}}),u=r.computed(()=>!!o.modelValue),p=()=>n("update:modelValue","");return(f,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:s,class:r.normalizeClass(["pl-search-field",[f.$style.component]])},[r.createVNode(r.unref(bs),{name:"search"}),m[1]||(m[1]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:l,"onUpdate:modelValue":m[0]||(m[0]=y=>c.value=y),disabled:f.disabled,type:"text",placeholder:f.placeholder||"Find...",spellcheck:"false"},null,8,Q0),[[r.vModelText,c.value]]),m[2]||(m[2]=r.createTextVNode()),f.clearable&&u.value?(r.openBlock(),r.createBlock(r.unref(vo),{key:0,class:r.normalizeClass(f.$style.clear),name:"delete-clear",onClick:r.withModifiers(p,["stop"])},null,8,["class"])):r.createCommentVNode("",!0)],2))}}),tw="_component_1ng5b_1",nw="_clear_1ng5b_35",rw={component:tw,clear:nw},ow={$style:rw},Mu=Lt(ew,[["__cssModules",ow]]),iw={class:"ui-text-area__envelope"},sw={key:0,ref:"label"},aw={key:0,class:"required-icon"},lw=["readonly","rows","disabled","placeholder"],cw={class:"ui-text-area__append"},dw={key:0,class:"ui-text-area__error"},uw={key:1,class:"ui-text-area__helper"},pw={name:"PlTextArea"},hw=r.defineComponent({...pw,props:{modelValue:{},label:{},required:{type:Boolean},error:{},helper:{},placeholder:{},disabled:{type:Boolean},readonly:{type:Boolean},dashed:{type:Boolean},rows:{},autogrow:{type:Boolean},rules:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,s=t,l=r.ref(),c=r.ref(),u=r.computed({get(){return s.modelValue??""},set(B){o("update:modelValue",B)}}),p=r.computed(()=>!!s.modelValue),f=Ru(u,s.rules||[]);Zn(l);const m=r.computed(()=>{const B=[];return s.error&&B.push(s.error),B.push(...f.value.errors),B}),y=r.computed(()=>m.value.length>0),T=()=>{if(!s.autogrow)return;const B=c.value;B&&(B.style.height="auto",B.style.height=`${B.scrollHeight}px`)};return r.onMounted(()=>{T()}),(B,A)=>(r.openBlock(),r.createElementBlock("div",iw,[r.createElementVNode("div",{ref_key:"root",ref:l,class:r.normalizeClass(["ui-text-area",{error:y.value,disabled:B.disabled,dashed:B.dashed,nonEmpty:p.value}])},[B.label?(r.openBlock(),r.createElementBlock("label",sw,[B.required?(r.openBlock(),r.createElementBlock("i",aw)):r.createCommentVNode("",!0),A[1]||(A[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(B.label),1),A[2]||(A[2]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(Ct),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(B.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),A[3]||(A[3]=r.createTextVNode()),r.withDirectives(r.createElementVNode("textarea",{ref_key:"input",ref:c,"onUpdate:modelValue":A[0]||(A[0]=I=>u.value=I),readonly:B.readonly,rows:B.rows,disabled:B.disabled,placeholder:B.placeholder??"...",spellcheck:"false",onInput:T},null,40,lw),[[r.vModelText,u.value]]),A[4]||(A[4]=r.createTextVNode()),r.createElementVNode("div",cw,[r.renderSlot(B.$slots,"append")]),A[5]||(A[5]=r.createTextVNode()),r.createVNode(hr,{class:"ui-text-area__contour"})],2),A[6]||(A[6]=r.createTextVNode()),y.value?(r.openBlock(),r.createElementBlock("div",dw,r.toDisplayString(m.value.join(" ")),1)):B.helper?(r.openBlock(),r.createElementBlock("div",uw,r.toDisplayString(B.helper),1)):r.createCommentVNode("",!0)]))}});function Iu(t,e){const n=t.scrollTop,o=t.getBoundingClientRect().height,s=e.offsetTop,l=e.getBoundingClientRect().height;return s+l<o+n&&s>n}function Ou(t,e){const n=t.scrollTop,o=t.getBoundingClientRect().height,s=e.offsetTop,l=e.getBoundingClientRect().height;return s+l<o+n?"ceil":s>n?"floor":"visible"}function gi(t,e,n={}){const o=t.scrollTop,s=t.getBoundingClientRect().height,l=e.getBoundingClientRect().height,c=e.offsetTop,u=Ou(t,e);if(u==="visible")return;const p=f=>{const m=u==="floor"?c-(s-l):c;t.scrollTop=o+f*(m-o)};Iu(t,e)||bu({duration:n.duration||100,timing:wu(f=>f),draw:p})}function bl(t,e,n,o){return t.addEventListener(e,n,o),function(){t.removeEventListener(e,n)}}function fw(t,e){const n=e.getBoundingClientRect();return t.x<n.x||t.x>n.x+n.width||t.y<n.y||t.y>n.y+n.height}function Lu(t){return t!==null&&typeof t=="object"}function Dt(t,e){return Lu(t)&&Lu(e)?Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>Dt(t[n],e[n])):t===e}function xl(t,e){return t.some(n=>Dt(n,e))}const kl=r.defineComponent({__name:"LongText",setup(t){r.useCssVars(m=>({"8d68520c":c.value}));const e=r.ref(!1),n=r.ref(),o=r.ref(!1),s=r.computed(()=>o.value&&e.value?"ui-lt-animate":""),l=xu(m=>o.value=m,500),c=r.computed(()=>{var m;return n.value?`${((m=n.value)==null?void 0:m.innerHTML.length)*.4}s`:"5s"});function u(){const m=ul(n.value,"span cannot be empty");e.value=m.clientWidth<m.scrollWidth}function p(){u(),l(!0)}function f(){l(!1)}return(m,y)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps(m.$attrs,{class:"ui-lt-container"}),[r.createElementVNode("span",{onMouseover:p,onMouseleave:f},[r.createElementVNode("span",{ref_key:"span",ref:n,class:r.normalizeClass(s.value)},[r.renderSlot(m.$slots,"default")],2)],32)],16))}}),mw=r.defineComponent({__name:"PlMaskIcon24",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>`mask-24 mask-${e.name}`);return(o,s)=>(r.openBlock(),r.createElementBlock("i",{class:r.normalizeClass([n.value,o.$style.icon])},null,2))}}),gw="_icon_1ugxm_2",yw={icon:gw},_w={$style:yw},cn=Lt(mw,[["__cssModules",_w]]),vw={class:"pl-dropdown__envelope"},Cw=["tabindex"],ww={class:"pl-dropdown__container"},bw={class:"pl-dropdown__field"},xw=["disabled","placeholder"],kw={class:"pl-dropdown__controls"},Sw={key:0},Ew={key:0,class:"required-icon"},Tw={key:0,class:"nothing-found"},Bw={key:0,class:"pl-dropdown__error"},Vw={key:1,class:"pl-dropdown__helper"},Nw={key:2,class:"pl-dropdown__helper"},Aw={name:"PlDropdown"},yi=r.defineComponent({...Aw,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},arrowIcon:{default:void 0},arrowIconLarge:{default:void 0},optionSize:{default:"small"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,s=r.useSlots(),l=r.ref(),c=r.ref(),u=r.ref(),p=r.reactive({search:"",activeIndex:-1,open:!1,optionsHeight:0}),f=()=>mi(O.value.findIndex(w=>Dt(w.value,o.modelValue)),w=>w<0?0:w),m=()=>p.activeIndex=f(),y=r.computed(()=>o.options===void 0),T=r.computed(()=>y.value?!0:o.disabled),B=r.computed(()=>(o.options??[]).findIndex(w=>Dt(w.value,o.modelValue))),A=r.computed(()=>{if(!y.value){if(o.error)return o.error;if(o.modelValue!==void 0&&B.value===-1)return"The selected value is not one of the options"}}),I=r.computed(()=>pr(o.options??[]).map((w,k)=>({...w,index:k,isSelected:k===B.value,isActive:k===p.activeIndex}))),L=r.computed(()=>{const w=r.unref(I).find(k=>Dt(k.value,o.modelValue));return(w==null?void 0:w.label)||o.modelValue}),C=r.computed(()=>!p.open&&o.modelValue?"":o.modelValue?String(L.value):o.placeholder),R=r.computed(()=>o.modelValue!==void 0&&o.modelValue!==null),O=r.computed(()=>{const w=I.value;return p.search?w.filter(k=>{const $=p.search.toLowerCase();return k.label.toLowerCase().includes($)||k.description&&k.description.toLowerCase().includes($)?!0:typeof k.value=="string"?k.value.toLowerCase().includes($):k.value===p.search}):w}),F=r.computed(()=>T.value?void 0:"0"),N=w=>{var k;n("update:modelValue",w),p.search="",p.open=!1,(k=l==null?void 0:l.value)==null||k.focus()},U=()=>n("update:modelValue",void 0),te=()=>{var w;return(w=u.value)==null?void 0:w.focus()},j=()=>p.open=!p.open,Y=()=>p.open=!0,q=w=>{var k,$;const Q=w.relatedTarget;!((k=l.value)!=null&&k.contains(Q))&&!(($=c.value)!=null&&$.contains(Q))&&(p.search="",p.open=!1)},ee=()=>{const w=c.value;w&&ct(w.querySelector(".hovered-item"),k=>{gi(w,k)})},G=w=>{var k,$;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(w.code))w.preventDefault();else return;const{open:Q,activeIndex:ne}=p;if(!Q){w.code==="Enter"&&(p.open=!0);return}w.code==="Escape"&&(p.open=!1,(k=l.value)==null||k.focus());const be=r.unref(O),{length:$e}=be;if(!$e)return;w.code==="Enter"&&N(($=be.find(xr=>xr.index===ne))==null?void 0:$.value);const ot=be.findIndex(xr=>xr.index===ne)??-1,wn=w.code==="ArrowDown"?1:w.code==="ArrowUp"?-1:0,In=Math.abs(ot+wn+$e)%$e;p.activeIndex=O.value[In].index??-1};Zn(l),r.watch(()=>o.modelValue,m,{immediate:!0}),r.watch(()=>p.open,w=>{var k;return w?(k=u.value)==null?void 0:k.focus():""}),r.watchPostEffect(()=>{p.search,p.activeIndex>=0&&p.open&&ee()});const S=r.reactive({top:"0px",left:"0px",width:"0px"});return r.watch(c,w=>{if(w){const k=w.getBoundingClientRect();p.optionsHeight=k.height,window.dispatchEvent(new CustomEvent("adjust"))}}),_o(l,w=>{const k=w.top+w.height+3;k+p.optionsHeight>w.clientHeight?S.top=w.top-p.optionsHeight-3+"px":S.top=k+"px",S.left=w.left+"px",S.width=w.width+"px"}),(w,k)=>(r.openBlock(),r.createElementBlock("div",vw,[r.createElementVNode("div",{ref_key:"root",ref:l,tabindex:F.value,class:r.normalizeClass(["pl-dropdown",{open:p.open,error:w.error,disabled:T.value}]),onKeydown:G,onFocusout:q},[r.createElementVNode("div",ww,[r.createElementVNode("div",bw,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:u,"onUpdate:modelValue":k[0]||(k[0]=$=>p.search=$),type:"text",tabindex:"-1",disabled:T.value,placeholder:C.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:Y},null,40,xw),[[r.vModelText,p.search]]),k[4]||(k[4]=r.createTextVNode()),p.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,onClick:te},[r.createVNode(kl,{class:"input-value"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(L.value),1)]),_:1})])),k[5]||(k[5]=r.createTextVNode()),r.createElementVNode("div",kw,[y.value?(r.openBlock(),r.createBlock(r.unref(cn),{key:0,name:"loading"})):r.createCommentVNode("",!0),k[1]||(k[1]=r.createTextVNode()),w.clearable&&R.value?(r.openBlock(),r.createBlock(r.unref(vo),{key:1,name:"delete-clear",onClick:r.withModifiers(U,["stop"])})):r.createCommentVNode("",!0),k[2]||(k[2]=r.createTextVNode()),r.renderSlot(w.$slots,"append"),k[3]||(k[3]=r.createTextVNode()),w.arrowIconLarge?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["arrow-icon",[`icon-24 ${w.arrowIconLarge}`]]),onClick:r.withModifiers(j,["stop"])},null,2)):w.arrowIcon?(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(["arrow-icon",[`icon-16 ${w.arrowIcon}`]]),onClick:r.withModifiers(j,["stop"])},null,2)):(r.openBlock(),r.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:r.withModifiers(j,["stop"])}))])]),k[9]||(k[9]=r.createTextVNode()),w.label?(r.openBlock(),r.createElementBlock("label",Sw,[w.required?(r.openBlock(),r.createElementBlock("i",Ew)):r.createCommentVNode("",!0),k[6]||(k[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(w.label),1),k[7]||(k[7]=r.createTextVNode()),r.unref(s).tooltip?(r.openBlock(),r.createBlock(r.unref(Ct),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(w.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),k[10]||(k[10]=r.createTextVNode()),p.open?(r.openBlock(),r.createBlock(r.Teleport,{key:1,to:"body"},[r.createElementVNode("div",{ref_key:"list",ref:c,class:"pl-dropdown__options",style:r.normalizeStyle(S),tabindex:"-1"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(O.value,($,Q)=>(r.openBlock(),r.createBlock(yo,{key:Q,option:$,"is-selected":$.isSelected,"is-hovered":$.isActive,size:w.optionSize,onClick:r.withModifiers(ne=>N($.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),k[8]||(k[8]=r.createTextVNode()),O.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Tw,"Nothing found"))],4)])):r.createCommentVNode("",!0),k[11]||(k[11]=r.createTextVNode()),r.createVNode(hr,{class:"pl-dropdown__contour"})])],42,Cw),k[12]||(k[12]=r.createTextVNode()),A.value?(r.openBlock(),r.createElementBlock("div",Bw,r.toDisplayString(A.value),1)):y.value&&w.loadingOptionsHelper?(r.openBlock(),r.createElementBlock("div",Vw,r.toDisplayString(w.loadingOptionsHelper),1)):w.helper?(r.openBlock(),r.createElementBlock("div",Nw,r.toDisplayString(w.helper),1)):r.createCommentVNode("",!0)]))}}),Pw={name:"PlDropdownRef"},Dw=r.defineComponent({...Pw,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},optionSize:{default:"small"}},emits:["update:modelValue"],setup(t){const e=t,n=r.computed(()=>{var s;return(s=e.options)==null?void 0:s.map(l=>({label:l.label,value:l.ref}))}),o=r.computed(()=>e.disabled?"icon-link-disabled":"icon-link");return(s,l)=>(r.openBlock(),r.createBlock(r.unref(yi),r.mergeProps(e,{options:n.value,"loading-options-helper":s.loadingOptionsHelper,"arrow-icon-large":o.value,"onUpdate:modelValue":l[0]||(l[0]=c=>s.$emit("update:modelValue",c))}),null,16,["options","loading-options-helper","arrow-icon-large"]))}});function Fw(t,e){return r.computed(()=>{const n=pr(t.value);return e.value?n.filter(o=>o.label.toLowerCase().includes(e.value.toLowerCase())):n})}const Rw={class:"resizable-input"},Mw=["placeholder","value","disabled"],Iw=r.defineComponent({__name:"ResizableInput",props:{modelValue:{},placeholder:{},value:{},disabled:{type:Boolean},maxWidth:{},width:{}},emits:["input","update:modelValue"],setup(t,{emit:e}){const n=t,o=e,s=r.computed(()=>{var u;return n.placeholder?n.placeholder:(u=n.modelValue||n.value)==null?void 0:u.replace('"',"")}),l=r.computed(()=>{const u={};return n.width&&(u.width=n.width),n.maxWidth&&(u.maxWidth=n.maxWidth),u});function c(u){const p=u.target.value;o("update:modelValue",p)}return(u,p)=>(r.openBlock(),r.createElementBlock("div",Rw,[r.createElementVNode("span",{style:r.normalizeStyle(l.value),class:"resizable-input__size-span"},r.toDisplayString(s.value),5),p[0]||(p[0]=r.createTextVNode()),r.createElementVNode("input",r.mergeProps(u.$attrs,{placeholder:u.placeholder,value:n.modelValue,disabled:n.disabled,style:l.value,onInput:c}),null,16,Mw)]))}}),Ow={class:"dropdown-tab-item__title text-caps13"},Lw=r.defineComponent({__name:"TabItem",props:{option:{},isSelected:{type:Boolean,default:!1},isHovered:{type:Boolean,default:!1}},setup(t){const e=t,n=r.computed(()=>e.option.label),o=r.computed(()=>{const s=[];return e.isSelected&&s.push("dropdown-tab-item__selected"),e.isHovered&&s.push("hovered-item"),s.join(" ")});return(s,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([o.value,"dropdown-tab-item"])},[r.createElementVNode("div",Ow,r.toDisplayString(n.value),1)],2))}}),Gw={class:"pl-line-dropdown__prefix"},zw={class:"pl-line-dropdown__icon-wrapper"},$w={class:"pl-line-dropdown__icon"},Uw={key:0,class:"pl-line-dropdown__no-item"},Zw={key:0,class:"pl-line-dropdown__no-item"},Gu=r.defineComponent({__name:"PlDropdownLine",props:{modelValue:{},disabled:{type:Boolean},prefix:{default:""},options:{},placeholder:{default:"Select.."},mode:{default:"list"},tabsContainerStyles:{type:[Boolean,null,String,Object,Array],default:void 0},clearable:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,s=r.reactive({isOpen:!1,activeOption:-1,optionsHeight:0}),l=r.ref(),c=r.ref(),u=r.computed(()=>{const q=[];return s.isOpen&&q.push("open"),o.disabled&&q.push("disabled"),q.join(" ")}),p=r.ref(""),f=Fw(r.toRef(o,"options"),p),m=r.computed(()=>!!(o.clearable&&s.isOpen&&o.modelValue&&y.value)),y=r.computed(()=>{if(o.modelValue){const q=A();if(q!==-1){const ee=pr(o.options)[q];return typeof ee.label=="object"?ee.label.title:ee.label}}return""}),T=r.ref(y.value),B=r.computed(()=>s.isOpen&&p.value&&p.value.length>=y.value.length-1?p.value:y.value??"...");ws(l,()=>{o.mode==="list"&&(s.isOpen=!1)}),r.watch(()=>T.value,q=>{y.value!==q?p.value=q:p.value=""}),r.watch(()=>s.isOpen,q=>{var ee;q&&l.value&&((ee=l.value.querySelector("input"))==null||ee.focus(),r.nextTick(()=>te()))}),r.watch(()=>o.modelValue,()=>I(),{immediate:!0});function A(){return o.options.findIndex(q=>Dt(q.value,o.modelValue))}function I(){s.activeOption=mi(f.value.findIndex(q=>Dt(q.value,o.modelValue)),q=>q<0?0:q),T.value=y.value}function L(){p.value=""}function C(){o.disabled?s.isOpen=!1:r.nextTick(()=>{s.isOpen=!s.isOpen})}function R(){o.mode==="list"&&(s.isOpen=!1)}function O(q){q&&(n("update:modelValue",q.value),R(),L())}function F(q){return Dt(q.value,o.modelValue)}const N=q=>{var ee,G;const S=q.relatedTarget;!((ee=l.value)!=null&&ee.contains(S))&&!((G=c.value)!=null&&G.contains(S))&&(p.value="",s.isOpen=!1)};function U(q){const{activeOption:ee}=s;if(!s.isOpen&&q.code==="Enter"){s.isOpen=!0;return}const{length:G}=f.value;if(!G)return;["ArrowDown","ArrowUp","Enter"].includes(q.code)&&q.preventDefault(),q.code==="Enter"&&O(f.value[ee]);const S=q.code==="ArrowDown"?1:q.code==="ArrowUp"?-1:0;s.activeOption=Math.abs(ee+S+G)%G,requestAnimationFrame(te)}function te(){const q=c.value;q&&ct(q.querySelector(".hovered-item"),ee=>{o.mode==="list"?gi(q,ee):ee.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}function j(){n("update:modelValue",void 0)}const Y=r.reactive({top:"0px",left:"0px"});return r.watch(c,q=>{if(q){const ee=q.getBoundingClientRect();s.optionsHeight=ee.height,window.dispatchEvent(new CustomEvent("adjust"))}}),_o(l,q=>{const ee=q.top+q.height+2;ee+s.optionsHeight>q.clientHeight?Y.top=q.top-s.optionsHeight-2+"px":Y.top=ee+"px",Y.left=q.left+"px"}),(q,ee)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"container",ref:l,tabindex:"0",class:r.normalizeClass([u.value,"pl-line-dropdown uc-pointer"]),onKeydown:U,onFocusout:N,onClick:C},[r.createElementVNode("div",Gw,r.toDisplayString(o==null?void 0:o.prefix),1),ee[6]||(ee[6]=r.createTextVNode()),r.createVNode(Iw,{modelValue:T.value,"onUpdate:modelValue":ee[0]||(ee[0]=G=>T.value=G),placeholder:B.value,disabled:o.disabled,class:"pl-line-dropdown__input"},null,8,["modelValue","placeholder","disabled"]),ee[7]||(ee[7]=r.createTextVNode()),r.createElementVNode("div",zw,[r.withDirectives(r.createElementVNode("div",$w,null,512),[[r.vShow,!m.value]]),ee[1]||(ee[1]=r.createTextVNode()),r.withDirectives(r.createElementVNode("div",{class:"pl-line-dropdown__icon-clear",onClick:j},null,512),[[r.vShow,m.value]])]),ee[8]||(ee[8]=r.createTextVNode()),s.isOpen?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:"body"},[o.mode==="list"?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"list",ref:c,style:r.normalizeStyle(Y),tabindex:"-1",class:"pl-line-dropdown__items",onFocusout:N},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(f),(G,S)=>r.renderSlot(q.$slots,"item",{key:S,item:G,textItem:"text",isSelected:F(G),isHovered:s.activeOption==S,onClick:r.withModifiers(w=>O(G),["stop"])},()=>[r.createVNode(yo,{option:G,"text-item":"text","is-selected":F(G),"is-hovered":s.activeOption==S,size:"medium",onClick:r.withModifiers(w=>O(G),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),ee[3]||(ee[3]=r.createTextVNode()),r.unref(f).length===0?(r.openBlock(),r.createElementBlock("div",Uw,ee[2]||(ee[2]=[r.createElementVNode("div",{class:"pl-line-dropdown__no-item-title text-s"},"Didn't find anything that matched",-1)]))):r.createCommentVNode("",!0)],36)):o.mode==="tabs"?(r.openBlock(),r.createElementBlock("div",{key:1,ref_key:"list",ref:c,style:r.normalizeStyle(Y),tabindex:"-1",class:"pl-line-dropdown__items-tabs",onFocusout:N},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(f),(G,S)=>r.renderSlot(q.$slots,"item",{key:S,item:G,isSelected:F(G),isHovered:s.activeOption==S,onClick:r.withModifiers(w=>O(G),["stop"])},()=>[r.createVNode(Lw,{option:G,"is-selected":F(G),"is-hovered":s.activeOption==S,onClick:r.withModifiers(w=>O(G),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),ee[5]||(ee[5]=r.createTextVNode()),r.unref(f).length===0?(r.openBlock(),r.createElementBlock("div",Zw,ee[4]||(ee[4]=[r.createElementVNode("div",{class:"pl-line-dropdown__no-item-title text-s"},"Didn't find anything that matched",-1)]))):r.createCommentVNode("",!0)],36)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)],34))}}),Ww={class:"ui-dropdown__envelope"},Hw=["tabindex"],jw={class:"ui-dropdown__container"},qw={class:"ui-dropdown__field"},Kw=["disabled","placeholder"],Yw={class:"ui-dropdown__controls"},Jw={key:0},Xw={key:0,class:"required-icon"},Qw={key:0,class:"nothing-found"},eb={key:0,class:"ui-dropdown__error"},tb={key:1,class:"ui-dropdown__helper"},nb={key:2,class:"ui-dropdown__helper"},rb={name:"PlDropdown"},ob=r.defineComponent({...rb,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},arrowIcon:{default:void 0},arrowIconLarge:{default:void 0},optionSize:{default:"small"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,s=r.useSlots(),l=r.ref(),c=r.ref(),u=r.ref(),p=r.reactive({search:"",activeIndex:-1,open:!1}),f=()=>mi(O.value.findIndex(S=>Dt(S.value,o.modelValue)),S=>S<0?0:S),m=()=>p.activeIndex=f(),y=r.computed(()=>o.options===void 0),T=r.computed(()=>y.value?!0:o.disabled),B=r.computed(()=>(o.options??[]).findIndex(S=>Dt(S.value,o.modelValue))),A=r.computed(()=>{if(!y.value){if(o.error)return o.error;if(o.modelValue!==void 0&&B.value===-1)return"The selected value is not one of the options"}}),I=r.computed(()=>pr(o.options??[]).map((S,w)=>({...S,index:w,isSelected:w===B.value,isActive:w===p.activeIndex}))),L=r.computed(()=>{const S=r.unref(I).find(w=>Dt(w.value,o.modelValue));return(S==null?void 0:S.label)||o.modelValue}),C=r.computed(()=>!p.open&&o.modelValue?"":o.modelValue?String(L.value):o.placeholder),R=r.computed(()=>o.modelValue!==void 0&&o.modelValue!==null),O=r.computed(()=>{const S=I.value;return p.search?S.filter(w=>{const k=p.search.toLowerCase();return w.label.toLowerCase().includes(k)||w.description&&w.description.toLowerCase().includes(k)?!0:typeof w.value=="string"?w.value.toLowerCase().includes(k):w.value===p.search}):S}),F=r.computed(()=>T.value?void 0:"0"),N=S=>{var w;n("update:modelValue",S),p.search="",p.open=!1,(w=l==null?void 0:l.value)==null||w.focus()},U=()=>n("update:modelValue",void 0),te=()=>{var S;return(S=u.value)==null?void 0:S.focus()},j=()=>p.open=!p.open,Y=()=>p.open=!0,q=S=>{var w;(w=l==null?void 0:l.value)!=null&&w.contains(S.relatedTarget)||(p.search="",p.open=!1)},ee=()=>{const S=c.value;S&&ct(S.querySelector(".hovered-item"),w=>{gi(S,w)})},G=S=>{var w,k;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(S.code))S.preventDefault();else return;const{open:$,activeIndex:Q}=p;if(!$){S.code==="Enter"&&(p.open=!0);return}S.code==="Escape"&&(p.open=!1,(w=l.value)==null||w.focus());const ne=r.unref(O),{length:be}=ne;if(!be)return;S.code==="Enter"&&N((k=ne.find(In=>In.index===Q))==null?void 0:k.value);const $e=ne.findIndex(In=>In.index===Q)??-1,ot=S.code==="ArrowDown"?1:S.code==="ArrowUp"?-1:0,wn=Math.abs($e+ot+be)%be;p.activeIndex=O.value[wn].index??-1};return Zn(l),r.watch(()=>o.modelValue,m,{immediate:!0}),r.watch(()=>p.open,S=>{var w;return S?(w=u.value)==null?void 0:w.focus():""}),r.watchPostEffect(()=>{p.search,p.activeIndex>=0&&p.open&&ee()}),(S,w)=>(r.openBlock(),r.createElementBlock("div",Ww,[r.createElementVNode("div",{ref_key:"root",ref:l,tabindex:F.value,class:r.normalizeClass(["ui-dropdown",{open:p.open,error:S.error,disabled:T.value}]),onKeydown:G,onFocusout:q},[r.createElementVNode("div",jw,[r.createElementVNode("div",qw,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:u,"onUpdate:modelValue":w[0]||(w[0]=k=>p.search=k),type:"text",tabindex:"-1",disabled:T.value,placeholder:C.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:Y},null,40,Kw),[[r.vModelText,p.search]]),w[4]||(w[4]=r.createTextVNode()),p.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,onClick:te},[r.createVNode(kl,{class:"input-value"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(L.value),1)]),_:1})])),w[5]||(w[5]=r.createTextVNode()),r.createElementVNode("div",Yw,[y.value?(r.openBlock(),r.createBlock(r.unref(cn),{key:0,name:"loading"})):r.createCommentVNode("",!0),w[1]||(w[1]=r.createTextVNode()),S.clearable&&R.value?(r.openBlock(),r.createBlock(r.unref(vo),{key:1,name:"delete-clear",onClick:r.withModifiers(U,["stop"])})):r.createCommentVNode("",!0),w[2]||(w[2]=r.createTextVNode()),r.renderSlot(S.$slots,"append"),w[3]||(w[3]=r.createTextVNode()),S.arrowIconLarge?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["arrow-icon",[`icon-24 ${S.arrowIconLarge}`]]),onClick:r.withModifiers(j,["stop"])},null,2)):S.arrowIcon?(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(["arrow-icon",[`icon-16 ${S.arrowIcon}`]]),onClick:r.withModifiers(j,["stop"])},null,2)):(r.openBlock(),r.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:r.withModifiers(j,["stop"])}))])]),w[9]||(w[9]=r.createTextVNode()),S.label?(r.openBlock(),r.createElementBlock("label",Jw,[S.required?(r.openBlock(),r.createElementBlock("i",Xw)):r.createCommentVNode("",!0),w[6]||(w[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(S.label),1),w[7]||(w[7]=r.createTextVNode()),r.unref(s).tooltip?(r.openBlock(),r.createBlock(r.unref(Ct),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(S.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),w[10]||(w[10]=r.createTextVNode()),p.open?(r.openBlock(),r.createElementBlock("div",{key:1,ref_key:"list",ref:c,class:"ui-dropdown__options"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(O.value,(k,$)=>(r.openBlock(),r.createBlock(yo,{key:$,option:k,"is-selected":k.isSelected,"is-hovered":k.isActive,size:S.optionSize,onClick:r.withModifiers(Q=>N(k.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),w[8]||(w[8]=r.createTextVNode()),O.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Qw,"Nothing found"))],512)):r.createCommentVNode("",!0),w[11]||(w[11]=r.createTextVNode()),r.createVNode(hr,{class:"ui-dropdown__contour"})])],42,Hw),w[12]||(w[12]=r.createTextVNode()),A.value?(r.openBlock(),r.createElementBlock("div",eb,r.toDisplayString(A.value),1)):y.value&&S.loadingOptionsHelper?(r.openBlock(),r.createElementBlock("div",tb,r.toDisplayString(S.loadingOptionsHelper),1)):S.helper?(r.openBlock(),r.createElementBlock("div",nb,r.toDisplayString(S.helper),1)):r.createCommentVNode("",!0)]))}}),ib={key:0,class:"ui-progress-bar"},sb={class:"ui-progress-bar__messages d-flex align-center pl-6 pr-6"},ab={class:"ui-progress-bar__message flex-grow-1"},lb={class:"ui-progress-bar__percent"},cb=r.defineComponent({__name:"PlProgressBar",props:{loading:{type:Boolean},progress:{default:0},completeMessage:{default:"Completed"}},setup(t){const e=t,n=r.computed(()=>e.progress===100?e.completeMessage:"");return(o,s)=>o.loading?(r.openBlock(),r.createElementBlock("div",ib,[r.createElementVNode("div",{class:"ui-progress-bar__indicator",style:r.normalizeStyle({width:o.progress+"%"})},null,4),s[1]||(s[1]=r.createTextVNode()),r.createElementVNode("div",sb,[r.createElementVNode("div",ab,r.toDisplayString(n.value),1),s[0]||(s[0]=r.createTextVNode()),r.createElementVNode("div",lb,r.toDisplayString(o.progress+"%"),1)])])):r.createCommentVNode("",!0)}}),db={class:"mi-number-field__main-wrapper d-flex"},ub={class:"mi-number-field__wrapper flex-grow d-flex flex-align-center"},pb={key:0,class:"text-description"},hb=["disabled","placeholder"],fb={class:"mi-number-field__icons d-flex-column"},mb={key:0,class:"mi-number-field__hint text-description"},gb=r.defineComponent({__name:"PlNumberField",props:{modelValue:{},disabled:{type:Boolean},label:{default:void 0},placeholder:{default:void 0},step:{default:1},minValue:{default:void 0},maxValue:{default:void 0},errorMessage:{default:void 0},validate:{type:Function,default:void 0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,s=r.ref(),l=r.useSlots(),c=r.ref();Zn(s);const u=r.ref(!0),p=r.computed({get(){return u.value&&n.modelValue!==void 0?new Number(n.modelValue).toString():""},set(C){var R;C=C.replace(/,/g,""),T(C)?(o("update:modelValue",+C),C.toString()!==((R=n.modelValue)==null?void 0:R.toString())&&+C===n.modelValue&&C[C.length-1]!=="."&&(u.value=!1,r.nextTick(()=>{u.value=!0}))):(C.trim()===""&&o("update:modelValue",void 0),u.value=!1,r.nextTick(()=>{u.value=!0}))}}),f=r.computed(()=>{let C=[];return n.errorMessage&&C.push(n.errorMessage),T(n.modelValue)?(n.minValue!==void 0&&n.modelValue!==void 0&&n.modelValue<n.minValue&&C.push(`Model value must be higher than ${n.minValue}`),n.maxValue!==void 0&&n.modelValue!==void 0&&n.modelValue>n.maxValue&&C.push(`Model value must be less than ${n.maxValue}`)):C.push("Model value is not a number."),C=[...C],C.join(" ")}),m=r.computed(()=>!!(n.maxValue&&n.modelValue!==void 0&&(n.modelValue||0)+n.step>n.maxValue)),y=r.computed(()=>!!(n.minValue&&n.modelValue!==void 0&&(n.modelValue||0)-n.step<n.minValue));function T(C){return C!==void 0?(C=C==null?void 0:C.toString(),!isNaN(+C)&&!isNaN(parseFloat(C))):!1}function B(){if(!m.value){let C=0;n.modelValue===void 0?C=n.minValue?n.minValue:0:C=+(n.modelValue||0)+n.step,p.value=C.toString()}}function A(){if(!y.value){let C=0;n.modelValue===void 0?C=0:C=+(n.modelValue||0)-n.step,p.value=n.minValue?Math.max(n.minValue,C).toString():C.toString()}}function I(C){["ArrowDown","ArrowUp"].includes(C.code)&&C.preventDefault(),C.code==="ArrowUp"?B():C.code==="ArrowDown"&&A()}const L=C=>{C.detail>1&&C.preventDefault()};return(C,R)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:s,class:r.normalizeClass([{error:!!f.value.trim(),disabled:C.disabled},"mi-number-field d-flex-column"]),onMousedown:L,onKeydown:R[1]||(R[1]=O=>I(O))},[r.createElementVNode("div",db,[r.createVNode(hr,{class:"mi-number-field__contour"}),R[6]||(R[6]=r.createTextVNode()),r.createElementVNode("div",ub,[C.label?(r.openBlock(),r.createElementBlock("label",pb,[r.createTextVNode(r.toDisplayString(C.label)+" ",1),r.unref(l).tooltip?(r.openBlock(),r.createBlock(r.unref(Ct),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(C.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),R[2]||(R[2]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:c,"onUpdate:modelValue":R[0]||(R[0]=O=>p.value=O),disabled:C.disabled,placeholder:C.placeholder,class:"text-s flex-grow"},null,8,hb),[[r.vModelText,p.value]])]),R[7]||(R[7]=r.createTextVNode()),r.createElementVNode("div",fb,[r.createElementVNode("div",{class:r.normalizeClass([{disabled:m.value},"mi-number-field__icon d-flex flex-justify-center uc-pointer flex-grow flex-align-center"]),onClick:B},R[3]||(R[3]=[r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[r.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 4.93933L13.5303 10.4697L12.4697 11.5303L8 7.06065L3.53033 11.5303L2.46967 10.4697L8 4.93933Z",fill:"#110529"})],-1)]),2),R[5]||(R[5]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass([{disabled:y.value},"mi-number-field__icon d-flex flex-justify-center uc-pointer flex-grow flex-align-center"]),onClick:A},R[4]||(R[4]=[r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[r.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.46967 6.53033L3.53033 5.46967L8 9.93934L12.4697 5.46967L13.5303 6.53033L8 12.0607L2.46967 6.53033Z",fill:"#110529"})],-1)]),2)])]),R[8]||(R[8]=r.createTextVNode()),f.value.trim()?(r.openBlock(),r.createElementBlock("div",mb,r.toDisplayString(f.value),1)):r.createCommentVNode("",!0)],34))}}),yb={class:"pl-chip__text"},Sl=r.defineComponent({__name:"PlChip",props:{closeable:{type:Boolean},small:{type:Boolean}},emits:["close"],setup(t){const e=r.ref(),n=r.ref(!1);return r.onMounted(()=>{var o;e.value&&(n.value=((o=e.value)==null?void 0:o.clientWidth)>=256)}),(o,s)=>(r.openBlock(),r.createBlock(r.unref(Ct),{position:"top",class:"pl-chip-tooltip",delay:500},r.createSlots({default:r.withCtx(()=>[s[4]||(s[4]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"chip",ref:e,class:r.normalizeClass(["pl-chip",{small:o.small}])},[r.createElementVNode("div",yb,[r.renderSlot(o.$slots,"default")]),s[3]||(s[3]=r.createTextVNode()),o.closeable?(r.openBlock(),r.createElementBlock("div",{key:0,tabindex:"0",class:"pl-chip__close",onKeydown:s[0]||(s[0]=r.withKeys(l=>o.$emit("close"),["enter"])),onClick:s[1]||(s[1]=r.withModifiers(l=>o.$emit("close"),["stop"]))},s[2]||(s[2]=[r.createElementVNode("div",{class:"pl-chip__close--icon"},null,-1)]),32)):r.createCommentVNode("",!0)],2)]),_:2},[n.value?{name:"tooltip",fn:r.withCtx(()=>[r.renderSlot(o.$slots,"default")]),key:"0"}:void 0]),1024))}}),_b={class:"pl-multi-dropdown__envelope"},vb=["tabindex"],Cb={class:"pl-multi-dropdown__container"},wb={class:"pl-multi-dropdown__field"},bb=["disabled","placeholder"],xb={class:"pl-multi-dropdown__append"},kb={key:0},Sb={key:0,class:"required-icon"},Eb={class:"pl-multi-dropdown__open-chips-container"},Tb={key:0,class:"nothing-found"},Bb={key:0,class:"pl-multi-dropdown__error"},Vb={key:1,class:"pl-multi-dropdown__helper"},Nb={name:"PlDropdownMulti"},Ab=r.defineComponent({...Nb,props:{modelValue:{default:()=>[]},label:{default:void 0},options:{},helper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=j=>n("update:modelValue",j),s=r.useSlots(),l=t,c=r.ref(),u=r.ref(),p=r.ref(),f=r.reactive({search:"",activeOption:-1,open:!1,optionsHeight:0}),m=r.computed(()=>Array.isArray(l.modelValue)?l.modelValue:[]),y=r.computed(()=>f.open&&l.modelValue.length>0?l.placeholder:l.modelValue.length>0?"":l.placeholder),T=r.computed(()=>pr(l.options).filter(j=>xl(m.value,j.value))),B=r.computed(()=>{const j=r.unref(m),Y=pr(l.options);return(f.search?Y.filter(q=>{const ee=f.search.toLowerCase();return q.label.toLowerCase().includes(ee)?!0:typeof q.value=="string"?q.value.toLowerCase().includes(ee):q.value===f.search}):[...Y]).map(q=>({...q,selected:xl(j,q.value)}))}),A=r.computed(()=>l.disabled?void 0:"0"),I=()=>{f.activeOption=mi(B.value.findIndex(j=>Dt(j.value,l.modelValue)),j=>j<0?0:j)},L=j=>{var Y;const q=r.unref(m);o(xl(q,j)?q.filter(ee=>!Dt(ee,j)):[...q,j]),f.search="",(Y=c==null?void 0:c.value)==null||Y.focus()},C=j=>o(r.unref(m).filter(Y=>!Dt(Y,j))),R=()=>{var j;return(j=p.value)==null?void 0:j.focus()},O=()=>f.open=!f.open,F=j=>{var Y,q;const ee=j.relatedTarget;!((Y=c.value)!=null&&Y.contains(ee))&&!((q=u.value)!=null&&q.contains(ee))&&(f.search="",f.open=!1)},N=()=>{const j=u.value;j&&ct(j.querySelector(".hovered-item"),Y=>{gi(j,Y)})},U=j=>{var Y;const{open:q,activeOption:ee}=f;if(!q){j.code==="Enter"&&(f.open=!0);return}j.code==="Escape"&&(f.open=!1,(Y=c.value)==null||Y.focus());const G=r.unref(B),{length:S}=G;if(!S)return;["ArrowDown","ArrowUp","Enter"].includes(j.code)&&j.preventDefault(),j.code==="Enter"&&L(G[ee].value);const w=j.code==="ArrowDown"?1:j.code==="ArrowUp"?-1:0;f.activeOption=Math.abs(ee+w+S)%S,requestAnimationFrame(N)};Zn(c),r.watch(()=>l.modelValue,()=>I(),{immediate:!0}),r.watchPostEffect(()=>{f.search,f.open&&N()});const te=r.reactive({top:"0px",left:"0px",width:"0px"});return r.watch(u,j=>{if(j){const Y=j.getBoundingClientRect();f.optionsHeight=Y.height,window.dispatchEvent(new CustomEvent("adjust"))}}),_o(c,j=>{const Y=j.top+j.height+5;Y+f.optionsHeight>j.clientHeight?te.top=j.top-f.optionsHeight-5+"px":te.top=Y+"px",te.left=j.left+"px",te.width=j.width+"px"}),(j,Y)=>(r.openBlock(),r.createElementBlock("div",_b,[r.createElementVNode("div",{ref_key:"rootRef",ref:c,tabindex:A.value,class:r.normalizeClass(["pl-multi-dropdown",{open:f.open,error:j.error,disabled:j.disabled}]),onKeydown:U,onFocusout:F},[r.createElementVNode("div",Cb,[r.createElementVNode("div",wb,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:p,"onUpdate:modelValue":Y[0]||(Y[0]=q=>f.search=q),type:"text",tabindex:"-1",disabled:j.disabled,placeholder:y.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:Y[1]||(Y[1]=q=>f.open=!0)},null,40,bb),[[r.vModelText,f.search]]),Y[3]||(Y[3]=r.createTextVNode()),f.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,class:"chips-container",onClick:R},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(T.value,(q,ee)=>(r.openBlock(),r.createBlock(r.unref(Sl),{key:ee,closeable:"",small:"",onClick:Y[2]||(Y[2]=r.withModifiers(G=>f.open=!0,["stop"])),onClose:G=>C(q.value)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(q.label||q.value),1)]),_:2},1032,["onClose"]))),128))])),Y[4]||(Y[4]=r.createTextVNode()),r.createElementVNode("div",{class:"arrow",onClick:r.withModifiers(O,["stop"])}),Y[5]||(Y[5]=r.createTextVNode()),r.createElementVNode("div",xb,[r.renderSlot(j.$slots,"append")])]),Y[10]||(Y[10]=r.createTextVNode()),j.label?(r.openBlock(),r.createElementBlock("label",kb,[j.required?(r.openBlock(),r.createElementBlock("i",Sb)):r.createCommentVNode("",!0),Y[6]||(Y[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(j.label),1),Y[7]||(Y[7]=r.createTextVNode()),r.unref(s).tooltip?(r.openBlock(),r.createBlock(r.unref(Ct),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(j.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),Y[11]||(Y[11]=r.createTextVNode()),f.open?(r.openBlock(),r.createBlock(r.Teleport,{key:1,to:"body"},[r.createElementVNode("div",{ref_key:"list",ref:u,class:"pl-multi-dropdown__options",style:r.normalizeStyle(te),tabindex:"-1",onFocusout:F},[r.createElementVNode("div",Eb,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(T.value,(q,ee)=>(r.openBlock(),r.createBlock(r.unref(Sl),{key:ee,closeable:"",small:"",onClose:G=>C(q.value)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(q.label||q.value),1)]),_:2},1032,["onClose"]))),128))]),Y[8]||(Y[8]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(B.value,(q,ee)=>(r.openBlock(),r.createBlock(yo,{key:ee,option:q,"text-item":"text","is-selected":q.selected,"is-hovered":f.activeOption==ee,size:"medium","use-checkbox":"",onClick:r.withModifiers(G=>L(q.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128)),Y[9]||(Y[9]=r.createTextVNode()),B.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Tb,"Nothing found"))],36)])):r.createCommentVNode("",!0),Y[12]||(Y[12]=r.createTextVNode()),r.createVNode(hr,{class:"pl-multi-dropdown__contour"})])],42,vb),Y[13]||(Y[13]=r.createTextVNode()),j.error?(r.openBlock(),r.createElementBlock("div",Bb,r.toDisplayString(j.error),1)):j.helper?(r.openBlock(),r.createElementBlock("div",Vb,r.toDisplayString(j.helper),1)):r.createCommentVNode("",!0)]))}}),El=r.defineComponent({__name:"PlCheckboxBase",props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t){const e=t,n=r.computed(()=>e.modelValue);return(o,s)=>(r.openBlock(),r.createElementBlock("div",{tabindex:"0",class:r.normalizeClass(["pl-checkbox-base",{checked:n.value,disabled:o.disabled}]),onClick:s[0]||(s[0]=l=>o.$emit("update:modelValue",!o.modelValue)),onKeydown:s[1]||(s[1]=r.withKeys(l=>o.$emit("update:modelValue",!o.modelValue),["enter"]))},null,34))}}),Pb={name:"PlCheckbox"},zu=r.defineComponent({...Pb,props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t){const e=t,n=r.useSlots();return(o,s)=>r.unref(n).default?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["pl-checkbox",{disabled:o.disabled}])},[r.createVNode(El,r.mergeProps(e,{"onUpdate:modelValue":s[0]||(s[0]=l=>o.$emit("update:modelValue",l))}),null,16),s[3]||(s[3]=r.createTextVNode()),r.createElementVNode("label",{onClick:s[1]||(s[1]=l=>o.$emit("update:modelValue",!o.$props.modelValue))},[r.renderSlot(o.$slots,"default")])],2)):(r.openBlock(),r.createBlock(El,r.mergeProps({key:1},e,{"onUpdate:modelValue":s[2]||(s[2]=l=>o.$emit("update:modelValue",l))}),null,16))}}),Db={key:0},Fb=["onClick"],Rb={name:"PlCheckboxGroup"},Mb=r.defineComponent({...Rb,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,s=c=>o.modelValue.includes(c),l=c=>{const u=o.modelValue??[];n("update:modelValue",s(c)?u.filter(p=>p!==c):[...u,c])};return(c,u)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-checkbox-group",{disabled:c.disabled}])},[c.label?(r.openBlock(),r.createElementBlock("label",Db,r.toDisplayString(c.label),1)):r.createCommentVNode("",!0),u[1]||(u[1]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.options.map(p=>({label:"label"in p?p.label:p.text,value:p.value})),(p,f)=>(r.openBlock(),r.createElementBlock("div",{key:f},[r.createVNode(El,{disabled:c.disabled,label:p.label,"model-value":s(p.value),"onUpdate:modelValue":()=>l(p.value)},null,8,["disabled","label","model-value","onUpdate:modelValue"]),u[0]||(u[0]=r.createTextVNode()),r.createElementVNode("label",{onClick:r.withModifiers(()=>l(p.value),["stop"])},r.toDisplayString(p.label),9,Fb)]))),128))],2))}}),Ib="_component_tupwt_1",Ob={component:Ib},Lb={};function Gb(t,e){return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(t.$style.component)},e[0]||(e[0]=[r.createElementVNode("div",null,null,-1)]),2)}const zb={$style:Ob},$b=Lt(Lb,[["render",Gb],["__cssModules",zb]]),Ub={key:1,class:"pl-dialog-modal__title"},Zb={inheritAttrs:!1},Tl=r.defineComponent({...Zb,__name:"PlDialogModal",props:{modelValue:{type:Boolean},width:{default:"448px"},height:{default:"auto"},minHeight:{default:"auto"},maxHeight:{default:"auto"},closable:{type:Boolean,default:!0},noContentGutters:{type:Boolean,default:!1},noTopContentGutter:{type:Boolean},actionsHasTopBorder:{type:Boolean,default:!0},closeOnOutsideClick:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,s=t,l=r.ref(),c=r.useAttrs();function u(p){l.value&&s.closeOnOutsideClick&&document.contains(p.target)&&!l.value.contains(p.target)&&o("update:modelValue",!1)}return rt(document.body,"keyup",p=>{s.modelValue&&p.code==="Escape"&&o("update:modelValue",!1)}),(p,f)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,{name:"dialog"},{default:r.withCtx(()=>[p.modelValue?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-dialog-modal__shadow",onClick:u},[r.createElementVNode("div",r.mergeProps(r.unref(c),{ref_key:"modal",ref:l,class:["pl-dialog-modal",{"has-title":r.unref(n).title,"has-content":r.unref(n).default}],style:{width:p.width,height:p.height,minHeight:p.minHeight,maxHeight:p.maxHeight}}),[p.closable?(r.openBlock(),r.createBlock($b,{key:0,class:"close-modal-btn",onClick:f[0]||(f[0]=r.withModifiers(m=>o("update:modelValue",!1),["stop"]))})):r.createCommentVNode("",!0),f[1]||(f[1]=r.createTextVNode()),r.unref(n).title?(r.openBlock(),r.createElementBlock("div",Ub,[r.renderSlot(p.$slots,"title")])):r.createCommentVNode("",!0),f[2]||(f[2]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(["pl-dialog-modal__content",{"no-content-gutters":p.noContentGutters,"no-top-content-gutter":p.noTopContentGutter}])},[r.renderSlot(p.$slots,"default")],2),f[3]||(f[3]=r.createTextVNode()),r.unref(n).actions?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["pl-dialog-modal__actions",{"has-top-border":p.actionsHasTopBorder}])},[r.renderSlot(p.$slots,"actions")],2)):r.createCommentVNode("",!0)],16)])):r.createCommentVNode("",!0)]),_:3})]))}}),Wb=r.defineComponent({__name:"TransitionSlidePanel",setup(t){function e(){window.dispatchEvent(new CustomEvent("adjust"))}function n(){window.dispatchEvent(new CustomEvent("adjust"))}return(o,s)=>(r.openBlock(),r.createBlock(r.Transition,{name:"slide-panel",onAfterEnter:e,onAfterLeave:n},{default:r.withCtx(()=>[r.renderSlot(o.$slots,"default")]),_:3}))}}),Hb={key:0,class:"pl-slide-modal__title"},jb={class:"pl-slide-modal__content"},qb={key:1,class:"pl-slide-modal__actions"},Kb={name:"PlSlideModal",inheritAttrs:!1},$u=r.defineComponent({...Kb,props:{modelValue:{type:Boolean,default:!1},width:{default:"368px"},shadow:{type:Boolean,default:!1},closeOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,s=t,l=r.ref(),c=r.useAttrs();return ws(l,()=>{s.modelValue&&s.closeOnOutsideClick&&o("update:modelValue",!1)}),rt(document,"keydown",u=>{u.key==="Escape"&&o("update:modelValue",!1)}),(u,p)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(Wb,null,{default:r.withCtx(()=>[u.modelValue?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref_key:"modal",ref:l,style:{width:u.width}},r.unref(c),{class:["pl-slide-modal",{"has-title":r.unref(n).title,"has-actions":r.unref(n).actions}],onKeyup:p[1]||(p[1]=r.withKeys(f=>o("update:modelValue",!1),["esc"]))}),[r.createElementVNode("div",{class:"close-dialog-btn",onClick:p[0]||(p[0]=f=>o("update:modelValue",!1))}),p[3]||(p[3]=r.createTextVNode()),r.unref(n).title?(r.openBlock(),r.createElementBlock("div",Hb,[r.renderSlot(u.$slots,"title")])):r.createCommentVNode("",!0),p[4]||(p[4]=r.createTextVNode()),r.createElementVNode("div",jb,[r.renderSlot(u.$slots,"default")]),p[5]||(p[5]=r.createTextVNode()),r.unref(n).actions?(r.openBlock(),r.createElementBlock("div",qb,[r.renderSlot(u.$slots,"actions")])):r.createCommentVNode("",!0)],16)):r.createCommentVNode("",!0)]),_:3}),p[6]||(p[6]=r.createTextVNode()),u.modelValue&&u.shadow?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-slide-modal__shadow",onKeyup:p[2]||(p[2]=r.withKeys(f=>o("update:modelValue",!1),["esc"]))},null,32)):r.createCommentVNode("",!0)]))}}),Yb={key:0,class:"label"},Jb={name:"PlToggleSwitch"},xs=r.defineComponent({...Jb,props:{label:{},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{tabindex:"0",class:r.normalizeClass(["ui-toggle-switch",{active:e.modelValue}]),onClick:n[0]||(n[0]=o=>e.$emit("update:modelValue",!e.modelValue)),onKeydown:n[1]||(n[1]=r.withKeys(o=>e.$emit("update:modelValue",!e.modelValue),["enter"]))},[n[2]||(n[2]=r.createElementVNode("div",{class:"ui-toggle-switch__body"},[r.createElementVNode("div",{class:"ui-toggle-switch__handle"})],-1)),n[3]||(n[3]=r.createTextVNode()),e.label?(r.openBlock(),r.createElementBlock("span",Yb,r.toDisplayString(e.label),1)):r.createCommentVNode("",!0)],34))}});function Uu(t){return r.getCurrentScope()?(r.onScopeDispose(t),!0):!1}function Xb(t){return r.unref(t)}const Qb=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function ex(t,e,n={}){const{immediate:o=!0}=n,s=r.ref(!1);let l=null;function c(){l&&(clearTimeout(l),l=null)}function u(){s.value=!1,c()}function p(...f){c(),s.value=!0,l=setTimeout(()=>{s.value=!1,l=null,t(...f)},Xb(e))}return o&&(s.value=!0,Qb&&p()),Uu(u),{isPending:r.readonly(s),start:p,stop:u}}function tx(t,e,n){return r.watch(t,(o,s,l)=>{o&&e(o,s,l)},{...n,once:!1})}function nx(t,e,n){const{start:o}=ex(l,e,{immediate:!1}),s=r.ref(!1);async function l(){s.value&&(await t(),o())}function c(){s.value||(s.value=!0,l())}function u(){s.value=!1}return n!=null&&n.immediate&&c(),Uu(u),{isActive:s,pause:u,resume:c}}const rx="[==PROGRESS==]";function ox(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ix(t){const e=r.ref(),n=r.reactive({errorCount:0});async function o(){var l;let c=e.value;if(c===void 0)return;const u=t.mockPlatforma??window.platforma;if(!u){console.warn("Platforma API is not available");return}for(;;){const p=await u.logDriver.readText(c.logHandle,100,c.lastOffset);if(c.error=void 0,n.errorCount=0,p.shouldUpdateHandle||c.logHandle!==((l=e.value)==null?void 0:l.logHandle))return;const f=t.progressPrefix??rx,m=new TextDecoder().decode(p.data).replace(new RegExp(`${ox(f)}`,"g"),"");if(c=Object.assign(c,{lines:c.lines+m,lastOffset:p.newOffset,finished:!p.live}),p.newOffset>=p.size)break}}const s=nx(()=>o().catch(l=>{e.value&&(n.errorCount++,n.errorCount>(t.maxRetries??3)?e.value.error=l:console.warn("skip error:",l,"retry..."))}),1500,{immediate:!1});return tx(()=>{var l;return(l=e==null?void 0:e.value)==null?void 0:l.finished},()=>s.pause()),r.watch(()=>t.logHandle,l=>{var c;l===void 0?(e.value=void 0,s.pause()):l!==((c=e.value)==null?void 0:c.logHandle)&&(e.value={logHandle:l,lastOffset:0,lines:"",finished:!1,error:void 0},n.errorCount=0,s.resume())},{immediate:!0}),e}const sx={key:0},ax={class:"pl-log-view__copy"},lx={key:1,class:"pl-log-view__error"},cx={name:"PlLogView"},Zu=r.defineComponent({...cx,props:{value:{},logHandle:{},progressPrefix:{},error:{},output:{},maxRetries:{},mockPlatforma:{},label:{}},setup(t){const e=A=>{if(A&&A.ok===!1)return A.errors.join(`
|
|
53
|
-
`)},n=t,o=ix(n),s=r.ref(!0),l=r.ref(),c=r.ref(),u=r.computed(()=>{var A;return((A=o.value)==null?void 0:A.error)??n.error??e(n.output)}),p=r.computed(()=>{var A;return((A=o.value)==null?void 0:A.lines)??n.value??z_(n.output)}),f=r.ref(!1);Zn(c);const m=r.computed(()=>f.value?"clipboard-copied":"clipboard"),y=()=>{f.value=!0,setTimeout(()=>{f.value=!1},1200),p.value&&typeof p.value=="string"&&navigator.clipboard.writeText(p.value)},T=()=>{$r(l.value,A=>{s.value&&A.scrollTo(A.scrollLeft,A.scrollHeight)})};r.watch(p,()=>{requestAnimationFrame(()=>{T()})},{immediate:!0});const B=A=>{const I=A.target;s.value=I.scrollTop+20>=I.scrollHeight-I.offsetHeight};return(A,I)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:c,class:r.normalizeClass(["pl-log-view",{"has-error":u.value}])},[A.label?(r.openBlock(),r.createElementBlock("label",sx,r.toDisplayString(A.label),1)):r.createCommentVNode("",!0),I[1]||(I[1]=r.createTextVNode()),r.createVNode(hr,{class:"pl-log-view__contour"}),I[2]||(I[2]=r.createTextVNode()),r.createElementVNode("div",ax,[r.createVNode(r.unref(Ct),{"close-delay":800,position:"top"},{tooltip:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(f.value?"copied":"copy"),1)]),default:r.withCtx(()=>[r.createVNode(r.unref(cn),{title:"Copy content",name:m.value,onClick:y},null,8,["name"]),I[0]||(I[0]=r.createTextVNode())]),_:1})]),I[3]||(I[3]=r.createTextVNode()),u.value?(r.openBlock(),r.createElementBlock("div",lx,r.toDisplayString(u.value),1)):(r.openBlock(),r.createElementBlock("div",{key:2,ref_key:"contentRef",ref:l,class:"pl-log-view__content",onScroll:B},r.toDisplayString(p.value),545))],2))}}),dx="_component_1ukal_1",ux="_tab_1ukal_14",px="_disabled_1ukal_27",hx="_active_1ukal_56",fx="_topLine_1ukal_69",Co={component:dx,tab:ux,disabled:px,active:hx,topLine:fx},mx=r.defineComponent({__name:"Tab",props:{option:{}},setup(t){const e=r.ref(),n=r.reactive({isOverflown:!1});return r.onMounted(()=>{const o=r.unref(e);if(!o)return;const s=o.$el.querySelector("span");s&&requestAnimationFrame(()=>{s.offsetWidth<s.scrollWidth&&(n.isOverflown=!0)})}),(o,s)=>(r.openBlock(),r.createBlock(r.unref(Ct),{ref_key:"rootRef",ref:e,element:"div",position:"top",hide:!n.isOverflown,"close-delay":300,"data-is-overflown":n.isOverflown?"true":"false"},{tooltip:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(o.option.label),1)]),default:r.withCtx(()=>[r.renderSlot(o.$slots,"default"),s[0]||(s[0]=r.createTextVNode())]),_:3},8,["hide","data-is-overflown"]))}}),gx={name:"PlTabs"},yx=r.defineComponent({...gx,props:{modelValue:{},options:{},disabled:{type:Boolean},topLine:{type:Boolean},maxTabWidth:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=s=>n("update:modelValue",s);return(s,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref(Co).component,{[r.unref(Co).disabled]:s.disabled,[r.unref(Co).topLine]:s.topLine}])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.options,(c,u)=>(r.openBlock(),r.createBlock(mx,{key:u,tabindex:s.modelValue===c.value||s.disabled||c.disabled?void 0:0,option:c,class:r.normalizeClass([{[r.unref(Co).active]:s.modelValue===c.value,[r.unref(Co).disabled]:c.disabled},r.unref(Co).tab]),style:r.normalizeStyle({"--pl-tabs-item-max-width":c.maxWidth??s.maxTabWidth}),onKeydown:r.withKeys(p=>o(c.value),["enter"]),onClick:p=>o(c.value)},{default:r.withCtx(()=>[r.renderSlot(s.$slots,c.value,{option:c},()=>[r.createElementVNode("span",null,r.toDisplayString(c.label),1)])]),_:2},1032,["tabindex","option","class","style","onKeydown","onClick"]))),128))],2))}}),_x=r.defineComponent({__name:"PlSectionSeparator",props:{compact:{type:Boolean}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-section-separator",{[e.$style.compact]:e.compact}])},[r.createElementVNode("div",{class:r.normalizeClass(e.$style.content)},[r.renderSlot(e.$slots,"default")],2)],2))}}),vx="_compact_rhd5u_16",Cx="_content_rhd5u_20",wx={compact:vx,content:Cx},bx={$style:wx},Wu=Lt(_x,[["__cssModules",bx]]),xx=r.defineComponent({__name:"PlAccordion",props:r.mergeModels({multiple:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t;return r.provide("pl-accordion-model",e),r.provide("pl-accordion-props",r.toRef(n)),(o,s)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.renderSlot(o.$slots,"header"),s[0]||(s[0]=r.createTextVNode()),r.renderSlot(o.$slots,"default")],64))}}),kx=r.defineComponent({__name:"ExpandTransition",setup(t){const e=o=>{o.style.setProperty("--component-height",o.scrollHeight+"px"),o.classList.add("expand-collapse-fix")},n=o=>{o.style.removeProperty("--component-height"),o.classList.remove("expand-collapse-fix")};return(o,s)=>(r.openBlock(),r.createBlock(r.Transition,{name:"expand-collapse",onEnter:e,onLeave:e,onAfterEnter:n,onAfterLeave:n},{default:r.withCtx(()=>[r.renderSlot(o.$slots,"default")]),_:3}))}}),Sx=r.defineComponent({__name:"PlAccordionSection",props:r.mergeModels({label:{},compact:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.inject("pl-accordion-model"),n=r.inject("pl-accordion-props"),o=r.useModel(t,"modelValue"),s=cu(),l=r.computed(()=>!n||n.value.multiple),c=r.computed({get(){return l.value?o.value:e?e.value===s:o.value},set(u){l.value?o.value=u:e&&(e.value=e.value===s?"":s)}});return(u,p)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createVNode(r.unref(Wu),{class:r.normalizeClass(u.$style.separator),compact:u.compact,onClick:p[0]||(p[0]=f=>c.value=!c.value)},{default:r.withCtx(()=>[r.createVNode(r.unref(Un),{name:"chevron-right",class:r.normalizeClass([{[u.$style.down]:c.value},u.$style.chevron])},null,8,["class"]),r.createTextVNode(" "+r.toDisplayString(u.label),1)]),_:1},8,["class","compact"]),p[1]||(p[1]=r.createTextVNode()),r.createVNode(kx,null,{default:r.withCtx(()=>[c.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(u.$style.content)},[r.renderSlot(u.$slots,"default")],2)):r.createCommentVNode("",!0)]),_:3})],64))}}),Ex="_content_jmjfk_2",Tx="_separator_jmjfk_14",Bx="_chevron_jmjfk_19",Vx="_down_jmjfk_23",Nx={content:Ex,separator:Tx,chevron:Bx,down:Vx},Ax={$style:Nx},Px=Lt(Sx,[["__cssModules",Ax]]),Dx="_component_1ietr_1",Fx="_local_1ietr_1",Rx="_supported_1ietr_26",Mx="_remote_1ietr_32",Ix="_search_1ietr_40",Ox="_selected_1ietr_72",Lx="_breadcrumbs_1ietr_86",Gx="_cat_1ietr_116",zx="_message_1ietr_122",$x="_isFile_1ietr_197",Ux="_isDir_1ietr_201",Zx="_canBeSelected_1ietr_207",Wx="_spin_1ietr_1",at={component:Dx,local:Fx,supported:Rx,remote:Mx,search:Ix,"ls-container":"_ls-container_1ietr_50","ls-head":"_ls-head_1ietr_57",selected:Ox,breadcrumbs:Lx,"ls-error":"_ls-error_1ietr_108",cat:Gx,message:zx,"ls-empty":"_ls-empty_1ietr_131","ls-body":"_ls-body_1ietr_152",isFile:$x,isDir:Ux,canBeSelected:Zx,"ls-loader":"_ls-loader_1ietr_213","loader-icon":"_loader-icon_1ietr_221",spin:Wx};function Hu(t){return t?t.map(e=>"."+Z_(e,["."])):void 0}function Hx(t){const e=t.split("/");e[0]!==""&&e.unshift("");const n=[];for(let o=0;o<e.length;o++)n.push({index:o,name:o===0?"Root":e[o],path:e.slice(0,o+1).filter(s=>s!=="").join("/")});return n}const ju=()=>({dirPath:"",search:"",storageEntry:void 0,items:[],error:"",storageOptions:[],selected:[],lastSelected:void 0,currentLoadingPath:void 0,showHiddenItems:!1});function jx(t){return r.computed(()=>{let e=t.items;if(t.showHiddenItems||(e=e.filter(n=>!n.name.startsWith("."))),t.search){const n=t.search.toLocaleLowerCase();e=e.filter(o=>o.name.toLocaleLowerCase().includes(n))}return e})}const qu={mounted:t=>{if(t.clientWidth<t.scrollWidth){const e=t.innerText;t.innerText=e.substring(0,57)+"..."+e.substring(e.length-10)}}},qx=["title","onClick"],Kx={key:0,class:"ls-loader"},Yx=["onClick"],Jx=["title"],Xx=["onClick"],Qx=["title"],ek=r.defineComponent({__name:"Remote",props:{modelValue:{type:Boolean},extensions:{default:void 0},multi:{type:Boolean},title:{default:void 0},autoSelectStorage:{type:Boolean,default:!0},submit:{}},emits:["update:modelValue","import:files"],setup(t,{expose:e}){const n=t,o=r.reactive(ju()),s=()=>{o.search="",o.error="",o.lastSelected=void 0},l=r.computed(()=>Hu(n.extensions)),c=jx(o),u=r.computed(()=>{var F;return{modelValue:n.modelValue,dirPath:o.dirPath,storageHandle:(F=o.storageEntry)==null?void 0:F.handle}}),p=(F,N)=>{window.platforma&&o.currentLoadingPath!==N&&(o.currentLoadingPath=N,window.platforma.lsDriver.listFiles(F,N).then(U=>{N===o.dirPath&&(o.items=gs(U).entries.map(te=>({path:te.fullPath,name:te.name,isDir:te.type==="dir",canBeSelected:te.type==="file"&&(!l.value||l.value.some(j=>te.fullPath.endsWith(j))),handle:te.type==="file"?te.handle:void 0,selected:!1})).sort((te,j)=>te.isDir&&!j.isDir?-1:!te.isDir&&j.isDir?1:te.name.localeCompare(j.name)).map((te,j)=>({id:j,...te})),o.lastSelected=void 0)}).catch(U=>o.error=String(U)).finally(()=>{o.currentLoadingPath=void 0}))},f=()=>{s();const{storageHandle:F,dirPath:N,modelValue:U}=u.value;F&&U&&p(F,N)},m=r.computed(()=>Hx(o.dirPath)),y=r.computed(()=>o.items.filter(F=>F.canBeSelected&&F.selected&&!F.isDir)),T=r.computed(()=>{var F;return y.value.length>0&&((F=o.storageEntry)==null?void 0:F.handle)}),B=()=>{var F;return{storageHandle:gs((F=o.storageEntry)==null?void 0:F.handle),files:y.value.map(N=>N.handle)}},A=F=>{o.dirPath=F},I=(F,N)=>{const{shiftKey:U,metaKey:te}=F,{lastSelected:j}=o;if(F.preventDefault(),N.canBeSelected){if(n.multi||o.items.forEach(Y=>Y.selected=!1),N.selected=!0,!n.multi)return;!te&&!U&&o.items.forEach(Y=>{Y.id!==N.id&&(Y.selected=!1)}),U&&j!==void 0&&o.items.forEach(Y=>{O_(Y.id,j,N.id)&&(Y.selected=!0)}),N.selected&&(o.lastSelected=N.id)}},L=F=>{F&&!n.multi||o.items.filter(N=>N.canBeSelected).forEach(N=>{N.selected=F})},C=()=>L(!0),R=()=>L(!1),O=()=>{if(s(),R(),!window.platforma){console.warn("platforma API is not found");return}window.platforma.lsDriver.getStorageList().then(F=>{o.storageOptions=F.map(N=>({text:N.name,value:N})),n.autoSelectStorage&&$r(F.find(N=>N.name==="local"||N.name.startsWith("local_disk_")&&N.initialFullPath.length>4),N=>{o.storageEntry=N})}).catch(F=>o.error=String(F))};return r.watch(r.toRef(o,"storageEntry"),F=>{s(),o.dirPath=(F==null?void 0:F.initialFullPath)??""},{immediate:!0}),r.watch([()=>o.dirPath,()=>o.storageEntry],()=>{f()}),r.watch(()=>n.modelValue,F=>{F?O():Object.assign(o,ju())},{immediate:!0}),rt(document,"keydown",F=>{n.modelValue&&F.target===document.body&&(F.metaKey&&F.code==="KeyA"&&(F.preventDefault(),C()),F.metaKey&&F.shiftKey&&F.code==="Period"&&(F.preventDefault(),o.showHiddenItems=!o.showHiddenItems),F.code==="Enter"&&n.submit())}),e({isReady:T,getFilesToImport:B}),r.onMounted(O),(F,N)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(at).remote),onClick:r.withModifiers(R,["stop"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(at).search)},[r.createElementVNode("div",null,[r.createVNode(r.unref(yi),{modelValue:o.storageEntry,"onUpdate:modelValue":N[0]||(N[0]=U=>o.storageEntry=U),label:"Select storage",options:o.storageOptions},null,8,["modelValue","options"])]),N[2]||(N[2]=r.createTextVNode()),r.createElementVNode("div",null,[r.createVNode(r.unref(Mu),{modelValue:o.search,"onUpdate:modelValue":N[1]||(N[1]=U=>o.search=U),label:"Search in folder",clearable:""},null,8,["modelValue"])])],2),N[12]||(N[12]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(at)["ls-container"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(at)["ls-head"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(at).breadcrumbs)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.value,(U,te)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:te},[r.createElementVNode("div",{title:U.path,onClick:j=>A(U.path)},r.toDisplayString(U.name),9,qx),N[3]||(N[3]=r.createTextVNode()),U.index!==m.value.length-1?(r.openBlock(),r.createBlock(r.unref(vo),{key:0,name:"chevron-right"})):r.createCommentVNode("",!0)],64))),128))],2),N[4]||(N[4]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(at).selected)},"Selected: "+r.toDisplayString(y.value.length),3)],2),N[11]||(N[11]=r.createTextVNode()),o.currentLoadingPath!==void 0?(r.openBlock(),r.createElementBlock("div",Kx,N[5]||(N[5]=[r.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"},null,-1)]))):o.storageEntry?o.error?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(r.unref(at)["ls-error"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(at).cat)},null,2),N[7]||(N[7]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(at).message)},r.toDisplayString(o.error),3)],2)):(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(r.unref(at)["ls-body"])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(c),U=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:U.id},[U.isDir?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(r.unref(at).isDir),onClick:te=>A(U.path)},[N[8]||(N[8]=r.createElementVNode("i",{class:"icon-16 icon-chevron-right"},null,-1)),N[9]||(N[9]=r.createTextVNode()),r.withDirectives((r.openBlock(),r.createElementBlock("span",{title:U.name},[r.createTextVNode(r.toDisplayString(U.name),1)],8,Jx)),[[r.unref(qu)]])],10,Yx)):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass({[r.unref(at).canBeSelected]:U.canBeSelected,[r.unref(at).selected]:U.selected}),onClick:r.withModifiers(te=>I(te,U),["stop"])},[r.createElementVNode("i",{class:r.normalizeClass(["mask-16 mask-box",r.unref(at).isFile])},null,2),N[10]||(N[10]=r.createTextVNode()),r.withDirectives((r.openBlock(),r.createElementBlock("span",{title:U.name},[r.createTextVNode(r.toDisplayString(U.name),1)],8,Qx)),[[r.unref(qu)]])],10,Xx))],64))),128))],2)):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(r.unref(at)["ls-empty"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(at).cat)},null,2),N[6]||(N[6]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(at).message)},"Select storage to preview",2)],2))],2)],2))}}),tk={key:1,class:"alert-error"},nk=r.defineComponent({__name:"Local",props:{importFiles:{type:Function},multi:{type:Boolean},extensions:{}},setup(t){const e=t,n=r.reactive({error:void 0}),o=r.computed(()=>e.multi?"Drag & Drop files here or click to add":"Drag & Drop file here or click to add"),s=async c=>{var u,p,f;const m=(p=(u=window.platforma)==null?void 0:u.lsDriver)==null?void 0:p.fileToImportHandle;if(!m)return console.error("API platforma.lsDriver.fileToImportHandle is not available");const y=Hu(e.extensions),T=await Promise.all([...((f=c.dataTransfer)==null?void 0:f.files)??[]].filter(B=>!!B).filter(B=>y?y.some(A=>B.name.endsWith(A)):!0).map(B=>m(B)));T.length&&e.importFiles({files:T})},l=async()=>{var c,u;const p=e.extensions?[{name:"All Files",extensions:e.extensions}]:[];e.multi?(c=window.platforma)==null||c.lsDriver.showOpenMultipleFilesDialog({title:"Select files to import",filters:p}).then(({files:f})=>{f&&e.importFiles({files:f})}).catch(f=>n.error=f):(u=window.platforma)==null||u.lsDriver.showOpenSingleFileDialog({title:"Select file to import",filters:p}).then(({file:f})=>{f&&e.importFiles({files:[f]})}).catch(f=>n.error=f)};return(c,u)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(at).local),onDrop:s,onDragover:u[0]||(u[0]=r.withModifiers(()=>{},["prevent"])),onClick:l},[r.createVNode(r.unref(bs),{name:"cloud-upload"}),u[1]||(u[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(o.value),1),u[2]||(u[2]=r.createTextVNode()),c.extensions?(r.openBlock(),r.createElementBlock("span",{key:0,class:r.normalizeClass(r.unref(at).supported)},"Supported formats: "+r.toDisplayString(c.extensions.join(", ")),3)):r.createCommentVNode("",!0),u[3]||(u[3]=r.createTextVNode()),n.error?(r.openBlock(),r.createElementBlock("span",tk,r.toDisplayString(n.error),1)):r.createCommentVNode("",!0)],34))}}),rk={style:{margin:"0 24px"}},Ku=r.defineComponent({__name:"PlFileDialog",props:{modelValue:{type:Boolean},extensions:{default:void 0},multi:{type:Boolean},title:{default:void 0},autoSelectStorage:{type:Boolean,default:!0},closeOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue","import:files"],setup(t,{emit:e}){const n=e,o=t,s=r.ref("local"),l=r.computed(()=>o.multi?"Select Files to Import":"Select File to Import"),c=[{label:"My Computer",value:"local"},{label:"Remote",value:"remote"}],u=()=>n("update:modelValue",!1),p=r.useTemplateRef("remote"),f=()=>{var y,T;(y=p.value)!=null&&y.isReady&&(n("import:files",gs((T=p.value)==null?void 0:T.getFilesToImport())),u())},m=y=>{n("import:files",y),u()};return(y,T)=>(r.openBlock(),r.createBlock(r.unref(Tl),{"no-content-gutters":!0,"close-on-outside-click":y.closeOnOutsideClick,class:r.normalizeClass(["pl-dialog-modal",r.unref(at).component]),"model-value":y.modelValue,width:"688px",height:"720px","onUpdate:modelValue":u},r.createSlots({title:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(y.title??l.value),1)]),default:r.withCtx(()=>[T[4]||(T[4]=r.createTextVNode()),r.createElementVNode("div",rk,[r.createVNode(r.unref(Nu),{modelValue:s.value,"onUpdate:modelValue":T[0]||(T[0]=B=>s.value=B),options:c},null,8,["modelValue"])]),T[5]||(T[5]=r.createTextVNode()),s.value==="remote"?(r.openBlock(),r.createBlock(ek,r.mergeProps({key:0,ref:"remote"},y.$props,{submit:f}),null,16)):r.createCommentVNode("",!0),T[6]||(T[6]=r.createTextVNode()),s.value==="local"?(r.openBlock(),r.createBlock(nk,r.mergeProps({key:1,"import-files":m},y.$props),null,16)):r.createCommentVNode("",!0),T[7]||(T[7]=r.createTextVNode())]),_:2},[s.value==="remote"?{name:"actions",fn:r.withCtx(()=>{var B;return[r.createVNode(r.unref(gl),{style:{"min-width":"160px"},disabled:!((B=r.unref(p))!=null&&B.isReady),onClick:r.withModifiers(f,["stop"])},{default:r.withCtx(()=>T[1]||(T[1]=[r.createTextVNode("Import")])),_:1},8,["disabled"]),T[3]||(T[3]=r.createTextVNode()),r.createVNode(r.unref(Cs),{"justify-center":!1,onClick:r.withModifiers(u,["stop"])},{default:r.withCtx(()=>T[2]||(T[2]=[r.createTextVNode("Cancel")])),_:1})]}),key:"0"}:void 0]),1032,["close-on-outside-click","class","model-value"]))}});var Le;(function(t){t.assertEqual=s=>s;function e(s){}t.assertIs=e;function n(s){throw new Error}t.assertNever=n,t.arrayToEnum=s=>{const l={};for(const c of s)l[c]=c;return l},t.getValidEnumValues=s=>{const l=t.objectKeys(s).filter(u=>typeof s[s[u]]!="number"),c={};for(const u of l)c[u]=s[u];return t.objectValues(c)},t.objectValues=s=>t.objectKeys(s).map(function(l){return s[l]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const l=[];for(const c in s)Object.prototype.hasOwnProperty.call(s,c)&&l.push(c);return l},t.find=(s,l)=>{for(const c of s)if(l(c))return c},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function o(s,l=" | "){return s.map(c=>typeof c=="string"?`'${c}'`:c).join(l)}t.joinValues=o,t.jsonStringifyReplacer=(s,l)=>typeof l=="bigint"?l.toString():l})(Le||(Le={}));var Bl;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Bl||(Bl={}));const le=Le.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),fr=t=>{switch(typeof t){case"undefined":return le.undefined;case"string":return le.string;case"number":return isNaN(t)?le.nan:le.number;case"boolean":return le.boolean;case"function":return le.function;case"bigint":return le.bigint;case"symbol":return le.symbol;case"object":return Array.isArray(t)?le.array:t===null?le.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?le.promise:typeof Map<"u"&&t instanceof Map?le.map:typeof Set<"u"&&t instanceof Set?le.set:typeof Date<"u"&&t instanceof Date?le.date:le.object;default:return le.unknown}},X=Le.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),ok=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class Gt extends Error{constructor(e){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(l){return l.message},o={_errors:[]},s=l=>{for(const c of l.issues)if(c.code==="invalid_union")c.unionErrors.map(s);else if(c.code==="invalid_return_type")s(c.returnTypeError);else if(c.code==="invalid_arguments")s(c.argumentsError);else if(c.path.length===0)o._errors.push(n(c));else{let u=o,p=0;for(;p<c.path.length;){const f=c.path[p];p===c.path.length-1?(u[f]=u[f]||{_errors:[]},u[f]._errors.push(n(c))):u[f]=u[f]||{_errors:[]},u=u[f],p++}}};return s(this),o}static assert(e){if(!(e instanceof Gt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Le.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},o=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(e(s))):o.push(e(s));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}}Gt.create=t=>new Gt(t);const wo=(t,e)=>{let n;switch(t.code){case X.invalid_type:t.received===le.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case X.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Le.jsonStringifyReplacer)}`;break;case X.unrecognized_keys:n=`Unrecognized key(s) in object: ${Le.joinValues(t.keys,", ")}`;break;case X.invalid_union:n="Invalid input";break;case X.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Le.joinValues(t.options)}`;break;case X.invalid_enum_value:n=`Invalid enum value. Expected ${Le.joinValues(t.options)}, received '${t.received}'`;break;case X.invalid_arguments:n="Invalid function arguments";break;case X.invalid_return_type:n="Invalid function return type";break;case X.invalid_date:n="Invalid date";break;case X.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Le.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case X.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case X.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case X.custom:n="Invalid input";break;case X.invalid_intersection_types:n="Intersection results could not be merged";break;case X.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case X.not_finite:n="Number must be finite";break;default:n=e.defaultError,Le.assertNever(t)}return{message:n}};let Yu=wo;function ik(t){Yu=t}function ks(){return Yu}const Ss=t=>{const{data:e,path:n,errorMaps:o,issueData:s}=t,l=[...n,...s.path||[]],c={...s,path:l};if(s.message!==void 0)return{...s,path:l,message:s.message};let u="";const p=o.filter(f=>!!f).slice().reverse();for(const f of p)u=f(c,{data:e,defaultError:u}).message;return{...s,path:l,message:u}},sk=[];function se(t,e){const n=ks(),o=Ss({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===wo?void 0:wo].filter(s=>!!s)});t.common.issues.push(o)}class wt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const o=[];for(const s of n){if(s.status==="aborted")return we;s.status==="dirty"&&e.dirty(),o.push(s.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,n){const o=[];for(const s of n){const l=await s.key,c=await s.value;o.push({key:l,value:c})}return wt.mergeObjectSync(e,o)}static mergeObjectSync(e,n){const o={};for(const s of n){const{key:l,value:c}=s;if(l.status==="aborted"||c.status==="aborted")return we;l.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof c.value<"u"||s.alwaysSet)&&(o[l.value]=c.value)}return{status:e.value,value:o}}}const we=Object.freeze({status:"aborted"}),Es=t=>({status:"dirty",value:t}),Tt=t=>({status:"valid",value:t}),Vl=t=>t.status==="aborted",Nl=t=>t.status==="dirty",_i=t=>t.status==="valid",vi=t=>typeof Promise<"u"&&t instanceof Promise;function Ts(t,e,n,o){if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function Ju(t,e,n,o,s){if(typeof e=="function"?t!==e||!s:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}var he;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(he||(he={}));var Ci,wi;class Dn{constructor(e,n,o,s){this._cachedPath=[],this.parent=e,this.data=n,this._path=o,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Xu=(t,e)=>{if(_i(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Gt(t.common.issues);return this._error=n,this._error}}};function Be(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:o,description:s}=t;if(e&&(n||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(l,c)=>{var u,p;const{message:f}=t;return l.code==="invalid_enum_value"?{message:f??c.defaultError}:typeof c.data>"u"?{message:(u=f??o)!==null&&u!==void 0?u:c.defaultError}:l.code!=="invalid_type"?{message:c.defaultError}:{message:(p=f??n)!==null&&p!==void 0?p:c.defaultError}},description:s}}class Ae{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return fr(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:fr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new wt,ctx:{common:e.parent.common,data:e.data,parsedType:fr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(vi(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const o=this.safeParse(e,n);if(o.success)return o.data;throw o.error}safeParse(e,n){var o;const s={common:{issues:[],async:(o=n==null?void 0:n.async)!==null&&o!==void 0?o:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:fr(e)},l=this._parseSync({data:e,path:s.path,parent:s});return Xu(s,l)}async parseAsync(e,n){const o=await this.safeParseAsync(e,n);if(o.success)return o.data;throw o.error}async safeParseAsync(e,n){const o={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:fr(e)},s=this._parse({data:e,path:o.path,parent:o}),l=await(vi(s)?s:Promise.resolve(s));return Xu(o,l)}refine(e,n){const o=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,l)=>{const c=e(s),u=()=>l.addIssue({code:X.custom,...o(s)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(u(),!1)):c?!0:(u(),!1)})}refinement(e,n){return this._refinement((o,s)=>e(o)?!0:(s.addIssue(typeof n=="function"?n(o,s):n),!1))}_refinement(e){return new pn({schema:this,typeName:ve.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Rn.create(this,this._def)}nullable(){return vr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return un.create(this,this._def)}promise(){return So.create(this,this._def)}or(e){return Si.create([this,e],this._def)}and(e){return Ei.create(this,e,this._def)}transform(e){return new pn({...Be(this._def),schema:this,typeName:ve.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new Ai({...Be(this._def),innerType:this,defaultValue:n,typeName:ve.ZodDefault})}brand(){return new Dl({typeName:ve.ZodBranded,type:this,...Be(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new Pi({...Be(this._def),innerType:this,catchValue:n,typeName:ve.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Di.create(this,e)}readonly(){return Fi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ak=/^c[^\s-]{8,}$/i,lk=/^[0-9a-z]+$/,ck=/^[0-9A-HJKMNP-TV-Z]{26}$/,dk=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,uk=/^[a-z0-9_-]{21}$/i,pk=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,hk=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,fk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Al;const mk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,gk=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,yk=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Qu="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",_k=new RegExp(`^${Qu}$`);function ep(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function vk(t){return new RegExp(`^${ep(t)}$`)}function tp(t){let e=`${Qu}T${ep(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function Ck(t,e){return!!((e==="v4"||!e)&&mk.test(t)||(e==="v6"||!e)&&gk.test(t))}class dn extends Ae{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==le.string){const s=this._getOrReturnCtx(e);return se(s,{code:X.invalid_type,expected:le.string,received:s.parsedType}),we}const n=new wt;let o;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:X.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="max")e.data.length>s.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:X.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),n.dirty());else if(s.kind==="length"){const l=e.data.length>s.value,c=e.data.length<s.value;(l||c)&&(o=this._getOrReturnCtx(e,o),l?se(o,{code:X.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):c&&se(o,{code:X.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),n.dirty())}else if(s.kind==="email")hk.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"email",code:X.invalid_string,message:s.message}),n.dirty());else if(s.kind==="emoji")Al||(Al=new RegExp(fk,"u")),Al.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"emoji",code:X.invalid_string,message:s.message}),n.dirty());else if(s.kind==="uuid")dk.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"uuid",code:X.invalid_string,message:s.message}),n.dirty());else if(s.kind==="nanoid")uk.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"nanoid",code:X.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid")ak.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"cuid",code:X.invalid_string,message:s.message}),n.dirty());else if(s.kind==="cuid2")lk.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"cuid2",code:X.invalid_string,message:s.message}),n.dirty());else if(s.kind==="ulid")ck.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"ulid",code:X.invalid_string,message:s.message}),n.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),se(o,{validation:"url",code:X.invalid_string,message:s.message}),n.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"regex",code:X.invalid_string,message:s.message}),n.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(o=this._getOrReturnCtx(e,o),se(o,{code:X.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),n.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(o=this._getOrReturnCtx(e,o),se(o,{code:X.invalid_string,validation:{startsWith:s.value},message:s.message}),n.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(o=this._getOrReturnCtx(e,o),se(o,{code:X.invalid_string,validation:{endsWith:s.value},message:s.message}),n.dirty()):s.kind==="datetime"?tp(s).test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{code:X.invalid_string,validation:"datetime",message:s.message}),n.dirty()):s.kind==="date"?_k.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{code:X.invalid_string,validation:"date",message:s.message}),n.dirty()):s.kind==="time"?vk(s).test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{code:X.invalid_string,validation:"time",message:s.message}),n.dirty()):s.kind==="duration"?pk.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"duration",code:X.invalid_string,message:s.message}),n.dirty()):s.kind==="ip"?Ck(e.data,s.version)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"ip",code:X.invalid_string,message:s.message}),n.dirty()):s.kind==="base64"?yk.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"base64",code:X.invalid_string,message:s.message}),n.dirty()):Le.assertNever(s);return{status:n.value,value:e.data}}_regex(e,n,o){return this.refinement(s=>e.test(s),{validation:n,code:X.invalid_string,...he.errToObj(o)})}_addCheck(e){return new dn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...he.errToObj(e)})}url(e){return this._addCheck({kind:"url",...he.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...he.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...he.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...he.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...he.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...he.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...he.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...he.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...he.errToObj(e)})}datetime(e){var n,o;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(o=e==null?void 0:e.local)!==null&&o!==void 0?o:!1,...he.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...he.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...he.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...he.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...he.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...he.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...he.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...he.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...he.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...he.errToObj(n)})}nonempty(e){return this.min(1,he.errToObj(e))}trim(){return new dn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new dn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new dn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}dn.create=t=>{var e;return new dn({checks:[],typeName:ve.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Be(t)})};function wk(t,e){const n=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,s=n>o?n:o,l=parseInt(t.toFixed(s).replace(".","")),c=parseInt(e.toFixed(s).replace(".",""));return l%c/Math.pow(10,s)}class mr extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==le.number){const s=this._getOrReturnCtx(e);return se(s,{code:X.invalid_type,expected:le.number,received:s.parsedType}),we}let n;const o=new wt;for(const s of this._def.checks)s.kind==="int"?Le.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),se(n,{code:X.invalid_type,expected:"integer",received:"float",message:s.message}),o.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:X.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:X.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),o.dirty()):s.kind==="multipleOf"?wk(e.data,s.value)!==0&&(n=this._getOrReturnCtx(e,n),se(n,{code:X.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),se(n,{code:X.not_finite,message:s.message}),o.dirty()):Le.assertNever(s);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,he.toString(n))}gt(e,n){return this.setLimit("min",e,!1,he.toString(n))}lte(e,n){return this.setLimit("max",e,!0,he.toString(n))}lt(e,n){return this.setLimit("max",e,!1,he.toString(n))}setLimit(e,n,o,s){return new mr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:he.toString(s)}]})}_addCheck(e){return new mr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:he.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:he.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:he.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:he.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:he.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:he.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:he.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:he.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:he.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Le.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(n===null||o.value>n)&&(n=o.value):o.kind==="max"&&(e===null||o.value<e)&&(e=o.value)}return Number.isFinite(n)&&Number.isFinite(e)}}mr.create=t=>new mr({checks:[],typeName:ve.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Be(t)});class gr extends Ae{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==le.bigint){const s=this._getOrReturnCtx(e);return se(s,{code:X.invalid_type,expected:le.bigint,received:s.parsedType}),we}let n;const o=new wt;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:X.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:X.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),o.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),se(n,{code:X.not_multiple_of,multipleOf:s.value,message:s.message}),o.dirty()):Le.assertNever(s);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,he.toString(n))}gt(e,n){return this.setLimit("min",e,!1,he.toString(n))}lte(e,n){return this.setLimit("max",e,!0,he.toString(n))}lt(e,n){return this.setLimit("max",e,!1,he.toString(n))}setLimit(e,n,o,s){return new gr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:he.toString(s)}]})}_addCheck(e){return new gr({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:he.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:he.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:he.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:he.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:he.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}gr.create=t=>{var e;return new gr({checks:[],typeName:ve.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Be(t)})};class bi extends Ae{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==le.boolean){const n=this._getOrReturnCtx(e);return se(n,{code:X.invalid_type,expected:le.boolean,received:n.parsedType}),we}return Tt(e.data)}}bi.create=t=>new bi({typeName:ve.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Be(t)});class Zr extends Ae{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==le.date){const s=this._getOrReturnCtx(e);return se(s,{code:X.invalid_type,expected:le.date,received:s.parsedType}),we}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return se(s,{code:X.invalid_date}),we}const n=new wt;let o;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:X.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),n.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:X.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),n.dirty()):Le.assertNever(s);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Zr({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:he.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:he.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Zr.create=t=>new Zr({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:ve.ZodDate,...Be(t)});class Bs extends Ae{_parse(e){if(this._getType(e)!==le.symbol){const n=this._getOrReturnCtx(e);return se(n,{code:X.invalid_type,expected:le.symbol,received:n.parsedType}),we}return Tt(e.data)}}Bs.create=t=>new Bs({typeName:ve.ZodSymbol,...Be(t)});class xi extends Ae{_parse(e){if(this._getType(e)!==le.undefined){const n=this._getOrReturnCtx(e);return se(n,{code:X.invalid_type,expected:le.undefined,received:n.parsedType}),we}return Tt(e.data)}}xi.create=t=>new xi({typeName:ve.ZodUndefined,...Be(t)});class ki extends Ae{_parse(e){if(this._getType(e)!==le.null){const n=this._getOrReturnCtx(e);return se(n,{code:X.invalid_type,expected:le.null,received:n.parsedType}),we}return Tt(e.data)}}ki.create=t=>new ki({typeName:ve.ZodNull,...Be(t)});class bo extends Ae{constructor(){super(...arguments),this._any=!0}_parse(e){return Tt(e.data)}}bo.create=t=>new bo({typeName:ve.ZodAny,...Be(t)});class Wr extends Ae{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Tt(e.data)}}Wr.create=t=>new Wr({typeName:ve.ZodUnknown,...Be(t)});class Wn extends Ae{_parse(e){const n=this._getOrReturnCtx(e);return se(n,{code:X.invalid_type,expected:le.never,received:n.parsedType}),we}}Wn.create=t=>new Wn({typeName:ve.ZodNever,...Be(t)});class Vs extends Ae{_parse(e){if(this._getType(e)!==le.undefined){const n=this._getOrReturnCtx(e);return se(n,{code:X.invalid_type,expected:le.void,received:n.parsedType}),we}return Tt(e.data)}}Vs.create=t=>new Vs({typeName:ve.ZodVoid,...Be(t)});class un extends Ae{_parse(e){const{ctx:n,status:o}=this._processInputParams(e),s=this._def;if(n.parsedType!==le.array)return se(n,{code:X.invalid_type,expected:le.array,received:n.parsedType}),we;if(s.exactLength!==null){const c=n.data.length>s.exactLength.value,u=n.data.length<s.exactLength.value;(c||u)&&(se(n,{code:c?X.too_big:X.too_small,minimum:u?s.exactLength.value:void 0,maximum:c?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),o.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(se(n,{code:X.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),o.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(se(n,{code:X.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((c,u)=>s.type._parseAsync(new Dn(n,c,n.path,u)))).then(c=>wt.mergeArray(o,c));const l=[...n.data].map((c,u)=>s.type._parseSync(new Dn(n,c,n.path,u)));return wt.mergeArray(o,l)}get element(){return this._def.type}min(e,n){return new un({...this._def,minLength:{value:e,message:he.toString(n)}})}max(e,n){return new un({...this._def,maxLength:{value:e,message:he.toString(n)}})}length(e,n){return new un({...this._def,exactLength:{value:e,message:he.toString(n)}})}nonempty(e){return this.min(1,e)}}un.create=(t,e)=>new un({type:t,minLength:null,maxLength:null,exactLength:null,typeName:ve.ZodArray,...Be(e)});function xo(t){if(t instanceof et){const e={};for(const n in t.shape){const o=t.shape[n];e[n]=Rn.create(xo(o))}return new et({...t._def,shape:()=>e})}else return t instanceof un?new un({...t._def,type:xo(t.element)}):t instanceof Rn?Rn.create(xo(t.unwrap())):t instanceof vr?vr.create(xo(t.unwrap())):t instanceof Fn?Fn.create(t.items.map(e=>xo(e))):t}class et extends Ae{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Le.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==le.object){const p=this._getOrReturnCtx(e);return se(p,{code:X.invalid_type,expected:le.object,received:p.parsedType}),we}const{status:n,ctx:o}=this._processInputParams(e),{shape:s,keys:l}=this._getCached(),c=[];if(!(this._def.catchall instanceof Wn&&this._def.unknownKeys==="strip"))for(const p in o.data)l.includes(p)||c.push(p);const u=[];for(const p of l){const f=s[p],m=o.data[p];u.push({key:{status:"valid",value:p},value:f._parse(new Dn(o,m,o.path,p)),alwaysSet:p in o.data})}if(this._def.catchall instanceof Wn){const p=this._def.unknownKeys;if(p==="passthrough")for(const f of c)u.push({key:{status:"valid",value:f},value:{status:"valid",value:o.data[f]}});else if(p==="strict")c.length>0&&(se(o,{code:X.unrecognized_keys,keys:c}),n.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const f of c){const m=o.data[f];u.push({key:{status:"valid",value:f},value:p._parse(new Dn(o,m,o.path,f)),alwaysSet:f in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const p=[];for(const f of u){const m=await f.key,y=await f.value;p.push({key:m,value:y,alwaysSet:f.alwaysSet})}return p}).then(p=>wt.mergeObjectSync(n,p)):wt.mergeObjectSync(n,u)}get shape(){return this._def.shape()}strict(e){return he.errToObj,new et({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,o)=>{var s,l,c,u;const p=(c=(l=(s=this._def).errorMap)===null||l===void 0?void 0:l.call(s,n,o).message)!==null&&c!==void 0?c:o.defaultError;return n.code==="unrecognized_keys"?{message:(u=he.errToObj(e).message)!==null&&u!==void 0?u:p}:{message:p}}}:{}})}strip(){return new et({...this._def,unknownKeys:"strip"})}passthrough(){return new et({...this._def,unknownKeys:"passthrough"})}extend(e){return new et({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new et({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:ve.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new et({...this._def,catchall:e})}pick(e){const n={};return Le.objectKeys(e).forEach(o=>{e[o]&&this.shape[o]&&(n[o]=this.shape[o])}),new et({...this._def,shape:()=>n})}omit(e){const n={};return Le.objectKeys(this.shape).forEach(o=>{e[o]||(n[o]=this.shape[o])}),new et({...this._def,shape:()=>n})}deepPartial(){return xo(this)}partial(e){const n={};return Le.objectKeys(this.shape).forEach(o=>{const s=this.shape[o];e&&!e[o]?n[o]=s:n[o]=s.optional()}),new et({...this._def,shape:()=>n})}required(e){const n={};return Le.objectKeys(this.shape).forEach(o=>{if(e&&!e[o])n[o]=this.shape[o];else{let s=this.shape[o];for(;s instanceof Rn;)s=s._def.innerType;n[o]=s}}),new et({...this._def,shape:()=>n})}keyof(){return np(Le.objectKeys(this.shape))}}et.create=(t,e)=>new et({shape:()=>t,unknownKeys:"strip",catchall:Wn.create(),typeName:ve.ZodObject,...Be(e)}),et.strictCreate=(t,e)=>new et({shape:()=>t,unknownKeys:"strict",catchall:Wn.create(),typeName:ve.ZodObject,...Be(e)}),et.lazycreate=(t,e)=>new et({shape:t,unknownKeys:"strip",catchall:Wn.create(),typeName:ve.ZodObject,...Be(e)});class Si extends Ae{_parse(e){const{ctx:n}=this._processInputParams(e),o=this._def.options;function s(l){for(const u of l)if(u.result.status==="valid")return u.result;for(const u of l)if(u.result.status==="dirty")return n.common.issues.push(...u.ctx.common.issues),u.result;const c=l.map(u=>new Gt(u.ctx.common.issues));return se(n,{code:X.invalid_union,unionErrors:c}),we}if(n.common.async)return Promise.all(o.map(async l=>{const c={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:c}),ctx:c}})).then(s);{let l;const c=[];for(const p of o){const f={...n,common:{...n.common,issues:[]},parent:null},m=p._parseSync({data:n.data,path:n.path,parent:f});if(m.status==="valid")return m;m.status==="dirty"&&!l&&(l={result:m,ctx:f}),f.common.issues.length&&c.push(f.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const u=c.map(p=>new Gt(p));return se(n,{code:X.invalid_union,unionErrors:u}),we}}get options(){return this._def.options}}Si.create=(t,e)=>new Si({options:t,typeName:ve.ZodUnion,...Be(e)});const yr=t=>t instanceof Bi?yr(t.schema):t instanceof pn?yr(t.innerType()):t instanceof Vi?[t.value]:t instanceof _r?t.options:t instanceof Ni?Le.objectValues(t.enum):t instanceof Ai?yr(t._def.innerType):t instanceof xi?[void 0]:t instanceof ki?[null]:t instanceof Rn?[void 0,...yr(t.unwrap())]:t instanceof vr?[null,...yr(t.unwrap())]:t instanceof Dl||t instanceof Fi?yr(t.unwrap()):t instanceof Pi?yr(t._def.innerType):[];class Ns extends Ae{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==le.object)return se(n,{code:X.invalid_type,expected:le.object,received:n.parsedType}),we;const o=this.discriminator,s=n.data[o],l=this.optionsMap.get(s);return l?n.common.async?l._parseAsync({data:n.data,path:n.path,parent:n}):l._parseSync({data:n.data,path:n.path,parent:n}):(se(n,{code:X.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),we)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,o){const s=new Map;for(const l of n){const c=yr(l.shape[e]);if(!c.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const u of c){if(s.has(u))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(u)}`);s.set(u,l)}}return new Ns({typeName:ve.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:s,...Be(o)})}}function Pl(t,e){const n=fr(t),o=fr(e);if(t===e)return{valid:!0,data:t};if(n===le.object&&o===le.object){const s=Le.objectKeys(e),l=Le.objectKeys(t).filter(u=>s.indexOf(u)!==-1),c={...t,...e};for(const u of l){const p=Pl(t[u],e[u]);if(!p.valid)return{valid:!1};c[u]=p.data}return{valid:!0,data:c}}else if(n===le.array&&o===le.array){if(t.length!==e.length)return{valid:!1};const s=[];for(let l=0;l<t.length;l++){const c=t[l],u=e[l],p=Pl(c,u);if(!p.valid)return{valid:!1};s.push(p.data)}return{valid:!0,data:s}}else return n===le.date&&o===le.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Ei extends Ae{_parse(e){const{status:n,ctx:o}=this._processInputParams(e),s=(l,c)=>{if(Vl(l)||Vl(c))return we;const u=Pl(l.value,c.value);return u.valid?((Nl(l)||Nl(c))&&n.dirty(),{status:n.value,value:u.data}):(se(o,{code:X.invalid_intersection_types}),we)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([l,c])=>s(l,c)):s(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}Ei.create=(t,e,n)=>new Ei({left:t,right:e,typeName:ve.ZodIntersection,...Be(n)});class Fn extends Ae{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.array)return se(o,{code:X.invalid_type,expected:le.array,received:o.parsedType}),we;if(o.data.length<this._def.items.length)return se(o,{code:X.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),we;!this._def.rest&&o.data.length>this._def.items.length&&(se(o,{code:X.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...o.data].map((l,c)=>{const u=this._def.items[c]||this._def.rest;return u?u._parse(new Dn(o,l,o.path,c)):null}).filter(l=>!!l);return o.common.async?Promise.all(s).then(l=>wt.mergeArray(n,l)):wt.mergeArray(n,s)}get items(){return this._def.items}rest(e){return new Fn({...this._def,rest:e})}}Fn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Fn({items:t,typeName:ve.ZodTuple,rest:null,...Be(e)})};class Ti extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.object)return se(o,{code:X.invalid_type,expected:le.object,received:o.parsedType}),we;const s=[],l=this._def.keyType,c=this._def.valueType;for(const u in o.data)s.push({key:l._parse(new Dn(o,u,o.path,u)),value:c._parse(new Dn(o,o.data[u],o.path,u)),alwaysSet:u in o.data});return o.common.async?wt.mergeObjectAsync(n,s):wt.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(e,n,o){return n instanceof Ae?new Ti({keyType:e,valueType:n,typeName:ve.ZodRecord,...Be(o)}):new Ti({keyType:dn.create(),valueType:e,typeName:ve.ZodRecord,...Be(n)})}}class As extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.map)return se(o,{code:X.invalid_type,expected:le.map,received:o.parsedType}),we;const s=this._def.keyType,l=this._def.valueType,c=[...o.data.entries()].map(([u,p],f)=>({key:s._parse(new Dn(o,u,o.path,[f,"key"])),value:l._parse(new Dn(o,p,o.path,[f,"value"]))}));if(o.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const p of c){const f=await p.key,m=await p.value;if(f.status==="aborted"||m.status==="aborted")return we;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}})}else{const u=new Map;for(const p of c){const f=p.key,m=p.value;if(f.status==="aborted"||m.status==="aborted")return we;(f.status==="dirty"||m.status==="dirty")&&n.dirty(),u.set(f.value,m.value)}return{status:n.value,value:u}}}}As.create=(t,e,n)=>new As({valueType:e,keyType:t,typeName:ve.ZodMap,...Be(n)});class Hr extends Ae{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.set)return se(o,{code:X.invalid_type,expected:le.set,received:o.parsedType}),we;const s=this._def;s.minSize!==null&&o.data.size<s.minSize.value&&(se(o,{code:X.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&o.data.size>s.maxSize.value&&(se(o,{code:X.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const l=this._def.valueType;function c(p){const f=new Set;for(const m of p){if(m.status==="aborted")return we;m.status==="dirty"&&n.dirty(),f.add(m.value)}return{status:n.value,value:f}}const u=[...o.data.values()].map((p,f)=>l._parse(new Dn(o,p,o.path,f)));return o.common.async?Promise.all(u).then(p=>c(p)):c(u)}min(e,n){return new Hr({...this._def,minSize:{value:e,message:he.toString(n)}})}max(e,n){return new Hr({...this._def,maxSize:{value:e,message:he.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Hr.create=(t,e)=>new Hr({valueType:t,minSize:null,maxSize:null,typeName:ve.ZodSet,...Be(e)});class ko extends Ae{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==le.function)return se(n,{code:X.invalid_type,expected:le.function,received:n.parsedType}),we;function o(u,p){return Ss({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ks(),wo].filter(f=>!!f),issueData:{code:X.invalid_arguments,argumentsError:p}})}function s(u,p){return Ss({data:u,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ks(),wo].filter(f=>!!f),issueData:{code:X.invalid_return_type,returnTypeError:p}})}const l={errorMap:n.common.contextualErrorMap},c=n.data;if(this._def.returns instanceof So){const u=this;return Tt(async function(...p){const f=new Gt([]),m=await u._def.args.parseAsync(p,l).catch(T=>{throw f.addIssue(o(p,T)),f}),y=await Reflect.apply(c,this,m);return await u._def.returns._def.type.parseAsync(y,l).catch(T=>{throw f.addIssue(s(y,T)),f})})}else{const u=this;return Tt(function(...p){const f=u._def.args.safeParse(p,l);if(!f.success)throw new Gt([o(p,f.error)]);const m=Reflect.apply(c,this,f.data),y=u._def.returns.safeParse(m,l);if(!y.success)throw new Gt([s(m,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ko({...this._def,args:Fn.create(e).rest(Wr.create())})}returns(e){return new ko({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,o){return new ko({args:e||Fn.create([]).rest(Wr.create()),returns:n||Wr.create(),typeName:ve.ZodFunction,...Be(o)})}}class Bi extends Ae{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Bi.create=(t,e)=>new Bi({getter:t,typeName:ve.ZodLazy,...Be(e)});class Vi extends Ae{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return se(n,{received:n.data,code:X.invalid_literal,expected:this._def.value}),we}return{status:"valid",value:e.data}}get value(){return this._def.value}}Vi.create=(t,e)=>new Vi({value:t,typeName:ve.ZodLiteral,...Be(e)});function np(t,e){return new _r({values:t,typeName:ve.ZodEnum,...Be(e)})}class _r extends Ae{constructor(){super(...arguments),Ci.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),o=this._def.values;return se(n,{expected:Le.joinValues(o),received:n.parsedType,code:X.invalid_type}),we}if(Ts(this,Ci)||Ju(this,Ci,new Set(this._def.values)),!Ts(this,Ci).has(e.data)){const n=this._getOrReturnCtx(e),o=this._def.values;return se(n,{received:n.data,code:X.invalid_enum_value,options:o}),we}return Tt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return _r.create(e,{...this._def,...n})}exclude(e,n=this._def){return _r.create(this.options.filter(o=>!e.includes(o)),{...this._def,...n})}}Ci=new WeakMap,_r.create=np;class Ni extends Ae{constructor(){super(...arguments),wi.set(this,void 0)}_parse(e){const n=Le.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==le.string&&o.parsedType!==le.number){const s=Le.objectValues(n);return se(o,{expected:Le.joinValues(s),received:o.parsedType,code:X.invalid_type}),we}if(Ts(this,wi)||Ju(this,wi,new Set(Le.getValidEnumValues(this._def.values))),!Ts(this,wi).has(e.data)){const s=Le.objectValues(n);return se(o,{received:o.data,code:X.invalid_enum_value,options:s}),we}return Tt(e.data)}get enum(){return this._def.values}}wi=new WeakMap,Ni.create=(t,e)=>new Ni({values:t,typeName:ve.ZodNativeEnum,...Be(e)});class So extends Ae{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==le.promise&&n.common.async===!1)return se(n,{code:X.invalid_type,expected:le.promise,received:n.parsedType}),we;const o=n.parsedType===le.promise?n.data:Promise.resolve(n.data);return Tt(o.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}So.create=(t,e)=>new So({type:t,typeName:ve.ZodPromise,...Be(e)});class pn extends Ae{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ve.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:o}=this._processInputParams(e),s=this._def.effect||null,l={addIssue:c=>{se(o,c),c.fatal?n.abort():n.dirty()},get path(){return o.path}};if(l.addIssue=l.addIssue.bind(l),s.type==="preprocess"){const c=s.transform(o.data,l);if(o.common.async)return Promise.resolve(c).then(async u=>{if(n.value==="aborted")return we;const p=await this._def.schema._parseAsync({data:u,path:o.path,parent:o});return p.status==="aborted"?we:p.status==="dirty"||n.value==="dirty"?Es(p.value):p});{if(n.value==="aborted")return we;const u=this._def.schema._parseSync({data:c,path:o.path,parent:o});return u.status==="aborted"?we:u.status==="dirty"||n.value==="dirty"?Es(u.value):u}}if(s.type==="refinement"){const c=u=>{const p=s.refinement(u,l);if(o.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(o.common.async===!1){const u=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return u.status==="aborted"?we:(u.status==="dirty"&&n.dirty(),c(u.value),{status:n.value,value:u.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(u=>u.status==="aborted"?we:(u.status==="dirty"&&n.dirty(),c(u.value).then(()=>({status:n.value,value:u.value}))))}if(s.type==="transform")if(o.common.async===!1){const c=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!_i(c))return c;const u=s.transform(c.value,l);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:u}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(c=>_i(c)?Promise.resolve(s.transform(c.value,l)).then(u=>({status:n.value,value:u})):c);Le.assertNever(s)}}pn.create=(t,e,n)=>new pn({schema:t,typeName:ve.ZodEffects,effect:e,...Be(n)}),pn.createWithPreprocess=(t,e,n)=>new pn({schema:e,effect:{type:"preprocess",transform:t},typeName:ve.ZodEffects,...Be(n)});class Rn extends Ae{_parse(e){return this._getType(e)===le.undefined?Tt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Rn.create=(t,e)=>new Rn({innerType:t,typeName:ve.ZodOptional,...Be(e)});class vr extends Ae{_parse(e){return this._getType(e)===le.null?Tt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}vr.create=(t,e)=>new vr({innerType:t,typeName:ve.ZodNullable,...Be(e)});class Ai extends Ae{_parse(e){const{ctx:n}=this._processInputParams(e);let o=n.data;return n.parsedType===le.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ai.create=(t,e)=>new Ai({innerType:t,typeName:ve.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Be(e)});class Pi extends Ae{_parse(e){const{ctx:n}=this._processInputParams(e),o={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return vi(s)?s.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Gt(o.common.issues)},input:o.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Gt(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}Pi.create=(t,e)=>new Pi({innerType:t,typeName:ve.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Be(e)});class Ps extends Ae{_parse(e){if(this._getType(e)!==le.nan){const n=this._getOrReturnCtx(e);return se(n,{code:X.invalid_type,expected:le.nan,received:n.parsedType}),we}return{status:"valid",value:e.data}}}Ps.create=t=>new Ps({typeName:ve.ZodNaN,...Be(t)});const bk=Symbol("zod_brand");class Dl extends Ae{_parse(e){const{ctx:n}=this._processInputParams(e),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}}class Di extends Ae{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return s.status==="aborted"?we:s.status==="dirty"?(n.dirty(),Es(s.value)):this._def.out._parseAsync({data:s.value,path:o.path,parent:o})})();{const s=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return s.status==="aborted"?we:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:o.path,parent:o})}}static create(e,n){return new Di({in:e,out:n,typeName:ve.ZodPipeline})}}class Fi extends Ae{_parse(e){const n=this._def.innerType._parse(e),o=s=>(_i(s)&&(s.value=Object.freeze(s.value)),s);return vi(n)?n.then(s=>o(s)):o(n)}unwrap(){return this._def.innerType}}Fi.create=(t,e)=>new Fi({innerType:t,typeName:ve.ZodReadonly,...Be(e)});function rp(t,e={},n){return t?bo.create().superRefine((o,s)=>{var l,c;if(!t(o)){const u=typeof e=="function"?e(o):typeof e=="string"?{message:e}:e,p=(c=(l=u.fatal)!==null&&l!==void 0?l:n)!==null&&c!==void 0?c:!0,f=typeof u=="string"?{message:u}:u;s.addIssue({code:"custom",...f,fatal:p})}}):bo.create()}const xk={object:et.lazycreate};var ve;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(ve||(ve={}));const kk=(t,e={message:`Input not instance of ${t.name}`})=>rp(n=>n instanceof t,e),op=dn.create,ip=mr.create,Sk=Ps.create,Ek=gr.create,sp=bi.create,Tk=Zr.create,Bk=Bs.create,Vk=xi.create,Nk=ki.create,Ak=bo.create,Pk=Wr.create,Dk=Wn.create,Fk=Vs.create,Rk=un.create,Mk=et.create,Ik=et.strictCreate,Ok=Si.create,Lk=Ns.create,Gk=Ei.create,zk=Fn.create,$k=Ti.create,Uk=As.create,Zk=Hr.create,Wk=ko.create,Hk=Bi.create,jk=Vi.create,qk=_r.create,Kk=Ni.create,Yk=So.create,ap=pn.create,Jk=Rn.create,Xk=vr.create,Qk=pn.createWithPreprocess,eS=Di.create;var Mn=Object.freeze({__proto__:null,defaultErrorMap:wo,setErrorMap:ik,getErrorMap:ks,makeIssue:Ss,EMPTY_PATH:sk,addIssueToContext:se,ParseStatus:wt,INVALID:we,DIRTY:Es,OK:Tt,isAborted:Vl,isDirty:Nl,isValid:_i,isAsync:vi,get util(){return Le},get objectUtil(){return Bl},ZodParsedType:le,getParsedType:fr,ZodType:Ae,datetimeRegex:tp,ZodString:dn,ZodNumber:mr,ZodBigInt:gr,ZodBoolean:bi,ZodDate:Zr,ZodSymbol:Bs,ZodUndefined:xi,ZodNull:ki,ZodAny:bo,ZodUnknown:Wr,ZodNever:Wn,ZodVoid:Vs,ZodArray:un,ZodObject:et,ZodUnion:Si,ZodDiscriminatedUnion:Ns,ZodIntersection:Ei,ZodTuple:Fn,ZodRecord:Ti,ZodMap:As,ZodSet:Hr,ZodFunction:ko,ZodLazy:Bi,ZodLiteral:Vi,ZodEnum:_r,ZodNativeEnum:Ni,ZodPromise:So,ZodEffects:pn,ZodTransformer:pn,ZodOptional:Rn,ZodNullable:vr,ZodDefault:Ai,ZodCatch:Pi,ZodNaN:Ps,BRAND:bk,ZodBranded:Dl,ZodPipeline:Di,ZodReadonly:Fi,custom:rp,Schema:Ae,ZodSchema:Ae,late:xk,get ZodFirstPartyTypeKind(){return ve},coerce:{string:t=>dn.create({...t,coerce:!0}),number:t=>mr.create({...t,coerce:!0}),boolean:t=>bi.create({...t,coerce:!0}),bigint:t=>gr.create({...t,coerce:!0}),date:t=>Zr.create({...t,coerce:!0})},any:Ak,array:Rk,bigint:Ek,boolean:sp,date:Tk,discriminatedUnion:Lk,effect:ap,enum:qk,function:Wk,instanceof:kk,intersection:Gk,lazy:Hk,literal:jk,map:Uk,nan:Sk,nativeEnum:Kk,never:Dk,null:Nk,nullable:Xk,number:ip,object:Mk,oboolean:()=>sp().optional(),onumber:()=>ip().optional(),optional:Jk,ostring:()=>op().optional(),pipeline:eS,preprocess:Qk,promise:Yk,record:$k,set:Zk,strictObject:Ik,string:op,symbol:Bk,transformer:ap,tuple:zk,undefined:Vk,union:Ok,unknown:Pk,void:Fk,NEVER:we,ZodIssueCode:X,quotelessJson:ok,ZodError:Gt});function tS(t){throw new Error("Unexpected object: "+t)}const lp="upload://upload/",cp="index://index/";function nS(t){return t.startsWith(lp)}function rS(t){return t.startsWith(cp)}function dp(t){if(rS(t)){const e=t.slice(cp.length);return JSON.parse(decodeURIComponent(e)).path}else if(nS(t)){const e=t.slice(lp.length);return JSON.parse(decodeURIComponent(e)).localPath}tS(t)}function oS(t){return t.replace(/^.*[\\/]/,"")}function iS(t){return oS(dp(t))}Mn.object({__isRef:Mn.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:Mn.string().describe("Upstream block id"),name:Mn.string().describe("Name of the output provided to the upstream block's output context")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").strict().readonly();const sS=Mn.object({type:Mn.string(),importance:Mn.number().optional(),id:Mn.string().optional(),label:Mn.string()});Mn.array(sS);const aS={key:0,ref:"label"},lS={key:0,class:"required-icon"},cS=["data-placeholder"],dS={key:5,class:"pl-file-input__stats"},uS={key:0,class:"pl-file-input__error"},pS={key:1,class:"pl-file-input__helper"},up=r.defineComponent({__name:"PlFileInput",props:{modelValue:{},label:{default:void 0},required:{type:Boolean},dashed:{type:Boolean},extensions:{default:void 0},placeholder:{default:void 0},progress:{default:void 0},error:{default:void 0},helper:{default:void 0},cellStyle:{type:Boolean,default:!1},fileDialogTitle:{default:void 0},fileDialogCloseOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.reactive({fileDialogOpen:!1,error:""}),o=r.useSlots(),s=e,l=t,c=(O,F)=>{if(O)try{return F(O)}catch(N){return n.error=N instanceof Error?N.message:String(N),O}},u=r.computed(()=>c(l.modelValue,iS)),p=r.computed(()=>c(l.modelValue,dp)),f=r.computed(()=>l.progress&&!l.progress.done),m=r.computed(()=>l.progress&&l.progress.done),y=r.computed(()=>n.error??l.error),T=r.computed(()=>!!y.value),B=r.computed(()=>{const{status:O,done:F}=l.progress??{};return!O||!O.bytesTotal?"":O.bytesProcessed&&!F?al(O.bytesProcessed,{})+" / "+al(O.bytesTotal,{}):al(O.bytesTotal,{})}),A=r.computed(()=>{var O;const{progress:F}=l;return F?{width:F.done?"100%":Math.round((((O=F.status)==null?void 0:O.progress)??0)*100)+"%"}:{}}),I=()=>{n.fileDialogOpen=!0},L=O=>{O.files.length&&s("update:modelValue",O.files[0])},C=()=>s("update:modelValue",void 0);r.watch(()=>l.modelValue,()=>{n.error=""},{immediate:!0});const R=r.ref();return l.cellStyle||Zn(R),(O,F)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("div",{class:r.normalizeClass([{"pl-file-input__cell-style":!!O.cellStyle,"has-file":!!u.value},"pl-file-input__envelope"])},[r.createElementVNode("div",{ref_key:"rootRef",ref:R,class:r.normalizeClass(["pl-file-input",{dashed:O.dashed,error:T.value}]),tabindex:"0",onKeyup:r.withKeys(I,["enter"]),onClick:r.withModifiers(I,["stop"])},[r.createElementVNode("div",{class:"pl-file-input__progress",style:r.normalizeStyle(A.value)},null,4),F[3]||(F[3]=r.createTextVNode()),!O.cellStyle&&O.label?(r.openBlock(),r.createElementBlock("label",aS,[O.required?(r.openBlock(),r.createElementBlock("i",lS)):r.createCommentVNode("",!0),F[1]||(F[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(O.label),1),F[2]||(F[2]=r.createTextVNode()),r.unref(o).tooltip||p.value?(r.openBlock(),r.createBlock(r.unref(Ct),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.unref(o).tooltip?r.renderSlot(O.$slots,"tooltip",{key:0}):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(p.value),1)],64))]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),F[4]||(F[4]=r.createTextVNode()),T.value?(r.openBlock(),r.createBlock(r.unref(cn),{key:1,name:"restart"})):f.value?(r.openBlock(),r.createBlock(r.unref(cn),{key:2,name:"cloud-upload"})):m.value?(r.openBlock(),r.createBlock(r.unref(cn),{key:3,name:"success"})):(r.openBlock(),r.createBlock(r.unref(cn),{key:4,name:"paper-clip"})),F[5]||(F[5]=r.createTextVNode()),r.createElementVNode("div",{"data-placeholder":O.placeholder??"Choose file",class:"pl-file-input__filename"},r.toDisplayString(u.value),9,cS),F[6]||(F[6]=r.createTextVNode()),B.value?(r.openBlock(),r.createElementBlock("div",dS,r.toDisplayString(B.value),1)):r.createCommentVNode("",!0),F[7]||(F[7]=r.createTextVNode()),O.modelValue?(r.openBlock(),r.createBlock(r.unref(cn),{key:6,name:"close",onClick:r.withModifiers(C,["stop"])})):r.createCommentVNode("",!0),F[8]||(F[8]=r.createTextVNode()),r.createVNode(hr,{class:"pl-file-input__contour"})],34),F[9]||(F[9]=r.createTextVNode()),T.value?(r.openBlock(),r.createElementBlock("div",uS,r.toDisplayString(y.value),1)):O.helper?(r.openBlock(),r.createElementBlock("div",pS,r.toDisplayString(O.helper),1)):r.createCommentVNode("",!0)],2),F[10]||(F[10]=r.createTextVNode()),r.createVNode(r.unref(Ku),{modelValue:n.fileDialogOpen,"onUpdate:modelValue":F[0]||(F[0]=N=>n.fileDialogOpen=N),extensions:O.extensions,title:O.fileDialogTitle,"close-on-outside-click":O.fileDialogCloseOnOutsideClick,"onImport:files":L},null,8,["modelValue","extensions","title","close-on-outside-click"])],64))}}),hS={class:"pl-notification-alert__wrapper d-flex"},fS={class:"pl-notification-alert__content flex-grow-1"},mS={key:0,class:"pl-notification-alert__close"},gS={key:0,class:"pl-notification-alert__actions d-flex"},pp=r.defineComponent({__name:"PlNotificationAlert",props:r.mergeModels({type:{default:"neutral"},width:{default:"256px"},closable:{type:Boolean}},{modelValue:{type:Boolean,default:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=r.useModel(t,"modelValue");function o(){e.closable&&(n.value=!1)}return(s,l)=>n.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([s.type,"pl-notification-alert d-flex flex-column gap-16"]),style:r.normalizeStyle({width:`${s.width}`})},[r.createElementVNode("div",hS,[r.createElementVNode("div",fS,[r.renderSlot(s.$slots,"default")]),l[0]||(l[0]=r.createTextVNode()),s.closable?(r.openBlock(),r.createElementBlock("div",mS,[r.createVNode(r.unref(Cs),{icon:"close",onClick:o})])):r.createCommentVNode("",!0)]),l[1]||(l[1]=r.createTextVNode()),s.$slots.actions?(r.openBlock(),r.createElementBlock("div",gS,[r.renderSlot(s.$slots,"actions")])):r.createCommentVNode("",!0)],6)):r.createCommentVNode("",!0)}}),yS=r.defineComponent({__name:"ContextProvider",props:{context:{},contextKey:{}},setup(t){const e=t;return r.provide(e.contextKey,r.computed(()=>e.context)),(n,o)=>r.renderSlot(n.$slots,"default")}});function bt(t,e,n){return e>t?e:t>n?n:t}const Fl=t=>r.computed(()=>{const e=[100],{min:n,max:o,step:s}=t.value;let l=n;for(;l<o;){l+=s;const c=(1-(bt(l,n,o)-n)/(o-n))*100;e.push(c)}return e}),_S={class:"ui-slider__wrapper"},vS={class:"ui-slider__label-section"},CS={key:0,class:"text-s"},wS={key:1,class:"ui-slider__value-static text-s"},bS={class:"ui-slider__base"},xS={class:"ui-slider__container"},kS={class:"ui-slider__container ui-slider__container-thumb"},SS={class:"ui-slider__input-wrapper d-flex"},ES=["value"],TS={key:0,class:"ui-slider__error"},hp=r.defineComponent({__name:"Slider",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:""},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,s=t,l=r.reactive({deltaValue:0}),c=r.computed(()=>s.max-s.min),u=r.computed(()=>bt((s.modelValue??0)+l.deltaValue,s.min,s.max)),p=r.ref(s.modelValue),f=r.computed(()=>{const N=s.modelValue;return Number.isFinite(N)?N<s.min?`Min value: ${s.min}`:N>s.max?`Max value: ${s.max}`:s.error:"Not a number"}),m=r.computed(()=>s),y=Fl(m),T=r.computed(()=>(u.value-s.min)/c.value),B=r.computed(()=>({right:Math.ceil((1-T.value)*100)+"%"})),A=r.computed(()=>({right:`calc(${Math.ceil((1-T.value)*100)}%) `})),I=r.ref(),L=r.ref();r.watch(()=>s.modelValue,N=>{p.value=N});function C(N){const U=bt(N,s.min,s.max);return Math.round((U+Number.EPSILON)*(1/s.step))/(1/s.step)}ur(L,N=>{var U;ct((U=r.unref(I))==null?void 0:U.getBoundingClientRect(),te=>{const{dx:j}=N;l.deltaValue=j/te.width*c.value,p.value=C(bt((s.modelValue??0)+l.deltaValue,s.min,s.max)),N.stop&&(o("update:modelValue",C(u.value)),l.deltaValue=0)})});function R(N){o("update:modelValue",C(N))}function O(N){R(+N.target.value)}function F(N){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(N.code)&&N.preventDefault();const U=N.code==="ArrowUp"||N.code==="ArrowRight"?s.step*1:N.code==="ArrowDown"||N.code==="ArrowLeft"?s.step*-1:0;R(s.modelValue+U)}return(N,U)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([s.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${s.mode}`,"ui-slider"])},[r.createElementVNode("div",_S,[r.createElementVNode("div",vS,[N.label?(r.openBlock(),r.createElementBlock("label",CS,[r.createElementVNode("span",null,r.toDisplayString(N.label),1),U[1]||(U[1]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(Ct),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(N.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),U[2]||(U[2]=r.createTextVNode()),s.mode==="text"?(r.openBlock(),r.createElementBlock("div",wS,r.toDisplayString(p.value)+r.toDisplayString(N.measure),1)):r.createCommentVNode("",!0)]),U[6]||(U[6]=r.createTextVNode()),r.createElementVNode("div",bS,[r.createElementVNode("div",xS,[r.createElementVNode("div",{ref_key:"barRef",ref:I,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(B.value)},null,4)],512)]),U[5]||(U[5]=r.createTextVNode()),r.createElementVNode("div",kS,[s.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(y),(te,j)=>(r.openBlock(),r.createElementBlock("div",{key:j,style:r.normalizeStyle({right:`${te}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),U[4]||(U[4]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef",ref:L,tabindex:"0",class:"ui-slider__thumb ui-slider__thumb-active",style:r.normalizeStyle(A.value),onKeydown:F},U[3]||(U[3]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),U[7]||(U[7]=r.createTextVNode()),r.createElementVNode("div",SS,[s.mode==="input"?(r.openBlock(),r.createElementBlock("input",{key:0,value:p.value,class:"ui-slider__value text-s",onChange:U[0]||(U[0]=te=>O(te))},null,40,ES)):r.createCommentVNode("",!0)])],2),U[8]||(U[8]=r.createTextVNode()),f.value?(r.openBlock(),r.createElementBlock("div",TS,r.toDisplayString(f.value),1)):r.createCommentVNode("",!0)],2))}});function BS(t,e=null,n=null){function o(u){const{scrollTop:p,scrollHeight:f,clientHeight:m}=u;if(!(f>m)||!e)return null;const y=f-p-m,T=p>e?e:0,B=y>e?m-e-T:m;return`linear-gradient(
|
|
52
|
+
`,W0=["innerHTML"],H0={class:"dropdown-list-item__title-container"},q0={class:"dropdown-list-item__title text-s"},K0={key:0,class:"dropdown-list-item__description text-description"},X0={key:1,class:"dropdown-list-item__icon flex-self-start"},yo=r.defineComponent({__name:"DropdownListItem",props:{option:{},isSelected:{type:Boolean,default:!1},size:{default:"small"},isHovered:{type:Boolean,default:!1},useCheckbox:{type:Boolean,default:!1}},setup(t){const e=t,n=r.computed(()=>{const l=[];return e.size==="small"&&l.push("dropdown-list-item__small"),e.isSelected&&l.push("dropdown-list-item__selected"),e.isHovered&&l.push("hovered-item"),l.join(" ")}),o=r.computed(()=>{const l=["dropdown-list-item__checkbox","flex-self-start"];return e.isSelected&&l.push("checked"),l.join(" ")}),i=r.computed(()=>e.isSelected?j0:Z0);return(l,c)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([n.value,"dropdown-list-item"])},[e.useCheckbox?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(o.value),innerHTML:i.value},null,10,W0)):r.createCommentVNode("",!0),c[1]||(c[1]=r.createTextVNode()),r.createElementVNode("div",H0,[r.createElementVNode("div",q0,r.toDisplayString(l.option.label),1),c[0]||(c[0]=r.createTextVNode()),l.option.description?(r.openBlock(),r.createElementBlock("div",K0,r.toDisplayString(l.option.description),1)):r.createCommentVNode("",!0)]),c[2]||(c[2]=r.createTextVNode()),!e.useCheckbox&&e.isSelected?(r.openBlock(),r.createElementBlock("div",X0)):r.createCommentVNode("",!0)],2))}});function vo(t,e){const n=Nl(()=>{if(t.value){const{scrollTop:o,scrollLeft:i,scrollHeight:l,scrollWidth:c,clientHeight:d,clientWidth:p}=document.documentElement,h=t.value.getBoundingClientRect();e({scrollTop:o,scrollLeft:i,scrollHeight:l,scrollWidth:c,clientHeight:d,clientWidth:p,offsetY:o+h.y,offsetX:i+h.x,top:h.top,right:h.right,bottom:h.bottom,left:h.left,width:h.width,height:h.height,x:h.x,y:h.y})}});r.onMounted(n),st(window,"scroll",n,{capture:!0,passive:!0}),st(window,"resize",n,{passive:!0}),st(window,"adjust",n,!0)}const Y0=r.defineComponent({__name:"PlMaskIcon16",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>e.size==="large"?"--mask-size: 24px":""),o=r.computed(()=>`mask-16 mask-${e.name}`);return(i,l)=>(r.openBlock(),r.createElementBlock("i",{style:r.normalizeStyle(n.value),class:r.normalizeClass([o.value,i.$style.icon])},null,6))}}),J0="_icon_1ugxm_2",Q0={icon:J0},ew={$style:Q0},fn=Zt(Y0,[["__cssModules",ew]]),tw=["onKeyup"],nw=r.defineComponent({__name:"PlBtnSplit",props:r.mergeModels({options:{},disabled:{type:Boolean},loading:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:r.mergeModels(["click"],["update:modelValue"]),setup(t,{expose:e,emit:n}){const o=t,i=n,l=r.useModel(t,"modelValue"),c=r.ref(),d=r.ref(),p=r.ref(),h=r.ref(),m=r.reactive({open:!1,optionsHeight:0,activeIndex:-1});e({data:m});const y=r.reactive({top:"0px",left:"0px",width:"0px"});r.watch(d,A=>{if(A){const U=A.getBoundingClientRect();m.optionsHeight=U.height,window.dispatchEvent(new CustomEvent("adjust"))}},{immediate:!0});const x=r.computed(()=>m.open?"mask-24 mask-chevron-up":"mask-24 mask-chevron-down"),w=r.computed(()=>(o.options??[]).findIndex(A=>yi(A.value,l.value))),S=r.computed(()=>yr(o.options??[]).map((A,U)=>({...A,index:U,isSelected:U===w.value,isActive:U===m.activeIndex}))),O=r.computed(()=>o.loading||o.options===void 0),G=r.computed(()=>{var A;return((A=S.value.find(U=>yi(U.value,l.value)))==null?void 0:A.label)??(o.options===void 0?"...":"")});vo(c,A=>{const U=A.top+A.height+3;U+m.optionsHeight>A.clientHeight?y.top=A.top-m.optionsHeight-3+"px":y.top=U+"px",y.left=A.left+"px",y.width=A.width+"px"});const b=A=>{var U;l.value=A,m.open=!1,(U=c==null?void 0:c.value)==null||U.focus()};function R(){i("click")}const F=A=>{var U,j;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(A.code))A.preventDefault();else return;if(A.target===h.value&&A.code==="Enter"){R();return}const{open:$,activeIndex:Z}=m;if(!$&&A.target===p.value){A.code==="Enter"&&(m.open=!0);return}A.code==="Escape"&&(m.open=!1,(U=c.value)==null||U.focus());const W=r.unref(S),{length:J}=W;if(!J)return;A.code==="Enter"&&b((j=W.find(E=>E.index===Z))==null?void 0:j.value);const he=W.findIndex(E=>E.index===Z)??-1,B=A.code==="ArrowDown"?1:A.code==="ArrowUp"?-1:0,C=Math.abs(he+B+J)%J;m.activeIndex=S.value[C].index??-1},D=A=>{var U,j;const $=A.relatedTarget;!((U=c.value)!=null&&U.contains($))&&!((j=d.value)!=null&&j.contains($))&&(m.open=!1)};return(A,U)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:c,class:r.normalizeClass([{disabled:A.disabled||O.value,loading:O.value},"pl-btn-split d-flex"]),onFocusout:D,onKeydown:F},[r.createElementVNode("div",{ref_key:"buttonAction",ref:h,class:"pl-btn-split__title flex-grow-1 d-flex align-center text-s-btn",tabindex:"0",onClick:R,onKeyup:r.withKeys(r.withModifiers(R,["stop"]),["enter"])},r.toDisplayString(G.value),41,tw),U[1]||(U[1]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"menuActivator",ref:p,class:"pl-btn-split__icon-container d-flex align-center justify-center",tabindex:"0",onClick:U[0]||(U[0]=j=>m.open=!m.open)},[O.value?(r.openBlock(),r.createBlock(fn,{key:0,name:"loading"})):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass([x.value,"pl-btn-split__icon"])},null,2))],512),U[2]||(U[2]=r.createTextVNode()),m.open?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:"body"},[r.createElementVNode("div",{ref_key:"list",ref:d,class:"pl-dropdown__options",style:r.normalizeStyle(y),tabindex:"-1"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(S.value,(j,$)=>(r.openBlock(),r.createBlock(yo,{key:$,option:j,"is-selected":j.isSelected,"is-hovered":j.isActive,size:"medium",onClick:r.withModifiers(Z=>b(j.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128))],4)])):r.createCommentVNode("",!0)],34))}});function cp(t){function e(n){const o=n.currentTarget,i=document.createElement("span"),l=Math.max(o.clientWidth,o.clientHeight),c=l/2;i.style.width=i.style.height=`${l}px`,i.style.left=`${n.clientX-o.offsetLeft-c}px`,i.style.top=`${n.clientY-o.offsetTop-c}px`,i.classList.add("ripple");const d=o.getElementsByClassName("ripple")[0];d&&d.remove(),o.appendChild(i)}r.onMounted(()=>{var n;(n=t.value)==null||n.addEventListener("click",e)})}const rw={key:0},ow={inheritAttrs:!1},Ts=r.defineComponent({...ow,__name:"BtnBase",props:{loading:{type:Boolean},small:{type:Boolean},large:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t,n=r.ref(),o=r.computed(()=>e.small||e.size==="small"),i=r.computed(()=>e.large||e.size==="large");return cp(n),(l,c)=>(r.openBlock(),r.createElementBlock("button",r.mergeProps({ref_key:"btn",ref:n,tabindex:"0",class:{loading:l.loading,small:o.value,large:i.value,round:l.round,reverse:l.reverse,justifyCenter:l.justifyCenter,[l.$attrs.class+""]:!0}},{...l.$attrs,disabled:!!l.$attrs.disabled||l.loading}),[l.round?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("span",rw,[r.renderSlot(l.$slots,"default")])),c[0]||(c[0]=r.createTextVNode()),l.loading?(r.openBlock(),r.createBlock(r.unref(fn),{key:1,name:"loading",size:l.size},null,8,["size"])):l.icon?(r.openBlock(),r.createBlock(r.unref(fn),{key:2,name:l.icon,size:l.size},null,8,["name","size"])):r.createCommentVNode("",!0)],16))}}),iw={name:"PlBtnPrimary"},Ns=r.defineComponent({...iw,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(Ts,r.mergeProps({class:"pl-btn-primary"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),sw={name:"PlBtnAccent"},aw=r.defineComponent({...sw,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(Ts,r.mergeProps({class:"pl-btn-accent"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),lw={name:"PlBtnDanger"},cw=r.defineComponent({...lw,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(Ts,r.mergeProps({class:"pl-btn-danger"},e),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),dw={name:"PlBtnSecondary"},Pl=r.defineComponent({...dw,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(t){const e=t;return(n,o)=>(r.openBlock(),r.createBlock(Ts,r.mergeProps(e,{class:"pl-btn-secondary"}),{default:r.withCtx(()=>[r.renderSlot(n.$slots,"default")]),_:3},16))}}),uw={key:0},pw={name:"PlBtnGhost"},_o=r.defineComponent({...pw,props:{loading:{type:Boolean},size:{default:void 0},round:{type:Boolean},icon:{default:void 0},reverse:{type:Boolean},justifyCenter:{type:Boolean,default:!1}},setup(t){const e=t,n=r.computed(()=>e.size==="small"),o=r.computed(()=>e.size==="large"),i=r.ref(),l=r.useSlots();return cp(i),(c,d)=>(r.openBlock(),r.createElementBlock("button",r.mergeProps({ref_key:"btnRef",ref:i,tabindex:"0",class:["pl-btn-ghost",{loading:c.loading,small:n.value,large:o.value,round:c.round,reverse:c.reverse,justifyCenter:c.justifyCenter,[c.$attrs.class+""]:!0}]},{...c.$attrs,disabled:!!c.$attrs.disabled||c.loading}),[r.unref(l).default&&!c.round?(r.openBlock(),r.createElementBlock("span",uw,[r.renderSlot(c.$slots,"default")])):r.createCommentVNode("",!0),d[0]||(d[0]=r.createTextVNode()),c.loading?(r.openBlock(),r.createBlock(r.unref(fn),{key:1,name:"loading",size:c.size},null,8,["size"])):c.icon?(r.openBlock(),r.createBlock(r.unref(fn),{key:2,name:c.icon,size:c.size},null,8,["name","size"])):r.createCommentVNode("",!0),d[1]||(d[1]=r.createTextVNode()),r.renderSlot(c.$slots,"append")],16))}}),hw=r.defineComponent({__name:"PlBtnLink",props:{loading:{type:Boolean},size:{},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean},disabled:{type:Boolean}},setup(t){const e=t,n=r.ref(!1);return(o,i)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-btn-link",{disabled:o.disabled,loading:o.loading,hover:n.value}]),onMouseover:i[0]||(i[0]=l=>n.value=!0),onMouseleave:i[1]||(i[1]=l=>n.value=!1)},[r.createVNode(Pl,r.mergeProps({round:"",hover:n.value},e),null,16,["hover"]),i[2]||(i[2]=r.createTextVNode()),r.renderSlot(o.$slots,"default")],34))}});function fw(t,e){const n=r.ref();return vo(t,o=>{n.value=o}),r.computed(()=>{const o=r.unref(n),i=r.unref(e),l=i.position??"top",c=i.gap??8;if(!o)return"";const d=o.offsetY+Math.floor(o.height/2),p=o.offsetX+Math.floor(o.width/2);return l==="top-left"?`left: ${o.offsetX}px; top: ${o.offsetY-c}px;`:l==="top"?`left: ${p}px; top: ${o.offsetY-c}px;`:l==="right"?`left: ${o.offsetX+o.width+c}px; top: ${d}px;`:l==="left"?`right: ${o.scrollWidth-o.x+c}px; top: ${d}px;`:""})}function _i(t,e){return e(t)}function ut(t,e){if(t!=null)return e(t)}function mw(t){return Array.isArray(t)?t:[t]}function gw(t,e,...n){n.forEach(o=>{t[o]=e[o]})}function As(t,e){st(document,"click",n=>{document.contains(n.target)&&(mw(t).map(o=>o.value).filter(o=>!!o).some(o=>o==null?void 0:o.contains(n.target))||e())})}const yw={},vw={class:"beak",width:"5",height:"9",viewBox:"0 0 3 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function _w(t,e){return r.openBlock(),r.createElementBlock("svg",vw,e[0]||(e[0]=[r.createElementVNode("path",{d:"M4.00222 8.00933L0 4.00711L4.00222 0.00488281L4.00222 8.00933Z",fill:"#24223D"},null,-1)]))}const Cw=Zt(yw,[["render",_w]]),Rl=new Map,ww={name:"PlTooltip"},xt=r.defineComponent({...ww,props:{openDelay:{default:100},closeDelay:{default:1e3},position:{default:"top"},hide:{type:Boolean},gap:{default:8},element:{default:"div"}},emits:["tooltip:close"],setup(t,{emit:e}){const n=e,o=Symbol(),i=t,l=r.reactive({open:!1,over:!1,tooltipOpen:!1,key:Symbol()});Rl.set(o,()=>h()),r.watch(()=>l.open,O=>{requestAnimationFrame(()=>{l.tooltipOpen=O})});let c=()=>{};const d=op(()=>window.dispatchEvent(new CustomEvent("adjust")),1e3),p=()=>{l.open=!0;for(let[O,G]of Rl.entries())O!==o&&G()},h=()=>{l.open=!1,n("tooltip:close")},m=async()=>{i.hide||(d(),l.over=!0,c(),await Ju(100),l.over&&p())},y=()=>{l.over=!1,c=Qu(()=>{l.over||h()},i.closeDelay)};r.watch(()=>i.hide,O=>{O&&h()});const x=r.ref(),w=r.ref(),S=fw(x,r.toRef(i));return As([x,w],()=>h()),r.onUnmounted(()=>{Rl.delete(o)}),(O,G)=>(r.openBlock(),r.createBlock(r.resolveDynamicComponent(O.element),r.mergeProps(O.$attrs,{ref_key:"rootRef",ref:x,onClick:m,onMouseover:m,onMouseleave:y}),{default:r.withCtx(()=>[r.renderSlot(O.$slots,"default"),G[1]||(G[1]=r.createTextVNode()),O.$slots.tooltip&&l.open?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:"body"},[r.createVNode(r.Transition,{name:"tooltip-transition"},{default:r.withCtx(()=>[l.tooltipOpen?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-tooltip__container",style:r.normalizeStyle(r.unref(S))},[r.createElementVNode("div",{ref_key:"tooltip",ref:w,class:r.normalizeClass(["pl-tooltip",O.position]),onMouseover:m,onMouseleave:y},[r.createElementVNode("div",null,[r.renderSlot(O.$slots,"tooltip")]),G[0]||(G[0]=r.createTextVNode()),r.createVNode(Cw)],34)],4)):r.createCommentVNode("",!0)]),_:3})])):r.createCommentVNode("",!0)]),_:3},16))}}),bw={},xw={class:"inner-border"};function kw(t,e,n,o,i,l){return r.openBlock(),r.createElementBlock("div",xw,[r.renderSlot(t.$slots,"default")])}const Sw=Zt(bw,[["render",kw]]),Ew={key:0},Tw=["tabindex","onKeydown","onClick"],Nw={key:1,class:"pl-btn-group__helper"},Aw={key:2,class:"pl-btn-group__error"},Vw={name:"PlBtnGroup"},dp=r.defineComponent({...Vw,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean},compact:{type:Boolean},helper:{},error:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,i=d=>o("update:modelValue",d),l=t,c=r.computed(()=>l.options.map(d=>({label:"label"in d?d.label:d.text,value:d.value})));return(d,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-btn-group",{disabled:d.disabled,compact:d.compact}])},[d.label?(r.openBlock(),r.createElementBlock("label",Ew,[r.createElementVNode("span",null,r.toDisplayString(d.label),1),p[0]||(p[0]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(d.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),p[1]||(p[1]=r.createTextVNode()),r.createVNode(Sw,{class:"pl-btn-group__container"},{default:r.withCtx(()=>[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.value,(h,m)=>(r.openBlock(),r.createElementBlock("div",{key:m,class:r.normalizeClass(["pl-btn-group__option text-s",{active:d.modelValue===h.value}]),tabindex:d.modelValue===h.value||d.disabled?void 0:0,onKeydown:r.withKeys(y=>i(h.value),["enter"]),onClick:y=>i(h.value)},r.toDisplayString(h.label),43,Tw))),128))]),_:1}),p[2]||(p[2]=r.createTextVNode()),d.helper?(r.openBlock(),r.createElementBlock("div",Nw,r.toDisplayString(d.helper),1)):d.error?(r.openBlock(),r.createElementBlock("div",Aw,r.toDisplayString(d.error),1)):r.createCommentVNode("",!0)],2))}});function Bw(t,e){const n=r.ref(),o=r.ref(),{parse:i,update:l}=e,c=()=>{n.value=void 0,o.value=void 0},d=r.computed({get(){return n.value!==void 0?n.value:t.value},set(p){c();try{const h=i?i(p):p;!l||l(h)?t.value=h:n.value=h}catch(h){n.value=p,o.value=h instanceof Error?h.message:String(h)}}});return r.reactive({value:d,error:o,reset:c})}const Pw="_component_1abv8_1",Rw="_container_1abv8_15",Dw="_error_1abv8_69",Dl={component:Pw,container:Rw,error:Dw},Iw={key:0},Fw=["placeholder"],Ow=r.defineComponent({__name:"PlEditableTitle",props:r.mergeModels({placeholder:{default:"Title"},maxWidth:{default:"80%"},prefix:{default:void 0},maxLength:{default:1e3},minLength:{default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t,o=Bw(e,{update(){return!1},parse:d=>{if(typeof d!="string")throw Error("value should be a string");if(n.maxLength&&d.length>n.maxLength)throw Error(`Max title length is ${n.maxLength} characters`);if(n.minLength&&d.length<n.minLength)throw Error(`Min title length is ${n.minLength} characters`);return d.trim()}}),i=r.computed(()=>({maxWidth:n.maxWidth??"80%"})),l=()=>{e.value=o.value&&!o.error?o.value:e.value,o.reset()},c=r.ref();return(d,p)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-editable-title",r.unref(Dl).component]),style:r.normalizeStyle(i.value)},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(Dl).container),onClick:p[3]||(p[3]=()=>{var h;return(h=c.value)==null?void 0:h.focus()})},[d.prefix?(r.openBlock(),r.createElementBlock("span",Iw,r.toDisplayString(d.prefix.trim())+" ",1)):r.createCommentVNode("",!0),p[4]||(p[4]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"inputRef",ref:c,"onUpdate:modelValue":p[0]||(p[0]=h=>r.unref(o).value=h),placeholder:d.placeholder,onFocusout:l,onKeydown:[p[1]||(p[1]=r.withKeys((...h)=>r.unref(o).reset&&r.unref(o).reset(...h),["escape"])),p[2]||(p[2]=r.withKeys(h=>{var m;return(m=h.target)==null?void 0:m.blur()},["enter"]))]},null,40,Fw),[[r.vModelText,r.unref(o).value]])],2),p[5]||(p[5]=r.createTextVNode()),r.unref(o).error?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(r.unref(Dl).error)},r.toDisplayString(r.unref(o).error),3)):r.createCommentVNode("",!0)],6))}}),Lw={inheritAttrs:!1},Mw={class:"double-contour"};function Gw(t,e,n,o,i,l){return r.openBlock(),r.createElementBlock("div",Mw,[r.createElementVNode("div",r.normalizeProps(r.guardReactiveProps(t.$attrs)),[r.renderSlot(t.$slots,"default")],16)])}const vr=Zt(Lw,[["render",Gw]]);function up(t){r.onMounted(t),r.onUpdated(t)}const Il=new WeakMap,Fl=new ResizeObserver(t=>{for(const e of t)ut(Il.get(e.target),n=>n(e))});function pp(t,e){Il.set(t,e),Fl.unobserve(t),Fl.observe(t)}function hp(t){Fl.unobserve(t),Il.delete(t)}const $w=8,fp=4;function Xn(t,e="label"){const n=new Set;up(()=>{ut(t==null?void 0:t.value,o=>{const i=o.querySelector(e);i&&(n.add(i),pp(i,()=>{const l=Yu(()=>i.getBoundingClientRect().width+_i($w,c=>Number.isNaN(c)?fp:c+fp));o.style.getPropertyValue("--label-offset-right-x")!==`${l}px`&&o.style.setProperty("--label-offset-right-x",`${l}px`)}))})}),r.onBeforeUnmount(()=>{Array.from(n.values()).map(o=>hp(o))})}function zw(t,e){const n=[];return e&&e.length>0&&e.forEach(o=>{const i=o(t);typeof i=="string"&&n.push(i)}),{isValid:n.length===0,errors:n}}function mp(t,e){return r.computed(()=>zw(t.value,e))}const Uw=r.defineComponent({__name:"PlIcon16",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>e.size==="large"?"--icon-size: 24px":""),o=r.computed(()=>`icon-16 icon-${e.name}`);return(i,l)=>(r.openBlock(),r.createElementBlock("i",{style:r.normalizeStyle(n.value),class:r.normalizeClass([o.value,i.$style.icon])},null,6))}}),Zw="_icon_1ugxm_2",jw={icon:Zw},Ww={$style:jw},Co=Zt(Uw,[["__cssModules",Ww]]),Hw=r.defineComponent({__name:"PlIcon24",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>`icon-24 icon-${e.name}`);return(o,i)=>(r.openBlock(),r.createElementBlock("i",{class:r.normalizeClass([n.value,o.$style.icon])},null,2))}}),qw="_icon_1ugxm_2",Kw={icon:qw},Xw={$style:Kw},Ci=Zt(Hw,[["__cssModules",Xw]]),Yw={class:"pl-text-field__envelope"},Jw={key:0,ref:"label"},Qw={key:0,class:"required-icon"},eb={key:1,class:"pl-text-field__prefix"},tb=["disabled","placeholder","type"],nb={class:"pl-text-field__append"},rb={key:0,class:"pl-text-field__error"},ob={key:1,class:"pl-text-field__helper"},ib={name:"PlTextField"},jr=r.defineComponent({...ib,props:r.mergeModels({label:{},clearable:{type:[Boolean,Function]},parse:{type:Function},required:{type:Boolean},error:{},helper:{},placeholder:{},disabled:{type:Boolean},dashed:{type:Boolean},prefix:{},rules:{},type:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useSlots(),n=r.useModel(t,"modelValue"),o=t,i=r.ref(void 0),l=r.ref(),c=r.ref(!1),d=r.reactive({cached:void 0}),p=r.computed({get(){return d.cached?d.cached.value:n.value===void 0||n.value===null?"":String(n.value)},set(D){if(d.cached=void 0,o.parse)try{n.value=o.parse(D)}catch(A){d.cached={error:A instanceof Error?A.message:String(A),value:D}}else n.value=D}}),h=r.computed(()=>o.type&&o.type==="password"?c.value?"text":o.type:"text"),m=r.computed(()=>c.value?"view-show":"view-hide"),y=()=>{o.clearable&&(d.cached=void 0,n.value=o.clearable===!0?"":o.clearable())},x=mp(p,o.rules||[]),w=r.computed(()=>o.clearable?o.clearable===!0?n.value==="":n.value===o.clearable():n.value===""),S=r.computed(()=>!w.value),O=r.computed(()=>{const D=[];return o.error&&D.push(o.error),d.cached&&D.push(d.cached.error),x.value.isValid||D.push(...x.value.errors),D}),G=r.computed(()=>O.value.length>0),b=r.computed(()=>o.clearable&&S.value&&o.type!=="password"),R=()=>c.value=!c.value,F=()=>{d.cached=void 0};return Xn(i),(D,A)=>(r.openBlock(),r.createElementBlock("div",Yw,[r.createElementVNode("div",{ref_key:"rootRef",ref:i,class:r.normalizeClass(["pl-text-field",{error:G.value,disabled:D.disabled,dashed:D.dashed,nonEmpty:S.value}])},[D.label?(r.openBlock(),r.createElementBlock("label",Jw,[D.required?(r.openBlock(),r.createElementBlock("i",Qw)):r.createCommentVNode("",!0),A[1]||(A[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(D.label),1),A[2]||(A[2]=r.createTextVNode()),r.unref(e).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(D.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),A[5]||(A[5]=r.createTextVNode()),D.prefix?(r.openBlock(),r.createElementBlock("div",eb,r.toDisplayString(D.prefix),1)):r.createCommentVNode("",!0),A[6]||(A[6]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":A[0]||(A[0]=U=>p.value=U),disabled:D.disabled,placeholder:D.placeholder||"...",type:h.value,spellcheck:"false",onFocusout:F},null,40,tb),[[r.vModelDynamic,p.value]]),A[7]||(A[7]=r.createTextVNode()),r.createElementVNode("div",nb,[b.value?(r.openBlock(),r.createBlock(r.unref(Co),{key:0,class:"pl-text-field__clearable",name:"delete-clear",onClick:y})):r.createCommentVNode("",!0),A[3]||(A[3]=r.createTextVNode()),D.type==="password"?(r.openBlock(),r.createBlock(r.unref(Ci),{key:1,name:m.value,style:{cursor:"pointer"},onClick:R},null,8,["name"])):r.createCommentVNode("",!0),A[4]||(A[4]=r.createTextVNode()),r.renderSlot(D.$slots,"append")]),A[8]||(A[8]=r.createTextVNode()),r.createVNode(vr,{class:"pl-text-field__contour"})],2),A[9]||(A[9]=r.createTextVNode()),G.value?(r.openBlock(),r.createElementBlock("div",rb,r.toDisplayString(O.value.join(" ")),1)):D.helper?(r.openBlock(),r.createElementBlock("div",ob,r.toDisplayString(D.helper),1)):r.createCommentVNode("",!0)]))}}),sb=["disabled","placeholder"],ab=r.defineComponent({__name:"PlSearchField",props:{modelValue:{},clearable:{type:Boolean},placeholder:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,i=r.ref(void 0),l=r.ref(),c=r.computed({get(){return o.modelValue??""},set(h){n("update:modelValue",h)}}),d=r.computed(()=>!!o.modelValue),p=()=>n("update:modelValue","");return(h,m)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:i,class:r.normalizeClass(["pl-search-field",[h.$style.component]])},[r.createVNode(r.unref(Ci),{name:"search"}),m[1]||(m[1]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:l,"onUpdate:modelValue":m[0]||(m[0]=y=>c.value=y),disabled:h.disabled,type:"text",placeholder:h.placeholder||"Find...",spellcheck:"false"},null,8,sb),[[r.vModelText,c.value]]),m[2]||(m[2]=r.createTextVNode()),h.clearable&&d.value?(r.openBlock(),r.createBlock(r.unref(Co),{key:0,class:r.normalizeClass(h.$style.clear),name:"delete-clear",onClick:r.withModifiers(p,["stop"])},null,8,["class"])):r.createCommentVNode("",!0)],2))}}),lb="_component_1ng5b_1",cb="_clear_1ng5b_35",db={component:lb,clear:cb},ub={$style:db},gp=Zt(ab,[["__cssModules",ub]]),pb={class:"ui-text-area__envelope"},hb={key:0,ref:"label"},fb={key:0,class:"required-icon"},mb=["readonly","rows","disabled","placeholder"],gb={class:"ui-text-area__append"},yb={key:0,class:"ui-text-area__error"},vb={key:1,class:"ui-text-area__helper"},_b={name:"PlTextArea"},Cb=r.defineComponent({..._b,props:{modelValue:{},label:{},required:{type:Boolean},error:{},helper:{},placeholder:{},disabled:{type:Boolean},readonly:{type:Boolean},dashed:{type:Boolean},rows:{},autogrow:{type:Boolean},rules:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,i=t,l=r.ref(),c=r.ref(),d=r.computed({get(){return i.modelValue??""},set(w){o("update:modelValue",w)}}),p=r.computed(()=>!!i.modelValue),h=mp(d,i.rules||[]);Xn(l);const m=r.computed(()=>{const w=[];return i.error&&w.push(i.error),w.push(...h.value.errors),w}),y=r.computed(()=>m.value.length>0),x=()=>{if(!i.autogrow)return;const w=c.value;w&&(w.style.height="auto",w.style.height=`${w.scrollHeight}px`)};return r.onMounted(()=>{x()}),(w,S)=>(r.openBlock(),r.createElementBlock("div",pb,[r.createElementVNode("div",{ref_key:"root",ref:l,class:r.normalizeClass(["ui-text-area",{error:y.value,disabled:w.disabled,dashed:w.dashed,nonEmpty:p.value}])},[w.label?(r.openBlock(),r.createElementBlock("label",hb,[w.required?(r.openBlock(),r.createElementBlock("i",fb)):r.createCommentVNode("",!0),S[1]||(S[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(w.label),1),S[2]||(S[2]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(w.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),S[3]||(S[3]=r.createTextVNode()),r.withDirectives(r.createElementVNode("textarea",{ref_key:"input",ref:c,"onUpdate:modelValue":S[0]||(S[0]=O=>d.value=O),readonly:w.readonly,rows:w.rows,disabled:w.disabled,placeholder:w.placeholder??"...",spellcheck:"false",onInput:x},null,40,mb),[[r.vModelText,d.value]]),S[4]||(S[4]=r.createTextVNode()),r.createElementVNode("div",gb,[r.renderSlot(w.$slots,"append")]),S[5]||(S[5]=r.createTextVNode()),r.createVNode(vr,{class:"ui-text-area__contour"})],2),S[6]||(S[6]=r.createTextVNode()),y.value?(r.openBlock(),r.createElementBlock("div",yb,r.toDisplayString(m.value.join(" ")),1)):w.helper?(r.openBlock(),r.createElementBlock("div",vb,r.toDisplayString(w.helper),1)):r.createCommentVNode("",!0)]))}});function yp(t,e){const n=t.scrollTop,o=t.getBoundingClientRect().height,i=e.offsetTop,l=e.getBoundingClientRect().height;return i+l<o+n&&i>n}function vp(t,e){const n=t.scrollTop,o=t.getBoundingClientRect().height,i=e.offsetTop,l=e.getBoundingClientRect().height;return i+l<o+n?"ceil":i>n?"floor":"visible"}function wi(t,e,n={}){const o=t.scrollTop,i=t.getBoundingClientRect().height,l=e.getBoundingClientRect().height,c=e.offsetTop,d=vp(t,e);if(d==="visible")return;const p=h=>{const m=d==="floor"?c-(i-l):c;t.scrollTop=o+h*(m-o)};yp(t,e)||np({duration:n.duration||100,timing:tp(h=>h),draw:p})}function Ol(t,e,n,o){return t.addEventListener(e,n,o),function(){t.removeEventListener(e,n)}}function wb(t,e){const n=e.getBoundingClientRect();return t.x<n.x||t.x>n.x+n.width||t.y<n.y||t.y>n.y+n.height}function _p(t){return t!==null&&typeof t=="object"}function Ot(t,e){return _p(t)&&_p(e)?Object.keys(t).length!==Object.keys(e).length?!1:Object.keys(t).every(n=>Ot(t[n],e[n])):t===e}function Ll(t,e){return t.some(n=>Ot(n,e))}const Ml=r.defineComponent({__name:"LongText",setup(t){r.useCssVars(m=>({"8d68520c":c.value}));const e=r.ref(!1),n=r.ref(),o=r.ref(!1),i=r.computed(()=>o.value&&e.value?"ui-lt-animate":""),l=rp(m=>o.value=m,500),c=r.computed(()=>{var m;return n.value?`${((m=n.value)==null?void 0:m.innerHTML.length)*.4}s`:"5s"});function d(){const m=Tl(n.value,"span cannot be empty");e.value=m.clientWidth<m.scrollWidth}function p(){d(),l(!0)}function h(){l(!1)}return(m,y)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps(m.$attrs,{class:"ui-lt-container"}),[r.createElementVNode("span",{onMouseover:p,onMouseleave:h},[r.createElementVNode("span",{ref_key:"span",ref:n,class:r.normalizeClass(i.value)},[r.renderSlot(m.$slots,"default")],2)],32)],16))}}),bb=r.defineComponent({__name:"PlMaskIcon24",props:{name:{},size:{}},setup(t){const e=t,n=r.computed(()=>`mask-24 mask-${e.name}`);return(o,i)=>(r.openBlock(),r.createElementBlock("i",{class:r.normalizeClass([n.value,o.$style.icon])},null,2))}}),xb="_icon_1ugxm_2",kb={icon:xb},Sb={$style:kb},Lt=Zt(bb,[["__cssModules",Sb]]),Eb={class:"pl-dropdown__envelope"},Tb=["tabindex"],Nb={class:"pl-dropdown__container"},Ab={class:"pl-dropdown__field"},Vb=["disabled","placeholder"],Bb={class:"pl-dropdown__controls"},Pb={key:0},Rb={key:0,class:"required-icon"},Db={key:0,class:"nothing-found"},Ib={key:0,class:"pl-dropdown__error"},Fb={key:1,class:"pl-dropdown__helper"},Ob={key:2,class:"pl-dropdown__helper"},Lb={name:"PlDropdown"},wo=r.defineComponent({...Lb,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},arrowIcon:{default:void 0},arrowIconLarge:{default:void 0},optionSize:{default:"small"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,i=r.useSlots(),l=r.ref(),c=r.ref(),d=r.ref(),p=r.reactive({search:"",activeIndex:-1,open:!1,optionsHeight:0}),h=()=>_i(F.value.findIndex(C=>Ot(C.value,o.modelValue)),C=>C<0?0:C),m=()=>p.activeIndex=h(),y=r.computed(()=>o.options===void 0),x=r.computed(()=>y.value?!0:o.disabled),w=r.computed(()=>(o.options??[]).findIndex(C=>Ot(C.value,o.modelValue))),S=r.computed(()=>{if(!y.value){if(o.error)return o.error;if(o.modelValue!==void 0&&w.value===-1)return"The selected value is not one of the options"}}),O=r.computed(()=>yr(o.options??[]).map((C,E)=>({...C,index:E,isSelected:E===w.value,isActive:E===p.activeIndex}))),G=r.computed(()=>{const C=r.unref(O).find(E=>Ot(E.value,o.modelValue));return(C==null?void 0:C.label)||o.modelValue}),b=r.computed(()=>!p.open&&o.modelValue?"":o.modelValue?String(G.value):o.placeholder),R=r.computed(()=>o.modelValue!==void 0&&o.modelValue!==null),F=r.computed(()=>{const C=O.value;return p.search?C.filter(E=>{const M=p.search.toLowerCase();return E.label.toLowerCase().includes(M)||E.description&&E.description.toLowerCase().includes(M)?!0:typeof E.value=="string"?E.value.toLowerCase().includes(M):E.value===p.search}):C}),D=r.computed(()=>x.value?void 0:"0"),A=C=>{var E;n("update:modelValue",C),p.search="",p.open=!1,(E=l==null?void 0:l.value)==null||E.focus()},U=()=>n("update:modelValue",void 0),j=()=>{var C;return(C=d.value)==null?void 0:C.focus()},$=()=>p.open=!p.open,Z=()=>p.open=!0,W=C=>{var E,M;const H=C.relatedTarget;!((E=l.value)!=null&&E.contains(H))&&!((M=c.value)!=null&&M.contains(H))&&(p.search="",p.open=!1)},J=()=>{const C=c.value;C&&ut(C.querySelector(".hovered-item"),E=>{wi(C,E)})},he=C=>{var E,M;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(C.code))C.preventDefault();else return;const{open:H,activeIndex:K}=p;if(!H){C.code==="Enter"&&(p.open=!0);return}C.code==="Escape"&&(p.open=!1,(E=l.value)==null||E.focus());const ne=r.unref(F),{length:de}=ne;if(!de)return;C.code==="Enter"&&A((M=ne.find(ht=>ht.index===K))==null?void 0:M.value);const ke=ne.findIndex(ht=>ht.index===K)??-1,Se=C.code==="ArrowDown"?1:C.code==="ArrowUp"?-1:0,Ze=Math.abs(ke+Se+de)%de;p.activeIndex=F.value[Ze].index??-1};Xn(l),r.watch(()=>o.modelValue,m,{immediate:!0}),r.watch(()=>p.open,C=>{var E;return C?(E=d.value)==null?void 0:E.focus():""}),r.watchPostEffect(()=>{p.search,p.activeIndex>=0&&p.open&&J()});const B=r.reactive({top:"0px",left:"0px",width:"0px"});return r.watch(c,C=>{if(C){const E=C.getBoundingClientRect();p.optionsHeight=E.height,window.dispatchEvent(new CustomEvent("adjust"))}}),vo(l,C=>{const E=C.top+C.height+3;E+p.optionsHeight>C.clientHeight?B.top=C.top-p.optionsHeight-3+"px":B.top=E+"px",B.left=C.left+"px",B.width=C.width+"px"}),(C,E)=>(r.openBlock(),r.createElementBlock("div",Eb,[r.createElementVNode("div",{ref_key:"root",ref:l,tabindex:D.value,class:r.normalizeClass(["pl-dropdown",{open:p.open,error:C.error,disabled:x.value}]),onKeydown:he,onFocusout:W},[r.createElementVNode("div",Nb,[r.createElementVNode("div",Ab,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:d,"onUpdate:modelValue":E[0]||(E[0]=M=>p.search=M),type:"text",tabindex:"-1",disabled:x.value,placeholder:b.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:Z},null,40,Vb),[[r.vModelText,p.search]]),E[4]||(E[4]=r.createTextVNode()),p.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,onClick:j},[r.createVNode(Ml,{class:"input-value"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(G.value),1)]),_:1})])),E[5]||(E[5]=r.createTextVNode()),r.createElementVNode("div",Bb,[y.value?(r.openBlock(),r.createBlock(r.unref(Lt),{key:0,name:"loading"})):r.createCommentVNode("",!0),E[1]||(E[1]=r.createTextVNode()),C.clearable&&R.value?(r.openBlock(),r.createBlock(r.unref(Co),{key:1,name:"delete-clear",onClick:r.withModifiers(U,["stop"])})):r.createCommentVNode("",!0),E[2]||(E[2]=r.createTextVNode()),r.renderSlot(C.$slots,"append"),E[3]||(E[3]=r.createTextVNode()),C.arrowIconLarge?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["arrow-icon",[`icon-24 ${C.arrowIconLarge}`]]),onClick:r.withModifiers($,["stop"])},null,2)):C.arrowIcon?(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(["arrow-icon",[`icon-16 ${C.arrowIcon}`]]),onClick:r.withModifiers($,["stop"])},null,2)):(r.openBlock(),r.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:r.withModifiers($,["stop"])}))])]),E[9]||(E[9]=r.createTextVNode()),C.label?(r.openBlock(),r.createElementBlock("label",Pb,[C.required?(r.openBlock(),r.createElementBlock("i",Rb)):r.createCommentVNode("",!0),E[6]||(E[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(C.label),1),E[7]||(E[7]=r.createTextVNode()),r.unref(i).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(C.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),E[10]||(E[10]=r.createTextVNode()),p.open?(r.openBlock(),r.createBlock(r.Teleport,{key:1,to:"body"},[r.createElementVNode("div",{ref_key:"list",ref:c,class:"pl-dropdown__options",style:r.normalizeStyle(B),tabindex:"-1"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(F.value,(M,H)=>(r.openBlock(),r.createBlock(yo,{key:H,option:M,"is-selected":M.isSelected,"is-hovered":M.isActive,size:C.optionSize,onClick:r.withModifiers(K=>A(M.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),E[8]||(E[8]=r.createTextVNode()),F.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Db,"Nothing found"))],4)])):r.createCommentVNode("",!0),E[11]||(E[11]=r.createTextVNode()),r.createVNode(vr,{class:"pl-dropdown__contour"})])],42,Tb),E[12]||(E[12]=r.createTextVNode()),S.value?(r.openBlock(),r.createElementBlock("div",Ib,r.toDisplayString(S.value),1)):y.value&&C.loadingOptionsHelper?(r.openBlock(),r.createElementBlock("div",Fb,r.toDisplayString(C.loadingOptionsHelper),1)):C.helper?(r.openBlock(),r.createElementBlock("div",Ob,r.toDisplayString(C.helper),1)):r.createCommentVNode("",!0)]))}}),Mb={name:"PlDropdownRef"},Gb=r.defineComponent({...Mb,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},optionSize:{default:"small"}},emits:["update:modelValue"],setup(t){const e=t,n=r.computed(()=>{var i;return(i=e.options)==null?void 0:i.map(l=>({label:l.label,value:l.ref}))}),o=r.computed(()=>e.disabled?"icon-link-disabled":"icon-link");return(i,l)=>(r.openBlock(),r.createBlock(r.unref(wo),r.mergeProps(e,{options:n.value,"loading-options-helper":i.loadingOptionsHelper,"arrow-icon-large":o.value,"onUpdate:modelValue":l[0]||(l[0]=c=>i.$emit("update:modelValue",c))}),null,16,["options","loading-options-helper","arrow-icon-large"]))}});function $b(t,e){return r.computed(()=>{const n=yr(t.value);return e.value?n.filter(o=>o.label.toLowerCase().includes(e.value.toLowerCase())):n})}const zb={class:"resizable-input"},Ub=["placeholder","value","disabled"],Zb=r.defineComponent({__name:"ResizableInput",props:{modelValue:{},placeholder:{},value:{},disabled:{type:Boolean},maxWidth:{},width:{}},emits:["input","update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=r.computed(()=>{var d;return n.placeholder?n.placeholder:(d=n.modelValue||n.value)==null?void 0:d.replace('"',"")}),l=r.computed(()=>{const d={};return n.width&&(d.width=n.width),n.maxWidth&&(d.maxWidth=n.maxWidth),d});function c(d){const p=d.target.value;o("update:modelValue",p)}return(d,p)=>(r.openBlock(),r.createElementBlock("div",zb,[r.createElementVNode("span",{style:r.normalizeStyle(l.value),class:"resizable-input__size-span"},r.toDisplayString(i.value),5),p[0]||(p[0]=r.createTextVNode()),r.createElementVNode("input",r.mergeProps(d.$attrs,{placeholder:d.placeholder,value:n.modelValue,disabled:n.disabled,style:l.value,onInput:c}),null,16,Ub)]))}}),jb={class:"dropdown-tab-item__title text-caps13"},Wb=r.defineComponent({__name:"TabItem",props:{option:{},isSelected:{type:Boolean,default:!1},isHovered:{type:Boolean,default:!1}},setup(t){const e=t,n=r.computed(()=>e.option.label),o=r.computed(()=>{const i=[];return e.isSelected&&i.push("dropdown-tab-item__selected"),e.isHovered&&i.push("hovered-item"),i.join(" ")});return(i,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([o.value,"dropdown-tab-item"])},[r.createElementVNode("div",jb,r.toDisplayString(n.value),1)],2))}}),Hb={class:"pl-line-dropdown__prefix"},qb={class:"pl-line-dropdown__icon-wrapper"},Kb={class:"pl-line-dropdown__icon"},Xb={key:0,class:"pl-line-dropdown__no-item"},Yb={key:0,class:"pl-line-dropdown__no-item"},Cp=r.defineComponent({__name:"PlDropdownLine",props:{modelValue:{},disabled:{type:Boolean},prefix:{default:""},options:{},placeholder:{default:"Select.."},mode:{default:"list"},tabsContainerStyles:{type:[Boolean,null,String,Object,Array],default:void 0},clearable:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,i=r.reactive({isOpen:!1,activeOption:-1,optionsHeight:0}),l=r.ref(),c=r.ref(),d=r.computed(()=>{const W=[];return i.isOpen&&W.push("open"),o.disabled&&W.push("disabled"),W.join(" ")}),p=r.ref(""),h=$b(r.toRef(o,"options"),p),m=r.computed(()=>!!(o.clearable&&i.isOpen&&o.modelValue&&y.value)),y=r.computed(()=>{if(o.modelValue){const W=S();if(W!==-1){const J=yr(o.options)[W];return typeof J.label=="object"?J.label.title:J.label}}return""}),x=r.ref(y.value),w=r.computed(()=>i.isOpen&&p.value&&p.value.length>=y.value.length-1?p.value:y.value??"...");As(l,()=>{o.mode==="list"&&(i.isOpen=!1)}),r.watch(()=>x.value,W=>{y.value!==W?p.value=W:p.value=""}),r.watch(()=>i.isOpen,W=>{var J;W&&l.value&&((J=l.value.querySelector("input"))==null||J.focus(),r.nextTick(()=>j()))}),r.watch(()=>o.modelValue,()=>O(),{immediate:!0});function S(){return o.options.findIndex(W=>Ot(W.value,o.modelValue))}function O(){i.activeOption=_i(h.value.findIndex(W=>Ot(W.value,o.modelValue)),W=>W<0?0:W),x.value=y.value}function G(){p.value=""}function b(){o.disabled?i.isOpen=!1:r.nextTick(()=>{i.isOpen=!i.isOpen})}function R(){o.mode==="list"&&(i.isOpen=!1)}function F(W){W&&(n("update:modelValue",W.value),R(),G())}function D(W){return Ot(W.value,o.modelValue)}const A=W=>{var J,he;const B=W.relatedTarget;!((J=l.value)!=null&&J.contains(B))&&!((he=c.value)!=null&&he.contains(B))&&(p.value="",i.isOpen=!1)};function U(W){const{activeOption:J}=i;if(!i.isOpen&&W.code==="Enter"){i.isOpen=!0;return}const{length:he}=h.value;if(!he)return;["ArrowDown","ArrowUp","Enter"].includes(W.code)&&W.preventDefault(),W.code==="Enter"&&F(h.value[J]);const B=W.code==="ArrowDown"?1:W.code==="ArrowUp"?-1:0;i.activeOption=Math.abs(J+B+he)%he,requestAnimationFrame(j)}function j(){const W=c.value;W&&ut(W.querySelector(".hovered-item"),J=>{o.mode==="list"?wi(W,J):J.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}function $(){n("update:modelValue",void 0)}const Z=r.reactive({top:"0px",left:"0px"});return r.watch(c,W=>{if(W){const J=W.getBoundingClientRect();i.optionsHeight=J.height,window.dispatchEvent(new CustomEvent("adjust"))}}),vo(l,W=>{const J=W.top+W.height+2;J+i.optionsHeight>W.clientHeight?Z.top=W.top-i.optionsHeight-2+"px":Z.top=J+"px",Z.left=W.left+"px"}),(W,J)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"container",ref:l,tabindex:"0",class:r.normalizeClass([d.value,"pl-line-dropdown uc-pointer"]),onKeydown:U,onFocusout:A,onClick:b},[r.createElementVNode("div",Hb,r.toDisplayString(o==null?void 0:o.prefix),1),J[6]||(J[6]=r.createTextVNode()),r.createVNode(Zb,{modelValue:x.value,"onUpdate:modelValue":J[0]||(J[0]=he=>x.value=he),placeholder:w.value,disabled:o.disabled,class:"pl-line-dropdown__input"},null,8,["modelValue","placeholder","disabled"]),J[7]||(J[7]=r.createTextVNode()),r.createElementVNode("div",qb,[r.withDirectives(r.createElementVNode("div",Kb,null,512),[[r.vShow,!m.value]]),J[1]||(J[1]=r.createTextVNode()),r.withDirectives(r.createElementVNode("div",{class:"pl-line-dropdown__icon-clear",onClick:$},null,512),[[r.vShow,m.value]])]),J[8]||(J[8]=r.createTextVNode()),i.isOpen?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:"body"},[o.mode==="list"?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"list",ref:c,style:r.normalizeStyle(Z),tabindex:"-1",class:"pl-line-dropdown__items",onFocusout:A},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(h),(he,B)=>r.renderSlot(W.$slots,"item",{key:B,item:he,textItem:"text",isSelected:D(he),isHovered:i.activeOption==B,onClick:r.withModifiers(C=>F(he),["stop"])},()=>[r.createVNode(yo,{option:he,"text-item":"text","is-selected":D(he),"is-hovered":i.activeOption==B,size:"medium",onClick:r.withModifiers(C=>F(he),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),J[3]||(J[3]=r.createTextVNode()),r.unref(h).length===0?(r.openBlock(),r.createElementBlock("div",Xb,J[2]||(J[2]=[r.createElementVNode("div",{class:"pl-line-dropdown__no-item-title text-s"},"Didn't find anything that matched",-1)]))):r.createCommentVNode("",!0)],36)):o.mode==="tabs"?(r.openBlock(),r.createElementBlock("div",{key:1,ref_key:"list",ref:c,style:r.normalizeStyle(Z),tabindex:"-1",class:"pl-line-dropdown__items-tabs",onFocusout:A},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(h),(he,B)=>r.renderSlot(W.$slots,"item",{key:B,item:he,isSelected:D(he),isHovered:i.activeOption==B,onClick:r.withModifiers(C=>F(he),["stop"])},()=>[r.createVNode(Wb,{option:he,"is-selected":D(he),"is-hovered":i.activeOption==B,onClick:r.withModifiers(C=>F(he),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),J[5]||(J[5]=r.createTextVNode()),r.unref(h).length===0?(r.openBlock(),r.createElementBlock("div",Yb,J[4]||(J[4]=[r.createElementVNode("div",{class:"pl-line-dropdown__no-item-title text-s"},"Didn't find anything that matched",-1)]))):r.createCommentVNode("",!0)],36)):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)],34))}}),Jb={class:"ui-dropdown__envelope"},Qb=["tabindex"],ex={class:"ui-dropdown__container"},tx={class:"ui-dropdown__field"},nx=["disabled","placeholder"],rx={class:"ui-dropdown__controls"},ox={key:0},ix={key:0,class:"required-icon"},sx={key:0,class:"nothing-found"},ax={key:0,class:"ui-dropdown__error"},lx={key:1,class:"ui-dropdown__helper"},cx={key:2,class:"ui-dropdown__helper"},dx={name:"PlDropdown"},ux=r.defineComponent({...dx,props:{modelValue:{},label:{default:""},options:{default:void 0},helper:{default:void 0},loadingOptionsHelper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},clearable:{type:Boolean,default:!1},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},arrowIcon:{default:void 0},arrowIconLarge:{default:void 0},optionSize:{default:"small"}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,i=r.useSlots(),l=r.ref(),c=r.ref(),d=r.ref(),p=r.reactive({search:"",activeIndex:-1,open:!1}),h=()=>_i(F.value.findIndex(B=>Ot(B.value,o.modelValue)),B=>B<0?0:B),m=()=>p.activeIndex=h(),y=r.computed(()=>o.options===void 0),x=r.computed(()=>y.value?!0:o.disabled),w=r.computed(()=>(o.options??[]).findIndex(B=>Ot(B.value,o.modelValue))),S=r.computed(()=>{if(!y.value){if(o.error)return o.error;if(o.modelValue!==void 0&&w.value===-1)return"The selected value is not one of the options"}}),O=r.computed(()=>yr(o.options??[]).map((B,C)=>({...B,index:C,isSelected:C===w.value,isActive:C===p.activeIndex}))),G=r.computed(()=>{const B=r.unref(O).find(C=>Ot(C.value,o.modelValue));return(B==null?void 0:B.label)||o.modelValue}),b=r.computed(()=>!p.open&&o.modelValue?"":o.modelValue?String(G.value):o.placeholder),R=r.computed(()=>o.modelValue!==void 0&&o.modelValue!==null),F=r.computed(()=>{const B=O.value;return p.search?B.filter(C=>{const E=p.search.toLowerCase();return C.label.toLowerCase().includes(E)||C.description&&C.description.toLowerCase().includes(E)?!0:typeof C.value=="string"?C.value.toLowerCase().includes(E):C.value===p.search}):B}),D=r.computed(()=>x.value?void 0:"0"),A=B=>{var C;n("update:modelValue",B),p.search="",p.open=!1,(C=l==null?void 0:l.value)==null||C.focus()},U=()=>n("update:modelValue",void 0),j=()=>{var B;return(B=d.value)==null?void 0:B.focus()},$=()=>p.open=!p.open,Z=()=>p.open=!0,W=B=>{var C;(C=l==null?void 0:l.value)!=null&&C.contains(B.relatedTarget)||(p.search="",p.open=!1)},J=()=>{const B=c.value;B&&ut(B.querySelector(".hovered-item"),C=>{wi(B,C)})},he=B=>{var C,E;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(B.code))B.preventDefault();else return;const{open:M,activeIndex:H}=p;if(!M){B.code==="Enter"&&(p.open=!0);return}B.code==="Escape"&&(p.open=!1,(C=l.value)==null||C.focus());const K=r.unref(F),{length:ne}=K;if(!ne)return;B.code==="Enter"&&A((E=K.find(Ze=>Ze.index===H))==null?void 0:E.value);const de=K.findIndex(Ze=>Ze.index===H)??-1,ke=B.code==="ArrowDown"?1:B.code==="ArrowUp"?-1:0,Se=Math.abs(de+ke+ne)%ne;p.activeIndex=F.value[Se].index??-1};return Xn(l),r.watch(()=>o.modelValue,m,{immediate:!0}),r.watch(()=>p.open,B=>{var C;return B?(C=d.value)==null?void 0:C.focus():""}),r.watchPostEffect(()=>{p.search,p.activeIndex>=0&&p.open&&J()}),(B,C)=>(r.openBlock(),r.createElementBlock("div",Jb,[r.createElementVNode("div",{ref_key:"root",ref:l,tabindex:D.value,class:r.normalizeClass(["ui-dropdown",{open:p.open,error:B.error,disabled:x.value}]),onKeydown:he,onFocusout:W},[r.createElementVNode("div",ex,[r.createElementVNode("div",tx,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:d,"onUpdate:modelValue":C[0]||(C[0]=E=>p.search=E),type:"text",tabindex:"-1",disabled:x.value,placeholder:b.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:Z},null,40,nx),[[r.vModelText,p.search]]),C[4]||(C[4]=r.createTextVNode()),p.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,onClick:j},[r.createVNode(Ml,{class:"input-value"},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(G.value),1)]),_:1})])),C[5]||(C[5]=r.createTextVNode()),r.createElementVNode("div",rx,[y.value?(r.openBlock(),r.createBlock(r.unref(Lt),{key:0,name:"loading"})):r.createCommentVNode("",!0),C[1]||(C[1]=r.createTextVNode()),B.clearable&&R.value?(r.openBlock(),r.createBlock(r.unref(Co),{key:1,name:"delete-clear",onClick:r.withModifiers(U,["stop"])})):r.createCommentVNode("",!0),C[2]||(C[2]=r.createTextVNode()),r.renderSlot(B.$slots,"append"),C[3]||(C[3]=r.createTextVNode()),B.arrowIconLarge?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["arrow-icon",[`icon-24 ${B.arrowIconLarge}`]]),onClick:r.withModifiers($,["stop"])},null,2)):B.arrowIcon?(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(["arrow-icon",[`icon-16 ${B.arrowIcon}`]]),onClick:r.withModifiers($,["stop"])},null,2)):(r.openBlock(),r.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:r.withModifiers($,["stop"])}))])]),C[9]||(C[9]=r.createTextVNode()),B.label?(r.openBlock(),r.createElementBlock("label",ox,[B.required?(r.openBlock(),r.createElementBlock("i",ix)):r.createCommentVNode("",!0),C[6]||(C[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(B.label),1),C[7]||(C[7]=r.createTextVNode()),r.unref(i).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(B.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),C[10]||(C[10]=r.createTextVNode()),p.open?(r.openBlock(),r.createElementBlock("div",{key:1,ref_key:"list",ref:c,class:"ui-dropdown__options"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(F.value,(E,M)=>(r.openBlock(),r.createBlock(yo,{key:M,option:E,"is-selected":E.isSelected,"is-hovered":E.isActive,size:B.optionSize,onClick:r.withModifiers(H=>A(E.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),C[8]||(C[8]=r.createTextVNode()),F.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",sx,"Nothing found"))],512)):r.createCommentVNode("",!0),C[11]||(C[11]=r.createTextVNode()),r.createVNode(vr,{class:"ui-dropdown__contour"})])],42,Qb),C[12]||(C[12]=r.createTextVNode()),S.value?(r.openBlock(),r.createElementBlock("div",ax,r.toDisplayString(S.value),1)):y.value&&B.loadingOptionsHelper?(r.openBlock(),r.createElementBlock("div",lx,r.toDisplayString(B.loadingOptionsHelper),1)):B.helper?(r.openBlock(),r.createElementBlock("div",cx,r.toDisplayString(B.helper),1)):r.createCommentVNode("",!0)]))}}),px={key:0,class:"ui-progress-bar"},hx={class:"ui-progress-bar__messages d-flex align-center pl-6 pr-6"},fx={class:"ui-progress-bar__message flex-grow-1"},mx={class:"ui-progress-bar__percent"},gx=r.defineComponent({__name:"PlProgressBar",props:{loading:{type:Boolean},progress:{default:0},completeMessage:{default:"Completed"}},setup(t){const e=t,n=r.computed(()=>e.progress===100?e.completeMessage:"");return(o,i)=>o.loading?(r.openBlock(),r.createElementBlock("div",px,[r.createElementVNode("div",{class:"ui-progress-bar__indicator",style:r.normalizeStyle({width:o.progress+"%"})},null,4),i[1]||(i[1]=r.createTextVNode()),r.createElementVNode("div",hx,[r.createElementVNode("div",fx,r.toDisplayString(n.value),1),i[0]||(i[0]=r.createTextVNode()),r.createElementVNode("div",mx,r.toDisplayString(o.progress+"%"),1)])])):r.createCommentVNode("",!0)}}),yx={class:"mi-number-field__main-wrapper d-flex"},vx={class:"mi-number-field__wrapper flex-grow d-flex flex-align-center"},_x={key:0,class:"text-description"},Cx=["disabled","placeholder"],wx={class:"mi-number-field__icons d-flex-column"},bx={key:0,class:"mi-number-field__hint text-description"},xx=r.defineComponent({__name:"PlNumberField",props:{modelValue:{},disabled:{type:Boolean},label:{default:void 0},placeholder:{default:void 0},step:{default:1},minValue:{default:void 0},maxValue:{default:void 0},errorMessage:{default:void 0},validate:{type:Function,default:void 0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=t,o=e,i=r.ref(),l=r.useSlots(),c=r.ref();Xn(i);const d=r.ref(!0),p=r.computed({get(){return d.value&&n.modelValue!==void 0?new Number(n.modelValue).toString():""},set(b){var R;b=b.replace(/,/g,""),x(b)?(o("update:modelValue",+b),b.toString()!==((R=n.modelValue)==null?void 0:R.toString())&&+b===n.modelValue&&b[b.length-1]!=="."&&(d.value=!1,r.nextTick(()=>{d.value=!0}))):(b.trim()===""&&o("update:modelValue",void 0),d.value=!1,r.nextTick(()=>{d.value=!0}))}}),h=r.computed(()=>{let b=[];return n.errorMessage&&b.push(n.errorMessage),x(n.modelValue)?(n.minValue!==void 0&&n.modelValue!==void 0&&n.modelValue<n.minValue&&b.push(`Model value must be higher than ${n.minValue}`),n.maxValue!==void 0&&n.modelValue!==void 0&&n.modelValue>n.maxValue&&b.push(`Model value must be less than ${n.maxValue}`)):b.push("Model value is not a number."),b=[...b],b.join(" ")}),m=r.computed(()=>!!(n.maxValue&&n.modelValue!==void 0&&(n.modelValue||0)+n.step>n.maxValue)),y=r.computed(()=>!!(n.minValue&&n.modelValue!==void 0&&(n.modelValue||0)-n.step<n.minValue));function x(b){return b!==void 0?(b=b==null?void 0:b.toString(),!isNaN(+b)&&!isNaN(parseFloat(b))):!1}function w(){if(!m.value){let b=0;n.modelValue===void 0?b=n.minValue?n.minValue:0:b=+(n.modelValue||0)+n.step,p.value=b.toString()}}function S(){if(!y.value){let b=0;n.modelValue===void 0?b=0:b=+(n.modelValue||0)-n.step,p.value=n.minValue?Math.max(n.minValue,b).toString():b.toString()}}function O(b){["ArrowDown","ArrowUp"].includes(b.code)&&b.preventDefault(),b.code==="ArrowUp"?w():b.code==="ArrowDown"&&S()}const G=b=>{b.detail>1&&b.preventDefault()};return(b,R)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:i,class:r.normalizeClass([{error:!!h.value.trim(),disabled:b.disabled},"mi-number-field d-flex-column"]),onMousedown:G,onKeydown:R[1]||(R[1]=F=>O(F))},[r.createElementVNode("div",yx,[r.createVNode(vr,{class:"mi-number-field__contour"}),R[6]||(R[6]=r.createTextVNode()),r.createElementVNode("div",vx,[b.label?(r.openBlock(),r.createElementBlock("label",_x,[r.createTextVNode(r.toDisplayString(b.label)+" ",1),r.unref(l).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(b.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),R[2]||(R[2]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:c,"onUpdate:modelValue":R[0]||(R[0]=F=>p.value=F),disabled:b.disabled,placeholder:b.placeholder,class:"text-s flex-grow"},null,8,Cx),[[r.vModelText,p.value]])]),R[7]||(R[7]=r.createTextVNode()),r.createElementVNode("div",wx,[r.createElementVNode("div",{class:r.normalizeClass([{disabled:m.value},"mi-number-field__icon d-flex flex-justify-center uc-pointer flex-grow flex-align-center"]),onClick:w},R[3]||(R[3]=[r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[r.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8 4.93933L13.5303 10.4697L12.4697 11.5303L8 7.06065L3.53033 11.5303L2.46967 10.4697L8 4.93933Z",fill:"#110529"})],-1)]),2),R[5]||(R[5]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass([{disabled:y.value},"mi-number-field__icon d-flex flex-justify-center uc-pointer flex-grow flex-align-center"]),onClick:S},R[4]||(R[4]=[r.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[r.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.46967 6.53033L3.53033 5.46967L8 9.93934L12.4697 5.46967L13.5303 6.53033L8 12.0607L2.46967 6.53033Z",fill:"#110529"})],-1)]),2)])]),R[8]||(R[8]=r.createTextVNode()),h.value.trim()?(r.openBlock(),r.createElementBlock("div",bx,r.toDisplayString(h.value),1)):r.createCommentVNode("",!0)],34))}}),kx={class:"pl-chip__text"},Gl=r.defineComponent({__name:"PlChip",props:{closeable:{type:Boolean},small:{type:Boolean}},emits:["close"],setup(t){const e=r.ref(),n=r.ref(!1);return r.onMounted(()=>{var o;e.value&&(n.value=((o=e.value)==null?void 0:o.clientWidth)>=256)}),(o,i)=>(r.openBlock(),r.createBlock(r.unref(xt),{position:"top",class:"pl-chip-tooltip",delay:500},r.createSlots({default:r.withCtx(()=>[i[4]||(i[4]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"chip",ref:e,class:r.normalizeClass(["pl-chip",{small:o.small}])},[r.createElementVNode("div",kx,[r.renderSlot(o.$slots,"default")]),i[3]||(i[3]=r.createTextVNode()),o.closeable?(r.openBlock(),r.createElementBlock("div",{key:0,tabindex:"0",class:"pl-chip__close",onKeydown:i[0]||(i[0]=r.withKeys(l=>o.$emit("close"),["enter"])),onClick:i[1]||(i[1]=r.withModifiers(l=>o.$emit("close"),["stop"]))},i[2]||(i[2]=[r.createElementVNode("div",{class:"pl-chip__close--icon"},null,-1)]),32)):r.createCommentVNode("",!0)],2)]),_:2},[n.value?{name:"tooltip",fn:r.withCtx(()=>[r.renderSlot(o.$slots,"default")]),key:"0"}:void 0]),1024))}}),Sx={class:"pl-multi-dropdown__envelope"},Ex=["tabindex"],Tx={class:"pl-multi-dropdown__container"},Nx={class:"pl-multi-dropdown__field"},Ax=["disabled","placeholder"],Vx={class:"pl-multi-dropdown__append"},Bx={key:0},Px={key:0,class:"required-icon"},Rx={class:"pl-multi-dropdown__open-chips-container"},Dx={key:0,class:"nothing-found"},Ix={key:0,class:"pl-multi-dropdown__error"},Fx={key:1,class:"pl-multi-dropdown__helper"},Ox={name:"PlDropdownMulti"},Lx=r.defineComponent({...Ox,props:{modelValue:{default:()=>[]},label:{default:void 0},options:{},helper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=$=>n("update:modelValue",$),i=r.useSlots(),l=t,c=r.ref(),d=r.ref(),p=r.ref(),h=r.reactive({search:"",activeOption:-1,open:!1,optionsHeight:0}),m=r.computed(()=>Array.isArray(l.modelValue)?l.modelValue:[]),y=r.computed(()=>h.open&&l.modelValue.length>0?l.placeholder:l.modelValue.length>0?"":l.placeholder),x=r.computed(()=>yr(l.options).filter($=>Ll(m.value,$.value))),w=r.computed(()=>{const $=r.unref(m),Z=yr(l.options);return(h.search?Z.filter(W=>{const J=h.search.toLowerCase();return W.label.toLowerCase().includes(J)?!0:typeof W.value=="string"?W.value.toLowerCase().includes(J):W.value===h.search}):[...Z]).map(W=>({...W,selected:Ll($,W.value)}))}),S=r.computed(()=>l.disabled?void 0:"0"),O=()=>{h.activeOption=_i(w.value.findIndex($=>Ot($.value,l.modelValue)),$=>$<0?0:$)},G=$=>{var Z;const W=r.unref(m);o(Ll(W,$)?W.filter(J=>!Ot(J,$)):[...W,$]),h.search="",(Z=c==null?void 0:c.value)==null||Z.focus()},b=$=>o(r.unref(m).filter(Z=>!Ot(Z,$))),R=()=>{var $;return($=p.value)==null?void 0:$.focus()},F=()=>h.open=!h.open,D=$=>{var Z,W;const J=$.relatedTarget;!((Z=c.value)!=null&&Z.contains(J))&&!((W=d.value)!=null&&W.contains(J))&&(h.search="",h.open=!1)},A=()=>{const $=d.value;$&&ut($.querySelector(".hovered-item"),Z=>{wi($,Z)})},U=$=>{var Z;const{open:W,activeOption:J}=h;if(!W){$.code==="Enter"&&(h.open=!0);return}$.code==="Escape"&&(h.open=!1,(Z=c.value)==null||Z.focus());const he=r.unref(w),{length:B}=he;if(!B)return;["ArrowDown","ArrowUp","Enter"].includes($.code)&&$.preventDefault(),$.code==="Enter"&&G(he[J].value);const C=$.code==="ArrowDown"?1:$.code==="ArrowUp"?-1:0;h.activeOption=Math.abs(J+C+B)%B,requestAnimationFrame(A)};Xn(c),r.watch(()=>l.modelValue,()=>O(),{immediate:!0}),r.watchPostEffect(()=>{h.search,h.open&&A()});const j=r.reactive({top:"0px",left:"0px",width:"0px"});return r.watch(d,$=>{if($){const Z=$.getBoundingClientRect();h.optionsHeight=Z.height,window.dispatchEvent(new CustomEvent("adjust"))}}),vo(c,$=>{const Z=$.top+$.height+5;Z+h.optionsHeight>$.clientHeight?j.top=$.top-h.optionsHeight-5+"px":j.top=Z+"px",j.left=$.left+"px",j.width=$.width+"px"}),($,Z)=>(r.openBlock(),r.createElementBlock("div",Sx,[r.createElementVNode("div",{ref_key:"rootRef",ref:c,tabindex:S.value,class:r.normalizeClass(["pl-multi-dropdown",{open:h.open,error:$.error,disabled:$.disabled}]),onKeydown:U,onFocusout:D},[r.createElementVNode("div",Tx,[r.createElementVNode("div",Nx,[r.withDirectives(r.createElementVNode("input",{ref_key:"input",ref:p,"onUpdate:modelValue":Z[0]||(Z[0]=W=>h.search=W),type:"text",tabindex:"-1",disabled:$.disabled,placeholder:y.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:Z[1]||(Z[1]=W=>h.open=!0)},null,40,Ax),[[r.vModelText,h.search]]),Z[3]||(Z[3]=r.createTextVNode()),h.open?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",{key:0,class:"chips-container",onClick:R},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(x.value,(W,J)=>(r.openBlock(),r.createBlock(r.unref(Gl),{key:J,closeable:"",small:"",onClick:Z[2]||(Z[2]=r.withModifiers(he=>h.open=!0,["stop"])),onClose:he=>b(W.value)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(W.label||W.value),1)]),_:2},1032,["onClose"]))),128))])),Z[4]||(Z[4]=r.createTextVNode()),r.createElementVNode("div",{class:"arrow",onClick:r.withModifiers(F,["stop"])}),Z[5]||(Z[5]=r.createTextVNode()),r.createElementVNode("div",Vx,[r.renderSlot($.$slots,"append")])]),Z[10]||(Z[10]=r.createTextVNode()),$.label?(r.openBlock(),r.createElementBlock("label",Bx,[$.required?(r.openBlock(),r.createElementBlock("i",Px)):r.createCommentVNode("",!0),Z[6]||(Z[6]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString($.label),1),Z[7]||(Z[7]=r.createTextVNode()),r.unref(i).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot($.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),Z[11]||(Z[11]=r.createTextVNode()),h.open?(r.openBlock(),r.createBlock(r.Teleport,{key:1,to:"body"},[r.createElementVNode("div",{ref_key:"list",ref:d,class:"pl-multi-dropdown__options",style:r.normalizeStyle(j),tabindex:"-1",onFocusout:D},[r.createElementVNode("div",Rx,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(x.value,(W,J)=>(r.openBlock(),r.createBlock(r.unref(Gl),{key:J,closeable:"",small:"",onClose:he=>b(W.value)},{default:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(W.label||W.value),1)]),_:2},1032,["onClose"]))),128))]),Z[8]||(Z[8]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(w.value,(W,J)=>(r.openBlock(),r.createBlock(yo,{key:J,option:W,"text-item":"text","is-selected":W.selected,"is-hovered":h.activeOption==J,size:"medium","use-checkbox":"",onClick:r.withModifiers(he=>G(W.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128)),Z[9]||(Z[9]=r.createTextVNode()),w.value.length?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",Dx,"Nothing found"))],36)])):r.createCommentVNode("",!0),Z[12]||(Z[12]=r.createTextVNode()),r.createVNode(vr,{class:"pl-multi-dropdown__contour"})])],42,Ex),Z[13]||(Z[13]=r.createTextVNode()),$.error?(r.openBlock(),r.createElementBlock("div",Ix,r.toDisplayString($.error),1)):$.helper?(r.openBlock(),r.createElementBlock("div",Fx,r.toDisplayString($.helper),1)):r.createCommentVNode("",!0)]))}}),$l=r.defineComponent({__name:"PlCheckboxBase",props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t){const e=t,n=r.computed(()=>e.modelValue);return(o,i)=>(r.openBlock(),r.createElementBlock("div",{tabindex:"0",class:r.normalizeClass(["pl-checkbox-base",{checked:n.value,disabled:o.disabled}]),onClick:i[0]||(i[0]=l=>o.$emit("update:modelValue",!o.modelValue)),onKeydown:i[1]||(i[1]=r.withKeys(l=>o.$emit("update:modelValue",!o.modelValue),["enter"]))},null,34))}}),Mx={name:"PlCheckbox"},Gx=r.defineComponent({...Mx,props:{modelValue:{type:Boolean},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t){const e=t,n=r.useSlots();return(o,i)=>r.unref(n).default?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(["pl-checkbox",{disabled:o.disabled}])},[r.createVNode($l,r.mergeProps(e,{"onUpdate:modelValue":i[0]||(i[0]=l=>o.$emit("update:modelValue",l))}),null,16),i[3]||(i[3]=r.createTextVNode()),r.createElementVNode("label",{onClick:i[1]||(i[1]=l=>o.$emit("update:modelValue",!o.$props.modelValue))},[r.renderSlot(o.$slots,"default")])],2)):(r.openBlock(),r.createBlock($l,r.mergeProps({key:1},e,{"onUpdate:modelValue":i[2]||(i[2]=l=>o.$emit("update:modelValue",l))}),null,16))}}),$x={key:0},zx=["onClick"],Ux={name:"PlCheckboxGroup"},Zx=r.defineComponent({...Ux,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=t,i=c=>o.modelValue.includes(c),l=c=>{const d=o.modelValue??[];n("update:modelValue",i(c)?d.filter(p=>p!==c):[...d,c])};return(c,d)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["ui-checkbox-group",{disabled:c.disabled}])},[c.label?(r.openBlock(),r.createElementBlock("label",$x,r.toDisplayString(c.label),1)):r.createCommentVNode("",!0),d[1]||(d[1]=r.createTextVNode()),(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(c.options.map(p=>({label:"label"in p?p.label:p.text,value:p.value})),(p,h)=>(r.openBlock(),r.createElementBlock("div",{key:h},[r.createVNode($l,{disabled:c.disabled,label:p.label,"model-value":i(p.value),"onUpdate:modelValue":()=>l(p.value)},null,8,["disabled","label","model-value","onUpdate:modelValue"]),d[0]||(d[0]=r.createTextVNode()),r.createElementVNode("label",{onClick:r.withModifiers(()=>l(p.value),["stop"])},r.toDisplayString(p.label),9,zx)]))),128))],2))}}),jx="_component_tupwt_1",Wx={component:jx},Hx={};function qx(t,e){return r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(t.$style.component)},e[0]||(e[0]=[r.createElementVNode("div",null,null,-1)]),2)}const Kx={$style:Wx},Xx=Zt(Hx,[["render",qx],["__cssModules",Kx]]),Yx={key:1,class:"pl-dialog-modal__title"},Jx={inheritAttrs:!1},zl=r.defineComponent({...Jx,__name:"PlDialogModal",props:{modelValue:{type:Boolean},width:{default:"448px"},height:{default:"auto"},minHeight:{default:"auto"},maxHeight:{default:"auto"},closable:{type:Boolean,default:!0},noContentGutters:{type:Boolean,default:!1},noTopContentGutter:{type:Boolean},actionsHasTopBorder:{type:Boolean,default:!0},closeOnOutsideClick:{type:Boolean}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,i=t,l=r.ref(),c=r.useAttrs();function d(p){l.value&&i.closeOnOutsideClick&&document.contains(p.target)&&!l.value.contains(p.target)&&o("update:modelValue",!1)}return st(document.body,"keyup",p=>{i.modelValue&&p.code==="Escape"&&o("update:modelValue",!1)}),(p,h)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(r.Transition,{name:"dialog"},{default:r.withCtx(()=>[p.modelValue?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-dialog-modal__shadow",onClick:d},[r.createElementVNode("div",r.mergeProps(r.unref(c),{ref_key:"modal",ref:l,class:["pl-dialog-modal",{"has-title":r.unref(n).title,"has-content":r.unref(n).default}],style:{width:p.width,height:p.height,minHeight:p.minHeight,maxHeight:p.maxHeight}}),[p.closable?(r.openBlock(),r.createBlock(Xx,{key:0,class:"close-modal-btn",onClick:h[0]||(h[0]=r.withModifiers(m=>o("update:modelValue",!1),["stop"]))})):r.createCommentVNode("",!0),h[1]||(h[1]=r.createTextVNode()),r.unref(n).title?(r.openBlock(),r.createElementBlock("div",Yx,[r.renderSlot(p.$slots,"title")])):r.createCommentVNode("",!0),h[2]||(h[2]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(["pl-dialog-modal__content",{"no-content-gutters":p.noContentGutters,"no-top-content-gutter":p.noTopContentGutter}])},[r.renderSlot(p.$slots,"default")],2),h[3]||(h[3]=r.createTextVNode()),r.unref(n).actions?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(["pl-dialog-modal__actions",{"has-top-border":p.actionsHasTopBorder}])},[r.renderSlot(p.$slots,"actions")],2)):r.createCommentVNode("",!0)],16)])):r.createCommentVNode("",!0)]),_:3})]))}}),Qx=r.defineComponent({__name:"TransitionSlidePanel",setup(t){function e(){window.dispatchEvent(new CustomEvent("adjust"))}function n(){window.dispatchEvent(new CustomEvent("adjust"))}return(o,i)=>(r.openBlock(),r.createBlock(r.Transition,{name:"slide-panel",onAfterEnter:e,onAfterLeave:n},{default:r.withCtx(()=>[r.renderSlot(o.$slots,"default")]),_:3}))}}),ek={key:0,class:"pl-slide-modal__title"},tk={class:"pl-slide-modal__content"},nk={key:1,class:"pl-slide-modal__actions"},rk={name:"PlSlideModal",inheritAttrs:!1},Vs=r.defineComponent({...rk,props:{modelValue:{type:Boolean,default:!1},width:{default:"368px"},shadow:{type:Boolean,default:!1},closeOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,i=t,l=r.ref(),c=r.useAttrs();return As(l,()=>{i.modelValue&&i.closeOnOutsideClick&&o("update:modelValue",!1)}),st(document,"keydown",d=>{d.key==="Escape"&&o("update:modelValue",!1)}),(d,p)=>(r.openBlock(),r.createBlock(r.Teleport,{to:"body"},[r.createVNode(Qx,null,{default:r.withCtx(()=>[d.modelValue?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,ref_key:"modal",ref:l,style:{width:d.width}},r.unref(c),{class:["pl-slide-modal",{"has-title":r.unref(n).title,"has-actions":r.unref(n).actions}],onKeyup:p[1]||(p[1]=r.withKeys(h=>o("update:modelValue",!1),["esc"]))}),[r.createElementVNode("div",{class:"close-dialog-btn",onClick:p[0]||(p[0]=h=>o("update:modelValue",!1))}),p[3]||(p[3]=r.createTextVNode()),r.unref(n).title?(r.openBlock(),r.createElementBlock("div",ek,[r.renderSlot(d.$slots,"title")])):r.createCommentVNode("",!0),p[4]||(p[4]=r.createTextVNode()),r.createElementVNode("div",tk,[r.renderSlot(d.$slots,"default")]),p[5]||(p[5]=r.createTextVNode()),r.unref(n).actions?(r.openBlock(),r.createElementBlock("div",nk,[r.renderSlot(d.$slots,"actions")])):r.createCommentVNode("",!0)],16)):r.createCommentVNode("",!0)]),_:3}),p[6]||(p[6]=r.createTextVNode()),d.modelValue&&d.shadow?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-slide-modal__shadow",onKeyup:p[2]||(p[2]=r.withKeys(h=>o("update:modelValue",!1),["esc"]))},null,32)):r.createCommentVNode("",!0)]))}}),ok={key:0,class:"label"},ik={name:"PlToggleSwitch"},Bs=r.defineComponent({...ik,props:{label:{},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{tabindex:"0",class:r.normalizeClass(["ui-toggle-switch",{active:e.modelValue}]),onClick:n[0]||(n[0]=o=>e.$emit("update:modelValue",!e.modelValue)),onKeydown:n[1]||(n[1]=r.withKeys(o=>e.$emit("update:modelValue",!e.modelValue),["enter"]))},[n[2]||(n[2]=r.createElementVNode("div",{class:"ui-toggle-switch__body"},[r.createElementVNode("div",{class:"ui-toggle-switch__handle"})],-1)),n[3]||(n[3]=r.createTextVNode()),e.label?(r.openBlock(),r.createElementBlock("span",ok,r.toDisplayString(e.label),1)):r.createCommentVNode("",!0)],34))}});function wp(t){return r.getCurrentScope()?(r.onScopeDispose(t),!0):!1}function sk(t){return r.unref(t)}const ak=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function lk(t,e,n={}){const{immediate:o=!0}=n,i=r.ref(!1);let l=null;function c(){l&&(clearTimeout(l),l=null)}function d(){i.value=!1,c()}function p(...h){c(),i.value=!0,l=setTimeout(()=>{i.value=!1,l=null,t(...h)},sk(e))}return o&&(i.value=!0,ak&&p()),wp(d),{isPending:r.readonly(i),start:p,stop:d}}function ck(t,e,n){return r.watch(t,(o,i,l)=>{o&&e(o,i,l)},{...n,once:!1})}function dk(t,e,n){const{start:o}=lk(l,e,{immediate:!1}),i=r.ref(!1);async function l(){i.value&&(await t(),o())}function c(){i.value||(i.value=!0,l())}function d(){i.value=!1}return n!=null&&n.immediate&&c(),wp(d),{isActive:i,pause:d,resume:c}}const uk="[==PROGRESS==]";function pk(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function hk(t){const e=r.ref(),n=r.reactive({errorCount:0});async function o(){var l;let c=e.value;if(c===void 0)return;const d=t.mockPlatforma??window.platforma;if(!d){console.warn("Platforma API is not available");return}for(;;){const p=await d.logDriver.readText(c.logHandle,100,c.lastOffset);if(c.error=void 0,n.errorCount=0,p.shouldUpdateHandle||c.logHandle!==((l=e.value)==null?void 0:l.logHandle))return;const h=t.progressPrefix??uk,m=new TextDecoder().decode(p.data).replace(new RegExp(`${pk(h)}`,"g"),"");if(c=Object.assign(c,{lines:c.lines+m,lastOffset:p.newOffset,finished:!p.live}),p.newOffset>=p.size)break}}const i=dk(()=>o().catch(l=>{e.value&&(n.errorCount++,n.errorCount>(t.maxRetries??3)?e.value.error=l:console.warn("skip error:",l,"retry..."))}),1500,{immediate:!1});return ck(()=>{var l;return(l=e==null?void 0:e.value)==null?void 0:l.finished},()=>i.pause()),r.watch(()=>t.logHandle,l=>{var c;l===void 0?(e.value=void 0,i.pause()):l!==((c=e.value)==null?void 0:c.logHandle)&&(e.value={logHandle:l,lastOffset:0,lines:"",finished:!1,error:void 0},n.errorCount=0,i.resume())},{immediate:!0}),e}const fk={key:0},mk={class:"pl-log-view__copy"},gk={key:1,class:"pl-log-view__error"},yk={name:"PlLogView"},bp=r.defineComponent({...yk,props:{value:{},logHandle:{},progressPrefix:{},error:{},output:{},maxRetries:{},mockPlatforma:{},label:{}},setup(t){const e=S=>{if(S&&S.ok===!1)return S.errors.join(`
|
|
53
|
+
`)},n=t,o=hk(n),i=r.ref(!0),l=r.ref(),c=r.ref(),d=r.computed(()=>{var S;return((S=o.value)==null?void 0:S.error)??n.error??e(n.output)}),p=r.computed(()=>{var S;return((S=o.value)==null?void 0:S.lines)??n.value??q_(n.output)}),h=r.ref(!1);Xn(c);const m=r.computed(()=>h.value?"clipboard-copied":"clipboard"),y=()=>{h.value=!0,setTimeout(()=>{h.value=!1},1200),p.value&&typeof p.value=="string"&&navigator.clipboard.writeText(p.value)},x=()=>{Zr(l.value,S=>{i.value&&S.scrollTo(S.scrollLeft,S.scrollHeight)})};r.watch(p,()=>{requestAnimationFrame(()=>{x()})},{immediate:!0});const w=S=>{const O=S.target;i.value=O.scrollTop+20>=O.scrollHeight-O.offsetHeight};return(S,O)=>(r.openBlock(),r.createElementBlock("div",{ref_key:"root",ref:c,class:r.normalizeClass(["pl-log-view",{"has-error":d.value}])},[S.label?(r.openBlock(),r.createElementBlock("label",fk,r.toDisplayString(S.label),1)):r.createCommentVNode("",!0),O[1]||(O[1]=r.createTextVNode()),r.createVNode(vr,{class:"pl-log-view__contour"}),O[2]||(O[2]=r.createTextVNode()),r.createElementVNode("div",mk,[r.createVNode(r.unref(xt),{"close-delay":800,position:"top"},{tooltip:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(h.value?"copied":"copy"),1)]),default:r.withCtx(()=>[r.createVNode(r.unref(Lt),{title:"Copy content",name:m.value,onClick:y},null,8,["name"]),O[0]||(O[0]=r.createTextVNode())]),_:1})]),O[3]||(O[3]=r.createTextVNode()),d.value?(r.openBlock(),r.createElementBlock("div",gk,r.toDisplayString(d.value),1)):(r.openBlock(),r.createElementBlock("div",{key:2,ref_key:"contentRef",ref:l,class:"pl-log-view__content",onScroll:w},r.toDisplayString(p.value),545))],2))}}),vk="_component_1ukal_1",_k="_tab_1ukal_14",Ck="_disabled_1ukal_27",wk="_active_1ukal_56",bk="_topLine_1ukal_69",bo={component:vk,tab:_k,disabled:Ck,active:wk,topLine:bk},xk=r.defineComponent({__name:"Tab",props:{option:{}},setup(t){const e=r.ref(),n=r.reactive({isOverflown:!1});return r.onMounted(()=>{const o=r.unref(e);if(!o)return;const i=o.$el.querySelector("span");i&&requestAnimationFrame(()=>{i.offsetWidth<i.scrollWidth&&(n.isOverflown=!0)})}),(o,i)=>(r.openBlock(),r.createBlock(r.unref(xt),{ref_key:"rootRef",ref:e,element:"div",position:"top",hide:!n.isOverflown,"close-delay":300,"data-is-overflown":n.isOverflown?"true":"false"},{tooltip:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(o.option.label),1)]),default:r.withCtx(()=>[r.renderSlot(o.$slots,"default"),i[0]||(i[0]=r.createTextVNode())]),_:3},8,["hide","data-is-overflown"]))}}),kk={name:"PlTabs"},Sk=r.defineComponent({...kk,props:{modelValue:{},options:{},disabled:{type:Boolean},topLine:{type:Boolean},maxTabWidth:{}},emits:["update:modelValue"],setup(t,{emit:e}){const n=e,o=i=>n("update:modelValue",i);return(i,l)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([r.unref(bo).component,{[r.unref(bo).disabled]:i.disabled,[r.unref(bo).topLine]:i.topLine}])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.options,(c,d)=>(r.openBlock(),r.createBlock(xk,{key:d,tabindex:i.modelValue===c.value||i.disabled||c.disabled?void 0:0,option:c,class:r.normalizeClass([{[r.unref(bo).active]:i.modelValue===c.value,[r.unref(bo).disabled]:c.disabled},r.unref(bo).tab]),style:r.normalizeStyle({"--pl-tabs-item-max-width":c.maxWidth??i.maxTabWidth}),onKeydown:r.withKeys(p=>o(c.value),["enter"]),onClick:p=>o(c.value)},{default:r.withCtx(()=>[r.renderSlot(i.$slots,c.value,{option:c},()=>[r.createElementVNode("span",null,r.toDisplayString(c.label),1)])]),_:2},1032,["tabindex","option","class","style","onKeydown","onClick"]))),128))],2))}}),Ek=r.defineComponent({__name:"PlSectionSeparator",props:{compact:{type:Boolean}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(["pl-section-separator",{[e.$style.compact]:e.compact}])},[r.createElementVNode("div",{class:r.normalizeClass(e.$style.content)},[r.renderSlot(e.$slots,"default")],2)],2))}}),Tk="_compact_rhd5u_16",Nk="_content_rhd5u_20",Ak={compact:Tk,content:Nk},Vk={$style:Ak},xp=Zt(Ek,[["__cssModules",Vk]]),Bk=r.defineComponent({__name:"PlAccordion",props:r.mergeModels({multiple:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t;return r.provide("pl-accordion-model",e),r.provide("pl-accordion-props",r.toRef(n)),(o,i)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.renderSlot(o.$slots,"header"),i[0]||(i[0]=r.createTextVNode()),r.renderSlot(o.$slots,"default")],64))}}),Pk=r.defineComponent({__name:"ExpandTransition",setup(t){const e=o=>{o.style.setProperty("--component-height",o.scrollHeight+"px"),o.classList.add("expand-collapse-fix")},n=o=>{o.style.removeProperty("--component-height"),o.classList.remove("expand-collapse-fix")};return(o,i)=>(r.openBlock(),r.createBlock(r.Transition,{name:"expand-collapse",onEnter:e,onLeave:e,onAfterEnter:n,onAfterLeave:n},{default:r.withCtx(()=>[r.renderSlot(o.$slots,"default")]),_:3}))}}),Rk=r.defineComponent({__name:"PlAccordionSection",props:r.mergeModels({label:{},compact:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.inject("pl-accordion-model"),n=r.inject("pl-accordion-props"),o=r.useModel(t,"modelValue"),i=Uu(),l=r.computed(()=>!n||n.value.multiple),c=r.computed({get(){return l.value?o.value:e?e.value===i:o.value},set(d){l.value?o.value=d:e&&(e.value=e.value===i?"":i)}});return(d,p)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createVNode(r.unref(xp),{class:r.normalizeClass(d.$style.separator),compact:d.compact,onClick:p[0]||(p[0]=h=>c.value=!c.value)},{default:r.withCtx(()=>[r.createVNode(r.unref(fn),{name:"chevron-right",class:r.normalizeClass([{[d.$style.down]:c.value},d.$style.chevron])},null,8,["class"]),r.createTextVNode(" "+r.toDisplayString(d.label),1)]),_:1},8,["class","compact"]),p[1]||(p[1]=r.createTextVNode()),r.createVNode(Pk,null,{default:r.withCtx(()=>[c.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(d.$style.content)},[r.renderSlot(d.$slots,"default")],2)):r.createCommentVNode("",!0)]),_:3})],64))}}),Dk="_content_jmjfk_2",Ik="_separator_jmjfk_14",Fk="_chevron_jmjfk_19",Ok="_down_jmjfk_23",Lk={content:Dk,separator:Ik,chevron:Fk,down:Ok},Mk={$style:Lk},Gk=Zt(Rk,[["__cssModules",Mk]]),$k="_component_1ietr_1",zk="_local_1ietr_1",Uk="_supported_1ietr_26",Zk="_remote_1ietr_32",jk="_search_1ietr_40",Wk="_selected_1ietr_72",Hk="_breadcrumbs_1ietr_86",qk="_cat_1ietr_116",Kk="_message_1ietr_122",Xk="_isFile_1ietr_197",Yk="_isDir_1ietr_201",Jk="_canBeSelected_1ietr_207",Qk="_spin_1ietr_1",ct={component:$k,local:zk,supported:Uk,remote:Zk,search:jk,"ls-container":"_ls-container_1ietr_50","ls-head":"_ls-head_1ietr_57",selected:Wk,breadcrumbs:Hk,"ls-error":"_ls-error_1ietr_108",cat:qk,message:Kk,"ls-empty":"_ls-empty_1ietr_131","ls-body":"_ls-body_1ietr_152",isFile:Xk,isDir:Yk,canBeSelected:Jk,"ls-loader":"_ls-loader_1ietr_213","loader-icon":"_loader-icon_1ietr_221",spin:Qk};function kp(t){return t?t.map(e=>"."+Y_(e,["."])):void 0}function eS(t){const e=t.split("/");e[0]!==""&&e.unshift("");const n=[];for(let o=0;o<e.length;o++)n.push({index:o,name:o===0?"Root":e[o],path:e.slice(0,o+1).filter(i=>i!=="").join("/")});return n}const Sp=()=>({dirPath:"",search:"",storageEntry:void 0,items:[],error:"",storageOptions:[],selected:[],lastSelected:void 0,currentLoadingPath:void 0,showHiddenItems:!1});function tS(t){return r.computed(()=>{let e=t.items;if(t.showHiddenItems||(e=e.filter(n=>!n.name.startsWith("."))),t.search){const n=t.search.toLocaleLowerCase();e=e.filter(o=>o.name.toLocaleLowerCase().includes(n))}return e})}const Ep={mounted:t=>{if(t.clientWidth<t.scrollWidth){const e=t.innerText;t.innerText=e.substring(0,57)+"..."+e.substring(e.length-10)}}},nS=["title","onClick"],rS={key:0,class:"ls-loader"},oS=["onClick"],iS=["title"],sS=["onClick"],aS=["title"],lS=r.defineComponent({__name:"Remote",props:{modelValue:{type:Boolean},extensions:{default:void 0},multi:{type:Boolean},title:{default:void 0},autoSelectStorage:{type:Boolean,default:!0},submit:{}},emits:["update:modelValue","import:files"],setup(t,{expose:e}){const n=t,o=r.reactive(Sp()),i=()=>{o.search="",o.error="",o.lastSelected=void 0},l=r.computed(()=>kp(n.extensions)),c=tS(o),d=r.computed(()=>{var D;return{modelValue:n.modelValue,dirPath:o.dirPath,storageHandle:(D=o.storageEntry)==null?void 0:D.handle}}),p=(D,A)=>{window.platforma&&o.currentLoadingPath!==A&&(o.currentLoadingPath=A,window.platforma.lsDriver.listFiles(D,A).then(U=>{A===o.dirPath&&(o.items=ks(U).entries.map(j=>({path:j.fullPath,name:j.name,isDir:j.type==="dir",canBeSelected:j.type==="file"&&(!l.value||l.value.some($=>j.fullPath.endsWith($))),handle:j.type==="file"?j.handle:void 0,selected:!1})).sort((j,$)=>j.isDir&&!$.isDir?-1:!j.isDir&&$.isDir?1:j.name.localeCompare($.name)).map((j,$)=>({id:$,...j})),o.lastSelected=void 0)}).catch(U=>o.error=String(U)).finally(()=>{o.currentLoadingPath=void 0}))},h=()=>{i();const{storageHandle:D,dirPath:A,modelValue:U}=d.value;D&&U&&p(D,A)},m=r.computed(()=>eS(o.dirPath)),y=r.computed(()=>o.items.filter(D=>D.canBeSelected&&D.selected&&!D.isDir)),x=r.computed(()=>{var D;return y.value.length>0&&((D=o.storageEntry)==null?void 0:D.handle)}),w=()=>{var D;return{storageHandle:ks((D=o.storageEntry)==null?void 0:D.handle),files:y.value.map(A=>A.handle)}},S=D=>{o.dirPath=D},O=(D,A)=>{const{shiftKey:U,metaKey:j}=D,{lastSelected:$}=o;if(D.preventDefault(),A.canBeSelected){if(n.multi||o.items.forEach(Z=>Z.selected=!1),A.selected=!0,!n.multi)return;!j&&!U&&o.items.forEach(Z=>{Z.id!==A.id&&(Z.selected=!1)}),U&&$!==void 0&&o.items.forEach(Z=>{j_(Z.id,$,A.id)&&(Z.selected=!0)}),A.selected&&(o.lastSelected=A.id)}},G=D=>{D&&!n.multi||o.items.filter(A=>A.canBeSelected).forEach(A=>{A.selected=D})},b=()=>G(!0),R=()=>G(!1),F=()=>{if(i(),R(),!window.platforma){console.warn("platforma API is not found");return}window.platforma.lsDriver.getStorageList().then(D=>{o.storageOptions=D.map(A=>({text:A.name,value:A})),n.autoSelectStorage&&Zr(D.find(A=>A.name==="local"||A.name.startsWith("local_disk_")&&A.initialFullPath.length>4),A=>{o.storageEntry=A})}).catch(D=>o.error=String(D))};return r.watch(r.toRef(o,"storageEntry"),D=>{i(),o.dirPath=(D==null?void 0:D.initialFullPath)??""},{immediate:!0}),r.watch([()=>o.dirPath,()=>o.storageEntry],()=>{h()}),r.watch(()=>n.modelValue,D=>{D?F():Object.assign(o,Sp())},{immediate:!0}),st(document,"keydown",D=>{n.modelValue&&D.target===document.body&&(D.metaKey&&D.code==="KeyA"&&(D.preventDefault(),b()),D.metaKey&&D.shiftKey&&D.code==="Period"&&(D.preventDefault(),o.showHiddenItems=!o.showHiddenItems),D.code==="Enter"&&n.submit())}),e({isReady:x,getFilesToImport:w}),r.onMounted(F),(D,A)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(ct).remote),onClick:r.withModifiers(R,["stop"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).search)},[r.createElementVNode("div",null,[r.createVNode(r.unref(wo),{modelValue:o.storageEntry,"onUpdate:modelValue":A[0]||(A[0]=U=>o.storageEntry=U),label:"Select storage",options:o.storageOptions},null,8,["modelValue","options"])]),A[2]||(A[2]=r.createTextVNode()),r.createElementVNode("div",null,[r.createVNode(r.unref(gp),{modelValue:o.search,"onUpdate:modelValue":A[1]||(A[1]=U=>o.search=U),label:"Search in folder",clearable:""},null,8,["modelValue"])])],2),A[12]||(A[12]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct)["ls-container"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct)["ls-head"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).breadcrumbs)},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.value,(U,j)=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:j},[r.createElementVNode("div",{title:U.path,onClick:$=>S(U.path)},r.toDisplayString(U.name),9,nS),A[3]||(A[3]=r.createTextVNode()),U.index!==m.value.length-1?(r.openBlock(),r.createBlock(r.unref(Co),{key:0,name:"chevron-right"})):r.createCommentVNode("",!0)],64))),128))],2),A[4]||(A[4]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).selected)},"Selected: "+r.toDisplayString(y.value.length),3)],2),A[11]||(A[11]=r.createTextVNode()),o.currentLoadingPath!==void 0?(r.openBlock(),r.createElementBlock("div",rS,A[5]||(A[5]=[r.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"},null,-1)]))):o.storageEntry?o.error?(r.openBlock(),r.createElementBlock("div",{key:2,class:r.normalizeClass(r.unref(ct)["ls-error"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).cat)},null,2),A[7]||(A[7]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).message)},r.toDisplayString(o.error),3)],2)):(r.openBlock(),r.createElementBlock("div",{key:3,class:r.normalizeClass(r.unref(ct)["ls-body"])},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(c),U=>(r.openBlock(),r.createElementBlock(r.Fragment,{key:U.id},[U.isDir?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass(r.unref(ct).isDir),onClick:j=>S(U.path)},[A[8]||(A[8]=r.createElementVNode("i",{class:"icon-16 icon-chevron-right"},null,-1)),A[9]||(A[9]=r.createTextVNode()),r.withDirectives((r.openBlock(),r.createElementBlock("span",{title:U.name},[r.createTextVNode(r.toDisplayString(U.name),1)],8,iS)),[[r.unref(Ep)]])],10,oS)):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass({[r.unref(ct).canBeSelected]:U.canBeSelected,[r.unref(ct).selected]:U.selected}),onClick:r.withModifiers(j=>O(j,U),["stop"])},[r.createElementVNode("i",{class:r.normalizeClass(["mask-16 mask-box",r.unref(ct).isFile])},null,2),A[10]||(A[10]=r.createTextVNode()),r.withDirectives((r.openBlock(),r.createElementBlock("span",{title:U.name},[r.createTextVNode(r.toDisplayString(U.name),1)],8,aS)),[[r.unref(Ep)]])],10,sS))],64))),128))],2)):(r.openBlock(),r.createElementBlock("div",{key:1,class:r.normalizeClass(r.unref(ct)["ls-empty"])},[r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).cat)},null,2),A[6]||(A[6]=r.createTextVNode()),r.createElementVNode("div",{class:r.normalizeClass(r.unref(ct).message)},"Select storage to preview",2)],2))],2)],2))}}),cS={key:1,class:"alert-error"},dS=r.defineComponent({__name:"Local",props:{importFiles:{type:Function},multi:{type:Boolean},extensions:{}},setup(t){const e=t,n=r.reactive({error:void 0}),o=r.computed(()=>e.multi?"Drag & Drop files here or click to add":"Drag & Drop file here or click to add"),i=async c=>{var d,p,h;const m=(p=(d=window.platforma)==null?void 0:d.lsDriver)==null?void 0:p.fileToImportHandle;if(!m)return console.error("API platforma.lsDriver.fileToImportHandle is not available");const y=kp(e.extensions),x=await Promise.all([...((h=c.dataTransfer)==null?void 0:h.files)??[]].filter(w=>!!w).filter(w=>y?y.some(S=>w.name.endsWith(S)):!0).map(w=>m(w)));x.length&&e.importFiles({files:x})},l=async()=>{var c,d;const p=e.extensions?[{name:"All Files",extensions:e.extensions}]:[];e.multi?(c=window.platforma)==null||c.lsDriver.showOpenMultipleFilesDialog({title:"Select files to import",filters:p}).then(({files:h})=>{h&&e.importFiles({files:h})}).catch(h=>n.error=h):(d=window.platforma)==null||d.lsDriver.showOpenSingleFileDialog({title:"Select file to import",filters:p}).then(({file:h})=>{h&&e.importFiles({files:[h]})}).catch(h=>n.error=h)};return(c,d)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass(r.unref(ct).local),onDrop:i,onDragover:d[0]||(d[0]=r.withModifiers(()=>{},["prevent"])),onClick:l},[r.createVNode(r.unref(Ci),{name:"cloud-upload"}),d[1]||(d[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(o.value),1),d[2]||(d[2]=r.createTextVNode()),c.extensions?(r.openBlock(),r.createElementBlock("span",{key:0,class:r.normalizeClass(r.unref(ct).supported)},"Supported formats: "+r.toDisplayString(c.extensions.join(", ")),3)):r.createCommentVNode("",!0),d[3]||(d[3]=r.createTextVNode()),n.error?(r.openBlock(),r.createElementBlock("span",cS,r.toDisplayString(n.error),1)):r.createCommentVNode("",!0)],34))}}),uS={style:{margin:"0 24px"}},Tp=r.defineComponent({__name:"PlFileDialog",props:{modelValue:{type:Boolean},extensions:{default:void 0},multi:{type:Boolean},title:{default:void 0},autoSelectStorage:{type:Boolean,default:!0},closeOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue","import:files"],setup(t,{emit:e}){const n=e,o=t,i=r.ref("local"),l=r.computed(()=>o.multi?"Select Files to Import":"Select File to Import"),c=[{label:"My Computer",value:"local"},{label:"Remote",value:"remote"}],d=()=>n("update:modelValue",!1),p=r.useTemplateRef("remote"),h=()=>{var y,x;(y=p.value)!=null&&y.isReady&&(n("import:files",ks((x=p.value)==null?void 0:x.getFilesToImport())),d())},m=y=>{n("import:files",y),d()};return(y,x)=>(r.openBlock(),r.createBlock(r.unref(zl),{"no-content-gutters":!0,"close-on-outside-click":y.closeOnOutsideClick,class:r.normalizeClass(["pl-dialog-modal",r.unref(ct).component]),"model-value":y.modelValue,width:"688px",height:"720px","onUpdate:modelValue":d},r.createSlots({title:r.withCtx(()=>[r.createTextVNode(r.toDisplayString(y.title??l.value),1)]),default:r.withCtx(()=>[x[4]||(x[4]=r.createTextVNode()),r.createElementVNode("div",uS,[r.createVNode(r.unref(dp),{modelValue:i.value,"onUpdate:modelValue":x[0]||(x[0]=w=>i.value=w),options:c},null,8,["modelValue"])]),x[5]||(x[5]=r.createTextVNode()),i.value==="remote"?(r.openBlock(),r.createBlock(lS,r.mergeProps({key:0,ref:"remote"},y.$props,{submit:h}),null,16)):r.createCommentVNode("",!0),x[6]||(x[6]=r.createTextVNode()),i.value==="local"?(r.openBlock(),r.createBlock(dS,r.mergeProps({key:1,"import-files":m},y.$props),null,16)):r.createCommentVNode("",!0),x[7]||(x[7]=r.createTextVNode())]),_:2},[i.value==="remote"?{name:"actions",fn:r.withCtx(()=>{var w;return[r.createVNode(r.unref(Ns),{style:{"min-width":"160px"},disabled:!((w=r.unref(p))!=null&&w.isReady),onClick:r.withModifiers(h,["stop"])},{default:r.withCtx(()=>x[1]||(x[1]=[r.createTextVNode("Import")])),_:1},8,["disabled"]),x[3]||(x[3]=r.createTextVNode()),r.createVNode(r.unref(_o),{"justify-center":!1,onClick:r.withModifiers(d,["stop"])},{default:r.withCtx(()=>x[2]||(x[2]=[r.createTextVNode("Cancel")])),_:1})]}),key:"0"}:void 0]),1032,["close-on-outside-click","class","model-value"]))}});var $e;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const l={};for(const c of i)l[c]=c;return l},t.getValidEnumValues=i=>{const l=t.objectKeys(i).filter(d=>typeof i[i[d]]!="number"),c={};for(const d of l)c[d]=i[d];return t.objectValues(c)},t.objectValues=i=>t.objectKeys(i).map(function(l){return i[l]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const l=[];for(const c in i)Object.prototype.hasOwnProperty.call(i,c)&&l.push(c);return l},t.find=(i,l)=>{for(const c of i)if(l(c))return c},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function o(i,l=" | "){return i.map(c=>typeof c=="string"?`'${c}'`:c).join(l)}t.joinValues=o,t.jsonStringifyReplacer=(i,l)=>typeof l=="bigint"?l.toString():l})($e||($e={}));var Ul;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(Ul||(Ul={}));const le=$e.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),_r=t=>{switch(typeof t){case"undefined":return le.undefined;case"string":return le.string;case"number":return isNaN(t)?le.nan:le.number;case"boolean":return le.boolean;case"function":return le.function;case"bigint":return le.bigint;case"symbol":return le.symbol;case"object":return Array.isArray(t)?le.array:t===null?le.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?le.promise:typeof Map<"u"&&t instanceof Map?le.map:typeof Set<"u"&&t instanceof Set?le.set:typeof Date<"u"&&t instanceof Date?le.date:le.object;default:return le.unknown}},te=$e.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),pS=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class jt extends Error{constructor(e){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(l){return l.message},o={_errors:[]},i=l=>{for(const c of l.issues)if(c.code==="invalid_union")c.unionErrors.map(i);else if(c.code==="invalid_return_type")i(c.returnTypeError);else if(c.code==="invalid_arguments")i(c.argumentsError);else if(c.path.length===0)o._errors.push(n(c));else{let d=o,p=0;for(;p<c.path.length;){const h=c.path[p];p===c.path.length-1?(d[h]=d[h]||{_errors:[]},d[h]._errors.push(n(c))):d[h]=d[h]||{_errors:[]},d=d[h],p++}}};return i(this),o}static assert(e){if(!(e instanceof jt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,$e.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},o=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):o.push(e(i));return{formErrors:o,fieldErrors:n}}get formErrors(){return this.flatten()}}jt.create=t=>new jt(t);const xo=(t,e)=>{let n;switch(t.code){case te.invalid_type:t.received===le.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case te.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,$e.jsonStringifyReplacer)}`;break;case te.unrecognized_keys:n=`Unrecognized key(s) in object: ${$e.joinValues(t.keys,", ")}`;break;case te.invalid_union:n="Invalid input";break;case te.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${$e.joinValues(t.options)}`;break;case te.invalid_enum_value:n=`Invalid enum value. Expected ${$e.joinValues(t.options)}, received '${t.received}'`;break;case te.invalid_arguments:n="Invalid function arguments";break;case te.invalid_return_type:n="Invalid function return type";break;case te.invalid_date:n="Invalid date";break;case te.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:$e.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case te.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case te.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case te.custom:n="Invalid input";break;case te.invalid_intersection_types:n="Intersection results could not be merged";break;case te.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case te.not_finite:n="Number must be finite";break;default:n=e.defaultError,$e.assertNever(t)}return{message:n}};let Np=xo;function hS(t){Np=t}function Ps(){return Np}const Rs=t=>{const{data:e,path:n,errorMaps:o,issueData:i}=t,l=[...n,...i.path||[]],c={...i,path:l};if(i.message!==void 0)return{...i,path:l,message:i.message};let d="";const p=o.filter(h=>!!h).slice().reverse();for(const h of p)d=h(c,{data:e,defaultError:d}).message;return{...i,path:l,message:d}},fS=[];function se(t,e){const n=Ps(),o=Rs({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===xo?void 0:xo].filter(i=>!!i)});t.common.issues.push(o)}class kt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const o=[];for(const i of n){if(i.status==="aborted")return xe;i.status==="dirty"&&e.dirty(),o.push(i.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,n){const o=[];for(const i of n){const l=await i.key,c=await i.value;o.push({key:l,value:c})}return kt.mergeObjectSync(e,o)}static mergeObjectSync(e,n){const o={};for(const i of n){const{key:l,value:c}=i;if(l.status==="aborted"||c.status==="aborted")return xe;l.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof c.value<"u"||i.alwaysSet)&&(o[l.value]=c.value)}return{status:e.value,value:o}}}const xe=Object.freeze({status:"aborted"}),Ds=t=>({status:"dirty",value:t}),Vt=t=>({status:"valid",value:t}),Zl=t=>t.status==="aborted",jl=t=>t.status==="dirty",bi=t=>t.status==="valid",xi=t=>typeof Promise<"u"&&t instanceof Promise;function Is(t,e,n,o){if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function Ap(t,e,n,o,i){if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}var me;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(me||(me={}));var ki,Si;class Mn{constructor(e,n,o,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=o,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Vp=(t,e)=>{if(bi(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new jt(t.common.issues);return this._error=n,this._error}}};function Ve(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:o,description:i}=t;if(e&&(n||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(l,c)=>{var d,p;const{message:h}=t;return l.code==="invalid_enum_value"?{message:h??c.defaultError}:typeof c.data>"u"?{message:(d=h??o)!==null&&d!==void 0?d:c.defaultError}:l.code!=="invalid_type"?{message:c.defaultError}:{message:(p=h??n)!==null&&p!==void 0?p:c.defaultError}},description:i}}class Re{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return _r(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:_r(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new kt,ctx:{common:e.parent.common,data:e.data,parsedType:_r(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(xi(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const o=this.safeParse(e,n);if(o.success)return o.data;throw o.error}safeParse(e,n){var o;const i={common:{issues:[],async:(o=n==null?void 0:n.async)!==null&&o!==void 0?o:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:_r(e)},l=this._parseSync({data:e,path:i.path,parent:i});return Vp(i,l)}async parseAsync(e,n){const o=await this.safeParseAsync(e,n);if(o.success)return o.data;throw o.error}async safeParseAsync(e,n){const o={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:_r(e)},i=this._parse({data:e,path:o.path,parent:o}),l=await(xi(i)?i:Promise.resolve(i));return Vp(o,l)}refine(e,n){const o=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,l)=>{const c=e(i),d=()=>l.addIssue({code:te.custom,...o(i)});return typeof Promise<"u"&&c instanceof Promise?c.then(p=>p?!0:(d(),!1)):c?!0:(d(),!1)})}refinement(e,n){return this._refinement((o,i)=>e(o)?!0:(i.addIssue(typeof n=="function"?n(o,i):n),!1))}_refinement(e){return new yn({schema:this,typeName:we.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return $n.create(this,this._def)}nullable(){return kr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return gn.create(this,this._def)}promise(){return To.create(this,this._def)}or(e){return Ai.create([this,e],this._def)}and(e){return Vi.create(this,e,this._def)}transform(e){return new yn({...Ve(this._def),schema:this,typeName:we.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new Ii({...Ve(this._def),innerType:this,defaultValue:n,typeName:we.ZodDefault})}brand(){return new ql({typeName:we.ZodBranded,type:this,...Ve(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new Fi({...Ve(this._def),innerType:this,catchValue:n,typeName:we.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Oi.create(this,e)}readonly(){return Li.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const mS=/^c[^\s-]{8,}$/i,gS=/^[0-9a-z]+$/,yS=/^[0-9A-HJKMNP-TV-Z]{26}$/,vS=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,_S=/^[a-z0-9_-]{21}$/i,CS=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,wS=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,bS="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Wl;const xS=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,kS=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,SS=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Bp="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",ES=new RegExp(`^${Bp}$`);function Pp(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function TS(t){return new RegExp(`^${Pp(t)}$`)}function Rp(t){let e=`${Bp}T${Pp(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function NS(t,e){return!!((e==="v4"||!e)&&xS.test(t)||(e==="v6"||!e)&&kS.test(t))}class mn extends Re{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==le.string){const i=this._getOrReturnCtx(e);return se(i,{code:te.invalid_type,expected:le.string,received:i.parsedType}),xe}const n=new kt;let o;for(const i of this._def.checks)if(i.kind==="min")e.data.length<i.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:te.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")e.data.length>i.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:te.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const l=e.data.length>i.value,c=e.data.length<i.value;(l||c)&&(o=this._getOrReturnCtx(e,o),l?se(o,{code:te.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):c&&se(o,{code:te.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")wS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"email",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Wl||(Wl=new RegExp(bS,"u")),Wl.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"emoji",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")vS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"uuid",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="nanoid")_S.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"nanoid",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")mS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"cuid",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")gS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"cuid2",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")yS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"ulid",code:te.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),se(o,{validation:"url",code:te.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"regex",code:te.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?e.data=e.data.trim():i.kind==="includes"?e.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(e,o),se(o,{code:te.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?e.data=e.data.toLowerCase():i.kind==="toUpperCase"?e.data=e.data.toUpperCase():i.kind==="startsWith"?e.data.startsWith(i.value)||(o=this._getOrReturnCtx(e,o),se(o,{code:te.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?e.data.endsWith(i.value)||(o=this._getOrReturnCtx(e,o),se(o,{code:te.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?Rp(i).test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{code:te.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="date"?ES.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{code:te.invalid_string,validation:"date",message:i.message}),n.dirty()):i.kind==="time"?TS(i).test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{code:te.invalid_string,validation:"time",message:i.message}),n.dirty()):i.kind==="duration"?CS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"duration",code:te.invalid_string,message:i.message}),n.dirty()):i.kind==="ip"?NS(e.data,i.version)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"ip",code:te.invalid_string,message:i.message}),n.dirty()):i.kind==="base64"?SS.test(e.data)||(o=this._getOrReturnCtx(e,o),se(o,{validation:"base64",code:te.invalid_string,message:i.message}),n.dirty()):$e.assertNever(i);return{status:n.value,value:e.data}}_regex(e,n,o){return this.refinement(i=>e.test(i),{validation:n,code:te.invalid_string,...me.errToObj(o)})}_addCheck(e){return new mn({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...me.errToObj(e)})}url(e){return this._addCheck({kind:"url",...me.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...me.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...me.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...me.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...me.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...me.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...me.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...me.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...me.errToObj(e)})}datetime(e){var n,o;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(o=e==null?void 0:e.local)!==null&&o!==void 0?o:!1,...me.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...me.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...me.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...me.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...me.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...me.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...me.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...me.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...me.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...me.errToObj(n)})}nonempty(e){return this.min(1,me.errToObj(e))}trim(){return new mn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new mn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new mn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}mn.create=t=>{var e;return new mn({checks:[],typeName:we.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ve(t)})};function AS(t,e){const n=(t.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,i=n>o?n:o,l=parseInt(t.toFixed(i).replace(".","")),c=parseInt(e.toFixed(i).replace(".",""));return l%c/Math.pow(10,i)}class Cr extends Re{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==le.number){const i=this._getOrReturnCtx(e);return se(i,{code:te.invalid_type,expected:le.number,received:i.parsedType}),xe}let n;const o=new kt;for(const i of this._def.checks)i.kind==="int"?$e.isInteger(e.data)||(n=this._getOrReturnCtx(e,n),se(n,{code:te.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?AS(e.data,i.value)!==0&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(e.data)||(n=this._getOrReturnCtx(e,n),se(n,{code:te.not_finite,message:i.message}),o.dirty()):$e.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,me.toString(n))}gt(e,n){return this.setLimit("min",e,!1,me.toString(n))}lte(e,n){return this.setLimit("max",e,!0,me.toString(n))}lt(e,n){return this.setLimit("max",e,!1,me.toString(n))}setLimit(e,n,o,i){return new Cr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:me.toString(i)}]})}_addCheck(e){return new Cr({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:me.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:me.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:me.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:me.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:me.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:me.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:me.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:me.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:me.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&$e.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(n===null||o.value>n)&&(n=o.value):o.kind==="max"&&(e===null||o.value<e)&&(e=o.value)}return Number.isFinite(n)&&Number.isFinite(e)}}Cr.create=t=>new Cr({checks:[],typeName:we.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Ve(t)});class wr extends Re{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==le.bigint){const i=this._getOrReturnCtx(e);return se(i,{code:te.invalid_type,expected:le.bigint,received:i.parsedType}),xe}let n;const o=new kt;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?e.data<i.value:e.data<=i.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?e.data>i.value:e.data>=i.value)&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?e.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(e,n),se(n,{code:te.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):$e.assertNever(i);return{status:o.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,me.toString(n))}gt(e,n){return this.setLimit("min",e,!1,me.toString(n))}lte(e,n){return this.setLimit("max",e,!0,me.toString(n))}lt(e,n){return this.setLimit("max",e,!1,me.toString(n))}setLimit(e,n,o,i){return new wr({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:o,message:me.toString(i)}]})}_addCheck(e){return new wr({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:me.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:me.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:me.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:me.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:me.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}wr.create=t=>{var e;return new wr({checks:[],typeName:we.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ve(t)})};class Ei extends Re{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==le.boolean){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.boolean,received:n.parsedType}),xe}return Vt(e.data)}}Ei.create=t=>new Ei({typeName:we.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ve(t)});class Wr extends Re{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==le.date){const i=this._getOrReturnCtx(e);return se(i,{code:te.invalid_type,expected:le.date,received:i.parsedType}),xe}if(isNaN(e.data.getTime())){const i=this._getOrReturnCtx(e);return se(i,{code:te.invalid_date}),xe}const n=new kt;let o;for(const i of this._def.checks)i.kind==="min"?e.data.getTime()<i.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:te.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?e.data.getTime()>i.value&&(o=this._getOrReturnCtx(e,o),se(o,{code:te.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):$e.assertNever(i);return{status:n.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Wr({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:me.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:me.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Wr.create=t=>new Wr({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:we.ZodDate,...Ve(t)});class Fs extends Re{_parse(e){if(this._getType(e)!==le.symbol){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.symbol,received:n.parsedType}),xe}return Vt(e.data)}}Fs.create=t=>new Fs({typeName:we.ZodSymbol,...Ve(t)});class Ti extends Re{_parse(e){if(this._getType(e)!==le.undefined){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.undefined,received:n.parsedType}),xe}return Vt(e.data)}}Ti.create=t=>new Ti({typeName:we.ZodUndefined,...Ve(t)});class Ni extends Re{_parse(e){if(this._getType(e)!==le.null){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.null,received:n.parsedType}),xe}return Vt(e.data)}}Ni.create=t=>new Ni({typeName:we.ZodNull,...Ve(t)});class ko extends Re{constructor(){super(...arguments),this._any=!0}_parse(e){return Vt(e.data)}}ko.create=t=>new ko({typeName:we.ZodAny,...Ve(t)});class Hr extends Re{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Vt(e.data)}}Hr.create=t=>new Hr({typeName:we.ZodUnknown,...Ve(t)});class Yn extends Re{_parse(e){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.never,received:n.parsedType}),xe}}Yn.create=t=>new Yn({typeName:we.ZodNever,...Ve(t)});class Os extends Re{_parse(e){if(this._getType(e)!==le.undefined){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.void,received:n.parsedType}),xe}return Vt(e.data)}}Os.create=t=>new Os({typeName:we.ZodVoid,...Ve(t)});class gn extends Re{_parse(e){const{ctx:n,status:o}=this._processInputParams(e),i=this._def;if(n.parsedType!==le.array)return se(n,{code:te.invalid_type,expected:le.array,received:n.parsedType}),xe;if(i.exactLength!==null){const c=n.data.length>i.exactLength.value,d=n.data.length<i.exactLength.value;(c||d)&&(se(n,{code:c?te.too_big:te.too_small,minimum:d?i.exactLength.value:void 0,maximum:c?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),o.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(se(n,{code:te.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),o.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(se(n,{code:te.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),o.dirty()),n.common.async)return Promise.all([...n.data].map((c,d)=>i.type._parseAsync(new Mn(n,c,n.path,d)))).then(c=>kt.mergeArray(o,c));const l=[...n.data].map((c,d)=>i.type._parseSync(new Mn(n,c,n.path,d)));return kt.mergeArray(o,l)}get element(){return this._def.type}min(e,n){return new gn({...this._def,minLength:{value:e,message:me.toString(n)}})}max(e,n){return new gn({...this._def,maxLength:{value:e,message:me.toString(n)}})}length(e,n){return new gn({...this._def,exactLength:{value:e,message:me.toString(n)}})}nonempty(e){return this.min(1,e)}}gn.create=(t,e)=>new gn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:we.ZodArray,...Ve(e)});function So(t){if(t instanceof rt){const e={};for(const n in t.shape){const o=t.shape[n];e[n]=$n.create(So(o))}return new rt({...t._def,shape:()=>e})}else return t instanceof gn?new gn({...t._def,type:So(t.element)}):t instanceof $n?$n.create(So(t.unwrap())):t instanceof kr?kr.create(So(t.unwrap())):t instanceof Gn?Gn.create(t.items.map(e=>So(e))):t}class rt extends Re{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=$e.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==le.object){const p=this._getOrReturnCtx(e);return se(p,{code:te.invalid_type,expected:le.object,received:p.parsedType}),xe}const{status:n,ctx:o}=this._processInputParams(e),{shape:i,keys:l}=this._getCached(),c=[];if(!(this._def.catchall instanceof Yn&&this._def.unknownKeys==="strip"))for(const p in o.data)l.includes(p)||c.push(p);const d=[];for(const p of l){const h=i[p],m=o.data[p];d.push({key:{status:"valid",value:p},value:h._parse(new Mn(o,m,o.path,p)),alwaysSet:p in o.data})}if(this._def.catchall instanceof Yn){const p=this._def.unknownKeys;if(p==="passthrough")for(const h of c)d.push({key:{status:"valid",value:h},value:{status:"valid",value:o.data[h]}});else if(p==="strict")c.length>0&&(se(o,{code:te.unrecognized_keys,keys:c}),n.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const h of c){const m=o.data[h];d.push({key:{status:"valid",value:h},value:p._parse(new Mn(o,m,o.path,h)),alwaysSet:h in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const p=[];for(const h of d){const m=await h.key,y=await h.value;p.push({key:m,value:y,alwaysSet:h.alwaysSet})}return p}).then(p=>kt.mergeObjectSync(n,p)):kt.mergeObjectSync(n,d)}get shape(){return this._def.shape()}strict(e){return me.errToObj,new rt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,o)=>{var i,l,c,d;const p=(c=(l=(i=this._def).errorMap)===null||l===void 0?void 0:l.call(i,n,o).message)!==null&&c!==void 0?c:o.defaultError;return n.code==="unrecognized_keys"?{message:(d=me.errToObj(e).message)!==null&&d!==void 0?d:p}:{message:p}}}:{}})}strip(){return new rt({...this._def,unknownKeys:"strip"})}passthrough(){return new rt({...this._def,unknownKeys:"passthrough"})}extend(e){return new rt({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new rt({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:we.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new rt({...this._def,catchall:e})}pick(e){const n={};return $e.objectKeys(e).forEach(o=>{e[o]&&this.shape[o]&&(n[o]=this.shape[o])}),new rt({...this._def,shape:()=>n})}omit(e){const n={};return $e.objectKeys(this.shape).forEach(o=>{e[o]||(n[o]=this.shape[o])}),new rt({...this._def,shape:()=>n})}deepPartial(){return So(this)}partial(e){const n={};return $e.objectKeys(this.shape).forEach(o=>{const i=this.shape[o];e&&!e[o]?n[o]=i:n[o]=i.optional()}),new rt({...this._def,shape:()=>n})}required(e){const n={};return $e.objectKeys(this.shape).forEach(o=>{if(e&&!e[o])n[o]=this.shape[o];else{let i=this.shape[o];for(;i instanceof $n;)i=i._def.innerType;n[o]=i}}),new rt({...this._def,shape:()=>n})}keyof(){return Dp($e.objectKeys(this.shape))}}rt.create=(t,e)=>new rt({shape:()=>t,unknownKeys:"strip",catchall:Yn.create(),typeName:we.ZodObject,...Ve(e)}),rt.strictCreate=(t,e)=>new rt({shape:()=>t,unknownKeys:"strict",catchall:Yn.create(),typeName:we.ZodObject,...Ve(e)}),rt.lazycreate=(t,e)=>new rt({shape:t,unknownKeys:"strip",catchall:Yn.create(),typeName:we.ZodObject,...Ve(e)});class Ai extends Re{_parse(e){const{ctx:n}=this._processInputParams(e),o=this._def.options;function i(l){for(const d of l)if(d.result.status==="valid")return d.result;for(const d of l)if(d.result.status==="dirty")return n.common.issues.push(...d.ctx.common.issues),d.result;const c=l.map(d=>new jt(d.ctx.common.issues));return se(n,{code:te.invalid_union,unionErrors:c}),xe}if(n.common.async)return Promise.all(o.map(async l=>{const c={...n,common:{...n.common,issues:[]},parent:null};return{result:await l._parseAsync({data:n.data,path:n.path,parent:c}),ctx:c}})).then(i);{let l;const c=[];for(const p of o){const h={...n,common:{...n.common,issues:[]},parent:null},m=p._parseSync({data:n.data,path:n.path,parent:h});if(m.status==="valid")return m;m.status==="dirty"&&!l&&(l={result:m,ctx:h}),h.common.issues.length&&c.push(h.common.issues)}if(l)return n.common.issues.push(...l.ctx.common.issues),l.result;const d=c.map(p=>new jt(p));return se(n,{code:te.invalid_union,unionErrors:d}),xe}}get options(){return this._def.options}}Ai.create=(t,e)=>new Ai({options:t,typeName:we.ZodUnion,...Ve(e)});const br=t=>t instanceof Pi?br(t.schema):t instanceof yn?br(t.innerType()):t instanceof Ri?[t.value]:t instanceof xr?t.options:t instanceof Di?$e.objectValues(t.enum):t instanceof Ii?br(t._def.innerType):t instanceof Ti?[void 0]:t instanceof Ni?[null]:t instanceof $n?[void 0,...br(t.unwrap())]:t instanceof kr?[null,...br(t.unwrap())]:t instanceof ql||t instanceof Li?br(t.unwrap()):t instanceof Fi?br(t._def.innerType):[];class Ls extends Re{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==le.object)return se(n,{code:te.invalid_type,expected:le.object,received:n.parsedType}),xe;const o=this.discriminator,i=n.data[o],l=this.optionsMap.get(i);return l?n.common.async?l._parseAsync({data:n.data,path:n.path,parent:n}):l._parseSync({data:n.data,path:n.path,parent:n}):(se(n,{code:te.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),xe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,o){const i=new Map;for(const l of n){const c=br(l.shape[e]);if(!c.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const d of c){if(i.has(d))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(d)}`);i.set(d,l)}}return new Ls({typeName:we.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...Ve(o)})}}function Hl(t,e){const n=_r(t),o=_r(e);if(t===e)return{valid:!0,data:t};if(n===le.object&&o===le.object){const i=$e.objectKeys(e),l=$e.objectKeys(t).filter(d=>i.indexOf(d)!==-1),c={...t,...e};for(const d of l){const p=Hl(t[d],e[d]);if(!p.valid)return{valid:!1};c[d]=p.data}return{valid:!0,data:c}}else if(n===le.array&&o===le.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let l=0;l<t.length;l++){const c=t[l],d=e[l],p=Hl(c,d);if(!p.valid)return{valid:!1};i.push(p.data)}return{valid:!0,data:i}}else return n===le.date&&o===le.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class Vi extends Re{_parse(e){const{status:n,ctx:o}=this._processInputParams(e),i=(l,c)=>{if(Zl(l)||Zl(c))return xe;const d=Hl(l.value,c.value);return d.valid?((jl(l)||jl(c))&&n.dirty(),{status:n.value,value:d.data}):(se(o,{code:te.invalid_intersection_types}),xe)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([l,c])=>i(l,c)):i(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}Vi.create=(t,e,n)=>new Vi({left:t,right:e,typeName:we.ZodIntersection,...Ve(n)});class Gn extends Re{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.array)return se(o,{code:te.invalid_type,expected:le.array,received:o.parsedType}),xe;if(o.data.length<this._def.items.length)return se(o,{code:te.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),xe;!this._def.rest&&o.data.length>this._def.items.length&&(se(o,{code:te.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...o.data].map((l,c)=>{const d=this._def.items[c]||this._def.rest;return d?d._parse(new Mn(o,l,o.path,c)):null}).filter(l=>!!l);return o.common.async?Promise.all(i).then(l=>kt.mergeArray(n,l)):kt.mergeArray(n,i)}get items(){return this._def.items}rest(e){return new Gn({...this._def,rest:e})}}Gn.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Gn({items:t,typeName:we.ZodTuple,rest:null,...Ve(e)})};class Bi extends Re{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.object)return se(o,{code:te.invalid_type,expected:le.object,received:o.parsedType}),xe;const i=[],l=this._def.keyType,c=this._def.valueType;for(const d in o.data)i.push({key:l._parse(new Mn(o,d,o.path,d)),value:c._parse(new Mn(o,o.data[d],o.path,d)),alwaysSet:d in o.data});return o.common.async?kt.mergeObjectAsync(n,i):kt.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,o){return n instanceof Re?new Bi({keyType:e,valueType:n,typeName:we.ZodRecord,...Ve(o)}):new Bi({keyType:mn.create(),valueType:e,typeName:we.ZodRecord,...Ve(n)})}}class Ms extends Re{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.map)return se(o,{code:te.invalid_type,expected:le.map,received:o.parsedType}),xe;const i=this._def.keyType,l=this._def.valueType,c=[...o.data.entries()].map(([d,p],h)=>({key:i._parse(new Mn(o,d,o.path,[h,"key"])),value:l._parse(new Mn(o,p,o.path,[h,"value"]))}));if(o.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const p of c){const h=await p.key,m=await p.value;if(h.status==="aborted"||m.status==="aborted")return xe;(h.status==="dirty"||m.status==="dirty")&&n.dirty(),d.set(h.value,m.value)}return{status:n.value,value:d}})}else{const d=new Map;for(const p of c){const h=p.key,m=p.value;if(h.status==="aborted"||m.status==="aborted")return xe;(h.status==="dirty"||m.status==="dirty")&&n.dirty(),d.set(h.value,m.value)}return{status:n.value,value:d}}}}Ms.create=(t,e,n)=>new Ms({valueType:e,keyType:t,typeName:we.ZodMap,...Ve(n)});class qr extends Re{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.set)return se(o,{code:te.invalid_type,expected:le.set,received:o.parsedType}),xe;const i=this._def;i.minSize!==null&&o.data.size<i.minSize.value&&(se(o,{code:te.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&o.data.size>i.maxSize.value&&(se(o,{code:te.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const l=this._def.valueType;function c(p){const h=new Set;for(const m of p){if(m.status==="aborted")return xe;m.status==="dirty"&&n.dirty(),h.add(m.value)}return{status:n.value,value:h}}const d=[...o.data.values()].map((p,h)=>l._parse(new Mn(o,p,o.path,h)));return o.common.async?Promise.all(d).then(p=>c(p)):c(d)}min(e,n){return new qr({...this._def,minSize:{value:e,message:me.toString(n)}})}max(e,n){return new qr({...this._def,maxSize:{value:e,message:me.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}qr.create=(t,e)=>new qr({valueType:t,minSize:null,maxSize:null,typeName:we.ZodSet,...Ve(e)});class Eo extends Re{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==le.function)return se(n,{code:te.invalid_type,expected:le.function,received:n.parsedType}),xe;function o(d,p){return Rs({data:d,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ps(),xo].filter(h=>!!h),issueData:{code:te.invalid_arguments,argumentsError:p}})}function i(d,p){return Rs({data:d,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Ps(),xo].filter(h=>!!h),issueData:{code:te.invalid_return_type,returnTypeError:p}})}const l={errorMap:n.common.contextualErrorMap},c=n.data;if(this._def.returns instanceof To){const d=this;return Vt(async function(...p){const h=new jt([]),m=await d._def.args.parseAsync(p,l).catch(x=>{throw h.addIssue(o(p,x)),h}),y=await Reflect.apply(c,this,m);return await d._def.returns._def.type.parseAsync(y,l).catch(x=>{throw h.addIssue(i(y,x)),h})})}else{const d=this;return Vt(function(...p){const h=d._def.args.safeParse(p,l);if(!h.success)throw new jt([o(p,h.error)]);const m=Reflect.apply(c,this,h.data),y=d._def.returns.safeParse(m,l);if(!y.success)throw new jt([i(m,y.error)]);return y.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Eo({...this._def,args:Gn.create(e).rest(Hr.create())})}returns(e){return new Eo({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,o){return new Eo({args:e||Gn.create([]).rest(Hr.create()),returns:n||Hr.create(),typeName:we.ZodFunction,...Ve(o)})}}class Pi extends Re{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}Pi.create=(t,e)=>new Pi({getter:t,typeName:we.ZodLazy,...Ve(e)});class Ri extends Re{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return se(n,{received:n.data,code:te.invalid_literal,expected:this._def.value}),xe}return{status:"valid",value:e.data}}get value(){return this._def.value}}Ri.create=(t,e)=>new Ri({value:t,typeName:we.ZodLiteral,...Ve(e)});function Dp(t,e){return new xr({values:t,typeName:we.ZodEnum,...Ve(e)})}class xr extends Re{constructor(){super(...arguments),ki.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),o=this._def.values;return se(n,{expected:$e.joinValues(o),received:n.parsedType,code:te.invalid_type}),xe}if(Is(this,ki)||Ap(this,ki,new Set(this._def.values)),!Is(this,ki).has(e.data)){const n=this._getOrReturnCtx(e),o=this._def.values;return se(n,{received:n.data,code:te.invalid_enum_value,options:o}),xe}return Vt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return xr.create(e,{...this._def,...n})}exclude(e,n=this._def){return xr.create(this.options.filter(o=>!e.includes(o)),{...this._def,...n})}}ki=new WeakMap,xr.create=Dp;class Di extends Re{constructor(){super(...arguments),Si.set(this,void 0)}_parse(e){const n=$e.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==le.string&&o.parsedType!==le.number){const i=$e.objectValues(n);return se(o,{expected:$e.joinValues(i),received:o.parsedType,code:te.invalid_type}),xe}if(Is(this,Si)||Ap(this,Si,new Set($e.getValidEnumValues(this._def.values))),!Is(this,Si).has(e.data)){const i=$e.objectValues(n);return se(o,{received:o.data,code:te.invalid_enum_value,options:i}),xe}return Vt(e.data)}get enum(){return this._def.values}}Si=new WeakMap,Di.create=(t,e)=>new Di({values:t,typeName:we.ZodNativeEnum,...Ve(e)});class To extends Re{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==le.promise&&n.common.async===!1)return se(n,{code:te.invalid_type,expected:le.promise,received:n.parsedType}),xe;const o=n.parsedType===le.promise?n.data:Promise.resolve(n.data);return Vt(o.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}To.create=(t,e)=>new To({type:t,typeName:we.ZodPromise,...Ve(e)});class yn extends Re{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===we.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:o}=this._processInputParams(e),i=this._def.effect||null,l={addIssue:c=>{se(o,c),c.fatal?n.abort():n.dirty()},get path(){return o.path}};if(l.addIssue=l.addIssue.bind(l),i.type==="preprocess"){const c=i.transform(o.data,l);if(o.common.async)return Promise.resolve(c).then(async d=>{if(n.value==="aborted")return xe;const p=await this._def.schema._parseAsync({data:d,path:o.path,parent:o});return p.status==="aborted"?xe:p.status==="dirty"||n.value==="dirty"?Ds(p.value):p});{if(n.value==="aborted")return xe;const d=this._def.schema._parseSync({data:c,path:o.path,parent:o});return d.status==="aborted"?xe:d.status==="dirty"||n.value==="dirty"?Ds(d.value):d}}if(i.type==="refinement"){const c=d=>{const p=i.refinement(d,l);if(o.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return d};if(o.common.async===!1){const d=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return d.status==="aborted"?xe:(d.status==="dirty"&&n.dirty(),c(d.value),{status:n.value,value:d.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(d=>d.status==="aborted"?xe:(d.status==="dirty"&&n.dirty(),c(d.value).then(()=>({status:n.value,value:d.value}))))}if(i.type==="transform")if(o.common.async===!1){const c=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!bi(c))return c;const d=i.transform(c.value,l);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:d}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(c=>bi(c)?Promise.resolve(i.transform(c.value,l)).then(d=>({status:n.value,value:d})):c);$e.assertNever(i)}}yn.create=(t,e,n)=>new yn({schema:t,typeName:we.ZodEffects,effect:e,...Ve(n)}),yn.createWithPreprocess=(t,e,n)=>new yn({schema:e,effect:{type:"preprocess",transform:t},typeName:we.ZodEffects,...Ve(n)});class $n extends Re{_parse(e){return this._getType(e)===le.undefined?Vt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}$n.create=(t,e)=>new $n({innerType:t,typeName:we.ZodOptional,...Ve(e)});class kr extends Re{_parse(e){return this._getType(e)===le.null?Vt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}kr.create=(t,e)=>new kr({innerType:t,typeName:we.ZodNullable,...Ve(e)});class Ii extends Re{_parse(e){const{ctx:n}=this._processInputParams(e);let o=n.data;return n.parsedType===le.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ii.create=(t,e)=>new Ii({innerType:t,typeName:we.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ve(e)});class Fi extends Re{_parse(e){const{ctx:n}=this._processInputParams(e),o={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return xi(i)?i.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new jt(o.common.issues)},input:o.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new jt(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}Fi.create=(t,e)=>new Fi({innerType:t,typeName:we.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ve(e)});class Gs extends Re{_parse(e){if(this._getType(e)!==le.nan){const n=this._getOrReturnCtx(e);return se(n,{code:te.invalid_type,expected:le.nan,received:n.parsedType}),xe}return{status:"valid",value:e.data}}}Gs.create=t=>new Gs({typeName:we.ZodNaN,...Ve(t)});const VS=Symbol("zod_brand");class ql extends Re{_parse(e){const{ctx:n}=this._processInputParams(e),o=n.data;return this._def.type._parse({data:o,path:n.path,parent:n})}unwrap(){return this._def.type}}class Oi extends Re{_parse(e){const{status:n,ctx:o}=this._processInputParams(e);if(o.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?xe:i.status==="dirty"?(n.dirty(),Ds(i.value)):this._def.out._parseAsync({data:i.value,path:o.path,parent:o})})();{const i=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return i.status==="aborted"?xe:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:o.path,parent:o})}}static create(e,n){return new Oi({in:e,out:n,typeName:we.ZodPipeline})}}class Li extends Re{_parse(e){const n=this._def.innerType._parse(e),o=i=>(bi(i)&&(i.value=Object.freeze(i.value)),i);return xi(n)?n.then(i=>o(i)):o(n)}unwrap(){return this._def.innerType}}Li.create=(t,e)=>new Li({innerType:t,typeName:we.ZodReadonly,...Ve(e)});function Ip(t,e={},n){return t?ko.create().superRefine((o,i)=>{var l,c;if(!t(o)){const d=typeof e=="function"?e(o):typeof e=="string"?{message:e}:e,p=(c=(l=d.fatal)!==null&&l!==void 0?l:n)!==null&&c!==void 0?c:!0,h=typeof d=="string"?{message:d}:d;i.addIssue({code:"custom",...h,fatal:p})}}):ko.create()}const BS={object:rt.lazycreate};var we;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(we||(we={}));const PS=(t,e={message:`Input not instance of ${t.name}`})=>Ip(n=>n instanceof t,e),Fp=mn.create,Op=Cr.create,RS=Gs.create,DS=wr.create,Lp=Ei.create,IS=Wr.create,FS=Fs.create,OS=Ti.create,LS=Ni.create,MS=ko.create,GS=Hr.create,$S=Yn.create,zS=Os.create,US=gn.create,ZS=rt.create,jS=rt.strictCreate,WS=Ai.create,HS=Ls.create,qS=Vi.create,KS=Gn.create,XS=Bi.create,YS=Ms.create,JS=qr.create,QS=Eo.create,eE=Pi.create,tE=Ri.create,nE=xr.create,rE=Di.create,oE=To.create,Mp=yn.create,iE=$n.create,sE=kr.create,aE=yn.createWithPreprocess,lE=Oi.create;var zn=Object.freeze({__proto__:null,defaultErrorMap:xo,setErrorMap:hS,getErrorMap:Ps,makeIssue:Rs,EMPTY_PATH:fS,addIssueToContext:se,ParseStatus:kt,INVALID:xe,DIRTY:Ds,OK:Vt,isAborted:Zl,isDirty:jl,isValid:bi,isAsync:xi,get util(){return $e},get objectUtil(){return Ul},ZodParsedType:le,getParsedType:_r,ZodType:Re,datetimeRegex:Rp,ZodString:mn,ZodNumber:Cr,ZodBigInt:wr,ZodBoolean:Ei,ZodDate:Wr,ZodSymbol:Fs,ZodUndefined:Ti,ZodNull:Ni,ZodAny:ko,ZodUnknown:Hr,ZodNever:Yn,ZodVoid:Os,ZodArray:gn,ZodObject:rt,ZodUnion:Ai,ZodDiscriminatedUnion:Ls,ZodIntersection:Vi,ZodTuple:Gn,ZodRecord:Bi,ZodMap:Ms,ZodSet:qr,ZodFunction:Eo,ZodLazy:Pi,ZodLiteral:Ri,ZodEnum:xr,ZodNativeEnum:Di,ZodPromise:To,ZodEffects:yn,ZodTransformer:yn,ZodOptional:$n,ZodNullable:kr,ZodDefault:Ii,ZodCatch:Fi,ZodNaN:Gs,BRAND:VS,ZodBranded:ql,ZodPipeline:Oi,ZodReadonly:Li,custom:Ip,Schema:Re,ZodSchema:Re,late:BS,get ZodFirstPartyTypeKind(){return we},coerce:{string:t=>mn.create({...t,coerce:!0}),number:t=>Cr.create({...t,coerce:!0}),boolean:t=>Ei.create({...t,coerce:!0}),bigint:t=>wr.create({...t,coerce:!0}),date:t=>Wr.create({...t,coerce:!0})},any:MS,array:US,bigint:DS,boolean:Lp,date:IS,discriminatedUnion:HS,effect:Mp,enum:nE,function:QS,instanceof:PS,intersection:qS,lazy:eE,literal:tE,map:YS,nan:RS,nativeEnum:rE,never:$S,null:LS,nullable:sE,number:Op,object:ZS,oboolean:()=>Lp().optional(),onumber:()=>Op().optional(),optional:iE,ostring:()=>Fp().optional(),pipeline:lE,preprocess:aE,promise:oE,record:XS,set:JS,strictObject:jS,string:Fp,symbol:FS,transformer:Mp,tuple:KS,undefined:OS,union:WS,unknown:GS,void:zS,NEVER:xe,ZodIssueCode:te,quotelessJson:pS,ZodError:jt});function cE(t){throw new Error("Unexpected object: "+t)}const Gp="upload://upload/",$p="index://index/";function dE(t){return t.startsWith(Gp)}function uE(t){return t.startsWith($p)}function zp(t){if(uE(t)){const e=t.slice($p.length);return JSON.parse(decodeURIComponent(e)).path}else if(dE(t)){const e=t.slice(Gp.length);return JSON.parse(decodeURIComponent(e)).localPath}cE(t)}function pE(t){return t.replace(/^.*[\\/]/,"")}function hE(t){return pE(zp(t))}zn.object({__isRef:zn.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:zn.string().describe("Upstream block id"),name:zn.string().describe("Name of the output provided to the upstream block's output context")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").strict().readonly();const fE=zn.object({type:zn.string(),importance:zn.number().optional(),id:zn.string().optional(),label:zn.string()});zn.array(fE);const mE={key:0,ref:"label"},gE={key:0,class:"required-icon"},yE=["data-placeholder"],vE={key:5,class:"pl-file-input__stats"},_E={key:0,class:"pl-file-input__error"},CE={key:1,class:"pl-file-input__helper"},Up=r.defineComponent({__name:"PlFileInput",props:{modelValue:{},label:{default:void 0},required:{type:Boolean},dashed:{type:Boolean},extensions:{default:void 0},placeholder:{default:void 0},progress:{default:void 0},error:{default:void 0},helper:{default:void 0},cellStyle:{type:Boolean,default:!1},fileDialogTitle:{default:void 0},fileDialogCloseOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.reactive({fileDialogOpen:!1,error:""}),o=r.useSlots(),i=e,l=t,c=(F,D)=>{if(F)try{return D(F)}catch(A){return n.error=A instanceof Error?A.message:String(A),F}},d=r.computed(()=>c(l.modelValue,hE)),p=r.computed(()=>c(l.modelValue,zp)),h=r.computed(()=>l.progress&&!l.progress.done),m=r.computed(()=>l.progress&&l.progress.done),y=r.computed(()=>n.error??l.error),x=r.computed(()=>!!y.value),w=r.computed(()=>{const{status:F,done:D}=l.progress??{};return!F||!F.bytesTotal?"":F.bytesProcessed&&!D?xl(F.bytesProcessed,{})+" / "+xl(F.bytesTotal,{}):xl(F.bytesTotal,{})}),S=r.computed(()=>{var F;const{progress:D}=l;return D?{width:D.done?"100%":Math.round((((F=D.status)==null?void 0:F.progress)??0)*100)+"%"}:{}}),O=()=>{n.fileDialogOpen=!0},G=F=>{F.files.length&&i("update:modelValue",F.files[0])},b=()=>i("update:modelValue",void 0);r.watch(()=>l.modelValue,()=>{n.error=""},{immediate:!0});const R=r.ref();return l.cellStyle||Xn(R),(F,D)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[r.createElementVNode("div",{class:r.normalizeClass([{"pl-file-input__cell-style":!!F.cellStyle,"has-file":!!d.value},"pl-file-input__envelope"])},[r.createElementVNode("div",{ref_key:"rootRef",ref:R,class:r.normalizeClass(["pl-file-input",{dashed:F.dashed,error:x.value}]),tabindex:"0",onKeyup:r.withKeys(O,["enter"]),onClick:r.withModifiers(O,["stop"])},[r.createElementVNode("div",{class:"pl-file-input__progress",style:r.normalizeStyle(S.value)},null,4),D[3]||(D[3]=r.createTextVNode()),!F.cellStyle&&F.label?(r.openBlock(),r.createElementBlock("label",mE,[F.required?(r.openBlock(),r.createElementBlock("i",gE)):r.createCommentVNode("",!0),D[1]||(D[1]=r.createTextVNode()),r.createElementVNode("span",null,r.toDisplayString(F.label),1),D[2]||(D[2]=r.createTextVNode()),r.unref(o).tooltip||p.value?(r.openBlock(),r.createBlock(r.unref(xt),{key:1,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.unref(o).tooltip?r.renderSlot(F.$slots,"tooltip",{key:0}):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createTextVNode(r.toDisplayString(p.value),1)],64))]),_:3})):r.createCommentVNode("",!0)],512)):r.createCommentVNode("",!0),D[4]||(D[4]=r.createTextVNode()),x.value?(r.openBlock(),r.createBlock(r.unref(Lt),{key:1,name:"restart"})):h.value?(r.openBlock(),r.createBlock(r.unref(Lt),{key:2,name:"cloud-upload"})):m.value?(r.openBlock(),r.createBlock(r.unref(Lt),{key:3,name:"success"})):(r.openBlock(),r.createBlock(r.unref(Lt),{key:4,name:"paper-clip"})),D[5]||(D[5]=r.createTextVNode()),r.createElementVNode("div",{"data-placeholder":F.placeholder??"Choose file",class:"pl-file-input__filename"},r.toDisplayString(d.value),9,yE),D[6]||(D[6]=r.createTextVNode()),w.value?(r.openBlock(),r.createElementBlock("div",vE,r.toDisplayString(w.value),1)):r.createCommentVNode("",!0),D[7]||(D[7]=r.createTextVNode()),F.modelValue?(r.openBlock(),r.createBlock(r.unref(Lt),{key:6,name:"close",onClick:r.withModifiers(b,["stop"])})):r.createCommentVNode("",!0),D[8]||(D[8]=r.createTextVNode()),r.createVNode(vr,{class:"pl-file-input__contour"})],34),D[9]||(D[9]=r.createTextVNode()),x.value?(r.openBlock(),r.createElementBlock("div",_E,r.toDisplayString(y.value),1)):F.helper?(r.openBlock(),r.createElementBlock("div",CE,r.toDisplayString(F.helper),1)):r.createCommentVNode("",!0)],2),D[10]||(D[10]=r.createTextVNode()),r.createVNode(r.unref(Tp),{modelValue:n.fileDialogOpen,"onUpdate:modelValue":D[0]||(D[0]=A=>n.fileDialogOpen=A),extensions:F.extensions,title:F.fileDialogTitle,"close-on-outside-click":F.fileDialogCloseOnOutsideClick,"onImport:files":G},null,8,["modelValue","extensions","title","close-on-outside-click"])],64))}}),wE={class:"pl-notification-alert__wrapper d-flex"},bE={class:"pl-notification-alert__content flex-grow-1"},xE={key:0,class:"pl-notification-alert__close"},kE={key:0,class:"pl-notification-alert__actions d-flex"},Zp=r.defineComponent({__name:"PlNotificationAlert",props:r.mergeModels({type:{default:"neutral"},width:{default:"256px"},closable:{type:Boolean}},{modelValue:{type:Boolean,default:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=t,n=r.useModel(t,"modelValue");function o(){e.closable&&(n.value=!1)}return(i,l)=>n.value?(r.openBlock(),r.createElementBlock("div",{key:0,class:r.normalizeClass([i.type,"pl-notification-alert d-flex flex-column gap-16"]),style:r.normalizeStyle({width:`${i.width}`})},[r.createElementVNode("div",wE,[r.createElementVNode("div",bE,[r.renderSlot(i.$slots,"default")]),l[0]||(l[0]=r.createTextVNode()),i.closable?(r.openBlock(),r.createElementBlock("div",xE,[r.createVNode(r.unref(_o),{icon:"close",onClick:o})])):r.createCommentVNode("",!0)]),l[1]||(l[1]=r.createTextVNode()),i.$slots.actions?(r.openBlock(),r.createElementBlock("div",kE,[r.renderSlot(i.$slots,"actions")])):r.createCommentVNode("",!0)],6)):r.createCommentVNode("",!0)}}),SE=r.defineComponent({__name:"ContextProvider",props:{context:{},contextKey:{}},setup(t){const e=t;return r.provide(e.contextKey,r.computed(()=>e.context)),(n,o)=>r.renderSlot(n.$slots,"default")}});function St(t,e,n){return e>t?e:t>n?n:t}const Kl=t=>r.computed(()=>{const e=[100],{min:n,max:o,step:i}=t.value;let l=n;for(;l<o;){l+=i;const c=(1-(St(l,n,o)-n)/(o-n))*100;e.push(c)}return e}),EE={class:"ui-slider__wrapper"},TE={class:"ui-slider__label-section"},NE={key:0,class:"text-s"},AE={key:1,class:"ui-slider__value-static text-s"},VE={class:"ui-slider__base"},BE={class:"ui-slider__container"},PE={class:"ui-slider__container ui-slider__container-thumb"},RE={class:"ui-slider__input-wrapper d-flex"},DE=["value"],IE={key:0,class:"ui-slider__error"},jp=r.defineComponent({__name:"Slider",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:""},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,i=t,l=r.reactive({deltaValue:0}),c=r.computed(()=>i.max-i.min),d=r.computed(()=>St((i.modelValue??0)+l.deltaValue,i.min,i.max)),p=r.ref(i.modelValue),h=r.computed(()=>{const A=i.modelValue;return Number.isFinite(A)?A<i.min?`Min value: ${i.min}`:A>i.max?`Max value: ${i.max}`:i.error:"Not a number"}),m=r.computed(()=>i),y=Kl(m),x=r.computed(()=>(d.value-i.min)/c.value),w=r.computed(()=>({right:Math.ceil((1-x.value)*100)+"%"})),S=r.computed(()=>({right:`calc(${Math.ceil((1-x.value)*100)}%) `})),O=r.ref(),G=r.ref();r.watch(()=>i.modelValue,A=>{p.value=A});function b(A){const U=St(A,i.min,i.max);return Math.round((U+Number.EPSILON)*(1/i.step))/(1/i.step)}gr(G,A=>{var U;ut((U=r.unref(O))==null?void 0:U.getBoundingClientRect(),j=>{const{dx:$}=A;l.deltaValue=$/j.width*c.value,p.value=b(St((i.modelValue??0)+l.deltaValue,i.min,i.max)),A.stop&&(o("update:modelValue",b(d.value)),l.deltaValue=0)})});function R(A){o("update:modelValue",b(A))}function F(A){R(+A.target.value)}function D(A){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(A.code)&&A.preventDefault();const U=A.code==="ArrowUp"||A.code==="ArrowRight"?i.step*1:A.code==="ArrowDown"||A.code==="ArrowLeft"?i.step*-1:0;R(i.modelValue+U)}return(A,U)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([i.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${i.mode}`,"ui-slider"])},[r.createElementVNode("div",EE,[r.createElementVNode("div",TE,[A.label?(r.openBlock(),r.createElementBlock("label",NE,[r.createElementVNode("span",null,r.toDisplayString(A.label),1),U[1]||(U[1]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(A.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),U[2]||(U[2]=r.createTextVNode()),i.mode==="text"?(r.openBlock(),r.createElementBlock("div",AE,r.toDisplayString(p.value)+r.toDisplayString(A.measure),1)):r.createCommentVNode("",!0)]),U[6]||(U[6]=r.createTextVNode()),r.createElementVNode("div",VE,[r.createElementVNode("div",BE,[r.createElementVNode("div",{ref_key:"barRef",ref:O,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(w.value)},null,4)],512)]),U[5]||(U[5]=r.createTextVNode()),r.createElementVNode("div",PE,[i.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(y),(j,$)=>(r.openBlock(),r.createElementBlock("div",{key:$,style:r.normalizeStyle({right:`${j}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),U[4]||(U[4]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef",ref:G,tabindex:"0",class:"ui-slider__thumb ui-slider__thumb-active",style:r.normalizeStyle(S.value),onKeydown:D},U[3]||(U[3]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),U[7]||(U[7]=r.createTextVNode()),r.createElementVNode("div",RE,[i.mode==="input"?(r.openBlock(),r.createElementBlock("input",{key:0,value:p.value,class:"ui-slider__value text-s",onChange:U[0]||(U[0]=j=>F(j))},null,40,DE)):r.createCommentVNode("",!0)])],2),U[8]||(U[8]=r.createTextVNode()),h.value?(r.openBlock(),r.createElementBlock("div",IE,r.toDisplayString(h.value),1)):r.createCommentVNode("",!0)],2))}});function FE(t,e=null,n=null){function o(d){const{scrollTop:p,scrollHeight:h,clientHeight:m}=d;if(!(h>m)||!e)return null;const y=h-p-m,x=p>e?e:0,w=y>e?m-e-x:m;return`linear-gradient(
|
|
54
54
|
to bottom,
|
|
55
55
|
transparent,
|
|
56
|
-
black ${
|
|
57
|
-
black ${
|
|
56
|
+
black ${x}px,
|
|
57
|
+
black ${w}px,
|
|
58
58
|
transparent 100%
|
|
59
|
-
)`}function
|
|
59
|
+
)`}function i(d){const{scrollLeft:p,scrollWidth:h,clientWidth:m}=d;if(!(h>m)||!n)return null;const y=h-p-m,x=p>n?n:0,w=y>n?m-n-x:m;return`linear-gradient(
|
|
60
60
|
to right,
|
|
61
61
|
transparent,
|
|
62
|
-
black ${
|
|
63
|
-
black ${
|
|
62
|
+
black ${x}px,
|
|
63
|
+
black ${w}px,
|
|
64
64
|
transparent 100%
|
|
65
|
-
)`}function l(){const u=t.value;if(!u)return;const p=[o(u),s(u)].filter(f=>f!==null);u.style.setProperty("-webkit-mask-image",p.join(",")),u.style.setProperty("mask-image",p.join(",")),p.length>1&&(u.style.setProperty("-webkit-mask-composite","source-in"),u.style.setProperty("mask-composite","source-in"))}const c=pl(l);r.onMounted(l),rt(window,"scroll",c,!0),rt(window,"resize",c,!0)}function fp(t,e){Au(()=>{ct(r.unref(t),n=>{Pu(n,()=>e(n))})}),r.onUnmounted(()=>{ct(r.unref(t),n=>{Du(n)})})}const Cr={item:"sortable__item",animate:"sortable__animate"},Ri=t=>t.getBoundingClientRect().y,mp=t=>{const{y:e,height:n}=t.getBoundingClientRect();return e+Math.ceil(n/2)},VS=t=>{const{y:e,height:n}=t.getBoundingClientRect();return e+n};function gp(t,e){const n={item:void 0,options(){var B;return[...((B=t.value)==null?void 0:B.children)??[]]}},o=r.computed(()=>n.options()),s=e.shakeBuffer??10,l=e.reorderDelay??100;function c(B){const A=e.handle?this.querySelector(e.handle):null;A&&(A&&!A.contains(B.target)||(this.classList.remove(Cr.animate),this.classList.add(Cr.item),n.item={el:this,y:B.y,dy:0,orderChanged:!1}))}function u(B){const A=n.options();return A.slice(0,A.indexOf(B))}function p(B){const A=n.options();return A.slice(A.indexOf(B)+1)}function f(B,A){const I=n.options().filter(C=>C!==A),L=I.indexOf(B);return I.splice(L,0,A),I}function m(B,A){const I=n.options().filter(C=>C!==A),L=I.indexOf(B);return I.splice(L+1,0,A),I}function y(B,A){B.dy=A-B.y,B.el.style.setProperty("transform",`translateY(${B.dy}px)`)}function T(B){var A;if(!n.item)return;const{el:I}=n.item;if(!I.isConnected){n.item=void 0;return}const L=B.map(U=>Ri(U)),C=Ri(I);(A=t.value)==null||A.replaceChildren(...B);const R=Ri(I),O=B.map(U=>Ri(U)),F=[];for(let U=0;U<O.length;U++){const te=B[U];if(te===n.item.el)continue;const j=O[U],Y=L[U]-j;te.style.transform=`translateY(${Y}px)`,F.push(te)}const N=R-C;n.item.y=n.item.y+N,n.item.dy=n.item.dy-N,n.item.orderChanged=!0,n.item.el.style.setProperty("transform",`translateY(${n.item.dy}px)`),F.forEach(U=>U.classList.remove(Cr.animate)),requestAnimationFrame(function(){F.forEach(U=>{U.classList.add(Cr.animate),U.style.transform="",U.addEventListener("transitionend",()=>{U.classList.remove(Cr.animate)})})})}rt(window,"mousemove",B=>{if(!n.item)return;const{el:A}=n.item;y(n.item,B.y);const I=Ri(n.item.el),L=VS(n.item.el),C=u(A),R=p(A);C.forEach(O=>{const F=mp(O);I+s<F&&T(f(O,A))}),R.forEach(O=>{const F=mp(O);L-s>F&&T(m(O,A))})}),rt(window,"mouseup",()=>{if(!n.item)return;const{el:B,orderChanged:A}=n.item;B.classList.add(Cr.animate),B.style.removeProperty("transform"),B.addEventListener("transitionend",()=>{B.classList.remove(Cr.animate,Cr.item)}),setTimeout(()=>{if(!A)return;const I=n.options().map(C=>Number(C.getAttribute("data-index"))),L=t.value;if(L){for(const C of n.options())L.removeChild(C);o.value.forEach(C=>{L.appendChild(C)})}e.onChange(I)},l),n.item=void 0}),r.watchEffect(()=>{o.value.forEach((B,A)=>{B.removeEventListener("mousedown",c),B.addEventListener("mousedown",c),B.setAttribute("data-index",String(A))})})}function NS(t,e){let n;r.onMounted(()=>{n=setInterval(t,e)}),r.onUnmounted(()=>clearInterval(n))}function AS(t,e,n){const o=r.reactive({data:sl.deepClone(e(t.value)),changed:!1});return r.watch(()=>o.data,s=>{o.changed?n(sl.deepClone(s)):o.changed=!0},{deep:!0}),r.watch(t,s=>{Object.assign(o,{data:sl.deepClone(e(s)),changed:!1})},{deep:!0,immediate:!0}),o}function PS(t){const e=r.reactive({isLoading:!1,result:void 0,error:void 0,async run(...n){this.isLoading=!0,this.error=void 0;try{this.result=await t(...n)}catch(o){this.error=o}finally{this.isLoading=!1}},debounce(n,o=1e3){return rv(()=>{const s=n();this.run(...s).catch(console.error)},o)}});return e.run=e.run.bind(e),e}function DS(t,e){function n(c,u){const p=r.unref(t);if(!p)return;const f=`translate(${u.x-c.x}px, ${u.y-c.y}px)`;p.style.setProperty("transform",f),e(u)}function o(c){const u=p=>n(c,p);document.addEventListener("mousemove",u),document.addEventListener("mouseup",()=>{const p=r.unref(t);document.removeEventListener("mousemove",u),p&&(p.style.setProperty("transition","all .3s ease-in-out"),p.style.removeProperty("transform"),p.addEventListener("transitionend",()=>{p.style.removeProperty("transition")}))},{once:!0})}function s(){var c;(c=r.unref(t))==null||c.addEventListener("mousedown",o)}function l(){var c;(c=r.unref(t))==null||c.removeEventListener("mousedown",o)}r.onMounted(s),r.onUnmounted(l)}const FS={class:"ui-slider__wrapper"},RS={class:"ui-slider__label-section"},MS={key:0,class:"text-s"},IS={class:"ui-slider__base"},OS={class:"ui-slider__container"},LS={class:"ui-slider__container ui-slider__container-thumb"},GS=["data-percent"],zS=["data-percent"],$S=["data-percent"],US={key:0,class:"ui-slider__error"},ZS=r.defineComponent({__name:"SliderRangeTriple",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:"%"},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,s=t,l=r.reactive({deltaValue1:0,deltaValue2:0,deltaValue3:0}),c=r.ref(),u=r.ref(),p=r.ref(),f=r.ref(),m=r.computed(()=>s.max-s.min),y=r.computed(()=>s),T=Fl(y),B=r.computed(()=>bt((s.modelValue[0]??0)+l.deltaValue1,s.min,s.max)),A=r.computed(()=>bt((s.modelValue[1]??0)+l.deltaValue2,s.min,s.max)),I=r.computed(()=>bt((s.modelValue[2]??0)+l.deltaValue3,s.min,s.max)),L=r.computed(()=>{const k=s.modelValue;if(!(Array.isArray(k)&&k.length===3&&k.every(Q=>Number.isFinite(Q))))return"Expected model [number, number, number]";const $=[];return[...s.modelValue].forEach(Q=>{Q>s.max&&$.push(`Max model value must be lower than max props ${s.max}.`),Q<s.min&&$.push("Min model value must be greater than max props.")}),$.length>0?$.join(" "):s.error}),C=r.computed(()=>(B.value-s.min)/m.value),R=r.computed(()=>(A.value-s.min)/m.value),O=r.computed(()=>(I.value-s.min)/m.value),F=r.computed(()=>q()),N=r.computed(()=>({right:F.value[0]+"%",left:100-F.value[2]+"%"})),U=r.computed(()=>({right:Math.ceil((1-C.value)*100)+"%"})),te=r.computed(()=>({right:Math.ceil((1-R.value)*100)+"%"})),j=r.computed(()=>({right:Math.ceil((1-O.value)*100)+"%"}));ur(u,k=>{var $;ct(($=r.unref(c))==null?void 0:$.getBoundingClientRect(),Q=>{const{dx:ne}=k;l.deltaValue1=ne/Q.width*m.value,u.value&&Y(u.value,s.modelValue[0],l.deltaValue1),k.stop&&(G([ee(B.value),ee(A.value),ee(I.value)]),l.deltaValue1=0)})}),ur(p,k=>{var $;ct(($=r.unref(c))==null?void 0:$.getBoundingClientRect(),Q=>{const{dx:ne}=k;l.deltaValue2=ne/Q.width*m.value,p.value&&Y(p.value,s.modelValue[1],l.deltaValue2),k.stop&&(G([ee(B.value),ee(A.value),ee(I.value)]),l.deltaValue2=0)})}),ur(f,k=>{var $;ct(($=r.unref(c))==null?void 0:$.getBoundingClientRect(),Q=>{const{dx:ne}=k;l.deltaValue3=ne/Q.width*m.value,f.value&&Y(f.value,s.modelValue[2],l.deltaValue3),k.stop&&(G([ee(B.value),ee(A.value),ee(I.value)]),l.deltaValue3=0)})});function Y(k,$,Q){const ne=ee(bt(($??0)+Q,s.min,s.max));k.dataset.percent=`${ne}${s.measure}`,S()}function q(){const k=Math.ceil((1-C.value)*100),$=Math.ceil((1-R.value)*100),Q=Math.ceil((1-O.value)*100);return[k,$,Q].sort((ne,be)=>ne-be)}function ee(k){const $=bt(k,s.min,s.max);return Math.round(($+Number.EPSILON)*(1/s.step))/(1/s.step)}function G(k){o("update:modelValue",k)}function S(){const k=Number(U.value.right.substring(0,U.value.right.length-1)),$=Number(te.value.right.substring(0,te.value.right.length-1)),Q=Number(j.value.right.substring(0,j.value.right.length-1)),ne=[{r:k,th:u},{r:$,th:p},{r:Q,th:f}].sort((be,$e)=>be.r-$e.r);ne[0].th.value&&(ne[0].th.value.dataset.hint="high"),ne[1].th.value&&(ne[1].th.value.dataset.hint="mid"),ne[2].th.value&&(ne[2].th.value.dataset.hint="low")}function w(k,$){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(k.code)&&k.preventDefault();const Q=k.code==="ArrowUp"||k.code==="ArrowRight"?s.step*1:k.code==="ArrowDown"||k.code==="ArrowLeft"?s.step*-1:0,ne=[...s.modelValue];ne[$]=bt(ne[$]+Q,s.min,s.max),G(ne),S()}return r.onMounted(()=>{S()}),(k,$)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([s.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope ui-slider__triple"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${s.mode}`,"ui-slider"])},[r.createElementVNode("div",FS,[r.createElementVNode("div",RS,[k.label?(r.openBlock(),r.createElementBlock("label",MS,[r.createElementVNode("span",null,r.toDisplayString(k.label),1),$[3]||($[3]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(Ct),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(k.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)]),$[11]||($[11]=r.createTextVNode()),r.createElementVNode("div",IS,[r.createElementVNode("div",OS,[r.createElementVNode("div",{ref_key:"barRef",ref:c,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(N.value)},null,4)],512)]),$[10]||($[10]=r.createTextVNode()),r.createElementVNode("div",LS,[s.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(T),(Q,ne)=>(r.openBlock(),r.createElementBlock("div",{key:ne,style:r.normalizeStyle({right:`${Q}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),$[7]||($[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef1",ref:u,style:r.normalizeStyle(U.value),"data-percent":s.modelValue[0]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r1:"",tabindex:"0",onKeydown:$[0]||($[0]=Q=>w(Q,0))},$[4]||($[4]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,GS),$[8]||($[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef2",ref:p,style:r.normalizeStyle(te.value),"data-percent":s.modelValue[1]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r2:"",tabindex:"0",onKeydown:$[1]||($[1]=Q=>w(Q,1))},$[5]||($[5]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,zS),$[9]||($[9]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef3",ref:f,style:r.normalizeStyle(j.value),"data-percent":s.modelValue[2]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r3:"",tabindex:"0",onKeydown:$[2]||($[2]=Q=>w(Q,2))},$[6]||($[6]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,$S)])])]),$[12]||($[12]=r.createTextVNode()),$[13]||($[13]=r.createElementVNode("div",{class:"ui-slider__input-wrapper d-flex"},null,-1))],2),$[14]||($[14]=r.createTextVNode()),L.value?(r.openBlock(),r.createElementBlock("div",US,r.toDisplayString(L.value),1)):r.createCommentVNode("",!0)],2))}}),WS={class:"ui-input-range__separator"},HS=r.defineComponent({__name:"InputRange",props:{modelValue:{},separator:{default:"-"}},emits:["update:modelValue","change"],setup(t,{emit:e}){const n=t,o=e,s=r.reactive({left:n.modelValue[0],right:n.modelValue[1]}),l=r.ref(!1),c=r.computed(()=>(l.value,"ui-input-range-focused")),u=r.computed({get(){return{left:Math.min(...n.modelValue),right:Math.max(...n.modelValue)}},set(){}});r.watch(()=>u.value,m=>(s.left=m.left)&&(s.right=m.right));function p(){o("update:modelValue",[+s.left,+s.right]),o("change",[+s.left,+s.right])}function f(m,y){const T=y.target.value;/^[0-9]{0,2}$/.test(T)?m?s.left=+T:s.right=+T:m?s.left=+T.slice(0,T.length-1):s.right=+T.slice(0,T.length-1)}return(m,y)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({class:[c.value,"ui-input-range"]},m.$attrs),[r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":y[0]||(y[0]=T=>u.value.left=T),class:"text-s",type:"text",onChange:p,onFocus:y[1]||(y[1]=T=>l.value=!0),onFocusout:y[2]||(y[2]=T=>l.value=!1),onInput:y[3]||(y[3]=T=>f(!0,T))},null,544),[[r.vModelText,u.value.left]]),y[8]||(y[8]=r.createTextVNode()),r.createElementVNode("div",WS,r.toDisplayString(n.separator),1),y[9]||(y[9]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":y[4]||(y[4]=T=>u.value.right=T),class:"text-s",type:"text",onChange:p,onFocus:y[5]||(y[5]=T=>l.value=!0),onFocusout:y[6]||(y[6]=T=>l.value=!1),onInput:y[7]||(y[7]=T=>f(!1,T))},null,544),[[r.vModelText,u.value.right]])],16))}}),jS={class:"ui-slider__wrapper"},qS={class:"ui-slider__label-section"},KS={key:0,class:"text-s"},YS={key:1,class:"ui-slider__value-static text-s"},JS={class:"ui-slider__base"},XS={class:"ui-slider__container"},QS={class:"ui-slider__container ui-slider__container-thumb"},e1={class:"ui-slider__input-wrapper d-flex"},t1={key:0,class:"ui-slider__error"},n1=r.defineComponent({__name:"SliderRange",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:""},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,s=t,l=r.reactive({deltaValue1:0,deltaValue2:0}),c=r.ref(),u=r.ref(),p=r.ref(),f=r.ref(s.modelValue),m=r.ref(s.modelValue[0]),y=r.ref(s.modelValue[1]),T=r.computed(()=>s),B=Fl(T),A=r.computed(()=>[m.value,y.value].sort((S,w)=>S-w).join("-")),I=r.computed(()=>s.max-s.min),L=r.computed(()=>bt((s.modelValue[0]??0)+l.deltaValue1,s.min,s.max)),C=r.computed(()=>bt((s.modelValue[1]??0)+l.deltaValue2,s.min,s.max)),R=r.computed(()=>{const S=s.modelValue;return Array.isArray(S)&&S.length===2&&S.every(w=>Number.isFinite(w))?s.error:"Expected model [number, number]"}),O=r.computed(()=>(L.value-s.min)/I.value),F=r.computed(()=>(C.value-s.min)/I.value),N=r.computed(()=>Y()),U=r.computed(()=>({right:N.value[0]+"%",left:100-N.value[1]+"%"})),te=r.computed(()=>({right:Math.ceil((1-O.value)*100)+"%"})),j=r.computed(()=>({right:Math.ceil((1-F.value)*100)+"%"}));r.watch(()=>s.modelValue,S=>{f.value=S,m.value=+S[0],y.value=+S[1]},{immediate:!0}),ur(u,S=>{var w;ct((w=r.unref(c))==null?void 0:w.getBoundingClientRect(),k=>{const{dx:$}=S;l.deltaValue1=$/k.width*I.value,m.value=q(bt((s.modelValue[0]??0)+l.deltaValue1,s.min,s.max)),f.value=[m.value,y.value].sort((Q,ne)=>Q-ne),S.stop&&(ee([q(L.value),q(C.value)]),l.deltaValue1=0)})}),ur(p,S=>{var w;ct((w=r.unref(c))==null?void 0:w.getBoundingClientRect(),k=>{const{dx:$}=S;l.deltaValue2=$/k.width*I.value,y.value=q(bt((s.modelValue[1]??0)+l.deltaValue2,s.min,s.max)),f.value=[m.value,y.value].sort((Q,ne)=>Q-ne),S.stop&&(ee([q(L.value),q(C.value)]),l.deltaValue2=0)})});function Y(){const S=Math.ceil((1-O.value)*100),w=Math.ceil((1-F.value)*100);return[S,w].sort((k,$)=>k-$)}function q(S){const w=bt(S,s.min,s.max);return Math.round((w+Number.EPSILON)*(1/s.step))/(1/s.step)}function ee(S){o("update:modelValue",S)}function G(S,w){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(S.code)&&S.preventDefault();const k=S.code==="ArrowUp"||S.code==="ArrowRight"?s.step*1:S.code==="ArrowDown"||S.code==="ArrowLeft"?s.step*-1:0,$=[...s.modelValue];$[w]=bt($[w]+k,s.min,s.max),ee($)}return(S,w)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([s.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${s.mode}`,"ui-slider"])},[r.createElementVNode("div",jS,[r.createElementVNode("div",qS,[S.label?(r.openBlock(),r.createElementBlock("label",KS,[r.createElementVNode("span",null,r.toDisplayString(S.label),1),w[3]||(w[3]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(Ct),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(S.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),w[4]||(w[4]=r.createTextVNode()),s.mode==="text"?(r.openBlock(),r.createElementBlock("div",YS,r.toDisplayString(A.value),1)):r.createCommentVNode("",!0)]),w[10]||(w[10]=r.createTextVNode()),r.createElementVNode("div",JS,[r.createElementVNode("div",XS,[r.createElementVNode("div",{ref_key:"barRef",ref:c,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(U.value)},null,4)],512)]),w[9]||(w[9]=r.createTextVNode()),r.createElementVNode("div",QS,[s.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(B),(k,$)=>(r.openBlock(),r.createElementBlock("div",{key:$,style:r.normalizeStyle({right:`${k}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),w[7]||(w[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef1",ref:u,style:r.normalizeStyle(te.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:w[0]||(w[0]=k=>G(k,0))},w[5]||(w[5]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36),w[8]||(w[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef2",ref:p,style:r.normalizeStyle(j.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:w[1]||(w[1]=k=>G(k,1))},w[6]||(w[6]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),w[11]||(w[11]=r.createTextVNode()),r.createElementVNode("div",e1,[s.mode==="input"?(r.openBlock(),r.createBlock(HS,{key:0,modelValue:f.value,"onUpdate:modelValue":w[2]||(w[2]=k=>f.value=k),class:"ui-focused-border",onChange:ee},null,8,["modelValue"])):r.createCommentVNode("",!0)])],2),w[12]||(w[12]=r.createTextVNode()),R.value?(r.openBlock(),r.createElementBlock("div",t1,r.toDisplayString(R.value),1)):r.createCommentVNode("",!0)],2))}}),r1=r.defineComponent({__name:"VScroll",props:{scrollTop:{},clientHeight:{},scrollHeight:{}},emits:["update:scrollTop"],setup(t,{emit:e}){const n=e,o=t,s=r.ref(),l=r.computed(()=>o.clientHeight/(o.scrollHeight||1)),c=r.computed(()=>l.value<1),u=r.computed(()=>{const p=r.unref(l);return{top:o.scrollTop*p+"px",height:Math.floor(o.clientHeight*p)+"px"}});return rt(s,"pointerdown",p=>{const f={clientY:p.clientY},m=bl(document,"mousemove",y=>{const T=(y.clientY-f.clientY)/l.value;n("update:scrollTop",o.scrollTop+T),f.clientY=y.clientY});["mouseup","pointercancel"].forEach(y=>{document.addEventListener(y,m,{once:!0})})}),(p,f)=>c.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:s,class:"v-scroll"},[r.createElementVNode("div",{class:"v-scroll__scrollbar",style:r.normalizeStyle(u.value)},null,4)],512)):r.createCommentVNode("",!0)}}),o1=r.defineComponent({__name:"HScroll",props:{scrollLeft:{},clientWidth:{},scrollWidth:{}},emits:["update:scrollLeft"],setup(t,{emit:e}){const n=e,o=t,s=r.ref(),l=r.computed(()=>o.clientWidth/(o.scrollWidth||1)),c=r.computed(()=>l.value<1),u=r.computed(()=>{const p=r.unref(l);return{left:o.scrollLeft*p+"px",width:Math.floor(o.clientWidth*p)+"px"}});return rt(s,"pointerdown",p=>{const f={clientX:p.clientX},m=bl(document,"mousemove",y=>{const T=(y.clientX-f.clientX)/l.value;n("update:scrollLeft",o.scrollLeft+T),f.clientX=y.clientX});["mouseup","pointercancel"].forEach(y=>{document.addEventListener(y,m,{once:!0})})}),(p,f)=>c.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:s,class:"h-scroll"},[r.createElementVNode("div",{class:"h-scroll__scrollbar",style:r.normalizeStyle(u.value)},null,4)],512)):r.createCommentVNode("",!0)}}),i1={class:"ui-scrollable"},s1=r.defineComponent({__name:"Scrollable",setup(t){const e=r.ref(),n=r.reactive({scrollTop:0,scrollLeft:0,clientHeight:0,clientWidth:0,scrollHeight:0,scrollWidth:0});function o(u){c0(n,u,"scrollTop","scrollLeft","clientHeight","clientWidth","scrollHeight","scrollWidth")}const s=u=>{u.preventDefault();const p=u.currentTarget;p.scrollTop+=u.deltaY,p.scrollLeft+=u.deltaX,o(p)};function l(u){ct(r.unref(e),p=>{p.scrollTop=u,o(p)})}function c(u){ct(r.unref(e),p=>{p.scrollLeft=u,o(p)})}return fp(e,u=>{ct(u,p=>o(p))}),r.onMounted(()=>{ct(r.unref(e),u=>{o(u),u.addEventListener("wheel",s)})}),r.onUnmounted(()=>{ct(r.unref(e),u=>u.removeEventListener("wheel",s))}),(u,p)=>(r.openBlock(),r.createElementBlock("div",i1,[r.createElementVNode("div",{ref_key:"containerRef",ref:e,class:"ui-scrollable__container",onWheel:s},[r.renderSlot(u.$slots,"default")],544),p[2]||(p[2]=r.createTextVNode()),r.createVNode(r1,{"scroll-top":n.scrollTop,"client-height":n.clientHeight,"scroll-height":n.scrollHeight,onWheel:p[0]||(p[0]=r.withModifiers(()=>{},["stop"])),"onUpdate:scrollTop":l},null,8,["scroll-top","client-height","scroll-height"]),p[3]||(p[3]=r.createTextVNode()),r.createVNode(o1,{"scroll-left":n.scrollLeft,"client-width":n.clientWidth,"scroll-width":n.scrollWidth,onWheel:p[1]||(p[1]=r.withModifiers(()=>{},["stop"])),"onUpdate:scrollLeft":c},null,8,["scroll-left","client-width","scroll-width"])]))}}),a1="add.svg",l1="box.svg",c1="calendar.svg",d1="checkmark.svg",u1="clipboard.svg",p1="close.svg",h1="copy.svg",f1="download.svg",m1="duplicate.svg",g1="edit.svg",y1="error.svg",_1="filter.svg",v1="help.svg",C1="info.svg",w1="link.svg",b1="loading.svg",x1="lock.svg",k1="maximize.svg",S1="minimize.svg",E1="minus.svg",T1="more.svg",B1="open.svg",V1="pause.svg",N1="play.svg",A1="renew.svg",P1="restart.svg",D1="reverse.svg",F1="settings.svg",R1="sort.svg",M1="stop.svg",I1="success.svg",O1="time.svg",L1="tune.svg",G1="warning.svg",z1="zip.svg",$1={add:a1,"arrow-down":"arrow-down.svg","arrow-left":"arrow-left.svg","arrow-link":"arrow-link.svg","arrow-right":"arrow-right.svg","arrow-up":"arrow-up.svg",box:l1,calendar:c1,"caret-down":"caret-down.svg","caret-left":"caret-left.svg","caret-right":"caret-right.svg","caret-up":"caret-up.svg","cell-type-num":"cell-type-num.svg","cell-type-txt":"cell-type-txt.svg",checkmark:d1,"chevron-down":"chevron-down.svg","chevron-first":"chevron-first.svg","chevron-last":"chevron-last.svg","chevron-left":"chevron-left.svg","chevron-right":"chevron-right.svg","chevron-up":"chevron-up.svg","clipboard-copied":"clipboard-copied.svg",clipboard:u1,close:p1,copy:h1,"data-dimentions":"data-dimentions.svg","delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg",download:f1,"drag-dots":"drag-dots.svg",duplicate:m1,edit:g1,error:y1,export:"export.svg","filter-on":"filter-on.svg",filter:_1,"help-outline":"help-outline.svg",help:v1,"info-outline":"info-outline.svg",info:C1,"jump-link":"jump-link.svg",link:w1,loading:b1,lock:x1,maximize:k1,minimize:S1,minus:E1,more:T1,open:B1,"paper-clip":"paper-clip.svg",pause:V1,play:N1,renew:A1,restart:P1,reverse:D1,settings:F1,sort:R1,stop:M1,success:I1,time:O1,tune:L1,warning:G1,"x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:z1},U1="add.svg",Z1="annotate.svg",W1="annotation.svg",H1="area.svg",j1="axes.svg",q1="bar.svg",K1="bindot.svg",Y1="box.svg",J1="boxplot.svg",X1="bubble.svg",Q1="calendar.svg",eE="canvas.svg",tE="checkbox.svg",nE="checkmark.svg",rE="clipboard.svg",oE="close.svg",iE="cluster.svg",sE="code.svg",aE="color.svg",lE="columns.svg",cE="container.svg",dE="cookie.svg",uE="copy.svg",pE="cpu.svg",hE="debug.svg",fE="dna.svg",mE="download.svg",gE="duplicate.svg",yE="edit.svg",_E="error.svg",vE="filter.svg",CE="generate.svg",wE="graph.svg",bE="heatmap.svg",xE="help.svg",kE="info.svg",SE="jitter.svg",EE="lasso.svg",TE="layers.svg",BE="learn.svg",VE="legend.svg",NE="line.svg",AE="link.svg",PE="loading.svg",DE="lock.svg",FE="maximize.svg",RE="menu.svg",ME="minimize.svg",IE="minus.svg",OE="more.svg",LE="pause.svg",GE="pin.svg",zE="play.svg",$E="product.svg",UE="publications.svg",ZE="renew.svg",WE="restart.svg",HE="reverse.svg",jE="search.svg",qE="server.svg",KE="settings.svg",YE="sina.svg",JE="skatterplot.svg",XE="slice.svg",QE="sort.svg",eT="statistics.svg",tT="stop.svg",nT="success.svg",rT="table.svg",oT="template.svg",iT="terminal.svg",sT="time.svg",aT="tune.svg",lT="venn.svg",cT="violin.svg",dT="warning.svg",uT="wetlab.svg",pT="zip.svg",hT={"add-layer":"add-layer.svg",add:U1,"align-center":"align-center.svg","align-left":"align-left.svg","align-right":"align-right.svg",annotate:Z1,annotation:W1,area:H1,"arrow-down":"arrow-down.svg","arrow-left":"arrow-left.svg","arrow-link":"arrow-link.svg","arrow-right":"arrow-right.svg","arrow-up":"arrow-up.svg",axes:j1,"bar-cross":"bar-cross.svg","bar-error":"bar-error.svg","bar-stacked":"bar-stacked.svg","bar-trend":"bar-trend.svg",bar:q1,bindot:K1,box:Y1,"boxplot-binned":"boxplot-binned.svg","boxplot-jitter":"boxplot-jitter.svg","boxplot-notched":"boxplot-notched.svg",boxplot:J1,bubble:X1,calendar:Q1,canvas:eE,"cell-type-num":"cell-type-num.svg","cell-type-txt":"cell-type-txt.svg","checkbox-checked":"checkbox-checked.svg","checkbox-intermediate":"checkbox-intermediate.svg",checkbox:tE,checkmark:nE,"chevron-down":"chevron-down.svg","chevron-first":"chevron-first.svg","chevron-last":"chevron-last.svg","chevron-left":"chevron-left.svg","chevron-right":"chevron-right.svg","chevron-sort":"chevron-sort.svg","chevron-up":"chevron-up.svg","clipboard-copied":"clipboard-copied.svg",clipboard:rE,close:oE,"cloud-download":"cloud-download.svg","cloud-offline":"cloud-offline.svg","cloud-online":"cloud-online.svg","cloud-upload":"cloud-upload.svg",cluster:iE,code:sE,"color-fill":"color-fill.svg","color-none":"color-none.svg","color-stroke":"color-stroke.svg",color:aE,columns:lE,"connected-points":"connected-points.svg",container:cE,cookie:dE,copy:uE,cpu:pE,"data-dimentions":"data-dimentions.svg",debug:hE,"delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg","dendrogram-X-line":"dendrogram-X-line.svg","dendrogram-X":"dendrogram-X.svg","dendrogram-Y-line":"dendrogram-Y-line.svg","dendrogram-Y":"dendrogram-Y.svg","dna-add":"dna-add.svg","dna-import":"dna-import.svg",dna:fE,download:mE,"drag-dots":"drag-dots.svg","drag-horizontal":"drag-horizontal.svg","drag-vertical":"drag-vertical.svg",duplicate:gE,edit:yE,"error-bar":"error-bar.svg",error:_E,"expand-left":"expand-left.svg","expand-right":"expand-right.svg",export:"export.svg","file-doc-add":"file-doc-add.svg","file-doc-download":"file-doc-download.svg","file-doc-import":"file-doc-import.svg","file-doc":"file-doc.svg","filter-on":"filter-on.svg",filter:vE,"fire-tips":"fire-tips.svg","folder-parent":"folder-parent.svg","frame-type-all":"frame-type-all.svg","frame-type-bottom":"frame-type-bottom.svg","frame-type-left-bottom":"frame-type-left-bottom.svg","frame-type-left":"frame-type-left.svg","frame-type-none":"frame-type-none.svg",generate:CE,graph:wE,heatmap:bE,"help-outline":"help-outline.svg",help:xE,"info-outline":"info-outline.svg",info:kE,jitter:SE,"jump-link":"jump-link.svg",lasso:EE,layers:TE,learn:BE,"legend-box-dot":"legend-box-dot.svg","legend-box":"legend-box.svg",legend:VE,"line-binned":"line-binned.svg","line-error":"line-error.svg","line-jitter":"line-jitter.svg",line:NE,"linetype-dashed":"linetype-dashed.svg","linetype-dotdash":"linetype-dotdash.svg","linetype-dotted":"linetype-dotted.svg","linetype-longdash":"linetype-longdash.svg","linetype-solid":"linetype-solid.svg","linetype-twodash":"linetype-twodash.svg","link-disabled":"link-disabled.svg",link:AE,loading:PE,lock:DE,maximize:FE,menu:RE,minimize:ME,minus:IE,more:OE,"paper-clip":"paper-clip.svg",pause:LE,pin:GE,play:zE,"position-bottom-annotation":"position-bottom-annotation.svg","position-bottom":"position-bottom.svg","position-left-annotation":"position-left-annotation.svg","position-left":"position-left.svg","position-right-annotation":"position-right-annotation.svg","position-right":"position-right.svg","position-top-annotation":"position-top-annotation.svg","position-top":"position-top.svg",product:$E,publications:UE,"radio-button-checked":"radio-button-checked.svg","radio-button":"radio-button.svg",renew:ZE,restart:WE,reverse:HE,"rotation-0":"rotation-0.svg","rotation-45":"rotation-45.svg","rotation-90":"rotation-90.svg",search:jE,"server-on":"server-on.svg",server:qE,settings:KE,sina:YE,skatterplot:JE,slice:XE,"social-github":"social-github.svg","social-linkedin":"social-linkedin.svg","social-twitter-X":"social-twitter-X.svg","social-twitter-bird":"social-twitter-bird.svg","social-youtube":"social-youtube.svg","sort-list-down":"sort-list-down.svg","sort-list-up":"sort-list-up.svg",sort:QE,statistics:eT,stop:tT,"strip-plot":"strip-plot.svg",success:nT,"table-add":"table-add.svg","table-alias":"table-alias.svg","table-import":"table-import.svg",table:rT,template:oT,terminal:iT,"text-align-center":"text-align-center.svg","text-align-left":"text-align-left.svg","text-align-right":"text-align-right.svg","theme-dark":"theme-dark.svg","theme-light":"theme-light.svg",time:sT,tune:aT,venn:lT,"view-hide":"view-hide.svg","view-show":"view-show.svg","violin-binned":"violin-binned.svg","violin-jitter":"violin-jitter.svg",violin:cT,warning:dT,wetlab:uT,"windows-collapse":"windows-collapse.svg","windows-expand":"windows-expand.svg","x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:pT,"zoom-in":"zoom-in.svg","zoom-out":"zoom-out.svg"};function fT(){return{txtSec:{title:"Text",data:{"--txt-00":{light:[!1,!1],value:["#FFFFFF","#FFFFFF"],description:"Text on the colored elements"},"--txt-01":{light:[!0,!1],value:["#110529","#FFFFFF"],description:"Primary text layer"},"--txt-02":{light:[!0,!1],value:["#231842","#ADAEB8"],description:"Secondary text layer - large arrays of text"},"--txt-03":{light:[!0,!0],value:["#9D9EAE","#60616B"],description:"Tetritary text layer - hints and descriptions"},"--txt-mask":{light:[!1,!0],value:["#CFD1DB","#3D3D42"],description:"Text mask in inputs, icons, etc."},"--txt-focus":{light:[!0,!0],value:["#07AD3E","#87E087"],description:"Colored text in active/focus elements"},"--txt-error":{light:[!0,!0],value:["#F1222F","#FF5C5C"],description:"Colored text in error elements"},"--txt-link":{light:[!0,!0],value:["#5F31CC","#9470FF"],description:"Colored text in links"}}},iconSec:{title:"Icon",data:{"--ic-00":{light:[!1,!1],value:["#FFFFFF","#FFFFFF"],description:"Icons on colored elements"},"--ic-01":{light:[!0,!1],value:["#110529","#FFFFFF"],description:"Primary elements"},"--ic-02":{light:[!1,!0],value:["#CFD1DB","#60616B"],description:"Secondary & tetritary elements"},"--ic-accent":{light:[!0,!1],value:["#07AD3E","#87E087"],description:"Focus/active elements"}}},borderSec:{title:"Border",data:{"--border-color-default":{light:[!0,!0],value:["#110529","#60616B"],description:"Main border for components"},"--border-color-hover":{light:[!0,!0],value:["#231842","#ADAEB8"],description:"Hover on main border"},"--border-color-focus":{light:[!1,!1],value:["#49CC49","#49CC49"],description:"Active border for components"},"--border-color-error":{light:[!1,!1],value:["#FF5C5C","#FF5C5C"],description:"Error border for components"},"--border-color-div-grey":{light:[!1,!0],value:["#E1E3EB","#232329"],description:"Divider lines low contrast"},"--border-color-div-bw":{light:[!1,!0],value:["#FFFFFF","#000000"],description:"Divider lines hight contrast"}}},btnSec:{title:"Button",data:{"--btn-accent-default":{light:[!0,!0],value:["#845CFF"," #5F31CC"],description:"Accent coloured button"},"--btn-accent-hover":{light:[!0,!0],value:["#9470FF"," #5F31CC"],description:"Hover on accent coloured button"},"--btn-accent-press":{light:[!0,!0],value:["#6F4DD6","#5F31CC"],description:"Pressed on accent coloured button"},"--btn-primary-default":{light:[!0,!0],value:["#110529","#5F31CC"],description:"Primary button"},"--btn-primary-hover":{light:[!0,!0],value:["#231842","#6D3DDB"],description:"Hover on primary button"},"--btn-primary-press":{light:[!0,!0],value:["#080214","#5328B8"],description:"Hover on primary button"},"--btn-sec-hover-white":{light:[!1,!0],value:["rgba(255, 255, 255, 0.50)","rgba(131, 131, 163, 0.16)"],description:"Hover background on transparent button"},"--btn-sec-hover-grey":{light:[!1,!0],value:["rgba(155, 171, 204, 0.16)","rgba(131, 131, 163, 0.16)"],description:"Hover background on ghost button & icons"},"--btn-sec-press-grey":{light:[!1,!0],value:["rgba(155, 171, 204, 0.24)","rgba(131, 131, 163, 0.24)"],description:"Hover background on ghost button & icons"},"--btn-active-select":{light:[!1,!0],value:["rgba(99, 224, 36, 0.24)","rgba(99, 224, 36, 0.24)"],description:"Fill on selected elements"},"--btn-switcher":{light:[!1,!0],value:["linear-gradient(180deg, #A1E59C 0%, #D0F5B0 100%)","#5E5E70"],description:"Gradient on active controll/switcher element"}}},disSec:{title:"Disable",data:{"--dis-00":{light:[!1,!0],value:["#FFFFFF","#65656B"],description:"Elements on dis-01, labels, texts, icons"},"--dis-01":{light:[!1,!0],value:["#CFD1DB","#3D3D42"],description:"Buttons, borders, labels, texts, icons"}}},bgSec:{title:"Background",data:{"--bg-base-dark":{light:[!0,!0],value:["#110529","#0D0D0F"],description:"Default dark block background"},"--bg-base-light":{light:[!1,!0],value:["#F7F8FA","#0D0D0F"],description:"Default light block background"},"--bg-elevated-01":{light:[!1,!0],value:["#FFFFFF","#1B1B1F"],description:"Default block background"},"--bg-elevated-02":{light:[!1,!0],value:["#E1E3EB","#2D2D33"],description:"Secondary block background"}}},filledSec:{title:"Filled",data:{"--filled-V-BG":{light:[!1,!0],value:["#D0F0C0","rgba(66, 184, 66, 0.40)"],description:"Text background selection on V-read"},"--filled-D-BG":{light:[!1,!0],value:["#FFCECC","rgba(229, 83, 229, 0.40)"],description:"Text background selection on D-read"},"--filled-N-BG":{light:[!1,!0],value:["#FAF5AA","rgba(83, 82, 102, 0.40)"],description:"Text background selection on C/N-read"},"--filled-J-BG":{light:[!1,!0],value:["#DEDBFF","rgba(132, 92, 255, 0.40)"],description:"Text background selection on J-read"}}},notificationSec:{title:"Notification",data:{"--notification-neutral":{light:[!1,!0],value:["linear-gradient(90deg, #D6D9FF 0%, #FFF 100%)","linear-gradient(90deg, #4D4D8F 0%, #292933 100%)"],description:"Background on neutral blocks"},"--notification-success":{light:[!1,!0],value:["linear-gradient(90deg, #C9F0B6 0%, #FFF 100%)","linear-gradient(90deg, #305C3E 0%, #292933 100%)"],description:"Background on success blocks"},"--notification-warning":{light:[!1,!0],value:["linear-gradient(90deg, #FEE0A3 0%, #FFF 100%)","linear-gradient(90deg, #754F2D 0%, #292933 100%)"],description:"Background on warning blocks"},"--notification-error":{light:[!1,!0],value:["linear-gradient(90deg, #FFB8B8 0%, #FFF 100%)","linear-gradient(90deg, #8F3343 0%, #292933 100%)"],description:"Background on error blocks"}}},gradientSec:{title:"Gradient",data:{"--gradient-blue-green":{light:[!0,!0],value:["linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand dark gradient"},"--gradient-green-lime":{light:[!1,!0],value:["linear-gradient(180deg, #A1E59C 0%, #D0F5B0 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand light gradient"},"--gradient-blue-violet":{light:[!1,!0],value:["linear-gradient(180deg, #ADB8FF 0%, #D6E9FF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand light gradient"},"--gradient-blue-clear":{light:[!1,!0],value:["linear-gradient(180deg, #85BEFF 0%, #CEF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-orange":{light:[!1,!0],value:["linear-gradient(180deg, #FFB766 0%, #FFEAA3 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-mint":{light:[!1,!0],value:["linear-gradient(180deg, #7DD1D1 0%, #C8FAE9 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-lime":{light:[!1,!0],value:["linear-gradient(180deg, #BFE062 0%, #E4FFAD 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-rose":{light:[!1,!0],value:["linear-gradient(0deg, #FFDDD6 0%, #FF99C9 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-red":{light:[!1,!0],value:["linear-gradient(0deg, #FFD5CC 0%, #FF9494 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-violet":{light:[!1,!0],value:["linear-gradient(180deg, #BCA3FF 0%, #E5E5FF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"}}}}}const mT=["add","arrow-down","arrow-left","arrow-link","arrow-right","arrow-up","box","calendar","caret-down","caret-left","caret-right","caret-up","cell-type-num","cell-type-txt","checkmark","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-up","clipboard-copied","clipboard","close","copy","data-dimentions","delete-bin","delete-circle","delete-clear","download","drag-dots","duplicate","edit","error","export","filter-on","filter","help-outline","help","info-outline","info","jump-link","link","loading","lock","maximize","minimize","minus","more","open","paper-clip","pause","play","renew","restart","reverse","settings","sort","stop","success","time","tune","warning","x-axis","y-axis","zip"],gT=["add-layer","add","align-center","align-left","align-right","annotate","annotation","area","arrow-down","arrow-left","arrow-link","arrow-right","arrow-up","axes","bar-cross","bar-error","bar-stacked","bar-trend","bar","bindot","box","boxplot-binned","boxplot-jitter","boxplot-notched","boxplot","bubble","calendar","canvas","cell-type-num","cell-type-txt","checkbox-checked","checkbox-intermediate","checkbox","checkmark","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-sort","chevron-up","clipboard-copied","clipboard","close","cloud-download","cloud-offline","cloud-online","cloud-upload","cluster","code","color-fill","color-none","color-stroke","color","columns","connected-points","container","cookie","copy","cpu","data-dimentions","debug","delete-bin","delete-circle","delete-clear","dendrogram-X-line","dendrogram-X","dendrogram-Y-line","dendrogram-Y","dna-add","dna-import","dna","download","drag-dots","drag-horizontal","drag-vertical","duplicate","edit","error-bar","error","expand-left","expand-right","export","file-doc-add","file-doc-download","file-doc-import","file-doc","filter-on","filter","fire-tips","folder-parent","frame-type-all","frame-type-bottom","frame-type-left-bottom","frame-type-left","frame-type-none","generate","graph","heatmap","help-outline","help","info-outline","info","jitter","jump-link","lasso","layers","learn","legend-box-dot","legend-box","legend","line-binned","line-error","line-jitter","line","linetype-dashed","linetype-dotdash","linetype-dotted","linetype-longdash","linetype-solid","linetype-twodash","link-disabled","link","loading","lock","maximize","menu","minimize","minus","more","paper-clip","pause","pin","play","position-bottom-annotation","position-bottom","position-left-annotation","position-left","position-right-annotation","position-right","position-top-annotation","position-top","product","publications","radio-button-checked","radio-button","renew","restart","reverse","rotation-0","rotation-45","rotation-90","search","server-on","server","settings","sina","skatterplot","slice","social-github","social-linkedin","social-twitter-X","social-twitter-bird","social-youtube","sort-list-down","sort-list-up","sort","statistics","stop","strip-plot","success","table-add","table-alias","table-import","table","template","terminal","text-align-center","text-align-left","text-align-right","theme-dark","theme-light","time","tune","venn","view-hide","view-show","violin-binned","violin-jitter","violin","warning","wetlab","windows-collapse","windows-expand","x-axis","y-axis","zip","zoom-in","zoom-out"],yT={allCssVariables:fT(),icons16:$1,icons24:hT},_T={class:"block__not-found"},vT=r.defineComponent({__name:"NotFound",setup(t){const n=rl().useApp(),o=()=>{n.updateNavigationState(s=>{s.href="/"})};return(s,l)=>(r.openBlock(),r.createElementBlock("div",_T,[r.createElementVNode("h1",null,"Not found route: "+r.toDisplayString(r.unref(n).snapshot.navigationState.href),1),r.createVNode(r.unref(yl),{onClick:r.withModifiers(o,["stop"])},{default:r.withCtx(()=>l[0]||(l[0]=[r.createTextVNode("Return to main page")])),_:1})]))}}),Ds=(t,e)=>{const n=t.__vccOpts||t;for(const[o,s]of e)n[o]=s;return n},CT={},wT={class:"block__loader-page"};function bT(t,e){return r.openBlock(),r.createElementBlock("div",wT,e[0]||(e[0]=[r.createElementVNode("div",{class:"loader-container"},[r.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"})],-1)]))}const xT=Ds(CT,[["render",bT]]),kT={class:"pl-app-notification-alert"},ST={class:"pl-app-notification-alert__content"},ET={class:"pl-app-notification-alert__title"},TT=r.defineComponent({__name:"PlAppErrorNotificationAlert",props:{errors:{}},setup(t){const e=t,n=r.ref(!1),o=r.ref(!0),s=r.computed(()=>Object.entries(e.errors).filter(c=>!!c[1]));function l(){n.value=!0}return r.watch(()=>e.errors,c=>{o.value=Object.values(c).some(u=>!!u)},{immediate:!0,deep:!0}),(c,u)=>(r.openBlock(),r.createElementBlock("div",kT,[r.createVNode(r.unref(Tl),{modelValue:n.value,"onUpdate:modelValue":u[0]||(u[0]=p=>n.value=p),width:"720px",style:{"max-height":"100vh"}},{title:r.withCtx(()=>u[2]||(u[2]=[r.createTextVNode(" Errors ")])),default:r.withCtx(()=>[r.createElementVNode("div",ST,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(s.value,p=>{var f;return r.openBlock(),r.createElementBlock("div",{key:p[0],class:"pl-app-notification-alert__item"},[r.createElementVNode("div",ET,r.toDisplayString(p[0]),1),r.createVNode(r.unref(Zu),{value:(f=p[1])==null?void 0:f.message},null,8,["value"])])}),128))])]),_:1},8,["modelValue"]),r.createVNode(r.unref(pp),{modelValue:o.value,"onUpdate:modelValue":u[1]||(u[1]=p=>o.value=p),type:"error",closable:""},{actions:r.withCtx(()=>[r.createVNode(r.unref(gl),{icon:"arrow-right",onClick:l},{default:r.withCtx(()=>u[3]||(u[3]=[r.createTextVNode("See errors")])),_:1}),r.createVNode(r.unref(Bu))]),default:r.withCtx(()=>[u[4]||(u[4]=r.createTextVNode(" Some outputs have errors. "))]),_:1},8,["modelValue"])]))}}),BT={key:0,class:"block__loader"},VT=r.defineComponent({__name:"BlockLoader",props:{value:{type:[Boolean,Number]}},setup(t){const e=t,n=r.computed(()=>typeof e.value=="boolean"&&e.value),o=r.computed(()=>{const s=e.value;if(typeof s=="number")return s>=1?void 0:(s*100).toFixed(2)+"%"});return(s,l)=>n.value?(r.openBlock(),r.createElementBlock("div",BT)):o.value!==void 0?(r.openBlock(),r.createElementBlock("div",{key:1,class:"block__progress",style:r.normalizeStyle({"--progress-width":o.value})},null,4)):r.createCommentVNode("",!0)}}),NT={class:"block block__layout"},AT={key:0},PT=r.defineComponent({__name:"BlockLayout",setup(t){const e=rl(),n=f=>{try{return new URL(f,"http://dummy").pathname}catch{console.error("Invalid href",f);return}},o=r.computed(()=>e.loaded?e.useApp().href:void 0),s=r.computed(()=>{if(e.loaded){const f=e.useApp(),m=n(f.snapshot.navigationState.href);return m?f.getRoute(m):void 0}}),l=r.computed(()=>e.loaded?e.useApp():void 0),c=r.computed(()=>l.value?l.value.model.outputErrors:{}),u=r.computed(()=>{var f;return((f=l.value)==null?void 0:f.showErrorsNotification)??!0}),p=r.computed(()=>{var f,m;return(m=(f=l.value)==null?void 0:f.progress)==null?void 0:m.call(f)});return(f,m)=>(r.openBlock(),r.createElementBlock("div",NT,[r.createVNode(VT,{value:p.value},null,8,["value"]),r.unref(e).error?(r.openBlock(),r.createElementBlock("div",AT,r.toDisplayString(r.unref(e).error),1)):r.unref(e).loaded?s.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(s.value),{key:o.value})):(r.openBlock(),r.createBlock(vT,{key:3})):(r.openBlock(),r.createBlock(xT,{key:1},{default:r.withCtx(()=>m[0]||(m[0]=[r.createTextVNode("Loading...")])),_:1})),r.unref(e).loaded&&u.value?(r.openBlock(),r.createBlock(r.unref(TT),{key:4,errors:c.value},null,8,["errors"])):r.createCommentVNode("",!0)]))}});var Fs={exports:{}};/**
|
|
65
|
+
)`}function l(){const d=t.value;if(!d)return;const p=[o(d),i(d)].filter(h=>h!==null);d.style.setProperty("-webkit-mask-image",p.join(",")),d.style.setProperty("mask-image",p.join(",")),p.length>1&&(d.style.setProperty("-webkit-mask-composite","source-in"),d.style.setProperty("mask-composite","source-in"))}const c=Nl(l);r.onMounted(l),st(window,"scroll",c,!0),st(window,"resize",c,!0)}function Wp(t,e){up(()=>{ut(r.unref(t),n=>{pp(n,()=>e(n))})}),r.onUnmounted(()=>{ut(r.unref(t),n=>{hp(n)})})}const Sr={item:"sortable__item",animate:"sortable__animate"},Mi=t=>t.getBoundingClientRect().y,Hp=t=>{const{y:e,height:n}=t.getBoundingClientRect();return e+Math.ceil(n/2)},OE=t=>{const{y:e,height:n}=t.getBoundingClientRect();return e+n};function qp(t,e){const n={item:void 0,options(){var w;return[...((w=t.value)==null?void 0:w.children)??[]]}},o=r.computed(()=>n.options()),i=e.shakeBuffer??10,l=e.reorderDelay??100;function c(w){const S=e.handle?this.querySelector(e.handle):null;S&&(S&&!S.contains(w.target)||(this.classList.remove(Sr.animate),this.classList.add(Sr.item),n.item={el:this,y:w.y,dy:0,orderChanged:!1}))}function d(w){const S=n.options();return S.slice(0,S.indexOf(w))}function p(w){const S=n.options();return S.slice(S.indexOf(w)+1)}function h(w,S){const O=n.options().filter(b=>b!==S),G=O.indexOf(w);return O.splice(G,0,S),O}function m(w,S){const O=n.options().filter(b=>b!==S),G=O.indexOf(w);return O.splice(G+1,0,S),O}function y(w,S){w.dy=S-w.y,w.el.style.setProperty("transform",`translateY(${w.dy}px)`)}function x(w){var S;if(!n.item)return;const{el:O}=n.item;if(!O.isConnected){n.item=void 0;return}const G=w.map(U=>Mi(U)),b=Mi(O);(S=t.value)==null||S.replaceChildren(...w);const R=Mi(O),F=w.map(U=>Mi(U)),D=[];for(let U=0;U<F.length;U++){const j=w[U];if(j===n.item.el)continue;const $=F[U],Z=G[U]-$;j.style.transform=`translateY(${Z}px)`,D.push(j)}const A=R-b;n.item.y=n.item.y+A,n.item.dy=n.item.dy-A,n.item.orderChanged=!0,n.item.el.style.setProperty("transform",`translateY(${n.item.dy}px)`),D.forEach(U=>U.classList.remove(Sr.animate)),requestAnimationFrame(function(){D.forEach(U=>{U.classList.add(Sr.animate),U.style.transform="",U.addEventListener("transitionend",()=>{U.classList.remove(Sr.animate)})})})}st(window,"mousemove",w=>{if(!n.item)return;const{el:S}=n.item;y(n.item,w.y);const O=Mi(n.item.el),G=OE(n.item.el),b=d(S),R=p(S);b.forEach(F=>{const D=Hp(F);O+i<D&&x(h(F,S))}),R.forEach(F=>{const D=Hp(F);G-i>D&&x(m(F,S))})}),st(window,"mouseup",()=>{if(!n.item)return;const{el:w,orderChanged:S}=n.item;w.classList.add(Sr.animate),w.style.removeProperty("transform"),w.addEventListener("transitionend",()=>{w.classList.remove(Sr.animate,Sr.item)}),setTimeout(()=>{if(!S)return;const O=n.options().map(b=>Number(b.getAttribute("data-index"))),G=t.value;if(G){for(const b of n.options())G.removeChild(b);o.value.forEach(b=>{G.appendChild(b)})}e.onChange(O)},l),n.item=void 0}),r.watchEffect(()=>{o.value.forEach((w,S)=>{w.removeEventListener("mousedown",c),w.addEventListener("mousedown",c),w.setAttribute("data-index",String(S))})})}function LE(t,e){let n;r.onMounted(()=>{n=setInterval(t,e)}),r.onUnmounted(()=>clearInterval(n))}function ME(t,e,n){const o=r.reactive({data:bl.deepClone(e(t.value)),changed:!1});return r.watch(()=>o.data,i=>{o.changed?n(bl.deepClone(i)):o.changed=!0},{deep:!0}),r.watch(t,i=>{Object.assign(o,{data:bl.deepClone(e(i)),changed:!1})},{deep:!0,immediate:!0}),o}function GE(t){const e=r.reactive({isLoading:!1,result:void 0,error:void 0,async run(...n){this.isLoading=!0,this.error=void 0;try{this.result=await t(...n)}catch(o){this.error=o}finally{this.isLoading=!1}},debounce(n,o=1e3){return dC(()=>{const i=n();this.run(...i).catch(console.error)},o)}});return e.run=e.run.bind(e),e}function $E(t,e){function n(c,d){const p=r.unref(t);if(!p)return;const h=`translate(${d.x-c.x}px, ${d.y-c.y}px)`;p.style.setProperty("transform",h),e(d)}function o(c){const d=p=>n(c,p);document.addEventListener("mousemove",d),document.addEventListener("mouseup",()=>{const p=r.unref(t);document.removeEventListener("mousemove",d),p&&(p.style.setProperty("transition","all .3s ease-in-out"),p.style.removeProperty("transform"),p.addEventListener("transitionend",()=>{p.style.removeProperty("transition")}))},{once:!0})}function i(){var c;(c=r.unref(t))==null||c.addEventListener("mousedown",o)}function l(){var c;(c=r.unref(t))==null||c.removeEventListener("mousedown",o)}r.onMounted(i),r.onUnmounted(l)}const zE={class:"ui-slider__wrapper"},UE={class:"ui-slider__label-section"},ZE={key:0,class:"text-s"},jE={class:"ui-slider__base"},WE={class:"ui-slider__container"},HE={class:"ui-slider__container ui-slider__container-thumb"},qE=["data-percent"],KE=["data-percent"],XE=["data-percent"],YE={key:0,class:"ui-slider__error"},JE=r.defineComponent({__name:"SliderRangeTriple",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:"%"},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,i=t,l=r.reactive({deltaValue1:0,deltaValue2:0,deltaValue3:0}),c=r.ref(),d=r.ref(),p=r.ref(),h=r.ref(),m=r.computed(()=>i.max-i.min),y=r.computed(()=>i),x=Kl(y),w=r.computed(()=>St((i.modelValue[0]??0)+l.deltaValue1,i.min,i.max)),S=r.computed(()=>St((i.modelValue[1]??0)+l.deltaValue2,i.min,i.max)),O=r.computed(()=>St((i.modelValue[2]??0)+l.deltaValue3,i.min,i.max)),G=r.computed(()=>{const E=i.modelValue;if(!(Array.isArray(E)&&E.length===3&&E.every(H=>Number.isFinite(H))))return"Expected model [number, number, number]";const M=[];return[...i.modelValue].forEach(H=>{H>i.max&&M.push(`Max model value must be lower than max props ${i.max}.`),H<i.min&&M.push("Min model value must be greater than max props.")}),M.length>0?M.join(" "):i.error}),b=r.computed(()=>(w.value-i.min)/m.value),R=r.computed(()=>(S.value-i.min)/m.value),F=r.computed(()=>(O.value-i.min)/m.value),D=r.computed(()=>W()),A=r.computed(()=>({right:D.value[0]+"%",left:100-D.value[2]+"%"})),U=r.computed(()=>({right:Math.ceil((1-b.value)*100)+"%"})),j=r.computed(()=>({right:Math.ceil((1-R.value)*100)+"%"})),$=r.computed(()=>({right:Math.ceil((1-F.value)*100)+"%"}));gr(d,E=>{var M;ut((M=r.unref(c))==null?void 0:M.getBoundingClientRect(),H=>{const{dx:K}=E;l.deltaValue1=K/H.width*m.value,d.value&&Z(d.value,i.modelValue[0],l.deltaValue1),E.stop&&(he([J(w.value),J(S.value),J(O.value)]),l.deltaValue1=0)})}),gr(p,E=>{var M;ut((M=r.unref(c))==null?void 0:M.getBoundingClientRect(),H=>{const{dx:K}=E;l.deltaValue2=K/H.width*m.value,p.value&&Z(p.value,i.modelValue[1],l.deltaValue2),E.stop&&(he([J(w.value),J(S.value),J(O.value)]),l.deltaValue2=0)})}),gr(h,E=>{var M;ut((M=r.unref(c))==null?void 0:M.getBoundingClientRect(),H=>{const{dx:K}=E;l.deltaValue3=K/H.width*m.value,h.value&&Z(h.value,i.modelValue[2],l.deltaValue3),E.stop&&(he([J(w.value),J(S.value),J(O.value)]),l.deltaValue3=0)})});function Z(E,M,H){const K=J(St((M??0)+H,i.min,i.max));E.dataset.percent=`${K}${i.measure}`,B()}function W(){const E=Math.ceil((1-b.value)*100),M=Math.ceil((1-R.value)*100),H=Math.ceil((1-F.value)*100);return[E,M,H].sort((K,ne)=>K-ne)}function J(E){const M=St(E,i.min,i.max);return Math.round((M+Number.EPSILON)*(1/i.step))/(1/i.step)}function he(E){o("update:modelValue",E)}function B(){const E=Number(U.value.right.substring(0,U.value.right.length-1)),M=Number(j.value.right.substring(0,j.value.right.length-1)),H=Number($.value.right.substring(0,$.value.right.length-1)),K=[{r:E,th:d},{r:M,th:p},{r:H,th:h}].sort((ne,de)=>ne.r-de.r);K[0].th.value&&(K[0].th.value.dataset.hint="high"),K[1].th.value&&(K[1].th.value.dataset.hint="mid"),K[2].th.value&&(K[2].th.value.dataset.hint="low")}function C(E,M){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(E.code)&&E.preventDefault();const H=E.code==="ArrowUp"||E.code==="ArrowRight"?i.step*1:E.code==="ArrowDown"||E.code==="ArrowLeft"?i.step*-1:0,K=[...i.modelValue];K[M]=St(K[M]+H,i.min,i.max),he(K),B()}return r.onMounted(()=>{B()}),(E,M)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([i.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope ui-slider__triple"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${i.mode}`,"ui-slider"])},[r.createElementVNode("div",zE,[r.createElementVNode("div",UE,[E.label?(r.openBlock(),r.createElementBlock("label",ZE,[r.createElementVNode("span",null,r.toDisplayString(E.label),1),M[3]||(M[3]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(E.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0)]),M[11]||(M[11]=r.createTextVNode()),r.createElementVNode("div",jE,[r.createElementVNode("div",WE,[r.createElementVNode("div",{ref_key:"barRef",ref:c,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(A.value)},null,4)],512)]),M[10]||(M[10]=r.createTextVNode()),r.createElementVNode("div",HE,[i.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(x),(H,K)=>(r.openBlock(),r.createElementBlock("div",{key:K,style:r.normalizeStyle({right:`${H}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),M[7]||(M[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef1",ref:d,style:r.normalizeStyle(U.value),"data-percent":i.modelValue[0]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r1:"",tabindex:"0",onKeydown:M[0]||(M[0]=H=>C(H,0))},M[4]||(M[4]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,qE),M[8]||(M[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef2",ref:p,style:r.normalizeStyle(j.value),"data-percent":i.modelValue[1]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r2:"",tabindex:"0",onKeydown:M[1]||(M[1]=H=>C(H,1))},M[5]||(M[5]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,KE),M[9]||(M[9]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef3",ref:h,style:r.normalizeStyle($.value),"data-percent":i.modelValue[2]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r3:"",tabindex:"0",onKeydown:M[2]||(M[2]=H=>C(H,2))},M[6]||(M[6]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,XE)])])]),M[12]||(M[12]=r.createTextVNode()),M[13]||(M[13]=r.createElementVNode("div",{class:"ui-slider__input-wrapper d-flex"},null,-1))],2),M[14]||(M[14]=r.createTextVNode()),G.value?(r.openBlock(),r.createElementBlock("div",YE,r.toDisplayString(G.value),1)):r.createCommentVNode("",!0)],2))}}),QE={class:"ui-input-range__separator"},e1=r.defineComponent({__name:"InputRange",props:{modelValue:{},separator:{default:"-"}},emits:["update:modelValue","change"],setup(t,{emit:e}){const n=t,o=e,i=r.reactive({left:n.modelValue[0],right:n.modelValue[1]}),l=r.ref(!1),c=r.computed(()=>(l.value,"ui-input-range-focused")),d=r.computed({get(){return{left:Math.min(...n.modelValue),right:Math.max(...n.modelValue)}},set(){}});r.watch(()=>d.value,m=>(i.left=m.left)&&(i.right=m.right));function p(){o("update:modelValue",[+i.left,+i.right]),o("change",[+i.left,+i.right])}function h(m,y){const x=y.target.value;/^[0-9]{0,2}$/.test(x)?m?i.left=+x:i.right=+x:m?i.left=+x.slice(0,x.length-1):i.right=+x.slice(0,x.length-1)}return(m,y)=>(r.openBlock(),r.createElementBlock("div",r.mergeProps({class:[c.value,"ui-input-range"]},m.$attrs),[r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":y[0]||(y[0]=x=>d.value.left=x),class:"text-s",type:"text",onChange:p,onFocus:y[1]||(y[1]=x=>l.value=!0),onFocusout:y[2]||(y[2]=x=>l.value=!1),onInput:y[3]||(y[3]=x=>h(!0,x))},null,544),[[r.vModelText,d.value.left]]),y[8]||(y[8]=r.createTextVNode()),r.createElementVNode("div",QE,r.toDisplayString(n.separator),1),y[9]||(y[9]=r.createTextVNode()),r.withDirectives(r.createElementVNode("input",{"onUpdate:modelValue":y[4]||(y[4]=x=>d.value.right=x),class:"text-s",type:"text",onChange:p,onFocus:y[5]||(y[5]=x=>l.value=!0),onFocusout:y[6]||(y[6]=x=>l.value=!1),onInput:y[7]||(y[7]=x=>h(!1,x))},null,544),[[r.vModelText,d.value.right]])],16))}}),t1={class:"ui-slider__wrapper"},n1={class:"ui-slider__label-section"},r1={key:0,class:"text-s"},o1={key:1,class:"ui-slider__value-static text-s"},i1={class:"ui-slider__base"},s1={class:"ui-slider__container"},a1={class:"ui-slider__container ui-slider__container-thumb"},l1={class:"ui-slider__input-wrapper d-flex"},c1={key:0,class:"ui-slider__error"},d1=r.defineComponent({__name:"SliderRange",props:{modelValue:{},min:{default:0},max:{},step:{default:1},label:{default:void 0},helper:{default:void 0},error:{default:void 0},mode:{default:"text"},measure:{default:""},breakpoints:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:e}){const n=r.useSlots(),o=e,i=t,l=r.reactive({deltaValue1:0,deltaValue2:0}),c=r.ref(),d=r.ref(),p=r.ref(),h=r.ref(i.modelValue),m=r.ref(i.modelValue[0]),y=r.ref(i.modelValue[1]),x=r.computed(()=>i),w=Kl(x),S=r.computed(()=>[m.value,y.value].sort((B,C)=>B-C).join("-")),O=r.computed(()=>i.max-i.min),G=r.computed(()=>St((i.modelValue[0]??0)+l.deltaValue1,i.min,i.max)),b=r.computed(()=>St((i.modelValue[1]??0)+l.deltaValue2,i.min,i.max)),R=r.computed(()=>{const B=i.modelValue;return Array.isArray(B)&&B.length===2&&B.every(C=>Number.isFinite(C))?i.error:"Expected model [number, number]"}),F=r.computed(()=>(G.value-i.min)/O.value),D=r.computed(()=>(b.value-i.min)/O.value),A=r.computed(()=>Z()),U=r.computed(()=>({right:A.value[0]+"%",left:100-A.value[1]+"%"})),j=r.computed(()=>({right:Math.ceil((1-F.value)*100)+"%"})),$=r.computed(()=>({right:Math.ceil((1-D.value)*100)+"%"}));r.watch(()=>i.modelValue,B=>{h.value=B,m.value=+B[0],y.value=+B[1]},{immediate:!0}),gr(d,B=>{var C;ut((C=r.unref(c))==null?void 0:C.getBoundingClientRect(),E=>{const{dx:M}=B;l.deltaValue1=M/E.width*O.value,m.value=W(St((i.modelValue[0]??0)+l.deltaValue1,i.min,i.max)),h.value=[m.value,y.value].sort((H,K)=>H-K),B.stop&&(J([W(G.value),W(b.value)]),l.deltaValue1=0)})}),gr(p,B=>{var C;ut((C=r.unref(c))==null?void 0:C.getBoundingClientRect(),E=>{const{dx:M}=B;l.deltaValue2=M/E.width*O.value,y.value=W(St((i.modelValue[1]??0)+l.deltaValue2,i.min,i.max)),h.value=[m.value,y.value].sort((H,K)=>H-K),B.stop&&(J([W(G.value),W(b.value)]),l.deltaValue2=0)})});function Z(){const B=Math.ceil((1-F.value)*100),C=Math.ceil((1-D.value)*100);return[B,C].sort((E,M)=>E-M)}function W(B){const C=St(B,i.min,i.max);return Math.round((C+Number.EPSILON)*(1/i.step))/(1/i.step)}function J(B){o("update:modelValue",B)}function he(B,C){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(B.code)&&B.preventDefault();const E=B.code==="ArrowUp"||B.code==="ArrowRight"?i.step*1:B.code==="ArrowDown"||B.code==="ArrowLeft"?i.step*-1:0,M=[...i.modelValue];M[C]=St(M[C]+E,i.min,i.max),J(M)}return(B,C)=>(r.openBlock(),r.createElementBlock("div",{class:r.normalizeClass([i.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[r.createElementVNode("div",{class:r.normalizeClass([`ui-slider__mode-${i.mode}`,"ui-slider"])},[r.createElementVNode("div",t1,[r.createElementVNode("div",n1,[B.label?(r.openBlock(),r.createElementBlock("label",r1,[r.createElementVNode("span",null,r.toDisplayString(B.label),1),C[3]||(C[3]=r.createTextVNode()),r.unref(n).tooltip?(r.openBlock(),r.createBlock(r.unref(xt),{key:0,class:"info",position:"top"},{tooltip:r.withCtx(()=>[r.renderSlot(B.$slots,"tooltip")]),_:3})):r.createCommentVNode("",!0)])):r.createCommentVNode("",!0),C[4]||(C[4]=r.createTextVNode()),i.mode==="text"?(r.openBlock(),r.createElementBlock("div",o1,r.toDisplayString(S.value),1)):r.createCommentVNode("",!0)]),C[10]||(C[10]=r.createTextVNode()),r.createElementVNode("div",i1,[r.createElementVNode("div",s1,[r.createElementVNode("div",{ref_key:"barRef",ref:c,class:"ui-slider__bar"},[r.createElementVNode("div",{class:"ui-slider__progress",style:r.normalizeStyle(U.value)},null,4)],512)]),C[9]||(C[9]=r.createTextVNode()),r.createElementVNode("div",a1,[i.breakpoints?(r.openBlock(!0),r.createElementBlock(r.Fragment,{key:0},r.renderList(r.unref(w),(E,M)=>(r.openBlock(),r.createElementBlock("div",{key:M,style:r.normalizeStyle({right:`${E}%`}),class:"ui-slider__thumb-step"},null,4))),128)):r.createCommentVNode("",!0),C[7]||(C[7]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef1",ref:d,style:r.normalizeStyle(j.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:C[0]||(C[0]=E=>he(E,0))},C[5]||(C[5]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36),C[8]||(C[8]=r.createTextVNode()),r.createElementVNode("div",{ref_key:"thumbRef2",ref:p,style:r.normalizeStyle($.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:C[1]||(C[1]=E=>he(E,1))},C[6]||(C[6]=[r.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),C[11]||(C[11]=r.createTextVNode()),r.createElementVNode("div",l1,[i.mode==="input"?(r.openBlock(),r.createBlock(e1,{key:0,modelValue:h.value,"onUpdate:modelValue":C[2]||(C[2]=E=>h.value=E),class:"ui-focused-border",onChange:J},null,8,["modelValue"])):r.createCommentVNode("",!0)])],2),C[12]||(C[12]=r.createTextVNode()),R.value?(r.openBlock(),r.createElementBlock("div",c1,r.toDisplayString(R.value),1)):r.createCommentVNode("",!0)],2))}}),u1=r.defineComponent({__name:"VScroll",props:{scrollTop:{},clientHeight:{},scrollHeight:{}},emits:["update:scrollTop"],setup(t,{emit:e}){const n=e,o=t,i=r.ref(),l=r.computed(()=>o.clientHeight/(o.scrollHeight||1)),c=r.computed(()=>l.value<1),d=r.computed(()=>{const p=r.unref(l);return{top:o.scrollTop*p+"px",height:Math.floor(o.clientHeight*p)+"px"}});return st(i,"pointerdown",p=>{const h={clientY:p.clientY},m=Ol(document,"mousemove",y=>{const x=(y.clientY-h.clientY)/l.value;n("update:scrollTop",o.scrollTop+x),h.clientY=y.clientY});["mouseup","pointercancel"].forEach(y=>{document.addEventListener(y,m,{once:!0})})}),(p,h)=>c.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:i,class:"v-scroll"},[r.createElementVNode("div",{class:"v-scroll__scrollbar",style:r.normalizeStyle(d.value)},null,4)],512)):r.createCommentVNode("",!0)}}),p1=r.defineComponent({__name:"HScroll",props:{scrollLeft:{},clientWidth:{},scrollWidth:{}},emits:["update:scrollLeft"],setup(t,{emit:e}){const n=e,o=t,i=r.ref(),l=r.computed(()=>o.clientWidth/(o.scrollWidth||1)),c=r.computed(()=>l.value<1),d=r.computed(()=>{const p=r.unref(l);return{left:o.scrollLeft*p+"px",width:Math.floor(o.clientWidth*p)+"px"}});return st(i,"pointerdown",p=>{const h={clientX:p.clientX},m=Ol(document,"mousemove",y=>{const x=(y.clientX-h.clientX)/l.value;n("update:scrollLeft",o.scrollLeft+x),h.clientX=y.clientX});["mouseup","pointercancel"].forEach(y=>{document.addEventListener(y,m,{once:!0})})}),(p,h)=>c.value?(r.openBlock(),r.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:i,class:"h-scroll"},[r.createElementVNode("div",{class:"h-scroll__scrollbar",style:r.normalizeStyle(d.value)},null,4)],512)):r.createCommentVNode("",!0)}}),h1={class:"ui-scrollable"},f1=r.defineComponent({__name:"Scrollable",setup(t){const e=r.ref(),n=r.reactive({scrollTop:0,scrollLeft:0,clientHeight:0,clientWidth:0,scrollHeight:0,scrollWidth:0});function o(d){gw(n,d,"scrollTop","scrollLeft","clientHeight","clientWidth","scrollHeight","scrollWidth")}const i=d=>{d.preventDefault();const p=d.currentTarget;p.scrollTop+=d.deltaY,p.scrollLeft+=d.deltaX,o(p)};function l(d){ut(r.unref(e),p=>{p.scrollTop=d,o(p)})}function c(d){ut(r.unref(e),p=>{p.scrollLeft=d,o(p)})}return Wp(e,d=>{ut(d,p=>o(p))}),r.onMounted(()=>{ut(r.unref(e),d=>{o(d),d.addEventListener("wheel",i)})}),r.onUnmounted(()=>{ut(r.unref(e),d=>d.removeEventListener("wheel",i))}),(d,p)=>(r.openBlock(),r.createElementBlock("div",h1,[r.createElementVNode("div",{ref_key:"containerRef",ref:e,class:"ui-scrollable__container",onWheel:i},[r.renderSlot(d.$slots,"default")],544),p[2]||(p[2]=r.createTextVNode()),r.createVNode(u1,{"scroll-top":n.scrollTop,"client-height":n.clientHeight,"scroll-height":n.scrollHeight,onWheel:p[0]||(p[0]=r.withModifiers(()=>{},["stop"])),"onUpdate:scrollTop":l},null,8,["scroll-top","client-height","scroll-height"]),p[3]||(p[3]=r.createTextVNode()),r.createVNode(p1,{"scroll-left":n.scrollLeft,"client-width":n.clientWidth,"scroll-width":n.scrollWidth,onWheel:p[1]||(p[1]=r.withModifiers(()=>{},["stop"])),"onUpdate:scrollLeft":c},null,8,["scroll-left","client-width","scroll-width"])]))}}),m1="add.svg",g1="box.svg",y1="calendar.svg",v1="checkmark.svg",_1="clipboard.svg",C1="close.svg",w1="copy.svg",b1="download.svg",x1="duplicate.svg",k1="edit.svg",S1="error.svg",E1="filter.svg",T1="help.svg",N1="info.svg",A1="link.svg",V1="loading.svg",B1="lock.svg",P1="maximize.svg",R1="minimize.svg",D1="minus.svg",I1="more.svg",F1="open.svg",O1="pause.svg",L1="play.svg",M1="renew.svg",G1="restart.svg",$1="reverse.svg",z1="settings.svg",U1="sort.svg",Z1="stop.svg",j1="success.svg",W1="time.svg",H1="tune.svg",q1="warning.svg",K1="zip.svg",X1={add:m1,"arrow-down":"arrow-down.svg","arrow-left":"arrow-left.svg","arrow-link":"arrow-link.svg","arrow-right":"arrow-right.svg","arrow-up":"arrow-up.svg",box:g1,calendar:y1,"caret-down":"caret-down.svg","caret-left":"caret-left.svg","caret-right":"caret-right.svg","caret-up":"caret-up.svg","cell-type-num":"cell-type-num.svg","cell-type-txt":"cell-type-txt.svg",checkmark:v1,"chevron-down":"chevron-down.svg","chevron-first":"chevron-first.svg","chevron-last":"chevron-last.svg","chevron-left":"chevron-left.svg","chevron-right":"chevron-right.svg","chevron-up":"chevron-up.svg","clipboard-copied":"clipboard-copied.svg",clipboard:_1,close:C1,copy:w1,"data-dimentions":"data-dimentions.svg","delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg",download:b1,"drag-dots":"drag-dots.svg",duplicate:x1,edit:k1,error:S1,export:"export.svg","filter-on":"filter-on.svg",filter:E1,"help-outline":"help-outline.svg",help:T1,"info-outline":"info-outline.svg",info:N1,"jump-link":"jump-link.svg",link:A1,loading:V1,lock:B1,maximize:P1,minimize:R1,minus:D1,more:I1,open:F1,"paper-clip":"paper-clip.svg",pause:O1,play:L1,renew:M1,restart:G1,reverse:$1,settings:z1,sort:U1,stop:Z1,success:j1,time:W1,tune:H1,warning:q1,"x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:K1},Y1="add.svg",J1="annotate.svg",Q1="annotation.svg",eT="area.svg",tT="axes.svg",nT="bar.svg",rT="bindot.svg",oT="box.svg",iT="boxplot.svg",sT="bubble.svg",aT="calendar.svg",lT="canvas.svg",cT="checkbox.svg",dT="checkmark.svg",uT="clipboard.svg",pT="close.svg",hT="cluster.svg",fT="code.svg",mT="color.svg",gT="columns.svg",yT="container.svg",vT="cookie.svg",_T="copy.svg",CT="cpu.svg",wT="debug.svg",bT="dna.svg",xT="download.svg",kT="duplicate.svg",ST="edit.svg",ET="error.svg",TT="filter.svg",NT="generate.svg",AT="graph.svg",VT="heatmap.svg",BT="help.svg",PT="info.svg",RT="jitter.svg",DT="lasso.svg",IT="layers.svg",FT="learn.svg",OT="legend.svg",LT="line.svg",MT="link.svg",GT="loading.svg",$T="lock.svg",zT="maximize.svg",UT="menu.svg",ZT="minimize.svg",jT="minus.svg",WT="more.svg",HT="pause.svg",qT="pin.svg",KT="play.svg",XT="product.svg",YT="publications.svg",JT="renew.svg",QT="restart.svg",eN="reverse.svg",tN="search.svg",nN="server.svg",rN="settings.svg",oN="sina.svg",iN="skatterplot.svg",sN="slice.svg",aN="sort.svg",lN="statistics.svg",cN="stop.svg",dN="success.svg",uN="table.svg",pN="template.svg",hN="terminal.svg",fN="time.svg",mN="tune.svg",gN="venn.svg",yN="violin.svg",vN="warning.svg",_N="wetlab.svg",CN="zip.svg",wN={"add-layer":"add-layer.svg",add:Y1,"align-center":"align-center.svg","align-left":"align-left.svg","align-right":"align-right.svg",annotate:J1,annotation:Q1,area:eT,"arrow-down":"arrow-down.svg","arrow-left":"arrow-left.svg","arrow-link":"arrow-link.svg","arrow-right":"arrow-right.svg","arrow-up":"arrow-up.svg",axes:tT,"bar-cross":"bar-cross.svg","bar-error":"bar-error.svg","bar-stacked":"bar-stacked.svg","bar-trend":"bar-trend.svg",bar:nT,bindot:rT,box:oT,"boxplot-binned":"boxplot-binned.svg","boxplot-jitter":"boxplot-jitter.svg","boxplot-notched":"boxplot-notched.svg",boxplot:iT,bubble:sT,calendar:aT,canvas:lT,"cell-type-num":"cell-type-num.svg","cell-type-txt":"cell-type-txt.svg","checkbox-checked":"checkbox-checked.svg","checkbox-intermediate":"checkbox-intermediate.svg",checkbox:cT,checkmark:dT,"chevron-down":"chevron-down.svg","chevron-first":"chevron-first.svg","chevron-last":"chevron-last.svg","chevron-left":"chevron-left.svg","chevron-right":"chevron-right.svg","chevron-sort":"chevron-sort.svg","chevron-up":"chevron-up.svg","clipboard-copied":"clipboard-copied.svg",clipboard:uT,close:pT,"cloud-download":"cloud-download.svg","cloud-offline":"cloud-offline.svg","cloud-online":"cloud-online.svg","cloud-upload":"cloud-upload.svg",cluster:hT,code:fT,"color-fill":"color-fill.svg","color-none":"color-none.svg","color-stroke":"color-stroke.svg",color:mT,columns:gT,"connected-points":"connected-points.svg",container:yT,cookie:vT,copy:_T,cpu:CT,"data-dimentions":"data-dimentions.svg",debug:wT,"delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg","dendrogram-X-line":"dendrogram-X-line.svg","dendrogram-X":"dendrogram-X.svg","dendrogram-Y-line":"dendrogram-Y-line.svg","dendrogram-Y":"dendrogram-Y.svg","dna-add":"dna-add.svg","dna-import":"dna-import.svg",dna:bT,download:xT,"drag-dots":"drag-dots.svg","drag-horizontal":"drag-horizontal.svg","drag-vertical":"drag-vertical.svg",duplicate:kT,edit:ST,"error-bar":"error-bar.svg",error:ET,"expand-left":"expand-left.svg","expand-right":"expand-right.svg",export:"export.svg","file-doc-add":"file-doc-add.svg","file-doc-download":"file-doc-download.svg","file-doc-import":"file-doc-import.svg","file-doc":"file-doc.svg","filter-on":"filter-on.svg",filter:TT,"fire-tips":"fire-tips.svg","folder-parent":"folder-parent.svg","frame-type-all":"frame-type-all.svg","frame-type-bottom":"frame-type-bottom.svg","frame-type-left-bottom":"frame-type-left-bottom.svg","frame-type-left":"frame-type-left.svg","frame-type-none":"frame-type-none.svg",generate:NT,graph:AT,heatmap:VT,"help-outline":"help-outline.svg",help:BT,"info-outline":"info-outline.svg",info:PT,jitter:RT,"jump-link":"jump-link.svg",lasso:DT,layers:IT,learn:FT,"legend-box-dot":"legend-box-dot.svg","legend-box":"legend-box.svg",legend:OT,"line-binned":"line-binned.svg","line-error":"line-error.svg","line-jitter":"line-jitter.svg",line:LT,"linetype-dashed":"linetype-dashed.svg","linetype-dotdash":"linetype-dotdash.svg","linetype-dotted":"linetype-dotted.svg","linetype-longdash":"linetype-longdash.svg","linetype-solid":"linetype-solid.svg","linetype-twodash":"linetype-twodash.svg","link-disabled":"link-disabled.svg",link:MT,loading:GT,lock:$T,maximize:zT,menu:UT,minimize:ZT,minus:jT,more:WT,"paper-clip":"paper-clip.svg",pause:HT,pin:qT,play:KT,"position-bottom-annotation":"position-bottom-annotation.svg","position-bottom":"position-bottom.svg","position-left-annotation":"position-left-annotation.svg","position-left":"position-left.svg","position-right-annotation":"position-right-annotation.svg","position-right":"position-right.svg","position-top-annotation":"position-top-annotation.svg","position-top":"position-top.svg",product:XT,publications:YT,"radio-button-checked":"radio-button-checked.svg","radio-button":"radio-button.svg",renew:JT,restart:QT,reverse:eN,"rotation-0":"rotation-0.svg","rotation-45":"rotation-45.svg","rotation-90":"rotation-90.svg",search:tN,"server-on":"server-on.svg",server:nN,settings:rN,sina:oN,skatterplot:iN,slice:sN,"social-github":"social-github.svg","social-linkedin":"social-linkedin.svg","social-twitter-X":"social-twitter-X.svg","social-twitter-bird":"social-twitter-bird.svg","social-youtube":"social-youtube.svg","sort-list-down":"sort-list-down.svg","sort-list-up":"sort-list-up.svg",sort:aN,statistics:lN,stop:cN,"strip-plot":"strip-plot.svg",success:dN,"table-add":"table-add.svg","table-alias":"table-alias.svg","table-import":"table-import.svg",table:uN,template:pN,terminal:hN,"text-align-center":"text-align-center.svg","text-align-left":"text-align-left.svg","text-align-right":"text-align-right.svg","theme-dark":"theme-dark.svg","theme-light":"theme-light.svg",time:fN,tune:mN,venn:gN,"view-hide":"view-hide.svg","view-show":"view-show.svg","violin-binned":"violin-binned.svg","violin-jitter":"violin-jitter.svg",violin:yN,warning:vN,wetlab:_N,"windows-collapse":"windows-collapse.svg","windows-expand":"windows-expand.svg","x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:CN,"zoom-in":"zoom-in.svg","zoom-out":"zoom-out.svg"};function bN(){return{txtSec:{title:"Text",data:{"--txt-00":{light:[!1,!1],value:["#FFFFFF","#FFFFFF"],description:"Text on the colored elements"},"--txt-01":{light:[!0,!1],value:["#110529","#FFFFFF"],description:"Primary text layer"},"--txt-02":{light:[!0,!1],value:["#231842","#ADAEB8"],description:"Secondary text layer - large arrays of text"},"--txt-03":{light:[!0,!0],value:["#9D9EAE","#60616B"],description:"Tetritary text layer - hints and descriptions"},"--txt-mask":{light:[!1,!0],value:["#CFD1DB","#3D3D42"],description:"Text mask in inputs, icons, etc."},"--txt-focus":{light:[!0,!0],value:["#07AD3E","#87E087"],description:"Colored text in active/focus elements"},"--txt-error":{light:[!0,!0],value:["#F1222F","#FF5C5C"],description:"Colored text in error elements"},"--txt-link":{light:[!0,!0],value:["#5F31CC","#9470FF"],description:"Colored text in links"}}},iconSec:{title:"Icon",data:{"--ic-00":{light:[!1,!1],value:["#FFFFFF","#FFFFFF"],description:"Icons on colored elements"},"--ic-01":{light:[!0,!1],value:["#110529","#FFFFFF"],description:"Primary elements"},"--ic-02":{light:[!1,!0],value:["#CFD1DB","#60616B"],description:"Secondary & tetritary elements"},"--ic-accent":{light:[!0,!1],value:["#07AD3E","#87E087"],description:"Focus/active elements"}}},borderSec:{title:"Border",data:{"--border-color-default":{light:[!0,!0],value:["#110529","#60616B"],description:"Main border for components"},"--border-color-hover":{light:[!0,!0],value:["#231842","#ADAEB8"],description:"Hover on main border"},"--border-color-focus":{light:[!1,!1],value:["#49CC49","#49CC49"],description:"Active border for components"},"--border-color-error":{light:[!1,!1],value:["#FF5C5C","#FF5C5C"],description:"Error border for components"},"--border-color-div-grey":{light:[!1,!0],value:["#E1E3EB","#232329"],description:"Divider lines low contrast"},"--border-color-div-bw":{light:[!1,!0],value:["#FFFFFF","#000000"],description:"Divider lines hight contrast"}}},btnSec:{title:"Button",data:{"--btn-accent-default":{light:[!0,!0],value:["#845CFF"," #5F31CC"],description:"Accent coloured button"},"--btn-accent-hover":{light:[!0,!0],value:["#9470FF"," #5F31CC"],description:"Hover on accent coloured button"},"--btn-accent-press":{light:[!0,!0],value:["#6F4DD6","#5F31CC"],description:"Pressed on accent coloured button"},"--btn-primary-default":{light:[!0,!0],value:["#110529","#5F31CC"],description:"Primary button"},"--btn-primary-hover":{light:[!0,!0],value:["#231842","#6D3DDB"],description:"Hover on primary button"},"--btn-primary-press":{light:[!0,!0],value:["#080214","#5328B8"],description:"Hover on primary button"},"--btn-sec-hover-white":{light:[!1,!0],value:["rgba(255, 255, 255, 0.50)","rgba(131, 131, 163, 0.16)"],description:"Hover background on transparent button"},"--btn-sec-hover-grey":{light:[!1,!0],value:["rgba(155, 171, 204, 0.16)","rgba(131, 131, 163, 0.16)"],description:"Hover background on ghost button & icons"},"--btn-sec-press-grey":{light:[!1,!0],value:["rgba(155, 171, 204, 0.24)","rgba(131, 131, 163, 0.24)"],description:"Hover background on ghost button & icons"},"--btn-active-select":{light:[!1,!0],value:["rgba(99, 224, 36, 0.24)","rgba(99, 224, 36, 0.24)"],description:"Fill on selected elements"},"--btn-switcher":{light:[!1,!0],value:["linear-gradient(180deg, #A1E59C 0%, #D0F5B0 100%)","#5E5E70"],description:"Gradient on active controll/switcher element"}}},disSec:{title:"Disable",data:{"--dis-00":{light:[!1,!0],value:["#FFFFFF","#65656B"],description:"Elements on dis-01, labels, texts, icons"},"--dis-01":{light:[!1,!0],value:["#CFD1DB","#3D3D42"],description:"Buttons, borders, labels, texts, icons"}}},bgSec:{title:"Background",data:{"--bg-base-dark":{light:[!0,!0],value:["#110529","#0D0D0F"],description:"Default dark block background"},"--bg-base-light":{light:[!1,!0],value:["#F7F8FA","#0D0D0F"],description:"Default light block background"},"--bg-elevated-01":{light:[!1,!0],value:["#FFFFFF","#1B1B1F"],description:"Default block background"},"--bg-elevated-02":{light:[!1,!0],value:["#E1E3EB","#2D2D33"],description:"Secondary block background"}}},filledSec:{title:"Filled",data:{"--filled-V-BG":{light:[!1,!0],value:["#D0F0C0","rgba(66, 184, 66, 0.40)"],description:"Text background selection on V-read"},"--filled-D-BG":{light:[!1,!0],value:["#FFCECC","rgba(229, 83, 229, 0.40)"],description:"Text background selection on D-read"},"--filled-N-BG":{light:[!1,!0],value:["#FAF5AA","rgba(83, 82, 102, 0.40)"],description:"Text background selection on C/N-read"},"--filled-J-BG":{light:[!1,!0],value:["#DEDBFF","rgba(132, 92, 255, 0.40)"],description:"Text background selection on J-read"}}},notificationSec:{title:"Notification",data:{"--notification-neutral":{light:[!1,!0],value:["linear-gradient(90deg, #D6D9FF 0%, #FFF 100%)","linear-gradient(90deg, #4D4D8F 0%, #292933 100%)"],description:"Background on neutral blocks"},"--notification-success":{light:[!1,!0],value:["linear-gradient(90deg, #C9F0B6 0%, #FFF 100%)","linear-gradient(90deg, #305C3E 0%, #292933 100%)"],description:"Background on success blocks"},"--notification-warning":{light:[!1,!0],value:["linear-gradient(90deg, #FEE0A3 0%, #FFF 100%)","linear-gradient(90deg, #754F2D 0%, #292933 100%)"],description:"Background on warning blocks"},"--notification-error":{light:[!1,!0],value:["linear-gradient(90deg, #FFB8B8 0%, #FFF 100%)","linear-gradient(90deg, #8F3343 0%, #292933 100%)"],description:"Background on error blocks"}}},gradientSec:{title:"Gradient",data:{"--gradient-blue-green":{light:[!0,!0],value:["linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand dark gradient"},"--gradient-green-lime":{light:[!1,!0],value:["linear-gradient(180deg, #A1E59C 0%, #D0F5B0 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand light gradient"},"--gradient-blue-violet":{light:[!1,!0],value:["linear-gradient(180deg, #ADB8FF 0%, #D6E9FF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Main brand light gradient"},"--gradient-blue-clear":{light:[!1,!0],value:["linear-gradient(180deg, #85BEFF 0%, #CEF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-orange":{light:[!1,!0],value:["linear-gradient(180deg, #FFB766 0%, #FFEAA3 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-mint":{light:[!1,!0],value:["linear-gradient(180deg, #7DD1D1 0%, #C8FAE9 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-lime":{light:[!1,!0],value:["linear-gradient(180deg, #BFE062 0%, #E4FFAD 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-rose":{light:[!1,!0],value:["linear-gradient(0deg, #FFDDD6 0%, #FF99C9 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-red":{light:[!1,!0],value:["linear-gradient(0deg, #FFD5CC 0%, #FF9494 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"},"--gradient-violet":{light:[!1,!0],value:["linear-gradient(180deg, #BCA3FF 0%, #E5E5FF 100%)","linear-gradient(0deg, #478063 0%, #2E4652 45.93%, #24223D 91.63%)"],description:"Additional brand gradient"}}}}}const xN=["add","arrow-down","arrow-left","arrow-link","arrow-right","arrow-up","box","calendar","caret-down","caret-left","caret-right","caret-up","cell-type-num","cell-type-txt","checkmark","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-up","clipboard-copied","clipboard","close","copy","data-dimentions","delete-bin","delete-circle","delete-clear","download","drag-dots","duplicate","edit","error","export","filter-on","filter","help-outline","help","info-outline","info","jump-link","link","loading","lock","maximize","minimize","minus","more","open","paper-clip","pause","play","renew","restart","reverse","settings","sort","stop","success","time","tune","warning","x-axis","y-axis","zip"],kN=["add-layer","add","align-center","align-left","align-right","annotate","annotation","area","arrow-down","arrow-left","arrow-link","arrow-right","arrow-up","axes","bar-cross","bar-error","bar-stacked","bar-trend","bar","bindot","box","boxplot-binned","boxplot-jitter","boxplot-notched","boxplot","bubble","calendar","canvas","cell-type-num","cell-type-txt","checkbox-checked","checkbox-intermediate","checkbox","checkmark","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-sort","chevron-up","clipboard-copied","clipboard","close","cloud-download","cloud-offline","cloud-online","cloud-upload","cluster","code","color-fill","color-none","color-stroke","color","columns","connected-points","container","cookie","copy","cpu","data-dimentions","debug","delete-bin","delete-circle","delete-clear","dendrogram-X-line","dendrogram-X","dendrogram-Y-line","dendrogram-Y","dna-add","dna-import","dna","download","drag-dots","drag-horizontal","drag-vertical","duplicate","edit","error-bar","error","expand-left","expand-right","export","file-doc-add","file-doc-download","file-doc-import","file-doc","filter-on","filter","fire-tips","folder-parent","frame-type-all","frame-type-bottom","frame-type-left-bottom","frame-type-left","frame-type-none","generate","graph","heatmap","help-outline","help","info-outline","info","jitter","jump-link","lasso","layers","learn","legend-box-dot","legend-box","legend","line-binned","line-error","line-jitter","line","linetype-dashed","linetype-dotdash","linetype-dotted","linetype-longdash","linetype-solid","linetype-twodash","link-disabled","link","loading","lock","maximize","menu","minimize","minus","more","paper-clip","pause","pin","play","position-bottom-annotation","position-bottom","position-left-annotation","position-left","position-right-annotation","position-right","position-top-annotation","position-top","product","publications","radio-button-checked","radio-button","renew","restart","reverse","rotation-0","rotation-45","rotation-90","search","server-on","server","settings","sina","skatterplot","slice","social-github","social-linkedin","social-twitter-X","social-twitter-bird","social-youtube","sort-list-down","sort-list-up","sort","statistics","stop","strip-plot","success","table-add","table-alias","table-import","table","template","terminal","text-align-center","text-align-left","text-align-right","theme-dark","theme-light","time","tune","venn","view-hide","view-show","violin-binned","violin-jitter","violin","warning","wetlab","windows-collapse","windows-expand","x-axis","y-axis","zip","zoom-in","zoom-out"],SN={allCssVariables:bN(),icons16:X1,icons24:wN},EN={class:"block__not-found"},TN=r.defineComponent({__name:"NotFound",setup(t){const n=_l().useApp(),o=()=>{n.updateNavigationState(i=>{i.href="/"})};return(i,l)=>(r.openBlock(),r.createElementBlock("div",EN,[r.createElementVNode("h1",null,"Not found route: "+r.toDisplayString(r.unref(n).snapshot.navigationState.href),1),r.createVNode(r.unref(Pl),{onClick:r.withModifiers(o,["stop"])},{default:r.withCtx(()=>l[0]||(l[0]=[r.createTextVNode("Return to main page")])),_:1})]))}}),Xl=(t,e)=>{const n=t.__vccOpts||t;for(const[o,i]of e)n[o]=i;return n},NN={},AN={class:"block__loader-page"};function VN(t,e){return r.openBlock(),r.createElementBlock("div",AN,e[0]||(e[0]=[r.createElementVNode("div",{class:"loader-container"},[r.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"})],-1)]))}const BN=Xl(NN,[["render",VN]]),PN={class:"pl-app-notification-alert"},RN={class:"pl-app-notification-alert__content"},DN={class:"pl-app-notification-alert__title"},IN=r.defineComponent({__name:"PlAppErrorNotificationAlert",props:{errors:{}},setup(t){const e=t,n=r.ref(!1),o=r.ref(!0),i=r.computed(()=>Object.entries(e.errors).filter(c=>!!c[1]));function l(){n.value=!0}return r.watch(()=>e.errors,c=>{o.value=Object.values(c).some(d=>!!d)},{immediate:!0,deep:!0}),(c,d)=>(r.openBlock(),r.createElementBlock("div",PN,[r.createVNode(r.unref(zl),{modelValue:n.value,"onUpdate:modelValue":d[0]||(d[0]=p=>n.value=p),width:"720px",style:{"max-height":"100vh"}},{title:r.withCtx(()=>d[2]||(d[2]=[r.createTextVNode(" Errors ")])),default:r.withCtx(()=>[r.createElementVNode("div",RN,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(i.value,p=>{var h;return r.openBlock(),r.createElementBlock("div",{key:p[0],class:"pl-app-notification-alert__item"},[r.createElementVNode("div",DN,r.toDisplayString(p[0]),1),r.createVNode(r.unref(bp),{value:(h=p[1])==null?void 0:h.message},null,8,["value"])])}),128))])]),_:1},8,["modelValue"]),r.createVNode(r.unref(Zp),{modelValue:o.value,"onUpdate:modelValue":d[1]||(d[1]=p=>o.value=p),type:"error",closable:""},{actions:r.withCtx(()=>[r.createVNode(r.unref(Ns),{icon:"arrow-right",onClick:l},{default:r.withCtx(()=>d[3]||(d[3]=[r.createTextVNode("See errors")])),_:1}),r.createVNode(r.unref(lp))]),default:r.withCtx(()=>[d[4]||(d[4]=r.createTextVNode(" Some outputs have errors. "))]),_:1},8,["modelValue"])]))}}),FN={key:0,class:"block__loader"},ON=r.defineComponent({__name:"BlockLoader",props:{value:{type:[Boolean,Number]}},setup(t){const e=t,n=r.computed(()=>typeof e.value=="boolean"&&e.value),o=r.computed(()=>{const i=e.value;if(typeof i=="number")return i>=1?void 0:(i*100).toFixed(2)+"%"});return(i,l)=>n.value?(r.openBlock(),r.createElementBlock("div",FN)):o.value!==void 0?(r.openBlock(),r.createElementBlock("div",{key:1,class:"block__progress",style:r.normalizeStyle({"--progress-width":o.value})},null,4)):r.createCommentVNode("",!0)}}),LN={class:"block block__layout"},MN={key:0},GN=r.defineComponent({__name:"BlockLayout",setup(t){const e=_l(),n=h=>{try{return new URL(h,"http://dummy").pathname}catch{console.error("Invalid href",h);return}},o=r.computed(()=>e.loaded?e.useApp().href:void 0),i=r.computed(()=>{if(e.loaded){const h=e.useApp(),m=n(h.snapshot.navigationState.href);return m?h.getRoute(m):void 0}}),l=r.computed(()=>e.loaded?e.useApp():void 0),c=r.computed(()=>l.value?l.value.model.outputErrors:{}),d=r.computed(()=>{var h;return((h=l.value)==null?void 0:h.showErrorsNotification)??!0}),p=r.computed(()=>{var h,m;return(m=(h=l.value)==null?void 0:h.progress)==null?void 0:m.call(h)});return(h,m)=>(r.openBlock(),r.createElementBlock("div",LN,[r.createVNode(ON,{value:p.value},null,8,["value"]),r.unref(e).error?(r.openBlock(),r.createElementBlock("div",MN,r.toDisplayString(r.unref(e).error),1)):r.unref(e).loaded?i.value?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(i.value),{key:o.value})):(r.openBlock(),r.createBlock(TN,{key:3})):(r.openBlock(),r.createBlock(BN,{key:1},{default:r.withCtx(()=>m[0]||(m[0]=[r.createTextVNode("Loading...")])),_:1})),r.unref(e).loaded&&d.value?(r.openBlock(),r.createBlock(r.unref(IN),{key:4,errors:c.value},null,8,["errors"])):r.createCommentVNode("",!0)]))}});var $s={exports:{}};/**
|
|
66
66
|
* @license
|
|
67
67
|
* Lodash <https://lodash.com/>
|
|
68
68
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
69
69
|
* Released under MIT license <https://lodash.com/license>
|
|
70
70
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
71
71
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
72
|
-
*/Fs.exports,function(t,e){(function(){var n,o="4.17.21",s=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",u="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",f=500,m="__lodash_placeholder__",y=1,T=2,B=4,A=1,I=2,L=1,C=2,R=4,O=8,F=16,N=32,U=64,te=128,j=256,Y=512,q=30,ee="...",G=800,S=16,w=1,k=2,$=3,Q=1/0,ne=9007199254740991,be=17976931348623157e292,$e=NaN,ot=4294967295,wn=ot-1,In=ot>>>1,xr=[["ary",te],["bind",L],["bindKey",C],["curry",O],["curryRight",F],["flip",Y],["partial",N],["partialRight",U],["rearg",j]],jn="[object Arguments]",Jr="[object Array]",Os="[object AsyncFunction]",kr="[object Boolean]",Sr="[object Date]",Ls="[object DOMException]",Se="[object Error]",Xr="[object Function]",Fp="[object GeneratorFunction]",bn="[object Map]",Oi="[object Number]",vB="[object Null]",qn="[object Object]",Rp="[object Promise]",CB="[object Proxy]",Li="[object RegExp]",xn="[object Set]",Gi="[object String]",Gs="[object Symbol]",wB="[object Undefined]",zi="[object WeakMap]",bB="[object WeakSet]",$i="[object ArrayBuffer]",Ao="[object DataView]",Gl="[object Float32Array]",zl="[object Float64Array]",$l="[object Int8Array]",Ul="[object Int16Array]",Zl="[object Int32Array]",Wl="[object Uint8Array]",Hl="[object Uint8ClampedArray]",jl="[object Uint16Array]",ql="[object Uint32Array]",xB=/\b__p \+= '';/g,kB=/\b(__p \+=) '' \+/g,SB=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Mp=/&(?:amp|lt|gt|quot|#39);/g,Ip=/[&<>"']/g,EB=RegExp(Mp.source),TB=RegExp(Ip.source),BB=/<%-([\s\S]+?)%>/g,VB=/<%([\s\S]+?)%>/g,Op=/<%=([\s\S]+?)%>/g,NB=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,AB=/^\w*$/,PB=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Kl=/[\\^$.*+?()[\]{}|]/g,DB=RegExp(Kl.source),Yl=/^\s+/,FB=/\s/,RB=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,MB=/\{\n\/\* \[wrapped with (.+)\] \*/,IB=/,? & /,OB=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,LB=/[()=,{}\[\]\/\s]/,GB=/\\(\\)?/g,zB=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Lp=/\w*$/,$B=/^[-+]0x[0-9a-f]+$/i,UB=/^0b[01]+$/i,ZB=/^\[object .+?Constructor\]$/,WB=/^0o[0-7]+$/i,HB=/^(?:0|[1-9]\d*)$/,jB=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,zs=/($^)/,qB=/['\n\r\u2028\u2029\\]/g,$s="\\ud800-\\udfff",KB="\\u0300-\\u036f",YB="\\ufe20-\\ufe2f",JB="\\u20d0-\\u20ff",Gp=KB+YB+JB,zp="\\u2700-\\u27bf",$p="a-z\\xdf-\\xf6\\xf8-\\xff",XB="\\xac\\xb1\\xd7\\xf7",QB="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",eV="\\u2000-\\u206f",tV=" \\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",Up="A-Z\\xc0-\\xd6\\xd8-\\xde",Zp="\\ufe0e\\ufe0f",Wp=XB+QB+eV+tV,Jl="['’]",nV="["+$s+"]",Hp="["+Wp+"]",Us="["+Gp+"]",jp="\\d+",rV="["+zp+"]",qp="["+$p+"]",Kp="[^"+$s+Wp+jp+zp+$p+Up+"]",Xl="\\ud83c[\\udffb-\\udfff]",oV="(?:"+Us+"|"+Xl+")",Yp="[^"+$s+"]",Ql="(?:\\ud83c[\\udde6-\\uddff]){2}",ec="[\\ud800-\\udbff][\\udc00-\\udfff]",Po="["+Up+"]",Jp="\\u200d",Xp="(?:"+qp+"|"+Kp+")",iV="(?:"+Po+"|"+Kp+")",Qp="(?:"+Jl+"(?:d|ll|m|re|s|t|ve))?",eh="(?:"+Jl+"(?:D|LL|M|RE|S|T|VE))?",th=oV+"?",nh="["+Zp+"]?",sV="(?:"+Jp+"(?:"+[Yp,Ql,ec].join("|")+")"+nh+th+")*",aV="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",lV="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",rh=nh+th+sV,cV="(?:"+[rV,Ql,ec].join("|")+")"+rh,dV="(?:"+[Yp+Us+"?",Us,Ql,ec,nV].join("|")+")",uV=RegExp(Jl,"g"),pV=RegExp(Us,"g"),tc=RegExp(Xl+"(?="+Xl+")|"+dV+rh,"g"),hV=RegExp([Po+"?"+qp+"+"+Qp+"(?="+[Hp,Po,"$"].join("|")+")",iV+"+"+eh+"(?="+[Hp,Po+Xp,"$"].join("|")+")",Po+"?"+Xp+"+"+Qp,Po+"+"+eh,lV,aV,jp,cV].join("|"),"g"),fV=RegExp("["+Jp+$s+Gp+Zp+"]"),mV=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,gV=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],yV=-1,Ye={};Ye[Gl]=Ye[zl]=Ye[$l]=Ye[Ul]=Ye[Zl]=Ye[Wl]=Ye[Hl]=Ye[jl]=Ye[ql]=!0,Ye[jn]=Ye[Jr]=Ye[$i]=Ye[kr]=Ye[Ao]=Ye[Sr]=Ye[Se]=Ye[Xr]=Ye[bn]=Ye[Oi]=Ye[qn]=Ye[Li]=Ye[xn]=Ye[Gi]=Ye[zi]=!1;var qe={};qe[jn]=qe[Jr]=qe[$i]=qe[Ao]=qe[kr]=qe[Sr]=qe[Gl]=qe[zl]=qe[$l]=qe[Ul]=qe[Zl]=qe[bn]=qe[Oi]=qe[qn]=qe[Li]=qe[xn]=qe[Gi]=qe[Gs]=qe[Wl]=qe[Hl]=qe[jl]=qe[ql]=!0,qe[Se]=qe[Xr]=qe[zi]=!1;var _V={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},vV={"&":"&","<":"<",">":">",'"':""","'":"'"},CV={"&":"&","<":"<",">":">",""":'"',"'":"'"},wV={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},bV=parseFloat,xV=parseInt,oh=typeof Ho=="object"&&Ho&&Ho.Object===Object&&Ho,kV=typeof self=="object"&&self&&self.Object===Object&&self,yt=oh||kV||Function("return this")(),nc=e&&!e.nodeType&&e,Qr=nc&&!0&&t&&!t.nodeType&&t,ih=Qr&&Qr.exports===nc,rc=ih&&oh.process,Jt=function(){try{var P=Qr&&Qr.require&&Qr.require("util").types;return P||rc&&rc.binding&&rc.binding("util")}catch{}}(),sh=Jt&&Jt.isArrayBuffer,ah=Jt&&Jt.isDate,lh=Jt&&Jt.isMap,ch=Jt&&Jt.isRegExp,dh=Jt&&Jt.isSet,uh=Jt&&Jt.isTypedArray;function Wt(P,Z,z){switch(z.length){case 0:return P.call(Z);case 1:return P.call(Z,z[0]);case 2:return P.call(Z,z[0],z[1]);case 3:return P.call(Z,z[0],z[1],z[2])}return P.apply(Z,z)}function SV(P,Z,z,ce){for(var ke=-1,Ue=P==null?0:P.length;++ke<Ue;){var ut=P[ke];Z(ce,ut,z(ut),P)}return ce}function Xt(P,Z){for(var z=-1,ce=P==null?0:P.length;++z<ce&&Z(P[z],z,P)!==!1;);return P}function EV(P,Z){for(var z=P==null?0:P.length;z--&&Z(P[z],z,P)!==!1;);return P}function ph(P,Z){for(var z=-1,ce=P==null?0:P.length;++z<ce;)if(!Z(P[z],z,P))return!1;return!0}function Er(P,Z){for(var z=-1,ce=P==null?0:P.length,ke=0,Ue=[];++z<ce;){var ut=P[z];Z(ut,z,P)&&(Ue[ke++]=ut)}return Ue}function Zs(P,Z){var z=P==null?0:P.length;return!!z&&Do(P,Z,0)>-1}function oc(P,Z,z){for(var ce=-1,ke=P==null?0:P.length;++ce<ke;)if(z(Z,P[ce]))return!0;return!1}function Xe(P,Z){for(var z=-1,ce=P==null?0:P.length,ke=Array(ce);++z<ce;)ke[z]=Z(P[z],z,P);return ke}function Tr(P,Z){for(var z=-1,ce=Z.length,ke=P.length;++z<ce;)P[ke+z]=Z[z];return P}function ic(P,Z,z,ce){var ke=-1,Ue=P==null?0:P.length;for(ce&&Ue&&(z=P[++ke]);++ke<Ue;)z=Z(z,P[ke],ke,P);return z}function TV(P,Z,z,ce){var ke=P==null?0:P.length;for(ce&&ke&&(z=P[--ke]);ke--;)z=Z(z,P[ke],ke,P);return z}function sc(P,Z){for(var z=-1,ce=P==null?0:P.length;++z<ce;)if(Z(P[z],z,P))return!0;return!1}var BV=ac("length");function VV(P){return P.split("")}function NV(P){return P.match(OB)||[]}function hh(P,Z,z){var ce;return z(P,function(ke,Ue,ut){if(Z(ke,Ue,ut))return ce=Ue,!1}),ce}function Ws(P,Z,z,ce){for(var ke=P.length,Ue=z+(ce?1:-1);ce?Ue--:++Ue<ke;)if(Z(P[Ue],Ue,P))return Ue;return-1}function Do(P,Z,z){return Z===Z?$V(P,Z,z):Ws(P,fh,z)}function AV(P,Z,z,ce){for(var ke=z-1,Ue=P.length;++ke<Ue;)if(ce(P[ke],Z))return ke;return-1}function fh(P){return P!==P}function mh(P,Z){var z=P==null?0:P.length;return z?cc(P,Z)/z:$e}function ac(P){return function(Z){return Z==null?n:Z[P]}}function lc(P){return function(Z){return P==null?n:P[Z]}}function gh(P,Z,z,ce,ke){return ke(P,function(Ue,ut,je){z=ce?(ce=!1,Ue):Z(z,Ue,ut,je)}),z}function PV(P,Z){var z=P.length;for(P.sort(Z);z--;)P[z]=P[z].value;return P}function cc(P,Z){for(var z,ce=-1,ke=P.length;++ce<ke;){var Ue=Z(P[ce]);Ue!==n&&(z=z===n?Ue:z+Ue)}return z}function dc(P,Z){for(var z=-1,ce=Array(P);++z<P;)ce[z]=Z(z);return ce}function DV(P,Z){return Xe(Z,function(z){return[z,P[z]]})}function yh(P){return P&&P.slice(0,wh(P)+1).replace(Yl,"")}function Ht(P){return function(Z){return P(Z)}}function uc(P,Z){return Xe(Z,function(z){return P[z]})}function Ui(P,Z){return P.has(Z)}function _h(P,Z){for(var z=-1,ce=P.length;++z<ce&&Do(Z,P[z],0)>-1;);return z}function vh(P,Z){for(var z=P.length;z--&&Do(Z,P[z],0)>-1;);return z}function FV(P,Z){for(var z=P.length,ce=0;z--;)P[z]===Z&&++ce;return ce}var RV=lc(_V),MV=lc(vV);function IV(P){return"\\"+wV[P]}function OV(P,Z){return P==null?n:P[Z]}function Fo(P){return fV.test(P)}function LV(P){return mV.test(P)}function GV(P){for(var Z,z=[];!(Z=P.next()).done;)z.push(Z.value);return z}function pc(P){var Z=-1,z=Array(P.size);return P.forEach(function(ce,ke){z[++Z]=[ke,ce]}),z}function Ch(P,Z){return function(z){return P(Z(z))}}function Br(P,Z){for(var z=-1,ce=P.length,ke=0,Ue=[];++z<ce;){var ut=P[z];(ut===Z||ut===m)&&(P[z]=m,Ue[ke++]=z)}return Ue}function Hs(P){var Z=-1,z=Array(P.size);return P.forEach(function(ce){z[++Z]=ce}),z}function zV(P){var Z=-1,z=Array(P.size);return P.forEach(function(ce){z[++Z]=[ce,ce]}),z}function $V(P,Z,z){for(var ce=z-1,ke=P.length;++ce<ke;)if(P[ce]===Z)return ce;return-1}function UV(P,Z,z){for(var ce=z+1;ce--;)if(P[ce]===Z)return ce;return ce}function Ro(P){return Fo(P)?WV(P):BV(P)}function kn(P){return Fo(P)?HV(P):VV(P)}function wh(P){for(var Z=P.length;Z--&&FB.test(P.charAt(Z)););return Z}var ZV=lc(CV);function WV(P){for(var Z=tc.lastIndex=0;tc.test(P);)++Z;return Z}function HV(P){return P.match(tc)||[]}function jV(P){return P.match(hV)||[]}var qV=function P(Z){Z=Z==null?yt:Mo.defaults(yt.Object(),Z,Mo.pick(yt,gV));var z=Z.Array,ce=Z.Date,ke=Z.Error,Ue=Z.Function,ut=Z.Math,je=Z.Object,hc=Z.RegExp,KV=Z.String,Qt=Z.TypeError,js=z.prototype,YV=Ue.prototype,Io=je.prototype,qs=Z["__core-js_shared__"],Ks=YV.toString,He=Io.hasOwnProperty,JV=0,bh=function(){var i=/[^.]+$/.exec(qs&&qs.keys&&qs.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),Ys=Io.toString,XV=Ks.call(je),QV=yt._,eN=hc("^"+Ks.call(He).replace(Kl,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Js=ih?Z.Buffer:n,Vr=Z.Symbol,Xs=Z.Uint8Array,xh=Js?Js.allocUnsafe:n,Qs=Ch(je.getPrototypeOf,je),kh=je.create,Sh=Io.propertyIsEnumerable,ea=js.splice,Eh=Vr?Vr.isConcatSpreadable:n,Zi=Vr?Vr.iterator:n,eo=Vr?Vr.toStringTag:n,ta=function(){try{var i=io(je,"defineProperty");return i({},"",{}),i}catch{}}(),tN=Z.clearTimeout!==yt.clearTimeout&&Z.clearTimeout,nN=ce&&ce.now!==yt.Date.now&&ce.now,rN=Z.setTimeout!==yt.setTimeout&&Z.setTimeout,na=ut.ceil,ra=ut.floor,fc=je.getOwnPropertySymbols,oN=Js?Js.isBuffer:n,Th=Z.isFinite,iN=js.join,sN=Ch(je.keys,je),pt=ut.max,kt=ut.min,aN=ce.now,lN=Z.parseInt,Bh=ut.random,cN=js.reverse,mc=io(Z,"DataView"),Wi=io(Z,"Map"),gc=io(Z,"Promise"),Oo=io(Z,"Set"),Hi=io(Z,"WeakMap"),ji=io(je,"create"),oa=Hi&&new Hi,Lo={},dN=so(mc),uN=so(Wi),pN=so(gc),hN=so(Oo),fN=so(Hi),ia=Vr?Vr.prototype:n,qi=ia?ia.valueOf:n,Vh=ia?ia.toString:n;function _(i){if(nt(i)&&!Ee(i)&&!(i instanceof Re)){if(i instanceof en)return i;if(He.call(i,"__wrapped__"))return Af(i)}return new en(i)}var Go=function(){function i(){}return function(a){if(!tt(a))return{};if(kh)return kh(a);i.prototype=a;var d=new i;return i.prototype=n,d}}();function sa(){}function en(i,a){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=n}_.templateSettings={escape:BB,evaluate:VB,interpolate:Op,variable:"",imports:{_}},_.prototype=sa.prototype,_.prototype.constructor=_,en.prototype=Go(sa.prototype),en.prototype.constructor=en;function Re(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ot,this.__views__=[]}function mN(){var i=new Re(this.__wrapped__);return i.__actions__=Ft(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Ft(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Ft(this.__views__),i}function gN(){if(this.__filtered__){var i=new Re(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function yN(){var i=this.__wrapped__.value(),a=this.__dir__,d=Ee(i),h=a<0,g=d?i.length:0,v=VA(0,g,this.__views__),E=v.start,V=v.end,D=V-E,W=h?V:E-1,H=this.__iteratees__,K=H.length,oe=0,ue=kt(D,this.__takeCount__);if(!d||!h&&g==D&&ue==D)return Qh(i,this.__actions__);var ge=[];e:for(;D--&&oe<ue;){W+=a;for(var Pe=-1,ye=i[W];++Pe<K;){var Fe=H[Pe],Me=Fe.iteratee,Kt=Fe.type,Pt=Me(ye);if(Kt==k)ye=Pt;else if(!Pt){if(Kt==w)continue e;break e}}ge[oe++]=ye}return ge}Re.prototype=Go(sa.prototype),Re.prototype.constructor=Re;function to(i){var a=-1,d=i==null?0:i.length;for(this.clear();++a<d;){var h=i[a];this.set(h[0],h[1])}}function _N(){this.__data__=ji?ji(null):{},this.size=0}function vN(i){var a=this.has(i)&&delete this.__data__[i];return this.size-=a?1:0,a}function CN(i){var a=this.__data__;if(ji){var d=a[i];return d===p?n:d}return He.call(a,i)?a[i]:n}function wN(i){var a=this.__data__;return ji?a[i]!==n:He.call(a,i)}function bN(i,a){var d=this.__data__;return this.size+=this.has(i)?0:1,d[i]=ji&&a===n?p:a,this}to.prototype.clear=_N,to.prototype.delete=vN,to.prototype.get=CN,to.prototype.has=wN,to.prototype.set=bN;function Kn(i){var a=-1,d=i==null?0:i.length;for(this.clear();++a<d;){var h=i[a];this.set(h[0],h[1])}}function xN(){this.__data__=[],this.size=0}function kN(i){var a=this.__data__,d=aa(a,i);if(d<0)return!1;var h=a.length-1;return d==h?a.pop():ea.call(a,d,1),--this.size,!0}function SN(i){var a=this.__data__,d=aa(a,i);return d<0?n:a[d][1]}function EN(i){return aa(this.__data__,i)>-1}function TN(i,a){var d=this.__data__,h=aa(d,i);return h<0?(++this.size,d.push([i,a])):d[h][1]=a,this}Kn.prototype.clear=xN,Kn.prototype.delete=kN,Kn.prototype.get=SN,Kn.prototype.has=EN,Kn.prototype.set=TN;function Yn(i){var a=-1,d=i==null?0:i.length;for(this.clear();++a<d;){var h=i[a];this.set(h[0],h[1])}}function BN(){this.size=0,this.__data__={hash:new to,map:new(Wi||Kn),string:new to}}function VN(i){var a=va(this,i).delete(i);return this.size-=a?1:0,a}function NN(i){return va(this,i).get(i)}function AN(i){return va(this,i).has(i)}function PN(i,a){var d=va(this,i),h=d.size;return d.set(i,a),this.size+=d.size==h?0:1,this}Yn.prototype.clear=BN,Yn.prototype.delete=VN,Yn.prototype.get=NN,Yn.prototype.has=AN,Yn.prototype.set=PN;function no(i){var a=-1,d=i==null?0:i.length;for(this.__data__=new Yn;++a<d;)this.add(i[a])}function DN(i){return this.__data__.set(i,p),this}function FN(i){return this.__data__.has(i)}no.prototype.add=no.prototype.push=DN,no.prototype.has=FN;function Sn(i){var a=this.__data__=new Kn(i);this.size=a.size}function RN(){this.__data__=new Kn,this.size=0}function MN(i){var a=this.__data__,d=a.delete(i);return this.size=a.size,d}function IN(i){return this.__data__.get(i)}function ON(i){return this.__data__.has(i)}function LN(i,a){var d=this.__data__;if(d instanceof Kn){var h=d.__data__;if(!Wi||h.length<s-1)return h.push([i,a]),this.size=++d.size,this;d=this.__data__=new Yn(h)}return d.set(i,a),this.size=d.size,this}Sn.prototype.clear=RN,Sn.prototype.delete=MN,Sn.prototype.get=IN,Sn.prototype.has=ON,Sn.prototype.set=LN;function Nh(i,a){var d=Ee(i),h=!d&&ao(i),g=!d&&!h&&Fr(i),v=!d&&!h&&!g&&Zo(i),E=d||h||g||v,V=E?dc(i.length,KV):[],D=V.length;for(var W in i)(a||He.call(i,W))&&!(E&&(W=="length"||g&&(W=="offset"||W=="parent")||v&&(W=="buffer"||W=="byteLength"||W=="byteOffset")||er(W,D)))&&V.push(W);return V}function Ah(i){var a=i.length;return a?i[Tc(0,a-1)]:n}function GN(i,a){return Ca(Ft(i),ro(a,0,i.length))}function zN(i){return Ca(Ft(i))}function yc(i,a,d){(d!==n&&!En(i[a],d)||d===n&&!(a in i))&&Jn(i,a,d)}function Ki(i,a,d){var h=i[a];(!(He.call(i,a)&&En(h,d))||d===n&&!(a in i))&&Jn(i,a,d)}function aa(i,a){for(var d=i.length;d--;)if(En(i[d][0],a))return d;return-1}function $N(i,a,d,h){return Nr(i,function(g,v,E){a(h,g,d(g),E)}),h}function Ph(i,a){return i&&Ln(a,gt(a),i)}function UN(i,a){return i&&Ln(a,Mt(a),i)}function Jn(i,a,d){a=="__proto__"&&ta?ta(i,a,{configurable:!0,enumerable:!0,value:d,writable:!0}):i[a]=d}function _c(i,a){for(var d=-1,h=a.length,g=z(h),v=i==null;++d<h;)g[d]=v?n:Xc(i,a[d]);return g}function ro(i,a,d){return i===i&&(d!==n&&(i=i<=d?i:d),a!==n&&(i=i>=a?i:a)),i}function tn(i,a,d,h,g,v){var E,V=a&y,D=a&T,W=a&B;if(d&&(E=g?d(i,h,g,v):d(i)),E!==n)return E;if(!tt(i))return i;var H=Ee(i);if(H){if(E=AA(i),!V)return Ft(i,E)}else{var K=St(i),oe=K==Xr||K==Fp;if(Fr(i))return nf(i,V);if(K==qn||K==jn||oe&&!g){if(E=D||oe?{}:bf(i),!V)return D?CA(i,UN(E,i)):vA(i,Ph(E,i))}else{if(!qe[K])return g?i:{};E=PA(i,K,V)}}v||(v=new Sn);var ue=v.get(i);if(ue)return ue;v.set(i,E),Jf(i)?i.forEach(function(ye){E.add(tn(ye,a,d,ye,i,v))}):Kf(i)&&i.forEach(function(ye,Fe){E.set(Fe,tn(ye,a,d,Fe,i,v))});var ge=W?D?Oc:Ic:D?Mt:gt,Pe=H?n:ge(i);return Xt(Pe||i,function(ye,Fe){Pe&&(Fe=ye,ye=i[Fe]),Ki(E,Fe,tn(ye,a,d,Fe,i,v))}),E}function ZN(i){var a=gt(i);return function(d){return Dh(d,i,a)}}function Dh(i,a,d){var h=d.length;if(i==null)return!h;for(i=je(i);h--;){var g=d[h],v=a[g],E=i[g];if(E===n&&!(g in i)||!v(E))return!1}return!0}function Fh(i,a,d){if(typeof i!="function")throw new Qt(c);return ns(function(){i.apply(n,d)},a)}function Yi(i,a,d,h){var g=-1,v=Zs,E=!0,V=i.length,D=[],W=a.length;if(!V)return D;d&&(a=Xe(a,Ht(d))),h?(v=oc,E=!1):a.length>=s&&(v=Ui,E=!1,a=new no(a));e:for(;++g<V;){var H=i[g],K=d==null?H:d(H);if(H=h||H!==0?H:0,E&&K===K){for(var oe=W;oe--;)if(a[oe]===K)continue e;D.push(H)}else v(a,K,h)||D.push(H)}return D}var Nr=lf(On),Rh=lf(Cc,!0);function WN(i,a){var d=!0;return Nr(i,function(h,g,v){return d=!!a(h,g,v),d}),d}function la(i,a,d){for(var h=-1,g=i.length;++h<g;){var v=i[h],E=a(v);if(E!=null&&(V===n?E===E&&!qt(E):d(E,V)))var V=E,D=v}return D}function HN(i,a,d,h){var g=i.length;for(d=Ve(d),d<0&&(d=-d>g?0:g+d),h=h===n||h>g?g:Ve(h),h<0&&(h+=g),h=d>h?0:Qf(h);d<h;)i[d++]=a;return i}function Mh(i,a){var d=[];return Nr(i,function(h,g,v){a(h,g,v)&&d.push(h)}),d}function _t(i,a,d,h,g){var v=-1,E=i.length;for(d||(d=FA),g||(g=[]);++v<E;){var V=i[v];a>0&&d(V)?a>1?_t(V,a-1,d,h,g):Tr(g,V):h||(g[g.length]=V)}return g}var vc=cf(),Ih=cf(!0);function On(i,a){return i&&vc(i,a,gt)}function Cc(i,a){return i&&Ih(i,a,gt)}function ca(i,a){return Er(a,function(d){return tr(i[d])})}function oo(i,a){a=Pr(a,i);for(var d=0,h=a.length;i!=null&&d<h;)i=i[Gn(a[d++])];return d&&d==h?i:n}function Oh(i,a,d){var h=a(i);return Ee(i)?h:Tr(h,d(i))}function Nt(i){return i==null?i===n?wB:vB:eo&&eo in je(i)?BA(i):zA(i)}function wc(i,a){return i>a}function jN(i,a){return i!=null&&He.call(i,a)}function qN(i,a){return i!=null&&a in je(i)}function KN(i,a,d){return i>=kt(a,d)&&i<pt(a,d)}function bc(i,a,d){for(var h=d?oc:Zs,g=i[0].length,v=i.length,E=v,V=z(v),D=1/0,W=[];E--;){var H=i[E];E&&a&&(H=Xe(H,Ht(a))),D=kt(H.length,D),V[E]=!d&&(a||g>=120&&H.length>=120)?new no(E&&H):n}H=i[0];var K=-1,oe=V[0];e:for(;++K<g&&W.length<D;){var ue=H[K],ge=a?a(ue):ue;if(ue=d||ue!==0?ue:0,!(oe?Ui(oe,ge):h(W,ge,d))){for(E=v;--E;){var Pe=V[E];if(!(Pe?Ui(Pe,ge):h(i[E],ge,d)))continue e}oe&&oe.push(ge),W.push(ue)}}return W}function YN(i,a,d,h){return On(i,function(g,v,E){a(h,d(g),v,E)}),h}function Ji(i,a,d){a=Pr(a,i),i=Ef(i,a);var h=i==null?i:i[Gn(rn(a))];return h==null?n:Wt(h,i,d)}function Lh(i){return nt(i)&&Nt(i)==jn}function JN(i){return nt(i)&&Nt(i)==$i}function XN(i){return nt(i)&&Nt(i)==Sr}function Xi(i,a,d,h,g){return i===a?!0:i==null||a==null||!nt(i)&&!nt(a)?i!==i&&a!==a:QN(i,a,d,h,Xi,g)}function QN(i,a,d,h,g,v){var E=Ee(i),V=Ee(a),D=E?Jr:St(i),W=V?Jr:St(a);D=D==jn?qn:D,W=W==jn?qn:W;var H=D==qn,K=W==qn,oe=D==W;if(oe&&Fr(i)){if(!Fr(a))return!1;E=!0,H=!1}if(oe&&!H)return v||(v=new Sn),E||Zo(i)?vf(i,a,d,h,g,v):EA(i,a,D,d,h,g,v);if(!(d&A)){var ue=H&&He.call(i,"__wrapped__"),ge=K&&He.call(a,"__wrapped__");if(ue||ge){var Pe=ue?i.value():i,ye=ge?a.value():a;return v||(v=new Sn),g(Pe,ye,d,h,v)}}return oe?(v||(v=new Sn),TA(i,a,d,h,g,v)):!1}function eA(i){return nt(i)&&St(i)==bn}function xc(i,a,d,h){var g=d.length,v=g,E=!h;if(i==null)return!v;for(i=je(i);g--;){var V=d[g];if(E&&V[2]?V[1]!==i[V[0]]:!(V[0]in i))return!1}for(;++g<v;){V=d[g];var D=V[0],W=i[D],H=V[1];if(E&&V[2]){if(W===n&&!(D in i))return!1}else{var K=new Sn;if(h)var oe=h(W,H,D,i,a,K);if(!(oe===n?Xi(H,W,A|I,h,K):oe))return!1}}return!0}function Gh(i){if(!tt(i)||MA(i))return!1;var a=tr(i)?eN:ZB;return a.test(so(i))}function tA(i){return nt(i)&&Nt(i)==Li}function nA(i){return nt(i)&&St(i)==xn}function rA(i){return nt(i)&&Ea(i.length)&&!!Ye[Nt(i)]}function zh(i){return typeof i=="function"?i:i==null?It:typeof i=="object"?Ee(i)?Zh(i[0],i[1]):Uh(i):dm(i)}function kc(i){if(!ts(i))return sN(i);var a=[];for(var d in je(i))He.call(i,d)&&d!="constructor"&&a.push(d);return a}function oA(i){if(!tt(i))return GA(i);var a=ts(i),d=[];for(var h in i)h=="constructor"&&(a||!He.call(i,h))||d.push(h);return d}function Sc(i,a){return i<a}function $h(i,a){var d=-1,h=Rt(i)?z(i.length):[];return Nr(i,function(g,v,E){h[++d]=a(g,v,E)}),h}function Uh(i){var a=Gc(i);return a.length==1&&a[0][2]?kf(a[0][0],a[0][1]):function(d){return d===i||xc(d,i,a)}}function Zh(i,a){return $c(i)&&xf(a)?kf(Gn(i),a):function(d){var h=Xc(d,i);return h===n&&h===a?Qc(d,i):Xi(a,h,A|I)}}function da(i,a,d,h,g){i!==a&&vc(a,function(v,E){if(g||(g=new Sn),tt(v))iA(i,a,E,d,da,h,g);else{var V=h?h(Zc(i,E),v,E+"",i,a,g):n;V===n&&(V=v),yc(i,E,V)}},Mt)}function iA(i,a,d,h,g,v,E){var V=Zc(i,d),D=Zc(a,d),W=E.get(D);if(W){yc(i,d,W);return}var H=v?v(V,D,d+"",i,a,E):n,K=H===n;if(K){var oe=Ee(D),ue=!oe&&Fr(D),ge=!oe&&!ue&&Zo(D);H=D,oe||ue||ge?Ee(V)?H=V:it(V)?H=Ft(V):ue?(K=!1,H=nf(D,!0)):ge?(K=!1,H=rf(D,!0)):H=[]:rs(D)||ao(D)?(H=V,ao(V)?H=em(V):(!tt(V)||tr(V))&&(H=bf(D))):K=!1}K&&(E.set(D,H),g(H,D,h,v,E),E.delete(D)),yc(i,d,H)}function Wh(i,a){var d=i.length;if(d)return a+=a<0?d:0,er(a,d)?i[a]:n}function Hh(i,a,d){a.length?a=Xe(a,function(v){return Ee(v)?function(E){return oo(E,v.length===1?v[0]:v)}:v}):a=[It];var h=-1;a=Xe(a,Ht(fe()));var g=$h(i,function(v,E,V){var D=Xe(a,function(W){return W(v)});return{criteria:D,index:++h,value:v}});return PV(g,function(v,E){return _A(v,E,d)})}function sA(i,a){return jh(i,a,function(d,h){return Qc(i,h)})}function jh(i,a,d){for(var h=-1,g=a.length,v={};++h<g;){var E=a[h],V=oo(i,E);d(V,E)&&Qi(v,Pr(E,i),V)}return v}function aA(i){return function(a){return oo(a,i)}}function Ec(i,a,d,h){var g=h?AV:Do,v=-1,E=a.length,V=i;for(i===a&&(a=Ft(a)),d&&(V=Xe(i,Ht(d)));++v<E;)for(var D=0,W=a[v],H=d?d(W):W;(D=g(V,H,D,h))>-1;)V!==i&&ea.call(V,D,1),ea.call(i,D,1);return i}function qh(i,a){for(var d=i?a.length:0,h=d-1;d--;){var g=a[d];if(d==h||g!==v){var v=g;er(g)?ea.call(i,g,1):Nc(i,g)}}return i}function Tc(i,a){return i+ra(Bh()*(a-i+1))}function lA(i,a,d,h){for(var g=-1,v=pt(na((a-i)/(d||1)),0),E=z(v);v--;)E[h?v:++g]=i,i+=d;return E}function Bc(i,a){var d="";if(!i||a<1||a>ne)return d;do a%2&&(d+=i),a=ra(a/2),a&&(i+=i);while(a);return d}function De(i,a){return Wc(Sf(i,a,It),i+"")}function cA(i){return Ah(Wo(i))}function dA(i,a){var d=Wo(i);return Ca(d,ro(a,0,d.length))}function Qi(i,a,d,h){if(!tt(i))return i;a=Pr(a,i);for(var g=-1,v=a.length,E=v-1,V=i;V!=null&&++g<v;){var D=Gn(a[g]),W=d;if(D==="__proto__"||D==="constructor"||D==="prototype")return i;if(g!=E){var H=V[D];W=h?h(H,D,V):n,W===n&&(W=tt(H)?H:er(a[g+1])?[]:{})}Ki(V,D,W),V=V[D]}return i}var Kh=oa?function(i,a){return oa.set(i,a),i}:It,uA=ta?function(i,a){return ta(i,"toString",{configurable:!0,enumerable:!1,value:td(a),writable:!0})}:It;function pA(i){return Ca(Wo(i))}function nn(i,a,d){var h=-1,g=i.length;a<0&&(a=-a>g?0:g+a),d=d>g?g:d,d<0&&(d+=g),g=a>d?0:d-a>>>0,a>>>=0;for(var v=z(g);++h<g;)v[h]=i[h+a];return v}function hA(i,a){var d;return Nr(i,function(h,g,v){return d=a(h,g,v),!d}),!!d}function ua(i,a,d){var h=0,g=i==null?h:i.length;if(typeof a=="number"&&a===a&&g<=In){for(;h<g;){var v=h+g>>>1,E=i[v];E!==null&&!qt(E)&&(d?E<=a:E<a)?h=v+1:g=v}return g}return Vc(i,a,It,d)}function Vc(i,a,d,h){var g=0,v=i==null?0:i.length;if(v===0)return 0;a=d(a);for(var E=a!==a,V=a===null,D=qt(a),W=a===n;g<v;){var H=ra((g+v)/2),K=d(i[H]),oe=K!==n,ue=K===null,ge=K===K,Pe=qt(K);if(E)var ye=h||ge;else W?ye=ge&&(h||oe):V?ye=ge&&oe&&(h||!ue):D?ye=ge&&oe&&!ue&&(h||!Pe):ue||Pe?ye=!1:ye=h?K<=a:K<a;ye?g=H+1:v=H}return kt(v,wn)}function Yh(i,a){for(var d=-1,h=i.length,g=0,v=[];++d<h;){var E=i[d],V=a?a(E):E;if(!d||!En(V,D)){var D=V;v[g++]=E===0?0:E}}return v}function Jh(i){return typeof i=="number"?i:qt(i)?$e:+i}function jt(i){if(typeof i=="string")return i;if(Ee(i))return Xe(i,jt)+"";if(qt(i))return Vh?Vh.call(i):"";var a=i+"";return a=="0"&&1/i==-Q?"-0":a}function Ar(i,a,d){var h=-1,g=Zs,v=i.length,E=!0,V=[],D=V;if(d)E=!1,g=oc;else if(v>=s){var W=a?null:kA(i);if(W)return Hs(W);E=!1,g=Ui,D=new no}else D=a?[]:V;e:for(;++h<v;){var H=i[h],K=a?a(H):H;if(H=d||H!==0?H:0,E&&K===K){for(var oe=D.length;oe--;)if(D[oe]===K)continue e;a&&D.push(K),V.push(H)}else g(D,K,d)||(D!==V&&D.push(K),V.push(H))}return V}function Nc(i,a){return a=Pr(a,i),i=Ef(i,a),i==null||delete i[Gn(rn(a))]}function Xh(i,a,d,h){return Qi(i,a,d(oo(i,a)),h)}function pa(i,a,d,h){for(var g=i.length,v=h?g:-1;(h?v--:++v<g)&&a(i[v],v,i););return d?nn(i,h?0:v,h?v+1:g):nn(i,h?v+1:0,h?g:v)}function Qh(i,a){var d=i;return d instanceof Re&&(d=d.value()),ic(a,function(h,g){return g.func.apply(g.thisArg,Tr([h],g.args))},d)}function Ac(i,a,d){var h=i.length;if(h<2)return h?Ar(i[0]):[];for(var g=-1,v=z(h);++g<h;)for(var E=i[g],V=-1;++V<h;)V!=g&&(v[g]=Yi(v[g]||E,i[V],a,d));return Ar(_t(v,1),a,d)}function ef(i,a,d){for(var h=-1,g=i.length,v=a.length,E={};++h<g;){var V=h<v?a[h]:n;d(E,i[h],V)}return E}function Pc(i){return it(i)?i:[]}function Dc(i){return typeof i=="function"?i:It}function Pr(i,a){return Ee(i)?i:$c(i,a)?[i]:Nf(We(i))}var fA=De;function Dr(i,a,d){var h=i.length;return d=d===n?h:d,!a&&d>=h?i:nn(i,a,d)}var tf=tN||function(i){return yt.clearTimeout(i)};function nf(i,a){if(a)return i.slice();var d=i.length,h=xh?xh(d):new i.constructor(d);return i.copy(h),h}function Fc(i){var a=new i.constructor(i.byteLength);return new Xs(a).set(new Xs(i)),a}function mA(i,a){var d=a?Fc(i.buffer):i.buffer;return new i.constructor(d,i.byteOffset,i.byteLength)}function gA(i){var a=new i.constructor(i.source,Lp.exec(i));return a.lastIndex=i.lastIndex,a}function yA(i){return qi?je(qi.call(i)):{}}function rf(i,a){var d=a?Fc(i.buffer):i.buffer;return new i.constructor(d,i.byteOffset,i.length)}function of(i,a){if(i!==a){var d=i!==n,h=i===null,g=i===i,v=qt(i),E=a!==n,V=a===null,D=a===a,W=qt(a);if(!V&&!W&&!v&&i>a||v&&E&&D&&!V&&!W||h&&E&&D||!d&&D||!g)return 1;if(!h&&!v&&!W&&i<a||W&&d&&g&&!h&&!v||V&&d&&g||!E&&g||!D)return-1}return 0}function _A(i,a,d){for(var h=-1,g=i.criteria,v=a.criteria,E=g.length,V=d.length;++h<E;){var D=of(g[h],v[h]);if(D){if(h>=V)return D;var W=d[h];return D*(W=="desc"?-1:1)}}return i.index-a.index}function sf(i,a,d,h){for(var g=-1,v=i.length,E=d.length,V=-1,D=a.length,W=pt(v-E,0),H=z(D+W),K=!h;++V<D;)H[V]=a[V];for(;++g<E;)(K||g<v)&&(H[d[g]]=i[g]);for(;W--;)H[V++]=i[g++];return H}function af(i,a,d,h){for(var g=-1,v=i.length,E=-1,V=d.length,D=-1,W=a.length,H=pt(v-V,0),K=z(H+W),oe=!h;++g<H;)K[g]=i[g];for(var ue=g;++D<W;)K[ue+D]=a[D];for(;++E<V;)(oe||g<v)&&(K[ue+d[E]]=i[g++]);return K}function Ft(i,a){var d=-1,h=i.length;for(a||(a=z(h));++d<h;)a[d]=i[d];return a}function Ln(i,a,d,h){var g=!d;d||(d={});for(var v=-1,E=a.length;++v<E;){var V=a[v],D=h?h(d[V],i[V],V,d,i):n;D===n&&(D=i[V]),g?Jn(d,V,D):Ki(d,V,D)}return d}function vA(i,a){return Ln(i,zc(i),a)}function CA(i,a){return Ln(i,Cf(i),a)}function ha(i,a){return function(d,h){var g=Ee(d)?SV:$N,v=a?a():{};return g(d,i,fe(h,2),v)}}function zo(i){return De(function(a,d){var h=-1,g=d.length,v=g>1?d[g-1]:n,E=g>2?d[2]:n;for(v=i.length>3&&typeof v=="function"?(g--,v):n,E&&At(d[0],d[1],E)&&(v=g<3?n:v,g=1),a=je(a);++h<g;){var V=d[h];V&&i(a,V,h,v)}return a})}function lf(i,a){return function(d,h){if(d==null)return d;if(!Rt(d))return i(d,h);for(var g=d.length,v=a?g:-1,E=je(d);(a?v--:++v<g)&&h(E[v],v,E)!==!1;);return d}}function cf(i){return function(a,d,h){for(var g=-1,v=je(a),E=h(a),V=E.length;V--;){var D=E[i?V:++g];if(d(v[D],D,v)===!1)break}return a}}function wA(i,a,d){var h=a&L,g=es(i);function v(){var E=this&&this!==yt&&this instanceof v?g:i;return E.apply(h?d:this,arguments)}return v}function df(i){return function(a){a=We(a);var d=Fo(a)?kn(a):n,h=d?d[0]:a.charAt(0),g=d?Dr(d,1).join(""):a.slice(1);return h[i]()+g}}function $o(i){return function(a){return ic(lm(am(a).replace(uV,"")),i,"")}}function es(i){return function(){var a=arguments;switch(a.length){case 0:return new i;case 1:return new i(a[0]);case 2:return new i(a[0],a[1]);case 3:return new i(a[0],a[1],a[2]);case 4:return new i(a[0],a[1],a[2],a[3]);case 5:return new i(a[0],a[1],a[2],a[3],a[4]);case 6:return new i(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new i(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var d=Go(i.prototype),h=i.apply(d,a);return tt(h)?h:d}}function bA(i,a,d){var h=es(i);function g(){for(var v=arguments.length,E=z(v),V=v,D=Uo(g);V--;)E[V]=arguments[V];var W=v<3&&E[0]!==D&&E[v-1]!==D?[]:Br(E,D);if(v-=W.length,v<d)return mf(i,a,fa,g.placeholder,n,E,W,n,n,d-v);var H=this&&this!==yt&&this instanceof g?h:i;return Wt(H,this,E)}return g}function uf(i){return function(a,d,h){var g=je(a);if(!Rt(a)){var v=fe(d,3);a=gt(a),d=function(V){return v(g[V],V,g)}}var E=i(a,d,h);return E>-1?g[v?a[E]:E]:n}}function pf(i){return Qn(function(a){var d=a.length,h=d,g=en.prototype.thru;for(i&&a.reverse();h--;){var v=a[h];if(typeof v!="function")throw new Qt(c);if(g&&!E&&_a(v)=="wrapper")var E=new en([],!0)}for(h=E?h:d;++h<d;){v=a[h];var V=_a(v),D=V=="wrapper"?Lc(v):n;D&&Uc(D[0])&&D[1]==(te|O|N|j)&&!D[4].length&&D[9]==1?E=E[_a(D[0])].apply(E,D[3]):E=v.length==1&&Uc(v)?E[V]():E.thru(v)}return function(){var W=arguments,H=W[0];if(E&&W.length==1&&Ee(H))return E.plant(H).value();for(var K=0,oe=d?a[K].apply(this,W):H;++K<d;)oe=a[K].call(this,oe);return oe}})}function fa(i,a,d,h,g,v,E,V,D,W){var H=a&te,K=a&L,oe=a&C,ue=a&(O|F),ge=a&Y,Pe=oe?n:es(i);function ye(){for(var Fe=arguments.length,Me=z(Fe),Kt=Fe;Kt--;)Me[Kt]=arguments[Kt];if(ue)var Pt=Uo(ye),Yt=FV(Me,Pt);if(h&&(Me=sf(Me,h,g,ue)),v&&(Me=af(Me,v,E,ue)),Fe-=Yt,ue&&Fe<W){var st=Br(Me,Pt);return mf(i,a,fa,ye.placeholder,d,Me,st,V,D,W-Fe)}var Tn=K?d:this,rr=oe?Tn[i]:i;return Fe=Me.length,V?Me=$A(Me,V):ge&&Fe>1&&Me.reverse(),H&&D<Fe&&(Me.length=D),this&&this!==yt&&this instanceof ye&&(rr=Pe||es(rr)),rr.apply(Tn,Me)}return ye}function hf(i,a){return function(d,h){return YN(d,i,a(h),{})}}function ma(i,a){return function(d,h){var g;if(d===n&&h===n)return a;if(d!==n&&(g=d),h!==n){if(g===n)return h;typeof d=="string"||typeof h=="string"?(d=jt(d),h=jt(h)):(d=Jh(d),h=Jh(h)),g=i(d,h)}return g}}function Rc(i){return Qn(function(a){return a=Xe(a,Ht(fe())),De(function(d){var h=this;return i(a,function(g){return Wt(g,h,d)})})})}function ga(i,a){a=a===n?" ":jt(a);var d=a.length;if(d<2)return d?Bc(a,i):a;var h=Bc(a,na(i/Ro(a)));return Fo(a)?Dr(kn(h),0,i).join(""):h.slice(0,i)}function xA(i,a,d,h){var g=a&L,v=es(i);function E(){for(var V=-1,D=arguments.length,W=-1,H=h.length,K=z(H+D),oe=this&&this!==yt&&this instanceof E?v:i;++W<H;)K[W]=h[W];for(;D--;)K[W++]=arguments[++V];return Wt(oe,g?d:this,K)}return E}function ff(i){return function(a,d,h){return h&&typeof h!="number"&&At(a,d,h)&&(d=h=n),a=nr(a),d===n?(d=a,a=0):d=nr(d),h=h===n?a<d?1:-1:nr(h),lA(a,d,h,i)}}function ya(i){return function(a,d){return typeof a=="string"&&typeof d=="string"||(a=on(a),d=on(d)),i(a,d)}}function mf(i,a,d,h,g,v,E,V,D,W){var H=a&O,K=H?E:n,oe=H?n:E,ue=H?v:n,ge=H?n:v;a|=H?N:U,a&=~(H?U:N),a&R||(a&=~(L|C));var Pe=[i,a,g,ue,K,ge,oe,V,D,W],ye=d.apply(n,Pe);return Uc(i)&&Tf(ye,Pe),ye.placeholder=h,Bf(ye,i,a)}function Mc(i){var a=ut[i];return function(d,h){if(d=on(d),h=h==null?0:kt(Ve(h),292),h&&Th(d)){var g=(We(d)+"e").split("e"),v=a(g[0]+"e"+(+g[1]+h));return g=(We(v)+"e").split("e"),+(g[0]+"e"+(+g[1]-h))}return a(d)}}var kA=Oo&&1/Hs(new Oo([,-0]))[1]==Q?function(i){return new Oo(i)}:od;function gf(i){return function(a){var d=St(a);return d==bn?pc(a):d==xn?zV(a):DV(a,i(a))}}function Xn(i,a,d,h,g,v,E,V){var D=a&C;if(!D&&typeof i!="function")throw new Qt(c);var W=h?h.length:0;if(W||(a&=~(N|U),h=g=n),E=E===n?E:pt(Ve(E),0),V=V===n?V:Ve(V),W-=g?g.length:0,a&U){var H=h,K=g;h=g=n}var oe=D?n:Lc(i),ue=[i,a,d,h,g,H,K,v,E,V];if(oe&&LA(ue,oe),i=ue[0],a=ue[1],d=ue[2],h=ue[3],g=ue[4],V=ue[9]=ue[9]===n?D?0:i.length:pt(ue[9]-W,0),!V&&a&(O|F)&&(a&=~(O|F)),!a||a==L)var ge=wA(i,a,d);else a==O||a==F?ge=bA(i,a,V):(a==N||a==(L|N))&&!g.length?ge=xA(i,a,d,h):ge=fa.apply(n,ue);var Pe=oe?Kh:Tf;return Bf(Pe(ge,ue),i,a)}function yf(i,a,d,h){return i===n||En(i,Io[d])&&!He.call(h,d)?a:i}function _f(i,a,d,h,g,v){return tt(i)&&tt(a)&&(v.set(a,i),da(i,a,n,_f,v),v.delete(a)),i}function SA(i){return rs(i)?n:i}function vf(i,a,d,h,g,v){var E=d&A,V=i.length,D=a.length;if(V!=D&&!(E&&D>V))return!1;var W=v.get(i),H=v.get(a);if(W&&H)return W==a&&H==i;var K=-1,oe=!0,ue=d&I?new no:n;for(v.set(i,a),v.set(a,i);++K<V;){var ge=i[K],Pe=a[K];if(h)var ye=E?h(Pe,ge,K,a,i,v):h(ge,Pe,K,i,a,v);if(ye!==n){if(ye)continue;oe=!1;break}if(ue){if(!sc(a,function(Fe,Me){if(!Ui(ue,Me)&&(ge===Fe||g(ge,Fe,d,h,v)))return ue.push(Me)})){oe=!1;break}}else if(!(ge===Pe||g(ge,Pe,d,h,v))){oe=!1;break}}return v.delete(i),v.delete(a),oe}function EA(i,a,d,h,g,v,E){switch(d){case Ao:if(i.byteLength!=a.byteLength||i.byteOffset!=a.byteOffset)return!1;i=i.buffer,a=a.buffer;case $i:return!(i.byteLength!=a.byteLength||!v(new Xs(i),new Xs(a)));case kr:case Sr:case Oi:return En(+i,+a);case Se:return i.name==a.name&&i.message==a.message;case Li:case Gi:return i==a+"";case bn:var V=pc;case xn:var D=h&A;if(V||(V=Hs),i.size!=a.size&&!D)return!1;var W=E.get(i);if(W)return W==a;h|=I,E.set(i,a);var H=vf(V(i),V(a),h,g,v,E);return E.delete(i),H;case Gs:if(qi)return qi.call(i)==qi.call(a)}return!1}function TA(i,a,d,h,g,v){var E=d&A,V=Ic(i),D=V.length,W=Ic(a),H=W.length;if(D!=H&&!E)return!1;for(var K=D;K--;){var oe=V[K];if(!(E?oe in a:He.call(a,oe)))return!1}var ue=v.get(i),ge=v.get(a);if(ue&&ge)return ue==a&&ge==i;var Pe=!0;v.set(i,a),v.set(a,i);for(var ye=E;++K<D;){oe=V[K];var Fe=i[oe],Me=a[oe];if(h)var Kt=E?h(Me,Fe,oe,a,i,v):h(Fe,Me,oe,i,a,v);if(!(Kt===n?Fe===Me||g(Fe,Me,d,h,v):Kt)){Pe=!1;break}ye||(ye=oe=="constructor")}if(Pe&&!ye){var Pt=i.constructor,Yt=a.constructor;Pt!=Yt&&"constructor"in i&&"constructor"in a&&!(typeof Pt=="function"&&Pt instanceof Pt&&typeof Yt=="function"&&Yt instanceof Yt)&&(Pe=!1)}return v.delete(i),v.delete(a),Pe}function Qn(i){return Wc(Sf(i,n,Ff),i+"")}function Ic(i){return Oh(i,gt,zc)}function Oc(i){return Oh(i,Mt,Cf)}var Lc=oa?function(i){return oa.get(i)}:od;function _a(i){for(var a=i.name+"",d=Lo[a],h=He.call(Lo,a)?d.length:0;h--;){var g=d[h],v=g.func;if(v==null||v==i)return g.name}return a}function Uo(i){var a=He.call(_,"placeholder")?_:i;return a.placeholder}function fe(){var i=_.iteratee||nd;return i=i===nd?zh:i,arguments.length?i(arguments[0],arguments[1]):i}function va(i,a){var d=i.__data__;return RA(a)?d[typeof a=="string"?"string":"hash"]:d.map}function Gc(i){for(var a=gt(i),d=a.length;d--;){var h=a[d],g=i[h];a[d]=[h,g,xf(g)]}return a}function io(i,a){var d=OV(i,a);return Gh(d)?d:n}function BA(i){var a=He.call(i,eo),d=i[eo];try{i[eo]=n;var h=!0}catch{}var g=Ys.call(i);return h&&(a?i[eo]=d:delete i[eo]),g}var zc=fc?function(i){return i==null?[]:(i=je(i),Er(fc(i),function(a){return Sh.call(i,a)}))}:id,Cf=fc?function(i){for(var a=[];i;)Tr(a,zc(i)),i=Qs(i);return a}:id,St=Nt;(mc&&St(new mc(new ArrayBuffer(1)))!=Ao||Wi&&St(new Wi)!=bn||gc&&St(gc.resolve())!=Rp||Oo&&St(new Oo)!=xn||Hi&&St(new Hi)!=zi)&&(St=function(i){var a=Nt(i),d=a==qn?i.constructor:n,h=d?so(d):"";if(h)switch(h){case dN:return Ao;case uN:return bn;case pN:return Rp;case hN:return xn;case fN:return zi}return a});function VA(i,a,d){for(var h=-1,g=d.length;++h<g;){var v=d[h],E=v.size;switch(v.type){case"drop":i+=E;break;case"dropRight":a-=E;break;case"take":a=kt(a,i+E);break;case"takeRight":i=pt(i,a-E);break}}return{start:i,end:a}}function NA(i){var a=i.match(MB);return a?a[1].split(IB):[]}function wf(i,a,d){a=Pr(a,i);for(var h=-1,g=a.length,v=!1;++h<g;){var E=Gn(a[h]);if(!(v=i!=null&&d(i,E)))break;i=i[E]}return v||++h!=g?v:(g=i==null?0:i.length,!!g&&Ea(g)&&er(E,g)&&(Ee(i)||ao(i)))}function AA(i){var a=i.length,d=new i.constructor(a);return a&&typeof i[0]=="string"&&He.call(i,"index")&&(d.index=i.index,d.input=i.input),d}function bf(i){return typeof i.constructor=="function"&&!ts(i)?Go(Qs(i)):{}}function PA(i,a,d){var h=i.constructor;switch(a){case $i:return Fc(i);case kr:case Sr:return new h(+i);case Ao:return mA(i,d);case Gl:case zl:case $l:case Ul:case Zl:case Wl:case Hl:case jl:case ql:return rf(i,d);case bn:return new h;case Oi:case Gi:return new h(i);case Li:return gA(i);case xn:return new h;case Gs:return yA(i)}}function DA(i,a){var d=a.length;if(!d)return i;var h=d-1;return a[h]=(d>1?"& ":"")+a[h],a=a.join(d>2?", ":" "),i.replace(RB,`{
|
|
72
|
+
*/$s.exports,function(t,e){(function(){var n,o="4.17.21",i=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",d="Invalid `variable` option passed into `_.template`",p="__lodash_hash_undefined__",h=500,m="__lodash_placeholder__",y=1,x=2,w=4,S=1,O=2,G=1,b=2,R=4,F=8,D=16,A=32,U=64,j=128,$=256,Z=512,W=30,J="...",he=800,B=16,C=1,E=2,M=3,H=1/0,K=9007199254740991,ne=17976931348623157e292,de=NaN,ke=4294967295,Se=ke-1,Ze=ke>>>1,ht=[["ary",j],["bind",G],["bindKey",b],["curry",F],["curryRight",D],["flip",Z],["partial",A],["partialRight",U],["rearg",$]],Ke="[object Arguments]",Un="[object Array]",WB="[object AsyncFunction]",Zi="[object Boolean]",ji="[object Date]",HB="[object DOMException]",ea="[object Error]",ta="[object Function]",Uh="[object GeneratorFunction]",Nn="[object Map]",Wi="[object Number]",qB="[object Null]",Qn="[object Object]",Zh="[object Promise]",KB="[object Proxy]",Hi="[object RegExp]",An="[object Set]",qi="[object String]",na="[object Symbol]",XB="[object Undefined]",Ki="[object WeakMap]",YB="[object WeakSet]",Xi="[object ArrayBuffer]",Io="[object DataView]",vc="[object Float32Array]",_c="[object Float64Array]",Cc="[object Int8Array]",wc="[object Int16Array]",bc="[object Int32Array]",xc="[object Uint8Array]",kc="[object Uint8ClampedArray]",Sc="[object Uint16Array]",Ec="[object Uint32Array]",JB=/\b__p \+= '';/g,QB=/\b(__p \+=) '' \+/g,eP=/(__e\(.*?\)|\b__t\)) \+\n'';/g,jh=/&(?:amp|lt|gt|quot|#39);/g,Wh=/[&<>"']/g,tP=RegExp(jh.source),nP=RegExp(Wh.source),rP=/<%-([\s\S]+?)%>/g,oP=/<%([\s\S]+?)%>/g,Hh=/<%=([\s\S]+?)%>/g,iP=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sP=/^\w*$/,aP=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Tc=/[\\^$.*+?()[\]{}|]/g,lP=RegExp(Tc.source),Nc=/^\s+/,cP=/\s/,dP=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,uP=/\{\n\/\* \[wrapped with (.+)\] \*/,pP=/,? & /,hP=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fP=/[()=,{}\[\]\/\s]/,mP=/\\(\\)?/g,gP=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qh=/\w*$/,yP=/^[-+]0x[0-9a-f]+$/i,vP=/^0b[01]+$/i,_P=/^\[object .+?Constructor\]$/,CP=/^0o[0-7]+$/i,wP=/^(?:0|[1-9]\d*)$/,bP=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ra=/($^)/,xP=/['\n\r\u2028\u2029\\]/g,oa="\\ud800-\\udfff",kP="\\u0300-\\u036f",SP="\\ufe20-\\ufe2f",EP="\\u20d0-\\u20ff",Kh=kP+SP+EP,Xh="\\u2700-\\u27bf",Yh="a-z\\xdf-\\xf6\\xf8-\\xff",TP="\\xac\\xb1\\xd7\\xf7",NP="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",AP="\\u2000-\\u206f",VP=" \\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",Jh="A-Z\\xc0-\\xd6\\xd8-\\xde",Qh="\\ufe0e\\ufe0f",ef=TP+NP+AP+VP,Ac="['’]",BP="["+oa+"]",tf="["+ef+"]",ia="["+Kh+"]",nf="\\d+",PP="["+Xh+"]",rf="["+Yh+"]",of="[^"+oa+ef+nf+Xh+Yh+Jh+"]",Vc="\\ud83c[\\udffb-\\udfff]",RP="(?:"+ia+"|"+Vc+")",sf="[^"+oa+"]",Bc="(?:\\ud83c[\\udde6-\\uddff]){2}",Pc="[\\ud800-\\udbff][\\udc00-\\udfff]",Fo="["+Jh+"]",af="\\u200d",lf="(?:"+rf+"|"+of+")",DP="(?:"+Fo+"|"+of+")",cf="(?:"+Ac+"(?:d|ll|m|re|s|t|ve))?",df="(?:"+Ac+"(?:D|LL|M|RE|S|T|VE))?",uf=RP+"?",pf="["+Qh+"]?",IP="(?:"+af+"(?:"+[sf,Bc,Pc].join("|")+")"+pf+uf+")*",FP="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",OP="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",hf=pf+uf+IP,LP="(?:"+[PP,Bc,Pc].join("|")+")"+hf,MP="(?:"+[sf+ia+"?",ia,Bc,Pc,BP].join("|")+")",GP=RegExp(Ac,"g"),$P=RegExp(ia,"g"),Rc=RegExp(Vc+"(?="+Vc+")|"+MP+hf,"g"),zP=RegExp([Fo+"?"+rf+"+"+cf+"(?="+[tf,Fo,"$"].join("|")+")",DP+"+"+df+"(?="+[tf,Fo+lf,"$"].join("|")+")",Fo+"?"+lf+"+"+cf,Fo+"+"+df,OP,FP,nf,LP].join("|"),"g"),UP=RegExp("["+af+oa+Kh+Qh+"]"),ZP=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,jP=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],WP=-1,Qe={};Qe[vc]=Qe[_c]=Qe[Cc]=Qe[wc]=Qe[bc]=Qe[xc]=Qe[kc]=Qe[Sc]=Qe[Ec]=!0,Qe[Ke]=Qe[Un]=Qe[Xi]=Qe[Zi]=Qe[Io]=Qe[ji]=Qe[ea]=Qe[ta]=Qe[Nn]=Qe[Wi]=Qe[Qn]=Qe[Hi]=Qe[An]=Qe[qi]=Qe[Ki]=!1;var Ye={};Ye[Ke]=Ye[Un]=Ye[Xi]=Ye[Io]=Ye[Zi]=Ye[ji]=Ye[vc]=Ye[_c]=Ye[Cc]=Ye[wc]=Ye[bc]=Ye[Nn]=Ye[Wi]=Ye[Qn]=Ye[Hi]=Ye[An]=Ye[qi]=Ye[na]=Ye[xc]=Ye[kc]=Ye[Sc]=Ye[Ec]=!0,Ye[ea]=Ye[ta]=Ye[Ki]=!1;var HP={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},qP={"&":"&","<":"<",">":">",'"':""","'":"'"},KP={"&":"&","<":"<",">":">",""":'"',"'":"'"},XP={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},YP=parseFloat,JP=parseInt,ff=typeof Xo=="object"&&Xo&&Xo.Object===Object&&Xo,QP=typeof self=="object"&&self&&self.Object===Object&&self,Ct=ff||QP||Function("return this")(),Dc=e&&!e.nodeType&&e,Qr=Dc&&!0&&t&&!t.nodeType&&t,mf=Qr&&Qr.exports===Dc,Ic=mf&&ff.process,nn=function(){try{var P=Qr&&Qr.require&&Qr.require("util").types;return P||Ic&&Ic.binding&&Ic.binding("util")}catch{}}(),gf=nn&&nn.isArrayBuffer,yf=nn&&nn.isDate,vf=nn&&nn.isMap,_f=nn&&nn.isRegExp,Cf=nn&&nn.isSet,wf=nn&&nn.isTypedArray;function Xt(P,q,z){switch(z.length){case 0:return P.call(q);case 1:return P.call(q,z[0]);case 2:return P.call(q,z[0],z[1]);case 3:return P.call(q,z[0],z[1],z[2])}return P.apply(q,z)}function eR(P,q,z,ce){for(var Te=-1,je=P==null?0:P.length;++Te<je;){var ft=P[Te];q(ce,ft,z(ft),P)}return ce}function rn(P,q){for(var z=-1,ce=P==null?0:P.length;++z<ce&&q(P[z],z,P)!==!1;);return P}function tR(P,q){for(var z=P==null?0:P.length;z--&&q(P[z],z,P)!==!1;);return P}function bf(P,q){for(var z=-1,ce=P==null?0:P.length;++z<ce;)if(!q(P[z],z,P))return!1;return!0}function Nr(P,q){for(var z=-1,ce=P==null?0:P.length,Te=0,je=[];++z<ce;){var ft=P[z];q(ft,z,P)&&(je[Te++]=ft)}return je}function sa(P,q){var z=P==null?0:P.length;return!!z&&Oo(P,q,0)>-1}function Fc(P,q,z){for(var ce=-1,Te=P==null?0:P.length;++ce<Te;)if(z(q,P[ce]))return!0;return!1}function tt(P,q){for(var z=-1,ce=P==null?0:P.length,Te=Array(ce);++z<ce;)Te[z]=q(P[z],z,P);return Te}function Ar(P,q){for(var z=-1,ce=q.length,Te=P.length;++z<ce;)P[Te+z]=q[z];return P}function Oc(P,q,z,ce){var Te=-1,je=P==null?0:P.length;for(ce&&je&&(z=P[++Te]);++Te<je;)z=q(z,P[Te],Te,P);return z}function nR(P,q,z,ce){var Te=P==null?0:P.length;for(ce&&Te&&(z=P[--Te]);Te--;)z=q(z,P[Te],Te,P);return z}function Lc(P,q){for(var z=-1,ce=P==null?0:P.length;++z<ce;)if(q(P[z],z,P))return!0;return!1}var rR=Mc("length");function oR(P){return P.split("")}function iR(P){return P.match(hP)||[]}function xf(P,q,z){var ce;return z(P,function(Te,je,ft){if(q(Te,je,ft))return ce=je,!1}),ce}function aa(P,q,z,ce){for(var Te=P.length,je=z+(ce?1:-1);ce?je--:++je<Te;)if(q(P[je],je,P))return je;return-1}function Oo(P,q,z){return q===q?yR(P,q,z):aa(P,kf,z)}function sR(P,q,z,ce){for(var Te=z-1,je=P.length;++Te<je;)if(ce(P[Te],q))return Te;return-1}function kf(P){return P!==P}function Sf(P,q){var z=P==null?0:P.length;return z?$c(P,q)/z:de}function Mc(P){return function(q){return q==null?n:q[P]}}function Gc(P){return function(q){return P==null?n:P[q]}}function Ef(P,q,z,ce,Te){return Te(P,function(je,ft,Xe){z=ce?(ce=!1,je):q(z,je,ft,Xe)}),z}function aR(P,q){var z=P.length;for(P.sort(q);z--;)P[z]=P[z].value;return P}function $c(P,q){for(var z,ce=-1,Te=P.length;++ce<Te;){var je=q(P[ce]);je!==n&&(z=z===n?je:z+je)}return z}function zc(P,q){for(var z=-1,ce=Array(P);++z<P;)ce[z]=q(z);return ce}function lR(P,q){return tt(q,function(z){return[z,P[z]]})}function Tf(P){return P&&P.slice(0,Bf(P)+1).replace(Nc,"")}function Yt(P){return function(q){return P(q)}}function Uc(P,q){return tt(q,function(z){return P[z]})}function Yi(P,q){return P.has(q)}function Nf(P,q){for(var z=-1,ce=P.length;++z<ce&&Oo(q,P[z],0)>-1;);return z}function Af(P,q){for(var z=P.length;z--&&Oo(q,P[z],0)>-1;);return z}function cR(P,q){for(var z=P.length,ce=0;z--;)P[z]===q&&++ce;return ce}var dR=Gc(HP),uR=Gc(qP);function pR(P){return"\\"+XP[P]}function hR(P,q){return P==null?n:P[q]}function Lo(P){return UP.test(P)}function fR(P){return ZP.test(P)}function mR(P){for(var q,z=[];!(q=P.next()).done;)z.push(q.value);return z}function Zc(P){var q=-1,z=Array(P.size);return P.forEach(function(ce,Te){z[++q]=[Te,ce]}),z}function Vf(P,q){return function(z){return P(q(z))}}function Vr(P,q){for(var z=-1,ce=P.length,Te=0,je=[];++z<ce;){var ft=P[z];(ft===q||ft===m)&&(P[z]=m,je[Te++]=z)}return je}function la(P){var q=-1,z=Array(P.size);return P.forEach(function(ce){z[++q]=ce}),z}function gR(P){var q=-1,z=Array(P.size);return P.forEach(function(ce){z[++q]=[ce,ce]}),z}function yR(P,q,z){for(var ce=z-1,Te=P.length;++ce<Te;)if(P[ce]===q)return ce;return-1}function vR(P,q,z){for(var ce=z+1;ce--;)if(P[ce]===q)return ce;return ce}function Mo(P){return Lo(P)?CR(P):rR(P)}function Vn(P){return Lo(P)?wR(P):oR(P)}function Bf(P){for(var q=P.length;q--&&cP.test(P.charAt(q)););return q}var _R=Gc(KP);function CR(P){for(var q=Rc.lastIndex=0;Rc.test(P);)++q;return q}function wR(P){return P.match(Rc)||[]}function bR(P){return P.match(zP)||[]}var xR=function P(q){q=q==null?Ct:Go.defaults(Ct.Object(),q,Go.pick(Ct,jP));var z=q.Array,ce=q.Date,Te=q.Error,je=q.Function,ft=q.Math,Xe=q.Object,jc=q.RegExp,kR=q.String,on=q.TypeError,ca=z.prototype,SR=je.prototype,$o=Xe.prototype,da=q["__core-js_shared__"],ua=SR.toString,qe=$o.hasOwnProperty,ER=0,Pf=function(){var s=/[^.]+$/.exec(da&&da.keys&&da.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""}(),pa=$o.toString,TR=ua.call(Xe),NR=Ct._,AR=jc("^"+ua.call(qe).replace(Tc,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ha=mf?q.Buffer:n,Br=q.Symbol,fa=q.Uint8Array,Rf=ha?ha.allocUnsafe:n,ma=Vf(Xe.getPrototypeOf,Xe),Df=Xe.create,If=$o.propertyIsEnumerable,ga=ca.splice,Ff=Br?Br.isConcatSpreadable:n,Ji=Br?Br.iterator:n,eo=Br?Br.toStringTag:n,ya=function(){try{var s=io(Xe,"defineProperty");return s({},"",{}),s}catch{}}(),VR=q.clearTimeout!==Ct.clearTimeout&&q.clearTimeout,BR=ce&&ce.now!==Ct.Date.now&&ce.now,PR=q.setTimeout!==Ct.setTimeout&&q.setTimeout,va=ft.ceil,_a=ft.floor,Wc=Xe.getOwnPropertySymbols,RR=ha?ha.isBuffer:n,Of=q.isFinite,DR=ca.join,IR=Vf(Xe.keys,Xe),mt=ft.max,Tt=ft.min,FR=ce.now,OR=q.parseInt,Lf=ft.random,LR=ca.reverse,Hc=io(q,"DataView"),Qi=io(q,"Map"),qc=io(q,"Promise"),zo=io(q,"Set"),es=io(q,"WeakMap"),ts=io(Xe,"create"),Ca=es&&new es,Uo={},MR=so(Hc),GR=so(Qi),$R=so(qc),zR=so(zo),UR=so(es),wa=Br?Br.prototype:n,ns=wa?wa.valueOf:n,Mf=wa?wa.toString:n;function v(s){if(it(s)&&!Ne(s)&&!(s instanceof Oe)){if(s instanceof sn)return s;if(qe.call(s,"__wrapped__"))return Gm(s)}return new sn(s)}var Zo=function(){function s(){}return function(a){if(!ot(a))return{};if(Df)return Df(a);s.prototype=a;var u=new s;return s.prototype=n,u}}();function ba(){}function sn(s,a){this.__wrapped__=s,this.__actions__=[],this.__chain__=!!a,this.__index__=0,this.__values__=n}v.templateSettings={escape:rP,evaluate:oP,interpolate:Hh,variable:"",imports:{_:v}},v.prototype=ba.prototype,v.prototype.constructor=v,sn.prototype=Zo(ba.prototype),sn.prototype.constructor=sn;function Oe(s){this.__wrapped__=s,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ke,this.__views__=[]}function ZR(){var s=new Oe(this.__wrapped__);return s.__actions__=Mt(this.__actions__),s.__dir__=this.__dir__,s.__filtered__=this.__filtered__,s.__iteratees__=Mt(this.__iteratees__),s.__takeCount__=this.__takeCount__,s.__views__=Mt(this.__views__),s}function jR(){if(this.__filtered__){var s=new Oe(this);s.__dir__=-1,s.__filtered__=!0}else s=this.clone(),s.__dir__*=-1;return s}function WR(){var s=this.__wrapped__.value(),a=this.__dir__,u=Ne(s),f=a<0,g=u?s.length:0,_=oI(0,g,this.__views__),N=_.start,V=_.end,I=V-N,X=f?V:N-1,Y=this.__iteratees__,Q=Y.length,oe=0,pe=Tt(I,this.__takeCount__);if(!u||!f&&g==I&&pe==I)return cm(s,this.__actions__);var ve=[];e:for(;I--&&oe<pe;){X+=a;for(var De=-1,_e=s[X];++De<Q;){var Fe=Y[De],Le=Fe.iteratee,en=Fe.type,Ft=Le(_e);if(en==E)_e=Ft;else if(!Ft){if(en==C)continue e;break e}}ve[oe++]=_e}return ve}Oe.prototype=Zo(ba.prototype),Oe.prototype.constructor=Oe;function to(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var f=s[a];this.set(f[0],f[1])}}function HR(){this.__data__=ts?ts(null):{},this.size=0}function qR(s){var a=this.has(s)&&delete this.__data__[s];return this.size-=a?1:0,a}function KR(s){var a=this.__data__;if(ts){var u=a[s];return u===p?n:u}return qe.call(a,s)?a[s]:n}function XR(s){var a=this.__data__;return ts?a[s]!==n:qe.call(a,s)}function YR(s,a){var u=this.__data__;return this.size+=this.has(s)?0:1,u[s]=ts&&a===n?p:a,this}to.prototype.clear=HR,to.prototype.delete=qR,to.prototype.get=KR,to.prototype.has=XR,to.prototype.set=YR;function er(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var f=s[a];this.set(f[0],f[1])}}function JR(){this.__data__=[],this.size=0}function QR(s){var a=this.__data__,u=xa(a,s);if(u<0)return!1;var f=a.length-1;return u==f?a.pop():ga.call(a,u,1),--this.size,!0}function eD(s){var a=this.__data__,u=xa(a,s);return u<0?n:a[u][1]}function tD(s){return xa(this.__data__,s)>-1}function nD(s,a){var u=this.__data__,f=xa(u,s);return f<0?(++this.size,u.push([s,a])):u[f][1]=a,this}er.prototype.clear=JR,er.prototype.delete=QR,er.prototype.get=eD,er.prototype.has=tD,er.prototype.set=nD;function tr(s){var a=-1,u=s==null?0:s.length;for(this.clear();++a<u;){var f=s[a];this.set(f[0],f[1])}}function rD(){this.size=0,this.__data__={hash:new to,map:new(Qi||er),string:new to}}function oD(s){var a=Ia(this,s).delete(s);return this.size-=a?1:0,a}function iD(s){return Ia(this,s).get(s)}function sD(s){return Ia(this,s).has(s)}function aD(s,a){var u=Ia(this,s),f=u.size;return u.set(s,a),this.size+=u.size==f?0:1,this}tr.prototype.clear=rD,tr.prototype.delete=oD,tr.prototype.get=iD,tr.prototype.has=sD,tr.prototype.set=aD;function no(s){var a=-1,u=s==null?0:s.length;for(this.__data__=new tr;++a<u;)this.add(s[a])}function lD(s){return this.__data__.set(s,p),this}function cD(s){return this.__data__.has(s)}no.prototype.add=no.prototype.push=lD,no.prototype.has=cD;function Bn(s){var a=this.__data__=new er(s);this.size=a.size}function dD(){this.__data__=new er,this.size=0}function uD(s){var a=this.__data__,u=a.delete(s);return this.size=a.size,u}function pD(s){return this.__data__.get(s)}function hD(s){return this.__data__.has(s)}function fD(s,a){var u=this.__data__;if(u instanceof er){var f=u.__data__;if(!Qi||f.length<i-1)return f.push([s,a]),this.size=++u.size,this;u=this.__data__=new tr(f)}return u.set(s,a),this.size=u.size,this}Bn.prototype.clear=dD,Bn.prototype.delete=uD,Bn.prototype.get=pD,Bn.prototype.has=hD,Bn.prototype.set=fD;function Gf(s,a){var u=Ne(s),f=!u&&ao(s),g=!u&&!f&&Fr(s),_=!u&&!f&&!g&&qo(s),N=u||f||g||_,V=N?zc(s.length,kR):[],I=V.length;for(var X in s)(a||qe.call(s,X))&&!(N&&(X=="length"||g&&(X=="offset"||X=="parent")||_&&(X=="buffer"||X=="byteLength"||X=="byteOffset")||ir(X,I)))&&V.push(X);return V}function $f(s){var a=s.length;return a?s[id(0,a-1)]:n}function mD(s,a){return Fa(Mt(s),ro(a,0,s.length))}function gD(s){return Fa(Mt(s))}function Kc(s,a,u){(u!==n&&!Pn(s[a],u)||u===n&&!(a in s))&&nr(s,a,u)}function rs(s,a,u){var f=s[a];(!(qe.call(s,a)&&Pn(f,u))||u===n&&!(a in s))&&nr(s,a,u)}function xa(s,a){for(var u=s.length;u--;)if(Pn(s[u][0],a))return u;return-1}function yD(s,a,u,f){return Pr(s,function(g,_,N){a(f,g,u(g),N)}),f}function zf(s,a){return s&&jn(a,_t(a),s)}function vD(s,a){return s&&jn(a,$t(a),s)}function nr(s,a,u){a=="__proto__"&&ya?ya(s,a,{configurable:!0,enumerable:!0,value:u,writable:!0}):s[a]=u}function Xc(s,a){for(var u=-1,f=a.length,g=z(f),_=s==null;++u<f;)g[u]=_?n:Vd(s,a[u]);return g}function ro(s,a,u){return s===s&&(u!==n&&(s=s<=u?s:u),a!==n&&(s=s>=a?s:a)),s}function an(s,a,u,f,g,_){var N,V=a&y,I=a&x,X=a&w;if(u&&(N=g?u(s,f,g,_):u(s)),N!==n)return N;if(!ot(s))return s;var Y=Ne(s);if(Y){if(N=sI(s),!V)return Mt(s,N)}else{var Q=Nt(s),oe=Q==ta||Q==Uh;if(Fr(s))return pm(s,V);if(Q==Qn||Q==Ke||oe&&!g){if(N=I||oe?{}:Bm(s),!V)return I?KD(s,vD(N,s)):qD(s,zf(N,s))}else{if(!Ye[Q])return g?s:{};N=aI(s,Q,V)}}_||(_=new Bn);var pe=_.get(s);if(pe)return pe;_.set(s,N),sg(s)?s.forEach(function(_e){N.add(an(_e,a,u,_e,s,_))}):og(s)&&s.forEach(function(_e,Fe){N.set(Fe,an(_e,a,u,Fe,s,_))});var ve=X?I?gd:md:I?$t:_t,De=Y?n:ve(s);return rn(De||s,function(_e,Fe){De&&(Fe=_e,_e=s[Fe]),rs(N,Fe,an(_e,a,u,Fe,s,_))}),N}function _D(s){var a=_t(s);return function(u){return Uf(u,s,a)}}function Uf(s,a,u){var f=u.length;if(s==null)return!f;for(s=Xe(s);f--;){var g=u[f],_=a[g],N=s[g];if(N===n&&!(g in s)||!_(N))return!1}return!0}function Zf(s,a,u){if(typeof s!="function")throw new on(c);return ds(function(){s.apply(n,u)},a)}function os(s,a,u,f){var g=-1,_=sa,N=!0,V=s.length,I=[],X=a.length;if(!V)return I;u&&(a=tt(a,Yt(u))),f?(_=Fc,N=!1):a.length>=i&&(_=Yi,N=!1,a=new no(a));e:for(;++g<V;){var Y=s[g],Q=u==null?Y:u(Y);if(Y=f||Y!==0?Y:0,N&&Q===Q){for(var oe=X;oe--;)if(a[oe]===Q)continue e;I.push(Y)}else _(a,Q,f)||I.push(Y)}return I}var Pr=ym(Zn),jf=ym(Jc,!0);function CD(s,a){var u=!0;return Pr(s,function(f,g,_){return u=!!a(f,g,_),u}),u}function ka(s,a,u){for(var f=-1,g=s.length;++f<g;){var _=s[f],N=a(_);if(N!=null&&(V===n?N===N&&!Qt(N):u(N,V)))var V=N,I=_}return I}function wD(s,a,u,f){var g=s.length;for(u=Be(u),u<0&&(u=-u>g?0:g+u),f=f===n||f>g?g:Be(f),f<0&&(f+=g),f=u>f?0:lg(f);u<f;)s[u++]=a;return s}function Wf(s,a){var u=[];return Pr(s,function(f,g,_){a(f,g,_)&&u.push(f)}),u}function wt(s,a,u,f,g){var _=-1,N=s.length;for(u||(u=cI),g||(g=[]);++_<N;){var V=s[_];a>0&&u(V)?a>1?wt(V,a-1,u,f,g):Ar(g,V):f||(g[g.length]=V)}return g}var Yc=vm(),Hf=vm(!0);function Zn(s,a){return s&&Yc(s,a,_t)}function Jc(s,a){return s&&Hf(s,a,_t)}function Sa(s,a){return Nr(a,function(u){return sr(s[u])})}function oo(s,a){a=Dr(a,s);for(var u=0,f=a.length;s!=null&&u<f;)s=s[Wn(a[u++])];return u&&u==f?s:n}function qf(s,a,u){var f=a(s);return Ne(s)?f:Ar(f,u(s))}function Dt(s){return s==null?s===n?XB:qB:eo&&eo in Xe(s)?rI(s):gI(s)}function Qc(s,a){return s>a}function bD(s,a){return s!=null&&qe.call(s,a)}function xD(s,a){return s!=null&&a in Xe(s)}function kD(s,a,u){return s>=Tt(a,u)&&s<mt(a,u)}function ed(s,a,u){for(var f=u?Fc:sa,g=s[0].length,_=s.length,N=_,V=z(_),I=1/0,X=[];N--;){var Y=s[N];N&&a&&(Y=tt(Y,Yt(a))),I=Tt(Y.length,I),V[N]=!u&&(a||g>=120&&Y.length>=120)?new no(N&&Y):n}Y=s[0];var Q=-1,oe=V[0];e:for(;++Q<g&&X.length<I;){var pe=Y[Q],ve=a?a(pe):pe;if(pe=u||pe!==0?pe:0,!(oe?Yi(oe,ve):f(X,ve,u))){for(N=_;--N;){var De=V[N];if(!(De?Yi(De,ve):f(s[N],ve,u)))continue e}oe&&oe.push(ve),X.push(pe)}}return X}function SD(s,a,u,f){return Zn(s,function(g,_,N){a(f,u(g),_,N)}),f}function is(s,a,u){a=Dr(a,s),s=Im(s,a);var f=s==null?s:s[Wn(cn(a))];return f==null?n:Xt(f,s,u)}function Kf(s){return it(s)&&Dt(s)==Ke}function ED(s){return it(s)&&Dt(s)==Xi}function TD(s){return it(s)&&Dt(s)==ji}function ss(s,a,u,f,g){return s===a?!0:s==null||a==null||!it(s)&&!it(a)?s!==s&&a!==a:ND(s,a,u,f,ss,g)}function ND(s,a,u,f,g,_){var N=Ne(s),V=Ne(a),I=N?Un:Nt(s),X=V?Un:Nt(a);I=I==Ke?Qn:I,X=X==Ke?Qn:X;var Y=I==Qn,Q=X==Qn,oe=I==X;if(oe&&Fr(s)){if(!Fr(a))return!1;N=!0,Y=!1}if(oe&&!Y)return _||(_=new Bn),N||qo(s)?Nm(s,a,u,f,g,_):tI(s,a,I,u,f,g,_);if(!(u&S)){var pe=Y&&qe.call(s,"__wrapped__"),ve=Q&&qe.call(a,"__wrapped__");if(pe||ve){var De=pe?s.value():s,_e=ve?a.value():a;return _||(_=new Bn),g(De,_e,u,f,_)}}return oe?(_||(_=new Bn),nI(s,a,u,f,g,_)):!1}function AD(s){return it(s)&&Nt(s)==Nn}function td(s,a,u,f){var g=u.length,_=g,N=!f;if(s==null)return!_;for(s=Xe(s);g--;){var V=u[g];if(N&&V[2]?V[1]!==s[V[0]]:!(V[0]in s))return!1}for(;++g<_;){V=u[g];var I=V[0],X=s[I],Y=V[1];if(N&&V[2]){if(X===n&&!(I in s))return!1}else{var Q=new Bn;if(f)var oe=f(X,Y,I,s,a,Q);if(!(oe===n?ss(Y,X,S|O,f,Q):oe))return!1}}return!0}function Xf(s){if(!ot(s)||uI(s))return!1;var a=sr(s)?AR:_P;return a.test(so(s))}function VD(s){return it(s)&&Dt(s)==Hi}function BD(s){return it(s)&&Nt(s)==An}function PD(s){return it(s)&&za(s.length)&&!!Qe[Dt(s)]}function Yf(s){return typeof s=="function"?s:s==null?zt:typeof s=="object"?Ne(s)?em(s[0],s[1]):Qf(s):_g(s)}function nd(s){if(!cs(s))return IR(s);var a=[];for(var u in Xe(s))qe.call(s,u)&&u!="constructor"&&a.push(u);return a}function RD(s){if(!ot(s))return mI(s);var a=cs(s),u=[];for(var f in s)f=="constructor"&&(a||!qe.call(s,f))||u.push(f);return u}function rd(s,a){return s<a}function Jf(s,a){var u=-1,f=Gt(s)?z(s.length):[];return Pr(s,function(g,_,N){f[++u]=a(g,_,N)}),f}function Qf(s){var a=vd(s);return a.length==1&&a[0][2]?Rm(a[0][0],a[0][1]):function(u){return u===s||td(u,s,a)}}function em(s,a){return Cd(s)&&Pm(a)?Rm(Wn(s),a):function(u){var f=Vd(u,s);return f===n&&f===a?Bd(u,s):ss(a,f,S|O)}}function Ea(s,a,u,f,g){s!==a&&Yc(a,function(_,N){if(g||(g=new Bn),ot(_))DD(s,a,N,u,Ea,f,g);else{var V=f?f(bd(s,N),_,N+"",s,a,g):n;V===n&&(V=_),Kc(s,N,V)}},$t)}function DD(s,a,u,f,g,_,N){var V=bd(s,u),I=bd(a,u),X=N.get(I);if(X){Kc(s,u,X);return}var Y=_?_(V,I,u+"",s,a,N):n,Q=Y===n;if(Q){var oe=Ne(I),pe=!oe&&Fr(I),ve=!oe&&!pe&&qo(I);Y=I,oe||pe||ve?Ne(V)?Y=V:at(V)?Y=Mt(V):pe?(Q=!1,Y=pm(I,!0)):ve?(Q=!1,Y=hm(I,!0)):Y=[]:us(I)||ao(I)?(Y=V,ao(V)?Y=cg(V):(!ot(V)||sr(V))&&(Y=Bm(I))):Q=!1}Q&&(N.set(I,Y),g(Y,I,f,_,N),N.delete(I)),Kc(s,u,Y)}function tm(s,a){var u=s.length;if(u)return a+=a<0?u:0,ir(a,u)?s[a]:n}function nm(s,a,u){a.length?a=tt(a,function(_){return Ne(_)?function(N){return oo(N,_.length===1?_[0]:_)}:_}):a=[zt];var f=-1;a=tt(a,Yt(ge()));var g=Jf(s,function(_,N,V){var I=tt(a,function(X){return X(_)});return{criteria:I,index:++f,value:_}});return aR(g,function(_,N){return HD(_,N,u)})}function ID(s,a){return rm(s,a,function(u,f){return Bd(s,f)})}function rm(s,a,u){for(var f=-1,g=a.length,_={};++f<g;){var N=a[f],V=oo(s,N);u(V,N)&&as(_,Dr(N,s),V)}return _}function FD(s){return function(a){return oo(a,s)}}function od(s,a,u,f){var g=f?sR:Oo,_=-1,N=a.length,V=s;for(s===a&&(a=Mt(a)),u&&(V=tt(s,Yt(u)));++_<N;)for(var I=0,X=a[_],Y=u?u(X):X;(I=g(V,Y,I,f))>-1;)V!==s&&ga.call(V,I,1),ga.call(s,I,1);return s}function om(s,a){for(var u=s?a.length:0,f=u-1;u--;){var g=a[u];if(u==f||g!==_){var _=g;ir(g)?ga.call(s,g,1):ld(s,g)}}return s}function id(s,a){return s+_a(Lf()*(a-s+1))}function OD(s,a,u,f){for(var g=-1,_=mt(va((a-s)/(u||1)),0),N=z(_);_--;)N[f?_:++g]=s,s+=u;return N}function sd(s,a){var u="";if(!s||a<1||a>K)return u;do a%2&&(u+=s),a=_a(a/2),a&&(s+=s);while(a);return u}function Ie(s,a){return xd(Dm(s,a,zt),s+"")}function LD(s){return $f(Ko(s))}function MD(s,a){var u=Ko(s);return Fa(u,ro(a,0,u.length))}function as(s,a,u,f){if(!ot(s))return s;a=Dr(a,s);for(var g=-1,_=a.length,N=_-1,V=s;V!=null&&++g<_;){var I=Wn(a[g]),X=u;if(I==="__proto__"||I==="constructor"||I==="prototype")return s;if(g!=N){var Y=V[I];X=f?f(Y,I,V):n,X===n&&(X=ot(Y)?Y:ir(a[g+1])?[]:{})}rs(V,I,X),V=V[I]}return s}var im=Ca?function(s,a){return Ca.set(s,a),s}:zt,GD=ya?function(s,a){return ya(s,"toString",{configurable:!0,enumerable:!1,value:Rd(a),writable:!0})}:zt;function $D(s){return Fa(Ko(s))}function ln(s,a,u){var f=-1,g=s.length;a<0&&(a=-a>g?0:g+a),u=u>g?g:u,u<0&&(u+=g),g=a>u?0:u-a>>>0,a>>>=0;for(var _=z(g);++f<g;)_[f]=s[f+a];return _}function zD(s,a){var u;return Pr(s,function(f,g,_){return u=a(f,g,_),!u}),!!u}function Ta(s,a,u){var f=0,g=s==null?f:s.length;if(typeof a=="number"&&a===a&&g<=Ze){for(;f<g;){var _=f+g>>>1,N=s[_];N!==null&&!Qt(N)&&(u?N<=a:N<a)?f=_+1:g=_}return g}return ad(s,a,zt,u)}function ad(s,a,u,f){var g=0,_=s==null?0:s.length;if(_===0)return 0;a=u(a);for(var N=a!==a,V=a===null,I=Qt(a),X=a===n;g<_;){var Y=_a((g+_)/2),Q=u(s[Y]),oe=Q!==n,pe=Q===null,ve=Q===Q,De=Qt(Q);if(N)var _e=f||ve;else X?_e=ve&&(f||oe):V?_e=ve&&oe&&(f||!pe):I?_e=ve&&oe&&!pe&&(f||!De):pe||De?_e=!1:_e=f?Q<=a:Q<a;_e?g=Y+1:_=Y}return Tt(_,Se)}function sm(s,a){for(var u=-1,f=s.length,g=0,_=[];++u<f;){var N=s[u],V=a?a(N):N;if(!u||!Pn(V,I)){var I=V;_[g++]=N===0?0:N}}return _}function am(s){return typeof s=="number"?s:Qt(s)?de:+s}function Jt(s){if(typeof s=="string")return s;if(Ne(s))return tt(s,Jt)+"";if(Qt(s))return Mf?Mf.call(s):"";var a=s+"";return a=="0"&&1/s==-H?"-0":a}function Rr(s,a,u){var f=-1,g=sa,_=s.length,N=!0,V=[],I=V;if(u)N=!1,g=Fc;else if(_>=i){var X=a?null:QD(s);if(X)return la(X);N=!1,g=Yi,I=new no}else I=a?[]:V;e:for(;++f<_;){var Y=s[f],Q=a?a(Y):Y;if(Y=u||Y!==0?Y:0,N&&Q===Q){for(var oe=I.length;oe--;)if(I[oe]===Q)continue e;a&&I.push(Q),V.push(Y)}else g(I,Q,u)||(I!==V&&I.push(Q),V.push(Y))}return V}function ld(s,a){return a=Dr(a,s),s=Im(s,a),s==null||delete s[Wn(cn(a))]}function lm(s,a,u,f){return as(s,a,u(oo(s,a)),f)}function Na(s,a,u,f){for(var g=s.length,_=f?g:-1;(f?_--:++_<g)&&a(s[_],_,s););return u?ln(s,f?0:_,f?_+1:g):ln(s,f?_+1:0,f?g:_)}function cm(s,a){var u=s;return u instanceof Oe&&(u=u.value()),Oc(a,function(f,g){return g.func.apply(g.thisArg,Ar([f],g.args))},u)}function cd(s,a,u){var f=s.length;if(f<2)return f?Rr(s[0]):[];for(var g=-1,_=z(f);++g<f;)for(var N=s[g],V=-1;++V<f;)V!=g&&(_[g]=os(_[g]||N,s[V],a,u));return Rr(wt(_,1),a,u)}function dm(s,a,u){for(var f=-1,g=s.length,_=a.length,N={};++f<g;){var V=f<_?a[f]:n;u(N,s[f],V)}return N}function dd(s){return at(s)?s:[]}function ud(s){return typeof s=="function"?s:zt}function Dr(s,a){return Ne(s)?s:Cd(s,a)?[s]:Mm(He(s))}var UD=Ie;function Ir(s,a,u){var f=s.length;return u=u===n?f:u,!a&&u>=f?s:ln(s,a,u)}var um=VR||function(s){return Ct.clearTimeout(s)};function pm(s,a){if(a)return s.slice();var u=s.length,f=Rf?Rf(u):new s.constructor(u);return s.copy(f),f}function pd(s){var a=new s.constructor(s.byteLength);return new fa(a).set(new fa(s)),a}function ZD(s,a){var u=a?pd(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.byteLength)}function jD(s){var a=new s.constructor(s.source,qh.exec(s));return a.lastIndex=s.lastIndex,a}function WD(s){return ns?Xe(ns.call(s)):{}}function hm(s,a){var u=a?pd(s.buffer):s.buffer;return new s.constructor(u,s.byteOffset,s.length)}function fm(s,a){if(s!==a){var u=s!==n,f=s===null,g=s===s,_=Qt(s),N=a!==n,V=a===null,I=a===a,X=Qt(a);if(!V&&!X&&!_&&s>a||_&&N&&I&&!V&&!X||f&&N&&I||!u&&I||!g)return 1;if(!f&&!_&&!X&&s<a||X&&u&&g&&!f&&!_||V&&u&&g||!N&&g||!I)return-1}return 0}function HD(s,a,u){for(var f=-1,g=s.criteria,_=a.criteria,N=g.length,V=u.length;++f<N;){var I=fm(g[f],_[f]);if(I){if(f>=V)return I;var X=u[f];return I*(X=="desc"?-1:1)}}return s.index-a.index}function mm(s,a,u,f){for(var g=-1,_=s.length,N=u.length,V=-1,I=a.length,X=mt(_-N,0),Y=z(I+X),Q=!f;++V<I;)Y[V]=a[V];for(;++g<N;)(Q||g<_)&&(Y[u[g]]=s[g]);for(;X--;)Y[V++]=s[g++];return Y}function gm(s,a,u,f){for(var g=-1,_=s.length,N=-1,V=u.length,I=-1,X=a.length,Y=mt(_-V,0),Q=z(Y+X),oe=!f;++g<Y;)Q[g]=s[g];for(var pe=g;++I<X;)Q[pe+I]=a[I];for(;++N<V;)(oe||g<_)&&(Q[pe+u[N]]=s[g++]);return Q}function Mt(s,a){var u=-1,f=s.length;for(a||(a=z(f));++u<f;)a[u]=s[u];return a}function jn(s,a,u,f){var g=!u;u||(u={});for(var _=-1,N=a.length;++_<N;){var V=a[_],I=f?f(u[V],s[V],V,u,s):n;I===n&&(I=s[V]),g?nr(u,V,I):rs(u,V,I)}return u}function qD(s,a){return jn(s,_d(s),a)}function KD(s,a){return jn(s,Am(s),a)}function Aa(s,a){return function(u,f){var g=Ne(u)?eR:yD,_=a?a():{};return g(u,s,ge(f,2),_)}}function jo(s){return Ie(function(a,u){var f=-1,g=u.length,_=g>1?u[g-1]:n,N=g>2?u[2]:n;for(_=s.length>3&&typeof _=="function"?(g--,_):n,N&&It(u[0],u[1],N)&&(_=g<3?n:_,g=1),a=Xe(a);++f<g;){var V=u[f];V&&s(a,V,f,_)}return a})}function ym(s,a){return function(u,f){if(u==null)return u;if(!Gt(u))return s(u,f);for(var g=u.length,_=a?g:-1,N=Xe(u);(a?_--:++_<g)&&f(N[_],_,N)!==!1;);return u}}function vm(s){return function(a,u,f){for(var g=-1,_=Xe(a),N=f(a),V=N.length;V--;){var I=N[s?V:++g];if(u(_[I],I,_)===!1)break}return a}}function XD(s,a,u){var f=a&G,g=ls(s);function _(){var N=this&&this!==Ct&&this instanceof _?g:s;return N.apply(f?u:this,arguments)}return _}function _m(s){return function(a){a=He(a);var u=Lo(a)?Vn(a):n,f=u?u[0]:a.charAt(0),g=u?Ir(u,1).join(""):a.slice(1);return f[s]()+g}}function Wo(s){return function(a){return Oc(yg(gg(a).replace(GP,"")),s,"")}}function ls(s){return function(){var a=arguments;switch(a.length){case 0:return new s;case 1:return new s(a[0]);case 2:return new s(a[0],a[1]);case 3:return new s(a[0],a[1],a[2]);case 4:return new s(a[0],a[1],a[2],a[3]);case 5:return new s(a[0],a[1],a[2],a[3],a[4]);case 6:return new s(a[0],a[1],a[2],a[3],a[4],a[5]);case 7:return new s(a[0],a[1],a[2],a[3],a[4],a[5],a[6])}var u=Zo(s.prototype),f=s.apply(u,a);return ot(f)?f:u}}function YD(s,a,u){var f=ls(s);function g(){for(var _=arguments.length,N=z(_),V=_,I=Ho(g);V--;)N[V]=arguments[V];var X=_<3&&N[0]!==I&&N[_-1]!==I?[]:Vr(N,I);if(_-=X.length,_<u)return km(s,a,Va,g.placeholder,n,N,X,n,n,u-_);var Y=this&&this!==Ct&&this instanceof g?f:s;return Xt(Y,this,N)}return g}function Cm(s){return function(a,u,f){var g=Xe(a);if(!Gt(a)){var _=ge(u,3);a=_t(a),u=function(V){return _(g[V],V,g)}}var N=s(a,u,f);return N>-1?g[_?a[N]:N]:n}}function wm(s){return or(function(a){var u=a.length,f=u,g=sn.prototype.thru;for(s&&a.reverse();f--;){var _=a[f];if(typeof _!="function")throw new on(c);if(g&&!N&&Da(_)=="wrapper")var N=new sn([],!0)}for(f=N?f:u;++f<u;){_=a[f];var V=Da(_),I=V=="wrapper"?yd(_):n;I&&wd(I[0])&&I[1]==(j|F|A|$)&&!I[4].length&&I[9]==1?N=N[Da(I[0])].apply(N,I[3]):N=_.length==1&&wd(_)?N[V]():N.thru(_)}return function(){var X=arguments,Y=X[0];if(N&&X.length==1&&Ne(Y))return N.plant(Y).value();for(var Q=0,oe=u?a[Q].apply(this,X):Y;++Q<u;)oe=a[Q].call(this,oe);return oe}})}function Va(s,a,u,f,g,_,N,V,I,X){var Y=a&j,Q=a&G,oe=a&b,pe=a&(F|D),ve=a&Z,De=oe?n:ls(s);function _e(){for(var Fe=arguments.length,Le=z(Fe),en=Fe;en--;)Le[en]=arguments[en];if(pe)var Ft=Ho(_e),tn=cR(Le,Ft);if(f&&(Le=mm(Le,f,g,pe)),_&&(Le=gm(Le,_,N,pe)),Fe-=tn,pe&&Fe<X){var lt=Vr(Le,Ft);return km(s,a,Va,_e.placeholder,u,Le,lt,V,I,X-Fe)}var Rn=Q?u:this,lr=oe?Rn[s]:s;return Fe=Le.length,V?Le=yI(Le,V):ve&&Fe>1&&Le.reverse(),Y&&I<Fe&&(Le.length=I),this&&this!==Ct&&this instanceof _e&&(lr=De||ls(lr)),lr.apply(Rn,Le)}return _e}function bm(s,a){return function(u,f){return SD(u,s,a(f),{})}}function Ba(s,a){return function(u,f){var g;if(u===n&&f===n)return a;if(u!==n&&(g=u),f!==n){if(g===n)return f;typeof u=="string"||typeof f=="string"?(u=Jt(u),f=Jt(f)):(u=am(u),f=am(f)),g=s(u,f)}return g}}function hd(s){return or(function(a){return a=tt(a,Yt(ge())),Ie(function(u){var f=this;return s(a,function(g){return Xt(g,f,u)})})})}function Pa(s,a){a=a===n?" ":Jt(a);var u=a.length;if(u<2)return u?sd(a,s):a;var f=sd(a,va(s/Mo(a)));return Lo(a)?Ir(Vn(f),0,s).join(""):f.slice(0,s)}function JD(s,a,u,f){var g=a&G,_=ls(s);function N(){for(var V=-1,I=arguments.length,X=-1,Y=f.length,Q=z(Y+I),oe=this&&this!==Ct&&this instanceof N?_:s;++X<Y;)Q[X]=f[X];for(;I--;)Q[X++]=arguments[++V];return Xt(oe,g?u:this,Q)}return N}function xm(s){return function(a,u,f){return f&&typeof f!="number"&&It(a,u,f)&&(u=f=n),a=ar(a),u===n?(u=a,a=0):u=ar(u),f=f===n?a<u?1:-1:ar(f),OD(a,u,f,s)}}function Ra(s){return function(a,u){return typeof a=="string"&&typeof u=="string"||(a=dn(a),u=dn(u)),s(a,u)}}function km(s,a,u,f,g,_,N,V,I,X){var Y=a&F,Q=Y?N:n,oe=Y?n:N,pe=Y?_:n,ve=Y?n:_;a|=Y?A:U,a&=~(Y?U:A),a&R||(a&=~(G|b));var De=[s,a,g,pe,Q,ve,oe,V,I,X],_e=u.apply(n,De);return wd(s)&&Fm(_e,De),_e.placeholder=f,Om(_e,s,a)}function fd(s){var a=ft[s];return function(u,f){if(u=dn(u),f=f==null?0:Tt(Be(f),292),f&&Of(u)){var g=(He(u)+"e").split("e"),_=a(g[0]+"e"+(+g[1]+f));return g=(He(_)+"e").split("e"),+(g[0]+"e"+(+g[1]-f))}return a(u)}}var QD=zo&&1/la(new zo([,-0]))[1]==H?function(s){return new zo(s)}:Fd;function Sm(s){return function(a){var u=Nt(a);return u==Nn?Zc(a):u==An?gR(a):lR(a,s(a))}}function rr(s,a,u,f,g,_,N,V){var I=a&b;if(!I&&typeof s!="function")throw new on(c);var X=f?f.length:0;if(X||(a&=~(A|U),f=g=n),N=N===n?N:mt(Be(N),0),V=V===n?V:Be(V),X-=g?g.length:0,a&U){var Y=f,Q=g;f=g=n}var oe=I?n:yd(s),pe=[s,a,u,f,g,Y,Q,_,N,V];if(oe&&fI(pe,oe),s=pe[0],a=pe[1],u=pe[2],f=pe[3],g=pe[4],V=pe[9]=pe[9]===n?I?0:s.length:mt(pe[9]-X,0),!V&&a&(F|D)&&(a&=~(F|D)),!a||a==G)var ve=XD(s,a,u);else a==F||a==D?ve=YD(s,a,V):(a==A||a==(G|A))&&!g.length?ve=JD(s,a,u,f):ve=Va.apply(n,pe);var De=oe?im:Fm;return Om(De(ve,pe),s,a)}function Em(s,a,u,f){return s===n||Pn(s,$o[u])&&!qe.call(f,u)?a:s}function Tm(s,a,u,f,g,_){return ot(s)&&ot(a)&&(_.set(a,s),Ea(s,a,n,Tm,_),_.delete(a)),s}function eI(s){return us(s)?n:s}function Nm(s,a,u,f,g,_){var N=u&S,V=s.length,I=a.length;if(V!=I&&!(N&&I>V))return!1;var X=_.get(s),Y=_.get(a);if(X&&Y)return X==a&&Y==s;var Q=-1,oe=!0,pe=u&O?new no:n;for(_.set(s,a),_.set(a,s);++Q<V;){var ve=s[Q],De=a[Q];if(f)var _e=N?f(De,ve,Q,a,s,_):f(ve,De,Q,s,a,_);if(_e!==n){if(_e)continue;oe=!1;break}if(pe){if(!Lc(a,function(Fe,Le){if(!Yi(pe,Le)&&(ve===Fe||g(ve,Fe,u,f,_)))return pe.push(Le)})){oe=!1;break}}else if(!(ve===De||g(ve,De,u,f,_))){oe=!1;break}}return _.delete(s),_.delete(a),oe}function tI(s,a,u,f,g,_,N){switch(u){case Io:if(s.byteLength!=a.byteLength||s.byteOffset!=a.byteOffset)return!1;s=s.buffer,a=a.buffer;case Xi:return!(s.byteLength!=a.byteLength||!_(new fa(s),new fa(a)));case Zi:case ji:case Wi:return Pn(+s,+a);case ea:return s.name==a.name&&s.message==a.message;case Hi:case qi:return s==a+"";case Nn:var V=Zc;case An:var I=f&S;if(V||(V=la),s.size!=a.size&&!I)return!1;var X=N.get(s);if(X)return X==a;f|=O,N.set(s,a);var Y=Nm(V(s),V(a),f,g,_,N);return N.delete(s),Y;case na:if(ns)return ns.call(s)==ns.call(a)}return!1}function nI(s,a,u,f,g,_){var N=u&S,V=md(s),I=V.length,X=md(a),Y=X.length;if(I!=Y&&!N)return!1;for(var Q=I;Q--;){var oe=V[Q];if(!(N?oe in a:qe.call(a,oe)))return!1}var pe=_.get(s),ve=_.get(a);if(pe&&ve)return pe==a&&ve==s;var De=!0;_.set(s,a),_.set(a,s);for(var _e=N;++Q<I;){oe=V[Q];var Fe=s[oe],Le=a[oe];if(f)var en=N?f(Le,Fe,oe,a,s,_):f(Fe,Le,oe,s,a,_);if(!(en===n?Fe===Le||g(Fe,Le,u,f,_):en)){De=!1;break}_e||(_e=oe=="constructor")}if(De&&!_e){var Ft=s.constructor,tn=a.constructor;Ft!=tn&&"constructor"in s&&"constructor"in a&&!(typeof Ft=="function"&&Ft instanceof Ft&&typeof tn=="function"&&tn instanceof tn)&&(De=!1)}return _.delete(s),_.delete(a),De}function or(s){return xd(Dm(s,n,Um),s+"")}function md(s){return qf(s,_t,_d)}function gd(s){return qf(s,$t,Am)}var yd=Ca?function(s){return Ca.get(s)}:Fd;function Da(s){for(var a=s.name+"",u=Uo[a],f=qe.call(Uo,a)?u.length:0;f--;){var g=u[f],_=g.func;if(_==null||_==s)return g.name}return a}function Ho(s){var a=qe.call(v,"placeholder")?v:s;return a.placeholder}function ge(){var s=v.iteratee||Dd;return s=s===Dd?Yf:s,arguments.length?s(arguments[0],arguments[1]):s}function Ia(s,a){var u=s.__data__;return dI(a)?u[typeof a=="string"?"string":"hash"]:u.map}function vd(s){for(var a=_t(s),u=a.length;u--;){var f=a[u],g=s[f];a[u]=[f,g,Pm(g)]}return a}function io(s,a){var u=hR(s,a);return Xf(u)?u:n}function rI(s){var a=qe.call(s,eo),u=s[eo];try{s[eo]=n;var f=!0}catch{}var g=pa.call(s);return f&&(a?s[eo]=u:delete s[eo]),g}var _d=Wc?function(s){return s==null?[]:(s=Xe(s),Nr(Wc(s),function(a){return If.call(s,a)}))}:Od,Am=Wc?function(s){for(var a=[];s;)Ar(a,_d(s)),s=ma(s);return a}:Od,Nt=Dt;(Hc&&Nt(new Hc(new ArrayBuffer(1)))!=Io||Qi&&Nt(new Qi)!=Nn||qc&&Nt(qc.resolve())!=Zh||zo&&Nt(new zo)!=An||es&&Nt(new es)!=Ki)&&(Nt=function(s){var a=Dt(s),u=a==Qn?s.constructor:n,f=u?so(u):"";if(f)switch(f){case MR:return Io;case GR:return Nn;case $R:return Zh;case zR:return An;case UR:return Ki}return a});function oI(s,a,u){for(var f=-1,g=u.length;++f<g;){var _=u[f],N=_.size;switch(_.type){case"drop":s+=N;break;case"dropRight":a-=N;break;case"take":a=Tt(a,s+N);break;case"takeRight":s=mt(s,a-N);break}}return{start:s,end:a}}function iI(s){var a=s.match(uP);return a?a[1].split(pP):[]}function Vm(s,a,u){a=Dr(a,s);for(var f=-1,g=a.length,_=!1;++f<g;){var N=Wn(a[f]);if(!(_=s!=null&&u(s,N)))break;s=s[N]}return _||++f!=g?_:(g=s==null?0:s.length,!!g&&za(g)&&ir(N,g)&&(Ne(s)||ao(s)))}function sI(s){var a=s.length,u=new s.constructor(a);return a&&typeof s[0]=="string"&&qe.call(s,"index")&&(u.index=s.index,u.input=s.input),u}function Bm(s){return typeof s.constructor=="function"&&!cs(s)?Zo(ma(s)):{}}function aI(s,a,u){var f=s.constructor;switch(a){case Xi:return pd(s);case Zi:case ji:return new f(+s);case Io:return ZD(s,u);case vc:case _c:case Cc:case wc:case bc:case xc:case kc:case Sc:case Ec:return hm(s,u);case Nn:return new f;case Wi:case qi:return new f(s);case Hi:return jD(s);case An:return new f;case na:return WD(s)}}function lI(s,a){var u=a.length;if(!u)return s;var f=u-1;return a[f]=(u>1?"& ":"")+a[f],a=a.join(u>2?", ":" "),s.replace(dP,`{
|
|
73
73
|
/* [wrapped with `+a+`] */
|
|
74
|
-
`)}function FA(i){return Ee(i)||ao(i)||!!(Eh&&i&&i[Eh])}function er(i,a){var d=typeof i;return a=a??ne,!!a&&(d=="number"||d!="symbol"&&HB.test(i))&&i>-1&&i%1==0&&i<a}function At(i,a,d){if(!tt(d))return!1;var h=typeof a;return(h=="number"?Rt(d)&&er(a,d.length):h=="string"&&a in d)?En(d[a],i):!1}function $c(i,a){if(Ee(i))return!1;var d=typeof i;return d=="number"||d=="symbol"||d=="boolean"||i==null||qt(i)?!0:AB.test(i)||!NB.test(i)||a!=null&&i in je(a)}function RA(i){var a=typeof i;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?i!=="__proto__":i===null}function Uc(i){var a=_a(i),d=_[a];if(typeof d!="function"||!(a in Re.prototype))return!1;if(i===d)return!0;var h=Lc(d);return!!h&&i===h[0]}function MA(i){return!!bh&&bh in i}var IA=qs?tr:sd;function ts(i){var a=i&&i.constructor,d=typeof a=="function"&&a.prototype||Io;return i===d}function xf(i){return i===i&&!tt(i)}function kf(i,a){return function(d){return d==null?!1:d[i]===a&&(a!==n||i in je(d))}}function OA(i){var a=ka(i,function(h){return d.size===f&&d.clear(),h}),d=a.cache;return a}function LA(i,a){var d=i[1],h=a[1],g=d|h,v=g<(L|C|te),E=h==te&&d==O||h==te&&d==j&&i[7].length<=a[8]||h==(te|j)&&a[7].length<=a[8]&&d==O;if(!(v||E))return i;h&L&&(i[2]=a[2],g|=d&L?0:R);var V=a[3];if(V){var D=i[3];i[3]=D?sf(D,V,a[4]):V,i[4]=D?Br(i[3],m):a[4]}return V=a[5],V&&(D=i[5],i[5]=D?af(D,V,a[6]):V,i[6]=D?Br(i[5],m):a[6]),V=a[7],V&&(i[7]=V),h&te&&(i[8]=i[8]==null?a[8]:kt(i[8],a[8])),i[9]==null&&(i[9]=a[9]),i[0]=a[0],i[1]=g,i}function GA(i){var a=[];if(i!=null)for(var d in je(i))a.push(d);return a}function zA(i){return Ys.call(i)}function Sf(i,a,d){return a=pt(a===n?i.length-1:a,0),function(){for(var h=arguments,g=-1,v=pt(h.length-a,0),E=z(v);++g<v;)E[g]=h[a+g];g=-1;for(var V=z(a+1);++g<a;)V[g]=h[g];return V[a]=d(E),Wt(i,this,V)}}function Ef(i,a){return a.length<2?i:oo(i,nn(a,0,-1))}function $A(i,a){for(var d=i.length,h=kt(a.length,d),g=Ft(i);h--;){var v=a[h];i[h]=er(v,d)?g[v]:n}return i}function Zc(i,a){if(!(a==="constructor"&&typeof i[a]=="function")&&a!="__proto__")return i[a]}var Tf=Vf(Kh),ns=rN||function(i,a){return yt.setTimeout(i,a)},Wc=Vf(uA);function Bf(i,a,d){var h=a+"";return Wc(i,DA(h,UA(NA(h),d)))}function Vf(i){var a=0,d=0;return function(){var h=aN(),g=S-(h-d);if(d=h,g>0){if(++a>=G)return arguments[0]}else a=0;return i.apply(n,arguments)}}function Ca(i,a){var d=-1,h=i.length,g=h-1;for(a=a===n?h:a;++d<a;){var v=Tc(d,g),E=i[v];i[v]=i[d],i[d]=E}return i.length=a,i}var Nf=OA(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(PB,function(d,h,g,v){a.push(g?v.replace(GB,"$1"):h||d)}),a});function Gn(i){if(typeof i=="string"||qt(i))return i;var a=i+"";return a=="0"&&1/i==-Q?"-0":a}function so(i){if(i!=null){try{return Ks.call(i)}catch{}try{return i+""}catch{}}return""}function UA(i,a){return Xt(xr,function(d){var h="_."+d[0];a&d[1]&&!Zs(i,h)&&i.push(h)}),i.sort()}function Af(i){if(i instanceof Re)return i.clone();var a=new en(i.__wrapped__,i.__chain__);return a.__actions__=Ft(i.__actions__),a.__index__=i.__index__,a.__values__=i.__values__,a}function ZA(i,a,d){(d?At(i,a,d):a===n)?a=1:a=pt(Ve(a),0);var h=i==null?0:i.length;if(!h||a<1)return[];for(var g=0,v=0,E=z(na(h/a));g<h;)E[v++]=nn(i,g,g+=a);return E}function WA(i){for(var a=-1,d=i==null?0:i.length,h=0,g=[];++a<d;){var v=i[a];v&&(g[h++]=v)}return g}function HA(){var i=arguments.length;if(!i)return[];for(var a=z(i-1),d=arguments[0],h=i;h--;)a[h-1]=arguments[h];return Tr(Ee(d)?Ft(d):[d],_t(a,1))}var jA=De(function(i,a){return it(i)?Yi(i,_t(a,1,it,!0)):[]}),qA=De(function(i,a){var d=rn(a);return it(d)&&(d=n),it(i)?Yi(i,_t(a,1,it,!0),fe(d,2)):[]}),KA=De(function(i,a){var d=rn(a);return it(d)&&(d=n),it(i)?Yi(i,_t(a,1,it,!0),n,d):[]});function YA(i,a,d){var h=i==null?0:i.length;return h?(a=d||a===n?1:Ve(a),nn(i,a<0?0:a,h)):[]}function JA(i,a,d){var h=i==null?0:i.length;return h?(a=d||a===n?1:Ve(a),a=h-a,nn(i,0,a<0?0:a)):[]}function XA(i,a){return i&&i.length?pa(i,fe(a,3),!0,!0):[]}function QA(i,a){return i&&i.length?pa(i,fe(a,3),!0):[]}function eP(i,a,d,h){var g=i==null?0:i.length;return g?(d&&typeof d!="number"&&At(i,a,d)&&(d=0,h=g),HN(i,a,d,h)):[]}function Pf(i,a,d){var h=i==null?0:i.length;if(!h)return-1;var g=d==null?0:Ve(d);return g<0&&(g=pt(h+g,0)),Ws(i,fe(a,3),g)}function Df(i,a,d){var h=i==null?0:i.length;if(!h)return-1;var g=h-1;return d!==n&&(g=Ve(d),g=d<0?pt(h+g,0):kt(g,h-1)),Ws(i,fe(a,3),g,!0)}function Ff(i){var a=i==null?0:i.length;return a?_t(i,1):[]}function tP(i){var a=i==null?0:i.length;return a?_t(i,Q):[]}function nP(i,a){var d=i==null?0:i.length;return d?(a=a===n?1:Ve(a),_t(i,a)):[]}function rP(i){for(var a=-1,d=i==null?0:i.length,h={};++a<d;){var g=i[a];h[g[0]]=g[1]}return h}function Rf(i){return i&&i.length?i[0]:n}function oP(i,a,d){var h=i==null?0:i.length;if(!h)return-1;var g=d==null?0:Ve(d);return g<0&&(g=pt(h+g,0)),Do(i,a,g)}function iP(i){var a=i==null?0:i.length;return a?nn(i,0,-1):[]}var sP=De(function(i){var a=Xe(i,Pc);return a.length&&a[0]===i[0]?bc(a):[]}),aP=De(function(i){var a=rn(i),d=Xe(i,Pc);return a===rn(d)?a=n:d.pop(),d.length&&d[0]===i[0]?bc(d,fe(a,2)):[]}),lP=De(function(i){var a=rn(i),d=Xe(i,Pc);return a=typeof a=="function"?a:n,a&&d.pop(),d.length&&d[0]===i[0]?bc(d,n,a):[]});function cP(i,a){return i==null?"":iN.call(i,a)}function rn(i){var a=i==null?0:i.length;return a?i[a-1]:n}function dP(i,a,d){var h=i==null?0:i.length;if(!h)return-1;var g=h;return d!==n&&(g=Ve(d),g=g<0?pt(h+g,0):kt(g,h-1)),a===a?UV(i,a,g):Ws(i,fh,g,!0)}function uP(i,a){return i&&i.length?Wh(i,Ve(a)):n}var pP=De(Mf);function Mf(i,a){return i&&i.length&&a&&a.length?Ec(i,a):i}function hP(i,a,d){return i&&i.length&&a&&a.length?Ec(i,a,fe(d,2)):i}function fP(i,a,d){return i&&i.length&&a&&a.length?Ec(i,a,n,d):i}var mP=Qn(function(i,a){var d=i==null?0:i.length,h=_c(i,a);return qh(i,Xe(a,function(g){return er(g,d)?+g:g}).sort(of)),h});function gP(i,a){var d=[];if(!(i&&i.length))return d;var h=-1,g=[],v=i.length;for(a=fe(a,3);++h<v;){var E=i[h];a(E,h,i)&&(d.push(E),g.push(h))}return qh(i,g),d}function Hc(i){return i==null?i:cN.call(i)}function yP(i,a,d){var h=i==null?0:i.length;return h?(d&&typeof d!="number"&&At(i,a,d)?(a=0,d=h):(a=a==null?0:Ve(a),d=d===n?h:Ve(d)),nn(i,a,d)):[]}function _P(i,a){return ua(i,a)}function vP(i,a,d){return Vc(i,a,fe(d,2))}function CP(i,a){var d=i==null?0:i.length;if(d){var h=ua(i,a);if(h<d&&En(i[h],a))return h}return-1}function wP(i,a){return ua(i,a,!0)}function bP(i,a,d){return Vc(i,a,fe(d,2),!0)}function xP(i,a){var d=i==null?0:i.length;if(d){var h=ua(i,a,!0)-1;if(En(i[h],a))return h}return-1}function kP(i){return i&&i.length?Yh(i):[]}function SP(i,a){return i&&i.length?Yh(i,fe(a,2)):[]}function EP(i){var a=i==null?0:i.length;return a?nn(i,1,a):[]}function TP(i,a,d){return i&&i.length?(a=d||a===n?1:Ve(a),nn(i,0,a<0?0:a)):[]}function BP(i,a,d){var h=i==null?0:i.length;return h?(a=d||a===n?1:Ve(a),a=h-a,nn(i,a<0?0:a,h)):[]}function VP(i,a){return i&&i.length?pa(i,fe(a,3),!1,!0):[]}function NP(i,a){return i&&i.length?pa(i,fe(a,3)):[]}var AP=De(function(i){return Ar(_t(i,1,it,!0))}),PP=De(function(i){var a=rn(i);return it(a)&&(a=n),Ar(_t(i,1,it,!0),fe(a,2))}),DP=De(function(i){var a=rn(i);return a=typeof a=="function"?a:n,Ar(_t(i,1,it,!0),n,a)});function FP(i){return i&&i.length?Ar(i):[]}function RP(i,a){return i&&i.length?Ar(i,fe(a,2)):[]}function MP(i,a){return a=typeof a=="function"?a:n,i&&i.length?Ar(i,n,a):[]}function jc(i){if(!(i&&i.length))return[];var a=0;return i=Er(i,function(d){if(it(d))return a=pt(d.length,a),!0}),dc(a,function(d){return Xe(i,ac(d))})}function If(i,a){if(!(i&&i.length))return[];var d=jc(i);return a==null?d:Xe(d,function(h){return Wt(a,n,h)})}var IP=De(function(i,a){return it(i)?Yi(i,a):[]}),OP=De(function(i){return Ac(Er(i,it))}),LP=De(function(i){var a=rn(i);return it(a)&&(a=n),Ac(Er(i,it),fe(a,2))}),GP=De(function(i){var a=rn(i);return a=typeof a=="function"?a:n,Ac(Er(i,it),n,a)}),zP=De(jc);function $P(i,a){return ef(i||[],a||[],Ki)}function UP(i,a){return ef(i||[],a||[],Qi)}var ZP=De(function(i){var a=i.length,d=a>1?i[a-1]:n;return d=typeof d=="function"?(i.pop(),d):n,If(i,d)});function Of(i){var a=_(i);return a.__chain__=!0,a}function WP(i,a){return a(i),i}function wa(i,a){return a(i)}var HP=Qn(function(i){var a=i.length,d=a?i[0]:0,h=this.__wrapped__,g=function(v){return _c(v,i)};return a>1||this.__actions__.length||!(h instanceof Re)||!er(d)?this.thru(g):(h=h.slice(d,+d+(a?1:0)),h.__actions__.push({func:wa,args:[g],thisArg:n}),new en(h,this.__chain__).thru(function(v){return a&&!v.length&&v.push(n),v}))});function jP(){return Of(this)}function qP(){return new en(this.value(),this.__chain__)}function KP(){this.__values__===n&&(this.__values__=Xf(this.value()));var i=this.__index__>=this.__values__.length,a=i?n:this.__values__[this.__index__++];return{done:i,value:a}}function YP(){return this}function JP(i){for(var a,d=this;d instanceof sa;){var h=Af(d);h.__index__=0,h.__values__=n,a?g.__wrapped__=h:a=h;var g=h;d=d.__wrapped__}return g.__wrapped__=i,a}function XP(){var i=this.__wrapped__;if(i instanceof Re){var a=i;return this.__actions__.length&&(a=new Re(this)),a=a.reverse(),a.__actions__.push({func:wa,args:[Hc],thisArg:n}),new en(a,this.__chain__)}return this.thru(Hc)}function QP(){return Qh(this.__wrapped__,this.__actions__)}var eD=ha(function(i,a,d){He.call(i,d)?++i[d]:Jn(i,d,1)});function tD(i,a,d){var h=Ee(i)?ph:WN;return d&&At(i,a,d)&&(a=n),h(i,fe(a,3))}function nD(i,a){var d=Ee(i)?Er:Mh;return d(i,fe(a,3))}var rD=uf(Pf),oD=uf(Df);function iD(i,a){return _t(ba(i,a),1)}function sD(i,a){return _t(ba(i,a),Q)}function aD(i,a,d){return d=d===n?1:Ve(d),_t(ba(i,a),d)}function Lf(i,a){var d=Ee(i)?Xt:Nr;return d(i,fe(a,3))}function Gf(i,a){var d=Ee(i)?EV:Rh;return d(i,fe(a,3))}var lD=ha(function(i,a,d){He.call(i,d)?i[d].push(a):Jn(i,d,[a])});function cD(i,a,d,h){i=Rt(i)?i:Wo(i),d=d&&!h?Ve(d):0;var g=i.length;return d<0&&(d=pt(g+d,0)),Ta(i)?d<=g&&i.indexOf(a,d)>-1:!!g&&Do(i,a,d)>-1}var dD=De(function(i,a,d){var h=-1,g=typeof a=="function",v=Rt(i)?z(i.length):[];return Nr(i,function(E){v[++h]=g?Wt(a,E,d):Ji(E,a,d)}),v}),uD=ha(function(i,a,d){Jn(i,d,a)});function ba(i,a){var d=Ee(i)?Xe:$h;return d(i,fe(a,3))}function pD(i,a,d,h){return i==null?[]:(Ee(a)||(a=a==null?[]:[a]),d=h?n:d,Ee(d)||(d=d==null?[]:[d]),Hh(i,a,d))}var hD=ha(function(i,a,d){i[d?0:1].push(a)},function(){return[[],[]]});function fD(i,a,d){var h=Ee(i)?ic:gh,g=arguments.length<3;return h(i,fe(a,4),d,g,Nr)}function mD(i,a,d){var h=Ee(i)?TV:gh,g=arguments.length<3;return h(i,fe(a,4),d,g,Rh)}function gD(i,a){var d=Ee(i)?Er:Mh;return d(i,Sa(fe(a,3)))}function yD(i){var a=Ee(i)?Ah:cA;return a(i)}function _D(i,a,d){(d?At(i,a,d):a===n)?a=1:a=Ve(a);var h=Ee(i)?GN:dA;return h(i,a)}function vD(i){var a=Ee(i)?zN:pA;return a(i)}function CD(i){if(i==null)return 0;if(Rt(i))return Ta(i)?Ro(i):i.length;var a=St(i);return a==bn||a==xn?i.size:kc(i).length}function wD(i,a,d){var h=Ee(i)?sc:hA;return d&&At(i,a,d)&&(a=n),h(i,fe(a,3))}var bD=De(function(i,a){if(i==null)return[];var d=a.length;return d>1&&At(i,a[0],a[1])?a=[]:d>2&&At(a[0],a[1],a[2])&&(a=[a[0]]),Hh(i,_t(a,1),[])}),xa=nN||function(){return yt.Date.now()};function xD(i,a){if(typeof a!="function")throw new Qt(c);return i=Ve(i),function(){if(--i<1)return a.apply(this,arguments)}}function zf(i,a,d){return a=d?n:a,a=i&&a==null?i.length:a,Xn(i,te,n,n,n,n,a)}function $f(i,a){var d;if(typeof a!="function")throw new Qt(c);return i=Ve(i),function(){return--i>0&&(d=a.apply(this,arguments)),i<=1&&(a=n),d}}var qc=De(function(i,a,d){var h=L;if(d.length){var g=Br(d,Uo(qc));h|=N}return Xn(i,h,a,d,g)}),Uf=De(function(i,a,d){var h=L|C;if(d.length){var g=Br(d,Uo(Uf));h|=N}return Xn(a,h,i,d,g)});function Zf(i,a,d){a=d?n:a;var h=Xn(i,O,n,n,n,n,n,a);return h.placeholder=Zf.placeholder,h}function Wf(i,a,d){a=d?n:a;var h=Xn(i,F,n,n,n,n,n,a);return h.placeholder=Wf.placeholder,h}function Hf(i,a,d){var h,g,v,E,V,D,W=0,H=!1,K=!1,oe=!0;if(typeof i!="function")throw new Qt(c);a=on(a)||0,tt(d)&&(H=!!d.leading,K="maxWait"in d,v=K?pt(on(d.maxWait)||0,a):v,oe="trailing"in d?!!d.trailing:oe);function ue(st){var Tn=h,rr=g;return h=g=n,W=st,E=i.apply(rr,Tn),E}function ge(st){return W=st,V=ns(Fe,a),H?ue(st):E}function Pe(st){var Tn=st-D,rr=st-W,um=a-Tn;return K?kt(um,v-rr):um}function ye(st){var Tn=st-D,rr=st-W;return D===n||Tn>=a||Tn<0||K&&rr>=v}function Fe(){var st=xa();if(ye(st))return Me(st);V=ns(Fe,Pe(st))}function Me(st){return V=n,oe&&h?ue(st):(h=g=n,E)}function Kt(){V!==n&&tf(V),W=0,h=D=g=V=n}function Pt(){return V===n?E:Me(xa())}function Yt(){var st=xa(),Tn=ye(st);if(h=arguments,g=this,D=st,Tn){if(V===n)return ge(D);if(K)return tf(V),V=ns(Fe,a),ue(D)}return V===n&&(V=ns(Fe,a)),E}return Yt.cancel=Kt,Yt.flush=Pt,Yt}var kD=De(function(i,a){return Fh(i,1,a)}),SD=De(function(i,a,d){return Fh(i,on(a)||0,d)});function ED(i){return Xn(i,Y)}function ka(i,a){if(typeof i!="function"||a!=null&&typeof a!="function")throw new Qt(c);var d=function(){var h=arguments,g=a?a.apply(this,h):h[0],v=d.cache;if(v.has(g))return v.get(g);var E=i.apply(this,h);return d.cache=v.set(g,E)||v,E};return d.cache=new(ka.Cache||Yn),d}ka.Cache=Yn;function Sa(i){if(typeof i!="function")throw new Qt(c);return function(){var a=arguments;switch(a.length){case 0:return!i.call(this);case 1:return!i.call(this,a[0]);case 2:return!i.call(this,a[0],a[1]);case 3:return!i.call(this,a[0],a[1],a[2])}return!i.apply(this,a)}}function TD(i){return $f(2,i)}var BD=fA(function(i,a){a=a.length==1&&Ee(a[0])?Xe(a[0],Ht(fe())):Xe(_t(a,1),Ht(fe()));var d=a.length;return De(function(h){for(var g=-1,v=kt(h.length,d);++g<v;)h[g]=a[g].call(this,h[g]);return Wt(i,this,h)})}),Kc=De(function(i,a){var d=Br(a,Uo(Kc));return Xn(i,N,n,a,d)}),jf=De(function(i,a){var d=Br(a,Uo(jf));return Xn(i,U,n,a,d)}),VD=Qn(function(i,a){return Xn(i,j,n,n,n,a)});function ND(i,a){if(typeof i!="function")throw new Qt(c);return a=a===n?a:Ve(a),De(i,a)}function AD(i,a){if(typeof i!="function")throw new Qt(c);return a=a==null?0:pt(Ve(a),0),De(function(d){var h=d[a],g=Dr(d,0,a);return h&&Tr(g,h),Wt(i,this,g)})}function PD(i,a,d){var h=!0,g=!0;if(typeof i!="function")throw new Qt(c);return tt(d)&&(h="leading"in d?!!d.leading:h,g="trailing"in d?!!d.trailing:g),Hf(i,a,{leading:h,maxWait:a,trailing:g})}function DD(i){return zf(i,1)}function FD(i,a){return Kc(Dc(a),i)}function RD(){if(!arguments.length)return[];var i=arguments[0];return Ee(i)?i:[i]}function MD(i){return tn(i,B)}function ID(i,a){return a=typeof a=="function"?a:n,tn(i,B,a)}function OD(i){return tn(i,y|B)}function LD(i,a){return a=typeof a=="function"?a:n,tn(i,y|B,a)}function GD(i,a){return a==null||Dh(i,a,gt(a))}function En(i,a){return i===a||i!==i&&a!==a}var zD=ya(wc),$D=ya(function(i,a){return i>=a}),ao=Lh(function(){return arguments}())?Lh:function(i){return nt(i)&&He.call(i,"callee")&&!Sh.call(i,"callee")},Ee=z.isArray,UD=sh?Ht(sh):JN;function Rt(i){return i!=null&&Ea(i.length)&&!tr(i)}function it(i){return nt(i)&&Rt(i)}function ZD(i){return i===!0||i===!1||nt(i)&&Nt(i)==kr}var Fr=oN||sd,WD=ah?Ht(ah):XN;function HD(i){return nt(i)&&i.nodeType===1&&!rs(i)}function jD(i){if(i==null)return!0;if(Rt(i)&&(Ee(i)||typeof i=="string"||typeof i.splice=="function"||Fr(i)||Zo(i)||ao(i)))return!i.length;var a=St(i);if(a==bn||a==xn)return!i.size;if(ts(i))return!kc(i).length;for(var d in i)if(He.call(i,d))return!1;return!0}function qD(i,a){return Xi(i,a)}function KD(i,a,d){d=typeof d=="function"?d:n;var h=d?d(i,a):n;return h===n?Xi(i,a,n,d):!!h}function Yc(i){if(!nt(i))return!1;var a=Nt(i);return a==Se||a==Ls||typeof i.message=="string"&&typeof i.name=="string"&&!rs(i)}function YD(i){return typeof i=="number"&&Th(i)}function tr(i){if(!tt(i))return!1;var a=Nt(i);return a==Xr||a==Fp||a==Os||a==CB}function qf(i){return typeof i=="number"&&i==Ve(i)}function Ea(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=ne}function tt(i){var a=typeof i;return i!=null&&(a=="object"||a=="function")}function nt(i){return i!=null&&typeof i=="object"}var Kf=lh?Ht(lh):eA;function JD(i,a){return i===a||xc(i,a,Gc(a))}function XD(i,a,d){return d=typeof d=="function"?d:n,xc(i,a,Gc(a),d)}function QD(i){return Yf(i)&&i!=+i}function eF(i){if(IA(i))throw new ke(l);return Gh(i)}function tF(i){return i===null}function nF(i){return i==null}function Yf(i){return typeof i=="number"||nt(i)&&Nt(i)==Oi}function rs(i){if(!nt(i)||Nt(i)!=qn)return!1;var a=Qs(i);if(a===null)return!0;var d=He.call(a,"constructor")&&a.constructor;return typeof d=="function"&&d instanceof d&&Ks.call(d)==XV}var Jc=ch?Ht(ch):tA;function rF(i){return qf(i)&&i>=-ne&&i<=ne}var Jf=dh?Ht(dh):nA;function Ta(i){return typeof i=="string"||!Ee(i)&&nt(i)&&Nt(i)==Gi}function qt(i){return typeof i=="symbol"||nt(i)&&Nt(i)==Gs}var Zo=uh?Ht(uh):rA;function oF(i){return i===n}function iF(i){return nt(i)&&St(i)==zi}function sF(i){return nt(i)&&Nt(i)==bB}var aF=ya(Sc),lF=ya(function(i,a){return i<=a});function Xf(i){if(!i)return[];if(Rt(i))return Ta(i)?kn(i):Ft(i);if(Zi&&i[Zi])return GV(i[Zi]());var a=St(i),d=a==bn?pc:a==xn?Hs:Wo;return d(i)}function nr(i){if(!i)return i===0?i:0;if(i=on(i),i===Q||i===-Q){var a=i<0?-1:1;return a*be}return i===i?i:0}function Ve(i){var a=nr(i),d=a%1;return a===a?d?a-d:a:0}function Qf(i){return i?ro(Ve(i),0,ot):0}function on(i){if(typeof i=="number")return i;if(qt(i))return $e;if(tt(i)){var a=typeof i.valueOf=="function"?i.valueOf():i;i=tt(a)?a+"":a}if(typeof i!="string")return i===0?i:+i;i=yh(i);var d=UB.test(i);return d||WB.test(i)?xV(i.slice(2),d?2:8):$B.test(i)?$e:+i}function em(i){return Ln(i,Mt(i))}function cF(i){return i?ro(Ve(i),-ne,ne):i===0?i:0}function We(i){return i==null?"":jt(i)}var dF=zo(function(i,a){if(ts(a)||Rt(a)){Ln(a,gt(a),i);return}for(var d in a)He.call(a,d)&&Ki(i,d,a[d])}),tm=zo(function(i,a){Ln(a,Mt(a),i)}),Ba=zo(function(i,a,d,h){Ln(a,Mt(a),i,h)}),uF=zo(function(i,a,d,h){Ln(a,gt(a),i,h)}),pF=Qn(_c);function hF(i,a){var d=Go(i);return a==null?d:Ph(d,a)}var fF=De(function(i,a){i=je(i);var d=-1,h=a.length,g=h>2?a[2]:n;for(g&&At(a[0],a[1],g)&&(h=1);++d<h;)for(var v=a[d],E=Mt(v),V=-1,D=E.length;++V<D;){var W=E[V],H=i[W];(H===n||En(H,Io[W])&&!He.call(i,W))&&(i[W]=v[W])}return i}),mF=De(function(i){return i.push(n,_f),Wt(nm,n,i)});function gF(i,a){return hh(i,fe(a,3),On)}function yF(i,a){return hh(i,fe(a,3),Cc)}function _F(i,a){return i==null?i:vc(i,fe(a,3),Mt)}function vF(i,a){return i==null?i:Ih(i,fe(a,3),Mt)}function CF(i,a){return i&&On(i,fe(a,3))}function wF(i,a){return i&&Cc(i,fe(a,3))}function bF(i){return i==null?[]:ca(i,gt(i))}function xF(i){return i==null?[]:ca(i,Mt(i))}function Xc(i,a,d){var h=i==null?n:oo(i,a);return h===n?d:h}function kF(i,a){return i!=null&&wf(i,a,jN)}function Qc(i,a){return i!=null&&wf(i,a,qN)}var SF=hf(function(i,a,d){a!=null&&typeof a.toString!="function"&&(a=Ys.call(a)),i[a]=d},td(It)),EF=hf(function(i,a,d){a!=null&&typeof a.toString!="function"&&(a=Ys.call(a)),He.call(i,a)?i[a].push(d):i[a]=[d]},fe),TF=De(Ji);function gt(i){return Rt(i)?Nh(i):kc(i)}function Mt(i){return Rt(i)?Nh(i,!0):oA(i)}function BF(i,a){var d={};return a=fe(a,3),On(i,function(h,g,v){Jn(d,a(h,g,v),h)}),d}function VF(i,a){var d={};return a=fe(a,3),On(i,function(h,g,v){Jn(d,g,a(h,g,v))}),d}var NF=zo(function(i,a,d){da(i,a,d)}),nm=zo(function(i,a,d,h){da(i,a,d,h)}),AF=Qn(function(i,a){var d={};if(i==null)return d;var h=!1;a=Xe(a,function(v){return v=Pr(v,i),h||(h=v.length>1),v}),Ln(i,Oc(i),d),h&&(d=tn(d,y|T|B,SA));for(var g=a.length;g--;)Nc(d,a[g]);return d});function PF(i,a){return rm(i,Sa(fe(a)))}var DF=Qn(function(i,a){return i==null?{}:sA(i,a)});function rm(i,a){if(i==null)return{};var d=Xe(Oc(i),function(h){return[h]});return a=fe(a),jh(i,d,function(h,g){return a(h,g[0])})}function FF(i,a,d){a=Pr(a,i);var h=-1,g=a.length;for(g||(g=1,i=n);++h<g;){var v=i==null?n:i[Gn(a[h])];v===n&&(h=g,v=d),i=tr(v)?v.call(i):v}return i}function RF(i,a,d){return i==null?i:Qi(i,a,d)}function MF(i,a,d,h){return h=typeof h=="function"?h:n,i==null?i:Qi(i,a,d,h)}var om=gf(gt),im=gf(Mt);function IF(i,a,d){var h=Ee(i),g=h||Fr(i)||Zo(i);if(a=fe(a,4),d==null){var v=i&&i.constructor;g?d=h?new v:[]:tt(i)?d=tr(v)?Go(Qs(i)):{}:d={}}return(g?Xt:On)(i,function(E,V,D){return a(d,E,V,D)}),d}function OF(i,a){return i==null?!0:Nc(i,a)}function LF(i,a,d){return i==null?i:Xh(i,a,Dc(d))}function GF(i,a,d,h){return h=typeof h=="function"?h:n,i==null?i:Xh(i,a,Dc(d),h)}function Wo(i){return i==null?[]:uc(i,gt(i))}function zF(i){return i==null?[]:uc(i,Mt(i))}function $F(i,a,d){return d===n&&(d=a,a=n),d!==n&&(d=on(d),d=d===d?d:0),a!==n&&(a=on(a),a=a===a?a:0),ro(on(i),a,d)}function UF(i,a,d){return a=nr(a),d===n?(d=a,a=0):d=nr(d),i=on(i),KN(i,a,d)}function ZF(i,a,d){if(d&&typeof d!="boolean"&&At(i,a,d)&&(a=d=n),d===n&&(typeof a=="boolean"?(d=a,a=n):typeof i=="boolean"&&(d=i,i=n)),i===n&&a===n?(i=0,a=1):(i=nr(i),a===n?(a=i,i=0):a=nr(a)),i>a){var h=i;i=a,a=h}if(d||i%1||a%1){var g=Bh();return kt(i+g*(a-i+bV("1e-"+((g+"").length-1))),a)}return Tc(i,a)}var WF=$o(function(i,a,d){return a=a.toLowerCase(),i+(d?sm(a):a)});function sm(i){return ed(We(i).toLowerCase())}function am(i){return i=We(i),i&&i.replace(jB,RV).replace(pV,"")}function HF(i,a,d){i=We(i),a=jt(a);var h=i.length;d=d===n?h:ro(Ve(d),0,h);var g=d;return d-=a.length,d>=0&&i.slice(d,g)==a}function jF(i){return i=We(i),i&&TB.test(i)?i.replace(Ip,MV):i}function qF(i){return i=We(i),i&&DB.test(i)?i.replace(Kl,"\\$&"):i}var KF=$o(function(i,a,d){return i+(d?"-":"")+a.toLowerCase()}),YF=$o(function(i,a,d){return i+(d?" ":"")+a.toLowerCase()}),JF=df("toLowerCase");function XF(i,a,d){i=We(i),a=Ve(a);var h=a?Ro(i):0;if(!a||h>=a)return i;var g=(a-h)/2;return ga(ra(g),d)+i+ga(na(g),d)}function QF(i,a,d){i=We(i),a=Ve(a);var h=a?Ro(i):0;return a&&h<a?i+ga(a-h,d):i}function eR(i,a,d){i=We(i),a=Ve(a);var h=a?Ro(i):0;return a&&h<a?ga(a-h,d)+i:i}function tR(i,a,d){return d||a==null?a=0:a&&(a=+a),lN(We(i).replace(Yl,""),a||0)}function nR(i,a,d){return(d?At(i,a,d):a===n)?a=1:a=Ve(a),Bc(We(i),a)}function rR(){var i=arguments,a=We(i[0]);return i.length<3?a:a.replace(i[1],i[2])}var oR=$o(function(i,a,d){return i+(d?"_":"")+a.toLowerCase()});function iR(i,a,d){return d&&typeof d!="number"&&At(i,a,d)&&(a=d=n),d=d===n?ot:d>>>0,d?(i=We(i),i&&(typeof a=="string"||a!=null&&!Jc(a))&&(a=jt(a),!a&&Fo(i))?Dr(kn(i),0,d):i.split(a,d)):[]}var sR=$o(function(i,a,d){return i+(d?" ":"")+ed(a)});function aR(i,a,d){return i=We(i),d=d==null?0:ro(Ve(d),0,i.length),a=jt(a),i.slice(d,d+a.length)==a}function lR(i,a,d){var h=_.templateSettings;d&&At(i,a,d)&&(a=n),i=We(i),a=Ba({},a,h,yf);var g=Ba({},a.imports,h.imports,yf),v=gt(g),E=uc(g,v),V,D,W=0,H=a.interpolate||zs,K="__p += '",oe=hc((a.escape||zs).source+"|"+H.source+"|"+(H===Op?zB:zs).source+"|"+(a.evaluate||zs).source+"|$","g"),ue="//# sourceURL="+(He.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++yV+"]")+`
|
|
75
|
-
`;
|
|
74
|
+
`)}function cI(s){return Ne(s)||ao(s)||!!(Ff&&s&&s[Ff])}function ir(s,a){var u=typeof s;return a=a??K,!!a&&(u=="number"||u!="symbol"&&wP.test(s))&&s>-1&&s%1==0&&s<a}function It(s,a,u){if(!ot(u))return!1;var f=typeof a;return(f=="number"?Gt(u)&&ir(a,u.length):f=="string"&&a in u)?Pn(u[a],s):!1}function Cd(s,a){if(Ne(s))return!1;var u=typeof s;return u=="number"||u=="symbol"||u=="boolean"||s==null||Qt(s)?!0:sP.test(s)||!iP.test(s)||a!=null&&s in Xe(a)}function dI(s){var a=typeof s;return a=="string"||a=="number"||a=="symbol"||a=="boolean"?s!=="__proto__":s===null}function wd(s){var a=Da(s),u=v[a];if(typeof u!="function"||!(a in Oe.prototype))return!1;if(s===u)return!0;var f=yd(u);return!!f&&s===f[0]}function uI(s){return!!Pf&&Pf in s}var pI=da?sr:Ld;function cs(s){var a=s&&s.constructor,u=typeof a=="function"&&a.prototype||$o;return s===u}function Pm(s){return s===s&&!ot(s)}function Rm(s,a){return function(u){return u==null?!1:u[s]===a&&(a!==n||s in Xe(u))}}function hI(s){var a=Ga(s,function(f){return u.size===h&&u.clear(),f}),u=a.cache;return a}function fI(s,a){var u=s[1],f=a[1],g=u|f,_=g<(G|b|j),N=f==j&&u==F||f==j&&u==$&&s[7].length<=a[8]||f==(j|$)&&a[7].length<=a[8]&&u==F;if(!(_||N))return s;f&G&&(s[2]=a[2],g|=u&G?0:R);var V=a[3];if(V){var I=s[3];s[3]=I?mm(I,V,a[4]):V,s[4]=I?Vr(s[3],m):a[4]}return V=a[5],V&&(I=s[5],s[5]=I?gm(I,V,a[6]):V,s[6]=I?Vr(s[5],m):a[6]),V=a[7],V&&(s[7]=V),f&j&&(s[8]=s[8]==null?a[8]:Tt(s[8],a[8])),s[9]==null&&(s[9]=a[9]),s[0]=a[0],s[1]=g,s}function mI(s){var a=[];if(s!=null)for(var u in Xe(s))a.push(u);return a}function gI(s){return pa.call(s)}function Dm(s,a,u){return a=mt(a===n?s.length-1:a,0),function(){for(var f=arguments,g=-1,_=mt(f.length-a,0),N=z(_);++g<_;)N[g]=f[a+g];g=-1;for(var V=z(a+1);++g<a;)V[g]=f[g];return V[a]=u(N),Xt(s,this,V)}}function Im(s,a){return a.length<2?s:oo(s,ln(a,0,-1))}function yI(s,a){for(var u=s.length,f=Tt(a.length,u),g=Mt(s);f--;){var _=a[f];s[f]=ir(_,u)?g[_]:n}return s}function bd(s,a){if(!(a==="constructor"&&typeof s[a]=="function")&&a!="__proto__")return s[a]}var Fm=Lm(im),ds=PR||function(s,a){return Ct.setTimeout(s,a)},xd=Lm(GD);function Om(s,a,u){var f=a+"";return xd(s,lI(f,vI(iI(f),u)))}function Lm(s){var a=0,u=0;return function(){var f=FR(),g=B-(f-u);if(u=f,g>0){if(++a>=he)return arguments[0]}else a=0;return s.apply(n,arguments)}}function Fa(s,a){var u=-1,f=s.length,g=f-1;for(a=a===n?f:a;++u<a;){var _=id(u,g),N=s[_];s[_]=s[u],s[u]=N}return s.length=a,s}var Mm=hI(function(s){var a=[];return s.charCodeAt(0)===46&&a.push(""),s.replace(aP,function(u,f,g,_){a.push(g?_.replace(mP,"$1"):f||u)}),a});function Wn(s){if(typeof s=="string"||Qt(s))return s;var a=s+"";return a=="0"&&1/s==-H?"-0":a}function so(s){if(s!=null){try{return ua.call(s)}catch{}try{return s+""}catch{}}return""}function vI(s,a){return rn(ht,function(u){var f="_."+u[0];a&u[1]&&!sa(s,f)&&s.push(f)}),s.sort()}function Gm(s){if(s instanceof Oe)return s.clone();var a=new sn(s.__wrapped__,s.__chain__);return a.__actions__=Mt(s.__actions__),a.__index__=s.__index__,a.__values__=s.__values__,a}function _I(s,a,u){(u?It(s,a,u):a===n)?a=1:a=mt(Be(a),0);var f=s==null?0:s.length;if(!f||a<1)return[];for(var g=0,_=0,N=z(va(f/a));g<f;)N[_++]=ln(s,g,g+=a);return N}function CI(s){for(var a=-1,u=s==null?0:s.length,f=0,g=[];++a<u;){var _=s[a];_&&(g[f++]=_)}return g}function wI(){var s=arguments.length;if(!s)return[];for(var a=z(s-1),u=arguments[0],f=s;f--;)a[f-1]=arguments[f];return Ar(Ne(u)?Mt(u):[u],wt(a,1))}var bI=Ie(function(s,a){return at(s)?os(s,wt(a,1,at,!0)):[]}),xI=Ie(function(s,a){var u=cn(a);return at(u)&&(u=n),at(s)?os(s,wt(a,1,at,!0),ge(u,2)):[]}),kI=Ie(function(s,a){var u=cn(a);return at(u)&&(u=n),at(s)?os(s,wt(a,1,at,!0),n,u):[]});function SI(s,a,u){var f=s==null?0:s.length;return f?(a=u||a===n?1:Be(a),ln(s,a<0?0:a,f)):[]}function EI(s,a,u){var f=s==null?0:s.length;return f?(a=u||a===n?1:Be(a),a=f-a,ln(s,0,a<0?0:a)):[]}function TI(s,a){return s&&s.length?Na(s,ge(a,3),!0,!0):[]}function NI(s,a){return s&&s.length?Na(s,ge(a,3),!0):[]}function AI(s,a,u,f){var g=s==null?0:s.length;return g?(u&&typeof u!="number"&&It(s,a,u)&&(u=0,f=g),wD(s,a,u,f)):[]}function $m(s,a,u){var f=s==null?0:s.length;if(!f)return-1;var g=u==null?0:Be(u);return g<0&&(g=mt(f+g,0)),aa(s,ge(a,3),g)}function zm(s,a,u){var f=s==null?0:s.length;if(!f)return-1;var g=f-1;return u!==n&&(g=Be(u),g=u<0?mt(f+g,0):Tt(g,f-1)),aa(s,ge(a,3),g,!0)}function Um(s){var a=s==null?0:s.length;return a?wt(s,1):[]}function VI(s){var a=s==null?0:s.length;return a?wt(s,H):[]}function BI(s,a){var u=s==null?0:s.length;return u?(a=a===n?1:Be(a),wt(s,a)):[]}function PI(s){for(var a=-1,u=s==null?0:s.length,f={};++a<u;){var g=s[a];f[g[0]]=g[1]}return f}function Zm(s){return s&&s.length?s[0]:n}function RI(s,a,u){var f=s==null?0:s.length;if(!f)return-1;var g=u==null?0:Be(u);return g<0&&(g=mt(f+g,0)),Oo(s,a,g)}function DI(s){var a=s==null?0:s.length;return a?ln(s,0,-1):[]}var II=Ie(function(s){var a=tt(s,dd);return a.length&&a[0]===s[0]?ed(a):[]}),FI=Ie(function(s){var a=cn(s),u=tt(s,dd);return a===cn(u)?a=n:u.pop(),u.length&&u[0]===s[0]?ed(u,ge(a,2)):[]}),OI=Ie(function(s){var a=cn(s),u=tt(s,dd);return a=typeof a=="function"?a:n,a&&u.pop(),u.length&&u[0]===s[0]?ed(u,n,a):[]});function LI(s,a){return s==null?"":DR.call(s,a)}function cn(s){var a=s==null?0:s.length;return a?s[a-1]:n}function MI(s,a,u){var f=s==null?0:s.length;if(!f)return-1;var g=f;return u!==n&&(g=Be(u),g=g<0?mt(f+g,0):Tt(g,f-1)),a===a?vR(s,a,g):aa(s,kf,g,!0)}function GI(s,a){return s&&s.length?tm(s,Be(a)):n}var $I=Ie(jm);function jm(s,a){return s&&s.length&&a&&a.length?od(s,a):s}function zI(s,a,u){return s&&s.length&&a&&a.length?od(s,a,ge(u,2)):s}function UI(s,a,u){return s&&s.length&&a&&a.length?od(s,a,n,u):s}var ZI=or(function(s,a){var u=s==null?0:s.length,f=Xc(s,a);return om(s,tt(a,function(g){return ir(g,u)?+g:g}).sort(fm)),f});function jI(s,a){var u=[];if(!(s&&s.length))return u;var f=-1,g=[],_=s.length;for(a=ge(a,3);++f<_;){var N=s[f];a(N,f,s)&&(u.push(N),g.push(f))}return om(s,g),u}function kd(s){return s==null?s:LR.call(s)}function WI(s,a,u){var f=s==null?0:s.length;return f?(u&&typeof u!="number"&&It(s,a,u)?(a=0,u=f):(a=a==null?0:Be(a),u=u===n?f:Be(u)),ln(s,a,u)):[]}function HI(s,a){return Ta(s,a)}function qI(s,a,u){return ad(s,a,ge(u,2))}function KI(s,a){var u=s==null?0:s.length;if(u){var f=Ta(s,a);if(f<u&&Pn(s[f],a))return f}return-1}function XI(s,a){return Ta(s,a,!0)}function YI(s,a,u){return ad(s,a,ge(u,2),!0)}function JI(s,a){var u=s==null?0:s.length;if(u){var f=Ta(s,a,!0)-1;if(Pn(s[f],a))return f}return-1}function QI(s){return s&&s.length?sm(s):[]}function eF(s,a){return s&&s.length?sm(s,ge(a,2)):[]}function tF(s){var a=s==null?0:s.length;return a?ln(s,1,a):[]}function nF(s,a,u){return s&&s.length?(a=u||a===n?1:Be(a),ln(s,0,a<0?0:a)):[]}function rF(s,a,u){var f=s==null?0:s.length;return f?(a=u||a===n?1:Be(a),a=f-a,ln(s,a<0?0:a,f)):[]}function oF(s,a){return s&&s.length?Na(s,ge(a,3),!1,!0):[]}function iF(s,a){return s&&s.length?Na(s,ge(a,3)):[]}var sF=Ie(function(s){return Rr(wt(s,1,at,!0))}),aF=Ie(function(s){var a=cn(s);return at(a)&&(a=n),Rr(wt(s,1,at,!0),ge(a,2))}),lF=Ie(function(s){var a=cn(s);return a=typeof a=="function"?a:n,Rr(wt(s,1,at,!0),n,a)});function cF(s){return s&&s.length?Rr(s):[]}function dF(s,a){return s&&s.length?Rr(s,ge(a,2)):[]}function uF(s,a){return a=typeof a=="function"?a:n,s&&s.length?Rr(s,n,a):[]}function Sd(s){if(!(s&&s.length))return[];var a=0;return s=Nr(s,function(u){if(at(u))return a=mt(u.length,a),!0}),zc(a,function(u){return tt(s,Mc(u))})}function Wm(s,a){if(!(s&&s.length))return[];var u=Sd(s);return a==null?u:tt(u,function(f){return Xt(a,n,f)})}var pF=Ie(function(s,a){return at(s)?os(s,a):[]}),hF=Ie(function(s){return cd(Nr(s,at))}),fF=Ie(function(s){var a=cn(s);return at(a)&&(a=n),cd(Nr(s,at),ge(a,2))}),mF=Ie(function(s){var a=cn(s);return a=typeof a=="function"?a:n,cd(Nr(s,at),n,a)}),gF=Ie(Sd);function yF(s,a){return dm(s||[],a||[],rs)}function vF(s,a){return dm(s||[],a||[],as)}var _F=Ie(function(s){var a=s.length,u=a>1?s[a-1]:n;return u=typeof u=="function"?(s.pop(),u):n,Wm(s,u)});function Hm(s){var a=v(s);return a.__chain__=!0,a}function CF(s,a){return a(s),s}function Oa(s,a){return a(s)}var wF=or(function(s){var a=s.length,u=a?s[0]:0,f=this.__wrapped__,g=function(_){return Xc(_,s)};return a>1||this.__actions__.length||!(f instanceof Oe)||!ir(u)?this.thru(g):(f=f.slice(u,+u+(a?1:0)),f.__actions__.push({func:Oa,args:[g],thisArg:n}),new sn(f,this.__chain__).thru(function(_){return a&&!_.length&&_.push(n),_}))});function bF(){return Hm(this)}function xF(){return new sn(this.value(),this.__chain__)}function kF(){this.__values__===n&&(this.__values__=ag(this.value()));var s=this.__index__>=this.__values__.length,a=s?n:this.__values__[this.__index__++];return{done:s,value:a}}function SF(){return this}function EF(s){for(var a,u=this;u instanceof ba;){var f=Gm(u);f.__index__=0,f.__values__=n,a?g.__wrapped__=f:a=f;var g=f;u=u.__wrapped__}return g.__wrapped__=s,a}function TF(){var s=this.__wrapped__;if(s instanceof Oe){var a=s;return this.__actions__.length&&(a=new Oe(this)),a=a.reverse(),a.__actions__.push({func:Oa,args:[kd],thisArg:n}),new sn(a,this.__chain__)}return this.thru(kd)}function NF(){return cm(this.__wrapped__,this.__actions__)}var AF=Aa(function(s,a,u){qe.call(s,u)?++s[u]:nr(s,u,1)});function VF(s,a,u){var f=Ne(s)?bf:CD;return u&&It(s,a,u)&&(a=n),f(s,ge(a,3))}function BF(s,a){var u=Ne(s)?Nr:Wf;return u(s,ge(a,3))}var PF=Cm($m),RF=Cm(zm);function DF(s,a){return wt(La(s,a),1)}function IF(s,a){return wt(La(s,a),H)}function FF(s,a,u){return u=u===n?1:Be(u),wt(La(s,a),u)}function qm(s,a){var u=Ne(s)?rn:Pr;return u(s,ge(a,3))}function Km(s,a){var u=Ne(s)?tR:jf;return u(s,ge(a,3))}var OF=Aa(function(s,a,u){qe.call(s,u)?s[u].push(a):nr(s,u,[a])});function LF(s,a,u,f){s=Gt(s)?s:Ko(s),u=u&&!f?Be(u):0;var g=s.length;return u<0&&(u=mt(g+u,0)),Ua(s)?u<=g&&s.indexOf(a,u)>-1:!!g&&Oo(s,a,u)>-1}var MF=Ie(function(s,a,u){var f=-1,g=typeof a=="function",_=Gt(s)?z(s.length):[];return Pr(s,function(N){_[++f]=g?Xt(a,N,u):is(N,a,u)}),_}),GF=Aa(function(s,a,u){nr(s,u,a)});function La(s,a){var u=Ne(s)?tt:Jf;return u(s,ge(a,3))}function $F(s,a,u,f){return s==null?[]:(Ne(a)||(a=a==null?[]:[a]),u=f?n:u,Ne(u)||(u=u==null?[]:[u]),nm(s,a,u))}var zF=Aa(function(s,a,u){s[u?0:1].push(a)},function(){return[[],[]]});function UF(s,a,u){var f=Ne(s)?Oc:Ef,g=arguments.length<3;return f(s,ge(a,4),u,g,Pr)}function ZF(s,a,u){var f=Ne(s)?nR:Ef,g=arguments.length<3;return f(s,ge(a,4),u,g,jf)}function jF(s,a){var u=Ne(s)?Nr:Wf;return u(s,$a(ge(a,3)))}function WF(s){var a=Ne(s)?$f:LD;return a(s)}function HF(s,a,u){(u?It(s,a,u):a===n)?a=1:a=Be(a);var f=Ne(s)?mD:MD;return f(s,a)}function qF(s){var a=Ne(s)?gD:$D;return a(s)}function KF(s){if(s==null)return 0;if(Gt(s))return Ua(s)?Mo(s):s.length;var a=Nt(s);return a==Nn||a==An?s.size:nd(s).length}function XF(s,a,u){var f=Ne(s)?Lc:zD;return u&&It(s,a,u)&&(a=n),f(s,ge(a,3))}var YF=Ie(function(s,a){if(s==null)return[];var u=a.length;return u>1&&It(s,a[0],a[1])?a=[]:u>2&&It(a[0],a[1],a[2])&&(a=[a[0]]),nm(s,wt(a,1),[])}),Ma=BR||function(){return Ct.Date.now()};function JF(s,a){if(typeof a!="function")throw new on(c);return s=Be(s),function(){if(--s<1)return a.apply(this,arguments)}}function Xm(s,a,u){return a=u?n:a,a=s&&a==null?s.length:a,rr(s,j,n,n,n,n,a)}function Ym(s,a){var u;if(typeof a!="function")throw new on(c);return s=Be(s),function(){return--s>0&&(u=a.apply(this,arguments)),s<=1&&(a=n),u}}var Ed=Ie(function(s,a,u){var f=G;if(u.length){var g=Vr(u,Ho(Ed));f|=A}return rr(s,f,a,u,g)}),Jm=Ie(function(s,a,u){var f=G|b;if(u.length){var g=Vr(u,Ho(Jm));f|=A}return rr(a,f,s,u,g)});function Qm(s,a,u){a=u?n:a;var f=rr(s,F,n,n,n,n,n,a);return f.placeholder=Qm.placeholder,f}function eg(s,a,u){a=u?n:a;var f=rr(s,D,n,n,n,n,n,a);return f.placeholder=eg.placeholder,f}function tg(s,a,u){var f,g,_,N,V,I,X=0,Y=!1,Q=!1,oe=!0;if(typeof s!="function")throw new on(c);a=dn(a)||0,ot(u)&&(Y=!!u.leading,Q="maxWait"in u,_=Q?mt(dn(u.maxWait)||0,a):_,oe="trailing"in u?!!u.trailing:oe);function pe(lt){var Rn=f,lr=g;return f=g=n,X=lt,N=s.apply(lr,Rn),N}function ve(lt){return X=lt,V=ds(Fe,a),Y?pe(lt):N}function De(lt){var Rn=lt-I,lr=lt-X,Cg=a-Rn;return Q?Tt(Cg,_-lr):Cg}function _e(lt){var Rn=lt-I,lr=lt-X;return I===n||Rn>=a||Rn<0||Q&&lr>=_}function Fe(){var lt=Ma();if(_e(lt))return Le(lt);V=ds(Fe,De(lt))}function Le(lt){return V=n,oe&&f?pe(lt):(f=g=n,N)}function en(){V!==n&&um(V),X=0,f=I=g=V=n}function Ft(){return V===n?N:Le(Ma())}function tn(){var lt=Ma(),Rn=_e(lt);if(f=arguments,g=this,I=lt,Rn){if(V===n)return ve(I);if(Q)return um(V),V=ds(Fe,a),pe(I)}return V===n&&(V=ds(Fe,a)),N}return tn.cancel=en,tn.flush=Ft,tn}var QF=Ie(function(s,a){return Zf(s,1,a)}),eO=Ie(function(s,a,u){return Zf(s,dn(a)||0,u)});function tO(s){return rr(s,Z)}function Ga(s,a){if(typeof s!="function"||a!=null&&typeof a!="function")throw new on(c);var u=function(){var f=arguments,g=a?a.apply(this,f):f[0],_=u.cache;if(_.has(g))return _.get(g);var N=s.apply(this,f);return u.cache=_.set(g,N)||_,N};return u.cache=new(Ga.Cache||tr),u}Ga.Cache=tr;function $a(s){if(typeof s!="function")throw new on(c);return function(){var a=arguments;switch(a.length){case 0:return!s.call(this);case 1:return!s.call(this,a[0]);case 2:return!s.call(this,a[0],a[1]);case 3:return!s.call(this,a[0],a[1],a[2])}return!s.apply(this,a)}}function nO(s){return Ym(2,s)}var rO=UD(function(s,a){a=a.length==1&&Ne(a[0])?tt(a[0],Yt(ge())):tt(wt(a,1),Yt(ge()));var u=a.length;return Ie(function(f){for(var g=-1,_=Tt(f.length,u);++g<_;)f[g]=a[g].call(this,f[g]);return Xt(s,this,f)})}),Td=Ie(function(s,a){var u=Vr(a,Ho(Td));return rr(s,A,n,a,u)}),ng=Ie(function(s,a){var u=Vr(a,Ho(ng));return rr(s,U,n,a,u)}),oO=or(function(s,a){return rr(s,$,n,n,n,a)});function iO(s,a){if(typeof s!="function")throw new on(c);return a=a===n?a:Be(a),Ie(s,a)}function sO(s,a){if(typeof s!="function")throw new on(c);return a=a==null?0:mt(Be(a),0),Ie(function(u){var f=u[a],g=Ir(u,0,a);return f&&Ar(g,f),Xt(s,this,g)})}function aO(s,a,u){var f=!0,g=!0;if(typeof s!="function")throw new on(c);return ot(u)&&(f="leading"in u?!!u.leading:f,g="trailing"in u?!!u.trailing:g),tg(s,a,{leading:f,maxWait:a,trailing:g})}function lO(s){return Xm(s,1)}function cO(s,a){return Td(ud(a),s)}function dO(){if(!arguments.length)return[];var s=arguments[0];return Ne(s)?s:[s]}function uO(s){return an(s,w)}function pO(s,a){return a=typeof a=="function"?a:n,an(s,w,a)}function hO(s){return an(s,y|w)}function fO(s,a){return a=typeof a=="function"?a:n,an(s,y|w,a)}function mO(s,a){return a==null||Uf(s,a,_t(a))}function Pn(s,a){return s===a||s!==s&&a!==a}var gO=Ra(Qc),yO=Ra(function(s,a){return s>=a}),ao=Kf(function(){return arguments}())?Kf:function(s){return it(s)&&qe.call(s,"callee")&&!If.call(s,"callee")},Ne=z.isArray,vO=gf?Yt(gf):ED;function Gt(s){return s!=null&&za(s.length)&&!sr(s)}function at(s){return it(s)&&Gt(s)}function _O(s){return s===!0||s===!1||it(s)&&Dt(s)==Zi}var Fr=RR||Ld,CO=yf?Yt(yf):TD;function wO(s){return it(s)&&s.nodeType===1&&!us(s)}function bO(s){if(s==null)return!0;if(Gt(s)&&(Ne(s)||typeof s=="string"||typeof s.splice=="function"||Fr(s)||qo(s)||ao(s)))return!s.length;var a=Nt(s);if(a==Nn||a==An)return!s.size;if(cs(s))return!nd(s).length;for(var u in s)if(qe.call(s,u))return!1;return!0}function xO(s,a){return ss(s,a)}function kO(s,a,u){u=typeof u=="function"?u:n;var f=u?u(s,a):n;return f===n?ss(s,a,n,u):!!f}function Nd(s){if(!it(s))return!1;var a=Dt(s);return a==ea||a==HB||typeof s.message=="string"&&typeof s.name=="string"&&!us(s)}function SO(s){return typeof s=="number"&&Of(s)}function sr(s){if(!ot(s))return!1;var a=Dt(s);return a==ta||a==Uh||a==WB||a==KB}function rg(s){return typeof s=="number"&&s==Be(s)}function za(s){return typeof s=="number"&&s>-1&&s%1==0&&s<=K}function ot(s){var a=typeof s;return s!=null&&(a=="object"||a=="function")}function it(s){return s!=null&&typeof s=="object"}var og=vf?Yt(vf):AD;function EO(s,a){return s===a||td(s,a,vd(a))}function TO(s,a,u){return u=typeof u=="function"?u:n,td(s,a,vd(a),u)}function NO(s){return ig(s)&&s!=+s}function AO(s){if(pI(s))throw new Te(l);return Xf(s)}function VO(s){return s===null}function BO(s){return s==null}function ig(s){return typeof s=="number"||it(s)&&Dt(s)==Wi}function us(s){if(!it(s)||Dt(s)!=Qn)return!1;var a=ma(s);if(a===null)return!0;var u=qe.call(a,"constructor")&&a.constructor;return typeof u=="function"&&u instanceof u&&ua.call(u)==TR}var Ad=_f?Yt(_f):VD;function PO(s){return rg(s)&&s>=-K&&s<=K}var sg=Cf?Yt(Cf):BD;function Ua(s){return typeof s=="string"||!Ne(s)&&it(s)&&Dt(s)==qi}function Qt(s){return typeof s=="symbol"||it(s)&&Dt(s)==na}var qo=wf?Yt(wf):PD;function RO(s){return s===n}function DO(s){return it(s)&&Nt(s)==Ki}function IO(s){return it(s)&&Dt(s)==YB}var FO=Ra(rd),OO=Ra(function(s,a){return s<=a});function ag(s){if(!s)return[];if(Gt(s))return Ua(s)?Vn(s):Mt(s);if(Ji&&s[Ji])return mR(s[Ji]());var a=Nt(s),u=a==Nn?Zc:a==An?la:Ko;return u(s)}function ar(s){if(!s)return s===0?s:0;if(s=dn(s),s===H||s===-H){var a=s<0?-1:1;return a*ne}return s===s?s:0}function Be(s){var a=ar(s),u=a%1;return a===a?u?a-u:a:0}function lg(s){return s?ro(Be(s),0,ke):0}function dn(s){if(typeof s=="number")return s;if(Qt(s))return de;if(ot(s)){var a=typeof s.valueOf=="function"?s.valueOf():s;s=ot(a)?a+"":a}if(typeof s!="string")return s===0?s:+s;s=Tf(s);var u=vP.test(s);return u||CP.test(s)?JP(s.slice(2),u?2:8):yP.test(s)?de:+s}function cg(s){return jn(s,$t(s))}function LO(s){return s?ro(Be(s),-K,K):s===0?s:0}function He(s){return s==null?"":Jt(s)}var MO=jo(function(s,a){if(cs(a)||Gt(a)){jn(a,_t(a),s);return}for(var u in a)qe.call(a,u)&&rs(s,u,a[u])}),dg=jo(function(s,a){jn(a,$t(a),s)}),Za=jo(function(s,a,u,f){jn(a,$t(a),s,f)}),GO=jo(function(s,a,u,f){jn(a,_t(a),s,f)}),$O=or(Xc);function zO(s,a){var u=Zo(s);return a==null?u:zf(u,a)}var UO=Ie(function(s,a){s=Xe(s);var u=-1,f=a.length,g=f>2?a[2]:n;for(g&&It(a[0],a[1],g)&&(f=1);++u<f;)for(var _=a[u],N=$t(_),V=-1,I=N.length;++V<I;){var X=N[V],Y=s[X];(Y===n||Pn(Y,$o[X])&&!qe.call(s,X))&&(s[X]=_[X])}return s}),ZO=Ie(function(s){return s.push(n,Tm),Xt(ug,n,s)});function jO(s,a){return xf(s,ge(a,3),Zn)}function WO(s,a){return xf(s,ge(a,3),Jc)}function HO(s,a){return s==null?s:Yc(s,ge(a,3),$t)}function qO(s,a){return s==null?s:Hf(s,ge(a,3),$t)}function KO(s,a){return s&&Zn(s,ge(a,3))}function XO(s,a){return s&&Jc(s,ge(a,3))}function YO(s){return s==null?[]:Sa(s,_t(s))}function JO(s){return s==null?[]:Sa(s,$t(s))}function Vd(s,a,u){var f=s==null?n:oo(s,a);return f===n?u:f}function QO(s,a){return s!=null&&Vm(s,a,bD)}function Bd(s,a){return s!=null&&Vm(s,a,xD)}var eL=bm(function(s,a,u){a!=null&&typeof a.toString!="function"&&(a=pa.call(a)),s[a]=u},Rd(zt)),tL=bm(function(s,a,u){a!=null&&typeof a.toString!="function"&&(a=pa.call(a)),qe.call(s,a)?s[a].push(u):s[a]=[u]},ge),nL=Ie(is);function _t(s){return Gt(s)?Gf(s):nd(s)}function $t(s){return Gt(s)?Gf(s,!0):RD(s)}function rL(s,a){var u={};return a=ge(a,3),Zn(s,function(f,g,_){nr(u,a(f,g,_),f)}),u}function oL(s,a){var u={};return a=ge(a,3),Zn(s,function(f,g,_){nr(u,g,a(f,g,_))}),u}var iL=jo(function(s,a,u){Ea(s,a,u)}),ug=jo(function(s,a,u,f){Ea(s,a,u,f)}),sL=or(function(s,a){var u={};if(s==null)return u;var f=!1;a=tt(a,function(_){return _=Dr(_,s),f||(f=_.length>1),_}),jn(s,gd(s),u),f&&(u=an(u,y|x|w,eI));for(var g=a.length;g--;)ld(u,a[g]);return u});function aL(s,a){return pg(s,$a(ge(a)))}var lL=or(function(s,a){return s==null?{}:ID(s,a)});function pg(s,a){if(s==null)return{};var u=tt(gd(s),function(f){return[f]});return a=ge(a),rm(s,u,function(f,g){return a(f,g[0])})}function cL(s,a,u){a=Dr(a,s);var f=-1,g=a.length;for(g||(g=1,s=n);++f<g;){var _=s==null?n:s[Wn(a[f])];_===n&&(f=g,_=u),s=sr(_)?_.call(s):_}return s}function dL(s,a,u){return s==null?s:as(s,a,u)}function uL(s,a,u,f){return f=typeof f=="function"?f:n,s==null?s:as(s,a,u,f)}var hg=Sm(_t),fg=Sm($t);function pL(s,a,u){var f=Ne(s),g=f||Fr(s)||qo(s);if(a=ge(a,4),u==null){var _=s&&s.constructor;g?u=f?new _:[]:ot(s)?u=sr(_)?Zo(ma(s)):{}:u={}}return(g?rn:Zn)(s,function(N,V,I){return a(u,N,V,I)}),u}function hL(s,a){return s==null?!0:ld(s,a)}function fL(s,a,u){return s==null?s:lm(s,a,ud(u))}function mL(s,a,u,f){return f=typeof f=="function"?f:n,s==null?s:lm(s,a,ud(u),f)}function Ko(s){return s==null?[]:Uc(s,_t(s))}function gL(s){return s==null?[]:Uc(s,$t(s))}function yL(s,a,u){return u===n&&(u=a,a=n),u!==n&&(u=dn(u),u=u===u?u:0),a!==n&&(a=dn(a),a=a===a?a:0),ro(dn(s),a,u)}function vL(s,a,u){return a=ar(a),u===n?(u=a,a=0):u=ar(u),s=dn(s),kD(s,a,u)}function _L(s,a,u){if(u&&typeof u!="boolean"&&It(s,a,u)&&(a=u=n),u===n&&(typeof a=="boolean"?(u=a,a=n):typeof s=="boolean"&&(u=s,s=n)),s===n&&a===n?(s=0,a=1):(s=ar(s),a===n?(a=s,s=0):a=ar(a)),s>a){var f=s;s=a,a=f}if(u||s%1||a%1){var g=Lf();return Tt(s+g*(a-s+YP("1e-"+((g+"").length-1))),a)}return id(s,a)}var CL=Wo(function(s,a,u){return a=a.toLowerCase(),s+(u?mg(a):a)});function mg(s){return Pd(He(s).toLowerCase())}function gg(s){return s=He(s),s&&s.replace(bP,dR).replace($P,"")}function wL(s,a,u){s=He(s),a=Jt(a);var f=s.length;u=u===n?f:ro(Be(u),0,f);var g=u;return u-=a.length,u>=0&&s.slice(u,g)==a}function bL(s){return s=He(s),s&&nP.test(s)?s.replace(Wh,uR):s}function xL(s){return s=He(s),s&&lP.test(s)?s.replace(Tc,"\\$&"):s}var kL=Wo(function(s,a,u){return s+(u?"-":"")+a.toLowerCase()}),SL=Wo(function(s,a,u){return s+(u?" ":"")+a.toLowerCase()}),EL=_m("toLowerCase");function TL(s,a,u){s=He(s),a=Be(a);var f=a?Mo(s):0;if(!a||f>=a)return s;var g=(a-f)/2;return Pa(_a(g),u)+s+Pa(va(g),u)}function NL(s,a,u){s=He(s),a=Be(a);var f=a?Mo(s):0;return a&&f<a?s+Pa(a-f,u):s}function AL(s,a,u){s=He(s),a=Be(a);var f=a?Mo(s):0;return a&&f<a?Pa(a-f,u)+s:s}function VL(s,a,u){return u||a==null?a=0:a&&(a=+a),OR(He(s).replace(Nc,""),a||0)}function BL(s,a,u){return(u?It(s,a,u):a===n)?a=1:a=Be(a),sd(He(s),a)}function PL(){var s=arguments,a=He(s[0]);return s.length<3?a:a.replace(s[1],s[2])}var RL=Wo(function(s,a,u){return s+(u?"_":"")+a.toLowerCase()});function DL(s,a,u){return u&&typeof u!="number"&&It(s,a,u)&&(a=u=n),u=u===n?ke:u>>>0,u?(s=He(s),s&&(typeof a=="string"||a!=null&&!Ad(a))&&(a=Jt(a),!a&&Lo(s))?Ir(Vn(s),0,u):s.split(a,u)):[]}var IL=Wo(function(s,a,u){return s+(u?" ":"")+Pd(a)});function FL(s,a,u){return s=He(s),u=u==null?0:ro(Be(u),0,s.length),a=Jt(a),s.slice(u,u+a.length)==a}function OL(s,a,u){var f=v.templateSettings;u&&It(s,a,u)&&(a=n),s=He(s),a=Za({},a,f,Em);var g=Za({},a.imports,f.imports,Em),_=_t(g),N=Uc(g,_),V,I,X=0,Y=a.interpolate||ra,Q="__p += '",oe=jc((a.escape||ra).source+"|"+Y.source+"|"+(Y===Hh?gP:ra).source+"|"+(a.evaluate||ra).source+"|$","g"),pe="//# sourceURL="+(qe.call(a,"sourceURL")?(a.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++WP+"]")+`
|
|
75
|
+
`;s.replace(oe,function(_e,Fe,Le,en,Ft,tn){return Le||(Le=en),Q+=s.slice(X,tn).replace(xP,pR),Fe&&(V=!0,Q+=`' +
|
|
76
76
|
__e(`+Fe+`) +
|
|
77
|
-
'`),
|
|
78
|
-
`+
|
|
79
|
-
__p += '`),
|
|
80
|
-
((__t = (`+
|
|
81
|
-
'`),
|
|
82
|
-
`;var
|
|
83
|
-
`+
|
|
77
|
+
'`),Ft&&(I=!0,Q+=`';
|
|
78
|
+
`+Ft+`;
|
|
79
|
+
__p += '`),Le&&(Q+=`' +
|
|
80
|
+
((__t = (`+Le+`)) == null ? '' : __t) +
|
|
81
|
+
'`),X=tn+_e.length,_e}),Q+=`';
|
|
82
|
+
`;var ve=qe.call(a,"variable")&&a.variable;if(!ve)Q=`with (obj) {
|
|
83
|
+
`+Q+`
|
|
84
84
|
}
|
|
85
|
-
`;else if(
|
|
86
|
-
`+(
|
|
87
|
-
`)+"var __t, __p = ''"+(V?", __e = _.escape":"")+(
|
|
85
|
+
`;else if(fP.test(ve))throw new Te(d);Q=(I?Q.replace(JB,""):Q).replace(QB,"$1").replace(eP,"$1;"),Q="function("+(ve||"obj")+`) {
|
|
86
|
+
`+(ve?"":`obj || (obj = {});
|
|
87
|
+
`)+"var __t, __p = ''"+(V?", __e = _.escape":"")+(I?`, __j = Array.prototype.join;
|
|
88
88
|
function print() { __p += __j.call(arguments, '') }
|
|
89
89
|
`:`;
|
|
90
|
-
`)+
|
|
91
|
-
}`;var Pe=cm(function(){return Ue(v,ue+"return "+K).apply(n,E)});if(Pe.source=K,Yc(Pe))throw Pe;return Pe}function cR(i){return We(i).toLowerCase()}function dR(i){return We(i).toUpperCase()}function uR(i,a,d){if(i=We(i),i&&(d||a===n))return yh(i);if(!i||!(a=jt(a)))return i;var h=kn(i),g=kn(a),v=_h(h,g),E=vh(h,g)+1;return Dr(h,v,E).join("")}function pR(i,a,d){if(i=We(i),i&&(d||a===n))return i.slice(0,wh(i)+1);if(!i||!(a=jt(a)))return i;var h=kn(i),g=vh(h,kn(a))+1;return Dr(h,0,g).join("")}function hR(i,a,d){if(i=We(i),i&&(d||a===n))return i.replace(Yl,"");if(!i||!(a=jt(a)))return i;var h=kn(i),g=_h(h,kn(a));return Dr(h,g).join("")}function fR(i,a){var d=q,h=ee;if(tt(a)){var g="separator"in a?a.separator:g;d="length"in a?Ve(a.length):d,h="omission"in a?jt(a.omission):h}i=We(i);var v=i.length;if(Fo(i)){var E=kn(i);v=E.length}if(d>=v)return i;var V=d-Ro(h);if(V<1)return h;var D=E?Dr(E,0,V).join(""):i.slice(0,V);if(g===n)return D+h;if(E&&(V+=D.length-V),Jc(g)){if(i.slice(V).search(g)){var W,H=D;for(g.global||(g=hc(g.source,We(Lp.exec(g))+"g")),g.lastIndex=0;W=g.exec(H);)var K=W.index;D=D.slice(0,K===n?V:K)}}else if(i.indexOf(jt(g),V)!=V){var oe=D.lastIndexOf(g);oe>-1&&(D=D.slice(0,oe))}return D+h}function mR(i){return i=We(i),i&&EB.test(i)?i.replace(Mp,ZV):i}var gR=$o(function(i,a,d){return i+(d?" ":"")+a.toUpperCase()}),ed=df("toUpperCase");function lm(i,a,d){return i=We(i),a=d?n:a,a===n?LV(i)?jV(i):NV(i):i.match(a)||[]}var cm=De(function(i,a){try{return Wt(i,n,a)}catch(d){return Yc(d)?d:new ke(d)}}),yR=Qn(function(i,a){return Xt(a,function(d){d=Gn(d),Jn(i,d,qc(i[d],i))}),i});function _R(i){var a=i==null?0:i.length,d=fe();return i=a?Xe(i,function(h){if(typeof h[1]!="function")throw new Qt(c);return[d(h[0]),h[1]]}):[],De(function(h){for(var g=-1;++g<a;){var v=i[g];if(Wt(v[0],this,h))return Wt(v[1],this,h)}})}function vR(i){return ZN(tn(i,y))}function td(i){return function(){return i}}function CR(i,a){return i==null||i!==i?a:i}var wR=pf(),bR=pf(!0);function It(i){return i}function nd(i){return zh(typeof i=="function"?i:tn(i,y))}function xR(i){return Uh(tn(i,y))}function kR(i,a){return Zh(i,tn(a,y))}var SR=De(function(i,a){return function(d){return Ji(d,i,a)}}),ER=De(function(i,a){return function(d){return Ji(i,d,a)}});function rd(i,a,d){var h=gt(a),g=ca(a,h);d==null&&!(tt(a)&&(g.length||!h.length))&&(d=a,a=i,i=this,g=ca(a,gt(a)));var v=!(tt(d)&&"chain"in d)||!!d.chain,E=tr(i);return Xt(g,function(V){var D=a[V];i[V]=D,E&&(i.prototype[V]=function(){var W=this.__chain__;if(v||W){var H=i(this.__wrapped__),K=H.__actions__=Ft(this.__actions__);return K.push({func:D,args:arguments,thisArg:i}),H.__chain__=W,H}return D.apply(i,Tr([this.value()],arguments))})}),i}function TR(){return yt._===this&&(yt._=QV),this}function od(){}function BR(i){return i=Ve(i),De(function(a){return Wh(a,i)})}var VR=Rc(Xe),NR=Rc(ph),AR=Rc(sc);function dm(i){return $c(i)?ac(Gn(i)):aA(i)}function PR(i){return function(a){return i==null?n:oo(i,a)}}var DR=ff(),FR=ff(!0);function id(){return[]}function sd(){return!1}function RR(){return{}}function MR(){return""}function IR(){return!0}function OR(i,a){if(i=Ve(i),i<1||i>ne)return[];var d=ot,h=kt(i,ot);a=fe(a),i-=ot;for(var g=dc(h,a);++d<i;)a(d);return g}function LR(i){return Ee(i)?Xe(i,Gn):qt(i)?[i]:Ft(Nf(We(i)))}function GR(i){var a=++JV;return We(i)+a}var zR=ma(function(i,a){return i+a},0),$R=Mc("ceil"),UR=ma(function(i,a){return i/a},1),ZR=Mc("floor");function WR(i){return i&&i.length?la(i,It,wc):n}function HR(i,a){return i&&i.length?la(i,fe(a,2),wc):n}function jR(i){return mh(i,It)}function qR(i,a){return mh(i,fe(a,2))}function KR(i){return i&&i.length?la(i,It,Sc):n}function YR(i,a){return i&&i.length?la(i,fe(a,2),Sc):n}var JR=ma(function(i,a){return i*a},1),XR=Mc("round"),QR=ma(function(i,a){return i-a},0);function eM(i){return i&&i.length?cc(i,It):0}function tM(i,a){return i&&i.length?cc(i,fe(a,2)):0}return _.after=xD,_.ary=zf,_.assign=dF,_.assignIn=tm,_.assignInWith=Ba,_.assignWith=uF,_.at=pF,_.before=$f,_.bind=qc,_.bindAll=yR,_.bindKey=Uf,_.castArray=RD,_.chain=Of,_.chunk=ZA,_.compact=WA,_.concat=HA,_.cond=_R,_.conforms=vR,_.constant=td,_.countBy=eD,_.create=hF,_.curry=Zf,_.curryRight=Wf,_.debounce=Hf,_.defaults=fF,_.defaultsDeep=mF,_.defer=kD,_.delay=SD,_.difference=jA,_.differenceBy=qA,_.differenceWith=KA,_.drop=YA,_.dropRight=JA,_.dropRightWhile=XA,_.dropWhile=QA,_.fill=eP,_.filter=nD,_.flatMap=iD,_.flatMapDeep=sD,_.flatMapDepth=aD,_.flatten=Ff,_.flattenDeep=tP,_.flattenDepth=nP,_.flip=ED,_.flow=wR,_.flowRight=bR,_.fromPairs=rP,_.functions=bF,_.functionsIn=xF,_.groupBy=lD,_.initial=iP,_.intersection=sP,_.intersectionBy=aP,_.intersectionWith=lP,_.invert=SF,_.invertBy=EF,_.invokeMap=dD,_.iteratee=nd,_.keyBy=uD,_.keys=gt,_.keysIn=Mt,_.map=ba,_.mapKeys=BF,_.mapValues=VF,_.matches=xR,_.matchesProperty=kR,_.memoize=ka,_.merge=NF,_.mergeWith=nm,_.method=SR,_.methodOf=ER,_.mixin=rd,_.negate=Sa,_.nthArg=BR,_.omit=AF,_.omitBy=PF,_.once=TD,_.orderBy=pD,_.over=VR,_.overArgs=BD,_.overEvery=NR,_.overSome=AR,_.partial=Kc,_.partialRight=jf,_.partition=hD,_.pick=DF,_.pickBy=rm,_.property=dm,_.propertyOf=PR,_.pull=pP,_.pullAll=Mf,_.pullAllBy=hP,_.pullAllWith=fP,_.pullAt=mP,_.range=DR,_.rangeRight=FR,_.rearg=VD,_.reject=gD,_.remove=gP,_.rest=ND,_.reverse=Hc,_.sampleSize=_D,_.set=RF,_.setWith=MF,_.shuffle=vD,_.slice=yP,_.sortBy=bD,_.sortedUniq=kP,_.sortedUniqBy=SP,_.split=iR,_.spread=AD,_.tail=EP,_.take=TP,_.takeRight=BP,_.takeRightWhile=VP,_.takeWhile=NP,_.tap=WP,_.throttle=PD,_.thru=wa,_.toArray=Xf,_.toPairs=om,_.toPairsIn=im,_.toPath=LR,_.toPlainObject=em,_.transform=IF,_.unary=DD,_.union=AP,_.unionBy=PP,_.unionWith=DP,_.uniq=FP,_.uniqBy=RP,_.uniqWith=MP,_.unset=OF,_.unzip=jc,_.unzipWith=If,_.update=LF,_.updateWith=GF,_.values=Wo,_.valuesIn=zF,_.without=IP,_.words=lm,_.wrap=FD,_.xor=OP,_.xorBy=LP,_.xorWith=GP,_.zip=zP,_.zipObject=$P,_.zipObjectDeep=UP,_.zipWith=ZP,_.entries=om,_.entriesIn=im,_.extend=tm,_.extendWith=Ba,rd(_,_),_.add=zR,_.attempt=cm,_.camelCase=WF,_.capitalize=sm,_.ceil=$R,_.clamp=$F,_.clone=MD,_.cloneDeep=OD,_.cloneDeepWith=LD,_.cloneWith=ID,_.conformsTo=GD,_.deburr=am,_.defaultTo=CR,_.divide=UR,_.endsWith=HF,_.eq=En,_.escape=jF,_.escapeRegExp=qF,_.every=tD,_.find=rD,_.findIndex=Pf,_.findKey=gF,_.findLast=oD,_.findLastIndex=Df,_.findLastKey=yF,_.floor=ZR,_.forEach=Lf,_.forEachRight=Gf,_.forIn=_F,_.forInRight=vF,_.forOwn=CF,_.forOwnRight=wF,_.get=Xc,_.gt=zD,_.gte=$D,_.has=kF,_.hasIn=Qc,_.head=Rf,_.identity=It,_.includes=cD,_.indexOf=oP,_.inRange=UF,_.invoke=TF,_.isArguments=ao,_.isArray=Ee,_.isArrayBuffer=UD,_.isArrayLike=Rt,_.isArrayLikeObject=it,_.isBoolean=ZD,_.isBuffer=Fr,_.isDate=WD,_.isElement=HD,_.isEmpty=jD,_.isEqual=qD,_.isEqualWith=KD,_.isError=Yc,_.isFinite=YD,_.isFunction=tr,_.isInteger=qf,_.isLength=Ea,_.isMap=Kf,_.isMatch=JD,_.isMatchWith=XD,_.isNaN=QD,_.isNative=eF,_.isNil=nF,_.isNull=tF,_.isNumber=Yf,_.isObject=tt,_.isObjectLike=nt,_.isPlainObject=rs,_.isRegExp=Jc,_.isSafeInteger=rF,_.isSet=Jf,_.isString=Ta,_.isSymbol=qt,_.isTypedArray=Zo,_.isUndefined=oF,_.isWeakMap=iF,_.isWeakSet=sF,_.join=cP,_.kebabCase=KF,_.last=rn,_.lastIndexOf=dP,_.lowerCase=YF,_.lowerFirst=JF,_.lt=aF,_.lte=lF,_.max=WR,_.maxBy=HR,_.mean=jR,_.meanBy=qR,_.min=KR,_.minBy=YR,_.stubArray=id,_.stubFalse=sd,_.stubObject=RR,_.stubString=MR,_.stubTrue=IR,_.multiply=JR,_.nth=uP,_.noConflict=TR,_.noop=od,_.now=xa,_.pad=XF,_.padEnd=QF,_.padStart=eR,_.parseInt=tR,_.random=ZF,_.reduce=fD,_.reduceRight=mD,_.repeat=nR,_.replace=rR,_.result=FF,_.round=XR,_.runInContext=P,_.sample=yD,_.size=CD,_.snakeCase=oR,_.some=wD,_.sortedIndex=_P,_.sortedIndexBy=vP,_.sortedIndexOf=CP,_.sortedLastIndex=wP,_.sortedLastIndexBy=bP,_.sortedLastIndexOf=xP,_.startCase=sR,_.startsWith=aR,_.subtract=QR,_.sum=eM,_.sumBy=tM,_.template=lR,_.times=OR,_.toFinite=nr,_.toInteger=Ve,_.toLength=Qf,_.toLower=cR,_.toNumber=on,_.toSafeInteger=cF,_.toString=We,_.toUpper=dR,_.trim=uR,_.trimEnd=pR,_.trimStart=hR,_.truncate=fR,_.unescape=mR,_.uniqueId=GR,_.upperCase=gR,_.upperFirst=ed,_.each=Lf,_.eachRight=Gf,_.first=Rf,rd(_,function(){var i={};return On(_,function(a,d){He.call(_.prototype,d)||(i[d]=a)}),i}(),{chain:!1}),_.VERSION=o,Xt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){_[i].placeholder=_}),Xt(["drop","take"],function(i,a){Re.prototype[i]=function(d){d=d===n?1:pt(Ve(d),0);var h=this.__filtered__&&!a?new Re(this):this.clone();return h.__filtered__?h.__takeCount__=kt(d,h.__takeCount__):h.__views__.push({size:kt(d,ot),type:i+(h.__dir__<0?"Right":"")}),h},Re.prototype[i+"Right"]=function(d){return this.reverse()[i](d).reverse()}}),Xt(["filter","map","takeWhile"],function(i,a){var d=a+1,h=d==w||d==$;Re.prototype[i]=function(g){var v=this.clone();return v.__iteratees__.push({iteratee:fe(g,3),type:d}),v.__filtered__=v.__filtered__||h,v}}),Xt(["head","last"],function(i,a){var d="take"+(a?"Right":"");Re.prototype[i]=function(){return this[d](1).value()[0]}}),Xt(["initial","tail"],function(i,a){var d="drop"+(a?"":"Right");Re.prototype[i]=function(){return this.__filtered__?new Re(this):this[d](1)}}),Re.prototype.compact=function(){return this.filter(It)},Re.prototype.find=function(i){return this.filter(i).head()},Re.prototype.findLast=function(i){return this.reverse().find(i)},Re.prototype.invokeMap=De(function(i,a){return typeof i=="function"?new Re(this):this.map(function(d){return Ji(d,i,a)})}),Re.prototype.reject=function(i){return this.filter(Sa(fe(i)))},Re.prototype.slice=function(i,a){i=Ve(i);var d=this;return d.__filtered__&&(i>0||a<0)?new Re(d):(i<0?d=d.takeRight(-i):i&&(d=d.drop(i)),a!==n&&(a=Ve(a),d=a<0?d.dropRight(-a):d.take(a-i)),d)},Re.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Re.prototype.toArray=function(){return this.take(ot)},On(Re.prototype,function(i,a){var d=/^(?:filter|find|map|reject)|While$/.test(a),h=/^(?:head|last)$/.test(a),g=_[h?"take"+(a=="last"?"Right":""):a],v=h||/^find/.test(a);g&&(_.prototype[a]=function(){var E=this.__wrapped__,V=h?[1]:arguments,D=E instanceof Re,W=V[0],H=D||Ee(E),K=function(Fe){var Me=g.apply(_,Tr([Fe],V));return h&&oe?Me[0]:Me};H&&d&&typeof W=="function"&&W.length!=1&&(D=H=!1);var oe=this.__chain__,ue=!!this.__actions__.length,ge=v&&!oe,Pe=D&&!ue;if(!v&&H){E=Pe?E:new Re(this);var ye=i.apply(E,V);return ye.__actions__.push({func:wa,args:[K],thisArg:n}),new en(ye,oe)}return ge&&Pe?i.apply(this,V):(ye=this.thru(K),ge?h?ye.value()[0]:ye.value():ye)})}),Xt(["pop","push","shift","sort","splice","unshift"],function(i){var a=js[i],d=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",h=/^(?:pop|shift)$/.test(i);_.prototype[i]=function(){var g=arguments;if(h&&!this.__chain__){var v=this.value();return a.apply(Ee(v)?v:[],g)}return this[d](function(E){return a.apply(Ee(E)?E:[],g)})}}),On(Re.prototype,function(i,a){var d=_[a];if(d){var h=d.name+"";He.call(Lo,h)||(Lo[h]=[]),Lo[h].push({name:a,func:d})}}),Lo[fa(n,C).name]=[{name:"wrapper",func:n}],Re.prototype.clone=mN,Re.prototype.reverse=gN,Re.prototype.value=yN,_.prototype.at=HP,_.prototype.chain=jP,_.prototype.commit=qP,_.prototype.next=KP,_.prototype.plant=JP,_.prototype.reverse=XP,_.prototype.toJSON=_.prototype.valueOf=_.prototype.value=QP,_.prototype.first=_.prototype.head,Zi&&(_.prototype[Zi]=YP),_},Mo=qV();Qr?((Qr.exports=Mo)._=Mo,nc._=Mo):yt._=Mo}).call(Ho)}(Fs,Fs.exports);var Ge=Fs.exports;const DT={class:"grid-overlay-container"},yp=r.defineComponent({__name:"PlAgOverlayLoading",props:{params:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",DT,[e.params.notReady?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[n[0]||(n[0]=r.createElementVNode("div",{class:"grid-icon-cat-in-bag"},null,-1)),n[1]||(n[1]=r.createElementVNode("span",{class:"text-subtitle-m"},"Not calculated",-1))],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[n[2]||(n[2]=r.createElementVNode("div",{class:"mask-24 mask-loading grid-mask-loading"},null,-1)),n[3]||(n[3]=r.createElementVNode("span",{class:"text-subtitle-m"},"Loading",-1))],64))]))}}),FT={},RT={class:"grid-overlay-container"};function MT(t,e){return r.openBlock(),r.createElementBlock("div",RT,e[0]||(e[0]=[r.createElementVNode("div",{class:"grid-icon-sad-cat"},null,-1),r.createElementVNode("span",{class:"text-subtitle-m"},"Empty",-1)]))}const _p=Ds(FT,[["render",MT]]);async function IT(t,e){throw Error("not implemented")}function OT(t){return t.axesSpec.filter(e=>{var n;return((n=e.annotations)==null?void 0:n["pl7.app/axisNature"])==="heterogeneous"})}function LT(t,e){const n=[];for(const o of e)if(t[o].type==="column"){const s=OT(t[o].spec);for(const l of s){if(l.type!=="String"){console.warn("heterogeneous axis with string type expected, got",l,"skipping");continue}const c=ja(l),u=t.findIndex(p=>Ge.isEqual(p.id,c));if(u===-1)throw console.error("axis not found",o,c,t),Error("axis not found");n.push({columnIdx:o,axisIdx:u})}}return n}const vp=(t,e)=>(t+e).toString();function GT(t,e,n,o,s,l){if(t.length>1)throw Error("hColumns.length > 1 is not supported");const c=t[0];let u=-1,p=-1;for(let y=0;y<l.length;++y)l[y]===c.axisIdx&&(u=y),l[y]===c.columnIdx&&(p=y);const f=(()=>{const T=o[u].data.filter(B=>B!==null);return Array.from(new Set(T))})();f.sort(),p>u?(n.splice(p,1),n.splice(u,1)):(n.splice(u,1),n.splice(p,1));const m=zT(s,o,u,p,f,e.rows);for(let y=0;y<f.length;++y){const T=f[y],B=Or(T+"@"+y);n.push({colId:B,field:vp(o.length,y),headerName:T,valueFormatter:wp})}return{rowModelType:"clientSide",columnDefs:n,rowData:m}}function zT(t,e,n,o,s,l){const c=new Map;let u=0;for(let f=0;f<l;f++){const m={};for(let I=0;I<e.length;++I){if(I===n||I===o)continue;const L=t[I].toString();m[L]=e[I].data[f]}let y;const T=Or(Object.values(m))??"";c.has(T)?y=c.get(T):(c.set(T,m),y=m,y.id=u.toString(),u++);const B=s.indexOf(e[n].data[f]);if(B===-1)throw Error("index not found");const A=vp(e.length,B);y[A]=e[o].data[f]}return Array.from(c.values())}function $T(t){return Or(t)}function Cp(t){return JSON.parse(t)}const wp=t=>t?t.value===void 0?"NULL":t.value===null?"NA":t.value.toString():"ERROR";function UT(t,e,n){var s,l,c;const o=$T(e);return{colId:o,field:t.toString(),headerName:((l=(s=e.spec.annotations)==null?void 0:s["pl7.app/label"])==null?void 0:l.trim())??"Unlabeled "+e.type+" "+t.toString(),lockPosition:e.type==="axis",hide:(n==null?void 0:n.includes(o))??((c=e.spec.annotations)==null?void 0:c["pl7.app/table/visibility"])==="optional",valueFormatter:wp,cellDataType:(u=>{switch(u){case"Int":case"Long":case"Float":case"Double":return"number";case"String":case"Bytes":return"text";default:throw Error(`unsupported data type: ${u}`)}})(e.type==="axis"?e.spec.type:e.spec.valueType)}}function bp(t,e){switch(e){case"Int":return t;case"Long":return typeof t=="bigint"?Number(t):t;case"Float":return t;case"Double":return t;case"String":return t;case"Bytes":return Buffer.from(t).toString("hex");default:throw Error(`unsupported data type: ${e}`)}}function xp(t){const e=[];return fs(t,n=>(e.push(n),n)),e}async function ZT(t,e,n){return n.length?(await t.findColumns(e,{columnFilter:{name:["pl7.app/label"]},compatibleWith:Ge.uniqWith(n.map(s=>Rd(s.spec.axesSpec).map(Ge.cloneDeep)).flat(),Ge.isEqual),strictlyCompatible:!0})).hits.filter(s=>s.spec.axesSpec.length===1):[]}async function WT(t,e,n){const o=xp(n),l=(await ZT(t,e,o)).filter(c=>!Ge.find(o,u=>c.columnId===u.columnId));return l.length===0?n:{type:"outer",primary:n,secondary:l.map(c=>({type:"column",column:c}))}}async function HT(t,e,n,o){const s=n.filter(m=>m.type!=="Bytes"),l=xp(o),c=s.map(m=>[]),u=s.map(m=>null);for(let m=0;m<l.length;++m){const y=Rd(l[m].spec.axesSpec);for(let T=0;T<y.length;++T){const B=Ge.findIndex(s,A=>Ge.isEqual(A,y[T]));B===-1||u[B]||(y.length===1&&l[m].spec.name==="pl7.app/label"?(c[B]=[[m,T]],u[B]=l[m].columnId):c[B].push([m,T]))}}for(let m=s.length-1;m>=0;--m)c[m].length||(u.splice(m,1),c.splice(m,1),s.splice(m,1));const p=100,f=s.map(m=>new Set);e:for(let m=s.length-1;m>=0;--m){for(const[y,T]of c[m]){const B=await t.getUniqueValues(e,{columnId:l[y].columnId,...!u[m]&&{axis:Ge.cloneDeep(s[m])},filters:[],limit:p});if(B.overflow){u.splice(m,1),c.splice(m,1),s.splice(m,1);continue e}const A=B.values.type;for(const I of B.values.data)if(!(Fd(I,A)||I===null)&&(f[m].add(bp(I,A)),f[m].size===p)){u.splice(m,1),c.splice(m,1),s.splice(m,1);continue e}}if(!f[m].size){u.splice(m,1),c.splice(m,1),s.splice(m,1);continue e}}return s.map((m,y)=>{const T=[...f[y]].map(A=>({value:A,label:A.toString()})),B=T[0].value;return{axis:Ge.cloneDeep(m),...u[y]&&{column:u[y]},options:T,defaultValue:B}})}function jT(t,e,n,o){const s=t.length,l=[];for(let c=0;c<e[0].data.length;++c){const u=[],p=(o++).toString();for(const m of n)u.push(e[m].data[c]);const f={key:u,id:p};for(let m=0;m<s;++m){const y=t[m].toString(),T=e[m].data[c],B=e[m].type;Og(e[m].absent,c)?f[y]=void 0:Fd(T,B)||T===null?f[y]=null:f[y]=bp(T,B)}l.push(f)}return l}const qT=t=>t.type==="column"&&t.spec.axesSpec.length===1&&t.spec.name==="pl7.app/label";async function KT(t,e,n,o){const s=await t.getSpec(e);let l=s.findIndex(C=>C.type==="column");l===-1&&(l=s.length);const c=[...s.keys()].filter(C=>!Ge.find(n,R=>Ge.isEqual(R.axis,s[C].id)||Ge.isEqual(R.column,s[C].id))).sort((C,R)=>{var N,U;if(s[C].type!==s[R].type)return s[C].type==="axis"?-1:1;const O=(N=s[C].spec.annotations)==null?void 0:N["pl7.app/table/orderPriority"],F=(U=s[R].spec.annotations)==null?void 0:U["pl7.app/table/orderPriority"];return O===void 0?F===void 0?0:1:F===void 0?-1:Number(F)-Number(O)}),u=Ge.cloneDeep(c),p=LT(s,c);for(let C=c.length-1;C>=0;--C){const R=c[C];if(!qT(s[R]))continue;const O=ja(s[R].spec.axesSpec[0]),F=Ge.findIndex(c,N=>Ge.isEqual(s[N].id,O));if(F===-1&&Ge.findIndex(n,U=>Ge.isEqual(U.axis,O))===-1){console.warn(`added label column, but the axis is not in the data; axisId: ${O}`);continue}c[F]=R;for(const N of p)N.axisIdx===R&&(N.axisIdx=F);c.splice(C,1),u.splice(C,1)}const f=await t.getShape(e),m=f.rows,y=u.map(C=>UT(C,s[C],o));if(p.length>1&&console.warn("Currently, only one heterogeneous axis is supported in the table, got",p.length," transposition will not be applied."),p.length===1)return GT(p,f,y,await t.getData(e,c),u,c);const T=[...c],B=new Map;for(let C=0;C<l;++C)B.set(C,-1);for(let C=0;C<T.length;++C){const R=T[C];B.has(R)&&B.set(R,C)}for(const[C,R]of B)R===-1&&(B.set(C,T.length),T.push(C));const A=[];for(let C=0;C<l;++C){const R=B.get(C);if(R===void 0||R===-1)throw new Error("assertion exception");A.push(R)}let I;return{rowModelType:"serverSide",columnDefs:y,serverSideDatasource:{getRows:async C=>{try{if(m==0){C.success({rowData:[],rowCount:m}),C.api.setGridOption("loading",!1),C.api.showNoRowsOverlay();return}if(I&&!Ge.isEqual(I.request.sortModel,C.request.sortModel)){I=void 0,C.api.setGridOption("loading",!0),C.success({rowData:[],rowCount:0});return}I=C;let R=0,O=[];if(m>0&&C.request.startRow!==void 0&&C.request.endRow!==void 0&&(R=Math.min(m,C.request.endRow)-C.request.startRow,R>0)){const F=await t.getData(e,T,{offset:C.request.startRow,length:R});O=jT(u,F,A,C.request.startRow)}C.success({rowData:O,rowCount:m}),C.api.autoSizeAllColumns(),C.api.setGridOption("loading",!1)}catch(R){C.api.setGridOption("loading",!0),C.fail(),console.trace(R)}}}}}const kp=km(),YT=["onClick"],Sp=r.defineComponent({__name:"PlAgGridColumnManager",props:{api:{}},setup(t){const e=t,{api:n}=r.toRefs(e),o=r.ref([]),s=r.ref(),l=r.ref(!1),c=r.ref(0);gp(s,{handle:".handle",onChange(p){n.value.moveColumns(p.map(f=>o.value[f]),0)}});function u(p){n.value.setColumnsVisible([p],!p.isVisible())}return r.onMounted(()=>{n.value.addEventListener("displayedColumnsChanged",()=>{o.value=[...n.value.getAllGridColumns()??[]],c.value++}),o.value=n.value.getAllGridColumns()??[]}),(p,f)=>(r.openBlock(),r.createElementBlock("div",null,[(r.openBlock(),r.createBlock(r.Teleport,{to:`#${r.unref(kp)}`},[r.createVNode(r.unref(Cs),{onClick:f[0]||(f[0]=r.withModifiers(m=>l.value=!l.value,["stop"]))},{append:r.withCtx(()=>[r.createVNode(r.unref(cn),{name:"columns"})]),default:r.withCtx(()=>[f[2]||(f[2]=r.createTextVNode(" Columns "))]),_:1})],8,["to"])),r.createVNode(r.unref($u),{modelValue:l.value,"onUpdate:modelValue":f[1]||(f[1]=m=>l.value=m),shadow:!0,width:"368px","close-on-outside-click":""},{title:r.withCtx(()=>f[3]||(f[3]=[r.createTextVNode("Columns")])),default:r.withCtx(()=>[(r.openBlock(),r.createElementBlock("div",{ref_key:"listRef",ref:s,key:c.value,class:"pl-ag-columns"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,m=>(r.openBlock(),r.createElementBlock("div",{key:m.getId(),class:"pl-ag-columns__item"},[r.createElementVNode("div",{class:r.normalizeClass([{handle:!m.getColDef().lockPosition},"pl-ag-columns__drag"])},[r.createVNode(r.unref(Un),{name:"drag-dots"})],2),r.createElementVNode("div",{class:r.normalizeClass([{visible:m.isVisible()},"pl-ag-columns__title"])},r.toDisplayString(m.getColDef().headerName),3),r.createElementVNode("div",{class:"pl-ag-columns__visibility",onClick:y=>u(m)},[r.createVNode(r.unref(Ct),{"close-delay":500,position:"top"},{tooltip:r.withCtx(()=>f[4]||(f[4]=[r.createTextVNode("Show/Hide")])),default:r.withCtx(()=>[r.createVNode(r.unref(cn),{name:m.isVisible()?"view-show":"view-hide"},null,8,["name"])]),_:2},1024)],8,YT)]))),128))]))]),_:1},8,["modelValue"])]))}}),JT=["id"],XT=r.defineComponent({__name:"PlAgDataTableToolsPanel",setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{id:r.unref(kp),class:"d-flex gap-6"},[r.renderSlot(e.$slots,"default")],8,JT))}}),QT={class:"ap-ag-data-table-container"},eB={key:1,class:"ap-ag-data-table-sheets"},tB=Ds(r.defineComponent({__name:"PlAgDataTable",props:r.mergeModels({settings:{},showColumnsPanel:{type:Boolean}},{modelValue:{default:{gridState:{}}},modelModifiers:{}}),emits:r.mergeModels(["onRowDoubleClicked","columnsChanged"],["update:modelValue"]),setup(t,{expose:e,emit:n}){x.ModuleRegistry.registerModules([is.ClientSideRowModelModule,hd.ClipboardModule,pd.ServerSideRowModelModule,fd.RangeSelectionModule,Ja,ru]);const o=r.useModel(t,"modelValue"),s=t,{settings:l}=r.toRefs(s),c=n;r.watch(()=>l.value,async(S,w)=>{if(S.sourceType!=="pframe"||!S.pFrame||!S.join||w&&w.sourceType==="pframe"&&Ge.isEqual(S.pFrame,w.pFrame)&&Ge.isEqual(S.join,w.join))return;const k=window.platforma;if(!k)throw Error("platforma not set");const $=k.pFrameDriver;if(!$)throw Error("platforma.pFrameDriver not set");const Q=await WT($,S.pFrame,S.join),ne=o.value;ne.pTableParams||(ne.pTableParams={sorting:[],filters:[]}),ne.pTableParams.join=Q,o.value=ne});const u=Ep(()=>l.value.sourceType,async S=>{var k;const w=l.value.sourceType;switch(w){case"pframe":{const $=window.platforma;if(!$)throw Error("platforma not set");const Q=$.pFrameDriver;if(!Q)throw Error("platforma.pFrameDriver not set");if(!l.value.pFrame)return[];const ne=l.value.pFrame,be=(k=o.value.pTableParams)==null?void 0:k.join;return be?await HT(Q,ne,l.value.sheetAxes,be):[]}case"ptable":return l.value.sheets??[];case"xsv":return[];default:throw Error(`unsupported source type: ${w}`)}});function p(S){if(!(l.value.sourceType!=="ptable"&&l.value.sourceType!=="pframe"))return(S==null?void 0:S.sortModel.map(w=>{const{spec:k,...$}=Cp(w.colId);return{column:$,ascending:w.sort==="asc",naAndAbsentAreLeastValues:!0}}))??[]}const f=r.computed({get:()=>{const S=o.value;return{columnOrder:S.gridState.columnOrder,sort:S.gridState.sort,columnVisibility:S.gridState.columnVisibility}},set:S=>{const w=o.value,k=A.value.rowModelType==="clientSide"?void 0:p(S.sort);w.gridState={...w.gridState,...S},(l.value.sourceType==="ptable"||l.value.sourceType==="pframe")&&(w.pTableParams||(w.pTableParams={sorting:[],filters:[]}),w.pTableParams.sorting=k),o.value=w}}),m=S=>Or(S);function y(S){var w;if(!(l.value.sourceType!=="ptable"&&l.value.sourceType!=="pframe"))return((w=u.value)==null?void 0:w.map(k=>({type:"bySingleColumnV2",column:k.column?{type:"column",id:k.column}:{type:"axis",id:k.axis},predicate:{operator:"Equal",reference:S[m(k.axis)]}})))??[]}const T=r.computed({get:()=>o.value.gridState.sheets??{},set:S=>{const w=y(S),k=o.value;k.gridState.sheets=S,(l.value.sourceType==="ptable"||l.value.sourceType==="pframe")&&(k.pTableParams||(k.pTableParams={sorting:[],filters:[]}),k.pTableParams.filters=w),o.value=k}});r.watch(()=>[l.value,u.value],(S,w)=>{const[k,$]=S;if(!$)return;if(w){const[ne,be]=w;if((k.sourceType==="ptable"||k.sourceType==="pframe")&&k.sourceType===(ne==null?void 0:ne.sourceType)&&Ge.isEqual($,be))return}if(k.sourceType!=="ptable"&&k.sourceType!=="pframe"){T.value={};return}const Q=T.value;for(const ne of $){const be=m(ne.axis);Q[be]||(Q[be]=ne.defaultValue??ne.options[0].value)}T.value=Q},{immediate:!0});const B=r.shallowRef(),A=r.shallowRef({animateRows:!1,suppressColumnMoveAnimation:!0,cellSelection:!0,initialState:f.value,autoSizeStrategy:{type:"fitCellContents"},onRowDataUpdated:S=>{S.api.autoSizeAllColumns()},onRowDoubleClicked:S=>{S.data&&c("onRowDoubleClicked",S.data.key)},defaultColDef:{suppressHeaderMenuButton:!0},maintainColumnOrder:!0,localeText:{loadingError:"..."},rowModelType:"clientSide",maxBlocksInCache:1e3,cacheBlockSize:100,blockLoadDebounceMillis:500,serverSideSortAllLevels:!0,suppressServerSideFullWidthLoadingRow:!0,getRowId:S=>S.data.id,loading:!0,loadingOverlayComponentParams:{notReady:!0},loadingOverlayComponent:yp,noRowsOverlayComponent:_p,sideBar:{},defaultCsvExportParams:{allColumns:!0,suppressQuotes:!0,fileName:"table.csv"}}),I=S=>{const w=S.api;B.value=new Proxy(w,{get(k,$,Q){switch($){case"setGridOption":return(ne,be)=>{const $e=A.value;$e[ne]=be,A.value=$e,w.setGridOption(ne,be)};case"updateGridOptions":return ne=>{A.value={...A.value,...ne},w.updateGridOptions(ne)};default:return Reflect.get(k,$,Q)}}})},L=S=>({columnOrder:S.columnOrder,sort:S.sort,columnVisibility:S.columnVisibility??(S.columnOrder?{hiddenColIds:[]}:void 0)}),C=S=>{A.value.initialState=f.value=L(S.state),S.api.autoSizeAllColumns()},R=()=>{A.value.initialState=f.value=L(B.value.getState()),B.value=void 0};let O=!1;const F=()=>{if(!O)return;const S=B.value;S!==void 0&&(S.exportDataAsCsv(),O=!1,S.setGridOption("cacheBlockSize",100))},N=()=>{if(!O)return;const S=B.value;if(S===void 0)return;const w=S.getServerSideGroupLevelState()[0];w.cacheBlockSize===w.rowCount&&S.refreshServerSide({route:w.route,purge:!1})};e({exportCsv:async()=>{const S=B.value;if(S!==void 0){if(A.value.rowModelType==="clientSide"){S.exportDataAsCsv();return}if(A.value.rowModelType==="serverSide"){const w=S.getServerSideGroupLevelState()[0];if(w.rowCount<=w.cacheBlockSize){S.exportDataAsCsv();return}O||(O=!0,S.setGridOption("cacheBlockSize",w.rowCount))}}}});const te=r.ref(0);r.watch(()=>[B.value,f.value],(S,w)=>{if(Ge.isEqual(S,w))return;const[k,$]=S;if(!k)return;const Q=L(k.getState());Ge.isEqual($,Q)||(A.value.initialState=$,++te.value)}),r.watch(()=>A.value,(S,w)=>{var k;if(w&&(S.rowModelType!=w.rowModelType&&++te.value,!Ge.isEqual(S.columnDefs,w.columnDefs)&&S.columnDefs)){const $=be=>!("children"in be),Q=(k=S.columnDefs)==null?void 0:k.filter($),ne=Q==null?void 0:Q.map(be=>be.colId).filter(be=>be!==void 0).map(be=>Cp(be));c("columnsChanged",ne??[])}});const j=(S,w)=>{var $;const k=T.value;k[S]!==w&&(k[S]=w,T.value=k,($=B.value)==null||$.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1}}))},Y=window.platforma;if(!Y)throw Error("platforma not set");const q=Y.pFrameDriver;if(!q)throw Error("platforma.pFrameDriver not set");const ee=Y.blobDriver;if(!ee)throw Error("platforma.blobDriver not set");let G;return r.watch(()=>[B.value,l.value,u.value],async S=>{var ne,be;const[w,k,$]=S;if(!w||Ge.isEqual(k,G))return;G=k;const Q=k.sourceType;switch(Q){case"pframe":case"ptable":{const $e=k.pTable;if(!$e||!$)return w.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[]});const ot=(be=(ne=f.value)==null?void 0:ne.columnVisibility)==null?void 0:be.hiddenColIds,wn=await KT(q,$e,$,ot);return w.updateGridOptions({loading:wn.rowModelType!=="clientSide",loadingOverlayComponentParams:{notReady:!1},...wn})}case"xsv":{const $e=k.xsvFile;if(!($e!=null&&$e.ok)||!$e.value)return w.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[]});const ot=await IT(ee,$e.value);return w.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},...ot})}default:throw Error(`unsupported source type: ${Q}`)}}),(S,w)=>(r.openBlock(),r.createElementBlock("div",QT,[B.value&&S.showColumnsPanel?(r.openBlock(),r.createBlock(r.unref(Sp),{key:0,api:B.value},null,8,["api"])):r.createCommentVNode("",!0),r.unref(u).value&&r.unref(u).value.length>0?(r.openBlock(),r.createElementBlock("div",eB,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(u).value,(k,$)=>(r.openBlock(),r.createBlock(r.unref(Gu),{key:$,"model-value":T.value[m(k.axis)],options:k.options,"onUpdate:modelValue":Q=>j(m(k.axis),Q)},null,8,["model-value","options","onUpdate:modelValue"]))),128))])):r.createCommentVNode("",!0),(r.openBlock(),r.createBlock(r.unref(Cm.AgGridVue),{key:te.value,theme:r.unref(iu),class:"ap-ag-data-table-grid","grid-options":A.value,onGridReady:I,onStateUpdated:C,onGridPreDestroyed:R,onStoreRefreshed:F,onModelUpdated:N},null,8,["theme","grid-options"]))]))}}),[["__scopeId","data-v-ea0278e4"]]),nB={key:0,class:"d-flex gap-10 flex-column"},rB={key:0},oB=Ds(r.defineComponent({__name:"PlTableFilters",props:r.mergeModels({columns:{},restrictions:{},defaults:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t,{columns:o,restrictions:s,defaults:l}=r.toRefs(n),c=G=>Or(G.id),u=r.computed(()=>o.value.filter(G=>{const S=G.type;switch(S){case"axis":return G.spec.type!=="Bytes";case"column":return G.spec.valueType!=="Bytes";default:throw Error(`unsupported data type: ${S}`)}}).map(G=>({column:G,id:c(G)}))),p=r.computed(()=>{const G=s.value??[],S={};for(const{column:w,id:k}of u.value){const $=Ge.find(G,Q=>Ge.isEqual(Q.column.id,w.id));$!==void 0&&(S[k]=$.allowedFilterTypes)}return S}),f=r.computed(()=>{const G=l.value??[],S={};for(const{column:w,id:k}of u.value){const $=Ge.find(G,Q=>Ge.isEqual(Q.column.id,w.id));$!==void 0&&(S[k]=$.default)}return S}),m=G=>G!==void 0?G:f.value,y=r.reactive({state:m(e.value.state)});r.watch(()=>e.value,G=>{Ge.isEqual(y.state,G.state)||(y.state=m(G.state))}),r.watch(()=>u.value,G=>{if(y.state!==void 0&&G.length===0)return;const S=y.state??{},w={};for(const{id:k}of G)S[k]!==void 0&&(w[k]=S[k]);y.state=w},{immediate:!0});const T=G=>{switch(G){case"isNotNA":return"Is not NA";case"isNA":return"Is NA";case"number_equals":case"string_equals":return"Equals";case"number_notEquals":case"string_notEquals":return"Not equals";case"number_greaterThan":return"Greater than";case"number_greaterThanOrEqualTo":return"Greater than or equal to";case"number_lessThan":return"Less than";case"number_lessThanOrEqualTo":return"Less than or equal to";case"number_between":return"Between";case"string_contains":return"Contains";case"string_doesNotContain":return"Does not contain";case"string_matches":return"Matches";case"string_doesNotMatch":return"Does not match";case"string_containsFuzzyMatch":return"Contains fuzzy match";default:throw Error(`unsupported filter type: ${G}`)}},B=["isNotNA","isNA","number_equals","number_notEquals","number_greaterThan","number_greaterThanOrEqualTo","number_lessThan","number_lessThanOrEqualTo","number_between"],A=["isNotNA","isNA","string_equals","string_notEquals","string_contains","string_doesNotContain","string_matches","string_doesNotMatch","string_containsFuzzyMatch"],I=r.computed(()=>{const G=p.value,S={};for(const{column:w,id:k}of u.value){let Q=(w.type==="column"?w.spec.valueType:w.spec.type)==="String"?A:B;const ne=G[k];ne!==void 0&&(Q=Q.filter(be=>ne.includes(be))),S[k]=Q.map(be=>({value:be,text:T(be)}))}return S}),L=r.computed(()=>Ge.some(Object.values(I.value),G=>G.length>0)),C=G=>{const S=G.type;switch(S){case"isNotNA":case"isNA":return;case"number_equals":case"number_notEquals":case"number_greaterThan":case"number_greaterThanOrEqualTo":case"number_lessThan":case"number_lessThanOrEqualTo":return G.reference;case"number_between":return G.lowerBound;case"string_equals":case"string_notEquals":case"string_contains":case"string_doesNotContain":case"string_matches":case"string_doesNotMatch":case"string_containsFuzzyMatch":return G.reference;default:throw Error(`unsupported filter type: ${S}`)}},R=(G,S)=>{switch(G){case"isNotNA":case"isNA":return{type:G};case"number_equals":case"number_notEquals":case"number_greaterThan":case"number_greaterThanOrEqualTo":case"number_lessThan":case"number_lessThanOrEqualTo":return{type:G,reference:typeof S=="number"?S:0};case"number_between":return{type:G,lowerBound:typeof S=="number"?S:0,includeLowerBound:!0,upperBound:100,includeUpperBound:!1};case"string_equals":case"string_notEquals":case"string_contains":case"string_doesNotContain":case"string_matches":case"string_doesNotMatch":return{type:G,reference:typeof S=="string"?S:""};case"string_containsFuzzyMatch":return{type:G,reference:typeof S=="string"?S:"",maxEdits:2,substitutionsOnly:!1,wildcard:void 0};default:throw Error(`unsupported filter type: ${G}`)}},O=(G,S)=>{const w=y.state[G];y.state[G]=R(S,C(w))},F=G=>{y.state[G]=f.value[G]??R(I.value[G][0].value)},N=(G,S)=>{S?F(G):delete y.state[G]},U=(G,S)=>{var ne,be;const w=Number(S);if(!Number.isFinite(w))throw Error("Model value is not a number.");const k=G.type==="column"?G.spec.valueType:G.spec.type;if((k==="Int"||k==="Long")&&!Number.isInteger(w))throw Error("Model value is not an integer.");const $=(ne=G.spec.annotations)==null?void 0:ne["pl7.app/min"];if($!==void 0){const $e=Number($);if(Number.isFinite($e)&&w<Number($))throw Error("Model value is too low.")}const Q=(be=G.spec.annotations)==null?void 0:be["pl7.app/max"];if(Q!==void 0){const $e=Number(Q);if(Number.isFinite($e)&&w>Number(Q))throw Error("Model value is too high.")}return w},te=(G,S)=>{var k,$;const w=((k=G.spec.domain)==null?void 0:k["pl7.app/alphabet"])??(($=G.spec.annotations)==null?void 0:$["pl7.app/alphabet"]);if(w==="nucleotide"&&!/^[AaTtGgCcNn]+$/.test(S))throw Error("Model value is not a nucleotide.");if(w==="aminoacid"&&!/^[AaCcDdEeFfGgHhIiKkLlMmNnPpQqRrSsTtVvWwYyXx]+$/.test(S))throw Error("Model value is not an aminoacid.");return S},j=G=>{try{return new RegExp(G),G}catch(S){throw S instanceof SyntaxError?Error("Model value is not a regexp."):S}},Y=(G,S)=>{var $,Q;const w=(($=G.spec.domain)==null?void 0:$["pl7.app/alphabet"])??((Q=G.spec.annotations)==null?void 0:Q["pl7.app/alphabet"]);if(w==="nucleotide")return[{value:"N",text:"N"}];if(w==="aminoacid")return[{value:"X",text:"X"}];const k=Ge.uniq(S);return k.sort(),k.map(ne=>({value:ne,text:ne}))},q=G=>{const S=G.type;switch(S){case"isNotNA":return{operator:"Not",operand:{operator:"IsNA"}};case"isNA":return{operator:"IsNA"};case"number_equals":case"string_equals":return{operator:"Equal",reference:G.reference};case"number_notEquals":case"string_notEquals":return{operator:"Not",operand:{operator:"Equal",reference:G.reference}};case"number_greaterThan":return{operator:"Greater",reference:G.reference};case"number_greaterThanOrEqualTo":return{operator:"GreaterOrEqual",reference:G.reference};case"number_lessThan":return{operator:"Less",reference:G.reference};case"number_lessThanOrEqualTo":return{operator:"LessOrEqual",reference:G.reference};case"number_between":return{operator:"And",operands:[{operator:G.includeLowerBound?"GreaterOrEqual":"Greater",reference:G.lowerBound},{operator:G.includeUpperBound?"LessOrEqual":"Less",reference:G.upperBound}]};case"string_contains":return{operator:"StringContains",substring:G.reference};case"string_doesNotContain":return{operator:"Not",operand:{operator:"StringContains",substring:G.reference}};case"string_matches":return{operator:"Matches",regex:G.reference};case"string_doesNotMatch":return{operator:"Not",operand:{operator:"Matches",regex:G.reference}};case"string_containsFuzzyMatch":return{operator:"StringContainsFuzzy",reference:G.reference,maxEdits:G.maxEdits,substitutionsOnly:G.substitutionsOnly,wildcard:G.wildcard};default:throw Error(`unsupported filter type: ${S}`)}},ee=G=>u.value.map(({column:S,id:w})=>{if(!(w in G))return;const k=q(G[w]),{spec:$,...Q}=S;return{type:"bySingleColumnV2",column:Q,predicate:k}}).filter(S=>S!==void 0);return r.watch(()=>y,G=>{Ge.isEqual(G.state,e.value.state)||(e.value={state:Ge.cloneDeep(G.state),filters:ee(G.state)})},{immediate:!0,deep:!0}),(G,S)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(u.value,({column:w,id:k},$)=>{var Q,ne,be,$e,ot,wn,In,xr,jn,Jr,Os,kr,Sr,Ls;return r.openBlock(),r.createElementBlock("div",{key:k},[I.value[k].length>0?(r.openBlock(),r.createElementBlock("form",nB,[r.createVNode(r.unref(zu),{"model-value":!!y.state[k],"onUpdate:modelValue":Se=>N(k,Se)},{default:r.withCtx(()=>{var Se,Xr;return[r.createTextVNode(r.toDisplayString(((Xr=(Se=w.spec.annotations)==null?void 0:Se["pl7.app/label"])==null?void 0:Xr.trim())??"Unlabeled "+w.type+" "+$.toString()),1)]}),_:2},1032,["model-value","onUpdate:modelValue"]),r.createElementVNode("div",{class:r.normalizeClass(["controls d-flex gap-10 flex-column",{open:!!y.state[k]}])},[y.state[k]?(r.openBlock(),r.createBlock(r.unref(yi),{key:0,"model-value":y.state[k].type,options:I.value[k],label:"Predicate","onUpdate:modelValue":Se=>O(k,Se)},null,8,["model-value","options","onUpdate:modelValue"])):r.createCommentVNode("",!0),((Q=y.state[k])==null?void 0:Q.type)==="number_equals"||((ne=y.state[k])==null?void 0:ne.type)==="number_notEquals"||((be=y.state[k])==null?void 0:be.type)==="number_lessThan"||(($e=y.state[k])==null?void 0:$e.type)==="number_lessThanOrEqualTo"||((ot=y.state[k])==null?void 0:ot.type)==="number_greaterThan"||((wn=y.state[k])==null?void 0:wn.type)==="number_greaterThanOrEqualTo"?(r.openBlock(),r.createBlock(r.unref(Ur),{key:1,modelValue:y.state[k].reference,"onUpdate:modelValue":Se=>y.state[k].reference=Se,parse:Se=>U(w,Se),label:"Reference value"},null,8,["modelValue","onUpdate:modelValue","parse"])):r.createCommentVNode("",!0),((In=y.state[k])==null?void 0:In.type)==="number_between"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:2},[r.createVNode(r.unref(Ur),{modelValue:y.state[k].lowerBound,"onUpdate:modelValue":Se=>y.state[k].lowerBound=Se,parse:Se=>U(w,Se),label:"Lower bound"},null,8,["modelValue","onUpdate:modelValue","parse"]),r.createVNode(r.unref(xs),{modelValue:y.state[k].includeLowerBound,"onUpdate:modelValue":Se=>y.state[k].includeLowerBound=Se,label:"Include lower bound"},null,8,["modelValue","onUpdate:modelValue"]),r.createVNode(r.unref(Ur),{modelValue:y.state[k].upperBound,"onUpdate:modelValue":Se=>y.state[k].upperBound=Se,parse:Se=>U(w,Se),label:"Upper bound"},null,8,["modelValue","onUpdate:modelValue","parse"]),r.createVNode(r.unref(xs),{modelValue:y.state[k].includeUpperBound,"onUpdate:modelValue":Se=>y.state[k].includeUpperBound=Se,label:"Include upper bound"},null,8,["modelValue","onUpdate:modelValue"])],64)):r.createCommentVNode("",!0),((xr=y.state[k])==null?void 0:xr.type)==="string_equals"||((jn=y.state[k])==null?void 0:jn.type)==="string_notEquals"||((Jr=y.state[k])==null?void 0:Jr.type)==="string_contains"||((Os=y.state[k])==null?void 0:Os.type)==="string_doesNotContain"?(r.openBlock(),r.createBlock(r.unref(Ur),{key:3,modelValue:y.state[k].reference,"onUpdate:modelValue":Se=>y.state[k].reference=Se,parse:Se=>te(w,Se),label:"Reference value"},null,8,["modelValue","onUpdate:modelValue","parse"])):r.createCommentVNode("",!0),((kr=y.state[k])==null?void 0:kr.type)==="string_matches"||((Sr=y.state[k])==null?void 0:Sr.type)==="string_doesNotMatch"?(r.openBlock(),r.createBlock(r.unref(Ur),{key:4,modelValue:y.state[k].reference,"onUpdate:modelValue":Se=>y.state[k].reference=Se,parse:j,label:"Reference value"},null,8,["modelValue","onUpdate:modelValue"])):r.createCommentVNode("",!0),((Ls=y.state[k])==null?void 0:Ls.type)==="string_containsFuzzyMatch"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:5},[r.createVNode(r.unref(Ur),{modelValue:y.state[k].reference,"onUpdate:modelValue":Se=>y.state[k].reference=Se,parse:Se=>te(w,Se),label:"Reference value"},null,8,["modelValue","onUpdate:modelValue","parse"]),r.createVNode(r.unref(hp),{modelValue:y.state[k].maxEdits,"onUpdate:modelValue":Se=>y.state[k].maxEdits=Se,max:5,breakpoints:"",label:"Maximum nuber of substitutions and indels"},null,8,["modelValue","onUpdate:modelValue"]),r.createVNode(r.unref(xs),{modelValue:y.state[k].substitutionsOnly,"onUpdate:modelValue":Se=>y.state[k].substitutionsOnly=Se,label:"Substitutions only"},null,8,["modelValue","onUpdate:modelValue"]),r.createVNode(r.unref(yi),{modelValue:y.state[k].wildcard,"onUpdate:modelValue":Se=>y.state[k].wildcard=Se,options:Y(w,y.state[k].reference),clearable:"",label:"Wildcard symbol"},null,8,["modelValue","onUpdate:modelValue","options"])],64)):r.createCommentVNode("",!0)],2)])):r.createCommentVNode("",!0)])}),128)),L.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",rB,"No filters applicable"))],64))}}),[["__scopeId","data-v-bbbd2a6f"]]),iB={key:1,class:"alert-error"},sB={key:2},aB=r.defineComponent({__name:"ValueOrErrorsComponent",props:{valueOrError:{}},setup(t){const e=t,n=r.computed(()=>e.valueOrError&&e.valueOrError.ok?e.valueOrError.value:void 0),o=r.computed(()=>e.valueOrError&&!e.valueOrError.ok?e.valueOrError.errors:void 0),s=r.computed(()=>n.value===void 0&&o.value===void 0);return(l,c)=>(r.openBlock(),r.createElementBlock("div",null,[n.value!==void 0?r.renderSlot(l.$slots,"default",r.normalizeProps(r.mergeProps({key:0},{value:n.value}))):r.createCommentVNode("",!0),o.value?(r.openBlock(),r.createElementBlock("div",iB,r.toDisplayString(o.value),1)):r.createCommentVNode("",!0),s.value?(r.openBlock(),r.createElementBlock("div",sB,"Unresolved")):r.createCommentVNode("",!0)]))}}),lB={style:{height:"100%"}},cB=r.defineComponent({__name:"PlAgCellFile",props:{params:{}},setup(t){const e=t,n=r.computed(()=>e.params.extensions),o=r.computed(()=>e.params.value);function s(c){e.params.setValue(c)}const l=r.computed(()=>e.params.resolveProgress?e.params.resolveProgress(o.value):void 0);return(c,u)=>(r.openBlock(),r.createElementBlock("div",lB,[r.createVNode(r.unref(up),{"show-filename-only":"",clearable:"","cell-style":"","file-dialog-title":"Select any file",placeholder:`Choose file ${n.value?n.value[0]:""}`,extensions:n.value,"model-value":o.value,progress:l.value,"onUpdate:modelValue":s},null,8,["placeholder","extensions","model-value","progress"])]))}}),dB={class:"pl-ag-grid-open-cell d-flex"},uB={class:"pl-ag-grid-open-cell__value"},pB=r.defineComponent({__name:"PlAgTextAndButtonCell",props:{params:{}},setup(t){const e=t;function n(){if(e.params.invokeRowsOnDoubleClick){const o=e.params.api,s={rowPinned:e.params.node.rowPinned,api:o,rowIndex:e.params.node.rowIndex,context:o,type:"rowDoubleClicked",node:e.params.node,data:e.params.data,event:null};o.dispatchEvent(s)}else e.params.onClick&&e.params.onClick(e.params)}return(o,s)=>(r.openBlock(),r.createElementBlock("div",dB,[r.createElementVNode("div",uB,r.toDisplayString(o.params.value),1),r.createElementVNode("div",{class:"pl-ag-grid-open-cell__activator text-caps11 align-center",onClick:r.withModifiers(n,["stop"])},[r.createVNode(r.unref(Un),{name:o.params.icon??"maximize"},null,8,["name"]),r.createTextVNode(" "+r.toDisplayString(o.params.btnLabel??"Open"),1)])]))}}),Rs=new Map;function hB(t,e){const n=r.getCurrentScope()??r.effectScope(),o=n.run(()=>(r.onScopeDispose(()=>{Rs.delete(t)}),r.reactive(e())));return o[Symbol.dispose]=()=>{n.stop()},o}function fB(t){const e=Symbol();return()=>(Rs.has(e)||Rs.set(e,hB(e,t)),Rs.get(e))}function mB(t){return r.computed(()=>{try{return Cd(t())}catch(e){return{errors:[String(e)],value:void 0}}})}function Ep(t,e,n){const o=r.ref(0),s=r.reactive({loading:r.computed(()=>o.value>0),loadingRef:o,value:void 0,error:void 0}),l=Em(e);return r.watch(t,async c=>{s.error=void 0,o.value++,l(c).then(u=>{u.ok&&(s.value=u.value)}).catch(u=>{s.value=void 0,s.error=u}).finally(()=>{o.value--})},Object.assign({immediate:!0,deep:!0},n??{})),s}const Eo=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Tp=new Set,Rl=typeof process=="object"&&process?process:{},Bp=(t,e,n,o)=>{typeof Rl.emitWarning=="function"?Rl.emitWarning(t,e,n,o):console.error(`[${n}] ${e}: ${t}`)};let Ms=globalThis.AbortController,Vp=globalThis.AbortSignal;if(typeof Ms>"u"){Vp=class{constructor(){Ze(this,"onabort");Ze(this,"_onabort",[]);Ze(this,"reason");Ze(this,"aborted",!1)}addEventListener(o,s){this._onabort.push(s)}},Ms=class{constructor(){Ze(this,"signal",new Vp);e()}abort(o){var s,l;if(!this.signal.aborted){this.signal.reason=o,this.signal.aborted=!0;for(const c of this.signal._onabort)c(o);(l=(s=this.signal).onabort)==null||l.call(s,o)}}};let t=((Ap=Rl.env)==null?void 0:Ap.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{t&&(t=!1,Bp("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const gB=t=>!Tp.has(t),wr=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Np=t=>wr(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Is:null:null;class Is extends Array{constructor(e){super(e),this.fill(0)}}const jr=class jr{constructor(e,n){Ze(this,"heap");Ze(this,"length");if(!b(jr,To))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(e),this.length=0}static create(e){const n=Np(e);if(!n)return[];me(jr,To,!0);const o=new jr(e,n);return me(jr,To,!1),o}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};To=new WeakMap,ze(jr,To,!1);let Ml=jr;const Ll=class Ll{constructor(e){ze(this,re);ze(this,hn);ze(this,zt);ze(this,fn);ze(this,mn);ze(this,Bo);ze(this,Vo);Ze(this,"ttl");Ze(this,"ttlResolution");Ze(this,"ttlAutopurge");Ze(this,"updateAgeOnGet");Ze(this,"updateAgeOnHas");Ze(this,"allowStale");Ze(this,"noDisposeOnSet");Ze(this,"noUpdateTTL");Ze(this,"maxEntrySize");Ze(this,"sizeCalculation");Ze(this,"noDeleteOnFetchRejection");Ze(this,"noDeleteOnStaleGet");Ze(this,"allowStaleOnFetchAbort");Ze(this,"allowStaleOnFetchRejection");Ze(this,"ignoreFetchAbort");ze(this,dt);ze(this,gn);ze(this,lt);ze(this,Ke);ze(this,xe);ze(this,Bt);ze(this,$t);ze(this,xt);ze(this,ft);ze(this,yn);ze(this,mt);ze(this,_n);ze(this,vn);ze(this,Ut);ze(this,Cn);ze(this,br);ze(this,Vt);ze(this,qr,()=>{});ze(this,Hn,()=>{});ze(this,Mi,()=>{});ze(this,Zt,()=>!1);ze(this,Kr,e=>{});ze(this,No,(e,n,o)=>{});ze(this,Ii,(e,n,o,s)=>{if(o||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});Ze(this,Pp,"LRUCache");const{max:n=0,ttl:o,ttlResolution:s=1,ttlAutopurge:l,updateAgeOnGet:c,updateAgeOnHas:u,allowStale:p,dispose:f,disposeAfter:m,noDisposeOnSet:y,noUpdateTTL:T,maxSize:B=0,maxEntrySize:A=0,sizeCalculation:I,fetchMethod:L,memoMethod:C,noDeleteOnFetchRejection:R,noDeleteOnStaleGet:O,allowStaleOnFetchRejection:F,allowStaleOnFetchAbort:N,ignoreFetchAbort:U}=e;if(n!==0&&!wr(n))throw new TypeError("max option must be a nonnegative integer");const te=n?Np(n):Array;if(!te)throw new Error("invalid max value: "+n);if(me(this,hn,n),me(this,zt,B),this.maxEntrySize=A||b(this,zt),this.sizeCalculation=I,this.sizeCalculation){if(!b(this,zt)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(C!==void 0&&typeof C!="function")throw new TypeError("memoMethod must be a function if defined");if(me(this,Vo,C),L!==void 0&&typeof L!="function")throw new TypeError("fetchMethod must be a function if specified");if(me(this,Bo,L),me(this,br,!!L),me(this,lt,new Map),me(this,Ke,new Array(n).fill(void 0)),me(this,xe,new Array(n).fill(void 0)),me(this,Bt,new te(n)),me(this,$t,new te(n)),me(this,xt,0),me(this,ft,0),me(this,yn,Ml.create(n)),me(this,dt,0),me(this,gn,0),typeof f=="function"&&me(this,fn,f),typeof m=="function"?(me(this,mn,m),me(this,mt,[])):(me(this,mn,void 0),me(this,mt,void 0)),me(this,Cn,!!b(this,fn)),me(this,Vt,!!b(this,mn)),this.noDisposeOnSet=!!y,this.noUpdateTTL=!!T,this.noDeleteOnFetchRejection=!!R,this.allowStaleOnFetchRejection=!!F,this.allowStaleOnFetchAbort=!!N,this.ignoreFetchAbort=!!U,this.maxEntrySize!==0){if(b(this,zt)!==0&&!wr(b(this,zt)))throw new TypeError("maxSize must be a positive integer if specified");if(!wr(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");de(this,re,fm).call(this)}if(this.allowStale=!!p,this.noDeleteOnStaleGet=!!O,this.updateAgeOnGet=!!c,this.updateAgeOnHas=!!u,this.ttlResolution=wr(s)||s===0?s:1,this.ttlAutopurge=!!l,this.ttl=o||0,this.ttl){if(!wr(this.ttl))throw new TypeError("ttl must be a positive integer if specified");de(this,re,ld).call(this)}if(b(this,hn)===0&&this.ttl===0&&b(this,zt)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!b(this,hn)&&!b(this,zt)){const j="LRU_CACHE_UNBOUNDED";gB(j)&&(Tp.add(j),Bp("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",j,Ll))}}static unsafeExposeInternals(e){return{starts:b(e,vn),ttls:b(e,Ut),sizes:b(e,_n),keyMap:b(e,lt),keyList:b(e,Ke),valList:b(e,xe),next:b(e,Bt),prev:b(e,$t),get head(){return b(e,xt)},get tail(){return b(e,ft)},free:b(e,yn),isBackgroundFetch:n=>{var o;return de(o=e,re,Je).call(o,n)},backgroundFetch:(n,o,s,l)=>{var c;return de(c=e,re,Aa).call(c,n,o,s,l)},moveToTail:n=>{var o;return de(o=e,re,os).call(o,n)},indexes:n=>{var o;return de(o=e,re,Rr).call(o,n)},rindexes:n=>{var o;return de(o=e,re,Mr).call(o,n)},isStale:n=>{var o;return b(o=e,Zt).call(o,n)}}}get max(){return b(this,hn)}get maxSize(){return b(this,zt)}get calculatedSize(){return b(this,gn)}get size(){return b(this,dt)}get fetchMethod(){return b(this,Bo)}get memoMethod(){return b(this,Vo)}get dispose(){return b(this,fn)}get disposeAfter(){return b(this,mn)}getRemainingTTL(e){return b(this,lt).has(e)?1/0:0}*entries(){for(const e of de(this,re,Rr).call(this))b(this,xe)[e]!==void 0&&b(this,Ke)[e]!==void 0&&!de(this,re,Je).call(this,b(this,xe)[e])&&(yield[b(this,Ke)[e],b(this,xe)[e]])}*rentries(){for(const e of de(this,re,Mr).call(this))b(this,xe)[e]!==void 0&&b(this,Ke)[e]!==void 0&&!de(this,re,Je).call(this,b(this,xe)[e])&&(yield[b(this,Ke)[e],b(this,xe)[e]])}*keys(){for(const e of de(this,re,Rr).call(this)){const n=b(this,Ke)[e];n!==void 0&&!de(this,re,Je).call(this,b(this,xe)[e])&&(yield n)}}*rkeys(){for(const e of de(this,re,Mr).call(this)){const n=b(this,Ke)[e];n!==void 0&&!de(this,re,Je).call(this,b(this,xe)[e])&&(yield n)}}*values(){for(const e of de(this,re,Rr).call(this))b(this,xe)[e]!==void 0&&!de(this,re,Je).call(this,b(this,xe)[e])&&(yield b(this,xe)[e])}*rvalues(){for(const e of de(this,re,Mr).call(this))b(this,xe)[e]!==void 0&&!de(this,re,Je).call(this,b(this,xe)[e])&&(yield b(this,xe)[e])}[(Dp=Symbol.iterator,Pp=Symbol.toStringTag,Dp)](){return this.entries()}find(e,n={}){for(const o of de(this,re,Rr).call(this)){const s=b(this,xe)[o],l=de(this,re,Je).call(this,s)?s.__staleWhileFetching:s;if(l!==void 0&&e(l,b(this,Ke)[o],this))return this.get(b(this,Ke)[o],n)}}forEach(e,n=this){for(const o of de(this,re,Rr).call(this)){const s=b(this,xe)[o],l=de(this,re,Je).call(this,s)?s.__staleWhileFetching:s;l!==void 0&&e.call(n,l,b(this,Ke)[o],this)}}rforEach(e,n=this){for(const o of de(this,re,Mr).call(this)){const s=b(this,xe)[o],l=de(this,re,Je).call(this,s)?s.__staleWhileFetching:s;l!==void 0&&e.call(n,l,b(this,Ke)[o],this)}}purgeStale(){let e=!1;for(const n of de(this,re,Mr).call(this,{allowStale:!0}))b(this,Zt).call(this,n)&&(de(this,re,Ir).call(this,b(this,Ke)[n],"expire"),e=!0);return e}info(e){const n=b(this,lt).get(e);if(n===void 0)return;const o=b(this,xe)[n],s=de(this,re,Je).call(this,o)?o.__staleWhileFetching:o;if(s===void 0)return;const l={value:s};if(b(this,Ut)&&b(this,vn)){const c=b(this,Ut)[n],u=b(this,vn)[n];if(c&&u){const p=c-(Eo.now()-u);l.ttl=p,l.start=Date.now()}}return b(this,_n)&&(l.size=b(this,_n)[n]),l}dump(){const e=[];for(const n of de(this,re,Rr).call(this,{allowStale:!0})){const o=b(this,Ke)[n],s=b(this,xe)[n],l=de(this,re,Je).call(this,s)?s.__staleWhileFetching:s;if(l===void 0||o===void 0)continue;const c={value:l};if(b(this,Ut)&&b(this,vn)){c.ttl=b(this,Ut)[n];const u=Eo.now()-b(this,vn)[n];c.start=Math.floor(Date.now()-u)}b(this,_n)&&(c.size=b(this,_n)[n]),e.unshift([o,c])}return e}load(e){this.clear();for(const[n,o]of e){if(o.start){const s=Date.now()-o.start;o.start=Eo.now()-s}this.set(n,o.value,o)}}set(e,n,o={}){var T,B,A,I,L;if(n===void 0)return this.delete(e),this;const{ttl:s=this.ttl,start:l,noDisposeOnSet:c=this.noDisposeOnSet,sizeCalculation:u=this.sizeCalculation,status:p}=o;let{noUpdateTTL:f=this.noUpdateTTL}=o;const m=b(this,Ii).call(this,e,n,o.size||0,u);if(this.maxEntrySize&&m>this.maxEntrySize)return p&&(p.set="miss",p.maxEntrySizeExceeded=!0),de(this,re,Ir).call(this,e,"set"),this;let y=b(this,dt)===0?void 0:b(this,lt).get(e);if(y===void 0)y=b(this,dt)===0?b(this,ft):b(this,yn).length!==0?b(this,yn).pop():b(this,dt)===b(this,hn)?de(this,re,Na).call(this,!1):b(this,dt),b(this,Ke)[y]=e,b(this,xe)[y]=n,b(this,lt).set(e,y),b(this,Bt)[b(this,ft)]=y,b(this,$t)[y]=b(this,ft),me(this,ft,y),Va(this,dt)._++,b(this,No).call(this,y,m,p),p&&(p.set="add"),f=!1;else{de(this,re,os).call(this,y);const C=b(this,xe)[y];if(n!==C){if(b(this,br)&&de(this,re,Je).call(this,C)){C.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:R}=C;R!==void 0&&!c&&(b(this,Cn)&&((T=b(this,fn))==null||T.call(this,R,e,"set")),b(this,Vt)&&((B=b(this,mt))==null||B.push([R,e,"set"])))}else c||(b(this,Cn)&&((A=b(this,fn))==null||A.call(this,C,e,"set")),b(this,Vt)&&((I=b(this,mt))==null||I.push([C,e,"set"])));if(b(this,Kr).call(this,y),b(this,No).call(this,y,m,p),b(this,xe)[y]=n,p){p.set="replace";const R=C&&de(this,re,Je).call(this,C)?C.__staleWhileFetching:C;R!==void 0&&(p.oldValue=R)}}else p&&(p.set="update")}if(s!==0&&!b(this,Ut)&&de(this,re,ld).call(this),b(this,Ut)&&(f||b(this,Mi).call(this,y,s,l),p&&b(this,Hn).call(this,p,y)),!c&&b(this,Vt)&&b(this,mt)){const C=b(this,mt);let R;for(;R=C==null?void 0:C.shift();)(L=b(this,mn))==null||L.call(this,...R)}return this}pop(){var e;try{for(;b(this,dt);){const n=b(this,xe)[b(this,xt)];if(de(this,re,Na).call(this,!0),de(this,re,Je).call(this,n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(b(this,Vt)&&b(this,mt)){const n=b(this,mt);let o;for(;o=n==null?void 0:n.shift();)(e=b(this,mn))==null||e.call(this,...o)}}}has(e,n={}){const{updateAgeOnHas:o=this.updateAgeOnHas,status:s}=n,l=b(this,lt).get(e);if(l!==void 0){const c=b(this,xe)[l];if(de(this,re,Je).call(this,c)&&c.__staleWhileFetching===void 0)return!1;if(b(this,Zt).call(this,l))s&&(s.has="stale",b(this,Hn).call(this,s,l));else return o&&b(this,qr).call(this,l),s&&(s.has="hit",b(this,Hn).call(this,s,l)),!0}else s&&(s.has="miss");return!1}peek(e,n={}){const{allowStale:o=this.allowStale}=n,s=b(this,lt).get(e);if(s===void 0||!o&&b(this,Zt).call(this,s))return;const l=b(this,xe)[s];return de(this,re,Je).call(this,l)?l.__staleWhileFetching:l}async fetch(e,n={}){const{allowStale:o=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,ttl:c=this.ttl,noDisposeOnSet:u=this.noDisposeOnSet,size:p=0,sizeCalculation:f=this.sizeCalculation,noUpdateTTL:m=this.noUpdateTTL,noDeleteOnFetchRejection:y=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:T=this.allowStaleOnFetchRejection,ignoreFetchAbort:B=this.ignoreFetchAbort,allowStaleOnFetchAbort:A=this.allowStaleOnFetchAbort,context:I,forceRefresh:L=!1,status:C,signal:R}=n;if(!b(this,br))return C&&(C.fetch="get"),this.get(e,{allowStale:o,updateAgeOnGet:s,noDeleteOnStaleGet:l,status:C});const O={allowStale:o,updateAgeOnGet:s,noDeleteOnStaleGet:l,ttl:c,noDisposeOnSet:u,size:p,sizeCalculation:f,noUpdateTTL:m,noDeleteOnFetchRejection:y,allowStaleOnFetchRejection:T,allowStaleOnFetchAbort:A,ignoreFetchAbort:B,status:C,signal:R};let F=b(this,lt).get(e);if(F===void 0){C&&(C.fetch="miss");const N=de(this,re,Aa).call(this,e,F,O,I);return N.__returned=N}else{const N=b(this,xe)[F];if(de(this,re,Je).call(this,N)){const q=o&&N.__staleWhileFetching!==void 0;return C&&(C.fetch="inflight",q&&(C.returnedStale=!0)),q?N.__staleWhileFetching:N.__returned=N}const U=b(this,Zt).call(this,F);if(!L&&!U)return C&&(C.fetch="hit"),de(this,re,os).call(this,F),s&&b(this,qr).call(this,F),C&&b(this,Hn).call(this,C,F),N;const te=de(this,re,Aa).call(this,e,F,O,I),Y=te.__staleWhileFetching!==void 0&&o;return C&&(C.fetch=U?"stale":"refresh",Y&&U&&(C.returnedStale=!0)),Y?te.__staleWhileFetching:te.__returned=te}}async forceFetch(e,n={}){const o=await this.fetch(e,n);if(o===void 0)throw new Error("fetch() returned undefined");return o}memo(e,n={}){const o=b(this,Vo);if(!o)throw new Error("no memoMethod provided to constructor");const{context:s,forceRefresh:l,...c}=n,u=this.get(e,c);if(!l&&u!==void 0)return u;const p=o(e,u,{options:c,context:s});return this.set(e,p,c),p}get(e,n={}){const{allowStale:o=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,status:c}=n,u=b(this,lt).get(e);if(u!==void 0){const p=b(this,xe)[u],f=de(this,re,Je).call(this,p);return c&&b(this,Hn).call(this,c,u),b(this,Zt).call(this,u)?(c&&(c.get="stale"),f?(c&&o&&p.__staleWhileFetching!==void 0&&(c.returnedStale=!0),o?p.__staleWhileFetching:void 0):(l||de(this,re,Ir).call(this,e,"expire"),c&&o&&(c.returnedStale=!0),o?p:void 0)):(c&&(c.get="hit"),f?p.__staleWhileFetching:(de(this,re,os).call(this,u),s&&b(this,qr).call(this,u),p))}else c&&(c.get="miss")}delete(e){return de(this,re,Ir).call(this,e,"delete")}clear(){return de(this,re,ud).call(this,"delete")}};hn=new WeakMap,zt=new WeakMap,fn=new WeakMap,mn=new WeakMap,Bo=new WeakMap,Vo=new WeakMap,dt=new WeakMap,gn=new WeakMap,lt=new WeakMap,Ke=new WeakMap,xe=new WeakMap,Bt=new WeakMap,$t=new WeakMap,xt=new WeakMap,ft=new WeakMap,yn=new WeakMap,mt=new WeakMap,_n=new WeakMap,vn=new WeakMap,Ut=new WeakMap,Cn=new WeakMap,br=new WeakMap,Vt=new WeakMap,re=new WeakSet,ld=function(){const e=new Is(b(this,hn)),n=new Is(b(this,hn));me(this,Ut,e),me(this,vn,n),me(this,Mi,(l,c,u=Eo.now())=>{if(n[l]=c!==0?u:0,e[l]=c,c!==0&&this.ttlAutopurge){const p=setTimeout(()=>{b(this,Zt).call(this,l)&&de(this,re,Ir).call(this,b(this,Ke)[l],"expire")},c+1);p.unref&&p.unref()}}),me(this,qr,l=>{n[l]=e[l]!==0?Eo.now():0}),me(this,Hn,(l,c)=>{if(e[c]){const u=e[c],p=n[c];if(!u||!p)return;l.ttl=u,l.start=p,l.now=o||s();const f=l.now-p;l.remainingTTL=u-f}});let o=0;const s=()=>{const l=Eo.now();if(this.ttlResolution>0){o=l;const c=setTimeout(()=>o=0,this.ttlResolution);c.unref&&c.unref()}return l};this.getRemainingTTL=l=>{const c=b(this,lt).get(l);if(c===void 0)return 0;const u=e[c],p=n[c];if(!u||!p)return 1/0;const f=(o||s())-p;return u-f},me(this,Zt,l=>{const c=n[l],u=e[l];return!!u&&!!c&&(o||s())-c>u})},qr=new WeakMap,Hn=new WeakMap,Mi=new WeakMap,Zt=new WeakMap,fm=function(){const e=new Is(b(this,hn));me(this,gn,0),me(this,_n,e),me(this,Kr,n=>{me(this,gn,b(this,gn)-e[n]),e[n]=0}),me(this,Ii,(n,o,s,l)=>{if(de(this,re,Je).call(this,o))return 0;if(!wr(s))if(l){if(typeof l!="function")throw new TypeError("sizeCalculation must be a function");if(s=l(o,n),!wr(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s}),me(this,No,(n,o,s)=>{if(e[n]=o,b(this,zt)){const l=b(this,zt)-e[n];for(;b(this,gn)>l;)de(this,re,Na).call(this,!0)}me(this,gn,b(this,gn)+e[n]),s&&(s.entrySize=o,s.totalCalculatedSize=b(this,gn))})},Kr=new WeakMap,No=new WeakMap,Ii=new WeakMap,Rr=function*({allowStale:e=this.allowStale}={}){if(b(this,dt))for(let n=b(this,ft);!(!de(this,re,cd).call(this,n)||((e||!b(this,Zt).call(this,n))&&(yield n),n===b(this,xt)));)n=b(this,$t)[n]},Mr=function*({allowStale:e=this.allowStale}={}){if(b(this,dt))for(let n=b(this,xt);!(!de(this,re,cd).call(this,n)||((e||!b(this,Zt).call(this,n))&&(yield n),n===b(this,ft)));)n=b(this,Bt)[n]},cd=function(e){return e!==void 0&&b(this,lt).get(b(this,Ke)[e])===e},Na=function(e){var l,c;const n=b(this,xt),o=b(this,Ke)[n],s=b(this,xe)[n];return b(this,br)&&de(this,re,Je).call(this,s)?s.__abortController.abort(new Error("evicted")):(b(this,Cn)||b(this,Vt))&&(b(this,Cn)&&((l=b(this,fn))==null||l.call(this,s,o,"evict")),b(this,Vt)&&((c=b(this,mt))==null||c.push([s,o,"evict"]))),b(this,Kr).call(this,n),e&&(b(this,Ke)[n]=void 0,b(this,xe)[n]=void 0,b(this,yn).push(n)),b(this,dt)===1?(me(this,xt,me(this,ft,0)),b(this,yn).length=0):me(this,xt,b(this,Bt)[n]),b(this,lt).delete(o),Va(this,dt)._--,n},Aa=function(e,n,o,s){const l=n===void 0?void 0:b(this,xe)[n];if(de(this,re,Je).call(this,l))return l;const c=new Ms,{signal:u}=o;u==null||u.addEventListener("abort",()=>c.abort(u.reason),{signal:c.signal});const p={signal:c.signal,options:o,context:s},f=(I,L=!1)=>{const{aborted:C}=c.signal,R=o.ignoreFetchAbort&&I!==void 0;if(o.status&&(C&&!L?(o.status.fetchAborted=!0,o.status.fetchError=c.signal.reason,R&&(o.status.fetchAbortIgnored=!0)):o.status.fetchResolved=!0),C&&!R&&!L)return y(c.signal.reason);const O=B;return b(this,xe)[n]===B&&(I===void 0?O.__staleWhileFetching?b(this,xe)[n]=O.__staleWhileFetching:de(this,re,Ir).call(this,e,"fetch"):(o.status&&(o.status.fetchUpdated=!0),this.set(e,I,p.options))),I},m=I=>(o.status&&(o.status.fetchRejected=!0,o.status.fetchError=I),y(I)),y=I=>{const{aborted:L}=c.signal,C=L&&o.allowStaleOnFetchAbort,R=C||o.allowStaleOnFetchRejection,O=R||o.noDeleteOnFetchRejection,F=B;if(b(this,xe)[n]===B&&(!O||F.__staleWhileFetching===void 0?de(this,re,Ir).call(this,e,"fetch"):C||(b(this,xe)[n]=F.__staleWhileFetching)),R)return o.status&&F.__staleWhileFetching!==void 0&&(o.status.returnedStale=!0),F.__staleWhileFetching;if(F.__returned===F)throw I},T=(I,L)=>{var R;const C=(R=b(this,Bo))==null?void 0:R.call(this,e,l,p);C&&C instanceof Promise&&C.then(O=>I(O===void 0?void 0:O),L),c.signal.addEventListener("abort",()=>{(!o.ignoreFetchAbort||o.allowStaleOnFetchAbort)&&(I(void 0),o.allowStaleOnFetchAbort&&(I=O=>f(O,!0)))})};o.status&&(o.status.fetchDispatched=!0);const B=new Promise(T).then(f,m),A=Object.assign(B,{__abortController:c,__staleWhileFetching:l,__returned:void 0});return n===void 0?(this.set(e,A,{...p.options,status:void 0}),n=b(this,lt).get(e)):b(this,xe)[n]=A,A},Je=function(e){if(!b(this,br))return!1;const n=e;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof Ms},dd=function(e,n){b(this,$t)[n]=e,b(this,Bt)[e]=n},os=function(e){e!==b(this,ft)&&(e===b(this,xt)?me(this,xt,b(this,Bt)[e]):de(this,re,dd).call(this,b(this,$t)[e],b(this,Bt)[e]),de(this,re,dd).call(this,b(this,ft),e),me(this,ft,e))},Ir=function(e,n){var s,l,c,u;let o=!1;if(b(this,dt)!==0){const p=b(this,lt).get(e);if(p!==void 0)if(o=!0,b(this,dt)===1)de(this,re,ud).call(this,n);else{b(this,Kr).call(this,p);const f=b(this,xe)[p];if(de(this,re,Je).call(this,f)?f.__abortController.abort(new Error("deleted")):(b(this,Cn)||b(this,Vt))&&(b(this,Cn)&&((s=b(this,fn))==null||s.call(this,f,e,n)),b(this,Vt)&&((l=b(this,mt))==null||l.push([f,e,n]))),b(this,lt).delete(e),b(this,Ke)[p]=void 0,b(this,xe)[p]=void 0,p===b(this,ft))me(this,ft,b(this,$t)[p]);else if(p===b(this,xt))me(this,xt,b(this,Bt)[p]);else{const m=b(this,$t)[p];b(this,Bt)[m]=b(this,Bt)[p];const y=b(this,Bt)[p];b(this,$t)[y]=b(this,$t)[p]}Va(this,dt)._--,b(this,yn).push(p)}}if(b(this,Vt)&&((c=b(this,mt))!=null&&c.length)){const p=b(this,mt);let f;for(;f=p==null?void 0:p.shift();)(u=b(this,mn))==null||u.call(this,...f)}return o},ud=function(e){var n,o,s;for(const l of de(this,re,Mr).call(this,{allowStale:!0})){const c=b(this,xe)[l];if(de(this,re,Je).call(this,c))c.__abortController.abort(new Error("deleted"));else{const u=b(this,Ke)[l];b(this,Cn)&&((n=b(this,fn))==null||n.call(this,c,u,e)),b(this,Vt)&&((o=b(this,mt))==null||o.push([c,u,e]))}}if(b(this,lt).clear(),b(this,xe).fill(void 0),b(this,Ke).fill(void 0),b(this,Ut)&&b(this,vn)&&(b(this,Ut).fill(0),b(this,vn).fill(0)),b(this,_n)&&b(this,_n).fill(0),me(this,xt,0),me(this,ft,0),b(this,yn).length=0,me(this,gn,0),me(this,dt,0),b(this,Vt)&&b(this,mt)){const l=b(this,mt);let c;for(;c=l==null?void 0:l.shift();)(s=b(this,mn))==null||s.call(this,...c)}};let Il=Ll;const yB={cacheSize:15e6};class _B{constructor(e){Ze(this,"_str");Ze(this,"_rawJson");Ze(this,"_zodSchema");Ze(this,"_validatedJson");this.bytes=e}get str(){return this._str===void 0&&(this._str=new TextDecoder().decode(this.bytes)),this._str}get rawJson(){return this._rawJson===void 0&&(this._rawJson=JSON.parse(this.str)),this._rawJson}validatedJson(e){return this._zodSchema!==e&&(this._validatedJson=e.parse(this.rawJson),this._zodSchema=e),this._validatedJson}}const Yr=class Yr{constructor(e){Ze(this,"fileDataCache");Ze(this,"fileDataRefs",new Map);const n={...yB,...e??{}};this.fileDataCache=new Il({maxSize:n.cacheSize,fetchMethod:async o=>new _B(await $g().blobDriver.getContent(o)),sizeCalculation:o=>o.bytes.length,dispose:(o,s)=>{this.fileDataRefs.delete(s)}})}getDataRef(e){const n=this.fileDataRefs.get(e);if(n!==void 0)return n;const o=r.shallowRef();return this.fileDataRefs.set(e,o),(async()=>{try{const s=await this.fileDataCache.fetch(e);o.value=s}catch(s){console.error(s)}})(),o}getContentBytes(e){if(e===void 0)return;const n=this.getDataRef(e);return r.computed(()=>{var o;return(o=n.value)==null?void 0:o.bytes})}getContentString(e){if(e===void 0)return;const n=this.getDataRef(e);return r.computed(()=>{var o;return(o=n==null?void 0:n.value)==null?void 0:o.str})}getContentJson(e,n){if(e===void 0)return;const o=this.getDataRef(e);return r.computed(()=>{var s,l;return n===void 0?(s=o==null?void 0:o.value)==null?void 0:s.rawJson:(l=o==null?void 0:o.value)==null?void 0:l.validatedJson(n)})}static getContentBytes(e){return Yr.globalInstance.getContentBytes(e)}static getContentString(e){return Yr.globalInstance.getContentString(e)}static getContentJson(e,n){return Yr.globalInstance.getContentJson(e,n)}};Ze(Yr,"globalInstance",new Yr);let Ol=Yr;M.AgGridTheme=iu,M.BlockLayout=PT,M.ContextProvider=yS,M.DataTable=iC,M.DemoData=yT,M.DropdownListItem=yo,M.LongText=kl,M.MultiError=Fa,M.PlAccordion=xx,M.PlAccordionSection=Px,M.PlAgCellFile=cB,M.PlAgDataTable=tB,M.PlAgDataTableToolsPanel=XT,M.PlAgGridColumnManager=Sp,M.PlAgOverlayLoading=yp,M.PlAgOverlayNoRows=_p,M.PlAgTextAndButtonCell=pB,M.PlAlert=MC,M.PlBlockPage=bC,M.PlBtnAccent=e0,M.PlBtnDanger=n0,M.PlBtnGhost=Cs,M.PlBtnGroup=Nu,M.PlBtnLink=s0,M.PlBtnPrimary=gl,M.PlBtnSecondary=yl,M.PlBtnSplit=KC,M.PlCheckbox=zu,M.PlCheckboxGroup=Mb,M.PlChip=Sl,M.PlContainer=kC,M.PlDialogModal=Tl,M.PlDropdown=yi,M.PlDropdownLegacy=ob,M.PlDropdownLine=Gu,M.PlDropdownMulti=Ab,M.PlDropdownRef=Dw,M.PlEditableTitle=N0,M.PlFileDialog=Ku,M.PlFileInput=up,M.PlGrid=NC,M.PlIcon16=vo,M.PlIcon24=bs,M.PlLogView=Zu,M.PlMaskIcon16=Un,M.PlMaskIcon24=cn,M.PlNotificationAlert=pp,M.PlNumberField=gb,M.PlProgressBar=cb,M.PlRow=EC,M.PlSearchField=Mu,M.PlSectionSeparator=Wu,M.PlSlideModal=$u,M.PlSpacer=Bu,M.PlTableFilters=oB,M.PlTabs=yx,M.PlTextArea=hw,M.PlTextField=Ur,M.PlToggleSwitch=xs,M.PlTooltip=Ct,M.ReactiveFileContent=Ol,M.Scrollable=s1,M.Slider=hp,M.SliderRange=n1,M.SliderRangeTriple=ZS,M.ThemeSwitcher=mC,M.UnresolvedError=Da,M.ValueOrErrorsComponent=aB,M.activateAgGrid=ou,M.animate=bu,M.animateInfinite=dC,M.call=yu,M.computedResult=mB,M.createModel=Ga,M.debounce=xu,M.defineApp=F_,M.defineStore=fB,M.delay=_u,M.detectOutside=fw,M.ensureError=Ia,M.eventListener=bl,M.formatZodError=La,M.getElementScrollPosition=Ou,M.identity=Ma,M.isDefined=Am,M.isElementVisible=Iu,M.isJsonEqual=Ra,M.isZodError=Oa,M.listToOptions=uC,M.makeEaseInOut=cC,M.makeEaseOut=wu,M.maskIcons16=mT,M.maskIcons24=gT,M.normalizeListOptions=pr,M.notEmpty=ul,M.randomInt=Cu,M.randomString=lC,M.requestTick=pl,M.scrollIntoView=gi,M.showContextMenu=ll,M.throttle=ku,M.timeout=vu,M.unwrapOptionalResult=Nm,M.unwrapValueOrErrors=vd,M.useClickOutside=ws,M.useDraggable=DS,M.useEventListener=rt,M.useFormState=AS,M.useHover=mu,M.useInterval=NS,M.useLabelNotch=Zn,M.useLocalStorage=Su,M.useMouse=fu,M.useMouseCapture=ur,M.usePosition=_o,M.useQuery=PS,M.useResizeObserver=fp,M.useScroll=BS,M.useSdkPlugin=rl,M.useSortable=gp,M.useTheme=Tu,M.useWatchFetch=Ep,M.wrapOptionalResult=Cd,M.wrapValueOrErrors=Vm,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})});
|
|
90
|
+
`)+Q+`return __p
|
|
91
|
+
}`;var De=vg(function(){return je(_,pe+"return "+Q).apply(n,N)});if(De.source=Q,Nd(De))throw De;return De}function LL(s){return He(s).toLowerCase()}function ML(s){return He(s).toUpperCase()}function GL(s,a,u){if(s=He(s),s&&(u||a===n))return Tf(s);if(!s||!(a=Jt(a)))return s;var f=Vn(s),g=Vn(a),_=Nf(f,g),N=Af(f,g)+1;return Ir(f,_,N).join("")}function $L(s,a,u){if(s=He(s),s&&(u||a===n))return s.slice(0,Bf(s)+1);if(!s||!(a=Jt(a)))return s;var f=Vn(s),g=Af(f,Vn(a))+1;return Ir(f,0,g).join("")}function zL(s,a,u){if(s=He(s),s&&(u||a===n))return s.replace(Nc,"");if(!s||!(a=Jt(a)))return s;var f=Vn(s),g=Nf(f,Vn(a));return Ir(f,g).join("")}function UL(s,a){var u=W,f=J;if(ot(a)){var g="separator"in a?a.separator:g;u="length"in a?Be(a.length):u,f="omission"in a?Jt(a.omission):f}s=He(s);var _=s.length;if(Lo(s)){var N=Vn(s);_=N.length}if(u>=_)return s;var V=u-Mo(f);if(V<1)return f;var I=N?Ir(N,0,V).join(""):s.slice(0,V);if(g===n)return I+f;if(N&&(V+=I.length-V),Ad(g)){if(s.slice(V).search(g)){var X,Y=I;for(g.global||(g=jc(g.source,He(qh.exec(g))+"g")),g.lastIndex=0;X=g.exec(Y);)var Q=X.index;I=I.slice(0,Q===n?V:Q)}}else if(s.indexOf(Jt(g),V)!=V){var oe=I.lastIndexOf(g);oe>-1&&(I=I.slice(0,oe))}return I+f}function ZL(s){return s=He(s),s&&tP.test(s)?s.replace(jh,_R):s}var jL=Wo(function(s,a,u){return s+(u?" ":"")+a.toUpperCase()}),Pd=_m("toUpperCase");function yg(s,a,u){return s=He(s),a=u?n:a,a===n?fR(s)?bR(s):iR(s):s.match(a)||[]}var vg=Ie(function(s,a){try{return Xt(s,n,a)}catch(u){return Nd(u)?u:new Te(u)}}),WL=or(function(s,a){return rn(a,function(u){u=Wn(u),nr(s,u,Ed(s[u],s))}),s});function HL(s){var a=s==null?0:s.length,u=ge();return s=a?tt(s,function(f){if(typeof f[1]!="function")throw new on(c);return[u(f[0]),f[1]]}):[],Ie(function(f){for(var g=-1;++g<a;){var _=s[g];if(Xt(_[0],this,f))return Xt(_[1],this,f)}})}function qL(s){return _D(an(s,y))}function Rd(s){return function(){return s}}function KL(s,a){return s==null||s!==s?a:s}var XL=wm(),YL=wm(!0);function zt(s){return s}function Dd(s){return Yf(typeof s=="function"?s:an(s,y))}function JL(s){return Qf(an(s,y))}function QL(s,a){return em(s,an(a,y))}var eM=Ie(function(s,a){return function(u){return is(u,s,a)}}),tM=Ie(function(s,a){return function(u){return is(s,u,a)}});function Id(s,a,u){var f=_t(a),g=Sa(a,f);u==null&&!(ot(a)&&(g.length||!f.length))&&(u=a,a=s,s=this,g=Sa(a,_t(a)));var _=!(ot(u)&&"chain"in u)||!!u.chain,N=sr(s);return rn(g,function(V){var I=a[V];s[V]=I,N&&(s.prototype[V]=function(){var X=this.__chain__;if(_||X){var Y=s(this.__wrapped__),Q=Y.__actions__=Mt(this.__actions__);return Q.push({func:I,args:arguments,thisArg:s}),Y.__chain__=X,Y}return I.apply(s,Ar([this.value()],arguments))})}),s}function nM(){return Ct._===this&&(Ct._=NR),this}function Fd(){}function rM(s){return s=Be(s),Ie(function(a){return tm(a,s)})}var oM=hd(tt),iM=hd(bf),sM=hd(Lc);function _g(s){return Cd(s)?Mc(Wn(s)):FD(s)}function aM(s){return function(a){return s==null?n:oo(s,a)}}var lM=xm(),cM=xm(!0);function Od(){return[]}function Ld(){return!1}function dM(){return{}}function uM(){return""}function pM(){return!0}function hM(s,a){if(s=Be(s),s<1||s>K)return[];var u=ke,f=Tt(s,ke);a=ge(a),s-=ke;for(var g=zc(f,a);++u<s;)a(u);return g}function fM(s){return Ne(s)?tt(s,Wn):Qt(s)?[s]:Mt(Mm(He(s)))}function mM(s){var a=++ER;return He(s)+a}var gM=Ba(function(s,a){return s+a},0),yM=fd("ceil"),vM=Ba(function(s,a){return s/a},1),_M=fd("floor");function CM(s){return s&&s.length?ka(s,zt,Qc):n}function wM(s,a){return s&&s.length?ka(s,ge(a,2),Qc):n}function bM(s){return Sf(s,zt)}function xM(s,a){return Sf(s,ge(a,2))}function kM(s){return s&&s.length?ka(s,zt,rd):n}function SM(s,a){return s&&s.length?ka(s,ge(a,2),rd):n}var EM=Ba(function(s,a){return s*a},1),TM=fd("round"),NM=Ba(function(s,a){return s-a},0);function AM(s){return s&&s.length?$c(s,zt):0}function VM(s,a){return s&&s.length?$c(s,ge(a,2)):0}return v.after=JF,v.ary=Xm,v.assign=MO,v.assignIn=dg,v.assignInWith=Za,v.assignWith=GO,v.at=$O,v.before=Ym,v.bind=Ed,v.bindAll=WL,v.bindKey=Jm,v.castArray=dO,v.chain=Hm,v.chunk=_I,v.compact=CI,v.concat=wI,v.cond=HL,v.conforms=qL,v.constant=Rd,v.countBy=AF,v.create=zO,v.curry=Qm,v.curryRight=eg,v.debounce=tg,v.defaults=UO,v.defaultsDeep=ZO,v.defer=QF,v.delay=eO,v.difference=bI,v.differenceBy=xI,v.differenceWith=kI,v.drop=SI,v.dropRight=EI,v.dropRightWhile=TI,v.dropWhile=NI,v.fill=AI,v.filter=BF,v.flatMap=DF,v.flatMapDeep=IF,v.flatMapDepth=FF,v.flatten=Um,v.flattenDeep=VI,v.flattenDepth=BI,v.flip=tO,v.flow=XL,v.flowRight=YL,v.fromPairs=PI,v.functions=YO,v.functionsIn=JO,v.groupBy=OF,v.initial=DI,v.intersection=II,v.intersectionBy=FI,v.intersectionWith=OI,v.invert=eL,v.invertBy=tL,v.invokeMap=MF,v.iteratee=Dd,v.keyBy=GF,v.keys=_t,v.keysIn=$t,v.map=La,v.mapKeys=rL,v.mapValues=oL,v.matches=JL,v.matchesProperty=QL,v.memoize=Ga,v.merge=iL,v.mergeWith=ug,v.method=eM,v.methodOf=tM,v.mixin=Id,v.negate=$a,v.nthArg=rM,v.omit=sL,v.omitBy=aL,v.once=nO,v.orderBy=$F,v.over=oM,v.overArgs=rO,v.overEvery=iM,v.overSome=sM,v.partial=Td,v.partialRight=ng,v.partition=zF,v.pick=lL,v.pickBy=pg,v.property=_g,v.propertyOf=aM,v.pull=$I,v.pullAll=jm,v.pullAllBy=zI,v.pullAllWith=UI,v.pullAt=ZI,v.range=lM,v.rangeRight=cM,v.rearg=oO,v.reject=jF,v.remove=jI,v.rest=iO,v.reverse=kd,v.sampleSize=HF,v.set=dL,v.setWith=uL,v.shuffle=qF,v.slice=WI,v.sortBy=YF,v.sortedUniq=QI,v.sortedUniqBy=eF,v.split=DL,v.spread=sO,v.tail=tF,v.take=nF,v.takeRight=rF,v.takeRightWhile=oF,v.takeWhile=iF,v.tap=CF,v.throttle=aO,v.thru=Oa,v.toArray=ag,v.toPairs=hg,v.toPairsIn=fg,v.toPath=fM,v.toPlainObject=cg,v.transform=pL,v.unary=lO,v.union=sF,v.unionBy=aF,v.unionWith=lF,v.uniq=cF,v.uniqBy=dF,v.uniqWith=uF,v.unset=hL,v.unzip=Sd,v.unzipWith=Wm,v.update=fL,v.updateWith=mL,v.values=Ko,v.valuesIn=gL,v.without=pF,v.words=yg,v.wrap=cO,v.xor=hF,v.xorBy=fF,v.xorWith=mF,v.zip=gF,v.zipObject=yF,v.zipObjectDeep=vF,v.zipWith=_F,v.entries=hg,v.entriesIn=fg,v.extend=dg,v.extendWith=Za,Id(v,v),v.add=gM,v.attempt=vg,v.camelCase=CL,v.capitalize=mg,v.ceil=yM,v.clamp=yL,v.clone=uO,v.cloneDeep=hO,v.cloneDeepWith=fO,v.cloneWith=pO,v.conformsTo=mO,v.deburr=gg,v.defaultTo=KL,v.divide=vM,v.endsWith=wL,v.eq=Pn,v.escape=bL,v.escapeRegExp=xL,v.every=VF,v.find=PF,v.findIndex=$m,v.findKey=jO,v.findLast=RF,v.findLastIndex=zm,v.findLastKey=WO,v.floor=_M,v.forEach=qm,v.forEachRight=Km,v.forIn=HO,v.forInRight=qO,v.forOwn=KO,v.forOwnRight=XO,v.get=Vd,v.gt=gO,v.gte=yO,v.has=QO,v.hasIn=Bd,v.head=Zm,v.identity=zt,v.includes=LF,v.indexOf=RI,v.inRange=vL,v.invoke=nL,v.isArguments=ao,v.isArray=Ne,v.isArrayBuffer=vO,v.isArrayLike=Gt,v.isArrayLikeObject=at,v.isBoolean=_O,v.isBuffer=Fr,v.isDate=CO,v.isElement=wO,v.isEmpty=bO,v.isEqual=xO,v.isEqualWith=kO,v.isError=Nd,v.isFinite=SO,v.isFunction=sr,v.isInteger=rg,v.isLength=za,v.isMap=og,v.isMatch=EO,v.isMatchWith=TO,v.isNaN=NO,v.isNative=AO,v.isNil=BO,v.isNull=VO,v.isNumber=ig,v.isObject=ot,v.isObjectLike=it,v.isPlainObject=us,v.isRegExp=Ad,v.isSafeInteger=PO,v.isSet=sg,v.isString=Ua,v.isSymbol=Qt,v.isTypedArray=qo,v.isUndefined=RO,v.isWeakMap=DO,v.isWeakSet=IO,v.join=LI,v.kebabCase=kL,v.last=cn,v.lastIndexOf=MI,v.lowerCase=SL,v.lowerFirst=EL,v.lt=FO,v.lte=OO,v.max=CM,v.maxBy=wM,v.mean=bM,v.meanBy=xM,v.min=kM,v.minBy=SM,v.stubArray=Od,v.stubFalse=Ld,v.stubObject=dM,v.stubString=uM,v.stubTrue=pM,v.multiply=EM,v.nth=GI,v.noConflict=nM,v.noop=Fd,v.now=Ma,v.pad=TL,v.padEnd=NL,v.padStart=AL,v.parseInt=VL,v.random=_L,v.reduce=UF,v.reduceRight=ZF,v.repeat=BL,v.replace=PL,v.result=cL,v.round=TM,v.runInContext=P,v.sample=WF,v.size=KF,v.snakeCase=RL,v.some=XF,v.sortedIndex=HI,v.sortedIndexBy=qI,v.sortedIndexOf=KI,v.sortedLastIndex=XI,v.sortedLastIndexBy=YI,v.sortedLastIndexOf=JI,v.startCase=IL,v.startsWith=FL,v.subtract=NM,v.sum=AM,v.sumBy=VM,v.template=OL,v.times=hM,v.toFinite=ar,v.toInteger=Be,v.toLength=lg,v.toLower=LL,v.toNumber=dn,v.toSafeInteger=LO,v.toString=He,v.toUpper=ML,v.trim=GL,v.trimEnd=$L,v.trimStart=zL,v.truncate=UL,v.unescape=ZL,v.uniqueId=mM,v.upperCase=jL,v.upperFirst=Pd,v.each=qm,v.eachRight=Km,v.first=Zm,Id(v,function(){var s={};return Zn(v,function(a,u){qe.call(v.prototype,u)||(s[u]=a)}),s}(),{chain:!1}),v.VERSION=o,rn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(s){v[s].placeholder=v}),rn(["drop","take"],function(s,a){Oe.prototype[s]=function(u){u=u===n?1:mt(Be(u),0);var f=this.__filtered__&&!a?new Oe(this):this.clone();return f.__filtered__?f.__takeCount__=Tt(u,f.__takeCount__):f.__views__.push({size:Tt(u,ke),type:s+(f.__dir__<0?"Right":"")}),f},Oe.prototype[s+"Right"]=function(u){return this.reverse()[s](u).reverse()}}),rn(["filter","map","takeWhile"],function(s,a){var u=a+1,f=u==C||u==M;Oe.prototype[s]=function(g){var _=this.clone();return _.__iteratees__.push({iteratee:ge(g,3),type:u}),_.__filtered__=_.__filtered__||f,_}}),rn(["head","last"],function(s,a){var u="take"+(a?"Right":"");Oe.prototype[s]=function(){return this[u](1).value()[0]}}),rn(["initial","tail"],function(s,a){var u="drop"+(a?"":"Right");Oe.prototype[s]=function(){return this.__filtered__?new Oe(this):this[u](1)}}),Oe.prototype.compact=function(){return this.filter(zt)},Oe.prototype.find=function(s){return this.filter(s).head()},Oe.prototype.findLast=function(s){return this.reverse().find(s)},Oe.prototype.invokeMap=Ie(function(s,a){return typeof s=="function"?new Oe(this):this.map(function(u){return is(u,s,a)})}),Oe.prototype.reject=function(s){return this.filter($a(ge(s)))},Oe.prototype.slice=function(s,a){s=Be(s);var u=this;return u.__filtered__&&(s>0||a<0)?new Oe(u):(s<0?u=u.takeRight(-s):s&&(u=u.drop(s)),a!==n&&(a=Be(a),u=a<0?u.dropRight(-a):u.take(a-s)),u)},Oe.prototype.takeRightWhile=function(s){return this.reverse().takeWhile(s).reverse()},Oe.prototype.toArray=function(){return this.take(ke)},Zn(Oe.prototype,function(s,a){var u=/^(?:filter|find|map|reject)|While$/.test(a),f=/^(?:head|last)$/.test(a),g=v[f?"take"+(a=="last"?"Right":""):a],_=f||/^find/.test(a);g&&(v.prototype[a]=function(){var N=this.__wrapped__,V=f?[1]:arguments,I=N instanceof Oe,X=V[0],Y=I||Ne(N),Q=function(Fe){var Le=g.apply(v,Ar([Fe],V));return f&&oe?Le[0]:Le};Y&&u&&typeof X=="function"&&X.length!=1&&(I=Y=!1);var oe=this.__chain__,pe=!!this.__actions__.length,ve=_&&!oe,De=I&&!pe;if(!_&&Y){N=De?N:new Oe(this);var _e=s.apply(N,V);return _e.__actions__.push({func:Oa,args:[Q],thisArg:n}),new sn(_e,oe)}return ve&&De?s.apply(this,V):(_e=this.thru(Q),ve?f?_e.value()[0]:_e.value():_e)})}),rn(["pop","push","shift","sort","splice","unshift"],function(s){var a=ca[s],u=/^(?:push|sort|unshift)$/.test(s)?"tap":"thru",f=/^(?:pop|shift)$/.test(s);v.prototype[s]=function(){var g=arguments;if(f&&!this.__chain__){var _=this.value();return a.apply(Ne(_)?_:[],g)}return this[u](function(N){return a.apply(Ne(N)?N:[],g)})}}),Zn(Oe.prototype,function(s,a){var u=v[a];if(u){var f=u.name+"";qe.call(Uo,f)||(Uo[f]=[]),Uo[f].push({name:a,func:u})}}),Uo[Va(n,b).name]=[{name:"wrapper",func:n}],Oe.prototype.clone=ZR,Oe.prototype.reverse=jR,Oe.prototype.value=WR,v.prototype.at=wF,v.prototype.chain=bF,v.prototype.commit=xF,v.prototype.next=kF,v.prototype.plant=EF,v.prototype.reverse=TF,v.prototype.toJSON=v.prototype.valueOf=v.prototype.value=NF,v.prototype.first=v.prototype.head,Ji&&(v.prototype[Ji]=SF),v},Go=xR();Qr?((Qr.exports=Go)._=Go,Dc._=Go):Ct._=Go}).call(Xo)}($s,$s.exports);var ze=$s.exports;const $N={class:"grid-overlay-container"},Kp=r.defineComponent({__name:"PlAgOverlayLoading",props:{params:{}},setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",$N,[e.params.notReady?(r.openBlock(),r.createElementBlock(r.Fragment,{key:0},[n[0]||(n[0]=r.createElementVNode("div",{class:"grid-icon-cat-in-bag"},null,-1)),n[1]||(n[1]=r.createElementVNode("span",{class:"text-subtitle-m"},"Not calculated",-1))],64)):(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[n[2]||(n[2]=r.createElementVNode("div",{class:"mask-24 mask-loading grid-mask-loading"},null,-1)),n[3]||(n[3]=r.createElementVNode("span",{class:"text-subtitle-m"},"Loading",-1))],64))]))}}),zN={},UN={class:"grid-overlay-container"};function ZN(t,e){return r.openBlock(),r.createElementBlock("div",UN,e[0]||(e[0]=[r.createElementVNode("div",{class:"grid-icon-sad-cat"},null,-1),r.createElementVNode("span",{class:"text-subtitle-m"},"Empty",-1)]))}const Xp=Xl(zN,[["render",ZN]]);async function jN(t,e){throw Error("not implemented")}function WN(t){return t.axesSpec.filter(e=>{var n;return((n=e.annotations)==null?void 0:n["pl7.app/axisNature"])==="heterogeneous"})}function HN(t,e){const n=[];for(const o of e)if(t[o].type==="column"){const i=WN(t[o].spec);for(const l of i){if(l.type!=="String"){console.warn("heterogeneous axis with string type expected, got",l,"skipping");continue}const c=cl(l),d=t.findIndex(p=>ze.isEqual(p.id,c));if(d===-1)throw console.error("axis not found",o,c,t),Error("axis not found");n.push({columnIdx:o,axisIdx:d})}}return n}const Yp=(t,e)=>(t+e).toString();function qN(t,e,n,o,i,l){if(t.length>1)throw Error("hColumns.length > 1 is not supported");const c=t[0];let d=-1,p=-1;for(let y=0;y<l.length;++y)l[y]===c.axisIdx&&(d=y),l[y]===c.columnIdx&&(p=y);const h=(()=>{const x=o[d].data.filter(w=>w!==null);return Array.from(new Set(x))})();h.sort(),p>d?(n.splice(p,1),n.splice(d,1)):(n.splice(d,1),n.splice(p,1));const m=KN(i,o,d,p,h,e.rows);for(let y=0;y<h.length;++y){const x=h[y],w=Gr(x+"@"+y);n.push({colId:w,field:Yp(o.length,y),headerName:x,valueFormatter:Qp})}return{rowModelType:"clientSide",columnDefs:n,rowData:m}}function KN(t,e,n,o,i,l){const c=new Map;let d=0;for(let h=0;h<l;h++){const m={};for(let O=0;O<e.length;++O){if(O===n||O===o)continue;const G=t[O].toString();m[G]=e[O].data[h]}let y;const x=Gr(Object.values(m))??"";c.has(x)?y=c.get(x):(c.set(x,m),y=m,y.id=d.toString(),d++);const w=i.indexOf(e[n].data[h]);if(w===-1)throw Error("index not found");const S=Yp(e.length,w);y[S]=e[o].data[h]}return Array.from(c.values())}function XN(t){return Gr(t)}function Jp(t){return JSON.parse(t)}const Qp=t=>t?t.value===void 0?"NULL":t.value===null?"NA":t.value.toString():"ERROR";function YN(t,e,n){var i,l,c;const o=XN(e);return{colId:o,field:t.toString(),headerName:((l=(i=e.spec.annotations)==null?void 0:i["pl7.app/label"])==null?void 0:l.trim())??"Unlabeled "+e.type+" "+t.toString(),lockPosition:e.type==="axis",hide:(n==null?void 0:n.includes(o))??((c=e.spec.annotations)==null?void 0:c["pl7.app/table/visibility"])==="optional",valueFormatter:Qp,cellDataType:(d=>{switch(d){case"Int":case"Long":case"Float":case"Double":return"number";case"String":case"Bytes":return"text";default:throw Error(`unsupported data type: ${d}`)}})(e.type==="axis"?e.spec.type:e.spec.valueType)}}function eh(t,e){switch(e){case"Int":return t;case"Long":return typeof t=="bigint"?Number(t):t;case"Float":return t;case"Double":return t;case"String":return t;case"Bytes":return Buffer.from(t).toString("hex");default:throw Error(`unsupported data type: ${e}`)}}function th(t){const e=[];return bs(t,n=>(e.push(n),n)),e}async function JN(t,e,n){return n.length?(await t.findColumns(e,{columnFilter:{name:["pl7.app/label"]},compatibleWith:ze.uniqWith(n.map(i=>fu(i.spec.axesSpec).map(ze.cloneDeep)).flat(),ze.isEqual),strictlyCompatible:!0})).hits.filter(i=>i.spec.axesSpec.length===1):[]}async function QN(t,e,n){const o=th(n),l=(await JN(t,e,o)).filter(c=>!ze.find(o,d=>c.columnId===d.columnId));return l.length===0?n:{type:"outer",primary:n,secondary:l.map(c=>({type:"column",column:c}))}}async function eA(t,e,n,o){const i=n.filter(m=>m.type!=="Bytes"),l=th(o),c=i.map(m=>[]),d=i.map(m=>null);for(let m=0;m<l.length;++m){const y=fu(l[m].spec.axesSpec);for(let x=0;x<y.length;++x){const w=ze.findIndex(i,S=>ze.isEqual(S,y[x]));w===-1||d[w]||(y.length===1&&l[m].spec.name==="pl7.app/label"?(c[w]=[[m,x]],d[w]=l[m].columnId):c[w].push([m,x]))}}for(let m=i.length-1;m>=0;--m)c[m].length||(d.splice(m,1),c.splice(m,1),i.splice(m,1));const p=100,h=i.map(m=>new Set);e:for(let m=i.length-1;m>=0;--m){for(const[y,x]of c[m]){const w=await t.getUniqueValues(e,{columnId:l[y].columnId,...!d[m]&&{axis:ze.cloneDeep(i[m])},filters:[],limit:p});if(w.overflow){d.splice(m,1),c.splice(m,1),i.splice(m,1);continue e}const S=w.values.type;for(const O of w.values.data)if(!(hu(O,S)||O===null)&&(h[m].add(eh(O,S)),h[m].size===p)){d.splice(m,1),c.splice(m,1),i.splice(m,1);continue e}}if(!h[m].size){d.splice(m,1),c.splice(m,1),i.splice(m,1);continue e}}return i.map((m,y)=>{const x=[...h[y]].map(S=>({value:S,label:S.toString()})),w=x[0].value;return{axis:ze.cloneDeep(m),...d[y]&&{column:d[y]},options:x,defaultValue:w}})}function tA(t,e,n,o){const i=t.length,l=[];for(let c=0;c<e[0].data.length;++c){const d=[],p=(o++).toString();for(const m of n)d.push(e[m].data[c]);const h={key:d,id:p};for(let m=0;m<i;++m){const y=t[m].toString(),x=e[m].data[c],w=e[m].type;Wy(e[m].absent,c)?h[y]=void 0:hu(x,w)||x===null?h[y]=null:h[y]=eh(x,w)}l.push(h)}return l}const nA=t=>t.type==="column"&&t.spec.axesSpec.length===1&&t.spec.name==="pl7.app/label";async function rA(t,e,n,o){const i=await t.getSpec(e);let l=i.findIndex(b=>b.type==="column");l===-1&&(l=i.length);const c=[...i.keys()].filter(b=>!ze.find(n,R=>ze.isEqual(R.axis,i[b].id)||ze.isEqual(R.column,i[b].id))).sort((b,R)=>{var A,U;if(i[b].type!==i[R].type)return i[b].type==="axis"?-1:1;const F=(A=i[b].spec.annotations)==null?void 0:A["pl7.app/table/orderPriority"],D=(U=i[R].spec.annotations)==null?void 0:U["pl7.app/table/orderPriority"];return F===void 0?D===void 0?0:1:D===void 0?-1:Number(D)-Number(F)}),d=ze.cloneDeep(c),p=HN(i,c);for(let b=c.length-1;b>=0;--b){const R=c[b];if(!nA(i[R]))continue;const F=cl(i[R].spec.axesSpec[0]),D=ze.findIndex(c,A=>ze.isEqual(i[A].id,F));if(D===-1&&ze.findIndex(n,U=>ze.isEqual(U.axis,F))===-1){console.warn(`added label column, but the axis is not in the data; axisId: ${F}`);continue}c[D]=R;for(const A of p)A.axisIdx===R&&(A.axisIdx=D);c.splice(b,1),d.splice(b,1)}const h=await t.getShape(e),m=h.rows,y=d.map(b=>YN(b,i[b],o));if(p.length>1&&console.warn("Currently, only one heterogeneous axis is supported in the table, got",p.length," transposition will not be applied."),p.length===1)return qN(p,h,y,await t.getData(e,c),d,c);const x=[...c],w=new Map;for(let b=0;b<l;++b)w.set(b,-1);for(let b=0;b<x.length;++b){const R=x[b];w.has(R)&&w.set(R,b)}for(const[b,R]of w)R===-1&&(w.set(b,x.length),x.push(b));const S=[];for(let b=0;b<l;++b){const R=w.get(b);if(R===void 0||R===-1)throw new Error("assertion exception");S.push(R)}let O;return{rowModelType:"serverSide",columnDefs:y,serverSideDatasource:{getRows:async b=>{try{if(m==0){b.success({rowData:[],rowCount:m}),b.api.setGridOption("loading",!1),b.api.showNoRowsOverlay();return}if(O&&!ze.isEqual(O.request.sortModel,b.request.sortModel)){O=void 0,b.api.setGridOption("loading",!0),b.success({rowData:[],rowCount:0});return}O=b;let R=0,F=[];if(m>0&&b.request.startRow!==void 0&&b.request.endRow!==void 0&&(R=Math.min(m,b.request.endRow)-b.request.startRow,R>0)){const D=await t.getData(e,x,{offset:b.request.startRow,length:R});F=tA(d,D,S,b.request.startRow)}b.success({rowData:F,rowCount:m}),b.api.autoSizeAllColumns(),b.api.setGridOption("loading",!1)}catch(R){b.api.setGridOption("loading",!0),b.fail(),console.trace(R)}}}}}const Yl=Rg(),oA=["onClick"],nh=r.defineComponent({__name:"PlAgGridColumnManager",props:{api:{}},setup(t){const e=t,{api:n}=r.toRefs(e),o=r.ref([]),i=r.ref(),l=r.ref(!1),c=r.ref(0);qp(i,{handle:".handle",onChange(p){n.value.moveColumns(p.map(h=>o.value[h]),0)}});function d(p){n.value.setColumnsVisible([p],!p.isVisible())}return r.onMounted(()=>{n.value.addEventListener("displayedColumnsChanged",()=>{o.value=[...n.value.getAllGridColumns()??[]],c.value++}),o.value=n.value.getAllGridColumns()??[]}),(p,h)=>(r.openBlock(),r.createElementBlock("div",null,[(r.openBlock(),r.createBlock(r.Teleport,{to:`#${r.unref(Yl)}`},[r.createVNode(r.unref(_o),{onClick:h[0]||(h[0]=r.withModifiers(m=>l.value=!l.value,["stop"]))},{append:r.withCtx(()=>[r.createVNode(r.unref(Lt),{name:"columns"})]),default:r.withCtx(()=>[h[2]||(h[2]=r.createTextVNode(" Columns "))]),_:1})],8,["to"])),r.createVNode(r.unref(Vs),{modelValue:l.value,"onUpdate:modelValue":h[1]||(h[1]=m=>l.value=m),width:"368px","close-on-outside-click":""},{title:r.withCtx(()=>h[3]||(h[3]=[r.createTextVNode("Columns")])),default:r.withCtx(()=>[(r.openBlock(),r.createElementBlock("div",{ref_key:"listRef",ref:i,key:c.value,class:"pl-ag-columns"},[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(o.value,m=>(r.openBlock(),r.createElementBlock("div",{key:m.getId(),class:"pl-ag-columns__item"},[r.createElementVNode("div",{class:r.normalizeClass([{handle:!m.getColDef().lockPosition},"pl-ag-columns__drag"])},[r.createVNode(r.unref(fn),{name:"drag-dots"})],2),r.createElementVNode("div",{class:r.normalizeClass([{visible:m.isVisible()},"pl-ag-columns__title"])},r.toDisplayString(m.getColDef().headerName),3),r.createElementVNode("div",{class:"pl-ag-columns__visibility",onClick:y=>d(m)},[r.createVNode(r.unref(xt),{"close-delay":500,position:"top"},{tooltip:r.withCtx(()=>h[4]||(h[4]=[r.createTextVNode("Show/Hide")])),default:r.withCtx(()=>[r.createVNode(r.unref(Lt),{name:m.isVisible()?"view-show":"view-hide"},null,8,["name"])]),_:2},1024)],8,oA)]))),128))]))]),_:1},8,["modelValue"])]))}}),iA=["id"],sA=r.defineComponent({__name:"PlAgDataTableToolsPanel",setup(t){return(e,n)=>(r.openBlock(),r.createElementBlock("div",{id:r.unref(Yl),class:"d-flex gap-6"},[r.renderSlot(e.$slots,"default")],8,iA))}}),aA={class:"ap-ag-data-table-container"},lA={key:1,class:"ap-ag-data-table-sheets"},cA=Xl(r.defineComponent({__name:"PlAgDataTable",props:r.mergeModels({settings:{},showColumnsPanel:{type:Boolean}},{modelValue:{default:{gridState:{}}},modelModifiers:{}}),emits:r.mergeModels(["onRowDoubleClicked","columnsChanged"],["update:modelValue"]),setup(t,{expose:e,emit:n}){T.ModuleRegistry.registerModules([hs.ClientSideRowModelModule,jd.ClipboardModule,Zd.ServerSideRowModelModule,Wd.RangeSelectionModule,hl,Ou]);const o=r.useModel(t,"modelValue"),i=t,{settings:l}=r.toRefs(i),c=n;r.watch(()=>l.value,async(B,C)=>{if(B.sourceType!=="pframe"||!B.pFrame||!B.join||C&&C.sourceType==="pframe"&&ze.isEqual(B.pFrame,C.pFrame)&&ze.isEqual(B.join,C.join))return;const E=window.platforma;if(!E)throw Error("platforma not set");const M=E.pFrameDriver;if(!M)throw Error("platforma.pFrameDriver not set");const H=await QN(M,B.pFrame,B.join),K=o.value;K.pTableParams||(K.pTableParams={sorting:[],filters:[]}),K.pTableParams.join=H,o.value=K});const d=Ih(()=>l.value.sourceType,async B=>{var E;const C=l.value.sourceType;switch(C){case"pframe":{const M=window.platforma;if(!M)throw Error("platforma not set");const H=M.pFrameDriver;if(!H)throw Error("platforma.pFrameDriver not set");if(!l.value.pFrame)return[];const K=l.value.pFrame,ne=(E=o.value.pTableParams)==null?void 0:E.join;return ne?await eA(H,K,l.value.sheetAxes,ne):[]}case"ptable":return l.value.sheets??[];case"xsv":return[];default:throw Error(`unsupported source type: ${C}`)}});function p(B){if(!(l.value.sourceType!=="ptable"&&l.value.sourceType!=="pframe"))return(B==null?void 0:B.sortModel.map(C=>{const{spec:E,...M}=Jp(C.colId);return{column:M,ascending:C.sort==="asc",naAndAbsentAreLeastValues:!0}}))??[]}const h=r.computed({get:()=>{const B=o.value;return{columnOrder:B.gridState.columnOrder,sort:B.gridState.sort,columnVisibility:B.gridState.columnVisibility}},set:B=>{const C=o.value,E=S.value.rowModelType==="clientSide"?void 0:p(B.sort);C.gridState={...C.gridState,...B},(l.value.sourceType==="ptable"||l.value.sourceType==="pframe")&&(C.pTableParams||(C.pTableParams={sorting:[],filters:[]}),C.pTableParams.sorting=E),o.value=C}}),m=B=>Gr(B);function y(B){var C;if(!(l.value.sourceType!=="ptable"&&l.value.sourceType!=="pframe"))return((C=d.value)==null?void 0:C.map(E=>({type:"bySingleColumnV2",column:E.column?{type:"column",id:E.column}:{type:"axis",id:E.axis},predicate:{operator:"Equal",reference:B[m(E.axis)]}})))??[]}const x=r.computed({get:()=>o.value.gridState.sheets??{},set:B=>{const C=y(B),E=o.value;E.gridState.sheets=B,(l.value.sourceType==="ptable"||l.value.sourceType==="pframe")&&(E.pTableParams||(E.pTableParams={sorting:[],filters:[]}),E.pTableParams.filters=C),o.value=E}});r.watch(()=>[l.value,d.value],(B,C)=>{const[E,M]=B;if(!M)return;if(C){const[K,ne]=C;if((E.sourceType==="ptable"||E.sourceType==="pframe")&&E.sourceType===(K==null?void 0:K.sourceType)&&ze.isEqual(M,ne))return}if(E.sourceType!=="ptable"&&E.sourceType!=="pframe"){x.value={};return}const H=x.value;for(const K of M){const ne=m(K.axis);H[ne]||(H[ne]=K.defaultValue??K.options[0].value)}x.value=H},{immediate:!0});const w=r.shallowRef(),S=r.shallowRef({animateRows:!1,suppressColumnMoveAnimation:!0,cellSelection:!0,initialState:h.value,autoSizeStrategy:{type:"fitCellContents"},onRowDataUpdated:B=>{B.api.autoSizeAllColumns()},onRowDoubleClicked:B=>{B.data&&c("onRowDoubleClicked",B.data.key)},defaultColDef:{suppressHeaderMenuButton:!0},maintainColumnOrder:!0,localeText:{loadingError:"..."},rowModelType:"clientSide",maxBlocksInCache:1e3,cacheBlockSize:100,blockLoadDebounceMillis:500,serverSideSortAllLevels:!0,suppressServerSideFullWidthLoadingRow:!0,getRowId:B=>B.data.id,loading:!0,loadingOverlayComponentParams:{notReady:!0},loadingOverlayComponent:Kp,noRowsOverlayComponent:Xp,sideBar:{},defaultCsvExportParams:{allColumns:!0,suppressQuotes:!0,fileName:"table.csv"}}),O=B=>{const C=B.api;w.value=new Proxy(C,{get(E,M,H){switch(M){case"setGridOption":return(K,ne)=>{const de=S.value;de[K]=ne,S.value=de,C.setGridOption(K,ne)};case"updateGridOptions":return K=>{S.value={...S.value,...K},C.updateGridOptions(K)};default:return Reflect.get(E,M,H)}}})},G=B=>({columnOrder:B.columnOrder,sort:B.sort,columnVisibility:B.columnVisibility??(B.columnOrder?{hiddenColIds:[]}:void 0)}),b=B=>{S.value.initialState=h.value=G(B.state),B.api.autoSizeAllColumns()},R=()=>{S.value.initialState=h.value=G(w.value.getState()),w.value=void 0};let F=!1;const D=()=>{if(!F)return;const B=w.value;B!==void 0&&(B.exportDataAsCsv(),F=!1,B.setGridOption("cacheBlockSize",100))},A=()=>{if(!F)return;const B=w.value;if(B===void 0)return;const C=B.getServerSideGroupLevelState()[0];C.cacheBlockSize===C.rowCount&&B.refreshServerSide({route:C.route,purge:!1})};e({exportCsv:async()=>{const B=w.value;if(B!==void 0){if(S.value.rowModelType==="clientSide"){B.exportDataAsCsv();return}if(S.value.rowModelType==="serverSide"){const C=B.getServerSideGroupLevelState()[0];if(C.rowCount<=C.cacheBlockSize){B.exportDataAsCsv();return}F||(F=!0,B.setGridOption("cacheBlockSize",C.rowCount))}}}});const j=r.ref(0);r.watch(()=>[w.value,h.value],(B,C)=>{if(ze.isEqual(B,C))return;const[E,M]=B;if(!E)return;const H=G(E.getState());ze.isEqual(M,H)||(S.value.initialState=M,++j.value)}),r.watch(()=>S.value,(B,C)=>{var E;if(C&&(B.rowModelType!=C.rowModelType&&++j.value,!ze.isEqual(B.columnDefs,C.columnDefs)&&B.columnDefs)){const M=ne=>!("children"in ne),H=(E=B.columnDefs)==null?void 0:E.filter(M),K=H==null?void 0:H.map(ne=>ne.colId).filter(ne=>ne!==void 0).map(ne=>Jp(ne));c("columnsChanged",K??[])}});const $=(B,C)=>{var M;const E=x.value;E[B]!==C&&(E[B]=C,x.value=E,(M=w.value)==null||M.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1}}))},Z=window.platforma;if(!Z)throw Error("platforma not set");const W=Z.pFrameDriver;if(!W)throw Error("platforma.pFrameDriver not set");const J=Z.blobDriver;if(!J)throw Error("platforma.blobDriver not set");let he;return r.watch(()=>[w.value,l.value,d.value],async B=>{var K,ne;const[C,E,M]=B;if(!C||ze.isEqual(E,he))return;he=E;const H=E.sourceType;switch(H){case"pframe":case"ptable":{const de=E.pTable;if(!de||!M)return C.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[]});const ke=(ne=(K=h.value)==null?void 0:K.columnVisibility)==null?void 0:ne.hiddenColIds,Se=await rA(W,de,M,ke);return C.updateGridOptions({loading:Se.rowModelType!=="clientSide",loadingOverlayComponentParams:{notReady:!1},...Se})}case"xsv":{const de=E.xsvFile;if(!(de!=null&&de.ok)||!de.value)return C.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[]});const ke=await jN(J,de.value);return C.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},...ke})}default:throw Error(`unsupported source type: ${H}`)}}),(B,C)=>(r.openBlock(),r.createElementBlock("div",aA,[w.value&&B.showColumnsPanel?(r.openBlock(),r.createBlock(r.unref(nh),{key:0,api:w.value},null,8,["api"])):r.createCommentVNode("",!0),r.unref(d).value&&r.unref(d).value.length>0?(r.openBlock(),r.createElementBlock("div",lA,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(r.unref(d).value,(E,M)=>(r.openBlock(),r.createBlock(r.unref(Cp),{key:M,"model-value":x.value[m(E.axis)],options:E.options,"onUpdate:modelValue":H=>$(m(E.axis),H)},null,8,["model-value","options","onUpdate:modelValue"]))),128))])):r.createCommentVNode("",!0),(r.openBlock(),r.createBlock(r.unref(Ag.AgGridVue),{key:j.value,theme:r.unref(Mu),class:"ap-ag-data-table-grid","grid-options":S.value,onGridReady:O,onStateUpdated:b,onGridPreDestroyed:R,onStoreRefreshed:D,onModelUpdated:A},null,8,["theme","grid-options"]))]))}}),[["__scopeId","data-v-ea0278e4"]]),dA={key:1,class:"alert-error"},uA={key:2},pA=r.defineComponent({__name:"ValueOrErrorsComponent",props:{valueOrError:{}},setup(t){const e=t,n=r.computed(()=>e.valueOrError&&e.valueOrError.ok?e.valueOrError.value:void 0),o=r.computed(()=>e.valueOrError&&!e.valueOrError.ok?e.valueOrError.errors:void 0),i=r.computed(()=>n.value===void 0&&o.value===void 0);return(l,c)=>(r.openBlock(),r.createElementBlock("div",null,[n.value!==void 0?r.renderSlot(l.$slots,"default",r.normalizeProps(r.mergeProps({key:0},{value:n.value}))):r.createCommentVNode("",!0),o.value?(r.openBlock(),r.createElementBlock("div",dA,r.toDisplayString(o.value),1)):r.createCommentVNode("",!0),i.value?(r.openBlock(),r.createElementBlock("div",uA,"Unresolved")):r.createCommentVNode("",!0)]))}}),hA={style:{height:"100%"}},fA=r.defineComponent({__name:"PlAgCellFile",props:{params:{}},setup(t){const e=t,n=r.computed(()=>e.params.extensions),o=r.computed(()=>e.params.value);function i(c){e.params.setValue(c)}const l=r.computed(()=>e.params.resolveProgress?e.params.resolveProgress(o.value):void 0);return(c,d)=>(r.openBlock(),r.createElementBlock("div",hA,[r.createVNode(r.unref(Up),{"show-filename-only":"",clearable:"","cell-style":"","file-dialog-title":"Select any file",placeholder:`Choose file ${n.value?n.value[0]:""}`,extensions:n.value,"model-value":o.value,progress:l.value,"onUpdate:modelValue":i},null,8,["placeholder","extensions","model-value","progress"])]))}}),mA={class:"pl-ag-grid-open-cell d-flex"},gA={class:"pl-ag-grid-open-cell__value"},yA=r.defineComponent({__name:"PlAgTextAndButtonCell",props:{params:{}},setup(t){const e=t;function n(){if(e.params.invokeRowsOnDoubleClick){const o=e.params.api,i={rowPinned:e.params.node.rowPinned,api:o,rowIndex:e.params.node.rowIndex,context:o,type:"rowDoubleClicked",node:e.params.node,data:e.params.data,event:null};o.dispatchEvent(i)}else e.params.onClick&&e.params.onClick(e.params)}return(o,i)=>(r.openBlock(),r.createElementBlock("div",mA,[r.createElementVNode("div",gA,r.toDisplayString(o.params.value),1),r.createElementVNode("div",{class:"pl-ag-grid-open-cell__activator text-caps11 align-center",onClick:r.withModifiers(n,["stop"])},[r.createVNode(r.unref(fn),{name:o.params.icon??"maximize"},null,8,["name"]),r.createTextVNode(" "+r.toDisplayString(o.params.btnLabel??"Open"),1)])]))}});var Jl={exports:{}};const vA="2.0.0",rh=256,_A=Number.MAX_SAFE_INTEGER||9007199254740991,CA=16,wA=rh-6;var zs={MAX_LENGTH:rh,MAX_SAFE_COMPONENT_LENGTH:CA,MAX_SAFE_BUILD_LENGTH:wA,MAX_SAFE_INTEGER:_A,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:vA,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Us=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};(function(t,e){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:i}=zs,l=Us;e=t.exports={};const c=e.re=[],d=e.safeRe=[],p=e.src=[],h=e.t={};let m=0;const y="[a-zA-Z0-9-]",x=[["\\s",1],["\\d",i],[y,o]],w=O=>{for(const[G,b]of x)O=O.split(`${G}*`).join(`${G}{0,${b}}`).split(`${G}+`).join(`${G}{1,${b}}`);return O},S=(O,G,b)=>{const R=w(G),F=m++;l(O,F,G),h[O]=F,p[F]=G,c[F]=new RegExp(G,b?"g":void 0),d[F]=new RegExp(R,b?"g":void 0)};S("NUMERICIDENTIFIER","0|[1-9]\\d*"),S("NUMERICIDENTIFIERLOOSE","\\d+"),S("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${y}*`),S("MAINVERSION",`(${p[h.NUMERICIDENTIFIER]})\\.(${p[h.NUMERICIDENTIFIER]})\\.(${p[h.NUMERICIDENTIFIER]})`),S("MAINVERSIONLOOSE",`(${p[h.NUMERICIDENTIFIERLOOSE]})\\.(${p[h.NUMERICIDENTIFIERLOOSE]})\\.(${p[h.NUMERICIDENTIFIERLOOSE]})`),S("PRERELEASEIDENTIFIER",`(?:${p[h.NUMERICIDENTIFIER]}|${p[h.NONNUMERICIDENTIFIER]})`),S("PRERELEASEIDENTIFIERLOOSE",`(?:${p[h.NUMERICIDENTIFIERLOOSE]}|${p[h.NONNUMERICIDENTIFIER]})`),S("PRERELEASE",`(?:-(${p[h.PRERELEASEIDENTIFIER]}(?:\\.${p[h.PRERELEASEIDENTIFIER]})*))`),S("PRERELEASELOOSE",`(?:-?(${p[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${p[h.PRERELEASEIDENTIFIERLOOSE]})*))`),S("BUILDIDENTIFIER",`${y}+`),S("BUILD",`(?:\\+(${p[h.BUILDIDENTIFIER]}(?:\\.${p[h.BUILDIDENTIFIER]})*))`),S("FULLPLAIN",`v?${p[h.MAINVERSION]}${p[h.PRERELEASE]}?${p[h.BUILD]}?`),S("FULL",`^${p[h.FULLPLAIN]}$`),S("LOOSEPLAIN",`[v=\\s]*${p[h.MAINVERSIONLOOSE]}${p[h.PRERELEASELOOSE]}?${p[h.BUILD]}?`),S("LOOSE",`^${p[h.LOOSEPLAIN]}$`),S("GTLT","((?:<|>)?=?)"),S("XRANGEIDENTIFIERLOOSE",`${p[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),S("XRANGEIDENTIFIER",`${p[h.NUMERICIDENTIFIER]}|x|X|\\*`),S("XRANGEPLAIN",`[v=\\s]*(${p[h.XRANGEIDENTIFIER]})(?:\\.(${p[h.XRANGEIDENTIFIER]})(?:\\.(${p[h.XRANGEIDENTIFIER]})(?:${p[h.PRERELEASE]})?${p[h.BUILD]}?)?)?`),S("XRANGEPLAINLOOSE",`[v=\\s]*(${p[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${p[h.XRANGEIDENTIFIERLOOSE]})(?:${p[h.PRERELEASELOOSE]})?${p[h.BUILD]}?)?)?`),S("XRANGE",`^${p[h.GTLT]}\\s*${p[h.XRANGEPLAIN]}$`),S("XRANGELOOSE",`^${p[h.GTLT]}\\s*${p[h.XRANGEPLAINLOOSE]}$`),S("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),S("COERCE",`${p[h.COERCEPLAIN]}(?:$|[^\\d])`),S("COERCEFULL",p[h.COERCEPLAIN]+`(?:${p[h.PRERELEASE]})?(?:${p[h.BUILD]})?(?:$|[^\\d])`),S("COERCERTL",p[h.COERCE],!0),S("COERCERTLFULL",p[h.COERCEFULL],!0),S("LONETILDE","(?:~>?)"),S("TILDETRIM",`(\\s*)${p[h.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",S("TILDE",`^${p[h.LONETILDE]}${p[h.XRANGEPLAIN]}$`),S("TILDELOOSE",`^${p[h.LONETILDE]}${p[h.XRANGEPLAINLOOSE]}$`),S("LONECARET","(?:\\^)"),S("CARETTRIM",`(\\s*)${p[h.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",S("CARET",`^${p[h.LONECARET]}${p[h.XRANGEPLAIN]}$`),S("CARETLOOSE",`^${p[h.LONECARET]}${p[h.XRANGEPLAINLOOSE]}$`),S("COMPARATORLOOSE",`^${p[h.GTLT]}\\s*(${p[h.LOOSEPLAIN]})$|^$`),S("COMPARATOR",`^${p[h.GTLT]}\\s*(${p[h.FULLPLAIN]})$|^$`),S("COMPARATORTRIM",`(\\s*)${p[h.GTLT]}\\s*(${p[h.LOOSEPLAIN]}|${p[h.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",S("HYPHENRANGE",`^\\s*(${p[h.XRANGEPLAIN]})\\s+-\\s+(${p[h.XRANGEPLAIN]})\\s*$`),S("HYPHENRANGELOOSE",`^\\s*(${p[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${p[h.XRANGEPLAINLOOSE]})\\s*$`),S("STAR","(<|>)?=?\\s*\\*"),S("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),S("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Jl,Jl.exports);var Gi=Jl.exports;const bA=Object.freeze({loose:!0}),xA=Object.freeze({});var Ql=t=>t?typeof t!="object"?bA:t:xA;const oh=/^[0-9]+$/,ih=(t,e)=>{const n=oh.test(t),o=oh.test(e);return n&&o&&(t=+t,e=+e),t===e?0:n&&!o?-1:o&&!n?1:t<e?-1:1};var sh={compareIdentifiers:ih,rcompareIdentifiers:(t,e)=>ih(e,t)};const Zs=Us,{MAX_LENGTH:ah,MAX_SAFE_INTEGER:js}=zs,{safeRe:lh,t:ch}=Gi,kA=Ql,{compareIdentifiers:No}=sh;var Bt=class Hn{constructor(e,n){if(n=kA(n),e instanceof Hn){if(e.loose===!!n.loose&&e.includePrerelease===!!n.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>ah)throw new TypeError(`version is longer than ${ah} characters`);Zs("SemVer",e,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;const o=e.trim().match(n.loose?lh[ch.LOOSE]:lh[ch.FULL]);if(!o)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>js||this.major<0)throw new TypeError("Invalid major version");if(this.minor>js||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>js||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(i=>{if(/^[0-9]+$/.test(i)){const l=+i;if(l>=0&&l<js)return l}return i}):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(Zs("SemVer.compare",this.version,this.options,e),!(e instanceof Hn)){if(typeof e=="string"&&e===this.version)return 0;e=new Hn(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof Hn||(e=new Hn(e,this.options)),No(this.major,e.major)||No(this.minor,e.minor)||No(this.patch,e.patch)}comparePre(e){if(e instanceof Hn||(e=new Hn(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let n=0;do{const o=this.prerelease[n],i=e.prerelease[n];if(Zs("prerelease compare",n,o,i),o===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(o===void 0)return-1;if(o===i)continue;return No(o,i)}while(++n)}compareBuild(e){e instanceof Hn||(e=new Hn(e,this.options));let n=0;do{const o=this.build[n],i=e.build[n];if(Zs("build compare",n,o,i),o===void 0&&i===void 0)return 0;if(i===void 0)return 1;if(o===void 0)return-1;if(o===i)continue;return No(o,i)}while(++n)}inc(e,n,o){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",n,o);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",n,o);break;case"prepatch":this.prerelease.length=0,this.inc("patch",n,o),this.inc("pre",n,o);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",n,o),this.inc("pre",n,o);break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const i=Number(o)?1:0;if(!n&&o===!1)throw new Error("invalid increment argument: identifier is empty");if(this.prerelease.length===0)this.prerelease=[i];else{let l=this.prerelease.length;for(;--l>=0;)typeof this.prerelease[l]=="number"&&(this.prerelease[l]++,l=-2);if(l===-1){if(n===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(i)}}if(n){let l=[n,i];o===!1&&(l=[n]),No(this.prerelease[0],n)===0?isNaN(this.prerelease[1])&&(this.prerelease=l):this.prerelease=l}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};const dh=Bt;var Ao=(t,e,n=!1)=>{if(t instanceof dh)return t;try{return new dh(t,e)}catch(o){if(!n)return null;throw o}};const SA=Ao;var EA=(t,e)=>{const n=SA(t,e);return n?n.version:null};const TA=Ao;var NA=(t,e)=>{const n=TA(t.trim().replace(/^[=v]+/,""),e);return n?n.version:null};const uh=Bt;var AA=(t,e,n,o,i)=>{typeof n=="string"&&(i=o,o=n,n=void 0);try{return new uh(t instanceof uh?t.version:t,n).inc(e,o,i).version}catch{return null}};const ph=Ao;var VA=(t,e)=>{const n=ph(t,null,!0),o=ph(e,null,!0),i=n.compare(o);if(i===0)return null;const l=i>0,c=l?n:o,d=l?o:n,p=!!c.prerelease.length;if(!!d.prerelease.length&&!p)return!d.patch&&!d.minor?"major":c.patch?"patch":c.minor?"minor":"major";const m=p?"pre":"";return n.major!==o.major?m+"major":n.minor!==o.minor?m+"minor":n.patch!==o.patch?m+"patch":"prerelease"};const BA=Bt;var PA=(t,e)=>new BA(t,e).major;const RA=Bt;var DA=(t,e)=>new RA(t,e).minor;const IA=Bt;var FA=(t,e)=>new IA(t,e).patch;const OA=Ao;var LA=(t,e)=>{const n=OA(t,e);return n&&n.prerelease.length?n.prerelease:null};const hh=Bt;var vn=(t,e,n)=>new hh(t,n).compare(new hh(e,n));const MA=vn;var GA=(t,e,n)=>MA(e,t,n);const $A=vn;var zA=(t,e)=>$A(t,e,!0);const fh=Bt;var ec=(t,e,n)=>{const o=new fh(t,n),i=new fh(e,n);return o.compare(i)||o.compareBuild(i)};const UA=ec;var ZA=(t,e)=>t.sort((n,o)=>UA(n,o,e));const jA=ec;var WA=(t,e)=>t.sort((n,o)=>jA(o,n,e));const HA=vn;var Ws=(t,e,n)=>HA(t,e,n)>0;const qA=vn;var tc=(t,e,n)=>qA(t,e,n)<0;const KA=vn;var mh=(t,e,n)=>KA(t,e,n)===0;const XA=vn;var gh=(t,e,n)=>XA(t,e,n)!==0;const YA=vn;var nc=(t,e,n)=>YA(t,e,n)>=0;const JA=vn;var rc=(t,e,n)=>JA(t,e,n)<=0;const QA=mh,eV=gh,tV=Ws,nV=nc,rV=tc,oV=rc;var yh=(t,e,n,o)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t===n;case"!==":return typeof t=="object"&&(t=t.version),typeof n=="object"&&(n=n.version),t!==n;case"":case"=":case"==":return QA(t,n,o);case"!=":return eV(t,n,o);case">":return tV(t,n,o);case">=":return nV(t,n,o);case"<":return rV(t,n,o);case"<=":return oV(t,n,o);default:throw new TypeError(`Invalid operator: ${e}`)}};const iV=Bt,sV=Ao,{safeRe:Hs,t:qs}=Gi;var aV=(t,e)=>{if(t instanceof iV)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let n=null;if(!e.rtl)n=t.match(e.includePrerelease?Hs[qs.COERCEFULL]:Hs[qs.COERCE]);else{const p=e.includePrerelease?Hs[qs.COERCERTLFULL]:Hs[qs.COERCERTL];let h;for(;(h=p.exec(t))&&(!n||n.index+n[0].length!==t.length);)(!n||h.index+h[0].length!==n.index+n[0].length)&&(n=h),p.lastIndex=h.index+h[1].length+h[2].length;p.lastIndex=-1}if(n===null)return null;const o=n[2],i=n[3]||"0",l=n[4]||"0",c=e.includePrerelease&&n[5]?`-${n[5]}`:"",d=e.includePrerelease&&n[6]?`+${n[6]}`:"";return sV(`${o}.${i}.${l}${c}${d}`,e)},lV=class{constructor(){this.max=1e3,this.map=new Map}get(e){const n=this.map.get(e);if(n!==void 0)return this.map.delete(e),this.map.set(e,n),n}delete(e){return this.map.delete(e)}set(e,n){if(!this.delete(e)&&n!==void 0){if(this.map.size>=this.max){const i=this.map.keys().next().value;this.delete(i)}this.map.set(e,n)}return this}},oc,vh;function _n(){if(vh)return oc;vh=1;const t=/\s+/g;class e{constructor(E,M){if(M=i(M),E instanceof e)return E.loose===!!M.loose&&E.includePrerelease===!!M.includePrerelease?E:new e(E.raw,M);if(E instanceof l)return this.raw=E.value,this.set=[[E]],this.formatted=void 0,this;if(this.options=M,this.loose=!!M.loose,this.includePrerelease=!!M.includePrerelease,this.raw=E.trim().replace(t," "),this.set=this.raw.split("||").map(H=>this.parseRange(H.trim())).filter(H=>H.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const H=this.set[0];if(this.set=this.set.filter(K=>!O(K[0])),this.set.length===0)this.set=[H];else if(this.set.length>1){for(const K of this.set)if(K.length===1&&G(K[0])){this.set=[K];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let E=0;E<this.set.length;E++){E>0&&(this.formatted+="||");const M=this.set[E];for(let H=0;H<M.length;H++)H>0&&(this.formatted+=" "),this.formatted+=M[H].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(E){const H=((this.options.includePrerelease&&w)|(this.options.loose&&S))+":"+E,K=o.get(H);if(K)return K;const ne=this.options.loose,de=ne?p[h.HYPHENRANGELOOSE]:p[h.HYPHENRANGE];E=E.replace(de,he(this.options.includePrerelease)),c("hyphen replace",E),E=E.replace(p[h.COMPARATORTRIM],m),c("comparator trim",E),E=E.replace(p[h.TILDETRIM],y),c("tilde trim",E),E=E.replace(p[h.CARETTRIM],x),c("caret trim",E);let ke=E.split(" ").map(Ke=>R(Ke,this.options)).join(" ").split(/\s+/).map(Ke=>J(Ke,this.options));ne&&(ke=ke.filter(Ke=>(c("loose invalid filter",Ke,this.options),!!Ke.match(p[h.COMPARATORLOOSE])))),c("range list",ke);const Se=new Map,Ze=ke.map(Ke=>new l(Ke,this.options));for(const Ke of Ze){if(O(Ke))return[Ke];Se.set(Ke.value,Ke)}Se.size>1&&Se.has("")&&Se.delete("");const ht=[...Se.values()];return o.set(H,ht),ht}intersects(E,M){if(!(E instanceof e))throw new TypeError("a Range is required");return this.set.some(H=>b(H,M)&&E.set.some(K=>b(K,M)&&H.every(ne=>K.every(de=>ne.intersects(de,M)))))}test(E){if(!E)return!1;if(typeof E=="string")try{E=new d(E,this.options)}catch{return!1}for(let M=0;M<this.set.length;M++)if(B(this.set[M],E,this.options))return!0;return!1}}oc=e;const n=lV,o=new n,i=Ql,l=Ks(),c=Us,d=Bt,{safeRe:p,t:h,comparatorTrimReplace:m,tildeTrimReplace:y,caretTrimReplace:x}=Gi,{FLAG_INCLUDE_PRERELEASE:w,FLAG_LOOSE:S}=zs,O=C=>C.value==="<0.0.0-0",G=C=>C.value==="",b=(C,E)=>{let M=!0;const H=C.slice();let K=H.pop();for(;M&&H.length;)M=H.every(ne=>K.intersects(ne,E)),K=H.pop();return M},R=(C,E)=>(c("comp",C,E),C=U(C,E),c("caret",C),C=D(C,E),c("tildes",C),C=$(C,E),c("xrange",C),C=W(C,E),c("stars",C),C),F=C=>!C||C.toLowerCase()==="x"||C==="*",D=(C,E)=>C.trim().split(/\s+/).map(M=>A(M,E)).join(" "),A=(C,E)=>{const M=E.loose?p[h.TILDELOOSE]:p[h.TILDE];return C.replace(M,(H,K,ne,de,ke)=>{c("tilde",C,H,K,ne,de,ke);let Se;return F(K)?Se="":F(ne)?Se=`>=${K}.0.0 <${+K+1}.0.0-0`:F(de)?Se=`>=${K}.${ne}.0 <${K}.${+ne+1}.0-0`:ke?(c("replaceTilde pr",ke),Se=`>=${K}.${ne}.${de}-${ke} <${K}.${+ne+1}.0-0`):Se=`>=${K}.${ne}.${de} <${K}.${+ne+1}.0-0`,c("tilde return",Se),Se})},U=(C,E)=>C.trim().split(/\s+/).map(M=>j(M,E)).join(" "),j=(C,E)=>{c("caret",C,E);const M=E.loose?p[h.CARETLOOSE]:p[h.CARET],H=E.includePrerelease?"-0":"";return C.replace(M,(K,ne,de,ke,Se)=>{c("caret",C,K,ne,de,ke,Se);let Ze;return F(ne)?Ze="":F(de)?Ze=`>=${ne}.0.0${H} <${+ne+1}.0.0-0`:F(ke)?ne==="0"?Ze=`>=${ne}.${de}.0${H} <${ne}.${+de+1}.0-0`:Ze=`>=${ne}.${de}.0${H} <${+ne+1}.0.0-0`:Se?(c("replaceCaret pr",Se),ne==="0"?de==="0"?Ze=`>=${ne}.${de}.${ke}-${Se} <${ne}.${de}.${+ke+1}-0`:Ze=`>=${ne}.${de}.${ke}-${Se} <${ne}.${+de+1}.0-0`:Ze=`>=${ne}.${de}.${ke}-${Se} <${+ne+1}.0.0-0`):(c("no pr"),ne==="0"?de==="0"?Ze=`>=${ne}.${de}.${ke}${H} <${ne}.${de}.${+ke+1}-0`:Ze=`>=${ne}.${de}.${ke}${H} <${ne}.${+de+1}.0-0`:Ze=`>=${ne}.${de}.${ke} <${+ne+1}.0.0-0`),c("caret return",Ze),Ze})},$=(C,E)=>(c("replaceXRanges",C,E),C.split(/\s+/).map(M=>Z(M,E)).join(" ")),Z=(C,E)=>{C=C.trim();const M=E.loose?p[h.XRANGELOOSE]:p[h.XRANGE];return C.replace(M,(H,K,ne,de,ke,Se)=>{c("xRange",C,H,K,ne,de,ke,Se);const Ze=F(ne),ht=Ze||F(de),Ke=ht||F(ke),Un=Ke;return K==="="&&Un&&(K=""),Se=E.includePrerelease?"-0":"",Ze?K===">"||K==="<"?H="<0.0.0-0":H="*":K&&Un?(ht&&(de=0),ke=0,K===">"?(K=">=",ht?(ne=+ne+1,de=0,ke=0):(de=+de+1,ke=0)):K==="<="&&(K="<",ht?ne=+ne+1:de=+de+1),K==="<"&&(Se="-0"),H=`${K+ne}.${de}.${ke}${Se}`):ht?H=`>=${ne}.0.0${Se} <${+ne+1}.0.0-0`:Ke&&(H=`>=${ne}.${de}.0${Se} <${ne}.${+de+1}.0-0`),c("xRange return",H),H})},W=(C,E)=>(c("replaceStars",C,E),C.trim().replace(p[h.STAR],"")),J=(C,E)=>(c("replaceGTE0",C,E),C.trim().replace(p[E.includePrerelease?h.GTE0PRE:h.GTE0],"")),he=C=>(E,M,H,K,ne,de,ke,Se,Ze,ht,Ke,Un)=>(F(H)?M="":F(K)?M=`>=${H}.0.0${C?"-0":""}`:F(ne)?M=`>=${H}.${K}.0${C?"-0":""}`:de?M=`>=${M}`:M=`>=${M}${C?"-0":""}`,F(Ze)?Se="":F(ht)?Se=`<${+Ze+1}.0.0-0`:F(Ke)?Se=`<${Ze}.${+ht+1}.0-0`:Un?Se=`<=${Ze}.${ht}.${Ke}-${Un}`:C?Se=`<${Ze}.${ht}.${+Ke+1}-0`:Se=`<=${Se}`,`${M} ${Se}`.trim()),B=(C,E,M)=>{for(let H=0;H<C.length;H++)if(!C[H].test(E))return!1;if(E.prerelease.length&&!M.includePrerelease){for(let H=0;H<C.length;H++)if(c(C[H].semver),C[H].semver!==l.ANY&&C[H].semver.prerelease.length>0){const K=C[H].semver;if(K.major===E.major&&K.minor===E.minor&&K.patch===E.patch)return!0}return!1}return!0};return oc}var ic,_h;function Ks(){if(_h)return ic;_h=1;const t=Symbol("SemVer ANY");class e{static get ANY(){return t}constructor(m,y){if(y=n(y),m instanceof e){if(m.loose===!!y.loose)return m;m=m.value}m=m.trim().split(/\s+/).join(" "),c("comparator",m,y),this.options=y,this.loose=!!y.loose,this.parse(m),this.semver===t?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(m){const y=this.options.loose?o[i.COMPARATORLOOSE]:o[i.COMPARATOR],x=m.match(y);if(!x)throw new TypeError(`Invalid comparator: ${m}`);this.operator=x[1]!==void 0?x[1]:"",this.operator==="="&&(this.operator=""),x[2]?this.semver=new d(x[2],this.options.loose):this.semver=t}toString(){return this.value}test(m){if(c("Comparator.test",m,this.options.loose),this.semver===t||m===t)return!0;if(typeof m=="string")try{m=new d(m,this.options)}catch{return!1}return l(m,this.operator,this.semver,this.options)}intersects(m,y){if(!(m instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new p(m.value,y).test(this.value):m.operator===""?m.value===""?!0:new p(this.value,y).test(m.semver):(y=n(y),y.includePrerelease&&(this.value==="<0.0.0-0"||m.value==="<0.0.0-0")||!y.includePrerelease&&(this.value.startsWith("<0.0.0")||m.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&m.operator.startsWith(">")||this.operator.startsWith("<")&&m.operator.startsWith("<")||this.semver.version===m.semver.version&&this.operator.includes("=")&&m.operator.includes("=")||l(this.semver,"<",m.semver,y)&&this.operator.startsWith(">")&&m.operator.startsWith("<")||l(this.semver,">",m.semver,y)&&this.operator.startsWith("<")&&m.operator.startsWith(">")))}}ic=e;const n=Ql,{safeRe:o,t:i}=Gi,l=yh,c=Us,d=Bt,p=_n();return ic}const cV=_n();var Xs=(t,e,n)=>{try{e=new cV(e,n)}catch{return!1}return e.test(t)};const dV=_n();var uV=(t,e)=>new dV(t,e).set.map(n=>n.map(o=>o.value).join(" ").trim().split(" "));const pV=Bt,hV=_n();var fV=(t,e,n)=>{let o=null,i=null,l=null;try{l=new hV(e,n)}catch{return null}return t.forEach(c=>{l.test(c)&&(!o||i.compare(c)===-1)&&(o=c,i=new pV(o,n))}),o};const mV=Bt,gV=_n();var yV=(t,e,n)=>{let o=null,i=null,l=null;try{l=new gV(e,n)}catch{return null}return t.forEach(c=>{l.test(c)&&(!o||i.compare(c)===1)&&(o=c,i=new mV(o,n))}),o};const sc=Bt,vV=_n(),Ch=Ws;var _V=(t,e)=>{t=new vV(t,e);let n=new sc("0.0.0");if(t.test(n)||(n=new sc("0.0.0-0"),t.test(n)))return n;n=null;for(let o=0;o<t.set.length;++o){const i=t.set[o];let l=null;i.forEach(c=>{const d=new sc(c.semver.version);switch(c.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!l||Ch(d,l))&&(l=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),l&&(!n||Ch(n,l))&&(n=l)}return n&&t.test(n)?n:null};const CV=_n();var wV=(t,e)=>{try{return new CV(t,e).range||"*"}catch{return null}};const bV=Bt,wh=Ks(),{ANY:xV}=wh,kV=_n(),SV=Xs,bh=Ws,xh=tc,EV=rc,TV=nc;var ac=(t,e,n,o)=>{t=new bV(t,o),e=new kV(e,o);let i,l,c,d,p;switch(n){case">":i=bh,l=EV,c=xh,d=">",p=">=";break;case"<":i=xh,l=TV,c=bh,d="<",p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(SV(t,e,o))return!1;for(let h=0;h<e.set.length;++h){const m=e.set[h];let y=null,x=null;if(m.forEach(w=>{w.semver===xV&&(w=new wh(">=0.0.0")),y=y||w,x=x||w,i(w.semver,y.semver,o)?y=w:c(w.semver,x.semver,o)&&(x=w)}),y.operator===d||y.operator===p||(!x.operator||x.operator===d)&&l(t,x.semver))return!1;if(x.operator===p&&c(t,x.semver))return!1}return!0};const NV=ac;var AV=(t,e,n)=>NV(t,e,">",n);const VV=ac;var BV=(t,e,n)=>VV(t,e,"<",n);const kh=_n();var PV=(t,e,n)=>(t=new kh(t,n),e=new kh(e,n),t.intersects(e,n));const RV=Xs,DV=vn;var IV=(t,e,n)=>{const o=[];let i=null,l=null;const c=t.sort((m,y)=>DV(m,y,n));for(const m of c)RV(m,e,n)?(l=m,i||(i=m)):(l&&o.push([i,l]),l=null,i=null);i&&o.push([i,null]);const d=[];for(const[m,y]of o)m===y?d.push(m):!y&&m===c[0]?d.push("*"):y?m===c[0]?d.push(`<=${y}`):d.push(`${m} - ${y}`):d.push(`>=${m}`);const p=d.join(" || "),h=typeof e.raw=="string"?e.raw:String(e);return p.length<h.length?p:e};const Sh=_n(),lc=Ks(),{ANY:cc}=lc,$i=Xs,dc=vn,FV=(t,e,n={})=>{if(t===e)return!0;t=new Sh(t,n),e=new Sh(e,n);let o=!1;e:for(const i of t.set){for(const l of e.set){const c=LV(i,l,n);if(o=o||c!==null,c)continue e}if(o)return!1}return!0},OV=[new lc(">=0.0.0-0")],Eh=[new lc(">=0.0.0")],LV=(t,e,n)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===cc){if(e.length===1&&e[0].semver===cc)return!0;n.includePrerelease?t=OV:t=Eh}if(e.length===1&&e[0].semver===cc){if(n.includePrerelease)return!0;e=Eh}const o=new Set;let i,l;for(const w of t)w.operator===">"||w.operator===">="?i=Th(i,w,n):w.operator==="<"||w.operator==="<="?l=Nh(l,w,n):o.add(w.semver);if(o.size>1)return null;let c;if(i&&l){if(c=dc(i.semver,l.semver,n),c>0)return null;if(c===0&&(i.operator!==">="||l.operator!=="<="))return null}for(const w of o){if(i&&!$i(w,String(i),n)||l&&!$i(w,String(l),n))return null;for(const S of e)if(!$i(w,String(S),n))return!1;return!0}let d,p,h,m,y=l&&!n.includePrerelease&&l.semver.prerelease.length?l.semver:!1,x=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:!1;y&&y.prerelease.length===1&&l.operator==="<"&&y.prerelease[0]===0&&(y=!1);for(const w of e){if(m=m||w.operator===">"||w.operator===">=",h=h||w.operator==="<"||w.operator==="<=",i){if(x&&w.semver.prerelease&&w.semver.prerelease.length&&w.semver.major===x.major&&w.semver.minor===x.minor&&w.semver.patch===x.patch&&(x=!1),w.operator===">"||w.operator===">="){if(d=Th(i,w,n),d===w&&d!==i)return!1}else if(i.operator===">="&&!$i(i.semver,String(w),n))return!1}if(l){if(y&&w.semver.prerelease&&w.semver.prerelease.length&&w.semver.major===y.major&&w.semver.minor===y.minor&&w.semver.patch===y.patch&&(y=!1),w.operator==="<"||w.operator==="<="){if(p=Nh(l,w,n),p===w&&p!==l)return!1}else if(l.operator==="<="&&!$i(l.semver,String(w),n))return!1}if(!w.operator&&(l||i)&&c!==0)return!1}return!(i&&h&&!l&&c!==0||l&&m&&!i&&c!==0||x||y)},Th=(t,e,n)=>{if(!t)return e;const o=dc(t.semver,e.semver,n);return o>0?t:o<0||e.operator===">"&&t.operator===">="?e:t},Nh=(t,e,n)=>{if(!t)return e;const o=dc(t.semver,e.semver,n);return o<0?t:o>0||e.operator==="<"&&t.operator==="<="?e:t};var MV=FV;const uc=Gi,Ah=zs,GV=Bt,Vh=sh,$V=Ao,zV=EA,UV=NA,ZV=AA,jV=VA,WV=PA,HV=DA,qV=FA,KV=LA,XV=vn,YV=GA,JV=zA,QV=ec,eB=ZA,tB=WA,nB=Ws,rB=tc,oB=mh,iB=gh,sB=nc,aB=rc,lB=yh,cB=aV,dB=Ks(),uB=_n();var pB={parse:$V,valid:zV,clean:UV,inc:ZV,diff:jV,major:WV,minor:HV,patch:qV,prerelease:KV,compare:XV,rcompare:YV,compareLoose:JV,compareBuild:QV,sort:eB,rsort:tB,gt:nB,lt:rB,eq:oB,neq:iB,gte:sB,lte:aB,cmp:lB,coerce:cB,Comparator:dB,Range:uB,satisfies:Xs,toComparators:uV,maxSatisfying:fV,minSatisfying:yV,minVersion:_V,validRange:wV,outside:ac,gtr:AV,ltr:BV,intersects:PV,simplifyRange:IV,subset:MV,SemVer:GV,re:uc.re,src:uc.src,tokens:uc.t,SEMVER_SPEC_VERSION:Ah.SEMVER_SPEC_VERSION,RELEASE_TYPES:Ah.RELEASE_TYPES,compareIdentifiers:Vh.compareIdentifiers,rcompareIdentifiers:Vh.rcompareIdentifiers};const hB=Yd(pB);function fB(t){return Gr(t.id)}function mB(t){switch(t){case"isNotNA":return"Is not NA";case"isNA":return"Is NA";case"number_equals":case"string_equals":return"Equals";case"number_notEquals":case"string_notEquals":return"Not equals";case"number_greaterThan":return"Greater than";case"number_greaterThanOrEqualTo":return"Greater than or equal to";case"number_lessThan":return"Less than";case"number_lessThanOrEqualTo":return"Less than or equal to";case"number_between":return"Between";case"string_contains":return"Contains";case"string_doesNotContain":return"Does not contain";case"string_matches":return"Matches";case"string_doesNotMatch":return"Does not match";case"string_containsFuzzyMatch":return"Contains fuzzy match";default:throw Error(`unsupported filter type: ${t}`)}}const gB=["isNotNA","isNA","number_equals","number_notEquals","number_greaterThan","number_greaterThanOrEqualTo","number_lessThan","number_lessThanOrEqualTo","number_between"],yB=["isNotNA","isNA","string_equals","string_notEquals","string_contains","string_doesNotContain","string_matches","string_doesNotMatch","string_containsFuzzyMatch"];function Bh(t,e){var n,o;return((o=(n=t.spec.annotations)==null?void 0:n["pl7.app/label"])==null?void 0:o.trim())??"Unlabeled "+t.type+" "+e.toString()}function vB(t){const e=t.type;switch(e){case"isNotNA":case"isNA":return;case"number_equals":case"number_notEquals":case"number_greaterThan":case"number_greaterThanOrEqualTo":case"number_lessThan":case"number_lessThanOrEqualTo":return t.reference;case"number_between":return t.lowerBound;case"string_equals":case"string_notEquals":case"string_contains":case"string_doesNotContain":case"string_matches":case"string_doesNotMatch":case"string_containsFuzzyMatch":return t.reference;default:throw Error(`unsupported filter type: ${e}`)}}function Ph(t,e){switch(t){case"isNotNA":case"isNA":return{type:t};case"number_equals":case"number_notEquals":case"number_greaterThan":case"number_greaterThanOrEqualTo":case"number_lessThan":case"number_lessThanOrEqualTo":return{type:t,reference:typeof e=="number"?e:0};case"number_between":return{type:t,lowerBound:typeof e=="number"?e:0,includeLowerBound:!0,upperBound:100,includeUpperBound:!1};case"string_equals":case"string_notEquals":case"string_contains":case"string_doesNotContain":case"string_matches":case"string_doesNotMatch":return{type:t,reference:typeof e=="string"?e:""};case"string_containsFuzzyMatch":return{type:t,reference:typeof e=="string"?e:"",maxEdits:2,substitutionsOnly:!1,wildcard:void 0};default:throw Error(`unsupported filter type: ${t}`)}}function _B(t,e){return{columnId:t.columnId,filter:Ph(e,vB(t.filter)),disabled:t.disabled}}function pc(t,e){var c,d;const n=Number(e);if(!Number.isFinite(n))throw Error("Model value is not a number.");const o=t.type==="column"?t.spec.valueType:t.spec.type;if((o==="Int"||o==="Long")&&!Number.isInteger(n))throw Error("Model value is not an integer.");const i=(c=t.spec.annotations)==null?void 0:c["pl7.app/min"];if(i!==void 0){const p=Number(i);if(Number.isFinite(p)&&n<Number(i))throw Error("Model value is too low.")}const l=(d=t.spec.annotations)==null?void 0:d["pl7.app/max"];if(l!==void 0){const p=Number(l);if(Number.isFinite(p)&&n>Number(l))throw Error("Model value is too high.")}return n}function Rh(t,e){var o,i;const n=((o=t.spec.domain)==null?void 0:o["pl7.app/alphabet"])??((i=t.spec.annotations)==null?void 0:i["pl7.app/alphabet"]);if(n==="nucleotide"&&!/^[AaTtGgCcNn]+$/.test(e))throw Error("Model value is not a nucleotide.");if(n==="aminoacid"&&!/^[AaCcDdEeFfGgHhIiKkLlMmNnPpQqRrSsTtVvWwYyXx]+$/.test(e))throw Error("Model value is not an aminoacid.");return e}function CB(t){try{return new RegExp(t),t}catch(e){throw e instanceof SyntaxError?Error("Model value is not a regexp."):e}}function wB(t,e){var i,l;const n=((i=t.spec.domain)==null?void 0:i["pl7.app/alphabet"])??((l=t.spec.annotations)==null?void 0:l["pl7.app/alphabet"]);if(n==="nucleotide")return[{value:"N",text:"N"}];if(n==="aminoacid")return[{value:"X",text:"X"}];const o=ze.uniq(e);return o.sort(),o.map(c=>({value:c,text:c}))}function bB(t,e){var i,l;const n=hB.gt(mu().sdkInfo.sdkVersion,"1.14.0")&&(t.type==="column"?t.spec.valueType:t.spec.type)==="String"&&(((i=t.spec.domain)==null?void 0:i["pl7.app/alphabet"])??((l=t.spec.annotations)==null?void 0:l["pl7.app/alphabet"]))!==void 0,o=e.type;switch(o){case"isNotNA":return{operator:"Not",operand:{operator:"IsNA"}};case"isNA":return{operator:"IsNA"};case"number_equals":return{operator:"Equal",reference:e.reference};case"string_equals":return{operator:n?"IEqual":"Equal",reference:e.reference};case"number_notEquals":return{operator:"Not",operand:{operator:"Equal",reference:e.reference}};case"string_notEquals":return{operator:"Not",operand:{operator:n?"IEqual":"Equal",reference:e.reference}};case"number_greaterThan":return{operator:"Greater",reference:e.reference};case"number_greaterThanOrEqualTo":return{operator:"GreaterOrEqual",reference:e.reference};case"number_lessThan":return{operator:"Less",reference:e.reference};case"number_lessThanOrEqualTo":return{operator:"LessOrEqual",reference:e.reference};case"number_between":return{operator:"And",operands:[{operator:e.includeLowerBound?"GreaterOrEqual":"Greater",reference:e.lowerBound},{operator:e.includeUpperBound?"LessOrEqual":"Less",reference:e.upperBound}]};case"string_contains":return{operator:n?"StringIContains":"StringContains",substring:e.reference};case"string_doesNotContain":return{operator:"Not",operand:{operator:n?"StringIContains":"StringContains",substring:e.reference}};case"string_matches":return{operator:"Matches",regex:e.reference};case"string_doesNotMatch":return{operator:"Not",operand:{operator:"Matches",regex:e.reference}};case"string_containsFuzzyMatch":return{operator:n?"StringIContainsFuzzy":"StringContainsFuzzy",reference:e.reference,maxEdits:e.maxEdits,substitutionsOnly:e.substitutionsOnly,wildcard:e.wildcard};default:throw Error(`unsupported filter type: ${o}`)}}const xB={class:"d-flex flex-column gap-24"},Dh=r.defineComponent({__name:"PlTableFilterEntry",props:r.mergeModels({column:{},options:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t,{column:o,options:i}=r.toRefs(n);return(l,c)=>(r.openBlock(),r.createElementBlock("div",xB,[r.createVNode(r.unref(wo),{"model-value":e.value.filter.type,options:r.unref(i),label:"Predicate","onUpdate:modelValue":c[0]||(c[0]=d=>e.value=r.unref(_B)(e.value,d))},null,8,["model-value","options"]),e.value.filter.type==="number_equals"||e.value.filter.type==="number_notEquals"||e.value.filter.type==="number_lessThan"||e.value.filter.type==="number_lessThanOrEqualTo"||e.value.filter.type==="number_greaterThan"||e.value.filter.type==="number_greaterThanOrEqualTo"?(r.openBlock(),r.createBlock(r.unref(jr),{key:0,modelValue:e.value.filter.reference,"onUpdate:modelValue":c[1]||(c[1]=d=>e.value.filter.reference=d),parse:d=>r.unref(pc)(r.unref(o),d),label:"Reference value"},null,8,["modelValue","parse"])):r.createCommentVNode("",!0),e.value.filter.type==="number_between"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:1},[r.createVNode(r.unref(jr),{modelValue:e.value.filter.lowerBound,"onUpdate:modelValue":c[2]||(c[2]=d=>e.value.filter.lowerBound=d),parse:d=>r.unref(pc)(r.unref(o),d),label:"Lower bound"},null,8,["modelValue","parse"]),r.createVNode(r.unref(Bs),{modelValue:e.value.filter.includeLowerBound,"onUpdate:modelValue":c[3]||(c[3]=d=>e.value.filter.includeLowerBound=d),label:"Include lower bound"},null,8,["modelValue"]),r.createVNode(r.unref(jr),{modelValue:e.value.filter.upperBound,"onUpdate:modelValue":c[4]||(c[4]=d=>e.value.filter.upperBound=d),parse:d=>r.unref(pc)(r.unref(o),d),label:"Upper bound"},null,8,["modelValue","parse"]),r.createVNode(r.unref(Bs),{modelValue:e.value.filter.includeUpperBound,"onUpdate:modelValue":c[5]||(c[5]=d=>e.value.filter.includeUpperBound=d),label:"Include upper bound"},null,8,["modelValue"])],64)):r.createCommentVNode("",!0),e.value.filter.type==="string_equals"||e.value.filter.type==="string_notEquals"||e.value.filter.type==="string_contains"||e.value.filter.type==="string_doesNotContain"?(r.openBlock(),r.createBlock(r.unref(jr),{key:2,modelValue:e.value.filter.reference,"onUpdate:modelValue":c[6]||(c[6]=d=>e.value.filter.reference=d),parse:d=>r.unref(Rh)(r.unref(o),d),label:"Reference value"},null,8,["modelValue","parse"])):r.createCommentVNode("",!0),e.value.filter.type==="string_matches"||e.value.filter.type==="string_doesNotMatch"?(r.openBlock(),r.createBlock(r.unref(jr),{key:3,modelValue:e.value.filter.reference,"onUpdate:modelValue":c[7]||(c[7]=d=>e.value.filter.reference=d),parse:r.unref(CB),label:"Reference value"},null,8,["modelValue","parse"])):r.createCommentVNode("",!0),e.value.filter.type==="string_containsFuzzyMatch"?(r.openBlock(),r.createElementBlock(r.Fragment,{key:4},[r.createVNode(r.unref(jr),{modelValue:e.value.filter.reference,"onUpdate:modelValue":c[8]||(c[8]=d=>e.value.filter.reference=d),parse:d=>r.unref(Rh)(r.unref(o),d),label:"Reference value"},null,8,["modelValue","parse"]),r.createVNode(r.unref(jp),{modelValue:e.value.filter.maxEdits,"onUpdate:modelValue":c[9]||(c[9]=d=>e.value.filter.maxEdits=d),max:5,breakpoints:"",label:"Maximum nuber of substitutions and indels"},null,8,["modelValue"]),r.createVNode(r.unref(Bs),{modelValue:e.value.filter.substitutionsOnly,"onUpdate:modelValue":c[10]||(c[10]=d=>e.value.filter.substitutionsOnly=d),label:"Substitutions only"},null,8,["modelValue"]),r.createVNode(r.unref(wo),{modelValue:e.value.filter.wildcard,"onUpdate:modelValue":c[11]||(c[11]=d=>e.value.filter.wildcard=d),options:r.unref(wB)(r.unref(o),e.value.filter.reference),clearable:"",label:"Wildcard symbol"},null,8,["modelValue","options"])],64)):r.createCommentVNode("",!0)]))}}),kB={class:"d-flex flex-column gap-24"},SB={key:0,class:"text-subtitle-m",style:{color:"var(--txt-mask)"}},EB=r.defineComponent({__name:"PlTableAddFilter",props:r.mergeModels({columnsById:{},columnOptions:{},filterOptions:{},makeFilter:{type:Function}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:r.mergeModels(["addFilter"],["update:modelValue"]),setup(t,{emit:e}){const n=r.useModel(t,"modelValue"),o=t,{columnsById:i,columnOptions:l,filterOptions:c}=r.toRefs(o),d=e,p=r.ref(),h=r.ref();r.watch(()=>p.value,x=>{x?h.value=o.makeFilter(x):h.value=void 0});const m=()=>{p.value=void 0,n.value=!1},y=()=>{h.value&&(d("addFilter",h.value),m())};return(x,w)=>(r.openBlock(),r.createBlock(r.unref(Vs),{modelValue:n.value,"onUpdate:modelValue":w[2]||(w[2]=S=>n.value=S),"close-on-outside-click":!1},{title:r.withCtx(()=>w[3]||(w[3]=[r.createTextVNode("Add Filter")])),actions:r.withCtx(()=>[r.createVNode(r.unref(Ns),{disabled:!h.value,onClick:y},{default:r.withCtx(()=>w[4]||(w[4]=[r.createTextVNode("Add Filter")])),_:1},8,["disabled"]),r.createVNode(r.unref(_o),{"justify-center":!1,onClick:m},{default:r.withCtx(()=>w[5]||(w[5]=[r.createTextVNode("Cancel")])),_:1})]),default:r.withCtx(()=>[r.createElementVNode("div",kB,[r.createVNode(r.unref(wo),{modelValue:p.value,"onUpdate:modelValue":w[0]||(w[0]=S=>p.value=S),options:r.unref(l),label:"Column",placeholder:"Choose..."},null,8,["modelValue","options"]),h.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",SB,"Choose a column to view and adjust its options")),h.value?(r.openBlock(),r.createBlock(Dh,{key:1,modelValue:h.value,"onUpdate:modelValue":w[1]||(w[1]=S=>h.value=S),column:r.unref(i)[h.value.columnId],options:r.unref(c)[h.value.columnId]},null,8,["modelValue","column","options"])):r.createCommentVNode("",!0)])]),_:1},8,["modelValue"]))}}),TB={class:"pl-filter-manager d-flex flex-column gap-6"},NB=["onClick"],AB={class:"pl-filter-manager__expand-icon"},VB={class:"pl-filter-manager__title flex-grow-1 text-s"},BB={class:"pl-filter-manager__actions d-flex gap-12"},PB=["onClick"],RB=["onClick"],DB={class:"pl-filter-manager__content d-flex gap-24 p-24 flex-column"},IB={class:"d-flex justify-center"},FB=["onClick"],OB={class:"pl-filter-manager__add-btn-icon"},LB={key:1},MB=r.defineComponent({__name:"PlTableFilters",props:r.mergeModels({columns:{},restrictions:{},defaults:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const e=r.useModel(t,"modelValue"),n=t,{columns:o,restrictions:i,defaults:l}=r.toRefs(n),c=r.computed(()=>{const j=o.value.filter(Z=>{const W=Z.type;switch(W){case"axis":return Z.spec.type!=="Bytes";case"column":return Z.spec.valueType!=="Bytes";default:throw Error(`unsupported data type: ${W}`)}}),$={};for(const Z of j)$[fB(Z)]=Z;return $}),d=r.computed(()=>{const j=i.value??[],$={};for(const[Z,W]of Object.entries(c.value)){const J=ze.find(j,he=>ze.isEqual(he.column.id,W.id));J&&($[Z]=J.allowedFilterTypes)}return $}),p=r.computed(()=>{const j=l.value??[],$={};for(const[Z,W]of Object.entries(c.value)){const J=ze.find(j,he=>ze.isEqual(he.column.id,W.id));J&&($[Z]={columnId:Z,filter:J.default,disabled:!1})}return $});(()=>{let j=e.value.state;typeof j=="object"&&!Array.isArray(j)&&(e.value.state=Object.entries(j).map(([$,Z])=>({columnId:$,filter:Z,disabled:!1})))})();const h=j=>j??Object.values(p.value),m=r.reactive({state:h(e.value.state)});r.watch(()=>e.value,j=>{ze.isEqual(m.state,j.state)||(m.state=h(j.state))}),r.watch(()=>m,j=>{ze.isEqual(j.state,e.value.state)||(e.value={state:ze.cloneDeep(j.state),filters:j.state.filter($=>!$.disabled).map($=>{const Z=c.value[$.columnId],{spec:W,...J}=Z;return{type:"bySingleColumnV2",column:J,predicate:bB(Z,$.filter)}})})},{immediate:!0,deep:!0}),r.watch(()=>c.value,j=>{Object.keys(j).length===0&&m.state!==void 0||(m.state=m.state.filter($=>!!j[$.columnId]))},{immediate:!0});const y=r.computed(()=>Object.keys(c).length>0&&m.state.length>0),x=r.computed(()=>{const j=d.value,$={};for(const[Z,W]of Object.entries(c.value)){let he=(W.type==="column"?W.spec.valueType:W.spec.type)==="String"?yB:gB;const B=j[Z];B&&(he=he.filter(C=>B.includes(C))),$[Z]=he.map(C=>({value:C,text:mB(C)}))}return $}),w=r.computed(()=>ze.some(Object.values(x.value),j=>j.length>0)),S=r.computed(()=>Object.entries(Object.entries(c.value)).filter(([j,[$,Z]])=>x.value[$].length>0).filter(([j,[$,Z]])=>!m.state.some(W=>W.columnId===$)).map(([j,[$,Z]])=>({label:Bh(Z,j),value:$}))),O=j=>p.value[j]??{columnId:j,filter:Ph(x.value[j][0].value),disabled:!1},G=j=>{m.state[j]=O(m.state[j].columnId)},b=j=>m.state.splice(j,1),R=r.ref(!1),F=r.ref(!1),D=r.ref(!1);r.onMounted(()=>{D.value=!0});const A=r.reactive({}),U=j=>{A[j]?delete A[j]:A[j]=!0};return(j,$)=>(r.openBlock(),r.createElementBlock(r.Fragment,null,[D.value?(r.openBlock(),r.createBlock(r.Teleport,{key:0,to:`#${r.unref(Yl)}`},[r.createVNode(r.unref(_o),{onClick:$[0]||($[0]=r.withModifiers(Z=>R.value=!0,["stop"]))},{append:r.withCtx(()=>[r.createVNode(r.unref(Ci),{name:y.value?"filter-on":"filter"},null,8,["name"])]),default:r.withCtx(()=>[$[5]||($[5]=r.createTextVNode(" Filters "))]),_:1})],8,["to"])):r.createCommentVNode("",!0),r.createVNode(r.unref(Vs),{modelValue:R.value,"onUpdate:modelValue":$[2]||($[2]=Z=>R.value=Z),"close-on-outside-click":!1},{title:r.withCtx(()=>$[6]||($[6]=[r.createTextVNode("Manage Filters")])),default:r.withCtx(()=>[r.createElementVNode("div",TB,[(r.openBlock(!0),r.createElementBlock(r.Fragment,null,r.renderList(m.state,(Z,W)=>(r.openBlock(),r.createElementBlock("div",{key:Z.columnId,class:r.normalizeClass([{open:A[Z.columnId]},"pl-filter-manager__filter"])},[r.createElementVNode("div",{class:"pl-filter-manager__header d-flex align-center gap-8",onClick:J=>U(Z.columnId)},[r.createElementVNode("div",AB,[r.createVNode(r.unref(fn),{name:"chevron-right"})]),r.createElementVNode("div",VB,r.toDisplayString(r.unref(Bh)(c.value[Z.columnId],W)),1),r.createElementVNode("div",BB,[r.createElementVNode("div",{class:"pl-filter-manager__toggle",onClick:r.withModifiers(J=>Z.disabled=!Z.disabled,["stop"])},[r.createVNode(r.unref(Lt),{name:Z.disabled?"view-hide":"view-show"},null,8,["name"])],8,PB),r.createElementVNode("div",{class:"pl-filter-manager__delete",onClick:r.withModifiers(J=>b(W),["stop"])},[r.createVNode(r.unref(Lt),{name:"close"})],8,RB)])],8,NB),r.createElementVNode("div",DB,[r.createVNode(Dh,{modelValue:m.state[W],"onUpdate:modelValue":J=>m.state[W]=J,column:c.value[Z.columnId],options:x.value[Z.columnId]},null,8,["modelValue","onUpdate:modelValue","column","options"]),r.createElementVNode("div",IB,[r.createElementVNode("div",{class:"pl-filter-manager__revert-btn text-s d-flex align-center gap-8",onClick:J=>G(W)},[$[7]||($[7]=r.createTextVNode(" Revert Settings to Default ")),r.createVNode(r.unref(Lt),{name:"reverse"})],8,FB)])])],2))),128)),S.value.length>0?(r.openBlock(),r.createElementBlock("div",{key:0,class:"pl-filter-manager__add-btn",onClick:$[1]||($[1]=Z=>F.value=!0)},[r.createElementVNode("div",OB,[r.createVNode(r.unref(fn),{name:"add"})]),$[8]||($[8]=r.createElementVNode("div",{class:"pl-filter-manager__add-btn-title"},"Add Filter",-1))])):r.createCommentVNode("",!0),w.value?r.createCommentVNode("",!0):(r.openBlock(),r.createElementBlock("div",LB,"No filters applicable"))])]),_:1},8,["modelValue"]),r.createVNode(EB,{modelValue:F.value,"onUpdate:modelValue":$[3]||($[3]=Z=>F.value=Z),"columns-by-id":c.value,"column-options":S.value,"filter-options":x.value,"make-filter":O,onAddFilter:$[4]||($[4]=Z=>m.state.push(Z))},null,8,["modelValue","columns-by-id","column-options","filter-options"])],64))}}),Ys=new Map;function GB(t,e){const n=r.getCurrentScope()??r.effectScope(),o=n.run(()=>(r.onScopeDispose(()=>{Ys.delete(t)}),r.reactive(e())));return o[Symbol.dispose]=()=>{n.stop()},o}function $B(t){const e=Symbol();return()=>(Ys.has(e)||Ys.set(e,GB(e,t)),Ys.get(e))}function zB(t){return r.computed(()=>{try{return Qd(t())}catch(e){return{errors:[String(e)],value:void 0}}})}function Ih(t,e,n){const o=r.ref(0),i=r.reactive({loading:r.computed(()=>o.value>0),loadingRef:o,value:void 0,error:void 0}),l=Ig(e);return r.watch(t,async c=>{i.error=void 0,o.value++,l(c).then(d=>{d.ok&&(i.value=d.value)}).catch(d=>{i.value=void 0,i.error=d}).finally(()=>{o.value--})},Object.assign({immediate:!0,deep:!0},n??{})),i}const Vo=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Fh=new Set,hc=typeof process=="object"&&process?process:{},Oh=(t,e,n,o)=>{typeof hc.emitWarning=="function"?hc.emitWarning(t,e,n,o):console.error(`[${n}] ${e}: ${t}`)};let Js=globalThis.AbortController,Lh=globalThis.AbortSignal;if(typeof Js>"u"){Lh=class{constructor(){We(this,"onabort");We(this,"_onabort",[]);We(this,"reason");We(this,"aborted",!1)}addEventListener(o,i){this._onabort.push(i)}},Js=class{constructor(){We(this,"signal",new Lh);e()}abort(o){var i,l;if(!this.signal.aborted){this.signal.reason=o,this.signal.aborted=!0;for(const c of this.signal._onabort)c(o);(l=(i=this.signal).onabort)==null||l.call(i,o)}}};let t=((Gh=hc.env)==null?void 0:Gh.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{t&&(t=!1,Oh("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}const UB=t=>!Fh.has(t),Er=t=>t&&t===Math.floor(t)&&t>0&&isFinite(t),Mh=t=>Er(t)?t<=Math.pow(2,8)?Uint8Array:t<=Math.pow(2,16)?Uint16Array:t<=Math.pow(2,32)?Uint32Array:t<=Number.MAX_SAFE_INTEGER?Qs:null:null;class Qs extends Array{constructor(e){super(e),this.fill(0)}}const Kr=class Kr{constructor(e,n){We(this,"heap");We(this,"length");if(!k(Kr,Bo))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new n(e),this.length=0}static create(e){const n=Mh(e);if(!n)return[];ye(Kr,Bo,!0);const o=new Kr(e,n);return ye(Kr,Bo,!1),o}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};Bo=new WeakMap,Ue(Kr,Bo,!1);let fc=Kr;const yc=class yc{constructor(e){Ue(this,re);Ue(this,Cn);Ue(this,Wt);Ue(this,wn);Ue(this,bn);Ue(this,Po);Ue(this,Ro);We(this,"ttl");We(this,"ttlResolution");We(this,"ttlAutopurge");We(this,"updateAgeOnGet");We(this,"updateAgeOnHas");We(this,"allowStale");We(this,"noDisposeOnSet");We(this,"noUpdateTTL");We(this,"maxEntrySize");We(this,"sizeCalculation");We(this,"noDeleteOnFetchRejection");We(this,"noDeleteOnStaleGet");We(this,"allowStaleOnFetchAbort");We(this,"allowStaleOnFetchRejection");We(this,"ignoreFetchAbort");Ue(this,pt);Ue(this,xn);Ue(this,dt);Ue(this,Je);Ue(this,Ee);Ue(this,Pt);Ue(this,Ht);Ue(this,Et);Ue(this,yt);Ue(this,kn);Ue(this,vt);Ue(this,Sn);Ue(this,En);Ue(this,qt);Ue(this,Tn);Ue(this,Tr);Ue(this,Rt);Ue(this,Xr,()=>{});Ue(this,Jn,()=>{});Ue(this,zi,()=>{});Ue(this,Kt,()=>!1);Ue(this,Yr,e=>{});Ue(this,Do,(e,n,o)=>{});Ue(this,Ui,(e,n,o,i)=>{if(o||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});We(this,$h,"LRUCache");const{max:n=0,ttl:o,ttlResolution:i=1,ttlAutopurge:l,updateAgeOnGet:c,updateAgeOnHas:d,allowStale:p,dispose:h,disposeAfter:m,noDisposeOnSet:y,noUpdateTTL:x,maxSize:w=0,maxEntrySize:S=0,sizeCalculation:O,fetchMethod:G,memoMethod:b,noDeleteOnFetchRejection:R,noDeleteOnStaleGet:F,allowStaleOnFetchRejection:D,allowStaleOnFetchAbort:A,ignoreFetchAbort:U}=e;if(n!==0&&!Er(n))throw new TypeError("max option must be a nonnegative integer");const j=n?Mh(n):Array;if(!j)throw new Error("invalid max value: "+n);if(ye(this,Cn,n),ye(this,Wt,w),this.maxEntrySize=S||k(this,Wt),this.sizeCalculation=O,this.sizeCalculation){if(!k(this,Wt)&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(b!==void 0&&typeof b!="function")throw new TypeError("memoMethod must be a function if defined");if(ye(this,Ro,b),G!==void 0&&typeof G!="function")throw new TypeError("fetchMethod must be a function if specified");if(ye(this,Po,G),ye(this,Tr,!!G),ye(this,dt,new Map),ye(this,Je,new Array(n).fill(void 0)),ye(this,Ee,new Array(n).fill(void 0)),ye(this,Pt,new j(n)),ye(this,Ht,new j(n)),ye(this,Et,0),ye(this,yt,0),ye(this,kn,fc.create(n)),ye(this,pt,0),ye(this,xn,0),typeof h=="function"&&ye(this,wn,h),typeof m=="function"?(ye(this,bn,m),ye(this,vt,[])):(ye(this,bn,void 0),ye(this,vt,void 0)),ye(this,Tn,!!k(this,wn)),ye(this,Rt,!!k(this,bn)),this.noDisposeOnSet=!!y,this.noUpdateTTL=!!x,this.noDeleteOnFetchRejection=!!R,this.allowStaleOnFetchRejection=!!D,this.allowStaleOnFetchAbort=!!A,this.ignoreFetchAbort=!!U,this.maxEntrySize!==0){if(k(this,Wt)!==0&&!Er(k(this,Wt)))throw new TypeError("maxSize must be a positive integer if specified");if(!Er(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");ue(this,re,xg).call(this)}if(this.allowStale=!!p,this.noDeleteOnStaleGet=!!F,this.updateAgeOnGet=!!c,this.updateAgeOnHas=!!d,this.ttlResolution=Er(i)||i===0?i:1,this.ttlAutopurge=!!l,this.ttl=o||0,this.ttl){if(!Er(this.ttl))throw new TypeError("ttl must be a positive integer if specified");ue(this,re,Gd).call(this)}if(k(this,Cn)===0&&this.ttl===0&&k(this,Wt)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!k(this,Cn)&&!k(this,Wt)){const $="LRU_CACHE_UNBOUNDED";UB($)&&(Fh.add($),Oh("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",$,yc))}}static unsafeExposeInternals(e){return{starts:k(e,En),ttls:k(e,qt),sizes:k(e,Sn),keyMap:k(e,dt),keyList:k(e,Je),valList:k(e,Ee),next:k(e,Pt),prev:k(e,Ht),get head(){return k(e,Et)},get tail(){return k(e,yt)},free:k(e,kn),isBackgroundFetch:n=>{var o;return ue(o=e,re,et).call(o,n)},backgroundFetch:(n,o,i,l)=>{var c;return ue(c=e,re,Ha).call(c,n,o,i,l)},moveToTail:n=>{var o;return ue(o=e,re,ps).call(o,n)},indexes:n=>{var o;return ue(o=e,re,Or).call(o,n)},rindexes:n=>{var o;return ue(o=e,re,Lr).call(o,n)},isStale:n=>{var o;return k(o=e,Kt).call(o,n)}}}get max(){return k(this,Cn)}get maxSize(){return k(this,Wt)}get calculatedSize(){return k(this,xn)}get size(){return k(this,pt)}get fetchMethod(){return k(this,Po)}get memoMethod(){return k(this,Ro)}get dispose(){return k(this,wn)}get disposeAfter(){return k(this,bn)}getRemainingTTL(e){return k(this,dt).has(e)?1/0:0}*entries(){for(const e of ue(this,re,Or).call(this))k(this,Ee)[e]!==void 0&&k(this,Je)[e]!==void 0&&!ue(this,re,et).call(this,k(this,Ee)[e])&&(yield[k(this,Je)[e],k(this,Ee)[e]])}*rentries(){for(const e of ue(this,re,Lr).call(this))k(this,Ee)[e]!==void 0&&k(this,Je)[e]!==void 0&&!ue(this,re,et).call(this,k(this,Ee)[e])&&(yield[k(this,Je)[e],k(this,Ee)[e]])}*keys(){for(const e of ue(this,re,Or).call(this)){const n=k(this,Je)[e];n!==void 0&&!ue(this,re,et).call(this,k(this,Ee)[e])&&(yield n)}}*rkeys(){for(const e of ue(this,re,Lr).call(this)){const n=k(this,Je)[e];n!==void 0&&!ue(this,re,et).call(this,k(this,Ee)[e])&&(yield n)}}*values(){for(const e of ue(this,re,Or).call(this))k(this,Ee)[e]!==void 0&&!ue(this,re,et).call(this,k(this,Ee)[e])&&(yield k(this,Ee)[e])}*rvalues(){for(const e of ue(this,re,Lr).call(this))k(this,Ee)[e]!==void 0&&!ue(this,re,et).call(this,k(this,Ee)[e])&&(yield k(this,Ee)[e])}[(zh=Symbol.iterator,$h=Symbol.toStringTag,zh)](){return this.entries()}find(e,n={}){for(const o of ue(this,re,Or).call(this)){const i=k(this,Ee)[o],l=ue(this,re,et).call(this,i)?i.__staleWhileFetching:i;if(l!==void 0&&e(l,k(this,Je)[o],this))return this.get(k(this,Je)[o],n)}}forEach(e,n=this){for(const o of ue(this,re,Or).call(this)){const i=k(this,Ee)[o],l=ue(this,re,et).call(this,i)?i.__staleWhileFetching:i;l!==void 0&&e.call(n,l,k(this,Je)[o],this)}}rforEach(e,n=this){for(const o of ue(this,re,Lr).call(this)){const i=k(this,Ee)[o],l=ue(this,re,et).call(this,i)?i.__staleWhileFetching:i;l!==void 0&&e.call(n,l,k(this,Je)[o],this)}}purgeStale(){let e=!1;for(const n of ue(this,re,Lr).call(this,{allowStale:!0}))k(this,Kt).call(this,n)&&(ue(this,re,Mr).call(this,k(this,Je)[n],"expire"),e=!0);return e}info(e){const n=k(this,dt).get(e);if(n===void 0)return;const o=k(this,Ee)[n],i=ue(this,re,et).call(this,o)?o.__staleWhileFetching:o;if(i===void 0)return;const l={value:i};if(k(this,qt)&&k(this,En)){const c=k(this,qt)[n],d=k(this,En)[n];if(c&&d){const p=c-(Vo.now()-d);l.ttl=p,l.start=Date.now()}}return k(this,Sn)&&(l.size=k(this,Sn)[n]),l}dump(){const e=[];for(const n of ue(this,re,Or).call(this,{allowStale:!0})){const o=k(this,Je)[n],i=k(this,Ee)[n],l=ue(this,re,et).call(this,i)?i.__staleWhileFetching:i;if(l===void 0||o===void 0)continue;const c={value:l};if(k(this,qt)&&k(this,En)){c.ttl=k(this,qt)[n];const d=Vo.now()-k(this,En)[n];c.start=Math.floor(Date.now()-d)}k(this,Sn)&&(c.size=k(this,Sn)[n]),e.unshift([o,c])}return e}load(e){this.clear();for(const[n,o]of e){if(o.start){const i=Date.now()-o.start;o.start=Vo.now()-i}this.set(n,o.value,o)}}set(e,n,o={}){var x,w,S,O,G;if(n===void 0)return this.delete(e),this;const{ttl:i=this.ttl,start:l,noDisposeOnSet:c=this.noDisposeOnSet,sizeCalculation:d=this.sizeCalculation,status:p}=o;let{noUpdateTTL:h=this.noUpdateTTL}=o;const m=k(this,Ui).call(this,e,n,o.size||0,d);if(this.maxEntrySize&&m>this.maxEntrySize)return p&&(p.set="miss",p.maxEntrySizeExceeded=!0),ue(this,re,Mr).call(this,e,"set"),this;let y=k(this,pt)===0?void 0:k(this,dt).get(e);if(y===void 0)y=k(this,pt)===0?k(this,yt):k(this,kn).length!==0?k(this,kn).pop():k(this,pt)===k(this,Cn)?ue(this,re,Wa).call(this,!1):k(this,pt),k(this,Je)[y]=e,k(this,Ee)[y]=n,k(this,dt).set(e,y),k(this,Pt)[k(this,yt)]=y,k(this,Ht)[y]=k(this,yt),ye(this,yt,y),ja(this,pt)._++,k(this,Do).call(this,y,m,p),p&&(p.set="add"),h=!1;else{ue(this,re,ps).call(this,y);const b=k(this,Ee)[y];if(n!==b){if(k(this,Tr)&&ue(this,re,et).call(this,b)){b.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:R}=b;R!==void 0&&!c&&(k(this,Tn)&&((x=k(this,wn))==null||x.call(this,R,e,"set")),k(this,Rt)&&((w=k(this,vt))==null||w.push([R,e,"set"])))}else c||(k(this,Tn)&&((S=k(this,wn))==null||S.call(this,b,e,"set")),k(this,Rt)&&((O=k(this,vt))==null||O.push([b,e,"set"])));if(k(this,Yr).call(this,y),k(this,Do).call(this,y,m,p),k(this,Ee)[y]=n,p){p.set="replace";const R=b&&ue(this,re,et).call(this,b)?b.__staleWhileFetching:b;R!==void 0&&(p.oldValue=R)}}else p&&(p.set="update")}if(i!==0&&!k(this,qt)&&ue(this,re,Gd).call(this),k(this,qt)&&(h||k(this,zi).call(this,y,i,l),p&&k(this,Jn).call(this,p,y)),!c&&k(this,Rt)&&k(this,vt)){const b=k(this,vt);let R;for(;R=b==null?void 0:b.shift();)(G=k(this,bn))==null||G.call(this,...R)}return this}pop(){var e;try{for(;k(this,pt);){const n=k(this,Ee)[k(this,Et)];if(ue(this,re,Wa).call(this,!0),ue(this,re,et).call(this,n)){if(n.__staleWhileFetching)return n.__staleWhileFetching}else if(n!==void 0)return n}}finally{if(k(this,Rt)&&k(this,vt)){const n=k(this,vt);let o;for(;o=n==null?void 0:n.shift();)(e=k(this,bn))==null||e.call(this,...o)}}}has(e,n={}){const{updateAgeOnHas:o=this.updateAgeOnHas,status:i}=n,l=k(this,dt).get(e);if(l!==void 0){const c=k(this,Ee)[l];if(ue(this,re,et).call(this,c)&&c.__staleWhileFetching===void 0)return!1;if(k(this,Kt).call(this,l))i&&(i.has="stale",k(this,Jn).call(this,i,l));else return o&&k(this,Xr).call(this,l),i&&(i.has="hit",k(this,Jn).call(this,i,l)),!0}else i&&(i.has="miss");return!1}peek(e,n={}){const{allowStale:o=this.allowStale}=n,i=k(this,dt).get(e);if(i===void 0||!o&&k(this,Kt).call(this,i))return;const l=k(this,Ee)[i];return ue(this,re,et).call(this,l)?l.__staleWhileFetching:l}async fetch(e,n={}){const{allowStale:o=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,ttl:c=this.ttl,noDisposeOnSet:d=this.noDisposeOnSet,size:p=0,sizeCalculation:h=this.sizeCalculation,noUpdateTTL:m=this.noUpdateTTL,noDeleteOnFetchRejection:y=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:x=this.allowStaleOnFetchRejection,ignoreFetchAbort:w=this.ignoreFetchAbort,allowStaleOnFetchAbort:S=this.allowStaleOnFetchAbort,context:O,forceRefresh:G=!1,status:b,signal:R}=n;if(!k(this,Tr))return b&&(b.fetch="get"),this.get(e,{allowStale:o,updateAgeOnGet:i,noDeleteOnStaleGet:l,status:b});const F={allowStale:o,updateAgeOnGet:i,noDeleteOnStaleGet:l,ttl:c,noDisposeOnSet:d,size:p,sizeCalculation:h,noUpdateTTL:m,noDeleteOnFetchRejection:y,allowStaleOnFetchRejection:x,allowStaleOnFetchAbort:S,ignoreFetchAbort:w,status:b,signal:R};let D=k(this,dt).get(e);if(D===void 0){b&&(b.fetch="miss");const A=ue(this,re,Ha).call(this,e,D,F,O);return A.__returned=A}else{const A=k(this,Ee)[D];if(ue(this,re,et).call(this,A)){const W=o&&A.__staleWhileFetching!==void 0;return b&&(b.fetch="inflight",W&&(b.returnedStale=!0)),W?A.__staleWhileFetching:A.__returned=A}const U=k(this,Kt).call(this,D);if(!G&&!U)return b&&(b.fetch="hit"),ue(this,re,ps).call(this,D),i&&k(this,Xr).call(this,D),b&&k(this,Jn).call(this,b,D),A;const j=ue(this,re,Ha).call(this,e,D,F,O),Z=j.__staleWhileFetching!==void 0&&o;return b&&(b.fetch=U?"stale":"refresh",Z&&U&&(b.returnedStale=!0)),Z?j.__staleWhileFetching:j.__returned=j}}async forceFetch(e,n={}){const o=await this.fetch(e,n);if(o===void 0)throw new Error("fetch() returned undefined");return o}memo(e,n={}){const o=k(this,Ro);if(!o)throw new Error("no memoMethod provided to constructor");const{context:i,forceRefresh:l,...c}=n,d=this.get(e,c);if(!l&&d!==void 0)return d;const p=o(e,d,{options:c,context:i});return this.set(e,p,c),p}get(e,n={}){const{allowStale:o=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,status:c}=n,d=k(this,dt).get(e);if(d!==void 0){const p=k(this,Ee)[d],h=ue(this,re,et).call(this,p);return c&&k(this,Jn).call(this,c,d),k(this,Kt).call(this,d)?(c&&(c.get="stale"),h?(c&&o&&p.__staleWhileFetching!==void 0&&(c.returnedStale=!0),o?p.__staleWhileFetching:void 0):(l||ue(this,re,Mr).call(this,e,"expire"),c&&o&&(c.returnedStale=!0),o?p:void 0)):(c&&(c.get="hit"),h?p.__staleWhileFetching:(ue(this,re,ps).call(this,d),i&&k(this,Xr).call(this,d),p))}else c&&(c.get="miss")}delete(e){return ue(this,re,Mr).call(this,e,"delete")}clear(){return ue(this,re,Ud).call(this,"delete")}};Cn=new WeakMap,Wt=new WeakMap,wn=new WeakMap,bn=new WeakMap,Po=new WeakMap,Ro=new WeakMap,pt=new WeakMap,xn=new WeakMap,dt=new WeakMap,Je=new WeakMap,Ee=new WeakMap,Pt=new WeakMap,Ht=new WeakMap,Et=new WeakMap,yt=new WeakMap,kn=new WeakMap,vt=new WeakMap,Sn=new WeakMap,En=new WeakMap,qt=new WeakMap,Tn=new WeakMap,Tr=new WeakMap,Rt=new WeakMap,re=new WeakSet,Gd=function(){const e=new Qs(k(this,Cn)),n=new Qs(k(this,Cn));ye(this,qt,e),ye(this,En,n),ye(this,zi,(l,c,d=Vo.now())=>{if(n[l]=c!==0?d:0,e[l]=c,c!==0&&this.ttlAutopurge){const p=setTimeout(()=>{k(this,Kt).call(this,l)&&ue(this,re,Mr).call(this,k(this,Je)[l],"expire")},c+1);p.unref&&p.unref()}}),ye(this,Xr,l=>{n[l]=e[l]!==0?Vo.now():0}),ye(this,Jn,(l,c)=>{if(e[c]){const d=e[c],p=n[c];if(!d||!p)return;l.ttl=d,l.start=p,l.now=o||i();const h=l.now-p;l.remainingTTL=d-h}});let o=0;const i=()=>{const l=Vo.now();if(this.ttlResolution>0){o=l;const c=setTimeout(()=>o=0,this.ttlResolution);c.unref&&c.unref()}return l};this.getRemainingTTL=l=>{const c=k(this,dt).get(l);if(c===void 0)return 0;const d=e[c],p=n[c];if(!d||!p)return 1/0;const h=(o||i())-p;return d-h},ye(this,Kt,l=>{const c=n[l],d=e[l];return!!d&&!!c&&(o||i())-c>d})},Xr=new WeakMap,Jn=new WeakMap,zi=new WeakMap,Kt=new WeakMap,xg=function(){const e=new Qs(k(this,Cn));ye(this,xn,0),ye(this,Sn,e),ye(this,Yr,n=>{ye(this,xn,k(this,xn)-e[n]),e[n]=0}),ye(this,Ui,(n,o,i,l)=>{if(ue(this,re,et).call(this,o))return 0;if(!Er(i))if(l){if(typeof l!="function")throw new TypeError("sizeCalculation must be a function");if(i=l(o,n),!Er(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i}),ye(this,Do,(n,o,i)=>{if(e[n]=o,k(this,Wt)){const l=k(this,Wt)-e[n];for(;k(this,xn)>l;)ue(this,re,Wa).call(this,!0)}ye(this,xn,k(this,xn)+e[n]),i&&(i.entrySize=o,i.totalCalculatedSize=k(this,xn))})},Yr=new WeakMap,Do=new WeakMap,Ui=new WeakMap,Or=function*({allowStale:e=this.allowStale}={}){if(k(this,pt))for(let n=k(this,yt);!(!ue(this,re,$d).call(this,n)||((e||!k(this,Kt).call(this,n))&&(yield n),n===k(this,Et)));)n=k(this,Ht)[n]},Lr=function*({allowStale:e=this.allowStale}={}){if(k(this,pt))for(let n=k(this,Et);!(!ue(this,re,$d).call(this,n)||((e||!k(this,Kt).call(this,n))&&(yield n),n===k(this,yt)));)n=k(this,Pt)[n]},$d=function(e){return e!==void 0&&k(this,dt).get(k(this,Je)[e])===e},Wa=function(e){var l,c;const n=k(this,Et),o=k(this,Je)[n],i=k(this,Ee)[n];return k(this,Tr)&&ue(this,re,et).call(this,i)?i.__abortController.abort(new Error("evicted")):(k(this,Tn)||k(this,Rt))&&(k(this,Tn)&&((l=k(this,wn))==null||l.call(this,i,o,"evict")),k(this,Rt)&&((c=k(this,vt))==null||c.push([i,o,"evict"]))),k(this,Yr).call(this,n),e&&(k(this,Je)[n]=void 0,k(this,Ee)[n]=void 0,k(this,kn).push(n)),k(this,pt)===1?(ye(this,Et,ye(this,yt,0)),k(this,kn).length=0):ye(this,Et,k(this,Pt)[n]),k(this,dt).delete(o),ja(this,pt)._--,n},Ha=function(e,n,o,i){const l=n===void 0?void 0:k(this,Ee)[n];if(ue(this,re,et).call(this,l))return l;const c=new Js,{signal:d}=o;d==null||d.addEventListener("abort",()=>c.abort(d.reason),{signal:c.signal});const p={signal:c.signal,options:o,context:i},h=(O,G=!1)=>{const{aborted:b}=c.signal,R=o.ignoreFetchAbort&&O!==void 0;if(o.status&&(b&&!G?(o.status.fetchAborted=!0,o.status.fetchError=c.signal.reason,R&&(o.status.fetchAbortIgnored=!0)):o.status.fetchResolved=!0),b&&!R&&!G)return y(c.signal.reason);const F=w;return k(this,Ee)[n]===w&&(O===void 0?F.__staleWhileFetching?k(this,Ee)[n]=F.__staleWhileFetching:ue(this,re,Mr).call(this,e,"fetch"):(o.status&&(o.status.fetchUpdated=!0),this.set(e,O,p.options))),O},m=O=>(o.status&&(o.status.fetchRejected=!0,o.status.fetchError=O),y(O)),y=O=>{const{aborted:G}=c.signal,b=G&&o.allowStaleOnFetchAbort,R=b||o.allowStaleOnFetchRejection,F=R||o.noDeleteOnFetchRejection,D=w;if(k(this,Ee)[n]===w&&(!F||D.__staleWhileFetching===void 0?ue(this,re,Mr).call(this,e,"fetch"):b||(k(this,Ee)[n]=D.__staleWhileFetching)),R)return o.status&&D.__staleWhileFetching!==void 0&&(o.status.returnedStale=!0),D.__staleWhileFetching;if(D.__returned===D)throw O},x=(O,G)=>{var R;const b=(R=k(this,Po))==null?void 0:R.call(this,e,l,p);b&&b instanceof Promise&&b.then(F=>O(F===void 0?void 0:F),G),c.signal.addEventListener("abort",()=>{(!o.ignoreFetchAbort||o.allowStaleOnFetchAbort)&&(O(void 0),o.allowStaleOnFetchAbort&&(O=F=>h(F,!0)))})};o.status&&(o.status.fetchDispatched=!0);const w=new Promise(x).then(h,m),S=Object.assign(w,{__abortController:c,__staleWhileFetching:l,__returned:void 0});return n===void 0?(this.set(e,S,{...p.options,status:void 0}),n=k(this,dt).get(e)):k(this,Ee)[n]=S,S},et=function(e){if(!k(this,Tr))return!1;const n=e;return!!n&&n instanceof Promise&&n.hasOwnProperty("__staleWhileFetching")&&n.__abortController instanceof Js},zd=function(e,n){k(this,Ht)[n]=e,k(this,Pt)[e]=n},ps=function(e){e!==k(this,yt)&&(e===k(this,Et)?ye(this,Et,k(this,Pt)[e]):ue(this,re,zd).call(this,k(this,Ht)[e],k(this,Pt)[e]),ue(this,re,zd).call(this,k(this,yt),e),ye(this,yt,e))},Mr=function(e,n){var i,l,c,d;let o=!1;if(k(this,pt)!==0){const p=k(this,dt).get(e);if(p!==void 0)if(o=!0,k(this,pt)===1)ue(this,re,Ud).call(this,n);else{k(this,Yr).call(this,p);const h=k(this,Ee)[p];if(ue(this,re,et).call(this,h)?h.__abortController.abort(new Error("deleted")):(k(this,Tn)||k(this,Rt))&&(k(this,Tn)&&((i=k(this,wn))==null||i.call(this,h,e,n)),k(this,Rt)&&((l=k(this,vt))==null||l.push([h,e,n]))),k(this,dt).delete(e),k(this,Je)[p]=void 0,k(this,Ee)[p]=void 0,p===k(this,yt))ye(this,yt,k(this,Ht)[p]);else if(p===k(this,Et))ye(this,Et,k(this,Pt)[p]);else{const m=k(this,Ht)[p];k(this,Pt)[m]=k(this,Pt)[p];const y=k(this,Pt)[p];k(this,Ht)[y]=k(this,Ht)[p]}ja(this,pt)._--,k(this,kn).push(p)}}if(k(this,Rt)&&((c=k(this,vt))!=null&&c.length)){const p=k(this,vt);let h;for(;h=p==null?void 0:p.shift();)(d=k(this,bn))==null||d.call(this,...h)}return o},Ud=function(e){var n,o,i;for(const l of ue(this,re,Lr).call(this,{allowStale:!0})){const c=k(this,Ee)[l];if(ue(this,re,et).call(this,c))c.__abortController.abort(new Error("deleted"));else{const d=k(this,Je)[l];k(this,Tn)&&((n=k(this,wn))==null||n.call(this,c,d,e)),k(this,Rt)&&((o=k(this,vt))==null||o.push([c,d,e]))}}if(k(this,dt).clear(),k(this,Ee).fill(void 0),k(this,Je).fill(void 0),k(this,qt)&&k(this,En)&&(k(this,qt).fill(0),k(this,En).fill(0)),k(this,Sn)&&k(this,Sn).fill(0),ye(this,Et,0),ye(this,yt,0),k(this,kn).length=0,ye(this,xn,0),ye(this,pt,0),k(this,Rt)&&k(this,vt)){const l=k(this,vt);let c;for(;c=l==null?void 0:l.shift();)(i=k(this,bn))==null||i.call(this,...c)}};let mc=yc;const ZB={cacheSize:15e6};class jB{constructor(e){We(this,"_str");We(this,"_rawJson");We(this,"_zodSchema");We(this,"_validatedJson");this.bytes=e}get str(){return this._str===void 0&&(this._str=new TextDecoder().decode(this.bytes)),this._str}get rawJson(){return this._rawJson===void 0&&(this._rawJson=JSON.parse(this.str)),this._rawJson}validatedJson(e){return this._zodSchema!==e&&(this._validatedJson=e.parse(this.rawJson),this._zodSchema=e),this._validatedJson}}const Jr=class Jr{constructor(e){We(this,"fileDataCache");We(this,"fileDataRefs",new Map);const n={...ZB,...e??{}};this.fileDataCache=new mc({maxSize:n.cacheSize,fetchMethod:async o=>new jB(await mu().blobDriver.getContent(o)),sizeCalculation:o=>o.bytes.length,dispose:(o,i)=>{this.fileDataRefs.delete(i)}})}getDataRef(e){const n=this.fileDataRefs.get(e);if(n!==void 0)return n;const o=r.shallowRef();return this.fileDataRefs.set(e,o),(async()=>{try{const i=await this.fileDataCache.fetch(e);o.value=i}catch(i){console.error(i)}})(),o}getContentBytes(e){if(e===void 0)return;const n=this.getDataRef(e);return r.computed(()=>{var o;return(o=n.value)==null?void 0:o.bytes})}getContentString(e){if(e===void 0)return;const n=this.getDataRef(e);return r.computed(()=>{var o;return(o=n==null?void 0:n.value)==null?void 0:o.str})}getContentJson(e,n){if(e===void 0)return;const o=this.getDataRef(e);return r.computed(()=>{var i,l;return n===void 0?(i=o==null?void 0:o.value)==null?void 0:i.rawJson:(l=o==null?void 0:o.value)==null?void 0:l.validatedJson(n)})}static getContentBytes(e){return Jr.globalInstance.getContentBytes(e)}static getContentString(e){return Jr.globalInstance.getContentString(e)}static getContentJson(e,n){return Jr.globalInstance.getContentJson(e,n)}};We(Jr,"globalInstance",new Jr);let gc=Jr;L.AgGridTheme=Mu,L.BlockLayout=GN,L.ContextProvider=SE,L.DataTable=p0,L.DemoData=SN,L.DropdownListItem=yo,L.LongText=Ml,L.MultiError=Xa,L.PlAccordion=Bk,L.PlAccordionSection=Gk,L.PlAgCellFile=fA,L.PlAgDataTable=cA,L.PlAgDataTableToolsPanel=sA,L.PlAgGridColumnManager=nh,L.PlAgOverlayLoading=Kp,L.PlAgOverlayNoRows=Xp,L.PlAgTextAndButtonCell=yA,L.PlAlert=U0,L.PlBlockPage=A0,L.PlBtnAccent=aw,L.PlBtnDanger=cw,L.PlBtnGhost=_o,L.PlBtnGroup=dp,L.PlBtnLink=hw,L.PlBtnPrimary=Ns,L.PlBtnSecondary=Pl,L.PlBtnSplit=nw,L.PlCheckbox=Gx,L.PlCheckboxGroup=Zx,L.PlChip=Gl,L.PlContainer=B0,L.PlDialogModal=zl,L.PlDropdown=wo,L.PlDropdownLegacy=ux,L.PlDropdownLine=Cp,L.PlDropdownMulti=Lx,L.PlDropdownRef=Gb,L.PlEditableTitle=Ow,L.PlFileDialog=Tp,L.PlFileInput=Up,L.PlGrid=O0,L.PlIcon16=Co,L.PlIcon24=Ci,L.PlLogView=bp,L.PlMaskIcon16=fn,L.PlMaskIcon24=Lt,L.PlNotificationAlert=Zp,L.PlNumberField=xx,L.PlProgressBar=gx,L.PlRow=R0,L.PlSearchField=gp,L.PlSectionSeparator=xp,L.PlSlideModal=Vs,L.PlSpacer=lp,L.PlTableFilters=MB,L.PlTabs=Sk,L.PlTextArea=Cb,L.PlTextField=jr,L.PlToggleSwitch=Bs,L.PlTooltip=xt,L.ReactiveFileContent=gc,L.Scrollable=f1,L.Slider=jp,L.SliderRange=d1,L.SliderRangeTriple=JE,L.ThemeSwitcher=b0,L.UnresolvedError=Ka,L.ValueOrErrorsComponent=pA,L.activateAgGrid=Lu,L.animate=np,L.animateInfinite=y0,L.call=Yu,L.computedResult=zB,L.createModel=nl,L.debounce=rp,L.defineApp=$_,L.defineStore=$B,L.delay=Ju,L.detectOutside=wb,L.ensureError=Qa,L.eventListener=Ol,L.formatZodError=tl,L.getElementScrollPosition=vp,L.identity=Ja,L.isDefined=Mg,L.isElementVisible=yp,L.isJsonEqual=Ya,L.isZodError=el,L.listToOptions=v0,L.makeEaseInOut=g0,L.makeEaseOut=tp,L.maskIcons16=xN,L.maskIcons24=kN,L.normalizeListOptions=yr,L.notEmpty=Tl,L.randomInt=ep,L.randomString=m0,L.requestTick=Nl,L.scrollIntoView=wi,L.showContextMenu=kl,L.throttle=op,L.timeout=Qu,L.unwrapOptionalResult=Lg,L.unwrapValueOrErrors=Jd,L.useClickOutside=As,L.useDraggable=$E,L.useEventListener=st,L.useFormState=ME,L.useHover=Ku,L.useInterval=LE,L.useLabelNotch=Xn,L.useLocalStorage=ip,L.useMouse=qu,L.useMouseCapture=gr,L.usePosition=vo,L.useQuery=GE,L.useResizeObserver=Wp,L.useScroll=FE,L.useSdkPlugin=_l,L.useSortable=qp,L.useTheme=ap,L.useWatchFetch=Ih,L.wrapOptionalResult=Qd,L.wrapValueOrErrors=Og,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
|