@platforma-sdk/ui-vue 1.30.26 → 1.30.37
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 +9 -0
- package/dist/assets/chemical-properties.worker-thYtrBDn.js.map +1 -0
- package/dist/lib.js +11619 -10406
- package/dist/lib.js.map +1 -1
- package/dist/lib.umd.cjs +36 -29
- package/dist/lib.umd.cjs.map +1 -1
- package/dist/src/components/PlAgDataTable/PlAgDataTable.vue.d.ts +2 -1
- package/dist/src/components/PlAgDataTable/PlAgDataTable.vue.d.ts.map +1 -1
- package/dist/src/components/PlAgDataTable/PlAgDataTableV2.vue.d.ts +12 -12
- package/dist/src/components/PlAgDataTable/PlAgDataTableV2.vue.d.ts.map +1 -1
- package/dist/src/components/PlAgDataTable/sources/common.d.ts +6 -16
- package/dist/src/components/PlAgDataTable/sources/common.d.ts.map +1 -1
- package/dist/src/components/PlAgDataTable/sources/table-source-v2.d.ts +13 -4
- package/dist/src/components/PlAgDataTable/sources/table-source-v2.d.ts.map +1 -1
- package/dist/src/components/PlAgDataTable/sources/table-source.d.ts +12 -3
- package/dist/src/components/PlAgDataTable/sources/table-source.d.ts.map +1 -1
- package/dist/src/components/PlAgDataTable/types.d.ts +25 -5
- package/dist/src/components/PlAgDataTable/types.d.ts.map +1 -1
- package/dist/src/components/PlMultiSequenceAlignment/MultiSequenceAlignmentView.vue.d.ts +8 -0
- package/dist/src/components/PlMultiSequenceAlignment/MultiSequenceAlignmentView.vue.d.ts.map +1 -0
- package/dist/src/components/PlMultiSequenceAlignment/PlMultiSequenceAlignment.vue.d.ts +40 -0
- package/dist/src/components/PlMultiSequenceAlignment/PlMultiSequenceAlignment.vue.d.ts.map +1 -0
- package/dist/src/components/PlMultiSequenceAlignment/data.d.ts +86 -0
- package/dist/src/components/PlMultiSequenceAlignment/data.d.ts.map +1 -0
- package/dist/src/components/PlMultiSequenceAlignment/highlight/chemical-properties.d.ts +19 -0
- package/dist/src/components/PlMultiSequenceAlignment/highlight/chemical-properties.d.ts.map +1 -0
- package/dist/src/components/PlMultiSequenceAlignment/highlight/chemical-properties.worker.d.ts +9 -0
- package/dist/src/components/PlMultiSequenceAlignment/highlight/chemical-properties.worker.d.ts.map +1 -0
- package/dist/src/components/PlMultiSequenceAlignment/highlight/index.d.ts +7 -0
- package/dist/src/components/PlMultiSequenceAlignment/highlight/index.d.ts.map +1 -0
- package/dist/src/components/PlMultiSequenceAlignment/highlight/types.d.ts +6 -0
- package/dist/src/components/PlMultiSequenceAlignment/highlight/types.d.ts.map +1 -0
- package/dist/src/components/PlMultiSequenceAlignment/index.d.ts +2 -0
- package/dist/src/components/PlMultiSequenceAlignment/index.d.ts.map +1 -0
- package/dist/src/components/PlMultiSequenceAlignment/multi-sequence-alignment.d.ts +7 -0
- package/dist/src/components/PlMultiSequenceAlignment/multi-sequence-alignment.d.ts.map +1 -0
- package/dist/src/components/PlMultiSequenceAlignment/types.d.ts +6 -0
- package/dist/src/components/PlMultiSequenceAlignment/types.d.ts.map +1 -0
- package/dist/src/lib.d.ts +1 -0
- 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 +14 -12
- package/src/components/PlAgDataTable/PlAgDataTable.vue +8 -7
- package/src/components/PlAgDataTable/PlAgDataTableV2.vue +157 -86
- package/src/components/PlAgDataTable/sources/common.ts +7 -101
- package/src/components/PlAgDataTable/sources/table-source-v2.ts +106 -11
- package/src/components/PlAgDataTable/sources/table-source.ts +95 -2
- package/src/components/PlAgDataTable/types.ts +29 -5
- package/src/components/PlMultiSequenceAlignment/MultiSequenceAlignmentView.vue +135 -0
- package/src/components/PlMultiSequenceAlignment/PlMultiSequenceAlignment.vue +173 -0
- package/src/components/PlMultiSequenceAlignment/data.ts +404 -0
- package/src/components/PlMultiSequenceAlignment/highlight/chemical-properties.ts +72 -0
- package/src/components/PlMultiSequenceAlignment/highlight/chemical-properties.worker.ts +191 -0
- package/src/components/PlMultiSequenceAlignment/highlight/index.ts +25 -0
- package/src/components/PlMultiSequenceAlignment/highlight/types.ts +5 -0
- package/src/components/PlMultiSequenceAlignment/index.ts +1 -0
- package/src/components/PlMultiSequenceAlignment/multi-sequence-alignment.ts +134 -0
- package/src/components/PlMultiSequenceAlignment/types.ts +5 -0
- package/src/lib.ts +2 -0
- package/src/vite-env.d.ts +13 -0
- package/tsconfig.lib.json +3 -1
- package/vite.config.ts +5 -2
- package/vitest.config.ts +7 -0
package/dist/lib.umd.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(function(L,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("ag-grid-enterprise"),require("ag-grid-vue3")):typeof define=="function"&&define.amd?define(["exports","vue","ag-grid-enterprise","ag-grid-vue3"],t):(L=typeof globalThis<"u"?globalThis:L||self,t(L.SdkVueLib={},L.Vue,L.agGridEnterprise,L.agGridVue3))})(this,function(L,t,$e,ro){"use strict";var R9=Object.defineProperty;var nw=L=>{throw TypeError(L)};var O9=(L,t,$e)=>t in L?R9(L,t,{enumerable:!0,configurable:!0,writable:!0,value:$e}):L[t]=$e;var We=(L,t,$e)=>O9(L,typeof t!="symbol"?t+"":t,$e),np=(L,t,$e)=>t.has(L)||nw("Cannot "+$e);var T=(L,t,$e)=>(np(L,t,"read from private field"),$e?$e.call(L):t.get(L)),Le=(L,t,$e)=>t.has(L)?nw("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(L):t.set(L,$e),ge=(L,t,$e,ro)=>(np(L,t,"write to private field"),ro?ro.call(L,$e):t.set(L,$e),$e),de=(L,t,$e)=>(np(L,t,"access private method"),$e);var vc=(L,t,$e,ro)=>({set _(Sc){ge(L,t,Sc,$e)},get _(){return T(L,t,ro)}});var mt,xy,sa,vy,Cy,An,en,$n,wo,Rn,la,ca,yt,On,gt,Qe,Se,Mt,tn,Tt,bt,In,kt,Dn,Mn,nn,Pn,Zr,Pt,da,re,rp,bo,fr,Oi,rn,rw,ko,ua,Ii,eo,to,op,Cc,Ec,tt,ap,os,no,ip;var Sc=Object.defineProperty,ow=(n,e,r)=>e in n?Sc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,Nc=(n,e,r)=>ow(n,typeof e!="symbol"?e+"":e,r);function aw(n,e){if(n==null)throw Error(e??"Empty (null | undefined) value");return n}let as=class{constructor(){Nc(this,"promise"),Nc(this,"resolve",()=>{}),Nc(this,"reject",()=>{}),this.promise=new Promise((e,r)=>{this.resolve=e,this.reject=r})}};function iw(n,e){if(n!=null)return e(n)}function sw(n,e){return n=Math.ceil(n),e=Math.floor(e),Math.floor(Math.random()*(e-n))+n}function lw(n){let e="";for(let r=0;r<n;r++)e+=String.fromCharCode(sw(65,91));return e}function cw(){return lw(42)}const is=Array.isArray;function sp(n){return n!==null&&typeof n=="object"}function Na(n){if(typeof n!="object"||n===null)return!1;const e=Object.getPrototypeOf(n);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null}function lp(n){return Object.values(n).reduce((e,r)=>r!==void 0?e+1:e,0)}function Ut(n,e){if(!(sp(n)&&sp(e)))return n===e;if(is(n)&&is(e))return n.length!==e.length?!1:[...n.keys()].every(r=>Ut(n[r],e[r]));if(Na(n)&&Na(e))return lp(n)!==lp(e)?!1:Object.keys(n).every(r=>Ut(n[r],e[r]));throw Error(`Cannot compare a ${String(n)} and b ${String(e)}`)}function Wn(n){if(Array.isArray(n)){const e=[];for(let r=0;r<n.length;r++)e[r]=Wn(n[r]);return e}else if(Na(n)){const e={};return Object.keys(n).forEach(r=>{e[r]=Wn(n[r])}),e}else return n}function cp(n,e){return new Set([...Object.keys(n),...Object.keys(e)]).forEach(r=>{const o=n[r],a=e[r];Na(o)&&Na(a)||is(o)&&is(a)&&o.length===a.length?cp(o,a):n[r]=a}),n}var Ba=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Bc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var dw=function n(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?n(e.toJSON()):Array.isArray(e)?`[${e.reduce((a,s,c)=>`${a}${c===0?"":","}${n(s===void 0||typeof s=="symbol"?null:s)}`,"")}]`:`{${Object.keys(e).sort().reduce((o,a)=>{if(e[a]===void 0||typeof e[a]=="symbol")return o;const s=o.length===0?"":",";return`${o}${s}${n(a)}:${n(e[a])}`},"")}}`};const vr=Bc(dw);var je;(function(n){n.assertEqual=a=>a;function e(a){}n.assertIs=e;function r(a){throw new Error}n.assertNever=r,n.arrayToEnum=a=>{const s={};for(const c of a)s[c]=c;return s},n.getValidEnumValues=a=>{const s=n.objectKeys(a).filter(d=>typeof a[a[d]]!="number"),c={};for(const d of s)c[d]=a[d];return n.objectValues(c)},n.objectValues=a=>n.objectKeys(a).map(function(s){return a[s]}),n.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const s=[];for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&s.push(c);return s},n.find=(a,s)=>{for(const c of a)if(s(c))return c},n.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function o(a,s=" | "){return a.map(c=>typeof c=="string"?`'${c}'`:c).join(s)}n.joinValues=o,n.jsonStringifyReplacer=(a,s)=>typeof s=="bigint"?s.toString():s})(je||(je={}));var Vc;(function(n){n.mergeShapes=(e,r)=>({...e,...r})})(Vc||(Vc={}));const se=je.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Cr=n=>{switch(typeof n){case"undefined":return se.undefined;case"string":return se.string;case"number":return isNaN(n)?se.nan:se.number;case"boolean":return se.boolean;case"function":return se.function;case"bigint":return se.bigint;case"symbol":return se.symbol;case"object":return Array.isArray(n)?se.array:n===null?se.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?se.promise:typeof Map<"u"&&n instanceof Map?se.map:typeof Set<"u"&&n instanceof Set?se.set:typeof Date<"u"&&n instanceof Date?se.date:se.object;default:return se.unknown}},te=je.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"]),uw=n=>JSON.stringify(n,null,2).replace(/"([^"]+)":/g,"$1:");class Xt extends Error{constructor(e){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const r=e||function(s){return s.message},o={_errors:[]},a=s=>{for(const c of s.issues)if(c.code==="invalid_union")c.unionErrors.map(a);else if(c.code==="invalid_return_type")a(c.returnTypeError);else if(c.code==="invalid_arguments")a(c.argumentsError);else if(c.path.length===0)o._errors.push(r(c));else{let d=o,u=0;for(;u<c.path.length;){const p=c.path[u];u===c.path.length-1?(d[p]=d[p]||{_errors:[]},d[p]._errors.push(r(c))):d[p]=d[p]||{_errors:[]},d=d[p],u++}}};return a(this),o}static assert(e){if(!(e instanceof Xt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,je.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},o=[];for(const a of this.issues)a.path.length>0?(r[a.path[0]]=r[a.path[0]]||[],r[a.path[0]].push(e(a))):o.push(e(a));return{formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}}Xt.create=n=>new Xt(n);const $o=(n,e)=>{let r;switch(n.code){case te.invalid_type:n.received===se.undefined?r="Required":r=`Expected ${n.expected}, received ${n.received}`;break;case te.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(n.expected,je.jsonStringifyReplacer)}`;break;case te.unrecognized_keys:r=`Unrecognized key(s) in object: ${je.joinValues(n.keys,", ")}`;break;case te.invalid_union:r="Invalid input";break;case te.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${je.joinValues(n.options)}`;break;case te.invalid_enum_value:r=`Invalid enum value. Expected ${je.joinValues(n.options)}, received '${n.received}'`;break;case te.invalid_arguments:r="Invalid function arguments";break;case te.invalid_return_type:r="Invalid function return type";break;case te.invalid_date:r="Invalid date";break;case te.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(r=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?r=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?r=`Invalid input: must end with "${n.validation.endsWith}"`:je.assertNever(n.validation):n.validation!=="regex"?r=`Invalid ${n.validation}`:r="Invalid";break;case te.too_small:n.type==="array"?r=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?r=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?r=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?r=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:r="Invalid input";break;case te.too_big:n.type==="array"?r=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?r=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?r=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?r=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?r=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:r="Invalid input";break;case te.custom:r="Invalid input";break;case te.invalid_intersection_types:r="Intersection results could not be merged";break;case te.not_multiple_of:r=`Number must be a multiple of ${n.multipleOf}`;break;case te.not_finite:r="Number must be finite";break;default:r=e.defaultError,je.assertNever(n)}return{message:r}};let dp=$o;function fw(n){dp=n}function ss(){return dp}const ls=n=>{const{data:e,path:r,errorMaps:o,issueData:a}=n,s=[...r,...a.path||[]],c={...a,path:s};if(a.message!==void 0)return{...a,path:s,message:a.message};let d="";const u=o.filter(p=>!!p).slice().reverse();for(const p of u)d=p(c,{data:e,defaultError:d}).message;return{...a,path:s,message:d}},pw=[];function ae(n,e){const r=ss(),o=ls({issueData:e,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,r,r===$o?void 0:$o].filter(a=>!!a)});n.common.issues.push(o)}class Nt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const o=[];for(const a of r){if(a.status==="aborted")return ve;a.status==="dirty"&&e.dirty(),o.push(a.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,r){const o=[];for(const a of r){const s=await a.key,c=await a.value;o.push({key:s,value:c})}return Nt.mergeObjectSync(e,o)}static mergeObjectSync(e,r){const o={};for(const a of r){const{key:s,value:c}=a;if(s.status==="aborted"||c.status==="aborted")return ve;s.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof c.value<"u"||a.alwaysSet)&&(o[s.value]=c.value)}return{status:e.value,value:o}}}const ve=Object.freeze({status:"aborted"}),Ro=n=>({status:"dirty",value:n}),Rt=n=>({status:"valid",value:n}),Tc=n=>n.status==="aborted",Ac=n=>n.status==="dirty",Va=n=>n.status==="valid",Ta=n=>typeof Promise<"u"&&n instanceof Promise;function cs(n,e,r,o){if(typeof e=="function"?n!==e||!o:!e.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(n)}function up(n,e,r,o,a){if(typeof e=="function"?n!==e||!a:!e.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(n,r),r}typeof SuppressedError=="function"&&SuppressedError;var he;(function(n){n.errToObj=e=>typeof e=="string"?{message:e}:e||{},n.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(he||(he={}));var Aa,$a;class Hn{constructor(e,r,o,a){this._cachedPath=[],this.parent=e,this.data=r,this._path=o,this._key=a}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 fp=(n,e)=>{if(Va(e))return{success:!0,data:e.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Xt(n.common.issues);return this._error=r,this._error}}};function Ve(n){if(!n)return{};const{errorMap:e,invalid_type_error:r,required_error:o,description:a}=n;if(e&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(c,d)=>{var u,p;const{message:h}=n;return c.code==="invalid_enum_value"?{message:h??d.defaultError}:typeof d.data>"u"?{message:(u=h??o)!==null&&u!==void 0?u:d.defaultError}:c.code!=="invalid_type"?{message:d.defaultError}:{message:(p=h??r)!==null&&p!==void 0?p:d.defaultError}},description:a}}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 Cr(e.data)}_getOrReturnCtx(e,r){return r||{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 Nt,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 r=this._parse(e);if(Ta(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const o=this.safeParse(e,r);if(o.success)return o.data;throw o.error}safeParse(e,r){var o;const a={common:{issues:[],async:(o=r==null?void 0:r.async)!==null&&o!==void 0?o:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Cr(e)},s=this._parseSync({data:e,path:a.path,parent:a});return fp(a,s)}async parseAsync(e,r){const o=await this.safeParseAsync(e,r);if(o.success)return o.data;throw o.error}async safeParseAsync(e,r){const o={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Cr(e)},a=this._parse({data:e,path:o.path,parent:o}),s=await(Ta(a)?a:Promise.resolve(a));return fp(o,s)}refine(e,r){const o=a=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(a):r;return this._refinement((a,s)=>{const c=e(a),d=()=>s.addIssue({code:te.custom,...o(a)});return typeof Promise<"u"&&c instanceof Promise?c.then(u=>u?!0:(d(),!1)):c?!0:(d(),!1)})}refinement(e,r){return this._refinement((o,a)=>e(o)?!0:(a.addIssue(typeof r=="function"?r(o,a):r),!1))}_refinement(e){return new xn({schema:this,typeName:ke.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Gn.create(this,this._def)}nullable(){return Br.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return kn.create(this,this._def)}promise(){return Mo.create(this,this._def)}or(e){return Da.create([this,e],this._def)}and(e){return Ma.create(this,e,this._def)}transform(e){return new xn({...Ve(this._def),schema:this,typeName:ke.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new Ua({...Ve(this._def),innerType:this,defaultValue:r,typeName:ke.ZodDefault})}brand(){return new Oc({typeName:ke.ZodBranded,type:this,...Ve(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new ja({...Ve(this._def),innerType:this,catchValue:r,typeName:ke.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Za.create(this,e)}readonly(){return Wa.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const hw=/^c[^\s-]{8,}$/i,mw=/^[0-9a-z]+$/,gw=/^[0-9A-HJKMNP-TV-Z]{26}$/,yw=/^[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,_w=/^[a-z0-9_-]{21}$/i,ww=/^[-+]?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)?)??$/,bw=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,kw="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let $c;const xw=/^(?:(?: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])$/,vw=/^(([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})))$/,Cw=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,pp="((\\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])))",Ew=new RegExp(`^${pp}$`);function hp(n){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return n.precision?e=`${e}\\.\\d{${n.precision}}`:n.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Sw(n){return new RegExp(`^${hp(n)}$`)}function mp(n){let e=`${pp}T${hp(n)}`;const r=[];return r.push(n.local?"Z?":"Z"),n.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function Nw(n,e){return!!((e==="v4"||!e)&&xw.test(n)||(e==="v6"||!e)&&vw.test(n))}class bn extends Re{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==se.string){const s=this._getOrReturnCtx(e);return ae(s,{code:te.invalid_type,expected:se.string,received:s.parsedType}),ve}const o=new Nt;let a;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(a=this._getOrReturnCtx(e,a),ae(a,{code:te.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),o.dirty());else if(s.kind==="max")e.data.length>s.value&&(a=this._getOrReturnCtx(e,a),ae(a,{code:te.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),o.dirty());else if(s.kind==="length"){const c=e.data.length>s.value,d=e.data.length<s.value;(c||d)&&(a=this._getOrReturnCtx(e,a),c?ae(a,{code:te.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):d&&ae(a,{code:te.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),o.dirty())}else if(s.kind==="email")bw.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"email",code:te.invalid_string,message:s.message}),o.dirty());else if(s.kind==="emoji")$c||($c=new RegExp(kw,"u")),$c.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"emoji",code:te.invalid_string,message:s.message}),o.dirty());else if(s.kind==="uuid")yw.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"uuid",code:te.invalid_string,message:s.message}),o.dirty());else if(s.kind==="nanoid")_w.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"nanoid",code:te.invalid_string,message:s.message}),o.dirty());else if(s.kind==="cuid")hw.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"cuid",code:te.invalid_string,message:s.message}),o.dirty());else if(s.kind==="cuid2")mw.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"cuid2",code:te.invalid_string,message:s.message}),o.dirty());else if(s.kind==="ulid")gw.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"ulid",code:te.invalid_string,message:s.message}),o.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),ae(a,{validation:"url",code:te.invalid_string,message:s.message}),o.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"regex",code:te.invalid_string,message:s.message}),o.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(a=this._getOrReturnCtx(e,a),ae(a,{code:te.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),o.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)||(a=this._getOrReturnCtx(e,a),ae(a,{code:te.invalid_string,validation:{startsWith:s.value},message:s.message}),o.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(a=this._getOrReturnCtx(e,a),ae(a,{code:te.invalid_string,validation:{endsWith:s.value},message:s.message}),o.dirty()):s.kind==="datetime"?mp(s).test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{code:te.invalid_string,validation:"datetime",message:s.message}),o.dirty()):s.kind==="date"?Ew.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{code:te.invalid_string,validation:"date",message:s.message}),o.dirty()):s.kind==="time"?Sw(s).test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{code:te.invalid_string,validation:"time",message:s.message}),o.dirty()):s.kind==="duration"?ww.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"duration",code:te.invalid_string,message:s.message}),o.dirty()):s.kind==="ip"?Nw(e.data,s.version)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"ip",code:te.invalid_string,message:s.message}),o.dirty()):s.kind==="base64"?Cw.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"base64",code:te.invalid_string,message:s.message}),o.dirty()):je.assertNever(s);return{status:o.value,value:e.data}}_regex(e,r,o){return this.refinement(a=>e.test(a),{validation:r,code:te.invalid_string,...he.errToObj(o)})}_addCheck(e){return new bn({...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 r,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:(r=e==null?void 0:e.offset)!==null&&r!==void 0?r:!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,r){return this._addCheck({kind:"regex",regex:e,...he.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...he.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...he.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...he.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...he.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...he.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...he.errToObj(r)})}nonempty(e){return this.min(1,he.errToObj(e))}trim(){return new bn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new bn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new bn({...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 r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}bn.create=n=>{var e;return new bn({checks:[],typeName:ke.ZodString,coerce:(e=n==null?void 0:n.coerce)!==null&&e!==void 0?e:!1,...Ve(n)})};function Bw(n,e){const r=(n.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,a=r>o?r:o,s=parseInt(n.toFixed(a).replace(".","")),c=parseInt(e.toFixed(a).replace(".",""));return s%c/Math.pow(10,a)}class Er 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)!==se.number){const s=this._getOrReturnCtx(e);return ae(s,{code:te.invalid_type,expected:se.number,received:s.parsedType}),ve}let o;const a=new Nt;for(const s of this._def.checks)s.kind==="int"?je.isInteger(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{code:te.invalid_type,expected:"integer",received:"float",message:s.message}),a.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(o=this._getOrReturnCtx(e,o),ae(o,{code:te.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(o=this._getOrReturnCtx(e,o),ae(o,{code:te.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):s.kind==="multipleOf"?Bw(e.data,s.value)!==0&&(o=this._getOrReturnCtx(e,o),ae(o,{code:te.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{code:te.not_finite,message:s.message}),a.dirty()):je.assertNever(s);return{status:a.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,he.toString(r))}gt(e,r){return this.setLimit("min",e,!1,he.toString(r))}lte(e,r){return this.setLimit("max",e,!0,he.toString(r))}lt(e,r){return this.setLimit("max",e,!1,he.toString(r))}setLimit(e,r,o,a){return new Er({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:o,message:he.toString(a)}]})}_addCheck(e){return new Er({...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,r){return this._addCheck({kind:"multipleOf",value:e,message:he.toString(r)})}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 r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&je.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(e===null||o.value<e)&&(e=o.value)}return Number.isFinite(r)&&Number.isFinite(e)}}Er.create=n=>new Er({checks:[],typeName:ke.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...Ve(n)});class Sr 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)!==se.bigint){const s=this._getOrReturnCtx(e);return ae(s,{code:te.invalid_type,expected:se.bigint,received:s.parsedType}),ve}let o;const a=new Nt;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(o=this._getOrReturnCtx(e,o),ae(o,{code:te.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(o=this._getOrReturnCtx(e,o),ae(o,{code:te.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(o=this._getOrReturnCtx(e,o),ae(o,{code:te.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):je.assertNever(s);return{status:a.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,he.toString(r))}gt(e,r){return this.setLimit("min",e,!1,he.toString(r))}lte(e,r){return this.setLimit("max",e,!0,he.toString(r))}lt(e,r){return this.setLimit("max",e,!1,he.toString(r))}setLimit(e,r,o,a){return new Sr({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:o,message:he.toString(a)}]})}_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: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,r){return this._addCheck({kind:"multipleOf",value:e,message:he.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}Sr.create=n=>{var e;return new Sr({checks:[],typeName:ke.ZodBigInt,coerce:(e=n==null?void 0:n.coerce)!==null&&e!==void 0?e:!1,...Ve(n)})};class Ra extends Re{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==se.boolean){const o=this._getOrReturnCtx(e);return ae(o,{code:te.invalid_type,expected:se.boolean,received:o.parsedType}),ve}return Rt(e.data)}}Ra.create=n=>new Ra({typeName:ke.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...Ve(n)});class oo extends Re{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==se.date){const s=this._getOrReturnCtx(e);return ae(s,{code:te.invalid_type,expected:se.date,received:s.parsedType}),ve}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return ae(s,{code:te.invalid_date}),ve}const o=new Nt;let a;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(a=this._getOrReturnCtx(e,a),ae(a,{code:te.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),o.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(a=this._getOrReturnCtx(e,a),ae(a,{code:te.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),o.dirty()):je.assertNever(s);return{status:o.value,value:new Date(e.data.getTime())}}_addCheck(e){return new oo({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:he.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:he.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}oo.create=n=>new oo({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:ke.ZodDate,...Ve(n)});class ds extends Re{_parse(e){if(this._getType(e)!==se.symbol){const o=this._getOrReturnCtx(e);return ae(o,{code:te.invalid_type,expected:se.symbol,received:o.parsedType}),ve}return Rt(e.data)}}ds.create=n=>new ds({typeName:ke.ZodSymbol,...Ve(n)});class Oa extends Re{_parse(e){if(this._getType(e)!==se.undefined){const o=this._getOrReturnCtx(e);return ae(o,{code:te.invalid_type,expected:se.undefined,received:o.parsedType}),ve}return Rt(e.data)}}Oa.create=n=>new Oa({typeName:ke.ZodUndefined,...Ve(n)});class Ia extends Re{_parse(e){if(this._getType(e)!==se.null){const o=this._getOrReturnCtx(e);return ae(o,{code:te.invalid_type,expected:se.null,received:o.parsedType}),ve}return Rt(e.data)}}Ia.create=n=>new Ia({typeName:ke.ZodNull,...Ve(n)});class Oo extends Re{constructor(){super(...arguments),this._any=!0}_parse(e){return Rt(e.data)}}Oo.create=n=>new Oo({typeName:ke.ZodAny,...Ve(n)});class ao extends Re{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Rt(e.data)}}ao.create=n=>new ao({typeName:ke.ZodUnknown,...Ve(n)});class ar extends Re{_parse(e){const r=this._getOrReturnCtx(e);return ae(r,{code:te.invalid_type,expected:se.never,received:r.parsedType}),ve}}ar.create=n=>new ar({typeName:ke.ZodNever,...Ve(n)});class us extends Re{_parse(e){if(this._getType(e)!==se.undefined){const o=this._getOrReturnCtx(e);return ae(o,{code:te.invalid_type,expected:se.void,received:o.parsedType}),ve}return Rt(e.data)}}us.create=n=>new us({typeName:ke.ZodVoid,...Ve(n)});class kn extends Re{_parse(e){const{ctx:r,status:o}=this._processInputParams(e),a=this._def;if(r.parsedType!==se.array)return ae(r,{code:te.invalid_type,expected:se.array,received:r.parsedType}),ve;if(a.exactLength!==null){const c=r.data.length>a.exactLength.value,d=r.data.length<a.exactLength.value;(c||d)&&(ae(r,{code:c?te.too_big:te.too_small,minimum:d?a.exactLength.value:void 0,maximum:c?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),o.dirty())}if(a.minLength!==null&&r.data.length<a.minLength.value&&(ae(r,{code:te.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),o.dirty()),a.maxLength!==null&&r.data.length>a.maxLength.value&&(ae(r,{code:te.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((c,d)=>a.type._parseAsync(new Hn(r,c,r.path,d)))).then(c=>Nt.mergeArray(o,c));const s=[...r.data].map((c,d)=>a.type._parseSync(new Hn(r,c,r.path,d)));return Nt.mergeArray(o,s)}get element(){return this._def.type}min(e,r){return new kn({...this._def,minLength:{value:e,message:he.toString(r)}})}max(e,r){return new kn({...this._def,maxLength:{value:e,message:he.toString(r)}})}length(e,r){return new kn({...this._def,exactLength:{value:e,message:he.toString(r)}})}nonempty(e){return this.min(1,e)}}kn.create=(n,e)=>new kn({type:n,minLength:null,maxLength:null,exactLength:null,typeName:ke.ZodArray,...Ve(e)});function Io(n){if(n instanceof rt){const e={};for(const r in n.shape){const o=n.shape[r];e[r]=Gn.create(Io(o))}return new rt({...n._def,shape:()=>e})}else return n instanceof kn?new kn({...n._def,type:Io(n.element)}):n instanceof Gn?Gn.create(Io(n.unwrap())):n instanceof Br?Br.create(Io(n.unwrap())):n instanceof qn?qn.create(n.items.map(e=>Io(e))):n}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(),r=je.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==se.object){const p=this._getOrReturnCtx(e);return ae(p,{code:te.invalid_type,expected:se.object,received:p.parsedType}),ve}const{status:o,ctx:a}=this._processInputParams(e),{shape:s,keys:c}=this._getCached(),d=[];if(!(this._def.catchall instanceof ar&&this._def.unknownKeys==="strip"))for(const p in a.data)c.includes(p)||d.push(p);const u=[];for(const p of c){const h=s[p],g=a.data[p];u.push({key:{status:"valid",value:p},value:h._parse(new Hn(a,g,a.path,p)),alwaysSet:p in a.data})}if(this._def.catchall instanceof ar){const p=this._def.unknownKeys;if(p==="passthrough")for(const h of d)u.push({key:{status:"valid",value:h},value:{status:"valid",value:a.data[h]}});else if(p==="strict")d.length>0&&(ae(a,{code:te.unrecognized_keys,keys:d}),o.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const h of d){const g=a.data[h];u.push({key:{status:"valid",value:h},value:p._parse(new Hn(a,g,a.path,h)),alwaysSet:h in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const p=[];for(const h of u){const g=await h.key,y=await h.value;p.push({key:g,value:y,alwaysSet:h.alwaysSet})}return p}).then(p=>Nt.mergeObjectSync(o,p)):Nt.mergeObjectSync(o,u)}get shape(){return this._def.shape()}strict(e){return he.errToObj,new rt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,o)=>{var a,s,c,d;const u=(c=(s=(a=this._def).errorMap)===null||s===void 0?void 0:s.call(a,r,o).message)!==null&&c!==void 0?c:o.defaultError;return r.code==="unrecognized_keys"?{message:(d=he.errToObj(e).message)!==null&&d!==void 0?d:u}:{message:u}}}:{}})}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:ke.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new rt({...this._def,catchall:e})}pick(e){const r={};return je.objectKeys(e).forEach(o=>{e[o]&&this.shape[o]&&(r[o]=this.shape[o])}),new rt({...this._def,shape:()=>r})}omit(e){const r={};return je.objectKeys(this.shape).forEach(o=>{e[o]||(r[o]=this.shape[o])}),new rt({...this._def,shape:()=>r})}deepPartial(){return Io(this)}partial(e){const r={};return je.objectKeys(this.shape).forEach(o=>{const a=this.shape[o];e&&!e[o]?r[o]=a:r[o]=a.optional()}),new rt({...this._def,shape:()=>r})}required(e){const r={};return je.objectKeys(this.shape).forEach(o=>{if(e&&!e[o])r[o]=this.shape[o];else{let s=this.shape[o];for(;s instanceof Gn;)s=s._def.innerType;r[o]=s}}),new rt({...this._def,shape:()=>r})}keyof(){return gp(je.objectKeys(this.shape))}}rt.create=(n,e)=>new rt({shape:()=>n,unknownKeys:"strip",catchall:ar.create(),typeName:ke.ZodObject,...Ve(e)}),rt.strictCreate=(n,e)=>new rt({shape:()=>n,unknownKeys:"strict",catchall:ar.create(),typeName:ke.ZodObject,...Ve(e)}),rt.lazycreate=(n,e)=>new rt({shape:n,unknownKeys:"strip",catchall:ar.create(),typeName:ke.ZodObject,...Ve(e)});class Da extends Re{_parse(e){const{ctx:r}=this._processInputParams(e),o=this._def.options;function a(s){for(const d of s)if(d.result.status==="valid")return d.result;for(const d of s)if(d.result.status==="dirty")return r.common.issues.push(...d.ctx.common.issues),d.result;const c=s.map(d=>new Xt(d.ctx.common.issues));return ae(r,{code:te.invalid_union,unionErrors:c}),ve}if(r.common.async)return Promise.all(o.map(async s=>{const c={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:c}),ctx:c}})).then(a);{let s;const c=[];for(const u of o){const p={...r,common:{...r.common,issues:[]},parent:null},h=u._parseSync({data:r.data,path:r.path,parent:p});if(h.status==="valid")return h;h.status==="dirty"&&!s&&(s={result:h,ctx:p}),p.common.issues.length&&c.push(p.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;const d=c.map(u=>new Xt(u));return ae(r,{code:te.invalid_union,unionErrors:d}),ve}}get options(){return this._def.options}}Da.create=(n,e)=>new Da({options:n,typeName:ke.ZodUnion,...Ve(e)});const ir=n=>n instanceof La?ir(n.schema):n instanceof xn?ir(n.innerType()):n instanceof Fa?[n.value]:n instanceof Nr?n.options:n instanceof za?je.objectValues(n.enum):n instanceof Ua?ir(n._def.innerType):n instanceof Oa?[void 0]:n instanceof Ia?[null]:n instanceof Gn?[void 0,...ir(n.unwrap())]:n instanceof Br?[null,...ir(n.unwrap())]:n instanceof Oc||n instanceof Wa?ir(n.unwrap()):n instanceof ja?ir(n._def.innerType):[];class fs extends Re{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==se.object)return ae(r,{code:te.invalid_type,expected:se.object,received:r.parsedType}),ve;const o=this.discriminator,a=r.data[o],s=this.optionsMap.get(a);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(ae(r,{code:te.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),ve)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,o){const a=new Map;for(const s of r){const c=ir(s.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(a.has(d))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(d)}`);a.set(d,s)}}return new fs({typeName:ke.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:a,...Ve(o)})}}function Rc(n,e){const r=Cr(n),o=Cr(e);if(n===e)return{valid:!0,data:n};if(r===se.object&&o===se.object){const a=je.objectKeys(e),s=je.objectKeys(n).filter(d=>a.indexOf(d)!==-1),c={...n,...e};for(const d of s){const u=Rc(n[d],e[d]);if(!u.valid)return{valid:!1};c[d]=u.data}return{valid:!0,data:c}}else if(r===se.array&&o===se.array){if(n.length!==e.length)return{valid:!1};const a=[];for(let s=0;s<n.length;s++){const c=n[s],d=e[s],u=Rc(c,d);if(!u.valid)return{valid:!1};a.push(u.data)}return{valid:!0,data:a}}else return r===se.date&&o===se.date&&+n==+e?{valid:!0,data:n}:{valid:!1}}class Ma extends Re{_parse(e){const{status:r,ctx:o}=this._processInputParams(e),a=(s,c)=>{if(Tc(s)||Tc(c))return ve;const d=Rc(s.value,c.value);return d.valid?((Ac(s)||Ac(c))&&r.dirty(),{status:r.value,value:d.data}):(ae(o,{code:te.invalid_intersection_types}),ve)};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(([s,c])=>a(s,c)):a(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}Ma.create=(n,e,r)=>new Ma({left:n,right:e,typeName:ke.ZodIntersection,...Ve(r)});class qn extends Re{_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==se.array)return ae(o,{code:te.invalid_type,expected:se.array,received:o.parsedType}),ve;if(o.data.length<this._def.items.length)return ae(o,{code:te.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ve;!this._def.rest&&o.data.length>this._def.items.length&&(ae(o,{code:te.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const s=[...o.data].map((c,d)=>{const u=this._def.items[d]||this._def.rest;return u?u._parse(new Hn(o,c,o.path,d)):null}).filter(c=>!!c);return o.common.async?Promise.all(s).then(c=>Nt.mergeArray(r,c)):Nt.mergeArray(r,s)}get items(){return this._def.items}rest(e){return new qn({...this._def,rest:e})}}qn.create=(n,e)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new qn({items:n,typeName:ke.ZodTuple,rest:null,...Ve(e)})};class Pa extends Re{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==se.object)return ae(o,{code:te.invalid_type,expected:se.object,received:o.parsedType}),ve;const a=[],s=this._def.keyType,c=this._def.valueType;for(const d in o.data)a.push({key:s._parse(new Hn(o,d,o.path,d)),value:c._parse(new Hn(o,o.data[d],o.path,d)),alwaysSet:d in o.data});return o.common.async?Nt.mergeObjectAsync(r,a):Nt.mergeObjectSync(r,a)}get element(){return this._def.valueType}static create(e,r,o){return r instanceof Re?new Pa({keyType:e,valueType:r,typeName:ke.ZodRecord,...Ve(o)}):new Pa({keyType:bn.create(),valueType:e,typeName:ke.ZodRecord,...Ve(r)})}}class ps extends Re{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==se.map)return ae(o,{code:te.invalid_type,expected:se.map,received:o.parsedType}),ve;const a=this._def.keyType,s=this._def.valueType,c=[...o.data.entries()].map(([d,u],p)=>({key:a._parse(new Hn(o,d,o.path,[p,"key"])),value:s._parse(new Hn(o,u,o.path,[p,"value"]))}));if(o.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const u of c){const p=await u.key,h=await u.value;if(p.status==="aborted"||h.status==="aborted")return ve;(p.status==="dirty"||h.status==="dirty")&&r.dirty(),d.set(p.value,h.value)}return{status:r.value,value:d}})}else{const d=new Map;for(const u of c){const p=u.key,h=u.value;if(p.status==="aborted"||h.status==="aborted")return ve;(p.status==="dirty"||h.status==="dirty")&&r.dirty(),d.set(p.value,h.value)}return{status:r.value,value:d}}}}ps.create=(n,e,r)=>new ps({valueType:e,keyType:n,typeName:ke.ZodMap,...Ve(r)});class io extends Re{_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==se.set)return ae(o,{code:te.invalid_type,expected:se.set,received:o.parsedType}),ve;const a=this._def;a.minSize!==null&&o.data.size<a.minSize.value&&(ae(o,{code:te.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),r.dirty()),a.maxSize!==null&&o.data.size>a.maxSize.value&&(ae(o,{code:te.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),r.dirty());const s=this._def.valueType;function c(u){const p=new Set;for(const h of u){if(h.status==="aborted")return ve;h.status==="dirty"&&r.dirty(),p.add(h.value)}return{status:r.value,value:p}}const d=[...o.data.values()].map((u,p)=>s._parse(new Hn(o,u,o.path,p)));return o.common.async?Promise.all(d).then(u=>c(u)):c(d)}min(e,r){return new io({...this._def,minSize:{value:e,message:he.toString(r)}})}max(e,r){return new io({...this._def,maxSize:{value:e,message:he.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}io.create=(n,e)=>new io({valueType:n,minSize:null,maxSize:null,typeName:ke.ZodSet,...Ve(e)});class Do extends Re{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==se.function)return ae(r,{code:te.invalid_type,expected:se.function,received:r.parsedType}),ve;function o(d,u){return ls({data:d,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,ss(),$o].filter(p=>!!p),issueData:{code:te.invalid_arguments,argumentsError:u}})}function a(d,u){return ls({data:d,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,ss(),$o].filter(p=>!!p),issueData:{code:te.invalid_return_type,returnTypeError:u}})}const s={errorMap:r.common.contextualErrorMap},c=r.data;if(this._def.returns instanceof Mo){const d=this;return Rt(async function(...u){const p=new Xt([]),h=await d._def.args.parseAsync(u,s).catch(w=>{throw p.addIssue(o(u,w)),p}),g=await Reflect.apply(c,this,h);return await d._def.returns._def.type.parseAsync(g,s).catch(w=>{throw p.addIssue(a(g,w)),p})})}else{const d=this;return Rt(function(...u){const p=d._def.args.safeParse(u,s);if(!p.success)throw new Xt([o(u,p.error)]);const h=Reflect.apply(c,this,p.data),g=d._def.returns.safeParse(h,s);if(!g.success)throw new Xt([a(h,g.error)]);return g.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Do({...this._def,args:qn.create(e).rest(ao.create())})}returns(e){return new Do({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,o){return new Do({args:e||qn.create([]).rest(ao.create()),returns:r||ao.create(),typeName:ke.ZodFunction,...Ve(o)})}}class La extends Re{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}La.create=(n,e)=>new La({getter:n,typeName:ke.ZodLazy,...Ve(e)});class Fa extends Re{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return ae(r,{received:r.data,code:te.invalid_literal,expected:this._def.value}),ve}return{status:"valid",value:e.data}}get value(){return this._def.value}}Fa.create=(n,e)=>new Fa({value:n,typeName:ke.ZodLiteral,...Ve(e)});function gp(n,e){return new Nr({values:n,typeName:ke.ZodEnum,...Ve(e)})}class Nr extends Re{constructor(){super(...arguments),Aa.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),o=this._def.values;return ae(r,{expected:je.joinValues(o),received:r.parsedType,code:te.invalid_type}),ve}if(cs(this,Aa)||up(this,Aa,new Set(this._def.values)),!cs(this,Aa).has(e.data)){const r=this._getOrReturnCtx(e),o=this._def.values;return ae(r,{received:r.data,code:te.invalid_enum_value,options:o}),ve}return Rt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return Nr.create(e,{...this._def,...r})}exclude(e,r=this._def){return Nr.create(this.options.filter(o=>!e.includes(o)),{...this._def,...r})}}Aa=new WeakMap,Nr.create=gp;class za extends Re{constructor(){super(...arguments),$a.set(this,void 0)}_parse(e){const r=je.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==se.string&&o.parsedType!==se.number){const a=je.objectValues(r);return ae(o,{expected:je.joinValues(a),received:o.parsedType,code:te.invalid_type}),ve}if(cs(this,$a)||up(this,$a,new Set(je.getValidEnumValues(this._def.values))),!cs(this,$a).has(e.data)){const a=je.objectValues(r);return ae(o,{received:o.data,code:te.invalid_enum_value,options:a}),ve}return Rt(e.data)}get enum(){return this._def.values}}$a=new WeakMap,za.create=(n,e)=>new za({values:n,typeName:ke.ZodNativeEnum,...Ve(e)});class Mo extends Re{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==se.promise&&r.common.async===!1)return ae(r,{code:te.invalid_type,expected:se.promise,received:r.parsedType}),ve;const o=r.parsedType===se.promise?r.data:Promise.resolve(r.data);return Rt(o.then(a=>this._def.type.parseAsync(a,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Mo.create=(n,e)=>new Mo({type:n,typeName:ke.ZodPromise,...Ve(e)});class xn extends Re{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ke.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:o}=this._processInputParams(e),a=this._def.effect||null,s={addIssue:c=>{ae(o,c),c.fatal?r.abort():r.dirty()},get path(){return o.path}};if(s.addIssue=s.addIssue.bind(s),a.type==="preprocess"){const c=a.transform(o.data,s);if(o.common.async)return Promise.resolve(c).then(async d=>{if(r.value==="aborted")return ve;const u=await this._def.schema._parseAsync({data:d,path:o.path,parent:o});return u.status==="aborted"?ve:u.status==="dirty"||r.value==="dirty"?Ro(u.value):u});{if(r.value==="aborted")return ve;const d=this._def.schema._parseSync({data:c,path:o.path,parent:o});return d.status==="aborted"?ve:d.status==="dirty"||r.value==="dirty"?Ro(d.value):d}}if(a.type==="refinement"){const c=d=>{const u=a.refinement(d,s);if(o.common.async)return Promise.resolve(u);if(u 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"?ve:(d.status==="dirty"&&r.dirty(),c(d.value),{status:r.value,value:d.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(d=>d.status==="aborted"?ve:(d.status==="dirty"&&r.dirty(),c(d.value).then(()=>({status:r.value,value:d.value}))))}if(a.type==="transform")if(o.common.async===!1){const c=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!Va(c))return c;const d=a.transform(c.value,s);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:d}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(c=>Va(c)?Promise.resolve(a.transform(c.value,s)).then(d=>({status:r.value,value:d})):c);je.assertNever(a)}}xn.create=(n,e,r)=>new xn({schema:n,typeName:ke.ZodEffects,effect:e,...Ve(r)}),xn.createWithPreprocess=(n,e,r)=>new xn({schema:e,effect:{type:"preprocess",transform:n},typeName:ke.ZodEffects,...Ve(r)});class Gn extends Re{_parse(e){return this._getType(e)===se.undefined?Rt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Gn.create=(n,e)=>new Gn({innerType:n,typeName:ke.ZodOptional,...Ve(e)});class Br extends Re{_parse(e){return this._getType(e)===se.null?Rt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Br.create=(n,e)=>new Br({innerType:n,typeName:ke.ZodNullable,...Ve(e)});class Ua extends Re{_parse(e){const{ctx:r}=this._processInputParams(e);let o=r.data;return r.parsedType===se.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Ua.create=(n,e)=>new Ua({innerType:n,typeName:ke.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ve(e)});class ja extends Re{_parse(e){const{ctx:r}=this._processInputParams(e),o={...r,common:{...r.common,issues:[]}},a=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return Ta(a)?a.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Xt(o.common.issues)},input:o.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Xt(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}ja.create=(n,e)=>new ja({innerType:n,typeName:ke.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ve(e)});class hs extends Re{_parse(e){if(this._getType(e)!==se.nan){const o=this._getOrReturnCtx(e);return ae(o,{code:te.invalid_type,expected:se.nan,received:o.parsedType}),ve}return{status:"valid",value:e.data}}}hs.create=n=>new hs({typeName:ke.ZodNaN,...Ve(n)});const Vw=Symbol("zod_brand");class Oc extends Re{_parse(e){const{ctx:r}=this._processInputParams(e),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}}class Za extends Re{_parse(e){const{status:r,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"?ve:s.status==="dirty"?(r.dirty(),Ro(s.value)):this._def.out._parseAsync({data:s.value,path:o.path,parent:o})})();{const a=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return a.status==="aborted"?ve:a.status==="dirty"?(r.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:o.path,parent:o})}}static create(e,r){return new Za({in:e,out:r,typeName:ke.ZodPipeline})}}class Wa extends Re{_parse(e){const r=this._def.innerType._parse(e),o=a=>(Va(a)&&(a.value=Object.freeze(a.value)),a);return Ta(r)?r.then(a=>o(a)):o(r)}unwrap(){return this._def.innerType}}Wa.create=(n,e)=>new Wa({innerType:n,typeName:ke.ZodReadonly,...Ve(e)});function yp(n,e={},r){return n?Oo.create().superRefine((o,a)=>{var s,c;if(!n(o)){const d=typeof e=="function"?e(o):typeof e=="string"?{message:e}:e,u=(c=(s=d.fatal)!==null&&s!==void 0?s:r)!==null&&c!==void 0?c:!0,p=typeof d=="string"?{message:d}:d;a.addIssue({code:"custom",...p,fatal:u})}}):Oo.create()}const Tw={object:rt.lazycreate};var ke;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(ke||(ke={}));const Aw=(n,e={message:`Input not instance of ${n.name}`})=>yp(r=>r instanceof n,e),_p=bn.create,wp=Er.create,$w=hs.create,Rw=Sr.create,bp=Ra.create,Ow=oo.create,Iw=ds.create,Dw=Oa.create,Mw=Ia.create,Pw=Oo.create,Lw=ao.create,Fw=ar.create,zw=us.create,Uw=kn.create,jw=rt.create,Zw=rt.strictCreate,Ww=Da.create,Hw=fs.create,qw=Ma.create,Gw=qn.create,Kw=Pa.create,Xw=ps.create,Yw=io.create,Jw=Do.create,Qw=La.create,e1=Fa.create,t1=Nr.create,n1=za.create,r1=Mo.create,kp=xn.create,o1=Gn.create,a1=Br.create,i1=xn.createWithPreprocess,s1=Za.create;var fe=Object.freeze({__proto__:null,defaultErrorMap:$o,setErrorMap:fw,getErrorMap:ss,makeIssue:ls,EMPTY_PATH:pw,addIssueToContext:ae,ParseStatus:Nt,INVALID:ve,DIRTY:Ro,OK:Rt,isAborted:Tc,isDirty:Ac,isValid:Va,isAsync:Ta,get util(){return je},get objectUtil(){return Vc},ZodParsedType:se,getParsedType:Cr,ZodType:Re,datetimeRegex:mp,ZodString:bn,ZodNumber:Er,ZodBigInt:Sr,ZodBoolean:Ra,ZodDate:oo,ZodSymbol:ds,ZodUndefined:Oa,ZodNull:Ia,ZodAny:Oo,ZodUnknown:ao,ZodNever:ar,ZodVoid:us,ZodArray:kn,ZodObject:rt,ZodUnion:Da,ZodDiscriminatedUnion:fs,ZodIntersection:Ma,ZodTuple:qn,ZodRecord:Pa,ZodMap:ps,ZodSet:io,ZodFunction:Do,ZodLazy:La,ZodLiteral:Fa,ZodEnum:Nr,ZodNativeEnum:za,ZodPromise:Mo,ZodEffects:xn,ZodTransformer:xn,ZodOptional:Gn,ZodNullable:Br,ZodDefault:Ua,ZodCatch:ja,ZodNaN:hs,BRAND:Vw,ZodBranded:Oc,ZodPipeline:Za,ZodReadonly:Wa,custom:yp,Schema:Re,ZodSchema:Re,late:Tw,get ZodFirstPartyTypeKind(){return ke},coerce:{string:n=>bn.create({...n,coerce:!0}),number:n=>Er.create({...n,coerce:!0}),boolean:n=>Ra.create({...n,coerce:!0}),bigint:n=>Sr.create({...n,coerce:!0}),date:n=>oo.create({...n,coerce:!0})},any:Pw,array:Uw,bigint:Rw,boolean:bp,date:Ow,discriminatedUnion:Hw,effect:kp,enum:t1,function:Jw,instanceof:Aw,intersection:qw,lazy:Qw,literal:e1,map:Xw,nan:$w,nativeEnum:n1,never:Fw,null:Mw,nullable:a1,number:wp,object:jw,oboolean:()=>bp().optional(),onumber:()=>wp().optional(),optional:o1,ostring:()=>_p().optional(),pipeline:s1,preprocess:i1,promise:r1,record:Kw,set:Yw,strictObject:Zw,string:_p,symbol:Iw,transformer:kp,tuple:Gw,undefined:Dw,union:Ww,unknown:Lw,void:zw,NEVER:ve,ZodIssueCode:te,quotelessJson:uw,ZodError:Xt});const l1=-2147483648,xp=-9007199254740991n,c1=null,d1=null;function u1(n,e){switch(e){case"Int":return n===l1;case"Long":return n===Number(xp)||n===xp;case"Float":return Number.isNaN(n);case"Double":return Number.isNaN(n);case"String":return n===c1;case"Bytes":return n===d1;default:throw Error(`unsupported data type: ${e}`)}}function f1(n,e){const r=Math.floor(e/8),o=1<<7-e%8;return(n[r]&o)>0}const p1={type:"absent"},vp=null;function h1(n){return typeof n=="object"&&n!==null&&n.type==="absent"}function Po(n,e,r={}){if(f1(n.absent,e))return r.absent===void 0?p1:r.absent;const o=n.data[e],a=n.type;if(u1(o,a))return r.na===void 0?vp:r.na;switch(a){case"Int":return o;case"Long":return Number(o);case"Float":return o;case"Double":return o;case"String":return o;case"Bytes":throw Error("Bytes not yet supported");default:throw Error(`unsupported data type: ${a}`)}}function un(n){const{type:e,name:r,domain:o}=n;return{type:e,name:r,...o&&{domain:o}}}fe.object({__isRef:fe.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:fe.string().describe("Upstream block id"),name:fe.string().describe("Name of the output provided to the upstream block's output context"),requireEnrichments:fe.literal(!0).optional().describe("True if current block that stores this reference in its args, may need enrichments for the references value originating from the blocks in between current and referenced block")}).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.").readonly(),fe.string().length(24).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");function Ic(n){return vr(n)}var Dc={exports:{}};(function(n,e){e=n.exports=r,e.getSerialize=o;function r(a,s,c,d){return JSON.stringify(a,o(s,d),c)}function o(a,s){var c=[],d=[];return s==null&&(s=function(u,p){return c[0]===p?"[Circular ~]":"[Circular ~."+d.slice(0,c.indexOf(p)).join(".")+"]"}),function(u,p){if(c.length>0){var h=c.indexOf(this);~h?c.splice(h+1):c.push(this),~h?d.splice(h,1/0,u):d.push(u),~c.indexOf(p)&&(p=s.call(this,u,p))}else c.push(p);return a==null?p:a.call(this,u,p)}}})(Dc,Dc.exports);var m1=Dc.exports;const g1=Bc(m1),y1=fe.object({type:fe.literal("PlError"),name:fe.string(),message:fe.string(),fullMessage:fe.string().optional(),stack:fe.string().optional()}),_1=y1.extend({cause:fe.lazy(()=>ms).optional(),errors:fe.lazy(()=>ms.array()).optional()}),w1=fe.object({type:fe.literal("StandardError"),name:fe.string(),message:fe.string(),stack:fe.string().optional()}),b1=w1.extend({cause:fe.lazy(()=>ms).optional(),errors:fe.lazy(()=>ms.array()).optional()}),ms=fe.union([b1,_1]);function Ha(n){const e=Mc.safeParse(n);if(e.success){const r=e.data;return r.name==="PlQuickJSError"||r.name==="PlErrorReport"||r.name==="PlInternalError"||r.name==="PlTengoError"||r.name==="PlRunnerError"||r.name==="PlMonetizationError"?{type:"PlError",name:r.name,message:r.message,fullMessage:r.fullMessage??void 0,stack:r.stack??void 0,cause:r.cause?Ha(r.cause):void 0,errors:r.errors?r.errors.map(Ha):void 0}:{type:"StandardError",name:r.name,message:r.message,stack:r.stack??void 0,cause:r.cause?Ha(r.cause):void 0,errors:r.errors?r.errors.map(Ha):void 0}}return{type:"StandardError",name:"Error",message:g1(n)}}const k1=fe.object({name:fe.string(),message:fe.string(),fullMessage:fe.string().optional(),stack:fe.string().optional()}),Mc=k1.extend({cause:fe.lazy(()=>Mc).optional(),errors:fe.lazy(()=>Mc.array()).optional()});function x1(n){if(n&&typeof globalThis.getPlatforma=="function")return globalThis.getPlatforma(n);if(typeof globalThis.platforma<"u")return globalThis.platforma;throw new Error("Can't get platforma instance.")}const v1=fe.object({type:fe.string(),importance:fe.number().optional(),id:fe.string().optional(),label:fe.string()});fe.array(v1);const C1="1.30.26";function E1(n){const e=n.type;switch(e){case"axis":return Ic(n);case"column":return Ic(n);default:throw Error(`unsupported column type: ${e}`)}}function gs(n){return JSON.parse(n)}function S1(n){return n.axesSpec.length===1&&n.name==="pl7.app/label"}function N1(n){var e;return((e=n.annotations)==null?void 0:e["pl7.app/table/visibility"])==="optional"}function Lo(){return x1({sdkVersion:C1})}function B1(n){try{return Lo()}catch{return n}}function V1(n){if(typeof globalThis.getEnvironmentValue=="function")return globalThis.getEnvironmentValue(n)}class Pc extends Error{}class ys extends Error{constructor(r){super(r.map(o=>typeof o=="string"?o:o.message).join(`
|
|
2
|
-
`));
|
|
3
|
-
`)}}function
|
|
1
|
+
(function(z,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("ag-grid-enterprise"),require("ag-grid-vue3")):typeof define=="function"&&define.amd?define(["exports","vue","ag-grid-enterprise","ag-grid-vue3"],t):(z=typeof globalThis<"u"?globalThis:z||self,t(z.SdkVueLib={},z.Vue,z.agGridEnterprise,z.agGridVue3))})(this,function(z,t,Ie,io){"use strict";var yU=Object.defineProperty;var U_=z=>{throw TypeError(z)};var bU=(z,t,Ie)=>t in z?yU(z,t,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):z[t]=Ie;var Ue=(z,t,Ie)=>bU(z,typeof t!="symbol"?t+"":t,Ie),Sf=(z,t,Ie)=>t.has(z)||U_("Cannot "+Ie);var R=(z,t,Ie)=>(Sf(z,t,"read from private field"),Ie?Ie.call(z):t.get(z)),Pe=(z,t,Ie)=>t.has(z)?U_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(z):t.set(z,Ie),ge=(z,t,Ie,io)=>(Sf(z,t,"write to private field"),io?io.call(z,Ie):t.set(z,Ie),Ie),de=(z,t,Ie)=>(Sf(z,t,"access private method"),Ie);var Zc=(z,t,Ie,io)=>({set _(Pc){ge(z,t,Pc,Ie)},get _(){return R(z,t,io)}});var ht,u0,ma,p0,f0,Rn,tn,In,Co,An,ha,ga,yt,Ln,gt,Qe,Ee,Mt,nn,Tt,wt,On,kt,$n,Zn,rn,Mn,Xr,Ft,ya,re,Ef,So,hr,Fi,on,H_,Eo,ba,Pi,ro,oo,Nf,Mc,Fc,tt,Vf,cl,ao,Bf;var Pc=Object.defineProperty,X_=(n,e,r)=>e in n?Pc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,zc=(n,e,r)=>X_(n,typeof e!="symbol"?e+"":e,r);function j_(n,e){if(n==null)throw Error(e??"Empty (null | undefined) value");return n}let dl=class{constructor(){zc(this,"promise"),zc(this,"resolve",()=>{}),zc(this,"reject",()=>{}),this.promise=new Promise((e,r)=>{this.resolve=e,this.reject=r})}};function Y_(n,e){if(n!=null)return e(n)}function K_(n,e){return n=Math.ceil(n),e=Math.floor(e),Math.floor(Math.random()*(e-n))+n}function J_(n){let e="";for(let r=0;r<n;r++)e+=String.fromCharCode(K_(65,91));return e}function q_(){return J_(42)}const ul=Array.isArray;function Tf(n){return n!==null&&typeof n=="object"}function La(n){if(typeof n!="object"||n===null)return!1;const e=Object.getPrototypeOf(n);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null}function Rf(n){return Object.values(n).reduce((e,r)=>r!==void 0?e+1:e,0)}function Wt(n,e){if(!(Tf(n)&&Tf(e)))return n===e;if(ul(n)&&ul(e))return n.length!==e.length?!1:[...n.keys()].every(r=>Wt(n[r],e[r]));if(La(n)&&La(e))return Rf(n)!==Rf(e)?!1:Object.keys(n).every(r=>Wt(n[r],e[r]));throw Error(`Cannot compare a ${String(n)} and b ${String(e)}`)}function Un(n){if(Array.isArray(n)){const e=[];for(let r=0;r<n.length;r++)e[r]=Un(n[r]);return e}else if(La(n)){const e={};return Object.keys(n).forEach(r=>{e[r]=Un(n[r])}),e}else return n}function If(n,e){return new Set([...Object.keys(n),...Object.keys(e)]).forEach(r=>{const o=n[r],a=e[r];La(o)&&La(a)||ul(o)&&ul(a)&&o.length===a.length?If(o,a):n[r]=a}),n}var Oa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dc(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Q_=function n(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?n(e.toJSON()):Array.isArray(e)?`[${e.reduce((a,l,c)=>`${a}${c===0?"":","}${n(l===void 0||typeof l=="symbol"?null:l)}`,"")}]`:`{${Object.keys(e).sort().reduce((o,a)=>{if(e[a]===void 0||typeof e[a]=="symbol")return o;const l=o.length===0?"":",";return`${o}${l}${n(a)}:${n(e[a])}`},"")}}`};const Er=Dc(Q_);var We;(function(n){n.assertEqual=a=>a;function e(a){}n.assertIs=e;function r(a){throw new Error}n.assertNever=r,n.arrayToEnum=a=>{const l={};for(const c of a)l[c]=c;return l},n.getValidEnumValues=a=>{const l=n.objectKeys(a).filter(d=>typeof a[a[d]]!="number"),c={};for(const d of l)c[d]=a[d];return n.objectValues(c)},n.objectValues=a=>n.objectKeys(a).map(function(l){return a[l]}),n.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const l=[];for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&l.push(c);return l},n.find=(a,l)=>{for(const c of a)if(l(c))return c},n.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function o(a,l=" | "){return a.map(c=>typeof c=="string"?`'${c}'`:c).join(l)}n.joinValues=o,n.jsonStringifyReplacer=(a,l)=>typeof l=="bigint"?l.toString():l})(We||(We={}));var Wc;(function(n){n.mergeShapes=(e,r)=>({...e,...r})})(Wc||(Wc={}));const le=We.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Nr=n=>{switch(typeof n){case"undefined":return le.undefined;case"string":return le.string;case"number":return isNaN(n)?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(n)?le.array:n===null?le.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?le.promise:typeof Map<"u"&&n instanceof Map?le.map:typeof Set<"u"&&n instanceof Set?le.set:typeof Date<"u"&&n instanceof Date?le.date:le.object;default:return le.unknown}},te=We.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"]),e1=n=>JSON.stringify(n,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 r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const r=e||function(l){return l.message},o={_errors:[]},a=l=>{for(const c of l.issues)if(c.code==="invalid_union")c.unionErrors.map(a);else if(c.code==="invalid_return_type")a(c.returnTypeError);else if(c.code==="invalid_arguments")a(c.argumentsError);else if(c.path.length===0)o._errors.push(r(c));else{let d=o,u=0;for(;u<c.path.length;){const f=c.path[u];u===c.path.length-1?(d[f]=d[f]||{_errors:[]},d[f]._errors.push(r(c))):d[f]=d[f]||{_errors:[]},d=d[f],u++}}};return a(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,We.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},o=[];for(const a of this.issues)a.path.length>0?(r[a.path[0]]=r[a.path[0]]||[],r[a.path[0]].push(e(a))):o.push(e(a));return{formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}}Jt.create=n=>new Jt(n);const Zo=(n,e)=>{let r;switch(n.code){case te.invalid_type:n.received===le.undefined?r="Required":r=`Expected ${n.expected}, received ${n.received}`;break;case te.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(n.expected,We.jsonStringifyReplacer)}`;break;case te.unrecognized_keys:r=`Unrecognized key(s) in object: ${We.joinValues(n.keys,", ")}`;break;case te.invalid_union:r="Invalid input";break;case te.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${We.joinValues(n.options)}`;break;case te.invalid_enum_value:r=`Invalid enum value. Expected ${We.joinValues(n.options)}, received '${n.received}'`;break;case te.invalid_arguments:r="Invalid function arguments";break;case te.invalid_return_type:r="Invalid function return type";break;case te.invalid_date:r="Invalid date";break;case te.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(r=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?r=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?r=`Invalid input: must end with "${n.validation.endsWith}"`:We.assertNever(n.validation):n.validation!=="regex"?r=`Invalid ${n.validation}`:r="Invalid";break;case te.too_small:n.type==="array"?r=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?r=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?r=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?r=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:r="Invalid input";break;case te.too_big:n.type==="array"?r=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?r=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?r=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?r=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?r=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:r="Invalid input";break;case te.custom:r="Invalid input";break;case te.invalid_intersection_types:r="Intersection results could not be merged";break;case te.not_multiple_of:r=`Number must be a multiple of ${n.multipleOf}`;break;case te.not_finite:r="Number must be finite";break;default:r=e.defaultError,We.assertNever(n)}return{message:r}};let Af=Zo;function t1(n){Af=n}function pl(){return Af}const fl=n=>{const{data:e,path:r,errorMaps:o,issueData:a}=n,l=[...r,...a.path||[]],c={...a,path:l};if(a.message!==void 0)return{...a,path:l,message:a.message};let d="";const u=o.filter(f=>!!f).slice().reverse();for(const f of u)d=f(c,{data:e,defaultError:d}).message;return{...a,path:l,message:d}},n1=[];function ae(n,e){const r=pl(),o=fl({issueData:e,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,r,r===Zo?void 0:Zo].filter(a=>!!a)});n.common.issues.push(o)}class Nt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const o=[];for(const a of r){if(a.status==="aborted")return ve;a.status==="dirty"&&e.dirty(),o.push(a.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,r){const o=[];for(const a of r){const l=await a.key,c=await a.value;o.push({key:l,value:c})}return Nt.mergeObjectSync(e,o)}static mergeObjectSync(e,r){const o={};for(const a of r){const{key:l,value:c}=a;if(l.status==="aborted"||c.status==="aborted")return ve;l.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof c.value<"u"||a.alwaysSet)&&(o[l.value]=c.value)}return{status:e.value,value:o}}}const ve=Object.freeze({status:"aborted"}),Mo=n=>({status:"dirty",value:n}),At=n=>({status:"valid",value:n}),Gc=n=>n.status==="aborted",Uc=n=>n.status==="dirty",$a=n=>n.status==="valid",Za=n=>typeof Promise<"u"&&n instanceof Promise;function ml(n,e,r,o){if(typeof e=="function"?n!==e||!o:!e.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(n)}function Lf(n,e,r,o,a){if(typeof e=="function"?n!==e||!a:!e.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(n,r),r}typeof SuppressedError=="function"&&SuppressedError;var me;(function(n){n.errToObj=e=>typeof e=="string"?{message:e}:e||{},n.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(me||(me={}));var Ma,Fa;class Hn{constructor(e,r,o,a){this._cachedPath=[],this.parent=e,this.data=r,this._path=o,this._key=a}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 Of=(n,e)=>{if($a(e))return{success:!0,data:e.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Jt(n.common.issues);return this._error=r,this._error}}};function Be(n){if(!n)return{};const{errorMap:e,invalid_type_error:r,required_error:o,description:a}=n;if(e&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(c,d)=>{var u,f;const{message:m}=n;return c.code==="invalid_enum_value"?{message:m??d.defaultError}:typeof d.data>"u"?{message:(u=m??o)!==null&&u!==void 0?u:d.defaultError}:c.code!=="invalid_type"?{message:d.defaultError}:{message:(f=m??r)!==null&&f!==void 0?f:d.defaultError}},description:a}}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 Nr(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Nr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Nt,ctx:{common:e.parent.common,data:e.data,parsedType:Nr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(Za(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const o=this.safeParse(e,r);if(o.success)return o.data;throw o.error}safeParse(e,r){var o;const a={common:{issues:[],async:(o=r==null?void 0:r.async)!==null&&o!==void 0?o:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Nr(e)},l=this._parseSync({data:e,path:a.path,parent:a});return Of(a,l)}async parseAsync(e,r){const o=await this.safeParseAsync(e,r);if(o.success)return o.data;throw o.error}async safeParseAsync(e,r){const o={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Nr(e)},a=this._parse({data:e,path:o.path,parent:o}),l=await(Za(a)?a:Promise.resolve(a));return Of(o,l)}refine(e,r){const o=a=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(a):r;return this._refinement((a,l)=>{const c=e(a),d=()=>l.addIssue({code:te.custom,...o(a)});return typeof Promise<"u"&&c instanceof Promise?c.then(u=>u?!0:(d(),!1)):c?!0:(d(),!1)})}refinement(e,r){return this._refinement((o,a)=>e(o)?!0:(a.addIssue(typeof r=="function"?r(o,a):r),!1))}_refinement(e){return new xn({schema:this,typeName:ke.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return jn.create(this,this._def)}nullable(){return Rr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return kn.create(this,this._def)}promise(){return Do.create(this,this._def)}or(e){return Wa.create([this,e],this._def)}and(e){return Ga.create(this,e,this._def)}transform(e){return new xn({...Be(this._def),schema:this,typeName:ke.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new Ya({...Be(this._def),innerType:this,defaultValue:r,typeName:ke.ZodDefault})}brand(){return new jc({typeName:ke.ZodBranded,type:this,...Be(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new Ka({...Be(this._def),innerType:this,catchValue:r,typeName:ke.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Ja.create(this,e)}readonly(){return qa.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const r1=/^c[^\s-]{8,}$/i,o1=/^[0-9a-z]+$/,a1=/^[0-9A-HJKMNP-TV-Z]{26}$/,i1=/^[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,l1=/^[a-z0-9_-]{21}$/i,s1=/^[-+]?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)?)??$/,c1=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,d1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Hc;const u1=/^(?:(?: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])$/,p1=/^(([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})))$/,f1=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,$f="((\\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])))",m1=new RegExp(`^${$f}$`);function Zf(n){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return n.precision?e=`${e}\\.\\d{${n.precision}}`:n.precision==null&&(e=`${e}(\\.\\d+)?`),e}function h1(n){return new RegExp(`^${Zf(n)}$`)}function Mf(n){let e=`${$f}T${Zf(n)}`;const r=[];return r.push(n.local?"Z?":"Z"),n.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function g1(n,e){return!!((e==="v4"||!e)&&u1.test(n)||(e==="v6"||!e)&&p1.test(n))}class wn extends Ae{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==le.string){const l=this._getOrReturnCtx(e);return ae(l,{code:te.invalid_type,expected:le.string,received:l.parsedType}),ve}const o=new Nt;let a;for(const l of this._def.checks)if(l.kind==="min")e.data.length<l.value&&(a=this._getOrReturnCtx(e,a),ae(a,{code:te.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&&(a=this._getOrReturnCtx(e,a),ae(a,{code:te.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)&&(a=this._getOrReturnCtx(e,a),c?ae(a,{code:te.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):d&&ae(a,{code:te.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),o.dirty())}else if(l.kind==="email")c1.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"email",code:te.invalid_string,message:l.message}),o.dirty());else if(l.kind==="emoji")Hc||(Hc=new RegExp(d1,"u")),Hc.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"emoji",code:te.invalid_string,message:l.message}),o.dirty());else if(l.kind==="uuid")i1.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"uuid",code:te.invalid_string,message:l.message}),o.dirty());else if(l.kind==="nanoid")l1.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"nanoid",code:te.invalid_string,message:l.message}),o.dirty());else if(l.kind==="cuid")r1.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"cuid",code:te.invalid_string,message:l.message}),o.dirty());else if(l.kind==="cuid2")o1.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"cuid2",code:te.invalid_string,message:l.message}),o.dirty());else if(l.kind==="ulid")a1.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"ulid",code:te.invalid_string,message:l.message}),o.dirty());else if(l.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),ae(a,{validation:"url",code:te.invalid_string,message:l.message}),o.dirty()}else l.kind==="regex"?(l.regex.lastIndex=0,l.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"regex",code:te.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)||(a=this._getOrReturnCtx(e,a),ae(a,{code:te.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)||(a=this._getOrReturnCtx(e,a),ae(a,{code:te.invalid_string,validation:{startsWith:l.value},message:l.message}),o.dirty()):l.kind==="endsWith"?e.data.endsWith(l.value)||(a=this._getOrReturnCtx(e,a),ae(a,{code:te.invalid_string,validation:{endsWith:l.value},message:l.message}),o.dirty()):l.kind==="datetime"?Mf(l).test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{code:te.invalid_string,validation:"datetime",message:l.message}),o.dirty()):l.kind==="date"?m1.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{code:te.invalid_string,validation:"date",message:l.message}),o.dirty()):l.kind==="time"?h1(l).test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{code:te.invalid_string,validation:"time",message:l.message}),o.dirty()):l.kind==="duration"?s1.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"duration",code:te.invalid_string,message:l.message}),o.dirty()):l.kind==="ip"?g1(e.data,l.version)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"ip",code:te.invalid_string,message:l.message}),o.dirty()):l.kind==="base64"?f1.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"base64",code:te.invalid_string,message:l.message}),o.dirty()):We.assertNever(l);return{status:o.value,value:e.data}}_regex(e,r,o){return this.refinement(a=>e.test(a),{validation:r,code:te.invalid_string,...me.errToObj(o)})}_addCheck(e){return new wn({...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 r,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:(r=e==null?void 0:e.offset)!==null&&r!==void 0?r:!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,r){return this._addCheck({kind:"regex",regex:e,...me.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...me.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...me.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...me.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...me.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...me.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...me.errToObj(r)})}nonempty(e){return this.min(1,me.errToObj(e))}trim(){return new wn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new wn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new wn({...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 r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}wn.create=n=>{var e;return new wn({checks:[],typeName:ke.ZodString,coerce:(e=n==null?void 0:n.coerce)!==null&&e!==void 0?e:!1,...Be(n)})};function y1(n,e){const r=(n.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,a=r>o?r:o,l=parseInt(n.toFixed(a).replace(".","")),c=parseInt(e.toFixed(a).replace(".",""));return l%c/Math.pow(10,a)}class Vr 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 l=this._getOrReturnCtx(e);return ae(l,{code:te.invalid_type,expected:le.number,received:l.parsedType}),ve}let o;const a=new Nt;for(const l of this._def.checks)l.kind==="int"?We.isInteger(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{code:te.invalid_type,expected:"integer",received:"float",message:l.message}),a.dirty()):l.kind==="min"?(l.inclusive?e.data<l.value:e.data<=l.value)&&(o=this._getOrReturnCtx(e,o),ae(o,{code:te.too_small,minimum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),a.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(o=this._getOrReturnCtx(e,o),ae(o,{code:te.too_big,maximum:l.value,type:"number",inclusive:l.inclusive,exact:!1,message:l.message}),a.dirty()):l.kind==="multipleOf"?y1(e.data,l.value)!==0&&(o=this._getOrReturnCtx(e,o),ae(o,{code:te.not_multiple_of,multipleOf:l.value,message:l.message}),a.dirty()):l.kind==="finite"?Number.isFinite(e.data)||(o=this._getOrReturnCtx(e,o),ae(o,{code:te.not_finite,message:l.message}),a.dirty()):We.assertNever(l);return{status:a.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,me.toString(r))}gt(e,r){return this.setLimit("min",e,!1,me.toString(r))}lte(e,r){return this.setLimit("max",e,!0,me.toString(r))}lt(e,r){return this.setLimit("max",e,!1,me.toString(r))}setLimit(e,r,o,a){return new Vr({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:o,message:me.toString(a)}]})}_addCheck(e){return new Vr({...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,r){return this._addCheck({kind:"multipleOf",value:e,message:me.toString(r)})}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 r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&We.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(e===null||o.value<e)&&(e=o.value)}return Number.isFinite(r)&&Number.isFinite(e)}}Vr.create=n=>new Vr({checks:[],typeName:ke.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...Be(n)});class Br 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 l=this._getOrReturnCtx(e);return ae(l,{code:te.invalid_type,expected:le.bigint,received:l.parsedType}),ve}let o;const a=new Nt;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),ae(o,{code:te.too_small,type:"bigint",minimum:l.value,inclusive:l.inclusive,message:l.message}),a.dirty()):l.kind==="max"?(l.inclusive?e.data>l.value:e.data>=l.value)&&(o=this._getOrReturnCtx(e,o),ae(o,{code:te.too_big,type:"bigint",maximum:l.value,inclusive:l.inclusive,message:l.message}),a.dirty()):l.kind==="multipleOf"?e.data%l.value!==BigInt(0)&&(o=this._getOrReturnCtx(e,o),ae(o,{code:te.not_multiple_of,multipleOf:l.value,message:l.message}),a.dirty()):We.assertNever(l);return{status:a.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,me.toString(r))}gt(e,r){return this.setLimit("min",e,!1,me.toString(r))}lte(e,r){return this.setLimit("max",e,!0,me.toString(r))}lt(e,r){return this.setLimit("max",e,!1,me.toString(r))}setLimit(e,r,o,a){return new Br({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:o,message:me.toString(a)}]})}_addCheck(e){return new Br({...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,r){return this._addCheck({kind:"multipleOf",value:e,message:me.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}Br.create=n=>{var e;return new Br({checks:[],typeName:ke.ZodBigInt,coerce:(e=n==null?void 0:n.coerce)!==null&&e!==void 0?e:!1,...Be(n)})};class Pa extends Ae{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==le.boolean){const o=this._getOrReturnCtx(e);return ae(o,{code:te.invalid_type,expected:le.boolean,received:o.parsedType}),ve}return At(e.data)}}Pa.create=n=>new Pa({typeName:ke.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...Be(n)});class lo extends Ae{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==le.date){const l=this._getOrReturnCtx(e);return ae(l,{code:te.invalid_type,expected:le.date,received:l.parsedType}),ve}if(isNaN(e.data.getTime())){const l=this._getOrReturnCtx(e);return ae(l,{code:te.invalid_date}),ve}const o=new Nt;let a;for(const l of this._def.checks)l.kind==="min"?e.data.getTime()<l.value&&(a=this._getOrReturnCtx(e,a),ae(a,{code:te.too_small,message:l.message,inclusive:!0,exact:!1,minimum:l.value,type:"date"}),o.dirty()):l.kind==="max"?e.data.getTime()>l.value&&(a=this._getOrReturnCtx(e,a),ae(a,{code:te.too_big,message:l.message,inclusive:!0,exact:!1,maximum:l.value,type:"date"}),o.dirty()):We.assertNever(l);return{status:o.value,value:new Date(e.data.getTime())}}_addCheck(e){return new lo({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:me.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:me.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}lo.create=n=>new lo({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:ke.ZodDate,...Be(n)});class hl extends Ae{_parse(e){if(this._getType(e)!==le.symbol){const o=this._getOrReturnCtx(e);return ae(o,{code:te.invalid_type,expected:le.symbol,received:o.parsedType}),ve}return At(e.data)}}hl.create=n=>new hl({typeName:ke.ZodSymbol,...Be(n)});class za extends Ae{_parse(e){if(this._getType(e)!==le.undefined){const o=this._getOrReturnCtx(e);return ae(o,{code:te.invalid_type,expected:le.undefined,received:o.parsedType}),ve}return At(e.data)}}za.create=n=>new za({typeName:ke.ZodUndefined,...Be(n)});class Da extends Ae{_parse(e){if(this._getType(e)!==le.null){const o=this._getOrReturnCtx(e);return ae(o,{code:te.invalid_type,expected:le.null,received:o.parsedType}),ve}return At(e.data)}}Da.create=n=>new Da({typeName:ke.ZodNull,...Be(n)});class Fo extends Ae{constructor(){super(...arguments),this._any=!0}_parse(e){return At(e.data)}}Fo.create=n=>new Fo({typeName:ke.ZodAny,...Be(n)});class so extends Ae{constructor(){super(...arguments),this._unknown=!0}_parse(e){return At(e.data)}}so.create=n=>new so({typeName:ke.ZodUnknown,...Be(n)});class ir extends Ae{_parse(e){const r=this._getOrReturnCtx(e);return ae(r,{code:te.invalid_type,expected:le.never,received:r.parsedType}),ve}}ir.create=n=>new ir({typeName:ke.ZodNever,...Be(n)});class gl extends Ae{_parse(e){if(this._getType(e)!==le.undefined){const o=this._getOrReturnCtx(e);return ae(o,{code:te.invalid_type,expected:le.void,received:o.parsedType}),ve}return At(e.data)}}gl.create=n=>new gl({typeName:ke.ZodVoid,...Be(n)});class kn extends Ae{_parse(e){const{ctx:r,status:o}=this._processInputParams(e),a=this._def;if(r.parsedType!==le.array)return ae(r,{code:te.invalid_type,expected:le.array,received:r.parsedType}),ve;if(a.exactLength!==null){const c=r.data.length>a.exactLength.value,d=r.data.length<a.exactLength.value;(c||d)&&(ae(r,{code:c?te.too_big:te.too_small,minimum:d?a.exactLength.value:void 0,maximum:c?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),o.dirty())}if(a.minLength!==null&&r.data.length<a.minLength.value&&(ae(r,{code:te.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),o.dirty()),a.maxLength!==null&&r.data.length>a.maxLength.value&&(ae(r,{code:te.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((c,d)=>a.type._parseAsync(new Hn(r,c,r.path,d)))).then(c=>Nt.mergeArray(o,c));const l=[...r.data].map((c,d)=>a.type._parseSync(new Hn(r,c,r.path,d)));return Nt.mergeArray(o,l)}get element(){return this._def.type}min(e,r){return new kn({...this._def,minLength:{value:e,message:me.toString(r)}})}max(e,r){return new kn({...this._def,maxLength:{value:e,message:me.toString(r)}})}length(e,r){return new kn({...this._def,exactLength:{value:e,message:me.toString(r)}})}nonempty(e){return this.min(1,e)}}kn.create=(n,e)=>new kn({type:n,minLength:null,maxLength:null,exactLength:null,typeName:ke.ZodArray,...Be(e)});function Po(n){if(n instanceof rt){const e={};for(const r in n.shape){const o=n.shape[r];e[r]=jn.create(Po(o))}return new rt({...n._def,shape:()=>e})}else return n instanceof kn?new kn({...n._def,type:Po(n.element)}):n instanceof jn?jn.create(Po(n.unwrap())):n instanceof Rr?Rr.create(Po(n.unwrap())):n instanceof Xn?Xn.create(n.items.map(e=>Po(e))):n}class rt 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(),r=We.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==le.object){const f=this._getOrReturnCtx(e);return ae(f,{code:te.invalid_type,expected:le.object,received:f.parsedType}),ve}const{status:o,ctx:a}=this._processInputParams(e),{shape:l,keys:c}=this._getCached(),d=[];if(!(this._def.catchall instanceof ir&&this._def.unknownKeys==="strip"))for(const f in a.data)c.includes(f)||d.push(f);const u=[];for(const f of c){const m=l[f],g=a.data[f];u.push({key:{status:"valid",value:f},value:m._parse(new Hn(a,g,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof ir){const f=this._def.unknownKeys;if(f==="passthrough")for(const m of d)u.push({key:{status:"valid",value:m},value:{status:"valid",value:a.data[m]}});else if(f==="strict")d.length>0&&(ae(a,{code:te.unrecognized_keys,keys:d}),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 d){const g=a.data[m];u.push({key:{status:"valid",value:m},value:f._parse(new Hn(a,g,a.path,m)),alwaysSet:m in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const m of u){const g=await m.key,y=await m.value;f.push({key:g,value:y,alwaysSet:m.alwaysSet})}return f}).then(f=>Nt.mergeObjectSync(o,f)):Nt.mergeObjectSync(o,u)}get shape(){return this._def.shape()}strict(e){return me.errToObj,new rt({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,o)=>{var a,l,c,d;const u=(c=(l=(a=this._def).errorMap)===null||l===void 0?void 0:l.call(a,r,o).message)!==null&&c!==void 0?c:o.defaultError;return r.code==="unrecognized_keys"?{message:(d=me.errToObj(e).message)!==null&&d!==void 0?d:u}:{message:u}}}:{}})}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:ke.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new rt({...this._def,catchall:e})}pick(e){const r={};return We.objectKeys(e).forEach(o=>{e[o]&&this.shape[o]&&(r[o]=this.shape[o])}),new rt({...this._def,shape:()=>r})}omit(e){const r={};return We.objectKeys(this.shape).forEach(o=>{e[o]||(r[o]=this.shape[o])}),new rt({...this._def,shape:()=>r})}deepPartial(){return Po(this)}partial(e){const r={};return We.objectKeys(this.shape).forEach(o=>{const a=this.shape[o];e&&!e[o]?r[o]=a:r[o]=a.optional()}),new rt({...this._def,shape:()=>r})}required(e){const r={};return We.objectKeys(this.shape).forEach(o=>{if(e&&!e[o])r[o]=this.shape[o];else{let l=this.shape[o];for(;l instanceof jn;)l=l._def.innerType;r[o]=l}}),new rt({...this._def,shape:()=>r})}keyof(){return Ff(We.objectKeys(this.shape))}}rt.create=(n,e)=>new rt({shape:()=>n,unknownKeys:"strip",catchall:ir.create(),typeName:ke.ZodObject,...Be(e)}),rt.strictCreate=(n,e)=>new rt({shape:()=>n,unknownKeys:"strict",catchall:ir.create(),typeName:ke.ZodObject,...Be(e)}),rt.lazycreate=(n,e)=>new rt({shape:n,unknownKeys:"strip",catchall:ir.create(),typeName:ke.ZodObject,...Be(e)});class Wa extends Ae{_parse(e){const{ctx:r}=this._processInputParams(e),o=this._def.options;function a(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 r.common.issues.push(...d.ctx.common.issues),d.result;const c=l.map(d=>new Jt(d.ctx.common.issues));return ae(r,{code:te.invalid_union,unionErrors:c}),ve}if(r.common.async)return Promise.all(o.map(async l=>{const c={...r,common:{...r.common,issues:[]},parent:null};return{result:await l._parseAsync({data:r.data,path:r.path,parent:c}),ctx:c}})).then(a);{let l;const c=[];for(const u of o){const f={...r,common:{...r.common,issues:[]},parent:null},m=u._parseSync({data:r.data,path:r.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 r.common.issues.push(...l.ctx.common.issues),l.result;const d=c.map(u=>new Jt(u));return ae(r,{code:te.invalid_union,unionErrors:d}),ve}}get options(){return this._def.options}}Wa.create=(n,e)=>new Wa({options:n,typeName:ke.ZodUnion,...Be(e)});const lr=n=>n instanceof Ha?lr(n.schema):n instanceof xn?lr(n.innerType()):n instanceof Xa?[n.value]:n instanceof Tr?n.options:n instanceof ja?We.objectValues(n.enum):n instanceof Ya?lr(n._def.innerType):n instanceof za?[void 0]:n instanceof Da?[null]:n instanceof jn?[void 0,...lr(n.unwrap())]:n instanceof Rr?[null,...lr(n.unwrap())]:n instanceof jc||n instanceof qa?lr(n.unwrap()):n instanceof Ka?lr(n._def.innerType):[];class yl extends Ae{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==le.object)return ae(r,{code:te.invalid_type,expected:le.object,received:r.parsedType}),ve;const o=this.discriminator,a=r.data[o],l=this.optionsMap.get(a);return l?r.common.async?l._parseAsync({data:r.data,path:r.path,parent:r}):l._parseSync({data:r.data,path:r.path,parent:r}):(ae(r,{code:te.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),ve)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,o){const a=new Map;for(const l of r){const c=lr(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(a.has(d))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(d)}`);a.set(d,l)}}return new yl({typeName:ke.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:a,...Be(o)})}}function Xc(n,e){const r=Nr(n),o=Nr(e);if(n===e)return{valid:!0,data:n};if(r===le.object&&o===le.object){const a=We.objectKeys(e),l=We.objectKeys(n).filter(d=>a.indexOf(d)!==-1),c={...n,...e};for(const d of l){const u=Xc(n[d],e[d]);if(!u.valid)return{valid:!1};c[d]=u.data}return{valid:!0,data:c}}else if(r===le.array&&o===le.array){if(n.length!==e.length)return{valid:!1};const a=[];for(let l=0;l<n.length;l++){const c=n[l],d=e[l],u=Xc(c,d);if(!u.valid)return{valid:!1};a.push(u.data)}return{valid:!0,data:a}}else return r===le.date&&o===le.date&&+n==+e?{valid:!0,data:n}:{valid:!1}}class Ga extends Ae{_parse(e){const{status:r,ctx:o}=this._processInputParams(e),a=(l,c)=>{if(Gc(l)||Gc(c))return ve;const d=Xc(l.value,c.value);return d.valid?((Uc(l)||Uc(c))&&r.dirty(),{status:r.value,value:d.data}):(ae(o,{code:te.invalid_intersection_types}),ve)};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])=>a(l,c)):a(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}Ga.create=(n,e,r)=>new Ga({left:n,right:e,typeName:ke.ZodIntersection,...Be(r)});class Xn extends Ae{_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.array)return ae(o,{code:te.invalid_type,expected:le.array,received:o.parsedType}),ve;if(o.data.length<this._def.items.length)return ae(o,{code:te.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ve;!this._def.rest&&o.data.length>this._def.items.length&&(ae(o,{code:te.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const l=[...o.data].map((c,d)=>{const u=this._def.items[d]||this._def.rest;return u?u._parse(new Hn(o,c,o.path,d)):null}).filter(c=>!!c);return o.common.async?Promise.all(l).then(c=>Nt.mergeArray(r,c)):Nt.mergeArray(r,l)}get items(){return this._def.items}rest(e){return new Xn({...this._def,rest:e})}}Xn.create=(n,e)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Xn({items:n,typeName:ke.ZodTuple,rest:null,...Be(e)})};class Ua extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.object)return ae(o,{code:te.invalid_type,expected:le.object,received:o.parsedType}),ve;const a=[],l=this._def.keyType,c=this._def.valueType;for(const d in o.data)a.push({key:l._parse(new Hn(o,d,o.path,d)),value:c._parse(new Hn(o,o.data[d],o.path,d)),alwaysSet:d in o.data});return o.common.async?Nt.mergeObjectAsync(r,a):Nt.mergeObjectSync(r,a)}get element(){return this._def.valueType}static create(e,r,o){return r instanceof Ae?new Ua({keyType:e,valueType:r,typeName:ke.ZodRecord,...Be(o)}):new Ua({keyType:wn.create(),valueType:e,typeName:ke.ZodRecord,...Be(r)})}}class bl extends Ae{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.map)return ae(o,{code:te.invalid_type,expected:le.map,received:o.parsedType}),ve;const a=this._def.keyType,l=this._def.valueType,c=[...o.data.entries()].map(([d,u],f)=>({key:a._parse(new Hn(o,d,o.path,[f,"key"])),value:l._parse(new Hn(o,u,o.path,[f,"value"]))}));if(o.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const u of c){const f=await u.key,m=await u.value;if(f.status==="aborted"||m.status==="aborted")return ve;(f.status==="dirty"||m.status==="dirty")&&r.dirty(),d.set(f.value,m.value)}return{status:r.value,value:d}})}else{const d=new Map;for(const u of c){const f=u.key,m=u.value;if(f.status==="aborted"||m.status==="aborted")return ve;(f.status==="dirty"||m.status==="dirty")&&r.dirty(),d.set(f.value,m.value)}return{status:r.value,value:d}}}}bl.create=(n,e,r)=>new bl({valueType:e,keyType:n,typeName:ke.ZodMap,...Be(r)});class co extends Ae{_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.set)return ae(o,{code:te.invalid_type,expected:le.set,received:o.parsedType}),ve;const a=this._def;a.minSize!==null&&o.data.size<a.minSize.value&&(ae(o,{code:te.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),r.dirty()),a.maxSize!==null&&o.data.size>a.maxSize.value&&(ae(o,{code:te.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),r.dirty());const l=this._def.valueType;function c(u){const f=new Set;for(const m of u){if(m.status==="aborted")return ve;m.status==="dirty"&&r.dirty(),f.add(m.value)}return{status:r.value,value:f}}const d=[...o.data.values()].map((u,f)=>l._parse(new Hn(o,u,o.path,f)));return o.common.async?Promise.all(d).then(u=>c(u)):c(d)}min(e,r){return new co({...this._def,minSize:{value:e,message:me.toString(r)}})}max(e,r){return new co({...this._def,maxSize:{value:e,message:me.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}co.create=(n,e)=>new co({valueType:n,minSize:null,maxSize:null,typeName:ke.ZodSet,...Be(e)});class zo extends Ae{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==le.function)return ae(r,{code:te.invalid_type,expected:le.function,received:r.parsedType}),ve;function o(d,u){return fl({data:d,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,pl(),Zo].filter(f=>!!f),issueData:{code:te.invalid_arguments,argumentsError:u}})}function a(d,u){return fl({data:d,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,pl(),Zo].filter(f=>!!f),issueData:{code:te.invalid_return_type,returnTypeError:u}})}const l={errorMap:r.common.contextualErrorMap},c=r.data;if(this._def.returns instanceof Do){const d=this;return At(async function(...u){const f=new Jt([]),m=await d._def.args.parseAsync(u,l).catch(_=>{throw f.addIssue(o(u,_)),f}),g=await Reflect.apply(c,this,m);return await d._def.returns._def.type.parseAsync(g,l).catch(_=>{throw f.addIssue(a(g,_)),f})})}else{const d=this;return At(function(...u){const f=d._def.args.safeParse(u,l);if(!f.success)throw new Jt([o(u,f.error)]);const m=Reflect.apply(c,this,f.data),g=d._def.returns.safeParse(m,l);if(!g.success)throw new Jt([a(m,g.error)]);return g.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new zo({...this._def,args:Xn.create(e).rest(so.create())})}returns(e){return new zo({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,o){return new zo({args:e||Xn.create([]).rest(so.create()),returns:r||so.create(),typeName:ke.ZodFunction,...Be(o)})}}class Ha extends Ae{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}Ha.create=(n,e)=>new Ha({getter:n,typeName:ke.ZodLazy,...Be(e)});class Xa extends Ae{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return ae(r,{received:r.data,code:te.invalid_literal,expected:this._def.value}),ve}return{status:"valid",value:e.data}}get value(){return this._def.value}}Xa.create=(n,e)=>new Xa({value:n,typeName:ke.ZodLiteral,...Be(e)});function Ff(n,e){return new Tr({values:n,typeName:ke.ZodEnum,...Be(e)})}class Tr extends Ae{constructor(){super(...arguments),Ma.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),o=this._def.values;return ae(r,{expected:We.joinValues(o),received:r.parsedType,code:te.invalid_type}),ve}if(ml(this,Ma)||Lf(this,Ma,new Set(this._def.values)),!ml(this,Ma).has(e.data)){const r=this._getOrReturnCtx(e),o=this._def.values;return ae(r,{received:r.data,code:te.invalid_enum_value,options:o}),ve}return At(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return Tr.create(e,{...this._def,...r})}exclude(e,r=this._def){return Tr.create(this.options.filter(o=>!e.includes(o)),{...this._def,...r})}}Ma=new WeakMap,Tr.create=Ff;class ja extends Ae{constructor(){super(...arguments),Fa.set(this,void 0)}_parse(e){const r=We.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==le.string&&o.parsedType!==le.number){const a=We.objectValues(r);return ae(o,{expected:We.joinValues(a),received:o.parsedType,code:te.invalid_type}),ve}if(ml(this,Fa)||Lf(this,Fa,new Set(We.getValidEnumValues(this._def.values))),!ml(this,Fa).has(e.data)){const a=We.objectValues(r);return ae(o,{received:o.data,code:te.invalid_enum_value,options:a}),ve}return At(e.data)}get enum(){return this._def.values}}Fa=new WeakMap,ja.create=(n,e)=>new ja({values:n,typeName:ke.ZodNativeEnum,...Be(e)});class Do extends Ae{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==le.promise&&r.common.async===!1)return ae(r,{code:te.invalid_type,expected:le.promise,received:r.parsedType}),ve;const o=r.parsedType===le.promise?r.data:Promise.resolve(r.data);return At(o.then(a=>this._def.type.parseAsync(a,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Do.create=(n,e)=>new Do({type:n,typeName:ke.ZodPromise,...Be(e)});class xn extends Ae{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ke.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:o}=this._processInputParams(e),a=this._def.effect||null,l={addIssue:c=>{ae(o,c),c.fatal?r.abort():r.dirty()},get path(){return o.path}};if(l.addIssue=l.addIssue.bind(l),a.type==="preprocess"){const c=a.transform(o.data,l);if(o.common.async)return Promise.resolve(c).then(async d=>{if(r.value==="aborted")return ve;const u=await this._def.schema._parseAsync({data:d,path:o.path,parent:o});return u.status==="aborted"?ve:u.status==="dirty"||r.value==="dirty"?Mo(u.value):u});{if(r.value==="aborted")return ve;const d=this._def.schema._parseSync({data:c,path:o.path,parent:o});return d.status==="aborted"?ve:d.status==="dirty"||r.value==="dirty"?Mo(d.value):d}}if(a.type==="refinement"){const c=d=>{const u=a.refinement(d,l);if(o.common.async)return Promise.resolve(u);if(u 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"?ve:(d.status==="dirty"&&r.dirty(),c(d.value),{status:r.value,value:d.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(d=>d.status==="aborted"?ve:(d.status==="dirty"&&r.dirty(),c(d.value).then(()=>({status:r.value,value:d.value}))))}if(a.type==="transform")if(o.common.async===!1){const c=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!$a(c))return c;const d=a.transform(c.value,l);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:d}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(c=>$a(c)?Promise.resolve(a.transform(c.value,l)).then(d=>({status:r.value,value:d})):c);We.assertNever(a)}}xn.create=(n,e,r)=>new xn({schema:n,typeName:ke.ZodEffects,effect:e,...Be(r)}),xn.createWithPreprocess=(n,e,r)=>new xn({schema:e,effect:{type:"preprocess",transform:n},typeName:ke.ZodEffects,...Be(r)});class jn extends Ae{_parse(e){return this._getType(e)===le.undefined?At(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}jn.create=(n,e)=>new jn({innerType:n,typeName:ke.ZodOptional,...Be(e)});class Rr extends Ae{_parse(e){return this._getType(e)===le.null?At(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Rr.create=(n,e)=>new Rr({innerType:n,typeName:ke.ZodNullable,...Be(e)});class Ya extends Ae{_parse(e){const{ctx:r}=this._processInputParams(e);let o=r.data;return r.parsedType===le.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Ya.create=(n,e)=>new Ya({innerType:n,typeName:ke.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Be(e)});class Ka extends Ae{_parse(e){const{ctx:r}=this._processInputParams(e),o={...r,common:{...r.common,issues:[]}},a=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return Za(a)?a.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:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Jt(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}Ka.create=(n,e)=>new Ka({innerType:n,typeName:ke.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Be(e)});class _l extends Ae{_parse(e){if(this._getType(e)!==le.nan){const o=this._getOrReturnCtx(e);return ae(o,{code:te.invalid_type,expected:le.nan,received:o.parsedType}),ve}return{status:"valid",value:e.data}}}_l.create=n=>new _l({typeName:ke.ZodNaN,...Be(n)});const b1=Symbol("zod_brand");class jc extends Ae{_parse(e){const{ctx:r}=this._processInputParams(e),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}}class Ja extends Ae{_parse(e){const{status:r,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"?ve:l.status==="dirty"?(r.dirty(),Mo(l.value)):this._def.out._parseAsync({data:l.value,path:o.path,parent:o})})();{const a=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return a.status==="aborted"?ve:a.status==="dirty"?(r.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:o.path,parent:o})}}static create(e,r){return new Ja({in:e,out:r,typeName:ke.ZodPipeline})}}class qa extends Ae{_parse(e){const r=this._def.innerType._parse(e),o=a=>($a(a)&&(a.value=Object.freeze(a.value)),a);return Za(r)?r.then(a=>o(a)):o(r)}unwrap(){return this._def.innerType}}qa.create=(n,e)=>new qa({innerType:n,typeName:ke.ZodReadonly,...Be(e)});function Pf(n,e={},r){return n?Fo.create().superRefine((o,a)=>{var l,c;if(!n(o)){const d=typeof e=="function"?e(o):typeof e=="string"?{message:e}:e,u=(c=(l=d.fatal)!==null&&l!==void 0?l:r)!==null&&c!==void 0?c:!0,f=typeof d=="string"?{message:d}:d;a.addIssue({code:"custom",...f,fatal:u})}}):Fo.create()}const _1={object:rt.lazycreate};var ke;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(ke||(ke={}));const w1=(n,e={message:`Input not instance of ${n.name}`})=>Pf(r=>r instanceof n,e),zf=wn.create,Df=Vr.create,k1=_l.create,x1=Br.create,Wf=Pa.create,v1=lo.create,C1=hl.create,S1=za.create,E1=Da.create,N1=Fo.create,V1=so.create,B1=ir.create,T1=gl.create,R1=kn.create,I1=rt.create,A1=rt.strictCreate,L1=Wa.create,O1=yl.create,$1=Ga.create,Z1=Xn.create,M1=Ua.create,F1=bl.create,P1=co.create,z1=zo.create,D1=Ha.create,W1=Xa.create,G1=Tr.create,U1=ja.create,H1=Do.create,Gf=xn.create,X1=jn.create,j1=Rr.create,Y1=xn.createWithPreprocess,K1=Ja.create;var pe=Object.freeze({__proto__:null,defaultErrorMap:Zo,setErrorMap:t1,getErrorMap:pl,makeIssue:fl,EMPTY_PATH:n1,addIssueToContext:ae,ParseStatus:Nt,INVALID:ve,DIRTY:Mo,OK:At,isAborted:Gc,isDirty:Uc,isValid:$a,isAsync:Za,get util(){return We},get objectUtil(){return Wc},ZodParsedType:le,getParsedType:Nr,ZodType:Ae,datetimeRegex:Mf,ZodString:wn,ZodNumber:Vr,ZodBigInt:Br,ZodBoolean:Pa,ZodDate:lo,ZodSymbol:hl,ZodUndefined:za,ZodNull:Da,ZodAny:Fo,ZodUnknown:so,ZodNever:ir,ZodVoid:gl,ZodArray:kn,ZodObject:rt,ZodUnion:Wa,ZodDiscriminatedUnion:yl,ZodIntersection:Ga,ZodTuple:Xn,ZodRecord:Ua,ZodMap:bl,ZodSet:co,ZodFunction:zo,ZodLazy:Ha,ZodLiteral:Xa,ZodEnum:Tr,ZodNativeEnum:ja,ZodPromise:Do,ZodEffects:xn,ZodTransformer:xn,ZodOptional:jn,ZodNullable:Rr,ZodDefault:Ya,ZodCatch:Ka,ZodNaN:_l,BRAND:b1,ZodBranded:jc,ZodPipeline:Ja,ZodReadonly:qa,custom:Pf,Schema:Ae,ZodSchema:Ae,late:_1,get ZodFirstPartyTypeKind(){return ke},coerce:{string:n=>wn.create({...n,coerce:!0}),number:n=>Vr.create({...n,coerce:!0}),boolean:n=>Pa.create({...n,coerce:!0}),bigint:n=>Br.create({...n,coerce:!0}),date:n=>lo.create({...n,coerce:!0})},any:N1,array:R1,bigint:x1,boolean:Wf,date:v1,discriminatedUnion:O1,effect:Gf,enum:G1,function:z1,instanceof:w1,intersection:$1,lazy:D1,literal:W1,map:F1,nan:k1,nativeEnum:U1,never:B1,null:E1,nullable:j1,number:Df,object:I1,oboolean:()=>Wf().optional(),onumber:()=>Df().optional(),optional:X1,ostring:()=>zf().optional(),pipeline:K1,preprocess:Y1,promise:H1,record:M1,set:P1,strictObject:A1,string:zf,symbol:C1,transformer:Gf,tuple:Z1,undefined:S1,union:L1,unknown:V1,void:T1,NEVER:ve,ZodIssueCode:te,quotelessJson:e1,ZodError:Jt});const J1=-2147483648,Uf=-9007199254740991n,q1=null,Q1=null;function ew(n,e){switch(e){case"Int":return n===J1;case"Long":return n===Number(Uf)||n===Uf;case"Float":return Number.isNaN(n);case"Double":return Number.isNaN(n);case"String":return n===q1;case"Bytes":return n===Q1;default:throw Error(`unsupported data type: ${e}`)}}function tw(n,e){const r=Math.floor(e/8),o=1<<7-e%8;return(n[r]&o)>0}const nw={type:"absent"},Yc=null;function Hf(n){return typeof n=="object"&&n!==null&&n.type==="absent"}function Ir(n,e,r={}){if(tw(n.absent,e))return r.absent===void 0?nw:r.absent;const o=n.data[e],a=n.type;if(ew(o,a))return r.na===void 0?Yc:r.na;switch(a){case"Int":return o;case"Long":return Number(o);case"Float":return o;case"Double":return o;case"String":return o;case"Bytes":throw Error("Bytes not yet supported");default:throw Error(`unsupported data type: ${a}`)}}function Lt(n){const{type:e,name:r,domain:o}=n;return{type:e,name:r,...o&&{domain:o}}}function rw(n,e){if(n===void 0)return e===void 0;if(e===void 0)return!0;for(const r in e)if(n[r]!==e[r])return!1;return!0}function ow(n,e){return n.name===e.name&&rw(n.domain,e.domain)}pe.object({__isRef:pe.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:pe.string().describe("Upstream block id"),name:pe.string().describe("Name of the output provided to the upstream block's output context"),requireEnrichments:pe.literal(!0).optional().describe("True if current block that stores this reference in its args, may need enrichments for the references value originating from the blocks in between current and referenced block")}).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.").readonly(),pe.string().length(24).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");function Yn(n){return Er(n)}function Wo(n){return JSON.parse(n)}var Kc={exports:{}};(function(n,e){e=n.exports=r,e.getSerialize=o;function r(a,l,c,d){return JSON.stringify(a,o(l,d),c)}function o(a,l){var c=[],d=[];return l==null&&(l=function(u,f){return c[0]===f?"[Circular ~]":"[Circular ~."+d.slice(0,c.indexOf(f)).join(".")+"]"}),function(u,f){if(c.length>0){var m=c.indexOf(this);~m?c.splice(m+1):c.push(this),~m?d.splice(m,1/0,u):d.push(u),~c.indexOf(f)&&(f=l.call(this,u,f))}else c.push(f);return a==null?f:a.call(this,u,f)}}})(Kc,Kc.exports);var aw=Kc.exports;const iw=Dc(aw),lw=pe.object({type:pe.literal("PlError"),name:pe.string(),message:pe.string(),fullMessage:pe.string().optional(),stack:pe.string().optional()}),sw=lw.extend({cause:pe.lazy(()=>wl).optional(),errors:pe.lazy(()=>wl.array()).optional()}),cw=pe.object({type:pe.literal("StandardError"),name:pe.string(),message:pe.string(),stack:pe.string().optional()}),dw=cw.extend({cause:pe.lazy(()=>wl).optional(),errors:pe.lazy(()=>wl.array()).optional()}),wl=pe.union([dw,sw]);function Qa(n){const e=Jc.safeParse(n);if(e.success){const r=e.data;return r.name==="PlQuickJSError"||r.name==="PlErrorReport"||r.name==="PlInternalError"||r.name==="PlTengoError"||r.name==="PlRunnerError"||r.name==="PlMonetizationError"?{type:"PlError",name:r.name,message:r.message,fullMessage:r.fullMessage??void 0,stack:r.stack??void 0,cause:r.cause?Qa(r.cause):void 0,errors:r.errors?r.errors.map(Qa):void 0}:{type:"StandardError",name:r.name,message:r.message,stack:r.stack??void 0,cause:r.cause?Qa(r.cause):void 0,errors:r.errors?r.errors.map(Qa):void 0}}return{type:"StandardError",name:"Error",message:iw(n)}}const uw=pe.object({name:pe.string(),message:pe.string(),fullMessage:pe.string().optional(),stack:pe.string().optional()}),Jc=uw.extend({cause:pe.lazy(()=>Jc).optional(),errors:pe.lazy(()=>Jc.array()).optional()});function pw(n){if(n&&typeof globalThis.getPlatforma=="function")return globalThis.getPlatforma(n);if(typeof globalThis.platforma<"u")return globalThis.platforma;throw new Error("Can't get platforma instance.")}const fw=pe.object({type:pe.string(),importance:pe.number().optional(),id:pe.string().optional(),label:pe.string()});pe.array(fw);const mw="1.30.37";function Xf(n){const e=n.type;switch(e){case"axis":return Yn(n);case"column":return Yn(n);default:throw Error(`unsupported column type: ${e}`)}}function qc(n){return n.axesSpec.length===1&&n.name==="pl7.app/label"}function jf(n){var e;return((e=n.annotations)==null?void 0:e["pl7.app/table/visibility"])==="optional"}function hw(n){const e=n.type;switch(e){case"axis":return Yn(n);case"column":return Yn(n);default:throw Error(`unsupported column type: ${e}`)}}function gw(n,e,r,o){if(!(!e||e.axesSpec.length===0))return{id:n,spec:{kind:"PColumn",valueType:"Int",name:"pl7.app/table/row-selection",axesSpec:e.axesSpec,...o,annotations:{"pl7.app/label":"Selected rows","pl7.app/discreteValues":"[1]"}},data:e.selectedKeys.filter(a=>!a.some(l=>Hf(l))).map(a=>({key:a,val:1}))}}function yw(n){if(n===Yc)throw new Error("Axis value can never be N/A");return n}function uo(){return pw({sdkVersion:mw})}function bw(n){try{return uo()}catch{return n}}function _w(n){if(typeof globalThis.getEnvironmentValue=="function")return globalThis.getEnvironmentValue(n)}class Qc extends Error{}class kl extends Error{constructor(r){super(r.map(o=>typeof o=="string"?o:o.message).join(`
|
|
2
|
+
`));Ue(this,"fullMessage");this.errors=r,this.fullMessage=r.map(o=>typeof o=="string"?o:o.type=="PlError"&&"fullMessage"in o?o.fullMessage:o.message).join(`
|
|
3
|
+
`)}}function ww(n){return{ok:!0,value:n}}function Yf(n){if(!n)throw new Qc;if(!n.ok)throw new kl(n.errors);return n.value}function Kf(n){return{value:n,errors:void 0}}function kw(n){if(n.errors)throw new kl(n.errors);if(!n.value)throw new Qc;return n.value}function xw(n){return n!==void 0}const ed=n=>n,td=n=>n instanceof Error?n:Error(String(n)),nd=n=>n.name==="ZodError",rd=n=>{const{formErrors:e,fieldErrors:r}=n.flatten(),o=Object.entries(r).map(([a,l])=>a+":"+(l==null?void 0:l.join(",")));return e.concat(o).join("; ")};function od(n){const e=n.validate??ed,{autoSave:r}=n,o=t.ref(),a=t.ref(),l=C=>{a.value={model:Un(C)}};t.watch(()=>n.get(),C=>l(C),{immediate:!0});const c=()=>{var C;n.onSave(e(Un((C=a.value)==null?void 0:C.model)))},d=()=>{l(n.get()),o.value=void 0},u=C=>{const N=td(C);nd(N)?o.value=Error(rd(N)):o.value=N},f=C=>{o.value=void 0;try{e(C),r&&c()}catch(N){u(N)}},m=t.computed({get:()=>{var C;return(C=a.value)==null?void 0:C.model},set(C){l(C),f(C)}});t.watch(a,(C,N)=>{C&&C===N&&f(C.model)},{deep:!0});const g=t.computed(()=>!o.value),y=t.computed(()=>!Wt(n.get(),t.unref(a))),_=t.computed(()=>o.value?o.value.message:"");return t.reactive({model:m,valid:g,isChanged:y,error:o,errorString:_,save:c,revert:d,setError:u})}function vw(n,e,r){const o=n.validate??ed,{autoSave:a}=n,l=t.ref(),c=t.ref(),d=T=>{var $;if(r.deepPatchModel){const W=($=c.value)==null?void 0:$.model,E=Object.assign(Un(T),e??{});c.value={model:W?If(W,E):E,stage:Symbol()}}else c.value={model:Object.assign(Un(T),e??{}),stage:Symbol()}};t.watch(()=>n.get(),T=>d(T),{immediate:!0});const u=()=>{var T;n.onSave(o(Un((T=c.value)==null?void 0:T.model)))},f=()=>{d(n.get()),l.value=void 0},m=T=>{const $=td(T);nd($)?l.value=Error(rd($)):l.value=$},g=T=>{l.value=void 0;try{o(T),a&&u()}catch($){m($)}},y=t.computed({get:()=>{var T;return(T=c.value)==null?void 0:T.model},set(){throw Error("Cannot replace base model")}});t.watch([()=>({args:y.value.args,ui:y.value.ui}),()=>{var T;return(T=c.value)==null?void 0:T.stage}],([T,$],[W,E])=>{$===E&&g(T)},{deep:!0});const _=t.computed(()=>!l.value),C=t.computed(()=>{var W;const{args:T,ui:$}=((W=t.unref(c))==null?void 0:W.model)??{};return!Wt(n.get(),{args:T,ui:$})}),N=t.computed(()=>l.value?l.value.message:"");return t.reactive({model:y,valid:_,isChanged:C,error:l,errorString:N,save:u,revert:f,setError:m})}const Cw=n=>Object.fromEntries(new URL(n,"http://dummy").searchParams);function ei(n){return t.getCurrentScope()?(t.onScopeDispose(n),!0):!1}const ad=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Sw=n=>n!=null,Ew=Object.prototype.toString,Nw=n=>Ew.call(n)==="[object Object]",id=()=>{};function Vw(n,e){function r(...o){return new Promise((a,l)=>{Promise.resolve(n(()=>e.apply(this,o),{fn:e,thisArg:this,args:o})).then(a).catch(l)})}return r}function Bw(n,e={}){let r,o,a=id;const l=d=>{clearTimeout(d),a(),a=id};return d=>{const u=t.toValue(n),f=t.toValue(e.maxWait);return r&&l(r),u<=0||f!==void 0&&f<=0?(o&&(l(o),o=null),Promise.resolve(d())):new Promise((m,g)=>{a=e.rejectOnCancel?g:m,f&&!o&&(o=setTimeout(()=>{r&&l(r),o=null,m(d())},f)),r=setTimeout(()=>{o&&l(o),o=null,m(d())},u)})}}function Tw(n){return t.getCurrentInstance()}function ld(n){return Array.isArray(n)?n:[n]}function sd(n,e=200,r={}){return Vw(Bw(e,r),n)}function Rw(n,e=!0,r){Tw()?t.onMounted(n,r):e?n():t.nextTick(n)}function Iw(n,e=1e3,r={}){const{immediate:o=!0,immediateCallback:a=!1}=r;let l=null;const c=t.ref(!1);function d(){l&&(clearInterval(l),l=null)}function u(){c.value=!1,d()}function f(){const m=t.toValue(e);m<=0||(c.value=!0,a&&n(),d(),c.value&&(l=setInterval(n,m)))}if(o&&ad&&f(),t.isRef(e)||typeof e=="function"){const m=t.watch(e,()=>{c.value&&ad&&f()});ei(m)}return ei(u),{isActive:c,pause:u,resume:f}}function Aw(n,e,r){return t.watch(n,(a,l,c)=>{a&&e(a,l,c)},{...r,once:!1})}const cd=ad?window:void 0;function Go(n){var e;const r=t.toValue(n);return(e=r==null?void 0:r.$el)!=null?e:r}function Jf(...n){let e,r,o,a;if(typeof n[0]=="string"||Array.isArray(n[0])?([r,o,a]=n,e=cd):[e,r,o,a]=n,!e)return id;r=ld(r),o=ld(o);const l=[],c=()=>{l.forEach(m=>m()),l.length=0},d=(m,g,y,_)=>(m.addEventListener(g,y,_),()=>m.removeEventListener(g,y,_)),u=t.watch(()=>[Go(e),t.toValue(a)],([m,g])=>{if(c(),!m)return;const y=Nw(g)?{...g}:g;l.push(...r.flatMap(_=>o.map(C=>d(m,_,C,y))))},{immediate:!0,flush:"post"}),f=()=>{u(),c()};return ei(f),f}function Lw(){const n=t.ref(!1),e=t.getCurrentInstance();return e&&t.onMounted(()=>{n.value=!0},e),n}function qf(n){const e=Lw();return t.computed(()=>(e.value,!!n()))}function Ow(n,e,r={}){const{window:o=cd,...a}=r;let l;const c=qf(()=>o&&"MutationObserver"in o),d=()=>{l&&(l.disconnect(),l=void 0)},u=t.computed(()=>{const y=t.toValue(n),_=ld(y).map(Go).filter(Sw);return new Set(_)}),f=t.watch(()=>u.value,y=>{d(),c.value&&y.size&&(l=new MutationObserver(e),y.forEach(_=>l.observe(_,a)))},{immediate:!0,flush:"post"}),m=()=>l==null?void 0:l.takeRecords(),g=()=>{f(),d()};return ei(g),{isSupported:c,stop:g,takeRecords:m}}function $w(n,e,r={}){const{window:o=cd,...a}=r;let l;const c=qf(()=>o&&"ResizeObserver"in o),d=()=>{l&&(l.disconnect(),l=void 0)},u=t.computed(()=>{const g=t.toValue(n);return Array.isArray(g)?g.map(y=>Go(y)):[Go(g)]}),f=t.watch(u,g=>{if(d(),c.value&&o){l=new ResizeObserver(e);for(const y of g)y&&l.observe(y,a)}},{immediate:!0,flush:"post"}),m=()=>{d(),f()};return ei(m),{isSupported:c,stop:m}}function Zw(n,e={}){const{reset:r=!0,windowResize:o=!0,windowScroll:a=!0,immediate:l=!0,updateTiming:c="sync"}=e,d=t.ref(0),u=t.ref(0),f=t.ref(0),m=t.ref(0),g=t.ref(0),y=t.ref(0),_=t.ref(0),C=t.ref(0);function N(){const $=Go(n);if(!$){r&&(d.value=0,u.value=0,f.value=0,m.value=0,g.value=0,y.value=0,_.value=0,C.value=0);return}const W=$.getBoundingClientRect();d.value=W.height,u.value=W.bottom,f.value=W.left,m.value=W.right,g.value=W.top,y.value=W.width,_.value=W.x,C.value=W.y}function T(){c==="sync"?N():c==="next-frame"&&requestAnimationFrame(()=>N())}return $w(n,T),t.watch(()=>Go(n),$=>!$&&T()),Ow(n,T,{attributeFilter:["style","class"]}),a&&Jf("scroll",T,{capture:!0,passive:!0}),o&&Jf("resize",T,{passive:!0}),Rw(()=>{l&&T()}),{height:d,bottom:u,left:f,right:m,top:g,width:y,x:_,y:C,update:T}}function Mw(n,e,r){const o=(W,...E)=>{r.debug&&console.log(`%c>>> %c${W}`,"color: orange; font-weight: bold","color: orange",...E)},a=t.reactive({args:Object.freeze(n.args),outputs:Object.freeze(n.outputs),ui:Object.freeze(n.ui),navigationState:Object.freeze(n.navigationState)}),l=r.debounceSpan??100,c=r.debounceMaxWait??1e3,d=sd(W=>{Wt(W,a.args)||e.setBlockArgs(W)},l,{maxWait:c}),u=sd(W=>{Wt(W,a.ui)||e.setBlockUiState(W)},l,{maxWait:c}),f=sd((W,E)=>{(!Wt(W,a.args)||!Wt(E,a.ui))&&e.setBlockArgsAndUiState(W,E)},l,{maxWait:c});e.onStateUpdates(async W=>{W.forEach(E=>{E.key==="args"&&!Wt(a.args,E.value)&&(a.args=Object.freeze(E.value),o("args patch",a.args)),E.key==="ui"&&!Wt(a.ui,E.value)&&(a.ui=Object.freeze(E.value),o("ui patch",a.ui)),E.key==="outputs"&&!Wt(a.outputs,E.value)&&(a.outputs=Object.freeze(E.value),o("outputs patch",a.outputs)),E.key==="navigationState"&&!Wt(a.navigationState,E.value)&&(a.navigationState=Object.freeze(E.value),o("navigationState patch",a.navigationState))}),await t.nextTick()});const m=()=>Un(a.args),g=()=>Un(a.ui),y=()=>Un(a.navigationState),_={createArgsModel(W={}){return od({get(){return W.transform?W.transform(a.args):a.args},validate:W.validate,autoSave:!0,onSave(E){d(E)}})},createUiModel(W={},E){return od({get(){return W.transform?W.transform(a.ui):a.ui??E()},validate:W.validate,autoSave:!0,onSave(D){u(D)}})},useOutputs(...W){const E=t.reactive({errors:void 0,value:void 0});return t.watch(()=>a.outputs,()=>{try{Object.assign(E,{value:this.unwrapOutputs(...W),errors:void 0})}catch(D){Object.assign(E,{value:void 0,errors:[String(D)]})}},{immediate:!0,deep:!0}),E},unwrapOutputs(...W){const E=a.outputs,D=W.map(A=>[A,Yf(E[A])]);return Object.fromEntries(D)},updateArgs(W){const E=m();return W(E),e.setBlockArgs(E)},updateUiState(W){const E=g();return e.setBlockUiState(W(E))},updateNavigationState(W){const E=y();return W(E),e.setNavigationState(E)},navigateTo(W){const E=y();return E.href=W,e.setNavigationState(E)}},C=t.computed(()=>{const W=Object.entries(a.outputs).map(([E,D])=>[E,D.ok&&D.value!==void 0?D.value:void 0]);return Object.fromEntries(W)}),N=t.computed(()=>{const W=Object.entries(a.outputs).map(([E,D])=>[E,D&&!D.ok?new kl(D.errors):void 0]);return Object.fromEntries(W)}),T={snapshot:a,queryParams:t.computed(()=>Cw(a.navigationState.href)),href:t.computed(()=>a.navigationState.href),hasErrors:t.computed(()=>Object.values(a.outputs).some(W=>!(W!=null&&W.ok)))},$=vw({get(){return{args:a.args,ui:a.ui}},autoSave:!0,onSave(W){f(W.args,W.ui)}},{outputs:C,outputErrors:N},r);return t.reactive(Object.assign($,_,T))}const Fw=`.ag-header {
|
|
4
4
|
border-bottom: 1px solid var(--border-color-default);
|
|
5
5
|
}
|
|
6
6
|
|
|
@@ -26,57 +26,64 @@
|
|
|
26
26
|
|
|
27
27
|
.ag-menu-separator-part:after {
|
|
28
28
|
border-color: var(--btn-sec-hover-grey);
|
|
29
|
-
}`;function Bp(){$e.ModuleRegistry.registerModules([$e.AllEnterpriseModule]);const n=V1("AGGRID_LICENSE");n?($e.LicenseManager.setLicenseKey(n),console.log("AG Grid Activated")):console.log("AG Grid License not found")}const X1=$e.createPart({feature:"headerBottomBorder",css:K1}),_s=$e.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(X1),Vp=Symbol("sdk-vue");function ws(){return t.inject(Vp)}function Y1(n,e,r={}){let o;Bp();const a=()=>{B1(n).loadBlockState().then(c=>{s.loaded=!0;const d=G1(c,n,r),u=e(d),p=Object.fromEntries(Object.entries(u.routes).map(([h,g])=>{const y=typeof g=="function"?g():g;return[h,t.markRaw(y)]}));o=Object.assign(d,{...u,getRoute(h){return p[h]}})}).catch(c=>{console.error("load initial state error",c),s.error=c})},s=t.reactive({loaded:!1,error:void 0,useApp(){return aw(o,"App is not loaded")},install(c){c.provide(Vp,this),a()}});return s}var J1=Object.defineProperty,Q1=(n,e,r)=>e in n?J1(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,eb=(n,e,r)=>Q1(n,e+"",r);function zo(n,e){if(n==null)throw Error(e??"Empty (null | undefined) value");return n}function tb(n,e,r){const o=Math.min(e,r),a=Math.max(e,r);return n>=o&&n<=a}function nb(n){return new Promise(e=>setTimeout(e,n))}function rb(n){return n()}function bs(n,e,r){return e>n?e:n>r?r:n}function Tp(n,e){return e(n)}function Vr(n,e){if(n!=null)return e(n)}function ob(n){if(n&&n.ok)return n.value}async function ab(n){return Object.fromEntries(await Promise.all(Object.entries(n).map(async([e,r])=>[e,await r])))}const Ap=n=>n;function ib(n,e){return n=Math.ceil(n),e=Math.floor(e),Math.floor(Math.random()*(e-n))+n}function sb(n,e=[]){for(n=n?String(n):"";e.includes(n.charAt(0));)n=n.substr(1);for(;e.includes(n.charAt(n.length-1));)n=n.substr(0,n.length-1);return n}function lb(n,e=[]){for(n=n?String(n):"";e.includes(n.charAt(0));)n=n.substring(1);return n}function cb(n){let e="";for(let r=0;r<n;r++)e+=String.fromCharCode(ib(65,91));return e}function $p(){return cb(42)}const Ga=Array.isArray;function ks(n){return n!==null&&typeof n=="object"}function Uo(n){if(typeof n!="object"||n===null)return!1;const e=Object.getPrototypeOf(n);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null}function db(n,e){return Object.keys(n).map(r=>e(n[r],r))}function Rp(n){return Object.values(n).reduce((e,r)=>r!==void 0?e+1:e,0)}function xs(n,e){if(!(ks(n)&&ks(e)))return n===e;if(Ga(n)&&Ga(e))return n.length!==e.length?!1:[...n.keys()].every(r=>xs(n[r],e[r]));if(Uo(n)&&Uo(e))return Rp(n)!==Rp(e)?!1:Object.keys(n).every(r=>xs(n[r],e[r]));throw Error(`Cannot compare a ${String(n)} and b ${String(e)}`)}const vs=xs;function Ka(n){if(Array.isArray(n)){const e=[];for(let r=0;r<n.length;r++)e[r]=Ka(n[r]);return e}else if(Uo(n)){const e={};return Object.keys(n).forEach(r=>{e[r]=Ka(n[r])}),e}else return n}function ub(n){return Array.isArray(n)?Object.assign([],n):ks(n)?Object.assign({},n):n}function fb(n,e){const r={};for(const o in e)e[o]!==n[o]&&(r[o]=n[o]);return r}function pb(n){return Object.entries(n).forEach(([e,r])=>{r instanceof Function&&(n[e]=r.bind(n))}),n}function hb(n,e,r){return n[e]=r,n}function mb(n,e){return n[e]}function gb(n,e){n={...n};const r=n[e];return delete n[e],[r,n]}function yb(n,...e){return Object.assign({},...e.map(r=>({[r]:n[r]})))}function _b(n,...e){return e.map(r=>n[r])}function wb(n,...e){const r=Object.assign({},n);return e.forEach(o=>delete r[o]),r}function Op(n,e){return new Set([...Object.keys(n),...Object.keys(e)]).forEach(r=>{const o=n[r],a=e[r];Uo(o)&&Uo(a)||Ga(o)&&Ga(a)&&o.length===a.length?Op(o,a):n[r]=a}),n}const Kc=Object.freeze(Object.defineProperty({__proto__:null,bindMethods:pb,deepClone:Ka,deepEqual:vs,deepPatch:Op,getProp:mb,isArray:Ga,isJsonEqual:xs,isNonPrimitive:ks,isPlainObject:Uo,map:db,omit:wb,pick:yb,pickValues:_b,setProp:hb,shallowClone:ub,shallowDiff:fb,shiftProp:gb},Symbol.toStringTag,{value:"Module"}));function bb(n,e){const r=n.findIndex(e);if(r<0)return[];const o=(()=>{for(let a=r;a<n.length;a++)if(!e(n[a],a))return a;return n.length})();return n.slice(r,o)}function Ip(n,e,r){let o;return function(...a){o&&clearTimeout(o),o=setTimeout(()=>{o=void 0,n.apply(this,a)},e)}}function kb(n){let e=0n,r;return async function(...o){const a=++e;try{await r}catch{}if(e!==a)return{ok:!1};const s=n(...o);return r=s,{ok:!0,value:await s}}}const xb=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],vb=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],Cb=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Eb=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],Dp=(n,e)=>{let r=String(n);return typeof e=="string"||Array.isArray(e)?r=n.toLocaleString(e):e===!0&&(r=n.toLocaleString(void 0)),r};function Xc(n,e){if(n=typeof n=="bigint"?Number(n):n,!Number.isFinite(n))throw new TypeError(`Expected a finite number, got ${typeof n}: ${n}`);Object.assign(e,{bits:!1,binary:!1});const r=e.bits?e.binary?Eb:Cb:e.binary?vb:xb;if(e.signed&&n===0)return` 0 ${r[0]}`;const o=n<0,a=o?"-":e.signed?"+":"";if(o&&(n=-n),n<1){const u=Dp(n,e.locale);return a+u+" "+r[0]}const s=Math.min(Math.floor(e.binary?Math.log(n)/Math.log(1024):Math.log10(n)/3),r.length-1);n/=(e.binary?1024:1e3)**s,n=Number(n.toPrecision(3));const c=Dp(Number(n),e.locale),d=r[s];return a+c+" "+d}const Sb={class:"context-menu"},Nb=["onClick"],Bb=t.defineComponent({__name:"Menu",props:{options:{}},emits:["close"],setup(n,{emit:e}){const r=e,o=a=>{a.cb(),r("close")};return(a,s)=>(t.openBlock(),t.createElementBlock("div",Sb,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.options,(c,d)=>(t.openBlock(),t.createElementBlock("div",{key:d,onClick:t.withModifiers(u=>o(c),["stop"])},[t.createElementVNode("span",null,t.toDisplayString(c.text),1)],8,Nb))),128))]))}}),lt=(n,e)=>{const r=n.__vccOpts||n;for(const[o,a]of e)r[o]=a;return r},Vb=lt(Bb,[["__scopeId","data-v-12530966"]]);function Yc(n,e){n.preventDefault();const r=()=>{t.render(null,document.body)},o=t.h(Vb,{options:e,onClose:()=>{r()}});t.render(o,document.body);const a=o.el;return a.style.top=n.clientY+"px",a.style.left=n.clientX+"px",document.addEventListener("click",s=>{a.contains(s.target)||r()}),r}const Mp=Symbol(),Cs=()=>t.inject(Mp),Tb=["value"],Ab={key:1},$b=t.defineComponent({__name:"BaseCellComponent",props:{modelValue:{},valueType:{},editable:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:e}){const r=e,o=n,a=t.reactive({edit:!1}),s=t.computed(()=>o.valueType),c=p=>{var h;const g=(h=p.target)==null?void 0:h.value,y=t.unref(s),w=rb(()=>y==="integer"?parseInt(g,10):y==="float"?Number(g):g);r("update:modelValue",w),a.edit=!1},d=t.ref(),u=p=>{!p.metaKey&&o.editable&&(a.edit=!0,requestAnimationFrame(()=>{var h,g;(g=(h=d.value)==null?void 0:h.querySelector("input"))==null||g.focus()}))};return(p,h)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"baseRef",ref:d,class:t.normalizeClass(["base-cell",{"base-cell__edit":a.edit}]),onClick:u},[a.edit?(t.openBlock(),t.createElementBlock("input",{key:0,value:p.modelValue,onFocusout:h[0]||(h[0]=g=>a.edit=!1),onChange:c},null,40,Tb)):(t.openBlock(),t.createElementBlock("div",Ab,t.toDisplayString(p.modelValue),1))],2))}}),Rb=["^data-row-index"],Ob={key:0,class:"control-cell"},Ib=t.defineComponent({__name:"TdCell",props:{cell:{}},setup(n){const e=n,r=Cs(),o=t.computed(()=>e.cell.column.valueType),a=p=>{Vr(r.settings.value.onUpdatedRow,h=>{const g=e.cell.row,y={...g.dataRow,[e.cell.id]:p};h({...g,dataRow:y})})},s=p=>{p.metaKey&&r.selectRow(e.cell.row.primaryKey)},c=(p,h)=>{if(p.type==="contextmenu")p.preventDefault();else return;const g=r.settings??{},y=[],{onSelectedRows:w,onSelectedColumns:E}=g.value,N=r.data.selectedRows.has(h.primaryKey);w&&w.length&&(N?y.push({text:"Deselect row",cb(){r.data.selectedRows.delete(e.cell.row.primaryKey)}}):y.push({text:"Select row",cb(){r.selectRow(e.cell.row.primaryKey)}})),E&&E.length&&(y.push({text:"Select column",cb(){r.selectColumn(e.cell.column.id)}}),y.push({text:"Unselect column",cb(){r.unselectColumn(e.cell.column.id)}})),y.length&&Yc(p,y)},d=t.ref(),u=t.computed(()=>e.cell.column.component?e.cell.column.component():void 0);return(p,h)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"cellRef",ref:d,class:t.normalizeClass(["td-cell",{[p.cell.class]:!0}]),"^data-row-index":p.cell.row.index,onClick:s,onContextmenu:h[0]||(h[0]=g=>c(g,p.cell.row))},[p.cell.control?(t.openBlock(),t.createElementBlock("div",Ob,t.toDisplayString(p.cell.row.index),1)):u.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u.value),{key:1,"model-value":p.cell.value,"onUpdate:modelValue":a},null,8,["model-value"])):(t.openBlock(),t.createBlock($b,{key:2,"model-value":p.cell.value,"value-type":o.value,editable:p.cell.column.editable,"onUpdate:modelValue":a},null,8,["model-value","value-type","editable"]))],42,Rb))}}),Db={},Mb={width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Pb(n,e){return t.openBlock(),t.createElementBlock("svg",Mb,e[0]||(e[0]=[t.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),t.createTextVNode(),t.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 Lb=lt(Db,[["render",Pb]]),Fb={class:"tr-head"},zb=t.defineComponent({__name:"TrHead",setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",Fb,[t.renderSlot(e.$slots,"default")]))}});function Ub(n,e){const r=e.indexOf(n)+1;return e[r>=e.length?0:r]}function jb(n,e){const r=n.findIndex(e);if(r<0)return[];const o=(()=>{for(let a=r;a<n.length;a++)if(!e(n[a],a))return a;return n.length})();return n.slice(r,o)}const Zb=["^data-col-id"],Wb=t.defineComponent({__name:"ThCell",props:{col:{}},emits:["delete:column","expand:column","change:sort"],setup(n,{emit:e}){const r=e;function o(s){s.preventDefault();const c=[];c.length&&Yc(s,c)}function a(s){var c;const d=((c=s.sort)==null?void 0:c.direction)??"DESC";r("change:sort",{colId:s.id,direction:Ub(d,["DESC","ASC"])})}return(s,c)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cell th-cell",{"justify-center":s.col.justify,frozen:s.col.frozen}]),"^data-col-id":s.col.id,onContextmenu:o},[s.col.valueType?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(s.col.valueType)},null,2)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(s.col.label)+" ",1),s.col.sort?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["sort",s.col.sort.direction]),onClick:c[0]||(c[0]=t.withModifiers(()=>a(s.col),["stop"]))},null,2)):t.createCommentVNode("",!0)],42,Zb))}}),Hb=t.defineComponent({__name:"TrBody",props:{row:{}},setup(n){const e=t.ref(),r=()=>{t.nextTick().then(()=>{Vr(e.value,o=>o.scrollLeft=0)})};return(o,a)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"trRef",ref:e,class:t.normalizeClass(["tr-body",{selected:o.row.selected}]),scroll:"no",style:t.normalizeStyle(o.row.style),onScroll:r},[t.renderSlot(o.$slots,"default")],38))}}),qb=t.defineComponent({__name:"ColumnCaret",props:{column:{}},setup(n){const e=Cs(),r=n,o=t.computed(()=>e.data.selectedColumns.has(r.column.id));return(a,s)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["column-caret",{selected:o.value,frozen:a.column.frozen}])},null,2))}});function ot(n,e,r,o){t.onMounted(()=>{var a;return(a=t.unref(n))==null?void 0:a.addEventListener(e,r,o)}),t.onUnmounted(()=>{var a;return(a=t.unref(n))==null?void 0:a.removeEventListener(e,r,o)})}function Gb(n){t.onMounted(()=>window.addEventListener("mouseup",n)),t.onUnmounted(()=>window.removeEventListener("mouseup",n))}function Kb(n){let e=!1;return function(...r){e||(requestAnimationFrame(()=>{n(...r),e=!1}),e=!0)}}function Xb(n,e){let r;function o(s){r={...s}}Gb(()=>{r=void 0,e()});const a=Kb(n);return ot(window,"mousemove",s=>{r&&a({x:r.x,width:r.width,diff:s.x-r.x})}),{start:o}}const jo=1,Yb=10,Jb=30,Pp=60;function Lp(){const n=t.reactive({x:0,y:0});function e(r){n.x=r.pageX,n.y=r.pageY}return t.onMounted(()=>window.addEventListener("mousemove",e)),t.onUnmounted(()=>window.removeEventListener("mousemove",e)),n}function Fp(n,e={}){const{delayEnter:r=0,delayLeave:o=0}=e,a=t.ref(!1);let s;const c=d=>{const u=d?r:o;s&&(clearTimeout(s),s=void 0),u?s=setTimeout(()=>a.value=d,u):a.value=d};return window&&(ot(n,"mouseenter",()=>c(!0)),ot(n,"mouseleave",()=>c(!1))),a}function Qb(n){var e;const r=Vr((e=t.unref(n))==null?void 0:e.querySelectorAll(".th-cell"),o=>[...o])??[];return r.map(o=>{const{width:a,x:s}=o.getBoundingClientRect(),c=o.getAttribute("data-col-id");return Ap({colId:c,width:a,x:s,right:s+a})}).slice(0,r.length-1)}function ek(n,e){const r=Lp(),o=Fp(e,{}),{data:a}=n,s=Xb(d=>{Vr(a.resizeTh,u=>{const p=a.columns.find(h=>h.id===u.colId);p&&(p.width=bs(d.width+d.diff,Jb,1e4),n.adjustWidth())})},()=>{a.resize=!1,a.resizeTh=void 0,document.body.style.cursor=""}),c=d=>{a.resizeTh&&(a.resize=!0,s.start({x:d.x,width:a.resizeTh.width}))};return t.watchEffect(()=>{if(!o.value){document.body.style.cursor="";return}if(a.resize)return;const d=Qb(e).find(u=>Math.abs(r.x-u.right)<Yb);d?(document.body.style.cursor="col-resize",a.resizeTh=d):(a.resizeTh=void 0,document.body.style.cursor="")}),{mouseDown:c}}const tk={key:0,class:"command-menu"},nk={key:0},rk=["onClick"],ok=t.defineComponent({__name:"RowsCommandMenu",setup(n){const e=Cs(),r=t.computed(()=>e.getSelectedRows()),o=t.computed(()=>r.value.length>0),a=t.computed(()=>{var c;return((c=e.settings)==null?void 0:c.value.onSelectedRows)??[]}),s=t.computed(()=>a.value.map(c=>({label:c.label,cb:()=>{c.cb(r.value),e.data.selectedRows.clear(),e.data.rows=[]}})));return(c,d)=>o.value?(t.openBlock(),t.createElementBlock("div",tk,[r.value.length?(t.openBlock(),t.createElementBlock("span",nk,t.toDisplayString(r.value.length)+" rows selected",1)):t.createCommentVNode("",!0),d[0]||(d[0]=t.createTextVNode()),d[1]||(d[1]=t.createElementVNode("hr",null,null,-1)),d[2]||(d[2]=t.createTextVNode()),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,(u,p)=>(t.openBlock(),t.createElementBlock("span",{key:p,class:"command",onClick:t.withModifiers(u.cb,["stop"])},t.toDisplayString(u.label),9,rk))),128))])):t.createCommentVNode("",!0)}}),ak={key:0,class:"command-menu"},ik={key:0},sk=["onClick"],lk=t.defineComponent({__name:"ColumnsCommandMenu",setup(n){const e=Cs(),r=t.computed(()=>e.getSelectedColumns()),o=t.computed(()=>r.value.length>0),a=t.computed(()=>{var c;return((c=e.settings)==null?void 0:c.value.onSelectedColumns)??[]}),s=t.computed(()=>a.value.map(c=>({label:c.label,cb:()=>{c.cb(r.value),e.data.selectedColumns.clear()}})));return(c,d)=>o.value?(t.openBlock(),t.createElementBlock("div",ak,[r.value.length?(t.openBlock(),t.createElementBlock("span",ik,"selected columns "+t.toDisplayString(r.value.length),1)):t.createCommentVNode("",!0),d[0]||(d[0]=t.createTextVNode()),d[1]||(d[1]=t.createElementVNode("hr",null,null,-1)),d[2]||(d[2]=t.createTextVNode()),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(s.value,(u,p)=>(t.openBlock(),t.createElementBlock("span",{key:p,class:"command",onClick:t.withModifiers(u.cb,["stop"])},t.toDisplayString(u.label),9,sk))),128))])):t.createCommentVNode("",!0)}});function Tr(n,e){const r={el:void 0,x:0,y:0},o=a=>({x:a.x,y:a.y,dx:a.x-r.x,dy:a.y-r.y});ot(document,"mousedown",a=>{a.target===t.unref(n)&&(a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),r.el=t.unref(n),r.x=a.x,r.y=a.y)}),ot(document,"mouseup",a=>{r.el&&(r.el=void 0,e({...o(a),stop:!0},r))}),ot(document,"mousemove",a=>{r.el&&e(o(a),r)})}const ck=t.defineComponent({__name:"TScroll",props:{offset:{},windowSize:{},dataSize:{}},emits:["change:offset"],setup(n,{emit:e}){const r=e,o=n,a=t.ref(),s=t.computed(()=>o.windowSize-12),c=t.computed(()=>o.windowSize<o.dataSize),d=t.computed(()=>Math.ceil(o.offset*(s.value/o.dataSize))),u=t.computed(()=>Math.ceil(s.value*s.value/o.dataSize)),p=t.computed(()=>({top:`${d.value}px`,height:`${u.value}px`}));return Tr(a,(h,g)=>{const y=(d.value+h.dy)*o.dataSize/s.value;r("change:offset",y),g.x=h.x,g.y=h.y}),(h,g)=>(t.openBlock(),t.createElementBlock("div",{class:"t-scroll",style:t.normalizeStyle({height:`${h.windowSize}px`})},[t.createElementVNode("div",null,[c.value?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"handleRef",ref:a,class:"t-scroll__handle",style:t.normalizeStyle(p.value)},null,4)):t.createCommentVNode("",!0)])],4))}});function dk(n){return t.computed(()=>{const{data:e,settings:r}=n,{bodyWidth:o,scrollLeft:a}=e,s=[...e.columns],c=$p();r.value.controlColumn&&s.unshift({id:c,label:"#",width:60,frozen:!0});let d=0;const u=s.map(h=>{const g={...h,offset:d};return d+=h.width+jo,g}),p=u.filter(h=>h.frozen);return bb(u,h=>h.frozen?!1:a<h.offset+h.width&&h.offset<o+a).concat(p).map(h=>({...h,style:{left:h.frozen?`${h.offset}px`:`${h.offset-e.scrollLeft}px`,width:`${h.width}px`},control:h.id===c}))})}function uk(n,e){const r=t.computed(()=>e.value.reduce((o,a)=>(o[a.id]=a.justify?"justify-"+a.justify:"",o),{}));return t.computed(()=>n.rows.map(o=>{const a=r.value,{primaryKey:s,offset:c,dataRow:d,height:u}=o,p=e.value.map(h=>({id:h.id,column:h,row:o,value:d[h.id],class:a[h.id],editable:h.editable,width:h.width,style:h.style,control:h.control}));return Ap({style:{top:`${c-n.scrollTop}px`,height:`${o.height}px`},primaryKey:s,offset:c,height:u,cells:p,selected:n.selectedRows.has(s)})}))}const fk=async(n,e)=>{const{scrollTop:r,bodyHeight:o}=n;return await nb(0),ab({rows:e.getRows(r,o),dataWindow:n})};function pk(n){const e=t.reactive({rowIndex:-1,columns:[],pendingLoads:0,currentWindow:void 0,rows:[],resize:!1,resizeTh:void 0,dataHeight:0,bodyHeight:n.settings.height,bodyWidth:0,scrollTop:0,scrollLeft:0,selectedRows:new Set,selectedColumns:new Set});t.watch(()=>n.settings,h=>{e.columns=Ka(h.columns),e.currentWindow=void 0,h.dataSource.getHeight().then(g=>{e.dataHeight=g,p.updateBodyHeight()}).catch(g=>e.error=g)},{immediate:!0});const r=t.computed(()=>n.settings),o=t.computed(()=>e.columns.reduce((h,g)=>h+g.width+jo,0)),a=t.computed(()=>Tp(p.data.dataHeight-p.data.bodyHeight,h=>h>0?h:0)),s=t.computed(()=>Tp(o.value-p.data.bodyWidth,h=>h>0?h:0)),c=t.computed(()=>({bodyHeight:e.bodyHeight,scrollTop:e.scrollTop,current:e.currentWindow})),d=dk({data:e,settings:r}),u=uk(e,d),p={data:e,settings:r,tableColumns:d,tableRows:u,adjustWidth:()=>{const h=e.columns.reduce((y,w)=>y+w.width+jo,0),g=e.bodyWidth+e.scrollLeft;if(h<g){const y=e.columns[e.columns.length-1];y.width=y.width+(g-h)}},updateOffsets(h){this.updateScrollTop(e.scrollTop+h.deltaY),this.updateScrollLeft(e.scrollLeft+h.deltaX)},getSelectedRows(){return e.rows.filter(h=>e.selectedRows.has(h.primaryKey))},getSelectedColumns(){return e.columns.filter(h=>e.selectedColumns.has(h.id))},selectRow(h){e.selectedRows.add(h)},unselectRow(h){e.selectedRows.delete(h)},selectColumn(h){e.selectedColumns.add(h)},unselectColumn(h){e.selectedColumns.delete(h)},updateScrollTop(h){e.scrollTop=bs(h,0,a.value)},updateScrollLeft(h){e.scrollLeft=bs(h,0,s.value)},updateBodyHeight(){const{height:h}=n.settings,{dataHeight:g}=e,y=h>g?g:h;e.bodyHeight=y},updateDimensions(h){this.updateBodyHeight(),p.data.bodyWidth=h.width,p.adjustWidth(),e.rows=[],e.currentWindow=void 0}};return t.watch(c,(h,g)=>{const y=h.current;(!y||h.scrollTop<y.scrollTop||h.scrollTop+h.bodyHeight>y.bodyHeight+y.scrollTop)&&(e.currentWindow={scrollTop:h.scrollTop-Pp,bodyHeight:h.bodyHeight+Pp*2},fk(Ka(e.currentWindow),r.value.dataSource).then(({rows:w,dataWindow:E})=>{vs(e.currentWindow,E)&&(e.rows=w)}))},{deep:!0,immediate:!0}),t.provide(Mp,p),p}const hk={class:"command-menu__container"},mk={key:0,class:"table-body__no-data"},gk={class:"carets"},Jc=t.defineComponent({__name:"TableComponent",props:{settings:{}},emits:["update:data","change:sort"],setup(n,{emit:e}){const r=e,o=n,a=pk(o),s=t.computed(()=>a.data.rows.length===0),c=t.computed(()=>({height:s.value?"212px":a.data.bodyHeight+"px"}));t.watch(a.data,N=>r("update:data",N),{deep:!0}),t.watch(o,()=>h);const d=t.ref(),u=t.ref(),p=t.ref(),h=()=>{Vr(p.value,N=>{a.updateDimensions(N.getBoundingClientRect())})},g=a.tableColumns,y=a.tableRows,{mouseDown:w}=ek(a,d);t.onMounted(()=>{t.nextTick(h)}),t.watchPostEffect(()=>{t.unref(o.settings),t.nextTick(h)}),ot(window,"resize",()=>t.nextTick(h));const E=N=>{N.preventDefault(),a.updateOffsets(N)};return(N,V)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"tableRef",ref:d,class:"data-table",onMousedown:V[2]||(V[2]=(...D)=>t.unref(w)&&t.unref(w)(...D))},[t.createElementVNode("div",hk,[t.createVNode(ok),V[3]||(V[3]=t.createTextVNode()),t.createVNode(lk)]),V[7]||(V[7]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"headRef",ref:u,class:"table-head"},[t.createVNode(zb,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(g),(D,F)=>(t.openBlock(),t.createBlock(Wb,{key:F,col:D,style:t.normalizeStyle(D.style),"onChange:sort":V[0]||(V[0]=$=>N.$emit("change:sort",$))},null,8,["col","style"]))),128))]),_:1})],512),V[8]||(V[8]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"bodyRef",ref:p,class:"table-body",style:t.normalizeStyle(c.value),onWheel:E},[s.value?(t.openBlock(),t.createElementBlock("div",mk,[t.createElementVNode("div",null,[t.createVNode(Lb),V[4]||(V[4]=t.createTextVNode()),V[5]||(V[5]=t.createElementVNode("div",null,"No Data To Show",-1))])])):t.createCommentVNode("",!0),V[6]||(V[6]=t.createTextVNode()),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(y),(D,F)=>(t.openBlock(),t.createBlock(Hb,{key:F,row:D},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(D.cells,$=>(t.openBlock(),t.createBlock(Ib,{key:$.column.id+":"+F,cell:$,style:t.normalizeStyle($.style)},null,8,["cell","style"]))),128))]),_:2},1032,["row"]))),128))],36),V[9]||(V[9]=t.createTextVNode()),t.createElementVNode("div",gk,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(g),(D,F)=>(t.openBlock(),t.createBlock(qb,{key:F,column:D,style:t.normalizeStyle(D.style),"onChange:sort":V[1]||(V[1]=$=>N.$emit("change:sort",$))},null,8,["column","style"]))),128))]),V[10]||(V[10]=t.createTextVNode()),t.createVNode(ck,{offset:t.unref(a).data.scrollTop,"window-size":t.unref(a).data.bodyHeight,"data-size":t.unref(a).data.dataHeight,"onChange:offset":t.unref(a).updateScrollTop},null,8,["offset","window-size","data-size","onChange:offset"])],544))}}),zp=new WeakMap;class yk{constructor(e,r,o){eb(this,"dataHeight"),this.datum=e,this.resolveHeight=r,this.resolvePrimaryKey=o;const a=e.reduce((c,d,u)=>(c.indices.set(u,c.total),c.total+=this.resolveHeight(d,u)+jo,c),{total:0,indices:new Map});this.dataHeight=a.total;const s=e.map((c,d)=>({dataRow:c,index:d,primaryKey:this.resolvePrimaryKey(c,d),offset:zo(a.indices.get(d)),height:this.resolveHeight(c,d)}));zp.set(this,s)}get rows(){return zp.get(this)}async getHeight(){return this.dataHeight}async getRows(e,r){return jb(this.rows,o=>{const a=o.offset;return e<a+o.height&&a<r+e})}}class _k{constructor(e,r,o){this.api=e,this.rowHeight=r,this.resolvePrimaryKey=o}get height(){return this.rowHeight+jo}async getHeight(){return await this.api.count()*this.height}async getRows(e,r){const o=bs(Math.floor(e/this.height),0,Number.POSITIVE_INFINITY),a=Math.ceil(r+40/this.height);return(await this.api.query({offset:o,limit:a})).map((s,c)=>({dataRow:s,index:o+c,primaryKey:this.resolvePrimaryKey(s,o+c),offset:(o+c)*(this.rowHeight+jo),height:this.rowHeight}))}}function wk(n){return Object.freeze(n)}function bk(n){return t.h(Jc,{settings:Object.freeze(n)})}function Qc(n,e){const r=new yk(n,e.resolveRowHeight,e.resolvePrimaryKey);return{...e,dataSource:r}}function kk(n,e){return t.computed(()=>{const r=t.unref(n);return Qc(r,t.unref(e))})}function xk(n,e){const r=t.computed(()=>{const a=t.unref(n);return Qc(a,t.unref(e))}),o=t.reactive({settings:r});return t.computed(()=>t.h(Jc,o))}const vk=Object.freeze(Object.defineProperty({__proto__:null,AsyncData:_k,Component:Jc,factory:bk,rawDataSettings:Qc,settings:wk,useRawData:kk,useRawDataComponent:xk},Symbol.toStringTag,{value:"Module"}));function*Ck(n,e){for(const r of n)yield e(r)}function Ek(n){const e=[];for(const r of n)e.push(r);return e}const ed=new Map;function Sk(n){return ed.has(n)||ed.set(n,t.ref(localStorage.getItem(n))),zo(ed.get(n),"...")}function Nk(n,e){e==null?localStorage.removeItem(n):localStorage.setItem(n,e)}function Up(n){const e=Sk(n);return t.watch(e,r=>Nk(n,r)),e}const td=new Set;window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",n=>{Ek(Ck(td.values(),e=>e(n.matches?"dark":"light")))});const Bk=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",jp=t.ref(Bk),nd=Up("theme");function Zp(n){const e=t.computed(()=>nd.value?nd.value:jp.value),r=a=>{jp.value=a,n==null||n(a)};function o(){nd.value=e.value==="light"?"dark":(e.value,"light")}return t.watch(e,a=>{n==null||n(t.unref(a))}),t.onMounted(()=>{td.add(r)}),t.onUnmounted(()=>{td.delete(r)}),[e,o]}const Vk=t.defineComponent({__name:"ThemeSwitcher",setup(n){const[e,r]=Zp();return(o,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ui-theme-switcher",t.unref(e)]),onClick:a[0]||(a[0]=(...s)=>t.unref(r)&&t.unref(r)(...s))},a[1]||(a[1]=[t.createElementVNode("div",null,null,-1)]),2))}}),Tk="_splash_itlwi_1",Ak="_table_itlwi_5",$k="_transparent_itlwi_8",Rk="_overlay_itlwi_11",Ok="_text_itlwi_29",Xa={splash:Tk,table:Ak,transparent:$k,overlay:Rk,text:Ok},Ik={class:"pl-loader-circular"},Dk={class:"pl-loader-circular__svg",viewBox:"25 25 50 50"},Mk=["stroke"],Wp=t.defineComponent({__name:"PlLoaderCircular",props:{size:{default:"16"}},setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",Ik,[t.createElementVNode("div",{style:t.normalizeStyle({height:`${e.size}px`,width:`${e.size}px`,"--main-color":`${+e.size<48?"var(--ic-01)":"var(--ic-02)"}`}),class:"pl-circle-loader__wrapper"},[(t.openBlock(),t.createElementBlock("svg",Dk,[t.createElementVNode("circle",{class:"pl-loader-circular__svg-circle",cx:"50",cy:"50",r:"20",fill:"none",stroke:`${+e.size<48?"var(--ic-01)":"var(--ic-02)"}`,"stroke-width":"2"},null,8,Mk)]))],4)]))}}),Es=t.defineComponent({__name:"PlSplash",props:{loadingText:{default:void 0},loading:{type:Boolean,default:!1},type:{default:void 0}},setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([t.unref(Xa).splash,{[t.unref(Xa).table]:e.type==="table",[t.unref(Xa).transparent]:e.type==="transparent"}])},[e.loading?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass([t.unref(Xa).overlay])},[t.createElementVNode("div",null,[t.createVNode(t.unref(Wp),{size:"48"}),r[0]||(r[0]=t.createTextVNode()),e.loadingText?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(Xa).text)},t.toDisplayString(e.loadingText),3)):t.createCommentVNode("",!0)])],2)):t.createCommentVNode("",!0),r[1]||(r[1]=t.createTextVNode()),t.renderSlot(e.$slots,"default")],2))}}),Pk={key:0,class:"pl-block-page__title"},Lk={class:"pl-block-page__title__default"},Fk={class:"pl-block-page__title__append"},zk={key:1},Uk={name:"PlBlockPage"},jk=t.defineComponent({...Uk,props:{noBodyGutters:{type:Boolean},bodyLoading:{type:Boolean},bodyLoadingText:{}},setup(n){const e=t.useSlots(),r=a=>{a.removeAttribute("title"),a.clientWidth<a.scrollWidth&&a.setAttribute("title",a.innerText)},o={mounted:r,updated:r};return(a,s)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["pl-layout-component pl-block-page",{noBodyGutters:a.noBodyGutters}])},[t.unref(e).title?(t.openBlock(),t.createElementBlock("div",Pk,[t.createElementVNode("div",Lk,[t.withDirectives((t.openBlock(),t.createElementBlock("span",null,[t.renderSlot(a.$slots,"title")])),[[o]]),s[0]||(s[0]=t.createTextVNode()),t.renderSlot(a.$slots,"after-title")]),s[1]||(s[1]=t.createTextVNode()),t.createElementVNode("div",Fk,[t.renderSlot(a.$slots,"append")])])):(t.openBlock(),t.createElementBlock("div",zk)),s[2]||(s[2]=t.createTextVNode()),t.createVNode(Es,{loading:a.bodyLoading,"loading-text":a.bodyLoadingText,class:"pl-block-page__body"},{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default")]),_:3},8,["loading","loading-text"])],2))}}),Zk={name:"PlContainer"},Wk=t.defineComponent({...Zk,props:{width:{},loading:{type:Boolean},loadingText:{}},setup(n){const e=n,r=t.computed(()=>({width:e.width}));return(o,a)=>(t.openBlock(),t.createBlock(Es,{loading:o.loading,"loading-text":o.loadingText,class:"pl-container pl-layout-component",style:t.normalizeStyle(r.value)},{default:t.withCtx(()=>[t.renderSlot(o.$slots,"default")]),_:3},8,["loading","loading-text","style"]))}}),Hk={name:"PlRow"},qk=t.defineComponent({...Hk,props:{wrap:{type:Boolean},alignCenter:{type:Boolean},noGap:{type:Boolean}},setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["pl-layout-component pl-row",{wrap:e.wrap,"align-center":e.alignCenter}])},[t.renderSlot(e.$slots,"default")],2))}}),Gk={class:"pl-layout-component",style:{"flex-grow":"1"}},Kk={name:"PlSpacer"},Hp=t.defineComponent({...Kk,setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",Gk))}}),Xk={name:"PlGrid"},Yk=t.defineComponent({...Xk,props:{columns:{}},setup(n){const e=n,r=t.computed(()=>({gridTemplateColumns:`repeat(${e.columns}, minmax(0, 1fr))`}));return(o,a)=>(t.openBlock(),t.createElementBlock("div",{class:"pl-layout-component pl-grid",style:t.normalizeStyle(r.value)},[t.renderSlot(o.$slots,"default")],4))}}),Jk={key:0,class:"pl-alert__icon"},Qk={class:"pl-alert__main"},ex={key:0},tx={class:"pl-alert__main__text"},nx={name:"PlAlert"},qp=t.defineComponent({...nx,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(n){const e={success:"success",warn:"warning",info:"edit",error:"error"};return(r,o)=>r.modelValue?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["pl-alert",[{monospace:r.monospace,whiteSpacePre:r.whiteSpacePre},r.type?`pl-alert__${r.type}`:""]]),style:t.normalizeStyle({maxHeight:r.maxHeight})},[r.icon&&r.type?(t.openBlock(),t.createElementBlock("div",Jk,[t.createElementVNode("div",{class:t.normalizeClass(`icon-24 icon-${e[r.type]}`)},null,2)])):t.createCommentVNode("",!0),o[2]||(o[2]=t.createTextVNode()),t.createElementVNode("div",Qk,[r.label?(t.openBlock(),t.createElementBlock("label",ex,t.toDisplayString(r.label),1)):t.createCommentVNode("",!0),o[1]||(o[1]=t.createTextVNode()),t.createElementVNode("div",tx,[t.renderSlot(r.$slots,"default")])]),o[3]||(o[3]=t.createTextVNode()),r.closeable?(t.openBlock(),t.createElementBlock("div",{key:1,class:"pl-alert__close-btn","aria-label":"Close alert",role:"button",onClick:o[0]||(o[0]=a=>r.$emit("update:modelValue",!1))})):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0)}}),rx=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
29
|
+
}`;function Qf(){Ie.ModuleRegistry.registerModules([Ie.AllEnterpriseModule]);const n=_w("AGGRID_LICENSE");n?(Ie.LicenseManager.setLicenseKey(n),console.log("AG Grid Activated")):console.log("AG Grid License not found")}const Pw=Ie.createPart({feature:"headerBottomBorder",css:Fw}),xl=Ie.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(Pw),em=Symbol("sdk-vue");function vl(){return t.inject(em)}function zw(n,e,r={}){let o;Qf();const a=()=>{bw(n).loadBlockState().then(c=>{l.loaded=!0;const d=Mw(c,n,r),u=e(d),f=Object.fromEntries(Object.entries(u.routes).map(([m,g])=>{const y=typeof g=="function"?g():g;return[m,t.markRaw(y)]}));o=Object.assign(d,{...u,getRoute(m){return f[m]}})}).catch(c=>{console.error("load initial state error",c),l.error=c})},l=t.reactive({loaded:!1,error:void 0,useApp(){return j_(o,"App is not loaded")},install(c){c.provide(em,this),a()}});return l}var Dw=Object.defineProperty,Ww=(n,e,r)=>e in n?Dw(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,Gw=(n,e,r)=>Ww(n,e+"",r);function Uo(n,e){if(n==null)throw Error(e??"Empty (null | undefined) value");return n}function Uw(n,e,r){const o=Math.min(e,r),a=Math.max(e,r);return n>=o&&n<=a}function Hw(n){return new Promise(e=>setTimeout(e,n))}function Xw(n){return n()}function Cl(n,e,r){return e>n?e:n>r?r:n}function tm(n,e){return e(n)}function Ar(n,e){if(n!=null)return e(n)}function jw(n){if(n&&n.ok)return n.value}async function Yw(n){return Object.fromEntries(await Promise.all(Object.entries(n).map(async([e,r])=>[e,await r])))}const nm=n=>n;function Kw(n,e){return n=Math.ceil(n),e=Math.floor(e),Math.floor(Math.random()*(e-n))+n}function Jw(n,e=[]){for(n=n?String(n):"";e.includes(n.charAt(0));)n=n.substr(1);for(;e.includes(n.charAt(n.length-1));)n=n.substr(0,n.length-1);return n}function qw(n,e=[]){for(n=n?String(n):"";e.includes(n.charAt(0));)n=n.substring(1);return n}function Qw(n){let e="";for(let r=0;r<n;r++)e+=String.fromCharCode(Kw(65,91));return e}function rm(){return Qw(42)}const ti=Array.isArray;function Sl(n){return n!==null&&typeof n=="object"}function Ho(n){if(typeof n!="object"||n===null)return!1;const e=Object.getPrototypeOf(n);return e===null||e===Object.prototype||Object.getPrototypeOf(e)===null}function ek(n,e){return Object.keys(n).map(r=>e(n[r],r))}function om(n){return Object.values(n).reduce((e,r)=>r!==void 0?e+1:e,0)}function El(n,e){if(!(Sl(n)&&Sl(e)))return n===e;if(ti(n)&&ti(e))return n.length!==e.length?!1:[...n.keys()].every(r=>El(n[r],e[r]));if(Ho(n)&&Ho(e))return om(n)!==om(e)?!1:Object.keys(n).every(r=>El(n[r],e[r]));throw Error(`Cannot compare a ${String(n)} and b ${String(e)}`)}const Nl=El;function ni(n){if(Array.isArray(n)){const e=[];for(let r=0;r<n.length;r++)e[r]=ni(n[r]);return e}else if(Ho(n)){const e={};return Object.keys(n).forEach(r=>{e[r]=ni(n[r])}),e}else return n}function tk(n){return Array.isArray(n)?Object.assign([],n):Sl(n)?Object.assign({},n):n}function nk(n,e){const r={};for(const o in e)e[o]!==n[o]&&(r[o]=n[o]);return r}function rk(n){return Object.entries(n).forEach(([e,r])=>{r instanceof Function&&(n[e]=r.bind(n))}),n}function ok(n,e,r){return n[e]=r,n}function ak(n,e){return n[e]}function ik(n,e){n={...n};const r=n[e];return delete n[e],[r,n]}function lk(n,...e){return Object.assign({},...e.map(r=>({[r]:n[r]})))}function sk(n,...e){return e.map(r=>n[r])}function ck(n,...e){const r=Object.assign({},n);return e.forEach(o=>delete r[o]),r}function am(n,e){return new Set([...Object.keys(n),...Object.keys(e)]).forEach(r=>{const o=n[r],a=e[r];Ho(o)&&Ho(a)||ti(o)&&ti(a)&&o.length===a.length?am(o,a):n[r]=a}),n}const dd=Object.freeze(Object.defineProperty({__proto__:null,bindMethods:rk,deepClone:ni,deepEqual:Nl,deepPatch:am,getProp:ak,isArray:ti,isJsonEqual:El,isNonPrimitive:Sl,isPlainObject:Ho,map:ek,omit:ck,pick:lk,pickValues:sk,setProp:ok,shallowClone:tk,shallowDiff:nk,shiftProp:ik},Symbol.toStringTag,{value:"Module"}));function dk(n,e){const r=n.findIndex(e);if(r<0)return[];const o=(()=>{for(let a=r;a<n.length;a++)if(!e(n[a],a))return a;return n.length})();return n.slice(r,o)}function im(n,e,r){let o;return function(...a){o&&clearTimeout(o),o=setTimeout(()=>{o=void 0,n.apply(this,a)},e)}}function uk(n){let e=0n,r;return async function(...o){const a=++e;try{await r}catch{}if(e!==a)return{ok:!1};const l=n(...o);return r=l,{ok:!0,value:await l}}}const pk=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],fk=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],mk=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],hk=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],lm=(n,e)=>{let r=String(n);return typeof e=="string"||Array.isArray(e)?r=n.toLocaleString(e):e===!0&&(r=n.toLocaleString(void 0)),r};function ud(n,e){if(n=typeof n=="bigint"?Number(n):n,!Number.isFinite(n))throw new TypeError(`Expected a finite number, got ${typeof n}: ${n}`);Object.assign(e,{bits:!1,binary:!1});const r=e.bits?e.binary?hk:mk:e.binary?fk:pk;if(e.signed&&n===0)return` 0 ${r[0]}`;const o=n<0,a=o?"-":e.signed?"+":"";if(o&&(n=-n),n<1){const u=lm(n,e.locale);return a+u+" "+r[0]}const l=Math.min(Math.floor(e.binary?Math.log(n)/Math.log(1024):Math.log10(n)/3),r.length-1);n/=(e.binary?1024:1e3)**l,n=Number(n.toPrecision(3));const c=lm(Number(n),e.locale),d=r[l];return a+c+" "+d}const gk={class:"context-menu"},yk=["onClick"],bk=t.defineComponent({__name:"Menu",props:{options:{}},emits:["close"],setup(n,{emit:e}){const r=e,o=a=>{a.cb(),r("close")};return(a,l)=>(t.openBlock(),t.createElementBlock("div",gk,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.options,(c,d)=>(t.openBlock(),t.createElementBlock("div",{key:d,onClick:t.withModifiers(u=>o(c),["stop"])},[t.createElementVNode("span",null,t.toDisplayString(c.text),1)],8,yk))),128))]))}}),st=(n,e)=>{const r=n.__vccOpts||n;for(const[o,a]of e)r[o]=a;return r},_k=st(bk,[["__scopeId","data-v-12530966"]]);function pd(n,e){n.preventDefault();const r=()=>{t.render(null,document.body)},o=t.h(_k,{options:e,onClose:()=>{r()}});t.render(o,document.body);const a=o.el;return a.style.top=n.clientY+"px",a.style.left=n.clientX+"px",document.addEventListener("click",l=>{a.contains(l.target)||r()}),r}const sm=Symbol(),Vl=()=>t.inject(sm),wk=["value"],kk={key:1},xk=t.defineComponent({__name:"BaseCellComponent",props:{modelValue:{},valueType:{},editable:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:e}){const r=e,o=n,a=t.reactive({edit:!1}),l=t.computed(()=>o.valueType),c=f=>{var m;const g=(m=f.target)==null?void 0:m.value,y=t.unref(l),_=Xw(()=>y==="integer"?parseInt(g,10):y==="float"?Number(g):g);r("update:modelValue",_),a.edit=!1},d=t.ref(),u=f=>{!f.metaKey&&o.editable&&(a.edit=!0,requestAnimationFrame(()=>{var m,g;(g=(m=d.value)==null?void 0:m.querySelector("input"))==null||g.focus()}))};return(f,m)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"baseRef",ref:d,class:t.normalizeClass(["base-cell",{"base-cell__edit":a.edit}]),onClick:u},[a.edit?(t.openBlock(),t.createElementBlock("input",{key:0,value:f.modelValue,onFocusout:m[0]||(m[0]=g=>a.edit=!1),onChange:c},null,40,wk)):(t.openBlock(),t.createElementBlock("div",kk,t.toDisplayString(f.modelValue),1))],2))}}),vk=["^data-row-index"],Ck={key:0,class:"control-cell"},Sk=t.defineComponent({__name:"TdCell",props:{cell:{}},setup(n){const e=n,r=Vl(),o=t.computed(()=>e.cell.column.valueType),a=f=>{Ar(r.settings.value.onUpdatedRow,m=>{const g=e.cell.row,y={...g.dataRow,[e.cell.id]:f};m({...g,dataRow:y})})},l=f=>{f.metaKey&&r.selectRow(e.cell.row.primaryKey)},c=(f,m)=>{if(f.type==="contextmenu")f.preventDefault();else return;const g=r.settings??{},y=[],{onSelectedRows:_,onSelectedColumns:C}=g.value,N=r.data.selectedRows.has(m.primaryKey);_&&_.length&&(N?y.push({text:"Deselect row",cb(){r.data.selectedRows.delete(e.cell.row.primaryKey)}}):y.push({text:"Select row",cb(){r.selectRow(e.cell.row.primaryKey)}})),C&&C.length&&(y.push({text:"Select column",cb(){r.selectColumn(e.cell.column.id)}}),y.push({text:"Unselect column",cb(){r.unselectColumn(e.cell.column.id)}})),y.length&&pd(f,y)},d=t.ref(),u=t.computed(()=>e.cell.column.component?e.cell.column.component():void 0);return(f,m)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"cellRef",ref:d,class:t.normalizeClass(["td-cell",{[f.cell.class]:!0}]),"^data-row-index":f.cell.row.index,onClick:l,onContextmenu:m[0]||(m[0]=g=>c(g,f.cell.row))},[f.cell.control?(t.openBlock(),t.createElementBlock("div",Ck,t.toDisplayString(f.cell.row.index),1)):u.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(u.value),{key:1,"model-value":f.cell.value,"onUpdate:modelValue":a},null,8,["model-value"])):(t.openBlock(),t.createBlock(xk,{key:2,"model-value":f.cell.value,"value-type":o.value,editable:f.cell.column.editable,"onUpdate:modelValue":a},null,8,["model-value","value-type","editable"]))],42,vk))}}),Ek={},Nk={width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Vk(n,e){return t.openBlock(),t.createElementBlock("svg",Nk,e[0]||(e[0]=[t.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),t.createTextVNode(),t.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 Bk=st(Ek,[["render",Vk]]),Tk={class:"tr-head"},Rk=t.defineComponent({__name:"TrHead",setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",Tk,[t.renderSlot(e.$slots,"default")]))}});function Ik(n,e){const r=e.indexOf(n)+1;return e[r>=e.length?0:r]}function Ak(n,e){const r=n.findIndex(e);if(r<0)return[];const o=(()=>{for(let a=r;a<n.length;a++)if(!e(n[a],a))return a;return n.length})();return n.slice(r,o)}const Lk=["^data-col-id"],Ok=t.defineComponent({__name:"ThCell",props:{col:{}},emits:["delete:column","expand:column","change:sort"],setup(n,{emit:e}){const r=e;function o(l){l.preventDefault();const c=[];c.length&&pd(l,c)}function a(l){var c;const d=((c=l.sort)==null?void 0:c.direction)??"DESC";r("change:sort",{colId:l.id,direction:Ik(d,["DESC","ASC"])})}return(l,c)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["cell th-cell",{"justify-center":l.col.justify,frozen:l.col.frozen}]),"^data-col-id":l.col.id,onContextmenu:o},[l.col.valueType?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(l.col.valueType)},null,2)):t.createCommentVNode("",!0),t.createTextVNode(" "+t.toDisplayString(l.col.label)+" ",1),l.col.sort?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["sort",l.col.sort.direction]),onClick:c[0]||(c[0]=t.withModifiers(()=>a(l.col),["stop"]))},null,2)):t.createCommentVNode("",!0)],42,Lk))}}),$k=t.defineComponent({__name:"TrBody",props:{row:{}},setup(n){const e=t.ref(),r=()=>{t.nextTick().then(()=>{Ar(e.value,o=>o.scrollLeft=0)})};return(o,a)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"trRef",ref:e,class:t.normalizeClass(["tr-body",{selected:o.row.selected}]),scroll:"no",style:t.normalizeStyle(o.row.style),onScroll:r},[t.renderSlot(o.$slots,"default")],38))}}),Zk=t.defineComponent({__name:"ColumnCaret",props:{column:{}},setup(n){const e=Vl(),r=n,o=t.computed(()=>e.data.selectedColumns.has(r.column.id));return(a,l)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["column-caret",{selected:o.value,frozen:a.column.frozen}])},null,2))}});function ot(n,e,r,o){t.onMounted(()=>{var a;return(a=t.unref(n))==null?void 0:a.addEventListener(e,r,o)}),t.onUnmounted(()=>{var a;return(a=t.unref(n))==null?void 0:a.removeEventListener(e,r,o)})}function Mk(n){t.onMounted(()=>window.addEventListener("mouseup",n)),t.onUnmounted(()=>window.removeEventListener("mouseup",n))}function Fk(n){let e=!1;return function(...r){e||(requestAnimationFrame(()=>{n(...r),e=!1}),e=!0)}}function Pk(n,e){let r;function o(l){r={...l}}Mk(()=>{r=void 0,e()});const a=Fk(n);return ot(window,"mousemove",l=>{r&&a({x:r.x,width:r.width,diff:l.x-r.x})}),{start:o}}const Xo=1,zk=10,Dk=30,cm=60;function dm(){const n=t.reactive({x:0,y:0});function e(r){n.x=r.pageX,n.y=r.pageY}return t.onMounted(()=>window.addEventListener("mousemove",e)),t.onUnmounted(()=>window.removeEventListener("mousemove",e)),n}function um(n,e={}){const{delayEnter:r=0,delayLeave:o=0}=e,a=t.ref(!1);let l;const c=d=>{const u=d?r:o;l&&(clearTimeout(l),l=void 0),u?l=setTimeout(()=>a.value=d,u):a.value=d};return window&&(ot(n,"mouseenter",()=>c(!0)),ot(n,"mouseleave",()=>c(!1))),a}function Wk(n){var e;const r=Ar((e=t.unref(n))==null?void 0:e.querySelectorAll(".th-cell"),o=>[...o])??[];return r.map(o=>{const{width:a,x:l}=o.getBoundingClientRect(),c=o.getAttribute("data-col-id");return nm({colId:c,width:a,x:l,right:l+a})}).slice(0,r.length-1)}function Gk(n,e){const r=dm(),o=um(e,{}),{data:a}=n,l=Pk(d=>{Ar(a.resizeTh,u=>{const f=a.columns.find(m=>m.id===u.colId);f&&(f.width=Cl(d.width+d.diff,Dk,1e4),n.adjustWidth())})},()=>{a.resize=!1,a.resizeTh=void 0,document.body.style.cursor=""}),c=d=>{a.resizeTh&&(a.resize=!0,l.start({x:d.x,width:a.resizeTh.width}))};return t.watchEffect(()=>{if(!o.value){document.body.style.cursor="";return}if(a.resize)return;const d=Wk(e).find(u=>Math.abs(r.x-u.right)<zk);d?(document.body.style.cursor="col-resize",a.resizeTh=d):(a.resizeTh=void 0,document.body.style.cursor="")}),{mouseDown:c}}const Uk={key:0,class:"command-menu"},Hk={key:0},Xk=["onClick"],jk=t.defineComponent({__name:"RowsCommandMenu",setup(n){const e=Vl(),r=t.computed(()=>e.getSelectedRows()),o=t.computed(()=>r.value.length>0),a=t.computed(()=>{var c;return((c=e.settings)==null?void 0:c.value.onSelectedRows)??[]}),l=t.computed(()=>a.value.map(c=>({label:c.label,cb:()=>{c.cb(r.value),e.data.selectedRows.clear(),e.data.rows=[]}})));return(c,d)=>o.value?(t.openBlock(),t.createElementBlock("div",Uk,[r.value.length?(t.openBlock(),t.createElementBlock("span",Hk,t.toDisplayString(r.value.length)+" rows selected",1)):t.createCommentVNode("",!0),d[0]||(d[0]=t.createTextVNode()),d[1]||(d[1]=t.createElementVNode("hr",null,null,-1)),d[2]||(d[2]=t.createTextVNode()),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,(u,f)=>(t.openBlock(),t.createElementBlock("span",{key:f,class:"command",onClick:t.withModifiers(u.cb,["stop"])},t.toDisplayString(u.label),9,Xk))),128))])):t.createCommentVNode("",!0)}}),Yk={key:0,class:"command-menu"},Kk={key:0},Jk=["onClick"],qk=t.defineComponent({__name:"ColumnsCommandMenu",setup(n){const e=Vl(),r=t.computed(()=>e.getSelectedColumns()),o=t.computed(()=>r.value.length>0),a=t.computed(()=>{var c;return((c=e.settings)==null?void 0:c.value.onSelectedColumns)??[]}),l=t.computed(()=>a.value.map(c=>({label:c.label,cb:()=>{c.cb(r.value),e.data.selectedColumns.clear()}})));return(c,d)=>o.value?(t.openBlock(),t.createElementBlock("div",Yk,[r.value.length?(t.openBlock(),t.createElementBlock("span",Kk,"selected columns "+t.toDisplayString(r.value.length),1)):t.createCommentVNode("",!0),d[0]||(d[0]=t.createTextVNode()),d[1]||(d[1]=t.createElementVNode("hr",null,null,-1)),d[2]||(d[2]=t.createTextVNode()),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(l.value,(u,f)=>(t.openBlock(),t.createElementBlock("span",{key:f,class:"command",onClick:t.withModifiers(u.cb,["stop"])},t.toDisplayString(u.label),9,Jk))),128))])):t.createCommentVNode("",!0)}});function Lr(n,e){const r={el:void 0,x:0,y:0},o=a=>({x:a.x,y:a.y,dx:a.x-r.x,dy:a.y-r.y});ot(document,"mousedown",a=>{a.target===t.unref(n)&&(a.stopPropagation&&a.stopPropagation(),a.preventDefault&&a.preventDefault(),r.el=t.unref(n),r.x=a.x,r.y=a.y)}),ot(document,"mouseup",a=>{r.el&&(r.el=void 0,e({...o(a),stop:!0},r))}),ot(document,"mousemove",a=>{r.el&&e(o(a),r)})}const Qk=t.defineComponent({__name:"TScroll",props:{offset:{},windowSize:{},dataSize:{}},emits:["change:offset"],setup(n,{emit:e}){const r=e,o=n,a=t.ref(),l=t.computed(()=>o.windowSize-12),c=t.computed(()=>o.windowSize<o.dataSize),d=t.computed(()=>Math.ceil(o.offset*(l.value/o.dataSize))),u=t.computed(()=>Math.ceil(l.value*l.value/o.dataSize)),f=t.computed(()=>({top:`${d.value}px`,height:`${u.value}px`}));return Lr(a,(m,g)=>{const y=(d.value+m.dy)*o.dataSize/l.value;r("change:offset",y),g.x=m.x,g.y=m.y}),(m,g)=>(t.openBlock(),t.createElementBlock("div",{class:"t-scroll",style:t.normalizeStyle({height:`${m.windowSize}px`})},[t.createElementVNode("div",null,[c.value?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"handleRef",ref:a,class:"t-scroll__handle",style:t.normalizeStyle(f.value)},null,4)):t.createCommentVNode("",!0)])],4))}});function ex(n){return t.computed(()=>{const{data:e,settings:r}=n,{bodyWidth:o,scrollLeft:a}=e,l=[...e.columns],c=rm();r.value.controlColumn&&l.unshift({id:c,label:"#",width:60,frozen:!0});let d=0;const u=l.map(m=>{const g={...m,offset:d};return d+=m.width+Xo,g}),f=u.filter(m=>m.frozen);return dk(u,m=>m.frozen?!1:a<m.offset+m.width&&m.offset<o+a).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 tx(n,e){const r=t.computed(()=>e.value.reduce((o,a)=>(o[a.id]=a.justify?"justify-"+a.justify:"",o),{}));return t.computed(()=>n.rows.map(o=>{const a=r.value,{primaryKey:l,offset:c,dataRow:d,height:u}=o,f=e.value.map(m=>({id:m.id,column:m,row:o,value:d[m.id],class:a[m.id],editable:m.editable,width:m.width,style:m.style,control:m.control}));return nm({style:{top:`${c-n.scrollTop}px`,height:`${o.height}px`},primaryKey:l,offset:c,height:u,cells:f,selected:n.selectedRows.has(l)})}))}const nx=async(n,e)=>{const{scrollTop:r,bodyHeight:o}=n;return await Hw(0),Yw({rows:e.getRows(r,o),dataWindow:n})};function rx(n){const e=t.reactive({rowIndex:-1,columns:[],pendingLoads:0,currentWindow:void 0,rows:[],resize:!1,resizeTh:void 0,dataHeight:0,bodyHeight:n.settings.height,bodyWidth:0,scrollTop:0,scrollLeft:0,selectedRows:new Set,selectedColumns:new Set});t.watch(()=>n.settings,m=>{e.columns=ni(m.columns),e.currentWindow=void 0,m.dataSource.getHeight().then(g=>{e.dataHeight=g,f.updateBodyHeight()}).catch(g=>e.error=g)},{immediate:!0});const r=t.computed(()=>n.settings),o=t.computed(()=>e.columns.reduce((m,g)=>m+g.width+Xo,0)),a=t.computed(()=>tm(f.data.dataHeight-f.data.bodyHeight,m=>m>0?m:0)),l=t.computed(()=>tm(o.value-f.data.bodyWidth,m=>m>0?m:0)),c=t.computed(()=>({bodyHeight:e.bodyHeight,scrollTop:e.scrollTop,current:e.currentWindow})),d=ex({data:e,settings:r}),u=tx(e,d),f={data:e,settings:r,tableColumns:d,tableRows:u,adjustWidth:()=>{const m=e.columns.reduce((y,_)=>y+_.width+Xo,0),g=e.bodyWidth+e.scrollLeft;if(m<g){const y=e.columns[e.columns.length-1];y.width=y.width+(g-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=Cl(m,0,a.value)},updateScrollLeft(m){e.scrollLeft=Cl(m,0,l.value)},updateBodyHeight(){const{height:m}=n.settings,{dataHeight:g}=e,y=m>g?g:m;e.bodyHeight=y},updateDimensions(m){this.updateBodyHeight(),f.data.bodyWidth=m.width,f.adjustWidth(),e.rows=[],e.currentWindow=void 0}};return t.watch(c,(m,g)=>{const y=m.current;(!y||m.scrollTop<y.scrollTop||m.scrollTop+m.bodyHeight>y.bodyHeight+y.scrollTop)&&(e.currentWindow={scrollTop:m.scrollTop-cm,bodyHeight:m.bodyHeight+cm*2},nx(ni(e.currentWindow),r.value.dataSource).then(({rows:_,dataWindow:C})=>{Nl(e.currentWindow,C)&&(e.rows=_)}))},{deep:!0,immediate:!0}),t.provide(sm,f),f}const ox={class:"command-menu__container"},ax={key:0,class:"table-body__no-data"},ix={class:"carets"},fd=t.defineComponent({__name:"TableComponent",props:{settings:{}},emits:["update:data","change:sort"],setup(n,{emit:e}){const r=e,o=n,a=rx(o),l=t.computed(()=>a.data.rows.length===0),c=t.computed(()=>({height:l.value?"212px":a.data.bodyHeight+"px"}));t.watch(a.data,N=>r("update:data",N),{deep:!0}),t.watch(o,()=>m);const d=t.ref(),u=t.ref(),f=t.ref(),m=()=>{Ar(f.value,N=>{a.updateDimensions(N.getBoundingClientRect())})},g=a.tableColumns,y=a.tableRows,{mouseDown:_}=Gk(a,d);t.onMounted(()=>{t.nextTick(m)}),t.watchPostEffect(()=>{t.unref(o.settings),t.nextTick(m)}),ot(window,"resize",()=>t.nextTick(m));const C=N=>{N.preventDefault(),a.updateOffsets(N)};return(N,T)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"tableRef",ref:d,class:"data-table",onMousedown:T[2]||(T[2]=(...$)=>t.unref(_)&&t.unref(_)(...$))},[t.createElementVNode("div",ox,[t.createVNode(jk),T[3]||(T[3]=t.createTextVNode()),t.createVNode(qk)]),T[7]||(T[7]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"headRef",ref:u,class:"table-head"},[t.createVNode(Rk,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(g),($,W)=>(t.openBlock(),t.createBlock(Ok,{key:W,col:$,style:t.normalizeStyle($.style),"onChange:sort":T[0]||(T[0]=E=>N.$emit("change:sort",E))},null,8,["col","style"]))),128))]),_:1})],512),T[8]||(T[8]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"bodyRef",ref:f,class:"table-body",style:t.normalizeStyle(c.value),onWheel:C},[l.value?(t.openBlock(),t.createElementBlock("div",ax,[t.createElementVNode("div",null,[t.createVNode(Bk),T[4]||(T[4]=t.createTextVNode()),T[5]||(T[5]=t.createElementVNode("div",null,"No Data To Show",-1))])])):t.createCommentVNode("",!0),T[6]||(T[6]=t.createTextVNode()),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(y),($,W)=>(t.openBlock(),t.createBlock($k,{key:W,row:$},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.cells,E=>(t.openBlock(),t.createBlock(Sk,{key:E.column.id+":"+W,cell:E,style:t.normalizeStyle(E.style)},null,8,["cell","style"]))),128))]),_:2},1032,["row"]))),128))],36),T[9]||(T[9]=t.createTextVNode()),t.createElementVNode("div",ix,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(g),($,W)=>(t.openBlock(),t.createBlock(Zk,{key:W,column:$,style:t.normalizeStyle($.style),"onChange:sort":T[1]||(T[1]=E=>N.$emit("change:sort",E))},null,8,["column","style"]))),128))]),T[10]||(T[10]=t.createTextVNode()),t.createVNode(Qk,{offset:t.unref(a).data.scrollTop,"window-size":t.unref(a).data.bodyHeight,"data-size":t.unref(a).data.dataHeight,"onChange:offset":t.unref(a).updateScrollTop},null,8,["offset","window-size","data-size","onChange:offset"])],544))}}),pm=new WeakMap;class lx{constructor(e,r,o){Gw(this,"dataHeight"),this.datum=e,this.resolveHeight=r,this.resolvePrimaryKey=o;const a=e.reduce((c,d,u)=>(c.indices.set(u,c.total),c.total+=this.resolveHeight(d,u)+Xo,c),{total:0,indices:new Map});this.dataHeight=a.total;const l=e.map((c,d)=>({dataRow:c,index:d,primaryKey:this.resolvePrimaryKey(c,d),offset:Uo(a.indices.get(d)),height:this.resolveHeight(c,d)}));pm.set(this,l)}get rows(){return pm.get(this)}async getHeight(){return this.dataHeight}async getRows(e,r){return Ak(this.rows,o=>{const a=o.offset;return e<a+o.height&&a<r+e})}}class sx{constructor(e,r,o){this.api=e,this.rowHeight=r,this.resolvePrimaryKey=o}get height(){return this.rowHeight+Xo}async getHeight(){return await this.api.count()*this.height}async getRows(e,r){const o=Cl(Math.floor(e/this.height),0,Number.POSITIVE_INFINITY),a=Math.ceil(r+40/this.height);return(await this.api.query({offset:o,limit:a})).map((l,c)=>({dataRow:l,index:o+c,primaryKey:this.resolvePrimaryKey(l,o+c),offset:(o+c)*(this.rowHeight+Xo),height:this.rowHeight}))}}function cx(n){return Object.freeze(n)}function dx(n){return t.h(fd,{settings:Object.freeze(n)})}function md(n,e){const r=new lx(n,e.resolveRowHeight,e.resolvePrimaryKey);return{...e,dataSource:r}}function ux(n,e){return t.computed(()=>{const r=t.unref(n);return md(r,t.unref(e))})}function px(n,e){const r=t.computed(()=>{const a=t.unref(n);return md(a,t.unref(e))}),o=t.reactive({settings:r});return t.computed(()=>t.h(fd,o))}const fx=Object.freeze(Object.defineProperty({__proto__:null,AsyncData:sx,Component:fd,factory:dx,rawDataSettings:md,settings:cx,useRawData:ux,useRawDataComponent:px},Symbol.toStringTag,{value:"Module"}));function*mx(n,e){for(const r of n)yield e(r)}function hx(n){const e=[];for(const r of n)e.push(r);return e}const hd=new Map;function gx(n){return hd.has(n)||hd.set(n,t.ref(localStorage.getItem(n))),Uo(hd.get(n),"...")}function yx(n,e){e==null?localStorage.removeItem(n):localStorage.setItem(n,e)}function fm(n){const e=gx(n);return t.watch(e,r=>yx(n,r)),e}const gd=new Set;window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",n=>{hx(mx(gd.values(),e=>e(n.matches?"dark":"light")))});const bx=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",mm=t.ref(bx),yd=fm("theme");function hm(n){const e=t.computed(()=>yd.value?yd.value:mm.value),r=a=>{mm.value=a,n==null||n(a)};function o(){yd.value=e.value==="light"?"dark":(e.value,"light")}return t.watch(e,a=>{n==null||n(t.unref(a))}),t.onMounted(()=>{gd.add(r)}),t.onUnmounted(()=>{gd.delete(r)}),[e,o]}const _x=t.defineComponent({__name:"ThemeSwitcher",setup(n){const[e,r]=hm();return(o,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ui-theme-switcher",t.unref(e)]),onClick:a[0]||(a[0]=(...l)=>t.unref(r)&&t.unref(r)(...l))},a[1]||(a[1]=[t.createElementVNode("div",null,null,-1)]),2))}}),wx="_splash_itlwi_1",kx="_table_itlwi_5",xx="_transparent_itlwi_8",vx="_overlay_itlwi_11",Cx="_text_itlwi_29",ri={splash:wx,table:kx,transparent:xx,overlay:vx,text:Cx},Sx={class:"pl-loader-circular"},Ex={class:"pl-loader-circular__svg",viewBox:"25 25 50 50"},Nx=["stroke"],gm=t.defineComponent({__name:"PlLoaderCircular",props:{size:{default:"16"}},setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",Sx,[t.createElementVNode("div",{style:t.normalizeStyle({height:`${e.size}px`,width:`${e.size}px`,"--main-color":`${+e.size<48?"var(--ic-01)":"var(--ic-02)"}`}),class:"pl-circle-loader__wrapper"},[(t.openBlock(),t.createElementBlock("svg",Ex,[t.createElementVNode("circle",{class:"pl-loader-circular__svg-circle",cx:"50",cy:"50",r:"20",fill:"none",stroke:`${+e.size<48?"var(--ic-01)":"var(--ic-02)"}`,"stroke-width":"2"},null,8,Nx)]))],4)]))}}),Bl=t.defineComponent({__name:"PlSplash",props:{loadingText:{default:void 0},loading:{type:Boolean,default:!1},type:{default:void 0}},setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([t.unref(ri).splash,{[t.unref(ri).table]:e.type==="table",[t.unref(ri).transparent]:e.type==="transparent"}])},[e.loading?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass([t.unref(ri).overlay])},[t.createElementVNode("div",null,[t.createVNode(t.unref(gm),{size:"48"}),r[0]||(r[0]=t.createTextVNode()),e.loadingText?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(ri).text)},t.toDisplayString(e.loadingText),3)):t.createCommentVNode("",!0)])],2)):t.createCommentVNode("",!0),r[1]||(r[1]=t.createTextVNode()),t.renderSlot(e.$slots,"default")],2))}}),Vx={key:0,class:"pl-block-page__title"},Bx={class:"pl-block-page__title__default"},Tx={class:"pl-block-page__title__append"},Rx={key:1},Ix={name:"PlBlockPage"},Ax=t.defineComponent({...Ix,props:{noBodyGutters:{type:Boolean},bodyLoading:{type:Boolean},bodyLoadingText:{}},setup(n){const e=t.useSlots(),r=a=>{a.removeAttribute("title"),a.clientWidth<a.scrollWidth&&a.setAttribute("title",a.innerText)},o={mounted:r,updated:r};return(a,l)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["pl-layout-component pl-block-page",{noBodyGutters:a.noBodyGutters}])},[t.unref(e).title?(t.openBlock(),t.createElementBlock("div",Vx,[t.createElementVNode("div",Bx,[t.withDirectives((t.openBlock(),t.createElementBlock("span",null,[t.renderSlot(a.$slots,"title")])),[[o]]),l[0]||(l[0]=t.createTextVNode()),t.renderSlot(a.$slots,"after-title")]),l[1]||(l[1]=t.createTextVNode()),t.createElementVNode("div",Tx,[t.renderSlot(a.$slots,"append")])])):(t.openBlock(),t.createElementBlock("div",Rx)),l[2]||(l[2]=t.createTextVNode()),t.createVNode(Bl,{loading:a.bodyLoading,"loading-text":a.bodyLoadingText,class:"pl-block-page__body"},{default:t.withCtx(()=>[t.renderSlot(a.$slots,"default")]),_:3},8,["loading","loading-text"])],2))}}),Lx={name:"PlContainer"},Ox=t.defineComponent({...Lx,props:{width:{},loading:{type:Boolean},loadingText:{}},setup(n){const e=n,r=t.computed(()=>({width:e.width}));return(o,a)=>(t.openBlock(),t.createBlock(Bl,{loading:o.loading,"loading-text":o.loadingText,class:"pl-container pl-layout-component",style:t.normalizeStyle(r.value)},{default:t.withCtx(()=>[t.renderSlot(o.$slots,"default")]),_:3},8,["loading","loading-text","style"]))}}),$x={name:"PlRow"},Zx=t.defineComponent({...$x,props:{wrap:{type:Boolean},alignCenter:{type:Boolean},noGap:{type:Boolean}},setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["pl-layout-component pl-row",{wrap:e.wrap,"align-center":e.alignCenter}])},[t.renderSlot(e.$slots,"default")],2))}}),Mx={class:"pl-layout-component",style:{"flex-grow":"1"}},Fx={name:"PlSpacer"},ym=t.defineComponent({...Fx,setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",Mx))}}),Px={name:"PlGrid"},zx=t.defineComponent({...Px,props:{columns:{}},setup(n){const e=n,r=t.computed(()=>({gridTemplateColumns:`repeat(${e.columns}, minmax(0, 1fr))`}));return(o,a)=>(t.openBlock(),t.createElementBlock("div",{class:"pl-layout-component pl-grid",style:t.normalizeStyle(r.value)},[t.renderSlot(o.$slots,"default")],4))}}),Dx={key:0,class:"pl-alert__icon"},Wx={class:"pl-alert__main"},Gx={key:0},Ux={class:"pl-alert__main__text"},Hx={name:"PlAlert"},bd=t.defineComponent({...Hx,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(n){const e={success:"success",warn:"warning",info:"edit",error:"error"};return(r,o)=>r.modelValue?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["pl-alert",[{monospace:r.monospace,whiteSpacePre:r.whiteSpacePre},r.type?`pl-alert__${r.type}`:""]]),style:t.normalizeStyle({maxHeight:r.maxHeight})},[r.icon&&r.type?(t.openBlock(),t.createElementBlock("div",Dx,[t.createElementVNode("div",{class:t.normalizeClass(`icon-24 icon-${e[r.type]}`)},null,2)])):t.createCommentVNode("",!0),o[2]||(o[2]=t.createTextVNode()),t.createElementVNode("div",Wx,[r.label?(t.openBlock(),t.createElementBlock("label",Gx,t.toDisplayString(r.label),1)):t.createCommentVNode("",!0),o[1]||(o[1]=t.createTextVNode()),t.createElementVNode("div",Ux,[t.renderSlot(r.$slots,"default")])]),o[3]||(o[3]=t.createTextVNode()),r.closeable?(t.openBlock(),t.createElementBlock("div",{key:1,class:"pl-alert__close-btn","aria-label":"Close alert",role:"button",onClick:o[0]||(o[0]=a=>r.$emit("update:modelValue",!1))})):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0)}}),Xx=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
30
30
|
<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"/>
|
|
31
31
|
</svg>
|
|
32
|
-
`,
|
|
32
|
+
`,jx=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
33
33
|
<rect x="3" y="3" width="18" height="18" rx="2" fill="#110529"/>
|
|
34
34
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.5431 8.51739L10.3333 16.0877L6.45691 12.0174L7.54312 10.9829L10.3333 13.9127L16.4569 7.48291L17.5431 8.51739Z" fill="white"/>
|
|
35
35
|
</svg>
|
|
36
|
-
`,ax=["innerHTML"],ix={class:"dropdown-list-item__title-container"},sx={class:"dropdown-list-item__title text-s"},lx={key:0,class:"dropdown-list-item__description text-description"},cx={key:1,class:"dropdown-list-item__icon flex-self-start"},so=t.defineComponent({__name:"DropdownListItem",props:{option:{},isSelected:{type:Boolean,default:!1},size:{default:"small"},isHovered:{type:Boolean,default:!1},useCheckbox:{type:Boolean,default:!1}},setup(n){const e=n,r=t.computed(()=>{const s=[];return e.size==="small"&&s.push("dropdown-list-item__small"),e.isSelected&&s.push("dropdown-list-item__selected"),e.isHovered&&s.push("hovered-item"),s.join(" ")}),o=t.computed(()=>{const s=["dropdown-list-item__checkbox","flex-self-start"];return e.isSelected&&s.push("checked"),s.join(" ")}),a=t.computed(()=>e.isSelected?ox:rx);return(s,c)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([r.value,"dropdown-list-item"])},[e.useCheckbox?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(o.value),innerHTML:a.value},null,10,ax)):t.createCommentVNode("",!0),c[1]||(c[1]=t.createTextVNode()),t.createElementVNode("div",ix,[t.createElementVNode("div",sx,t.toDisplayString(s.option.label),1),c[0]||(c[0]=t.createTextVNode()),s.option.description?(t.openBlock(),t.createElementBlock("div",lx,t.toDisplayString(s.option.description),1)):t.createCommentVNode("",!0)]),c[2]||(c[2]=t.createTextVNode()),!e.useCheckbox&&e.isSelected?(t.openBlock(),t.createElementBlock("div",cx)):t.createCommentVNode("",!0)],2))}});function Gp(n){return n()}function rd(n){let e=!1;return function(...r){e||(requestAnimationFrame(()=>{n(...r),e=!1}),e=!0)}}function Kp(n){return new Promise(e=>setTimeout(e,n))}function Xp(n,e){const r=setTimeout(n,e);return()=>{clearTimeout(r)}}function Yp(n,e){return n=Math.ceil(n),e=Math.floor(e),Math.floor(Math.random()*(e-n))+n}function dx(n){let e="";for(let r=0;r<n;r++)e+=String.fromCharCode(Yp(65,91));return e}function Jp(n){return function(e){return 1-n(1-e)}}function ux(n){return function(e){return e<.5?n(2*e)/2:(2-n(2*(1-e)))/2}}function Qp(n){const{duration:e,draw:r,timing:o}=n,a=performance.now();let s=!1;return requestAnimationFrame(function c(d){let u=(d-a)/e;(u>1||s)&&(u=1);const p=o(u);r(p),u<1&&requestAnimationFrame(c)}),function(){s=!0}}function fx(n){const{getFraction:e,draw:r,timing:o}=n,a=performance.now();let s=!1;return requestAnimationFrame(function c(d){let u=e(d-a);if(s)return;u>1&&(u=1);const p=o(u);r(p),u<1&&requestAnimationFrame(c)}),function(){s=!0}}function eh(n,e,r=!0){let o=0,a;return function(...s){a=()=>{n.apply(this,s),o=new Date().getTime()+e,a=null,r&&setTimeout(()=>{a==null||a()},e)},new Date().getTime()>o&&a()}}function px(n){return n.map(e=>({text:String(e),value:e}))}function sr(n){if(!Array.isArray(n))throw Error("Invalid component options: "+String(n));return n.map(e=>({label:"label"in e?e.label:e.text,value:e.value,description:e.description}))}function Ya(n,e){const r=rd(()=>{if(n.value){const{scrollTop:o,scrollLeft:a,scrollHeight:s,scrollWidth:c,clientHeight:d,clientWidth:u}=document.documentElement,p=n.value.getBoundingClientRect();e({scrollTop:o,scrollLeft:a,scrollHeight:s,scrollWidth:c,clientHeight:d,clientWidth:u,offsetY:o+p.y,offsetX:a+p.x,top:p.top,right:p.right,bottom:p.bottom,left:p.left,width:p.width,height:p.height,x:p.x,y:p.y})}});t.onMounted(r),ot(window,"scroll",r,{capture:!0,passive:!0}),ot(window,"resize",r,{passive:!0}),ot(window,"adjust",r,!0)}const hx=t.defineComponent({__name:"PlMaskIcon16",props:{name:{},size:{}},setup(n){const e=n,r=t.computed(()=>e.size==="large"?"--mask-size: 24px":""),o=t.computed(()=>`mask-16 mask-${e.name}`);return(a,s)=>(t.openBlock(),t.createElementBlock("i",{style:t.normalizeStyle(r.value),class:t.normalizeClass([o.value,a.$style.icon])},null,6))}}),mx="_icon_1ugxm_2",gx={icon:mx},yx={$style:gx},Yt=lt(hx,[["__cssModules",yx]]),_x=["onKeyup"],wx=t.defineComponent({__name:"PlBtnSplit",props:t.mergeModels({options:{},disabled:{type:Boolean},loading:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:t.mergeModels(["click"],["update:modelValue"]),setup(n,{expose:e,emit:r}){const o=n,a=r,s=t.useModel(n,"modelValue"),c=t.ref(),d=t.ref(),u=t.ref(),p=t.ref(),h=t.reactive({open:!1,optionsHeight:0,activeIndex:-1});e({data:h});const g=t.reactive({top:"0px",left:"0px",width:"0px"});t.watch(d,R=>{if(R){const B=R.getBoundingClientRect();h.optionsHeight=B.height,window.dispatchEvent(new CustomEvent("adjust"))}},{immediate:!0});const y=t.computed(()=>h.open?"mask-24 mask-chevron-up":"mask-24 mask-chevron-down"),w=t.computed(()=>(o.options??[]).findIndex(R=>vs(R.value,s.value))),E=t.computed(()=>sr(o.options??[]).map((R,B)=>({...R,index:B,isSelected:B===w.value,isActive:B===h.activeIndex}))),N=t.computed(()=>o.loading||o.options===void 0),V=t.computed(()=>{var R;return((R=E.value.find(B=>vs(B.value,s.value)))==null?void 0:R.label)??(o.options===void 0?"...":"")});Ya(c,R=>{const B=R.top+R.height+3;B+h.optionsHeight>R.clientHeight?g.top=R.top-h.optionsHeight-3+"px":g.top=B+"px",g.left=R.left+"px",g.width=R.width+"px"});const D=R=>{var B;s.value=R,h.open=!1,(B=c==null?void 0:c.value)==null||B.focus()};function F(){a("click")}const $=R=>{var B,z;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(R.code))R.preventDefault();else return;if(R.target===p.value&&R.code==="Enter"){F();return}const{open:q,activeIndex:C}=h;if(!q&&R.target===u.value){R.code==="Enter"&&(h.open=!0);return}R.code==="Escape"&&(h.open=!1,(B=c.value)==null||B.focus());const A=t.unref(E),{length:v}=A;if(!v)return;R.code==="Enter"&&D((z=A.find(M=>M.index===C))==null?void 0:z.value);const O=A.findIndex(M=>M.index===C)??-1,S=R.code==="ArrowDown"?1:R.code==="ArrowUp"?-1:0,k=Math.abs(O+S+v)%v;h.activeIndex=E.value[k].index??-1},W=R=>{var B,z;const q=R.relatedTarget;!((B=c.value)!=null&&B.contains(q))&&!((z=d.value)!=null&&z.contains(q))&&(h.open=!1)};return(R,B)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"root",ref:c,class:t.normalizeClass([{disabled:R.disabled||N.value,loading:N.value},"pl-btn-split d-flex"]),onFocusout:W,onKeydown:$},[t.createElementVNode("div",{ref_key:"buttonAction",ref:p,class:"pl-btn-split__title flex-grow-1 d-flex align-center text-s-btn",tabindex:"0",onClick:F,onKeyup:t.withKeys(t.withModifiers(F,["stop"]),["enter"])},t.toDisplayString(V.value),41,_x),B[1]||(B[1]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"menuActivator",ref:u,class:"pl-btn-split__icon-container d-flex align-center justify-center",tabindex:"0",onClick:B[0]||(B[0]=z=>h.open=!h.open)},[N.value?(t.openBlock(),t.createBlock(Yt,{key:0,name:"loading"})):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass([y.value,"pl-btn-split__icon"])},null,2))],512),B[2]||(B[2]=t.createTextVNode()),h.open?(t.openBlock(),t.createBlock(t.Teleport,{key:0,to:"body"},[t.createElementVNode("div",{ref_key:"list",ref:d,class:"pl-dropdown__options",style:t.normalizeStyle(g),tabindex:"-1"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(E.value,(z,q)=>(t.openBlock(),t.createBlock(so,{key:q,option:z,"is-selected":z.isSelected,"is-hovered":z.isActive,size:"medium",onClick:t.withModifiers(C=>D(z.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128))],4)])):t.createCommentVNode("",!0)],34))}});function th(n){function e(r){const o=r.currentTarget,a=document.createElement("span"),s=Math.max(o.clientWidth,o.clientHeight),c=s/2;a.style.width=a.style.height=`${s}px`,a.style.left=`${r.clientX-o.offsetLeft-c}px`,a.style.top=`${r.clientY-o.offsetTop-c}px`,a.classList.add("ripple");const d=o.getElementsByClassName("ripple")[0];d&&d.remove(),o.appendChild(a)}t.onMounted(()=>{var r;(r=n.value)==null||r.addEventListener("click",e)})}const bx={key:0},kx={inheritAttrs:!1},Ss=t.defineComponent({...kx,__name:"BtnBase",props:{loading:{type:Boolean},small:{type:Boolean},large:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(n){const e=n,r=t.ref(),o=t.computed(()=>e.small||e.size==="small"),a=t.computed(()=>e.large||e.size==="large");return th(r),(s,c)=>(t.openBlock(),t.createElementBlock("button",t.mergeProps({ref_key:"btn",ref:r,tabindex:"0",class:{loading:s.loading,small:o.value,large:a.value,round:s.round,reverse:s.reverse,justifyCenter:s.justifyCenter,[s.$attrs.class+""]:!0}},{...s.$attrs,disabled:!!s.$attrs.disabled||s.loading}),[s.round?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",bx,[t.renderSlot(s.$slots,"default")])),c[0]||(c[0]=t.createTextVNode()),s.loading?(t.openBlock(),t.createBlock(t.unref(Yt),{key:1,name:"loading",size:s.size},null,8,["size"])):s.icon?(t.openBlock(),t.createBlock(t.unref(Yt),{key:2,name:s.icon,size:s.size},null,8,["name","size"])):t.createCommentVNode("",!0)],16))}}),xx={name:"PlBtnPrimary"},Ns=t.defineComponent({...xx,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(n){const e=n;return(r,o)=>(t.openBlock(),t.createBlock(Ss,t.mergeProps({class:"pl-btn-primary"},e),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:3},16))}}),vx={name:"PlBtnAccent"},Cx=t.defineComponent({...vx,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(n){const e=n;return(r,o)=>(t.openBlock(),t.createBlock(Ss,t.mergeProps({class:"pl-btn-accent"},e),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:3},16))}}),Ex={name:"PlBtnDanger"},Sx=t.defineComponent({...Ex,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(n){const e=n;return(r,o)=>(t.openBlock(),t.createBlock(Ss,t.mergeProps({class:"pl-btn-danger"},e),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:3},16))}}),Nx={name:"PlBtnSecondary"},Bs=t.defineComponent({...Nx,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(n){const e=n;return(r,o)=>(t.openBlock(),t.createBlock(Ss,t.mergeProps(e,{class:"pl-btn-secondary"}),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:3},16))}}),Bx=t.defineComponent({__name:"PlMaskIcon24",props:{name:{},size:{}},setup(n){const e=n,r=t.computed(()=>`mask-24 mask-${e.name}`);return(o,a)=>(t.openBlock(),t.createElementBlock("i",{class:t.normalizeClass([r.value,o.$style.icon])},null,2))}}),Vx="_icon_1ugxm_2",Tx={icon:Vx},Ax={$style:Tx},at=lt(Bx,[["__cssModules",Ax]]),$x={key:0},Rx={name:"PlBtnGhost"},Ar=t.defineComponent({...Rx,props:{loading:{type:Boolean},size:{default:void 0},round:{type:Boolean},icon:{default:void 0},reverse:{type:Boolean},justifyCenter:{type:Boolean,default:!1}},setup(n){const e=n,r=t.computed(()=>e.size==="small"),o=t.computed(()=>e.size==="large"),a=t.ref(),s=t.useSlots();return th(a),(c,d)=>(t.openBlock(),t.createElementBlock("button",t.mergeProps({ref_key:"btnRef",ref:a,tabindex:"0",class:["pl-btn-ghost",{loading:c.loading,small:r.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}),[t.unref(s).default&&!c.round?(t.openBlock(),t.createElementBlock("span",$x,[t.renderSlot(c.$slots,"default")])):t.createCommentVNode("",!0),d[0]||(d[0]=t.createTextVNode()),c.loading?(t.openBlock(),t.createBlock(t.unref(at),{key:1,name:"loading",size:c.size},null,8,["size"])):c.icon?(t.openBlock(),t.createBlock(t.unref(at),{key:2,name:c.icon,size:c.size},null,8,["name","size"])):t.createCommentVNode("",!0),d[1]||(d[1]=t.createTextVNode()),t.renderSlot(c.$slots,"append")],16))}}),Ox=t.defineComponent({__name:"PlBtnLink",props:{loading:{type:Boolean},size:{},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean},disabled:{type:Boolean}},setup(n){const e=n,r=t.ref(!1);return(o,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ui-btn-link",{disabled:o.disabled,loading:o.loading,hover:r.value}]),onMouseover:a[0]||(a[0]=s=>r.value=!0),onMouseleave:a[1]||(a[1]=s=>r.value=!1)},[t.createVNode(Bs,t.mergeProps({round:"",hover:r.value},e),null,16,["hover"]),a[2]||(a[2]=t.createTextVNode()),t.renderSlot(o.$slots,"default")],34))}});function Ix(n,e){const r=t.ref();return Ya(n,o=>{r.value=o}),t.computed(()=>{const o=t.unref(r),a=t.unref(e),s=a.position??"top",c=a.gap??8;if(!o)return"";const d=o.offsetY+Math.floor(o.height/2),u=o.offsetX+Math.floor(o.width/2);return s==="top-left"?`left: ${o.offsetX}px; top: ${o.offsetY-c}px;`:s==="top"?`left: ${u}px; top: ${o.offsetY-c}px;`:s==="right"?`left: ${o.offsetX+o.width+c}px; top: ${d}px;`:s==="left"?`right: ${o.scrollWidth-o.x+c}px; top: ${d}px;`:s==="southwest"?`left: ${o.offsetX+o.width}px; top: ${o.offsetY+o.height+c}px;`:""})}function Zo(n,e){return e(n)}function vt(n,e){if(n!=null)return e(n)}function Dx(n){return Array.isArray(n)?n:[n]}function Mx(n,e,...r){r.forEach(o=>{n[o]=e[o]})}function Vs(n,e){ot(document,"click",r=>{document.contains(r.target)&&(Dx(n).map(o=>o.value).filter(o=>!!o).some(o=>o==null?void 0:o.contains(r.target))||e())})}const Px={},Lx={class:"beak",width:"5",height:"9",viewBox:"0 0 3 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Fx(n,e){return t.openBlock(),t.createElementBlock("svg",Lx,e[0]||(e[0]=[t.createElementVNode("path",{d:"M4.00222 8.00933L0 4.00711L4.00222 0.00488281L4.00222 8.00933Z",fill:"#24223D"},null,-1)]))}const zx=lt(Px,[["render",Fx]]),od=new Map,Ux={name:"PlTooltip"},dt=t.defineComponent({...Ux,props:{openDelay:{default:100},closeDelay:{default:1e3},position:{default:"top"},hide:{type:Boolean},gap:{default:8},element:{default:"div"},maxWidth:{default:"300px"}},emits:["tooltip:close"],setup(n,{emit:e}){const r=e,o=Symbol(),a=n,s=t.reactive({open:!1,over:!1,tooltipOpen:!1,key:Symbol()});od.set(o,()=>p()),t.watch(()=>s.open,V=>{requestAnimationFrame(()=>{s.tooltipOpen=V})});let c=()=>{};const d=eh(()=>window.dispatchEvent(new CustomEvent("adjust")),1e3),u=()=>{s.open=!0;for(const[V,D]of od.entries())V!==o&&D()},p=()=>{s.open=!1,r("tooltip:close")},h=async()=>{a.hide||(d(),s.over=!0,c(),await Kp(100),s.over&&u())},g=()=>{s.over=!1,c=Xp(()=>{s.over||p()},a.closeDelay)};t.watch(()=>a.hide,V=>{V&&p()});const y=t.ref(),w=t.ref(),E=Ix(y,t.toRef(a));Vs([y,w],()=>p());const N=t.computed(()=>({"--pl-tooltip-max-width":a.maxWidth}));return t.onUnmounted(()=>{od.delete(o)}),(V,D)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(V.element),t.mergeProps(V.$attrs,{ref_key:"rootRef",ref:y,onClick:h,onMouseover:h,onMouseleave:g}),{default:t.withCtx(()=>[t.renderSlot(V.$slots,"default"),D[1]||(D[1]=t.createTextVNode()),V.$slots.tooltip&&s.open?(t.openBlock(),t.createBlock(t.Teleport,{key:0,to:"body"},[t.createVNode(t.Transition,{name:"tooltip-transition"},{default:t.withCtx(()=>[s.tooltipOpen?(t.openBlock(),t.createElementBlock("div",{key:0,class:"pl-tooltip__container",style:t.normalizeStyle(t.unref(E))},[t.createElementVNode("div",{ref_key:"tooltip",ref:w,class:t.normalizeClass(["pl-tooltip",V.position]),style:t.normalizeStyle(N.value),onMouseover:h,onMouseleave:g},[t.createElementVNode("div",null,[t.renderSlot(V.$slots,"tooltip")]),D[0]||(D[0]=t.createTextVNode()),t.createVNode(zx)],38)],4)):t.createCommentVNode("",!0)]),_:3})])):t.createCommentVNode("",!0)]),_:3},16))}}),jx={},Zx={class:"inner-border"};function Wx(n,e,r,o,a,s){return t.openBlock(),t.createElementBlock("div",Zx,[t.renderSlot(n.$slots,"default")])}const Hx=lt(jx,[["render",Wx]]),qx={key:0},Gx=["tabindex","onKeydown","onClick"],Kx={key:1,class:"pl-btn-group__helper"},Xx={key:2,class:"pl-btn-group__error"},Yx={name:"PlBtnGroup"},nh=t.defineComponent({...Yx,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean},compact:{type:Boolean},helper:{},error:{}},emits:["update:modelValue"],setup(n,{emit:e}){const r=t.useSlots(),o=e,a=d=>o("update:modelValue",d),s=n,c=t.computed(()=>s.options.map(d=>({label:"label"in d?d.label:d.text,value:d.value})));return(d,u)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["pl-btn-group",{disabled:d.disabled,compact:d.compact}])},[d.label?(t.openBlock(),t.createElementBlock("label",qx,[t.createElementVNode("span",null,t.toDisplayString(d.label),1),u[0]||(u[0]=t.createTextVNode()),t.unref(r).tooltip?(t.openBlock(),t.createBlock(t.unref(dt),{key:0,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(d.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),u[1]||(u[1]=t.createTextVNode()),t.createVNode(Hx,{class:"pl-btn-group__container"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(p,h)=>(t.openBlock(),t.createElementBlock("div",{key:h,class:t.normalizeClass(["pl-btn-group__option text-s",{active:d.modelValue===p.value}]),tabindex:d.modelValue===p.value||d.disabled?void 0:0,onKeydown:t.withKeys(g=>a(p.value),["enter"]),onClick:g=>a(p.value)},t.toDisplayString(p.label),43,Gx))),128))]),_:1}),u[2]||(u[2]=t.createTextVNode()),d.helper?(t.openBlock(),t.createElementBlock("div",Kx,t.toDisplayString(d.helper),1)):d.error?(t.openBlock(),t.createElementBlock("div",Xx,t.toDisplayString(d.error),1)):t.createCommentVNode("",!0)],2))}});function Jx(n,e){const r=t.ref(),o=t.ref(),{parse:a,update:s}=e,c=()=>{r.value=void 0,o.value=void 0},d=t.computed({get(){return r.value!==void 0?r.value:n.value},set(u){c();try{const p=a?a(u):u;!s||s(p)?n.value=p:r.value=p}catch(p){r.value=u,o.value=p instanceof Error?p.message:String(p)}}});return t.reactive({value:d,error:o,reset:c})}const Qx="_component_1prpy_1",ev="_container_1prpy_15",tv="_error_1prpy_69",ad={component:Qx,container:ev,error:tv},nv={key:0},rv=["placeholder"],ov=t.defineComponent({__name:"PlEditableTitle",props:t.mergeModels({placeholder:{default:"Title"},maxWidth:{default:"80%"},prefix:{default:void 0},maxLength:{default:1e3},minLength:{default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=t.useModel(n,"modelValue"),r=n,o=Jx(e,{update(){return!1},parse:d=>{if(typeof d!="string")throw Error("value should be a string");if(r.maxLength&&d.length>r.maxLength)throw Error(`Max title length is ${r.maxLength} characters`);if(r.minLength&&d.length<r.minLength)throw Error(`Min title length is ${r.minLength} characters`);return d.trim()}}),a=t.computed(()=>({maxWidth:r.maxWidth??"80%"})),s=()=>{e.value=o.value&&!o.error?o.value:e.value,o.reset()},c=t.ref();return(d,u)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["pl-editable-title",t.unref(ad).component]),style:t.normalizeStyle(a.value)},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(ad).container),onClick:u[3]||(u[3]=()=>{var p;return(p=c.value)==null?void 0:p.focus()})},[d.prefix?(t.openBlock(),t.createElementBlock("span",nv,t.toDisplayString(d.prefix.trim())+" ",1)):t.createCommentVNode("",!0),u[4]||(u[4]=t.createTextVNode()),t.withDirectives(t.createElementVNode("input",{ref_key:"inputRef",ref:c,"onUpdate:modelValue":u[0]||(u[0]=p=>t.unref(o).value=p),placeholder:d.placeholder,onFocusout:s,onKeydown:[u[1]||(u[1]=t.withKeys((...p)=>t.unref(o).reset&&t.unref(o).reset(...p),["escape"])),u[2]||(u[2]=t.withKeys(p=>{var h;return(h=p.target)==null?void 0:h.blur()},["enter"]))]},null,40,rv),[[t.vModelText,t.unref(o).value]])],2),u[5]||(u[5]=t.createTextVNode()),t.unref(o).error?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(ad).error)},t.toDisplayString(t.unref(o).error),3)):t.createCommentVNode("",!0)],6))}}),av={inheritAttrs:!1},iv={class:"double-contour"};function sv(n,e,r,o,a,s){return t.openBlock(),t.createElementBlock("div",iv,[t.createElementVNode("div",t.normalizeProps(t.guardReactiveProps(n.$attrs)),[t.renderSlot(n.$slots,"default")],16)])}const lr=lt(av,[["render",sv]]);function rh(n){t.onMounted(n),t.onUpdated(n)}const id=new WeakMap,sd=new ResizeObserver(n=>{for(const e of n)vt(id.get(e.target),r=>r(e))});function oh(n,e){id.set(n,e),sd.unobserve(n),sd.observe(n)}function ah(n){sd.unobserve(n),id.delete(n)}const lv=8,ih=4;function Kn(n,e="label"){const r=new Set;rh(()=>{vt(n==null?void 0:n.value,o=>{const a=o.querySelector(e);a&&(r.add(a),oh(a,()=>{const s=Gp(()=>a.getBoundingClientRect().width+Zo(lv,c=>Number.isNaN(c)?ih:c+ih));o.style.getPropertyValue("--label-offset-right-x")!==`${s}px`&&o.style.setProperty("--label-offset-right-x",`${s}px`)}))})}),t.onBeforeUnmount(()=>{Array.from(r.values()).map(o=>ah(o))})}function cv(n,e){const r=[];return e&&e.length>0&&e.forEach(o=>{const a=o(n);typeof a=="string"&&r.push(a)}),{isValid:r.length===0,errors:r}}function sh(n,e){return t.computed(()=>cv(n.value,e))}const dv=t.defineComponent({__name:"PlIcon16",props:{name:{},size:{}},setup(n){const e=n,r=t.computed(()=>e.size==="large"?"--icon-size: 24px":""),o=t.computed(()=>`icon-16 icon-${e.name}`);return(a,s)=>(t.openBlock(),t.createElementBlock("i",{style:t.normalizeStyle(r.value),class:t.normalizeClass([o.value,a.$style.icon])},null,6))}}),uv="_icon_1ugxm_2",fv={icon:uv},pv={$style:fv},$r=lt(dv,[["__cssModules",pv]]),hv={class:"pl-text-field__envelope"},mv={key:0,ref:"label"},gv={key:0,class:"required-icon"},yv={key:1,class:"pl-text-field__prefix"},_v=["disabled","placeholder","type"],wv={key:0,class:"pl-text-field__error"},bv={key:1,class:"pl-text-field__helper"},kv={name:"PlTextField"},lo=t.defineComponent({...kv,props:t.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(n){const e=t.useSlots(),r=t.useModel(n,"modelValue"),o=n,a=t.ref(void 0),s=t.ref(),c=t.ref(!1),d=t.reactive({cached:void 0}),u=t.computed({get(){return d.cached?d.cached.value:r.value===void 0||r.value===null?"":String(r.value)},set(R){if(d.cached=void 0,o.parse)try{r.value=o.parse(R)}catch(B){d.cached={error:B instanceof Error?B.message:String(B),value:R}}else r.value=R}}),p=t.computed(()=>o.type&&o.type==="password"?c.value?"text":o.type:"text"),h=t.computed(()=>c.value?"view-show":"view-hide"),g=()=>{o.clearable&&(d.cached=void 0,r.value=o.clearable===!0?"":o.clearable())},y=sh(u,o.rules||[]),w=t.computed(()=>o.clearable?o.clearable===!0?r.value==="":r.value===o.clearable():r.value===""),E=t.computed(()=>!w.value),N=t.computed(()=>{const R=[];return o.error&&R.push(o.error),d.cached&&R.push(d.cached.error),y.value.isValid||R.push(...y.value.errors),R}),V=t.computed(()=>N.value.length>0),D=t.computed(()=>o.clearable&&E.value&&o.type!=="password"&&!o.disabled),F=()=>c.value=!c.value,$=()=>{d.cached=void 0},W=()=>{var R;return(R=s.value)==null?void 0:R.focus()};return Kn(a),(R,B)=>(t.openBlock(),t.createElementBlock("div",hv,[t.createElementVNode("div",{ref_key:"rootRef",ref:a,class:t.normalizeClass(["pl-text-field",{error:V.value,disabled:R.disabled,dashed:R.dashed,nonEmpty:E.value}])},[R.label?(t.openBlock(),t.createElementBlock("label",mv,[R.required?(t.openBlock(),t.createElementBlock("i",gv)):t.createCommentVNode("",!0),B[1]||(B[1]=t.createTextVNode()),t.createElementVNode("span",null,t.toDisplayString(R.label),1),B[2]||(B[2]=t.createTextVNode()),t.unref(e).tooltip?(t.openBlock(),t.createBlock(t.unref(dt),{key:1,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(R.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)],512)):t.createCommentVNode("",!0),B[5]||(B[5]=t.createTextVNode()),R.prefix?(t.openBlock(),t.createElementBlock("div",yv,t.toDisplayString(R.prefix),1)):t.createCommentVNode("",!0),B[6]||(B[6]=t.createTextVNode()),t.withDirectives(t.createElementVNode("input",{ref_key:"inputRef",ref:s,"onUpdate:modelValue":B[0]||(B[0]=z=>u.value=z),disabled:R.disabled,placeholder:R.placeholder||"...",type:p.value,spellcheck:"false",onFocusout:$},null,40,_v),[[t.vModelDynamic,u.value]]),B[7]||(B[7]=t.createTextVNode()),t.createElementVNode("div",{class:"pl-text-field__append",onClick:W},[D.value?(t.openBlock(),t.createBlock(t.unref($r),{key:0,class:"pl-text-field__clearable",name:"delete-clear",onClick:t.withModifiers(g,["stop"])})):t.createCommentVNode("",!0),B[3]||(B[3]=t.createTextVNode()),R.type==="password"?(t.openBlock(),t.createBlock(t.unref(at),{key:1,name:h.value,style:{cursor:"pointer"},onClick:t.withModifiers(F,["stop"])},null,8,["name"])):t.createCommentVNode("",!0),B[4]||(B[4]=t.createTextVNode()),t.renderSlot(R.$slots,"append")]),B[8]||(B[8]=t.createTextVNode()),t.createVNode(lr,{class:"pl-text-field__contour"})],2),B[9]||(B[9]=t.createTextVNode()),V.value?(t.openBlock(),t.createElementBlock("div",wv,t.toDisplayString(N.value.join(" ")),1)):R.helper?(t.openBlock(),t.createElementBlock("div",bv,t.toDisplayString(R.helper),1)):t.createCommentVNode("",!0)]))}}),xv=t.defineComponent({__name:"PlIcon24",props:{name:{},size:{}},setup(n){const e=n,r=t.computed(()=>`icon-24 icon-${e.name}`);return(o,a)=>(t.openBlock(),t.createElementBlock("i",{class:t.normalizeClass([r.value,o.$style.icon])},null,2))}}),vv="_icon_1ugxm_2",Cv={icon:vv},Ev={$style:Cv},Ja=lt(xv,[["__cssModules",Ev]]),Sv=["disabled","placeholder"],Nv=t.defineComponent({__name:"PlSearchField",props:{modelValue:{},clearable:{type:Boolean},placeholder:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:e}){const r=e,o=n,a=t.ref(void 0),s=t.ref(),c=t.computed({get(){return o.modelValue??""},set(p){r("update:modelValue",p)}}),d=t.computed(()=>!!o.modelValue),u=()=>r("update:modelValue","");return(p,h)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"root",ref:a,class:t.normalizeClass(["pl-search-field",[p.$style.component]])},[t.createVNode(t.unref(Ja),{name:"search"}),h[1]||(h[1]=t.createTextVNode()),t.withDirectives(t.createElementVNode("input",{ref_key:"input",ref:s,"onUpdate:modelValue":h[0]||(h[0]=g=>c.value=g),disabled:p.disabled,type:"text",placeholder:p.placeholder||"Find...",spellcheck:"false"},null,8,Sv),[[t.vModelText,c.value]]),h[2]||(h[2]=t.createTextVNode()),p.clearable&&d.value?(t.openBlock(),t.createBlock(t.unref($r),{key:0,class:t.normalizeClass(p.$style.clear),name:"delete-clear",onClick:t.withModifiers(u,["stop"])},null,8,["class"])):t.createCommentVNode("",!0)],2))}}),Bv="_component_pz0lo_1",Vv="_clear_pz0lo_35",Tv={component:Bv,clear:Vv},Av={$style:Tv},lh=lt(Nv,[["__cssModules",Av]]),$v={class:"ui-text-area__envelope"},Rv={key:0,ref:"label"},Ov={key:0,class:"required-icon"},Iv=["readonly","rows","disabled","placeholder"],Dv={class:"ui-text-area__append"},Mv={key:0,class:"ui-text-area__error"},Pv={key:1,class:"ui-text-area__helper"},Lv={name:"PlTextArea"},Fv=t.defineComponent({...Lv,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(n,{emit:e}){const r=t.useSlots(),o=e,a=n,s=t.ref(),c=t.ref(),d=t.computed({get(){return a.modelValue??""},set(w){o("update:modelValue",w)}}),u=t.computed(()=>!!a.modelValue),p=sh(d,a.rules||[]);Kn(s);const h=t.computed(()=>{const w=[];return a.error&&w.push(a.error),w.push(...p.value.errors),w}),g=t.computed(()=>h.value.length>0),y=()=>{if(!a.autogrow)return;const w=c.value;w&&(w.style.height="auto",w.style.height=`${w.scrollHeight}px`)};return t.onMounted(()=>{y()}),(w,E)=>(t.openBlock(),t.createElementBlock("div",$v,[t.createElementVNode("div",{ref_key:"root",ref:s,class:t.normalizeClass(["ui-text-area",{error:g.value,disabled:w.disabled,dashed:w.dashed,nonEmpty:u.value}])},[w.label?(t.openBlock(),t.createElementBlock("label",Rv,[w.required?(t.openBlock(),t.createElementBlock("i",Ov)):t.createCommentVNode("",!0),E[1]||(E[1]=t.createTextVNode()),t.createElementVNode("span",null,t.toDisplayString(w.label),1),E[2]||(E[2]=t.createTextVNode()),t.unref(r).tooltip?(t.openBlock(),t.createBlock(t.unref(dt),{key:1,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(w.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)],512)):t.createCommentVNode("",!0),E[3]||(E[3]=t.createTextVNode()),t.withDirectives(t.createElementVNode("textarea",{ref_key:"input",ref:c,"onUpdate:modelValue":E[0]||(E[0]=N=>d.value=N),readonly:w.readonly,rows:w.rows,disabled:w.disabled,placeholder:w.placeholder??"...",spellcheck:"false",onInput:y},null,40,Iv),[[t.vModelText,d.value]]),E[4]||(E[4]=t.createTextVNode()),t.createElementVNode("div",Dv,[t.renderSlot(w.$slots,"append")]),E[5]||(E[5]=t.createTextVNode()),t.createVNode(lr,{class:"ui-text-area__contour"})],2),E[6]||(E[6]=t.createTextVNode()),g.value?(t.openBlock(),t.createElementBlock("div",Mv,t.toDisplayString(h.value.join(" ")),1)):w.helper?(t.openBlock(),t.createElementBlock("div",Pv,t.toDisplayString(w.helper),1)):t.createCommentVNode("",!0)]))}});function ch(n){return n!==null&&typeof n=="object"}function pt(n,e){return ch(n)&&ch(e)?Object.keys(n).length!==Object.keys(e).length?!1:Object.keys(n).every(r=>pt(n[r],e[r])):n===e}function dh(n,e){return n.some(r=>pt(r,e))}const Ts=t.defineComponent({__name:"LongText",setup(n){t.useCssVars(h=>({"5deba9de":c.value}));const e=t.ref(!1),r=t.ref(),o=t.ref(!1),a=t.computed(()=>o.value&&e.value?"ui-lt-animate":""),s=Ip(h=>o.value=h,500),c=t.computed(()=>{var h;return r.value?`${((h=r.value)==null?void 0:h.innerHTML.length)*.4}s`:"5s"});function d(){const h=zo(r.value,"span cannot be empty");e.value=h.clientWidth<h.scrollWidth}function u(){d(),s(!0)}function p(){s(!1)}return(h,g)=>(t.openBlock(),t.createElementBlock("div",t.mergeProps(h.$attrs,{class:"ui-lt-container"}),[t.createElementVNode("span",{onMouseover:u,onMouseleave:p},[t.createElementVNode("span",{ref_key:"span",ref:r,class:t.normalizeClass(a.value)},[t.renderSlot(h.$slots,"default")],2)],32)],16))}});function uh(n,e){const r=n.scrollTop,o=n.getBoundingClientRect().height,a=e.offsetTop,s=e.getBoundingClientRect().height;return a+s<o+r&&a>r}function fh(n,e){const r=n.scrollTop,o=n.getBoundingClientRect().height,a=e.offsetTop,s=e.getBoundingClientRect().height;return a+s<o+r?"ceil":a>r?"floor":"visible"}function As(n,e,r={}){const o=n.scrollTop,a=n.getBoundingClientRect().height,s=e.getBoundingClientRect().height,c=e.offsetTop,d=fh(n,e);if(d==="visible")return;const u=p=>{const h=d==="floor"?c-(a-s):c;n.scrollTop=o+p*(h-o)};uh(n,e)||Qp({duration:r.duration||100,timing:Jp(p=>p),draw:u})}function ld(n,e,r,o){return n.addEventListener(e,r,o),function(){n.removeEventListener(e,r)}}function zv(n,e){const r=e.getBoundingClientRect();return n.x<r.x||n.x>r.x+r.width||n.y<r.y||n.y>r.y+r.height}const $s=t.defineComponent({__name:"DropdownOverlay",props:{root:{},gap:{}},setup(n,{expose:e}){const r=n,o=t.reactive({optionsHeight:0}),a=t.reactive({top:"0px",left:"0px",width:"0px"}),s=t.toRef(r,"root"),c=t.ref();return e({scrollIntoActive:()=>{const d=c.value;d&&Vr(d.querySelector(".hovered-item"),u=>{As(d,u)})},listRef:c}),t.watch(c,d=>{d&&requestAnimationFrame(()=>{const u=d.getBoundingClientRect();o.optionsHeight=u.height,window.dispatchEvent(new CustomEvent("adjust"))})}),Ya(s,d=>{const u=document.body.getBoundingClientRect(),p=d.top-u.top,h=d.left-u.left,g=r.gap??0,y=p+d.height+g;y+o.optionsHeight>d.clientHeight?a.top=p-o.optionsHeight-g+"px":a.top=y+"px",a.left=h+"px",a.width=d.width+"px"}),(d,u)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createElementVNode("div",t.mergeProps({ref_key:"listRef",ref:c},d.$attrs,{style:a,tabindex:"-1"}),[t.renderSlot(d.$slots,"default",{ref:"list"})],16)]))}}),Uv=["tabindex"],jv={class:"pl-dropdown__container"},Zv={class:"pl-dropdown__field"},Wv=["disabled","placeholder"],Hv={key:0,class:"input-value"},qv={class:"pl-dropdown__controls"},Gv={key:2,class:"arrow-icon arrow-icon-default"},Kv={key:0},Xv={key:0,class:"required-icon"},Yv={key:0,class:"nothing-found"},Jv={key:0,class:"pl-dropdown__error"},Qv={key:1,class:"pl-dropdown__helper"},eC={key:2,class:"pl-dropdown__helper"},tC={name:"PlDropdown"},Rr=t.defineComponent({...tC,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(n,{emit:e}){const r=e,o=n,a=t.useSlots(),s=t.ref(),c=t.ref(),d=t.useTemplateRef("overlay"),u=t.reactive({search:"",activeIndex:-1,open:!1,optionsHeight:0}),p=()=>Zo($.value.findIndex(O=>pt(O.value,o.modelValue)),O=>O<0?0:O),h=()=>u.activeIndex=p(),g=t.computed(()=>o.options===void 0),y=t.computed(()=>g.value?!0:o.disabled),w=t.computed(()=>(o.options??[]).findIndex(O=>pt(O.value,o.modelValue))),E=t.computed(()=>{if(!g.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"}}),N=t.computed(()=>sr(o.options??[]).map((O,S)=>({...O,index:S,isSelected:S===w.value,isActive:S===u.activeIndex}))),V=t.computed(()=>{const O=t.unref(N).find(S=>pt(S.value,o.modelValue));return(O==null?void 0:O.label)||o.modelValue}),D=t.computed(()=>!u.open&&o.modelValue?"":o.modelValue?String(V.value):o.placeholder),F=t.computed(()=>o.modelValue!==void 0&&o.modelValue!==null),$=t.computed(()=>{const O=N.value;return u.search?O.filter(S=>{const k=u.search.toLowerCase();return S.label.toLowerCase().includes(k)||S.description&&S.description.toLowerCase().includes(k)?!0:typeof S.value=="string"?S.value.toLowerCase().includes(k):S.value===u.search}):O}),W=t.computed(()=>y.value?void 0:"0"),R=O=>{var S;r("update:modelValue",O),u.search="",u.open=!1,(S=s==null?void 0:s.value)==null||S.focus()},B=()=>r("update:modelValue",void 0),z=()=>{var O;return(O=c.value)==null?void 0:O.focus()},q=()=>{u.open=!u.open,u.open||(u.search="")},C=()=>u.open=!0,A=O=>{var S,k,M;const U=O.relatedTarget;!((S=s.value)!=null&&S.contains(U))&&!((M=(k=d.value)==null?void 0:k.listRef)!=null&&M.contains(U))&&(u.search="",u.open=!1)},v=O=>{var S,k;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(O.code))O.preventDefault();else return;const{open:M,activeIndex:U}=u;if(!M){O.code==="Enter"&&(u.open=!0);return}O.code==="Escape"&&(u.open=!1,(S=s.value)==null||S.focus());const j=t.unref($),{length:G}=j;if(!G)return;O.code==="Enter"&&R((k=j.find(Ce=>Ce.index===U))==null?void 0:k.value);const ee=j.findIndex(Ce=>Ce.index===U)??-1,ue=O.code==="ArrowDown"?1:O.code==="ArrowUp"?-1:0,ye=Math.abs(ee+ue+G)%G;u.activeIndex=$.value[ye].index??-1};return Kn(s),t.watch(()=>o.modelValue,h,{immediate:!0}),t.watch(()=>u.open,O=>{var S;return O?(S=c.value)==null?void 0:S.focus():""}),t.watchPostEffect(()=>{var O;u.search,u.activeIndex>=0&&u.open&&((O=d.value)==null||O.scrollIntoActive())}),(O,S)=>(t.openBlock(),t.createElementBlock("div",{class:"pl-dropdown__envelope",onClick:z},[t.createElementVNode("div",{ref_key:"rootRef",ref:s,tabindex:W.value,class:t.normalizeClass(["pl-dropdown",{open:u.open,error:O.error,disabled:y.value}]),onKeydown:v,onFocusout:A},[t.createElementVNode("div",jv,[t.createElementVNode("div",Zv,[t.withDirectives(t.createElementVNode("input",{ref_key:"input",ref:c,"onUpdate:modelValue":S[0]||(S[0]=k=>u.search=k),type:"text",tabindex:"-1",disabled:y.value,placeholder:D.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:C},null,40,Wv),[[t.vModelText,u.search]]),S[4]||(S[4]=t.createTextVNode()),u.open?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Hv,[t.createVNode(Ts,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(V.value),1)]),_:1})])),S[5]||(S[5]=t.createTextVNode()),t.createElementVNode("div",qv,[g.value?(t.openBlock(),t.createBlock(t.unref(at),{key:0,name:"loading"})):t.createCommentVNode("",!0),S[1]||(S[1]=t.createTextVNode()),O.clearable&&F.value?(t.openBlock(),t.createBlock(t.unref($r),{key:1,name:"delete-clear",onClick:t.withModifiers(B,["stop"])})):t.createCommentVNode("",!0),S[2]||(S[2]=t.createTextVNode()),t.renderSlot(O.$slots,"append"),S[3]||(S[3]=t.createTextVNode()),t.createElementVNode("div",{class:"pl-dropdown__arrow-wrapper",onClick:t.withModifiers(q,["stop"])},[O.arrowIconLarge?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["arrow-icon",[`icon-24 ${O.arrowIconLarge}`]])},null,2)):O.arrowIcon?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["arrow-icon",[`icon-16 ${O.arrowIcon}`]])},null,2)):(t.openBlock(),t.createElementBlock("div",Gv))])])]),S[9]||(S[9]=t.createTextVNode()),O.label?(t.openBlock(),t.createElementBlock("label",Kv,[O.required?(t.openBlock(),t.createElementBlock("i",Xv)):t.createCommentVNode("",!0),S[6]||(S[6]=t.createTextVNode()),t.createElementVNode("span",null,t.toDisplayString(O.label),1),S[7]||(S[7]=t.createTextVNode()),t.unref(a).tooltip?(t.openBlock(),t.createBlock(t.unref(dt),{key:1,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(O.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),S[10]||(S[10]=t.createTextVNode()),u.open?(t.openBlock(),t.createBlock(t.unref($s),{key:1,ref:"overlay",root:s.value,class:"pl-dropdown__options",tabindex:"-1",gap:3},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value,(k,M)=>(t.openBlock(),t.createBlock(so,{key:M,option:k,"is-selected":k.isSelected,"is-hovered":k.isActive,size:O.optionSize,onClick:t.withModifiers(U=>R(k.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),S[8]||(S[8]=t.createTextVNode()),$.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Yv,"Nothing found"))]),_:1},8,["root"])):t.createCommentVNode("",!0),S[11]||(S[11]=t.createTextVNode()),t.createVNode(lr,{class:"pl-dropdown__contour"})])],42,Uv),S[12]||(S[12]=t.createTextVNode()),E.value?(t.openBlock(),t.createElementBlock("div",Jv,t.toDisplayString(E.value),1)):g.value&&O.loadingOptionsHelper?(t.openBlock(),t.createElementBlock("div",Qv,t.toDisplayString(O.loadingOptionsHelper),1)):O.helper?(t.openBlock(),t.createElementBlock("div",eC,t.toDisplayString(O.helper),1)):t.createCommentVNode("",!0)]))}}),nC={name:"PlDropdownRef"},rC=t.defineComponent({...nC,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(n){const e=t.useSlots(),r=n,o=t.computed(()=>{var s;return(s=r.options)==null?void 0:s.map(c=>({label:c.label,value:c.ref}))}),a=t.computed(()=>r.disabled?"icon-link-disabled":"icon-link");return(s,c)=>(t.openBlock(),t.createBlock(t.unref(Rr),t.mergeProps(r,{options:o.value,"loading-options-helper":s.loadingOptionsHelper,"arrow-icon-large":a.value,"onUpdate:modelValue":c[0]||(c[0]=d=>s.$emit("update:modelValue",d))}),t.createSlots({_:2},[t.unref(e).tooltip?{name:"tooltip",fn:t.withCtx(()=>[t.renderSlot(s.$slots,"tooltip")]),key:"0"}:void 0]),1040,["options","loading-options-helper","arrow-icon-large"]))}});function oC(n,e){return t.computed(()=>{const r=sr(n.value);return e.value?r.filter(o=>o.label.toLowerCase().includes(e.value.toLowerCase())):r})}const aC={class:"resizable-input"},iC=["placeholder","value","disabled"],sC=t.defineComponent({__name:"ResizableInput",props:{modelValue:{},placeholder:{},disabled:{type:Boolean},maxWidth:{},width:{}},emits:["update:modelValue"],setup(n,{emit:e}){const r=n,o=e,a=t.computed(()=>{var d;return r.placeholder?r.placeholder:(d=r.modelValue)==null?void 0:d.replace('"',"")}),s=t.computed(()=>{const d={};return r.width&&(d.width=r.width),r.maxWidth&&(d.maxWidth=r.maxWidth),d});function c(d){o("update:modelValue",d.target.value)}return(d,u)=>(t.openBlock(),t.createElementBlock("div",aC,[t.createElementVNode("span",{style:t.normalizeStyle(s.value),class:"resizable-input__size-span"},t.toDisplayString(a.value),5),u[0]||(u[0]=t.createTextVNode()),t.createElementVNode("input",t.mergeProps(d.$attrs,{placeholder:d.placeholder,value:r.modelValue,disabled:r.disabled,style:s.value,onInput:c}),null,16,iC)]))}}),lC={class:"dropdown-tab-item__title text-caps13"},cC=t.defineComponent({__name:"TabItem",props:{option:{},isSelected:{type:Boolean,default:!1},isHovered:{type:Boolean,default:!1}},setup(n){const e=n,r=t.computed(()=>e.option.label),o=t.computed(()=>{const a=[];return e.isSelected&&a.push("dropdown-tab-item__selected"),e.isHovered&&a.push("hovered-item"),a.join(" ")});return(a,s)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([o.value,"dropdown-tab-item"])},[t.createElementVNode("div",lC,t.toDisplayString(r.value),1)],2))}}),dC={class:"pl-line-dropdown__prefix"},uC={class:"pl-line-dropdown__icon-wrapper"},fC={class:"pl-line-dropdown__icon"},pC={key:0,class:"pl-line-dropdown__no-item"},hC={key:0,class:"pl-line-dropdown__no-item"},cd=t.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(n,{emit:e}){const r=e,o=n,a=t.reactive({isOpen:!1,activeOption:-1,optionsHeight:0}),s=t.ref(),c=t.ref(),d=t.computed(()=>{const A=[];return a.isOpen&&A.push("open"),o.disabled&&A.push("disabled"),A.join(" ")}),u=t.ref(""),p=oC(t.toRef(o,"options"),u),h=t.computed(()=>!!(o.clearable&&a.isOpen&&o.modelValue&&g.value)),g=t.computed(()=>{if(o.modelValue){const A=E();if(A!==-1)return sr(o.options)[A].label}return""}),y=t.ref(g.value);t.watch(g,A=>{y.value=A});const w=t.computed(()=>a.isOpen&&u.value&&u.value.length>=g.value.length-1?u.value:g.value||"...");Vs(s,()=>{o.mode==="list"&&(a.isOpen=!1)}),t.watch(()=>y.value,A=>{g.value!==A?u.value=A:u.value=""}),t.watch(()=>a.isOpen,A=>{var v;A&&s.value&&((v=s.value.querySelector("input"))==null||v.focus(),t.nextTick(()=>z()))}),t.watch(()=>o.modelValue,()=>N(),{immediate:!0});function E(){return o.options.findIndex(A=>pt(A.value,o.modelValue))}function N(){a.activeOption=Zo(p.value.findIndex(A=>pt(A.value,o.modelValue)),A=>A<0?0:A)}function V(){u.value=""}function D(){o.disabled?a.isOpen=!1:t.nextTick(()=>{a.isOpen=!a.isOpen})}function F(){o.mode==="list"&&(a.isOpen=!1)}function $(A){A&&(r("update:modelValue",A.value),F(),V())}function W(A){return pt(A.value,o.modelValue)}const R=A=>{var v,O;const S=A.relatedTarget;!((v=s.value)!=null&&v.contains(S))&&!((O=c.value)!=null&&O.contains(S))&&(u.value="",a.isOpen=!1)};function B(A){const{activeOption:v}=a;if(!a.isOpen&&A.code==="Enter"){a.isOpen=!0;return}const{length:O}=p.value;if(!O)return;["ArrowDown","ArrowUp","Enter"].includes(A.code)&&A.preventDefault(),A.code==="Enter"&&$(p.value[v]);const S=A.code==="ArrowDown"?1:A.code==="ArrowUp"?-1:0;a.activeOption=Math.abs(v+S+O)%O,requestAnimationFrame(z)}function z(){const A=c.value;A&&vt(A.querySelector(".hovered-item"),v=>{o.mode==="list"?As(A,v):v.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}function q(){r("update:modelValue",void 0)}const C=t.reactive({top:"0px",left:"0px"});return t.watch(c,A=>{if(A){const v=A.getBoundingClientRect();a.optionsHeight=v.height,window.dispatchEvent(new CustomEvent("adjust"))}}),Ya(s,A=>{const v=A.top+A.height+2;v+a.optionsHeight>A.clientHeight?C.top=A.top-a.optionsHeight-2+"px":C.top=v+"px",C.left=A.left+"px"}),(A,v)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"container",ref:s,tabindex:"0",class:t.normalizeClass([d.value,"pl-line-dropdown uc-pointer"]),onKeydown:B,onFocusout:R,onClick:D},[t.createElementVNode("div",dC,t.toDisplayString(o==null?void 0:o.prefix),1),v[6]||(v[6]=t.createTextVNode()),t.createVNode(sC,{modelValue:y.value,"onUpdate:modelValue":v[0]||(v[0]=O=>y.value=O),placeholder:w.value,disabled:o.disabled,class:"pl-line-dropdown__input"},null,8,["modelValue","placeholder","disabled"]),v[7]||(v[7]=t.createTextVNode()),t.createElementVNode("div",uC,[t.withDirectives(t.createElementVNode("div",fC,null,512),[[t.vShow,!h.value]]),v[1]||(v[1]=t.createTextVNode()),t.withDirectives(t.createElementVNode("div",{class:"pl-line-dropdown__icon-clear",onClick:q},null,512),[[t.vShow,h.value]])]),v[8]||(v[8]=t.createTextVNode()),a.isOpen?(t.openBlock(),t.createBlock(t.Teleport,{key:0,to:"body"},[o.mode==="list"?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"list",ref:c,style:t.normalizeStyle(C),tabindex:"-1",class:"pl-line-dropdown__items",onFocusout:R},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(p),(O,S)=>t.renderSlot(A.$slots,"item",{key:S,item:O,textItem:"text",isSelected:W(O),isHovered:a.activeOption==S,onClick:t.withModifiers(k=>$(O),["stop"])},()=>[t.createVNode(so,{option:O,"text-item":"text","is-selected":W(O),"is-hovered":a.activeOption==S,size:"medium",onClick:t.withModifiers(k=>$(O),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),v[3]||(v[3]=t.createTextVNode()),t.unref(p).length===0?(t.openBlock(),t.createElementBlock("div",pC,v[2]||(v[2]=[t.createElementVNode("div",{class:"pl-line-dropdown__no-item-title text-s"},"Didn't find anything that matched",-1)]))):t.createCommentVNode("",!0)],36)):o.mode==="tabs"?(t.openBlock(),t.createElementBlock("div",{key:1,ref_key:"list",ref:c,style:t.normalizeStyle(C),tabindex:"-1",class:"pl-line-dropdown__items-tabs",onFocusout:R},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(p),(O,S)=>t.renderSlot(A.$slots,"item",{key:S,item:O,isSelected:W(O),isHovered:a.activeOption==S,onClick:t.withModifiers(k=>$(O),["stop"])},()=>[t.createVNode(cC,{option:O,"is-selected":W(O),"is-hovered":a.activeOption==S,onClick:t.withModifiers(k=>$(O),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),v[5]||(v[5]=t.createTextVNode()),t.unref(p).length===0?(t.openBlock(),t.createElementBlock("div",hC,v[4]||(v[4]=[t.createElementVNode("div",{class:"pl-line-dropdown__no-item-title text-s"},"Didn't find anything that matched",-1)]))):t.createCommentVNode("",!0)],36)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],34))}}),mC={class:"ui-dropdown__envelope"},gC=["tabindex"],yC={class:"ui-dropdown__container"},_C={class:"ui-dropdown__field"},wC=["disabled","placeholder"],bC={class:"ui-dropdown__controls"},kC={key:0},xC={key:0,class:"required-icon"},vC={key:0,class:"nothing-found"},CC={key:0,class:"ui-dropdown__error"},EC={key:1,class:"ui-dropdown__helper"},SC={key:2,class:"ui-dropdown__helper"},NC={name:"PlDropdown"},BC=t.defineComponent({...NC,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(n,{emit:e}){const r=e,o=n,a=t.useSlots(),s=t.ref(),c=t.ref(),d=t.ref(),u=t.reactive({search:"",activeIndex:-1,open:!1}),p=()=>Zo($.value.findIndex(S=>pt(S.value,o.modelValue)),S=>S<0?0:S),h=()=>u.activeIndex=p(),g=t.computed(()=>o.options===void 0),y=t.computed(()=>g.value?!0:o.disabled),w=t.computed(()=>(o.options??[]).findIndex(S=>pt(S.value,o.modelValue))),E=t.computed(()=>{if(!g.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"}}),N=t.computed(()=>sr(o.options??[]).map((S,k)=>({...S,index:k,isSelected:k===w.value,isActive:k===u.activeIndex}))),V=t.computed(()=>{const S=t.unref(N).find(k=>pt(k.value,o.modelValue));return(S==null?void 0:S.label)||o.modelValue}),D=t.computed(()=>!u.open&&o.modelValue?"":o.modelValue?String(V.value):o.placeholder),F=t.computed(()=>o.modelValue!==void 0&&o.modelValue!==null),$=t.computed(()=>{const S=N.value;return u.search?S.filter(k=>{const M=u.search.toLowerCase();return k.label.toLowerCase().includes(M)||k.description&&k.description.toLowerCase().includes(M)?!0:typeof k.value=="string"?k.value.toLowerCase().includes(M):k.value===u.search}):S}),W=t.computed(()=>y.value?void 0:"0"),R=S=>{var k;r("update:modelValue",S),u.search="",u.open=!1,(k=s==null?void 0:s.value)==null||k.focus()},B=()=>r("update:modelValue",void 0),z=()=>{var S;return(S=d.value)==null?void 0:S.focus()},q=()=>u.open=!u.open,C=()=>u.open=!0,A=S=>{var k;(k=s==null?void 0:s.value)!=null&&k.contains(S.relatedTarget)||(u.search="",u.open=!1)},v=()=>{const S=c.value;S&&vt(S.querySelector(".hovered-item"),k=>{As(S,k)})},O=S=>{var k,M;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(S.code))S.preventDefault();else return;const{open:U,activeIndex:j}=u;if(!U){S.code==="Enter"&&(u.open=!0);return}S.code==="Escape"&&(u.open=!1,(k=s.value)==null||k.focus());const G=t.unref($),{length:ee}=G;if(!ee)return;S.code==="Enter"&&R((M=G.find(He=>He.index===j))==null?void 0:M.value);const ue=G.findIndex(He=>He.index===j)??-1,ye=S.code==="ArrowDown"?1:S.code==="ArrowUp"?-1:0,Ce=Math.abs(ue+ye+ee)%ee;u.activeIndex=$.value[Ce].index??-1};return Kn(s),t.watch(()=>o.modelValue,h,{immediate:!0}),t.watch(()=>u.open,S=>{var k;return S?(k=d.value)==null?void 0:k.focus():""}),t.watchPostEffect(()=>{u.search,u.activeIndex>=0&&u.open&&v()}),(S,k)=>(t.openBlock(),t.createElementBlock("div",mC,[t.createElementVNode("div",{ref_key:"root",ref:s,tabindex:W.value,class:t.normalizeClass(["ui-dropdown",{open:u.open,error:S.error,disabled:y.value}]),onKeydown:O,onFocusout:A},[t.createElementVNode("div",yC,[t.createElementVNode("div",_C,[t.withDirectives(t.createElementVNode("input",{ref_key:"input",ref:d,"onUpdate:modelValue":k[0]||(k[0]=M=>u.search=M),type:"text",tabindex:"-1",disabled:y.value,placeholder:D.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:C},null,40,wC),[[t.vModelText,u.search]]),k[4]||(k[4]=t.createTextVNode()),u.open?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,onClick:z},[t.createVNode(Ts,{class:"input-value"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(V.value),1)]),_:1})])),k[5]||(k[5]=t.createTextVNode()),t.createElementVNode("div",bC,[g.value?(t.openBlock(),t.createBlock(t.unref(at),{key:0,name:"loading"})):t.createCommentVNode("",!0),k[1]||(k[1]=t.createTextVNode()),S.clearable&&F.value?(t.openBlock(),t.createBlock(t.unref($r),{key:1,name:"delete-clear",onClick:t.withModifiers(B,["stop"])})):t.createCommentVNode("",!0),k[2]||(k[2]=t.createTextVNode()),t.renderSlot(S.$slots,"append"),k[3]||(k[3]=t.createTextVNode()),S.arrowIconLarge?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["arrow-icon",[`icon-24 ${S.arrowIconLarge}`]]),onClick:t.withModifiers(q,["stop"])},null,2)):S.arrowIcon?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(["arrow-icon",[`icon-16 ${S.arrowIcon}`]]),onClick:t.withModifiers(q,["stop"])},null,2)):(t.openBlock(),t.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:t.withModifiers(q,["stop"])}))])]),k[9]||(k[9]=t.createTextVNode()),S.label?(t.openBlock(),t.createElementBlock("label",kC,[S.required?(t.openBlock(),t.createElementBlock("i",xC)):t.createCommentVNode("",!0),k[6]||(k[6]=t.createTextVNode()),t.createElementVNode("span",null,t.toDisplayString(S.label),1),k[7]||(k[7]=t.createTextVNode()),t.unref(a).tooltip?(t.openBlock(),t.createBlock(t.unref(dt),{key:1,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(S.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),k[10]||(k[10]=t.createTextVNode()),u.open?(t.openBlock(),t.createElementBlock("div",{key:1,ref_key:"list",ref:c,class:"ui-dropdown__options"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.value,(M,U)=>(t.openBlock(),t.createBlock(so,{key:U,option:M,"is-selected":M.isSelected,"is-hovered":M.isActive,size:S.optionSize,onClick:t.withModifiers(j=>R(M.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),k[8]||(k[8]=t.createTextVNode()),$.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",vC,"Nothing found"))],512)):t.createCommentVNode("",!0),k[11]||(k[11]=t.createTextVNode()),t.createVNode(lr,{class:"ui-dropdown__contour"})])],42,gC),k[12]||(k[12]=t.createTextVNode()),E.value?(t.openBlock(),t.createElementBlock("div",CC,t.toDisplayString(E.value),1)):g.value&&S.loadingOptionsHelper?(t.openBlock(),t.createElementBlock("div",EC,t.toDisplayString(S.loadingOptionsHelper),1)):S.helper?(t.openBlock(),t.createElementBlock("div",SC,t.toDisplayString(S.helper),1)):t.createCommentVNode("",!0)]))}}),VC={key:0,class:"ui-progress-bar"},TC={class:"ui-progress-bar__messages d-flex align-center pl-6 pr-6"},AC={class:"ui-progress-bar__message flex-grow-1"},$C={class:"ui-progress-bar__percent"},RC=t.defineComponent({__name:"PlProgressBar",props:{loading:{type:Boolean},progress:{default:0},completeMessage:{default:"Completed"}},setup(n){const e=n,r=t.computed(()=>e.progress===100?e.completeMessage:"");return(o,a)=>o.loading?(t.openBlock(),t.createElementBlock("div",VC,[t.createElementVNode("div",{class:"ui-progress-bar__indicator",style:t.normalizeStyle({width:o.progress+"%"})},null,4),a[1]||(a[1]=t.createTextVNode()),t.createElementVNode("div",TC,[t.createElementVNode("div",AC,t.toDisplayString(r.value),1),a[0]||(a[0]=t.createTextVNode()),t.createElementVNode("div",$C,t.toDisplayString(o.progress+"%"),1)])])):t.createCommentVNode("",!0)}}),OC={class:"mi-number-field__main-wrapper d-flex"},IC={key:0,class:"text-description"},DC=["disabled","placeholder"],MC={key:0,class:"mi-number-field__hint text-description"},PC=t.defineComponent({__name:"PlNumberField",props:t.mergeModels({disabled:{type:Boolean},label:{default:void 0},placeholder:{default:void 0},step:{default:1},minValue:{default:void 0},maxValue:{default:void 0},useIncrementButtons:{type:Boolean,default:!0},updateOnEnterOrClickOutside:{type:Boolean},errorMessage:{default:void 0},validate:{type:Function,default:void 0}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=n,r=t.useModel(n,"modelValue"),o=t.ref(),a=t.useSlots(),s=t.ref();Kn(o);function c(B){return B===void 0?"":String(+B)}function d(B){return B==="."||B===","||B==="-"}function u(B){if(B==="")return;if(d(B))return 0;let z=B;return z=z.replace(",","."),z=z.replace("−","-"),z=z.replace("–","-"),z=z.replace("+",""),parseFloat(z)}const p=t.ref(c(r.value)),h=t.computed(()=>u(p.value));t.watch(()=>r.value,B=>{parseFloat(p.value)!==B&&(p.value=c(B))});const g=/^[-−–+]?(\d+)?[\\.,]?(\d+)?$/,y=t.computed({get(){return p.value},set(B){const z=u(B);z===void 0||B.match(g)&&!isNaN(z)?(p.value=B,!e.updateOnEnterOrClickOutside&&!d(B)&&E()):s.value&&(s.value.value=p.value)}}),w=t.ref(!1);function E(){if(p.value===""){r.value=void 0;return}r.value=h.value}const N=t.computed(()=>{let B=[];e.errorMessage&&B.push(e.errorMessage);const z=h.value;if(z!==void 0&&isNaN(z))B.push("Value is not a number");else if(e.validate&&z!==void 0){const q=e.validate(z);q&&B.push(q)}else e.minValue!==void 0&&z!==void 0&&z<e.minValue&&B.push(`Value must be higher than ${e.minValue}`),e.maxValue!==void 0&&z!==void 0&&z>e.maxValue&&B.push(`Value must be less than ${e.maxValue}`);return B=[...B],B.join(" ")}),V=t.computed(()=>{const B=h.value;return e.maxValue!==void 0&&B!==void 0?B>=e.maxValue:!1}),D=t.computed(()=>{const B=h.value;return e.minValue!==void 0&&B!==void 0?B<=e.minValue:!1});function F(){const B=h.value;if(!V.value){let z;B===void 0?z=e.minValue?e.minValue:0:z=(B||0)+e.step,r.value=e.maxValue!==void 0?Math.min(e.maxValue,z):z}}function $(){const B=h.value;if(!D.value){let z;B===void 0?z=0:z=+(B||0)-e.step,r.value=e.minValue!==void 0?Math.max(e.minValue,z):z}}function W(B){var z,q;e.updateOnEnterOrClickOutside&&(B.code==="Escape"&&(p.value=c(r.value),(z=s.value)==null||z.blur()),B.code==="Enter"&&((q=s.value)==null||q.blur())),B.code==="Enter"&&(p.value=String(r.value)),["ArrowDown","ArrowUp"].includes(B.code)&&B.preventDefault(),e.useIncrementButtons&&B.code==="ArrowUp"&&F(),e.useIncrementButtons&&B.code==="ArrowDown"&&$()}const R=B=>{B.detail>1&&B.preventDefault()};return(B,z)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"root",ref:o,class:t.normalizeClass([{error:!!N.value.trim(),disabled:B.disabled},"mi-number-field d-flex-column"]),onKeydown:z[3]||(z[3]=q=>W(q))},[t.createElementVNode("div",OC,[t.createVNode(lr,{class:"mi-number-field__contour"}),z[8]||(z[8]=t.createTextVNode()),t.createElementVNode("div",{class:t.normalizeClass(["mi-number-field__wrapper flex-grow d-flex flex-align-center",{withoutArrows:!B.useIncrementButtons}])},[B.label?(t.openBlock(),t.createElementBlock("label",IC,[t.createTextVNode(t.toDisplayString(B.label)+" ",1),t.unref(a).tooltip?(t.openBlock(),t.createBlock(t.unref(dt),{key:0,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(B.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),z[4]||(z[4]=t.createTextVNode()),t.withDirectives(t.createElementVNode("input",{ref_key:"input",ref:s,"onUpdate:modelValue":z[0]||(z[0]=q=>y.value=q),disabled:B.disabled,placeholder:B.placeholder,class:"text-s flex-grow",onFocusin:z[1]||(z[1]=q=>w.value=!0),onFocusout:z[2]||(z[2]=q=>{w.value=!1,E()})},null,40,DC),[[t.vModelText,y.value]])],2),z[9]||(z[9]=t.createTextVNode()),B.useIncrementButtons?(t.openBlock(),t.createElementBlock("div",{key:0,class:"mi-number-field__icons d-flex-column",onMousedown:R},[t.createElementVNode("div",{class:t.normalizeClass([{disabled:V.value},"mi-number-field__icon d-flex flex-justify-center uc-pointer flex-grow flex-align-center"]),onClick:F},z[5]||(z[5]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[t.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),z[7]||(z[7]=t.createTextVNode()),t.createElementVNode("div",{class:t.normalizeClass([{disabled:D.value},"mi-number-field__icon d-flex flex-justify-center uc-pointer flex-grow flex-align-center"]),onClick:$},z[6]||(z[6]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[t.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)],32)):t.createCommentVNode("",!0)]),z[10]||(z[10]=t.createTextVNode()),N.value.trim()?(t.openBlock(),t.createElementBlock("div",MC,t.toDisplayString(N.value),1)):t.createCommentVNode("",!0)],34))}}),LC={class:"pl-chip__text"},dd=t.defineComponent({__name:"PlChip",props:{closeable:{type:Boolean},small:{type:Boolean}},emits:["close"],setup(n){const e=t.ref(),r=t.ref(!1);return t.onMounted(()=>{var o;e.value&&(r.value=((o=e.value)==null?void 0:o.clientWidth)>=256)}),(o,a)=>(t.openBlock(),t.createBlock(t.unref(dt),{position:"top",class:"pl-chip-tooltip",delay:500},t.createSlots({default:t.withCtx(()=>[a[4]||(a[4]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"chip",ref:e,class:t.normalizeClass(["pl-chip",{small:o.small}])},[t.createElementVNode("div",LC,[t.renderSlot(o.$slots,"default")]),a[3]||(a[3]=t.createTextVNode()),o.closeable?(t.openBlock(),t.createElementBlock("div",{key:0,tabindex:"0",class:"pl-chip__close",onKeydown:a[0]||(a[0]=t.withKeys(s=>o.$emit("close"),["enter"])),onClick:a[1]||(a[1]=t.withModifiers(s=>o.$emit("close"),["stop"]))},a[2]||(a[2]=[t.createElementVNode("div",{class:"pl-chip__close--icon"},null,-1)]),32)):t.createCommentVNode("",!0)],2)]),_:2},[r.value?{name:"tooltip",fn:t.withCtx(()=>[t.renderSlot(o.$slots,"default")]),key:"0"}:void 0]),1024))}}),FC=["tabindex"],zC={class:"pl-dropdown-multi__container"},UC={class:"pl-dropdown-multi__field"},jC=["disabled","placeholder"],ZC={key:0,class:"chips-container"},WC={class:"pl-dropdown-multi__controls"},HC={key:0},qC={key:0,class:"required-icon"},GC={class:"pl-dropdown-multi__open-chips-container"},KC={key:0,class:"nothing-found"},XC={key:0,class:"pl-dropdown-multi__error"},YC={key:1,class:"pl-dropdown-multi__helper"},JC={name:"PlDropdownMulti"},ph=t.defineComponent({...JC,props:{modelValue:{default:()=>[]},label:{default:void 0},options:{default:void 0},helper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:e}){const r=e,o=C=>r("update:modelValue",C),a=t.useSlots(),s=n,c=t.ref(),d=t.ref(),u=t.useTemplateRef("overlay"),p=t.reactive({search:"",activeOption:-1,open:!1,optionsHeight:0}),h=t.computed(()=>Array.isArray(s.modelValue)?s.modelValue:[]),g=t.computed(()=>p.open&&s.modelValue.length>0?s.placeholder:s.modelValue.length>0?"":s.placeholder),y=t.computed(()=>sr(s.options??[])),w=t.computed(()=>h.value.map(C=>y.value.find(A=>pt(A.value,C))).filter(C=>C!==void 0)),E=t.computed(()=>{const C=t.unref(h),A=t.unref(y);return(p.search?A.filter(v=>{const O=p.search.toLowerCase();return v.label.toLowerCase().includes(O)?!0:typeof v.value=="string"?v.value.toLowerCase().includes(O):v.value===p.search}):[...A]).map(v=>({...v,selected:dh(C,v.value)}))}),N=t.computed(()=>s.options===void 0),V=t.computed(()=>N.value?!0:s.disabled),D=t.computed(()=>V.value?void 0:"0"),F=()=>{p.activeOption=Zo(E.value.findIndex(C=>pt(C.value,s.modelValue)),C=>C<0?0:C)},$=C=>{var A;const v=t.unref(h);o(dh(v,C)?v.filter(O=>!pt(O,C)):[...v,C]),p.search="",(A=c==null?void 0:c.value)==null||A.focus()},W=C=>o(t.unref(h).filter(A=>!pt(A,C))),R=()=>{var C;return(C=d.value)==null?void 0:C.focus()},B=()=>{p.open=!p.open,p.open||(p.search="")},z=C=>{var A,v,O;const S=C.relatedTarget;!((A=c.value)!=null&&A.contains(S))&&!((O=(v=u.value)==null?void 0:v.listRef)!=null&&O.contains(S))&&(p.search="",p.open=!1)},q=C=>{var A;const{open:v,activeOption:O}=p;if(!v){C.code==="Enter"&&(p.open=!0);return}C.code==="Escape"&&(p.open=!1,(A=c.value)==null||A.focus());const S=t.unref(E),{length:k}=S;if(!k)return;["ArrowDown","ArrowUp","Enter"].includes(C.code)&&C.preventDefault(),C.code==="Enter"&&$(S[O].value);const M=C.code==="ArrowDown"?1:C.code==="ArrowUp"?-1:0;p.activeOption=Math.abs(O+M+k)%k,requestAnimationFrame(()=>{var U;return(U=u.value)==null?void 0:U.scrollIntoActive()})};return Kn(c),t.watch(()=>s.modelValue,()=>F(),{immediate:!0}),t.watchPostEffect(()=>{var C;p.search,p.open&&((C=u.value)==null||C.scrollIntoActive())}),(C,A)=>(t.openBlock(),t.createElementBlock("div",{class:"pl-dropdown-multi__envelope",onClick:R},[t.createElementVNode("div",{ref_key:"rootRef",ref:c,tabindex:D.value,class:t.normalizeClass(["pl-dropdown-multi",{open:p.open,error:C.error,disabled:V.value}]),onKeydown:q,onFocusout:z},[t.createElementVNode("div",zC,[t.createElementVNode("div",UC,[t.withDirectives(t.createElementVNode("input",{ref_key:"input",ref:d,"onUpdate:modelValue":A[0]||(A[0]=v=>p.search=v),type:"text",tabindex:"-1",disabled:V.value,placeholder:g.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:A[1]||(A[1]=v=>p.open=!0)},null,40,jC),[[t.vModelText,p.search]]),A[6]||(A[6]=t.createTextVNode()),p.open?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",ZC,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(w.value,(v,O)=>(t.openBlock(),t.createBlock(t.unref(dd),{key:O,closeable:"",small:"",onClick:A[2]||(A[2]=t.withModifiers(S=>p.open=!0,["stop"])),onClose:S=>W(v.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(v.label||v.value),1)]),_:2},1032,["onClose"]))),128))])),A[7]||(A[7]=t.createTextVNode()),t.createElementVNode("div",WC,[N.value?(t.openBlock(),t.createBlock(t.unref(at),{key:0,name:"loading"})):t.createCommentVNode("",!0),A[4]||(A[4]=t.createTextVNode()),t.renderSlot(C.$slots,"append"),A[5]||(A[5]=t.createTextVNode()),t.createElementVNode("div",{class:"pl-dropdown-multi__arrow-wrapper",onClick:t.withModifiers(B,["stop"])},A[3]||(A[3]=[t.createElementVNode("div",{class:"arrow-icon arrow-icon-default"},null,-1)]))])]),A[12]||(A[12]=t.createTextVNode()),C.label?(t.openBlock(),t.createElementBlock("label",HC,[C.required?(t.openBlock(),t.createElementBlock("i",qC)):t.createCommentVNode("",!0),A[8]||(A[8]=t.createTextVNode()),t.createElementVNode("span",null,t.toDisplayString(C.label),1),A[9]||(A[9]=t.createTextVNode()),t.unref(a).tooltip?(t.openBlock(),t.createBlock(t.unref(dt),{key:1,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(C.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),A[13]||(A[13]=t.createTextVNode()),p.open?(t.openBlock(),t.createBlock($s,{key:1,ref_key:"overlay",ref:u,root:c.value,class:"pl-dropdown-multi__options",gap:5,tabindex:"-1",onFocusout:z},{default:t.withCtx(()=>[t.createElementVNode("div",GC,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(w.value,(v,O)=>(t.openBlock(),t.createBlock(t.unref(dd),{key:O,closeable:"",small:"",onClose:S=>W(v.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(v.label||v.value),1)]),_:2},1032,["onClose"]))),128))]),A[10]||(A[10]=t.createTextVNode()),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(E.value,(v,O)=>(t.openBlock(),t.createBlock(so,{key:O,option:v,"text-item":"text","is-selected":v.selected,"is-hovered":p.activeOption==O,size:"medium","use-checkbox":"",onClick:t.withModifiers(S=>$(v.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128)),A[11]||(A[11]=t.createTextVNode()),E.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",KC,"Nothing found"))]),_:1},8,["root"])):t.createCommentVNode("",!0),A[14]||(A[14]=t.createTextVNode()),t.createVNode(lr,{class:"pl-dropdown-multi__contour"})])],42,FC),A[15]||(A[15]=t.createTextVNode()),C.error?(t.openBlock(),t.createElementBlock("div",XC,t.toDisplayString(C.error),1)):C.helper?(t.openBlock(),t.createElementBlock("div",YC,t.toDisplayString(C.helper),1)):t.createCommentVNode("",!0)]))}}),QC=t.defineComponent({__name:"PlDropdownMultiRef",props:{modelValue:{default:()=>[]},label:{default:void 0},options:{default:void 0},helper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n){const e=t.useSlots(),r=n,o=t.computed(()=>{var a;return(a=r.options)==null?void 0:a.map(s=>({label:s.label,value:s.ref}))});return(a,s)=>(t.openBlock(),t.createBlock(ph,t.mergeProps(r,{options:o.value,"onUpdate:modelValue":s[0]||(s[0]=c=>a.$emit("update:modelValue",c))}),t.createSlots({_:2},[t.unref(e).tooltip?{name:"tooltip",fn:t.withCtx(()=>[t.renderSlot(a.$slots,"tooltip")]),key:"0"}:void 0]),1040,["options"]))}}),ud=t.defineComponent({__name:"PlCheckboxBase",props:{modelValue:{type:Boolean},disabled:{type:Boolean},indeterminate:{type:Boolean}},emits:["update:modelValue"],setup(n){const e=n;return(r,o)=>(t.openBlock(),t.createElementBlock("div",{tabindex:"0",class:t.normalizeClass(["pl-checkbox-base",{...e.indeterminate?{indeterminate:!0}:{checked:e.modelValue},disabled:r.disabled}]),onClick:o[0]||(o[0]=a=>r.$emit("update:modelValue",!r.modelValue)),onKeydown:o[1]||(o[1]=t.withKeys(t.withModifiers(a=>r.$emit("update:modelValue",!r.modelValue),["prevent"]),["space"]))},null,34))}}),eE={name:"PlCheckbox"},fd=t.defineComponent({...eE,props:{modelValue:{type:Boolean},disabled:{type:Boolean},indeterminate:{type:Boolean}},emits:["update:modelValue"],setup(n){const e=n,r=t.useSlots();return(o,a)=>t.unref(r).default?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["pl-checkbox",{disabled:o.disabled}])},[t.createVNode(ud,t.mergeProps(e,{"onUpdate:modelValue":a[0]||(a[0]=s=>o.$emit("update:modelValue",s))}),null,16),a[3]||(a[3]=t.createTextVNode()),t.createElementVNode("label",{onClick:a[1]||(a[1]=s=>o.$emit("update:modelValue",!o.$props.modelValue))},[t.renderSlot(o.$slots,"default")])],2)):(t.openBlock(),t.createBlock(ud,t.mergeProps({key:1},e,{"onUpdate:modelValue":a[2]||(a[2]=s=>o.$emit("update:modelValue",s))}),null,16))}}),tE={key:0},nE=["onClick"],rE={name:"PlCheckboxGroup"},oE=t.defineComponent({...rE,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:e}){const r=t.useSlots(),o=e,a=n,s=d=>a.modelValue.includes(d),c=d=>{const u=a.modelValue??[];o("update:modelValue",s(d)?u.filter(p=>p!==d):[...u,d])};return(d,u)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["pl-checkbox-group",{disabled:d.disabled}])},[d.label?(t.openBlock(),t.createElementBlock("label",tE,[t.createElementVNode("span",null,t.toDisplayString(d.label),1),u[0]||(u[0]=t.createTextVNode()),t.unref(r).tooltip?(t.openBlock(),t.createBlock(t.unref(dt),{key:0,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(d.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),u[2]||(u[2]=t.createTextVNode()),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.options.map(p=>({label:"label"in p?p.label:p.text,value:p.value})),(p,h)=>(t.openBlock(),t.createElementBlock("div",{key:h},[t.createVNode(ud,{disabled:d.disabled,label:p.label,"model-value":s(p.value),"onUpdate:modelValue":()=>c(p.value)},null,8,["disabled","label","model-value","onUpdate:modelValue"]),u[1]||(u[1]=t.createTextVNode()),t.createElementVNode("label",{onClick:t.withModifiers(()=>c(p.value),["stop"])},t.toDisplayString(p.label),9,nE)]))),128))],2))}}),aE="_component_tupwt_1",iE={component:aE},sE={};function lE(n,e){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(n.$style.component)},e[0]||(e[0]=[t.createElementVNode("div",null,null,-1)]),2)}const cE={$style:iE},hh=lt(sE,[["render",lE],["__cssModules",cE]]),dE={key:1,class:"pl-dialog-modal__title"},uE={inheritAttrs:!1},pd=t.defineComponent({...uE,__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},size:{default:void 0}},emits:["update:modelValue"],setup(n,{emit:e}){const r=t.useSlots(),o=e,a=n,s=t.ref(),c=t.computed(()=>{const{width:u,height:p,minHeight:h,maxHeight:g,size:y}=a;return y==="small"?{width:"448px",height:"440px",minHeight:"auto",maxHeight:"auto"}:y==="medium"?{width:"720px",height:"720px",minHeight:"auto",maxHeight:"auto"}:y==="large"?{width:"1080px",height:"880px",minHeight:"auto",maxHeight:"auto"}:{width:u,height:p,minHeight:h,maxHeight:g}});function d(u){s.value&&a.closeOnOutsideClick&&document.contains(u.target)&&!s.value.contains(u.target)&&o("update:modelValue",!1)}return ot(document.body,"keyup",u=>{a.modelValue&&u.code==="Escape"&&o("update:modelValue",!1)}),(u,p)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:"dialog"},{default:t.withCtx(()=>[u.modelValue?(t.openBlock(),t.createElementBlock("div",{key:0,class:"pl-dialog-modal__shadow",onClick:d},[t.createElementVNode("div",t.mergeProps(u.$attrs,{ref_key:"modal",ref:s,class:["pl-dialog-modal",{"has-title":t.unref(r).title,"has-content":t.unref(r).default}],style:c.value}),[u.closable?(t.openBlock(),t.createBlock(hh,{key:0,class:"close-modal-btn",onClick:p[0]||(p[0]=t.withModifiers(h=>o("update:modelValue",!1),["stop"]))})):t.createCommentVNode("",!0),p[1]||(p[1]=t.createTextVNode()),t.unref(r).title?(t.openBlock(),t.createElementBlock("div",dE,[t.renderSlot(u.$slots,"title")])):t.createCommentVNode("",!0),p[2]||(p[2]=t.createTextVNode()),t.createElementVNode("div",{class:t.normalizeClass(["pl-dialog-modal__content",{"no-content-gutters":u.noContentGutters,"no-top-content-gutter":u.noTopContentGutter}])},[t.renderSlot(u.$slots,"default")],2),p[3]||(p[3]=t.createTextVNode()),t.unref(r).actions?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["pl-dialog-modal__actions",{"has-top-border":u.actionsHasTopBorder}])},[t.renderSlot(u.$slots,"actions")],2)):t.createCommentVNode("",!0)],16)])):t.createCommentVNode("",!0)]),_:3})]))}}),fE=t.defineComponent({__name:"TransitionSlidePanel",setup(n){function e(){window.dispatchEvent(new CustomEvent("adjust"))}function r(){window.dispatchEvent(new CustomEvent("adjust"))}return(o,a)=>(t.openBlock(),t.createBlock(t.Transition,{name:"slide-panel",onAfterEnter:e,onAfterLeave:r},{default:t.withCtx(()=>[t.renderSlot(o.$slots,"default")]),_:3}))}}),pE={key:0,class:"pl-slide-modal__title"},hE={class:"pl-slide-modal__title-content"},mE={class:"pl-slide-modal__content"},gE={key:1,class:"pl-slide-modal__actions"},yE={name:"PlSlideModal",inheritAttrs:!1},Qa=t.defineComponent({...yE,props:{modelValue:{type:Boolean,default:!1},width:{default:"368px"},shadow:{type:Boolean,default:!1},closeOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(n,{emit:e}){const r=t.useSlots(),o=e,a=n,s=t.ref(),c=t.useAttrs();return Vs(s,()=>{a.modelValue&&a.closeOnOutsideClick&&o("update:modelValue",!1)}),ot(document,"keydown",d=>{d.key==="Escape"&&o("update:modelValue",!1)}),(d,u)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(fE,null,{default:t.withCtx(()=>[d.modelValue?(t.openBlock(),t.createElementBlock("div",t.mergeProps({key:0,ref_key:"modal",ref:s,style:{width:d.width}},t.unref(c),{class:["pl-slide-modal",{"has-title":t.unref(r).title,"has-actions":t.unref(r).actions}],onKeyup:u[1]||(u[1]=t.withKeys(p=>o("update:modelValue",!1),["esc"]))}),[t.createElementVNode("div",{class:"close-dialog-btn",onClick:u[0]||(u[0]=p=>o("update:modelValue",!1))}),u[3]||(u[3]=t.createTextVNode()),t.unref(r).title?(t.openBlock(),t.createElementBlock("div",pE,[t.createElementVNode("span",hE,[t.renderSlot(d.$slots,"title")])])):t.createCommentVNode("",!0),u[4]||(u[4]=t.createTextVNode()),t.createElementVNode("div",mE,[t.renderSlot(d.$slots,"default")]),u[5]||(u[5]=t.createTextVNode()),t.unref(r).actions?(t.openBlock(),t.createElementBlock("div",gE,[t.renderSlot(d.$slots,"actions")])):t.createCommentVNode("",!0)],16)):t.createCommentVNode("",!0)]),_:3}),u[6]||(u[6]=t.createTextVNode()),d.modelValue&&d.shadow?(t.openBlock(),t.createElementBlock("div",{key:0,class:"pl-slide-modal__shadow",onKeyup:u[2]||(u[2]=t.withKeys(p=>o("update:modelValue",!1),["esc"]))},null,32)):t.createCommentVNode("",!0)]))}}),_E={key:0,class:"label"},wE={name:"PlToggleSwitch"},Rs=t.defineComponent({...wE,props:{label:{},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",{tabindex:"0",class:t.normalizeClass(["ui-toggle-switch",{active:e.modelValue}]),onClick:r[0]||(r[0]=o=>e.$emit("update:modelValue",!e.modelValue)),onKeydown:r[1]||(r[1]=t.withKeys(o=>e.$emit("update:modelValue",!e.modelValue),["enter"]))},[r[2]||(r[2]=t.createElementVNode("div",{class:"ui-toggle-switch__body"},[t.createElementVNode("div",{class:"ui-toggle-switch__handle"})],-1)),r[3]||(r[3]=t.createTextVNode()),e.label?(t.openBlock(),t.createElementBlock("span",_E,t.toDisplayString(e.label),1)):t.createCommentVNode("",!0)],34))}});function mh(n){return t.getCurrentScope()?(t.onScopeDispose(n),!0):!1}const gh=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const yh=()=>{};function bE(n,e){function r(...o){return new Promise((a,s)=>{Promise.resolve(n(()=>e.apply(this,o),{fn:e,thisArg:this,args:o})).then(a).catch(s)})}return r}function kE(n,e={}){let r,o,a=yh;const s=c=>{clearTimeout(c),a(),a=yh};return c=>{const d=t.toValue(n),u=t.toValue(e.maxWait);return r&&s(r),d<=0||u!==void 0&&u<=0?(o&&(s(o),o=null),Promise.resolve(c())):new Promise((p,h)=>{a=e.rejectOnCancel?h:p,u&&!o&&(o=setTimeout(()=>{r&&s(r),o=null,p(c())},u)),r=setTimeout(()=>{o&&s(o),o=null,p(c())},d)})}}function xE(n,e=200,r={}){return bE(kE(e,r),n)}function vE(n,e=200,r={}){const o=t.ref(n.value),a=xE(()=>{o.value=n.value},e,r);return t.watch(n,()=>a()),o}function CE(n,e,r={}){const{immediate:o=!0}=r,a=t.ref(!1);let s=null;function c(){s&&(clearTimeout(s),s=null)}function d(){a.value=!1,c()}function u(...p){c(),a.value=!0,s=setTimeout(()=>{a.value=!1,s=null,n(...p)},t.toValue(e))}return o&&(a.value=!0,gh&&u()),mh(d),{isPending:t.readonly(a),start:u,stop:d}}function EE(n,e,r){return t.watch(n,(o,a,s)=>{o&&e(o,a,s)},{...r,once:!1})}function SE(n,e,r={}){const{immediate:o=!0}=r,{start:a}=CE(c,e,{immediate:!1}),s=t.ref(!1);async function c(){s.value&&(await n(),a())}function d(){s.value||(s.value=!0,c())}function u(){s.value=!1}return o&&gh&&d(),mh(u),{isActive:s,pause:u,resume:d}}var Ze;(function(n){n.assertEqual=a=>a;function e(a){}n.assertIs=e;function r(a){throw new Error}n.assertNever=r,n.arrayToEnum=a=>{const s={};for(const c of a)s[c]=c;return s},n.getValidEnumValues=a=>{const s=n.objectKeys(a).filter(d=>typeof a[a[d]]!="number"),c={};for(const d of s)c[d]=a[d];return n.objectValues(c)},n.objectValues=a=>n.objectKeys(a).map(function(s){return a[s]}),n.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const s=[];for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&s.push(c);return s},n.find=(a,s)=>{for(const c of a)if(s(c))return c},n.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function o(a,s=" | "){return a.map(c=>typeof c=="string"?`'${c}'`:c).join(s)}n.joinValues=o,n.jsonStringifyReplacer=(a,s)=>typeof s=="bigint"?s.toString():s})(Ze||(Ze={}));var hd;(function(n){n.mergeShapes=(e,r)=>({...e,...r})})(hd||(hd={}));const le=Ze.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Or=n=>{switch(typeof n){case"undefined":return le.undefined;case"string":return le.string;case"number":return isNaN(n)?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(n)?le.array:n===null?le.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?le.promise:typeof Map<"u"&&n instanceof Map?le.map:typeof Set<"u"&&n instanceof Set?le.set:typeof Date<"u"&&n instanceof Date?le.date:le.object;default:return le.unknown}},ne=Ze.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"]),NE=n=>JSON.stringify(n,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 r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const r=e||function(s){return s.message},o={_errors:[]},a=s=>{for(const c of s.issues)if(c.code==="invalid_union")c.unionErrors.map(a);else if(c.code==="invalid_return_type")a(c.returnTypeError);else if(c.code==="invalid_arguments")a(c.argumentsError);else if(c.path.length===0)o._errors.push(r(c));else{let d=o,u=0;for(;u<c.path.length;){const p=c.path[u];u===c.path.length-1?(d[p]=d[p]||{_errors:[]},d[p]._errors.push(r(c))):d[p]=d[p]||{_errors:[]},d=d[p],u++}}};return a(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,Ze.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},o=[];for(const a of this.issues)a.path.length>0?(r[a.path[0]]=r[a.path[0]]||[],r[a.path[0]].push(e(a))):o.push(e(a));return{formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}}Jt.create=n=>new Jt(n);const Wo=(n,e)=>{let r;switch(n.code){case ne.invalid_type:n.received===le.undefined?r="Required":r=`Expected ${n.expected}, received ${n.received}`;break;case ne.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(n.expected,Ze.jsonStringifyReplacer)}`;break;case ne.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ze.joinValues(n.keys,", ")}`;break;case ne.invalid_union:r="Invalid input";break;case ne.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ze.joinValues(n.options)}`;break;case ne.invalid_enum_value:r=`Invalid enum value. Expected ${Ze.joinValues(n.options)}, received '${n.received}'`;break;case ne.invalid_arguments:r="Invalid function arguments";break;case ne.invalid_return_type:r="Invalid function return type";break;case ne.invalid_date:r="Invalid date";break;case ne.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(r=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?r=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?r=`Invalid input: must end with "${n.validation.endsWith}"`:Ze.assertNever(n.validation):n.validation!=="regex"?r=`Invalid ${n.validation}`:r="Invalid";break;case ne.too_small:n.type==="array"?r=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?r=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?r=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?r=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:r="Invalid input";break;case ne.too_big:n.type==="array"?r=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?r=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?r=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?r=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?r=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:r="Invalid input";break;case ne.custom:r="Invalid input";break;case ne.invalid_intersection_types:r="Intersection results could not be merged";break;case ne.not_multiple_of:r=`Number must be a multiple of ${n.multipleOf}`;break;case ne.not_finite:r="Number must be finite";break;default:r=e.defaultError,Ze.assertNever(n)}return{message:r}};let _h=Wo;function BE(n){_h=n}function Os(){return _h}const Is=n=>{const{data:e,path:r,errorMaps:o,issueData:a}=n,s=[...r,...a.path||[]],c={...a,path:s};if(a.message!==void 0)return{...a,path:s,message:a.message};let d="";const u=o.filter(p=>!!p).slice().reverse();for(const p of u)d=p(c,{data:e,defaultError:d}).message;return{...a,path:s,message:d}},VE=[];function ie(n,e){const r=Os(),o=Is({issueData:e,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,r,r===Wo?void 0:Wo].filter(a=>!!a)});n.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,r){const o=[];for(const a of r){if(a.status==="aborted")return Ee;a.status==="dirty"&&e.dirty(),o.push(a.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,r){const o=[];for(const a of r){const s=await a.key,c=await a.value;o.push({key:s,value:c})}return Bt.mergeObjectSync(e,o)}static mergeObjectSync(e,r){const o={};for(const a of r){const{key:s,value:c}=a;if(s.status==="aborted"||c.status==="aborted")return Ee;s.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof c.value<"u"||a.alwaysSet)&&(o[s.value]=c.value)}return{status:e.value,value:o}}}const Ee=Object.freeze({status:"aborted"}),Ds=n=>({status:"dirty",value:n}),Ot=n=>({status:"valid",value:n}),md=n=>n.status==="aborted",gd=n=>n.status==="dirty",ei=n=>n.status==="valid",ti=n=>typeof Promise<"u"&&n instanceof Promise;function Ms(n,e,r,o){if(typeof e=="function"?n!==e||!o:!e.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(n)}function wh(n,e,r,o,a){if(typeof e=="function"?n!==e||!a:!e.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(n,r),r}var me;(function(n){n.errToObj=e=>typeof e=="string"?{message:e}:e||{},n.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(me||(me={}));var ni,ri;class Xn{constructor(e,r,o,a){this._cachedPath=[],this.parent=e,this.data=r,this._path=o,this._key=a}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 bh=(n,e)=>{if(ei(e))return{success:!0,data:e.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Jt(n.common.issues);return this._error=r,this._error}}};function Te(n){if(!n)return{};const{errorMap:e,invalid_type_error:r,required_error:o,description:a}=n;if(e&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(s,c)=>{var d,u;const{message:p}=n;return s.code==="invalid_enum_value"?{message:p??c.defaultError}:typeof c.data>"u"?{message:(d=p??o)!==null&&d!==void 0?d:c.defaultError}:s.code!=="invalid_type"?{message:c.defaultError}:{message:(u=p??r)!==null&&u!==void 0?u:c.defaultError}},description:a}}class Oe{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,r){return r||{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 Bt,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 r=this._parse(e);if(ti(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const o=this.safeParse(e,r);if(o.success)return o.data;throw o.error}safeParse(e,r){var o;const a={common:{issues:[],async:(o=r==null?void 0:r.async)!==null&&o!==void 0?o:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Or(e)},s=this._parseSync({data:e,path:a.path,parent:a});return bh(a,s)}async parseAsync(e,r){const o=await this.safeParseAsync(e,r);if(o.success)return o.data;throw o.error}async safeParseAsync(e,r){const o={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Or(e)},a=this._parse({data:e,path:o.path,parent:o}),s=await(ti(a)?a:Promise.resolve(a));return bh(o,s)}refine(e,r){const o=a=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(a):r;return this._refinement((a,s)=>{const c=e(a),d=()=>s.addIssue({code:ne.custom,...o(a)});return typeof Promise<"u"&&c instanceof Promise?c.then(u=>u?!0:(d(),!1)):c?!0:(d(),!1)})}refinement(e,r){return this._refinement((o,a)=>e(o)?!0:(a.addIssue(typeof r=="function"?r(o,a):r),!1))}_refinement(e){return new En({schema:this,typeName:xe.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Jn.create(this,this._def)}nullable(){return Lr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Cn.create(this,this._def)}promise(){return Ko.create(this,this._def)}or(e){return si.create([this,e],this._def)}and(e){return li.create(this,e,this._def)}transform(e){return new En({...Te(this._def),schema:this,typeName:xe.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new pi({...Te(this._def),innerType:this,defaultValue:r,typeName:xe.ZodDefault})}brand(){return new wd({typeName:xe.ZodBranded,type:this,...Te(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new hi({...Te(this._def),innerType:this,catchValue:r,typeName:xe.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return mi.create(this,e)}readonly(){return gi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const TE=/^c[^\s-]{8,}$/i,AE=/^[0-9a-z]+$/,$E=/^[0-9A-HJKMNP-TV-Z]{26}$/,RE=/^[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,OE=/^[a-z0-9_-]{21}$/i,IE=/^[-+]?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)?)??$/,DE=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,ME="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let yd;const PE=/^(?:(?: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])$/,LE=/^(([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})))$/,FE=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,kh="((\\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])))",zE=new RegExp(`^${kh}$`);function xh(n){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return n.precision?e=`${e}\\.\\d{${n.precision}}`:n.precision==null&&(e=`${e}(\\.\\d+)?`),e}function UE(n){return new RegExp(`^${xh(n)}$`)}function vh(n){let e=`${kh}T${xh(n)}`;const r=[];return r.push(n.local?"Z?":"Z"),n.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function jE(n,e){return!!((e==="v4"||!e)&&PE.test(n)||(e==="v6"||!e)&&LE.test(n))}class vn extends Oe{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==le.string){const a=this._getOrReturnCtx(e);return ie(a,{code:ne.invalid_type,expected:le.string,received:a.parsedType}),Ee}const r=new Bt;let o;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ne.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")e.data.length>a.value&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ne.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const s=e.data.length>a.value,c=e.data.length<a.value;(s||c)&&(o=this._getOrReturnCtx(e,o),s?ie(o,{code:ne.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):c&&ie(o,{code:ne.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")DE.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"email",code:ne.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")yd||(yd=new RegExp(ME,"u")),yd.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"emoji",code:ne.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")RE.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"uuid",code:ne.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")OE.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"nanoid",code:ne.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")TE.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"cuid",code:ne.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")AE.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"cuid2",code:ne.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")$E.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"ulid",code:ne.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),ie(o,{validation:"url",code:ne.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"regex",code:ne.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(o=this._getOrReturnCtx(e,o),ie(o,{code:ne.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(o=this._getOrReturnCtx(e,o),ie(o,{code:ne.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(o=this._getOrReturnCtx(e,o),ie(o,{code:ne.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?vh(a).test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{code:ne.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?zE.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{code:ne.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?UE(a).test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{code:ne.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?IE.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"duration",code:ne.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?jE(e.data,a.version)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"ip",code:ne.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?FE.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"base64",code:ne.invalid_string,message:a.message}),r.dirty()):Ze.assertNever(a);return{status:r.value,value:e.data}}_regex(e,r,o){return this.refinement(a=>e.test(a),{validation:r,code:ne.invalid_string,...me.errToObj(o)})}_addCheck(e){return new vn({...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 r,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:(r=e==null?void 0:e.offset)!==null&&r!==void 0?r:!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,r){return this._addCheck({kind:"regex",regex:e,...me.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...me.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...me.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...me.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...me.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...me.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...me.errToObj(r)})}nonempty(e){return this.min(1,me.errToObj(e))}trim(){return new vn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new vn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new vn({...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 r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}vn.create=n=>{var e;return new vn({checks:[],typeName:xe.ZodString,coerce:(e=n==null?void 0:n.coerce)!==null&&e!==void 0?e:!1,...Te(n)})};function ZE(n,e){const r=(n.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,a=r>o?r:o,s=parseInt(n.toFixed(a).replace(".","")),c=parseInt(e.toFixed(a).replace(".",""));return s%c/Math.pow(10,a)}class Ir extends Oe{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 a=this._getOrReturnCtx(e);return ie(a,{code:ne.invalid_type,expected:le.number,received:a.parsedType}),Ee}let r;const o=new Bt;for(const a of this._def.checks)a.kind==="int"?Ze.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),ie(r,{code:ne.invalid_type,expected:"integer",received:"float",message:a.message}),o.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(r=this._getOrReturnCtx(e,r),ie(r,{code:ne.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),ie(r,{code:ne.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()):a.kind==="multipleOf"?ZE(e.data,a.value)!==0&&(r=this._getOrReturnCtx(e,r),ie(r,{code:ne.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),ie(r,{code:ne.not_finite,message:a.message}),o.dirty()):Ze.assertNever(a);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,me.toString(r))}gt(e,r){return this.setLimit("min",e,!1,me.toString(r))}lte(e,r){return this.setLimit("max",e,!0,me.toString(r))}lt(e,r){return this.setLimit("max",e,!1,me.toString(r))}setLimit(e,r,o,a){return new Ir({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:o,message:me.toString(a)}]})}_addCheck(e){return new Ir({...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,r){return this._addCheck({kind:"multipleOf",value:e,message:me.toString(r)})}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 r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ze.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(e===null||o.value<e)&&(e=o.value)}return Number.isFinite(r)&&Number.isFinite(e)}}Ir.create=n=>new Ir({checks:[],typeName:xe.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...Te(n)});class Dr extends Oe{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 a=this._getOrReturnCtx(e);return ie(a,{code:ne.invalid_type,expected:le.bigint,received:a.parsedType}),Ee}let r;const o=new Bt;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(r=this._getOrReturnCtx(e,r),ie(r,{code:ne.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),o.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),ie(r,{code:ne.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),o.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),ie(r,{code:ne.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):Ze.assertNever(a);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,me.toString(r))}gt(e,r){return this.setLimit("min",e,!1,me.toString(r))}lte(e,r){return this.setLimit("max",e,!0,me.toString(r))}lt(e,r){return this.setLimit("max",e,!1,me.toString(r))}setLimit(e,r,o,a){return new Dr({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:o,message:me.toString(a)}]})}_addCheck(e){return new Dr({...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,r){return this._addCheck({kind:"multipleOf",value:e,message:me.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}Dr.create=n=>{var e;return new Dr({checks:[],typeName:xe.ZodBigInt,coerce:(e=n==null?void 0:n.coerce)!==null&&e!==void 0?e:!1,...Te(n)})};class oi extends Oe{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==le.boolean){const r=this._getOrReturnCtx(e);return ie(r,{code:ne.invalid_type,expected:le.boolean,received:r.parsedType}),Ee}return Ot(e.data)}}oi.create=n=>new oi({typeName:xe.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...Te(n)});class co extends Oe{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==le.date){const a=this._getOrReturnCtx(e);return ie(a,{code:ne.invalid_type,expected:le.date,received:a.parsedType}),Ee}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return ie(a,{code:ne.invalid_date}),Ee}const r=new Bt;let o;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ne.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ne.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):Ze.assertNever(a);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new co({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:me.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:me.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}co.create=n=>new co({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:xe.ZodDate,...Te(n)});class Ps extends Oe{_parse(e){if(this._getType(e)!==le.symbol){const r=this._getOrReturnCtx(e);return ie(r,{code:ne.invalid_type,expected:le.symbol,received:r.parsedType}),Ee}return Ot(e.data)}}Ps.create=n=>new Ps({typeName:xe.ZodSymbol,...Te(n)});class ai extends Oe{_parse(e){if(this._getType(e)!==le.undefined){const r=this._getOrReturnCtx(e);return ie(r,{code:ne.invalid_type,expected:le.undefined,received:r.parsedType}),Ee}return Ot(e.data)}}ai.create=n=>new ai({typeName:xe.ZodUndefined,...Te(n)});class ii extends Oe{_parse(e){if(this._getType(e)!==le.null){const r=this._getOrReturnCtx(e);return ie(r,{code:ne.invalid_type,expected:le.null,received:r.parsedType}),Ee}return Ot(e.data)}}ii.create=n=>new ii({typeName:xe.ZodNull,...Te(n)});class Ho extends Oe{constructor(){super(...arguments),this._any=!0}_parse(e){return Ot(e.data)}}Ho.create=n=>new Ho({typeName:xe.ZodAny,...Te(n)});class uo extends Oe{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ot(e.data)}}uo.create=n=>new uo({typeName:xe.ZodUnknown,...Te(n)});class cr extends Oe{_parse(e){const r=this._getOrReturnCtx(e);return ie(r,{code:ne.invalid_type,expected:le.never,received:r.parsedType}),Ee}}cr.create=n=>new cr({typeName:xe.ZodNever,...Te(n)});class Ls extends Oe{_parse(e){if(this._getType(e)!==le.undefined){const r=this._getOrReturnCtx(e);return ie(r,{code:ne.invalid_type,expected:le.void,received:r.parsedType}),Ee}return Ot(e.data)}}Ls.create=n=>new Ls({typeName:xe.ZodVoid,...Te(n)});class Cn extends Oe{_parse(e){const{ctx:r,status:o}=this._processInputParams(e),a=this._def;if(r.parsedType!==le.array)return ie(r,{code:ne.invalid_type,expected:le.array,received:r.parsedType}),Ee;if(a.exactLength!==null){const c=r.data.length>a.exactLength.value,d=r.data.length<a.exactLength.value;(c||d)&&(ie(r,{code:c?ne.too_big:ne.too_small,minimum:d?a.exactLength.value:void 0,maximum:c?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),o.dirty())}if(a.minLength!==null&&r.data.length<a.minLength.value&&(ie(r,{code:ne.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),o.dirty()),a.maxLength!==null&&r.data.length>a.maxLength.value&&(ie(r,{code:ne.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((c,d)=>a.type._parseAsync(new Xn(r,c,r.path,d)))).then(c=>Bt.mergeArray(o,c));const s=[...r.data].map((c,d)=>a.type._parseSync(new Xn(r,c,r.path,d)));return Bt.mergeArray(o,s)}get element(){return this._def.type}min(e,r){return new Cn({...this._def,minLength:{value:e,message:me.toString(r)}})}max(e,r){return new Cn({...this._def,maxLength:{value:e,message:me.toString(r)}})}length(e,r){return new Cn({...this._def,exactLength:{value:e,message:me.toString(r)}})}nonempty(e){return this.min(1,e)}}Cn.create=(n,e)=>new Cn({type:n,minLength:null,maxLength:null,exactLength:null,typeName:xe.ZodArray,...Te(e)});function qo(n){if(n instanceof it){const e={};for(const r in n.shape){const o=n.shape[r];e[r]=Jn.create(qo(o))}return new it({...n._def,shape:()=>e})}else return n instanceof Cn?new Cn({...n._def,type:qo(n.element)}):n instanceof Jn?Jn.create(qo(n.unwrap())):n instanceof Lr?Lr.create(qo(n.unwrap())):n instanceof Yn?Yn.create(n.items.map(e=>qo(e))):n}class it extends Oe{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(),r=Ze.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==le.object){const u=this._getOrReturnCtx(e);return ie(u,{code:ne.invalid_type,expected:le.object,received:u.parsedType}),Ee}const{status:r,ctx:o}=this._processInputParams(e),{shape:a,keys:s}=this._getCached(),c=[];if(!(this._def.catchall instanceof cr&&this._def.unknownKeys==="strip"))for(const u in o.data)s.includes(u)||c.push(u);const d=[];for(const u of s){const p=a[u],h=o.data[u];d.push({key:{status:"valid",value:u},value:p._parse(new Xn(o,h,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof cr){const u=this._def.unknownKeys;if(u==="passthrough")for(const p of c)d.push({key:{status:"valid",value:p},value:{status:"valid",value:o.data[p]}});else if(u==="strict")c.length>0&&(ie(o,{code:ne.unrecognized_keys,keys:c}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const p of c){const h=o.data[p];d.push({key:{status:"valid",value:p},value:u._parse(new Xn(o,h,o.path,p)),alwaysSet:p in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const u=[];for(const p of d){const h=await p.key,g=await p.value;u.push({key:h,value:g,alwaysSet:p.alwaysSet})}return u}).then(u=>Bt.mergeObjectSync(r,u)):Bt.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(e){return me.errToObj,new it({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,o)=>{var a,s,c,d;const u=(c=(s=(a=this._def).errorMap)===null||s===void 0?void 0:s.call(a,r,o).message)!==null&&c!==void 0?c:o.defaultError;return r.code==="unrecognized_keys"?{message:(d=me.errToObj(e).message)!==null&&d!==void 0?d:u}:{message:u}}}:{}})}strip(){return new it({...this._def,unknownKeys:"strip"})}passthrough(){return new it({...this._def,unknownKeys:"passthrough"})}extend(e){return new it({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new it({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:xe.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new it({...this._def,catchall:e})}pick(e){const r={};return Ze.objectKeys(e).forEach(o=>{e[o]&&this.shape[o]&&(r[o]=this.shape[o])}),new it({...this._def,shape:()=>r})}omit(e){const r={};return Ze.objectKeys(this.shape).forEach(o=>{e[o]||(r[o]=this.shape[o])}),new it({...this._def,shape:()=>r})}deepPartial(){return qo(this)}partial(e){const r={};return Ze.objectKeys(this.shape).forEach(o=>{const a=this.shape[o];e&&!e[o]?r[o]=a:r[o]=a.optional()}),new it({...this._def,shape:()=>r})}required(e){const r={};return Ze.objectKeys(this.shape).forEach(o=>{if(e&&!e[o])r[o]=this.shape[o];else{let a=this.shape[o];for(;a instanceof Jn;)a=a._def.innerType;r[o]=a}}),new it({...this._def,shape:()=>r})}keyof(){return Ch(Ze.objectKeys(this.shape))}}it.create=(n,e)=>new it({shape:()=>n,unknownKeys:"strip",catchall:cr.create(),typeName:xe.ZodObject,...Te(e)}),it.strictCreate=(n,e)=>new it({shape:()=>n,unknownKeys:"strict",catchall:cr.create(),typeName:xe.ZodObject,...Te(e)}),it.lazycreate=(n,e)=>new it({shape:n,unknownKeys:"strip",catchall:cr.create(),typeName:xe.ZodObject,...Te(e)});class si extends Oe{_parse(e){const{ctx:r}=this._processInputParams(e),o=this._def.options;function a(s){for(const d of s)if(d.result.status==="valid")return d.result;for(const d of s)if(d.result.status==="dirty")return r.common.issues.push(...d.ctx.common.issues),d.result;const c=s.map(d=>new Jt(d.ctx.common.issues));return ie(r,{code:ne.invalid_union,unionErrors:c}),Ee}if(r.common.async)return Promise.all(o.map(async s=>{const c={...r,common:{...r.common,issues:[]},parent:null};return{result:await s._parseAsync({data:r.data,path:r.path,parent:c}),ctx:c}})).then(a);{let s;const c=[];for(const u of o){const p={...r,common:{...r.common,issues:[]},parent:null},h=u._parseSync({data:r.data,path:r.path,parent:p});if(h.status==="valid")return h;h.status==="dirty"&&!s&&(s={result:h,ctx:p}),p.common.issues.length&&c.push(p.common.issues)}if(s)return r.common.issues.push(...s.ctx.common.issues),s.result;const d=c.map(u=>new Jt(u));return ie(r,{code:ne.invalid_union,unionErrors:d}),Ee}}get options(){return this._def.options}}si.create=(n,e)=>new si({options:n,typeName:xe.ZodUnion,...Te(e)});const Mr=n=>n instanceof di?Mr(n.schema):n instanceof En?Mr(n.innerType()):n instanceof ui?[n.value]:n instanceof Pr?n.options:n instanceof fi?Ze.objectValues(n.enum):n instanceof pi?Mr(n._def.innerType):n instanceof ai?[void 0]:n instanceof ii?[null]:n instanceof Jn?[void 0,...Mr(n.unwrap())]:n instanceof Lr?[null,...Mr(n.unwrap())]:n instanceof wd||n instanceof gi?Mr(n.unwrap()):n instanceof hi?Mr(n._def.innerType):[];class Fs extends Oe{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==le.object)return ie(r,{code:ne.invalid_type,expected:le.object,received:r.parsedType}),Ee;const o=this.discriminator,a=r.data[o],s=this.optionsMap.get(a);return s?r.common.async?s._parseAsync({data:r.data,path:r.path,parent:r}):s._parseSync({data:r.data,path:r.path,parent:r}):(ie(r,{code:ne.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),Ee)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,o){const a=new Map;for(const s of r){const c=Mr(s.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(a.has(d))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(d)}`);a.set(d,s)}}return new Fs({typeName:xe.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:a,...Te(o)})}}function _d(n,e){const r=Or(n),o=Or(e);if(n===e)return{valid:!0,data:n};if(r===le.object&&o===le.object){const a=Ze.objectKeys(e),s=Ze.objectKeys(n).filter(d=>a.indexOf(d)!==-1),c={...n,...e};for(const d of s){const u=_d(n[d],e[d]);if(!u.valid)return{valid:!1};c[d]=u.data}return{valid:!0,data:c}}else if(r===le.array&&o===le.array){if(n.length!==e.length)return{valid:!1};const a=[];for(let s=0;s<n.length;s++){const c=n[s],d=e[s],u=_d(c,d);if(!u.valid)return{valid:!1};a.push(u.data)}return{valid:!0,data:a}}else return r===le.date&&o===le.date&&+n==+e?{valid:!0,data:n}:{valid:!1}}class li extends Oe{_parse(e){const{status:r,ctx:o}=this._processInputParams(e),a=(s,c)=>{if(md(s)||md(c))return Ee;const d=_d(s.value,c.value);return d.valid?((gd(s)||gd(c))&&r.dirty(),{status:r.value,value:d.data}):(ie(o,{code:ne.invalid_intersection_types}),Ee)};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(([s,c])=>a(s,c)):a(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}li.create=(n,e,r)=>new li({left:n,right:e,typeName:xe.ZodIntersection,...Te(r)});class Yn extends Oe{_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.array)return ie(o,{code:ne.invalid_type,expected:le.array,received:o.parsedType}),Ee;if(o.data.length<this._def.items.length)return ie(o,{code:ne.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ee;!this._def.rest&&o.data.length>this._def.items.length&&(ie(o,{code:ne.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const a=[...o.data].map((s,c)=>{const d=this._def.items[c]||this._def.rest;return d?d._parse(new Xn(o,s,o.path,c)):null}).filter(s=>!!s);return o.common.async?Promise.all(a).then(s=>Bt.mergeArray(r,s)):Bt.mergeArray(r,a)}get items(){return this._def.items}rest(e){return new Yn({...this._def,rest:e})}}Yn.create=(n,e)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Yn({items:n,typeName:xe.ZodTuple,rest:null,...Te(e)})};class ci extends Oe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.object)return ie(o,{code:ne.invalid_type,expected:le.object,received:o.parsedType}),Ee;const a=[],s=this._def.keyType,c=this._def.valueType;for(const d in o.data)a.push({key:s._parse(new Xn(o,d,o.path,d)),value:c._parse(new Xn(o,o.data[d],o.path,d)),alwaysSet:d in o.data});return o.common.async?Bt.mergeObjectAsync(r,a):Bt.mergeObjectSync(r,a)}get element(){return this._def.valueType}static create(e,r,o){return r instanceof Oe?new ci({keyType:e,valueType:r,typeName:xe.ZodRecord,...Te(o)}):new ci({keyType:vn.create(),valueType:e,typeName:xe.ZodRecord,...Te(r)})}}class zs extends Oe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.map)return ie(o,{code:ne.invalid_type,expected:le.map,received:o.parsedType}),Ee;const a=this._def.keyType,s=this._def.valueType,c=[...o.data.entries()].map(([d,u],p)=>({key:a._parse(new Xn(o,d,o.path,[p,"key"])),value:s._parse(new Xn(o,u,o.path,[p,"value"]))}));if(o.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const u of c){const p=await u.key,h=await u.value;if(p.status==="aborted"||h.status==="aborted")return Ee;(p.status==="dirty"||h.status==="dirty")&&r.dirty(),d.set(p.value,h.value)}return{status:r.value,value:d}})}else{const d=new Map;for(const u of c){const p=u.key,h=u.value;if(p.status==="aborted"||h.status==="aborted")return Ee;(p.status==="dirty"||h.status==="dirty")&&r.dirty(),d.set(p.value,h.value)}return{status:r.value,value:d}}}}zs.create=(n,e,r)=>new zs({valueType:e,keyType:n,typeName:xe.ZodMap,...Te(r)});class fo extends Oe{_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==le.set)return ie(o,{code:ne.invalid_type,expected:le.set,received:o.parsedType}),Ee;const a=this._def;a.minSize!==null&&o.data.size<a.minSize.value&&(ie(o,{code:ne.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),r.dirty()),a.maxSize!==null&&o.data.size>a.maxSize.value&&(ie(o,{code:ne.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),r.dirty());const s=this._def.valueType;function c(u){const p=new Set;for(const h of u){if(h.status==="aborted")return Ee;h.status==="dirty"&&r.dirty(),p.add(h.value)}return{status:r.value,value:p}}const d=[...o.data.values()].map((u,p)=>s._parse(new Xn(o,u,o.path,p)));return o.common.async?Promise.all(d).then(u=>c(u)):c(d)}min(e,r){return new fo({...this._def,minSize:{value:e,message:me.toString(r)}})}max(e,r){return new fo({...this._def,maxSize:{value:e,message:me.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}fo.create=(n,e)=>new fo({valueType:n,minSize:null,maxSize:null,typeName:xe.ZodSet,...Te(e)});class Go extends Oe{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==le.function)return ie(r,{code:ne.invalid_type,expected:le.function,received:r.parsedType}),Ee;function o(d,u){return Is({data:d,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Os(),Wo].filter(p=>!!p),issueData:{code:ne.invalid_arguments,argumentsError:u}})}function a(d,u){return Is({data:d,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Os(),Wo].filter(p=>!!p),issueData:{code:ne.invalid_return_type,returnTypeError:u}})}const s={errorMap:r.common.contextualErrorMap},c=r.data;if(this._def.returns instanceof Ko){const d=this;return Ot(async function(...u){const p=new Jt([]),h=await d._def.args.parseAsync(u,s).catch(y=>{throw p.addIssue(o(u,y)),p}),g=await Reflect.apply(c,this,h);return await d._def.returns._def.type.parseAsync(g,s).catch(y=>{throw p.addIssue(a(g,y)),p})})}else{const d=this;return Ot(function(...u){const p=d._def.args.safeParse(u,s);if(!p.success)throw new Jt([o(u,p.error)]);const h=Reflect.apply(c,this,p.data),g=d._def.returns.safeParse(h,s);if(!g.success)throw new Jt([a(h,g.error)]);return g.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Go({...this._def,args:Yn.create(e).rest(uo.create())})}returns(e){return new Go({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,o){return new Go({args:e||Yn.create([]).rest(uo.create()),returns:r||uo.create(),typeName:xe.ZodFunction,...Te(o)})}}class di extends Oe{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}di.create=(n,e)=>new di({getter:n,typeName:xe.ZodLazy,...Te(e)});class ui extends Oe{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return ie(r,{received:r.data,code:ne.invalid_literal,expected:this._def.value}),Ee}return{status:"valid",value:e.data}}get value(){return this._def.value}}ui.create=(n,e)=>new ui({value:n,typeName:xe.ZodLiteral,...Te(e)});function Ch(n,e){return new Pr({values:n,typeName:xe.ZodEnum,...Te(e)})}class Pr extends Oe{constructor(){super(...arguments),ni.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),o=this._def.values;return ie(r,{expected:Ze.joinValues(o),received:r.parsedType,code:ne.invalid_type}),Ee}if(Ms(this,ni)||wh(this,ni,new Set(this._def.values)),!Ms(this,ni).has(e.data)){const r=this._getOrReturnCtx(e),o=this._def.values;return ie(r,{received:r.data,code:ne.invalid_enum_value,options:o}),Ee}return Ot(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return Pr.create(e,{...this._def,...r})}exclude(e,r=this._def){return Pr.create(this.options.filter(o=>!e.includes(o)),{...this._def,...r})}}ni=new WeakMap,Pr.create=Ch;class fi extends Oe{constructor(){super(...arguments),ri.set(this,void 0)}_parse(e){const r=Ze.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==le.string&&o.parsedType!==le.number){const a=Ze.objectValues(r);return ie(o,{expected:Ze.joinValues(a),received:o.parsedType,code:ne.invalid_type}),Ee}if(Ms(this,ri)||wh(this,ri,new Set(Ze.getValidEnumValues(this._def.values))),!Ms(this,ri).has(e.data)){const a=Ze.objectValues(r);return ie(o,{received:o.data,code:ne.invalid_enum_value,options:a}),Ee}return Ot(e.data)}get enum(){return this._def.values}}ri=new WeakMap,fi.create=(n,e)=>new fi({values:n,typeName:xe.ZodNativeEnum,...Te(e)});class Ko extends Oe{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==le.promise&&r.common.async===!1)return ie(r,{code:ne.invalid_type,expected:le.promise,received:r.parsedType}),Ee;const o=r.parsedType===le.promise?r.data:Promise.resolve(r.data);return Ot(o.then(a=>this._def.type.parseAsync(a,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Ko.create=(n,e)=>new Ko({type:n,typeName:xe.ZodPromise,...Te(e)});class En extends Oe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===xe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:o}=this._processInputParams(e),a=this._def.effect||null,s={addIssue:c=>{ie(o,c),c.fatal?r.abort():r.dirty()},get path(){return o.path}};if(s.addIssue=s.addIssue.bind(s),a.type==="preprocess"){const c=a.transform(o.data,s);if(o.common.async)return Promise.resolve(c).then(async d=>{if(r.value==="aborted")return Ee;const u=await this._def.schema._parseAsync({data:d,path:o.path,parent:o});return u.status==="aborted"?Ee:u.status==="dirty"||r.value==="dirty"?Ds(u.value):u});{if(r.value==="aborted")return Ee;const d=this._def.schema._parseSync({data:c,path:o.path,parent:o});return d.status==="aborted"?Ee:d.status==="dirty"||r.value==="dirty"?Ds(d.value):d}}if(a.type==="refinement"){const c=d=>{const u=a.refinement(d,s);if(o.common.async)return Promise.resolve(u);if(u 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"?Ee:(d.status==="dirty"&&r.dirty(),c(d.value),{status:r.value,value:d.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(d=>d.status==="aborted"?Ee:(d.status==="dirty"&&r.dirty(),c(d.value).then(()=>({status:r.value,value:d.value}))))}if(a.type==="transform")if(o.common.async===!1){const c=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!ei(c))return c;const d=a.transform(c.value,s);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:d}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(c=>ei(c)?Promise.resolve(a.transform(c.value,s)).then(d=>({status:r.value,value:d})):c);Ze.assertNever(a)}}En.create=(n,e,r)=>new En({schema:n,typeName:xe.ZodEffects,effect:e,...Te(r)}),En.createWithPreprocess=(n,e,r)=>new En({schema:e,effect:{type:"preprocess",transform:n},typeName:xe.ZodEffects,...Te(r)});class Jn extends Oe{_parse(e){return this._getType(e)===le.undefined?Ot(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Jn.create=(n,e)=>new Jn({innerType:n,typeName:xe.ZodOptional,...Te(e)});class Lr extends Oe{_parse(e){return this._getType(e)===le.null?Ot(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Lr.create=(n,e)=>new Lr({innerType:n,typeName:xe.ZodNullable,...Te(e)});class pi extends Oe{_parse(e){const{ctx:r}=this._processInputParams(e);let o=r.data;return r.parsedType===le.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}pi.create=(n,e)=>new pi({innerType:n,typeName:xe.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Te(e)});class hi extends Oe{_parse(e){const{ctx:r}=this._processInputParams(e),o={...r,common:{...r.common,issues:[]}},a=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return ti(a)?a.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Jt(o.common.issues)},input:o.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Jt(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}hi.create=(n,e)=>new hi({innerType:n,typeName:xe.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Te(e)});class Us extends Oe{_parse(e){if(this._getType(e)!==le.nan){const r=this._getOrReturnCtx(e);return ie(r,{code:ne.invalid_type,expected:le.nan,received:r.parsedType}),Ee}return{status:"valid",value:e.data}}}Us.create=n=>new Us({typeName:xe.ZodNaN,...Te(n)});const WE=Symbol("zod_brand");class wd extends Oe{_parse(e){const{ctx:r}=this._processInputParams(e),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}}class mi extends Oe{_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return a.status==="aborted"?Ee:a.status==="dirty"?(r.dirty(),Ds(a.value)):this._def.out._parseAsync({data:a.value,path:o.path,parent:o})})();{const a=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return a.status==="aborted"?Ee:a.status==="dirty"?(r.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:o.path,parent:o})}}static create(e,r){return new mi({in:e,out:r,typeName:xe.ZodPipeline})}}class gi extends Oe{_parse(e){const r=this._def.innerType._parse(e),o=a=>(ei(a)&&(a.value=Object.freeze(a.value)),a);return ti(r)?r.then(a=>o(a)):o(r)}unwrap(){return this._def.innerType}}gi.create=(n,e)=>new gi({innerType:n,typeName:xe.ZodReadonly,...Te(e)});function Eh(n,e={},r){return n?Ho.create().superRefine((o,a)=>{var s,c;if(!n(o)){const d=typeof e=="function"?e(o):typeof e=="string"?{message:e}:e,u=(c=(s=d.fatal)!==null&&s!==void 0?s:r)!==null&&c!==void 0?c:!0,p=typeof d=="string"?{message:d}:d;a.addIssue({code:"custom",...p,fatal:u})}}):Ho.create()}const HE={object:it.lazycreate};var xe;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(xe||(xe={}));const qE=(n,e={message:`Input not instance of ${n.name}`})=>Eh(r=>r instanceof n,e),Sh=vn.create,Nh=Ir.create,GE=Us.create,KE=Dr.create,Bh=oi.create,XE=co.create,YE=Ps.create,JE=ai.create,QE=ii.create,eS=Ho.create,tS=uo.create,nS=cr.create,rS=Ls.create,oS=Cn.create,aS=it.create,iS=it.strictCreate,sS=si.create,lS=Fs.create,cS=li.create,dS=Yn.create,uS=ci.create,fS=zs.create,pS=fo.create,hS=Go.create,mS=di.create,gS=ui.create,yS=Pr.create,_S=fi.create,wS=Ko.create,Vh=En.create,bS=Jn.create,kS=Lr.create,xS=En.createWithPreprocess,vS=mi.create;var Fe=Object.freeze({__proto__:null,defaultErrorMap:Wo,setErrorMap:BE,getErrorMap:Os,makeIssue:Is,EMPTY_PATH:VE,addIssueToContext:ie,ParseStatus:Bt,INVALID:Ee,DIRTY:Ds,OK:Ot,isAborted:md,isDirty:gd,isValid:ei,isAsync:ti,get util(){return Ze},get objectUtil(){return hd},ZodParsedType:le,getParsedType:Or,ZodType:Oe,datetimeRegex:vh,ZodString:vn,ZodNumber:Ir,ZodBigInt:Dr,ZodBoolean:oi,ZodDate:co,ZodSymbol:Ps,ZodUndefined:ai,ZodNull:ii,ZodAny:Ho,ZodUnknown:uo,ZodNever:cr,ZodVoid:Ls,ZodArray:Cn,ZodObject:it,ZodUnion:si,ZodDiscriminatedUnion:Fs,ZodIntersection:li,ZodTuple:Yn,ZodRecord:ci,ZodMap:zs,ZodSet:fo,ZodFunction:Go,ZodLazy:di,ZodLiteral:ui,ZodEnum:Pr,ZodNativeEnum:fi,ZodPromise:Ko,ZodEffects:En,ZodTransformer:En,ZodOptional:Jn,ZodNullable:Lr,ZodDefault:pi,ZodCatch:hi,ZodNaN:Us,BRAND:WE,ZodBranded:wd,ZodPipeline:mi,ZodReadonly:gi,custom:Eh,Schema:Oe,ZodSchema:Oe,late:HE,get ZodFirstPartyTypeKind(){return xe},coerce:{string:n=>vn.create({...n,coerce:!0}),number:n=>Ir.create({...n,coerce:!0}),boolean:n=>oi.create({...n,coerce:!0}),bigint:n=>Dr.create({...n,coerce:!0}),date:n=>co.create({...n,coerce:!0})},any:eS,array:oS,bigint:KE,boolean:Bh,date:XE,discriminatedUnion:lS,effect:Vh,enum:yS,function:hS,instanceof:qE,intersection:cS,lazy:mS,literal:gS,map:fS,nan:GE,nativeEnum:_S,never:nS,null:QE,nullable:kS,number:Nh,object:aS,oboolean:()=>Bh().optional(),onumber:()=>Nh().optional(),optional:bS,ostring:()=>Sh().optional(),pipeline:vS,preprocess:xS,promise:wS,record:uS,set:pS,strictObject:iS,string:Sh,symbol:YE,transformer:Vh,tuple:dS,undefined:JE,union:sS,unknown:tS,void:rS,NEVER:Ee,ZodIssueCode:ne,quotelessJson:NE,ZodError:Jt});function CS(n){throw new Error("Unexpected object: "+n)}const Th="upload://upload/",Ah="index://index/";function ES(n){return n.startsWith(Th)}function SS(n){return n.startsWith(Ah)}function $h(n){if(SS(n)){const e=n.slice(Ah.length);return JSON.parse(decodeURIComponent(e)).path}else if(ES(n)){const e=n.slice(Th.length);return JSON.parse(decodeURIComponent(e)).localPath}CS(n)}function NS(n){return n.replace(/^.*[\\/]/,"")}function BS(n){return NS($h(n))}Fe.object({__isRef:Fe.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:Fe.string().describe("Upstream block id"),name:Fe.string().describe("Name of the output provided to the upstream block's output context"),requireEnrichments:Fe.literal(!0).optional().describe("True if current block that stores this reference in its args, may need enrichments for the references value originating from the blocks in between current and referenced block")}).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.").readonly(),Fe.string().length(24).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");var Rh={exports:{}};(function(n,e){e=n.exports=r,e.getSerialize=o;function r(a,s,c,d){return JSON.stringify(a,o(s,d),c)}function o(a,s){var c=[],d=[];return s==null&&(s=function(u,p){return c[0]===p?"[Circular ~]":"[Circular ~."+d.slice(0,c.indexOf(p)).join(".")+"]"}),function(u,p){if(c.length>0){var h=c.indexOf(this);~h?c.splice(h+1):c.push(this),~h?d.splice(h,1/0,u):d.push(u),~c.indexOf(p)&&(p=s.call(this,u,p))}else c.push(p);return a==null?p:a.call(this,u,p)}}})(Rh,Rh.exports);const VS=Fe.object({type:Fe.literal("PlError"),name:Fe.string(),message:Fe.string(),fullMessage:Fe.string().optional(),stack:Fe.string().optional()}),TS=VS.extend({cause:Fe.lazy(()=>js).optional(),errors:Fe.lazy(()=>js.array()).optional()}),AS=Fe.object({type:Fe.literal("StandardError"),name:Fe.string(),message:Fe.string(),stack:Fe.string().optional()}),$S=AS.extend({cause:Fe.lazy(()=>js).optional(),errors:Fe.lazy(()=>js.array()).optional()}),js=Fe.union([$S,TS]),RS=Fe.object({name:Fe.string(),message:Fe.string(),fullMessage:Fe.string().optional(),stack:Fe.string().optional()}),Oh=RS.extend({cause:Fe.lazy(()=>Oh).optional(),errors:Fe.lazy(()=>Oh.array()).optional()});function OS(n){if(n&&typeof globalThis.getPlatforma=="function")return globalThis.getPlatforma(n);if(typeof globalThis.platforma<"u")return globalThis.platforma;throw new Error("Can't get platforma instance.")}const IS=Fe.object({type:Fe.string(),importance:Fe.number().optional(),id:Fe.string().optional(),label:Fe.string()});Fe.array(IS);const DS="1.30.26";function Fr(){return OS({sdkVersion:DS})}const MS="[==PROGRESS==]";function PS(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function LS(n){const e=t.ref(),r=t.reactive({errorCount:0});async function o(){var s;let c=e.value;if(c===void 0)return;const d=n.mockPlatforma??Fr();if(!d){console.warn("Platforma API is not available");return}for(;;){const u=await d.logDriver.readText(c.logHandle,100,c.lastOffset);if(c.error=void 0,r.errorCount=0,u.shouldUpdateHandle||c.logHandle!==((s=e.value)==null?void 0:s.logHandle))return;const p=n.progressPrefix??MS,h=new TextDecoder().decode(u.data).replace(new RegExp(`${PS(p)}`,"g"),"");if(c=Object.assign(c,{lines:c.lines+h,lastOffset:u.newOffset,finished:!u.live}),u.newOffset>=u.size)break}}const a=SE(()=>o().catch(s=>{e.value&&(r.errorCount++,r.errorCount>(n.maxRetries??3)?e.value.error=s:console.warn("skip error:",s,"retry..."))}),1500,{immediate:!1});return EE(()=>{var s;return(s=e==null?void 0:e.value)==null?void 0:s.finished},()=>a.pause()),t.watch(()=>n.logHandle,s=>{var c;s===void 0?(e.value=void 0,a.pause()):s!==((c=e.value)==null?void 0:c.logHandle)&&(e.value={logHandle:s,lastOffset:0,lines:"",finished:!1,error:void 0},r.errorCount=0,a.resume())},{immediate:!0}),e}const FS={key:0},zS={class:"pl-log-view__copy"},US={key:1,class:"pl-log-view__error"},jS={name:"PlLogView"},Ih=t.defineComponent({...jS,props:{value:{},valueToCopy:{},logHandle:{},progressPrefix:{},error:{},output:{},maxRetries:{},mockPlatforma:{},label:{},disableAutoScroll:{type:Boolean}},setup(n){const e=N=>{if(N&&N.ok===!1)return N.errors.join(`
|
|
37
|
-
`)},r=t.useSlots(),o=n,a=LS(o),s=t.ref(!0),c=t.ref(),d=t.ref(),u=t.computed(()=>{var N;return((N=a.value)==null?void 0:N.error)??o.error??e(o.output)}),p=t.computed(()=>{var N;return((N=a.value)==null?void 0:N.lines)??o.value??ob(o.output)}),h=t.ref(!1);Kn(d);const g=t.computed(()=>h.value?"clipboard-copied":"clipboard"),y=()=>{h.value=!0,setTimeout(()=>{h.value=!1},1200);let N;o.valueToCopy?N=o.valueToCopy:p.value&&typeof p.value=="string"&&(N=p.value),N!==void 0&&navigator.clipboard.writeText(N)},w=()=>{o.disableAutoScroll||Vr(c.value,N=>{s.value&&N.scrollTo(N.scrollLeft,N.scrollHeight)})};t.watch(p,()=>{requestAnimationFrame(()=>{w()})},{immediate:!0});const E=N=>{const V=N.target;s.value=V.scrollTop+20>=V.scrollHeight-V.offsetHeight};return(N,V)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"root",ref:d,class:t.normalizeClass(["pl-log-view",{"has-error":u.value}])},[N.label?(t.openBlock(),t.createElementBlock("label",FS,[t.createElementVNode("span",null,t.toDisplayString(N.label),1),V[0]||(V[0]=t.createTextVNode()),t.unref(r).tooltip?(t.openBlock(),t.createBlock(t.unref(dt),{key:0,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(N.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),V[2]||(V[2]=t.createTextVNode()),t.createVNode(lr,{class:"pl-log-view__contour"}),V[3]||(V[3]=t.createTextVNode()),t.createElementVNode("div",zS,[t.createVNode(t.unref(dt),{"close-delay":800,position:"top"},{tooltip:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(h.value?"copied":"copy"),1)]),default:t.withCtx(()=>[t.createVNode(t.unref(at),{title:"Copy content",name:g.value,onClick:y},null,8,["name"]),V[1]||(V[1]=t.createTextVNode())]),_:1})]),V[4]||(V[4]=t.createTextVNode()),u.value?(t.openBlock(),t.createElementBlock("div",US,t.toDisplayString(u.value),1)):(t.openBlock(),t.createElementBlock("div",{key:2,ref_key:"contentRef",ref:c,class:"pl-log-view__content",onScroll:E},t.toDisplayString(p.value),545))],2))}}),ZS="_component_1ukal_1",WS="_tab_1ukal_14",HS="_disabled_1ukal_27",qS="_active_1ukal_56",GS="_topLine_1ukal_69",Xo={component:ZS,tab:WS,disabled:HS,active:qS,topLine:GS},KS=t.defineComponent({__name:"Tab",props:{option:{}},setup(n){const e=t.ref(),r=t.reactive({isOverflown:!1});return t.onMounted(()=>{const o=t.unref(e);if(!o)return;const a=o.$el.querySelector("span");a&&requestAnimationFrame(()=>{a.offsetWidth<a.scrollWidth&&(r.isOverflown=!0)})}),(o,a)=>(t.openBlock(),t.createBlock(t.unref(dt),{ref_key:"rootRef",ref:e,element:"div",position:"top",hide:!r.isOverflown,"close-delay":300,"data-is-overflown":r.isOverflown?"true":"false"},{tooltip:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.option.label),1)]),default:t.withCtx(()=>[t.renderSlot(o.$slots,"default"),a[0]||(a[0]=t.createTextVNode())]),_:3},8,["hide","data-is-overflown"]))}}),XS={name:"PlTabs"},YS=t.defineComponent({...XS,props:{modelValue:{},options:{},disabled:{type:Boolean},topLine:{type:Boolean},maxTabWidth:{}},emits:["update:modelValue"],setup(n,{emit:e}){const r=e,o=a=>r("update:modelValue",a);return(a,s)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([t.unref(Xo).component,{[t.unref(Xo).disabled]:a.disabled,[t.unref(Xo).topLine]:a.topLine}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.options,(c,d)=>(t.openBlock(),t.createBlock(KS,{key:d,tabindex:a.modelValue===c.value||a.disabled||c.disabled?void 0:0,option:c,class:t.normalizeClass([{[t.unref(Xo).active]:a.modelValue===c.value,[t.unref(Xo).disabled]:c.disabled},t.unref(Xo).tab]),style:t.normalizeStyle({"--pl-tabs-item-max-width":c.maxWidth??a.maxTabWidth}),onKeydown:t.withKeys(u=>o(c.value),["enter"]),onClick:u=>o(c.value)},{default:t.withCtx(()=>[t.renderSlot(a.$slots,c.value,{option:c},()=>[t.createElementVNode("span",null,t.toDisplayString(c.label),1)])]),_:2},1032,["tabindex","option","class","style","onKeydown","onClick"]))),128))],2))}}),JS=t.defineComponent({__name:"PlSectionSeparator",props:{compact:{type:Boolean}},setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["pl-section-separator",{[e.$style.compact]:e.compact}])},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.content)},[t.renderSlot(e.$slots,"default")],2)],2))}}),QS="_compact_rhd5u_16",eN="_content_rhd5u_20",tN={compact:QS,content:eN},nN={$style:tN},Dh=lt(JS,[["__cssModules",nN]]),rN=t.defineComponent({__name:"PlAccordion",props:t.mergeModels({multiple:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=t.useModel(n,"modelValue"),r=n;return t.provide("pl-accordion-model",e),t.provide("pl-accordion-props",t.toRef(r)),(o,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.renderSlot(o.$slots,"header"),a[0]||(a[0]=t.createTextVNode()),t.renderSlot(o.$slots,"default")],64))}}),oN=t.defineComponent({__name:"ExpandTransition",setup(n){const e=o=>{o.classList.add("expand-collapse-fix"),o.style.setProperty("--component-height",o.scrollHeight+"px")},r=o=>{o.style.removeProperty("--component-height"),o.classList.remove("expand-collapse-fix")};return(o,a)=>(t.openBlock(),t.createBlock(t.Transition,{name:"expand-collapse",onEnter:e,onLeave:e,onAfterEnter:r,onAfterLeave:r},{default:t.withCtx(()=>[t.renderSlot(o.$slots,"default")]),_:3}))}}),aN={class:"pl-accordion-section"},iN=t.defineComponent({__name:"PlAccordionSection",props:t.mergeModels({label:{},compact:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=t.inject("pl-accordion-model"),r=t.inject("pl-accordion-props"),o=t.useModel(n,"modelValue"),a=$p(),s=t.computed(()=>!r||r.value.multiple),c=t.computed({get(){return s.value?o.value:e?e.value===a:o.value},set(d){s.value?o.value=d:e&&(e.value=e.value===a?"":a)}});return(d,u)=>(t.openBlock(),t.createElementBlock("div",aN,[t.createVNode(t.unref(Dh),{class:t.normalizeClass(d.$style.separator),compact:d.compact,onClick:u[0]||(u[0]=p=>c.value=!c.value)},{default:t.withCtx(()=>[t.createVNode(t.unref(Yt),{name:"chevron-right",class:t.normalizeClass([{[d.$style.down]:c.value},d.$style.chevron])},null,8,["class"]),t.createTextVNode(" "+t.toDisplayString(d.label),1)]),_:1},8,["class","compact"]),u[1]||(u[1]=t.createTextVNode()),t.createVNode(oN,null,{default:t.withCtx(()=>[c.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(d.$style.content)},[t.renderSlot(d.$slots,"default")],2)):t.createCommentVNode("",!0)]),_:3})]))}}),sN="_content_e3dof_2",lN="_separator_e3dof_19",cN="_chevron_e3dof_27",dN="_down_e3dof_31",uN={content:sN,separator:lN,chevron:cN,down:dN},fN={$style:uN},pN=lt(iN,[["__cssModules",fN]]),Mh=t.defineComponent({__name:"PlStatusTag",props:{type:{}},setup(n){const e=t.reactive({typeToText:{OK:"OK",WARN:"WARN",ALERT:"ALERT",HOLD:"HOLD"}});return(r,o)=>r.type?(t.openBlock(),t.createElementBlock("div",t.mergeProps({key:0},r.$attrs,{class:[{[r.type.toLocaleLowerCase()]:!0},"pl-status-tag text-caps11 d-flex align-center"]}),[t.renderSlot(r.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(e.typeToText[r.type]),1)])],16)):t.createCommentVNode("",!0)}}),hN={key:0,class:"progress-cell__infinity-loader"},mN={class:"progress-cell__body"},gN={class:"progress-cell__stage text-s"},yN={class:"progress-cell__percentage text-s d-flex align-center justify-end"},Ph=t.defineComponent({__name:"PlProgressCell",props:{stage:{default:"not_started"},step:{default:""},progressString:{default:""},progress:{default:void 0},error:{default:""}},setup(n){const e=n,r=t.computed(()=>e.stage!=="not_started"),o=t.computed(()=>e.stage==="done"?100:Math.min(100,e.progress||0)),a=t.computed(()=>e.progress===void 0&&e.stage!=="done"&&e.stage!=="not_started"&&!e.error);return(s,c)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass({"progress-cell":!0,"progress-cell__white-bg":r.value,error:s.error,"not-started":e.stage==="not_started"})},[a.value?(t.openBlock(),t.createElementBlock("div",hN,c[0]||(c[0]=[t.createElementVNode("div",{class:"progress-cell__infinity-gradient"},null,-1)]))):t.createCommentVNode("",!0),c[3]||(c[3]=t.createTextVNode()),!a.value&&!s.error?(t.openBlock(),t.createElementBlock("div",{key:1,class:"progress-cell__indicator",style:t.normalizeStyle({width:o.value+"%"})},null,4)):t.createCommentVNode("",!0),c[4]||(c[4]=t.createTextVNode()),t.createElementVNode("div",mN,[t.createElementVNode("div",gN,t.toDisplayString(s.error?s.error:s.step),1),c[2]||(c[2]=t.createTextVNode()),t.createElementVNode("div",yN,[s.error?(t.openBlock(),t.createBlock(at,{key:0,name:"error"})):t.createCommentVNode("",!0),c[1]||(c[1]=t.createTextVNode()),s.error?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(s.progressString),1)],64))])])],2))}});function bd(n,e,r){const o=t.ref(0),a=t.reactive({loading:t.computed(()=>o.value>0),loadingRef:o,value:void 0,error:void 0}),s=kb(e);return t.watch(n,async c=>{a.error=void 0,o.value++,s(c).then(d=>{d.ok&&(a.value=d.value)}).catch(d=>{a.value=void 0,a.error=d}).finally(()=>{o.value--})},Object.assign({immediate:!0,deep:!0},r??{})),a}const _N=["tabindex"],wN={class:"pl-autocomplete__container"},bN={class:"pl-autocomplete__field"},kN=["disabled","placeholder"],xN={key:0,class:"input-value"},vN={class:"pl-autocomplete__controls"},CN={key:2,class:"arrow-icon arrow-icon-default"},EN={key:0},SN={key:0,class:"required-icon"},NN={key:0,class:"nothing-found"},BN={key:0,class:"pl-autocomplete__error"},VN={key:1,class:"pl-autocomplete__helper"},TN={key:2,class:"pl-autocomplete__helper"},AN={name:"PlAutocomplete"},$N=t.defineComponent({...AN,props:t.mergeModels({optionsSearch:{},modelSearch:{type:Function,default:void 0},label:{default:""},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"},formatValue:{type:Function,default:n=>String(n)}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=t.useModel(n,"modelValue"),r=n,o=t.useSlots(),a=t.ref(),s=t.ref(),c=t.useTemplateRef("overlay"),d=t.ref(null),u=t.reactive({activeIndex:-1,open:!1}),p=()=>Zo(w.value.findIndex(j=>pt(j.value,e.value)),j=>j<0?0:j),h=()=>u.activeIndex=p(),g=t.ref([]),y=t.ref(),w=t.computed(()=>sr(g.value).map((j,G)=>({...j,index:G,isSelected:G===D.value,isActive:G===u.activeIndex}))),E=t.ref(!0),N=t.ref(!1),V=t.computed(()=>r.disabled),D=t.computed(()=>g.value.findIndex(j=>pt(j.value,e.value))),F=t.computed(()=>{if(!E.value){if(r.error)return r.error;if(N.value)return"Data loading error"}}),$=t.computed(()=>{const j=t.unref(y),G=t.unref(w),ee=j??G.find(ue=>pt(ue.value,e.value))??G.find(ue=>pt(ue.value,e.value));return(ee==null?void 0:ee.label)||(e.value?r.formatValue(e.value):"")}),W=t.computed(()=>!u.open&&e.value?"":e.value?String($.value):r.placeholder),R=t.computed(()=>e.value!==void 0&&e.value!==null),B=t.computed(()=>V.value?void 0:"0"),z=j=>{var G;e.value=j==null?void 0:j.value,y.value=j,d.value=null,u.open=!1,(G=a==null?void 0:a.value)==null||G.focus()},q=()=>{e.value=void 0,y.value=void 0},C=()=>{var j;return(j=s.value)==null?void 0:j.focus()},A=()=>{u.open=!u.open};t.watch(()=>u.open,j=>{d.value=j?"":null});const v=()=>{u.open=!0},O=j=>{var G,ee,ue;const ye=j.relatedTarget;!((G=a.value)!=null&&G.contains(ye))&&!((ue=(ee=c.value)==null?void 0:ee.listRef)!=null&&ue.contains(ye))&&(d.value=null,u.open=!1)},S=j=>{var G;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(j.code))j.preventDefault();else return;const{open:ee,activeIndex:ue}=u;if(!ee){j.code==="Enter"&&(u.open=!0,d.value="");return}j.code==="Escape"&&(u.open=!1,d.value=null,(G=a.value)==null||G.focus());const ye=t.unref(w),{length:Ce}=ye;if(!Ce)return;j.code==="Enter"&&z(ye.find(Wt=>Wt.index===ue));const He=ye.findIndex(Wt=>Wt.index===ue)??-1,Ct=j.code==="ArrowDown"?1:j.code==="ArrowUp"?-1:0,Ke=Math.abs(He+Ct+Ce)%Ce;u.activeIndex=w.value[Ke].index??-1};Kn(a),t.watch(()=>e.value,h,{immediate:!0}),t.watch(()=>u.open,j=>{var G;return j?(G=s.value)==null?void 0:G.focus():""}),t.watchPostEffect(()=>{var j;d.value,u.activeIndex>=0&&u.open&&((j=c.value)==null||j.scrollIntoActive())});const k=vE(d,300,{maxWait:1e3}),M=bd(()=>k.value,async j=>j!==null?r.optionsSearch(j):[]),U=bd(()=>e.value,async j=>{var G,ee;return j&&!pt((G=y.value)==null?void 0:G.value,j)?r.modelSearch?r.modelSearch(j):(ee=await r.optionsSearch(String(j)))==null?void 0:ee[0]:y.value});return t.watch(()=>M.value,j=>{j&&(g.value=j,d.value!==null&&(N.value=!1))}),t.watch(()=>U.value,j=>{j&&(y.value=sr([j])[0])}),t.watch(()=>M.error,j=>{j&&(N.value=!!j)}),t.watch(()=>M.loading||U.loading,j=>{E.value=j}),(j,G)=>(t.openBlock(),t.createElementBlock("div",{class:"pl-autocomplete__envelope",onClick:t.withModifiers(C,["stop"])},[t.createElementVNode("div",{ref_key:"rootRef",ref:a,tabindex:B.value,class:t.normalizeClass(["pl-autocomplete",{open:u.open,error:!!F.value,disabled:V.value}]),onKeydown:S,onFocusout:O},[t.createElementVNode("div",wN,[t.createElementVNode("div",bN,[t.withDirectives(t.createElementVNode("input",{ref_key:"input",ref:s,"onUpdate:modelValue":G[0]||(G[0]=ee=>d.value=ee),type:"text",tabindex:"-1",disabled:V.value,placeholder:W.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:v},null,40,kN),[[t.vModelText,d.value]]),G[4]||(G[4]=t.createTextVNode()),u.open?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",xN,[t.createVNode(Ts,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString($.value),1)]),_:1})])),G[5]||(G[5]=t.createTextVNode()),t.createElementVNode("div",vN,[E.value?(t.openBlock(),t.createBlock(t.unref(at),{key:0,name:"loading"})):t.createCommentVNode("",!0),G[1]||(G[1]=t.createTextVNode()),j.clearable&&R.value?(t.openBlock(),t.createBlock(t.unref($r),{key:1,name:"delete-clear",onClick:t.withModifiers(q,["stop"])})):t.createCommentVNode("",!0),G[2]||(G[2]=t.createTextVNode()),t.renderSlot(j.$slots,"append"),G[3]||(G[3]=t.createTextVNode()),t.createElementVNode("div",{class:"pl-autocomplete__arrow-wrapper",onClick:t.withModifiers(A,["stop"])},[j.arrowIconLarge?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["arrow-icon",[`icon-24 ${j.arrowIconLarge}`]])},null,2)):j.arrowIcon?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["arrow-icon",[`icon-16 ${j.arrowIcon}`]])},null,2)):(t.openBlock(),t.createElementBlock("div",CN))])])]),G[9]||(G[9]=t.createTextVNode()),j.label?(t.openBlock(),t.createElementBlock("label",EN,[j.required?(t.openBlock(),t.createElementBlock("i",SN)):t.createCommentVNode("",!0),G[6]||(G[6]=t.createTextVNode()),t.createElementVNode("span",null,t.toDisplayString(j.label),1),G[7]||(G[7]=t.createTextVNode()),t.unref(o).tooltip?(t.openBlock(),t.createBlock(t.unref(dt),{key:1,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(j.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),G[10]||(G[10]=t.createTextVNode()),u.open?(t.openBlock(),t.createBlock(t.unref($s),{key:1,ref:"overlay",root:a.value,class:"pl-autocomplete__options",tabindex:"-1",gap:3},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(w.value,(ee,ue)=>(t.openBlock(),t.createBlock(so,{key:ue,option:ee,"is-selected":ee.isSelected,"is-hovered":ee.isActive,size:j.optionSize,onClick:t.withModifiers(ye=>z(ee),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),G[8]||(G[8]=t.createTextVNode()),w.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",NN,"Nothing found"))]),_:1},8,["root"])):t.createCommentVNode("",!0),G[11]||(G[11]=t.createTextVNode()),t.createVNode(lr,{class:"pl-autocomplete__contour"})])],42,_N),G[12]||(G[12]=t.createTextVNode()),F.value?(t.openBlock(),t.createElementBlock("div",BN,t.toDisplayString(F.value),1)):E.value&&j.loadingOptionsHelper?(t.openBlock(),t.createElementBlock("div",VN,t.toDisplayString(j.loadingOptionsHelper),1)):j.helper?(t.openBlock(),t.createElementBlock("div",TN,t.toDisplayString(j.helper),1)):t.createCommentVNode("",!0)]))}}),RN="_component_1uz6e_1",ON="_local_1uz6e_1",IN="_supported_1uz6e_26",DN="_remote_1uz6e_32",MN="_search_1uz6e_40",PN="_selected_1uz6e_72",LN="_breadcrumbs_1uz6e_86",FN="_cat_1uz6e_116",zN="_message_1uz6e_122",UN="_isFile_1uz6e_196",jN="_isDir_1uz6e_200",ZN="_canBeSelected_1uz6e_206",WN="_spin_1uz6e_1",ht={component:RN,local:ON,supported:IN,remote:DN,search:MN,"ls-container":"_ls-container_1uz6e_50","ls-head":"_ls-head_1uz6e_57",selected:PN,breadcrumbs:LN,"ls-error":"_ls-error_1uz6e_108",cat:FN,message:zN,"ls-empty":"_ls-empty_1uz6e_131","ls-body":"_ls-body_1uz6e_152",isFile:UN,isDir:jN,canBeSelected:ZN,"ls-loader":"_ls-loader_1uz6e_212","loader-icon":"_loader-icon_1uz6e_220",spin:WN},HN=t.defineComponent({__name:"Shortcuts",setup(n){return(e,r)=>(t.openBlock(),t.createBlock(t.unref(dt),{class:"info",position:"southwest","max-width":"420px"},{tooltip:t.withCtx(()=>[t.createElementVNode("span",{class:t.normalizeClass(e.$style.title)},"Shortcuts",2),r[2]||(r[2]=t.createTextVNode()),t.createElementVNode("div",{class:t.normalizeClass([e.$style.row,e.$style.head])},r[0]||(r[0]=[t.createElementVNode("div",null,null,-1),t.createTextVNode(),t.createElementVNode("div",null,"MacOS",-1),t.createTextVNode(),t.createElementVNode("div",null,"Windows/Linux",-1)]),2),r[3]||(r[3]=t.createTextVNode()),t.createElementVNode("div",{class:t.normalizeClass([e.$style.row,e.$style.body])},r[1]||(r[1]=[t.createElementVNode("div",null,"Single File",-1),t.createTextVNode(),t.createElementVNode("div",null,"Click the file",-1),t.createTextVNode(),t.createElementVNode("div",null,"Click the file",-1),t.createTextVNode(),t.createElementVNode("div",null,"Adjacent multiple files",-1),t.createTextVNode(),t.createElementVNode("div",null,"Hold Shift, click first and last files",-1),t.createTextVNode(),t.createElementVNode("div",null,"Hold Shift, click first and last files",-1),t.createTextVNode(),t.createElementVNode("div",null,"Non-adjacent multiple files",-1),t.createTextVNode(),t.createElementVNode("div",null,"Hold Command (⌘), click each file",-1),t.createTextVNode(),t.createElementVNode("div",null,"Hold Ctrl, click each file",-1),t.createTextVNode(),t.createElementVNode("div",null,"All files",-1),t.createTextVNode(),t.createElementVNode("div",null,"Press Command (⌘) + A",-1),t.createTextVNode(),t.createElementVNode("div",null,"Press Ctrl + A",-1)]),2)]),_:1}))}}),qN="_title_14dct_2",GN="_row_14dct_10",KN="_head_14dct_30",XN="_body_14dct_58",YN={title:qN,row:GN,head:KN,body:XN},JN={$style:YN},QN=lt(HN,[["__cssModules",JN]]),Lh=()=>({dirPath:"",search:"",storageEntry:void 0,items:[],error:"",storageOptions:[],selected:[],lastSelected:void 0,currentLoadingPath:void 0,showHiddenItems:!1});function eB(n){return t.computed(()=>{let e=n.items;if(n.showHiddenItems||(e=e.filter(r=>!r.name.startsWith("."))),n.search){const r=n.search.toLocaleLowerCase();e=e.filter(o=>o.name.toLocaleLowerCase().includes(r))}return e})}const Fh={mounted:n=>{if(n.clientWidth<n.scrollWidth){const e=n.innerText;n.innerText=e.substring(0,57)+"..."+e.substring(e.length-10)}}};function zh(n){return n?n.map(e=>"."+lb(e,["."])):void 0}function tB(n){const e="/",r=n.startsWith(e),o=sb(n,[e]).split(e),a=[{index:0,name:"Root",path:""}];if(o.length===1&&o[0]==="")return a;for(let s=0;s<o.length;s++){const c=(r?e:"")+o.slice(0,s+1).join(e);a.push({index:s+1,name:o[s],path:c})}return a}const nB=["title","onClick"],rB={key:0,class:"ls-loader"},oB=["onClick"],aB=["title"],iB=["onClick"],sB=["title"],lB=t.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(n,{expose:e}){const r=R=>R.ctrlKey||R.metaKey,o=n,a=t.reactive(Lh()),s=()=>{a.search="",a.error="",a.lastSelected=void 0},c=t.computed(()=>zh(o.extensions)),d=eB(a),u=t.computed(()=>{var R;return{modelValue:o.modelValue,dirPath:a.dirPath,storageHandle:(R=a.storageEntry)==null?void 0:R.handle}}),p=(R,B)=>{Fr()&&a.currentLoadingPath!==B&&(a.currentLoadingPath=B,Fr().lsDriver.listFiles(R,B).then(z=>{B===a.dirPath&&(a.items=zo(z).entries.map(q=>({path:q.fullPath,name:q.name,isDir:q.type==="dir",canBeSelected:q.type==="file"&&(!c.value||c.value.some(C=>q.fullPath.endsWith(C))),handle:q.type==="file"?q.handle:void 0,selected:!1})).sort((q,C)=>q.isDir&&!C.isDir?-1:!q.isDir&&C.isDir?1:q.name.localeCompare(C.name)).map((q,C)=>({id:C,...q})),a.lastSelected=void 0)}).catch(z=>a.error=String(z)).finally(()=>{a.currentLoadingPath=void 0}))},h=()=>{s();const{storageHandle:R,dirPath:B,modelValue:z}=u.value;R&&z&&p(R,B)},g=t.computed(()=>tB(a.dirPath)),y=t.computed(()=>a.items.filter(R=>R.canBeSelected&&R.selected&&!R.isDir)),w=t.computed(()=>{var R;return y.value.length>0&&((R=a.storageEntry)==null?void 0:R.handle)}),E=()=>{var R;return{storageHandle:zo((R=a.storageEntry)==null?void 0:R.handle),files:y.value.map(B=>B.handle)}},N=R=>{a.dirPath=R},V=(R,B)=>{const{shiftKey:z}=R,q=r(R),{lastSelected:C}=a;R.preventDefault();const A=d.value;if(B.canBeSelected){if(o.multi||A.forEach(v=>v.selected=!1),B.selected=!B.selected,!o.multi)return;!q&&!z&&A.forEach(v=>{v.id!==B.id&&(v.selected=!1)}),z&&C!==void 0&&A.forEach(v=>{tb(v.id,C,B.id)&&(v.selected=!0)}),B.selected&&(a.lastSelected=B.id)}},D=R=>{R&&!o.multi||d.value.filter(B=>B.canBeSelected).forEach(B=>{B.selected=R})},F=()=>D(!0),$=()=>D(!1),W=()=>{if(s(),$(),!Fr()){console.warn("platforma API is not found");return}Fr().lsDriver.getStorageList().then(R=>{R=R.filter(B=>B.name!=="local"&&!B.name.startsWith("local_disk_")),a.storageOptions=R.map(B=>({text:B.name,value:B})),o.autoSelectStorage&&Vr(R[0],B=>{a.storageEntry=B})}).catch(R=>a.error=String(R))};return t.watch(t.toRef(a,"storageEntry"),R=>{s(),a.dirPath=(R==null?void 0:R.initialFullPath)??""},{immediate:!0}),t.watch([()=>a.dirPath,()=>a.storageEntry],()=>{h()}),t.watch(()=>o.modelValue,R=>{R?W():Object.assign(a,Lh())},{immediate:!0}),ot(document,"keydown",R=>{if(!o.modelValue||R.target!==document.body)return;const B=r(R);B&&R.code==="KeyA"&&(R.preventDefault(),F()),B&&R.shiftKey&&R.code==="Period"&&(R.preventDefault(),a.showHiddenItems=!a.showHiddenItems),R.code==="Enter"&&o.submit()}),e({isReady:w,getFilesToImport:E}),t.onMounted(W),(R,B)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(ht).remote),onClick:t.withModifiers($,["stop"])},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(ht).search)},[t.createElementVNode("div",null,[t.createVNode(t.unref(Rr),{modelValue:a.storageEntry,"onUpdate:modelValue":B[0]||(B[0]=z=>a.storageEntry=z),label:"Select storage",options:a.storageOptions},null,8,["modelValue","options"])]),B[2]||(B[2]=t.createTextVNode()),t.createElementVNode("div",null,[t.createVNode(t.unref(lh),{modelValue:a.search,"onUpdate:modelValue":B[1]||(B[1]=z=>a.search=z),label:"Search in folder",clearable:""},null,8,["modelValue"])])],2),B[12]||(B[12]=t.createTextVNode()),t.createElementVNode("div",{class:t.normalizeClass(t.unref(ht)["ls-container"])},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(ht)["ls-head"])},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(ht).breadcrumbs)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.value,(z,q)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:q},[t.createElementVNode("div",{title:z.path,onClick:C=>N(z.path)},t.toDisplayString(z.name),9,nB),B[3]||(B[3]=t.createTextVNode()),z.index!==g.value.length-1?(t.openBlock(),t.createBlock(t.unref($r),{key:0,name:"chevron-right"})):t.createCommentVNode("",!0)],64))),128))],2),B[5]||(B[5]=t.createTextVNode()),t.createElementVNode("div",{class:t.normalizeClass(t.unref(ht).selected)},[t.createElementVNode("span",null,"Selected: "+t.toDisplayString(y.value.length),1),B[4]||(B[4]=t.createTextVNode()),t.createVNode(QN)],2)],2),B[11]||(B[11]=t.createTextVNode()),a.currentLoadingPath!==void 0?(t.openBlock(),t.createElementBlock("div",rB,B[6]||(B[6]=[t.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"},null,-1)]))):a.storageEntry?a.error?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(t.unref(ht)["ls-error"])},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(ht).cat)},null,2),B[8]||(B[8]=t.createTextVNode()),t.createElementVNode("div",{class:t.normalizeClass(t.unref(ht).message)},t.toDisplayString(a.error),3)],2)):(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(t.unref(ht)["ls-body"])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(d),z=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:z.id},[z.isDir?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(ht).isDir),onClick:q=>N(z.path)},[t.createVNode(t.unref($r),{name:"chevron-right"}),B[9]||(B[9]=t.createTextVNode()),t.withDirectives((t.openBlock(),t.createElementBlock("span",{title:z.name},[t.createTextVNode(t.toDisplayString(z.name),1)],8,aB)),[[t.unref(Fh)]])],10,oB)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass({[t.unref(ht).canBeSelected]:z.canBeSelected,[t.unref(ht).selected]:z.selected}),onClick:t.withModifiers(q=>V(q,z),["stop"])},[t.createVNode(t.unref(Yt),{name:"box",class:t.normalizeClass(t.unref(ht).isFile)},null,8,["class"]),B[10]||(B[10]=t.createTextVNode()),t.withDirectives((t.openBlock(),t.createElementBlock("span",{title:z.name},[t.createTextVNode(t.toDisplayString(z.name),1)],8,sB)),[[t.unref(Fh)]])],10,iB))],64))),128))],2)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(t.unref(ht)["ls-empty"])},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(ht).cat)},null,2),B[7]||(B[7]=t.createTextVNode()),t.createElementVNode("div",{class:t.normalizeClass(t.unref(ht).message)},"Select storage to preview",2)],2))],2)],2))}}),cB={key:1,class:"alert-error"},dB=t.defineComponent({__name:"Local",props:{importFiles:{type:Function},multi:{type:Boolean},extensions:{}},setup(n){const e=n,r=t.reactive({error:void 0}),o=t.computed(()=>e.multi?"Drag & Drop files here or click to add":"Drag & Drop file here or click to add"),a=async c=>{var d,u,p;const h=(u=(d=Fr())==null?void 0:d.lsDriver)==null?void 0:u.fileToImportHandle;if(!h)return console.error("API getPlatformaRawInstance().lsDriver.fileToImportHandle is not available");const g=zh(e.extensions),y=await Promise.all([...((p=c.dataTransfer)==null?void 0:p.files)??[]].filter(w=>!!w).filter(w=>g?g.some(E=>w.name.endsWith(E)):!0).map(w=>h(w)));y.length&&e.importFiles({files:y})},s=async()=>{var c,d;const u=e.extensions?[{name:"All Files",extensions:e.extensions}]:[];e.multi?(c=Fr())==null||c.lsDriver.showOpenMultipleFilesDialog({title:"Select files to import",filters:u}).then(({files:p})=>{p&&e.importFiles({files:p})}).catch(p=>r.error=p):(d=Fr())==null||d.lsDriver.showOpenSingleFileDialog({title:"Select file to import",filters:u}).then(({file:p})=>{p&&e.importFiles({files:[p]})}).catch(p=>r.error=p)};return(c,d)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(ht).local),onDrop:a,onDragover:d[0]||(d[0]=t.withModifiers(()=>{},["prevent"])),onClick:s},[t.createVNode(t.unref(Ja),{name:"cloud-upload"}),d[1]||(d[1]=t.createTextVNode()),t.createElementVNode("span",null,t.toDisplayString(o.value),1),d[2]||(d[2]=t.createTextVNode()),c.extensions?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(t.unref(ht).supported)},"Supported formats: "+t.toDisplayString(c.extensions.join(", ")),3)):t.createCommentVNode("",!0),d[3]||(d[3]=t.createTextVNode()),r.error?(t.openBlock(),t.createElementBlock("span",cB,t.toDisplayString(r.error),1)):t.createCommentVNode("",!0)],34))}}),uB={style:{margin:"0 24px"}},Uh=t.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(n,{emit:e}){const r=e,o=n,a=t.ref("local"),s=t.computed(()=>o.multi?"Select Files to Import":"Select File to Import"),c=[{label:"My Computer",value:"local"},{label:"Remote",value:"remote"}],d=()=>r("update:modelValue",!1),u=t.useTemplateRef("remote"),p=()=>{var g,y;(g=u.value)!=null&&g.isReady&&(r("import:files",zo((y=u.value)==null?void 0:y.getFilesToImport())),d())},h=g=>{r("import:files",g),d()};return(g,y)=>(t.openBlock(),t.createBlock(t.unref(pd),{"no-content-gutters":!0,"close-on-outside-click":g.closeOnOutsideClick,class:t.normalizeClass(["pl-dialog-modal",t.unref(ht).component]),"model-value":g.modelValue,width:"688px",height:"720px","onUpdate:modelValue":d},t.createSlots({title:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(g.title??s.value),1)]),default:t.withCtx(()=>[y[4]||(y[4]=t.createTextVNode()),t.createElementVNode("div",uB,[t.createVNode(t.unref(nh),{modelValue:a.value,"onUpdate:modelValue":y[0]||(y[0]=w=>a.value=w),options:c},null,8,["modelValue"])]),y[5]||(y[5]=t.createTextVNode()),a.value==="remote"?(t.openBlock(),t.createBlock(lB,t.mergeProps({key:0,ref:"remote"},g.$props,{submit:p}),null,16)):t.createCommentVNode("",!0),y[6]||(y[6]=t.createTextVNode()),a.value==="local"?(t.openBlock(),t.createBlock(dB,t.mergeProps({key:1,"import-files":h},g.$props),null,16)):t.createCommentVNode("",!0),y[7]||(y[7]=t.createTextVNode())]),_:2},[a.value==="remote"?{name:"actions",fn:t.withCtx(()=>{var w;return[t.createVNode(t.unref(Ns),{style:{"min-width":"160px"},disabled:!((w=t.unref(u))!=null&&w.isReady),onClick:t.withModifiers(p,["stop"])},{default:t.withCtx(()=>y[1]||(y[1]=[t.createTextVNode("Import")])),_:1},8,["disabled"]),y[3]||(y[3]=t.createTextVNode()),t.createVNode(t.unref(Ar),{"justify-center":!1,onClick:t.withModifiers(d,["stop"])},{default:t.withCtx(()=>y[2]||(y[2]=[t.createTextVNode("Cancel")])),_:1})]}),key:"0"}:void 0]),1032,["close-on-outside-click","class","model-value"]))}}),fB={key:0,ref:"label"},pB={key:0,class:"required-icon"},hB=["data-placeholder"],mB={key:5,class:"pl-file-input__stats"},gB={key:0,class:"pl-file-input__error"},yB={key:1,class:"pl-file-input__helper"},jh=t.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(n,{emit:e}){const r=t.reactive({fileDialogOpen:!1,error:""}),o=t.useSlots(),a=e,s=n,c=($,W)=>{if($)try{return W($)}catch(R){return r.error=R instanceof Error?R.message:String(R),$}},d=t.computed(()=>c(s.modelValue,BS)),u=t.computed(()=>c(s.modelValue,$h)),p=t.computed(()=>s.progress&&!s.progress.done),h=t.computed(()=>s.progress&&s.progress.done),g=t.computed(()=>r.error??s.error),y=t.computed(()=>!!g.value),w=t.computed(()=>{const{status:$,done:W}=s.progress??{};return!$||!$.bytesTotal?"":$.bytesProcessed&&!W?Xc($.bytesProcessed,{})+" / "+Xc($.bytesTotal,{}):Xc($.bytesTotal,{})}),E=t.computed(()=>{var $;const{progress:W}=s;return W?{width:W.done?"100%":Math.round(((($=W.status)==null?void 0:$.progress)??0)*100)+"%"}:{}}),N=()=>{r.fileDialogOpen=!0},V=$=>{$.files.length&&a("update:modelValue",$.files[0])},D=()=>a("update:modelValue",void 0);t.watch(()=>s.modelValue,()=>{r.error=""},{immediate:!0});const F=t.ref();return s.cellStyle||Kn(F),($,W)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",{class:t.normalizeClass([{"pl-file-input__cell-style":!!$.cellStyle,"has-file":!!d.value},"pl-file-input__envelope"])},[t.createElementVNode("div",{ref_key:"rootRef",ref:F,class:t.normalizeClass(["pl-file-input",{dashed:$.dashed,error:y.value}]),tabindex:"0",onKeyup:t.withKeys(N,["enter"]),onClick:t.withModifiers(N,["stop"])},[t.createElementVNode("div",{class:"pl-file-input__progress",style:t.normalizeStyle(E.value)},null,4),W[3]||(W[3]=t.createTextVNode()),!$.cellStyle&&$.label?(t.openBlock(),t.createElementBlock("label",fB,[$.required?(t.openBlock(),t.createElementBlock("i",pB)):t.createCommentVNode("",!0),W[1]||(W[1]=t.createTextVNode()),t.createElementVNode("span",null,t.toDisplayString($.label),1),W[2]||(W[2]=t.createTextVNode()),t.unref(o).tooltip||u.value?(t.openBlock(),t.createBlock(t.unref(dt),{key:1,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.unref(o).tooltip?t.renderSlot($.$slots,"tooltip",{key:0}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(u.value),1)],64))]),_:3})):t.createCommentVNode("",!0)],512)):t.createCommentVNode("",!0),W[4]||(W[4]=t.createTextVNode()),y.value?(t.openBlock(),t.createBlock(t.unref(at),{key:1,name:"restart"})):p.value?(t.openBlock(),t.createBlock(t.unref(at),{key:2,name:"cloud-upload"})):h.value?(t.openBlock(),t.createBlock(t.unref(at),{key:3,name:"success"})):(t.openBlock(),t.createBlock(t.unref(at),{key:4,name:"paper-clip"})),W[5]||(W[5]=t.createTextVNode()),t.createElementVNode("div",{"data-placeholder":$.placeholder??"Choose file",class:"pl-file-input__filename"},t.toDisplayString(d.value),9,hB),W[6]||(W[6]=t.createTextVNode()),w.value?(t.openBlock(),t.createElementBlock("div",mB,t.toDisplayString(w.value),1)):t.createCommentVNode("",!0),W[7]||(W[7]=t.createTextVNode()),$.modelValue?(t.openBlock(),t.createBlock(t.unref(at),{key:6,name:"close",onClick:t.withModifiers(D,["stop"])})):t.createCommentVNode("",!0),W[8]||(W[8]=t.createTextVNode()),t.createVNode(lr,{class:"pl-file-input__contour"})],34),W[9]||(W[9]=t.createTextVNode()),y.value?(t.openBlock(),t.createElementBlock("div",gB,t.toDisplayString(g.value),1)):$.helper?(t.openBlock(),t.createElementBlock("div",yB,t.toDisplayString($.helper),1)):t.createCommentVNode("",!0)],2),W[10]||(W[10]=t.createTextVNode()),t.createVNode(t.unref(Uh),{modelValue:r.fileDialogOpen,"onUpdate:modelValue":W[0]||(W[0]=R=>r.fileDialogOpen=R),extensions:$.extensions,title:$.fileDialogTitle,"close-on-outside-click":$.fileDialogCloseOnOutsideClick,"onImport:files":V},null,8,["modelValue","extensions","title","close-on-outside-click"])],64))}}),_B={class:"pl-notification-alert__wrapper d-flex text-s"},wB={class:"pl-notification-alert__content flex-grow-1"},bB={key:0,class:"pl-notification-alert__close"},kB={key:0,class:"pl-notification-alert__actions d-flex"},Zh=t.defineComponent({__name:"PlNotificationAlert",props:t.mergeModels({type:{default:"neutral"},width:{default:"256px"},closable:{type:Boolean}},{modelValue:{type:Boolean,default:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=n,r=t.useModel(n,"modelValue");function o(){e.closable&&(r.value=!1)}return(a,s)=>r.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass([a.type,"pl-notification-alert d-flex flex-column gap-16"]),style:t.normalizeStyle({width:`${a.width}`})},[t.createElementVNode("div",_B,[t.createElementVNode("div",wB,[t.renderSlot(a.$slots,"default")]),s[0]||(s[0]=t.createTextVNode()),a.closable?(t.openBlock(),t.createElementBlock("div",bB,[t.createVNode(t.unref(Ar),{icon:"close",onClick:t.withModifiers(o,["stop"])})])):t.createCommentVNode("",!0)]),s[1]||(s[1]=t.createTextVNode()),a.$slots.actions?(t.openBlock(),t.createElementBlock("div",kB,[t.renderSlot(a.$slots,"actions")])):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0)}}),xB=["data-content"],vB=[".title"],CB=t.defineComponent({__name:"StackedRow",props:{value:{},height:{}},setup(n){const e=n,r=t.computed(()=>({height:e.height??"100%",minHeight:"82px"})),o=t.computed(()=>{const s=e.value||[],c=s.reduce((d,u)=>d+u.value,0);return s.map(d=>{const u=d.value/c*100,p=d.label;return{color:d.color.toString(),description:d.description,fraction:u,label:p}})}),a=[-40,-50,-50,-50,-80];return(s,c)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([s.$style.component]),style:t.normalizeStyle(r.value)},[t.createElementVNode("div",{class:t.normalizeClass(s.$style.track)},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList([0,25,50,75,100],(d,u)=>t.createElementVNode("div",{key:u,style:t.normalizeStyle({left:`${d}%`,"--transform":`translateX(${a[u]}%)`}),"data-content":`${d}%`},null,12,xB)),64))],2),c[1]||(c[1]=t.createTextVNode()),t.createElementVNode("div",{class:t.normalizeClass(s.$style.container)},[o.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(s.$style.notReady)},"Not ready",2)),c[0]||(c[0]=t.createTextVNode()),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.value,(d,u)=>(t.openBlock(),t.createElementBlock("div",{key:u,".title":d.description??d.label,style:t.normalizeStyle({width:`${d.fraction}%`,backgroundColor:d.color})},null,44,vB))),128))],2)],6))}}),EB="_component_5hdjy_1",SB="_container_5hdjy_11",NB="_track_5hdjy_25",BB="_notReady_5hdjy_47",VB={component:EB,container:SB,track:NB,notReady:BB},TB={$style:VB},AB=lt(CB,[["__cssModules",TB]]),$B=t.defineComponent({__name:"Legends",props:{maxInColumn:{},legends:{}},setup(n){function e(a,s){const c=[];let d=[];for(let u=0;u<a.length;u++)d.length<s?d.push(a[u]):(c.push(d),d=[a[u]]);return c.push(d),c}const r=n,o=t.computed(()=>e(r.legends,r.maxInColumn??5));return(a,s)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(a.$style.component)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.value,(c,d)=>(t.openBlock(),t.createElementBlock("div",{key:d,class:t.normalizeClass(a.$style.legend)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c,(u,p)=>(t.openBlock(),t.createElementBlock("div",{key:p,class:t.normalizeClass(a.$style.item)},[t.createElementVNode("div",{class:t.normalizeClass(a.$style.chip),style:t.normalizeStyle({backgroundColor:u.color.toString()})},null,6),t.createTextVNode(" "+t.toDisplayString(u.text),1)],2))),128))],2))),128))],2))}}),RB="_component_blzj7_2",OB="_legend_blzj7_9",IB="_chip_blzj7_19",DB="_group_blzj7_26",MB="_item_blzj7_32",PB={component:RB,legend:OB,chip:IB,group:DB,item:MB},LB={$style:PB},FB=lt($B,[["__cssModules",LB]]),zB=t.defineComponent({__name:"PlChartStackedBar",props:{settings:{}},setup(n){const e=n,r=t.computed(()=>e.settings.showLegends??!0),o=t.computed(()=>e.settings.data??[]),a=t.computed(()=>o.value.map(s=>({color:s.color,text:s.label})));return(s,c)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(s.$style.component)},[s.settings.title?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(s.$style.title)},t.toDisplayString(s.settings.title),3)):t.createCommentVNode("",!0),c[0]||(c[0]=t.createTextVNode()),t.createVNode(AB,{value:o.value},null,8,["value"]),c[1]||(c[1]=t.createTextVNode()),r.value&&a.value.length?(t.openBlock(),t.createBlock(FB,{key:1,legends:a.value,"max-in-column":s.settings.maxLegendsInColumn},null,8,["legends","max-in-column"])):t.createCommentVNode("",!0)],2))}}),UB="_component_1j1iz_1",jB="_title_1j1iz_7",ZB={component:UB,title:jB},WB={$style:ZB},HB=lt(zB,[["__cssModules",WB]]),qB=[".title"],GB=t.defineComponent({__name:"StackedRowCompact",props:{value:{},height:{}},setup(n){const e=n,r=t.computed(()=>({height:e.height??"100%",minHeight:"24px"})),o=t.computed(()=>{const a=e.value||[],s=a.reduce((c,d)=>c+d.value,0);return a.map(c=>{const d=c.value/s*100,u=c.label;return{color:c.color.toString(),description:c.description,fraction:d,label:u}})});return(a,s)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([a.$style.component]),style:t.normalizeStyle(r.value)},[t.createElementVNode("div",{class:t.normalizeClass(a.$style.container)},[o.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(a.$style.notReady)},"Not ready",2)),s[0]||(s[0]=t.createTextVNode()),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.value,(c,d)=>(t.openBlock(),t.createElementBlock("div",{key:d,".title":c.description??c.label,style:t.normalizeStyle({width:`${c.fraction}%`,backgroundColor:c.color})},null,44,qB))),128))],2)],6))}}),KB="_component_1utnb_1",XB="_notReady_1utnb_8",YB="_container_1utnb_16",JB={component:KB,notReady:XB,container:YB},QB={$style:JB},eV=lt(GB,[["__cssModules",QB]]),tV=t.defineComponent({__name:"PlChartStackedBarCompact",props:{settings:{}},setup(n){const e=n,r=t.computed(()=>e.settings.data??[]);return(o,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(o.$style.component)},[t.createVNode(eV,{value:r.value},null,8,["value"])],2))}}),nV="_component_1gn0t_1",rV={component:nV},oV={$style:rV},Wh=lt(tV,[["__cssModules",oV]]);function Zs(n,e){return n==null||e==null?NaN:n<e?-1:n>e?1:n>=e?0:NaN}function aV(n,e){return n==null||e==null?NaN:e<n?-1:e>n?1:e>=n?0:NaN}function Hh(n){let e,r,o;n.length!==2?(e=Zs,r=(d,u)=>Zs(n(d),u),o=(d,u)=>n(d)-u):(e=n===Zs||n===aV?n:iV,r=n,o=n);function a(d,u,p=0,h=d.length){if(p<h){if(e(u,u)!==0)return h;do{const g=p+h>>>1;r(d[g],u)<0?p=g+1:h=g}while(p<h)}return p}function s(d,u,p=0,h=d.length){if(p<h){if(e(u,u)!==0)return h;do{const g=p+h>>>1;r(d[g],u)<=0?p=g+1:h=g}while(p<h)}return p}function c(d,u,p=0,h=d.length){const g=a(d,u,p,h-1);return g>p&&o(d[g-1],u)>-o(d[g],u)?g-1:g}return{left:a,center:c,right:s}}function iV(){return 0}function sV(n){return n===null?NaN:+n}const lV=Hh(Zs),qh=lV.right;Hh(sV).center;function cV(n,e){let r=0;for(let o of n)o!=null&&(o=+o)>=o&&++r;return r}function kd(n,e){let r,o;if(e===void 0)for(const a of n)a!=null&&(r===void 0?a>=a&&(r=o=a):(r>a&&(r=a),o<a&&(o=a)));else{let a=-1;for(let s of n)(s=e(s,++a,n))!=null&&(r===void 0?s>=s&&(r=o=s):(r>s&&(r=s),o<s&&(o=s)))}return[r,o]}function dV(n){return n}var uV=Array.prototype,fV=uV.slice;function xd(n){return()=>n}const pV=Math.sqrt(50),hV=Math.sqrt(10),mV=Math.sqrt(2);function Ws(n,e,r){const o=(e-n)/Math.max(0,r),a=Math.floor(Math.log10(o)),s=o/Math.pow(10,a),c=s>=pV?10:s>=hV?5:s>=mV?2:1;let d,u,p;return a<0?(p=Math.pow(10,-a)/c,d=Math.round(n*p),u=Math.round(e*p),d/p<n&&++d,u/p>e&&--u,p=-p):(p=Math.pow(10,a)*c,d=Math.round(n/p),u=Math.round(e/p),d*p<n&&++d,u*p>e&&--u),u<d&&.5<=r&&r<2?Ws(n,e,r*2):[d,u,p]}function Gh(n,e,r){if(e=+e,n=+n,r=+r,!(r>0))return[];if(n===e)return[n];const o=e<n,[a,s,c]=o?Ws(e,n,r):Ws(n,e,r);if(!(s>=a))return[];const d=s-a+1,u=new Array(d);if(o)if(c<0)for(let p=0;p<d;++p)u[p]=(s-p)/-c;else for(let p=0;p<d;++p)u[p]=(s-p)*c;else if(c<0)for(let p=0;p<d;++p)u[p]=(a+p)/-c;else for(let p=0;p<d;++p)u[p]=(a+p)*c;return u}function Yo(n,e,r){return e=+e,n=+n,r=+r,Ws(n,e,r)[2]}function gV(n,e,r){e=+e,n=+n,r=+r;const o=e<n,a=o?Yo(e,n,r):Yo(n,e,r);return(o?-1:1)*(a<0?1/-a:a)}function yV(n,e,r){let o;for(;;){const a=Yo(n,e,r);if(a===o||a===0||!isFinite(a))return[n,e];a>0?(n=Math.floor(n/a)*a,e=Math.ceil(e/a)*a):a<0&&(n=Math.ceil(n*a)/a,e=Math.floor(e*a)/a),o=a}}function _V(n){return Math.max(1,Math.ceil(Math.log(cV(n))/Math.LN2)+1)}function Kh(){var n=dV,e=kd,r=_V;function o(a){Array.isArray(a)||(a=Array.from(a));var s,c=a.length,d,u,p=new Array(c);for(s=0;s<c;++s)p[s]=n(a[s],s,a);var h=e(p),g=h[0],y=h[1],w=r(p,g,y);if(!Array.isArray(w)){const $=y,W=+w;if(e===kd&&([g,y]=yV(g,y,W)),w=Gh(g,y,W),w[0]<=g&&(u=Yo(g,y,W)),w[w.length-1]>=y)if($>=y&&e===kd){const R=Yo(g,y,W);isFinite(R)&&(R>0?y=(Math.floor(y/R)+1)*R:R<0&&(y=(Math.ceil(y*-R)+1)/-R))}else w.pop()}for(var E=w.length,N=0,V=E;w[N]<=g;)++N;for(;w[V-1]>y;)--V;(N||V<E)&&(w=w.slice(N,V),E=V-N);var D=new Array(E+1),F;for(s=0;s<=E;++s)F=D[s]=[],F.x0=s>0?w[s-1]:g,F.x1=s<E?w[s]:y;if(isFinite(u)){if(u>0)for(s=0;s<c;++s)(d=p[s])!=null&&g<=d&&d<=y&&D[Math.min(E,Math.floor((d-g)/u))].push(a[s]);else if(u<0){for(s=0;s<c;++s)if((d=p[s])!=null&&g<=d&&d<=y){const $=Math.floor((g-d)*u);D[Math.min(E,$+(w[$]<=d))].push(a[s])}}}else for(s=0;s<c;++s)(d=p[s])!=null&&g<=d&&d<=y&&D[qh(w,d,0,E)].push(a[s]);return D}return o.value=function(a){return arguments.length?(n=typeof a=="function"?a:xd(a),o):n},o.domain=function(a){return arguments.length?(e=typeof a=="function"?a:xd([a[0],a[1]]),o):e},o.thresholds=function(a){return arguments.length?(r=typeof a=="function"?a:xd(Array.isArray(a)?fV.call(a):a),o):r},o}function Hs(n,e){let r;if(e===void 0)for(const o of n)o!=null&&(r<o||r===void 0&&o>=o)&&(r=o);else{let o=-1;for(let a of n)(a=e(a,++o,n))!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}return r}function vd(n,e){let r;if(e===void 0)for(const o of n)o!=null&&(r>o||r===void 0&&o>=o)&&(r=o);else{let o=-1;for(let a of n)(a=e(a,++o,n))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}function wV(n){return n}var Cd=1,Ed=2,Sd=3,yi=4,Xh=1e-6;function bV(n){return"translate("+n+",0)"}function kV(n){return"translate(0,"+n+")"}function xV(n){return e=>+n(e)}function vV(n,e){return e=Math.max(0,n.bandwidth()-e*2)/2,n.round()&&(e=Math.round(e)),r=>+n(r)+e}function CV(){return!this.__axis}function Yh(n,e){var r=[],o=null,a=null,s=6,c=6,d=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,p=n===Cd||n===yi?-1:1,h=n===yi||n===Ed?"x":"y",g=n===Cd||n===Sd?bV:kV;function y(w){var E=o??(e.ticks?e.ticks.apply(e,r):e.domain()),N=a??(e.tickFormat?e.tickFormat.apply(e,r):wV),V=Math.max(s,0)+d,D=e.range(),F=+D[0]+u,$=+D[D.length-1]+u,W=(e.bandwidth?vV:xV)(e.copy(),u),R=w.selection?w.selection():w,B=R.selectAll(".domain").data([null]),z=R.selectAll(".tick").data(E,e).order(),q=z.exit(),C=z.enter().append("g").attr("class","tick"),A=z.select("line"),v=z.select("text");B=B.merge(B.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),z=z.merge(C),A=A.merge(C.append("line").attr("stroke","currentColor").attr(h+"2",p*s)),v=v.merge(C.append("text").attr("fill","currentColor").attr(h,p*V).attr("dy",n===Cd?"0em":n===Sd?"0.71em":"0.32em")),w!==R&&(B=B.transition(w),z=z.transition(w),A=A.transition(w),v=v.transition(w),q=q.transition(w).attr("opacity",Xh).attr("transform",function(O){return isFinite(O=W(O))?g(O+u):this.getAttribute("transform")}),C.attr("opacity",Xh).attr("transform",function(O){var S=this.parentNode.__axis;return g((S&&isFinite(S=S(O))?S:W(O))+u)})),q.remove(),B.attr("d",n===yi||n===Ed?c?"M"+p*c+","+F+"H"+u+"V"+$+"H"+p*c:"M"+u+","+F+"V"+$:c?"M"+F+","+p*c+"V"+u+"H"+$+"V"+p*c:"M"+F+","+u+"H"+$),z.attr("opacity",1).attr("transform",function(O){return g(W(O)+u)}),A.attr(h+"2",p*s),v.attr(h,p*V).text(N),R.filter(CV).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",n===Ed?"start":n===yi?"end":"middle"),R.each(function(){this.__axis=W})}return y.scale=function(w){return arguments.length?(e=w,y):e},y.ticks=function(){return r=Array.from(arguments),y},y.tickArguments=function(w){return arguments.length?(r=w==null?[]:Array.from(w),y):r.slice()},y.tickValues=function(w){return arguments.length?(o=w==null?null:Array.from(w),y):o&&o.slice()},y.tickFormat=function(w){return arguments.length?(a=w,y):a},y.tickSize=function(w){return arguments.length?(s=c=+w,y):s},y.tickSizeInner=function(w){return arguments.length?(s=+w,y):s},y.tickSizeOuter=function(w){return arguments.length?(c=+w,y):c},y.tickPadding=function(w){return arguments.length?(d=+w,y):d},y.offset=function(w){return arguments.length?(u=+w,y):u},y}function qs(n){return Yh(Sd,n)}function Gs(n){return Yh(yi,n)}var EV={value:()=>{}};function Jh(){for(var n=0,e=arguments.length,r={},o;n<e;++n){if(!(o=arguments[n]+"")||o in r||/[\s.]/.test(o))throw new Error("illegal type: "+o);r[o]=[]}return new Ks(r)}function Ks(n){this._=n}function SV(n,e){return n.trim().split(/^|\s+/).map(function(r){var o="",a=r.indexOf(".");if(a>=0&&(o=r.slice(a+1),r=r.slice(0,a)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:o}})}Ks.prototype=Jh.prototype={constructor:Ks,on:function(n,e){var r=this._,o=SV(n+"",r),a,s=-1,c=o.length;if(arguments.length<2){for(;++s<c;)if((a=(n=o[s]).type)&&(a=NV(r[a],n.name)))return a;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<c;)if(a=(n=o[s]).type)r[a]=Qh(r[a],n.name,e);else if(e==null)for(a in r)r[a]=Qh(r[a],n.name,null);return this},copy:function(){var n={},e=this._;for(var r in e)n[r]=e[r].slice();return new Ks(n)},call:function(n,e){if((a=arguments.length-2)>0)for(var r=new Array(a),o=0,a,s;o<a;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(s=this._[n],o=0,a=s.length;o<a;++o)s[o].value.apply(e,r)},apply:function(n,e,r){if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(var o=this._[n],a=0,s=o.length;a<s;++a)o[a].value.apply(e,r)}};function NV(n,e){for(var r=0,o=n.length,a;r<o;++r)if((a=n[r]).name===e)return a.value}function Qh(n,e,r){for(var o=0,a=n.length;o<a;++o)if(n[o].name===e){n[o]=EV,n=n.slice(0,o).concat(n.slice(o+1));break}return r!=null&&n.push({name:e,value:r}),n}var Nd="http://www.w3.org/1999/xhtml";const em={svg:"http://www.w3.org/2000/svg",xhtml:Nd,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Xs(n){var e=n+="",r=e.indexOf(":");return r>=0&&(e=n.slice(0,r))!=="xmlns"&&(n=n.slice(r+1)),em.hasOwnProperty(e)?{space:em[e],local:n}:n}function BV(n){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Nd&&e.documentElement.namespaceURI===Nd?e.createElement(n):e.createElementNS(r,n)}}function VV(n){return function(){return this.ownerDocument.createElementNS(n.space,n.local)}}function tm(n){var e=Xs(n);return(e.local?VV:BV)(e)}function TV(){}function Bd(n){return n==null?TV:function(){return this.querySelector(n)}}function AV(n){typeof n!="function"&&(n=Bd(n));for(var e=this._groups,r=e.length,o=new Array(r),a=0;a<r;++a)for(var s=e[a],c=s.length,d=o[a]=new Array(c),u,p,h=0;h<c;++h)(u=s[h])&&(p=n.call(u,u.__data__,h,s))&&("__data__"in u&&(p.__data__=u.__data__),d[h]=p);return new It(o,this._parents)}function nm(n){return n==null?[]:Array.isArray(n)?n:Array.from(n)}function $V(){return[]}function rm(n){return n==null?$V:function(){return this.querySelectorAll(n)}}function RV(n){return function(){return nm(n.apply(this,arguments))}}function OV(n){typeof n=="function"?n=RV(n):n=rm(n);for(var e=this._groups,r=e.length,o=[],a=[],s=0;s<r;++s)for(var c=e[s],d=c.length,u,p=0;p<d;++p)(u=c[p])&&(o.push(n.call(u,u.__data__,p,c)),a.push(u));return new It(o,a)}function om(n){return function(){return this.matches(n)}}function am(n){return function(e){return e.matches(n)}}var IV=Array.prototype.find;function DV(n){return function(){return IV.call(this.children,n)}}function MV(){return this.firstElementChild}function PV(n){return this.select(n==null?MV:DV(typeof n=="function"?n:am(n)))}var LV=Array.prototype.filter;function FV(){return Array.from(this.children)}function zV(n){return function(){return LV.call(this.children,n)}}function UV(n){return this.selectAll(n==null?FV:zV(typeof n=="function"?n:am(n)))}function jV(n){typeof n!="function"&&(n=om(n));for(var e=this._groups,r=e.length,o=new Array(r),a=0;a<r;++a)for(var s=e[a],c=s.length,d=o[a]=[],u,p=0;p<c;++p)(u=s[p])&&n.call(u,u.__data__,p,s)&&d.push(u);return new It(o,this._parents)}function im(n){return new Array(n.length)}function ZV(){return new It(this._enter||this._groups.map(im),this._parents)}function Ys(n,e){this.ownerDocument=n.ownerDocument,this.namespaceURI=n.namespaceURI,this._next=null,this._parent=n,this.__data__=e}Ys.prototype={constructor:Ys,appendChild:function(n){return this._parent.insertBefore(n,this._next)},insertBefore:function(n,e){return this._parent.insertBefore(n,e)},querySelector:function(n){return this._parent.querySelector(n)},querySelectorAll:function(n){return this._parent.querySelectorAll(n)}};function WV(n){return function(){return n}}function HV(n,e,r,o,a,s){for(var c=0,d,u=e.length,p=s.length;c<p;++c)(d=e[c])?(d.__data__=s[c],o[c]=d):r[c]=new Ys(n,s[c]);for(;c<u;++c)(d=e[c])&&(a[c]=d)}function qV(n,e,r,o,a,s,c){var d,u,p=new Map,h=e.length,g=s.length,y=new Array(h),w;for(d=0;d<h;++d)(u=e[d])&&(y[d]=w=c.call(u,u.__data__,d,e)+"",p.has(w)?a[d]=u:p.set(w,u));for(d=0;d<g;++d)w=c.call(n,s[d],d,s)+"",(u=p.get(w))?(o[d]=u,u.__data__=s[d],p.delete(w)):r[d]=new Ys(n,s[d]);for(d=0;d<h;++d)(u=e[d])&&p.get(y[d])===u&&(a[d]=u)}function GV(n){return n.__data__}function KV(n,e){if(!arguments.length)return Array.from(this,GV);var r=e?qV:HV,o=this._parents,a=this._groups;typeof n!="function"&&(n=WV(n));for(var s=a.length,c=new Array(s),d=new Array(s),u=new Array(s),p=0;p<s;++p){var h=o[p],g=a[p],y=g.length,w=XV(n.call(h,h&&h.__data__,p,o)),E=w.length,N=d[p]=new Array(E),V=c[p]=new Array(E),D=u[p]=new Array(y);r(h,g,N,V,D,w,e);for(var F=0,$=0,W,R;F<E;++F)if(W=N[F]){for(F>=$&&($=F+1);!(R=V[$])&&++$<E;);W._next=R||null}}return c=new It(c,o),c._enter=d,c._exit=u,c}function XV(n){return typeof n=="object"&&"length"in n?n:Array.from(n)}function YV(){return new It(this._exit||this._groups.map(im),this._parents)}function JV(n,e,r){var o=this.enter(),a=this,s=this.exit();return typeof n=="function"?(o=n(o),o&&(o=o.selection())):o=o.append(n+""),e!=null&&(a=e(a),a&&(a=a.selection())),r==null?s.remove():r(s),o&&a?o.merge(a).order():a}function QV(n){for(var e=n.selection?n.selection():n,r=this._groups,o=e._groups,a=r.length,s=o.length,c=Math.min(a,s),d=new Array(a),u=0;u<c;++u)for(var p=r[u],h=o[u],g=p.length,y=d[u]=new Array(g),w,E=0;E<g;++E)(w=p[E]||h[E])&&(y[E]=w);for(;u<a;++u)d[u]=r[u];return new It(d,this._parents)}function eT(){for(var n=this._groups,e=-1,r=n.length;++e<r;)for(var o=n[e],a=o.length-1,s=o[a],c;--a>=0;)(c=o[a])&&(s&&c.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(c,s),s=c);return this}function tT(n){n||(n=nT);function e(g,y){return g&&y?n(g.__data__,y.__data__):!g-!y}for(var r=this._groups,o=r.length,a=new Array(o),s=0;s<o;++s){for(var c=r[s],d=c.length,u=a[s]=new Array(d),p,h=0;h<d;++h)(p=c[h])&&(u[h]=p);u.sort(e)}return new It(a,this._parents).order()}function nT(n,e){return n<e?-1:n>e?1:n>=e?0:NaN}function rT(){var n=arguments[0];return arguments[0]=this,n.apply(null,arguments),this}function oT(){return Array.from(this)}function aT(){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var o=n[e],a=0,s=o.length;a<s;++a){var c=o[a];if(c)return c}return null}function iT(){let n=0;for(const e of this)++n;return n}function sT(){return!this.node()}function lT(n){for(var e=this._groups,r=0,o=e.length;r<o;++r)for(var a=e[r],s=0,c=a.length,d;s<c;++s)(d=a[s])&&n.call(d,d.__data__,s,a);return this}function cT(n){return function(){this.removeAttribute(n)}}function dT(n){return function(){this.removeAttributeNS(n.space,n.local)}}function uT(n,e){return function(){this.setAttribute(n,e)}}function fT(n,e){return function(){this.setAttributeNS(n.space,n.local,e)}}function pT(n,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(n):this.setAttribute(n,r)}}function hT(n,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,r)}}function mT(n,e){var r=Xs(n);if(arguments.length<2){var o=this.node();return r.local?o.getAttributeNS(r.space,r.local):o.getAttribute(r)}return this.each((e==null?r.local?dT:cT:typeof e=="function"?r.local?hT:pT:r.local?fT:uT)(r,e))}function sm(n){return n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView}function gT(n){return function(){this.style.removeProperty(n)}}function yT(n,e,r){return function(){this.style.setProperty(n,e,r)}}function _T(n,e,r){return function(){var o=e.apply(this,arguments);o==null?this.style.removeProperty(n):this.style.setProperty(n,o,r)}}function wT(n,e,r){return arguments.length>1?this.each((e==null?gT:typeof e=="function"?_T:yT)(n,e,r??"")):Jo(this.node(),n)}function Jo(n,e){return n.style.getPropertyValue(e)||sm(n).getComputedStyle(n,null).getPropertyValue(e)}function bT(n){return function(){delete this[n]}}function kT(n,e){return function(){this[n]=e}}function xT(n,e){return function(){var r=e.apply(this,arguments);r==null?delete this[n]:this[n]=r}}function vT(n,e){return arguments.length>1?this.each((e==null?bT:typeof e=="function"?xT:kT)(n,e)):this.node()[n]}function lm(n){return n.trim().split(/^|\s+/)}function Vd(n){return n.classList||new cm(n)}function cm(n){this._node=n,this._names=lm(n.getAttribute("class")||"")}cm.prototype={add:function(n){var e=this._names.indexOf(n);e<0&&(this._names.push(n),this._node.setAttribute("class",this._names.join(" ")))},remove:function(n){var e=this._names.indexOf(n);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(n){return this._names.indexOf(n)>=0}};function dm(n,e){for(var r=Vd(n),o=-1,a=e.length;++o<a;)r.add(e[o])}function um(n,e){for(var r=Vd(n),o=-1,a=e.length;++o<a;)r.remove(e[o])}function CT(n){return function(){dm(this,n)}}function ET(n){return function(){um(this,n)}}function ST(n,e){return function(){(e.apply(this,arguments)?dm:um)(this,n)}}function NT(n,e){var r=lm(n+"");if(arguments.length<2){for(var o=Vd(this.node()),a=-1,s=r.length;++a<s;)if(!o.contains(r[a]))return!1;return!0}return this.each((typeof e=="function"?ST:e?CT:ET)(r,e))}function BT(){this.textContent=""}function VT(n){return function(){this.textContent=n}}function TT(n){return function(){var e=n.apply(this,arguments);this.textContent=e??""}}function AT(n){return arguments.length?this.each(n==null?BT:(typeof n=="function"?TT:VT)(n)):this.node().textContent}function $T(){this.innerHTML=""}function RT(n){return function(){this.innerHTML=n}}function OT(n){return function(){var e=n.apply(this,arguments);this.innerHTML=e??""}}function IT(n){return arguments.length?this.each(n==null?$T:(typeof n=="function"?OT:RT)(n)):this.node().innerHTML}function DT(){this.nextSibling&&this.parentNode.appendChild(this)}function MT(){return this.each(DT)}function PT(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function LT(){return this.each(PT)}function FT(n){var e=typeof n=="function"?n:tm(n);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function zT(){return null}function UT(n,e){var r=typeof n=="function"?n:tm(n),o=e==null?zT:typeof e=="function"?e:Bd(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),o.apply(this,arguments)||null)})}function jT(){var n=this.parentNode;n&&n.removeChild(this)}function ZT(){return this.each(jT)}function WT(){var n=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(n,this.nextSibling):n}function HT(){var n=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(n,this.nextSibling):n}function qT(n){return this.select(n?HT:WT)}function GT(n){return arguments.length?this.property("__data__",n):this.node().__data__}function KT(n){return function(e){n.call(this,e,this.__data__)}}function XT(n){return n.trim().split(/^|\s+/).map(function(e){var r="",o=e.indexOf(".");return o>=0&&(r=e.slice(o+1),e=e.slice(0,o)),{type:e,name:r}})}function YT(n){return function(){var e=this.__on;if(e){for(var r=0,o=-1,a=e.length,s;r<a;++r)s=e[r],(!n.type||s.type===n.type)&&s.name===n.name?this.removeEventListener(s.type,s.listener,s.options):e[++o]=s;++o?e.length=o:delete this.__on}}}function JT(n,e,r){return function(){var o=this.__on,a,s=KT(e);if(o){for(var c=0,d=o.length;c<d;++c)if((a=o[c]).type===n.type&&a.name===n.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=s,a.options=r),a.value=e;return}}this.addEventListener(n.type,s,r),a={type:n.type,name:n.name,value:e,listener:s,options:r},o?o.push(a):this.__on=[a]}}function QT(n,e,r){var o=XT(n+""),a,s=o.length,c;if(arguments.length<2){var d=this.node().__on;if(d){for(var u=0,p=d.length,h;u<p;++u)for(a=0,h=d[u];a<s;++a)if((c=o[a]).type===h.type&&c.name===h.name)return h.value}return}for(d=e?JT:YT,a=0;a<s;++a)this.each(d(o[a],e,r));return this}function fm(n,e,r){var o=sm(n),a=o.CustomEvent;typeof a=="function"?a=new a(e,r):(a=o.document.createEvent("Event"),r?(a.initEvent(e,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(e,!1,!1)),n.dispatchEvent(a)}function e2(n,e){return function(){return fm(this,n,e)}}function t2(n,e){return function(){return fm(this,n,e.apply(this,arguments))}}function n2(n,e){return this.each((typeof e=="function"?t2:e2)(n,e))}function*r2(){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var o=n[e],a=0,s=o.length,c;a<s;++a)(c=o[a])&&(yield c)}var Td=[null];function It(n,e){this._groups=n,this._parents=e}function _i(){return new It([[document.documentElement]],Td)}function o2(){return this}It.prototype=_i.prototype={constructor:It,select:AV,selectAll:OV,selectChild:PV,selectChildren:UV,filter:jV,data:KV,enter:ZV,exit:YV,join:JV,merge:QV,selection:o2,order:eT,sort:tT,call:rT,nodes:oT,node:aT,size:iT,empty:sT,each:lT,attr:mT,style:wT,property:vT,classed:NT,text:AT,html:IT,raise:MT,lower:LT,append:FT,insert:UT,remove:ZT,clone:qT,datum:GT,on:QT,dispatch:n2,[Symbol.iterator]:r2};function pm(n){return typeof n=="string"?new It([[document.querySelector(n)]],[document.documentElement]):new It([[n]],Td)}function a2(n){return typeof n=="string"?new It([document.querySelectorAll(n)],[document.documentElement]):new It([nm(n)],Td)}function Ad(n,e,r){n.prototype=e.prototype=r,r.constructor=n}function hm(n,e){var r=Object.create(n.prototype);for(var o in e)r[o]=e[o];return r}function wi(){}var bi=.7,Js=1/bi,Qo="\\s*([+-]?\\d+)\\s*",ki="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",i2=/^#([0-9a-f]{3,8})$/,s2=new RegExp(`^rgb\\(${Qo},${Qo},${Qo}\\)$`),l2=new RegExp(`^rgb\\(${Qn},${Qn},${Qn}\\)$`),c2=new RegExp(`^rgba\\(${Qo},${Qo},${Qo},${ki}\\)$`),d2=new RegExp(`^rgba\\(${Qn},${Qn},${Qn},${ki}\\)$`),u2=new RegExp(`^hsl\\(${ki},${Qn},${Qn}\\)$`),f2=new RegExp(`^hsla\\(${ki},${Qn},${Qn},${ki}\\)$`),mm={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Ad(wi,po,{copy(n){return Object.assign(new this.constructor,this,n)},displayable(){return this.rgb().displayable()},hex:gm,formatHex:gm,formatHex8:p2,formatHsl:h2,formatRgb:ym,toString:ym});function gm(){return this.rgb().formatHex()}function p2(){return this.rgb().formatHex8()}function h2(){return xm(this).formatHsl()}function ym(){return this.rgb().formatRgb()}function po(n){var e,r;return n=(n+"").trim().toLowerCase(),(e=i2.exec(n))?(r=e[1].length,e=parseInt(e[1],16),r===6?_m(e):r===3?new jt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Qs(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Qs(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=s2.exec(n))?new jt(e[1],e[2],e[3],1):(e=l2.exec(n))?new jt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=c2.exec(n))?Qs(e[1],e[2],e[3],e[4]):(e=d2.exec(n))?Qs(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=u2.exec(n))?km(e[1],e[2]/100,e[3]/100,1):(e=f2.exec(n))?km(e[1],e[2]/100,e[3]/100,e[4]):mm.hasOwnProperty(n)?_m(mm[n]):n==="transparent"?new jt(NaN,NaN,NaN,0):null}function _m(n){return new jt(n>>16&255,n>>8&255,n&255,1)}function Qs(n,e,r,o){return o<=0&&(n=e=r=NaN),new jt(n,e,r,o)}function m2(n){return n instanceof wi||(n=po(n)),n?(n=n.rgb(),new jt(n.r,n.g,n.b,n.opacity)):new jt}function $d(n,e,r,o){return arguments.length===1?m2(n):new jt(n,e,r,o??1)}function jt(n,e,r,o){this.r=+n,this.g=+e,this.b=+r,this.opacity=+o}Ad(jt,$d,hm(wi,{brighter(n){return n=n==null?Js:Math.pow(Js,n),new jt(this.r*n,this.g*n,this.b*n,this.opacity)},darker(n){return n=n==null?bi:Math.pow(bi,n),new jt(this.r*n,this.g*n,this.b*n,this.opacity)},rgb(){return this},clamp(){return new jt(ho(this.r),ho(this.g),ho(this.b),el(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:wm,formatHex:wm,formatHex8:g2,formatRgb:bm,toString:bm}));function wm(){return`#${mo(this.r)}${mo(this.g)}${mo(this.b)}`}function g2(){return`#${mo(this.r)}${mo(this.g)}${mo(this.b)}${mo((isNaN(this.opacity)?1:this.opacity)*255)}`}function bm(){const n=el(this.opacity);return`${n===1?"rgb(":"rgba("}${ho(this.r)}, ${ho(this.g)}, ${ho(this.b)}${n===1?")":`, ${n})`}`}function el(n){return isNaN(n)?1:Math.max(0,Math.min(1,n))}function ho(n){return Math.max(0,Math.min(255,Math.round(n)||0))}function mo(n){return n=ho(n),(n<16?"0":"")+n.toString(16)}function km(n,e,r,o){return o<=0?n=e=r=NaN:r<=0||r>=1?n=e=NaN:e<=0&&(n=NaN),new Sn(n,e,r,o)}function xm(n){if(n instanceof Sn)return new Sn(n.h,n.s,n.l,n.opacity);if(n instanceof wi||(n=po(n)),!n)return new Sn;if(n instanceof Sn)return n;n=n.rgb();var e=n.r/255,r=n.g/255,o=n.b/255,a=Math.min(e,r,o),s=Math.max(e,r,o),c=NaN,d=s-a,u=(s+a)/2;return d?(e===s?c=(r-o)/d+(r<o)*6:r===s?c=(o-e)/d+2:c=(e-r)/d+4,d/=u<.5?s+a:2-s-a,c*=60):d=u>0&&u<1?0:c,new Sn(c,d,u,n.opacity)}function y2(n,e,r,o){return arguments.length===1?xm(n):new Sn(n,e,r,o??1)}function Sn(n,e,r,o){this.h=+n,this.s=+e,this.l=+r,this.opacity=+o}Ad(Sn,y2,hm(wi,{brighter(n){return n=n==null?Js:Math.pow(Js,n),new Sn(this.h,this.s,this.l*n,this.opacity)},darker(n){return n=n==null?bi:Math.pow(bi,n),new Sn(this.h,this.s,this.l*n,this.opacity)},rgb(){var n=this.h%360+(this.h<0)*360,e=isNaN(n)||isNaN(this.s)?0:this.s,r=this.l,o=r+(r<.5?r:1-r)*e,a=2*r-o;return new jt(Rd(n>=240?n-240:n+120,a,o),Rd(n,a,o),Rd(n<120?n+240:n-120,a,o),this.opacity)},clamp(){return new Sn(vm(this.h),tl(this.s),tl(this.l),el(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const n=el(this.opacity);return`${n===1?"hsl(":"hsla("}${vm(this.h)}, ${tl(this.s)*100}%, ${tl(this.l)*100}%${n===1?")":`, ${n})`}`}}));function vm(n){return n=(n||0)%360,n<0?n+360:n}function tl(n){return Math.max(0,Math.min(1,n||0))}function Rd(n,e,r){return(n<60?e+(r-e)*n/60:n<180?r:n<240?e+(r-e)*(240-n)/60:e)*255}const Od=n=>()=>n;function _2(n,e){return function(r){return n+r*e}}function w2(n,e,r){return n=Math.pow(n,r),e=Math.pow(e,r)-n,r=1/r,function(o){return Math.pow(n+o*e,r)}}function b2(n){return(n=+n)==1?Cm:function(e,r){return r-e?w2(e,r,n):Od(isNaN(e)?r:e)}}function Cm(n,e){var r=e-n;return r?_2(n,r):Od(isNaN(n)?e:n)}const nl=function n(e){var r=b2(e);function o(a,s){var c=r((a=$d(a)).r,(s=$d(s)).r),d=r(a.g,s.g),u=r(a.b,s.b),p=Cm(a.opacity,s.opacity);return function(h){return a.r=c(h),a.g=d(h),a.b=u(h),a.opacity=p(h),a+""}}return o.gamma=n,o}(1);function k2(n,e){e||(e=[]);var r=n?Math.min(e.length,n.length):0,o=e.slice(),a;return function(s){for(a=0;a<r;++a)o[a]=n[a]*(1-s)+e[a]*s;return o}}function x2(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function v2(n,e){var r=e?e.length:0,o=n?Math.min(r,n.length):0,a=new Array(o),s=new Array(r),c;for(c=0;c<o;++c)a[c]=Md(n[c],e[c]);for(;c<r;++c)s[c]=e[c];return function(d){for(c=0;c<o;++c)s[c]=a[c](d);return s}}function C2(n,e){var r=new Date;return n=+n,e=+e,function(o){return r.setTime(n*(1-o)+e*o),r}}function Nn(n,e){return n=+n,e=+e,function(r){return n*(1-r)+e*r}}function E2(n,e){var r={},o={},a;(n===null||typeof n!="object")&&(n={}),(e===null||typeof e!="object")&&(e={});for(a in e)a in n?r[a]=Md(n[a],e[a]):o[a]=e[a];return function(s){for(a in r)o[a]=r[a](s);return o}}var Id=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Dd=new RegExp(Id.source,"g");function S2(n){return function(){return n}}function N2(n){return function(e){return n(e)+""}}function Em(n,e){var r=Id.lastIndex=Dd.lastIndex=0,o,a,s,c=-1,d=[],u=[];for(n=n+"",e=e+"";(o=Id.exec(n))&&(a=Dd.exec(e));)(s=a.index)>r&&(s=e.slice(r,s),d[c]?d[c]+=s:d[++c]=s),(o=o[0])===(a=a[0])?d[c]?d[c]+=a:d[++c]=a:(d[++c]=null,u.push({i:c,x:Nn(o,a)})),r=Dd.lastIndex;return r<e.length&&(s=e.slice(r),d[c]?d[c]+=s:d[++c]=s),d.length<2?u[0]?N2(u[0].x):S2(e):(e=u.length,function(p){for(var h=0,g;h<e;++h)d[(g=u[h]).i]=g.x(p);return d.join("")})}function Md(n,e){var r=typeof e,o;return e==null||r==="boolean"?Od(e):(r==="number"?Nn:r==="string"?(o=po(e))?(e=o,nl):Em:e instanceof po?nl:e instanceof Date?C2:x2(e)?k2:Array.isArray(e)?v2:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?E2:Nn)(n,e)}function B2(n,e){return n=+n,e=+e,function(r){return Math.round(n*(1-r)+e*r)}}var Sm=180/Math.PI,Nm={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Bm(n,e,r,o,a,s){var c,d,u;return(c=Math.sqrt(n*n+e*e))&&(n/=c,e/=c),(u=n*r+e*o)&&(r-=n*u,o-=e*u),(d=Math.sqrt(r*r+o*o))&&(r/=d,o/=d,u/=d),n*o<e*r&&(n=-n,e=-e,u=-u,c=-c),{translateX:a,translateY:s,rotate:Math.atan2(e,n)*Sm,skewX:Math.atan(u)*Sm,scaleX:c,scaleY:d}}var rl;function V2(n){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(n+"");return e.isIdentity?Nm:Bm(e.a,e.b,e.c,e.d,e.e,e.f)}function T2(n){return n==null||(rl||(rl=document.createElementNS("http://www.w3.org/2000/svg","g")),rl.setAttribute("transform",n),!(n=rl.transform.baseVal.consolidate()))?Nm:(n=n.matrix,Bm(n.a,n.b,n.c,n.d,n.e,n.f))}function Vm(n,e,r,o){function a(p){return p.length?p.pop()+" ":""}function s(p,h,g,y,w,E){if(p!==g||h!==y){var N=w.push("translate(",null,e,null,r);E.push({i:N-4,x:Nn(p,g)},{i:N-2,x:Nn(h,y)})}else(g||y)&&w.push("translate("+g+e+y+r)}function c(p,h,g,y){p!==h?(p-h>180?h+=360:h-p>180&&(p+=360),y.push({i:g.push(a(g)+"rotate(",null,o)-2,x:Nn(p,h)})):h&&g.push(a(g)+"rotate("+h+o)}function d(p,h,g,y){p!==h?y.push({i:g.push(a(g)+"skewX(",null,o)-2,x:Nn(p,h)}):h&&g.push(a(g)+"skewX("+h+o)}function u(p,h,g,y,w,E){if(p!==g||h!==y){var N=w.push(a(w)+"scale(",null,",",null,")");E.push({i:N-4,x:Nn(p,g)},{i:N-2,x:Nn(h,y)})}else(g!==1||y!==1)&&w.push(a(w)+"scale("+g+","+y+")")}return function(p,h){var g=[],y=[];return p=n(p),h=n(h),s(p.translateX,p.translateY,h.translateX,h.translateY,g,y),c(p.rotate,h.rotate,g,y),d(p.skewX,h.skewX,g,y),u(p.scaleX,p.scaleY,h.scaleX,h.scaleY,g,y),p=h=null,function(w){for(var E=-1,N=y.length,V;++E<N;)g[(V=y[E]).i]=V.x(w);return g.join("")}}}var A2=Vm(V2,"px, ","px)","deg)"),$2=Vm(T2,", ",")",")"),ea=0,xi=0,vi=0,Tm=1e3,ol,Ci,al=0,go=0,il=0,Ei=typeof performance=="object"&&performance.now?performance:Date,Am=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(n){setTimeout(n,17)};function Pd(){return go||(Am(R2),go=Ei.now()+il)}function R2(){go=0}function sl(){this._call=this._time=this._next=null}sl.prototype=$m.prototype={constructor:sl,restart:function(n,e,r){if(typeof n!="function")throw new TypeError("callback is not a function");r=(r==null?Pd():+r)+(e==null?0:+e),!this._next&&Ci!==this&&(Ci?Ci._next=this:ol=this,Ci=this),this._call=n,this._time=r,Ld()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ld())}};function $m(n,e,r){var o=new sl;return o.restart(n,e,r),o}function O2(){Pd(),++ea;for(var n=ol,e;n;)(e=go-n._time)>=0&&n._call.call(void 0,e),n=n._next;--ea}function Rm(){go=(al=Ei.now())+il,ea=xi=0;try{O2()}finally{ea=0,D2(),go=0}}function I2(){var n=Ei.now(),e=n-al;e>Tm&&(il-=e,al=n)}function D2(){for(var n,e=ol,r,o=1/0;e;)e._call?(o>e._time&&(o=e._time),n=e,e=e._next):(r=e._next,e._next=null,e=n?n._next=r:ol=r);Ci=n,Ld(o)}function Ld(n){if(!ea){xi&&(xi=clearTimeout(xi));var e=n-go;e>24?(n<1/0&&(xi=setTimeout(Rm,n-Ei.now()-il)),vi&&(vi=clearInterval(vi))):(vi||(al=Ei.now(),vi=setInterval(I2,Tm)),ea=1,Am(Rm))}}function Om(n,e,r){var o=new sl;return e=e==null?0:+e,o.restart(a=>{o.stop(),n(a+e)},e,r),o}var M2=Jh("start","end","cancel","interrupt"),P2=[],Im=0,Dm=1,Fd=2,ll=3,Mm=4,zd=5,cl=6;function dl(n,e,r,o,a,s){var c=n.__transition;if(!c)n.__transition={};else if(r in c)return;L2(n,r,{name:e,index:o,group:a,on:M2,tween:P2,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Im})}function Ud(n,e){var r=Bn(n,e);if(r.state>Im)throw new Error("too late; already scheduled");return r}function er(n,e){var r=Bn(n,e);if(r.state>ll)throw new Error("too late; already running");return r}function Bn(n,e){var r=n.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function L2(n,e,r){var o=n.__transition,a;o[e]=r,r.timer=$m(s,0,r.time);function s(p){r.state=Dm,r.timer.restart(c,r.delay,r.time),r.delay<=p&&c(p-r.delay)}function c(p){var h,g,y,w;if(r.state!==Dm)return u();for(h in o)if(w=o[h],w.name===r.name){if(w.state===ll)return Om(c);w.state===Mm?(w.state=cl,w.timer.stop(),w.on.call("interrupt",n,n.__data__,w.index,w.group),delete o[h]):+h<e&&(w.state=cl,w.timer.stop(),w.on.call("cancel",n,n.__data__,w.index,w.group),delete o[h])}if(Om(function(){r.state===ll&&(r.state=Mm,r.timer.restart(d,r.delay,r.time),d(p))}),r.state=Fd,r.on.call("start",n,n.__data__,r.index,r.group),r.state===Fd){for(r.state=ll,a=new Array(y=r.tween.length),h=0,g=-1;h<y;++h)(w=r.tween[h].value.call(n,n.__data__,r.index,r.group))&&(a[++g]=w);a.length=g+1}}function d(p){for(var h=p<r.duration?r.ease.call(null,p/r.duration):(r.timer.restart(u),r.state=zd,1),g=-1,y=a.length;++g<y;)a[g].call(n,h);r.state===zd&&(r.on.call("end",n,n.__data__,r.index,r.group),u())}function u(){r.state=cl,r.timer.stop(),delete o[e];for(var p in o)return;delete n.__transition}}function F2(n,e){var r=n.__transition,o,a,s=!0,c;if(r){e=e==null?null:e+"";for(c in r){if((o=r[c]).name!==e){s=!1;continue}a=o.state>Fd&&o.state<zd,o.state=cl,o.timer.stop(),o.on.call(a?"interrupt":"cancel",n,n.__data__,o.index,o.group),delete r[c]}s&&delete n.__transition}}function z2(n){return this.each(function(){F2(this,n)})}function U2(n,e){var r,o;return function(){var a=er(this,n),s=a.tween;if(s!==r){o=r=s;for(var c=0,d=o.length;c<d;++c)if(o[c].name===e){o=o.slice(),o.splice(c,1);break}}a.tween=o}}function j2(n,e,r){var o,a;if(typeof r!="function")throw new Error;return function(){var s=er(this,n),c=s.tween;if(c!==o){a=(o=c).slice();for(var d={name:e,value:r},u=0,p=a.length;u<p;++u)if(a[u].name===e){a[u]=d;break}u===p&&a.push(d)}s.tween=a}}function Z2(n,e){var r=this._id;if(n+="",arguments.length<2){for(var o=Bn(this.node(),r).tween,a=0,s=o.length,c;a<s;++a)if((c=o[a]).name===n)return c.value;return null}return this.each((e==null?U2:j2)(r,n,e))}function jd(n,e,r){var o=n._id;return n.each(function(){var a=er(this,o);(a.value||(a.value={}))[e]=r.apply(this,arguments)}),function(a){return Bn(a,o).value[e]}}function Pm(n,e){var r;return(typeof e=="number"?Nn:e instanceof po?nl:(r=po(e))?(e=r,nl):Em)(n,e)}function W2(n){return function(){this.removeAttribute(n)}}function H2(n){return function(){this.removeAttributeNS(n.space,n.local)}}function q2(n,e,r){var o,a=r+"",s;return function(){var c=this.getAttribute(n);return c===a?null:c===o?s:s=e(o=c,r)}}function G2(n,e,r){var o,a=r+"",s;return function(){var c=this.getAttributeNS(n.space,n.local);return c===a?null:c===o?s:s=e(o=c,r)}}function K2(n,e,r){var o,a,s;return function(){var c,d=r(this),u;return d==null?void this.removeAttribute(n):(c=this.getAttribute(n),u=d+"",c===u?null:c===o&&u===a?s:(a=u,s=e(o=c,d)))}}function X2(n,e,r){var o,a,s;return function(){var c,d=r(this),u;return d==null?void this.removeAttributeNS(n.space,n.local):(c=this.getAttributeNS(n.space,n.local),u=d+"",c===u?null:c===o&&u===a?s:(a=u,s=e(o=c,d)))}}function Y2(n,e){var r=Xs(n),o=r==="transform"?$2:Pm;return this.attrTween(n,typeof e=="function"?(r.local?X2:K2)(r,o,jd(this,"attr."+n,e)):e==null?(r.local?H2:W2)(r):(r.local?G2:q2)(r,o,e))}function J2(n,e){return function(r){this.setAttribute(n,e.call(this,r))}}function Q2(n,e){return function(r){this.setAttributeNS(n.space,n.local,e.call(this,r))}}function eA(n,e){var r,o;function a(){var s=e.apply(this,arguments);return s!==o&&(r=(o=s)&&Q2(n,s)),r}return a._value=e,a}function tA(n,e){var r,o;function a(){var s=e.apply(this,arguments);return s!==o&&(r=(o=s)&&J2(n,s)),r}return a._value=e,a}function nA(n,e){var r="attr."+n;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var o=Xs(n);return this.tween(r,(o.local?eA:tA)(o,e))}function rA(n,e){return function(){Ud(this,n).delay=+e.apply(this,arguments)}}function oA(n,e){return e=+e,function(){Ud(this,n).delay=e}}function aA(n){var e=this._id;return arguments.length?this.each((typeof n=="function"?rA:oA)(e,n)):Bn(this.node(),e).delay}function iA(n,e){return function(){er(this,n).duration=+e.apply(this,arguments)}}function sA(n,e){return e=+e,function(){er(this,n).duration=e}}function lA(n){var e=this._id;return arguments.length?this.each((typeof n=="function"?iA:sA)(e,n)):Bn(this.node(),e).duration}function cA(n,e){if(typeof e!="function")throw new Error;return function(){er(this,n).ease=e}}function dA(n){var e=this._id;return arguments.length?this.each(cA(e,n)):Bn(this.node(),e).ease}function uA(n,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;er(this,n).ease=r}}function fA(n){if(typeof n!="function")throw new Error;return this.each(uA(this._id,n))}function pA(n){typeof n!="function"&&(n=om(n));for(var e=this._groups,r=e.length,o=new Array(r),a=0;a<r;++a)for(var s=e[a],c=s.length,d=o[a]=[],u,p=0;p<c;++p)(u=s[p])&&n.call(u,u.__data__,p,s)&&d.push(u);return new dr(o,this._parents,this._name,this._id)}function hA(n){if(n._id!==this._id)throw new Error;for(var e=this._groups,r=n._groups,o=e.length,a=r.length,s=Math.min(o,a),c=new Array(o),d=0;d<s;++d)for(var u=e[d],p=r[d],h=u.length,g=c[d]=new Array(h),y,w=0;w<h;++w)(y=u[w]||p[w])&&(g[w]=y);for(;d<o;++d)c[d]=e[d];return new dr(c,this._parents,this._name,this._id)}function mA(n){return(n+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function gA(n,e,r){var o,a,s=mA(e)?Ud:er;return function(){var c=s(this,n),d=c.on;d!==o&&(a=(o=d).copy()).on(e,r),c.on=a}}function yA(n,e){var r=this._id;return arguments.length<2?Bn(this.node(),r).on.on(n):this.each(gA(r,n,e))}function _A(n){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==n)return;e&&e.removeChild(this)}}function wA(){return this.on("end.remove",_A(this._id))}function bA(n){var e=this._name,r=this._id;typeof n!="function"&&(n=Bd(n));for(var o=this._groups,a=o.length,s=new Array(a),c=0;c<a;++c)for(var d=o[c],u=d.length,p=s[c]=new Array(u),h,g,y=0;y<u;++y)(h=d[y])&&(g=n.call(h,h.__data__,y,d))&&("__data__"in h&&(g.__data__=h.__data__),p[y]=g,dl(p[y],e,r,y,p,Bn(h,r)));return new dr(s,this._parents,e,r)}function kA(n){var e=this._name,r=this._id;typeof n!="function"&&(n=rm(n));for(var o=this._groups,a=o.length,s=[],c=[],d=0;d<a;++d)for(var u=o[d],p=u.length,h,g=0;g<p;++g)if(h=u[g]){for(var y=n.call(h,h.__data__,g,u),w,E=Bn(h,r),N=0,V=y.length;N<V;++N)(w=y[N])&&dl(w,e,r,N,y,E);s.push(y),c.push(h)}return new dr(s,c,e,r)}var xA=_i.prototype.constructor;function vA(){return new xA(this._groups,this._parents)}function CA(n,e){var r,o,a;return function(){var s=Jo(this,n),c=(this.style.removeProperty(n),Jo(this,n));return s===c?null:s===r&&c===o?a:a=e(r=s,o=c)}}function Lm(n){return function(){this.style.removeProperty(n)}}function EA(n,e,r){var o,a=r+"",s;return function(){var c=Jo(this,n);return c===a?null:c===o?s:s=e(o=c,r)}}function SA(n,e,r){var o,a,s;return function(){var c=Jo(this,n),d=r(this),u=d+"";return d==null&&(u=d=(this.style.removeProperty(n),Jo(this,n))),c===u?null:c===o&&u===a?s:(a=u,s=e(o=c,d))}}function NA(n,e){var r,o,a,s="style."+e,c="end."+s,d;return function(){var u=er(this,n),p=u.on,h=u.value[s]==null?d||(d=Lm(e)):void 0;(p!==r||a!==h)&&(o=(r=p).copy()).on(c,a=h),u.on=o}}function BA(n,e,r){var o=(n+="")=="transform"?A2:Pm;return e==null?this.styleTween(n,CA(n,o)).on("end.style."+n,Lm(n)):typeof e=="function"?this.styleTween(n,SA(n,o,jd(this,"style."+n,e))).each(NA(this._id,n)):this.styleTween(n,EA(n,o,e),r).on("end.style."+n,null)}function VA(n,e,r){return function(o){this.style.setProperty(n,e.call(this,o),r)}}function TA(n,e,r){var o,a;function s(){var c=e.apply(this,arguments);return c!==a&&(o=(a=c)&&VA(n,c,r)),o}return s._value=e,s}function AA(n,e,r){var o="style."+(n+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(e==null)return this.tween(o,null);if(typeof e!="function")throw new Error;return this.tween(o,TA(n,e,r??""))}function $A(n){return function(){this.textContent=n}}function RA(n){return function(){var e=n(this);this.textContent=e??""}}function OA(n){return this.tween("text",typeof n=="function"?RA(jd(this,"text",n)):$A(n==null?"":n+""))}function IA(n){return function(e){this.textContent=n.call(this,e)}}function DA(n){var e,r;function o(){var a=n.apply(this,arguments);return a!==r&&(e=(r=a)&&IA(a)),e}return o._value=n,o}function MA(n){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(n==null)return this.tween(e,null);if(typeof n!="function")throw new Error;return this.tween(e,DA(n))}function PA(){for(var n=this._name,e=this._id,r=Fm(),o=this._groups,a=o.length,s=0;s<a;++s)for(var c=o[s],d=c.length,u,p=0;p<d;++p)if(u=c[p]){var h=Bn(u,e);dl(u,n,r,p,c,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new dr(o,this._parents,n,r)}function LA(){var n,e,r=this,o=r._id,a=r.size();return new Promise(function(s,c){var d={value:c},u={value:function(){--a===0&&s()}};r.each(function(){var p=er(this,o),h=p.on;h!==n&&(e=(n=h).copy(),e._.cancel.push(d),e._.interrupt.push(d),e._.end.push(u)),p.on=e}),a===0&&s()})}var FA=0;function dr(n,e,r,o){this._groups=n,this._parents=e,this._name=r,this._id=o}function Fm(){return++FA}var ur=_i.prototype;dr.prototype={constructor:dr,select:bA,selectAll:kA,selectChild:ur.selectChild,selectChildren:ur.selectChildren,filter:pA,merge:hA,selection:vA,transition:PA,call:ur.call,nodes:ur.nodes,node:ur.node,size:ur.size,empty:ur.empty,each:ur.each,on:yA,attr:Y2,attrTween:nA,style:BA,styleTween:AA,text:OA,textTween:MA,remove:wA,tween:Z2,delay:aA,duration:lA,ease:dA,easeVarying:fA,end:LA,[Symbol.iterator]:ur[Symbol.iterator]};function zA(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}var UA={time:null,delay:0,duration:250,ease:zA};function jA(n,e){for(var r;!(r=n.__transition)||!(r=r[e]);)if(!(n=n.parentNode))throw new Error(`transition ${e} not found`);return r}function ZA(n){var e,r;n instanceof dr?(e=n._id,n=n._name):(e=Fm(),(r=UA).time=Pd(),n=n==null?null:n+"");for(var o=this._groups,a=o.length,s=0;s<a;++s)for(var c=o[s],d=c.length,u,p=0;p<d;++p)(u=c[p])&&dl(u,n,e,p,c,r||jA(u,e));return new dr(o,this._parents,n,e)}_i.prototype.interrupt=z2,_i.prototype.transition=ZA;function WA(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function ul(n,e){if((r=(n=e?n.toExponential(e-1):n.toExponential()).indexOf("e"))<0)return null;var r,o=n.slice(0,r);return[o.length>1?o[0]+o.slice(2):o,+n.slice(r+1)]}function ta(n){return n=ul(Math.abs(n)),n?n[1]:NaN}function HA(n,e){return function(r,o){for(var a=r.length,s=[],c=0,d=n[0],u=0;a>0&&d>0&&(u+d+1>o&&(d=Math.max(1,o-u)),s.push(r.substring(a-=d,a+d)),!((u+=d+1)>o));)d=n[c=(c+1)%n.length];return s.reverse().join(e)}}function qA(n){return function(e){return e.replace(/[0-9]/g,function(r){return n[+r]})}}var GA=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function fl(n){if(!(e=GA.exec(n)))throw new Error("invalid format: "+n);var e;return new Zd({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}fl.prototype=Zd.prototype;function Zd(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}Zd.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function KA(n){e:for(var e=n.length,r=1,o=-1,a;r<e;++r)switch(n[r]){case".":o=a=r;break;case"0":o===0&&(o=r),a=r;break;default:if(!+n[r])break e;o>0&&(o=0);break}return o>0?n.slice(0,o)+n.slice(a+1):n}var zm;function XA(n,e){var r=ul(n,e);if(!r)return n+"";var o=r[0],a=r[1],s=a-(zm=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,c=o.length;return s===c?o:s>c?o+new Array(s-c+1).join("0"):s>0?o.slice(0,s)+"."+o.slice(s):"0."+new Array(1-s).join("0")+ul(n,Math.max(0,e+s-1))[0]}function Um(n,e){var r=ul(n,e);if(!r)return n+"";var o=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+o:o.length>a+1?o.slice(0,a+1)+"."+o.slice(a+1):o+new Array(a-o.length+2).join("0")}const jm={"%":(n,e)=>(n*100).toFixed(e),b:n=>Math.round(n).toString(2),c:n=>n+"",d:WA,e:(n,e)=>n.toExponential(e),f:(n,e)=>n.toFixed(e),g:(n,e)=>n.toPrecision(e),o:n=>Math.round(n).toString(8),p:(n,e)=>Um(n*100,e),r:Um,s:XA,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function Zm(n){return n}var Wm=Array.prototype.map,Hm=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function YA(n){var e=n.grouping===void 0||n.thousands===void 0?Zm:HA(Wm.call(n.grouping,Number),n.thousands+""),r=n.currency===void 0?"":n.currency[0]+"",o=n.currency===void 0?"":n.currency[1]+"",a=n.decimal===void 0?".":n.decimal+"",s=n.numerals===void 0?Zm:qA(Wm.call(n.numerals,String)),c=n.percent===void 0?"%":n.percent+"",d=n.minus===void 0?"−":n.minus+"",u=n.nan===void 0?"NaN":n.nan+"";function p(g){g=fl(g);var y=g.fill,w=g.align,E=g.sign,N=g.symbol,V=g.zero,D=g.width,F=g.comma,$=g.precision,W=g.trim,R=g.type;R==="n"?(F=!0,R="g"):jm[R]||($===void 0&&($=12),W=!0,R="g"),(V||y==="0"&&w==="=")&&(V=!0,y="0",w="=");var B=N==="$"?r:N==="#"&&/[boxX]/.test(R)?"0"+R.toLowerCase():"",z=N==="$"?o:/[%p]/.test(R)?c:"",q=jm[R],C=/[defgprs%]/.test(R);$=$===void 0?6:/[gprs]/.test(R)?Math.max(1,Math.min(21,$)):Math.max(0,Math.min(20,$));function A(v){var O=B,S=z,k,M,U;if(R==="c")S=q(v)+S,v="";else{v=+v;var j=v<0||1/v<0;if(v=isNaN(v)?u:q(Math.abs(v),$),W&&(v=KA(v)),j&&+v==0&&E!=="+"&&(j=!1),O=(j?E==="("?E:d:E==="-"||E==="("?"":E)+O,S=(R==="s"?Hm[8+zm/3]:"")+S+(j&&E==="("?")":""),C){for(k=-1,M=v.length;++k<M;)if(U=v.charCodeAt(k),48>U||U>57){S=(U===46?a+v.slice(k+1):v.slice(k))+S,v=v.slice(0,k);break}}}F&&!V&&(v=e(v,1/0));var G=O.length+v.length+S.length,ee=G<D?new Array(D-G+1).join(y):"";switch(F&&V&&(v=e(ee+v,ee.length?D-S.length:1/0),ee=""),w){case"<":v=O+v+S+ee;break;case"=":v=O+ee+v+S;break;case"^":v=ee.slice(0,G=ee.length>>1)+O+v+S+ee.slice(G);break;default:v=ee+O+v+S;break}return s(v)}return A.toString=function(){return g+""},A}function h(g,y){var w=p((g=fl(g),g.type="f",g)),E=Math.max(-8,Math.min(8,Math.floor(ta(y)/3)))*3,N=Math.pow(10,-E),V=Hm[8+E/3];return function(D){return w(N*D)+V}}return{format:p,formatPrefix:h}}var pl,qm,Gm;JA({thousands:",",grouping:[3],currency:["$",""]});function JA(n){return pl=YA(n),qm=pl.format,Gm=pl.formatPrefix,pl}function QA(n){return Math.max(0,-ta(Math.abs(n)))}function e$(n,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ta(e)/3)))*3-ta(Math.abs(n)))}function t$(n,e){return n=Math.abs(n),e=Math.abs(e)-n,Math.max(0,ta(e)-ta(n))+1}function Km(n,e){switch(arguments.length){case 0:break;case 1:this.range(n);break;default:this.range(e).domain(n);break}return this}function n$(n){return function(){return n}}function r$(n){return+n}var Xm=[0,1];function na(n){return n}function Wd(n,e){return(e-=n=+n)?function(r){return(r-n)/e}:n$(isNaN(e)?NaN:.5)}function o$(n,e){var r;return n>e&&(r=n,n=e,e=r),function(o){return Math.max(n,Math.min(e,o))}}function a$(n,e,r){var o=n[0],a=n[1],s=e[0],c=e[1];return a<o?(o=Wd(a,o),s=r(c,s)):(o=Wd(o,a),s=r(s,c)),function(d){return s(o(d))}}function i$(n,e,r){var o=Math.min(n.length,e.length)-1,a=new Array(o),s=new Array(o),c=-1;for(n[o]<n[0]&&(n=n.slice().reverse(),e=e.slice().reverse());++c<o;)a[c]=Wd(n[c],n[c+1]),s[c]=r(e[c],e[c+1]);return function(d){var u=qh(n,d,1,o)-1;return s[u](a[u](d))}}function Ym(n,e){return e.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function Jm(){var n=Xm,e=Xm,r=Md,o,a,s,c=na,d,u,p;function h(){var y=Math.min(n.length,e.length);return c!==na&&(c=o$(n[0],n[y-1])),d=y>2?i$:a$,u=p=null,g}function g(y){return y==null||isNaN(y=+y)?s:(u||(u=d(n.map(o),e,r)))(o(c(y)))}return g.invert=function(y){return c(a((p||(p=d(e,n.map(o),Nn)))(y)))},g.domain=function(y){return arguments.length?(n=Array.from(y,r$),h()):n.slice()},g.range=function(y){return arguments.length?(e=Array.from(y),h()):e.slice()},g.rangeRound=function(y){return e=Array.from(y),r=B2,h()},g.clamp=function(y){return arguments.length?(c=y?!0:na,h()):c!==na},g.interpolate=function(y){return arguments.length?(r=y,h()):r},g.unknown=function(y){return arguments.length?(s=y,g):s},function(y,w){return o=y,a=w,h()}}function s$(){return Jm()(na,na)}function l$(n,e,r,o){var a=gV(n,e,r),s;switch(o=fl(o??",f"),o.type){case"s":{var c=Math.max(Math.abs(n),Math.abs(e));return o.precision==null&&!isNaN(s=e$(a,c))&&(o.precision=s),Gm(o,c)}case"":case"e":case"g":case"p":case"r":{o.precision==null&&!isNaN(s=t$(a,Math.max(Math.abs(n),Math.abs(e))))&&(o.precision=s-(o.type==="e"));break}case"f":case"%":{o.precision==null&&!isNaN(s=QA(a))&&(o.precision=s-(o.type==="%")*2);break}}return qm(o)}function Qm(n){var e=n.domain;return n.ticks=function(r){var o=e();return Gh(o[0],o[o.length-1],r??10)},n.tickFormat=function(r,o){var a=e();return l$(a[0],a[a.length-1],r??10,o)},n.nice=function(r){r==null&&(r=10);var o=e(),a=0,s=o.length-1,c=o[a],d=o[s],u,p,h=10;for(d<c&&(p=c,c=d,d=p,p=a,a=s,s=p);h-- >0;){if(p=Yo(c,d,r),p===u)return o[a]=c,o[s]=d,e(o);if(p>0)c=Math.floor(c/p)*p,d=Math.ceil(d/p)*p;else if(p<0)c=Math.ceil(c*p)/p,d=Math.floor(d*p)/p;else break;u=p}return n},n}function Hd(){var n=s$();return n.copy=function(){return Ym(n,Hd())},Km.apply(n,arguments),Qm(n)}function eg(n){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/n))}}function tg(n){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*n}}function c$(n){var e=1,r=n(eg(e),tg(e));return r.constant=function(o){return arguments.length?n(eg(e=+o),tg(e)):e},Qm(r)}function qd(){var n=c$(Jm());return n.copy=function(){return Ym(n,qd()).constant(n.constant())},Km.apply(n,arguments)}function Si(n,e,r){this.k=n,this.x=e,this.y=r}Si.prototype={constructor:Si,scale:function(n){return n===1?this:new Si(this.k*n,this.x,this.y)},translate:function(n,e){return n===0&e===0?this:new Si(this.k,this.x+this.k*n,this.y+this.k*e)},apply:function(n){return[n[0]*this.k+this.x,n[1]*this.k+this.y]},applyX:function(n){return n*this.k+this.x},applyY:function(n){return n*this.k+this.y},invert:function(n){return[(n[0]-this.x)/this.k,(n[1]-this.y)/this.k]},invertX:function(n){return(n-this.x)/this.k},invertY:function(n){return(n-this.y)/this.k},rescaleX:function(n){return n.copy().domain(n.range().map(this.invertX,this).map(n.invert,n))},rescaleY:function(n){return n.copy().domain(n.range().map(this.invertY,this).map(n.invert,n))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Si.prototype;function Gd(n,e){const{width:r,height:o,margin:a,compact:s}=e;return n.replaceChildren(),s&&(n.style.height=o+"px",n.style.lineHeight=o+"px"),pm(n).append("svg").attr("width",r+a.left+a.right).attr("height",o+a.top+a.bottom).append("g").attr("transform",`translate(${a.left},${a.top})`)}function Kd(n,e,r,o){const{height:a}=r,{x:s,y:c}=o,d=pm("body").append("div").attr("class","svg-tooltip").style("position","absolute").style("visibility","hidden"),u=function(g,y){d.style("visibility","visible").text(`count: ${y.length}
|
|
36
|
+
`,Yx=["innerHTML"],Kx={class:"dropdown-list-item__title-container"},Jx={class:"dropdown-list-item__title text-s"},qx={key:0,class:"dropdown-list-item__description text-description"},Qx={key:1,class:"dropdown-list-item__icon flex-self-start"},po=t.defineComponent({__name:"DropdownListItem",props:{option:{},isSelected:{type:Boolean,default:!1},size:{default:"small"},isHovered:{type:Boolean,default:!1},useCheckbox:{type:Boolean,default:!1}},setup(n){const e=n,r=t.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=t.computed(()=>{const l=["dropdown-list-item__checkbox","flex-self-start"];return e.isSelected&&l.push("checked"),l.join(" ")}),a=t.computed(()=>e.isSelected?jx:Xx);return(l,c)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([r.value,"dropdown-list-item"])},[e.useCheckbox?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(o.value),innerHTML:a.value},null,10,Yx)):t.createCommentVNode("",!0),c[1]||(c[1]=t.createTextVNode()),t.createElementVNode("div",Kx,[t.createElementVNode("div",Jx,t.toDisplayString(l.option.label),1),c[0]||(c[0]=t.createTextVNode()),l.option.description?(t.openBlock(),t.createElementBlock("div",qx,t.toDisplayString(l.option.description),1)):t.createCommentVNode("",!0)]),c[2]||(c[2]=t.createTextVNode()),!e.useCheckbox&&e.isSelected?(t.openBlock(),t.createElementBlock("div",Qx)):t.createCommentVNode("",!0)],2))}});function bm(n){return n()}function _d(n){let e=!1;return function(...r){e||(requestAnimationFrame(()=>{n(...r),e=!1}),e=!0)}}function _m(n){return new Promise(e=>setTimeout(e,n))}function wm(n,e){const r=setTimeout(n,e);return()=>{clearTimeout(r)}}function km(n,e){return n=Math.ceil(n),e=Math.floor(e),Math.floor(Math.random()*(e-n))+n}function ev(n){let e="";for(let r=0;r<n;r++)e+=String.fromCharCode(km(65,91));return e}function xm(n){return function(e){return 1-n(1-e)}}function tv(n){return function(e){return e<.5?n(2*e)/2:(2-n(2*(1-e)))/2}}function vm(n){const{duration:e,draw:r,timing:o}=n,a=performance.now();let l=!1;return requestAnimationFrame(function c(d){let u=(d-a)/e;(u>1||l)&&(u=1);const f=o(u);r(f),u<1&&requestAnimationFrame(c)}),function(){l=!0}}function nv(n){const{getFraction:e,draw:r,timing:o}=n,a=performance.now();let l=!1;return requestAnimationFrame(function c(d){let u=e(d-a);if(l)return;u>1&&(u=1);const f=o(u);r(f),u<1&&requestAnimationFrame(c)}),function(){l=!0}}function Cm(n,e,r=!0){let o=0,a;return function(...l){a=()=>{n.apply(this,l),o=new Date().getTime()+e,a=null,r&&setTimeout(()=>{a==null||a()},e)},new Date().getTime()>o&&a()}}function rv(n){return n.map(e=>({text:String(e),value:e}))}function sr(n){if(!Array.isArray(n))throw Error("Invalid component options: "+String(n));return n.map(e=>({label:"label"in e?e.label:e.text,value:e.value,description:e.description}))}function oi(n,e){const r=_d(()=>{if(n.value){const{scrollTop:o,scrollLeft:a,scrollHeight:l,scrollWidth:c,clientHeight:d,clientWidth:u}=document.documentElement,f=n.value.getBoundingClientRect();e({scrollTop:o,scrollLeft:a,scrollHeight:l,scrollWidth:c,clientHeight:d,clientWidth:u,offsetY:o+f.y,offsetX:a+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})}});t.onMounted(r),ot(window,"scroll",r,{capture:!0,passive:!0}),ot(window,"resize",r,{passive:!0}),ot(window,"adjust",r,!0)}const ov=t.defineComponent({__name:"PlMaskIcon16",props:{name:{},size:{}},setup(n){const e=n,r=t.computed(()=>e.size==="large"?"--mask-size: 24px":""),o=t.computed(()=>`mask-16 mask-${e.name}`);return(a,l)=>(t.openBlock(),t.createElementBlock("i",{style:t.normalizeStyle(r.value),class:t.normalizeClass([o.value,a.$style.icon])},null,6))}}),av="_icon_1ugxm_2",iv={icon:av},lv={$style:iv},qt=st(ov,[["__cssModules",lv]]),sv=["onKeyup"],cv=t.defineComponent({__name:"PlBtnSplit",props:t.mergeModels({options:{},disabled:{type:Boolean},loading:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:t.mergeModels(["click"],["update:modelValue"]),setup(n,{expose:e,emit:r}){const o=n,a=r,l=t.useModel(n,"modelValue"),c=t.ref(),d=t.ref(),u=t.ref(),f=t.ref(),m=t.reactive({open:!1,optionsHeight:0,activeIndex:-1});e({data:m});const g=t.reactive({top:"0px",left:"0px",width:"0px"});t.watch(d,A=>{if(A){const B=A.getBoundingClientRect();m.optionsHeight=B.height,window.dispatchEvent(new CustomEvent("adjust"))}},{immediate:!0});const y=t.computed(()=>m.open?"mask-24 mask-chevron-up":"mask-24 mask-chevron-down"),_=t.computed(()=>(o.options??[]).findIndex(A=>Nl(A.value,l.value))),C=t.computed(()=>sr(o.options??[]).map((A,B)=>({...A,index:B,isSelected:B===_.value,isActive:B===m.activeIndex}))),N=t.computed(()=>o.loading||o.options===void 0),T=t.computed(()=>{var A;return((A=C.value.find(B=>Nl(B.value,l.value)))==null?void 0:A.label)??(o.options===void 0?"...":"")});oi(c,A=>{const B=A.top+A.height+3;B+m.optionsHeight>A.clientHeight?g.top=A.top-m.optionsHeight-3+"px":g.top=B+"px",g.left=A.left+"px",g.width=A.width+"px"});const $=A=>{var B;l.value=A,m.open=!1,(B=c==null?void 0:c.value)==null||B.focus()};function W(){a("click")}const E=A=>{var B,P;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(A.code))A.preventDefault();else return;if(A.target===f.value&&A.code==="Enter"){W();return}const{open:H,activeIndex:S}=m;if(!H&&A.target===u.value){A.code==="Enter"&&(m.open=!0);return}A.code==="Escape"&&(m.open=!1,(B=c.value)==null||B.focus());const I=t.unref(C),{length:v}=I;if(!v)return;A.code==="Enter"&&$((P=I.find(Z=>Z.index===S))==null?void 0:P.value);const L=I.findIndex(Z=>Z.index===S)??-1,V=A.code==="ArrowDown"?1:A.code==="ArrowUp"?-1:0,k=Math.abs(L+V+v)%v;m.activeIndex=C.value[k].index??-1},D=A=>{var B,P;const H=A.relatedTarget;!((B=c.value)!=null&&B.contains(H))&&!((P=d.value)!=null&&P.contains(H))&&(m.open=!1)};return(A,B)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"root",ref:c,class:t.normalizeClass([{disabled:A.disabled||N.value,loading:N.value},"pl-btn-split d-flex"]),onFocusout:D,onKeydown:E},[t.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:W,onKeyup:t.withKeys(t.withModifiers(W,["stop"]),["enter"])},t.toDisplayString(T.value),41,sv),B[1]||(B[1]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"menuActivator",ref:u,class:"pl-btn-split__icon-container d-flex align-center justify-center",tabindex:"0",onClick:B[0]||(B[0]=P=>m.open=!m.open)},[N.value?(t.openBlock(),t.createBlock(qt,{key:0,name:"loading"})):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass([y.value,"pl-btn-split__icon"])},null,2))],512),B[2]||(B[2]=t.createTextVNode()),m.open?(t.openBlock(),t.createBlock(t.Teleport,{key:0,to:"body"},[t.createElementVNode("div",{ref_key:"list",ref:d,class:"pl-dropdown__options",style:t.normalizeStyle(g),tabindex:"-1"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(C.value,(P,H)=>(t.openBlock(),t.createBlock(po,{key:H,option:P,"is-selected":P.isSelected,"is-hovered":P.isActive,size:"medium",onClick:t.withModifiers(S=>$(P.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128))],4)])):t.createCommentVNode("",!0)],34))}});function Sm(n){function e(r){const o=r.currentTarget,a=document.createElement("span"),l=Math.max(o.clientWidth,o.clientHeight),c=l/2;a.style.width=a.style.height=`${l}px`,a.style.left=`${r.clientX-o.offsetLeft-c}px`,a.style.top=`${r.clientY-o.offsetTop-c}px`,a.classList.add("ripple");const d=o.getElementsByClassName("ripple")[0];d&&d.remove(),o.appendChild(a)}t.onMounted(()=>{var r;(r=n.value)==null||r.addEventListener("click",e)})}const dv={key:0},uv={inheritAttrs:!1},Tl=t.defineComponent({...uv,__name:"BtnBase",props:{loading:{type:Boolean},small:{type:Boolean},large:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(n){const e=n,r=t.ref(),o=t.computed(()=>e.small||e.size==="small"),a=t.computed(()=>e.large||e.size==="large");return Sm(r),(l,c)=>(t.openBlock(),t.createElementBlock("button",t.mergeProps({ref_key:"btn",ref:r,tabindex:"0",class:{loading:l.loading,small:o.value,large:a.value,round:l.round,reverse:l.reverse,justifyCenter:l.justifyCenter,[l.$attrs.class+""]:!0}},{...l.$attrs,disabled:!!l.$attrs.disabled||l.loading}),[l.round?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",dv,[t.renderSlot(l.$slots,"default")])),c[0]||(c[0]=t.createTextVNode()),l.loading?(t.openBlock(),t.createBlock(t.unref(qt),{key:1,name:"loading",size:l.size},null,8,["size"])):l.icon?(t.openBlock(),t.createBlock(t.unref(qt),{key:2,name:l.icon,size:l.size},null,8,["name","size"])):t.createCommentVNode("",!0)],16))}}),pv={name:"PlBtnPrimary"},Rl=t.defineComponent({...pv,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(n){const e=n;return(r,o)=>(t.openBlock(),t.createBlock(Tl,t.mergeProps({class:"pl-btn-primary"},e),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:3},16))}}),fv={name:"PlBtnAccent"},mv=t.defineComponent({...fv,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(n){const e=n;return(r,o)=>(t.openBlock(),t.createBlock(Tl,t.mergeProps({class:"pl-btn-accent"},e),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:3},16))}}),hv={name:"PlBtnDanger"},gv=t.defineComponent({...hv,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(n){const e=n;return(r,o)=>(t.openBlock(),t.createBlock(Tl,t.mergeProps({class:"pl-btn-danger"},e),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:3},16))}}),yv={name:"PlBtnSecondary"},Il=t.defineComponent({...yv,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(n){const e=n;return(r,o)=>(t.openBlock(),t.createBlock(Tl,t.mergeProps(e,{class:"pl-btn-secondary"}),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:3},16))}}),bv=t.defineComponent({__name:"PlMaskIcon24",props:{name:{},size:{}},setup(n){const e=n,r=t.computed(()=>`mask-24 mask-${e.name}`);return(o,a)=>(t.openBlock(),t.createElementBlock("i",{class:t.normalizeClass([r.value,o.$style.icon])},null,2))}}),_v="_icon_1ugxm_2",wv={icon:_v},kv={$style:wv},at=st(bv,[["__cssModules",kv]]),xv={key:0},vv={name:"PlBtnGhost"},cr=t.defineComponent({...vv,props:{loading:{type:Boolean},size:{default:void 0},round:{type:Boolean},icon:{default:void 0},reverse:{type:Boolean},justifyCenter:{type:Boolean,default:!1}},setup(n){const e=n,r=t.computed(()=>e.size==="small"),o=t.computed(()=>e.size==="large"),a=t.ref(),l=t.useSlots();return Sm(a),(c,d)=>(t.openBlock(),t.createElementBlock("button",t.mergeProps({ref_key:"btnRef",ref:a,tabindex:"0",class:["pl-btn-ghost",{loading:c.loading,small:r.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}),[t.unref(l).default&&!c.round?(t.openBlock(),t.createElementBlock("span",xv,[t.renderSlot(c.$slots,"default")])):t.createCommentVNode("",!0),d[0]||(d[0]=t.createTextVNode()),c.loading?(t.openBlock(),t.createBlock(t.unref(at),{key:1,name:"loading",size:c.size},null,8,["size"])):c.icon?(t.openBlock(),t.createBlock(t.unref(at),{key:2,name:c.icon,size:c.size},null,8,["name","size"])):t.createCommentVNode("",!0),d[1]||(d[1]=t.createTextVNode()),t.renderSlot(c.$slots,"append")],16))}}),Cv=t.defineComponent({__name:"PlBtnLink",props:{loading:{type:Boolean},size:{},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean},disabled:{type:Boolean}},setup(n){const e=n,r=t.ref(!1);return(o,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["ui-btn-link",{disabled:o.disabled,loading:o.loading,hover:r.value}]),onMouseover:a[0]||(a[0]=l=>r.value=!0),onMouseleave:a[1]||(a[1]=l=>r.value=!1)},[t.createVNode(Il,t.mergeProps({round:"",hover:r.value},e),null,16,["hover"]),a[2]||(a[2]=t.createTextVNode()),t.renderSlot(o.$slots,"default")],34))}});function Sv(n,e){const r=t.ref();return oi(n,o=>{r.value=o}),t.computed(()=>{const o=t.unref(r),a=t.unref(e),l=a.position??"top",c=a.gap??8;if(!o)return"";const d=o.offsetY+Math.floor(o.height/2),u=o.offsetX+Math.floor(o.width/2);return l==="top-left"?`left: ${o.offsetX}px; top: ${o.offsetY-c}px;`:l==="top"?`left: ${u}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;`:l==="southwest"?`left: ${o.offsetX+o.width}px; top: ${o.offsetY+o.height+c}px;`:""})}function jo(n,e){return e(n)}function vt(n,e){if(n!=null)return e(n)}function Ev(n){return Array.isArray(n)?n:[n]}function Nv(n,e,...r){r.forEach(o=>{n[o]=e[o]})}function Al(n,e){ot(document,"click",r=>{document.contains(r.target)&&(Ev(n).map(o=>o.value).filter(o=>!!o).some(o=>o==null?void 0:o.contains(r.target))||e())})}const Vv={},Bv={class:"beak",width:"5",height:"9",viewBox:"0 0 3 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Tv(n,e){return t.openBlock(),t.createElementBlock("svg",Bv,e[0]||(e[0]=[t.createElementVNode("path",{d:"M4.00222 8.00933L0 4.00711L4.00222 0.00488281L4.00222 8.00933Z",fill:"#24223D"},null,-1)]))}const Rv=st(Vv,[["render",Tv]]),wd=new Map,Iv={name:"PlTooltip"},ct=t.defineComponent({...Iv,props:{openDelay:{default:100},closeDelay:{default:1e3},position:{default:"top"},hide:{type:Boolean},gap:{default:8},element:{default:"div"},maxWidth:{default:"300px"}},emits:["tooltip:close"],setup(n,{emit:e}){const r=e,o=Symbol(),a=n,l=t.reactive({open:!1,over:!1,tooltipOpen:!1,key:Symbol()});wd.set(o,()=>f()),t.watch(()=>l.open,T=>{requestAnimationFrame(()=>{l.tooltipOpen=T})});let c=()=>{};const d=Cm(()=>window.dispatchEvent(new CustomEvent("adjust")),1e3),u=()=>{l.open=!0;for(const[T,$]of wd.entries())T!==o&&$()},f=()=>{l.open=!1,r("tooltip:close")},m=async()=>{a.hide||(d(),l.over=!0,c(),await _m(100),l.over&&u())},g=()=>{l.over=!1,c=wm(()=>{l.over||f()},a.closeDelay)};t.watch(()=>a.hide,T=>{T&&f()});const y=t.ref(),_=t.ref(),C=Sv(y,t.toRef(a));Al([y,_],()=>f());const N=t.computed(()=>({"--pl-tooltip-max-width":a.maxWidth}));return t.onUnmounted(()=>{wd.delete(o)}),(T,$)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(T.element),t.mergeProps(T.$attrs,{ref_key:"rootRef",ref:y,onClick:m,onMouseover:m,onMouseleave:g}),{default:t.withCtx(()=>[t.renderSlot(T.$slots,"default"),$[1]||($[1]=t.createTextVNode()),T.$slots.tooltip&&l.open?(t.openBlock(),t.createBlock(t.Teleport,{key:0,to:"body"},[t.createVNode(t.Transition,{name:"tooltip-transition"},{default:t.withCtx(()=>[l.tooltipOpen?(t.openBlock(),t.createElementBlock("div",{key:0,class:"pl-tooltip__container",style:t.normalizeStyle(t.unref(C))},[t.createElementVNode("div",{ref_key:"tooltip",ref:_,class:t.normalizeClass(["pl-tooltip",T.position]),style:t.normalizeStyle(N.value),onMouseover:m,onMouseleave:g},[t.createElementVNode("div",null,[t.renderSlot(T.$slots,"tooltip")]),$[0]||($[0]=t.createTextVNode()),t.createVNode(Rv)],38)],4)):t.createCommentVNode("",!0)]),_:3})])):t.createCommentVNode("",!0)]),_:3},16))}}),Av={},Lv={class:"inner-border"};function Ov(n,e,r,o,a,l){return t.openBlock(),t.createElementBlock("div",Lv,[t.renderSlot(n.$slots,"default")])}const $v=st(Av,[["render",Ov]]),Zv={key:0},Mv=["tabindex","onKeydown","onClick"],Fv={key:1,class:"pl-btn-group__helper"},Pv={key:2,class:"pl-btn-group__error"},zv={name:"PlBtnGroup"},Em=t.defineComponent({...zv,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean},compact:{type:Boolean},helper:{},error:{}},emits:["update:modelValue"],setup(n,{emit:e}){const r=t.useSlots(),o=e,a=d=>o("update:modelValue",d),l=n,c=t.computed(()=>l.options.map(d=>({label:"label"in d?d.label:d.text,value:d.value})));return(d,u)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["pl-btn-group",{disabled:d.disabled,compact:d.compact}])},[d.label?(t.openBlock(),t.createElementBlock("label",Zv,[t.createElementVNode("span",null,t.toDisplayString(d.label),1),u[0]||(u[0]=t.createTextVNode()),t.unref(r).tooltip?(t.openBlock(),t.createBlock(t.unref(ct),{key:0,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(d.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),u[1]||(u[1]=t.createTextVNode()),t.createVNode($v,{class:"pl-btn-group__container"},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.value,(f,m)=>(t.openBlock(),t.createElementBlock("div",{key:m,class:t.normalizeClass(["pl-btn-group__option text-s",{active:d.modelValue===f.value}]),tabindex:d.modelValue===f.value||d.disabled?void 0:0,onKeydown:t.withKeys(g=>a(f.value),["enter"]),onClick:g=>a(f.value)},t.toDisplayString(f.label),43,Mv))),128))]),_:1}),u[2]||(u[2]=t.createTextVNode()),d.helper?(t.openBlock(),t.createElementBlock("div",Fv,t.toDisplayString(d.helper),1)):d.error?(t.openBlock(),t.createElementBlock("div",Pv,t.toDisplayString(d.error),1)):t.createCommentVNode("",!0)],2))}});function Dv(n,e){const r=t.ref(),o=t.ref(),{parse:a,update:l}=e,c=()=>{r.value=void 0,o.value=void 0},d=t.computed({get(){return r.value!==void 0?r.value:n.value},set(u){c();try{const f=a?a(u):u;!l||l(f)?n.value=f:r.value=f}catch(f){r.value=u,o.value=f instanceof Error?f.message:String(f)}}});return t.reactive({value:d,error:o,reset:c})}const Wv="_component_1prpy_1",Gv="_container_1prpy_15",Uv="_error_1prpy_69",kd={component:Wv,container:Gv,error:Uv},Hv={key:0},Xv=["placeholder"],jv=t.defineComponent({__name:"PlEditableTitle",props:t.mergeModels({placeholder:{default:"Title"},maxWidth:{default:"80%"},prefix:{default:void 0},maxLength:{default:1e3},minLength:{default:void 0}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=t.useModel(n,"modelValue"),r=n,o=Dv(e,{update(){return!1},parse:d=>{if(typeof d!="string")throw Error("value should be a string");if(r.maxLength&&d.length>r.maxLength)throw Error(`Max title length is ${r.maxLength} characters`);if(r.minLength&&d.length<r.minLength)throw Error(`Min title length is ${r.minLength} characters`);return d.trim()}}),a=t.computed(()=>({maxWidth:r.maxWidth??"80%"})),l=()=>{e.value=o.value&&!o.error?o.value:e.value,o.reset()},c=t.ref();return(d,u)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["pl-editable-title",t.unref(kd).component]),style:t.normalizeStyle(a.value)},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(kd).container),onClick:u[3]||(u[3]=()=>{var f;return(f=c.value)==null?void 0:f.focus()})},[d.prefix?(t.openBlock(),t.createElementBlock("span",Hv,t.toDisplayString(d.prefix.trim())+" ",1)):t.createCommentVNode("",!0),u[4]||(u[4]=t.createTextVNode()),t.withDirectives(t.createElementVNode("input",{ref_key:"inputRef",ref:c,"onUpdate:modelValue":u[0]||(u[0]=f=>t.unref(o).value=f),placeholder:d.placeholder,onFocusout:l,onKeydown:[u[1]||(u[1]=t.withKeys((...f)=>t.unref(o).reset&&t.unref(o).reset(...f),["escape"])),u[2]||(u[2]=t.withKeys(f=>{var m;return(m=f.target)==null?void 0:m.blur()},["enter"]))]},null,40,Xv),[[t.vModelText,t.unref(o).value]])],2),u[5]||(u[5]=t.createTextVNode()),t.unref(o).error?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(kd).error)},t.toDisplayString(t.unref(o).error),3)):t.createCommentVNode("",!0)],6))}}),Yv={inheritAttrs:!1},Kv={class:"double-contour"};function Jv(n,e,r,o,a,l){return t.openBlock(),t.createElementBlock("div",Kv,[t.createElementVNode("div",t.normalizeProps(t.guardReactiveProps(n.$attrs)),[t.renderSlot(n.$slots,"default")],16)])}const dr=st(Yv,[["render",Jv]]);function Nm(n){t.onMounted(n),t.onUpdated(n)}const xd=new WeakMap,vd=new ResizeObserver(n=>{for(const e of n)vt(xd.get(e.target),r=>r(e))});function Vm(n,e){xd.set(n,e),vd.unobserve(n),vd.observe(n)}function Bm(n){vd.unobserve(n),xd.delete(n)}const qv=8,Tm=4;function Kn(n,e="label"){const r=new Set;Nm(()=>{vt(n==null?void 0:n.value,o=>{const a=o.querySelector(e);a&&(r.add(a),Vm(a,()=>{const l=bm(()=>a.getBoundingClientRect().width+jo(qv,c=>Number.isNaN(c)?Tm:c+Tm));o.style.getPropertyValue("--label-offset-right-x")!==`${l}px`&&o.style.setProperty("--label-offset-right-x",`${l}px`)}))})}),t.onBeforeUnmount(()=>{Array.from(r.values()).map(o=>Bm(o))})}function Qv(n,e){const r=[];return e&&e.length>0&&e.forEach(o=>{const a=o(n);typeof a=="string"&&r.push(a)}),{isValid:r.length===0,errors:r}}function Rm(n,e){return t.computed(()=>Qv(n.value,e))}const eC=t.defineComponent({__name:"PlIcon16",props:{name:{},size:{}},setup(n){const e=n,r=t.computed(()=>e.size==="large"?"--icon-size: 24px":""),o=t.computed(()=>`icon-16 icon-${e.name}`);return(a,l)=>(t.openBlock(),t.createElementBlock("i",{style:t.normalizeStyle(r.value),class:t.normalizeClass([o.value,a.$style.icon])},null,6))}}),tC="_icon_1ugxm_2",nC={icon:tC},rC={$style:nC},Or=st(eC,[["__cssModules",rC]]),oC={class:"pl-text-field__envelope"},aC={key:0,ref:"label"},iC={key:0,class:"required-icon"},lC={key:1,class:"pl-text-field__prefix"},sC=["disabled","placeholder","type"],cC={key:0,class:"pl-text-field__error"},dC={key:1,class:"pl-text-field__helper"},uC={name:"PlTextField"},fo=t.defineComponent({...uC,props:t.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(n){const e=t.useSlots(),r=t.useModel(n,"modelValue"),o=n,a=t.ref(void 0),l=t.ref(),c=t.ref(!1),d=t.reactive({cached:void 0}),u=t.computed({get(){return d.cached?d.cached.value:r.value===void 0||r.value===null?"":String(r.value)},set(A){if(d.cached=void 0,o.parse)try{r.value=o.parse(A)}catch(B){d.cached={error:B instanceof Error?B.message:String(B),value:A}}else r.value=A}}),f=t.computed(()=>o.type&&o.type==="password"?c.value?"text":o.type:"text"),m=t.computed(()=>c.value?"view-show":"view-hide"),g=()=>{o.clearable&&(d.cached=void 0,r.value=o.clearable===!0?"":o.clearable())},y=Rm(u,o.rules||[]),_=t.computed(()=>o.clearable?o.clearable===!0?r.value==="":r.value===o.clearable():r.value===""),C=t.computed(()=>!_.value),N=t.computed(()=>{const A=[];return o.error&&A.push(o.error),d.cached&&A.push(d.cached.error),y.value.isValid||A.push(...y.value.errors),A}),T=t.computed(()=>N.value.length>0),$=t.computed(()=>o.clearable&&C.value&&o.type!=="password"&&!o.disabled),W=()=>c.value=!c.value,E=()=>{d.cached=void 0},D=()=>{var A;return(A=l.value)==null?void 0:A.focus()};return Kn(a),(A,B)=>(t.openBlock(),t.createElementBlock("div",oC,[t.createElementVNode("div",{ref_key:"rootRef",ref:a,class:t.normalizeClass(["pl-text-field",{error:T.value,disabled:A.disabled,dashed:A.dashed,nonEmpty:C.value}])},[A.label?(t.openBlock(),t.createElementBlock("label",aC,[A.required?(t.openBlock(),t.createElementBlock("i",iC)):t.createCommentVNode("",!0),B[1]||(B[1]=t.createTextVNode()),t.createElementVNode("span",null,t.toDisplayString(A.label),1),B[2]||(B[2]=t.createTextVNode()),t.unref(e).tooltip?(t.openBlock(),t.createBlock(t.unref(ct),{key:1,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(A.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)],512)):t.createCommentVNode("",!0),B[5]||(B[5]=t.createTextVNode()),A.prefix?(t.openBlock(),t.createElementBlock("div",lC,t.toDisplayString(A.prefix),1)):t.createCommentVNode("",!0),B[6]||(B[6]=t.createTextVNode()),t.withDirectives(t.createElementVNode("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":B[0]||(B[0]=P=>u.value=P),disabled:A.disabled,placeholder:A.placeholder||"...",type:f.value,spellcheck:"false",onFocusout:E},null,40,sC),[[t.vModelDynamic,u.value]]),B[7]||(B[7]=t.createTextVNode()),t.createElementVNode("div",{class:"pl-text-field__append",onClick:D},[$.value?(t.openBlock(),t.createBlock(t.unref(Or),{key:0,class:"pl-text-field__clearable",name:"delete-clear",onClick:t.withModifiers(g,["stop"])})):t.createCommentVNode("",!0),B[3]||(B[3]=t.createTextVNode()),A.type==="password"?(t.openBlock(),t.createBlock(t.unref(at),{key:1,name:m.value,style:{cursor:"pointer"},onClick:t.withModifiers(W,["stop"])},null,8,["name"])):t.createCommentVNode("",!0),B[4]||(B[4]=t.createTextVNode()),t.renderSlot(A.$slots,"append")]),B[8]||(B[8]=t.createTextVNode()),t.createVNode(dr,{class:"pl-text-field__contour"})],2),B[9]||(B[9]=t.createTextVNode()),T.value?(t.openBlock(),t.createElementBlock("div",cC,t.toDisplayString(N.value.join(" ")),1)):A.helper?(t.openBlock(),t.createElementBlock("div",dC,t.toDisplayString(A.helper),1)):t.createCommentVNode("",!0)]))}}),pC=t.defineComponent({__name:"PlIcon24",props:{name:{},size:{}},setup(n){const e=n,r=t.computed(()=>`icon-24 icon-${e.name}`);return(o,a)=>(t.openBlock(),t.createElementBlock("i",{class:t.normalizeClass([r.value,o.$style.icon])},null,2))}}),fC="_icon_1ugxm_2",mC={icon:fC},hC={$style:mC},Yo=st(pC,[["__cssModules",hC]]),gC=["disabled","placeholder"],yC=t.defineComponent({__name:"PlSearchField",props:{modelValue:{},clearable:{type:Boolean},placeholder:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:e}){const r=e,o=n,a=t.ref(void 0),l=t.ref(),c=t.computed({get(){return o.modelValue??""},set(f){r("update:modelValue",f)}}),d=t.computed(()=>!!o.modelValue),u=()=>r("update:modelValue","");return(f,m)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"root",ref:a,class:t.normalizeClass(["pl-search-field",[f.$style.component]])},[t.createVNode(t.unref(Yo),{name:"search"}),m[1]||(m[1]=t.createTextVNode()),t.withDirectives(t.createElementVNode("input",{ref_key:"input",ref:l,"onUpdate:modelValue":m[0]||(m[0]=g=>c.value=g),disabled:f.disabled,type:"text",placeholder:f.placeholder||"Find...",spellcheck:"false"},null,8,gC),[[t.vModelText,c.value]]),m[2]||(m[2]=t.createTextVNode()),f.clearable&&d.value?(t.openBlock(),t.createBlock(t.unref(Or),{key:0,class:t.normalizeClass(f.$style.clear),name:"delete-clear",onClick:t.withModifiers(u,["stop"])},null,8,["class"])):t.createCommentVNode("",!0)],2))}}),bC="_component_pz0lo_1",_C="_clear_pz0lo_35",wC={component:bC,clear:_C},kC={$style:wC},Im=st(yC,[["__cssModules",kC]]),xC={class:"ui-text-area__envelope"},vC={key:0,ref:"label"},CC={key:0,class:"required-icon"},SC=["readonly","rows","disabled","placeholder"],EC={class:"ui-text-area__append"},NC={key:0,class:"ui-text-area__error"},VC={key:1,class:"ui-text-area__helper"},BC={name:"PlTextArea"},TC=t.defineComponent({...BC,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(n,{emit:e}){const r=t.useSlots(),o=e,a=n,l=t.ref(),c=t.ref(),d=t.computed({get(){return a.modelValue??""},set(_){o("update:modelValue",_)}}),u=t.computed(()=>!!a.modelValue),f=Rm(d,a.rules||[]);Kn(l);const m=t.computed(()=>{const _=[];return a.error&&_.push(a.error),_.push(...f.value.errors),_}),g=t.computed(()=>m.value.length>0),y=()=>{if(!a.autogrow)return;const _=c.value;_&&(_.style.height="auto",_.style.height=`${_.scrollHeight}px`)};return t.onMounted(()=>{y()}),(_,C)=>(t.openBlock(),t.createElementBlock("div",xC,[t.createElementVNode("div",{ref_key:"root",ref:l,class:t.normalizeClass(["ui-text-area",{error:g.value,disabled:_.disabled,dashed:_.dashed,nonEmpty:u.value}])},[_.label?(t.openBlock(),t.createElementBlock("label",vC,[_.required?(t.openBlock(),t.createElementBlock("i",CC)):t.createCommentVNode("",!0),C[1]||(C[1]=t.createTextVNode()),t.createElementVNode("span",null,t.toDisplayString(_.label),1),C[2]||(C[2]=t.createTextVNode()),t.unref(r).tooltip?(t.openBlock(),t.createBlock(t.unref(ct),{key:1,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(_.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)],512)):t.createCommentVNode("",!0),C[3]||(C[3]=t.createTextVNode()),t.withDirectives(t.createElementVNode("textarea",{ref_key:"input",ref:c,"onUpdate:modelValue":C[0]||(C[0]=N=>d.value=N),readonly:_.readonly,rows:_.rows,disabled:_.disabled,placeholder:_.placeholder??"...",spellcheck:"false",onInput:y},null,40,SC),[[t.vModelText,d.value]]),C[4]||(C[4]=t.createTextVNode()),t.createElementVNode("div",EC,[t.renderSlot(_.$slots,"append")]),C[5]||(C[5]=t.createTextVNode()),t.createVNode(dr,{class:"ui-text-area__contour"})],2),C[6]||(C[6]=t.createTextVNode()),g.value?(t.openBlock(),t.createElementBlock("div",NC,t.toDisplayString(m.value.join(" ")),1)):_.helper?(t.openBlock(),t.createElementBlock("div",VC,t.toDisplayString(_.helper),1)):t.createCommentVNode("",!0)]))}});function Am(n){return n!==null&&typeof n=="object"}function ft(n,e){return Am(n)&&Am(e)?Object.keys(n).length!==Object.keys(e).length?!1:Object.keys(n).every(r=>ft(n[r],e[r])):n===e}function Lm(n,e){return n.some(r=>ft(r,e))}const Ll=t.defineComponent({__name:"LongText",setup(n){t.useCssVars(m=>({"5deba9de":c.value}));const e=t.ref(!1),r=t.ref(),o=t.ref(!1),a=t.computed(()=>o.value&&e.value?"ui-lt-animate":""),l=im(m=>o.value=m,500),c=t.computed(()=>{var m;return r.value?`${((m=r.value)==null?void 0:m.innerHTML.length)*.4}s`:"5s"});function d(){const m=Uo(r.value,"span cannot be empty");e.value=m.clientWidth<m.scrollWidth}function u(){d(),l(!0)}function f(){l(!1)}return(m,g)=>(t.openBlock(),t.createElementBlock("div",t.mergeProps(m.$attrs,{class:"ui-lt-container"}),[t.createElementVNode("span",{onMouseover:u,onMouseleave:f},[t.createElementVNode("span",{ref_key:"span",ref:r,class:t.normalizeClass(a.value)},[t.renderSlot(m.$slots,"default")],2)],32)],16))}});function Om(n,e){const r=n.scrollTop,o=n.getBoundingClientRect().height,a=e.offsetTop,l=e.getBoundingClientRect().height;return a+l<o+r&&a>r}function $m(n,e){const r=n.scrollTop,o=n.getBoundingClientRect().height,a=e.offsetTop,l=e.getBoundingClientRect().height;return a+l<o+r?"ceil":a>r?"floor":"visible"}function Ol(n,e,r={}){const o=n.scrollTop,a=n.getBoundingClientRect().height,l=e.getBoundingClientRect().height,c=e.offsetTop,d=$m(n,e);if(d==="visible")return;const u=f=>{const m=d==="floor"?c-(a-l):c;n.scrollTop=o+f*(m-o)};Om(n,e)||vm({duration:r.duration||100,timing:xm(f=>f),draw:u})}function Cd(n,e,r,o){return n.addEventListener(e,r,o),function(){n.removeEventListener(e,r)}}function RC(n,e){const r=e.getBoundingClientRect();return n.x<r.x||n.x>r.x+r.width||n.y<r.y||n.y>r.y+r.height}const $l=t.defineComponent({__name:"DropdownOverlay",props:{root:{},gap:{}},setup(n,{expose:e}){const r=n,o=t.reactive({optionsHeight:0}),a=t.reactive({top:"0px",left:"0px",width:"0px"}),l=t.toRef(r,"root"),c=t.ref();return e({scrollIntoActive:()=>{const d=c.value;d&&Ar(d.querySelector(".hovered-item"),u=>{Ol(d,u)})},listRef:c}),t.watch(c,d=>{d&&requestAnimationFrame(()=>{const u=d.getBoundingClientRect();o.optionsHeight=u.height,window.dispatchEvent(new CustomEvent("adjust"))})}),oi(l,d=>{const u=document.body.getBoundingClientRect(),f=d.top-u.top,m=d.left-u.left,g=r.gap??0,y=f+d.height+g;y+o.optionsHeight>d.clientHeight?a.top=f-o.optionsHeight-g+"px":a.top=y+"px",a.left=m+"px",a.width=d.width+"px"}),(d,u)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createElementVNode("div",t.mergeProps({ref_key:"listRef",ref:c},d.$attrs,{style:a,tabindex:"-1"}),[t.renderSlot(d.$slots,"default",{ref:"list"})],16)]))}}),IC=["tabindex"],AC={class:"pl-dropdown__container"},LC={class:"pl-dropdown__field"},OC=["disabled","placeholder"],$C={key:0,class:"input-value"},ZC={class:"pl-dropdown__controls"},MC={key:2,class:"arrow-icon arrow-icon-default"},FC={key:0},PC={key:0,class:"required-icon"},zC={key:0,class:"nothing-found"},DC={key:0,class:"pl-dropdown__error"},WC={key:1,class:"pl-dropdown__helper"},GC={key:2,class:"pl-dropdown__helper"},UC={name:"PlDropdown"},$r=t.defineComponent({...UC,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(n,{emit:e}){const r=e,o=n,a=t.useSlots(),l=t.ref(),c=t.ref(),d=t.useTemplateRef("overlay"),u=t.reactive({search:"",activeIndex:-1,open:!1,optionsHeight:0}),f=()=>jo(E.value.findIndex(L=>ft(L.value,o.modelValue)),L=>L<0?0:L),m=()=>u.activeIndex=f(),g=t.computed(()=>o.options===void 0),y=t.computed(()=>g.value?!0:o.disabled),_=t.computed(()=>(o.options??[]).findIndex(L=>ft(L.value,o.modelValue))),C=t.computed(()=>{if(!g.value){if(o.error)return o.error;if(o.modelValue!==void 0&&_.value===-1)return"The selected value is not one of the options"}}),N=t.computed(()=>sr(o.options??[]).map((L,V)=>({...L,index:V,isSelected:V===_.value,isActive:V===u.activeIndex}))),T=t.computed(()=>{const L=t.unref(N).find(V=>ft(V.value,o.modelValue));return(L==null?void 0:L.label)||o.modelValue}),$=t.computed(()=>!u.open&&o.modelValue?"":o.modelValue?String(T.value):o.placeholder),W=t.computed(()=>o.modelValue!==void 0&&o.modelValue!==null),E=t.computed(()=>{const L=N.value;return u.search?L.filter(V=>{const k=u.search.toLowerCase();return V.label.toLowerCase().includes(k)||V.description&&V.description.toLowerCase().includes(k)?!0:typeof V.value=="string"?V.value.toLowerCase().includes(k):V.value===u.search}):L}),D=t.computed(()=>y.value?void 0:"0"),A=L=>{var V;r("update:modelValue",L),u.search="",u.open=!1,(V=l==null?void 0:l.value)==null||V.focus()},B=()=>r("update:modelValue",void 0),P=()=>{var L;return(L=c.value)==null?void 0:L.focus()},H=()=>{u.open=!u.open,u.open||(u.search="")},S=()=>u.open=!0,I=L=>{var V,k,Z;const U=L.relatedTarget;!((V=l.value)!=null&&V.contains(U))&&!((Z=(k=d.value)==null?void 0:k.listRef)!=null&&Z.contains(U))&&(u.search="",u.open=!1)},v=L=>{var V,k;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(L.code))L.preventDefault();else return;const{open:Z,activeIndex:U}=u;if(!Z){L.code==="Enter"&&(u.open=!0);return}L.code==="Escape"&&(u.open=!1,(V=l.value)==null||V.focus());const F=t.unref(E),{length:j}=F;if(!j)return;L.code==="Enter"&&A((k=F.find(Ce=>Ce.index===U))==null?void 0:k.value);const ee=F.findIndex(Ce=>Ce.index===U)??-1,ue=L.code==="ArrowDown"?1:L.code==="ArrowUp"?-1:0,ye=Math.abs(ee+ue+j)%j;u.activeIndex=E.value[ye].index??-1};return Kn(l),t.watch(()=>o.modelValue,m,{immediate:!0}),t.watch(()=>u.open,L=>{var V;return L?(V=c.value)==null?void 0:V.focus():""}),t.watchPostEffect(()=>{var L;u.search,u.activeIndex>=0&&u.open&&((L=d.value)==null||L.scrollIntoActive())}),(L,V)=>(t.openBlock(),t.createElementBlock("div",{class:"pl-dropdown__envelope",onClick:P},[t.createElementVNode("div",{ref_key:"rootRef",ref:l,tabindex:D.value,class:t.normalizeClass(["pl-dropdown",{open:u.open,error:L.error,disabled:y.value}]),onKeydown:v,onFocusout:I},[t.createElementVNode("div",AC,[t.createElementVNode("div",LC,[t.withDirectives(t.createElementVNode("input",{ref_key:"input",ref:c,"onUpdate:modelValue":V[0]||(V[0]=k=>u.search=k),type:"text",tabindex:"-1",disabled:y.value,placeholder:$.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:S},null,40,OC),[[t.vModelText,u.search]]),V[4]||(V[4]=t.createTextVNode()),u.open?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",$C,[t.createVNode(Ll,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(T.value),1)]),_:1})])),V[5]||(V[5]=t.createTextVNode()),t.createElementVNode("div",ZC,[g.value?(t.openBlock(),t.createBlock(t.unref(at),{key:0,name:"loading"})):t.createCommentVNode("",!0),V[1]||(V[1]=t.createTextVNode()),L.clearable&&W.value?(t.openBlock(),t.createBlock(t.unref(Or),{key:1,name:"delete-clear",onClick:t.withModifiers(B,["stop"])})):t.createCommentVNode("",!0),V[2]||(V[2]=t.createTextVNode()),t.renderSlot(L.$slots,"append"),V[3]||(V[3]=t.createTextVNode()),t.createElementVNode("div",{class:"pl-dropdown__arrow-wrapper",onClick:t.withModifiers(H,["stop"])},[L.arrowIconLarge?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["arrow-icon",[`icon-24 ${L.arrowIconLarge}`]])},null,2)):L.arrowIcon?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["arrow-icon",[`icon-16 ${L.arrowIcon}`]])},null,2)):(t.openBlock(),t.createElementBlock("div",MC))])])]),V[9]||(V[9]=t.createTextVNode()),L.label?(t.openBlock(),t.createElementBlock("label",FC,[L.required?(t.openBlock(),t.createElementBlock("i",PC)):t.createCommentVNode("",!0),V[6]||(V[6]=t.createTextVNode()),t.createElementVNode("span",null,t.toDisplayString(L.label),1),V[7]||(V[7]=t.createTextVNode()),t.unref(a).tooltip?(t.openBlock(),t.createBlock(t.unref(ct),{key:1,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(L.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),V[10]||(V[10]=t.createTextVNode()),u.open?(t.openBlock(),t.createBlock(t.unref($l),{key:1,ref:"overlay",root:l.value,class:"pl-dropdown__options",tabindex:"-1",gap:3},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(E.value,(k,Z)=>(t.openBlock(),t.createBlock(po,{key:Z,option:k,"is-selected":k.isSelected,"is-hovered":k.isActive,size:L.optionSize,onClick:t.withModifiers(U=>A(k.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),V[8]||(V[8]=t.createTextVNode()),E.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",zC,"Nothing found"))]),_:1},8,["root"])):t.createCommentVNode("",!0),V[11]||(V[11]=t.createTextVNode()),t.createVNode(dr,{class:"pl-dropdown__contour"})])],42,IC),V[12]||(V[12]=t.createTextVNode()),C.value?(t.openBlock(),t.createElementBlock("div",DC,t.toDisplayString(C.value),1)):g.value&&L.loadingOptionsHelper?(t.openBlock(),t.createElementBlock("div",WC,t.toDisplayString(L.loadingOptionsHelper),1)):L.helper?(t.openBlock(),t.createElementBlock("div",GC,t.toDisplayString(L.helper),1)):t.createCommentVNode("",!0)]))}}),HC={name:"PlDropdownRef"},XC=t.defineComponent({...HC,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(n){const e=t.useSlots(),r=n,o=t.computed(()=>{var l;return(l=r.options)==null?void 0:l.map(c=>({label:c.label,value:c.ref}))}),a=t.computed(()=>r.disabled?"icon-link-disabled":"icon-link");return(l,c)=>(t.openBlock(),t.createBlock(t.unref($r),t.mergeProps(r,{options:o.value,"loading-options-helper":l.loadingOptionsHelper,"arrow-icon-large":a.value,"onUpdate:modelValue":c[0]||(c[0]=d=>l.$emit("update:modelValue",d))}),t.createSlots({_:2},[t.unref(e).tooltip?{name:"tooltip",fn:t.withCtx(()=>[t.renderSlot(l.$slots,"tooltip")]),key:"0"}:void 0]),1040,["options","loading-options-helper","arrow-icon-large"]))}});function jC(n,e){return t.computed(()=>{const r=sr(n.value);return e.value?r.filter(o=>o.label.toLowerCase().includes(e.value.toLowerCase())):r})}const YC={class:"resizable-input"},KC=["placeholder","value","disabled"],JC=t.defineComponent({__name:"ResizableInput",props:{modelValue:{},placeholder:{},disabled:{type:Boolean},maxWidth:{},width:{}},emits:["update:modelValue"],setup(n,{emit:e}){const r=n,o=e,a=t.computed(()=>{var d;return r.placeholder?r.placeholder:(d=r.modelValue)==null?void 0:d.replace('"',"")}),l=t.computed(()=>{const d={};return r.width&&(d.width=r.width),r.maxWidth&&(d.maxWidth=r.maxWidth),d});function c(d){o("update:modelValue",d.target.value)}return(d,u)=>(t.openBlock(),t.createElementBlock("div",YC,[t.createElementVNode("span",{style:t.normalizeStyle(l.value),class:"resizable-input__size-span"},t.toDisplayString(a.value),5),u[0]||(u[0]=t.createTextVNode()),t.createElementVNode("input",t.mergeProps(d.$attrs,{placeholder:d.placeholder,value:r.modelValue,disabled:r.disabled,style:l.value,onInput:c}),null,16,KC)]))}}),qC={class:"dropdown-tab-item__title text-caps13"},QC=t.defineComponent({__name:"TabItem",props:{option:{},isSelected:{type:Boolean,default:!1},isHovered:{type:Boolean,default:!1}},setup(n){const e=n,r=t.computed(()=>e.option.label),o=t.computed(()=>{const a=[];return e.isSelected&&a.push("dropdown-tab-item__selected"),e.isHovered&&a.push("hovered-item"),a.join(" ")});return(a,l)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([o.value,"dropdown-tab-item"])},[t.createElementVNode("div",qC,t.toDisplayString(r.value),1)],2))}}),eS={class:"pl-line-dropdown__prefix"},tS={class:"pl-line-dropdown__icon-wrapper"},nS={class:"pl-line-dropdown__icon"},rS={key:0,class:"pl-line-dropdown__no-item"},oS={key:0,class:"pl-line-dropdown__no-item"},Sd=t.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(n,{emit:e}){const r=e,o=n,a=t.reactive({isOpen:!1,activeOption:-1,optionsHeight:0}),l=t.ref(),c=t.ref(),d=t.computed(()=>{const I=[];return a.isOpen&&I.push("open"),o.disabled&&I.push("disabled"),I.join(" ")}),u=t.ref(""),f=jC(t.toRef(o,"options"),u),m=t.computed(()=>!!(o.clearable&&a.isOpen&&o.modelValue&&g.value)),g=t.computed(()=>{if(o.modelValue){const I=C();if(I!==-1)return sr(o.options)[I].label}return""}),y=t.ref(g.value);t.watch(g,I=>{y.value=I});const _=t.computed(()=>a.isOpen&&u.value&&u.value.length>=g.value.length-1?u.value:g.value||"...");Al(l,()=>{o.mode==="list"&&(a.isOpen=!1)}),t.watch(()=>y.value,I=>{g.value!==I?u.value=I:u.value=""}),t.watch(()=>a.isOpen,I=>{var v;I&&l.value&&((v=l.value.querySelector("input"))==null||v.focus(),t.nextTick(()=>P()))}),t.watch(()=>o.modelValue,()=>N(),{immediate:!0});function C(){return o.options.findIndex(I=>ft(I.value,o.modelValue))}function N(){a.activeOption=jo(f.value.findIndex(I=>ft(I.value,o.modelValue)),I=>I<0?0:I)}function T(){u.value=""}function $(){o.disabled?a.isOpen=!1:t.nextTick(()=>{a.isOpen=!a.isOpen})}function W(){o.mode==="list"&&(a.isOpen=!1)}function E(I){I&&(r("update:modelValue",I.value),W(),T())}function D(I){return ft(I.value,o.modelValue)}const A=I=>{var v,L;const V=I.relatedTarget;!((v=l.value)!=null&&v.contains(V))&&!((L=c.value)!=null&&L.contains(V))&&(u.value="",a.isOpen=!1)};function B(I){const{activeOption:v}=a;if(!a.isOpen&&I.code==="Enter"){a.isOpen=!0;return}const{length:L}=f.value;if(!L)return;["ArrowDown","ArrowUp","Enter"].includes(I.code)&&I.preventDefault(),I.code==="Enter"&&E(f.value[v]);const V=I.code==="ArrowDown"?1:I.code==="ArrowUp"?-1:0;a.activeOption=Math.abs(v+V+L)%L,requestAnimationFrame(P)}function P(){const I=c.value;I&&vt(I.querySelector(".hovered-item"),v=>{o.mode==="list"?Ol(I,v):v.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}function H(){r("update:modelValue",void 0)}const S=t.reactive({top:"0px",left:"0px"});return t.watch(c,I=>{if(I){const v=I.getBoundingClientRect();a.optionsHeight=v.height,window.dispatchEvent(new CustomEvent("adjust"))}}),oi(l,I=>{const v=I.top+I.height+2;v+a.optionsHeight>I.clientHeight?S.top=I.top-a.optionsHeight-2+"px":S.top=v+"px",S.left=I.left+"px"}),(I,v)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"container",ref:l,tabindex:"0",class:t.normalizeClass([d.value,"pl-line-dropdown uc-pointer"]),onKeydown:B,onFocusout:A,onClick:$},[t.createElementVNode("div",eS,t.toDisplayString(o==null?void 0:o.prefix),1),v[6]||(v[6]=t.createTextVNode()),t.createVNode(JC,{modelValue:y.value,"onUpdate:modelValue":v[0]||(v[0]=L=>y.value=L),placeholder:_.value,disabled:o.disabled,class:"pl-line-dropdown__input"},null,8,["modelValue","placeholder","disabled"]),v[7]||(v[7]=t.createTextVNode()),t.createElementVNode("div",tS,[t.withDirectives(t.createElementVNode("div",nS,null,512),[[t.vShow,!m.value]]),v[1]||(v[1]=t.createTextVNode()),t.withDirectives(t.createElementVNode("div",{class:"pl-line-dropdown__icon-clear",onClick:H},null,512),[[t.vShow,m.value]])]),v[8]||(v[8]=t.createTextVNode()),a.isOpen?(t.openBlock(),t.createBlock(t.Teleport,{key:0,to:"body"},[o.mode==="list"?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"list",ref:c,style:t.normalizeStyle(S),tabindex:"-1",class:"pl-line-dropdown__items",onFocusout:A},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(f),(L,V)=>t.renderSlot(I.$slots,"item",{key:V,item:L,textItem:"text",isSelected:D(L),isHovered:a.activeOption==V,onClick:t.withModifiers(k=>E(L),["stop"])},()=>[t.createVNode(po,{option:L,"text-item":"text","is-selected":D(L),"is-hovered":a.activeOption==V,size:"medium",onClick:t.withModifiers(k=>E(L),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),v[3]||(v[3]=t.createTextVNode()),t.unref(f).length===0?(t.openBlock(),t.createElementBlock("div",rS,v[2]||(v[2]=[t.createElementVNode("div",{class:"pl-line-dropdown__no-item-title text-s"},"Didn't find anything that matched",-1)]))):t.createCommentVNode("",!0)],36)):o.mode==="tabs"?(t.openBlock(),t.createElementBlock("div",{key:1,ref_key:"list",ref:c,style:t.normalizeStyle(S),tabindex:"-1",class:"pl-line-dropdown__items-tabs",onFocusout:A},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(f),(L,V)=>t.renderSlot(I.$slots,"item",{key:V,item:L,isSelected:D(L),isHovered:a.activeOption==V,onClick:t.withModifiers(k=>E(L),["stop"])},()=>[t.createVNode(QC,{option:L,"is-selected":D(L),"is-hovered":a.activeOption==V,onClick:t.withModifiers(k=>E(L),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),v[5]||(v[5]=t.createTextVNode()),t.unref(f).length===0?(t.openBlock(),t.createElementBlock("div",oS,v[4]||(v[4]=[t.createElementVNode("div",{class:"pl-line-dropdown__no-item-title text-s"},"Didn't find anything that matched",-1)]))):t.createCommentVNode("",!0)],36)):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)],34))}}),aS={class:"ui-dropdown__envelope"},iS=["tabindex"],lS={class:"ui-dropdown__container"},sS={class:"ui-dropdown__field"},cS=["disabled","placeholder"],dS={class:"ui-dropdown__controls"},uS={key:0},pS={key:0,class:"required-icon"},fS={key:0,class:"nothing-found"},mS={key:0,class:"ui-dropdown__error"},hS={key:1,class:"ui-dropdown__helper"},gS={key:2,class:"ui-dropdown__helper"},yS={name:"PlDropdown"},bS=t.defineComponent({...yS,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(n,{emit:e}){const r=e,o=n,a=t.useSlots(),l=t.ref(),c=t.ref(),d=t.ref(),u=t.reactive({search:"",activeIndex:-1,open:!1}),f=()=>jo(E.value.findIndex(V=>ft(V.value,o.modelValue)),V=>V<0?0:V),m=()=>u.activeIndex=f(),g=t.computed(()=>o.options===void 0),y=t.computed(()=>g.value?!0:o.disabled),_=t.computed(()=>(o.options??[]).findIndex(V=>ft(V.value,o.modelValue))),C=t.computed(()=>{if(!g.value){if(o.error)return o.error;if(o.modelValue!==void 0&&_.value===-1)return"The selected value is not one of the options"}}),N=t.computed(()=>sr(o.options??[]).map((V,k)=>({...V,index:k,isSelected:k===_.value,isActive:k===u.activeIndex}))),T=t.computed(()=>{const V=t.unref(N).find(k=>ft(k.value,o.modelValue));return(V==null?void 0:V.label)||o.modelValue}),$=t.computed(()=>!u.open&&o.modelValue?"":o.modelValue?String(T.value):o.placeholder),W=t.computed(()=>o.modelValue!==void 0&&o.modelValue!==null),E=t.computed(()=>{const V=N.value;return u.search?V.filter(k=>{const Z=u.search.toLowerCase();return k.label.toLowerCase().includes(Z)||k.description&&k.description.toLowerCase().includes(Z)?!0:typeof k.value=="string"?k.value.toLowerCase().includes(Z):k.value===u.search}):V}),D=t.computed(()=>y.value?void 0:"0"),A=V=>{var k;r("update:modelValue",V),u.search="",u.open=!1,(k=l==null?void 0:l.value)==null||k.focus()},B=()=>r("update:modelValue",void 0),P=()=>{var V;return(V=d.value)==null?void 0:V.focus()},H=()=>u.open=!u.open,S=()=>u.open=!0,I=V=>{var k;(k=l==null?void 0:l.value)!=null&&k.contains(V.relatedTarget)||(u.search="",u.open=!1)},v=()=>{const V=c.value;V&&vt(V.querySelector(".hovered-item"),k=>{Ol(V,k)})},L=V=>{var k,Z;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(V.code))V.preventDefault();else return;const{open:U,activeIndex:F}=u;if(!U){V.code==="Enter"&&(u.open=!0);return}V.code==="Escape"&&(u.open=!1,(k=l.value)==null||k.focus());const j=t.unref(E),{length:ee}=j;if(!ee)return;V.code==="Enter"&&A((Z=j.find(He=>He.index===F))==null?void 0:Z.value);const ue=j.findIndex(He=>He.index===F)??-1,ye=V.code==="ArrowDown"?1:V.code==="ArrowUp"?-1:0,Ce=Math.abs(ue+ye+ee)%ee;u.activeIndex=E.value[Ce].index??-1};return Kn(l),t.watch(()=>o.modelValue,m,{immediate:!0}),t.watch(()=>u.open,V=>{var k;return V?(k=d.value)==null?void 0:k.focus():""}),t.watchPostEffect(()=>{u.search,u.activeIndex>=0&&u.open&&v()}),(V,k)=>(t.openBlock(),t.createElementBlock("div",aS,[t.createElementVNode("div",{ref_key:"root",ref:l,tabindex:D.value,class:t.normalizeClass(["ui-dropdown",{open:u.open,error:V.error,disabled:y.value}]),onKeydown:L,onFocusout:I},[t.createElementVNode("div",lS,[t.createElementVNode("div",sS,[t.withDirectives(t.createElementVNode("input",{ref_key:"input",ref:d,"onUpdate:modelValue":k[0]||(k[0]=Z=>u.search=Z),type:"text",tabindex:"-1",disabled:y.value,placeholder:$.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:S},null,40,cS),[[t.vModelText,u.search]]),k[4]||(k[4]=t.createTextVNode()),u.open?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,onClick:P},[t.createVNode(Ll,{class:"input-value"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(T.value),1)]),_:1})])),k[5]||(k[5]=t.createTextVNode()),t.createElementVNode("div",dS,[g.value?(t.openBlock(),t.createBlock(t.unref(at),{key:0,name:"loading"})):t.createCommentVNode("",!0),k[1]||(k[1]=t.createTextVNode()),V.clearable&&W.value?(t.openBlock(),t.createBlock(t.unref(Or),{key:1,name:"delete-clear",onClick:t.withModifiers(B,["stop"])})):t.createCommentVNode("",!0),k[2]||(k[2]=t.createTextVNode()),t.renderSlot(V.$slots,"append"),k[3]||(k[3]=t.createTextVNode()),V.arrowIconLarge?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["arrow-icon",[`icon-24 ${V.arrowIconLarge}`]]),onClick:t.withModifiers(H,["stop"])},null,2)):V.arrowIcon?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(["arrow-icon",[`icon-16 ${V.arrowIcon}`]]),onClick:t.withModifiers(H,["stop"])},null,2)):(t.openBlock(),t.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:t.withModifiers(H,["stop"])}))])]),k[9]||(k[9]=t.createTextVNode()),V.label?(t.openBlock(),t.createElementBlock("label",uS,[V.required?(t.openBlock(),t.createElementBlock("i",pS)):t.createCommentVNode("",!0),k[6]||(k[6]=t.createTextVNode()),t.createElementVNode("span",null,t.toDisplayString(V.label),1),k[7]||(k[7]=t.createTextVNode()),t.unref(a).tooltip?(t.openBlock(),t.createBlock(t.unref(ct),{key:1,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(V.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),k[10]||(k[10]=t.createTextVNode()),u.open?(t.openBlock(),t.createElementBlock("div",{key:1,ref_key:"list",ref:c,class:"ui-dropdown__options"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(E.value,(Z,U)=>(t.openBlock(),t.createBlock(po,{key:U,option:Z,"is-selected":Z.isSelected,"is-hovered":Z.isActive,size:V.optionSize,onClick:t.withModifiers(F=>A(Z.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),k[8]||(k[8]=t.createTextVNode()),E.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",fS,"Nothing found"))],512)):t.createCommentVNode("",!0),k[11]||(k[11]=t.createTextVNode()),t.createVNode(dr,{class:"ui-dropdown__contour"})])],42,iS),k[12]||(k[12]=t.createTextVNode()),C.value?(t.openBlock(),t.createElementBlock("div",mS,t.toDisplayString(C.value),1)):g.value&&V.loadingOptionsHelper?(t.openBlock(),t.createElementBlock("div",hS,t.toDisplayString(V.loadingOptionsHelper),1)):V.helper?(t.openBlock(),t.createElementBlock("div",gS,t.toDisplayString(V.helper),1)):t.createCommentVNode("",!0)]))}}),_S={key:0,class:"ui-progress-bar"},wS={class:"ui-progress-bar__messages d-flex align-center pl-6 pr-6"},kS={class:"ui-progress-bar__message flex-grow-1"},xS={class:"ui-progress-bar__percent"},vS=t.defineComponent({__name:"PlProgressBar",props:{loading:{type:Boolean},progress:{default:0},completeMessage:{default:"Completed"}},setup(n){const e=n,r=t.computed(()=>e.progress===100?e.completeMessage:"");return(o,a)=>o.loading?(t.openBlock(),t.createElementBlock("div",_S,[t.createElementVNode("div",{class:"ui-progress-bar__indicator",style:t.normalizeStyle({width:o.progress+"%"})},null,4),a[1]||(a[1]=t.createTextVNode()),t.createElementVNode("div",wS,[t.createElementVNode("div",kS,t.toDisplayString(r.value),1),a[0]||(a[0]=t.createTextVNode()),t.createElementVNode("div",xS,t.toDisplayString(o.progress+"%"),1)])])):t.createCommentVNode("",!0)}}),CS={class:"mi-number-field__main-wrapper d-flex"},SS={key:0,class:"text-description"},ES=["disabled","placeholder"],NS={key:0,class:"mi-number-field__hint text-description"},VS=t.defineComponent({__name:"PlNumberField",props:t.mergeModels({disabled:{type:Boolean},label:{default:void 0},placeholder:{default:void 0},step:{default:1},minValue:{default:void 0},maxValue:{default:void 0},useIncrementButtons:{type:Boolean,default:!0},updateOnEnterOrClickOutside:{type:Boolean},errorMessage:{default:void 0},validate:{type:Function,default:void 0}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=n,r=t.useModel(n,"modelValue"),o=t.ref(),a=t.useSlots(),l=t.ref();Kn(o);function c(B){return B===void 0?"":String(+B)}function d(B){return B==="."||B===","||B==="-"}function u(B){if(B==="")return;if(d(B))return 0;let P=B;return P=P.replace(",","."),P=P.replace("−","-"),P=P.replace("–","-"),P=P.replace("+",""),parseFloat(P)}const f=t.ref(c(r.value)),m=t.computed(()=>u(f.value));t.watch(()=>r.value,B=>{parseFloat(f.value)!==B&&(f.value=c(B))});const g=/^[-−–+]?(\d+)?[\\.,]?(\d+)?$/,y=t.computed({get(){return f.value},set(B){const P=u(B);P===void 0||B.match(g)&&!isNaN(P)?(f.value=B,!e.updateOnEnterOrClickOutside&&!d(B)&&C()):l.value&&(l.value.value=f.value)}}),_=t.ref(!1);function C(){if(f.value===""){r.value=void 0;return}r.value=m.value}const N=t.computed(()=>{let B=[];e.errorMessage&&B.push(e.errorMessage);const P=m.value;if(P!==void 0&&isNaN(P))B.push("Value is not a number");else if(e.validate&&P!==void 0){const H=e.validate(P);H&&B.push(H)}else e.minValue!==void 0&&P!==void 0&&P<e.minValue&&B.push(`Value must be higher than ${e.minValue}`),e.maxValue!==void 0&&P!==void 0&&P>e.maxValue&&B.push(`Value must be less than ${e.maxValue}`);return B=[...B],B.join(" ")}),T=t.computed(()=>{const B=m.value;return e.maxValue!==void 0&&B!==void 0?B>=e.maxValue:!1}),$=t.computed(()=>{const B=m.value;return e.minValue!==void 0&&B!==void 0?B<=e.minValue:!1});function W(){const B=m.value;if(!T.value){let P;B===void 0?P=e.minValue?e.minValue:0:P=(B||0)+e.step,r.value=e.maxValue!==void 0?Math.min(e.maxValue,P):P}}function E(){const B=m.value;if(!$.value){let P;B===void 0?P=0:P=+(B||0)-e.step,r.value=e.minValue!==void 0?Math.max(e.minValue,P):P}}function D(B){var P,H;e.updateOnEnterOrClickOutside&&(B.code==="Escape"&&(f.value=c(r.value),(P=l.value)==null||P.blur()),B.code==="Enter"&&((H=l.value)==null||H.blur())),B.code==="Enter"&&(f.value=String(r.value)),["ArrowDown","ArrowUp"].includes(B.code)&&B.preventDefault(),e.useIncrementButtons&&B.code==="ArrowUp"&&W(),e.useIncrementButtons&&B.code==="ArrowDown"&&E()}const A=B=>{B.detail>1&&B.preventDefault()};return(B,P)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"root",ref:o,class:t.normalizeClass([{error:!!N.value.trim(),disabled:B.disabled},"mi-number-field d-flex-column"]),onKeydown:P[3]||(P[3]=H=>D(H))},[t.createElementVNode("div",CS,[t.createVNode(dr,{class:"mi-number-field__contour"}),P[8]||(P[8]=t.createTextVNode()),t.createElementVNode("div",{class:t.normalizeClass(["mi-number-field__wrapper flex-grow d-flex flex-align-center",{withoutArrows:!B.useIncrementButtons}])},[B.label?(t.openBlock(),t.createElementBlock("label",SS,[t.createTextVNode(t.toDisplayString(B.label)+" ",1),t.unref(a).tooltip?(t.openBlock(),t.createBlock(t.unref(ct),{key:0,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(B.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),P[4]||(P[4]=t.createTextVNode()),t.withDirectives(t.createElementVNode("input",{ref_key:"input",ref:l,"onUpdate:modelValue":P[0]||(P[0]=H=>y.value=H),disabled:B.disabled,placeholder:B.placeholder,class:"text-s flex-grow",onFocusin:P[1]||(P[1]=H=>_.value=!0),onFocusout:P[2]||(P[2]=H=>{_.value=!1,C()})},null,40,ES),[[t.vModelText,y.value]])],2),P[9]||(P[9]=t.createTextVNode()),B.useIncrementButtons?(t.openBlock(),t.createElementBlock("div",{key:0,class:"mi-number-field__icons d-flex-column",onMousedown:A},[t.createElementVNode("div",{class:t.normalizeClass([{disabled:T.value},"mi-number-field__icon d-flex flex-justify-center uc-pointer flex-grow flex-align-center"]),onClick:W},P[5]||(P[5]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[t.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),P[7]||(P[7]=t.createTextVNode()),t.createElementVNode("div",{class:t.normalizeClass([{disabled:$.value},"mi-number-field__icon d-flex flex-justify-center uc-pointer flex-grow flex-align-center"]),onClick:E},P[6]||(P[6]=[t.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},[t.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)],32)):t.createCommentVNode("",!0)]),P[10]||(P[10]=t.createTextVNode()),N.value.trim()?(t.openBlock(),t.createElementBlock("div",NS,t.toDisplayString(N.value),1)):t.createCommentVNode("",!0)],34))}}),BS={class:"pl-chip__text"},Ed=t.defineComponent({__name:"PlChip",props:{closeable:{type:Boolean},small:{type:Boolean}},emits:["close"],setup(n){const e=t.ref(),r=t.ref(!1);return t.onMounted(()=>{var o;e.value&&(r.value=((o=e.value)==null?void 0:o.clientWidth)>=256)}),(o,a)=>(t.openBlock(),t.createBlock(t.unref(ct),{position:"top",class:"pl-chip-tooltip",delay:500},t.createSlots({default:t.withCtx(()=>[a[4]||(a[4]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"chip",ref:e,class:t.normalizeClass(["pl-chip",{small:o.small}])},[t.createElementVNode("div",BS,[t.renderSlot(o.$slots,"default")]),a[3]||(a[3]=t.createTextVNode()),o.closeable?(t.openBlock(),t.createElementBlock("div",{key:0,tabindex:"0",class:"pl-chip__close",onKeydown:a[0]||(a[0]=t.withKeys(l=>o.$emit("close"),["enter"])),onClick:a[1]||(a[1]=t.withModifiers(l=>o.$emit("close"),["stop"]))},a[2]||(a[2]=[t.createElementVNode("div",{class:"pl-chip__close--icon"},null,-1)]),32)):t.createCommentVNode("",!0)],2)]),_:2},[r.value?{name:"tooltip",fn:t.withCtx(()=>[t.renderSlot(o.$slots,"default")]),key:"0"}:void 0]),1024))}}),TS=["tabindex"],RS={class:"pl-dropdown-multi__container"},IS={class:"pl-dropdown-multi__field"},AS=["disabled","placeholder"],LS={key:0,class:"chips-container"},OS={class:"pl-dropdown-multi__controls"},$S={key:0},ZS={key:0,class:"required-icon"},MS={class:"pl-dropdown-multi__open-chips-container"},FS={key:0,class:"nothing-found"},PS={key:0,class:"pl-dropdown-multi__error"},zS={key:1,class:"pl-dropdown-multi__helper"},DS={name:"PlDropdownMulti"},Zl=t.defineComponent({...DS,props:{modelValue:{default:()=>[]},label:{default:void 0},options:{default:void 0},helper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n,{emit:e}){const r=e,o=S=>r("update:modelValue",S),a=t.useSlots(),l=n,c=t.ref(),d=t.ref(),u=t.useTemplateRef("overlay"),f=t.reactive({search:"",activeOption:-1,open:!1,optionsHeight:0}),m=t.computed(()=>Array.isArray(l.modelValue)?l.modelValue:[]),g=t.computed(()=>f.open&&l.modelValue.length>0?l.placeholder:l.modelValue.length>0?"":l.placeholder),y=t.computed(()=>sr(l.options??[])),_=t.computed(()=>m.value.map(S=>y.value.find(I=>ft(I.value,S))).filter(S=>S!==void 0)),C=t.computed(()=>{const S=t.unref(m),I=t.unref(y);return(f.search?I.filter(v=>{const L=f.search.toLowerCase();return v.label.toLowerCase().includes(L)?!0:typeof v.value=="string"?v.value.toLowerCase().includes(L):v.value===f.search}):[...I]).map(v=>({...v,selected:Lm(S,v.value)}))}),N=t.computed(()=>l.options===void 0),T=t.computed(()=>N.value?!0:l.disabled),$=t.computed(()=>T.value?void 0:"0"),W=()=>{f.activeOption=jo(C.value.findIndex(S=>ft(S.value,l.modelValue)),S=>S<0?0:S)},E=S=>{var I;const v=t.unref(m);o(Lm(v,S)?v.filter(L=>!ft(L,S)):[...v,S]),f.search="",(I=c==null?void 0:c.value)==null||I.focus()},D=S=>o(t.unref(m).filter(I=>!ft(I,S))),A=()=>{var S;return(S=d.value)==null?void 0:S.focus()},B=()=>{f.open=!f.open,f.open||(f.search="")},P=S=>{var I,v,L;const V=S.relatedTarget;!((I=c.value)!=null&&I.contains(V))&&!((L=(v=u.value)==null?void 0:v.listRef)!=null&&L.contains(V))&&(f.search="",f.open=!1)},H=S=>{var I;const{open:v,activeOption:L}=f;if(!v){S.code==="Enter"&&(f.open=!0);return}S.code==="Escape"&&(f.open=!1,(I=c.value)==null||I.focus());const V=t.unref(C),{length:k}=V;if(!k)return;["ArrowDown","ArrowUp","Enter"].includes(S.code)&&S.preventDefault(),S.code==="Enter"&&E(V[L].value);const Z=S.code==="ArrowDown"?1:S.code==="ArrowUp"?-1:0;f.activeOption=Math.abs(L+Z+k)%k,requestAnimationFrame(()=>{var U;return(U=u.value)==null?void 0:U.scrollIntoActive()})};return Kn(c),t.watch(()=>l.modelValue,()=>W(),{immediate:!0}),t.watchPostEffect(()=>{var S;f.search,f.open&&((S=u.value)==null||S.scrollIntoActive())}),(S,I)=>(t.openBlock(),t.createElementBlock("div",{class:"pl-dropdown-multi__envelope",onClick:A},[t.createElementVNode("div",{ref_key:"rootRef",ref:c,tabindex:$.value,class:t.normalizeClass(["pl-dropdown-multi",{open:f.open,error:S.error,disabled:T.value}]),onKeydown:H,onFocusout:P},[t.createElementVNode("div",RS,[t.createElementVNode("div",IS,[t.withDirectives(t.createElementVNode("input",{ref_key:"input",ref:d,"onUpdate:modelValue":I[0]||(I[0]=v=>f.search=v),type:"text",tabindex:"-1",disabled:T.value,placeholder:g.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:I[1]||(I[1]=v=>f.open=!0)},null,40,AS),[[t.vModelText,f.search]]),I[6]||(I[6]=t.createTextVNode()),f.open?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",LS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_.value,(v,L)=>(t.openBlock(),t.createBlock(t.unref(Ed),{key:L,closeable:"",small:"",onClick:I[2]||(I[2]=t.withModifiers(V=>f.open=!0,["stop"])),onClose:V=>D(v.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(v.label||v.value),1)]),_:2},1032,["onClose"]))),128))])),I[7]||(I[7]=t.createTextVNode()),t.createElementVNode("div",OS,[N.value?(t.openBlock(),t.createBlock(t.unref(at),{key:0,name:"loading"})):t.createCommentVNode("",!0),I[4]||(I[4]=t.createTextVNode()),t.renderSlot(S.$slots,"append"),I[5]||(I[5]=t.createTextVNode()),t.createElementVNode("div",{class:"pl-dropdown-multi__arrow-wrapper",onClick:t.withModifiers(B,["stop"])},I[3]||(I[3]=[t.createElementVNode("div",{class:"arrow-icon arrow-icon-default"},null,-1)]))])]),I[12]||(I[12]=t.createTextVNode()),S.label?(t.openBlock(),t.createElementBlock("label",$S,[S.required?(t.openBlock(),t.createElementBlock("i",ZS)):t.createCommentVNode("",!0),I[8]||(I[8]=t.createTextVNode()),t.createElementVNode("span",null,t.toDisplayString(S.label),1),I[9]||(I[9]=t.createTextVNode()),t.unref(a).tooltip?(t.openBlock(),t.createBlock(t.unref(ct),{key:1,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(S.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),I[13]||(I[13]=t.createTextVNode()),f.open?(t.openBlock(),t.createBlock($l,{key:1,ref_key:"overlay",ref:u,root:c.value,class:"pl-dropdown-multi__options",gap:5,tabindex:"-1",onFocusout:P},{default:t.withCtx(()=>[t.createElementVNode("div",MS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_.value,(v,L)=>(t.openBlock(),t.createBlock(t.unref(Ed),{key:L,closeable:"",small:"",onClose:V=>D(v.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(v.label||v.value),1)]),_:2},1032,["onClose"]))),128))]),I[10]||(I[10]=t.createTextVNode()),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(C.value,(v,L)=>(t.openBlock(),t.createBlock(po,{key:L,option:v,"text-item":"text","is-selected":v.selected,"is-hovered":f.activeOption==L,size:"medium","use-checkbox":"",onClick:t.withModifiers(V=>E(v.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128)),I[11]||(I[11]=t.createTextVNode()),C.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",FS,"Nothing found"))]),_:1},8,["root"])):t.createCommentVNode("",!0),I[14]||(I[14]=t.createTextVNode()),t.createVNode(dr,{class:"pl-dropdown-multi__contour"})])],42,TS),I[15]||(I[15]=t.createTextVNode()),S.error?(t.openBlock(),t.createElementBlock("div",PS,t.toDisplayString(S.error),1)):S.helper?(t.openBlock(),t.createElementBlock("div",zS,t.toDisplayString(S.helper),1)):t.createCommentVNode("",!0)]))}}),WS=t.defineComponent({__name:"PlDropdownMultiRef",props:{modelValue:{default:()=>[]},label:{default:void 0},options:{default:void 0},helper:{default:void 0},error:{default:void 0},placeholder:{default:"..."},required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(n){const e=t.useSlots(),r=n,o=t.computed(()=>{var a;return(a=r.options)==null?void 0:a.map(l=>({label:l.label,value:l.ref}))});return(a,l)=>(t.openBlock(),t.createBlock(Zl,t.mergeProps(r,{options:o.value,"onUpdate:modelValue":l[0]||(l[0]=c=>a.$emit("update:modelValue",c))}),t.createSlots({_:2},[t.unref(e).tooltip?{name:"tooltip",fn:t.withCtx(()=>[t.renderSlot(a.$slots,"tooltip")]),key:"0"}:void 0]),1040,["options"]))}}),Nd=t.defineComponent({__name:"PlCheckboxBase",props:{modelValue:{type:Boolean},disabled:{type:Boolean},indeterminate:{type:Boolean}},emits:["update:modelValue"],setup(n){const e=n;return(r,o)=>(t.openBlock(),t.createElementBlock("div",{tabindex:"0",class:t.normalizeClass(["pl-checkbox-base",{...e.indeterminate?{indeterminate:!0}:{checked:e.modelValue},disabled:r.disabled}]),onClick:o[0]||(o[0]=a=>r.$emit("update:modelValue",!r.modelValue)),onKeydown:o[1]||(o[1]=t.withKeys(t.withModifiers(a=>r.$emit("update:modelValue",!r.modelValue),["prevent"]),["space"]))},null,34))}}),GS={name:"PlCheckbox"},Vd=t.defineComponent({...GS,props:{modelValue:{type:Boolean},disabled:{type:Boolean},indeterminate:{type:Boolean}},emits:["update:modelValue"],setup(n){const e=n,r=t.useSlots();return(o,a)=>t.unref(r).default?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["pl-checkbox",{disabled:o.disabled}])},[t.createVNode(Nd,t.mergeProps(e,{"onUpdate:modelValue":a[0]||(a[0]=l=>o.$emit("update:modelValue",l))}),null,16),a[3]||(a[3]=t.createTextVNode()),t.createElementVNode("label",{onClick:a[1]||(a[1]=l=>o.$emit("update:modelValue",!o.$props.modelValue))},[t.renderSlot(o.$slots,"default")])],2)):(t.openBlock(),t.createBlock(Nd,t.mergeProps({key:1},e,{"onUpdate:modelValue":a[2]||(a[2]=l=>o.$emit("update:modelValue",l))}),null,16))}}),US={key:0},HS=["onClick"],XS={name:"PlCheckboxGroup"},jS=t.defineComponent({...XS,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean}},emits:["update:modelValue"],setup(n,{emit:e}){const r=t.useSlots(),o=e,a=n,l=d=>a.modelValue.includes(d),c=d=>{const u=a.modelValue??[];o("update:modelValue",l(d)?u.filter(f=>f!==d):[...u,d])};return(d,u)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["pl-checkbox-group",{disabled:d.disabled}])},[d.label?(t.openBlock(),t.createElementBlock("label",US,[t.createElementVNode("span",null,t.toDisplayString(d.label),1),u[0]||(u[0]=t.createTextVNode()),t.unref(r).tooltip?(t.openBlock(),t.createBlock(t.unref(ct),{key:0,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(d.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),u[2]||(u[2]=t.createTextVNode()),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(d.options.map(f=>({label:"label"in f?f.label:f.text,value:f.value})),(f,m)=>(t.openBlock(),t.createElementBlock("div",{key:m},[t.createVNode(Nd,{disabled:d.disabled,label:f.label,"model-value":l(f.value),"onUpdate:modelValue":()=>c(f.value)},null,8,["disabled","label","model-value","onUpdate:modelValue"]),u[1]||(u[1]=t.createTextVNode()),t.createElementVNode("label",{onClick:t.withModifiers(()=>c(f.value),["stop"])},t.toDisplayString(f.label),9,HS)]))),128))],2))}}),YS="_component_tupwt_1",KS={component:YS},JS={};function qS(n,e){return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(n.$style.component)},e[0]||(e[0]=[t.createElementVNode("div",null,null,-1)]),2)}const QS={$style:KS},Zm=st(JS,[["render",qS],["__cssModules",QS]]),eE={key:1,class:"pl-dialog-modal__title"},tE={inheritAttrs:!1},Bd=t.defineComponent({...tE,__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},size:{default:void 0}},emits:["update:modelValue"],setup(n,{emit:e}){const r=t.useSlots(),o=e,a=n,l=t.ref(),c=t.computed(()=>{const{width:u,height:f,minHeight:m,maxHeight:g,size:y}=a;return y==="small"?{width:"448px",height:"440px",minHeight:"auto",maxHeight:"auto"}:y==="medium"?{width:"720px",height:"720px",minHeight:"auto",maxHeight:"auto"}:y==="large"?{width:"1080px",height:"880px",minHeight:"auto",maxHeight:"auto"}:{width:u,height:f,minHeight:m,maxHeight:g}});function d(u){l.value&&a.closeOnOutsideClick&&document.contains(u.target)&&!l.value.contains(u.target)&&o("update:modelValue",!1)}return ot(document.body,"keyup",u=>{a.modelValue&&u.code==="Escape"&&o("update:modelValue",!1)}),(u,f)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(t.Transition,{name:"dialog"},{default:t.withCtx(()=>[u.modelValue?(t.openBlock(),t.createElementBlock("div",{key:0,class:"pl-dialog-modal__shadow",onClick:d},[t.createElementVNode("div",t.mergeProps(u.$attrs,{ref_key:"modal",ref:l,class:["pl-dialog-modal",{"has-title":t.unref(r).title,"has-content":t.unref(r).default}],style:c.value}),[u.closable?(t.openBlock(),t.createBlock(Zm,{key:0,class:"close-modal-btn",onClick:f[0]||(f[0]=t.withModifiers(m=>o("update:modelValue",!1),["stop"]))})):t.createCommentVNode("",!0),f[1]||(f[1]=t.createTextVNode()),t.unref(r).title?(t.openBlock(),t.createElementBlock("div",eE,[t.renderSlot(u.$slots,"title")])):t.createCommentVNode("",!0),f[2]||(f[2]=t.createTextVNode()),t.createElementVNode("div",{class:t.normalizeClass(["pl-dialog-modal__content",{"no-content-gutters":u.noContentGutters,"no-top-content-gutter":u.noTopContentGutter}])},[t.renderSlot(u.$slots,"default")],2),f[3]||(f[3]=t.createTextVNode()),t.unref(r).actions?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["pl-dialog-modal__actions",{"has-top-border":u.actionsHasTopBorder}])},[t.renderSlot(u.$slots,"actions")],2)):t.createCommentVNode("",!0)],16)])):t.createCommentVNode("",!0)]),_:3})]))}}),nE=t.defineComponent({__name:"TransitionSlidePanel",setup(n){function e(){window.dispatchEvent(new CustomEvent("adjust"))}function r(){window.dispatchEvent(new CustomEvent("adjust"))}return(o,a)=>(t.openBlock(),t.createBlock(t.Transition,{name:"slide-panel",onAfterEnter:e,onAfterLeave:r},{default:t.withCtx(()=>[t.renderSlot(o.$slots,"default")]),_:3}))}}),rE={key:0,class:"pl-slide-modal__title"},oE={class:"pl-slide-modal__title-content"},aE={class:"pl-slide-modal__content"},iE={key:1,class:"pl-slide-modal__actions"},lE={name:"PlSlideModal",inheritAttrs:!1},Ko=t.defineComponent({...lE,props:{modelValue:{type:Boolean,default:!1},width:{default:"368px"},shadow:{type:Boolean,default:!1},closeOnOutsideClick:{type:Boolean,default:!0}},emits:["update:modelValue"],setup(n,{emit:e}){const r=t.useSlots(),o=e,a=n,l=t.ref(),c=t.useAttrs();return Al(l,()=>{a.modelValue&&a.closeOnOutsideClick&&o("update:modelValue",!1)}),ot(document,"keydown",d=>{d.key==="Escape"&&o("update:modelValue",!1)}),(d,u)=>(t.openBlock(),t.createBlock(t.Teleport,{to:"body"},[t.createVNode(nE,null,{default:t.withCtx(()=>[d.modelValue?(t.openBlock(),t.createElementBlock("div",t.mergeProps({key:0,ref_key:"modal",ref:l,style:{width:d.width}},t.unref(c),{class:["pl-slide-modal",{"has-title":t.unref(r).title,"has-actions":t.unref(r).actions}],onKeyup:u[1]||(u[1]=t.withKeys(f=>o("update:modelValue",!1),["esc"]))}),[t.createElementVNode("div",{class:"close-dialog-btn",onClick:u[0]||(u[0]=f=>o("update:modelValue",!1))}),u[3]||(u[3]=t.createTextVNode()),t.unref(r).title?(t.openBlock(),t.createElementBlock("div",rE,[t.createElementVNode("span",oE,[t.renderSlot(d.$slots,"title")])])):t.createCommentVNode("",!0),u[4]||(u[4]=t.createTextVNode()),t.createElementVNode("div",aE,[t.renderSlot(d.$slots,"default")]),u[5]||(u[5]=t.createTextVNode()),t.unref(r).actions?(t.openBlock(),t.createElementBlock("div",iE,[t.renderSlot(d.$slots,"actions")])):t.createCommentVNode("",!0)],16)):t.createCommentVNode("",!0)]),_:3}),u[6]||(u[6]=t.createTextVNode()),d.modelValue&&d.shadow?(t.openBlock(),t.createElementBlock("div",{key:0,class:"pl-slide-modal__shadow",onKeyup:u[2]||(u[2]=t.withKeys(f=>o("update:modelValue",!1),["esc"]))},null,32)):t.createCommentVNode("",!0)]))}}),sE={key:0,class:"label"},cE={name:"PlToggleSwitch"},Ml=t.defineComponent({...cE,props:{label:{},modelValue:{type:Boolean}},emits:["update:modelValue"],setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",{tabindex:"0",class:t.normalizeClass(["ui-toggle-switch",{active:e.modelValue}]),onClick:r[0]||(r[0]=o=>e.$emit("update:modelValue",!e.modelValue)),onKeydown:r[1]||(r[1]=t.withKeys(o=>e.$emit("update:modelValue",!e.modelValue),["enter"]))},[r[2]||(r[2]=t.createElementVNode("div",{class:"ui-toggle-switch__body"},[t.createElementVNode("div",{class:"ui-toggle-switch__handle"})],-1)),r[3]||(r[3]=t.createTextVNode()),e.label?(t.openBlock(),t.createElementBlock("span",sE,t.toDisplayString(e.label),1)):t.createCommentVNode("",!0)],34))}});function Mm(n){return t.getCurrentScope()?(t.onScopeDispose(n),!0):!1}const Fm=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const Pm=()=>{};function dE(n,e){function r(...o){return new Promise((a,l)=>{Promise.resolve(n(()=>e.apply(this,o),{fn:e,thisArg:this,args:o})).then(a).catch(l)})}return r}function uE(n,e={}){let r,o,a=Pm;const l=c=>{clearTimeout(c),a(),a=Pm};return c=>{const d=t.toValue(n),u=t.toValue(e.maxWait);return r&&l(r),d<=0||u!==void 0&&u<=0?(o&&(l(o),o=null),Promise.resolve(c())):new Promise((f,m)=>{a=e.rejectOnCancel?m:f,u&&!o&&(o=setTimeout(()=>{r&&l(r),o=null,f(c())},u)),r=setTimeout(()=>{o&&l(o),o=null,f(c())},d)})}}function pE(n,e=200,r={}){return dE(uE(e,r),n)}function fE(n,e=200,r={}){const o=t.ref(n.value),a=pE(()=>{o.value=n.value},e,r);return t.watch(n,()=>a()),o}function mE(n,e,r={}){const{immediate:o=!0}=r,a=t.ref(!1);let l=null;function c(){l&&(clearTimeout(l),l=null)}function d(){a.value=!1,c()}function u(...f){c(),a.value=!0,l=setTimeout(()=>{a.value=!1,l=null,n(...f)},t.toValue(e))}return o&&(a.value=!0,Fm&&u()),Mm(d),{isPending:t.readonly(a),start:u,stop:d}}function hE(n,e,r){return t.watch(n,(o,a,l)=>{o&&e(o,a,l)},{...r,once:!1})}function gE(n,e,r={}){const{immediate:o=!0}=r,{start:a}=mE(c,e,{immediate:!1}),l=t.ref(!1);async function c(){l.value&&(await n(),a())}function d(){l.value||(l.value=!0,c())}function u(){l.value=!1}return o&&Fm&&d(),Mm(u),{isActive:l,pause:u,resume:d}}var Ge;(function(n){n.assertEqual=a=>a;function e(a){}n.assertIs=e;function r(a){throw new Error}n.assertNever=r,n.arrayToEnum=a=>{const l={};for(const c of a)l[c]=c;return l},n.getValidEnumValues=a=>{const l=n.objectKeys(a).filter(d=>typeof a[a[d]]!="number"),c={};for(const d of l)c[d]=a[d];return n.objectValues(c)},n.objectValues=a=>n.objectKeys(a).map(function(l){return a[l]}),n.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const l=[];for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&l.push(c);return l},n.find=(a,l)=>{for(const c of a)if(l(c))return c},n.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&isFinite(a)&&Math.floor(a)===a;function o(a,l=" | "){return a.map(c=>typeof c=="string"?`'${c}'`:c).join(l)}n.joinValues=o,n.jsonStringifyReplacer=(a,l)=>typeof l=="bigint"?l.toString():l})(Ge||(Ge={}));var Td;(function(n){n.mergeShapes=(e,r)=>({...e,...r})})(Td||(Td={}));const se=Ge.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Zr=n=>{switch(typeof n){case"undefined":return se.undefined;case"string":return se.string;case"number":return isNaN(n)?se.nan:se.number;case"boolean":return se.boolean;case"function":return se.function;case"bigint":return se.bigint;case"symbol":return se.symbol;case"object":return Array.isArray(n)?se.array:n===null?se.null:n.then&&typeof n.then=="function"&&n.catch&&typeof n.catch=="function"?se.promise:typeof Map<"u"&&n instanceof Map?se.map:typeof Set<"u"&&n instanceof Set?se.set:typeof Date<"u"&&n instanceof Date?se.date:se.object;default:return se.unknown}},ne=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"]),yE=n=>JSON.stringify(n,null,2).replace(/"([^"]+)":/g,"$1:");class Qt extends Error{constructor(e){super(),this.issues=[],this.addIssue=o=>{this.issues=[...this.issues,o]},this.addIssues=(o=[])=>{this.issues=[...this.issues,...o]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const r=e||function(l){return l.message},o={_errors:[]},a=l=>{for(const c of l.issues)if(c.code==="invalid_union")c.unionErrors.map(a);else if(c.code==="invalid_return_type")a(c.returnTypeError);else if(c.code==="invalid_arguments")a(c.argumentsError);else if(c.path.length===0)o._errors.push(r(c));else{let d=o,u=0;for(;u<c.path.length;){const f=c.path[u];u===c.path.length-1?(d[f]=d[f]||{_errors:[]},d[f]._errors.push(r(c))):d[f]=d[f]||{_errors:[]},d=d[f],u++}}};return a(this),o}static assert(e){if(!(e instanceof Qt))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=r=>r.message){const r={},o=[];for(const a of this.issues)a.path.length>0?(r[a.path[0]]=r[a.path[0]]||[],r[a.path[0]].push(e(a))):o.push(e(a));return{formErrors:o,fieldErrors:r}}get formErrors(){return this.flatten()}}Qt.create=n=>new Qt(n);const Jo=(n,e)=>{let r;switch(n.code){case ne.invalid_type:n.received===se.undefined?r="Required":r=`Expected ${n.expected}, received ${n.received}`;break;case ne.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(n.expected,Ge.jsonStringifyReplacer)}`;break;case ne.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ge.joinValues(n.keys,", ")}`;break;case ne.invalid_union:r="Invalid input";break;case ne.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ge.joinValues(n.options)}`;break;case ne.invalid_enum_value:r=`Invalid enum value. Expected ${Ge.joinValues(n.options)}, received '${n.received}'`;break;case ne.invalid_arguments:r="Invalid function arguments";break;case ne.invalid_return_type:r="Invalid function return type";break;case ne.invalid_date:r="Invalid date";break;case ne.invalid_string:typeof n.validation=="object"?"includes"in n.validation?(r=`Invalid input: must include "${n.validation.includes}"`,typeof n.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${n.validation.position}`)):"startsWith"in n.validation?r=`Invalid input: must start with "${n.validation.startsWith}"`:"endsWith"in n.validation?r=`Invalid input: must end with "${n.validation.endsWith}"`:Ge.assertNever(n.validation):n.validation!=="regex"?r=`Invalid ${n.validation}`:r="Invalid";break;case ne.too_small:n.type==="array"?r=`Array must contain ${n.exact?"exactly":n.inclusive?"at least":"more than"} ${n.minimum} element(s)`:n.type==="string"?r=`String must contain ${n.exact?"exactly":n.inclusive?"at least":"over"} ${n.minimum} character(s)`:n.type==="number"?r=`Number must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${n.minimum}`:n.type==="date"?r=`Date must be ${n.exact?"exactly equal to ":n.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(n.minimum))}`:r="Invalid input";break;case ne.too_big:n.type==="array"?r=`Array must contain ${n.exact?"exactly":n.inclusive?"at most":"less than"} ${n.maximum} element(s)`:n.type==="string"?r=`String must contain ${n.exact?"exactly":n.inclusive?"at most":"under"} ${n.maximum} character(s)`:n.type==="number"?r=`Number must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="bigint"?r=`BigInt must be ${n.exact?"exactly":n.inclusive?"less than or equal to":"less than"} ${n.maximum}`:n.type==="date"?r=`Date must be ${n.exact?"exactly":n.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(n.maximum))}`:r="Invalid input";break;case ne.custom:r="Invalid input";break;case ne.invalid_intersection_types:r="Intersection results could not be merged";break;case ne.not_multiple_of:r=`Number must be a multiple of ${n.multipleOf}`;break;case ne.not_finite:r="Number must be finite";break;default:r=e.defaultError,Ge.assertNever(n)}return{message:r}};let zm=Jo;function bE(n){zm=n}function Fl(){return zm}const Pl=n=>{const{data:e,path:r,errorMaps:o,issueData:a}=n,l=[...r,...a.path||[]],c={...a,path:l};if(a.message!==void 0)return{...a,path:l,message:a.message};let d="";const u=o.filter(f=>!!f).slice().reverse();for(const f of u)d=f(c,{data:e,defaultError:d}).message;return{...a,path:l,message:d}},_E=[];function ie(n,e){const r=Fl(),o=Pl({issueData:e,data:n.data,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,r,r===Jo?void 0:Jo].filter(a=>!!a)});n.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,r){const o=[];for(const a of r){if(a.status==="aborted")return Se;a.status==="dirty"&&e.dirty(),o.push(a.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,r){const o=[];for(const a of r){const l=await a.key,c=await a.value;o.push({key:l,value:c})}return Vt.mergeObjectSync(e,o)}static mergeObjectSync(e,r){const o={};for(const a of r){const{key:l,value:c}=a;if(l.status==="aborted"||c.status==="aborted")return Se;l.status==="dirty"&&e.dirty(),c.status==="dirty"&&e.dirty(),l.value!=="__proto__"&&(typeof c.value<"u"||a.alwaysSet)&&(o[l.value]=c.value)}return{status:e.value,value:o}}}const Se=Object.freeze({status:"aborted"}),zl=n=>({status:"dirty",value:n}),Ot=n=>({status:"valid",value:n}),Rd=n=>n.status==="aborted",Id=n=>n.status==="dirty",ai=n=>n.status==="valid",ii=n=>typeof Promise<"u"&&n instanceof Promise;function Dl(n,e,r,o){if(typeof e=="function"?n!==e||!o:!e.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(n)}function Dm(n,e,r,o,a){if(typeof e=="function"?n!==e||!a:!e.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(n,r),r}var he;(function(n){n.errToObj=e=>typeof e=="string"?{message:e}:e||{},n.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(he||(he={}));var li,si;class Jn{constructor(e,r,o,a){this._cachedPath=[],this.parent=e,this.data=r,this._path=o,this._key=a}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 Wm=(n,e)=>{if(ai(e))return{success:!0,data:e.value};if(!n.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Qt(n.common.issues);return this._error=r,this._error}}};function Te(n){if(!n)return{};const{errorMap:e,invalid_type_error:r,required_error:o,description:a}=n;if(e&&(r||o))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(l,c)=>{var d,u;const{message:f}=n;return l.code==="invalid_enum_value"?{message:f??c.defaultError}:typeof c.data>"u"?{message:(d=f??o)!==null&&d!==void 0?d:c.defaultError}:l.code!=="invalid_type"?{message:c.defaultError}:{message:(u=f??r)!==null&&u!==void 0?u:c.defaultError}},description:a}}class Le{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 Zr(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Zr(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:Zr(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(ii(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const o=this.safeParse(e,r);if(o.success)return o.data;throw o.error}safeParse(e,r){var o;const a={common:{issues:[],async:(o=r==null?void 0:r.async)!==null&&o!==void 0?o:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Zr(e)},l=this._parseSync({data:e,path:a.path,parent:a});return Wm(a,l)}async parseAsync(e,r){const o=await this.safeParseAsync(e,r);if(o.success)return o.data;throw o.error}async safeParseAsync(e,r){const o={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Zr(e)},a=this._parse({data:e,path:o.path,parent:o}),l=await(ii(a)?a:Promise.resolve(a));return Wm(o,l)}refine(e,r){const o=a=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(a):r;return this._refinement((a,l)=>{const c=e(a),d=()=>l.addIssue({code:ne.custom,...o(a)});return typeof Promise<"u"&&c instanceof Promise?c.then(u=>u?!0:(d(),!1)):c?!0:(d(),!1)})}refinement(e,r){return this._refinement((o,a)=>e(o)?!0:(a.addIssue(typeof r=="function"?r(o,a):r),!1))}_refinement(e){return new Sn({schema:this,typeName:xe.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return Qn.create(this,this._def)}nullable(){return Dr.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Cn.create(this,this._def)}promise(){return ta.create(this,this._def)}or(e){return pi.create([this,e],this._def)}and(e){return fi.create(this,e,this._def)}transform(e){return new Sn({...Te(this._def),schema:this,typeName:xe.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new bi({...Te(this._def),innerType:this,defaultValue:r,typeName:xe.ZodDefault})}brand(){return new Od({typeName:xe.ZodBranded,type:this,...Te(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new _i({...Te(this._def),innerType:this,catchValue:r,typeName:xe.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return wi.create(this,e)}readonly(){return ki.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const wE=/^c[^\s-]{8,}$/i,kE=/^[0-9a-z]+$/,xE=/^[0-9A-HJKMNP-TV-Z]{26}$/,vE=/^[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,CE=/^[a-z0-9_-]{21}$/i,SE=/^[-+]?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)?)??$/,EE=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,NE="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ad;const VE=/^(?:(?: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])$/,BE=/^(([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})))$/,TE=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Gm="((\\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])))",RE=new RegExp(`^${Gm}$`);function Um(n){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return n.precision?e=`${e}\\.\\d{${n.precision}}`:n.precision==null&&(e=`${e}(\\.\\d+)?`),e}function IE(n){return new RegExp(`^${Um(n)}$`)}function Hm(n){let e=`${Gm}T${Um(n)}`;const r=[];return r.push(n.local?"Z?":"Z"),n.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function AE(n,e){return!!((e==="v4"||!e)&&VE.test(n)||(e==="v6"||!e)&&BE.test(n))}class vn extends Le{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==se.string){const a=this._getOrReturnCtx(e);return ie(a,{code:ne.invalid_type,expected:se.string,received:a.parsedType}),Se}const r=new Vt;let o;for(const a of this._def.checks)if(a.kind==="min")e.data.length<a.value&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ne.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="max")e.data.length>a.value&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ne.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!1,message:a.message}),r.dirty());else if(a.kind==="length"){const l=e.data.length>a.value,c=e.data.length<a.value;(l||c)&&(o=this._getOrReturnCtx(e,o),l?ie(o,{code:ne.too_big,maximum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}):c&&ie(o,{code:ne.too_small,minimum:a.value,type:"string",inclusive:!0,exact:!0,message:a.message}),r.dirty())}else if(a.kind==="email")EE.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"email",code:ne.invalid_string,message:a.message}),r.dirty());else if(a.kind==="emoji")Ad||(Ad=new RegExp(NE,"u")),Ad.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"emoji",code:ne.invalid_string,message:a.message}),r.dirty());else if(a.kind==="uuid")vE.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"uuid",code:ne.invalid_string,message:a.message}),r.dirty());else if(a.kind==="nanoid")CE.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"nanoid",code:ne.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid")wE.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"cuid",code:ne.invalid_string,message:a.message}),r.dirty());else if(a.kind==="cuid2")kE.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"cuid2",code:ne.invalid_string,message:a.message}),r.dirty());else if(a.kind==="ulid")xE.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"ulid",code:ne.invalid_string,message:a.message}),r.dirty());else if(a.kind==="url")try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),ie(o,{validation:"url",code:ne.invalid_string,message:a.message}),r.dirty()}else a.kind==="regex"?(a.regex.lastIndex=0,a.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"regex",code:ne.invalid_string,message:a.message}),r.dirty())):a.kind==="trim"?e.data=e.data.trim():a.kind==="includes"?e.data.includes(a.value,a.position)||(o=this._getOrReturnCtx(e,o),ie(o,{code:ne.invalid_string,validation:{includes:a.value,position:a.position},message:a.message}),r.dirty()):a.kind==="toLowerCase"?e.data=e.data.toLowerCase():a.kind==="toUpperCase"?e.data=e.data.toUpperCase():a.kind==="startsWith"?e.data.startsWith(a.value)||(o=this._getOrReturnCtx(e,o),ie(o,{code:ne.invalid_string,validation:{startsWith:a.value},message:a.message}),r.dirty()):a.kind==="endsWith"?e.data.endsWith(a.value)||(o=this._getOrReturnCtx(e,o),ie(o,{code:ne.invalid_string,validation:{endsWith:a.value},message:a.message}),r.dirty()):a.kind==="datetime"?Hm(a).test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{code:ne.invalid_string,validation:"datetime",message:a.message}),r.dirty()):a.kind==="date"?RE.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{code:ne.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?IE(a).test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{code:ne.invalid_string,validation:"time",message:a.message}),r.dirty()):a.kind==="duration"?SE.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"duration",code:ne.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?AE(e.data,a.version)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"ip",code:ne.invalid_string,message:a.message}),r.dirty()):a.kind==="base64"?TE.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"base64",code:ne.invalid_string,message:a.message}),r.dirty()):Ge.assertNever(a);return{status:r.value,value:e.data}}_regex(e,r,o){return this.refinement(a=>e.test(a),{validation:r,code:ne.invalid_string,...he.errToObj(o)})}_addCheck(e){return new vn({...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 r,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:(r=e==null?void 0:e.offset)!==null&&r!==void 0?r:!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,r){return this._addCheck({kind:"regex",regex:e,...he.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...he.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...he.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...he.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...he.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...he.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...he.errToObj(r)})}nonempty(e){return this.min(1,he.errToObj(e))}trim(){return new vn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new vn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new vn({...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 r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}vn.create=n=>{var e;return new vn({checks:[],typeName:xe.ZodString,coerce:(e=n==null?void 0:n.coerce)!==null&&e!==void 0?e:!1,...Te(n)})};function LE(n,e){const r=(n.toString().split(".")[1]||"").length,o=(e.toString().split(".")[1]||"").length,a=r>o?r:o,l=parseInt(n.toFixed(a).replace(".","")),c=parseInt(e.toFixed(a).replace(".",""));return l%c/Math.pow(10,a)}class Mr extends Le{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)!==se.number){const a=this._getOrReturnCtx(e);return ie(a,{code:ne.invalid_type,expected:se.number,received:a.parsedType}),Se}let r;const o=new Vt;for(const a of this._def.checks)a.kind==="int"?Ge.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),ie(r,{code:ne.invalid_type,expected:"integer",received:"float",message:a.message}),o.dirty()):a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(r=this._getOrReturnCtx(e,r),ie(r,{code:ne.too_small,minimum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),ie(r,{code:ne.too_big,maximum:a.value,type:"number",inclusive:a.inclusive,exact:!1,message:a.message}),o.dirty()):a.kind==="multipleOf"?LE(e.data,a.value)!==0&&(r=this._getOrReturnCtx(e,r),ie(r,{code:ne.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):a.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),ie(r,{code:ne.not_finite,message:a.message}),o.dirty()):Ge.assertNever(a);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,he.toString(r))}gt(e,r){return this.setLimit("min",e,!1,he.toString(r))}lte(e,r){return this.setLimit("max",e,!0,he.toString(r))}lt(e,r){return this.setLimit("max",e,!1,he.toString(r))}setLimit(e,r,o,a){return new Mr({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:o,message:he.toString(a)}]})}_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,r){return this._addCheck({kind:"multipleOf",value:e,message:he.toString(r)})}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 r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.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,r=null;for(const o of this._def.checks){if(o.kind==="finite"||o.kind==="int"||o.kind==="multipleOf")return!0;o.kind==="min"?(r===null||o.value>r)&&(r=o.value):o.kind==="max"&&(e===null||o.value<e)&&(e=o.value)}return Number.isFinite(r)&&Number.isFinite(e)}}Mr.create=n=>new Mr({checks:[],typeName:xe.ZodNumber,coerce:(n==null?void 0:n.coerce)||!1,...Te(n)});class Fr extends Le{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)!==se.bigint){const a=this._getOrReturnCtx(e);return ie(a,{code:ne.invalid_type,expected:se.bigint,received:a.parsedType}),Se}let r;const o=new Vt;for(const a of this._def.checks)a.kind==="min"?(a.inclusive?e.data<a.value:e.data<=a.value)&&(r=this._getOrReturnCtx(e,r),ie(r,{code:ne.too_small,type:"bigint",minimum:a.value,inclusive:a.inclusive,message:a.message}),o.dirty()):a.kind==="max"?(a.inclusive?e.data>a.value:e.data>=a.value)&&(r=this._getOrReturnCtx(e,r),ie(r,{code:ne.too_big,type:"bigint",maximum:a.value,inclusive:a.inclusive,message:a.message}),o.dirty()):a.kind==="multipleOf"?e.data%a.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),ie(r,{code:ne.not_multiple_of,multipleOf:a.value,message:a.message}),o.dirty()):Ge.assertNever(a);return{status:o.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,he.toString(r))}gt(e,r){return this.setLimit("min",e,!1,he.toString(r))}lte(e,r){return this.setLimit("max",e,!0,he.toString(r))}lt(e,r){return this.setLimit("max",e,!1,he.toString(r))}setLimit(e,r,o,a){return new Fr({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:o,message:he.toString(a)}]})}_addCheck(e){return new Fr({...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,r){return this._addCheck({kind:"multipleOf",value:e,message:he.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}Fr.create=n=>{var e;return new Fr({checks:[],typeName:xe.ZodBigInt,coerce:(e=n==null?void 0:n.coerce)!==null&&e!==void 0?e:!1,...Te(n)})};class ci extends Le{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==se.boolean){const r=this._getOrReturnCtx(e);return ie(r,{code:ne.invalid_type,expected:se.boolean,received:r.parsedType}),Se}return Ot(e.data)}}ci.create=n=>new ci({typeName:xe.ZodBoolean,coerce:(n==null?void 0:n.coerce)||!1,...Te(n)});class mo extends Le{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==se.date){const a=this._getOrReturnCtx(e);return ie(a,{code:ne.invalid_type,expected:se.date,received:a.parsedType}),Se}if(isNaN(e.data.getTime())){const a=this._getOrReturnCtx(e);return ie(a,{code:ne.invalid_date}),Se}const r=new Vt;let o;for(const a of this._def.checks)a.kind==="min"?e.data.getTime()<a.value&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ne.too_small,message:a.message,inclusive:!0,exact:!1,minimum:a.value,type:"date"}),r.dirty()):a.kind==="max"?e.data.getTime()>a.value&&(o=this._getOrReturnCtx(e,o),ie(o,{code:ne.too_big,message:a.message,inclusive:!0,exact:!1,maximum:a.value,type:"date"}),r.dirty()):Ge.assertNever(a);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new mo({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:he.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:he.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}mo.create=n=>new mo({checks:[],coerce:(n==null?void 0:n.coerce)||!1,typeName:xe.ZodDate,...Te(n)});class Wl extends Le{_parse(e){if(this._getType(e)!==se.symbol){const r=this._getOrReturnCtx(e);return ie(r,{code:ne.invalid_type,expected:se.symbol,received:r.parsedType}),Se}return Ot(e.data)}}Wl.create=n=>new Wl({typeName:xe.ZodSymbol,...Te(n)});class di extends Le{_parse(e){if(this._getType(e)!==se.undefined){const r=this._getOrReturnCtx(e);return ie(r,{code:ne.invalid_type,expected:se.undefined,received:r.parsedType}),Se}return Ot(e.data)}}di.create=n=>new di({typeName:xe.ZodUndefined,...Te(n)});class ui extends Le{_parse(e){if(this._getType(e)!==se.null){const r=this._getOrReturnCtx(e);return ie(r,{code:ne.invalid_type,expected:se.null,received:r.parsedType}),Se}return Ot(e.data)}}ui.create=n=>new ui({typeName:xe.ZodNull,...Te(n)});class qo extends Le{constructor(){super(...arguments),this._any=!0}_parse(e){return Ot(e.data)}}qo.create=n=>new qo({typeName:xe.ZodAny,...Te(n)});class ho extends Le{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Ot(e.data)}}ho.create=n=>new ho({typeName:xe.ZodUnknown,...Te(n)});class ur extends Le{_parse(e){const r=this._getOrReturnCtx(e);return ie(r,{code:ne.invalid_type,expected:se.never,received:r.parsedType}),Se}}ur.create=n=>new ur({typeName:xe.ZodNever,...Te(n)});class Gl extends Le{_parse(e){if(this._getType(e)!==se.undefined){const r=this._getOrReturnCtx(e);return ie(r,{code:ne.invalid_type,expected:se.void,received:r.parsedType}),Se}return Ot(e.data)}}Gl.create=n=>new Gl({typeName:xe.ZodVoid,...Te(n)});class Cn extends Le{_parse(e){const{ctx:r,status:o}=this._processInputParams(e),a=this._def;if(r.parsedType!==se.array)return ie(r,{code:ne.invalid_type,expected:se.array,received:r.parsedType}),Se;if(a.exactLength!==null){const c=r.data.length>a.exactLength.value,d=r.data.length<a.exactLength.value;(c||d)&&(ie(r,{code:c?ne.too_big:ne.too_small,minimum:d?a.exactLength.value:void 0,maximum:c?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),o.dirty())}if(a.minLength!==null&&r.data.length<a.minLength.value&&(ie(r,{code:ne.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),o.dirty()),a.maxLength!==null&&r.data.length>a.maxLength.value&&(ie(r,{code:ne.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),o.dirty()),r.common.async)return Promise.all([...r.data].map((c,d)=>a.type._parseAsync(new Jn(r,c,r.path,d)))).then(c=>Vt.mergeArray(o,c));const l=[...r.data].map((c,d)=>a.type._parseSync(new Jn(r,c,r.path,d)));return Vt.mergeArray(o,l)}get element(){return this._def.type}min(e,r){return new Cn({...this._def,minLength:{value:e,message:he.toString(r)}})}max(e,r){return new Cn({...this._def,maxLength:{value:e,message:he.toString(r)}})}length(e,r){return new Cn({...this._def,exactLength:{value:e,message:he.toString(r)}})}nonempty(e){return this.min(1,e)}}Cn.create=(n,e)=>new Cn({type:n,minLength:null,maxLength:null,exactLength:null,typeName:xe.ZodArray,...Te(e)});function Qo(n){if(n instanceof it){const e={};for(const r in n.shape){const o=n.shape[r];e[r]=Qn.create(Qo(o))}return new it({...n._def,shape:()=>e})}else return n instanceof Cn?new Cn({...n._def,type:Qo(n.element)}):n instanceof Qn?Qn.create(Qo(n.unwrap())):n instanceof Dr?Dr.create(Qo(n.unwrap())):n instanceof qn?qn.create(n.items.map(e=>Qo(e))):n}class it extends Le{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(),r=Ge.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==se.object){const u=this._getOrReturnCtx(e);return ie(u,{code:ne.invalid_type,expected:se.object,received:u.parsedType}),Se}const{status:r,ctx:o}=this._processInputParams(e),{shape:a,keys:l}=this._getCached(),c=[];if(!(this._def.catchall instanceof ur&&this._def.unknownKeys==="strip"))for(const u in o.data)l.includes(u)||c.push(u);const d=[];for(const u of l){const f=a[u],m=o.data[u];d.push({key:{status:"valid",value:u},value:f._parse(new Jn(o,m,o.path,u)),alwaysSet:u in o.data})}if(this._def.catchall instanceof ur){const u=this._def.unknownKeys;if(u==="passthrough")for(const f of c)d.push({key:{status:"valid",value:f},value:{status:"valid",value:o.data[f]}});else if(u==="strict")c.length>0&&(ie(o,{code:ne.unrecognized_keys,keys:c}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const f of c){const m=o.data[f];d.push({key:{status:"valid",value:f},value:u._parse(new Jn(o,m,o.path,f)),alwaysSet:f in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const u=[];for(const f of d){const m=await f.key,g=await f.value;u.push({key:m,value:g,alwaysSet:f.alwaysSet})}return u}).then(u=>Vt.mergeObjectSync(r,u)):Vt.mergeObjectSync(r,d)}get shape(){return this._def.shape()}strict(e){return he.errToObj,new it({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,o)=>{var a,l,c,d;const u=(c=(l=(a=this._def).errorMap)===null||l===void 0?void 0:l.call(a,r,o).message)!==null&&c!==void 0?c:o.defaultError;return r.code==="unrecognized_keys"?{message:(d=he.errToObj(e).message)!==null&&d!==void 0?d:u}:{message:u}}}:{}})}strip(){return new it({...this._def,unknownKeys:"strip"})}passthrough(){return new it({...this._def,unknownKeys:"passthrough"})}extend(e){return new it({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new it({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:xe.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new it({...this._def,catchall:e})}pick(e){const r={};return Ge.objectKeys(e).forEach(o=>{e[o]&&this.shape[o]&&(r[o]=this.shape[o])}),new it({...this._def,shape:()=>r})}omit(e){const r={};return Ge.objectKeys(this.shape).forEach(o=>{e[o]||(r[o]=this.shape[o])}),new it({...this._def,shape:()=>r})}deepPartial(){return Qo(this)}partial(e){const r={};return Ge.objectKeys(this.shape).forEach(o=>{const a=this.shape[o];e&&!e[o]?r[o]=a:r[o]=a.optional()}),new it({...this._def,shape:()=>r})}required(e){const r={};return Ge.objectKeys(this.shape).forEach(o=>{if(e&&!e[o])r[o]=this.shape[o];else{let a=this.shape[o];for(;a instanceof Qn;)a=a._def.innerType;r[o]=a}}),new it({...this._def,shape:()=>r})}keyof(){return Xm(Ge.objectKeys(this.shape))}}it.create=(n,e)=>new it({shape:()=>n,unknownKeys:"strip",catchall:ur.create(),typeName:xe.ZodObject,...Te(e)}),it.strictCreate=(n,e)=>new it({shape:()=>n,unknownKeys:"strict",catchall:ur.create(),typeName:xe.ZodObject,...Te(e)}),it.lazycreate=(n,e)=>new it({shape:n,unknownKeys:"strip",catchall:ur.create(),typeName:xe.ZodObject,...Te(e)});class pi extends Le{_parse(e){const{ctx:r}=this._processInputParams(e),o=this._def.options;function a(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 r.common.issues.push(...d.ctx.common.issues),d.result;const c=l.map(d=>new Qt(d.ctx.common.issues));return ie(r,{code:ne.invalid_union,unionErrors:c}),Se}if(r.common.async)return Promise.all(o.map(async l=>{const c={...r,common:{...r.common,issues:[]},parent:null};return{result:await l._parseAsync({data:r.data,path:r.path,parent:c}),ctx:c}})).then(a);{let l;const c=[];for(const u of o){const f={...r,common:{...r.common,issues:[]},parent:null},m=u._parseSync({data:r.data,path:r.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 r.common.issues.push(...l.ctx.common.issues),l.result;const d=c.map(u=>new Qt(u));return ie(r,{code:ne.invalid_union,unionErrors:d}),Se}}get options(){return this._def.options}}pi.create=(n,e)=>new pi({options:n,typeName:xe.ZodUnion,...Te(e)});const Pr=n=>n instanceof hi?Pr(n.schema):n instanceof Sn?Pr(n.innerType()):n instanceof gi?[n.value]:n instanceof zr?n.options:n instanceof yi?Ge.objectValues(n.enum):n instanceof bi?Pr(n._def.innerType):n instanceof di?[void 0]:n instanceof ui?[null]:n instanceof Qn?[void 0,...Pr(n.unwrap())]:n instanceof Dr?[null,...Pr(n.unwrap())]:n instanceof Od||n instanceof ki?Pr(n.unwrap()):n instanceof _i?Pr(n._def.innerType):[];class Ul extends Le{_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==se.object)return ie(r,{code:ne.invalid_type,expected:se.object,received:r.parsedType}),Se;const o=this.discriminator,a=r.data[o],l=this.optionsMap.get(a);return l?r.common.async?l._parseAsync({data:r.data,path:r.path,parent:r}):l._parseSync({data:r.data,path:r.path,parent:r}):(ie(r,{code:ne.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),Se)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,o){const a=new Map;for(const l of r){const c=Pr(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(a.has(d))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(d)}`);a.set(d,l)}}return new Ul({typeName:xe.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:a,...Te(o)})}}function Ld(n,e){const r=Zr(n),o=Zr(e);if(n===e)return{valid:!0,data:n};if(r===se.object&&o===se.object){const a=Ge.objectKeys(e),l=Ge.objectKeys(n).filter(d=>a.indexOf(d)!==-1),c={...n,...e};for(const d of l){const u=Ld(n[d],e[d]);if(!u.valid)return{valid:!1};c[d]=u.data}return{valid:!0,data:c}}else if(r===se.array&&o===se.array){if(n.length!==e.length)return{valid:!1};const a=[];for(let l=0;l<n.length;l++){const c=n[l],d=e[l],u=Ld(c,d);if(!u.valid)return{valid:!1};a.push(u.data)}return{valid:!0,data:a}}else return r===se.date&&o===se.date&&+n==+e?{valid:!0,data:n}:{valid:!1}}class fi extends Le{_parse(e){const{status:r,ctx:o}=this._processInputParams(e),a=(l,c)=>{if(Rd(l)||Rd(c))return Se;const d=Ld(l.value,c.value);return d.valid?((Id(l)||Id(c))&&r.dirty(),{status:r.value,value:d.data}):(ie(o,{code:ne.invalid_intersection_types}),Se)};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])=>a(l,c)):a(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}fi.create=(n,e,r)=>new fi({left:n,right:e,typeName:xe.ZodIntersection,...Te(r)});class qn extends Le{_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==se.array)return ie(o,{code:ne.invalid_type,expected:se.array,received:o.parsedType}),Se;if(o.data.length<this._def.items.length)return ie(o,{code:ne.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Se;!this._def.rest&&o.data.length>this._def.items.length&&(ie(o,{code:ne.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const a=[...o.data].map((l,c)=>{const d=this._def.items[c]||this._def.rest;return d?d._parse(new Jn(o,l,o.path,c)):null}).filter(l=>!!l);return o.common.async?Promise.all(a).then(l=>Vt.mergeArray(r,l)):Vt.mergeArray(r,a)}get items(){return this._def.items}rest(e){return new qn({...this._def,rest:e})}}qn.create=(n,e)=>{if(!Array.isArray(n))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new qn({items:n,typeName:xe.ZodTuple,rest:null,...Te(e)})};class mi extends Le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==se.object)return ie(o,{code:ne.invalid_type,expected:se.object,received:o.parsedType}),Se;const a=[],l=this._def.keyType,c=this._def.valueType;for(const d in o.data)a.push({key:l._parse(new Jn(o,d,o.path,d)),value:c._parse(new Jn(o,o.data[d],o.path,d)),alwaysSet:d in o.data});return o.common.async?Vt.mergeObjectAsync(r,a):Vt.mergeObjectSync(r,a)}get element(){return this._def.valueType}static create(e,r,o){return r instanceof Le?new mi({keyType:e,valueType:r,typeName:xe.ZodRecord,...Te(o)}):new mi({keyType:vn.create(),valueType:e,typeName:xe.ZodRecord,...Te(r)})}}class Hl extends Le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==se.map)return ie(o,{code:ne.invalid_type,expected:se.map,received:o.parsedType}),Se;const a=this._def.keyType,l=this._def.valueType,c=[...o.data.entries()].map(([d,u],f)=>({key:a._parse(new Jn(o,d,o.path,[f,"key"])),value:l._parse(new Jn(o,u,o.path,[f,"value"]))}));if(o.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const u of c){const f=await u.key,m=await u.value;if(f.status==="aborted"||m.status==="aborted")return Se;(f.status==="dirty"||m.status==="dirty")&&r.dirty(),d.set(f.value,m.value)}return{status:r.value,value:d}})}else{const d=new Map;for(const u of c){const f=u.key,m=u.value;if(f.status==="aborted"||m.status==="aborted")return Se;(f.status==="dirty"||m.status==="dirty")&&r.dirty(),d.set(f.value,m.value)}return{status:r.value,value:d}}}}Hl.create=(n,e,r)=>new Hl({valueType:e,keyType:n,typeName:xe.ZodMap,...Te(r)});class go extends Le{_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.parsedType!==se.set)return ie(o,{code:ne.invalid_type,expected:se.set,received:o.parsedType}),Se;const a=this._def;a.minSize!==null&&o.data.size<a.minSize.value&&(ie(o,{code:ne.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),r.dirty()),a.maxSize!==null&&o.data.size>a.maxSize.value&&(ie(o,{code:ne.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),r.dirty());const l=this._def.valueType;function c(u){const f=new Set;for(const m of u){if(m.status==="aborted")return Se;m.status==="dirty"&&r.dirty(),f.add(m.value)}return{status:r.value,value:f}}const d=[...o.data.values()].map((u,f)=>l._parse(new Jn(o,u,o.path,f)));return o.common.async?Promise.all(d).then(u=>c(u)):c(d)}min(e,r){return new go({...this._def,minSize:{value:e,message:he.toString(r)}})}max(e,r){return new go({...this._def,maxSize:{value:e,message:he.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}go.create=(n,e)=>new go({valueType:n,minSize:null,maxSize:null,typeName:xe.ZodSet,...Te(e)});class ea extends Le{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==se.function)return ie(r,{code:ne.invalid_type,expected:se.function,received:r.parsedType}),Se;function o(d,u){return Pl({data:d,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Fl(),Jo].filter(f=>!!f),issueData:{code:ne.invalid_arguments,argumentsError:u}})}function a(d,u){return Pl({data:d,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Fl(),Jo].filter(f=>!!f),issueData:{code:ne.invalid_return_type,returnTypeError:u}})}const l={errorMap:r.common.contextualErrorMap},c=r.data;if(this._def.returns instanceof ta){const d=this;return Ot(async function(...u){const f=new Qt([]),m=await d._def.args.parseAsync(u,l).catch(y=>{throw f.addIssue(o(u,y)),f}),g=await Reflect.apply(c,this,m);return await d._def.returns._def.type.parseAsync(g,l).catch(y=>{throw f.addIssue(a(g,y)),f})})}else{const d=this;return Ot(function(...u){const f=d._def.args.safeParse(u,l);if(!f.success)throw new Qt([o(u,f.error)]);const m=Reflect.apply(c,this,f.data),g=d._def.returns.safeParse(m,l);if(!g.success)throw new Qt([a(m,g.error)]);return g.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ea({...this._def,args:qn.create(e).rest(ho.create())})}returns(e){return new ea({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,o){return new ea({args:e||qn.create([]).rest(ho.create()),returns:r||ho.create(),typeName:xe.ZodFunction,...Te(o)})}}class hi extends Le{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}hi.create=(n,e)=>new hi({getter:n,typeName:xe.ZodLazy,...Te(e)});class gi extends Le{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return ie(r,{received:r.data,code:ne.invalid_literal,expected:this._def.value}),Se}return{status:"valid",value:e.data}}get value(){return this._def.value}}gi.create=(n,e)=>new gi({value:n,typeName:xe.ZodLiteral,...Te(e)});function Xm(n,e){return new zr({values:n,typeName:xe.ZodEnum,...Te(e)})}class zr extends Le{constructor(){super(...arguments),li.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),o=this._def.values;return ie(r,{expected:Ge.joinValues(o),received:r.parsedType,code:ne.invalid_type}),Se}if(Dl(this,li)||Dm(this,li,new Set(this._def.values)),!Dl(this,li).has(e.data)){const r=this._getOrReturnCtx(e),o=this._def.values;return ie(r,{received:r.data,code:ne.invalid_enum_value,options:o}),Se}return Ot(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return zr.create(e,{...this._def,...r})}exclude(e,r=this._def){return zr.create(this.options.filter(o=>!e.includes(o)),{...this._def,...r})}}li=new WeakMap,zr.create=Xm;class yi extends Le{constructor(){super(...arguments),si.set(this,void 0)}_parse(e){const r=Ge.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==se.string&&o.parsedType!==se.number){const a=Ge.objectValues(r);return ie(o,{expected:Ge.joinValues(a),received:o.parsedType,code:ne.invalid_type}),Se}if(Dl(this,si)||Dm(this,si,new Set(Ge.getValidEnumValues(this._def.values))),!Dl(this,si).has(e.data)){const a=Ge.objectValues(r);return ie(o,{received:o.data,code:ne.invalid_enum_value,options:a}),Se}return Ot(e.data)}get enum(){return this._def.values}}si=new WeakMap,yi.create=(n,e)=>new yi({values:n,typeName:xe.ZodNativeEnum,...Te(e)});class ta extends Le{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==se.promise&&r.common.async===!1)return ie(r,{code:ne.invalid_type,expected:se.promise,received:r.parsedType}),Se;const o=r.parsedType===se.promise?r.data:Promise.resolve(r.data);return Ot(o.then(a=>this._def.type.parseAsync(a,{path:r.path,errorMap:r.common.contextualErrorMap})))}}ta.create=(n,e)=>new ta({type:n,typeName:xe.ZodPromise,...Te(e)});class Sn extends Le{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===xe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:o}=this._processInputParams(e),a=this._def.effect||null,l={addIssue:c=>{ie(o,c),c.fatal?r.abort():r.dirty()},get path(){return o.path}};if(l.addIssue=l.addIssue.bind(l),a.type==="preprocess"){const c=a.transform(o.data,l);if(o.common.async)return Promise.resolve(c).then(async d=>{if(r.value==="aborted")return Se;const u=await this._def.schema._parseAsync({data:d,path:o.path,parent:o});return u.status==="aborted"?Se:u.status==="dirty"||r.value==="dirty"?zl(u.value):u});{if(r.value==="aborted")return Se;const d=this._def.schema._parseSync({data:c,path:o.path,parent:o});return d.status==="aborted"?Se:d.status==="dirty"||r.value==="dirty"?zl(d.value):d}}if(a.type==="refinement"){const c=d=>{const u=a.refinement(d,l);if(o.common.async)return Promise.resolve(u);if(u 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"?Se:(d.status==="dirty"&&r.dirty(),c(d.value),{status:r.value,value:d.value})}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(d=>d.status==="aborted"?Se:(d.status==="dirty"&&r.dirty(),c(d.value).then(()=>({status:r.value,value:d.value}))))}if(a.type==="transform")if(o.common.async===!1){const c=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!ai(c))return c;const d=a.transform(c.value,l);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:d}}else return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(c=>ai(c)?Promise.resolve(a.transform(c.value,l)).then(d=>({status:r.value,value:d})):c);Ge.assertNever(a)}}Sn.create=(n,e,r)=>new Sn({schema:n,typeName:xe.ZodEffects,effect:e,...Te(r)}),Sn.createWithPreprocess=(n,e,r)=>new Sn({schema:e,effect:{type:"preprocess",transform:n},typeName:xe.ZodEffects,...Te(r)});class Qn extends Le{_parse(e){return this._getType(e)===se.undefined?Ot(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Qn.create=(n,e)=>new Qn({innerType:n,typeName:xe.ZodOptional,...Te(e)});class Dr extends Le{_parse(e){return this._getType(e)===se.null?Ot(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Dr.create=(n,e)=>new Dr({innerType:n,typeName:xe.ZodNullable,...Te(e)});class bi extends Le{_parse(e){const{ctx:r}=this._processInputParams(e);let o=r.data;return r.parsedType===se.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}bi.create=(n,e)=>new bi({innerType:n,typeName:xe.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Te(e)});class _i extends Le{_parse(e){const{ctx:r}=this._processInputParams(e),o={...r,common:{...r.common,issues:[]}},a=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return ii(a)?a.then(l=>({status:"valid",value:l.status==="valid"?l.value:this._def.catchValue({get error(){return new Qt(o.common.issues)},input:o.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new Qt(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}_i.create=(n,e)=>new _i({innerType:n,typeName:xe.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Te(e)});class Xl extends Le{_parse(e){if(this._getType(e)!==se.nan){const r=this._getOrReturnCtx(e);return ie(r,{code:ne.invalid_type,expected:se.nan,received:r.parsedType}),Se}return{status:"valid",value:e.data}}}Xl.create=n=>new Xl({typeName:xe.ZodNaN,...Te(n)});const OE=Symbol("zod_brand");class Od extends Le{_parse(e){const{ctx:r}=this._processInputParams(e),o=r.data;return this._def.type._parse({data:o,path:r.path,parent:r})}unwrap(){return this._def.type}}class wi extends Le{_parse(e){const{status:r,ctx:o}=this._processInputParams(e);if(o.common.async)return(async()=>{const a=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return a.status==="aborted"?Se:a.status==="dirty"?(r.dirty(),zl(a.value)):this._def.out._parseAsync({data:a.value,path:o.path,parent:o})})();{const a=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return a.status==="aborted"?Se:a.status==="dirty"?(r.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:o.path,parent:o})}}static create(e,r){return new wi({in:e,out:r,typeName:xe.ZodPipeline})}}class ki extends Le{_parse(e){const r=this._def.innerType._parse(e),o=a=>(ai(a)&&(a.value=Object.freeze(a.value)),a);return ii(r)?r.then(a=>o(a)):o(r)}unwrap(){return this._def.innerType}}ki.create=(n,e)=>new ki({innerType:n,typeName:xe.ZodReadonly,...Te(e)});function jm(n,e={},r){return n?qo.create().superRefine((o,a)=>{var l,c;if(!n(o)){const d=typeof e=="function"?e(o):typeof e=="string"?{message:e}:e,u=(c=(l=d.fatal)!==null&&l!==void 0?l:r)!==null&&c!==void 0?c:!0,f=typeof d=="string"?{message:d}:d;a.addIssue({code:"custom",...f,fatal:u})}}):qo.create()}const $E={object:it.lazycreate};var xe;(function(n){n.ZodString="ZodString",n.ZodNumber="ZodNumber",n.ZodNaN="ZodNaN",n.ZodBigInt="ZodBigInt",n.ZodBoolean="ZodBoolean",n.ZodDate="ZodDate",n.ZodSymbol="ZodSymbol",n.ZodUndefined="ZodUndefined",n.ZodNull="ZodNull",n.ZodAny="ZodAny",n.ZodUnknown="ZodUnknown",n.ZodNever="ZodNever",n.ZodVoid="ZodVoid",n.ZodArray="ZodArray",n.ZodObject="ZodObject",n.ZodUnion="ZodUnion",n.ZodDiscriminatedUnion="ZodDiscriminatedUnion",n.ZodIntersection="ZodIntersection",n.ZodTuple="ZodTuple",n.ZodRecord="ZodRecord",n.ZodMap="ZodMap",n.ZodSet="ZodSet",n.ZodFunction="ZodFunction",n.ZodLazy="ZodLazy",n.ZodLiteral="ZodLiteral",n.ZodEnum="ZodEnum",n.ZodEffects="ZodEffects",n.ZodNativeEnum="ZodNativeEnum",n.ZodOptional="ZodOptional",n.ZodNullable="ZodNullable",n.ZodDefault="ZodDefault",n.ZodCatch="ZodCatch",n.ZodPromise="ZodPromise",n.ZodBranded="ZodBranded",n.ZodPipeline="ZodPipeline",n.ZodReadonly="ZodReadonly"})(xe||(xe={}));const ZE=(n,e={message:`Input not instance of ${n.name}`})=>jm(r=>r instanceof n,e),Ym=vn.create,Km=Mr.create,ME=Xl.create,FE=Fr.create,Jm=ci.create,PE=mo.create,zE=Wl.create,DE=di.create,WE=ui.create,GE=qo.create,UE=ho.create,HE=ur.create,XE=Gl.create,jE=Cn.create,YE=it.create,KE=it.strictCreate,JE=pi.create,qE=Ul.create,QE=fi.create,eN=qn.create,tN=mi.create,nN=Hl.create,rN=go.create,oN=ea.create,aN=hi.create,iN=gi.create,lN=zr.create,sN=yi.create,cN=ta.create,qm=Sn.create,dN=Qn.create,uN=Dr.create,pN=Sn.createWithPreprocess,fN=wi.create;var ze=Object.freeze({__proto__:null,defaultErrorMap:Jo,setErrorMap:bE,getErrorMap:Fl,makeIssue:Pl,EMPTY_PATH:_E,addIssueToContext:ie,ParseStatus:Vt,INVALID:Se,DIRTY:zl,OK:Ot,isAborted:Rd,isDirty:Id,isValid:ai,isAsync:ii,get util(){return Ge},get objectUtil(){return Td},ZodParsedType:se,getParsedType:Zr,ZodType:Le,datetimeRegex:Hm,ZodString:vn,ZodNumber:Mr,ZodBigInt:Fr,ZodBoolean:ci,ZodDate:mo,ZodSymbol:Wl,ZodUndefined:di,ZodNull:ui,ZodAny:qo,ZodUnknown:ho,ZodNever:ur,ZodVoid:Gl,ZodArray:Cn,ZodObject:it,ZodUnion:pi,ZodDiscriminatedUnion:Ul,ZodIntersection:fi,ZodTuple:qn,ZodRecord:mi,ZodMap:Hl,ZodSet:go,ZodFunction:ea,ZodLazy:hi,ZodLiteral:gi,ZodEnum:zr,ZodNativeEnum:yi,ZodPromise:ta,ZodEffects:Sn,ZodTransformer:Sn,ZodOptional:Qn,ZodNullable:Dr,ZodDefault:bi,ZodCatch:_i,ZodNaN:Xl,BRAND:OE,ZodBranded:Od,ZodPipeline:wi,ZodReadonly:ki,custom:jm,Schema:Le,ZodSchema:Le,late:$E,get ZodFirstPartyTypeKind(){return xe},coerce:{string:n=>vn.create({...n,coerce:!0}),number:n=>Mr.create({...n,coerce:!0}),boolean:n=>ci.create({...n,coerce:!0}),bigint:n=>Fr.create({...n,coerce:!0}),date:n=>mo.create({...n,coerce:!0})},any:GE,array:jE,bigint:FE,boolean:Jm,date:PE,discriminatedUnion:qE,effect:qm,enum:lN,function:oN,instanceof:ZE,intersection:QE,lazy:aN,literal:iN,map:nN,nan:ME,nativeEnum:sN,never:HE,null:WE,nullable:uN,number:Km,object:YE,oboolean:()=>Jm().optional(),onumber:()=>Km().optional(),optional:dN,ostring:()=>Ym().optional(),pipeline:fN,preprocess:pN,promise:cN,record:tN,set:rN,strictObject:KE,string:Ym,symbol:zE,transformer:qm,tuple:eN,undefined:DE,union:JE,unknown:UE,void:XE,NEVER:Se,ZodIssueCode:ne,quotelessJson:yE,ZodError:Qt});function mN(n){throw new Error("Unexpected object: "+n)}const Qm="upload://upload/",eh="index://index/";function hN(n){return n.startsWith(Qm)}function gN(n){return n.startsWith(eh)}function th(n){if(gN(n)){const e=n.slice(eh.length);return JSON.parse(decodeURIComponent(e)).path}else if(hN(n)){const e=n.slice(Qm.length);return JSON.parse(decodeURIComponent(e)).localPath}mN(n)}function yN(n){return n.replace(/^.*[\\/]/,"")}function bN(n){return yN(th(n))}ze.object({__isRef:ze.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:ze.string().describe("Upstream block id"),name:ze.string().describe("Name of the output provided to the upstream block's output context"),requireEnrichments:ze.literal(!0).optional().describe("True if current block that stores this reference in its args, may need enrichments for the references value originating from the blocks in between current and referenced block")}).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.").readonly(),ze.string().length(24).regex(/[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]/).brand("PlId");var nh={exports:{}};(function(n,e){e=n.exports=r,e.getSerialize=o;function r(a,l,c,d){return JSON.stringify(a,o(l,d),c)}function o(a,l){var c=[],d=[];return l==null&&(l=function(u,f){return c[0]===f?"[Circular ~]":"[Circular ~."+d.slice(0,c.indexOf(f)).join(".")+"]"}),function(u,f){if(c.length>0){var m=c.indexOf(this);~m?c.splice(m+1):c.push(this),~m?d.splice(m,1/0,u):d.push(u),~c.indexOf(f)&&(f=l.call(this,u,f))}else c.push(f);return a==null?f:a.call(this,u,f)}}})(nh,nh.exports);const _N=ze.object({type:ze.literal("PlError"),name:ze.string(),message:ze.string(),fullMessage:ze.string().optional(),stack:ze.string().optional()}),wN=_N.extend({cause:ze.lazy(()=>jl).optional(),errors:ze.lazy(()=>jl.array()).optional()}),kN=ze.object({type:ze.literal("StandardError"),name:ze.string(),message:ze.string(),stack:ze.string().optional()}),xN=kN.extend({cause:ze.lazy(()=>jl).optional(),errors:ze.lazy(()=>jl.array()).optional()}),jl=ze.union([xN,wN]),vN=ze.object({name:ze.string(),message:ze.string(),fullMessage:ze.string().optional(),stack:ze.string().optional()}),rh=vN.extend({cause:ze.lazy(()=>rh).optional(),errors:ze.lazy(()=>rh.array()).optional()});function CN(n){if(n&&typeof globalThis.getPlatforma=="function")return globalThis.getPlatforma(n);if(typeof globalThis.platforma<"u")return globalThis.platforma;throw new Error("Can't get platforma instance.")}const SN=ze.object({type:ze.string(),importance:ze.number().optional(),id:ze.string().optional(),label:ze.string()});ze.array(SN);const EN="1.30.37";function Wr(){return CN({sdkVersion:EN})}const NN="[==PROGRESS==]";function VN(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function BN(n){const e=t.ref(),r=t.reactive({errorCount:0});async function o(){var l;let c=e.value;if(c===void 0)return;const d=n.mockPlatforma??Wr();if(!d){console.warn("Platforma API is not available");return}for(;;){const u=await d.logDriver.readText(c.logHandle,100,c.lastOffset);if(c.error=void 0,r.errorCount=0,u.shouldUpdateHandle||c.logHandle!==((l=e.value)==null?void 0:l.logHandle))return;const f=n.progressPrefix??NN,m=new TextDecoder().decode(u.data).replace(new RegExp(`${VN(f)}`,"g"),"");if(c=Object.assign(c,{lines:c.lines+m,lastOffset:u.newOffset,finished:!u.live}),u.newOffset>=u.size)break}}const a=gE(()=>o().catch(l=>{e.value&&(r.errorCount++,r.errorCount>(n.maxRetries??3)?e.value.error=l:console.warn("skip error:",l,"retry..."))}),1500,{immediate:!1});return hE(()=>{var l;return(l=e==null?void 0:e.value)==null?void 0:l.finished},()=>a.pause()),t.watch(()=>n.logHandle,l=>{var c;l===void 0?(e.value=void 0,a.pause()):l!==((c=e.value)==null?void 0:c.logHandle)&&(e.value={logHandle:l,lastOffset:0,lines:"",finished:!1,error:void 0},r.errorCount=0,a.resume())},{immediate:!0}),e}const TN={key:0},RN={class:"pl-log-view__copy"},IN={key:1,class:"pl-log-view__error"},AN={name:"PlLogView"},oh=t.defineComponent({...AN,props:{value:{},valueToCopy:{},logHandle:{},progressPrefix:{},error:{},output:{},maxRetries:{},mockPlatforma:{},label:{},disableAutoScroll:{type:Boolean}},setup(n){const e=N=>{if(N&&N.ok===!1)return N.errors.join(`
|
|
37
|
+
`)},r=t.useSlots(),o=n,a=BN(o),l=t.ref(!0),c=t.ref(),d=t.ref(),u=t.computed(()=>{var N;return((N=a.value)==null?void 0:N.error)??o.error??e(o.output)}),f=t.computed(()=>{var N;return((N=a.value)==null?void 0:N.lines)??o.value??jw(o.output)}),m=t.ref(!1);Kn(d);const g=t.computed(()=>m.value?"clipboard-copied":"clipboard"),y=()=>{m.value=!0,setTimeout(()=>{m.value=!1},1200);let N;o.valueToCopy?N=o.valueToCopy:f.value&&typeof f.value=="string"&&(N=f.value),N!==void 0&&navigator.clipboard.writeText(N)},_=()=>{o.disableAutoScroll||Ar(c.value,N=>{l.value&&N.scrollTo(N.scrollLeft,N.scrollHeight)})};t.watch(f,()=>{requestAnimationFrame(()=>{_()})},{immediate:!0});const C=N=>{const T=N.target;l.value=T.scrollTop+20>=T.scrollHeight-T.offsetHeight};return(N,T)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"root",ref:d,class:t.normalizeClass(["pl-log-view",{"has-error":u.value}])},[N.label?(t.openBlock(),t.createElementBlock("label",TN,[t.createElementVNode("span",null,t.toDisplayString(N.label),1),T[0]||(T[0]=t.createTextVNode()),t.unref(r).tooltip?(t.openBlock(),t.createBlock(t.unref(ct),{key:0,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(N.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),T[2]||(T[2]=t.createTextVNode()),t.createVNode(dr,{class:"pl-log-view__contour"}),T[3]||(T[3]=t.createTextVNode()),t.createElementVNode("div",RN,[t.createVNode(t.unref(ct),{"close-delay":800,position:"top"},{tooltip:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(m.value?"copied":"copy"),1)]),default:t.withCtx(()=>[t.createVNode(t.unref(at),{title:"Copy content",name:g.value,onClick:y},null,8,["name"]),T[1]||(T[1]=t.createTextVNode())]),_:1})]),T[4]||(T[4]=t.createTextVNode()),u.value?(t.openBlock(),t.createElementBlock("div",IN,t.toDisplayString(u.value),1)):(t.openBlock(),t.createElementBlock("div",{key:2,ref_key:"contentRef",ref:c,class:"pl-log-view__content",onScroll:C},t.toDisplayString(f.value),545))],2))}}),LN="_component_1ukal_1",ON="_tab_1ukal_14",$N="_disabled_1ukal_27",ZN="_active_1ukal_56",MN="_topLine_1ukal_69",na={component:LN,tab:ON,disabled:$N,active:ZN,topLine:MN},FN=t.defineComponent({__name:"Tab",props:{option:{}},setup(n){const e=t.ref(),r=t.reactive({isOverflown:!1});return t.onMounted(()=>{const o=t.unref(e);if(!o)return;const a=o.$el.querySelector("span");a&&requestAnimationFrame(()=>{a.offsetWidth<a.scrollWidth&&(r.isOverflown=!0)})}),(o,a)=>(t.openBlock(),t.createBlock(t.unref(ct),{ref_key:"rootRef",ref:e,element:"div",position:"top",hide:!r.isOverflown,"close-delay":300,"data-is-overflown":r.isOverflown?"true":"false"},{tooltip:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(o.option.label),1)]),default:t.withCtx(()=>[t.renderSlot(o.$slots,"default"),a[0]||(a[0]=t.createTextVNode())]),_:3},8,["hide","data-is-overflown"]))}}),PN={name:"PlTabs"},zN=t.defineComponent({...PN,props:{modelValue:{},options:{},disabled:{type:Boolean},topLine:{type:Boolean},maxTabWidth:{}},emits:["update:modelValue"],setup(n,{emit:e}){const r=e,o=a=>r("update:modelValue",a);return(a,l)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([t.unref(na).component,{[t.unref(na).disabled]:a.disabled,[t.unref(na).topLine]:a.topLine}])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.options,(c,d)=>(t.openBlock(),t.createBlock(FN,{key:d,tabindex:a.modelValue===c.value||a.disabled||c.disabled?void 0:0,option:c,class:t.normalizeClass([{[t.unref(na).active]:a.modelValue===c.value,[t.unref(na).disabled]:c.disabled},t.unref(na).tab]),style:t.normalizeStyle({"--pl-tabs-item-max-width":c.maxWidth??a.maxTabWidth}),onKeydown:t.withKeys(u=>o(c.value),["enter"]),onClick:u=>o(c.value)},{default:t.withCtx(()=>[t.renderSlot(a.$slots,c.value,{option:c},()=>[t.createElementVNode("span",null,t.toDisplayString(c.label),1)])]),_:2},1032,["tabindex","option","class","style","onKeydown","onClick"]))),128))],2))}}),DN=t.defineComponent({__name:"PlSectionSeparator",props:{compact:{type:Boolean}},setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["pl-section-separator",{[e.$style.compact]:e.compact}])},[t.createElementVNode("div",{class:t.normalizeClass(e.$style.content)},[t.renderSlot(e.$slots,"default")],2)],2))}}),WN="_compact_rhd5u_16",GN="_content_rhd5u_20",UN={compact:WN,content:GN},HN={$style:UN},ah=st(DN,[["__cssModules",HN]]),XN=t.defineComponent({__name:"PlAccordion",props:t.mergeModels({multiple:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=t.useModel(n,"modelValue"),r=n;return t.provide("pl-accordion-model",e),t.provide("pl-accordion-props",t.toRef(r)),(o,a)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.renderSlot(o.$slots,"header"),a[0]||(a[0]=t.createTextVNode()),t.renderSlot(o.$slots,"default")],64))}}),jN=t.defineComponent({__name:"ExpandTransition",setup(n){const e=o=>{o.classList.add("expand-collapse-fix"),o.style.setProperty("--component-height",o.scrollHeight+"px")},r=o=>{o.style.removeProperty("--component-height"),o.classList.remove("expand-collapse-fix")};return(o,a)=>(t.openBlock(),t.createBlock(t.Transition,{name:"expand-collapse",onEnter:e,onLeave:e,onAfterEnter:r,onAfterLeave:r},{default:t.withCtx(()=>[t.renderSlot(o.$slots,"default")]),_:3}))}}),YN={class:"pl-accordion-section"},KN=t.defineComponent({__name:"PlAccordionSection",props:t.mergeModels({label:{},compact:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=t.inject("pl-accordion-model"),r=t.inject("pl-accordion-props"),o=t.useModel(n,"modelValue"),a=rm(),l=t.computed(()=>!r||r.value.multiple),c=t.computed({get(){return l.value?o.value:e?e.value===a:o.value},set(d){l.value?o.value=d:e&&(e.value=e.value===a?"":a)}});return(d,u)=>(t.openBlock(),t.createElementBlock("div",YN,[t.createVNode(t.unref(ah),{class:t.normalizeClass(d.$style.separator),compact:d.compact,onClick:u[0]||(u[0]=f=>c.value=!c.value)},{default:t.withCtx(()=>[t.createVNode(t.unref(qt),{name:"chevron-right",class:t.normalizeClass([{[d.$style.down]:c.value},d.$style.chevron])},null,8,["class"]),t.createTextVNode(" "+t.toDisplayString(d.label),1)]),_:1},8,["class","compact"]),u[1]||(u[1]=t.createTextVNode()),t.createVNode(jN,null,{default:t.withCtx(()=>[c.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(d.$style.content)},[t.renderSlot(d.$slots,"default")],2)):t.createCommentVNode("",!0)]),_:3})]))}}),JN="_content_e3dof_2",qN="_separator_e3dof_19",QN="_chevron_e3dof_27",eV="_down_e3dof_31",tV={content:JN,separator:qN,chevron:QN,down:eV},nV={$style:tV},rV=st(KN,[["__cssModules",nV]]),ih=t.defineComponent({__name:"PlStatusTag",props:{type:{}},setup(n){const e=t.reactive({typeToText:{OK:"OK",WARN:"WARN",ALERT:"ALERT",HOLD:"HOLD"}});return(r,o)=>r.type?(t.openBlock(),t.createElementBlock("div",t.mergeProps({key:0},r.$attrs,{class:[{[r.type.toLocaleLowerCase()]:!0},"pl-status-tag text-caps11 d-flex align-center"]}),[t.renderSlot(r.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(e.typeToText[r.type]),1)])],16)):t.createCommentVNode("",!0)}}),oV={key:0,class:"progress-cell__infinity-loader"},aV={class:"progress-cell__body"},iV={class:"progress-cell__stage text-s"},lV={class:"progress-cell__percentage text-s d-flex align-center justify-end"},lh=t.defineComponent({__name:"PlProgressCell",props:{stage:{default:"not_started"},step:{default:""},progressString:{default:""},progress:{default:void 0},error:{default:""}},setup(n){const e=n,r=t.computed(()=>e.stage!=="not_started"),o=t.computed(()=>e.stage==="done"?100:Math.min(100,e.progress||0)),a=t.computed(()=>e.progress===void 0&&e.stage!=="done"&&e.stage!=="not_started"&&!e.error);return(l,c)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass({"progress-cell":!0,"progress-cell__white-bg":r.value,error:l.error,"not-started":e.stage==="not_started"})},[a.value?(t.openBlock(),t.createElementBlock("div",oV,c[0]||(c[0]=[t.createElementVNode("div",{class:"progress-cell__infinity-gradient"},null,-1)]))):t.createCommentVNode("",!0),c[3]||(c[3]=t.createTextVNode()),!a.value&&!l.error?(t.openBlock(),t.createElementBlock("div",{key:1,class:"progress-cell__indicator",style:t.normalizeStyle({width:o.value+"%"})},null,4)):t.createCommentVNode("",!0),c[4]||(c[4]=t.createTextVNode()),t.createElementVNode("div",aV,[t.createElementVNode("div",iV,t.toDisplayString(l.error?l.error:l.step),1),c[2]||(c[2]=t.createTextVNode()),t.createElementVNode("div",lV,[l.error?(t.openBlock(),t.createBlock(at,{key:0,name:"error"})):t.createCommentVNode("",!0),c[1]||(c[1]=t.createTextVNode()),l.error?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(l.progressString),1)],64))])])],2))}});function $d(n,e,r){const o=t.ref(0),a=t.reactive({loading:t.computed(()=>o.value>0),loadingRef:o,value:void 0,error:void 0}),l=uk(e);return t.watch(n,async c=>{a.error=void 0,o.value++,l(c).then(d=>{d.ok&&(a.value=d.value)}).catch(d=>{a.value=void 0,a.error=d}).finally(()=>{o.value--})},Object.assign({immediate:!0,deep:!0},r??{})),a}const sV=["tabindex"],cV={class:"pl-autocomplete__container"},dV={class:"pl-autocomplete__field"},uV=["disabled","placeholder"],pV={key:0,class:"input-value"},fV={class:"pl-autocomplete__controls"},mV={key:2,class:"arrow-icon arrow-icon-default"},hV={key:0},gV={key:0,class:"required-icon"},yV={key:0,class:"nothing-found"},bV={key:0,class:"pl-autocomplete__error"},_V={key:1,class:"pl-autocomplete__helper"},wV={key:2,class:"pl-autocomplete__helper"},kV={name:"PlAutocomplete"},xV=t.defineComponent({...kV,props:t.mergeModels({optionsSearch:{},modelSearch:{type:Function,default:void 0},label:{default:""},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"},formatValue:{type:Function,default:n=>String(n)}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=t.useModel(n,"modelValue"),r=n,o=t.useSlots(),a=t.ref(),l=t.ref(),c=t.useTemplateRef("overlay"),d=t.ref(null),u=t.reactive({activeIndex:-1,open:!1}),f=()=>jo(_.value.findIndex(F=>ft(F.value,e.value)),F=>F<0?0:F),m=()=>u.activeIndex=f(),g=t.ref([]),y=t.ref(),_=t.computed(()=>sr(g.value).map((F,j)=>({...F,index:j,isSelected:j===$.value,isActive:j===u.activeIndex}))),C=t.ref(!0),N=t.ref(!1),T=t.computed(()=>r.disabled),$=t.computed(()=>g.value.findIndex(F=>ft(F.value,e.value))),W=t.computed(()=>{if(!C.value){if(r.error)return r.error;if(N.value)return"Data loading error"}}),E=t.computed(()=>{const F=t.unref(y),j=t.unref(_),ee=F??j.find(ue=>ft(ue.value,e.value))??j.find(ue=>ft(ue.value,e.value));return(ee==null?void 0:ee.label)||(e.value?r.formatValue(e.value):"")}),D=t.computed(()=>!u.open&&e.value?"":e.value?String(E.value):r.placeholder),A=t.computed(()=>e.value!==void 0&&e.value!==null),B=t.computed(()=>T.value?void 0:"0"),P=F=>{var j;e.value=F==null?void 0:F.value,y.value=F,d.value=null,u.open=!1,(j=a==null?void 0:a.value)==null||j.focus()},H=()=>{e.value=void 0,y.value=void 0},S=()=>{var F;return(F=l.value)==null?void 0:F.focus()},I=()=>{u.open=!u.open};t.watch(()=>u.open,F=>{d.value=F?"":null});const v=()=>{u.open=!0},L=F=>{var j,ee,ue;const ye=F.relatedTarget;!((j=a.value)!=null&&j.contains(ye))&&!((ue=(ee=c.value)==null?void 0:ee.listRef)!=null&&ue.contains(ye))&&(d.value=null,u.open=!1)},V=F=>{var j;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(F.code))F.preventDefault();else return;const{open:ee,activeIndex:ue}=u;if(!ee){F.code==="Enter"&&(u.open=!0,d.value="");return}F.code==="Escape"&&(u.open=!1,d.value=null,(j=a.value)==null||j.focus());const ye=t.unref(_),{length:Ce}=ye;if(!Ce)return;F.code==="Enter"&&P(ye.find(Ht=>Ht.index===ue));const He=ye.findIndex(Ht=>Ht.index===ue)??-1,Ct=F.code==="ArrowDown"?1:F.code==="ArrowUp"?-1:0,Ye=Math.abs(He+Ct+Ce)%Ce;u.activeIndex=_.value[Ye].index??-1};Kn(a),t.watch(()=>e.value,m,{immediate:!0}),t.watch(()=>u.open,F=>{var j;return F?(j=l.value)==null?void 0:j.focus():""}),t.watchPostEffect(()=>{var F;d.value,u.activeIndex>=0&&u.open&&((F=c.value)==null||F.scrollIntoActive())});const k=fE(d,300,{maxWait:1e3}),Z=$d(()=>k.value,async F=>F!==null?r.optionsSearch(F):[]),U=$d(()=>e.value,async F=>{var j,ee;return F&&!ft((j=y.value)==null?void 0:j.value,F)?r.modelSearch?r.modelSearch(F):(ee=await r.optionsSearch(String(F)))==null?void 0:ee[0]:y.value});return t.watch(()=>Z.value,F=>{F&&(g.value=F,d.value!==null&&(N.value=!1))}),t.watch(()=>U.value,F=>{F&&(y.value=sr([F])[0])}),t.watch(()=>Z.error,F=>{F&&(N.value=!!F)}),t.watch(()=>Z.loading||U.loading,F=>{C.value=F}),(F,j)=>(t.openBlock(),t.createElementBlock("div",{class:"pl-autocomplete__envelope",onClick:t.withModifiers(S,["stop"])},[t.createElementVNode("div",{ref_key:"rootRef",ref:a,tabindex:B.value,class:t.normalizeClass(["pl-autocomplete",{open:u.open,error:!!W.value,disabled:T.value}]),onKeydown:V,onFocusout:L},[t.createElementVNode("div",cV,[t.createElementVNode("div",dV,[t.withDirectives(t.createElementVNode("input",{ref_key:"input",ref:l,"onUpdate:modelValue":j[0]||(j[0]=ee=>d.value=ee),type:"text",tabindex:"-1",disabled:T.value,placeholder:D.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:v},null,40,uV),[[t.vModelText,d.value]]),j[4]||(j[4]=t.createTextVNode()),u.open?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",pV,[t.createVNode(Ll,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(E.value),1)]),_:1})])),j[5]||(j[5]=t.createTextVNode()),t.createElementVNode("div",fV,[C.value?(t.openBlock(),t.createBlock(t.unref(at),{key:0,name:"loading"})):t.createCommentVNode("",!0),j[1]||(j[1]=t.createTextVNode()),F.clearable&&A.value?(t.openBlock(),t.createBlock(t.unref(Or),{key:1,name:"delete-clear",onClick:t.withModifiers(H,["stop"])})):t.createCommentVNode("",!0),j[2]||(j[2]=t.createTextVNode()),t.renderSlot(F.$slots,"append"),j[3]||(j[3]=t.createTextVNode()),t.createElementVNode("div",{class:"pl-autocomplete__arrow-wrapper",onClick:t.withModifiers(I,["stop"])},[F.arrowIconLarge?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["arrow-icon",[`icon-24 ${F.arrowIconLarge}`]])},null,2)):F.arrowIcon?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["arrow-icon",[`icon-16 ${F.arrowIcon}`]])},null,2)):(t.openBlock(),t.createElementBlock("div",mV))])])]),j[9]||(j[9]=t.createTextVNode()),F.label?(t.openBlock(),t.createElementBlock("label",hV,[F.required?(t.openBlock(),t.createElementBlock("i",gV)):t.createCommentVNode("",!0),j[6]||(j[6]=t.createTextVNode()),t.createElementVNode("span",null,t.toDisplayString(F.label),1),j[7]||(j[7]=t.createTextVNode()),t.unref(o).tooltip?(t.openBlock(),t.createBlock(t.unref(ct),{key:1,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(F.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),j[10]||(j[10]=t.createTextVNode()),u.open?(t.openBlock(),t.createBlock(t.unref($l),{key:1,ref:"overlay",root:a.value,class:"pl-autocomplete__options",tabindex:"-1",gap:3},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_.value,(ee,ue)=>(t.openBlock(),t.createBlock(po,{key:ue,option:ee,"is-selected":ee.isSelected,"is-hovered":ee.isActive,size:F.optionSize,onClick:t.withModifiers(ye=>P(ee),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),j[8]||(j[8]=t.createTextVNode()),_.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",yV,"Nothing found"))]),_:1},8,["root"])):t.createCommentVNode("",!0),j[11]||(j[11]=t.createTextVNode()),t.createVNode(dr,{class:"pl-autocomplete__contour"})])],42,sV),j[12]||(j[12]=t.createTextVNode()),W.value?(t.openBlock(),t.createElementBlock("div",bV,t.toDisplayString(W.value),1)):C.value&&F.loadingOptionsHelper?(t.openBlock(),t.createElementBlock("div",_V,t.toDisplayString(F.loadingOptionsHelper),1)):F.helper?(t.openBlock(),t.createElementBlock("div",wV,t.toDisplayString(F.helper),1)):t.createCommentVNode("",!0)]))}}),vV="_component_1uz6e_1",CV="_local_1uz6e_1",SV="_supported_1uz6e_26",EV="_remote_1uz6e_32",NV="_search_1uz6e_40",VV="_selected_1uz6e_72",BV="_breadcrumbs_1uz6e_86",TV="_cat_1uz6e_116",RV="_message_1uz6e_122",IV="_isFile_1uz6e_196",AV="_isDir_1uz6e_200",LV="_canBeSelected_1uz6e_206",OV="_spin_1uz6e_1",mt={component:vV,local:CV,supported:SV,remote:EV,search:NV,"ls-container":"_ls-container_1uz6e_50","ls-head":"_ls-head_1uz6e_57",selected:VV,breadcrumbs:BV,"ls-error":"_ls-error_1uz6e_108",cat:TV,message:RV,"ls-empty":"_ls-empty_1uz6e_131","ls-body":"_ls-body_1uz6e_152",isFile:IV,isDir:AV,canBeSelected:LV,"ls-loader":"_ls-loader_1uz6e_212","loader-icon":"_loader-icon_1uz6e_220",spin:OV},$V=t.defineComponent({__name:"Shortcuts",setup(n){return(e,r)=>(t.openBlock(),t.createBlock(t.unref(ct),{class:"info",position:"southwest","max-width":"420px"},{tooltip:t.withCtx(()=>[t.createElementVNode("span",{class:t.normalizeClass(e.$style.title)},"Shortcuts",2),r[2]||(r[2]=t.createTextVNode()),t.createElementVNode("div",{class:t.normalizeClass([e.$style.row,e.$style.head])},r[0]||(r[0]=[t.createElementVNode("div",null,null,-1),t.createTextVNode(),t.createElementVNode("div",null,"MacOS",-1),t.createTextVNode(),t.createElementVNode("div",null,"Windows/Linux",-1)]),2),r[3]||(r[3]=t.createTextVNode()),t.createElementVNode("div",{class:t.normalizeClass([e.$style.row,e.$style.body])},r[1]||(r[1]=[t.createElementVNode("div",null,"Single File",-1),t.createTextVNode(),t.createElementVNode("div",null,"Click the file",-1),t.createTextVNode(),t.createElementVNode("div",null,"Click the file",-1),t.createTextVNode(),t.createElementVNode("div",null,"Adjacent multiple files",-1),t.createTextVNode(),t.createElementVNode("div",null,"Hold Shift, click first and last files",-1),t.createTextVNode(),t.createElementVNode("div",null,"Hold Shift, click first and last files",-1),t.createTextVNode(),t.createElementVNode("div",null,"Non-adjacent multiple files",-1),t.createTextVNode(),t.createElementVNode("div",null,"Hold Command (⌘), click each file",-1),t.createTextVNode(),t.createElementVNode("div",null,"Hold Ctrl, click each file",-1),t.createTextVNode(),t.createElementVNode("div",null,"All files",-1),t.createTextVNode(),t.createElementVNode("div",null,"Press Command (⌘) + A",-1),t.createTextVNode(),t.createElementVNode("div",null,"Press Ctrl + A",-1)]),2)]),_:1}))}}),ZV="_title_14dct_2",MV="_row_14dct_10",FV="_head_14dct_30",PV="_body_14dct_58",zV={title:ZV,row:MV,head:FV,body:PV},DV={$style:zV},WV=st($V,[["__cssModules",DV]]),sh=()=>({dirPath:"",search:"",storageEntry:void 0,items:[],error:"",storageOptions:[],selected:[],lastSelected:void 0,currentLoadingPath:void 0,showHiddenItems:!1});function GV(n){return t.computed(()=>{let e=n.items;if(n.showHiddenItems||(e=e.filter(r=>!r.name.startsWith("."))),n.search){const r=n.search.toLocaleLowerCase();e=e.filter(o=>o.name.toLocaleLowerCase().includes(r))}return e})}const ch={mounted:n=>{if(n.clientWidth<n.scrollWidth){const e=n.innerText;n.innerText=e.substring(0,57)+"..."+e.substring(e.length-10)}}};function dh(n){return n?n.map(e=>"."+qw(e,["."])):void 0}function UV(n){const e="/",r=n.startsWith(e),o=Jw(n,[e]).split(e),a=[{index:0,name:"Root",path:""}];if(o.length===1&&o[0]==="")return a;for(let l=0;l<o.length;l++){const c=(r?e:"")+o.slice(0,l+1).join(e);a.push({index:l+1,name:o[l],path:c})}return a}const HV=["title","onClick"],XV={key:0,class:"ls-loader"},jV=["onClick"],YV=["title"],KV=["onClick"],JV=["title"],qV=t.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(n,{expose:e}){const r=A=>A.ctrlKey||A.metaKey,o=n,a=t.reactive(sh()),l=()=>{a.search="",a.error="",a.lastSelected=void 0},c=t.computed(()=>dh(o.extensions)),d=GV(a),u=t.computed(()=>{var A;return{modelValue:o.modelValue,dirPath:a.dirPath,storageHandle:(A=a.storageEntry)==null?void 0:A.handle}}),f=(A,B)=>{Wr()&&a.currentLoadingPath!==B&&(a.currentLoadingPath=B,Wr().lsDriver.listFiles(A,B).then(P=>{B===a.dirPath&&(a.items=Uo(P).entries.map(H=>({path:H.fullPath,name:H.name,isDir:H.type==="dir",canBeSelected:H.type==="file"&&(!c.value||c.value.some(S=>H.fullPath.endsWith(S))),handle:H.type==="file"?H.handle:void 0,selected:!1})).sort((H,S)=>H.isDir&&!S.isDir?-1:!H.isDir&&S.isDir?1:H.name.localeCompare(S.name)).map((H,S)=>({id:S,...H})),a.lastSelected=void 0)}).catch(P=>a.error=String(P)).finally(()=>{a.currentLoadingPath=void 0}))},m=()=>{l();const{storageHandle:A,dirPath:B,modelValue:P}=u.value;A&&P&&f(A,B)},g=t.computed(()=>UV(a.dirPath)),y=t.computed(()=>a.items.filter(A=>A.canBeSelected&&A.selected&&!A.isDir)),_=t.computed(()=>{var A;return y.value.length>0&&((A=a.storageEntry)==null?void 0:A.handle)}),C=()=>{var A;return{storageHandle:Uo((A=a.storageEntry)==null?void 0:A.handle),files:y.value.map(B=>B.handle)}},N=A=>{a.dirPath=A},T=(A,B)=>{const{shiftKey:P}=A,H=r(A),{lastSelected:S}=a;A.preventDefault();const I=d.value;if(B.canBeSelected){if(o.multi||I.forEach(v=>v.selected=!1),B.selected=!B.selected,!o.multi)return;!H&&!P&&I.forEach(v=>{v.id!==B.id&&(v.selected=!1)}),P&&S!==void 0&&I.forEach(v=>{Uw(v.id,S,B.id)&&(v.selected=!0)}),B.selected&&(a.lastSelected=B.id)}},$=A=>{A&&!o.multi||d.value.filter(B=>B.canBeSelected).forEach(B=>{B.selected=A})},W=()=>$(!0),E=()=>$(!1),D=()=>{if(l(),E(),!Wr()){console.warn("platforma API is not found");return}Wr().lsDriver.getStorageList().then(A=>{A=A.filter(B=>B.name!=="local"&&!B.name.startsWith("local_disk_")),a.storageOptions=A.map(B=>({text:B.name,value:B})),o.autoSelectStorage&&Ar(A[0],B=>{a.storageEntry=B})}).catch(A=>a.error=String(A))};return t.watch(t.toRef(a,"storageEntry"),A=>{l(),a.dirPath=(A==null?void 0:A.initialFullPath)??""},{immediate:!0}),t.watch([()=>a.dirPath,()=>a.storageEntry],()=>{m()}),t.watch(()=>o.modelValue,A=>{A?D():Object.assign(a,sh())},{immediate:!0}),ot(document,"keydown",A=>{if(!o.modelValue||A.target!==document.body)return;const B=r(A);B&&A.code==="KeyA"&&(A.preventDefault(),W()),B&&A.shiftKey&&A.code==="Period"&&(A.preventDefault(),a.showHiddenItems=!a.showHiddenItems),A.code==="Enter"&&o.submit()}),e({isReady:_,getFilesToImport:C}),t.onMounted(D),(A,B)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(mt).remote),onClick:t.withModifiers(E,["stop"])},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(mt).search)},[t.createElementVNode("div",null,[t.createVNode(t.unref($r),{modelValue:a.storageEntry,"onUpdate:modelValue":B[0]||(B[0]=P=>a.storageEntry=P),label:"Select storage",options:a.storageOptions},null,8,["modelValue","options"])]),B[2]||(B[2]=t.createTextVNode()),t.createElementVNode("div",null,[t.createVNode(t.unref(Im),{modelValue:a.search,"onUpdate:modelValue":B[1]||(B[1]=P=>a.search=P),label:"Search in folder",clearable:""},null,8,["modelValue"])])],2),B[12]||(B[12]=t.createTextVNode()),t.createElementVNode("div",{class:t.normalizeClass(t.unref(mt)["ls-container"])},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(mt)["ls-head"])},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(mt).breadcrumbs)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.value,(P,H)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:H},[t.createElementVNode("div",{title:P.path,onClick:S=>N(P.path)},t.toDisplayString(P.name),9,HV),B[3]||(B[3]=t.createTextVNode()),P.index!==g.value.length-1?(t.openBlock(),t.createBlock(t.unref(Or),{key:0,name:"chevron-right"})):t.createCommentVNode("",!0)],64))),128))],2),B[5]||(B[5]=t.createTextVNode()),t.createElementVNode("div",{class:t.normalizeClass(t.unref(mt).selected)},[t.createElementVNode("span",null,"Selected: "+t.toDisplayString(y.value.length),1),B[4]||(B[4]=t.createTextVNode()),t.createVNode(WV)],2)],2),B[11]||(B[11]=t.createTextVNode()),a.currentLoadingPath!==void 0?(t.openBlock(),t.createElementBlock("div",XV,B[6]||(B[6]=[t.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"},null,-1)]))):a.storageEntry?a.error?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(t.unref(mt)["ls-error"])},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(mt).cat)},null,2),B[8]||(B[8]=t.createTextVNode()),t.createElementVNode("div",{class:t.normalizeClass(t.unref(mt).message)},t.toDisplayString(a.error),3)],2)):(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(t.unref(mt)["ls-body"])},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(d),P=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:P.id},[P.isDir?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(mt).isDir),onClick:H=>N(P.path)},[t.createVNode(t.unref(Or),{name:"chevron-right"}),B[9]||(B[9]=t.createTextVNode()),t.withDirectives((t.openBlock(),t.createElementBlock("span",{title:P.name},[t.createTextVNode(t.toDisplayString(P.name),1)],8,YV)),[[t.unref(ch)]])],10,jV)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass({[t.unref(mt).canBeSelected]:P.canBeSelected,[t.unref(mt).selected]:P.selected}),onClick:t.withModifiers(H=>T(H,P),["stop"])},[t.createVNode(t.unref(qt),{name:"box",class:t.normalizeClass(t.unref(mt).isFile)},null,8,["class"]),B[10]||(B[10]=t.createTextVNode()),t.withDirectives((t.openBlock(),t.createElementBlock("span",{title:P.name},[t.createTextVNode(t.toDisplayString(P.name),1)],8,JV)),[[t.unref(ch)]])],10,KV))],64))),128))],2)):(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(t.unref(mt)["ls-empty"])},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(mt).cat)},null,2),B[7]||(B[7]=t.createTextVNode()),t.createElementVNode("div",{class:t.normalizeClass(t.unref(mt).message)},"Select storage to preview",2)],2))],2)],2))}}),QV={key:1,class:"alert-error"},eB=t.defineComponent({__name:"Local",props:{importFiles:{type:Function},multi:{type:Boolean},extensions:{}},setup(n){const e=n,r=t.reactive({error:void 0}),o=t.computed(()=>e.multi?"Drag & Drop files here or click to add":"Drag & Drop file here or click to add"),a=async c=>{var d,u,f;const m=(u=(d=Wr())==null?void 0:d.lsDriver)==null?void 0:u.fileToImportHandle;if(!m)return console.error("API getPlatformaRawInstance().lsDriver.fileToImportHandle is not available");const g=dh(e.extensions),y=await Promise.all([...((f=c.dataTransfer)==null?void 0:f.files)??[]].filter(_=>!!_).filter(_=>g?g.some(C=>_.name.endsWith(C)):!0).map(_=>m(_)));y.length&&e.importFiles({files:y})},l=async()=>{var c,d;const u=e.extensions?[{name:"All Files",extensions:e.extensions}]:[];e.multi?(c=Wr())==null||c.lsDriver.showOpenMultipleFilesDialog({title:"Select files to import",filters:u}).then(({files:f})=>{f&&e.importFiles({files:f})}).catch(f=>r.error=f):(d=Wr())==null||d.lsDriver.showOpenSingleFileDialog({title:"Select file to import",filters:u}).then(({file:f})=>{f&&e.importFiles({files:[f]})}).catch(f=>r.error=f)};return(c,d)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(t.unref(mt).local),onDrop:a,onDragover:d[0]||(d[0]=t.withModifiers(()=>{},["prevent"])),onClick:l},[t.createVNode(t.unref(Yo),{name:"cloud-upload"}),d[1]||(d[1]=t.createTextVNode()),t.createElementVNode("span",null,t.toDisplayString(o.value),1),d[2]||(d[2]=t.createTextVNode()),c.extensions?(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass(t.unref(mt).supported)},"Supported formats: "+t.toDisplayString(c.extensions.join(", ")),3)):t.createCommentVNode("",!0),d[3]||(d[3]=t.createTextVNode()),r.error?(t.openBlock(),t.createElementBlock("span",QV,t.toDisplayString(r.error),1)):t.createCommentVNode("",!0)],34))}}),tB={style:{margin:"0 24px"}},uh=t.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(n,{emit:e}){const r=e,o=n,a=t.ref("local"),l=t.computed(()=>o.multi?"Select Files to Import":"Select File to Import"),c=[{label:"My Computer",value:"local"},{label:"Remote",value:"remote"}],d=()=>r("update:modelValue",!1),u=t.useTemplateRef("remote"),f=()=>{var g,y;(g=u.value)!=null&&g.isReady&&(r("import:files",Uo((y=u.value)==null?void 0:y.getFilesToImport())),d())},m=g=>{r("import:files",g),d()};return(g,y)=>(t.openBlock(),t.createBlock(t.unref(Bd),{"no-content-gutters":!0,"close-on-outside-click":g.closeOnOutsideClick,class:t.normalizeClass(["pl-dialog-modal",t.unref(mt).component]),"model-value":g.modelValue,width:"688px",height:"720px","onUpdate:modelValue":d},t.createSlots({title:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(g.title??l.value),1)]),default:t.withCtx(()=>[y[4]||(y[4]=t.createTextVNode()),t.createElementVNode("div",tB,[t.createVNode(t.unref(Em),{modelValue:a.value,"onUpdate:modelValue":y[0]||(y[0]=_=>a.value=_),options:c},null,8,["modelValue"])]),y[5]||(y[5]=t.createTextVNode()),a.value==="remote"?(t.openBlock(),t.createBlock(qV,t.mergeProps({key:0,ref:"remote"},g.$props,{submit:f}),null,16)):t.createCommentVNode("",!0),y[6]||(y[6]=t.createTextVNode()),a.value==="local"?(t.openBlock(),t.createBlock(eB,t.mergeProps({key:1,"import-files":m},g.$props),null,16)):t.createCommentVNode("",!0),y[7]||(y[7]=t.createTextVNode())]),_:2},[a.value==="remote"?{name:"actions",fn:t.withCtx(()=>{var _;return[t.createVNode(t.unref(Rl),{style:{"min-width":"160px"},disabled:!((_=t.unref(u))!=null&&_.isReady),onClick:t.withModifiers(f,["stop"])},{default:t.withCtx(()=>y[1]||(y[1]=[t.createTextVNode("Import")])),_:1},8,["disabled"]),y[3]||(y[3]=t.createTextVNode()),t.createVNode(t.unref(cr),{"justify-center":!1,onClick:t.withModifiers(d,["stop"])},{default:t.withCtx(()=>y[2]||(y[2]=[t.createTextVNode("Cancel")])),_:1})]}),key:"0"}:void 0]),1032,["close-on-outside-click","class","model-value"]))}}),nB={key:0,ref:"label"},rB={key:0,class:"required-icon"},oB=["data-placeholder"],aB={key:5,class:"pl-file-input__stats"},iB={key:0,class:"pl-file-input__error"},lB={key:1,class:"pl-file-input__helper"},ph=t.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(n,{emit:e}){const r=t.reactive({fileDialogOpen:!1,error:""}),o=t.useSlots(),a=e,l=n,c=(E,D)=>{if(E)try{return D(E)}catch(A){return r.error=A instanceof Error?A.message:String(A),E}},d=t.computed(()=>c(l.modelValue,bN)),u=t.computed(()=>c(l.modelValue,th)),f=t.computed(()=>l.progress&&!l.progress.done),m=t.computed(()=>l.progress&&l.progress.done),g=t.computed(()=>r.error??l.error),y=t.computed(()=>!!g.value),_=t.computed(()=>{const{status:E,done:D}=l.progress??{};return!E||!E.bytesTotal?"":E.bytesProcessed&&!D?ud(E.bytesProcessed,{})+" / "+ud(E.bytesTotal,{}):ud(E.bytesTotal,{})}),C=t.computed(()=>{var E;const{progress:D}=l;return D?{width:D.done?"100%":Math.round((((E=D.status)==null?void 0:E.progress)??0)*100)+"%"}:{}}),N=()=>{r.fileDialogOpen=!0},T=E=>{E.files.length&&a("update:modelValue",E.files[0])},$=()=>a("update:modelValue",void 0);t.watch(()=>l.modelValue,()=>{r.error=""},{immediate:!0});const W=t.ref();return l.cellStyle||Kn(W),(E,D)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",{class:t.normalizeClass([{"pl-file-input__cell-style":!!E.cellStyle,"has-file":!!d.value},"pl-file-input__envelope"])},[t.createElementVNode("div",{ref_key:"rootRef",ref:W,class:t.normalizeClass(["pl-file-input",{dashed:E.dashed,error:y.value}]),tabindex:"0",onKeyup:t.withKeys(N,["enter"]),onClick:t.withModifiers(N,["stop"])},[t.createElementVNode("div",{class:"pl-file-input__progress",style:t.normalizeStyle(C.value)},null,4),D[3]||(D[3]=t.createTextVNode()),!E.cellStyle&&E.label?(t.openBlock(),t.createElementBlock("label",nB,[E.required?(t.openBlock(),t.createElementBlock("i",rB)):t.createCommentVNode("",!0),D[1]||(D[1]=t.createTextVNode()),t.createElementVNode("span",null,t.toDisplayString(E.label),1),D[2]||(D[2]=t.createTextVNode()),t.unref(o).tooltip||u.value?(t.openBlock(),t.createBlock(t.unref(ct),{key:1,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.unref(o).tooltip?t.renderSlot(E.$slots,"tooltip",{key:0}):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createTextVNode(t.toDisplayString(u.value),1)],64))]),_:3})):t.createCommentVNode("",!0)],512)):t.createCommentVNode("",!0),D[4]||(D[4]=t.createTextVNode()),y.value?(t.openBlock(),t.createBlock(t.unref(at),{key:1,name:"restart"})):f.value?(t.openBlock(),t.createBlock(t.unref(at),{key:2,name:"cloud-upload"})):m.value?(t.openBlock(),t.createBlock(t.unref(at),{key:3,name:"success"})):(t.openBlock(),t.createBlock(t.unref(at),{key:4,name:"paper-clip"})),D[5]||(D[5]=t.createTextVNode()),t.createElementVNode("div",{"data-placeholder":E.placeholder??"Choose file",class:"pl-file-input__filename"},t.toDisplayString(d.value),9,oB),D[6]||(D[6]=t.createTextVNode()),_.value?(t.openBlock(),t.createElementBlock("div",aB,t.toDisplayString(_.value),1)):t.createCommentVNode("",!0),D[7]||(D[7]=t.createTextVNode()),E.modelValue?(t.openBlock(),t.createBlock(t.unref(at),{key:6,name:"close",onClick:t.withModifiers($,["stop"])})):t.createCommentVNode("",!0),D[8]||(D[8]=t.createTextVNode()),t.createVNode(dr,{class:"pl-file-input__contour"})],34),D[9]||(D[9]=t.createTextVNode()),y.value?(t.openBlock(),t.createElementBlock("div",iB,t.toDisplayString(g.value),1)):E.helper?(t.openBlock(),t.createElementBlock("div",lB,t.toDisplayString(E.helper),1)):t.createCommentVNode("",!0)],2),D[10]||(D[10]=t.createTextVNode()),t.createVNode(t.unref(uh),{modelValue:r.fileDialogOpen,"onUpdate:modelValue":D[0]||(D[0]=A=>r.fileDialogOpen=A),extensions:E.extensions,title:E.fileDialogTitle,"close-on-outside-click":E.fileDialogCloseOnOutsideClick,"onImport:files":T},null,8,["modelValue","extensions","title","close-on-outside-click"])],64))}}),sB={class:"pl-notification-alert__wrapper d-flex text-s"},cB={class:"pl-notification-alert__content flex-grow-1"},dB={key:0,class:"pl-notification-alert__close"},uB={key:0,class:"pl-notification-alert__actions d-flex"},fh=t.defineComponent({__name:"PlNotificationAlert",props:t.mergeModels({type:{default:"neutral"},width:{default:"256px"},closable:{type:Boolean}},{modelValue:{type:Boolean,default:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=n,r=t.useModel(n,"modelValue");function o(){e.closable&&(r.value=!1)}return(a,l)=>r.value?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass([a.type,"pl-notification-alert d-flex flex-column gap-16"]),style:t.normalizeStyle({width:`${a.width}`})},[t.createElementVNode("div",sB,[t.createElementVNode("div",cB,[t.renderSlot(a.$slots,"default")]),l[0]||(l[0]=t.createTextVNode()),a.closable?(t.openBlock(),t.createElementBlock("div",dB,[t.createVNode(t.unref(cr),{icon:"close",onClick:t.withModifiers(o,["stop"])})])):t.createCommentVNode("",!0)]),l[1]||(l[1]=t.createTextVNode()),a.$slots.actions?(t.openBlock(),t.createElementBlock("div",uB,[t.renderSlot(a.$slots,"actions")])):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0)}}),pB=["data-content"],fB=[".title"],mB=t.defineComponent({__name:"StackedRow",props:{value:{},height:{}},setup(n){const e=n,r=t.computed(()=>({height:e.height??"100%",minHeight:"82px"})),o=t.computed(()=>{const l=e.value||[],c=l.reduce((d,u)=>d+u.value,0);return l.map(d=>{const u=d.value/c*100,f=d.label;return{color:d.color.toString(),description:d.description,fraction:u,label:f}})}),a=[-40,-50,-50,-50,-80];return(l,c)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([l.$style.component]),style:t.normalizeStyle(r.value)},[t.createElementVNode("div",{class:t.normalizeClass(l.$style.track)},[(t.openBlock(),t.createElementBlock(t.Fragment,null,t.renderList([0,25,50,75,100],(d,u)=>t.createElementVNode("div",{key:u,style:t.normalizeStyle({left:`${d}%`,"--transform":`translateX(${a[u]}%)`}),"data-content":`${d}%`},null,12,pB)),64))],2),c[1]||(c[1]=t.createTextVNode()),t.createElementVNode("div",{class:t.normalizeClass(l.$style.container)},[o.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(l.$style.notReady)},"Not ready",2)),c[0]||(c[0]=t.createTextVNode()),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.value,(d,u)=>(t.openBlock(),t.createElementBlock("div",{key:u,".title":d.description??d.label,style:t.normalizeStyle({width:`${d.fraction}%`,backgroundColor:d.color})},null,44,fB))),128))],2)],6))}}),hB="_component_5hdjy_1",gB="_container_5hdjy_11",yB="_track_5hdjy_25",bB="_notReady_5hdjy_47",_B={component:hB,container:gB,track:yB,notReady:bB},wB={$style:_B},kB=st(mB,[["__cssModules",wB]]),xB=t.defineComponent({__name:"Legends",props:{maxInColumn:{},legends:{}},setup(n){function e(a,l){const c=[];let d=[];for(let u=0;u<a.length;u++)d.length<l?d.push(a[u]):(c.push(d),d=[a[u]]);return c.push(d),c}const r=n,o=t.computed(()=>e(r.legends,r.maxInColumn??5));return(a,l)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(a.$style.component)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.value,(c,d)=>(t.openBlock(),t.createElementBlock("div",{key:d,class:t.normalizeClass(a.$style.legend)},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c,(u,f)=>(t.openBlock(),t.createElementBlock("div",{key:f,class:t.normalizeClass(a.$style.item)},[t.createElementVNode("div",{class:t.normalizeClass(a.$style.chip),style:t.normalizeStyle({backgroundColor:u.color.toString()})},null,6),t.createTextVNode(" "+t.toDisplayString(u.text),1)],2))),128))],2))),128))],2))}}),vB="_component_blzj7_2",CB="_legend_blzj7_9",SB="_chip_blzj7_19",EB="_group_blzj7_26",NB="_item_blzj7_32",VB={component:vB,legend:CB,chip:SB,group:EB,item:NB},BB={$style:VB},TB=st(xB,[["__cssModules",BB]]),RB=t.defineComponent({__name:"PlChartStackedBar",props:{settings:{}},setup(n){const e=n,r=t.computed(()=>e.settings.showLegends??!0),o=t.computed(()=>e.settings.data??[]),a=t.computed(()=>o.value.map(l=>({color:l.color,text:l.label})));return(l,c)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(l.$style.component)},[l.settings.title?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(l.$style.title)},t.toDisplayString(l.settings.title),3)):t.createCommentVNode("",!0),c[0]||(c[0]=t.createTextVNode()),t.createVNode(kB,{value:o.value},null,8,["value"]),c[1]||(c[1]=t.createTextVNode()),r.value&&a.value.length?(t.openBlock(),t.createBlock(TB,{key:1,legends:a.value,"max-in-column":l.settings.maxLegendsInColumn},null,8,["legends","max-in-column"])):t.createCommentVNode("",!0)],2))}}),IB="_component_1j1iz_1",AB="_title_1j1iz_7",LB={component:IB,title:AB},OB={$style:LB},$B=st(RB,[["__cssModules",OB]]),ZB=[".title"],MB=t.defineComponent({__name:"StackedRowCompact",props:{value:{},height:{}},setup(n){const e=n,r=t.computed(()=>({height:e.height??"100%",minHeight:"24px"})),o=t.computed(()=>{const a=e.value||[],l=a.reduce((c,d)=>c+d.value,0);return a.map(c=>{const d=c.value/l*100,u=c.label;return{color:c.color.toString(),description:c.description,fraction:d,label:u}})});return(a,l)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([a.$style.component]),style:t.normalizeStyle(r.value)},[t.createElementVNode("div",{class:t.normalizeClass(a.$style.container)},[o.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(a.$style.notReady)},"Not ready",2)),l[0]||(l[0]=t.createTextVNode()),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.value,(c,d)=>(t.openBlock(),t.createElementBlock("div",{key:d,".title":c.description??c.label,style:t.normalizeStyle({width:`${c.fraction}%`,backgroundColor:c.color})},null,44,ZB))),128))],2)],6))}}),FB="_component_1utnb_1",PB="_notReady_1utnb_8",zB="_container_1utnb_16",DB={component:FB,notReady:PB,container:zB},WB={$style:DB},GB=st(MB,[["__cssModules",WB]]),UB=t.defineComponent({__name:"PlChartStackedBarCompact",props:{settings:{}},setup(n){const e=n,r=t.computed(()=>e.settings.data??[]);return(o,a)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(o.$style.component)},[t.createVNode(GB,{value:r.value},null,8,["value"])],2))}}),HB="_component_1gn0t_1",XB={component:HB},jB={$style:XB},mh=st(UB,[["__cssModules",jB]]);function Yl(n,e){return n==null||e==null?NaN:n<e?-1:n>e?1:n>=e?0:NaN}function YB(n,e){return n==null||e==null?NaN:e<n?-1:e>n?1:e>=n?0:NaN}function hh(n){let e,r,o;n.length!==2?(e=Yl,r=(d,u)=>Yl(n(d),u),o=(d,u)=>n(d)-u):(e=n===Yl||n===YB?n:KB,r=n,o=n);function a(d,u,f=0,m=d.length){if(f<m){if(e(u,u)!==0)return m;do{const g=f+m>>>1;r(d[g],u)<0?f=g+1:m=g}while(f<m)}return f}function l(d,u,f=0,m=d.length){if(f<m){if(e(u,u)!==0)return m;do{const g=f+m>>>1;r(d[g],u)<=0?f=g+1:m=g}while(f<m)}return f}function c(d,u,f=0,m=d.length){const g=a(d,u,f,m-1);return g>f&&o(d[g-1],u)>-o(d[g],u)?g-1:g}return{left:a,center:c,right:l}}function KB(){return 0}function JB(n){return n===null?NaN:+n}const qB=hh(Yl),gh=qB.right;hh(JB).center;function QB(n,e){let r=0;for(let o of n)o!=null&&(o=+o)>=o&&++r;return r}function Zd(n,e){let r,o;if(e===void 0)for(const a of n)a!=null&&(r===void 0?a>=a&&(r=o=a):(r>a&&(r=a),o<a&&(o=a)));else{let a=-1;for(let l of n)(l=e(l,++a,n))!=null&&(r===void 0?l>=l&&(r=o=l):(r>l&&(r=l),o<l&&(o=l)))}return[r,o]}function eT(n){return n}var tT=Array.prototype,nT=tT.slice;function Md(n){return()=>n}const rT=Math.sqrt(50),oT=Math.sqrt(10),aT=Math.sqrt(2);function Kl(n,e,r){const o=(e-n)/Math.max(0,r),a=Math.floor(Math.log10(o)),l=o/Math.pow(10,a),c=l>=rT?10:l>=oT?5:l>=aT?2:1;let d,u,f;return a<0?(f=Math.pow(10,-a)/c,d=Math.round(n*f),u=Math.round(e*f),d/f<n&&++d,u/f>e&&--u,f=-f):(f=Math.pow(10,a)*c,d=Math.round(n/f),u=Math.round(e/f),d*f<n&&++d,u*f>e&&--u),u<d&&.5<=r&&r<2?Kl(n,e,r*2):[d,u,f]}function yh(n,e,r){if(e=+e,n=+n,r=+r,!(r>0))return[];if(n===e)return[n];const o=e<n,[a,l,c]=o?Kl(e,n,r):Kl(n,e,r);if(!(l>=a))return[];const d=l-a+1,u=new Array(d);if(o)if(c<0)for(let f=0;f<d;++f)u[f]=(l-f)/-c;else for(let f=0;f<d;++f)u[f]=(l-f)*c;else if(c<0)for(let f=0;f<d;++f)u[f]=(a+f)/-c;else for(let f=0;f<d;++f)u[f]=(a+f)*c;return u}function ra(n,e,r){return e=+e,n=+n,r=+r,Kl(n,e,r)[2]}function iT(n,e,r){e=+e,n=+n,r=+r;const o=e<n,a=o?ra(e,n,r):ra(n,e,r);return(o?-1:1)*(a<0?1/-a:a)}function lT(n,e,r){let o;for(;;){const a=ra(n,e,r);if(a===o||a===0||!isFinite(a))return[n,e];a>0?(n=Math.floor(n/a)*a,e=Math.ceil(e/a)*a):a<0&&(n=Math.ceil(n*a)/a,e=Math.floor(e*a)/a),o=a}}function sT(n){return Math.max(1,Math.ceil(Math.log(QB(n))/Math.LN2)+1)}function bh(){var n=eT,e=Zd,r=sT;function o(a){Array.isArray(a)||(a=Array.from(a));var l,c=a.length,d,u,f=new Array(c);for(l=0;l<c;++l)f[l]=n(a[l],l,a);var m=e(f),g=m[0],y=m[1],_=r(f,g,y);if(!Array.isArray(_)){const E=y,D=+_;if(e===Zd&&([g,y]=lT(g,y,D)),_=yh(g,y,D),_[0]<=g&&(u=ra(g,y,D)),_[_.length-1]>=y)if(E>=y&&e===Zd){const A=ra(g,y,D);isFinite(A)&&(A>0?y=(Math.floor(y/A)+1)*A:A<0&&(y=(Math.ceil(y*-A)+1)/-A))}else _.pop()}for(var C=_.length,N=0,T=C;_[N]<=g;)++N;for(;_[T-1]>y;)--T;(N||T<C)&&(_=_.slice(N,T),C=T-N);var $=new Array(C+1),W;for(l=0;l<=C;++l)W=$[l]=[],W.x0=l>0?_[l-1]:g,W.x1=l<C?_[l]:y;if(isFinite(u)){if(u>0)for(l=0;l<c;++l)(d=f[l])!=null&&g<=d&&d<=y&&$[Math.min(C,Math.floor((d-g)/u))].push(a[l]);else if(u<0){for(l=0;l<c;++l)if((d=f[l])!=null&&g<=d&&d<=y){const E=Math.floor((g-d)*u);$[Math.min(C,E+(_[E]<=d))].push(a[l])}}}else for(l=0;l<c;++l)(d=f[l])!=null&&g<=d&&d<=y&&$[gh(_,d,0,C)].push(a[l]);return $}return o.value=function(a){return arguments.length?(n=typeof a=="function"?a:Md(a),o):n},o.domain=function(a){return arguments.length?(e=typeof a=="function"?a:Md([a[0],a[1]]),o):e},o.thresholds=function(a){return arguments.length?(r=typeof a=="function"?a:Md(Array.isArray(a)?nT.call(a):a),o):r},o}function Jl(n,e){let r;if(e===void 0)for(const o of n)o!=null&&(r<o||r===void 0&&o>=o)&&(r=o);else{let o=-1;for(let a of n)(a=e(a,++o,n))!=null&&(r<a||r===void 0&&a>=a)&&(r=a)}return r}function Fd(n,e){let r;if(e===void 0)for(const o of n)o!=null&&(r>o||r===void 0&&o>=o)&&(r=o);else{let o=-1;for(let a of n)(a=e(a,++o,n))!=null&&(r>a||r===void 0&&a>=a)&&(r=a)}return r}function cT(n){return n}var Pd=1,zd=2,Dd=3,xi=4,_h=1e-6;function dT(n){return"translate("+n+",0)"}function uT(n){return"translate(0,"+n+")"}function pT(n){return e=>+n(e)}function fT(n,e){return e=Math.max(0,n.bandwidth()-e*2)/2,n.round()&&(e=Math.round(e)),r=>+n(r)+e}function mT(){return!this.__axis}function wh(n,e){var r=[],o=null,a=null,l=6,c=6,d=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,f=n===Pd||n===xi?-1:1,m=n===xi||n===zd?"x":"y",g=n===Pd||n===Dd?dT:uT;function y(_){var C=o??(e.ticks?e.ticks.apply(e,r):e.domain()),N=a??(e.tickFormat?e.tickFormat.apply(e,r):cT),T=Math.max(l,0)+d,$=e.range(),W=+$[0]+u,E=+$[$.length-1]+u,D=(e.bandwidth?fT:pT)(e.copy(),u),A=_.selection?_.selection():_,B=A.selectAll(".domain").data([null]),P=A.selectAll(".tick").data(C,e).order(),H=P.exit(),S=P.enter().append("g").attr("class","tick"),I=P.select("line"),v=P.select("text");B=B.merge(B.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),P=P.merge(S),I=I.merge(S.append("line").attr("stroke","currentColor").attr(m+"2",f*l)),v=v.merge(S.append("text").attr("fill","currentColor").attr(m,f*T).attr("dy",n===Pd?"0em":n===Dd?"0.71em":"0.32em")),_!==A&&(B=B.transition(_),P=P.transition(_),I=I.transition(_),v=v.transition(_),H=H.transition(_).attr("opacity",_h).attr("transform",function(L){return isFinite(L=D(L))?g(L+u):this.getAttribute("transform")}),S.attr("opacity",_h).attr("transform",function(L){var V=this.parentNode.__axis;return g((V&&isFinite(V=V(L))?V:D(L))+u)})),H.remove(),B.attr("d",n===xi||n===zd?c?"M"+f*c+","+W+"H"+u+"V"+E+"H"+f*c:"M"+u+","+W+"V"+E:c?"M"+W+","+f*c+"V"+u+"H"+E+"V"+f*c:"M"+W+","+u+"H"+E),P.attr("opacity",1).attr("transform",function(L){return g(D(L)+u)}),I.attr(m+"2",f*l),v.attr(m,f*T).text(N),A.filter(mT).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",n===zd?"start":n===xi?"end":"middle"),A.each(function(){this.__axis=D})}return y.scale=function(_){return arguments.length?(e=_,y):e},y.ticks=function(){return r=Array.from(arguments),y},y.tickArguments=function(_){return arguments.length?(r=_==null?[]:Array.from(_),y):r.slice()},y.tickValues=function(_){return arguments.length?(o=_==null?null:Array.from(_),y):o&&o.slice()},y.tickFormat=function(_){return arguments.length?(a=_,y):a},y.tickSize=function(_){return arguments.length?(l=c=+_,y):l},y.tickSizeInner=function(_){return arguments.length?(l=+_,y):l},y.tickSizeOuter=function(_){return arguments.length?(c=+_,y):c},y.tickPadding=function(_){return arguments.length?(d=+_,y):d},y.offset=function(_){return arguments.length?(u=+_,y):u},y}function ql(n){return wh(Dd,n)}function Ql(n){return wh(xi,n)}var hT={value:()=>{}};function kh(){for(var n=0,e=arguments.length,r={},o;n<e;++n){if(!(o=arguments[n]+"")||o in r||/[\s.]/.test(o))throw new Error("illegal type: "+o);r[o]=[]}return new es(r)}function es(n){this._=n}function gT(n,e){return n.trim().split(/^|\s+/).map(function(r){var o="",a=r.indexOf(".");if(a>=0&&(o=r.slice(a+1),r=r.slice(0,a)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:o}})}es.prototype=kh.prototype={constructor:es,on:function(n,e){var r=this._,o=gT(n+"",r),a,l=-1,c=o.length;if(arguments.length<2){for(;++l<c;)if((a=(n=o[l]).type)&&(a=yT(r[a],n.name)))return a;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++l<c;)if(a=(n=o[l]).type)r[a]=xh(r[a],n.name,e);else if(e==null)for(a in r)r[a]=xh(r[a],n.name,null);return this},copy:function(){var n={},e=this._;for(var r in e)n[r]=e[r].slice();return new es(n)},call:function(n,e){if((a=arguments.length-2)>0)for(var r=new Array(a),o=0,a,l;o<a;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(l=this._[n],o=0,a=l.length;o<a;++o)l[o].value.apply(e,r)},apply:function(n,e,r){if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(var o=this._[n],a=0,l=o.length;a<l;++a)o[a].value.apply(e,r)}};function yT(n,e){for(var r=0,o=n.length,a;r<o;++r)if((a=n[r]).name===e)return a.value}function xh(n,e,r){for(var o=0,a=n.length;o<a;++o)if(n[o].name===e){n[o]=hT,n=n.slice(0,o).concat(n.slice(o+1));break}return r!=null&&n.push({name:e,value:r}),n}var Wd="http://www.w3.org/1999/xhtml";const vh={svg:"http://www.w3.org/2000/svg",xhtml:Wd,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ts(n){var e=n+="",r=e.indexOf(":");return r>=0&&(e=n.slice(0,r))!=="xmlns"&&(n=n.slice(r+1)),vh.hasOwnProperty(e)?{space:vh[e],local:n}:n}function bT(n){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Wd&&e.documentElement.namespaceURI===Wd?e.createElement(n):e.createElementNS(r,n)}}function _T(n){return function(){return this.ownerDocument.createElementNS(n.space,n.local)}}function Ch(n){var e=ts(n);return(e.local?_T:bT)(e)}function wT(){}function Gd(n){return n==null?wT:function(){return this.querySelector(n)}}function kT(n){typeof n!="function"&&(n=Gd(n));for(var e=this._groups,r=e.length,o=new Array(r),a=0;a<r;++a)for(var l=e[a],c=l.length,d=o[a]=new Array(c),u,f,m=0;m<c;++m)(u=l[m])&&(f=n.call(u,u.__data__,m,l))&&("__data__"in u&&(f.__data__=u.__data__),d[m]=f);return new $t(o,this._parents)}function Sh(n){return n==null?[]:Array.isArray(n)?n:Array.from(n)}function xT(){return[]}function Eh(n){return n==null?xT:function(){return this.querySelectorAll(n)}}function vT(n){return function(){return Sh(n.apply(this,arguments))}}function CT(n){typeof n=="function"?n=vT(n):n=Eh(n);for(var e=this._groups,r=e.length,o=[],a=[],l=0;l<r;++l)for(var c=e[l],d=c.length,u,f=0;f<d;++f)(u=c[f])&&(o.push(n.call(u,u.__data__,f,c)),a.push(u));return new $t(o,a)}function Nh(n){return function(){return this.matches(n)}}function Vh(n){return function(e){return e.matches(n)}}var ST=Array.prototype.find;function ET(n){return function(){return ST.call(this.children,n)}}function NT(){return this.firstElementChild}function VT(n){return this.select(n==null?NT:ET(typeof n=="function"?n:Vh(n)))}var BT=Array.prototype.filter;function TT(){return Array.from(this.children)}function RT(n){return function(){return BT.call(this.children,n)}}function IT(n){return this.selectAll(n==null?TT:RT(typeof n=="function"?n:Vh(n)))}function AT(n){typeof n!="function"&&(n=Nh(n));for(var e=this._groups,r=e.length,o=new Array(r),a=0;a<r;++a)for(var l=e[a],c=l.length,d=o[a]=[],u,f=0;f<c;++f)(u=l[f])&&n.call(u,u.__data__,f,l)&&d.push(u);return new $t(o,this._parents)}function Bh(n){return new Array(n.length)}function LT(){return new $t(this._enter||this._groups.map(Bh),this._parents)}function ns(n,e){this.ownerDocument=n.ownerDocument,this.namespaceURI=n.namespaceURI,this._next=null,this._parent=n,this.__data__=e}ns.prototype={constructor:ns,appendChild:function(n){return this._parent.insertBefore(n,this._next)},insertBefore:function(n,e){return this._parent.insertBefore(n,e)},querySelector:function(n){return this._parent.querySelector(n)},querySelectorAll:function(n){return this._parent.querySelectorAll(n)}};function OT(n){return function(){return n}}function $T(n,e,r,o,a,l){for(var c=0,d,u=e.length,f=l.length;c<f;++c)(d=e[c])?(d.__data__=l[c],o[c]=d):r[c]=new ns(n,l[c]);for(;c<u;++c)(d=e[c])&&(a[c]=d)}function ZT(n,e,r,o,a,l,c){var d,u,f=new Map,m=e.length,g=l.length,y=new Array(m),_;for(d=0;d<m;++d)(u=e[d])&&(y[d]=_=c.call(u,u.__data__,d,e)+"",f.has(_)?a[d]=u:f.set(_,u));for(d=0;d<g;++d)_=c.call(n,l[d],d,l)+"",(u=f.get(_))?(o[d]=u,u.__data__=l[d],f.delete(_)):r[d]=new ns(n,l[d]);for(d=0;d<m;++d)(u=e[d])&&f.get(y[d])===u&&(a[d]=u)}function MT(n){return n.__data__}function FT(n,e){if(!arguments.length)return Array.from(this,MT);var r=e?ZT:$T,o=this._parents,a=this._groups;typeof n!="function"&&(n=OT(n));for(var l=a.length,c=new Array(l),d=new Array(l),u=new Array(l),f=0;f<l;++f){var m=o[f],g=a[f],y=g.length,_=PT(n.call(m,m&&m.__data__,f,o)),C=_.length,N=d[f]=new Array(C),T=c[f]=new Array(C),$=u[f]=new Array(y);r(m,g,N,T,$,_,e);for(var W=0,E=0,D,A;W<C;++W)if(D=N[W]){for(W>=E&&(E=W+1);!(A=T[E])&&++E<C;);D._next=A||null}}return c=new $t(c,o),c._enter=d,c._exit=u,c}function PT(n){return typeof n=="object"&&"length"in n?n:Array.from(n)}function zT(){return new $t(this._exit||this._groups.map(Bh),this._parents)}function DT(n,e,r){var o=this.enter(),a=this,l=this.exit();return typeof n=="function"?(o=n(o),o&&(o=o.selection())):o=o.append(n+""),e!=null&&(a=e(a),a&&(a=a.selection())),r==null?l.remove():r(l),o&&a?o.merge(a).order():a}function WT(n){for(var e=n.selection?n.selection():n,r=this._groups,o=e._groups,a=r.length,l=o.length,c=Math.min(a,l),d=new Array(a),u=0;u<c;++u)for(var f=r[u],m=o[u],g=f.length,y=d[u]=new Array(g),_,C=0;C<g;++C)(_=f[C]||m[C])&&(y[C]=_);for(;u<a;++u)d[u]=r[u];return new $t(d,this._parents)}function GT(){for(var n=this._groups,e=-1,r=n.length;++e<r;)for(var o=n[e],a=o.length-1,l=o[a],c;--a>=0;)(c=o[a])&&(l&&c.compareDocumentPosition(l)^4&&l.parentNode.insertBefore(c,l),l=c);return this}function UT(n){n||(n=HT);function e(g,y){return g&&y?n(g.__data__,y.__data__):!g-!y}for(var r=this._groups,o=r.length,a=new Array(o),l=0;l<o;++l){for(var c=r[l],d=c.length,u=a[l]=new Array(d),f,m=0;m<d;++m)(f=c[m])&&(u[m]=f);u.sort(e)}return new $t(a,this._parents).order()}function HT(n,e){return n<e?-1:n>e?1:n>=e?0:NaN}function XT(){var n=arguments[0];return arguments[0]=this,n.apply(null,arguments),this}function jT(){return Array.from(this)}function YT(){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var o=n[e],a=0,l=o.length;a<l;++a){var c=o[a];if(c)return c}return null}function KT(){let n=0;for(const e of this)++n;return n}function JT(){return!this.node()}function qT(n){for(var e=this._groups,r=0,o=e.length;r<o;++r)for(var a=e[r],l=0,c=a.length,d;l<c;++l)(d=a[l])&&n.call(d,d.__data__,l,a);return this}function QT(n){return function(){this.removeAttribute(n)}}function e2(n){return function(){this.removeAttributeNS(n.space,n.local)}}function t2(n,e){return function(){this.setAttribute(n,e)}}function n2(n,e){return function(){this.setAttributeNS(n.space,n.local,e)}}function r2(n,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(n):this.setAttribute(n,r)}}function o2(n,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,r)}}function a2(n,e){var r=ts(n);if(arguments.length<2){var o=this.node();return r.local?o.getAttributeNS(r.space,r.local):o.getAttribute(r)}return this.each((e==null?r.local?e2:QT:typeof e=="function"?r.local?o2:r2:r.local?n2:t2)(r,e))}function Th(n){return n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView}function i2(n){return function(){this.style.removeProperty(n)}}function l2(n,e,r){return function(){this.style.setProperty(n,e,r)}}function s2(n,e,r){return function(){var o=e.apply(this,arguments);o==null?this.style.removeProperty(n):this.style.setProperty(n,o,r)}}function c2(n,e,r){return arguments.length>1?this.each((e==null?i2:typeof e=="function"?s2:l2)(n,e,r??"")):oa(this.node(),n)}function oa(n,e){return n.style.getPropertyValue(e)||Th(n).getComputedStyle(n,null).getPropertyValue(e)}function d2(n){return function(){delete this[n]}}function u2(n,e){return function(){this[n]=e}}function p2(n,e){return function(){var r=e.apply(this,arguments);r==null?delete this[n]:this[n]=r}}function f2(n,e){return arguments.length>1?this.each((e==null?d2:typeof e=="function"?p2:u2)(n,e)):this.node()[n]}function Rh(n){return n.trim().split(/^|\s+/)}function Ud(n){return n.classList||new Ih(n)}function Ih(n){this._node=n,this._names=Rh(n.getAttribute("class")||"")}Ih.prototype={add:function(n){var e=this._names.indexOf(n);e<0&&(this._names.push(n),this._node.setAttribute("class",this._names.join(" ")))},remove:function(n){var e=this._names.indexOf(n);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(n){return this._names.indexOf(n)>=0}};function Ah(n,e){for(var r=Ud(n),o=-1,a=e.length;++o<a;)r.add(e[o])}function Lh(n,e){for(var r=Ud(n),o=-1,a=e.length;++o<a;)r.remove(e[o])}function m2(n){return function(){Ah(this,n)}}function h2(n){return function(){Lh(this,n)}}function g2(n,e){return function(){(e.apply(this,arguments)?Ah:Lh)(this,n)}}function y2(n,e){var r=Rh(n+"");if(arguments.length<2){for(var o=Ud(this.node()),a=-1,l=r.length;++a<l;)if(!o.contains(r[a]))return!1;return!0}return this.each((typeof e=="function"?g2:e?m2:h2)(r,e))}function b2(){this.textContent=""}function _2(n){return function(){this.textContent=n}}function w2(n){return function(){var e=n.apply(this,arguments);this.textContent=e??""}}function k2(n){return arguments.length?this.each(n==null?b2:(typeof n=="function"?w2:_2)(n)):this.node().textContent}function x2(){this.innerHTML=""}function v2(n){return function(){this.innerHTML=n}}function C2(n){return function(){var e=n.apply(this,arguments);this.innerHTML=e??""}}function S2(n){return arguments.length?this.each(n==null?x2:(typeof n=="function"?C2:v2)(n)):this.node().innerHTML}function E2(){this.nextSibling&&this.parentNode.appendChild(this)}function N2(){return this.each(E2)}function V2(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function B2(){return this.each(V2)}function T2(n){var e=typeof n=="function"?n:Ch(n);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function R2(){return null}function I2(n,e){var r=typeof n=="function"?n:Ch(n),o=e==null?R2:typeof e=="function"?e:Gd(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),o.apply(this,arguments)||null)})}function A2(){var n=this.parentNode;n&&n.removeChild(this)}function L2(){return this.each(A2)}function O2(){var n=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(n,this.nextSibling):n}function $2(){var n=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(n,this.nextSibling):n}function Z2(n){return this.select(n?$2:O2)}function M2(n){return arguments.length?this.property("__data__",n):this.node().__data__}function F2(n){return function(e){n.call(this,e,this.__data__)}}function P2(n){return n.trim().split(/^|\s+/).map(function(e){var r="",o=e.indexOf(".");return o>=0&&(r=e.slice(o+1),e=e.slice(0,o)),{type:e,name:r}})}function z2(n){return function(){var e=this.__on;if(e){for(var r=0,o=-1,a=e.length,l;r<a;++r)l=e[r],(!n.type||l.type===n.type)&&l.name===n.name?this.removeEventListener(l.type,l.listener,l.options):e[++o]=l;++o?e.length=o:delete this.__on}}}function D2(n,e,r){return function(){var o=this.__on,a,l=F2(e);if(o){for(var c=0,d=o.length;c<d;++c)if((a=o[c]).type===n.type&&a.name===n.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=l,a.options=r),a.value=e;return}}this.addEventListener(n.type,l,r),a={type:n.type,name:n.name,value:e,listener:l,options:r},o?o.push(a):this.__on=[a]}}function W2(n,e,r){var o=P2(n+""),a,l=o.length,c;if(arguments.length<2){var d=this.node().__on;if(d){for(var u=0,f=d.length,m;u<f;++u)for(a=0,m=d[u];a<l;++a)if((c=o[a]).type===m.type&&c.name===m.name)return m.value}return}for(d=e?D2:z2,a=0;a<l;++a)this.each(d(o[a],e,r));return this}function Oh(n,e,r){var o=Th(n),a=o.CustomEvent;typeof a=="function"?a=new a(e,r):(a=o.document.createEvent("Event"),r?(a.initEvent(e,r.bubbles,r.cancelable),a.detail=r.detail):a.initEvent(e,!1,!1)),n.dispatchEvent(a)}function G2(n,e){return function(){return Oh(this,n,e)}}function U2(n,e){return function(){return Oh(this,n,e.apply(this,arguments))}}function H2(n,e){return this.each((typeof e=="function"?U2:G2)(n,e))}function*X2(){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var o=n[e],a=0,l=o.length,c;a<l;++a)(c=o[a])&&(yield c)}var Hd=[null];function $t(n,e){this._groups=n,this._parents=e}function vi(){return new $t([[document.documentElement]],Hd)}function j2(){return this}$t.prototype=vi.prototype={constructor:$t,select:kT,selectAll:CT,selectChild:VT,selectChildren:IT,filter:AT,data:FT,enter:LT,exit:zT,join:DT,merge:WT,selection:j2,order:GT,sort:UT,call:XT,nodes:jT,node:YT,size:KT,empty:JT,each:qT,attr:a2,style:c2,property:f2,classed:y2,text:k2,html:S2,raise:N2,lower:B2,append:T2,insert:I2,remove:L2,clone:Z2,datum:M2,on:W2,dispatch:H2,[Symbol.iterator]:X2};function $h(n){return typeof n=="string"?new $t([[document.querySelector(n)]],[document.documentElement]):new $t([[n]],Hd)}function Y2(n){return typeof n=="string"?new $t([document.querySelectorAll(n)],[document.documentElement]):new $t([Sh(n)],Hd)}function Xd(n,e,r){n.prototype=e.prototype=r,r.constructor=n}function Zh(n,e){var r=Object.create(n.prototype);for(var o in e)r[o]=e[o];return r}function Ci(){}var Si=.7,rs=1/Si,aa="\\s*([+-]?\\d+)\\s*",Ei="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",er="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",K2=/^#([0-9a-f]{3,8})$/,J2=new RegExp(`^rgb\\(${aa},${aa},${aa}\\)$`),q2=new RegExp(`^rgb\\(${er},${er},${er}\\)$`),Q2=new RegExp(`^rgba\\(${aa},${aa},${aa},${Ei}\\)$`),eR=new RegExp(`^rgba\\(${er},${er},${er},${Ei}\\)$`),tR=new RegExp(`^hsl\\(${Ei},${er},${er}\\)$`),nR=new RegExp(`^hsla\\(${Ei},${er},${er},${Ei}\\)$`),Mh={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Xd(Ci,yo,{copy(n){return Object.assign(new this.constructor,this,n)},displayable(){return this.rgb().displayable()},hex:Fh,formatHex:Fh,formatHex8:rR,formatHsl:oR,formatRgb:Ph,toString:Ph});function Fh(){return this.rgb().formatHex()}function rR(){return this.rgb().formatHex8()}function oR(){return Uh(this).formatHsl()}function Ph(){return this.rgb().formatRgb()}function yo(n){var e,r;return n=(n+"").trim().toLowerCase(),(e=K2.exec(n))?(r=e[1].length,e=parseInt(e[1],16),r===6?zh(e):r===3?new Gt(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?os(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?os(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=J2.exec(n))?new Gt(e[1],e[2],e[3],1):(e=q2.exec(n))?new Gt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Q2.exec(n))?os(e[1],e[2],e[3],e[4]):(e=eR.exec(n))?os(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=tR.exec(n))?Gh(e[1],e[2]/100,e[3]/100,1):(e=nR.exec(n))?Gh(e[1],e[2]/100,e[3]/100,e[4]):Mh.hasOwnProperty(n)?zh(Mh[n]):n==="transparent"?new Gt(NaN,NaN,NaN,0):null}function zh(n){return new Gt(n>>16&255,n>>8&255,n&255,1)}function os(n,e,r,o){return o<=0&&(n=e=r=NaN),new Gt(n,e,r,o)}function aR(n){return n instanceof Ci||(n=yo(n)),n?(n=n.rgb(),new Gt(n.r,n.g,n.b,n.opacity)):new Gt}function jd(n,e,r,o){return arguments.length===1?aR(n):new Gt(n,e,r,o??1)}function Gt(n,e,r,o){this.r=+n,this.g=+e,this.b=+r,this.opacity=+o}Xd(Gt,jd,Zh(Ci,{brighter(n){return n=n==null?rs:Math.pow(rs,n),new Gt(this.r*n,this.g*n,this.b*n,this.opacity)},darker(n){return n=n==null?Si:Math.pow(Si,n),new Gt(this.r*n,this.g*n,this.b*n,this.opacity)},rgb(){return this},clamp(){return new Gt(bo(this.r),bo(this.g),bo(this.b),as(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Dh,formatHex:Dh,formatHex8:iR,formatRgb:Wh,toString:Wh}));function Dh(){return`#${_o(this.r)}${_o(this.g)}${_o(this.b)}`}function iR(){return`#${_o(this.r)}${_o(this.g)}${_o(this.b)}${_o((isNaN(this.opacity)?1:this.opacity)*255)}`}function Wh(){const n=as(this.opacity);return`${n===1?"rgb(":"rgba("}${bo(this.r)}, ${bo(this.g)}, ${bo(this.b)}${n===1?")":`, ${n})`}`}function as(n){return isNaN(n)?1:Math.max(0,Math.min(1,n))}function bo(n){return Math.max(0,Math.min(255,Math.round(n)||0))}function _o(n){return n=bo(n),(n<16?"0":"")+n.toString(16)}function Gh(n,e,r,o){return o<=0?n=e=r=NaN:r<=0||r>=1?n=e=NaN:e<=0&&(n=NaN),new En(n,e,r,o)}function Uh(n){if(n instanceof En)return new En(n.h,n.s,n.l,n.opacity);if(n instanceof Ci||(n=yo(n)),!n)return new En;if(n instanceof En)return n;n=n.rgb();var e=n.r/255,r=n.g/255,o=n.b/255,a=Math.min(e,r,o),l=Math.max(e,r,o),c=NaN,d=l-a,u=(l+a)/2;return d?(e===l?c=(r-o)/d+(r<o)*6:r===l?c=(o-e)/d+2:c=(e-r)/d+4,d/=u<.5?l+a:2-l-a,c*=60):d=u>0&&u<1?0:c,new En(c,d,u,n.opacity)}function lR(n,e,r,o){return arguments.length===1?Uh(n):new En(n,e,r,o??1)}function En(n,e,r,o){this.h=+n,this.s=+e,this.l=+r,this.opacity=+o}Xd(En,lR,Zh(Ci,{brighter(n){return n=n==null?rs:Math.pow(rs,n),new En(this.h,this.s,this.l*n,this.opacity)},darker(n){return n=n==null?Si:Math.pow(Si,n),new En(this.h,this.s,this.l*n,this.opacity)},rgb(){var n=this.h%360+(this.h<0)*360,e=isNaN(n)||isNaN(this.s)?0:this.s,r=this.l,o=r+(r<.5?r:1-r)*e,a=2*r-o;return new Gt(Yd(n>=240?n-240:n+120,a,o),Yd(n,a,o),Yd(n<120?n+240:n-120,a,o),this.opacity)},clamp(){return new En(Hh(this.h),is(this.s),is(this.l),as(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const n=as(this.opacity);return`${n===1?"hsl(":"hsla("}${Hh(this.h)}, ${is(this.s)*100}%, ${is(this.l)*100}%${n===1?")":`, ${n})`}`}}));function Hh(n){return n=(n||0)%360,n<0?n+360:n}function is(n){return Math.max(0,Math.min(1,n||0))}function Yd(n,e,r){return(n<60?e+(r-e)*n/60:n<180?r:n<240?e+(r-e)*(240-n)/60:e)*255}const Kd=n=>()=>n;function sR(n,e){return function(r){return n+r*e}}function cR(n,e,r){return n=Math.pow(n,r),e=Math.pow(e,r)-n,r=1/r,function(o){return Math.pow(n+o*e,r)}}function dR(n){return(n=+n)==1?Xh:function(e,r){return r-e?cR(e,r,n):Kd(isNaN(e)?r:e)}}function Xh(n,e){var r=e-n;return r?sR(n,r):Kd(isNaN(n)?e:n)}const ls=function n(e){var r=dR(e);function o(a,l){var c=r((a=jd(a)).r,(l=jd(l)).r),d=r(a.g,l.g),u=r(a.b,l.b),f=Xh(a.opacity,l.opacity);return function(m){return a.r=c(m),a.g=d(m),a.b=u(m),a.opacity=f(m),a+""}}return o.gamma=n,o}(1);function uR(n,e){e||(e=[]);var r=n?Math.min(e.length,n.length):0,o=e.slice(),a;return function(l){for(a=0;a<r;++a)o[a]=n[a]*(1-l)+e[a]*l;return o}}function pR(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function fR(n,e){var r=e?e.length:0,o=n?Math.min(r,n.length):0,a=new Array(o),l=new Array(r),c;for(c=0;c<o;++c)a[c]=Qd(n[c],e[c]);for(;c<r;++c)l[c]=e[c];return function(d){for(c=0;c<o;++c)l[c]=a[c](d);return l}}function mR(n,e){var r=new Date;return n=+n,e=+e,function(o){return r.setTime(n*(1-o)+e*o),r}}function Nn(n,e){return n=+n,e=+e,function(r){return n*(1-r)+e*r}}function hR(n,e){var r={},o={},a;(n===null||typeof n!="object")&&(n={}),(e===null||typeof e!="object")&&(e={});for(a in e)a in n?r[a]=Qd(n[a],e[a]):o[a]=e[a];return function(l){for(a in r)o[a]=r[a](l);return o}}var Jd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,qd=new RegExp(Jd.source,"g");function gR(n){return function(){return n}}function yR(n){return function(e){return n(e)+""}}function jh(n,e){var r=Jd.lastIndex=qd.lastIndex=0,o,a,l,c=-1,d=[],u=[];for(n=n+"",e=e+"";(o=Jd.exec(n))&&(a=qd.exec(e));)(l=a.index)>r&&(l=e.slice(r,l),d[c]?d[c]+=l:d[++c]=l),(o=o[0])===(a=a[0])?d[c]?d[c]+=a:d[++c]=a:(d[++c]=null,u.push({i:c,x:Nn(o,a)})),r=qd.lastIndex;return r<e.length&&(l=e.slice(r),d[c]?d[c]+=l:d[++c]=l),d.length<2?u[0]?yR(u[0].x):gR(e):(e=u.length,function(f){for(var m=0,g;m<e;++m)d[(g=u[m]).i]=g.x(f);return d.join("")})}function Qd(n,e){var r=typeof e,o;return e==null||r==="boolean"?Kd(e):(r==="number"?Nn:r==="string"?(o=yo(e))?(e=o,ls):jh:e instanceof yo?ls:e instanceof Date?mR:pR(e)?uR:Array.isArray(e)?fR:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?hR:Nn)(n,e)}function bR(n,e){return n=+n,e=+e,function(r){return Math.round(n*(1-r)+e*r)}}var Yh=180/Math.PI,Kh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Jh(n,e,r,o,a,l){var c,d,u;return(c=Math.sqrt(n*n+e*e))&&(n/=c,e/=c),(u=n*r+e*o)&&(r-=n*u,o-=e*u),(d=Math.sqrt(r*r+o*o))&&(r/=d,o/=d,u/=d),n*o<e*r&&(n=-n,e=-e,u=-u,c=-c),{translateX:a,translateY:l,rotate:Math.atan2(e,n)*Yh,skewX:Math.atan(u)*Yh,scaleX:c,scaleY:d}}var ss;function _R(n){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(n+"");return e.isIdentity?Kh:Jh(e.a,e.b,e.c,e.d,e.e,e.f)}function wR(n){return n==null||(ss||(ss=document.createElementNS("http://www.w3.org/2000/svg","g")),ss.setAttribute("transform",n),!(n=ss.transform.baseVal.consolidate()))?Kh:(n=n.matrix,Jh(n.a,n.b,n.c,n.d,n.e,n.f))}function qh(n,e,r,o){function a(f){return f.length?f.pop()+" ":""}function l(f,m,g,y,_,C){if(f!==g||m!==y){var N=_.push("translate(",null,e,null,r);C.push({i:N-4,x:Nn(f,g)},{i:N-2,x:Nn(m,y)})}else(g||y)&&_.push("translate("+g+e+y+r)}function c(f,m,g,y){f!==m?(f-m>180?m+=360:m-f>180&&(f+=360),y.push({i:g.push(a(g)+"rotate(",null,o)-2,x:Nn(f,m)})):m&&g.push(a(g)+"rotate("+m+o)}function d(f,m,g,y){f!==m?y.push({i:g.push(a(g)+"skewX(",null,o)-2,x:Nn(f,m)}):m&&g.push(a(g)+"skewX("+m+o)}function u(f,m,g,y,_,C){if(f!==g||m!==y){var N=_.push(a(_)+"scale(",null,",",null,")");C.push({i:N-4,x:Nn(f,g)},{i:N-2,x:Nn(m,y)})}else(g!==1||y!==1)&&_.push(a(_)+"scale("+g+","+y+")")}return function(f,m){var g=[],y=[];return f=n(f),m=n(m),l(f.translateX,f.translateY,m.translateX,m.translateY,g,y),c(f.rotate,m.rotate,g,y),d(f.skewX,m.skewX,g,y),u(f.scaleX,f.scaleY,m.scaleX,m.scaleY,g,y),f=m=null,function(_){for(var C=-1,N=y.length,T;++C<N;)g[(T=y[C]).i]=T.x(_);return g.join("")}}}var kR=qh(_R,"px, ","px)","deg)"),xR=qh(wR,", ",")",")"),ia=0,Ni=0,Vi=0,Qh=1e3,cs,Bi,ds=0,wo=0,us=0,Ti=typeof performance=="object"&&performance.now?performance:Date,eg=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(n){setTimeout(n,17)};function eu(){return wo||(eg(vR),wo=Ti.now()+us)}function vR(){wo=0}function ps(){this._call=this._time=this._next=null}ps.prototype=tg.prototype={constructor:ps,restart:function(n,e,r){if(typeof n!="function")throw new TypeError("callback is not a function");r=(r==null?eu():+r)+(e==null?0:+e),!this._next&&Bi!==this&&(Bi?Bi._next=this:cs=this,Bi=this),this._call=n,this._time=r,tu()},stop:function(){this._call&&(this._call=null,this._time=1/0,tu())}};function tg(n,e,r){var o=new ps;return o.restart(n,e,r),o}function CR(){eu(),++ia;for(var n=cs,e;n;)(e=wo-n._time)>=0&&n._call.call(void 0,e),n=n._next;--ia}function ng(){wo=(ds=Ti.now())+us,ia=Ni=0;try{CR()}finally{ia=0,ER(),wo=0}}function SR(){var n=Ti.now(),e=n-ds;e>Qh&&(us-=e,ds=n)}function ER(){for(var n,e=cs,r,o=1/0;e;)e._call?(o>e._time&&(o=e._time),n=e,e=e._next):(r=e._next,e._next=null,e=n?n._next=r:cs=r);Bi=n,tu(o)}function tu(n){if(!ia){Ni&&(Ni=clearTimeout(Ni));var e=n-wo;e>24?(n<1/0&&(Ni=setTimeout(ng,n-Ti.now()-us)),Vi&&(Vi=clearInterval(Vi))):(Vi||(ds=Ti.now(),Vi=setInterval(SR,Qh)),ia=1,eg(ng))}}function rg(n,e,r){var o=new ps;return e=e==null?0:+e,o.restart(a=>{o.stop(),n(a+e)},e,r),o}var NR=kh("start","end","cancel","interrupt"),VR=[],og=0,ag=1,nu=2,fs=3,ig=4,ru=5,ms=6;function hs(n,e,r,o,a,l){var c=n.__transition;if(!c)n.__transition={};else if(r in c)return;BR(n,r,{name:e,index:o,group:a,on:NR,tween:VR,time:l.time,delay:l.delay,duration:l.duration,ease:l.ease,timer:null,state:og})}function ou(n,e){var r=Vn(n,e);if(r.state>og)throw new Error("too late; already scheduled");return r}function tr(n,e){var r=Vn(n,e);if(r.state>fs)throw new Error("too late; already running");return r}function Vn(n,e){var r=n.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function BR(n,e,r){var o=n.__transition,a;o[e]=r,r.timer=tg(l,0,r.time);function l(f){r.state=ag,r.timer.restart(c,r.delay,r.time),r.delay<=f&&c(f-r.delay)}function c(f){var m,g,y,_;if(r.state!==ag)return u();for(m in o)if(_=o[m],_.name===r.name){if(_.state===fs)return rg(c);_.state===ig?(_.state=ms,_.timer.stop(),_.on.call("interrupt",n,n.__data__,_.index,_.group),delete o[m]):+m<e&&(_.state=ms,_.timer.stop(),_.on.call("cancel",n,n.__data__,_.index,_.group),delete o[m])}if(rg(function(){r.state===fs&&(r.state=ig,r.timer.restart(d,r.delay,r.time),d(f))}),r.state=nu,r.on.call("start",n,n.__data__,r.index,r.group),r.state===nu){for(r.state=fs,a=new Array(y=r.tween.length),m=0,g=-1;m<y;++m)(_=r.tween[m].value.call(n,n.__data__,r.index,r.group))&&(a[++g]=_);a.length=g+1}}function d(f){for(var m=f<r.duration?r.ease.call(null,f/r.duration):(r.timer.restart(u),r.state=ru,1),g=-1,y=a.length;++g<y;)a[g].call(n,m);r.state===ru&&(r.on.call("end",n,n.__data__,r.index,r.group),u())}function u(){r.state=ms,r.timer.stop(),delete o[e];for(var f in o)return;delete n.__transition}}function TR(n,e){var r=n.__transition,o,a,l=!0,c;if(r){e=e==null?null:e+"";for(c in r){if((o=r[c]).name!==e){l=!1;continue}a=o.state>nu&&o.state<ru,o.state=ms,o.timer.stop(),o.on.call(a?"interrupt":"cancel",n,n.__data__,o.index,o.group),delete r[c]}l&&delete n.__transition}}function RR(n){return this.each(function(){TR(this,n)})}function IR(n,e){var r,o;return function(){var a=tr(this,n),l=a.tween;if(l!==r){o=r=l;for(var c=0,d=o.length;c<d;++c)if(o[c].name===e){o=o.slice(),o.splice(c,1);break}}a.tween=o}}function AR(n,e,r){var o,a;if(typeof r!="function")throw new Error;return function(){var l=tr(this,n),c=l.tween;if(c!==o){a=(o=c).slice();for(var d={name:e,value:r},u=0,f=a.length;u<f;++u)if(a[u].name===e){a[u]=d;break}u===f&&a.push(d)}l.tween=a}}function LR(n,e){var r=this._id;if(n+="",arguments.length<2){for(var o=Vn(this.node(),r).tween,a=0,l=o.length,c;a<l;++a)if((c=o[a]).name===n)return c.value;return null}return this.each((e==null?IR:AR)(r,n,e))}function au(n,e,r){var o=n._id;return n.each(function(){var a=tr(this,o);(a.value||(a.value={}))[e]=r.apply(this,arguments)}),function(a){return Vn(a,o).value[e]}}function lg(n,e){var r;return(typeof e=="number"?Nn:e instanceof yo?ls:(r=yo(e))?(e=r,ls):jh)(n,e)}function OR(n){return function(){this.removeAttribute(n)}}function $R(n){return function(){this.removeAttributeNS(n.space,n.local)}}function ZR(n,e,r){var o,a=r+"",l;return function(){var c=this.getAttribute(n);return c===a?null:c===o?l:l=e(o=c,r)}}function MR(n,e,r){var o,a=r+"",l;return function(){var c=this.getAttributeNS(n.space,n.local);return c===a?null:c===o?l:l=e(o=c,r)}}function FR(n,e,r){var o,a,l;return function(){var c,d=r(this),u;return d==null?void this.removeAttribute(n):(c=this.getAttribute(n),u=d+"",c===u?null:c===o&&u===a?l:(a=u,l=e(o=c,d)))}}function PR(n,e,r){var o,a,l;return function(){var c,d=r(this),u;return d==null?void this.removeAttributeNS(n.space,n.local):(c=this.getAttributeNS(n.space,n.local),u=d+"",c===u?null:c===o&&u===a?l:(a=u,l=e(o=c,d)))}}function zR(n,e){var r=ts(n),o=r==="transform"?xR:lg;return this.attrTween(n,typeof e=="function"?(r.local?PR:FR)(r,o,au(this,"attr."+n,e)):e==null?(r.local?$R:OR)(r):(r.local?MR:ZR)(r,o,e))}function DR(n,e){return function(r){this.setAttribute(n,e.call(this,r))}}function WR(n,e){return function(r){this.setAttributeNS(n.space,n.local,e.call(this,r))}}function GR(n,e){var r,o;function a(){var l=e.apply(this,arguments);return l!==o&&(r=(o=l)&&WR(n,l)),r}return a._value=e,a}function UR(n,e){var r,o;function a(){var l=e.apply(this,arguments);return l!==o&&(r=(o=l)&&DR(n,l)),r}return a._value=e,a}function HR(n,e){var r="attr."+n;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var o=ts(n);return this.tween(r,(o.local?GR:UR)(o,e))}function XR(n,e){return function(){ou(this,n).delay=+e.apply(this,arguments)}}function jR(n,e){return e=+e,function(){ou(this,n).delay=e}}function YR(n){var e=this._id;return arguments.length?this.each((typeof n=="function"?XR:jR)(e,n)):Vn(this.node(),e).delay}function KR(n,e){return function(){tr(this,n).duration=+e.apply(this,arguments)}}function JR(n,e){return e=+e,function(){tr(this,n).duration=e}}function qR(n){var e=this._id;return arguments.length?this.each((typeof n=="function"?KR:JR)(e,n)):Vn(this.node(),e).duration}function QR(n,e){if(typeof e!="function")throw new Error;return function(){tr(this,n).ease=e}}function eI(n){var e=this._id;return arguments.length?this.each(QR(e,n)):Vn(this.node(),e).ease}function tI(n,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;tr(this,n).ease=r}}function nI(n){if(typeof n!="function")throw new Error;return this.each(tI(this._id,n))}function rI(n){typeof n!="function"&&(n=Nh(n));for(var e=this._groups,r=e.length,o=new Array(r),a=0;a<r;++a)for(var l=e[a],c=l.length,d=o[a]=[],u,f=0;f<c;++f)(u=l[f])&&n.call(u,u.__data__,f,l)&&d.push(u);return new pr(o,this._parents,this._name,this._id)}function oI(n){if(n._id!==this._id)throw new Error;for(var e=this._groups,r=n._groups,o=e.length,a=r.length,l=Math.min(o,a),c=new Array(o),d=0;d<l;++d)for(var u=e[d],f=r[d],m=u.length,g=c[d]=new Array(m),y,_=0;_<m;++_)(y=u[_]||f[_])&&(g[_]=y);for(;d<o;++d)c[d]=e[d];return new pr(c,this._parents,this._name,this._id)}function aI(n){return(n+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function iI(n,e,r){var o,a,l=aI(e)?ou:tr;return function(){var c=l(this,n),d=c.on;d!==o&&(a=(o=d).copy()).on(e,r),c.on=a}}function lI(n,e){var r=this._id;return arguments.length<2?Vn(this.node(),r).on.on(n):this.each(iI(r,n,e))}function sI(n){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==n)return;e&&e.removeChild(this)}}function cI(){return this.on("end.remove",sI(this._id))}function dI(n){var e=this._name,r=this._id;typeof n!="function"&&(n=Gd(n));for(var o=this._groups,a=o.length,l=new Array(a),c=0;c<a;++c)for(var d=o[c],u=d.length,f=l[c]=new Array(u),m,g,y=0;y<u;++y)(m=d[y])&&(g=n.call(m,m.__data__,y,d))&&("__data__"in m&&(g.__data__=m.__data__),f[y]=g,hs(f[y],e,r,y,f,Vn(m,r)));return new pr(l,this._parents,e,r)}function uI(n){var e=this._name,r=this._id;typeof n!="function"&&(n=Eh(n));for(var o=this._groups,a=o.length,l=[],c=[],d=0;d<a;++d)for(var u=o[d],f=u.length,m,g=0;g<f;++g)if(m=u[g]){for(var y=n.call(m,m.__data__,g,u),_,C=Vn(m,r),N=0,T=y.length;N<T;++N)(_=y[N])&&hs(_,e,r,N,y,C);l.push(y),c.push(m)}return new pr(l,c,e,r)}var pI=vi.prototype.constructor;function fI(){return new pI(this._groups,this._parents)}function mI(n,e){var r,o,a;return function(){var l=oa(this,n),c=(this.style.removeProperty(n),oa(this,n));return l===c?null:l===r&&c===o?a:a=e(r=l,o=c)}}function sg(n){return function(){this.style.removeProperty(n)}}function hI(n,e,r){var o,a=r+"",l;return function(){var c=oa(this,n);return c===a?null:c===o?l:l=e(o=c,r)}}function gI(n,e,r){var o,a,l;return function(){var c=oa(this,n),d=r(this),u=d+"";return d==null&&(u=d=(this.style.removeProperty(n),oa(this,n))),c===u?null:c===o&&u===a?l:(a=u,l=e(o=c,d))}}function yI(n,e){var r,o,a,l="style."+e,c="end."+l,d;return function(){var u=tr(this,n),f=u.on,m=u.value[l]==null?d||(d=sg(e)):void 0;(f!==r||a!==m)&&(o=(r=f).copy()).on(c,a=m),u.on=o}}function bI(n,e,r){var o=(n+="")=="transform"?kR:lg;return e==null?this.styleTween(n,mI(n,o)).on("end.style."+n,sg(n)):typeof e=="function"?this.styleTween(n,gI(n,o,au(this,"style."+n,e))).each(yI(this._id,n)):this.styleTween(n,hI(n,o,e),r).on("end.style."+n,null)}function _I(n,e,r){return function(o){this.style.setProperty(n,e.call(this,o),r)}}function wI(n,e,r){var o,a;function l(){var c=e.apply(this,arguments);return c!==a&&(o=(a=c)&&_I(n,c,r)),o}return l._value=e,l}function kI(n,e,r){var o="style."+(n+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(e==null)return this.tween(o,null);if(typeof e!="function")throw new Error;return this.tween(o,wI(n,e,r??""))}function xI(n){return function(){this.textContent=n}}function vI(n){return function(){var e=n(this);this.textContent=e??""}}function CI(n){return this.tween("text",typeof n=="function"?vI(au(this,"text",n)):xI(n==null?"":n+""))}function SI(n){return function(e){this.textContent=n.call(this,e)}}function EI(n){var e,r;function o(){var a=n.apply(this,arguments);return a!==r&&(e=(r=a)&&SI(a)),e}return o._value=n,o}function NI(n){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(n==null)return this.tween(e,null);if(typeof n!="function")throw new Error;return this.tween(e,EI(n))}function VI(){for(var n=this._name,e=this._id,r=cg(),o=this._groups,a=o.length,l=0;l<a;++l)for(var c=o[l],d=c.length,u,f=0;f<d;++f)if(u=c[f]){var m=Vn(u,e);hs(u,n,r,f,c,{time:m.time+m.delay+m.duration,delay:0,duration:m.duration,ease:m.ease})}return new pr(o,this._parents,n,r)}function BI(){var n,e,r=this,o=r._id,a=r.size();return new Promise(function(l,c){var d={value:c},u={value:function(){--a===0&&l()}};r.each(function(){var f=tr(this,o),m=f.on;m!==n&&(e=(n=m).copy(),e._.cancel.push(d),e._.interrupt.push(d),e._.end.push(u)),f.on=e}),a===0&&l()})}var TI=0;function pr(n,e,r,o){this._groups=n,this._parents=e,this._name=r,this._id=o}function cg(){return++TI}var fr=vi.prototype;pr.prototype={constructor:pr,select:dI,selectAll:uI,selectChild:fr.selectChild,selectChildren:fr.selectChildren,filter:rI,merge:oI,selection:fI,transition:VI,call:fr.call,nodes:fr.nodes,node:fr.node,size:fr.size,empty:fr.empty,each:fr.each,on:lI,attr:zR,attrTween:HR,style:bI,styleTween:kI,text:CI,textTween:NI,remove:cI,tween:LR,delay:YR,duration:qR,ease:eI,easeVarying:nI,end:BI,[Symbol.iterator]:fr[Symbol.iterator]};function RI(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}var II={time:null,delay:0,duration:250,ease:RI};function AI(n,e){for(var r;!(r=n.__transition)||!(r=r[e]);)if(!(n=n.parentNode))throw new Error(`transition ${e} not found`);return r}function LI(n){var e,r;n instanceof pr?(e=n._id,n=n._name):(e=cg(),(r=II).time=eu(),n=n==null?null:n+"");for(var o=this._groups,a=o.length,l=0;l<a;++l)for(var c=o[l],d=c.length,u,f=0;f<d;++f)(u=c[f])&&hs(u,n,e,f,c,r||AI(u,e));return new pr(o,this._parents,n,e)}vi.prototype.interrupt=RR,vi.prototype.transition=LI;function OI(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function gs(n,e){if((r=(n=e?n.toExponential(e-1):n.toExponential()).indexOf("e"))<0)return null;var r,o=n.slice(0,r);return[o.length>1?o[0]+o.slice(2):o,+n.slice(r+1)]}function la(n){return n=gs(Math.abs(n)),n?n[1]:NaN}function $I(n,e){return function(r,o){for(var a=r.length,l=[],c=0,d=n[0],u=0;a>0&&d>0&&(u+d+1>o&&(d=Math.max(1,o-u)),l.push(r.substring(a-=d,a+d)),!((u+=d+1)>o));)d=n[c=(c+1)%n.length];return l.reverse().join(e)}}function ZI(n){return function(e){return e.replace(/[0-9]/g,function(r){return n[+r]})}}var MI=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ys(n){if(!(e=MI.exec(n)))throw new Error("invalid format: "+n);var e;return new iu({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}ys.prototype=iu.prototype;function iu(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}iu.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function FI(n){e:for(var e=n.length,r=1,o=-1,a;r<e;++r)switch(n[r]){case".":o=a=r;break;case"0":o===0&&(o=r),a=r;break;default:if(!+n[r])break e;o>0&&(o=0);break}return o>0?n.slice(0,o)+n.slice(a+1):n}var dg;function PI(n,e){var r=gs(n,e);if(!r)return n+"";var o=r[0],a=r[1],l=a-(dg=Math.max(-8,Math.min(8,Math.floor(a/3)))*3)+1,c=o.length;return l===c?o:l>c?o+new Array(l-c+1).join("0"):l>0?o.slice(0,l)+"."+o.slice(l):"0."+new Array(1-l).join("0")+gs(n,Math.max(0,e+l-1))[0]}function ug(n,e){var r=gs(n,e);if(!r)return n+"";var o=r[0],a=r[1];return a<0?"0."+new Array(-a).join("0")+o:o.length>a+1?o.slice(0,a+1)+"."+o.slice(a+1):o+new Array(a-o.length+2).join("0")}const pg={"%":(n,e)=>(n*100).toFixed(e),b:n=>Math.round(n).toString(2),c:n=>n+"",d:OI,e:(n,e)=>n.toExponential(e),f:(n,e)=>n.toFixed(e),g:(n,e)=>n.toPrecision(e),o:n=>Math.round(n).toString(8),p:(n,e)=>ug(n*100,e),r:ug,s:PI,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function fg(n){return n}var mg=Array.prototype.map,hg=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function zI(n){var e=n.grouping===void 0||n.thousands===void 0?fg:$I(mg.call(n.grouping,Number),n.thousands+""),r=n.currency===void 0?"":n.currency[0]+"",o=n.currency===void 0?"":n.currency[1]+"",a=n.decimal===void 0?".":n.decimal+"",l=n.numerals===void 0?fg:ZI(mg.call(n.numerals,String)),c=n.percent===void 0?"%":n.percent+"",d=n.minus===void 0?"−":n.minus+"",u=n.nan===void 0?"NaN":n.nan+"";function f(g){g=ys(g);var y=g.fill,_=g.align,C=g.sign,N=g.symbol,T=g.zero,$=g.width,W=g.comma,E=g.precision,D=g.trim,A=g.type;A==="n"?(W=!0,A="g"):pg[A]||(E===void 0&&(E=12),D=!0,A="g"),(T||y==="0"&&_==="=")&&(T=!0,y="0",_="=");var B=N==="$"?r:N==="#"&&/[boxX]/.test(A)?"0"+A.toLowerCase():"",P=N==="$"?o:/[%p]/.test(A)?c:"",H=pg[A],S=/[defgprs%]/.test(A);E=E===void 0?6:/[gprs]/.test(A)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function I(v){var L=B,V=P,k,Z,U;if(A==="c")V=H(v)+V,v="";else{v=+v;var F=v<0||1/v<0;if(v=isNaN(v)?u:H(Math.abs(v),E),D&&(v=FI(v)),F&&+v==0&&C!=="+"&&(F=!1),L=(F?C==="("?C:d:C==="-"||C==="("?"":C)+L,V=(A==="s"?hg[8+dg/3]:"")+V+(F&&C==="("?")":""),S){for(k=-1,Z=v.length;++k<Z;)if(U=v.charCodeAt(k),48>U||U>57){V=(U===46?a+v.slice(k+1):v.slice(k))+V,v=v.slice(0,k);break}}}W&&!T&&(v=e(v,1/0));var j=L.length+v.length+V.length,ee=j<$?new Array($-j+1).join(y):"";switch(W&&T&&(v=e(ee+v,ee.length?$-V.length:1/0),ee=""),_){case"<":v=L+v+V+ee;break;case"=":v=L+ee+v+V;break;case"^":v=ee.slice(0,j=ee.length>>1)+L+v+V+ee.slice(j);break;default:v=ee+L+v+V;break}return l(v)}return I.toString=function(){return g+""},I}function m(g,y){var _=f((g=ys(g),g.type="f",g)),C=Math.max(-8,Math.min(8,Math.floor(la(y)/3)))*3,N=Math.pow(10,-C),T=hg[8+C/3];return function($){return _(N*$)+T}}return{format:f,formatPrefix:m}}var bs,gg,yg;DI({thousands:",",grouping:[3],currency:["$",""]});function DI(n){return bs=zI(n),gg=bs.format,yg=bs.formatPrefix,bs}function WI(n){return Math.max(0,-la(Math.abs(n)))}function GI(n,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(la(e)/3)))*3-la(Math.abs(n)))}function UI(n,e){return n=Math.abs(n),e=Math.abs(e)-n,Math.max(0,la(e)-la(n))+1}function bg(n,e){switch(arguments.length){case 0:break;case 1:this.range(n);break;default:this.range(e).domain(n);break}return this}function HI(n){return function(){return n}}function XI(n){return+n}var _g=[0,1];function sa(n){return n}function lu(n,e){return(e-=n=+n)?function(r){return(r-n)/e}:HI(isNaN(e)?NaN:.5)}function jI(n,e){var r;return n>e&&(r=n,n=e,e=r),function(o){return Math.max(n,Math.min(e,o))}}function YI(n,e,r){var o=n[0],a=n[1],l=e[0],c=e[1];return a<o?(o=lu(a,o),l=r(c,l)):(o=lu(o,a),l=r(l,c)),function(d){return l(o(d))}}function KI(n,e,r){var o=Math.min(n.length,e.length)-1,a=new Array(o),l=new Array(o),c=-1;for(n[o]<n[0]&&(n=n.slice().reverse(),e=e.slice().reverse());++c<o;)a[c]=lu(n[c],n[c+1]),l[c]=r(e[c],e[c+1]);return function(d){var u=gh(n,d,1,o)-1;return l[u](a[u](d))}}function wg(n,e){return e.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function kg(){var n=_g,e=_g,r=Qd,o,a,l,c=sa,d,u,f;function m(){var y=Math.min(n.length,e.length);return c!==sa&&(c=jI(n[0],n[y-1])),d=y>2?KI:YI,u=f=null,g}function g(y){return y==null||isNaN(y=+y)?l:(u||(u=d(n.map(o),e,r)))(o(c(y)))}return g.invert=function(y){return c(a((f||(f=d(e,n.map(o),Nn)))(y)))},g.domain=function(y){return arguments.length?(n=Array.from(y,XI),m()):n.slice()},g.range=function(y){return arguments.length?(e=Array.from(y),m()):e.slice()},g.rangeRound=function(y){return e=Array.from(y),r=bR,m()},g.clamp=function(y){return arguments.length?(c=y?!0:sa,m()):c!==sa},g.interpolate=function(y){return arguments.length?(r=y,m()):r},g.unknown=function(y){return arguments.length?(l=y,g):l},function(y,_){return o=y,a=_,m()}}function JI(){return kg()(sa,sa)}function qI(n,e,r,o){var a=iT(n,e,r),l;switch(o=ys(o??",f"),o.type){case"s":{var c=Math.max(Math.abs(n),Math.abs(e));return o.precision==null&&!isNaN(l=GI(a,c))&&(o.precision=l),yg(o,c)}case"":case"e":case"g":case"p":case"r":{o.precision==null&&!isNaN(l=UI(a,Math.max(Math.abs(n),Math.abs(e))))&&(o.precision=l-(o.type==="e"));break}case"f":case"%":{o.precision==null&&!isNaN(l=WI(a))&&(o.precision=l-(o.type==="%")*2);break}}return gg(o)}function xg(n){var e=n.domain;return n.ticks=function(r){var o=e();return yh(o[0],o[o.length-1],r??10)},n.tickFormat=function(r,o){var a=e();return qI(a[0],a[a.length-1],r??10,o)},n.nice=function(r){r==null&&(r=10);var o=e(),a=0,l=o.length-1,c=o[a],d=o[l],u,f,m=10;for(d<c&&(f=c,c=d,d=f,f=a,a=l,l=f);m-- >0;){if(f=ra(c,d,r),f===u)return o[a]=c,o[l]=d,e(o);if(f>0)c=Math.floor(c/f)*f,d=Math.ceil(d/f)*f;else if(f<0)c=Math.ceil(c*f)/f,d=Math.floor(d*f)/f;else break;u=f}return n},n}function su(){var n=JI();return n.copy=function(){return wg(n,su())},bg.apply(n,arguments),xg(n)}function vg(n){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/n))}}function Cg(n){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*n}}function QI(n){var e=1,r=n(vg(e),Cg(e));return r.constant=function(o){return arguments.length?n(vg(e=+o),Cg(e)):e},xg(r)}function cu(){var n=QI(kg());return n.copy=function(){return wg(n,cu()).constant(n.constant())},bg.apply(n,arguments)}function Ri(n,e,r){this.k=n,this.x=e,this.y=r}Ri.prototype={constructor:Ri,scale:function(n){return n===1?this:new Ri(this.k*n,this.x,this.y)},translate:function(n,e){return n===0&e===0?this:new Ri(this.k,this.x+this.k*n,this.y+this.k*e)},apply:function(n){return[n[0]*this.k+this.x,n[1]*this.k+this.y]},applyX:function(n){return n*this.k+this.x},applyY:function(n){return n*this.k+this.y},invert:function(n){return[(n[0]-this.x)/this.k,(n[1]-this.y)/this.k]},invertX:function(n){return(n-this.x)/this.k},invertY:function(n){return(n-this.y)/this.k},rescaleX:function(n){return n.copy().domain(n.range().map(this.invertX,this).map(n.invert,n))},rescaleY:function(n){return n.copy().domain(n.range().map(this.invertY,this).map(n.invert,n))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},Ri.prototype;function du(n,e){const{width:r,height:o,margin:a,compact:l}=e;return n.replaceChildren(),l&&(n.style.height=o+"px",n.style.lineHeight=o+"px"),$h(n).append("svg").attr("width",r+a.left+a.right).attr("height",o+a.top+a.bottom).append("g").attr("transform",`translate(${a.left},${a.top})`)}function uu(n,e,r,o){const{height:a}=r,{x:l,y:c}=o,d=$h("body").append("div").attr("class","svg-tooltip").style("position","absolute").style("visibility","hidden"),u=function(g,y){d.style("visibility","visible").text(`count: ${y.length}
|
|
38
38
|
x0: ${y.x0}
|
|
39
|
-
x1: ${y.x1}`)},
|
|
39
|
+
x1: ${y.x1}`)},f=function(g){d.style("top",g.pageY-10+"px").style("left",g.pageX+10+"px")},m=function(){d.style("visibility","hidden")};n.selectAll("rect").data(e).enter().append("rect").attr("x",g=>l(g.x0)).attr("y",g=>c(g.length)).attr("width",g=>l(g.x1)-l(g.x0)).attr("height",g=>a-c(g.length)).style("fill","#929BAD").attr("stroke","#fff").attr("stroke-opacity",.2).attr("stroke-width",.5).on("mouseover",u).on("mousemove",f).on("mouseout",m).append("title").text(g=>`[${g.x0}, ${g.x1}]
|
|
40
40
|
`+g.length+`
|
|
41
|
-
`)}function Xd(n,e,r,o){const{width:a,height:s}=e;function c(){return Gs(r.y).ticks(6)}function d(){return o(qs(r.x))}n.append("g").attr("class","grid").attr("font-family","'Manrope', sans-serif").call(c().tickSize(-a).tickFormat(()=>"")),n.append("g").attr("class","grid").attr("font-family","'Manrope', sans-serif").attr("transform",`translate(0,${s})`).call(d().tickSize(-s).tickFormat(()=>"")),a2(".grid line").style("stroke","#E1E3EB").style("opacity",.7)}function ng(n,e,r=50,o=10){if(r<=0)return[];const a=(e-n)/(r-1),s=[];for(let c=0;c<r;c++){const d=n+c*a;s.push(Math.pow(o,d))}return s}function Yd(n,e){const{height:r,width:o,margin:a,xAxisLabel:s,yAxisLabel:c,compact:d}=e;d||(n.append("text").attr("class","x-axis-label").attr("font-weight",500).attr("text-anchor","middle").attr("x",o/2).attr("y",r+a.bottom-5).text(s??"Value Range"),n.append("text").attr("class","y-axis-label").attr("font-weight",500).attr("text-anchor","middle").attr("x",-r/2).attr("y",-a.left+15).attr("transform","rotate(-90)").text(c??"Frequency"))}function Jd(n,e,r){const{threshold:o}=r;o&&n.append("line").attr("x1",e.x(o)).attr("x2",e.x(o)).attr("y1",0).attr("y2",r.height).style("stroke","#F05670").style("stroke-width","1").style("stroke-dasharray","7.4 3.2")}function Qd(n){return n.map(e=>"from"in e?{x0:e.from,x1:e.to,length:e.weight}:{x0:e.x0,x1:e.x1,length:e.length})}const eu=(n,e)=>n.append("g").style("font-size","14px").style("font-weight","500").attr("transform",`translate(0,${e})`),tu=n=>n.append("g").style("font-size","14px").style("font-weight","500"),nu=(n,e)=>Hd().domain([0,Hs(n,r=>r.length)]).range([e,0]);function d$(n,e,r){const{width:o,height:a,nBins:s=10}=e,c=Gd(n,e),d=vd(r),u=Hs(r),p=Hd().domain([d,u]).range([0,o]),h=Qd(Kh().domain(p.domain()).thresholds(p.ticks(s))(r)),g=nu(h,a);Xd(c,e,{x:p,y:g},y=>y.ticks(6)),Kd(c,h,e,{x:p,y:g}),Jd(c,{x:p,y:g},e),eu(c,a).call(qs(p).tickSize(0)),tu(c).call(Gs(g).tickSize(0)),Yd(c,e)}function u$(n,e,r){const{width:o,height:a,nBins:s=10}=e,c=Gd(n,e),d=vd(r),u=Hs(r),p=qd().domain([d,u]).range([0,o]).nice(),h=E=>{const N=[];for(let V=0;V<=E;V++)N.push(Number(p.invert(o*(V/E)).toFixed(2)));return N},g=Qd(Kh().domain(p.domain()).thresholds(h(s))(r)),y=nu(g,a),w=ng(0,Math.ceil(Math.log10(u)),6);Xd(c,e,{x:p,y},E=>E.tickValues(w)),Kd(c,g,e,{x:p,y}),Jd(c,{x:p,y},e),eu(c,a).call(qs(p).tickValues(w).tickSize(0)),tu(c).call(Gs(y).tickSize(0)),Yd(c,e)}function f$(n,e,r){const{width:o,height:a}=e,s=Gd(n,e),c=Qd(r),d=vd(c,y=>y.x0),u=Hs(c,y=>y.x1),p=qd().domain([d,u]).range([0,o]).nice(),h=nu(c,a),g=ng(0,Math.ceil(Math.log10(u)),6);Xd(s,e,{x:p,y:h},y=>y.tickValues(g)),Kd(s,c,e,{x:p,y:h}),Jd(s,{x:p,y:h},e),eu(s,a).call(qs(p).tickValues(g).tickSize(0)),tu(s).call(Gs(h).tickSize(0)),Yd(s,e)}const p$=t.defineComponent({__name:"PlChartHistogram",props:{settings:{}},setup(n){const e=n,r=t.ref(),o=t.computed(()=>{const{xAxisLabel:s,yAxisLabel:c,threshold:d,compact:u,totalWidth:p=674,totalHeight:h=252}=e.settings,g=u?{top:0,right:0,bottom:0,left:0}:{top:0,right:30,bottom:40,left:85},y=p-g.left-g.right,w=h-g.top-g.bottom;return{width:y,height:w,margin:g,compact:u,nBins:"nBins"in e.settings?e.settings.nBins:10,xAxisLabel:s,yAxisLabel:c,threshold:d}}),a=()=>{const s=e.settings;if(s.type==="log-bins"){f$(r.value,o.value,s.bins);return}s.log?u$(r.value,o.value,s.numbers):d$(r.value,o.value,s.numbers)};return t.watch(e,a),t.onMounted(a),(s,c)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(s.$style.component)},[s.settings.title&&!s.settings.compact?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(s.$style.title)},t.toDisplayString(s.settings.title),3)):t.createCommentVNode("",!0),c[0]||(c[0]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"chart",ref:r},null,512)],2))}}),h$="_component_t90zs_2",m$="_title_t90zs_11",g$={component:h$,title:m$},y$={$style:g$},rg=lt(p$,[["__cssModules",y$]]),og=Symbol(),ag=Symbol(),_$=["name"],w$=t.defineComponent({__name:"PlRadio",props:t.mergeModels({name:{},value:{},disabled:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=t.useModel(n,"modelValue"),r=t.createPropsRestProxy(n,["name"]),o=t.inject(og,n.name),a=t.inject(ag,e);return(s,c)=>(t.openBlock(),t.createElementBlock("label",{class:t.normalizeClass(s.$style.container)},[t.withDirectives(t.createElementVNode("input",t.mergeProps({"onUpdate:modelValue":c[0]||(c[0]=d=>t.isRef(a)?a.value=d:null),class:s.$style.input,type:"radio",name:t.unref(o)},r),null,16,_$),[[t.vModelRadio,t.unref(a)]]),c[1]||(c[1]=t.createTextVNode()),t.createElementVNode("span",{class:t.normalizeClass(s.$style.label)},[t.renderSlot(s.$slots,"default")],2)],2))}}),b$="_container_1yonu_2",k$="_input_1yonu_19",x$="_label_1yonu_53",v$={container:b$,input:k$,label:x$},C$={$style:v$},ig=lt(w$,[["__cssModules",C$]]),E$=t.defineComponent({__name:"PlRadioGroup",props:t.mergeModels({name:{},options:{},keyExtractor:{type:Function}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=t.useModel(n,"modelValue"),r=n;t.useSlots();const o=r.keyExtractor??((a,s)=>s);return t.provide(og,r.name),t.provide(ag,e),(a,s)=>(t.openBlock(),t.createElementBlock("fieldset",{class:t.normalizeClass(a.$style.container)},[t.createElementVNode("legend",{class:t.normalizeClass(a.$style.label)},[t.renderSlot(a.$slots,"label")],2),s[0]||(s[0]=t.createTextVNode()),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.options,(c,d)=>(t.openBlock(),t.createBlock(ig,{key:t.unref(o)(c.value,d),value:c.value,disabled:c.disabled},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(c.label),1)]),_:2},1032,["value","disabled"]))),128)),s[1]||(s[1]=t.createTextVNode()),t.renderSlot(a.$slots,"default")],2))}}),S$="_container_10fxa_2",N$="_label_10fxa_7",B$={container:S$,label:N$},V$={$style:B$},T$=lt(E$,[["__cssModules",V$]]),sg=["#FFF680","#E8F66C","#C4F16B","#9AEB71","#70E084","#43D18A","#2DBD96","#28A8A0","#2793A3","#337B9E","#3B6399","#424C8F","#4A3584","#481B70","#4A005C"],lg=["#FFF680","#FFE871","#FDCD6F","#FEAD66","#FA935F","#F57258","#EB555E","#D64470","#B83778","#982D82","#7E2584","#611B84","#49187A","#38116B","#2B125C"],A$=["#DFFADC","#C9F5D3","#B3F2CF","#9AEBCD","#80DCCC","#6DC8D2","#61B7DB","#5C97DB","#5A7CD6","#6060C7","#674BB3","#693799","#6A277B","#671D60","#611347"],$$=["#FAFAB4","#ECFBA1","#D6F598","#BEEB91","#A2E082","#82D67C","#67C77E","#4FB281","#429E8C","#36898F","#2B668F","#254B85","#213475","#1E1E6B","#1C0F5C"],R$=["#FFEA80","#FFD971","#FFC171","#FFA76C","#FB8B6F","#EB7179","#D75F7F","#C2518D","#A64392","#8038A4","#6135A4","#4735A3","#283A8F","#013C70","#003752"],O$=["#FFF780","#E7FA6F","#C1FA6A","#9BF56C","#79F080","#66E698","#56D7AC","#50C7C7","#56B4D7","#6898EB","#7481FA","#8769FA","#9450EB","#9634D6","#942AAE"],I$=["#43317B","#3B57A3","#3390B3","#5DC2B1","#95DBA5","#B9EBA0","#DBF5A6","#F5F5B7","#FEEA9D","#FFD285","#FA9B78","#E55C72","#C23665","#8F1150","#5C1243"],D$=["#122B5C","#1A496B","#1D7C8F","#21A3A3","#5FC7AB","#99E0B1","#CEF0CE","#F0F0F0","#FAE6D2","#FAC5AA","#FA9282","#E55C72","#C23665","#8F1150","#5C1243"],M$=["#0E0E8F","#1D23B8","#3748E5","#647DFA","#96A7FA","#C3CCFA","#E1E5FA","#F0F0F0","#F9DBDB","#F9BDBD","#F59393","#E55C72","#C23665","#8F1150","#5C1243"],P$=["#2E5C00","#49850D","#3748E5","#8FC758","#ABDB7B","#C5EBA0","#DCF5C4","#F0F0F0","#FADCF5","#F5C4ED","#F0A3E3","#E573D2","#CC49B6","#991884","#701260"],L$=["#4A005C","#4A2F7F","#3F5895","#3181A0","#28A8A0","#3ECD8D","#86E67B","#CEF36C","#FFF680","#FED470","#FDA163","#F36C5A","#D64470","#A03080","#702084","#451777","#2B125C"],cg={viridis:sg,magma:lg,density:A$,salinity:$$,sunset:R$,rainbow:O$,spectrum:I$,teal_red:D$,blue_red:M$,lime_rose:P$,viridis_magma:L$},dg={green_light:"#99E099",green_bright:"#198020",green_dark:"#42B842",violet_light:"#C1ADFF",violet_bright:"#845CFF",violet_dark:"#5F31CC",orange_light:"#FFCB8F",orange_bright:"#FF9429",orange_dark:"#C26A27",teal_light:"#90E0E0",teal_bright:"#27C2C2",teal_dark:"#068A94",rose_light:"#FAAAFA",rose_bright:"#E553E5",rose_dark:"#A324B2",lime_light:"#CBEB67",lime_bright:"#95C700",lime_dark:"#659406",blue_light:"#99CCFF",blue_bright:"#2D93FA",blue_dark:"#105BCC",red_light:"#FFADBA",red_bright:"#F05670",red_dark:"#AD3757",grey_light:"#D3D7E0",grey_bright:"#929BAD",grey_dark:"#5E5E70"};function Zt(n,e,r,o=1){return new class{constructor(a,s,c,d=1){this.r=a,this.g=s,this.b=c,this.a=d}get hex(){const a=n.toString(16).padStart(2,"0"),s=e.toString(16).padStart(2,"0"),c=r.toString(16).padStart(2,"0"),d=Math.round(o*255).toString(16).padStart(2,"0");return`#${a}${s}${c}${d}`}get rgba(){return`rgb(${n}, ${e}, ${r}, ${o})`}toString(){return this.hex}toJSON(){return this.hex}}(n,e,r,o)}Zt.fromHex=n=>{n=n.replace("#","");let e,r,o,a=1;if(n.length===6)e=parseInt(n.slice(0,2),16),r=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);else if(n.length===8)e=parseInt(n.slice(0,2),16),r=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16),a=parseInt(n.slice(6,8),16)/255;else throw new Error("Invalid HEX color format.");return Zt(e,r,o,a)},Zt.fromString=n=>{if(n.startsWith("#"))return Zt.fromHex(n);throw Error("TODO: implement rgb(a), hsl")},Zt.categorical=n=>Zt.fromHex(dg[n]),Zt.fromHex=n=>{n=n.replace("#","");let e,r,o,a=1;if(n.length===6)e=parseInt(n.slice(0,2),16),r=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);else if(n.length===8)e=parseInt(n.slice(0,2),16),r=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16),a=parseInt(n.slice(6,8),16)/255;else throw new Error("Invalid HEX color format.");return Zt(e,r,o,a)},Zt.fromString=n=>{if(n.startsWith("#"))return Zt.fromHex(n);throw Error("TODO: implement rgb(a), hsl")};function ru(n,e,r){return n+r*(e-n)}function ug(n,e,r){const o=Math.round(ru(n.r,e.r,r)),a=Math.round(ru(n.g,e.g,r)),s=Math.round(ru(n.b,e.b,r));return Zt(o,a,s)}function fg(n){return typeof n=="string"?cg[n].map(e=>Zt.fromString(e)):n.map(e=>typeof e=="string"?Zt.fromString(e):e)}function F$(n){return new class{constructor(e){this.colors=e}fromInterval(e){if(e<0)throw new Error("t must be greater than or equal to 0");if(e>1)throw new Error("t must be less than or equal to 1");const r=this.colors,o=r.length-1,a=Math.floor(e*o),s=e*o%1,c=r[a],d=r[Math.min(a+1,o)];return ug(c,d,s)}getNthOf(e,r){if(e<=0)throw new Error("n must be greater than 0");if(e>r)throw Error("n must be lower or equal than count of segments");return this.fromInterval((e-1)/(r-1))}split(e){if(e<=0)throw new Error("n must be greater than 0");const r=[];for(let o=0;o<e;o++){const a=o/(e-1);r.push(this.fromInterval(a))}return r}}(fg(n))}const z$=t.defineComponent({__name:"ContextProvider",props:{context:{},contextKey:{}},setup(n){const e=n;return t.provide(e.contextKey,t.computed(()=>e.context)),(r,o)=>t.renderSlot(r.$slots,"default")}});function Vt(n,e,r){return e>n?e:n>r?r:n}const ou=n=>t.computed(()=>{const e=[100],{min:r,max:o,step:a}=n.value;let s=r;for(;s<o;){s+=a;const c=(1-(Vt(s,r,o)-r)/(o-r))*100;e.push(c)}return e}),U$={class:"ui-slider__wrapper"},j$={class:"ui-slider__label-section"},Z$={key:0,class:"text-s"},W$={key:1,class:"ui-slider__value-static text-s"},H$={class:"ui-slider__base"},q$={class:"ui-slider__container"},G$={class:"ui-slider__container ui-slider__container-thumb"},K$={class:"ui-slider__input-wrapper d-flex"},X$=["value"],Y$={key:0,class:"ui-slider__error"},pg=t.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(n,{emit:e}){const r=t.useSlots(),o=e,a=n,s=t.reactive({deltaValue:0}),c=t.computed(()=>a.max-a.min),d=t.computed(()=>Vt((a.modelValue??0)+s.deltaValue,a.min,a.max)),u=t.ref(a.modelValue),p=t.computed(()=>{const R=a.modelValue;return Number.isFinite(R)?R<a.min?`Min value: ${a.min}`:R>a.max?`Max value: ${a.max}`:a.error:"Not a number"}),h=t.computed(()=>a),g=ou(h),y=t.computed(()=>(d.value-a.min)/c.value),w=t.computed(()=>({right:Math.ceil((1-y.value)*100)+"%"})),E=t.computed(()=>({right:`calc(${Math.ceil((1-y.value)*100)}%) `})),N=t.ref(),V=t.ref();t.watch(()=>a.modelValue,R=>{u.value=R});function D(R){const B=Vt(R,a.min,a.max);return Math.round((B+Number.EPSILON)*(1/a.step))/(1/a.step)}Tr(V,R=>{var B;vt((B=t.unref(N))==null?void 0:B.getBoundingClientRect(),z=>{const{dx:q}=R;s.deltaValue=q/z.width*c.value,u.value=D(Vt((a.modelValue??0)+s.deltaValue,a.min,a.max)),R.stop&&(o("update:modelValue",D(d.value)),s.deltaValue=0)})});function F(R){o("update:modelValue",D(R))}function $(R){F(+R.target.value)}function W(R){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(R.code)&&R.preventDefault();const B=R.code==="ArrowUp"||R.code==="ArrowRight"?a.step*1:R.code==="ArrowDown"||R.code==="ArrowLeft"?a.step*-1:0;F(a.modelValue+B)}return(R,B)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([a.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[t.createElementVNode("div",{class:t.normalizeClass([`ui-slider__mode-${a.mode}`,"ui-slider"])},[t.createElementVNode("div",U$,[t.createElementVNode("div",j$,[R.label?(t.openBlock(),t.createElementBlock("label",Z$,[t.createElementVNode("span",null,t.toDisplayString(R.label),1),B[1]||(B[1]=t.createTextVNode()),t.unref(r).tooltip?(t.openBlock(),t.createBlock(t.unref(dt),{key:0,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(R.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),B[2]||(B[2]=t.createTextVNode()),a.mode==="text"?(t.openBlock(),t.createElementBlock("div",W$,t.toDisplayString(u.value)+t.toDisplayString(R.measure),1)):t.createCommentVNode("",!0)]),B[6]||(B[6]=t.createTextVNode()),t.createElementVNode("div",H$,[t.createElementVNode("div",q$,[t.createElementVNode("div",{ref_key:"barRef",ref:N,class:"ui-slider__bar"},[t.createElementVNode("div",{class:"ui-slider__progress",style:t.normalizeStyle(w.value)},null,4)],512)]),B[5]||(B[5]=t.createTextVNode()),t.createElementVNode("div",G$,[a.breakpoints?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(g),(z,q)=>(t.openBlock(),t.createElementBlock("div",{key:q,style:t.normalizeStyle({right:`${z}%`}),class:"ui-slider__thumb-step"},null,4))),128)):t.createCommentVNode("",!0),B[4]||(B[4]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"thumbRef",ref:V,tabindex:"0",class:"ui-slider__thumb ui-slider__thumb-active",style:t.normalizeStyle(E.value),onKeydown:W},B[3]||(B[3]=[t.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),B[7]||(B[7]=t.createTextVNode()),t.createElementVNode("div",K$,[a.mode==="input"?(t.openBlock(),t.createElementBlock("input",{key:0,value:u.value,class:"ui-slider__value text-s",onChange:B[0]||(B[0]=z=>$(z))},null,40,X$)):t.createCommentVNode("",!0)])],2),B[8]||(B[8]=t.createTextVNode()),p.value?(t.openBlock(),t.createElementBlock("div",Y$,t.toDisplayString(p.value),1)):t.createCommentVNode("",!0)],2))}});function J$(n,e=null,r=null){function o(d){const{scrollTop:u,scrollHeight:p,clientHeight:h}=d;if(!(p>h)||!e)return null;const g=p-u-h,y=u>e?e:0,w=g>e?h-e-y:h;return`linear-gradient(
|
|
41
|
+
`)}function pu(n,e,r,o){const{width:a,height:l}=e;function c(){return Ql(r.y).ticks(6)}function d(){return o(ql(r.x))}n.append("g").attr("class","grid").attr("font-family","'Manrope', sans-serif").call(c().tickSize(-a).tickFormat(()=>"")),n.append("g").attr("class","grid").attr("font-family","'Manrope', sans-serif").attr("transform",`translate(0,${l})`).call(d().tickSize(-l).tickFormat(()=>"")),Y2(".grid line").style("stroke","#E1E3EB").style("opacity",.7)}function Sg(n,e,r=50,o=10){if(r<=0)return[];const a=(e-n)/(r-1),l=[];for(let c=0;c<r;c++){const d=n+c*a;l.push(Math.pow(o,d))}return l}function fu(n,e){const{height:r,width:o,margin:a,xAxisLabel:l,yAxisLabel:c,compact:d}=e;d||(n.append("text").attr("class","x-axis-label").attr("font-weight",500).attr("text-anchor","middle").attr("x",o/2).attr("y",r+a.bottom-5).text(l??"Value Range"),n.append("text").attr("class","y-axis-label").attr("font-weight",500).attr("text-anchor","middle").attr("x",-r/2).attr("y",-a.left+15).attr("transform","rotate(-90)").text(c??"Frequency"))}function mu(n,e,r){const{threshold:o}=r;o&&n.append("line").attr("x1",e.x(o)).attr("x2",e.x(o)).attr("y1",0).attr("y2",r.height).style("stroke","#F05670").style("stroke-width","1").style("stroke-dasharray","7.4 3.2")}function hu(n){return n.map(e=>"from"in e?{x0:e.from,x1:e.to,length:e.weight}:{x0:e.x0,x1:e.x1,length:e.length})}const gu=(n,e)=>n.append("g").style("font-size","14px").style("font-weight","500").attr("transform",`translate(0,${e})`),yu=n=>n.append("g").style("font-size","14px").style("font-weight","500"),bu=(n,e)=>su().domain([0,Jl(n,r=>r.length)]).range([e,0]);function eA(n,e,r){const{width:o,height:a,nBins:l=10}=e,c=du(n,e),d=Fd(r),u=Jl(r),f=su().domain([d,u]).range([0,o]),m=hu(bh().domain(f.domain()).thresholds(f.ticks(l))(r)),g=bu(m,a);pu(c,e,{x:f,y:g},y=>y.ticks(6)),uu(c,m,e,{x:f,y:g}),mu(c,{x:f,y:g},e),gu(c,a).call(ql(f).tickSize(0)),yu(c).call(Ql(g).tickSize(0)),fu(c,e)}function tA(n,e,r){const{width:o,height:a,nBins:l=10}=e,c=du(n,e),d=Fd(r),u=Jl(r),f=cu().domain([d,u]).range([0,o]).nice(),m=C=>{const N=[];for(let T=0;T<=C;T++)N.push(Number(f.invert(o*(T/C)).toFixed(2)));return N},g=hu(bh().domain(f.domain()).thresholds(m(l))(r)),y=bu(g,a),_=Sg(0,Math.ceil(Math.log10(u)),6);pu(c,e,{x:f,y},C=>C.tickValues(_)),uu(c,g,e,{x:f,y}),mu(c,{x:f,y},e),gu(c,a).call(ql(f).tickValues(_).tickSize(0)),yu(c).call(Ql(y).tickSize(0)),fu(c,e)}function nA(n,e,r){const{width:o,height:a}=e,l=du(n,e),c=hu(r),d=Fd(c,y=>y.x0),u=Jl(c,y=>y.x1),f=cu().domain([d,u]).range([0,o]).nice(),m=bu(c,a),g=Sg(0,Math.ceil(Math.log10(u)),6);pu(l,e,{x:f,y:m},y=>y.tickValues(g)),uu(l,c,e,{x:f,y:m}),mu(l,{x:f,y:m},e),gu(l,a).call(ql(f).tickValues(g).tickSize(0)),yu(l).call(Ql(m).tickSize(0)),fu(l,e)}const rA=t.defineComponent({__name:"PlChartHistogram",props:{settings:{}},setup(n){const e=n,r=t.ref(),o=t.computed(()=>{const{xAxisLabel:l,yAxisLabel:c,threshold:d,compact:u,totalWidth:f=674,totalHeight:m=252}=e.settings,g=u?{top:0,right:0,bottom:0,left:0}:{top:0,right:30,bottom:40,left:85},y=f-g.left-g.right,_=m-g.top-g.bottom;return{width:y,height:_,margin:g,compact:u,nBins:"nBins"in e.settings?e.settings.nBins:10,xAxisLabel:l,yAxisLabel:c,threshold:d}}),a=()=>{const l=e.settings;if(l.type==="log-bins"){nA(r.value,o.value,l.bins);return}l.log?tA(r.value,o.value,l.numbers):eA(r.value,o.value,l.numbers)};return t.watch(e,a),t.onMounted(a),(l,c)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(l.$style.component)},[l.settings.title&&!l.settings.compact?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(l.$style.title)},t.toDisplayString(l.settings.title),3)):t.createCommentVNode("",!0),c[0]||(c[0]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"chart",ref:r},null,512)],2))}}),oA="_component_t90zs_2",aA="_title_t90zs_11",iA={component:oA,title:aA},lA={$style:iA},Eg=st(rA,[["__cssModules",lA]]),Ng=Symbol(),Vg=Symbol(),sA=["name"],cA=t.defineComponent({__name:"PlRadio",props:t.mergeModels({name:{},value:{},disabled:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=t.useModel(n,"modelValue"),r=t.createPropsRestProxy(n,["name"]),o=t.inject(Ng,n.name),a=t.inject(Vg,e);return(l,c)=>(t.openBlock(),t.createElementBlock("label",{class:t.normalizeClass(l.$style.container)},[t.withDirectives(t.createElementVNode("input",t.mergeProps({"onUpdate:modelValue":c[0]||(c[0]=d=>t.isRef(a)?a.value=d:null),class:l.$style.input,type:"radio",name:t.unref(o)},r),null,16,sA),[[t.vModelRadio,t.unref(a)]]),c[1]||(c[1]=t.createTextVNode()),t.createElementVNode("span",{class:t.normalizeClass(l.$style.label)},[t.renderSlot(l.$slots,"default")],2)],2))}}),dA="_container_1yonu_2",uA="_input_1yonu_19",pA="_label_1yonu_53",fA={container:dA,input:uA,label:pA},mA={$style:fA},Bg=st(cA,[["__cssModules",mA]]),hA=t.defineComponent({__name:"PlRadioGroup",props:t.mergeModels({name:{},options:{},keyExtractor:{type:Function}},{modelValue:{},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=t.useModel(n,"modelValue"),r=n;t.useSlots();const o=r.keyExtractor??((a,l)=>l);return t.provide(Ng,r.name),t.provide(Vg,e),(a,l)=>(t.openBlock(),t.createElementBlock("fieldset",{class:t.normalizeClass(a.$style.container)},[t.createElementVNode("legend",{class:t.normalizeClass(a.$style.label)},[t.renderSlot(a.$slots,"label")],2),l[0]||(l[0]=t.createTextVNode()),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.options,(c,d)=>(t.openBlock(),t.createBlock(Bg,{key:t.unref(o)(c.value,d),value:c.value,disabled:c.disabled},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(c.label),1)]),_:2},1032,["value","disabled"]))),128)),l[1]||(l[1]=t.createTextVNode()),t.renderSlot(a.$slots,"default")],2))}}),gA="_container_10fxa_2",yA="_label_10fxa_7",bA={container:gA,label:yA},_A={$style:bA},wA=st(hA,[["__cssModules",_A]]),Tg=["#FFF680","#E8F66C","#C4F16B","#9AEB71","#70E084","#43D18A","#2DBD96","#28A8A0","#2793A3","#337B9E","#3B6399","#424C8F","#4A3584","#481B70","#4A005C"],Rg=["#FFF680","#FFE871","#FDCD6F","#FEAD66","#FA935F","#F57258","#EB555E","#D64470","#B83778","#982D82","#7E2584","#611B84","#49187A","#38116B","#2B125C"],kA=["#DFFADC","#C9F5D3","#B3F2CF","#9AEBCD","#80DCCC","#6DC8D2","#61B7DB","#5C97DB","#5A7CD6","#6060C7","#674BB3","#693799","#6A277B","#671D60","#611347"],xA=["#FAFAB4","#ECFBA1","#D6F598","#BEEB91","#A2E082","#82D67C","#67C77E","#4FB281","#429E8C","#36898F","#2B668F","#254B85","#213475","#1E1E6B","#1C0F5C"],vA=["#FFEA80","#FFD971","#FFC171","#FFA76C","#FB8B6F","#EB7179","#D75F7F","#C2518D","#A64392","#8038A4","#6135A4","#4735A3","#283A8F","#013C70","#003752"],CA=["#FFF780","#E7FA6F","#C1FA6A","#9BF56C","#79F080","#66E698","#56D7AC","#50C7C7","#56B4D7","#6898EB","#7481FA","#8769FA","#9450EB","#9634D6","#942AAE"],SA=["#43317B","#3B57A3","#3390B3","#5DC2B1","#95DBA5","#B9EBA0","#DBF5A6","#F5F5B7","#FEEA9D","#FFD285","#FA9B78","#E55C72","#C23665","#8F1150","#5C1243"],EA=["#122B5C","#1A496B","#1D7C8F","#21A3A3","#5FC7AB","#99E0B1","#CEF0CE","#F0F0F0","#FAE6D2","#FAC5AA","#FA9282","#E55C72","#C23665","#8F1150","#5C1243"],NA=["#0E0E8F","#1D23B8","#3748E5","#647DFA","#96A7FA","#C3CCFA","#E1E5FA","#F0F0F0","#F9DBDB","#F9BDBD","#F59393","#E55C72","#C23665","#8F1150","#5C1243"],VA=["#2E5C00","#49850D","#3748E5","#8FC758","#ABDB7B","#C5EBA0","#DCF5C4","#F0F0F0","#FADCF5","#F5C4ED","#F0A3E3","#E573D2","#CC49B6","#991884","#701260"],BA=["#4A005C","#4A2F7F","#3F5895","#3181A0","#28A8A0","#3ECD8D","#86E67B","#CEF36C","#FFF680","#FED470","#FDA163","#F36C5A","#D64470","#A03080","#702084","#451777","#2B125C"],Ig={viridis:Tg,magma:Rg,density:kA,salinity:xA,sunset:vA,rainbow:CA,spectrum:SA,teal_red:EA,blue_red:NA,lime_rose:VA,viridis_magma:BA},Ag={green_light:"#99E099",green_bright:"#198020",green_dark:"#42B842",violet_light:"#C1ADFF",violet_bright:"#845CFF",violet_dark:"#5F31CC",orange_light:"#FFCB8F",orange_bright:"#FF9429",orange_dark:"#C26A27",teal_light:"#90E0E0",teal_bright:"#27C2C2",teal_dark:"#068A94",rose_light:"#FAAAFA",rose_bright:"#E553E5",rose_dark:"#A324B2",lime_light:"#CBEB67",lime_bright:"#95C700",lime_dark:"#659406",blue_light:"#99CCFF",blue_bright:"#2D93FA",blue_dark:"#105BCC",red_light:"#FFADBA",red_bright:"#F05670",red_dark:"#AD3757",grey_light:"#D3D7E0",grey_bright:"#929BAD",grey_dark:"#5E5E70"};function Ut(n,e,r,o=1){return new class{constructor(a,l,c,d=1){this.r=a,this.g=l,this.b=c,this.a=d}get hex(){const a=n.toString(16).padStart(2,"0"),l=e.toString(16).padStart(2,"0"),c=r.toString(16).padStart(2,"0"),d=Math.round(o*255).toString(16).padStart(2,"0");return`#${a}${l}${c}${d}`}get rgba(){return`rgb(${n}, ${e}, ${r}, ${o})`}toString(){return this.hex}toJSON(){return this.hex}}(n,e,r,o)}Ut.fromHex=n=>{n=n.replace("#","");let e,r,o,a=1;if(n.length===6)e=parseInt(n.slice(0,2),16),r=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);else if(n.length===8)e=parseInt(n.slice(0,2),16),r=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16),a=parseInt(n.slice(6,8),16)/255;else throw new Error("Invalid HEX color format.");return Ut(e,r,o,a)},Ut.fromString=n=>{if(n.startsWith("#"))return Ut.fromHex(n);throw Error("TODO: implement rgb(a), hsl")},Ut.categorical=n=>Ut.fromHex(Ag[n]),Ut.fromHex=n=>{n=n.replace("#","");let e,r,o,a=1;if(n.length===6)e=parseInt(n.slice(0,2),16),r=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16);else if(n.length===8)e=parseInt(n.slice(0,2),16),r=parseInt(n.slice(2,4),16),o=parseInt(n.slice(4,6),16),a=parseInt(n.slice(6,8),16)/255;else throw new Error("Invalid HEX color format.");return Ut(e,r,o,a)},Ut.fromString=n=>{if(n.startsWith("#"))return Ut.fromHex(n);throw Error("TODO: implement rgb(a), hsl")};function _u(n,e,r){return n+r*(e-n)}function Lg(n,e,r){const o=Math.round(_u(n.r,e.r,r)),a=Math.round(_u(n.g,e.g,r)),l=Math.round(_u(n.b,e.b,r));return Ut(o,a,l)}function Og(n){return typeof n=="string"?Ig[n].map(e=>Ut.fromString(e)):n.map(e=>typeof e=="string"?Ut.fromString(e):e)}function TA(n){return new class{constructor(e){this.colors=e}fromInterval(e){if(e<0)throw new Error("t must be greater than or equal to 0");if(e>1)throw new Error("t must be less than or equal to 1");const r=this.colors,o=r.length-1,a=Math.floor(e*o),l=e*o%1,c=r[a],d=r[Math.min(a+1,o)];return Lg(c,d,l)}getNthOf(e,r){if(e<=0)throw new Error("n must be greater than 0");if(e>r)throw Error("n must be lower or equal than count of segments");return this.fromInterval((e-1)/(r-1))}split(e){if(e<=0)throw new Error("n must be greater than 0");const r=[];for(let o=0;o<e;o++){const a=o/(e-1);r.push(this.fromInterval(a))}return r}}(Og(n))}const RA=t.defineComponent({__name:"ContextProvider",props:{context:{},contextKey:{}},setup(n){const e=n;return t.provide(e.contextKey,t.computed(()=>e.context)),(r,o)=>t.renderSlot(r.$slots,"default")}});function Bt(n,e,r){return e>n?e:n>r?r:n}const wu=n=>t.computed(()=>{const e=[100],{min:r,max:o,step:a}=n.value;let l=r;for(;l<o;){l+=a;const c=(1-(Bt(l,r,o)-r)/(o-r))*100;e.push(c)}return e}),IA={class:"ui-slider__wrapper"},AA={class:"ui-slider__label-section"},LA={key:0,class:"text-s"},OA={key:1,class:"ui-slider__value-static text-s"},$A={class:"ui-slider__base"},ZA={class:"ui-slider__container"},MA={class:"ui-slider__container ui-slider__container-thumb"},FA={class:"ui-slider__input-wrapper d-flex"},PA=["value"],zA={key:0,class:"ui-slider__error"},$g=t.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(n,{emit:e}){const r=t.useSlots(),o=e,a=n,l=t.reactive({deltaValue:0}),c=t.computed(()=>a.max-a.min),d=t.computed(()=>Bt((a.modelValue??0)+l.deltaValue,a.min,a.max)),u=t.ref(a.modelValue),f=t.computed(()=>{const A=a.modelValue;return Number.isFinite(A)?A<a.min?`Min value: ${a.min}`:A>a.max?`Max value: ${a.max}`:a.error:"Not a number"}),m=t.computed(()=>a),g=wu(m),y=t.computed(()=>(d.value-a.min)/c.value),_=t.computed(()=>({right:Math.ceil((1-y.value)*100)+"%"})),C=t.computed(()=>({right:`calc(${Math.ceil((1-y.value)*100)}%) `})),N=t.ref(),T=t.ref();t.watch(()=>a.modelValue,A=>{u.value=A});function $(A){const B=Bt(A,a.min,a.max);return Math.round((B+Number.EPSILON)*(1/a.step))/(1/a.step)}Lr(T,A=>{var B;vt((B=t.unref(N))==null?void 0:B.getBoundingClientRect(),P=>{const{dx:H}=A;l.deltaValue=H/P.width*c.value,u.value=$(Bt((a.modelValue??0)+l.deltaValue,a.min,a.max)),A.stop&&(o("update:modelValue",$(d.value)),l.deltaValue=0)})});function W(A){o("update:modelValue",$(A))}function E(A){W(+A.target.value)}function D(A){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(A.code)&&A.preventDefault();const B=A.code==="ArrowUp"||A.code==="ArrowRight"?a.step*1:A.code==="ArrowDown"||A.code==="ArrowLeft"?a.step*-1:0;W(a.modelValue+B)}return(A,B)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([a.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[t.createElementVNode("div",{class:t.normalizeClass([`ui-slider__mode-${a.mode}`,"ui-slider"])},[t.createElementVNode("div",IA,[t.createElementVNode("div",AA,[A.label?(t.openBlock(),t.createElementBlock("label",LA,[t.createElementVNode("span",null,t.toDisplayString(A.label),1),B[1]||(B[1]=t.createTextVNode()),t.unref(r).tooltip?(t.openBlock(),t.createBlock(t.unref(ct),{key:0,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(A.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),B[2]||(B[2]=t.createTextVNode()),a.mode==="text"?(t.openBlock(),t.createElementBlock("div",OA,t.toDisplayString(u.value)+t.toDisplayString(A.measure),1)):t.createCommentVNode("",!0)]),B[6]||(B[6]=t.createTextVNode()),t.createElementVNode("div",$A,[t.createElementVNode("div",ZA,[t.createElementVNode("div",{ref_key:"barRef",ref:N,class:"ui-slider__bar"},[t.createElementVNode("div",{class:"ui-slider__progress",style:t.normalizeStyle(_.value)},null,4)],512)]),B[5]||(B[5]=t.createTextVNode()),t.createElementVNode("div",MA,[a.breakpoints?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(g),(P,H)=>(t.openBlock(),t.createElementBlock("div",{key:H,style:t.normalizeStyle({right:`${P}%`}),class:"ui-slider__thumb-step"},null,4))),128)):t.createCommentVNode("",!0),B[4]||(B[4]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"thumbRef",ref:T,tabindex:"0",class:"ui-slider__thumb ui-slider__thumb-active",style:t.normalizeStyle(C.value),onKeydown:D},B[3]||(B[3]=[t.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),B[7]||(B[7]=t.createTextVNode()),t.createElementVNode("div",FA,[a.mode==="input"?(t.openBlock(),t.createElementBlock("input",{key:0,value:u.value,class:"ui-slider__value text-s",onChange:B[0]||(B[0]=P=>E(P))},null,40,PA)):t.createCommentVNode("",!0)])],2),B[8]||(B[8]=t.createTextVNode()),f.value?(t.openBlock(),t.createElementBlock("div",zA,t.toDisplayString(f.value),1)):t.createCommentVNode("",!0)],2))}});function DA(n,e=null,r=null){function o(d){const{scrollTop:u,scrollHeight:f,clientHeight:m}=d;if(!(f>m)||!e)return null;const g=f-u-m,y=u>e?e:0,_=g>e?m-e-y:m;return`linear-gradient(
|
|
42
42
|
to bottom,
|
|
43
43
|
transparent,
|
|
44
44
|
black ${y}px,
|
|
45
|
-
black ${
|
|
45
|
+
black ${_}px,
|
|
46
46
|
transparent 100%
|
|
47
|
-
)`}function a(d){const{scrollLeft:u,scrollWidth:
|
|
47
|
+
)`}function a(d){const{scrollLeft:u,scrollWidth:f,clientWidth:m}=d;if(!(f>m)||!r)return null;const g=f-u-m,y=u>r?r:0,_=g>r?m-r-y:m;return`linear-gradient(
|
|
48
48
|
to right,
|
|
49
49
|
transparent,
|
|
50
50
|
black ${y}px,
|
|
51
|
-
black ${
|
|
51
|
+
black ${_}px,
|
|
52
52
|
transparent 100%
|
|
53
|
-
)`}function s(){const d=n.value;if(!d)return;const u=[o(d),a(d)].filter(p=>p!==null);d.style.setProperty("-webkit-mask-image",u.join(",")),d.style.setProperty("mask-image",u.join(",")),u.length>1&&(d.style.setProperty("-webkit-mask-composite","source-in"),d.style.setProperty("mask-composite","source-in"))}const c=rd(s);t.onMounted(s),ot(window,"scroll",c,!0),ot(window,"resize",c,!0)}function hg(n,e){rh(()=>{vt(t.unref(n),r=>{oh(r,()=>e(r))})}),t.onUnmounted(()=>{vt(t.unref(n),r=>{ah(r)})})}const zr={item:"sortable__item",animate:"sortable__animate"},Ni=n=>n.getBoundingClientRect().y,mg=n=>{const{y:e,height:r}=n.getBoundingClientRect();return e+Math.ceil(r/2)},Q$=n=>{const{y:e,height:r}=n.getBoundingClientRect();return e+r};function eR(n,e){const r={item:void 0,options(){var w;return[...((w=n.value)==null?void 0:w.children)??[]]}},o=t.computed(()=>r.options()),a=e.shakeBuffer??10,s=e.reorderDelay??100;function c(w){const E=e.handle?this.querySelector(e.handle):null;E&&(E&&!E.contains(w.target)||(this.classList.remove(zr.animate),this.classList.add(zr.item),r.item={el:this,y:w.y,dy:0,orderChanged:!1}))}function d(w){const E=r.options();return E.slice(0,E.indexOf(w))}function u(w){const E=r.options();return E.slice(E.indexOf(w)+1)}function p(w,E){const N=r.options().filter(D=>D!==E),V=N.indexOf(w);return N.splice(V,0,E),N}function h(w,E){const N=r.options().filter(D=>D!==E),V=N.indexOf(w);return N.splice(V+1,0,E),N}function g(w,E){w.dy=E-w.y,w.el.style.setProperty("transform",`translateY(${w.dy}px)`)}function y(w){var E;if(!r.item)return;const{el:N}=r.item;if(!N.isConnected){r.item=void 0;return}const V=w.map(B=>Ni(B)),D=Ni(N);(E=n.value)==null||E.replaceChildren(...w);const F=Ni(N),$=w.map(B=>Ni(B)),W=[];for(let B=0;B<$.length;B++){const z=w[B];if(z===r.item.el)continue;const q=$[B],C=V[B]-q;z.style.transform=`translateY(${C}px)`,W.push(z)}const R=F-D;r.item.y=r.item.y+R,r.item.dy=r.item.dy-R,r.item.orderChanged=!0,r.item.el.style.setProperty("transform",`translateY(${r.item.dy}px)`),W.forEach(B=>B.classList.remove(zr.animate)),requestAnimationFrame(function(){W.forEach(B=>{B.classList.add(zr.animate),B.style.transform="",B.addEventListener("transitionend",()=>{B.classList.remove(zr.animate)})})})}ot(window,"mousemove",w=>{if(!r.item)return;const{el:E}=r.item;g(r.item,w.y);const N=Ni(r.item.el),V=Q$(r.item.el),D=d(E),F=u(E);D.forEach($=>{const W=mg($);N+a<W&&y(p($,E))}),F.forEach($=>{const W=mg($);V-a>W&&y(h($,E))})}),ot(window,"mouseup",()=>{if(!r.item)return;const{el:w,orderChanged:E}=r.item;w.classList.add(zr.animate),w.style.removeProperty("transform"),w.addEventListener("transitionend",()=>{w.classList.remove(zr.animate,zr.item)}),setTimeout(()=>{if(!E)return;const N=r.options().map(D=>Number(D.getAttribute("data-index"))),V=n.value;if(V){for(const D of r.options())V.removeChild(D);o.value.forEach(D=>{V.appendChild(D)})}e.onChange(N)},s),r.item=void 0}),t.watchEffect(()=>{o.value.forEach((w,E)=>{w.removeEventListener("mousedown",c),w.addEventListener("mousedown",c),w.setAttribute("data-index",String(E))})})}const Ur={item:"sortable__item",animate:"sortable__animate"},Bi=n=>n.getBoundingClientRect().y,gg=n=>{const{y:e,height:r}=n.getBoundingClientRect();return e+Math.ceil(r/2)},tR=n=>{const{y:e,height:r}=n.getBoundingClientRect();return e+r};function yg(n,e){const r={item:void 0,options(){var E;return[...((E=n.value)==null?void 0:E.children)??[]]}};let o=0;t.watch(()=>n.value,()=>{setTimeout(()=>{n.value&&(n.value.scrollTop=o)},0)});const a=t.computed(()=>r.options()),s=e.shakeBuffer??10,c=e.reorderDelay??100;function d(E){var N;const V=e.handle?this.querySelector(e.handle):null;V&&(V&&!V.contains(E.target)||(this.classList.remove(Ur.animate),this.classList.add(Ur.item),r.item={el:this,y:E.y,dy:0,initialScrollTop:((N=n.value)==null?void 0:N.scrollTop)||0,orderChanged:!1}))}function u(E){const N=r.options();return N.slice(0,N.indexOf(E))}function p(E){const N=r.options();return N.slice(N.indexOf(E)+1)}function h(E,N){const V=r.options().filter(F=>F!==N),D=V.indexOf(E);return V.splice(D,0,N),V}function g(E,N){const V=r.options().filter(F=>F!==N),D=V.indexOf(E);return V.splice(D+1,0,N),V}function y(E,N){var V;const D=(((V=n.value)==null?void 0:V.scrollTop)||0)-(E.initialScrollTop||0);E.dy=N-E.y+D,E.el.style.setProperty("transform",`translateY(${E.dy}px)`)}function w(E){var N;if(!r.item)return;const{el:V}=r.item;if(!V.isConnected){r.item=void 0;return}const D=E.map(z=>Bi(z)),F=Bi(V);(N=n.value)==null||N.replaceChildren(...E);const $=Bi(V),W=E.map(z=>Bi(z)),R=[];for(let z=0;z<W.length;z++){const q=E[z];if(q===r.item.el)continue;const C=W[z],A=D[z]-C;q.style.transform=`translateY(${A}px)`,R.push(q)}const B=$-F;r.item.y=r.item.y+B,r.item.dy=r.item.dy-B,r.item.orderChanged=!0,r.item.el.style.setProperty("transform",`translateY(${r.item.dy}px)`),R.forEach(z=>z.classList.remove(Ur.animate)),requestAnimationFrame(function(){R.forEach(z=>{z.classList.add(Ur.animate),z.style.transform="",z.addEventListener("transitionend",()=>{z.classList.remove(Ur.animate)})})})}ot(window,"mousemove",E=>{if(!r.item)return;const{el:N}=r.item;y(r.item,E.y);const V=Bi(r.item.el),D=tR(r.item.el),F=u(N),$=p(N);if(F.forEach(W=>{const R=gg(W);V+s<R&&w(h(W,N))}),$.forEach(W=>{const R=gg(W);D-s>R&&w(g(W,N))}),n.value){const W=n.value.getBoundingClientRect(),R=W.top+N.getBoundingClientRect().height/2;E.clientY<R&&(n.value.scrollTop+=E.clientY-R);const B=W.bottom-N.getBoundingClientRect().height/2;E.clientY>B&&(n.value.scrollTop+=E.clientY-B)}}),ot(window,"mouseup",()=>{var E;if(!r.item)return;o=((E=n.value)==null?void 0:E.scrollTop)||0;const{el:N,orderChanged:V}=r.item;N.classList.add(Ur.animate),N.style.removeProperty("transform"),N.addEventListener("transitionend",()=>{N.classList.remove(Ur.animate,Ur.item)}),setTimeout(()=>{if(!V)return;const D=r.options().map($=>Number($.getAttribute("data-index"))),F=n.value;if(F){for(const $ of r.options())F.removeChild($);a.value.forEach($=>{F.appendChild($)})}e.onChange(D)},c),r.item=void 0}),t.watchEffect(()=>{a.value.forEach((E,N)=>{E.removeEventListener("mousedown",d),E.addEventListener("mousedown",d),E.setAttribute("data-index",String(N))})})}function nR(n,e){let r;t.onMounted(()=>{r=setInterval(n,e)}),t.onUnmounted(()=>clearInterval(r))}function rR(n,e,r){const o=t.reactive({data:Kc.deepClone(e(n.value)),changed:!1});return t.watch(()=>o.data,a=>{o.changed?r(Kc.deepClone(a)):o.changed=!0},{deep:!0}),t.watch(n,a=>{Object.assign(o,{data:Kc.deepClone(e(a)),changed:!1})},{deep:!0,immediate:!0}),o}function oR(n){const e=t.reactive({isLoading:!1,result:void 0,error:void 0,async run(...r){this.isLoading=!0,this.error=void 0;try{this.result=await n(...r)}catch(o){this.error=o}finally{this.isLoading=!1}},debounce(r,o=1e3){return Ip(()=>{const a=r();this.run(...a).catch(console.error)},o)}});return e.run=e.run.bind(e),e}function aR(n,e){function r(c,d){const u=t.unref(n);if(!u)return;const p=`translate(${d.x-c.x}px, ${d.y-c.y}px)`;u.style.setProperty("transform",p),e(d)}function o(c){const d=u=>r(c,u);document.addEventListener("mousemove",d),document.addEventListener("mouseup",()=>{const u=t.unref(n);document.removeEventListener("mousemove",d),u&&(u.style.setProperty("transition","all .3s ease-in-out"),u.style.removeProperty("transform"),u.addEventListener("transitionend",()=>{u.style.removeProperty("transition")}))},{once:!0})}function a(){var c;(c=t.unref(n))==null||c.addEventListener("mousedown",o)}function s(){var c;(c=t.unref(n))==null||c.removeEventListener("mousedown",o)}t.onMounted(a),t.onUnmounted(s)}function iR(n){return t.computed(n)}const sR={class:"ui-slider__wrapper"},lR={class:"ui-slider__label-section"},cR={key:0,class:"text-s"},dR={class:"ui-slider__base"},uR={class:"ui-slider__container"},fR={class:"ui-slider__container ui-slider__container-thumb"},pR=["data-percent"],hR=["data-percent"],mR=["data-percent"],gR={key:0,class:"ui-slider__error"},yR=t.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(n,{emit:e}){const r=t.useSlots(),o=e,a=n,s=t.reactive({deltaValue1:0,deltaValue2:0,deltaValue3:0}),c=t.ref(),d=t.ref(),u=t.ref(),p=t.ref(),h=t.computed(()=>a.max-a.min),g=t.computed(()=>a),y=ou(g),w=t.computed(()=>Vt((a.modelValue[0]??0)+s.deltaValue1,a.min,a.max)),E=t.computed(()=>Vt((a.modelValue[1]??0)+s.deltaValue2,a.min,a.max)),N=t.computed(()=>Vt((a.modelValue[2]??0)+s.deltaValue3,a.min,a.max)),V=t.computed(()=>{const M=a.modelValue;if(!(Array.isArray(M)&&M.length===3&&M.every(j=>Number.isFinite(j))))return"Expected model [number, number, number]";const U=[];return[...a.modelValue].forEach(j=>{j>a.max&&U.push(`Max model value must be lower than max props ${a.max}.`),j<a.min&&U.push("Min model value must be greater than max props.")}),U.length>0?U.join(" "):a.error}),D=t.computed(()=>(w.value-a.min)/h.value),F=t.computed(()=>(E.value-a.min)/h.value),$=t.computed(()=>(N.value-a.min)/h.value),W=t.computed(()=>A()),R=t.computed(()=>({right:W.value[0]+"%",left:100-W.value[2]+"%"})),B=t.computed(()=>({right:Math.ceil((1-D.value)*100)+"%"})),z=t.computed(()=>({right:Math.ceil((1-F.value)*100)+"%"})),q=t.computed(()=>({right:Math.ceil((1-$.value)*100)+"%"}));Tr(d,M=>{var U;vt((U=t.unref(c))==null?void 0:U.getBoundingClientRect(),j=>{const{dx:G}=M;s.deltaValue1=G/j.width*h.value,d.value&&C(d.value,a.modelValue[0],s.deltaValue1),M.stop&&(O([v(w.value),v(E.value),v(N.value)]),s.deltaValue1=0)})}),Tr(u,M=>{var U;vt((U=t.unref(c))==null?void 0:U.getBoundingClientRect(),j=>{const{dx:G}=M;s.deltaValue2=G/j.width*h.value,u.value&&C(u.value,a.modelValue[1],s.deltaValue2),M.stop&&(O([v(w.value),v(E.value),v(N.value)]),s.deltaValue2=0)})}),Tr(p,M=>{var U;vt((U=t.unref(c))==null?void 0:U.getBoundingClientRect(),j=>{const{dx:G}=M;s.deltaValue3=G/j.width*h.value,p.value&&C(p.value,a.modelValue[2],s.deltaValue3),M.stop&&(O([v(w.value),v(E.value),v(N.value)]),s.deltaValue3=0)})});function C(M,U,j){const G=v(Vt((U??0)+j,a.min,a.max));M.dataset.percent=`${G}${a.measure}`,S()}function A(){const M=Math.ceil((1-D.value)*100),U=Math.ceil((1-F.value)*100),j=Math.ceil((1-$.value)*100);return[M,U,j].sort((G,ee)=>G-ee)}function v(M){const U=Vt(M,a.min,a.max);return Math.round((U+Number.EPSILON)*(1/a.step))/(1/a.step)}function O(M){o("update:modelValue",M)}function S(){const M=Number(B.value.right.substring(0,B.value.right.length-1)),U=Number(z.value.right.substring(0,z.value.right.length-1)),j=Number(q.value.right.substring(0,q.value.right.length-1)),G=[{r:M,th:d},{r:U,th:u},{r:j,th:p}].sort((ee,ue)=>ee.r-ue.r);G[0].th.value&&(G[0].th.value.dataset.hint="high"),G[1].th.value&&(G[1].th.value.dataset.hint="mid"),G[2].th.value&&(G[2].th.value.dataset.hint="low")}function k(M,U){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(M.code)&&M.preventDefault();const j=M.code==="ArrowUp"||M.code==="ArrowRight"?a.step*1:M.code==="ArrowDown"||M.code==="ArrowLeft"?a.step*-1:0,G=[...a.modelValue];G[U]=Vt(G[U]+j,a.min,a.max),O(G),S()}return t.onMounted(()=>{S()}),(M,U)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([a.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope ui-slider__triple"])},[t.createElementVNode("div",{class:t.normalizeClass([`ui-slider__mode-${a.mode}`,"ui-slider"])},[t.createElementVNode("div",sR,[t.createElementVNode("div",lR,[M.label?(t.openBlock(),t.createElementBlock("label",cR,[t.createElementVNode("span",null,t.toDisplayString(M.label),1),U[3]||(U[3]=t.createTextVNode()),t.unref(r).tooltip?(t.openBlock(),t.createBlock(t.unref(dt),{key:0,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(M.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)]),U[11]||(U[11]=t.createTextVNode()),t.createElementVNode("div",dR,[t.createElementVNode("div",uR,[t.createElementVNode("div",{ref_key:"barRef",ref:c,class:"ui-slider__bar"},[t.createElementVNode("div",{class:"ui-slider__progress",style:t.normalizeStyle(R.value)},null,4)],512)]),U[10]||(U[10]=t.createTextVNode()),t.createElementVNode("div",fR,[a.breakpoints?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(y),(j,G)=>(t.openBlock(),t.createElementBlock("div",{key:G,style:t.normalizeStyle({right:`${j}%`}),class:"ui-slider__thumb-step"},null,4))),128)):t.createCommentVNode("",!0),U[7]||(U[7]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"thumbRef1",ref:d,style:t.normalizeStyle(B.value),"data-percent":a.modelValue[0]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r1:"",tabindex:"0",onKeydown:U[0]||(U[0]=j=>k(j,0))},U[4]||(U[4]=[t.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,pR),U[8]||(U[8]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"thumbRef2",ref:u,style:t.normalizeStyle(z.value),"data-percent":a.modelValue[1]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r2:"",tabindex:"0",onKeydown:U[1]||(U[1]=j=>k(j,1))},U[5]||(U[5]=[t.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,hR),U[9]||(U[9]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"thumbRef3",ref:p,style:t.normalizeStyle(q.value),"data-percent":a.modelValue[2]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r3:"",tabindex:"0",onKeydown:U[2]||(U[2]=j=>k(j,2))},U[6]||(U[6]=[t.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,mR)])])]),U[12]||(U[12]=t.createTextVNode()),U[13]||(U[13]=t.createElementVNode("div",{class:"ui-slider__input-wrapper d-flex"},null,-1))],2),U[14]||(U[14]=t.createTextVNode()),V.value?(t.openBlock(),t.createElementBlock("div",gR,t.toDisplayString(V.value),1)):t.createCommentVNode("",!0)],2))}}),_R={class:"ui-input-range__separator"},wR=t.defineComponent({__name:"InputRange",props:{modelValue:{},separator:{default:"-"}},emits:["update:modelValue","change"],setup(n,{emit:e}){const r=n,o=e,a=t.reactive({left:r.modelValue[0],right:r.modelValue[1]}),s=t.ref(!1),c=t.computed(()=>(s.value,"ui-input-range-focused")),d=t.computed({get(){return{left:Math.min(...r.modelValue),right:Math.max(...r.modelValue)}},set(){}});t.watch(()=>d.value,h=>(a.left=h.left)&&(a.right=h.right));function u(){o("update:modelValue",[+a.left,+a.right]),o("change",[+a.left,+a.right])}function p(h,g){const y=g.target.value;/^[0-9]{0,2}$/.test(y)?h?a.left=+y:a.right=+y:h?a.left=+y.slice(0,y.length-1):a.right=+y.slice(0,y.length-1)}return(h,g)=>(t.openBlock(),t.createElementBlock("div",t.mergeProps({class:[c.value,"ui-input-range"]},h.$attrs),[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":g[0]||(g[0]=y=>d.value.left=y),class:"text-s",type:"text",onChange:u,onFocus:g[1]||(g[1]=y=>s.value=!0),onFocusout:g[2]||(g[2]=y=>s.value=!1),onInput:g[3]||(g[3]=y=>p(!0,y))},null,544),[[t.vModelText,d.value.left]]),g[8]||(g[8]=t.createTextVNode()),t.createElementVNode("div",_R,t.toDisplayString(r.separator),1),g[9]||(g[9]=t.createTextVNode()),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":g[4]||(g[4]=y=>d.value.right=y),class:"text-s",type:"text",onChange:u,onFocus:g[5]||(g[5]=y=>s.value=!0),onFocusout:g[6]||(g[6]=y=>s.value=!1),onInput:g[7]||(g[7]=y=>p(!1,y))},null,544),[[t.vModelText,d.value.right]])],16))}}),bR={class:"ui-slider__wrapper"},kR={class:"ui-slider__label-section"},xR={key:0,class:"text-s"},vR={key:1,class:"ui-slider__value-static text-s"},CR={class:"ui-slider__base"},ER={class:"ui-slider__container"},SR={class:"ui-slider__container ui-slider__container-thumb"},NR={class:"ui-slider__input-wrapper d-flex"},BR={key:0,class:"ui-slider__error"},VR=t.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(n,{emit:e}){const r=t.useSlots(),o=e,a=n,s=t.reactive({deltaValue1:0,deltaValue2:0}),c=t.ref(),d=t.ref(),u=t.ref(),p=t.ref(a.modelValue),h=t.ref(a.modelValue[0]),g=t.ref(a.modelValue[1]),y=t.computed(()=>a),w=ou(y),E=t.computed(()=>[h.value,g.value].sort((S,k)=>S-k).join("-")),N=t.computed(()=>a.max-a.min),V=t.computed(()=>Vt((a.modelValue[0]??0)+s.deltaValue1,a.min,a.max)),D=t.computed(()=>Vt((a.modelValue[1]??0)+s.deltaValue2,a.min,a.max)),F=t.computed(()=>{const S=a.modelValue;return Array.isArray(S)&&S.length===2&&S.every(k=>Number.isFinite(k))?a.error:"Expected model [number, number]"}),$=t.computed(()=>(V.value-a.min)/N.value),W=t.computed(()=>(D.value-a.min)/N.value),R=t.computed(()=>C()),B=t.computed(()=>({right:R.value[0]+"%",left:100-R.value[1]+"%"})),z=t.computed(()=>({right:Math.ceil((1-$.value)*100)+"%"})),q=t.computed(()=>({right:Math.ceil((1-W.value)*100)+"%"}));t.watch(()=>a.modelValue,S=>{p.value=S,h.value=+S[0],g.value=+S[1]},{immediate:!0}),Tr(d,S=>{var k;vt((k=t.unref(c))==null?void 0:k.getBoundingClientRect(),M=>{const{dx:U}=S;s.deltaValue1=U/M.width*N.value,h.value=A(Vt((a.modelValue[0]??0)+s.deltaValue1,a.min,a.max)),p.value=[h.value,g.value].sort((j,G)=>j-G),S.stop&&(v([A(V.value),A(D.value)]),s.deltaValue1=0)})}),Tr(u,S=>{var k;vt((k=t.unref(c))==null?void 0:k.getBoundingClientRect(),M=>{const{dx:U}=S;s.deltaValue2=U/M.width*N.value,g.value=A(Vt((a.modelValue[1]??0)+s.deltaValue2,a.min,a.max)),p.value=[h.value,g.value].sort((j,G)=>j-G),S.stop&&(v([A(V.value),A(D.value)]),s.deltaValue2=0)})});function C(){const S=Math.ceil((1-$.value)*100),k=Math.ceil((1-W.value)*100);return[S,k].sort((M,U)=>M-U)}function A(S){const k=Vt(S,a.min,a.max);return Math.round((k+Number.EPSILON)*(1/a.step))/(1/a.step)}function v(S){o("update:modelValue",S)}function O(S,k){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(S.code)&&S.preventDefault();const M=S.code==="ArrowUp"||S.code==="ArrowRight"?a.step*1:S.code==="ArrowDown"||S.code==="ArrowLeft"?a.step*-1:0,U=[...a.modelValue];U[k]=Vt(U[k]+M,a.min,a.max),v(U)}return(S,k)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([a.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[t.createElementVNode("div",{class:t.normalizeClass([`ui-slider__mode-${a.mode}`,"ui-slider"])},[t.createElementVNode("div",bR,[t.createElementVNode("div",kR,[S.label?(t.openBlock(),t.createElementBlock("label",xR,[t.createElementVNode("span",null,t.toDisplayString(S.label),1),k[3]||(k[3]=t.createTextVNode()),t.unref(r).tooltip?(t.openBlock(),t.createBlock(t.unref(dt),{key:0,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(S.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),k[4]||(k[4]=t.createTextVNode()),a.mode==="text"?(t.openBlock(),t.createElementBlock("div",vR,t.toDisplayString(E.value),1)):t.createCommentVNode("",!0)]),k[10]||(k[10]=t.createTextVNode()),t.createElementVNode("div",CR,[t.createElementVNode("div",ER,[t.createElementVNode("div",{ref_key:"barRef",ref:c,class:"ui-slider__bar"},[t.createElementVNode("div",{class:"ui-slider__progress",style:t.normalizeStyle(B.value)},null,4)],512)]),k[9]||(k[9]=t.createTextVNode()),t.createElementVNode("div",SR,[a.breakpoints?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(w),(M,U)=>(t.openBlock(),t.createElementBlock("div",{key:U,style:t.normalizeStyle({right:`${M}%`}),class:"ui-slider__thumb-step"},null,4))),128)):t.createCommentVNode("",!0),k[7]||(k[7]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"thumbRef1",ref:d,style:t.normalizeStyle(z.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:k[0]||(k[0]=M=>O(M,0))},k[5]||(k[5]=[t.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36),k[8]||(k[8]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"thumbRef2",ref:u,style:t.normalizeStyle(q.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:k[1]||(k[1]=M=>O(M,1))},k[6]||(k[6]=[t.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),k[11]||(k[11]=t.createTextVNode()),t.createElementVNode("div",NR,[a.mode==="input"?(t.openBlock(),t.createBlock(wR,{key:0,modelValue:p.value,"onUpdate:modelValue":k[2]||(k[2]=M=>p.value=M),class:"ui-focused-border",onChange:v},null,8,["modelValue"])):t.createCommentVNode("",!0)])],2),k[12]||(k[12]=t.createTextVNode()),F.value?(t.openBlock(),t.createElementBlock("div",BR,t.toDisplayString(F.value),1)):t.createCommentVNode("",!0)],2))}}),TR=t.defineComponent({__name:"VScroll",props:{scrollTop:{},clientHeight:{},scrollHeight:{}},emits:["update:scrollTop"],setup(n,{emit:e}){const r=e,o=n,a=t.ref(),s=t.computed(()=>o.clientHeight/(o.scrollHeight||1)),c=t.computed(()=>s.value<1),d=t.computed(()=>{const u=t.unref(s);return{top:o.scrollTop*u+"px",height:Math.floor(o.clientHeight*u)+"px"}});return ot(a,"pointerdown",u=>{const p={clientY:u.clientY},h=ld(document,"mousemove",g=>{const y=(g.clientY-p.clientY)/s.value;r("update:scrollTop",o.scrollTop+y),p.clientY=g.clientY});["mouseup","pointercancel"].forEach(g=>{document.addEventListener(g,h,{once:!0})})}),(u,p)=>c.value?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:a,class:"v-scroll"},[t.createElementVNode("div",{class:"v-scroll__scrollbar",style:t.normalizeStyle(d.value)},null,4)],512)):t.createCommentVNode("",!0)}}),AR=t.defineComponent({__name:"HScroll",props:{scrollLeft:{},clientWidth:{},scrollWidth:{}},emits:["update:scrollLeft"],setup(n,{emit:e}){const r=e,o=n,a=t.ref(),s=t.computed(()=>o.clientWidth/(o.scrollWidth||1)),c=t.computed(()=>s.value<1),d=t.computed(()=>{const u=t.unref(s);return{left:o.scrollLeft*u+"px",width:Math.floor(o.clientWidth*u)+"px"}});return ot(a,"pointerdown",u=>{const p={clientX:u.clientX},h=ld(document,"mousemove",g=>{const y=(g.clientX-p.clientX)/s.value;r("update:scrollLeft",o.scrollLeft+y),p.clientX=g.clientX});["mouseup","pointercancel"].forEach(g=>{document.addEventListener(g,h,{once:!0})})}),(u,p)=>c.value?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:a,class:"h-scroll"},[t.createElementVNode("div",{class:"h-scroll__scrollbar",style:t.normalizeStyle(d.value)},null,4)],512)):t.createCommentVNode("",!0)}}),$R={class:"ui-scrollable"},RR=t.defineComponent({__name:"Scrollable",setup(n){const e=t.ref(),r=t.reactive({scrollTop:0,scrollLeft:0,clientHeight:0,clientWidth:0,scrollHeight:0,scrollWidth:0});function o(d){Mx(r,d,"scrollTop","scrollLeft","clientHeight","clientWidth","scrollHeight","scrollWidth")}const a=d=>{d.preventDefault();const u=d.currentTarget;u.scrollTop+=d.deltaY,u.scrollLeft+=d.deltaX,o(u)};function s(d){vt(t.unref(e),u=>{u.scrollTop=d,o(u)})}function c(d){vt(t.unref(e),u=>{u.scrollLeft=d,o(u)})}return hg(e,d=>{vt(d,u=>o(u))}),t.onMounted(()=>{vt(t.unref(e),d=>{o(d),d.addEventListener("wheel",a)})}),t.onUnmounted(()=>{vt(t.unref(e),d=>d.removeEventListener("wheel",a))}),(d,u)=>(t.openBlock(),t.createElementBlock("div",$R,[t.createElementVNode("div",{ref_key:"containerRef",ref:e,class:"ui-scrollable__container",onWheel:a},[t.renderSlot(d.$slots,"default")],544),u[2]||(u[2]=t.createTextVNode()),t.createVNode(TR,{"scroll-top":r.scrollTop,"client-height":r.clientHeight,"scroll-height":r.scrollHeight,onWheel:u[0]||(u[0]=t.withModifiers(()=>{},["stop"])),"onUpdate:scrollTop":s},null,8,["scroll-top","client-height","scroll-height"]),u[3]||(u[3]=t.createTextVNode()),t.createVNode(AR,{"scroll-left":r.scrollLeft,"client-width":r.clientWidth,"scroll-width":r.scrollWidth,onWheel:u[1]||(u[1]=t.withModifiers(()=>{},["stop"])),"onUpdate:scrollLeft":c},null,8,["scroll-left","client-width","scroll-width"])]))}}),OR="add.svg",IR="box.svg",DR="calendar.svg",MR="checkmark.svg",PR="clipboard.svg",LR="close.svg",FR="copy.svg",zR="download.svg",UR="duplicate.svg",jR="edit.svg",ZR="error.svg",WR="filter.svg",HR="help.svg",qR="info.svg",GR="link.svg",KR="loading.svg",XR="lock.svg",YR="maximize.svg",JR="minimize.svg",QR="minus.svg",eO="more.svg",tO="open.svg",nO="pause.svg",rO="play.svg",oO="progress.svg",aO="renew.svg",iO="restart.svg",sO="reverse.svg",lO="settings.svg",cO="sort.svg",dO="stop.svg",uO="success.svg",fO="time.svg",pO="tune.svg",hO="warning.svg",mO="zip.svg",gO={add:OR,"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:IR,calendar:DR,"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-subset":"cell-type-subset.svg","cell-type-txt":"cell-type-txt.svg",checkmark:MR,"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:PR,close:LR,copy:FR,"data-dimentions":"data-dimentions.svg","delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg",download:zR,"drag-dots":"drag-dots.svg",duplicate:UR,edit:jR,error:ZR,export:"export.svg","filter-on":"filter-on.svg",filter:WR,"help-outline":"help-outline.svg",help:HR,"info-outline":"info-outline.svg",info:qR,"jump-link":"jump-link.svg",link:GR,loading:KR,lock:XR,maximize:YR,minimize:JR,minus:QR,more:eO,open:tO,"paper-clip":"paper-clip.svg",pause:nO,play:rO,progress:oO,renew:aO,restart:iO,reverse:sO,settings:lO,sort:cO,stop:dO,success:uO,time:fO,tune:pO,warning:hO,"x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:mO},yO="add.svg",_O="annotate.svg",wO="annotation.svg",bO="area.svg",kO="axes.svg",xO="bar.svg",vO="bindot.svg",CO="box.svg",EO="boxplot.svg",SO="bubble.svg",NO="calendar.svg",BO="canvas.svg",VO="checkbox.svg",TO="checkmark.svg",AO="clipboard.svg",$O="close.svg",RO="cluster.svg",OO="code.svg",IO="color.svg",DO="columns.svg",MO="container.svg",PO="cookie.svg",LO="copy.svg",FO="cpu.svg",zO="debug.svg",UO="dna.svg",jO="download.svg",ZO="duplicate.svg",WO="edit.svg",HO="error.svg",qO="filter.svg",GO="generate.svg",KO="graph.svg",XO="heatmap.svg",YO="help.svg",JO="info.svg",QO="jitter.svg",eI="lasso.svg",tI="layers.svg",nI="learn.svg",rI="legend.svg",oI="line.svg",aI="link.svg",iI="loading.svg",sI="lock.svg",lI="maximize.svg",cI="menu.svg",dI="minimize.svg",uI="minus.svg",fI="monetization.svg",pI="more.svg",hI="pause.svg",mI="pin.svg",gI="play.svg",yI="product.svg",_I="progress.svg",wI="publications.svg",bI="renew.svg",kI="restart.svg",xI="reverse.svg",vI="search.svg",CI="server.svg",EI="settings.svg",SI="sina.svg",NI="skatterplot.svg",BI="slice.svg",VI="sort.svg",TI="statistics.svg",AI="stop.svg",$I="success.svg",RI="table.svg",OI="template.svg",II="terminal.svg",DI="time.svg",MI="tune.svg",PI="venn.svg",LI="violin.svg",FI="warning.svg",zI="wetlab.svg",UI="zip.svg",jI={"add-layer":"add-layer.svg",add:yO,"align-center":"align-center.svg","align-left":"align-left.svg","align-right":"align-right.svg",annotate:_O,annotation:wO,area:bO,"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:kO,"bar-cross":"bar-cross.svg","bar-error":"bar-error.svg","bar-stacked":"bar-stacked.svg","bar-trend":"bar-trend.svg",bar:xO,bindot:vO,box:CO,"boxplot-binned":"boxplot-binned.svg","boxplot-jitter":"boxplot-jitter.svg","boxplot-notched":"boxplot-notched.svg",boxplot:EO,bubble:SO,calendar:NO,canvas:BO,"cell-type-num":"cell-type-num.svg","cell-type-subset":"cell-type-subset.svg","cell-type-txt":"cell-type-txt.svg","checkbox-checked":"checkbox-checked.svg","checkbox-intermediate":"checkbox-intermediate.svg",checkbox:VO,checkmark:TO,"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:AO,close:$O,"cloud-download":"cloud-download.svg","cloud-offline":"cloud-offline.svg","cloud-online":"cloud-online.svg","cloud-upload":"cloud-upload.svg",cluster:RO,code:OO,"color-fill":"color-fill.svg","color-none":"color-none.svg","color-stroke":"color-stroke.svg",color:IO,columns:DO,"connected-points":"connected-points.svg",container:MO,cookie:PO,copy:LO,cpu:FO,"data-dimentions":"data-dimentions.svg",debug:zO,"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:UO,download:jO,"drag-dots":"drag-dots.svg","drag-horizontal":"drag-horizontal.svg","drag-vertical":"drag-vertical.svg",duplicate:ZO,edit:WO,"error-bar":"error-bar.svg",error:HO,"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:qO,"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:GO,graph:KO,heatmap:XO,"help-outline":"help-outline.svg",help:YO,"info-outline":"info-outline.svg",info:JO,jitter:QO,"jump-link":"jump-link.svg",lasso:eI,layers:tI,learn:nI,"legend-box-dot":"legend-box-dot.svg","legend-box":"legend-box.svg",legend:rI,"line-binned":"line-binned.svg","line-error":"line-error.svg","line-jitter":"line-jitter.svg",line:oI,"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:aI,loading:iI,lock:sI,maximize:lI,menu:cI,minimize:dI,minus:uI,"monetization-off":"monetization-off.svg","monetization-on":"monetization-on.svg",monetization:fI,more:pI,"paper-clip":"paper-clip.svg",pause:hI,pin:mI,play:gI,"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:yI,progress:_I,publications:wI,"radio-button-checked":"radio-button-checked.svg","radio-button":"radio-button.svg",renew:bI,restart:kI,reverse:xI,"rotation-0":"rotation-0.svg","rotation-45":"rotation-45.svg","rotation-90":"rotation-90.svg",search:vI,"server-on":"server-on.svg",server:CI,settings:EI,sina:SI,skatterplot:NI,slice:BI,"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:VI,statistics:TI,stop:AI,"strip-plot":"strip-plot.svg",success:$I,"table-add":"table-add.svg","table-alias":"table-alias.svg","table-import":"table-import.svg",table:RI,template:OI,terminal:II,"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:DI,tune:MI,venn:PI,"view-hide":"view-hide.svg","view-show":"view-show.svg","violin-binned":"violin-binned.svg","violin-jitter":"violin-jitter.svg",violin:LI,warning:FI,wetlab:zI,"windows-collapse":"windows-collapse.svg","windows-expand":"windows-expand.svg","x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:UI,"zoom-in":"zoom-in.svg","zoom-out":"zoom-out.svg"};function ZI(){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 WI=["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-subset","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","progress","renew","restart","reverse","settings","sort","stop","success","time","tune","warning","x-axis","y-axis","zip"],HI=["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-subset","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","monetization-off","monetization-on","monetization","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","progress","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"],qI={allCssVariables:ZI(),icons16:gO,icons24:jI},GI={class:"block__not-found"},KI=t.defineComponent({__name:"NotFound",setup(n){const r=ws().useApp(),o=()=>{r.updateNavigationState(a=>{a.href="/"})};return(a,s)=>(t.openBlock(),t.createElementBlock("div",GI,[t.createElementVNode("h1",null,"Not found route: "+t.toDisplayString(t.unref(r).snapshot.navigationState.href),1),t.createVNode(t.unref(Bs),{onClick:t.withModifiers(o,["stop"])},{default:t.withCtx(()=>s[0]||(s[0]=[t.createTextVNode("Return to main page")])),_:1})]))}}),yo=(n,e)=>{const r=n.__vccOpts||n;for(const[o,a]of e)r[o]=a;return r},XI={},YI={class:"block__loader-page"};function JI(n,e){return t.openBlock(),t.createElementBlock("div",YI,e[0]||(e[0]=[t.createElementVNode("div",{class:"loader-container"},[t.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"})],-1)]))}const QI=yo(XI,[["render",JI]]),eD={class:"pl-app-notification-alert"},tD={class:"pl-app-notification-alert__content"},nD={class:"pl-app-notification-alert__title"},rD=t.defineComponent({__name:"PlAppErrorNotificationAlert",props:{errors:{}},setup(n){const e=n,r=t.ref(!1),o=t.ref(!0),a=t.computed(()=>Object.entries(e.errors).filter(c=>!!c[1]));function s(){r.value=!0}return t.watch(()=>e.errors,c=>{o.value=Object.values(c).some(d=>!!d)},{immediate:!0,deep:!0}),(c,d)=>(t.openBlock(),t.createElementBlock("div",eD,[t.createVNode(t.unref(pd),{modelValue:r.value,"onUpdate:modelValue":d[0]||(d[0]=u=>r.value=u),width:"720px",style:{"max-height":"100vh"}},{title:t.withCtx(()=>d[2]||(d[2]=[t.createTextVNode(" Errors ")])),default:t.withCtx(()=>[t.createElementVNode("div",tD,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,u=>{var p,h;return t.openBlock(),t.createElementBlock("div",{key:u[0],class:"pl-app-notification-alert__item"},[t.createElementVNode("div",nD,"Block output: "+t.toDisplayString(u[0]),1),t.createVNode(t.unref(Ih),{value:(p=u[1])==null?void 0:p.message,valueToCopy:"fullMessage"in(u[1]??{})?u[1].fullMessage:(h=u[1])==null?void 0:h.message},null,8,["value","valueToCopy"])])}),128))])]),_:1},8,["modelValue"]),t.createVNode(t.unref(Zh),{modelValue:o.value,"onUpdate:modelValue":d[1]||(d[1]=u=>o.value=u),type:"error",closable:""},{actions:t.withCtx(()=>[t.createVNode(t.unref(Ns),{icon:"arrow-right",onClick:s},{default:t.withCtx(()=>d[3]||(d[3]=[t.createTextVNode("See errors")])),_:1}),t.createVNode(t.unref(Hp))]),default:t.withCtx(()=>[d[4]||(d[4]=t.createTextVNode(" Some outputs have errors. "))]),_:1},8,["modelValue"])]))}}),oD={key:0,class:"block__loader"},aD=t.defineComponent({__name:"BlockLoader",props:{value:{type:[Boolean,Number]}},setup(n){const e=n,r=t.computed(()=>typeof e.value=="boolean"&&e.value),o=t.computed(()=>{const a=e.value;if(typeof a=="number")return a>=1?void 0:(a*100).toFixed(2)+"%"});return(a,s)=>r.value?(t.openBlock(),t.createElementBlock("div",oD)):o.value!==void 0?(t.openBlock(),t.createElementBlock("div",{key:1,class:"block__progress",style:t.normalizeStyle({"--progress-width":o.value})},null,4)):t.createCommentVNode("",!0)}});function iD(n){const e=t.ref(),r=".pl-block-page__title__append",o=()=>{t.nextTick(()=>{if(!n.value){e.value=void 0;return}e.value=document.querySelector(r)?r:void 0,e.value||console.error("[Monetization] use #title slot to place monetization button")})};return t.onMounted(o),t.onUpdated(o),e}const sD=fe.literal("trial"),lD=fe.literal("free"),cD=fe.literal("single_payment"),dD=fe.literal("subscription"),uD=fe.union([sD,lD,cD,dD,fe.literal("base")]),fD=fe.object({type:fe.union([fe.literal("unique_launches"),fe.literal("volume_limit")]),used:fe.number(),toSpend:fe.number(),available:fe.number().nullable()}),pD=fe.object({productKey:fe.string(),productName:fe.string().default("Unknown product"),customerEmail:fe.string().optional(),canRun:fe.boolean(),status:fe.string(),mnz:fe.object({type:uD.optional(),endOfBillingPeriod:fe.string().nullable().optional(),limits:fe.array(fD).optional()})},{message:"Invalid DryRunResult"}),hD=fe.object({httpError:fe.string().optional(),response:fe.object({result:pD.optional(),error:fe.unknown().optional()}).optional()}).optional();function mD(){const n=ws(),e=t.computed(()=>n.loaded?n.useApp():void 0),r=t.computed(()=>{var V,D;return"__mnzDate"in((D=(V=e.value)==null?void 0:V.model)==null?void 0:D.args)}),o=t.computed(()=>{var V;return hD.safeParse((V=e.value)==null?void 0:V.model.outputs.__mnzInfo)}),a=t.computed(()=>{var V;return(V=o.value)==null?void 0:V.data}),s=t.computed(()=>{var V,D,F;return((V=o.value)==null?void 0:V.error)??((F=(D=c.value)==null?void 0:D.response)==null?void 0:F.error)}),c=t.ref(void 0),d=t.ref(!1),u=t.ref(0);t.watch([a],([V])=>{if(V){c.value=V;const D=++u.value;setTimeout(()=>{u.value===D&&(d.value=!1)},1e3)}},{immediate:!0});const p=t.computed(()=>{var V,D;return(D=(V=c.value)==null?void 0:V.response)==null?void 0:D.result}),h=t.computed(()=>{var V;return!!((V=p.value)!=null&&V.canRun)}),g=t.computed(()=>{var V;return a.value?(V=p.value)==null?void 0:V.status:"awaiting"}),y=t.computed(()=>{var V;return(V=p.value)==null?void 0:V.customerEmail}),w=t.computed(()=>{var V;return(V=p.value)==null?void 0:V.mnz.endOfBillingPeriod}),E=t.computed(()=>{var V;return(V=p.value)==null?void 0:V.mnz.limits}),N=()=>{var V;d.value=!0,((V=e.value)==null?void 0:V.model.args).__mnzDate=new Date().toISOString()};return t.watch(h,V=>{var D;r.value&&(((D=e.value)==null?void 0:D.model.args).__mnzCanRun=V)}),r.value&&U1(N,6e4),{hasMonetization:r,result:p,error:s,canRun:h,status:g,customerEmail:y,endOfBillingPeriod:w,limits:E,refresh:N,version:u,isLoading:d}}const gD=["title"],yD=yo(t.defineComponent({__name:"UserCabinetCard",props:{userCabinetUrl:{}},setup(n){const e=n,r=t.ref(""),o=t.computed(()=>r.value?"clipboard-copied":"clipboard"),a=()=>{e.userCabinetUrl&&navigator.clipboard.writeText(e.userCabinetUrl).then(()=>{r.value="URL copied!",setTimeout(()=>{r.value=""},2e3)}).catch(s=>{console.error("Failed to copy text: ",s),r.value="Copy failed",setTimeout(()=>{r.value=""},2e3)})};return(s,c)=>(t.openBlock(),t.createElementBlock("div",null,[s.userCabinetUrl?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(s.$style.urlSection)},[t.createElementVNode("div",{class:t.normalizeClass(s.$style.urlLabel)},"Scientist cabinet URL:",2),t.createElementVNode("div",{class:t.normalizeClass(s.$style.urlActions)},[t.createElementVNode("div",{class:t.normalizeClass(s.$style.urlDisplay),title:s.userCabinetUrl},t.toDisplayString(s.userCabinetUrl),11,gD),t.createVNode(t.unref(dt),{"close-delay":800,position:"top"},{tooltip:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r.value?r.value:"Copy"),1)]),default:t.withCtx(()=>[t.createVNode(t.unref(at),{class:t.normalizeClass(s.$style.copyIcon),title:"Copy content",name:o.value,onClick:a},null,8,["class","name"])]),_:1})],2)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(s.$style.hint)}," * Copy and paste the link into your browser ",2)]))}}),[["__cssModules",{$style:{hint:"_hint_1bvg8_2",copyIcon:"_copyIcon_1bvg8_10",urlSection:"_urlSection_1bvg8_14",urlLabel:"_urlLabel_1bvg8_23",urlActions:"_urlActions_1bvg8_28",urlDisplay:"_urlDisplay_1bvg8_35"}}]]),_D=yo(t.defineComponent({__name:"RunStatus",props:{canRun:{type:Boolean},statusText:{}},setup(n){const e=n;t.computed(()=>e.canRun?"Can run":"Cannot run: check your monetization settings");const r=t.computed(()=>e.canRun?"Ready to run":"Cannot run");return(o,a)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",{class:t.normalizeClass([{[o.$style["can-run"]]:o.canRun},o.$style.container])},[t.createElementVNode("div",{class:t.normalizeClass(o.$style.badge)},[t.createElementVNode("i",{class:t.normalizeClass(o.$style.blob)},[t.createElementVNode("span",null,[t.createElementVNode("span",{class:t.normalizeClass(o.$style.dot)},null,2)])],2),t.createElementVNode("span",null,t.toDisplayString(r.value),1)],2),t.createCommentVNode("",!0),t.renderSlot(o.$slots,"default")],2),o.statusText?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(o.$style.statusText)},t.toDisplayString(o.statusText),3)):t.createCommentVNode("",!0)]))}}),[["__cssModules",{$style:{container:"_container_s8cm3_2","can-run":"_can-run_s8cm3_8",statusText:"_statusText_s8cm3_14",badge:"_badge_s8cm3_22",blob:"_blob_s8cm3_33","pulse-glob":"_pulse-glob_s8cm3_1",dot:"_dot_s8cm3_50"}}]]),wD={key:0},bD={key:1},kD=yo(t.defineComponent({__name:"LimitCard",props:{type:{},label:{},used:{},toSpend:{},available:{},unit:{}},setup(n){const e=n,r=t.computed(()=>e.available===null?0:e.toSpend/e.available*100),o=t.computed(()=>e.available===null?0:e.used/e.available*100),a=t.computed(()=>e.available===null?100:100-o.value-r.value),s=t.computed(()=>e.type==="unique_launches"?"Runs Limits":e.type==="volume_limit"?"Volume Limits":e.label),c=u=>(u/1024/1024/1024).toFixed(2)+" GB",d=u=>e.type==="volume_limit"?c(u):u;return(u,p)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(u.$style.container)},[t.createElementVNode("span",{class:t.normalizeClass(u.$style.label)},t.toDisplayString(s.value),3),t.createElementVNode("div",{class:t.normalizeClass(u.$style.content)},[t.createElementVNode("div",{class:t.normalizeClass(u.$style.contentAvailable)},[p[0]||(p[0]=t.createTextVNode(" Available: ")),p[1]||(p[1]=t.createElementVNode("div",{style:{flex:"1"}},null,-1)),u.available!==null?(t.openBlock(),t.createElementBlock("span",wD,[t.createElementVNode("strong",null,t.toDisplayString(d(u.available)),1),t.createTextVNode(" / "+t.toDisplayString(d(u.available+u.toSpend+u.used)),1)])):(t.openBlock(),t.createElementBlock("span",bD,"Unlimited"))],2),t.createElementVNode("div",{class:t.normalizeClass(u.$style.progressBar)},[t.createElementVNode("span",{class:t.normalizeClass(u.$style.progressBarAvailable),style:t.normalizeStyle({width:`${a.value}%`})},null,6),t.createElementVNode("span",{class:t.normalizeClass(u.$style.progressBarToSpend),style:t.normalizeStyle({width:`${r.value}%`})},null,6),t.createElementVNode("span",{class:t.normalizeClass(u.$style.progressBarUsed),style:t.normalizeStyle({width:`${o.value}%`})},null,6)],2),t.createElementVNode("div",{class:t.normalizeClass(u.$style.legends)},[t.createElementVNode("div",{class:t.normalizeClass(u.$style.usedLegend)},[p[2]||(p[2]=t.createElementVNode("span",null,null,-1)),t.createTextVNode(" Used: "+t.toDisplayString(d(u.used)),1)],2),t.createElementVNode("div",{class:t.normalizeClass(u.$style.toSpendLegend)},[p[3]||(p[3]=t.createElementVNode("span",null,null,-1)),t.createTextVNode(" To spend: "+t.toDisplayString(d(u.toSpend)),1)],2)],2)],2)],2))}}),[["__cssModules",{$style:{container:"_container_1qgbe_2",label:"_label_1qgbe_16",content:"_content_1qgbe_25",contentAvailable:"_contentAvailable_1qgbe_31",progressBar:"_progressBar_1qgbe_43",progressBarAvailable:"_progressBarAvailable_1qgbe_57",progressBarUsed:"_progressBarUsed_1qgbe_62",progressBarToSpend:"_progressBarToSpend_1qgbe_67",legends:"_legends_1qgbe_72",usedLegend:"_usedLegend_1qgbe_89",toSpendLegend:"_toSpendLegend_1qgbe_98"}}]]),xD=yo(t.defineComponent({__name:"EndOfPeriod",props:{endOfPeriod:{}},setup(n){const e=r=>{if(!r)return"N/A";const o=new Date(r),a=o.getDate().toString().padStart(2,"0"),s=(o.getMonth()+1).toString().padStart(2,"0"),c=o.getFullYear();return`${a}.${s}.${c}`};return(r,o)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(r.$style.container)},[o[0]||(o[0]=t.createElementVNode("span",null,"End of period",-1)),t.createElementVNode("span",null,t.toDisplayString(e(r.endOfPeriod)),1)],2))}}),[["__cssModules",{$style:{container:"_container_1vyu9_2"}}]]),vD=t.defineComponent({__name:"MonetizationSidebar",setup(n){const e=t.ref(!1),{result:r,error:o,hasMonetization:a,canRun:s,status:c,customerEmail:d,endOfBillingPeriod:u,limits:p,refresh:h,isLoading:g}=mD(),y=iD(a),w=t.computed(()=>{var F;return(F=r.value)==null?void 0:F.productName}),E=t.computed(()=>{if(!r.value)return;const F=new URL(`https://scientist.platforma.bio/product/${r.value.productKey}`);return d.value&&F.searchParams.set("email",d.value),F.toString()}),N=t.computed(()=>r.value?[{label:r.value.productName,value:r.value.productName}]:[]),V=t.computed(()=>{switch(c.value){case"active":return"";case"limits_exceeded":return"Usage limits exceeded for the current billing period.";case"payment_required":return"Payment required to continue using the service.";case"select-tariff":return"Select a subscription plan in the Scientist Cabinet.";case"inactive":return"Not found billing period.";case"awaiting":return"Waiting for monetization information";default:return"Unknown status: "+c.value}}),D=t.computed(()=>s.value?"monetization-on":"monetization-off");return(F,$)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.unref(a)?(t.openBlock(),t.createBlock(t.unref(Qa),{key:0,modelValue:e.value,"onUpdate:modelValue":$[0]||($[0]=W=>e.value=W)},{title:t.withCtx(()=>$[2]||($[2]=[t.createElementVNode("div",{class:"flex items-center gap-2"},[t.createElementVNode("span",null,"Subscription")],-1)])),default:t.withCtx(()=>[t.createVNode(t.unref(Rr),{label:"Product",readonly:"","model-value":w.value,options:N.value},null,8,["model-value","options"]),t.createVNode(_D,{"can-run":t.unref(s),"status-text":V.value},{default:t.withCtx(()=>[t.createVNode(t.unref(Bs),{title:"Refresh status",round:"",size:"small",style:{"margin-left":"auto"},icon:"loading",loading:t.unref(g),onClick:t.unref(h)},null,8,["loading","onClick"])]),_:1},8,["can-run","status-text"]),t.unref(o)?(t.openBlock(),t.createBlock(t.unref(qp),{key:0,type:"error"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o)),1)]),_:1})):t.createCommentVNode("",!0),E.value?(t.openBlock(),t.createBlock(yD,{key:1,"user-cabinet-url":E.value},null,8,["user-cabinet-url"])):t.createCommentVNode("",!0),t.unref(u)?(t.openBlock(),t.createBlock(xD,{key:2,"end-of-period":t.unref(u)},null,8,["end-of-period"])):t.createCommentVNode("",!0),t.unref(p)?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:3},t.renderList(t.unref(p),W=>(t.openBlock(),t.createBlock(kD,{key:W.type,type:W.type,label:W.type,used:W.used,"to-spend":W.toSpend,available:W.available},null,8,["type","label","used","to-spend","available"]))),128)):t.createCommentVNode("",!0)]),_:1},8,["modelValue"])):t.createCommentVNode("",!0),t.unref(a)&&t.unref(y)?(t.openBlock(),t.createBlock(t.Teleport,{key:1,to:t.unref(y)},[t.createVNode(t.unref(Ar),{onClick:$[1]||($[1]=t.withModifiers(W=>e.value=!0,["stop"]))},{append:t.withCtx(()=>[t.createVNode(t.unref(Ja),{name:D.value},null,8,["name"])]),default:t.withCtx(()=>[$[3]||($[3]=t.createTextVNode(" Subscription "))]),_:1})],8,["to"])):t.createCommentVNode("",!0)],64))}}),CD={class:"block block__layout"},ED={key:0},SD=t.defineComponent({__name:"BlockLayout",setup(n){const e=ws(),r=p=>{try{return new URL(p,"http://dummy").pathname}catch{console.error("Invalid href",p);return}},o=t.computed(()=>e.loaded?e.useApp().href:void 0),a=t.computed(()=>{if(e.loaded){const p=e.useApp(),h=r(p.snapshot.navigationState.href);return h?p.getRoute(h):void 0}}),s=t.computed(()=>e.loaded?e.useApp():void 0),c=t.computed(()=>s.value?s.value.model.outputErrors:{}),d=t.computed(()=>{var p;return((p=s.value)==null?void 0:p.showErrorsNotification)??!0}),u=t.computed(()=>{var p,h;return(h=(p=s.value)==null?void 0:p.progress)==null?void 0:h.call(p)});return(p,h)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",CD,[t.createVNode(aD,{value:u.value},null,8,["value"]),t.unref(e).error?(t.openBlock(),t.createElementBlock("div",ED,t.toDisplayString(t.unref(e).error),1)):t.unref(e).loaded?a.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(a.value),{key:o.value})):(t.openBlock(),t.createBlock(KI,{key:3})):(t.openBlock(),t.createBlock(QI,{key:1},{default:t.withCtx(()=>h[0]||(h[0]=[t.createTextVNode("Loading...")])),_:1})),t.unref(e).loaded&&d.value?(t.openBlock(),t.createBlock(t.unref(rD),{key:4,errors:c.value},null,8,["errors"])):t.createCommentVNode("",!0)]),a.value?(t.openBlock(),t.createBlock(t.unref(vD),{key:0})):t.createCommentVNode("",!0)],64))}});var hl={exports:{}};/**
|
|
53
|
+
)`}function l(){const d=n.value;if(!d)return;const u=[o(d),a(d)].filter(f=>f!==null);d.style.setProperty("-webkit-mask-image",u.join(",")),d.style.setProperty("mask-image",u.join(",")),u.length>1&&(d.style.setProperty("-webkit-mask-composite","source-in"),d.style.setProperty("mask-composite","source-in"))}const c=_d(l);t.onMounted(l),ot(window,"scroll",c,!0),ot(window,"resize",c,!0)}function Zg(n,e){Nm(()=>{vt(t.unref(n),r=>{Vm(r,()=>e(r))})}),t.onUnmounted(()=>{vt(t.unref(n),r=>{Bm(r)})})}const Gr={item:"sortable__item",animate:"sortable__animate"},Ii=n=>n.getBoundingClientRect().y,Mg=n=>{const{y:e,height:r}=n.getBoundingClientRect();return e+Math.ceil(r/2)},WA=n=>{const{y:e,height:r}=n.getBoundingClientRect();return e+r};function GA(n,e){const r={item:void 0,options(){var _;return[...((_=n.value)==null?void 0:_.children)??[]]}},o=t.computed(()=>r.options()),a=e.shakeBuffer??10,l=e.reorderDelay??100;function c(_){const C=e.handle?this.querySelector(e.handle):null;C&&(C&&!C.contains(_.target)||(this.classList.remove(Gr.animate),this.classList.add(Gr.item),r.item={el:this,y:_.y,dy:0,orderChanged:!1}))}function d(_){const C=r.options();return C.slice(0,C.indexOf(_))}function u(_){const C=r.options();return C.slice(C.indexOf(_)+1)}function f(_,C){const N=r.options().filter($=>$!==C),T=N.indexOf(_);return N.splice(T,0,C),N}function m(_,C){const N=r.options().filter($=>$!==C),T=N.indexOf(_);return N.splice(T+1,0,C),N}function g(_,C){_.dy=C-_.y,_.el.style.setProperty("transform",`translateY(${_.dy}px)`)}function y(_){var C;if(!r.item)return;const{el:N}=r.item;if(!N.isConnected){r.item=void 0;return}const T=_.map(B=>Ii(B)),$=Ii(N);(C=n.value)==null||C.replaceChildren(..._);const W=Ii(N),E=_.map(B=>Ii(B)),D=[];for(let B=0;B<E.length;B++){const P=_[B];if(P===r.item.el)continue;const H=E[B],S=T[B]-H;P.style.transform=`translateY(${S}px)`,D.push(P)}const A=W-$;r.item.y=r.item.y+A,r.item.dy=r.item.dy-A,r.item.orderChanged=!0,r.item.el.style.setProperty("transform",`translateY(${r.item.dy}px)`),D.forEach(B=>B.classList.remove(Gr.animate)),requestAnimationFrame(function(){D.forEach(B=>{B.classList.add(Gr.animate),B.style.transform="",B.addEventListener("transitionend",()=>{B.classList.remove(Gr.animate)})})})}ot(window,"mousemove",_=>{if(!r.item)return;const{el:C}=r.item;g(r.item,_.y);const N=Ii(r.item.el),T=WA(r.item.el),$=d(C),W=u(C);$.forEach(E=>{const D=Mg(E);N+a<D&&y(f(E,C))}),W.forEach(E=>{const D=Mg(E);T-a>D&&y(m(E,C))})}),ot(window,"mouseup",()=>{if(!r.item)return;const{el:_,orderChanged:C}=r.item;_.classList.add(Gr.animate),_.style.removeProperty("transform"),_.addEventListener("transitionend",()=>{_.classList.remove(Gr.animate,Gr.item)}),setTimeout(()=>{if(!C)return;const N=r.options().map($=>Number($.getAttribute("data-index"))),T=n.value;if(T){for(const $ of r.options())T.removeChild($);o.value.forEach($=>{T.appendChild($)})}e.onChange(N)},l),r.item=void 0}),t.watchEffect(()=>{o.value.forEach((_,C)=>{_.removeEventListener("mousedown",c),_.addEventListener("mousedown",c),_.setAttribute("data-index",String(C))})})}const Ur={item:"sortable__item",animate:"sortable__animate"},Ai=n=>n.getBoundingClientRect().y,Fg=n=>{const{y:e,height:r}=n.getBoundingClientRect();return e+Math.ceil(r/2)},UA=n=>{const{y:e,height:r}=n.getBoundingClientRect();return e+r};function Pg(n,e){const r={item:void 0,options(){var C;return[...((C=n.value)==null?void 0:C.children)??[]]}};let o=0;t.watch(()=>n.value,()=>{setTimeout(()=>{n.value&&(n.value.scrollTop=o)},0)});const a=t.computed(()=>r.options()),l=e.shakeBuffer??10,c=e.reorderDelay??100;function d(C){var N;const T=e.handle?this.querySelector(e.handle):null;T&&(T&&!T.contains(C.target)||(this.classList.remove(Ur.animate),this.classList.add(Ur.item),r.item={el:this,y:C.y,dy:0,initialScrollTop:((N=n.value)==null?void 0:N.scrollTop)||0,orderChanged:!1}))}function u(C){const N=r.options();return N.slice(0,N.indexOf(C))}function f(C){const N=r.options();return N.slice(N.indexOf(C)+1)}function m(C,N){const T=r.options().filter(W=>W!==N),$=T.indexOf(C);return T.splice($,0,N),T}function g(C,N){const T=r.options().filter(W=>W!==N),$=T.indexOf(C);return T.splice($+1,0,N),T}function y(C,N){var T;const $=(((T=n.value)==null?void 0:T.scrollTop)||0)-(C.initialScrollTop||0);C.dy=N-C.y+$,C.el.style.setProperty("transform",`translateY(${C.dy}px)`)}function _(C){var N;if(!r.item)return;const{el:T}=r.item;if(!T.isConnected){r.item=void 0;return}const $=C.map(P=>Ai(P)),W=Ai(T);(N=n.value)==null||N.replaceChildren(...C);const E=Ai(T),D=C.map(P=>Ai(P)),A=[];for(let P=0;P<D.length;P++){const H=C[P];if(H===r.item.el)continue;const S=D[P],I=$[P]-S;H.style.transform=`translateY(${I}px)`,A.push(H)}const B=E-W;r.item.y=r.item.y+B,r.item.dy=r.item.dy-B,r.item.orderChanged=!0,r.item.el.style.setProperty("transform",`translateY(${r.item.dy}px)`),A.forEach(P=>P.classList.remove(Ur.animate)),requestAnimationFrame(function(){A.forEach(P=>{P.classList.add(Ur.animate),P.style.transform="",P.addEventListener("transitionend",()=>{P.classList.remove(Ur.animate)})})})}ot(window,"mousemove",C=>{if(!r.item)return;const{el:N}=r.item;y(r.item,C.y);const T=Ai(r.item.el),$=UA(r.item.el),W=u(N),E=f(N);if(W.forEach(D=>{const A=Fg(D);T+l<A&&_(m(D,N))}),E.forEach(D=>{const A=Fg(D);$-l>A&&_(g(D,N))}),n.value){const D=n.value.getBoundingClientRect(),A=D.top+N.getBoundingClientRect().height/2;C.clientY<A&&(n.value.scrollTop+=C.clientY-A);const B=D.bottom-N.getBoundingClientRect().height/2;C.clientY>B&&(n.value.scrollTop+=C.clientY-B)}}),ot(window,"mouseup",()=>{var C;if(!r.item)return;o=((C=n.value)==null?void 0:C.scrollTop)||0;const{el:N,orderChanged:T}=r.item;N.classList.add(Ur.animate),N.style.removeProperty("transform"),N.addEventListener("transitionend",()=>{N.classList.remove(Ur.animate,Ur.item)}),setTimeout(()=>{if(!T)return;const $=r.options().map(E=>Number(E.getAttribute("data-index"))),W=n.value;if(W){for(const E of r.options())W.removeChild(E);a.value.forEach(E=>{W.appendChild(E)})}e.onChange($)},c),r.item=void 0}),t.watchEffect(()=>{a.value.forEach((C,N)=>{C.removeEventListener("mousedown",d),C.addEventListener("mousedown",d),C.setAttribute("data-index",String(N))})})}function HA(n,e){let r;t.onMounted(()=>{r=setInterval(n,e)}),t.onUnmounted(()=>clearInterval(r))}function XA(n,e,r){const o=t.reactive({data:dd.deepClone(e(n.value)),changed:!1});return t.watch(()=>o.data,a=>{o.changed?r(dd.deepClone(a)):o.changed=!0},{deep:!0}),t.watch(n,a=>{Object.assign(o,{data:dd.deepClone(e(a)),changed:!1})},{deep:!0,immediate:!0}),o}function jA(n){const e=t.reactive({isLoading:!1,result:void 0,error:void 0,async run(...r){this.isLoading=!0,this.error=void 0;try{this.result=await n(...r)}catch(o){this.error=o}finally{this.isLoading=!1}},debounce(r,o=1e3){return im(()=>{const a=r();this.run(...a).catch(console.error)},o)}});return e.run=e.run.bind(e),e}function YA(n,e){function r(c,d){const u=t.unref(n);if(!u)return;const f=`translate(${d.x-c.x}px, ${d.y-c.y}px)`;u.style.setProperty("transform",f),e(d)}function o(c){const d=u=>r(c,u);document.addEventListener("mousemove",d),document.addEventListener("mouseup",()=>{const u=t.unref(n);document.removeEventListener("mousemove",d),u&&(u.style.setProperty("transition","all .3s ease-in-out"),u.style.removeProperty("transform"),u.addEventListener("transitionend",()=>{u.style.removeProperty("transition")}))},{once:!0})}function a(){var c;(c=t.unref(n))==null||c.addEventListener("mousedown",o)}function l(){var c;(c=t.unref(n))==null||c.removeEventListener("mousedown",o)}t.onMounted(a),t.onUnmounted(l)}function KA(n){return t.computed(n)}const JA={class:"ui-slider__wrapper"},qA={class:"ui-slider__label-section"},QA={key:0,class:"text-s"},eL={class:"ui-slider__base"},tL={class:"ui-slider__container"},nL={class:"ui-slider__container ui-slider__container-thumb"},rL=["data-percent"],oL=["data-percent"],aL=["data-percent"],iL={key:0,class:"ui-slider__error"},lL=t.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(n,{emit:e}){const r=t.useSlots(),o=e,a=n,l=t.reactive({deltaValue1:0,deltaValue2:0,deltaValue3:0}),c=t.ref(),d=t.ref(),u=t.ref(),f=t.ref(),m=t.computed(()=>a.max-a.min),g=t.computed(()=>a),y=wu(g),_=t.computed(()=>Bt((a.modelValue[0]??0)+l.deltaValue1,a.min,a.max)),C=t.computed(()=>Bt((a.modelValue[1]??0)+l.deltaValue2,a.min,a.max)),N=t.computed(()=>Bt((a.modelValue[2]??0)+l.deltaValue3,a.min,a.max)),T=t.computed(()=>{const Z=a.modelValue;if(!(Array.isArray(Z)&&Z.length===3&&Z.every(F=>Number.isFinite(F))))return"Expected model [number, number, number]";const U=[];return[...a.modelValue].forEach(F=>{F>a.max&&U.push(`Max model value must be lower than max props ${a.max}.`),F<a.min&&U.push("Min model value must be greater than max props.")}),U.length>0?U.join(" "):a.error}),$=t.computed(()=>(_.value-a.min)/m.value),W=t.computed(()=>(C.value-a.min)/m.value),E=t.computed(()=>(N.value-a.min)/m.value),D=t.computed(()=>I()),A=t.computed(()=>({right:D.value[0]+"%",left:100-D.value[2]+"%"})),B=t.computed(()=>({right:Math.ceil((1-$.value)*100)+"%"})),P=t.computed(()=>({right:Math.ceil((1-W.value)*100)+"%"})),H=t.computed(()=>({right:Math.ceil((1-E.value)*100)+"%"}));Lr(d,Z=>{var U;vt((U=t.unref(c))==null?void 0:U.getBoundingClientRect(),F=>{const{dx:j}=Z;l.deltaValue1=j/F.width*m.value,d.value&&S(d.value,a.modelValue[0],l.deltaValue1),Z.stop&&(L([v(_.value),v(C.value),v(N.value)]),l.deltaValue1=0)})}),Lr(u,Z=>{var U;vt((U=t.unref(c))==null?void 0:U.getBoundingClientRect(),F=>{const{dx:j}=Z;l.deltaValue2=j/F.width*m.value,u.value&&S(u.value,a.modelValue[1],l.deltaValue2),Z.stop&&(L([v(_.value),v(C.value),v(N.value)]),l.deltaValue2=0)})}),Lr(f,Z=>{var U;vt((U=t.unref(c))==null?void 0:U.getBoundingClientRect(),F=>{const{dx:j}=Z;l.deltaValue3=j/F.width*m.value,f.value&&S(f.value,a.modelValue[2],l.deltaValue3),Z.stop&&(L([v(_.value),v(C.value),v(N.value)]),l.deltaValue3=0)})});function S(Z,U,F){const j=v(Bt((U??0)+F,a.min,a.max));Z.dataset.percent=`${j}${a.measure}`,V()}function I(){const Z=Math.ceil((1-$.value)*100),U=Math.ceil((1-W.value)*100),F=Math.ceil((1-E.value)*100);return[Z,U,F].sort((j,ee)=>j-ee)}function v(Z){const U=Bt(Z,a.min,a.max);return Math.round((U+Number.EPSILON)*(1/a.step))/(1/a.step)}function L(Z){o("update:modelValue",Z)}function V(){const Z=Number(B.value.right.substring(0,B.value.right.length-1)),U=Number(P.value.right.substring(0,P.value.right.length-1)),F=Number(H.value.right.substring(0,H.value.right.length-1)),j=[{r:Z,th:d},{r:U,th:u},{r:F,th:f}].sort((ee,ue)=>ee.r-ue.r);j[0].th.value&&(j[0].th.value.dataset.hint="high"),j[1].th.value&&(j[1].th.value.dataset.hint="mid"),j[2].th.value&&(j[2].th.value.dataset.hint="low")}function k(Z,U){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(Z.code)&&Z.preventDefault();const F=Z.code==="ArrowUp"||Z.code==="ArrowRight"?a.step*1:Z.code==="ArrowDown"||Z.code==="ArrowLeft"?a.step*-1:0,j=[...a.modelValue];j[U]=Bt(j[U]+F,a.min,a.max),L(j),V()}return t.onMounted(()=>{V()}),(Z,U)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([a.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope ui-slider__triple"])},[t.createElementVNode("div",{class:t.normalizeClass([`ui-slider__mode-${a.mode}`,"ui-slider"])},[t.createElementVNode("div",JA,[t.createElementVNode("div",qA,[Z.label?(t.openBlock(),t.createElementBlock("label",QA,[t.createElementVNode("span",null,t.toDisplayString(Z.label),1),U[3]||(U[3]=t.createTextVNode()),t.unref(r).tooltip?(t.openBlock(),t.createBlock(t.unref(ct),{key:0,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(Z.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)]),U[11]||(U[11]=t.createTextVNode()),t.createElementVNode("div",eL,[t.createElementVNode("div",tL,[t.createElementVNode("div",{ref_key:"barRef",ref:c,class:"ui-slider__bar"},[t.createElementVNode("div",{class:"ui-slider__progress",style:t.normalizeStyle(A.value)},null,4)],512)]),U[10]||(U[10]=t.createTextVNode()),t.createElementVNode("div",nL,[a.breakpoints?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(y),(F,j)=>(t.openBlock(),t.createElementBlock("div",{key:j,style:t.normalizeStyle({right:`${F}%`}),class:"ui-slider__thumb-step"},null,4))),128)):t.createCommentVNode("",!0),U[7]||(U[7]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"thumbRef1",ref:d,style:t.normalizeStyle(B.value),"data-percent":a.modelValue[0]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r1:"",tabindex:"0",onKeydown:U[0]||(U[0]=F=>k(F,0))},U[4]||(U[4]=[t.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,rL),U[8]||(U[8]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"thumbRef2",ref:u,style:t.normalizeStyle(P.value),"data-percent":a.modelValue[1]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r2:"",tabindex:"0",onKeydown:U[1]||(U[1]=F=>k(F,1))},U[5]||(U[5]=[t.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,oL),U[9]||(U[9]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"thumbRef3",ref:f,style:t.normalizeStyle(H.value),"data-percent":a.modelValue[2]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r3:"",tabindex:"0",onKeydown:U[2]||(U[2]=F=>k(F,2))},U[6]||(U[6]=[t.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,aL)])])]),U[12]||(U[12]=t.createTextVNode()),U[13]||(U[13]=t.createElementVNode("div",{class:"ui-slider__input-wrapper d-flex"},null,-1))],2),U[14]||(U[14]=t.createTextVNode()),T.value?(t.openBlock(),t.createElementBlock("div",iL,t.toDisplayString(T.value),1)):t.createCommentVNode("",!0)],2))}}),sL={class:"ui-input-range__separator"},cL=t.defineComponent({__name:"InputRange",props:{modelValue:{},separator:{default:"-"}},emits:["update:modelValue","change"],setup(n,{emit:e}){const r=n,o=e,a=t.reactive({left:r.modelValue[0],right:r.modelValue[1]}),l=t.ref(!1),c=t.computed(()=>(l.value,"ui-input-range-focused")),d=t.computed({get(){return{left:Math.min(...r.modelValue),right:Math.max(...r.modelValue)}},set(){}});t.watch(()=>d.value,m=>(a.left=m.left)&&(a.right=m.right));function u(){o("update:modelValue",[+a.left,+a.right]),o("change",[+a.left,+a.right])}function f(m,g){const y=g.target.value;/^[0-9]{0,2}$/.test(y)?m?a.left=+y:a.right=+y:m?a.left=+y.slice(0,y.length-1):a.right=+y.slice(0,y.length-1)}return(m,g)=>(t.openBlock(),t.createElementBlock("div",t.mergeProps({class:[c.value,"ui-input-range"]},m.$attrs),[t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":g[0]||(g[0]=y=>d.value.left=y),class:"text-s",type:"text",onChange:u,onFocus:g[1]||(g[1]=y=>l.value=!0),onFocusout:g[2]||(g[2]=y=>l.value=!1),onInput:g[3]||(g[3]=y=>f(!0,y))},null,544),[[t.vModelText,d.value.left]]),g[8]||(g[8]=t.createTextVNode()),t.createElementVNode("div",sL,t.toDisplayString(r.separator),1),g[9]||(g[9]=t.createTextVNode()),t.withDirectives(t.createElementVNode("input",{"onUpdate:modelValue":g[4]||(g[4]=y=>d.value.right=y),class:"text-s",type:"text",onChange:u,onFocus:g[5]||(g[5]=y=>l.value=!0),onFocusout:g[6]||(g[6]=y=>l.value=!1),onInput:g[7]||(g[7]=y=>f(!1,y))},null,544),[[t.vModelText,d.value.right]])],16))}}),dL={class:"ui-slider__wrapper"},uL={class:"ui-slider__label-section"},pL={key:0,class:"text-s"},fL={key:1,class:"ui-slider__value-static text-s"},mL={class:"ui-slider__base"},hL={class:"ui-slider__container"},gL={class:"ui-slider__container ui-slider__container-thumb"},yL={class:"ui-slider__input-wrapper d-flex"},bL={key:0,class:"ui-slider__error"},_L=t.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(n,{emit:e}){const r=t.useSlots(),o=e,a=n,l=t.reactive({deltaValue1:0,deltaValue2:0}),c=t.ref(),d=t.ref(),u=t.ref(),f=t.ref(a.modelValue),m=t.ref(a.modelValue[0]),g=t.ref(a.modelValue[1]),y=t.computed(()=>a),_=wu(y),C=t.computed(()=>[m.value,g.value].sort((V,k)=>V-k).join("-")),N=t.computed(()=>a.max-a.min),T=t.computed(()=>Bt((a.modelValue[0]??0)+l.deltaValue1,a.min,a.max)),$=t.computed(()=>Bt((a.modelValue[1]??0)+l.deltaValue2,a.min,a.max)),W=t.computed(()=>{const V=a.modelValue;return Array.isArray(V)&&V.length===2&&V.every(k=>Number.isFinite(k))?a.error:"Expected model [number, number]"}),E=t.computed(()=>(T.value-a.min)/N.value),D=t.computed(()=>($.value-a.min)/N.value),A=t.computed(()=>S()),B=t.computed(()=>({right:A.value[0]+"%",left:100-A.value[1]+"%"})),P=t.computed(()=>({right:Math.ceil((1-E.value)*100)+"%"})),H=t.computed(()=>({right:Math.ceil((1-D.value)*100)+"%"}));t.watch(()=>a.modelValue,V=>{f.value=V,m.value=+V[0],g.value=+V[1]},{immediate:!0}),Lr(d,V=>{var k;vt((k=t.unref(c))==null?void 0:k.getBoundingClientRect(),Z=>{const{dx:U}=V;l.deltaValue1=U/Z.width*N.value,m.value=I(Bt((a.modelValue[0]??0)+l.deltaValue1,a.min,a.max)),f.value=[m.value,g.value].sort((F,j)=>F-j),V.stop&&(v([I(T.value),I($.value)]),l.deltaValue1=0)})}),Lr(u,V=>{var k;vt((k=t.unref(c))==null?void 0:k.getBoundingClientRect(),Z=>{const{dx:U}=V;l.deltaValue2=U/Z.width*N.value,g.value=I(Bt((a.modelValue[1]??0)+l.deltaValue2,a.min,a.max)),f.value=[m.value,g.value].sort((F,j)=>F-j),V.stop&&(v([I(T.value),I($.value)]),l.deltaValue2=0)})});function S(){const V=Math.ceil((1-E.value)*100),k=Math.ceil((1-D.value)*100);return[V,k].sort((Z,U)=>Z-U)}function I(V){const k=Bt(V,a.min,a.max);return Math.round((k+Number.EPSILON)*(1/a.step))/(1/a.step)}function v(V){o("update:modelValue",V)}function L(V,k){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(V.code)&&V.preventDefault();const Z=V.code==="ArrowUp"||V.code==="ArrowRight"?a.step*1:V.code==="ArrowDown"||V.code==="ArrowLeft"?a.step*-1:0,U=[...a.modelValue];U[k]=Bt(U[k]+Z,a.min,a.max),v(U)}return(V,k)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([a.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[t.createElementVNode("div",{class:t.normalizeClass([`ui-slider__mode-${a.mode}`,"ui-slider"])},[t.createElementVNode("div",dL,[t.createElementVNode("div",uL,[V.label?(t.openBlock(),t.createElementBlock("label",pL,[t.createElementVNode("span",null,t.toDisplayString(V.label),1),k[3]||(k[3]=t.createTextVNode()),t.unref(r).tooltip?(t.openBlock(),t.createBlock(t.unref(ct),{key:0,class:"info",position:"top"},{tooltip:t.withCtx(()=>[t.renderSlot(V.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),k[4]||(k[4]=t.createTextVNode()),a.mode==="text"?(t.openBlock(),t.createElementBlock("div",fL,t.toDisplayString(C.value),1)):t.createCommentVNode("",!0)]),k[10]||(k[10]=t.createTextVNode()),t.createElementVNode("div",mL,[t.createElementVNode("div",hL,[t.createElementVNode("div",{ref_key:"barRef",ref:c,class:"ui-slider__bar"},[t.createElementVNode("div",{class:"ui-slider__progress",style:t.normalizeStyle(B.value)},null,4)],512)]),k[9]||(k[9]=t.createTextVNode()),t.createElementVNode("div",gL,[a.breakpoints?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(_),(Z,U)=>(t.openBlock(),t.createElementBlock("div",{key:U,style:t.normalizeStyle({right:`${Z}%`}),class:"ui-slider__thumb-step"},null,4))),128)):t.createCommentVNode("",!0),k[7]||(k[7]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"thumbRef1",ref:d,style:t.normalizeStyle(P.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:k[0]||(k[0]=Z=>L(Z,0))},k[5]||(k[5]=[t.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36),k[8]||(k[8]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"thumbRef2",ref:u,style:t.normalizeStyle(H.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:k[1]||(k[1]=Z=>L(Z,1))},k[6]||(k[6]=[t.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),k[11]||(k[11]=t.createTextVNode()),t.createElementVNode("div",yL,[a.mode==="input"?(t.openBlock(),t.createBlock(cL,{key:0,modelValue:f.value,"onUpdate:modelValue":k[2]||(k[2]=Z=>f.value=Z),class:"ui-focused-border",onChange:v},null,8,["modelValue"])):t.createCommentVNode("",!0)])],2),k[12]||(k[12]=t.createTextVNode()),W.value?(t.openBlock(),t.createElementBlock("div",bL,t.toDisplayString(W.value),1)):t.createCommentVNode("",!0)],2))}}),wL=t.defineComponent({__name:"VScroll",props:{scrollTop:{},clientHeight:{},scrollHeight:{}},emits:["update:scrollTop"],setup(n,{emit:e}){const r=e,o=n,a=t.ref(),l=t.computed(()=>o.clientHeight/(o.scrollHeight||1)),c=t.computed(()=>l.value<1),d=t.computed(()=>{const u=t.unref(l);return{top:o.scrollTop*u+"px",height:Math.floor(o.clientHeight*u)+"px"}});return ot(a,"pointerdown",u=>{const f={clientY:u.clientY},m=Cd(document,"mousemove",g=>{const y=(g.clientY-f.clientY)/l.value;r("update:scrollTop",o.scrollTop+y),f.clientY=g.clientY});["mouseup","pointercancel"].forEach(g=>{document.addEventListener(g,m,{once:!0})})}),(u,f)=>c.value?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:a,class:"v-scroll"},[t.createElementVNode("div",{class:"v-scroll__scrollbar",style:t.normalizeStyle(d.value)},null,4)],512)):t.createCommentVNode("",!0)}}),kL=t.defineComponent({__name:"HScroll",props:{scrollLeft:{},clientWidth:{},scrollWidth:{}},emits:["update:scrollLeft"],setup(n,{emit:e}){const r=e,o=n,a=t.ref(),l=t.computed(()=>o.clientWidth/(o.scrollWidth||1)),c=t.computed(()=>l.value<1),d=t.computed(()=>{const u=t.unref(l);return{left:o.scrollLeft*u+"px",width:Math.floor(o.clientWidth*u)+"px"}});return ot(a,"pointerdown",u=>{const f={clientX:u.clientX},m=Cd(document,"mousemove",g=>{const y=(g.clientX-f.clientX)/l.value;r("update:scrollLeft",o.scrollLeft+y),f.clientX=g.clientX});["mouseup","pointercancel"].forEach(g=>{document.addEventListener(g,m,{once:!0})})}),(u,f)=>c.value?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:a,class:"h-scroll"},[t.createElementVNode("div",{class:"h-scroll__scrollbar",style:t.normalizeStyle(d.value)},null,4)],512)):t.createCommentVNode("",!0)}}),xL={class:"ui-scrollable"},vL=t.defineComponent({__name:"Scrollable",setup(n){const e=t.ref(),r=t.reactive({scrollTop:0,scrollLeft:0,clientHeight:0,clientWidth:0,scrollHeight:0,scrollWidth:0});function o(d){Nv(r,d,"scrollTop","scrollLeft","clientHeight","clientWidth","scrollHeight","scrollWidth")}const a=d=>{d.preventDefault();const u=d.currentTarget;u.scrollTop+=d.deltaY,u.scrollLeft+=d.deltaX,o(u)};function l(d){vt(t.unref(e),u=>{u.scrollTop=d,o(u)})}function c(d){vt(t.unref(e),u=>{u.scrollLeft=d,o(u)})}return Zg(e,d=>{vt(d,u=>o(u))}),t.onMounted(()=>{vt(t.unref(e),d=>{o(d),d.addEventListener("wheel",a)})}),t.onUnmounted(()=>{vt(t.unref(e),d=>d.removeEventListener("wheel",a))}),(d,u)=>(t.openBlock(),t.createElementBlock("div",xL,[t.createElementVNode("div",{ref_key:"containerRef",ref:e,class:"ui-scrollable__container",onWheel:a},[t.renderSlot(d.$slots,"default")],544),u[2]||(u[2]=t.createTextVNode()),t.createVNode(wL,{"scroll-top":r.scrollTop,"client-height":r.clientHeight,"scroll-height":r.scrollHeight,onWheel:u[0]||(u[0]=t.withModifiers(()=>{},["stop"])),"onUpdate:scrollTop":l},null,8,["scroll-top","client-height","scroll-height"]),u[3]||(u[3]=t.createTextVNode()),t.createVNode(kL,{"scroll-left":r.scrollLeft,"client-width":r.clientWidth,"scroll-width":r.scrollWidth,onWheel:u[1]||(u[1]=t.withModifiers(()=>{},["stop"])),"onUpdate:scrollLeft":c},null,8,["scroll-left","client-width","scroll-width"])]))}}),CL="add.svg",SL="box.svg",EL="calendar.svg",NL="checkmark.svg",VL="clipboard.svg",BL="close.svg",TL="copy.svg",RL="download.svg",IL="duplicate.svg",AL="edit.svg",LL="error.svg",OL="filter.svg",$L="help.svg",ZL="info.svg",ML="link.svg",FL="loading.svg",PL="lock.svg",zL="maximize.svg",DL="minimize.svg",WL="minus.svg",GL="more.svg",UL="open.svg",HL="pause.svg",XL="play.svg",jL="progress.svg",YL="renew.svg",KL="restart.svg",JL="reverse.svg",qL="settings.svg",QL="sort.svg",eO="stop.svg",tO="success.svg",nO="time.svg",rO="tune.svg",oO="warning.svg",aO="zip.svg",iO={add:CL,"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:SL,calendar:EL,"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-subset":"cell-type-subset.svg","cell-type-txt":"cell-type-txt.svg",checkmark:NL,"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:VL,close:BL,copy:TL,"data-dimentions":"data-dimentions.svg","delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg",download:RL,"drag-dots":"drag-dots.svg",duplicate:IL,edit:AL,error:LL,export:"export.svg","filter-on":"filter-on.svg",filter:OL,"help-outline":"help-outline.svg",help:$L,"info-outline":"info-outline.svg",info:ZL,"jump-link":"jump-link.svg",link:ML,loading:FL,lock:PL,maximize:zL,minimize:DL,minus:WL,more:GL,open:UL,"paper-clip":"paper-clip.svg",pause:HL,play:XL,progress:jL,renew:YL,restart:KL,reverse:JL,settings:qL,sort:QL,stop:eO,success:tO,time:nO,tune:rO,warning:oO,"x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:aO},lO="add.svg",sO="annotate.svg",cO="annotation.svg",dO="area.svg",uO="axes.svg",pO="bar.svg",fO="bindot.svg",mO="box.svg",hO="boxplot.svg",gO="bubble.svg",yO="calendar.svg",bO="canvas.svg",_O="checkbox.svg",wO="checkmark.svg",kO="clipboard.svg",xO="close.svg",vO="cluster.svg",CO="code.svg",SO="color.svg",EO="columns.svg",NO="container.svg",VO="cookie.svg",BO="copy.svg",TO="cpu.svg",RO="debug.svg",IO="dna.svg",AO="download.svg",LO="duplicate.svg",OO="edit.svg",$O="error.svg",ZO="filter.svg",MO="generate.svg",FO="graph.svg",PO="heatmap.svg",zO="help.svg",DO="info.svg",WO="jitter.svg",GO="lasso.svg",UO="layers.svg",HO="learn.svg",XO="legend.svg",jO="line.svg",YO="link.svg",KO="loading.svg",JO="lock.svg",qO="maximize.svg",QO="menu.svg",e$="minimize.svg",t$="minus.svg",n$="monetization.svg",r$="more.svg",o$="pause.svg",a$="pin.svg",i$="play.svg",l$="product.svg",s$="progress.svg",c$="publications.svg",d$="renew.svg",u$="restart.svg",p$="reverse.svg",f$="search.svg",m$="server.svg",h$="settings.svg",g$="sina.svg",y$="skatterplot.svg",b$="slice.svg",_$="sort.svg",w$="statistics.svg",k$="stop.svg",x$="success.svg",v$="table.svg",C$="template.svg",S$="terminal.svg",E$="time.svg",N$="tune.svg",V$="venn.svg",B$="violin.svg",T$="warning.svg",R$="wetlab.svg",I$="zip.svg",A$={"add-layer":"add-layer.svg",add:lO,"align-center":"align-center.svg","align-left":"align-left.svg","align-right":"align-right.svg",annotate:sO,annotation:cO,area:dO,"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:uO,"bar-cross":"bar-cross.svg","bar-error":"bar-error.svg","bar-stacked":"bar-stacked.svg","bar-trend":"bar-trend.svg",bar:pO,bindot:fO,box:mO,"boxplot-binned":"boxplot-binned.svg","boxplot-jitter":"boxplot-jitter.svg","boxplot-notched":"boxplot-notched.svg",boxplot:hO,bubble:gO,calendar:yO,canvas:bO,"cell-type-num":"cell-type-num.svg","cell-type-subset":"cell-type-subset.svg","cell-type-txt":"cell-type-txt.svg","checkbox-checked":"checkbox-checked.svg","checkbox-intermediate":"checkbox-intermediate.svg",checkbox:_O,checkmark:wO,"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:kO,close:xO,"cloud-download":"cloud-download.svg","cloud-offline":"cloud-offline.svg","cloud-online":"cloud-online.svg","cloud-upload":"cloud-upload.svg",cluster:vO,code:CO,"color-fill":"color-fill.svg","color-none":"color-none.svg","color-stroke":"color-stroke.svg",color:SO,columns:EO,"connected-points":"connected-points.svg",container:NO,cookie:VO,copy:BO,cpu:TO,"data-dimentions":"data-dimentions.svg",debug:RO,"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:IO,download:AO,"drag-dots":"drag-dots.svg","drag-horizontal":"drag-horizontal.svg","drag-vertical":"drag-vertical.svg",duplicate:LO,edit:OO,"error-bar":"error-bar.svg",error:$O,"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:ZO,"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:MO,graph:FO,heatmap:PO,"help-outline":"help-outline.svg",help:zO,"info-outline":"info-outline.svg",info:DO,jitter:WO,"jump-link":"jump-link.svg",lasso:GO,layers:UO,learn:HO,"legend-box-dot":"legend-box-dot.svg","legend-box":"legend-box.svg",legend:XO,"line-binned":"line-binned.svg","line-error":"line-error.svg","line-jitter":"line-jitter.svg",line:jO,"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:YO,loading:KO,lock:JO,maximize:qO,menu:QO,minimize:e$,minus:t$,"monetization-off":"monetization-off.svg","monetization-on":"monetization-on.svg",monetization:n$,more:r$,"paper-clip":"paper-clip.svg",pause:o$,pin:a$,play:i$,"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:l$,progress:s$,publications:c$,"radio-button-checked":"radio-button-checked.svg","radio-button":"radio-button.svg",renew:d$,restart:u$,reverse:p$,"rotation-0":"rotation-0.svg","rotation-45":"rotation-45.svg","rotation-90":"rotation-90.svg",search:f$,"server-on":"server-on.svg",server:m$,settings:h$,sina:g$,skatterplot:y$,slice:b$,"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:_$,statistics:w$,stop:k$,"strip-plot":"strip-plot.svg",success:x$,"table-add":"table-add.svg","table-alias":"table-alias.svg","table-import":"table-import.svg",table:v$,template:C$,terminal:S$,"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:E$,tune:N$,venn:V$,"view-hide":"view-hide.svg","view-show":"view-show.svg","violin-binned":"violin-binned.svg","violin-jitter":"violin-jitter.svg",violin:B$,warning:T$,wetlab:R$,"windows-collapse":"windows-collapse.svg","windows-expand":"windows-expand.svg","x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:I$,"zoom-in":"zoom-in.svg","zoom-out":"zoom-out.svg"};function L$(){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 O$=["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-subset","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","progress","renew","restart","reverse","settings","sort","stop","success","time","tune","warning","x-axis","y-axis","zip"],$$=["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-subset","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","monetization-off","monetization-on","monetization","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","progress","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"],Z$={allCssVariables:L$(),icons16:iO,icons24:A$},M$={class:"block__not-found"},F$=t.defineComponent({__name:"NotFound",setup(n){const r=vl().useApp(),o=()=>{r.updateNavigationState(a=>{a.href="/"})};return(a,l)=>(t.openBlock(),t.createElementBlock("div",M$,[t.createElementVNode("h1",null,"Not found route: "+t.toDisplayString(t.unref(r).snapshot.navigationState.href),1),t.createVNode(t.unref(Il),{onClick:t.withModifiers(o,["stop"])},{default:t.withCtx(()=>l[0]||(l[0]=[t.createTextVNode("Return to main page")])),_:1})]))}}),mr=(n,e)=>{const r=n.__vccOpts||n;for(const[o,a]of e)r[o]=a;return r},P$={},z$={class:"block__loader-page"};function D$(n,e){return t.openBlock(),t.createElementBlock("div",z$,e[0]||(e[0]=[t.createElementVNode("div",{class:"loader-container"},[t.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"})],-1)]))}const W$=mr(P$,[["render",D$]]),G$={class:"pl-app-notification-alert"},U$={class:"pl-app-notification-alert__content"},H$={class:"pl-app-notification-alert__title"},X$=t.defineComponent({__name:"PlAppErrorNotificationAlert",props:{errors:{}},setup(n){const e=n,r=t.ref(!1),o=t.ref(!0),a=t.computed(()=>Object.entries(e.errors).filter(c=>!!c[1]));function l(){r.value=!0}return t.watch(()=>e.errors,c=>{o.value=Object.values(c).some(d=>!!d)},{immediate:!0,deep:!0}),(c,d)=>(t.openBlock(),t.createElementBlock("div",G$,[t.createVNode(t.unref(Bd),{modelValue:r.value,"onUpdate:modelValue":d[0]||(d[0]=u=>r.value=u),width:"720px",style:{"max-height":"100vh"}},{title:t.withCtx(()=>d[2]||(d[2]=[t.createTextVNode(" Errors ")])),default:t.withCtx(()=>[t.createElementVNode("div",U$,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.value,u=>{var f,m;return t.openBlock(),t.createElementBlock("div",{key:u[0],class:"pl-app-notification-alert__item"},[t.createElementVNode("div",H$,"Block output: "+t.toDisplayString(u[0]),1),t.createVNode(t.unref(oh),{value:(f=u[1])==null?void 0:f.message,valueToCopy:"fullMessage"in(u[1]??{})?u[1].fullMessage:(m=u[1])==null?void 0:m.message},null,8,["value","valueToCopy"])])}),128))])]),_:1},8,["modelValue"]),t.createVNode(t.unref(fh),{modelValue:o.value,"onUpdate:modelValue":d[1]||(d[1]=u=>o.value=u),type:"error",closable:""},{actions:t.withCtx(()=>[t.createVNode(t.unref(Rl),{icon:"arrow-right",onClick:l},{default:t.withCtx(()=>d[3]||(d[3]=[t.createTextVNode("See errors")])),_:1}),t.createVNode(t.unref(ym))]),default:t.withCtx(()=>[d[4]||(d[4]=t.createTextVNode(" Some outputs have errors. "))]),_:1},8,["modelValue"])]))}}),j$={key:0,class:"block__loader"},Y$=t.defineComponent({__name:"BlockLoader",props:{value:{type:[Boolean,Number]}},setup(n){const e=n,r=t.computed(()=>typeof e.value=="boolean"&&e.value),o=t.computed(()=>{const a=e.value;if(typeof a=="number")return a>=1?void 0:(a*100).toFixed(2)+"%"});return(a,l)=>r.value?(t.openBlock(),t.createElementBlock("div",j$)):o.value!==void 0?(t.openBlock(),t.createElementBlock("div",{key:1,class:"block__progress",style:t.normalizeStyle({"--progress-width":o.value})},null,4)):t.createCommentVNode("",!0)}});function K$(n){const e=t.ref(),r=".pl-block-page__title__append",o=()=>{t.nextTick(()=>{if(!n.value){e.value=void 0;return}e.value=document.querySelector(r)?r:void 0,e.value||console.error("[Monetization] use #title slot to place monetization button")})};return t.onMounted(o),t.onUpdated(o),e}const J$=pe.literal("trial"),q$=pe.literal("free"),Q$=pe.literal("single_payment"),e5=pe.literal("subscription"),t5=pe.union([J$,q$,Q$,e5,pe.literal("base")]),n5=pe.object({type:pe.union([pe.literal("unique_launches"),pe.literal("volume_limit")]),used:pe.number(),toSpend:pe.number(),available:pe.number().nullable()}),r5=pe.object({productKey:pe.string(),productName:pe.string().default("Unknown product"),customerEmail:pe.string().optional(),canRun:pe.boolean(),status:pe.string(),mnz:pe.object({type:t5.optional(),endOfBillingPeriod:pe.string().nullable().optional(),limits:pe.array(n5).optional()})},{message:"Invalid DryRunResult"}),o5=pe.object({httpError:pe.string().optional(),response:pe.object({result:r5.optional(),error:pe.unknown().optional()}).optional()}).optional();function a5(){const n=vl(),e=t.computed(()=>n.loaded?n.useApp():void 0),r=t.computed(()=>{var T,$;return"__mnzDate"in(($=(T=e.value)==null?void 0:T.model)==null?void 0:$.args)}),o=t.computed(()=>{var T;return o5.safeParse((T=e.value)==null?void 0:T.model.outputs.__mnzInfo)}),a=t.computed(()=>{var T;return(T=o.value)==null?void 0:T.data}),l=t.computed(()=>{var T,$,W;return((T=o.value)==null?void 0:T.error)??((W=($=c.value)==null?void 0:$.response)==null?void 0:W.error)}),c=t.ref(void 0),d=t.ref(!1),u=t.ref(0);t.watch([a],([T])=>{if(T){c.value=T;const $=++u.value;setTimeout(()=>{u.value===$&&(d.value=!1)},1e3)}},{immediate:!0});const f=t.computed(()=>{var T,$;return($=(T=c.value)==null?void 0:T.response)==null?void 0:$.result}),m=t.computed(()=>{var T;return!!((T=f.value)!=null&&T.canRun)}),g=t.computed(()=>{var T;return a.value?(T=f.value)==null?void 0:T.status:"awaiting"}),y=t.computed(()=>{var T;return(T=f.value)==null?void 0:T.customerEmail}),_=t.computed(()=>{var T;return(T=f.value)==null?void 0:T.mnz.endOfBillingPeriod}),C=t.computed(()=>{var T;return(T=f.value)==null?void 0:T.mnz.limits}),N=()=>{var T;d.value=!0,((T=e.value)==null?void 0:T.model.args).__mnzDate=new Date().toISOString()};return t.watch(m,T=>{var $;r.value&&((($=e.value)==null?void 0:$.model.args).__mnzCanRun=T)}),r.value&&Iw(N,6e4),{hasMonetization:r,result:f,error:l,canRun:m,status:g,customerEmail:y,endOfBillingPeriod:_,limits:C,refresh:N,version:u,isLoading:d}}const i5=["title"],l5=mr(t.defineComponent({__name:"UserCabinetCard",props:{userCabinetUrl:{}},setup(n){const e=n,r=t.ref(""),o=t.computed(()=>r.value?"clipboard-copied":"clipboard"),a=()=>{e.userCabinetUrl&&navigator.clipboard.writeText(e.userCabinetUrl).then(()=>{r.value="URL copied!",setTimeout(()=>{r.value=""},2e3)}).catch(l=>{console.error("Failed to copy text: ",l),r.value="Copy failed",setTimeout(()=>{r.value=""},2e3)})};return(l,c)=>(t.openBlock(),t.createElementBlock("div",null,[l.userCabinetUrl?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(l.$style.urlSection)},[t.createElementVNode("div",{class:t.normalizeClass(l.$style.urlLabel)},"Scientist cabinet URL:",2),t.createElementVNode("div",{class:t.normalizeClass(l.$style.urlActions)},[t.createElementVNode("div",{class:t.normalizeClass(l.$style.urlDisplay),title:l.userCabinetUrl},t.toDisplayString(l.userCabinetUrl),11,i5),t.createVNode(t.unref(ct),{"close-delay":800,position:"top"},{tooltip:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(r.value?r.value:"Copy"),1)]),default:t.withCtx(()=>[t.createVNode(t.unref(at),{class:t.normalizeClass(l.$style.copyIcon),title:"Copy content",name:o.value,onClick:a},null,8,["class","name"])]),_:1})],2)],2)):t.createCommentVNode("",!0),t.createElementVNode("div",{class:t.normalizeClass(l.$style.hint)}," * Copy and paste the link into your browser ",2)]))}}),[["__cssModules",{$style:{hint:"_hint_1bvg8_2",copyIcon:"_copyIcon_1bvg8_10",urlSection:"_urlSection_1bvg8_14",urlLabel:"_urlLabel_1bvg8_23",urlActions:"_urlActions_1bvg8_28",urlDisplay:"_urlDisplay_1bvg8_35"}}]]),s5=mr(t.defineComponent({__name:"RunStatus",props:{canRun:{type:Boolean},statusText:{}},setup(n){const e=n;t.computed(()=>e.canRun?"Can run":"Cannot run: check your monetization settings");const r=t.computed(()=>e.canRun?"Ready to run":"Cannot run");return(o,a)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",{class:t.normalizeClass([{[o.$style["can-run"]]:o.canRun},o.$style.container])},[t.createElementVNode("div",{class:t.normalizeClass(o.$style.badge)},[t.createElementVNode("i",{class:t.normalizeClass(o.$style.blob)},[t.createElementVNode("span",null,[t.createElementVNode("span",{class:t.normalizeClass(o.$style.dot)},null,2)])],2),t.createElementVNode("span",null,t.toDisplayString(r.value),1)],2),t.createCommentVNode("",!0),t.renderSlot(o.$slots,"default")],2),o.statusText?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(o.$style.statusText)},t.toDisplayString(o.statusText),3)):t.createCommentVNode("",!0)]))}}),[["__cssModules",{$style:{container:"_container_s8cm3_2","can-run":"_can-run_s8cm3_8",statusText:"_statusText_s8cm3_14",badge:"_badge_s8cm3_22",blob:"_blob_s8cm3_33","pulse-glob":"_pulse-glob_s8cm3_1",dot:"_dot_s8cm3_50"}}]]),c5={key:0},d5={key:1},u5=mr(t.defineComponent({__name:"LimitCard",props:{type:{},label:{},used:{},toSpend:{},available:{},unit:{}},setup(n){const e=n,r=t.computed(()=>e.available===null?0:e.toSpend/e.available*100),o=t.computed(()=>e.available===null?0:e.used/e.available*100),a=t.computed(()=>e.available===null?100:100-o.value-r.value),l=t.computed(()=>e.type==="unique_launches"?"Runs Limits":e.type==="volume_limit"?"Volume Limits":e.label),c=u=>(u/1024/1024/1024).toFixed(2)+" GB",d=u=>e.type==="volume_limit"?c(u):u;return(u,f)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(u.$style.container)},[t.createElementVNode("span",{class:t.normalizeClass(u.$style.label)},t.toDisplayString(l.value),3),t.createElementVNode("div",{class:t.normalizeClass(u.$style.content)},[t.createElementVNode("div",{class:t.normalizeClass(u.$style.contentAvailable)},[f[0]||(f[0]=t.createTextVNode(" Available: ")),f[1]||(f[1]=t.createElementVNode("div",{style:{flex:"1"}},null,-1)),u.available!==null?(t.openBlock(),t.createElementBlock("span",c5,[t.createElementVNode("strong",null,t.toDisplayString(d(u.available)),1),t.createTextVNode(" / "+t.toDisplayString(d(u.available+u.toSpend+u.used)),1)])):(t.openBlock(),t.createElementBlock("span",d5,"Unlimited"))],2),t.createElementVNode("div",{class:t.normalizeClass(u.$style.progressBar)},[t.createElementVNode("span",{class:t.normalizeClass(u.$style.progressBarAvailable),style:t.normalizeStyle({width:`${a.value}%`})},null,6),t.createElementVNode("span",{class:t.normalizeClass(u.$style.progressBarToSpend),style:t.normalizeStyle({width:`${r.value}%`})},null,6),t.createElementVNode("span",{class:t.normalizeClass(u.$style.progressBarUsed),style:t.normalizeStyle({width:`${o.value}%`})},null,6)],2),t.createElementVNode("div",{class:t.normalizeClass(u.$style.legends)},[t.createElementVNode("div",{class:t.normalizeClass(u.$style.usedLegend)},[f[2]||(f[2]=t.createElementVNode("span",null,null,-1)),t.createTextVNode(" Used: "+t.toDisplayString(d(u.used)),1)],2),t.createElementVNode("div",{class:t.normalizeClass(u.$style.toSpendLegend)},[f[3]||(f[3]=t.createElementVNode("span",null,null,-1)),t.createTextVNode(" To spend: "+t.toDisplayString(d(u.toSpend)),1)],2)],2)],2)],2))}}),[["__cssModules",{$style:{container:"_container_1qgbe_2",label:"_label_1qgbe_16",content:"_content_1qgbe_25",contentAvailable:"_contentAvailable_1qgbe_31",progressBar:"_progressBar_1qgbe_43",progressBarAvailable:"_progressBarAvailable_1qgbe_57",progressBarUsed:"_progressBarUsed_1qgbe_62",progressBarToSpend:"_progressBarToSpend_1qgbe_67",legends:"_legends_1qgbe_72",usedLegend:"_usedLegend_1qgbe_89",toSpendLegend:"_toSpendLegend_1qgbe_98"}}]]),p5=mr(t.defineComponent({__name:"EndOfPeriod",props:{endOfPeriod:{}},setup(n){const e=r=>{if(!r)return"N/A";const o=new Date(r),a=o.getDate().toString().padStart(2,"0"),l=(o.getMonth()+1).toString().padStart(2,"0"),c=o.getFullYear();return`${a}.${l}.${c}`};return(r,o)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(r.$style.container)},[o[0]||(o[0]=t.createElementVNode("span",null,"End of period",-1)),t.createElementVNode("span",null,t.toDisplayString(e(r.endOfPeriod)),1)],2))}}),[["__cssModules",{$style:{container:"_container_1vyu9_2"}}]]),f5=t.defineComponent({__name:"MonetizationSidebar",setup(n){const e=t.ref(!1),{result:r,error:o,hasMonetization:a,canRun:l,status:c,customerEmail:d,endOfBillingPeriod:u,limits:f,refresh:m,isLoading:g}=a5(),y=K$(a),_=t.computed(()=>{var W;return(W=r.value)==null?void 0:W.productName}),C=t.computed(()=>{if(!r.value)return;const W=new URL(`https://scientist.platforma.bio/product/${r.value.productKey}`);return d.value&&W.searchParams.set("email",d.value),W.toString()}),N=t.computed(()=>r.value?[{label:r.value.productName,value:r.value.productName}]:[]),T=t.computed(()=>{switch(c.value){case"active":return"";case"limits_exceeded":return"Usage limits exceeded for the current billing period.";case"payment_required":return"Payment required to continue using the service.";case"select-tariff":return"Select a subscription plan in the Scientist Cabinet.";case"inactive":return"Not found billing period.";case"awaiting":return"Waiting for monetization information";default:return"Unknown status: "+c.value}}),$=t.computed(()=>l.value?"monetization-on":"monetization-off");return(W,E)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.unref(a)?(t.openBlock(),t.createBlock(t.unref(Ko),{key:0,modelValue:e.value,"onUpdate:modelValue":E[0]||(E[0]=D=>e.value=D)},{title:t.withCtx(()=>E[2]||(E[2]=[t.createElementVNode("div",{class:"flex items-center gap-2"},[t.createElementVNode("span",null,"Subscription")],-1)])),default:t.withCtx(()=>[t.createVNode(t.unref($r),{label:"Product",readonly:"","model-value":_.value,options:N.value},null,8,["model-value","options"]),t.createVNode(s5,{"can-run":t.unref(l),"status-text":T.value},{default:t.withCtx(()=>[t.createVNode(t.unref(Il),{title:"Refresh status",round:"",size:"small",style:{"margin-left":"auto"},icon:"loading",loading:t.unref(g),onClick:t.unref(m)},null,8,["loading","onClick"])]),_:1},8,["can-run","status-text"]),t.unref(o)?(t.openBlock(),t.createBlock(t.unref(bd),{key:0,type:"error"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(o)),1)]),_:1})):t.createCommentVNode("",!0),C.value?(t.openBlock(),t.createBlock(l5,{key:1,"user-cabinet-url":C.value},null,8,["user-cabinet-url"])):t.createCommentVNode("",!0),t.unref(u)?(t.openBlock(),t.createBlock(p5,{key:2,"end-of-period":t.unref(u)},null,8,["end-of-period"])):t.createCommentVNode("",!0),t.unref(f)?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:3},t.renderList(t.unref(f),D=>(t.openBlock(),t.createBlock(u5,{key:D.type,type:D.type,label:D.type,used:D.used,"to-spend":D.toSpend,available:D.available},null,8,["type","label","used","to-spend","available"]))),128)):t.createCommentVNode("",!0)]),_:1},8,["modelValue"])):t.createCommentVNode("",!0),t.unref(a)&&t.unref(y)?(t.openBlock(),t.createBlock(t.Teleport,{key:1,to:t.unref(y)},[t.createVNode(t.unref(cr),{onClick:E[1]||(E[1]=t.withModifiers(D=>e.value=!0,["stop"]))},{append:t.withCtx(()=>[t.createVNode(t.unref(Yo),{name:$.value},null,8,["name"])]),default:t.withCtx(()=>[E[3]||(E[3]=t.createTextVNode(" Subscription "))]),_:1})],8,["to"])):t.createCommentVNode("",!0)],64))}}),m5={class:"block block__layout"},h5={key:0},g5=t.defineComponent({__name:"BlockLayout",setup(n){const e=vl(),r=f=>{try{return new URL(f,"http://dummy").pathname}catch{console.error("Invalid href",f);return}},o=t.computed(()=>e.loaded?e.useApp().href:void 0),a=t.computed(()=>{if(e.loaded){const f=e.useApp(),m=r(f.snapshot.navigationState.href);return m?f.getRoute(m):void 0}}),l=t.computed(()=>e.loaded?e.useApp():void 0),c=t.computed(()=>l.value?l.value.model.outputErrors:{}),d=t.computed(()=>{var f;return((f=l.value)==null?void 0:f.showErrorsNotification)??!0}),u=t.computed(()=>{var f,m;return(m=(f=l.value)==null?void 0:f.progress)==null?void 0:m.call(f)});return(f,m)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createElementVNode("div",m5,[t.createVNode(Y$,{value:u.value},null,8,["value"]),t.unref(e).error?(t.openBlock(),t.createElementBlock("div",h5,t.toDisplayString(t.unref(e).error),1)):t.unref(e).loaded?a.value?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(a.value),{key:o.value})):(t.openBlock(),t.createBlock(F$,{key:3})):(t.openBlock(),t.createBlock(W$,{key:1},{default:t.withCtx(()=>m[0]||(m[0]=[t.createTextVNode("Loading...")])),_:1})),t.unref(e).loaded&&d.value?(t.openBlock(),t.createBlock(t.unref(X$),{key:4,errors:c.value},null,8,["errors"])):t.createCommentVNode("",!0)]),a.value?(t.openBlock(),t.createBlock(t.unref(f5),{key:0})):t.createCommentVNode("",!0)],64))}});var _s={exports:{}};/**
|
|
54
54
|
* @license
|
|
55
55
|
* Lodash <https://lodash.com/>
|
|
56
56
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
57
57
|
* Released under MIT license <https://lodash.com/license>
|
|
58
58
|
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
59
59
|
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
60
|
-
*/hl.exports,function(n,e){(function(){var r,o="4.17.21",a=200,s="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",d="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",p=500,h="__lodash_placeholder__",g=1,y=2,w=4,E=1,N=2,V=1,D=2,F=4,$=8,W=16,R=32,B=64,z=128,q=256,C=512,A=30,v="...",O=800,S=16,k=1,M=2,U=3,j=1/0,G=9007199254740991,ee=17976931348623157e292,ue=NaN,ye=4294967295,Ce=ye-1,He=ye>>>1,Ct=[["ary",z],["bind",V],["bindKey",D],["curry",$],["curryRight",W],["flip",C],["partial",R],["partialRight",B],["rearg",q]],Ke="[object Arguments]",Wt="[object Array]",GL="[object AsyncFunction]",Di="[object Boolean]",Mi="[object Date]",KL="[object DOMException]",$l="[object Error]",Rl="[object Function]",Ey="[object GeneratorFunction]",Ln="[object Map]",Pi="[object Number]",XL="[object Null]",pr="[object Object]",Sy="[object Promise]",YL="[object Proxy]",Li="[object RegExp]",Fn="[object Set]",Fi="[object String]",Ol="[object Symbol]",JL="[object Undefined]",zi="[object WeakMap]",QL="[object WeakSet]",Ui="[object ArrayBuffer]",fa="[object DataView]",Ou="[object Float32Array]",Iu="[object Float64Array]",Du="[object Int8Array]",Mu="[object Int16Array]",Pu="[object Int32Array]",Lu="[object Uint8Array]",Fu="[object Uint8ClampedArray]",zu="[object Uint16Array]",Uu="[object Uint32Array]",e3=/\b__p \+= '';/g,t3=/\b(__p \+=) '' \+/g,n3=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ny=/&(?:amp|lt|gt|quot|#39);/g,By=/[&<>"']/g,r3=RegExp(Ny.source),o3=RegExp(By.source),a3=/<%-([\s\S]+?)%>/g,i3=/<%([\s\S]+?)%>/g,Vy=/<%=([\s\S]+?)%>/g,s3=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,l3=/^\w*$/,c3=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ju=/[\\^$.*+?()[\]{}|]/g,d3=RegExp(ju.source),Zu=/^\s+/,u3=/\s/,f3=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,p3=/\{\n\/\* \[wrapped with (.+)\] \*/,h3=/,? & /,m3=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,g3=/[()=,{}\[\]\/\s]/,y3=/\\(\\)?/g,_3=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ty=/\w*$/,w3=/^[-+]0x[0-9a-f]+$/i,b3=/^0b[01]+$/i,k3=/^\[object .+?Constructor\]$/,x3=/^0o[0-7]+$/i,v3=/^(?:0|[1-9]\d*)$/,C3=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Il=/($^)/,E3=/['\n\r\u2028\u2029\\]/g,Dl="\\ud800-\\udfff",S3="\\u0300-\\u036f",N3="\\ufe20-\\ufe2f",B3="\\u20d0-\\u20ff",Ay=S3+N3+B3,$y="\\u2700-\\u27bf",Ry="a-z\\xdf-\\xf6\\xf8-\\xff",V3="\\xac\\xb1\\xd7\\xf7",T3="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",A3="\\u2000-\\u206f",$3=" \\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",Oy="A-Z\\xc0-\\xd6\\xd8-\\xde",Iy="\\ufe0e\\ufe0f",Dy=V3+T3+A3+$3,Wu="['’]",R3="["+Dl+"]",My="["+Dy+"]",Ml="["+Ay+"]",Py="\\d+",O3="["+$y+"]",Ly="["+Ry+"]",Fy="[^"+Dl+Dy+Py+$y+Ry+Oy+"]",Hu="\\ud83c[\\udffb-\\udfff]",I3="(?:"+Ml+"|"+Hu+")",zy="[^"+Dl+"]",qu="(?:\\ud83c[\\udde6-\\uddff]){2}",Gu="[\\ud800-\\udbff][\\udc00-\\udfff]",pa="["+Oy+"]",Uy="\\u200d",jy="(?:"+Ly+"|"+Fy+")",D3="(?:"+pa+"|"+Fy+")",Zy="(?:"+Wu+"(?:d|ll|m|re|s|t|ve))?",Wy="(?:"+Wu+"(?:D|LL|M|RE|S|T|VE))?",Hy=I3+"?",qy="["+Iy+"]?",M3="(?:"+Uy+"(?:"+[zy,qu,Gu].join("|")+")"+qy+Hy+")*",P3="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",L3="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Gy=qy+Hy+M3,F3="(?:"+[O3,qu,Gu].join("|")+")"+Gy,z3="(?:"+[zy+Ml+"?",Ml,qu,Gu,R3].join("|")+")",U3=RegExp(Wu,"g"),j3=RegExp(Ml,"g"),Ku=RegExp(Hu+"(?="+Hu+")|"+z3+Gy,"g"),Z3=RegExp([pa+"?"+Ly+"+"+Zy+"(?="+[My,pa,"$"].join("|")+")",D3+"+"+Wy+"(?="+[My,pa+jy,"$"].join("|")+")",pa+"?"+jy+"+"+Zy,pa+"+"+Wy,L3,P3,Py,F3].join("|"),"g"),W3=RegExp("["+Uy+Dl+Ay+Iy+"]"),H3=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,q3=["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"],G3=-1,et={};et[Ou]=et[Iu]=et[Du]=et[Mu]=et[Pu]=et[Lu]=et[Fu]=et[zu]=et[Uu]=!0,et[Ke]=et[Wt]=et[Ui]=et[Di]=et[fa]=et[Mi]=et[$l]=et[Rl]=et[Ln]=et[Pi]=et[pr]=et[Li]=et[Fn]=et[Fi]=et[zi]=!1;var Je={};Je[Ke]=Je[Wt]=Je[Ui]=Je[fa]=Je[Di]=Je[Mi]=Je[Ou]=Je[Iu]=Je[Du]=Je[Mu]=Je[Pu]=Je[Ln]=Je[Pi]=Je[pr]=Je[Li]=Je[Fn]=Je[Fi]=Je[Ol]=Je[Lu]=Je[Fu]=Je[zu]=Je[Uu]=!0,Je[$l]=Je[Rl]=Je[zi]=!1;var K3={À:"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"},X3={"&":"&","<":"<",">":">",'"':""","'":"'"},Y3={"&":"&","<":"<",">":">",""":'"',"'":"'"},J3={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Q3=parseFloat,eF=parseInt,Ky=typeof Ba=="object"&&Ba&&Ba.Object===Object&&Ba,tF=typeof self=="object"&&self&&self.Object===Object&&self,Et=Ky||tF||Function("return this")(),Xu=e&&!e.nodeType&&e,vo=Xu&&!0&&n&&!n.nodeType&&n,Xy=vo&&vo.exports===Xu,Yu=Xy&&Ky.process,fn=function(){try{var Z=vo&&vo.require&&vo.require("util").types;return Z||Yu&&Yu.binding&&Yu.binding("util")}catch{}}(),Yy=fn&&fn.isArrayBuffer,Jy=fn&&fn.isDate,Qy=fn&&fn.isMap,e0=fn&&fn.isRegExp,t0=fn&&fn.isSet,n0=fn&&fn.isTypedArray;function on(Z,X,K){switch(K.length){case 0:return Z.call(X);case 1:return Z.call(X,K[0]);case 2:return Z.call(X,K[0],K[1]);case 3:return Z.call(X,K[0],K[1],K[2])}return Z.apply(X,K)}function nF(Z,X,K,ce){for(var Ne=-1,qe=Z==null?0:Z.length;++Ne<qe;){var _t=Z[Ne];X(ce,_t,K(_t),Z)}return ce}function pn(Z,X){for(var K=-1,ce=Z==null?0:Z.length;++K<ce&&X(Z[K],K,Z)!==!1;);return Z}function rF(Z,X){for(var K=Z==null?0:Z.length;K--&&X(Z[K],K,Z)!==!1;);return Z}function r0(Z,X){for(var K=-1,ce=Z==null?0:Z.length;++K<ce;)if(!X(Z[K],K,Z))return!1;return!0}function Wr(Z,X){for(var K=-1,ce=Z==null?0:Z.length,Ne=0,qe=[];++K<ce;){var _t=Z[K];X(_t,K,Z)&&(qe[Ne++]=_t)}return qe}function Pl(Z,X){var K=Z==null?0:Z.length;return!!K&&ha(Z,X,0)>-1}function Ju(Z,X,K){for(var ce=-1,Ne=Z==null?0:Z.length;++ce<Ne;)if(K(X,Z[ce]))return!0;return!1}function nt(Z,X){for(var K=-1,ce=Z==null?0:Z.length,Ne=Array(ce);++K<ce;)Ne[K]=X(Z[K],K,Z);return Ne}function Hr(Z,X){for(var K=-1,ce=X.length,Ne=Z.length;++K<ce;)Z[Ne+K]=X[K];return Z}function Qu(Z,X,K,ce){var Ne=-1,qe=Z==null?0:Z.length;for(ce&&qe&&(K=Z[++Ne]);++Ne<qe;)K=X(K,Z[Ne],Ne,Z);return K}function oF(Z,X,K,ce){var Ne=Z==null?0:Z.length;for(ce&&Ne&&(K=Z[--Ne]);Ne--;)K=X(K,Z[Ne],Ne,Z);return K}function ef(Z,X){for(var K=-1,ce=Z==null?0:Z.length;++K<ce;)if(X(Z[K],K,Z))return!0;return!1}var aF=tf("length");function iF(Z){return Z.split("")}function sF(Z){return Z.match(m3)||[]}function o0(Z,X,K){var ce;return K(Z,function(Ne,qe,_t){if(X(Ne,qe,_t))return ce=qe,!1}),ce}function Ll(Z,X,K,ce){for(var Ne=Z.length,qe=K+(ce?1:-1);ce?qe--:++qe<Ne;)if(X(Z[qe],qe,Z))return qe;return-1}function ha(Z,X,K){return X===X?wF(Z,X,K):Ll(Z,a0,K)}function lF(Z,X,K,ce){for(var Ne=K-1,qe=Z.length;++Ne<qe;)if(ce(Z[Ne],X))return Ne;return-1}function a0(Z){return Z!==Z}function i0(Z,X){var K=Z==null?0:Z.length;return K?rf(Z,X)/K:ue}function tf(Z){return function(X){return X==null?r:X[Z]}}function nf(Z){return function(X){return Z==null?r:Z[X]}}function s0(Z,X,K,ce,Ne){return Ne(Z,function(qe,_t,Ye){K=ce?(ce=!1,qe):X(K,qe,_t,Ye)}),K}function cF(Z,X){var K=Z.length;for(Z.sort(X);K--;)Z[K]=Z[K].value;return Z}function rf(Z,X){for(var K,ce=-1,Ne=Z.length;++ce<Ne;){var qe=X(Z[ce]);qe!==r&&(K=K===r?qe:K+qe)}return K}function of(Z,X){for(var K=-1,ce=Array(Z);++K<Z;)ce[K]=X(K);return ce}function dF(Z,X){return nt(X,function(K){return[K,Z[K]]})}function l0(Z){return Z&&Z.slice(0,f0(Z)+1).replace(Zu,"")}function an(Z){return function(X){return Z(X)}}function af(Z,X){return nt(X,function(K){return Z[K]})}function ji(Z,X){return Z.has(X)}function c0(Z,X){for(var K=-1,ce=Z.length;++K<ce&&ha(X,Z[K],0)>-1;);return K}function d0(Z,X){for(var K=Z.length;K--&&ha(X,Z[K],0)>-1;);return K}function uF(Z,X){for(var K=Z.length,ce=0;K--;)Z[K]===X&&++ce;return ce}var fF=nf(K3),pF=nf(X3);function hF(Z){return"\\"+J3[Z]}function mF(Z,X){return Z==null?r:Z[X]}function ma(Z){return W3.test(Z)}function gF(Z){return H3.test(Z)}function yF(Z){for(var X,K=[];!(X=Z.next()).done;)K.push(X.value);return K}function sf(Z){var X=-1,K=Array(Z.size);return Z.forEach(function(ce,Ne){K[++X]=[Ne,ce]}),K}function u0(Z,X){return function(K){return Z(X(K))}}function qr(Z,X){for(var K=-1,ce=Z.length,Ne=0,qe=[];++K<ce;){var _t=Z[K];(_t===X||_t===h)&&(Z[K]=h,qe[Ne++]=K)}return qe}function Fl(Z){var X=-1,K=Array(Z.size);return Z.forEach(function(ce){K[++X]=ce}),K}function _F(Z){var X=-1,K=Array(Z.size);return Z.forEach(function(ce){K[++X]=[ce,ce]}),K}function wF(Z,X,K){for(var ce=K-1,Ne=Z.length;++ce<Ne;)if(Z[ce]===X)return ce;return-1}function bF(Z,X,K){for(var ce=K+1;ce--;)if(Z[ce]===X)return ce;return ce}function ga(Z){return ma(Z)?xF(Z):aF(Z)}function zn(Z){return ma(Z)?vF(Z):iF(Z)}function f0(Z){for(var X=Z.length;X--&&u3.test(Z.charAt(X)););return X}var kF=nf(Y3);function xF(Z){for(var X=Ku.lastIndex=0;Ku.test(Z);)++X;return X}function vF(Z){return Z.match(Ku)||[]}function CF(Z){return Z.match(Z3)||[]}var EF=function Z(X){X=X==null?Et:ya.defaults(Et.Object(),X,ya.pick(Et,q3));var K=X.Array,ce=X.Date,Ne=X.Error,qe=X.Function,_t=X.Math,Ye=X.Object,lf=X.RegExp,SF=X.String,hn=X.TypeError,zl=K.prototype,NF=qe.prototype,_a=Ye.prototype,Ul=X["__core-js_shared__"],jl=NF.toString,Xe=_a.hasOwnProperty,BF=0,p0=function(){var i=/[^.]+$/.exec(Ul&&Ul.keys&&Ul.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),Zl=_a.toString,VF=jl.call(Ye),TF=Et._,AF=lf("^"+jl.call(Xe).replace(ju,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Wl=Xy?X.Buffer:r,Gr=X.Symbol,Hl=X.Uint8Array,h0=Wl?Wl.allocUnsafe:r,ql=u0(Ye.getPrototypeOf,Ye),m0=Ye.create,g0=_a.propertyIsEnumerable,Gl=zl.splice,y0=Gr?Gr.isConcatSpreadable:r,Zi=Gr?Gr.iterator:r,Co=Gr?Gr.toStringTag:r,Kl=function(){try{var i=Vo(Ye,"defineProperty");return i({},"",{}),i}catch{}}(),$F=X.clearTimeout!==Et.clearTimeout&&X.clearTimeout,RF=ce&&ce.now!==Et.Date.now&&ce.now,OF=X.setTimeout!==Et.setTimeout&&X.setTimeout,Xl=_t.ceil,Yl=_t.floor,cf=Ye.getOwnPropertySymbols,IF=Wl?Wl.isBuffer:r,_0=X.isFinite,DF=zl.join,MF=u0(Ye.keys,Ye),wt=_t.max,At=_t.min,PF=ce.now,LF=X.parseInt,w0=_t.random,FF=zl.reverse,df=Vo(X,"DataView"),Wi=Vo(X,"Map"),uf=Vo(X,"Promise"),wa=Vo(X,"Set"),Hi=Vo(X,"WeakMap"),qi=Vo(Ye,"create"),Jl=Hi&&new Hi,ba={},zF=To(df),UF=To(Wi),jF=To(uf),ZF=To(wa),WF=To(Hi),Ql=Gr?Gr.prototype:r,Gi=Ql?Ql.valueOf:r,b0=Ql?Ql.toString:r;function b(i){if(ct(i)&&!Be(i)&&!(i instanceof Pe)){if(i instanceof mn)return i;if(Xe.call(i,"__wrapped__"))return k_(i)}return new mn(i)}var ka=function(){function i(){}return function(l){if(!st(l))return{};if(m0)return m0(l);i.prototype=l;var f=new i;return i.prototype=r,f}}();function ec(){}function mn(i,l){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!l,this.__index__=0,this.__values__=r}b.templateSettings={escape:a3,evaluate:i3,interpolate:Vy,variable:"",imports:{_:b}},b.prototype=ec.prototype,b.prototype.constructor=b,mn.prototype=ka(ec.prototype),mn.prototype.constructor=mn;function Pe(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ye,this.__views__=[]}function HF(){var i=new Pe(this.__wrapped__);return i.__actions__=Ht(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Ht(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Ht(this.__views__),i}function qF(){if(this.__filtered__){var i=new Pe(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function GF(){var i=this.__wrapped__.value(),l=this.__dir__,f=Be(i),m=l<0,_=f?i.length:0,x=iz(0,_,this.__views__),I=x.start,P=x.end,H=P-I,Y=m?P:I-1,J=this.__iteratees__,Q=J.length,oe=0,pe=At(H,this.__takeCount__);if(!f||!m&&_==H&&pe==H)return Z0(i,this.__actions__);var we=[];e:for(;H--&&oe<pe;){Y+=l;for(var Ie=-1,be=i[Y];++Ie<Q;){var Me=J[Ie],Ue=Me.iteratee,cn=Me.type,zt=Ue(be);if(cn==M)be=zt;else if(!zt){if(cn==k)continue e;break e}}we[oe++]=be}return we}Pe.prototype=ka(ec.prototype),Pe.prototype.constructor=Pe;function Eo(i){var l=-1,f=i==null?0:i.length;for(this.clear();++l<f;){var m=i[l];this.set(m[0],m[1])}}function KF(){this.__data__=qi?qi(null):{},this.size=0}function XF(i){var l=this.has(i)&&delete this.__data__[i];return this.size-=l?1:0,l}function YF(i){var l=this.__data__;if(qi){var f=l[i];return f===u?r:f}return Xe.call(l,i)?l[i]:r}function JF(i){var l=this.__data__;return qi?l[i]!==r:Xe.call(l,i)}function QF(i,l){var f=this.__data__;return this.size+=this.has(i)?0:1,f[i]=qi&&l===r?u:l,this}Eo.prototype.clear=KF,Eo.prototype.delete=XF,Eo.prototype.get=YF,Eo.prototype.has=JF,Eo.prototype.set=QF;function hr(i){var l=-1,f=i==null?0:i.length;for(this.clear();++l<f;){var m=i[l];this.set(m[0],m[1])}}function e4(){this.__data__=[],this.size=0}function t4(i){var l=this.__data__,f=tc(l,i);if(f<0)return!1;var m=l.length-1;return f==m?l.pop():Gl.call(l,f,1),--this.size,!0}function n4(i){var l=this.__data__,f=tc(l,i);return f<0?r:l[f][1]}function r4(i){return tc(this.__data__,i)>-1}function o4(i,l){var f=this.__data__,m=tc(f,i);return m<0?(++this.size,f.push([i,l])):f[m][1]=l,this}hr.prototype.clear=e4,hr.prototype.delete=t4,hr.prototype.get=n4,hr.prototype.has=r4,hr.prototype.set=o4;function mr(i){var l=-1,f=i==null?0:i.length;for(this.clear();++l<f;){var m=i[l];this.set(m[0],m[1])}}function a4(){this.size=0,this.__data__={hash:new Eo,map:new(Wi||hr),string:new Eo}}function i4(i){var l=pc(this,i).delete(i);return this.size-=l?1:0,l}function s4(i){return pc(this,i).get(i)}function l4(i){return pc(this,i).has(i)}function c4(i,l){var f=pc(this,i),m=f.size;return f.set(i,l),this.size+=f.size==m?0:1,this}mr.prototype.clear=a4,mr.prototype.delete=i4,mr.prototype.get=s4,mr.prototype.has=l4,mr.prototype.set=c4;function So(i){var l=-1,f=i==null?0:i.length;for(this.__data__=new mr;++l<f;)this.add(i[l])}function d4(i){return this.__data__.set(i,u),this}function u4(i){return this.__data__.has(i)}So.prototype.add=So.prototype.push=d4,So.prototype.has=u4;function Un(i){var l=this.__data__=new hr(i);this.size=l.size}function f4(){this.__data__=new hr,this.size=0}function p4(i){var l=this.__data__,f=l.delete(i);return this.size=l.size,f}function h4(i){return this.__data__.get(i)}function m4(i){return this.__data__.has(i)}function g4(i,l){var f=this.__data__;if(f instanceof hr){var m=f.__data__;if(!Wi||m.length<a-1)return m.push([i,l]),this.size=++f.size,this;f=this.__data__=new mr(m)}return f.set(i,l),this.size=f.size,this}Un.prototype.clear=f4,Un.prototype.delete=p4,Un.prototype.get=h4,Un.prototype.has=m4,Un.prototype.set=g4;function k0(i,l){var f=Be(i),m=!f&&Ao(i),_=!f&&!m&&Qr(i),x=!f&&!m&&!_&&Ea(i),I=f||m||_||x,P=I?of(i.length,SF):[],H=P.length;for(var Y in i)(l||Xe.call(i,Y))&&!(I&&(Y=="length"||_&&(Y=="offset"||Y=="parent")||x&&(Y=="buffer"||Y=="byteLength"||Y=="byteOffset")||wr(Y,H)))&&P.push(Y);return P}function x0(i){var l=i.length;return l?i[xf(0,l-1)]:r}function y4(i,l){return hc(Ht(i),No(l,0,i.length))}function _4(i){return hc(Ht(i))}function ff(i,l,f){(f!==r&&!jn(i[l],f)||f===r&&!(l in i))&&gr(i,l,f)}function Ki(i,l,f){var m=i[l];(!(Xe.call(i,l)&&jn(m,f))||f===r&&!(l in i))&&gr(i,l,f)}function tc(i,l){for(var f=i.length;f--;)if(jn(i[f][0],l))return f;return-1}function w4(i,l,f,m){return Kr(i,function(_,x,I){l(m,_,f(_),I)}),m}function v0(i,l){return i&&nr(l,xt(l),i)}function b4(i,l){return i&&nr(l,Gt(l),i)}function gr(i,l,f){l=="__proto__"&&Kl?Kl(i,l,{configurable:!0,enumerable:!0,value:f,writable:!0}):i[l]=f}function pf(i,l){for(var f=-1,m=l.length,_=K(m),x=i==null;++f<m;)_[f]=x?r:qf(i,l[f]);return _}function No(i,l,f){return i===i&&(f!==r&&(i=i<=f?i:f),l!==r&&(i=i>=l?i:l)),i}function gn(i,l,f,m,_,x){var I,P=l&g,H=l&y,Y=l&w;if(f&&(I=_?f(i,m,_,x):f(i)),I!==r)return I;if(!st(i))return i;var J=Be(i);if(J){if(I=lz(i),!P)return Ht(i,I)}else{var Q=$t(i),oe=Q==Rl||Q==Ey;if(Qr(i))return q0(i,P);if(Q==pr||Q==Ke||oe&&!_){if(I=H||oe?{}:f_(i),!P)return H?Y4(i,b4(I,i)):X4(i,v0(I,i))}else{if(!Je[Q])return _?i:{};I=cz(i,Q,P)}}x||(x=new Un);var pe=x.get(i);if(pe)return pe;x.set(i,I),z_(i)?i.forEach(function(be){I.add(gn(be,l,f,be,i,x))}):L_(i)&&i.forEach(function(be,Me){I.set(Me,gn(be,l,f,Me,i,x))});var we=Y?H?Rf:$f:H?Gt:xt,Ie=J?r:we(i);return pn(Ie||i,function(be,Me){Ie&&(Me=be,be=i[Me]),Ki(I,Me,gn(be,l,f,Me,i,x))}),I}function k4(i){var l=xt(i);return function(f){return C0(f,i,l)}}function C0(i,l,f){var m=f.length;if(i==null)return!m;for(i=Ye(i);m--;){var _=f[m],x=l[_],I=i[_];if(I===r&&!(_ in i)||!x(I))return!1}return!0}function E0(i,l,f){if(typeof i!="function")throw new hn(c);return ns(function(){i.apply(r,f)},l)}function Xi(i,l,f,m){var _=-1,x=Pl,I=!0,P=i.length,H=[],Y=l.length;if(!P)return H;f&&(l=nt(l,an(f))),m?(x=Ju,I=!1):l.length>=a&&(x=ji,I=!1,l=new So(l));e:for(;++_<P;){var J=i[_],Q=f==null?J:f(J);if(J=m||J!==0?J:0,I&&Q===Q){for(var oe=Y;oe--;)if(l[oe]===Q)continue e;H.push(J)}else x(l,Q,m)||H.push(J)}return H}var Kr=J0(tr),S0=J0(mf,!0);function x4(i,l){var f=!0;return Kr(i,function(m,_,x){return f=!!l(m,_,x),f}),f}function nc(i,l,f){for(var m=-1,_=i.length;++m<_;){var x=i[m],I=l(x);if(I!=null&&(P===r?I===I&&!ln(I):f(I,P)))var P=I,H=x}return H}function v4(i,l,f,m){var _=i.length;for(f=Ae(f),f<0&&(f=-f>_?0:_+f),m=m===r||m>_?_:Ae(m),m<0&&(m+=_),m=f>m?0:j_(m);f<m;)i[f++]=l;return i}function N0(i,l){var f=[];return Kr(i,function(m,_,x){l(m,_,x)&&f.push(m)}),f}function St(i,l,f,m,_){var x=-1,I=i.length;for(f||(f=uz),_||(_=[]);++x<I;){var P=i[x];l>0&&f(P)?l>1?St(P,l-1,f,m,_):Hr(_,P):m||(_[_.length]=P)}return _}var hf=Q0(),B0=Q0(!0);function tr(i,l){return i&&hf(i,l,xt)}function mf(i,l){return i&&B0(i,l,xt)}function rc(i,l){return Wr(l,function(f){return br(i[f])})}function Bo(i,l){l=Yr(l,i);for(var f=0,m=l.length;i!=null&&f<m;)i=i[rr(l[f++])];return f&&f==m?i:r}function V0(i,l,f){var m=l(i);return Be(i)?m:Hr(m,f(i))}function Lt(i){return i==null?i===r?JL:XL:Co&&Co in Ye(i)?az(i):_z(i)}function gf(i,l){return i>l}function C4(i,l){return i!=null&&Xe.call(i,l)}function E4(i,l){return i!=null&&l in Ye(i)}function S4(i,l,f){return i>=At(l,f)&&i<wt(l,f)}function yf(i,l,f){for(var m=f?Ju:Pl,_=i[0].length,x=i.length,I=x,P=K(x),H=1/0,Y=[];I--;){var J=i[I];I&&l&&(J=nt(J,an(l))),H=At(J.length,H),P[I]=!f&&(l||_>=120&&J.length>=120)?new So(I&&J):r}J=i[0];var Q=-1,oe=P[0];e:for(;++Q<_&&Y.length<H;){var pe=J[Q],we=l?l(pe):pe;if(pe=f||pe!==0?pe:0,!(oe?ji(oe,we):m(Y,we,f))){for(I=x;--I;){var Ie=P[I];if(!(Ie?ji(Ie,we):m(i[I],we,f)))continue e}oe&&oe.push(we),Y.push(pe)}}return Y}function N4(i,l,f,m){return tr(i,function(_,x,I){l(m,f(_),x,I)}),m}function Yi(i,l,f){l=Yr(l,i),i=g_(i,l);var m=i==null?i:i[rr(_n(l))];return m==null?r:on(m,i,f)}function T0(i){return ct(i)&&Lt(i)==Ke}function B4(i){return ct(i)&&Lt(i)==Ui}function V4(i){return ct(i)&&Lt(i)==Mi}function Ji(i,l,f,m,_){return i===l?!0:i==null||l==null||!ct(i)&&!ct(l)?i!==i&&l!==l:T4(i,l,f,m,Ji,_)}function T4(i,l,f,m,_,x){var I=Be(i),P=Be(l),H=I?Wt:$t(i),Y=P?Wt:$t(l);H=H==Ke?pr:H,Y=Y==Ke?pr:Y;var J=H==pr,Q=Y==pr,oe=H==Y;if(oe&&Qr(i)){if(!Qr(l))return!1;I=!0,J=!1}if(oe&&!J)return x||(x=new Un),I||Ea(i)?c_(i,l,f,m,_,x):rz(i,l,H,f,m,_,x);if(!(f&E)){var pe=J&&Xe.call(i,"__wrapped__"),we=Q&&Xe.call(l,"__wrapped__");if(pe||we){var Ie=pe?i.value():i,be=we?l.value():l;return x||(x=new Un),_(Ie,be,f,m,x)}}return oe?(x||(x=new Un),oz(i,l,f,m,_,x)):!1}function A4(i){return ct(i)&&$t(i)==Ln}function _f(i,l,f,m){var _=f.length,x=_,I=!m;if(i==null)return!x;for(i=Ye(i);_--;){var P=f[_];if(I&&P[2]?P[1]!==i[P[0]]:!(P[0]in i))return!1}for(;++_<x;){P=f[_];var H=P[0],Y=i[H],J=P[1];if(I&&P[2]){if(Y===r&&!(H in i))return!1}else{var Q=new Un;if(m)var oe=m(Y,J,H,i,l,Q);if(!(oe===r?Ji(J,Y,E|N,m,Q):oe))return!1}}return!0}function A0(i){if(!st(i)||pz(i))return!1;var l=br(i)?AF:k3;return l.test(To(i))}function $4(i){return ct(i)&&Lt(i)==Li}function R4(i){return ct(i)&&$t(i)==Fn}function O4(i){return ct(i)&&bc(i.length)&&!!et[Lt(i)]}function $0(i){return typeof i=="function"?i:i==null?Kt:typeof i=="object"?Be(i)?I0(i[0],i[1]):O0(i):ew(i)}function wf(i){if(!ts(i))return MF(i);var l=[];for(var f in Ye(i))Xe.call(i,f)&&f!="constructor"&&l.push(f);return l}function I4(i){if(!st(i))return yz(i);var l=ts(i),f=[];for(var m in i)m=="constructor"&&(l||!Xe.call(i,m))||f.push(m);return f}function bf(i,l){return i<l}function R0(i,l){var f=-1,m=qt(i)?K(i.length):[];return Kr(i,function(_,x,I){m[++f]=l(_,x,I)}),m}function O0(i){var l=If(i);return l.length==1&&l[0][2]?h_(l[0][0],l[0][1]):function(f){return f===i||_f(f,i,l)}}function I0(i,l){return Mf(i)&&p_(l)?h_(rr(i),l):function(f){var m=qf(f,i);return m===r&&m===l?Gf(f,i):Ji(l,m,E|N)}}function oc(i,l,f,m,_){i!==l&&hf(l,function(x,I){if(_||(_=new Un),st(x))D4(i,l,I,f,oc,m,_);else{var P=m?m(Lf(i,I),x,I+"",i,l,_):r;P===r&&(P=x),ff(i,I,P)}},Gt)}function D4(i,l,f,m,_,x,I){var P=Lf(i,f),H=Lf(l,f),Y=I.get(H);if(Y){ff(i,f,Y);return}var J=x?x(P,H,f+"",i,l,I):r,Q=J===r;if(Q){var oe=Be(H),pe=!oe&&Qr(H),we=!oe&&!pe&&Ea(H);J=H,oe||pe||we?Be(P)?J=P:ut(P)?J=Ht(P):pe?(Q=!1,J=q0(H,!0)):we?(Q=!1,J=G0(H,!0)):J=[]:rs(H)||Ao(H)?(J=P,Ao(P)?J=Z_(P):(!st(P)||br(P))&&(J=f_(H))):Q=!1}Q&&(I.set(H,J),_(J,H,m,x,I),I.delete(H)),ff(i,f,J)}function D0(i,l){var f=i.length;if(f)return l+=l<0?f:0,wr(l,f)?i[l]:r}function M0(i,l,f){l.length?l=nt(l,function(x){return Be(x)?function(I){return Bo(I,x.length===1?x[0]:x)}:x}):l=[Kt];var m=-1;l=nt(l,an(_e()));var _=R0(i,function(x,I,P){var H=nt(l,function(Y){return Y(x)});return{criteria:H,index:++m,value:x}});return cF(_,function(x,I){return K4(x,I,f)})}function M4(i,l){return P0(i,l,function(f,m){return Gf(i,m)})}function P0(i,l,f){for(var m=-1,_=l.length,x={};++m<_;){var I=l[m],P=Bo(i,I);f(P,I)&&Qi(x,Yr(I,i),P)}return x}function P4(i){return function(l){return Bo(l,i)}}function kf(i,l,f,m){var _=m?lF:ha,x=-1,I=l.length,P=i;for(i===l&&(l=Ht(l)),f&&(P=nt(i,an(f)));++x<I;)for(var H=0,Y=l[x],J=f?f(Y):Y;(H=_(P,J,H,m))>-1;)P!==i&&Gl.call(P,H,1),Gl.call(i,H,1);return i}function L0(i,l){for(var f=i?l.length:0,m=f-1;f--;){var _=l[f];if(f==m||_!==x){var x=_;wr(_)?Gl.call(i,_,1):Ef(i,_)}}return i}function xf(i,l){return i+Yl(w0()*(l-i+1))}function L4(i,l,f,m){for(var _=-1,x=wt(Xl((l-i)/(f||1)),0),I=K(x);x--;)I[m?x:++_]=i,i+=f;return I}function vf(i,l){var f="";if(!i||l<1||l>G)return f;do l%2&&(f+=i),l=Yl(l/2),l&&(i+=i);while(l);return f}function De(i,l){return Ff(m_(i,l,Kt),i+"")}function F4(i){return x0(Sa(i))}function z4(i,l){var f=Sa(i);return hc(f,No(l,0,f.length))}function Qi(i,l,f,m){if(!st(i))return i;l=Yr(l,i);for(var _=-1,x=l.length,I=x-1,P=i;P!=null&&++_<x;){var H=rr(l[_]),Y=f;if(H==="__proto__"||H==="constructor"||H==="prototype")return i;if(_!=I){var J=P[H];Y=m?m(J,H,P):r,Y===r&&(Y=st(J)?J:wr(l[_+1])?[]:{})}Ki(P,H,Y),P=P[H]}return i}var F0=Jl?function(i,l){return Jl.set(i,l),i}:Kt,U4=Kl?function(i,l){return Kl(i,"toString",{configurable:!0,enumerable:!1,value:Xf(l),writable:!0})}:Kt;function j4(i){return hc(Sa(i))}function yn(i,l,f){var m=-1,_=i.length;l<0&&(l=-l>_?0:_+l),f=f>_?_:f,f<0&&(f+=_),_=l>f?0:f-l>>>0,l>>>=0;for(var x=K(_);++m<_;)x[m]=i[m+l];return x}function Z4(i,l){var f;return Kr(i,function(m,_,x){return f=l(m,_,x),!f}),!!f}function ac(i,l,f){var m=0,_=i==null?m:i.length;if(typeof l=="number"&&l===l&&_<=He){for(;m<_;){var x=m+_>>>1,I=i[x];I!==null&&!ln(I)&&(f?I<=l:I<l)?m=x+1:_=x}return _}return Cf(i,l,Kt,f)}function Cf(i,l,f,m){var _=0,x=i==null?0:i.length;if(x===0)return 0;l=f(l);for(var I=l!==l,P=l===null,H=ln(l),Y=l===r;_<x;){var J=Yl((_+x)/2),Q=f(i[J]),oe=Q!==r,pe=Q===null,we=Q===Q,Ie=ln(Q);if(I)var be=m||we;else Y?be=we&&(m||oe):P?be=we&&oe&&(m||!pe):H?be=we&&oe&&!pe&&(m||!Ie):pe||Ie?be=!1:be=m?Q<=l:Q<l;be?_=J+1:x=J}return At(x,Ce)}function z0(i,l){for(var f=-1,m=i.length,_=0,x=[];++f<m;){var I=i[f],P=l?l(I):I;if(!f||!jn(P,H)){var H=P;x[_++]=I===0?0:I}}return x}function U0(i){return typeof i=="number"?i:ln(i)?ue:+i}function sn(i){if(typeof i=="string")return i;if(Be(i))return nt(i,sn)+"";if(ln(i))return b0?b0.call(i):"";var l=i+"";return l=="0"&&1/i==-j?"-0":l}function Xr(i,l,f){var m=-1,_=Pl,x=i.length,I=!0,P=[],H=P;if(f)I=!1,_=Ju;else if(x>=a){var Y=l?null:tz(i);if(Y)return Fl(Y);I=!1,_=ji,H=new So}else H=l?[]:P;e:for(;++m<x;){var J=i[m],Q=l?l(J):J;if(J=f||J!==0?J:0,I&&Q===Q){for(var oe=H.length;oe--;)if(H[oe]===Q)continue e;l&&H.push(Q),P.push(J)}else _(H,Q,f)||(H!==P&&H.push(Q),P.push(J))}return P}function Ef(i,l){return l=Yr(l,i),i=g_(i,l),i==null||delete i[rr(_n(l))]}function j0(i,l,f,m){return Qi(i,l,f(Bo(i,l)),m)}function ic(i,l,f,m){for(var _=i.length,x=m?_:-1;(m?x--:++x<_)&&l(i[x],x,i););return f?yn(i,m?0:x,m?x+1:_):yn(i,m?x+1:0,m?_:x)}function Z0(i,l){var f=i;return f instanceof Pe&&(f=f.value()),Qu(l,function(m,_){return _.func.apply(_.thisArg,Hr([m],_.args))},f)}function Sf(i,l,f){var m=i.length;if(m<2)return m?Xr(i[0]):[];for(var _=-1,x=K(m);++_<m;)for(var I=i[_],P=-1;++P<m;)P!=_&&(x[_]=Xi(x[_]||I,i[P],l,f));return Xr(St(x,1),l,f)}function W0(i,l,f){for(var m=-1,_=i.length,x=l.length,I={};++m<_;){var P=m<x?l[m]:r;f(I,i[m],P)}return I}function Nf(i){return ut(i)?i:[]}function Bf(i){return typeof i=="function"?i:Kt}function Yr(i,l){return Be(i)?i:Mf(i,l)?[i]:b_(Ge(i))}var W4=De;function Jr(i,l,f){var m=i.length;return f=f===r?m:f,!l&&f>=m?i:yn(i,l,f)}var H0=$F||function(i){return Et.clearTimeout(i)};function q0(i,l){if(l)return i.slice();var f=i.length,m=h0?h0(f):new i.constructor(f);return i.copy(m),m}function Vf(i){var l=new i.constructor(i.byteLength);return new Hl(l).set(new Hl(i)),l}function H4(i,l){var f=l?Vf(i.buffer):i.buffer;return new i.constructor(f,i.byteOffset,i.byteLength)}function q4(i){var l=new i.constructor(i.source,Ty.exec(i));return l.lastIndex=i.lastIndex,l}function G4(i){return Gi?Ye(Gi.call(i)):{}}function G0(i,l){var f=l?Vf(i.buffer):i.buffer;return new i.constructor(f,i.byteOffset,i.length)}function K0(i,l){if(i!==l){var f=i!==r,m=i===null,_=i===i,x=ln(i),I=l!==r,P=l===null,H=l===l,Y=ln(l);if(!P&&!Y&&!x&&i>l||x&&I&&H&&!P&&!Y||m&&I&&H||!f&&H||!_)return 1;if(!m&&!x&&!Y&&i<l||Y&&f&&_&&!m&&!x||P&&f&&_||!I&&_||!H)return-1}return 0}function K4(i,l,f){for(var m=-1,_=i.criteria,x=l.criteria,I=_.length,P=f.length;++m<I;){var H=K0(_[m],x[m]);if(H){if(m>=P)return H;var Y=f[m];return H*(Y=="desc"?-1:1)}}return i.index-l.index}function X0(i,l,f,m){for(var _=-1,x=i.length,I=f.length,P=-1,H=l.length,Y=wt(x-I,0),J=K(H+Y),Q=!m;++P<H;)J[P]=l[P];for(;++_<I;)(Q||_<x)&&(J[f[_]]=i[_]);for(;Y--;)J[P++]=i[_++];return J}function Y0(i,l,f,m){for(var _=-1,x=i.length,I=-1,P=f.length,H=-1,Y=l.length,J=wt(x-P,0),Q=K(J+Y),oe=!m;++_<J;)Q[_]=i[_];for(var pe=_;++H<Y;)Q[pe+H]=l[H];for(;++I<P;)(oe||_<x)&&(Q[pe+f[I]]=i[_++]);return Q}function Ht(i,l){var f=-1,m=i.length;for(l||(l=K(m));++f<m;)l[f]=i[f];return l}function nr(i,l,f,m){var _=!f;f||(f={});for(var x=-1,I=l.length;++x<I;){var P=l[x],H=m?m(f[P],i[P],P,f,i):r;H===r&&(H=i[P]),_?gr(f,P,H):Ki(f,P,H)}return f}function X4(i,l){return nr(i,Df(i),l)}function Y4(i,l){return nr(i,d_(i),l)}function sc(i,l){return function(f,m){var _=Be(f)?nF:w4,x=l?l():{};return _(f,i,_e(m,2),x)}}function xa(i){return De(function(l,f){var m=-1,_=f.length,x=_>1?f[_-1]:r,I=_>2?f[2]:r;for(x=i.length>3&&typeof x=="function"?(_--,x):r,I&&Ft(f[0],f[1],I)&&(x=_<3?r:x,_=1),l=Ye(l);++m<_;){var P=f[m];P&&i(l,P,m,x)}return l})}function J0(i,l){return function(f,m){if(f==null)return f;if(!qt(f))return i(f,m);for(var _=f.length,x=l?_:-1,I=Ye(f);(l?x--:++x<_)&&m(I[x],x,I)!==!1;);return f}}function Q0(i){return function(l,f,m){for(var _=-1,x=Ye(l),I=m(l),P=I.length;P--;){var H=I[i?P:++_];if(f(x[H],H,x)===!1)break}return l}}function J4(i,l,f){var m=l&V,_=es(i);function x(){var I=this&&this!==Et&&this instanceof x?_:i;return I.apply(m?f:this,arguments)}return x}function e_(i){return function(l){l=Ge(l);var f=ma(l)?zn(l):r,m=f?f[0]:l.charAt(0),_=f?Jr(f,1).join(""):l.slice(1);return m[i]()+_}}function va(i){return function(l){return Qu(J_(Y_(l).replace(U3,"")),i,"")}}function es(i){return function(){var l=arguments;switch(l.length){case 0:return new i;case 1:return new i(l[0]);case 2:return new i(l[0],l[1]);case 3:return new i(l[0],l[1],l[2]);case 4:return new i(l[0],l[1],l[2],l[3]);case 5:return new i(l[0],l[1],l[2],l[3],l[4]);case 6:return new i(l[0],l[1],l[2],l[3],l[4],l[5]);case 7:return new i(l[0],l[1],l[2],l[3],l[4],l[5],l[6])}var f=ka(i.prototype),m=i.apply(f,l);return st(m)?m:f}}function Q4(i,l,f){var m=es(i);function _(){for(var x=arguments.length,I=K(x),P=x,H=Ca(_);P--;)I[P]=arguments[P];var Y=x<3&&I[0]!==H&&I[x-1]!==H?[]:qr(I,H);if(x-=Y.length,x<f)return a_(i,l,lc,_.placeholder,r,I,Y,r,r,f-x);var J=this&&this!==Et&&this instanceof _?m:i;return on(J,this,I)}return _}function t_(i){return function(l,f,m){var _=Ye(l);if(!qt(l)){var x=_e(f,3);l=xt(l),f=function(P){return x(_[P],P,_)}}var I=i(l,f,m);return I>-1?_[x?l[I]:I]:r}}function n_(i){return _r(function(l){var f=l.length,m=f,_=mn.prototype.thru;for(i&&l.reverse();m--;){var x=l[m];if(typeof x!="function")throw new hn(c);if(_&&!I&&fc(x)=="wrapper")var I=new mn([],!0)}for(m=I?m:f;++m<f;){x=l[m];var P=fc(x),H=P=="wrapper"?Of(x):r;H&&Pf(H[0])&&H[1]==(z|$|R|q)&&!H[4].length&&H[9]==1?I=I[fc(H[0])].apply(I,H[3]):I=x.length==1&&Pf(x)?I[P]():I.thru(x)}return function(){var Y=arguments,J=Y[0];if(I&&Y.length==1&&Be(J))return I.plant(J).value();for(var Q=0,oe=f?l[Q].apply(this,Y):J;++Q<f;)oe=l[Q].call(this,oe);return oe}})}function lc(i,l,f,m,_,x,I,P,H,Y){var J=l&z,Q=l&V,oe=l&D,pe=l&($|W),we=l&C,Ie=oe?r:es(i);function be(){for(var Me=arguments.length,Ue=K(Me),cn=Me;cn--;)Ue[cn]=arguments[cn];if(pe)var zt=Ca(be),dn=uF(Ue,zt);if(m&&(Ue=X0(Ue,m,_,pe)),x&&(Ue=Y0(Ue,x,I,pe)),Me-=dn,pe&&Me<Y){var ft=qr(Ue,zt);return a_(i,l,lc,be.placeholder,f,Ue,ft,P,H,Y-Me)}var Zn=Q?f:this,xr=oe?Zn[i]:i;return Me=Ue.length,P?Ue=wz(Ue,P):we&&Me>1&&Ue.reverse(),J&&H<Me&&(Ue.length=H),this&&this!==Et&&this instanceof be&&(xr=Ie||es(xr)),xr.apply(Zn,Ue)}return be}function r_(i,l){return function(f,m){return N4(f,i,l(m),{})}}function cc(i,l){return function(f,m){var _;if(f===r&&m===r)return l;if(f!==r&&(_=f),m!==r){if(_===r)return m;typeof f=="string"||typeof m=="string"?(f=sn(f),m=sn(m)):(f=U0(f),m=U0(m)),_=i(f,m)}return _}}function Tf(i){return _r(function(l){return l=nt(l,an(_e())),De(function(f){var m=this;return i(l,function(_){return on(_,m,f)})})})}function dc(i,l){l=l===r?" ":sn(l);var f=l.length;if(f<2)return f?vf(l,i):l;var m=vf(l,Xl(i/ga(l)));return ma(l)?Jr(zn(m),0,i).join(""):m.slice(0,i)}function ez(i,l,f,m){var _=l&V,x=es(i);function I(){for(var P=-1,H=arguments.length,Y=-1,J=m.length,Q=K(J+H),oe=this&&this!==Et&&this instanceof I?x:i;++Y<J;)Q[Y]=m[Y];for(;H--;)Q[Y++]=arguments[++P];return on(oe,_?f:this,Q)}return I}function o_(i){return function(l,f,m){return m&&typeof m!="number"&&Ft(l,f,m)&&(f=m=r),l=kr(l),f===r?(f=l,l=0):f=kr(f),m=m===r?l<f?1:-1:kr(m),L4(l,f,m,i)}}function uc(i){return function(l,f){return typeof l=="string"&&typeof f=="string"||(l=wn(l),f=wn(f)),i(l,f)}}function a_(i,l,f,m,_,x,I,P,H,Y){var J=l&$,Q=J?I:r,oe=J?r:I,pe=J?x:r,we=J?r:x;l|=J?R:B,l&=~(J?B:R),l&F||(l&=~(V|D));var Ie=[i,l,_,pe,Q,we,oe,P,H,Y],be=f.apply(r,Ie);return Pf(i)&&y_(be,Ie),be.placeholder=m,__(be,i,l)}function Af(i){var l=_t[i];return function(f,m){if(f=wn(f),m=m==null?0:At(Ae(m),292),m&&_0(f)){var _=(Ge(f)+"e").split("e"),x=l(_[0]+"e"+(+_[1]+m));return _=(Ge(x)+"e").split("e"),+(_[0]+"e"+(+_[1]-m))}return l(f)}}var tz=wa&&1/Fl(new wa([,-0]))[1]==j?function(i){return new wa(i)}:Qf;function i_(i){return function(l){var f=$t(l);return f==Ln?sf(l):f==Fn?_F(l):dF(l,i(l))}}function yr(i,l,f,m,_,x,I,P){var H=l&D;if(!H&&typeof i!="function")throw new hn(c);var Y=m?m.length:0;if(Y||(l&=~(R|B),m=_=r),I=I===r?I:wt(Ae(I),0),P=P===r?P:Ae(P),Y-=_?_.length:0,l&B){var J=m,Q=_;m=_=r}var oe=H?r:Of(i),pe=[i,l,f,m,_,J,Q,x,I,P];if(oe&&gz(pe,oe),i=pe[0],l=pe[1],f=pe[2],m=pe[3],_=pe[4],P=pe[9]=pe[9]===r?H?0:i.length:wt(pe[9]-Y,0),!P&&l&($|W)&&(l&=~($|W)),!l||l==V)var we=J4(i,l,f);else l==$||l==W?we=Q4(i,l,P):(l==R||l==(V|R))&&!_.length?we=ez(i,l,f,m):we=lc.apply(r,pe);var Ie=oe?F0:y_;return __(Ie(we,pe),i,l)}function s_(i,l,f,m){return i===r||jn(i,_a[f])&&!Xe.call(m,f)?l:i}function l_(i,l,f,m,_,x){return st(i)&&st(l)&&(x.set(l,i),oc(i,l,r,l_,x),x.delete(l)),i}function nz(i){return rs(i)?r:i}function c_(i,l,f,m,_,x){var I=f&E,P=i.length,H=l.length;if(P!=H&&!(I&&H>P))return!1;var Y=x.get(i),J=x.get(l);if(Y&&J)return Y==l&&J==i;var Q=-1,oe=!0,pe=f&N?new So:r;for(x.set(i,l),x.set(l,i);++Q<P;){var we=i[Q],Ie=l[Q];if(m)var be=I?m(Ie,we,Q,l,i,x):m(we,Ie,Q,i,l,x);if(be!==r){if(be)continue;oe=!1;break}if(pe){if(!ef(l,function(Me,Ue){if(!ji(pe,Ue)&&(we===Me||_(we,Me,f,m,x)))return pe.push(Ue)})){oe=!1;break}}else if(!(we===Ie||_(we,Ie,f,m,x))){oe=!1;break}}return x.delete(i),x.delete(l),oe}function rz(i,l,f,m,_,x,I){switch(f){case fa:if(i.byteLength!=l.byteLength||i.byteOffset!=l.byteOffset)return!1;i=i.buffer,l=l.buffer;case Ui:return!(i.byteLength!=l.byteLength||!x(new Hl(i),new Hl(l)));case Di:case Mi:case Pi:return jn(+i,+l);case $l:return i.name==l.name&&i.message==l.message;case Li:case Fi:return i==l+"";case Ln:var P=sf;case Fn:var H=m&E;if(P||(P=Fl),i.size!=l.size&&!H)return!1;var Y=I.get(i);if(Y)return Y==l;m|=N,I.set(i,l);var J=c_(P(i),P(l),m,_,x,I);return I.delete(i),J;case Ol:if(Gi)return Gi.call(i)==Gi.call(l)}return!1}function oz(i,l,f,m,_,x){var I=f&E,P=$f(i),H=P.length,Y=$f(l),J=Y.length;if(H!=J&&!I)return!1;for(var Q=H;Q--;){var oe=P[Q];if(!(I?oe in l:Xe.call(l,oe)))return!1}var pe=x.get(i),we=x.get(l);if(pe&&we)return pe==l&&we==i;var Ie=!0;x.set(i,l),x.set(l,i);for(var be=I;++Q<H;){oe=P[Q];var Me=i[oe],Ue=l[oe];if(m)var cn=I?m(Ue,Me,oe,l,i,x):m(Me,Ue,oe,i,l,x);if(!(cn===r?Me===Ue||_(Me,Ue,f,m,x):cn)){Ie=!1;break}be||(be=oe=="constructor")}if(Ie&&!be){var zt=i.constructor,dn=l.constructor;zt!=dn&&"constructor"in i&&"constructor"in l&&!(typeof zt=="function"&&zt instanceof zt&&typeof dn=="function"&&dn instanceof dn)&&(Ie=!1)}return x.delete(i),x.delete(l),Ie}function _r(i){return Ff(m_(i,r,C_),i+"")}function $f(i){return V0(i,xt,Df)}function Rf(i){return V0(i,Gt,d_)}var Of=Jl?function(i){return Jl.get(i)}:Qf;function fc(i){for(var l=i.name+"",f=ba[l],m=Xe.call(ba,l)?f.length:0;m--;){var _=f[m],x=_.func;if(x==null||x==i)return _.name}return l}function Ca(i){var l=Xe.call(b,"placeholder")?b:i;return l.placeholder}function _e(){var i=b.iteratee||Yf;return i=i===Yf?$0:i,arguments.length?i(arguments[0],arguments[1]):i}function pc(i,l){var f=i.__data__;return fz(l)?f[typeof l=="string"?"string":"hash"]:f.map}function If(i){for(var l=xt(i),f=l.length;f--;){var m=l[f],_=i[m];l[f]=[m,_,p_(_)]}return l}function Vo(i,l){var f=mF(i,l);return A0(f)?f:r}function az(i){var l=Xe.call(i,Co),f=i[Co];try{i[Co]=r;var m=!0}catch{}var _=Zl.call(i);return m&&(l?i[Co]=f:delete i[Co]),_}var Df=cf?function(i){return i==null?[]:(i=Ye(i),Wr(cf(i),function(l){return g0.call(i,l)}))}:ep,d_=cf?function(i){for(var l=[];i;)Hr(l,Df(i)),i=ql(i);return l}:ep,$t=Lt;(df&&$t(new df(new ArrayBuffer(1)))!=fa||Wi&&$t(new Wi)!=Ln||uf&&$t(uf.resolve())!=Sy||wa&&$t(new wa)!=Fn||Hi&&$t(new Hi)!=zi)&&($t=function(i){var l=Lt(i),f=l==pr?i.constructor:r,m=f?To(f):"";if(m)switch(m){case zF:return fa;case UF:return Ln;case jF:return Sy;case ZF:return Fn;case WF:return zi}return l});function iz(i,l,f){for(var m=-1,_=f.length;++m<_;){var x=f[m],I=x.size;switch(x.type){case"drop":i+=I;break;case"dropRight":l-=I;break;case"take":l=At(l,i+I);break;case"takeRight":i=wt(i,l-I);break}}return{start:i,end:l}}function sz(i){var l=i.match(p3);return l?l[1].split(h3):[]}function u_(i,l,f){l=Yr(l,i);for(var m=-1,_=l.length,x=!1;++m<_;){var I=rr(l[m]);if(!(x=i!=null&&f(i,I)))break;i=i[I]}return x||++m!=_?x:(_=i==null?0:i.length,!!_&&bc(_)&&wr(I,_)&&(Be(i)||Ao(i)))}function lz(i){var l=i.length,f=new i.constructor(l);return l&&typeof i[0]=="string"&&Xe.call(i,"index")&&(f.index=i.index,f.input=i.input),f}function f_(i){return typeof i.constructor=="function"&&!ts(i)?ka(ql(i)):{}}function cz(i,l,f){var m=i.constructor;switch(l){case Ui:return Vf(i);case Di:case Mi:return new m(+i);case fa:return H4(i,f);case Ou:case Iu:case Du:case Mu:case Pu:case Lu:case Fu:case zu:case Uu:return G0(i,f);case Ln:return new m;case Pi:case Fi:return new m(i);case Li:return q4(i);case Fn:return new m;case Ol:return G4(i)}}function dz(i,l){var f=l.length;if(!f)return i;var m=f-1;return l[m]=(f>1?"& ":"")+l[m],l=l.join(f>2?", ":" "),i.replace(f3,`{
|
|
61
|
-
/* [wrapped with `+
|
|
62
|
-
`)}function uz(i){return Be(i)||Ao(i)||!!(y0&&i&&i[y0])}function wr(i,l){var f=typeof i;return l=l??G,!!l&&(f=="number"||f!="symbol"&&v3.test(i))&&i>-1&&i%1==0&&i<l}function Ft(i,l,f){if(!st(f))return!1;var m=typeof l;return(m=="number"?qt(f)&&wr(l,f.length):m=="string"&&l in f)?jn(f[l],i):!1}function Mf(i,l){if(Be(i))return!1;var f=typeof i;return f=="number"||f=="symbol"||f=="boolean"||i==null||ln(i)?!0:l3.test(i)||!s3.test(i)||l!=null&&i in Ye(l)}function fz(i){var l=typeof i;return l=="string"||l=="number"||l=="symbol"||l=="boolean"?i!=="__proto__":i===null}function Pf(i){var l=fc(i),f=b[l];if(typeof f!="function"||!(l in Pe.prototype))return!1;if(i===f)return!0;var m=Of(f);return!!m&&i===m[0]}function pz(i){return!!p0&&p0 in i}var hz=Ul?br:tp;function ts(i){var l=i&&i.constructor,f=typeof l=="function"&&l.prototype||_a;return i===f}function p_(i){return i===i&&!st(i)}function h_(i,l){return function(f){return f==null?!1:f[i]===l&&(l!==r||i in Ye(f))}}function mz(i){var l=_c(i,function(m){return f.size===p&&f.clear(),m}),f=l.cache;return l}function gz(i,l){var f=i[1],m=l[1],_=f|m,x=_<(V|D|z),I=m==z&&f==$||m==z&&f==q&&i[7].length<=l[8]||m==(z|q)&&l[7].length<=l[8]&&f==$;if(!(x||I))return i;m&V&&(i[2]=l[2],_|=f&V?0:F);var P=l[3];if(P){var H=i[3];i[3]=H?X0(H,P,l[4]):P,i[4]=H?qr(i[3],h):l[4]}return P=l[5],P&&(H=i[5],i[5]=H?Y0(H,P,l[6]):P,i[6]=H?qr(i[5],h):l[6]),P=l[7],P&&(i[7]=P),m&z&&(i[8]=i[8]==null?l[8]:At(i[8],l[8])),i[9]==null&&(i[9]=l[9]),i[0]=l[0],i[1]=_,i}function yz(i){var l=[];if(i!=null)for(var f in Ye(i))l.push(f);return l}function _z(i){return Zl.call(i)}function m_(i,l,f){return l=wt(l===r?i.length-1:l,0),function(){for(var m=arguments,_=-1,x=wt(m.length-l,0),I=K(x);++_<x;)I[_]=m[l+_];_=-1;for(var P=K(l+1);++_<l;)P[_]=m[_];return P[l]=f(I),on(i,this,P)}}function g_(i,l){return l.length<2?i:Bo(i,yn(l,0,-1))}function wz(i,l){for(var f=i.length,m=At(l.length,f),_=Ht(i);m--;){var x=l[m];i[m]=wr(x,f)?_[x]:r}return i}function Lf(i,l){if(!(l==="constructor"&&typeof i[l]=="function")&&l!="__proto__")return i[l]}var y_=w_(F0),ns=OF||function(i,l){return Et.setTimeout(i,l)},Ff=w_(U4);function __(i,l,f){var m=l+"";return Ff(i,dz(m,bz(sz(m),f)))}function w_(i){var l=0,f=0;return function(){var m=PF(),_=S-(m-f);if(f=m,_>0){if(++l>=O)return arguments[0]}else l=0;return i.apply(r,arguments)}}function hc(i,l){var f=-1,m=i.length,_=m-1;for(l=l===r?m:l;++f<l;){var x=xf(f,_),I=i[x];i[x]=i[f],i[f]=I}return i.length=l,i}var b_=mz(function(i){var l=[];return i.charCodeAt(0)===46&&l.push(""),i.replace(c3,function(f,m,_,x){l.push(_?x.replace(y3,"$1"):m||f)}),l});function rr(i){if(typeof i=="string"||ln(i))return i;var l=i+"";return l=="0"&&1/i==-j?"-0":l}function To(i){if(i!=null){try{return jl.call(i)}catch{}try{return i+""}catch{}}return""}function bz(i,l){return pn(Ct,function(f){var m="_."+f[0];l&f[1]&&!Pl(i,m)&&i.push(m)}),i.sort()}function k_(i){if(i instanceof Pe)return i.clone();var l=new mn(i.__wrapped__,i.__chain__);return l.__actions__=Ht(i.__actions__),l.__index__=i.__index__,l.__values__=i.__values__,l}function kz(i,l,f){(f?Ft(i,l,f):l===r)?l=1:l=wt(Ae(l),0);var m=i==null?0:i.length;if(!m||l<1)return[];for(var _=0,x=0,I=K(Xl(m/l));_<m;)I[x++]=yn(i,_,_+=l);return I}function xz(i){for(var l=-1,f=i==null?0:i.length,m=0,_=[];++l<f;){var x=i[l];x&&(_[m++]=x)}return _}function vz(){var i=arguments.length;if(!i)return[];for(var l=K(i-1),f=arguments[0],m=i;m--;)l[m-1]=arguments[m];return Hr(Be(f)?Ht(f):[f],St(l,1))}var Cz=De(function(i,l){return ut(i)?Xi(i,St(l,1,ut,!0)):[]}),Ez=De(function(i,l){var f=_n(l);return ut(f)&&(f=r),ut(i)?Xi(i,St(l,1,ut,!0),_e(f,2)):[]}),Sz=De(function(i,l){var f=_n(l);return ut(f)&&(f=r),ut(i)?Xi(i,St(l,1,ut,!0),r,f):[]});function Nz(i,l,f){var m=i==null?0:i.length;return m?(l=f||l===r?1:Ae(l),yn(i,l<0?0:l,m)):[]}function Bz(i,l,f){var m=i==null?0:i.length;return m?(l=f||l===r?1:Ae(l),l=m-l,yn(i,0,l<0?0:l)):[]}function Vz(i,l){return i&&i.length?ic(i,_e(l,3),!0,!0):[]}function Tz(i,l){return i&&i.length?ic(i,_e(l,3),!0):[]}function Az(i,l,f,m){var _=i==null?0:i.length;return _?(f&&typeof f!="number"&&Ft(i,l,f)&&(f=0,m=_),v4(i,l,f,m)):[]}function x_(i,l,f){var m=i==null?0:i.length;if(!m)return-1;var _=f==null?0:Ae(f);return _<0&&(_=wt(m+_,0)),Ll(i,_e(l,3),_)}function v_(i,l,f){var m=i==null?0:i.length;if(!m)return-1;var _=m-1;return f!==r&&(_=Ae(f),_=f<0?wt(m+_,0):At(_,m-1)),Ll(i,_e(l,3),_,!0)}function C_(i){var l=i==null?0:i.length;return l?St(i,1):[]}function $z(i){var l=i==null?0:i.length;return l?St(i,j):[]}function Rz(i,l){var f=i==null?0:i.length;return f?(l=l===r?1:Ae(l),St(i,l)):[]}function Oz(i){for(var l=-1,f=i==null?0:i.length,m={};++l<f;){var _=i[l];m[_[0]]=_[1]}return m}function E_(i){return i&&i.length?i[0]:r}function Iz(i,l,f){var m=i==null?0:i.length;if(!m)return-1;var _=f==null?0:Ae(f);return _<0&&(_=wt(m+_,0)),ha(i,l,_)}function Dz(i){var l=i==null?0:i.length;return l?yn(i,0,-1):[]}var Mz=De(function(i){var l=nt(i,Nf);return l.length&&l[0]===i[0]?yf(l):[]}),Pz=De(function(i){var l=_n(i),f=nt(i,Nf);return l===_n(f)?l=r:f.pop(),f.length&&f[0]===i[0]?yf(f,_e(l,2)):[]}),Lz=De(function(i){var l=_n(i),f=nt(i,Nf);return l=typeof l=="function"?l:r,l&&f.pop(),f.length&&f[0]===i[0]?yf(f,r,l):[]});function Fz(i,l){return i==null?"":DF.call(i,l)}function _n(i){var l=i==null?0:i.length;return l?i[l-1]:r}function zz(i,l,f){var m=i==null?0:i.length;if(!m)return-1;var _=m;return f!==r&&(_=Ae(f),_=_<0?wt(m+_,0):At(_,m-1)),l===l?bF(i,l,_):Ll(i,a0,_,!0)}function Uz(i,l){return i&&i.length?D0(i,Ae(l)):r}var jz=De(S_);function S_(i,l){return i&&i.length&&l&&l.length?kf(i,l):i}function Zz(i,l,f){return i&&i.length&&l&&l.length?kf(i,l,_e(f,2)):i}function Wz(i,l,f){return i&&i.length&&l&&l.length?kf(i,l,r,f):i}var Hz=_r(function(i,l){var f=i==null?0:i.length,m=pf(i,l);return L0(i,nt(l,function(_){return wr(_,f)?+_:_}).sort(K0)),m});function qz(i,l){var f=[];if(!(i&&i.length))return f;var m=-1,_=[],x=i.length;for(l=_e(l,3);++m<x;){var I=i[m];l(I,m,i)&&(f.push(I),_.push(m))}return L0(i,_),f}function zf(i){return i==null?i:FF.call(i)}function Gz(i,l,f){var m=i==null?0:i.length;return m?(f&&typeof f!="number"&&Ft(i,l,f)?(l=0,f=m):(l=l==null?0:Ae(l),f=f===r?m:Ae(f)),yn(i,l,f)):[]}function Kz(i,l){return ac(i,l)}function Xz(i,l,f){return Cf(i,l,_e(f,2))}function Yz(i,l){var f=i==null?0:i.length;if(f){var m=ac(i,l);if(m<f&&jn(i[m],l))return m}return-1}function Jz(i,l){return ac(i,l,!0)}function Qz(i,l,f){return Cf(i,l,_e(f,2),!0)}function e5(i,l){var f=i==null?0:i.length;if(f){var m=ac(i,l,!0)-1;if(jn(i[m],l))return m}return-1}function t5(i){return i&&i.length?z0(i):[]}function n5(i,l){return i&&i.length?z0(i,_e(l,2)):[]}function r5(i){var l=i==null?0:i.length;return l?yn(i,1,l):[]}function o5(i,l,f){return i&&i.length?(l=f||l===r?1:Ae(l),yn(i,0,l<0?0:l)):[]}function a5(i,l,f){var m=i==null?0:i.length;return m?(l=f||l===r?1:Ae(l),l=m-l,yn(i,l<0?0:l,m)):[]}function i5(i,l){return i&&i.length?ic(i,_e(l,3),!1,!0):[]}function s5(i,l){return i&&i.length?ic(i,_e(l,3)):[]}var l5=De(function(i){return Xr(St(i,1,ut,!0))}),c5=De(function(i){var l=_n(i);return ut(l)&&(l=r),Xr(St(i,1,ut,!0),_e(l,2))}),d5=De(function(i){var l=_n(i);return l=typeof l=="function"?l:r,Xr(St(i,1,ut,!0),r,l)});function u5(i){return i&&i.length?Xr(i):[]}function f5(i,l){return i&&i.length?Xr(i,_e(l,2)):[]}function p5(i,l){return l=typeof l=="function"?l:r,i&&i.length?Xr(i,r,l):[]}function Uf(i){if(!(i&&i.length))return[];var l=0;return i=Wr(i,function(f){if(ut(f))return l=wt(f.length,l),!0}),of(l,function(f){return nt(i,tf(f))})}function N_(i,l){if(!(i&&i.length))return[];var f=Uf(i);return l==null?f:nt(f,function(m){return on(l,r,m)})}var h5=De(function(i,l){return ut(i)?Xi(i,l):[]}),m5=De(function(i){return Sf(Wr(i,ut))}),g5=De(function(i){var l=_n(i);return ut(l)&&(l=r),Sf(Wr(i,ut),_e(l,2))}),y5=De(function(i){var l=_n(i);return l=typeof l=="function"?l:r,Sf(Wr(i,ut),r,l)}),_5=De(Uf);function w5(i,l){return W0(i||[],l||[],Ki)}function b5(i,l){return W0(i||[],l||[],Qi)}var k5=De(function(i){var l=i.length,f=l>1?i[l-1]:r;return f=typeof f=="function"?(i.pop(),f):r,N_(i,f)});function B_(i){var l=b(i);return l.__chain__=!0,l}function x5(i,l){return l(i),i}function mc(i,l){return l(i)}var v5=_r(function(i){var l=i.length,f=l?i[0]:0,m=this.__wrapped__,_=function(x){return pf(x,i)};return l>1||this.__actions__.length||!(m instanceof Pe)||!wr(f)?this.thru(_):(m=m.slice(f,+f+(l?1:0)),m.__actions__.push({func:mc,args:[_],thisArg:r}),new mn(m,this.__chain__).thru(function(x){return l&&!x.length&&x.push(r),x}))});function C5(){return B_(this)}function E5(){return new mn(this.value(),this.__chain__)}function S5(){this.__values__===r&&(this.__values__=U_(this.value()));var i=this.__index__>=this.__values__.length,l=i?r:this.__values__[this.__index__++];return{done:i,value:l}}function N5(){return this}function B5(i){for(var l,f=this;f instanceof ec;){var m=k_(f);m.__index__=0,m.__values__=r,l?_.__wrapped__=m:l=m;var _=m;f=f.__wrapped__}return _.__wrapped__=i,l}function V5(){var i=this.__wrapped__;if(i instanceof Pe){var l=i;return this.__actions__.length&&(l=new Pe(this)),l=l.reverse(),l.__actions__.push({func:mc,args:[zf],thisArg:r}),new mn(l,this.__chain__)}return this.thru(zf)}function T5(){return Z0(this.__wrapped__,this.__actions__)}var A5=sc(function(i,l,f){Xe.call(i,f)?++i[f]:gr(i,f,1)});function $5(i,l,f){var m=Be(i)?r0:x4;return f&&Ft(i,l,f)&&(l=r),m(i,_e(l,3))}function R5(i,l){var f=Be(i)?Wr:N0;return f(i,_e(l,3))}var O5=t_(x_),I5=t_(v_);function D5(i,l){return St(gc(i,l),1)}function M5(i,l){return St(gc(i,l),j)}function P5(i,l,f){return f=f===r?1:Ae(f),St(gc(i,l),f)}function V_(i,l){var f=Be(i)?pn:Kr;return f(i,_e(l,3))}function T_(i,l){var f=Be(i)?rF:S0;return f(i,_e(l,3))}var L5=sc(function(i,l,f){Xe.call(i,f)?i[f].push(l):gr(i,f,[l])});function F5(i,l,f,m){i=qt(i)?i:Sa(i),f=f&&!m?Ae(f):0;var _=i.length;return f<0&&(f=wt(_+f,0)),kc(i)?f<=_&&i.indexOf(l,f)>-1:!!_&&ha(i,l,f)>-1}var z5=De(function(i,l,f){var m=-1,_=typeof l=="function",x=qt(i)?K(i.length):[];return Kr(i,function(I){x[++m]=_?on(l,I,f):Yi(I,l,f)}),x}),U5=sc(function(i,l,f){gr(i,f,l)});function gc(i,l){var f=Be(i)?nt:R0;return f(i,_e(l,3))}function j5(i,l,f,m){return i==null?[]:(Be(l)||(l=l==null?[]:[l]),f=m?r:f,Be(f)||(f=f==null?[]:[f]),M0(i,l,f))}var Z5=sc(function(i,l,f){i[f?0:1].push(l)},function(){return[[],[]]});function W5(i,l,f){var m=Be(i)?Qu:s0,_=arguments.length<3;return m(i,_e(l,4),f,_,Kr)}function H5(i,l,f){var m=Be(i)?oF:s0,_=arguments.length<3;return m(i,_e(l,4),f,_,S0)}function q5(i,l){var f=Be(i)?Wr:N0;return f(i,wc(_e(l,3)))}function G5(i){var l=Be(i)?x0:F4;return l(i)}function K5(i,l,f){(f?Ft(i,l,f):l===r)?l=1:l=Ae(l);var m=Be(i)?y4:z4;return m(i,l)}function X5(i){var l=Be(i)?_4:j4;return l(i)}function Y5(i){if(i==null)return 0;if(qt(i))return kc(i)?ga(i):i.length;var l=$t(i);return l==Ln||l==Fn?i.size:wf(i).length}function J5(i,l,f){var m=Be(i)?ef:Z4;return f&&Ft(i,l,f)&&(l=r),m(i,_e(l,3))}var Q5=De(function(i,l){if(i==null)return[];var f=l.length;return f>1&&Ft(i,l[0],l[1])?l=[]:f>2&&Ft(l[0],l[1],l[2])&&(l=[l[0]]),M0(i,St(l,1),[])}),yc=RF||function(){return Et.Date.now()};function e6(i,l){if(typeof l!="function")throw new hn(c);return i=Ae(i),function(){if(--i<1)return l.apply(this,arguments)}}function A_(i,l,f){return l=f?r:l,l=i&&l==null?i.length:l,yr(i,z,r,r,r,r,l)}function $_(i,l){var f;if(typeof l!="function")throw new hn(c);return i=Ae(i),function(){return--i>0&&(f=l.apply(this,arguments)),i<=1&&(l=r),f}}var jf=De(function(i,l,f){var m=V;if(f.length){var _=qr(f,Ca(jf));m|=R}return yr(i,m,l,f,_)}),R_=De(function(i,l,f){var m=V|D;if(f.length){var _=qr(f,Ca(R_));m|=R}return yr(l,m,i,f,_)});function O_(i,l,f){l=f?r:l;var m=yr(i,$,r,r,r,r,r,l);return m.placeholder=O_.placeholder,m}function I_(i,l,f){l=f?r:l;var m=yr(i,W,r,r,r,r,r,l);return m.placeholder=I_.placeholder,m}function D_(i,l,f){var m,_,x,I,P,H,Y=0,J=!1,Q=!1,oe=!0;if(typeof i!="function")throw new hn(c);l=wn(l)||0,st(f)&&(J=!!f.leading,Q="maxWait"in f,x=Q?wt(wn(f.maxWait)||0,l):x,oe="trailing"in f?!!f.trailing:oe);function pe(ft){var Zn=m,xr=_;return m=_=r,Y=ft,I=i.apply(xr,Zn),I}function we(ft){return Y=ft,P=ns(Me,l),J?pe(ft):I}function Ie(ft){var Zn=ft-H,xr=ft-Y,tw=l-Zn;return Q?At(tw,x-xr):tw}function be(ft){var Zn=ft-H,xr=ft-Y;return H===r||Zn>=l||Zn<0||Q&&xr>=x}function Me(){var ft=yc();if(be(ft))return Ue(ft);P=ns(Me,Ie(ft))}function Ue(ft){return P=r,oe&&m?pe(ft):(m=_=r,I)}function cn(){P!==r&&H0(P),Y=0,m=H=_=P=r}function zt(){return P===r?I:Ue(yc())}function dn(){var ft=yc(),Zn=be(ft);if(m=arguments,_=this,H=ft,Zn){if(P===r)return we(H);if(Q)return H0(P),P=ns(Me,l),pe(H)}return P===r&&(P=ns(Me,l)),I}return dn.cancel=cn,dn.flush=zt,dn}var t6=De(function(i,l){return E0(i,1,l)}),n6=De(function(i,l,f){return E0(i,wn(l)||0,f)});function r6(i){return yr(i,C)}function _c(i,l){if(typeof i!="function"||l!=null&&typeof l!="function")throw new hn(c);var f=function(){var m=arguments,_=l?l.apply(this,m):m[0],x=f.cache;if(x.has(_))return x.get(_);var I=i.apply(this,m);return f.cache=x.set(_,I)||x,I};return f.cache=new(_c.Cache||mr),f}_c.Cache=mr;function wc(i){if(typeof i!="function")throw new hn(c);return function(){var l=arguments;switch(l.length){case 0:return!i.call(this);case 1:return!i.call(this,l[0]);case 2:return!i.call(this,l[0],l[1]);case 3:return!i.call(this,l[0],l[1],l[2])}return!i.apply(this,l)}}function o6(i){return $_(2,i)}var a6=W4(function(i,l){l=l.length==1&&Be(l[0])?nt(l[0],an(_e())):nt(St(l,1),an(_e()));var f=l.length;return De(function(m){for(var _=-1,x=At(m.length,f);++_<x;)m[_]=l[_].call(this,m[_]);return on(i,this,m)})}),Zf=De(function(i,l){var f=qr(l,Ca(Zf));return yr(i,R,r,l,f)}),M_=De(function(i,l){var f=qr(l,Ca(M_));return yr(i,B,r,l,f)}),i6=_r(function(i,l){return yr(i,q,r,r,r,l)});function s6(i,l){if(typeof i!="function")throw new hn(c);return l=l===r?l:Ae(l),De(i,l)}function l6(i,l){if(typeof i!="function")throw new hn(c);return l=l==null?0:wt(Ae(l),0),De(function(f){var m=f[l],_=Jr(f,0,l);return m&&Hr(_,m),on(i,this,_)})}function c6(i,l,f){var m=!0,_=!0;if(typeof i!="function")throw new hn(c);return st(f)&&(m="leading"in f?!!f.leading:m,_="trailing"in f?!!f.trailing:_),D_(i,l,{leading:m,maxWait:l,trailing:_})}function d6(i){return A_(i,1)}function u6(i,l){return Zf(Bf(l),i)}function f6(){if(!arguments.length)return[];var i=arguments[0];return Be(i)?i:[i]}function p6(i){return gn(i,w)}function h6(i,l){return l=typeof l=="function"?l:r,gn(i,w,l)}function m6(i){return gn(i,g|w)}function g6(i,l){return l=typeof l=="function"?l:r,gn(i,g|w,l)}function y6(i,l){return l==null||C0(i,l,xt(l))}function jn(i,l){return i===l||i!==i&&l!==l}var _6=uc(gf),w6=uc(function(i,l){return i>=l}),Ao=T0(function(){return arguments}())?T0:function(i){return ct(i)&&Xe.call(i,"callee")&&!g0.call(i,"callee")},Be=K.isArray,b6=Yy?an(Yy):B4;function qt(i){return i!=null&&bc(i.length)&&!br(i)}function ut(i){return ct(i)&&qt(i)}function k6(i){return i===!0||i===!1||ct(i)&&Lt(i)==Di}var Qr=IF||tp,x6=Jy?an(Jy):V4;function v6(i){return ct(i)&&i.nodeType===1&&!rs(i)}function C6(i){if(i==null)return!0;if(qt(i)&&(Be(i)||typeof i=="string"||typeof i.splice=="function"||Qr(i)||Ea(i)||Ao(i)))return!i.length;var l=$t(i);if(l==Ln||l==Fn)return!i.size;if(ts(i))return!wf(i).length;for(var f in i)if(Xe.call(i,f))return!1;return!0}function E6(i,l){return Ji(i,l)}function S6(i,l,f){f=typeof f=="function"?f:r;var m=f?f(i,l):r;return m===r?Ji(i,l,r,f):!!m}function Wf(i){if(!ct(i))return!1;var l=Lt(i);return l==$l||l==KL||typeof i.message=="string"&&typeof i.name=="string"&&!rs(i)}function N6(i){return typeof i=="number"&&_0(i)}function br(i){if(!st(i))return!1;var l=Lt(i);return l==Rl||l==Ey||l==GL||l==YL}function P_(i){return typeof i=="number"&&i==Ae(i)}function bc(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=G}function st(i){var l=typeof i;return i!=null&&(l=="object"||l=="function")}function ct(i){return i!=null&&typeof i=="object"}var L_=Qy?an(Qy):A4;function B6(i,l){return i===l||_f(i,l,If(l))}function V6(i,l,f){return f=typeof f=="function"?f:r,_f(i,l,If(l),f)}function T6(i){return F_(i)&&i!=+i}function A6(i){if(hz(i))throw new Ne(s);return A0(i)}function $6(i){return i===null}function R6(i){return i==null}function F_(i){return typeof i=="number"||ct(i)&&Lt(i)==Pi}function rs(i){if(!ct(i)||Lt(i)!=pr)return!1;var l=ql(i);if(l===null)return!0;var f=Xe.call(l,"constructor")&&l.constructor;return typeof f=="function"&&f instanceof f&&jl.call(f)==VF}var Hf=e0?an(e0):$4;function O6(i){return P_(i)&&i>=-G&&i<=G}var z_=t0?an(t0):R4;function kc(i){return typeof i=="string"||!Be(i)&&ct(i)&&Lt(i)==Fi}function ln(i){return typeof i=="symbol"||ct(i)&&Lt(i)==Ol}var Ea=n0?an(n0):O4;function I6(i){return i===r}function D6(i){return ct(i)&&$t(i)==zi}function M6(i){return ct(i)&&Lt(i)==QL}var P6=uc(bf),L6=uc(function(i,l){return i<=l});function U_(i){if(!i)return[];if(qt(i))return kc(i)?zn(i):Ht(i);if(Zi&&i[Zi])return yF(i[Zi]());var l=$t(i),f=l==Ln?sf:l==Fn?Fl:Sa;return f(i)}function kr(i){if(!i)return i===0?i:0;if(i=wn(i),i===j||i===-j){var l=i<0?-1:1;return l*ee}return i===i?i:0}function Ae(i){var l=kr(i),f=l%1;return l===l?f?l-f:l:0}function j_(i){return i?No(Ae(i),0,ye):0}function wn(i){if(typeof i=="number")return i;if(ln(i))return ue;if(st(i)){var l=typeof i.valueOf=="function"?i.valueOf():i;i=st(l)?l+"":l}if(typeof i!="string")return i===0?i:+i;i=l0(i);var f=b3.test(i);return f||x3.test(i)?eF(i.slice(2),f?2:8):w3.test(i)?ue:+i}function Z_(i){return nr(i,Gt(i))}function F6(i){return i?No(Ae(i),-G,G):i===0?i:0}function Ge(i){return i==null?"":sn(i)}var z6=xa(function(i,l){if(ts(l)||qt(l)){nr(l,xt(l),i);return}for(var f in l)Xe.call(l,f)&&Ki(i,f,l[f])}),W_=xa(function(i,l){nr(l,Gt(l),i)}),xc=xa(function(i,l,f,m){nr(l,Gt(l),i,m)}),U6=xa(function(i,l,f,m){nr(l,xt(l),i,m)}),j6=_r(pf);function Z6(i,l){var f=ka(i);return l==null?f:v0(f,l)}var W6=De(function(i,l){i=Ye(i);var f=-1,m=l.length,_=m>2?l[2]:r;for(_&&Ft(l[0],l[1],_)&&(m=1);++f<m;)for(var x=l[f],I=Gt(x),P=-1,H=I.length;++P<H;){var Y=I[P],J=i[Y];(J===r||jn(J,_a[Y])&&!Xe.call(i,Y))&&(i[Y]=x[Y])}return i}),H6=De(function(i){return i.push(r,l_),on(H_,r,i)});function q6(i,l){return o0(i,_e(l,3),tr)}function G6(i,l){return o0(i,_e(l,3),mf)}function K6(i,l){return i==null?i:hf(i,_e(l,3),Gt)}function X6(i,l){return i==null?i:B0(i,_e(l,3),Gt)}function Y6(i,l){return i&&tr(i,_e(l,3))}function J6(i,l){return i&&mf(i,_e(l,3))}function Q6(i){return i==null?[]:rc(i,xt(i))}function e8(i){return i==null?[]:rc(i,Gt(i))}function qf(i,l,f){var m=i==null?r:Bo(i,l);return m===r?f:m}function t8(i,l){return i!=null&&u_(i,l,C4)}function Gf(i,l){return i!=null&&u_(i,l,E4)}var n8=r_(function(i,l,f){l!=null&&typeof l.toString!="function"&&(l=Zl.call(l)),i[l]=f},Xf(Kt)),r8=r_(function(i,l,f){l!=null&&typeof l.toString!="function"&&(l=Zl.call(l)),Xe.call(i,l)?i[l].push(f):i[l]=[f]},_e),o8=De(Yi);function xt(i){return qt(i)?k0(i):wf(i)}function Gt(i){return qt(i)?k0(i,!0):I4(i)}function a8(i,l){var f={};return l=_e(l,3),tr(i,function(m,_,x){gr(f,l(m,_,x),m)}),f}function i8(i,l){var f={};return l=_e(l,3),tr(i,function(m,_,x){gr(f,_,l(m,_,x))}),f}var s8=xa(function(i,l,f){oc(i,l,f)}),H_=xa(function(i,l,f,m){oc(i,l,f,m)}),l8=_r(function(i,l){var f={};if(i==null)return f;var m=!1;l=nt(l,function(x){return x=Yr(x,i),m||(m=x.length>1),x}),nr(i,Rf(i),f),m&&(f=gn(f,g|y|w,nz));for(var _=l.length;_--;)Ef(f,l[_]);return f});function c8(i,l){return q_(i,wc(_e(l)))}var d8=_r(function(i,l){return i==null?{}:M4(i,l)});function q_(i,l){if(i==null)return{};var f=nt(Rf(i),function(m){return[m]});return l=_e(l),P0(i,f,function(m,_){return l(m,_[0])})}function u8(i,l,f){l=Yr(l,i);var m=-1,_=l.length;for(_||(_=1,i=r);++m<_;){var x=i==null?r:i[rr(l[m])];x===r&&(m=_,x=f),i=br(x)?x.call(i):x}return i}function f8(i,l,f){return i==null?i:Qi(i,l,f)}function p8(i,l,f,m){return m=typeof m=="function"?m:r,i==null?i:Qi(i,l,f,m)}var G_=i_(xt),K_=i_(Gt);function h8(i,l,f){var m=Be(i),_=m||Qr(i)||Ea(i);if(l=_e(l,4),f==null){var x=i&&i.constructor;_?f=m?new x:[]:st(i)?f=br(x)?ka(ql(i)):{}:f={}}return(_?pn:tr)(i,function(I,P,H){return l(f,I,P,H)}),f}function m8(i,l){return i==null?!0:Ef(i,l)}function g8(i,l,f){return i==null?i:j0(i,l,Bf(f))}function y8(i,l,f,m){return m=typeof m=="function"?m:r,i==null?i:j0(i,l,Bf(f),m)}function Sa(i){return i==null?[]:af(i,xt(i))}function _8(i){return i==null?[]:af(i,Gt(i))}function w8(i,l,f){return f===r&&(f=l,l=r),f!==r&&(f=wn(f),f=f===f?f:0),l!==r&&(l=wn(l),l=l===l?l:0),No(wn(i),l,f)}function b8(i,l,f){return l=kr(l),f===r?(f=l,l=0):f=kr(f),i=wn(i),S4(i,l,f)}function k8(i,l,f){if(f&&typeof f!="boolean"&&Ft(i,l,f)&&(l=f=r),f===r&&(typeof l=="boolean"?(f=l,l=r):typeof i=="boolean"&&(f=i,i=r)),i===r&&l===r?(i=0,l=1):(i=kr(i),l===r?(l=i,i=0):l=kr(l)),i>l){var m=i;i=l,l=m}if(f||i%1||l%1){var _=w0();return At(i+_*(l-i+Q3("1e-"+((_+"").length-1))),l)}return xf(i,l)}var x8=va(function(i,l,f){return l=l.toLowerCase(),i+(f?X_(l):l)});function X_(i){return Kf(Ge(i).toLowerCase())}function Y_(i){return i=Ge(i),i&&i.replace(C3,fF).replace(j3,"")}function v8(i,l,f){i=Ge(i),l=sn(l);var m=i.length;f=f===r?m:No(Ae(f),0,m);var _=f;return f-=l.length,f>=0&&i.slice(f,_)==l}function C8(i){return i=Ge(i),i&&o3.test(i)?i.replace(By,pF):i}function E8(i){return i=Ge(i),i&&d3.test(i)?i.replace(ju,"\\$&"):i}var S8=va(function(i,l,f){return i+(f?"-":"")+l.toLowerCase()}),N8=va(function(i,l,f){return i+(f?" ":"")+l.toLowerCase()}),B8=e_("toLowerCase");function V8(i,l,f){i=Ge(i),l=Ae(l);var m=l?ga(i):0;if(!l||m>=l)return i;var _=(l-m)/2;return dc(Yl(_),f)+i+dc(Xl(_),f)}function T8(i,l,f){i=Ge(i),l=Ae(l);var m=l?ga(i):0;return l&&m<l?i+dc(l-m,f):i}function A8(i,l,f){i=Ge(i),l=Ae(l);var m=l?ga(i):0;return l&&m<l?dc(l-m,f)+i:i}function $8(i,l,f){return f||l==null?l=0:l&&(l=+l),LF(Ge(i).replace(Zu,""),l||0)}function R8(i,l,f){return(f?Ft(i,l,f):l===r)?l=1:l=Ae(l),vf(Ge(i),l)}function O8(){var i=arguments,l=Ge(i[0]);return i.length<3?l:l.replace(i[1],i[2])}var I8=va(function(i,l,f){return i+(f?"_":"")+l.toLowerCase()});function D8(i,l,f){return f&&typeof f!="number"&&Ft(i,l,f)&&(l=f=r),f=f===r?ye:f>>>0,f?(i=Ge(i),i&&(typeof l=="string"||l!=null&&!Hf(l))&&(l=sn(l),!l&&ma(i))?Jr(zn(i),0,f):i.split(l,f)):[]}var M8=va(function(i,l,f){return i+(f?" ":"")+Kf(l)});function P8(i,l,f){return i=Ge(i),f=f==null?0:No(Ae(f),0,i.length),l=sn(l),i.slice(f,f+l.length)==l}function L8(i,l,f){var m=b.templateSettings;f&&Ft(i,l,f)&&(l=r),i=Ge(i),l=xc({},l,m,s_);var _=xc({},l.imports,m.imports,s_),x=xt(_),I=af(_,x),P,H,Y=0,J=l.interpolate||Il,Q="__p += '",oe=lf((l.escape||Il).source+"|"+J.source+"|"+(J===Vy?_3:Il).source+"|"+(l.evaluate||Il).source+"|$","g"),pe="//# sourceURL="+(Xe.call(l,"sourceURL")?(l.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++G3+"]")+`
|
|
63
|
-
`;i.replace(oe,function(
|
|
64
|
-
__e(`+
|
|
65
|
-
'`),
|
|
66
|
-
`+
|
|
67
|
-
__p += '`),
|
|
68
|
-
((__t = (`+
|
|
69
|
-
'`),
|
|
70
|
-
`;var
|
|
60
|
+
*/_s.exports,function(n,e){(function(){var r,o="4.17.21",a=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",d="Invalid `variable` option passed into `_.template`",u="__lodash_hash_undefined__",f=500,m="__lodash_placeholder__",g=1,y=2,_=4,C=1,N=2,T=1,$=2,W=4,E=8,D=16,A=32,B=64,P=128,H=256,S=512,I=30,v="...",L=800,V=16,k=1,Z=2,U=3,F=1/0,j=9007199254740991,ee=17976931348623157e292,ue=NaN,ye=4294967295,Ce=ye-1,He=ye>>>1,Ct=[["ary",P],["bind",T],["bindKey",$],["curry",E],["curryRight",D],["flip",S],["partial",A],["partialRight",B],["rearg",H]],Ye="[object Arguments]",Ht="[object Array]",IF="[object AsyncFunction]",zi="[object Boolean]",Di="[object Date]",AF="[object DOMException]",Hs="[object Error]",Xs="[object Function]",m0="[object GeneratorFunction]",Fn="[object Map]",Wi="[object Number]",LF="[object Null]",gr="[object Object]",h0="[object Promise]",OF="[object Proxy]",Gi="[object RegExp]",Pn="[object Set]",Ui="[object String]",js="[object Symbol]",$F="[object Undefined]",Hi="[object WeakMap]",ZF="[object WeakSet]",Xi="[object ArrayBuffer]",_a="[object DataView]",rp="[object Float32Array]",op="[object Float64Array]",ap="[object Int8Array]",ip="[object Int16Array]",lp="[object Int32Array]",sp="[object Uint8Array]",cp="[object Uint8ClampedArray]",dp="[object Uint16Array]",up="[object Uint32Array]",MF=/\b__p \+= '';/g,FF=/\b(__p \+=) '' \+/g,PF=/(__e\(.*?\)|\b__t\)) \+\n'';/g,g0=/&(?:amp|lt|gt|quot|#39);/g,y0=/[&<>"']/g,zF=RegExp(g0.source),DF=RegExp(y0.source),WF=/<%-([\s\S]+?)%>/g,GF=/<%([\s\S]+?)%>/g,b0=/<%=([\s\S]+?)%>/g,UF=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,HF=/^\w*$/,XF=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,pp=/[\\^$.*+?()[\]{}|]/g,jF=RegExp(pp.source),fp=/^\s+/,YF=/\s/,KF=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,JF=/\{\n\/\* \[wrapped with (.+)\] \*/,qF=/,? & /,QF=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,eP=/[()=,{}\[\]\/\s]/,tP=/\\(\\)?/g,nP=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,_0=/\w*$/,rP=/^[-+]0x[0-9a-f]+$/i,oP=/^0b[01]+$/i,aP=/^\[object .+?Constructor\]$/,iP=/^0o[0-7]+$/i,lP=/^(?:0|[1-9]\d*)$/,sP=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ys=/($^)/,cP=/['\n\r\u2028\u2029\\]/g,Ks="\\ud800-\\udfff",dP="\\u0300-\\u036f",uP="\\ufe20-\\ufe2f",pP="\\u20d0-\\u20ff",w0=dP+uP+pP,k0="\\u2700-\\u27bf",x0="a-z\\xdf-\\xf6\\xf8-\\xff",fP="\\xac\\xb1\\xd7\\xf7",mP="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",hP="\\u2000-\\u206f",gP=" \\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",v0="A-Z\\xc0-\\xd6\\xd8-\\xde",C0="\\ufe0e\\ufe0f",S0=fP+mP+hP+gP,mp="['’]",yP="["+Ks+"]",E0="["+S0+"]",Js="["+w0+"]",N0="\\d+",bP="["+k0+"]",V0="["+x0+"]",B0="[^"+Ks+S0+N0+k0+x0+v0+"]",hp="\\ud83c[\\udffb-\\udfff]",_P="(?:"+Js+"|"+hp+")",T0="[^"+Ks+"]",gp="(?:\\ud83c[\\udde6-\\uddff]){2}",yp="[\\ud800-\\udbff][\\udc00-\\udfff]",wa="["+v0+"]",R0="\\u200d",I0="(?:"+V0+"|"+B0+")",wP="(?:"+wa+"|"+B0+")",A0="(?:"+mp+"(?:d|ll|m|re|s|t|ve))?",L0="(?:"+mp+"(?:D|LL|M|RE|S|T|VE))?",O0=_P+"?",$0="["+C0+"]?",kP="(?:"+R0+"(?:"+[T0,gp,yp].join("|")+")"+$0+O0+")*",xP="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vP="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Z0=$0+O0+kP,CP="(?:"+[bP,gp,yp].join("|")+")"+Z0,SP="(?:"+[T0+Js+"?",Js,gp,yp,yP].join("|")+")",EP=RegExp(mp,"g"),NP=RegExp(Js,"g"),bp=RegExp(hp+"(?="+hp+")|"+SP+Z0,"g"),VP=RegExp([wa+"?"+V0+"+"+A0+"(?="+[E0,wa,"$"].join("|")+")",wP+"+"+L0+"(?="+[E0,wa+I0,"$"].join("|")+")",wa+"?"+I0+"+"+A0,wa+"+"+L0,vP,xP,N0,CP].join("|"),"g"),BP=RegExp("["+R0+Ks+w0+C0+"]"),TP=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,RP=["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"],IP=-1,et={};et[rp]=et[op]=et[ap]=et[ip]=et[lp]=et[sp]=et[cp]=et[dp]=et[up]=!0,et[Ye]=et[Ht]=et[Xi]=et[zi]=et[_a]=et[Di]=et[Hs]=et[Xs]=et[Fn]=et[Wi]=et[gr]=et[Gi]=et[Pn]=et[Ui]=et[Hi]=!1;var qe={};qe[Ye]=qe[Ht]=qe[Xi]=qe[_a]=qe[zi]=qe[Di]=qe[rp]=qe[op]=qe[ap]=qe[ip]=qe[lp]=qe[Fn]=qe[Wi]=qe[gr]=qe[Gi]=qe[Pn]=qe[Ui]=qe[js]=qe[sp]=qe[cp]=qe[dp]=qe[up]=!0,qe[Hs]=qe[Xs]=qe[Hi]=!1;var AP={À:"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"},LP={"&":"&","<":"<",">":">",'"':""","'":"'"},OP={"&":"&","<":"<",">":">",""":'"',"'":"'"},$P={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ZP=parseFloat,MP=parseInt,M0=typeof Oa=="object"&&Oa&&Oa.Object===Object&&Oa,FP=typeof self=="object"&&self&&self.Object===Object&&self,St=M0||FP||Function("return this")(),_p=e&&!e.nodeType&&e,Vo=_p&&!0&&n&&!n.nodeType&&n,F0=Vo&&Vo.exports===_p,wp=F0&&M0.process,pn=function(){try{var G=Vo&&Vo.require&&Vo.require("util").types;return G||wp&&wp.binding&&wp.binding("util")}catch{}}(),P0=pn&&pn.isArrayBuffer,z0=pn&&pn.isDate,D0=pn&&pn.isMap,W0=pn&&pn.isRegExp,G0=pn&&pn.isSet,U0=pn&&pn.isTypedArray;function an(G,K,Y){switch(Y.length){case 0:return G.call(K);case 1:return G.call(K,Y[0]);case 2:return G.call(K,Y[0],Y[1]);case 3:return G.call(K,Y[0],Y[1],Y[2])}return G.apply(K,Y)}function PP(G,K,Y,ce){for(var Ne=-1,Xe=G==null?0:G.length;++Ne<Xe;){var bt=G[Ne];K(ce,bt,Y(bt),G)}return ce}function fn(G,K){for(var Y=-1,ce=G==null?0:G.length;++Y<ce&&K(G[Y],Y,G)!==!1;);return G}function zP(G,K){for(var Y=G==null?0:G.length;Y--&&K(G[Y],Y,G)!==!1;);return G}function H0(G,K){for(var Y=-1,ce=G==null?0:G.length;++Y<ce;)if(!K(G[Y],Y,G))return!1;return!0}function jr(G,K){for(var Y=-1,ce=G==null?0:G.length,Ne=0,Xe=[];++Y<ce;){var bt=G[Y];K(bt,Y,G)&&(Xe[Ne++]=bt)}return Xe}function qs(G,K){var Y=G==null?0:G.length;return!!Y&&ka(G,K,0)>-1}function kp(G,K,Y){for(var ce=-1,Ne=G==null?0:G.length;++ce<Ne;)if(Y(K,G[ce]))return!0;return!1}function nt(G,K){for(var Y=-1,ce=G==null?0:G.length,Ne=Array(ce);++Y<ce;)Ne[Y]=K(G[Y],Y,G);return Ne}function Yr(G,K){for(var Y=-1,ce=K.length,Ne=G.length;++Y<ce;)G[Ne+Y]=K[Y];return G}function xp(G,K,Y,ce){var Ne=-1,Xe=G==null?0:G.length;for(ce&&Xe&&(Y=G[++Ne]);++Ne<Xe;)Y=K(Y,G[Ne],Ne,G);return Y}function DP(G,K,Y,ce){var Ne=G==null?0:G.length;for(ce&&Ne&&(Y=G[--Ne]);Ne--;)Y=K(Y,G[Ne],Ne,G);return Y}function vp(G,K){for(var Y=-1,ce=G==null?0:G.length;++Y<ce;)if(K(G[Y],Y,G))return!0;return!1}var WP=Cp("length");function GP(G){return G.split("")}function UP(G){return G.match(QF)||[]}function X0(G,K,Y){var ce;return Y(G,function(Ne,Xe,bt){if(K(Ne,Xe,bt))return ce=Xe,!1}),ce}function Qs(G,K,Y,ce){for(var Ne=G.length,Xe=Y+(ce?1:-1);ce?Xe--:++Xe<Ne;)if(K(G[Xe],Xe,G))return Xe;return-1}function ka(G,K,Y){return K===K?rz(G,K,Y):Qs(G,j0,Y)}function HP(G,K,Y,ce){for(var Ne=Y-1,Xe=G.length;++Ne<Xe;)if(ce(G[Ne],K))return Ne;return-1}function j0(G){return G!==G}function Y0(G,K){var Y=G==null?0:G.length;return Y?Ep(G,K)/Y:ue}function Cp(G){return function(K){return K==null?r:K[G]}}function Sp(G){return function(K){return G==null?r:G[K]}}function K0(G,K,Y,ce,Ne){return Ne(G,function(Xe,bt,Je){Y=ce?(ce=!1,Xe):K(Y,Xe,bt,Je)}),Y}function XP(G,K){var Y=G.length;for(G.sort(K);Y--;)G[Y]=G[Y].value;return G}function Ep(G,K){for(var Y,ce=-1,Ne=G.length;++ce<Ne;){var Xe=K(G[ce]);Xe!==r&&(Y=Y===r?Xe:Y+Xe)}return Y}function Np(G,K){for(var Y=-1,ce=Array(G);++Y<G;)ce[Y]=K(Y);return ce}function jP(G,K){return nt(K,function(Y){return[Y,G[Y]]})}function J0(G){return G&&G.slice(0,tb(G)+1).replace(fp,"")}function ln(G){return function(K){return G(K)}}function Vp(G,K){return nt(K,function(Y){return G[Y]})}function ji(G,K){return G.has(K)}function q0(G,K){for(var Y=-1,ce=G.length;++Y<ce&&ka(K,G[Y],0)>-1;);return Y}function Q0(G,K){for(var Y=G.length;Y--&&ka(K,G[Y],0)>-1;);return Y}function YP(G,K){for(var Y=G.length,ce=0;Y--;)G[Y]===K&&++ce;return ce}var KP=Sp(AP),JP=Sp(LP);function qP(G){return"\\"+$P[G]}function QP(G,K){return G==null?r:G[K]}function xa(G){return BP.test(G)}function ez(G){return TP.test(G)}function tz(G){for(var K,Y=[];!(K=G.next()).done;)Y.push(K.value);return Y}function Bp(G){var K=-1,Y=Array(G.size);return G.forEach(function(ce,Ne){Y[++K]=[Ne,ce]}),Y}function eb(G,K){return function(Y){return G(K(Y))}}function Kr(G,K){for(var Y=-1,ce=G.length,Ne=0,Xe=[];++Y<ce;){var bt=G[Y];(bt===K||bt===m)&&(G[Y]=m,Xe[Ne++]=Y)}return Xe}function ec(G){var K=-1,Y=Array(G.size);return G.forEach(function(ce){Y[++K]=ce}),Y}function nz(G){var K=-1,Y=Array(G.size);return G.forEach(function(ce){Y[++K]=[ce,ce]}),Y}function rz(G,K,Y){for(var ce=Y-1,Ne=G.length;++ce<Ne;)if(G[ce]===K)return ce;return-1}function oz(G,K,Y){for(var ce=Y+1;ce--;)if(G[ce]===K)return ce;return ce}function va(G){return xa(G)?iz(G):WP(G)}function zn(G){return xa(G)?lz(G):GP(G)}function tb(G){for(var K=G.length;K--&&YF.test(G.charAt(K)););return K}var az=Sp(OP);function iz(G){for(var K=bp.lastIndex=0;bp.test(G);)++K;return K}function lz(G){return G.match(bp)||[]}function sz(G){return G.match(VP)||[]}var cz=function G(K){K=K==null?St:Ca.defaults(St.Object(),K,Ca.pick(St,RP));var Y=K.Array,ce=K.Date,Ne=K.Error,Xe=K.Function,bt=K.Math,Je=K.Object,Tp=K.RegExp,dz=K.String,mn=K.TypeError,tc=Y.prototype,uz=Xe.prototype,Sa=Je.prototype,nc=K["__core-js_shared__"],rc=uz.toString,Ke=Sa.hasOwnProperty,pz=0,nb=function(){var i=/[^.]+$/.exec(nc&&nc.keys&&nc.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),oc=Sa.toString,fz=rc.call(Je),mz=St._,hz=Tp("^"+rc.call(Ke).replace(pp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ac=F0?K.Buffer:r,Jr=K.Symbol,ic=K.Uint8Array,rb=ac?ac.allocUnsafe:r,lc=eb(Je.getPrototypeOf,Je),ob=Je.create,ab=Sa.propertyIsEnumerable,sc=tc.splice,ib=Jr?Jr.isConcatSpreadable:r,Yi=Jr?Jr.iterator:r,Bo=Jr?Jr.toStringTag:r,cc=function(){try{var i=Lo(Je,"defineProperty");return i({},"",{}),i}catch{}}(),gz=K.clearTimeout!==St.clearTimeout&&K.clearTimeout,yz=ce&&ce.now!==St.Date.now&&ce.now,bz=K.setTimeout!==St.setTimeout&&K.setTimeout,dc=bt.ceil,uc=bt.floor,Rp=Je.getOwnPropertySymbols,_z=ac?ac.isBuffer:r,lb=K.isFinite,wz=tc.join,kz=eb(Je.keys,Je),_t=bt.max,Rt=bt.min,xz=ce.now,vz=K.parseInt,sb=bt.random,Cz=tc.reverse,Ip=Lo(K,"DataView"),Ki=Lo(K,"Map"),Ap=Lo(K,"Promise"),Ea=Lo(K,"Set"),Ji=Lo(K,"WeakMap"),qi=Lo(Je,"create"),pc=Ji&&new Ji,Na={},Sz=Oo(Ip),Ez=Oo(Ki),Nz=Oo(Ap),Vz=Oo(Ea),Bz=Oo(Ji),fc=Jr?Jr.prototype:r,Qi=fc?fc.valueOf:r,cb=fc?fc.toString:r;function w(i){if(dt(i)&&!Ve(i)&&!(i instanceof Fe)){if(i instanceof hn)return i;if(Ke.call(i,"__wrapped__"))return d_(i)}return new hn(i)}var Va=function(){function i(){}return function(s){if(!lt(s))return{};if(ob)return ob(s);i.prototype=s;var p=new i;return i.prototype=r,p}}();function mc(){}function hn(i,s){this.__wrapped__=i,this.__actions__=[],this.__chain__=!!s,this.__index__=0,this.__values__=r}w.templateSettings={escape:WF,evaluate:GF,interpolate:b0,variable:"",imports:{_:w}},w.prototype=mc.prototype,w.prototype.constructor=w,hn.prototype=Va(mc.prototype),hn.prototype.constructor=hn;function Fe(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ye,this.__views__=[]}function Tz(){var i=new Fe(this.__wrapped__);return i.__actions__=Xt(this.__actions__),i.__dir__=this.__dir__,i.__filtered__=this.__filtered__,i.__iteratees__=Xt(this.__iteratees__),i.__takeCount__=this.__takeCount__,i.__views__=Xt(this.__views__),i}function Rz(){if(this.__filtered__){var i=new Fe(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function Iz(){var i=this.__wrapped__.value(),s=this.__dir__,p=Ve(i),h=s<0,b=p?i.length:0,x=GD(0,b,this.__views__),O=x.start,M=x.end,X=M-O,J=h?M:O-1,q=this.__iteratees__,Q=q.length,oe=0,fe=Rt(X,this.__takeCount__);if(!p||!h&&b==X&&fe==X)return Ab(i,this.__actions__);var _e=[];e:for(;X--&&oe<fe;){J+=s;for(var Oe=-1,we=i[J];++Oe<Q;){var Ze=q[Oe],De=Ze.iteratee,dn=Ze.type,Dt=De(we);if(dn==Z)we=Dt;else if(!Dt){if(dn==k)continue e;break e}}_e[oe++]=we}return _e}Fe.prototype=Va(mc.prototype),Fe.prototype.constructor=Fe;function To(i){var s=-1,p=i==null?0:i.length;for(this.clear();++s<p;){var h=i[s];this.set(h[0],h[1])}}function Az(){this.__data__=qi?qi(null):{},this.size=0}function Lz(i){var s=this.has(i)&&delete this.__data__[i];return this.size-=s?1:0,s}function Oz(i){var s=this.__data__;if(qi){var p=s[i];return p===u?r:p}return Ke.call(s,i)?s[i]:r}function $z(i){var s=this.__data__;return qi?s[i]!==r:Ke.call(s,i)}function Zz(i,s){var p=this.__data__;return this.size+=this.has(i)?0:1,p[i]=qi&&s===r?u:s,this}To.prototype.clear=Az,To.prototype.delete=Lz,To.prototype.get=Oz,To.prototype.has=$z,To.prototype.set=Zz;function yr(i){var s=-1,p=i==null?0:i.length;for(this.clear();++s<p;){var h=i[s];this.set(h[0],h[1])}}function Mz(){this.__data__=[],this.size=0}function Fz(i){var s=this.__data__,p=hc(s,i);if(p<0)return!1;var h=s.length-1;return p==h?s.pop():sc.call(s,p,1),--this.size,!0}function Pz(i){var s=this.__data__,p=hc(s,i);return p<0?r:s[p][1]}function zz(i){return hc(this.__data__,i)>-1}function Dz(i,s){var p=this.__data__,h=hc(p,i);return h<0?(++this.size,p.push([i,s])):p[h][1]=s,this}yr.prototype.clear=Mz,yr.prototype.delete=Fz,yr.prototype.get=Pz,yr.prototype.has=zz,yr.prototype.set=Dz;function br(i){var s=-1,p=i==null?0:i.length;for(this.clear();++s<p;){var h=i[s];this.set(h[0],h[1])}}function Wz(){this.size=0,this.__data__={hash:new To,map:new(Ki||yr),string:new To}}function Gz(i){var s=Nc(this,i).delete(i);return this.size-=s?1:0,s}function Uz(i){return Nc(this,i).get(i)}function Hz(i){return Nc(this,i).has(i)}function Xz(i,s){var p=Nc(this,i),h=p.size;return p.set(i,s),this.size+=p.size==h?0:1,this}br.prototype.clear=Wz,br.prototype.delete=Gz,br.prototype.get=Uz,br.prototype.has=Hz,br.prototype.set=Xz;function Ro(i){var s=-1,p=i==null?0:i.length;for(this.__data__=new br;++s<p;)this.add(i[s])}function jz(i){return this.__data__.set(i,u),this}function Yz(i){return this.__data__.has(i)}Ro.prototype.add=Ro.prototype.push=jz,Ro.prototype.has=Yz;function Dn(i){var s=this.__data__=new yr(i);this.size=s.size}function Kz(){this.__data__=new yr,this.size=0}function Jz(i){var s=this.__data__,p=s.delete(i);return this.size=s.size,p}function qz(i){return this.__data__.get(i)}function Qz(i){return this.__data__.has(i)}function eD(i,s){var p=this.__data__;if(p instanceof yr){var h=p.__data__;if(!Ki||h.length<a-1)return h.push([i,s]),this.size=++p.size,this;p=this.__data__=new br(h)}return p.set(i,s),this.size=p.size,this}Dn.prototype.clear=Kz,Dn.prototype.delete=Jz,Dn.prototype.get=qz,Dn.prototype.has=Qz,Dn.prototype.set=eD;function db(i,s){var p=Ve(i),h=!p&&$o(i),b=!p&&!h&&no(i),x=!p&&!h&&!b&&Ia(i),O=p||h||b||x,M=O?Np(i.length,dz):[],X=M.length;for(var J in i)(s||Ke.call(i,J))&&!(O&&(J=="length"||b&&(J=="offset"||J=="parent")||x&&(J=="buffer"||J=="byteLength"||J=="byteOffset")||xr(J,X)))&&M.push(J);return M}function ub(i){var s=i.length;return s?i[Gp(0,s-1)]:r}function tD(i,s){return Vc(Xt(i),Io(s,0,i.length))}function nD(i){return Vc(Xt(i))}function Lp(i,s,p){(p!==r&&!Wn(i[s],p)||p===r&&!(s in i))&&_r(i,s,p)}function el(i,s,p){var h=i[s];(!(Ke.call(i,s)&&Wn(h,p))||p===r&&!(s in i))&&_r(i,s,p)}function hc(i,s){for(var p=i.length;p--;)if(Wn(i[p][0],s))return p;return-1}function rD(i,s,p,h){return qr(i,function(b,x,O){s(h,b,p(b),O)}),h}function pb(i,s){return i&&rr(s,xt(s),i)}function oD(i,s){return i&&rr(s,Yt(s),i)}function _r(i,s,p){s=="__proto__"&&cc?cc(i,s,{configurable:!0,enumerable:!0,value:p,writable:!0}):i[s]=p}function Op(i,s){for(var p=-1,h=s.length,b=Y(h),x=i==null;++p<h;)b[p]=x?r:gf(i,s[p]);return b}function Io(i,s,p){return i===i&&(p!==r&&(i=i<=p?i:p),s!==r&&(i=i>=s?i:s)),i}function gn(i,s,p,h,b,x){var O,M=s&g,X=s&y,J=s&_;if(p&&(O=b?p(i,h,b,x):p(i)),O!==r)return O;if(!lt(i))return i;var q=Ve(i);if(q){if(O=HD(i),!M)return Xt(i,O)}else{var Q=It(i),oe=Q==Xs||Q==m0;if(no(i))return $b(i,M);if(Q==gr||Q==Ye||oe&&!b){if(O=X||oe?{}:t_(i),!M)return X?OD(i,oD(O,i)):LD(i,pb(O,i))}else{if(!qe[Q])return b?i:{};O=XD(i,Q,M)}}x||(x=new Dn);var fe=x.get(i);if(fe)return fe;x.set(i,O),T_(i)?i.forEach(function(we){O.add(gn(we,s,p,we,i,x))}):V_(i)&&i.forEach(function(we,Ze){O.set(Ze,gn(we,s,p,Ze,i,x))});var _e=J?X?tf:ef:X?Yt:xt,Oe=q?r:_e(i);return fn(Oe||i,function(we,Ze){Oe&&(Ze=we,we=i[Ze]),el(O,Ze,gn(we,s,p,Ze,i,x))}),O}function aD(i){var s=xt(i);return function(p){return fb(p,i,s)}}function fb(i,s,p){var h=p.length;if(i==null)return!h;for(i=Je(i);h--;){var b=p[h],x=s[b],O=i[b];if(O===r&&!(b in i)||!x(O))return!1}return!0}function mb(i,s,p){if(typeof i!="function")throw new mn(c);return ll(function(){i.apply(r,p)},s)}function tl(i,s,p,h){var b=-1,x=qs,O=!0,M=i.length,X=[],J=s.length;if(!M)return X;p&&(s=nt(s,ln(p))),h?(x=kp,O=!1):s.length>=a&&(x=ji,O=!1,s=new Ro(s));e:for(;++b<M;){var q=i[b],Q=p==null?q:p(q);if(q=h||q!==0?q:0,O&&Q===Q){for(var oe=J;oe--;)if(s[oe]===Q)continue e;X.push(q)}else x(s,Q,h)||X.push(q)}return X}var qr=zb(nr),hb=zb(Zp,!0);function iD(i,s){var p=!0;return qr(i,function(h,b,x){return p=!!s(h,b,x),p}),p}function gc(i,s,p){for(var h=-1,b=i.length;++h<b;){var x=i[h],O=s(x);if(O!=null&&(M===r?O===O&&!cn(O):p(O,M)))var M=O,X=x}return X}function lD(i,s,p,h){var b=i.length;for(p=Re(p),p<0&&(p=-p>b?0:b+p),h=h===r||h>b?b:Re(h),h<0&&(h+=b),h=p>h?0:I_(h);p<h;)i[p++]=s;return i}function gb(i,s){var p=[];return qr(i,function(h,b,x){s(h,b,x)&&p.push(h)}),p}function Et(i,s,p,h,b){var x=-1,O=i.length;for(p||(p=YD),b||(b=[]);++x<O;){var M=i[x];s>0&&p(M)?s>1?Et(M,s-1,p,h,b):Yr(b,M):h||(b[b.length]=M)}return b}var $p=Db(),yb=Db(!0);function nr(i,s){return i&&$p(i,s,xt)}function Zp(i,s){return i&&yb(i,s,xt)}function yc(i,s){return jr(s,function(p){return vr(i[p])})}function Ao(i,s){s=eo(s,i);for(var p=0,h=s.length;i!=null&&p<h;)i=i[or(s[p++])];return p&&p==h?i:r}function bb(i,s,p){var h=s(i);return Ve(i)?h:Yr(h,p(i))}function Pt(i){return i==null?i===r?$F:LF:Bo&&Bo in Je(i)?WD(i):n9(i)}function Mp(i,s){return i>s}function sD(i,s){return i!=null&&Ke.call(i,s)}function cD(i,s){return i!=null&&s in Je(i)}function dD(i,s,p){return i>=Rt(s,p)&&i<_t(s,p)}function Fp(i,s,p){for(var h=p?kp:qs,b=i[0].length,x=i.length,O=x,M=Y(x),X=1/0,J=[];O--;){var q=i[O];O&&s&&(q=nt(q,ln(s))),X=Rt(q.length,X),M[O]=!p&&(s||b>=120&&q.length>=120)?new Ro(O&&q):r}q=i[0];var Q=-1,oe=M[0];e:for(;++Q<b&&J.length<X;){var fe=q[Q],_e=s?s(fe):fe;if(fe=p||fe!==0?fe:0,!(oe?ji(oe,_e):h(J,_e,p))){for(O=x;--O;){var Oe=M[O];if(!(Oe?ji(Oe,_e):h(i[O],_e,p)))continue e}oe&&oe.push(_e),J.push(fe)}}return J}function uD(i,s,p,h){return nr(i,function(b,x,O){s(h,p(b),x,O)}),h}function nl(i,s,p){s=eo(s,i),i=a_(i,s);var h=i==null?i:i[or(bn(s))];return h==null?r:an(h,i,p)}function _b(i){return dt(i)&&Pt(i)==Ye}function pD(i){return dt(i)&&Pt(i)==Xi}function fD(i){return dt(i)&&Pt(i)==Di}function rl(i,s,p,h,b){return i===s?!0:i==null||s==null||!dt(i)&&!dt(s)?i!==i&&s!==s:mD(i,s,p,h,rl,b)}function mD(i,s,p,h,b,x){var O=Ve(i),M=Ve(s),X=O?Ht:It(i),J=M?Ht:It(s);X=X==Ye?gr:X,J=J==Ye?gr:J;var q=X==gr,Q=J==gr,oe=X==J;if(oe&&no(i)){if(!no(s))return!1;O=!0,q=!1}if(oe&&!q)return x||(x=new Dn),O||Ia(i)?qb(i,s,p,h,b,x):zD(i,s,X,p,h,b,x);if(!(p&C)){var fe=q&&Ke.call(i,"__wrapped__"),_e=Q&&Ke.call(s,"__wrapped__");if(fe||_e){var Oe=fe?i.value():i,we=_e?s.value():s;return x||(x=new Dn),b(Oe,we,p,h,x)}}return oe?(x||(x=new Dn),DD(i,s,p,h,b,x)):!1}function hD(i){return dt(i)&&It(i)==Fn}function Pp(i,s,p,h){var b=p.length,x=b,O=!h;if(i==null)return!x;for(i=Je(i);b--;){var M=p[b];if(O&&M[2]?M[1]!==i[M[0]]:!(M[0]in i))return!1}for(;++b<x;){M=p[b];var X=M[0],J=i[X],q=M[1];if(O&&M[2]){if(J===r&&!(X in i))return!1}else{var Q=new Dn;if(h)var oe=h(J,q,X,i,s,Q);if(!(oe===r?rl(q,J,C|N,h,Q):oe))return!1}}return!0}function wb(i){if(!lt(i)||JD(i))return!1;var s=vr(i)?hz:aP;return s.test(Oo(i))}function gD(i){return dt(i)&&Pt(i)==Gi}function yD(i){return dt(i)&&It(i)==Pn}function bD(i){return dt(i)&&Lc(i.length)&&!!et[Pt(i)]}function kb(i){return typeof i=="function"?i:i==null?Kt:typeof i=="object"?Ve(i)?Cb(i[0],i[1]):vb(i):W_(i)}function zp(i){if(!il(i))return kz(i);var s=[];for(var p in Je(i))Ke.call(i,p)&&p!="constructor"&&s.push(p);return s}function _D(i){if(!lt(i))return t9(i);var s=il(i),p=[];for(var h in i)h=="constructor"&&(s||!Ke.call(i,h))||p.push(h);return p}function Dp(i,s){return i<s}function xb(i,s){var p=-1,h=jt(i)?Y(i.length):[];return qr(i,function(b,x,O){h[++p]=s(b,x,O)}),h}function vb(i){var s=rf(i);return s.length==1&&s[0][2]?r_(s[0][0],s[0][1]):function(p){return p===i||Pp(p,i,s)}}function Cb(i,s){return af(i)&&n_(s)?r_(or(i),s):function(p){var h=gf(p,i);return h===r&&h===s?yf(p,i):rl(s,h,C|N)}}function bc(i,s,p,h,b){i!==s&&$p(s,function(x,O){if(b||(b=new Dn),lt(x))wD(i,s,O,p,bc,h,b);else{var M=h?h(sf(i,O),x,O+"",i,s,b):r;M===r&&(M=x),Lp(i,O,M)}},Yt)}function wD(i,s,p,h,b,x,O){var M=sf(i,p),X=sf(s,p),J=O.get(X);if(J){Lp(i,p,J);return}var q=x?x(M,X,p+"",i,s,O):r,Q=q===r;if(Q){var oe=Ve(X),fe=!oe&&no(X),_e=!oe&&!fe&&Ia(X);q=X,oe||fe||_e?Ve(M)?q=M:ut(M)?q=Xt(M):fe?(Q=!1,q=$b(X,!0)):_e?(Q=!1,q=Zb(X,!0)):q=[]:sl(X)||$o(X)?(q=M,$o(M)?q=A_(M):(!lt(M)||vr(M))&&(q=t_(X))):Q=!1}Q&&(O.set(X,q),b(q,X,h,x,O),O.delete(X)),Lp(i,p,q)}function Sb(i,s){var p=i.length;if(p)return s+=s<0?p:0,xr(s,p)?i[s]:r}function Eb(i,s,p){s.length?s=nt(s,function(x){return Ve(x)?function(O){return Ao(O,x.length===1?x[0]:x)}:x}):s=[Kt];var h=-1;s=nt(s,ln(be()));var b=xb(i,function(x,O,M){var X=nt(s,function(J){return J(x)});return{criteria:X,index:++h,value:x}});return XP(b,function(x,O){return AD(x,O,p)})}function kD(i,s){return Nb(i,s,function(p,h){return yf(i,h)})}function Nb(i,s,p){for(var h=-1,b=s.length,x={};++h<b;){var O=s[h],M=Ao(i,O);p(M,O)&&ol(x,eo(O,i),M)}return x}function xD(i){return function(s){return Ao(s,i)}}function Wp(i,s,p,h){var b=h?HP:ka,x=-1,O=s.length,M=i;for(i===s&&(s=Xt(s)),p&&(M=nt(i,ln(p)));++x<O;)for(var X=0,J=s[x],q=p?p(J):J;(X=b(M,q,X,h))>-1;)M!==i&&sc.call(M,X,1),sc.call(i,X,1);return i}function Vb(i,s){for(var p=i?s.length:0,h=p-1;p--;){var b=s[p];if(p==h||b!==x){var x=b;xr(b)?sc.call(i,b,1):Xp(i,b)}}return i}function Gp(i,s){return i+uc(sb()*(s-i+1))}function vD(i,s,p,h){for(var b=-1,x=_t(dc((s-i)/(p||1)),0),O=Y(x);x--;)O[h?x:++b]=i,i+=p;return O}function Up(i,s){var p="";if(!i||s<1||s>j)return p;do s%2&&(p+=i),s=uc(s/2),s&&(i+=i);while(s);return p}function $e(i,s){return cf(o_(i,s,Kt),i+"")}function CD(i){return ub(Aa(i))}function SD(i,s){var p=Aa(i);return Vc(p,Io(s,0,p.length))}function ol(i,s,p,h){if(!lt(i))return i;s=eo(s,i);for(var b=-1,x=s.length,O=x-1,M=i;M!=null&&++b<x;){var X=or(s[b]),J=p;if(X==="__proto__"||X==="constructor"||X==="prototype")return i;if(b!=O){var q=M[X];J=h?h(q,X,M):r,J===r&&(J=lt(q)?q:xr(s[b+1])?[]:{})}el(M,X,J),M=M[X]}return i}var Bb=pc?function(i,s){return pc.set(i,s),i}:Kt,ED=cc?function(i,s){return cc(i,"toString",{configurable:!0,enumerable:!1,value:_f(s),writable:!0})}:Kt;function ND(i){return Vc(Aa(i))}function yn(i,s,p){var h=-1,b=i.length;s<0&&(s=-s>b?0:b+s),p=p>b?b:p,p<0&&(p+=b),b=s>p?0:p-s>>>0,s>>>=0;for(var x=Y(b);++h<b;)x[h]=i[h+s];return x}function VD(i,s){var p;return qr(i,function(h,b,x){return p=s(h,b,x),!p}),!!p}function _c(i,s,p){var h=0,b=i==null?h:i.length;if(typeof s=="number"&&s===s&&b<=He){for(;h<b;){var x=h+b>>>1,O=i[x];O!==null&&!cn(O)&&(p?O<=s:O<s)?h=x+1:b=x}return b}return Hp(i,s,Kt,p)}function Hp(i,s,p,h){var b=0,x=i==null?0:i.length;if(x===0)return 0;s=p(s);for(var O=s!==s,M=s===null,X=cn(s),J=s===r;b<x;){var q=uc((b+x)/2),Q=p(i[q]),oe=Q!==r,fe=Q===null,_e=Q===Q,Oe=cn(Q);if(O)var we=h||_e;else J?we=_e&&(h||oe):M?we=_e&&oe&&(h||!fe):X?we=_e&&oe&&!fe&&(h||!Oe):fe||Oe?we=!1:we=h?Q<=s:Q<s;we?b=q+1:x=q}return Rt(x,Ce)}function Tb(i,s){for(var p=-1,h=i.length,b=0,x=[];++p<h;){var O=i[p],M=s?s(O):O;if(!p||!Wn(M,X)){var X=M;x[b++]=O===0?0:O}}return x}function Rb(i){return typeof i=="number"?i:cn(i)?ue:+i}function sn(i){if(typeof i=="string")return i;if(Ve(i))return nt(i,sn)+"";if(cn(i))return cb?cb.call(i):"";var s=i+"";return s=="0"&&1/i==-F?"-0":s}function Qr(i,s,p){var h=-1,b=qs,x=i.length,O=!0,M=[],X=M;if(p)O=!1,b=kp;else if(x>=a){var J=s?null:FD(i);if(J)return ec(J);O=!1,b=ji,X=new Ro}else X=s?[]:M;e:for(;++h<x;){var q=i[h],Q=s?s(q):q;if(q=p||q!==0?q:0,O&&Q===Q){for(var oe=X.length;oe--;)if(X[oe]===Q)continue e;s&&X.push(Q),M.push(q)}else b(X,Q,p)||(X!==M&&X.push(Q),M.push(q))}return M}function Xp(i,s){return s=eo(s,i),i=a_(i,s),i==null||delete i[or(bn(s))]}function Ib(i,s,p,h){return ol(i,s,p(Ao(i,s)),h)}function wc(i,s,p,h){for(var b=i.length,x=h?b:-1;(h?x--:++x<b)&&s(i[x],x,i););return p?yn(i,h?0:x,h?x+1:b):yn(i,h?x+1:0,h?b:x)}function Ab(i,s){var p=i;return p instanceof Fe&&(p=p.value()),xp(s,function(h,b){return b.func.apply(b.thisArg,Yr([h],b.args))},p)}function jp(i,s,p){var h=i.length;if(h<2)return h?Qr(i[0]):[];for(var b=-1,x=Y(h);++b<h;)for(var O=i[b],M=-1;++M<h;)M!=b&&(x[b]=tl(x[b]||O,i[M],s,p));return Qr(Et(x,1),s,p)}function Lb(i,s,p){for(var h=-1,b=i.length,x=s.length,O={};++h<b;){var M=h<x?s[h]:r;p(O,i[h],M)}return O}function Yp(i){return ut(i)?i:[]}function Kp(i){return typeof i=="function"?i:Kt}function eo(i,s){return Ve(i)?i:af(i,s)?[i]:c_(je(i))}var BD=$e;function to(i,s,p){var h=i.length;return p=p===r?h:p,!s&&p>=h?i:yn(i,s,p)}var Ob=gz||function(i){return St.clearTimeout(i)};function $b(i,s){if(s)return i.slice();var p=i.length,h=rb?rb(p):new i.constructor(p);return i.copy(h),h}function Jp(i){var s=new i.constructor(i.byteLength);return new ic(s).set(new ic(i)),s}function TD(i,s){var p=s?Jp(i.buffer):i.buffer;return new i.constructor(p,i.byteOffset,i.byteLength)}function RD(i){var s=new i.constructor(i.source,_0.exec(i));return s.lastIndex=i.lastIndex,s}function ID(i){return Qi?Je(Qi.call(i)):{}}function Zb(i,s){var p=s?Jp(i.buffer):i.buffer;return new i.constructor(p,i.byteOffset,i.length)}function Mb(i,s){if(i!==s){var p=i!==r,h=i===null,b=i===i,x=cn(i),O=s!==r,M=s===null,X=s===s,J=cn(s);if(!M&&!J&&!x&&i>s||x&&O&&X&&!M&&!J||h&&O&&X||!p&&X||!b)return 1;if(!h&&!x&&!J&&i<s||J&&p&&b&&!h&&!x||M&&p&&b||!O&&b||!X)return-1}return 0}function AD(i,s,p){for(var h=-1,b=i.criteria,x=s.criteria,O=b.length,M=p.length;++h<O;){var X=Mb(b[h],x[h]);if(X){if(h>=M)return X;var J=p[h];return X*(J=="desc"?-1:1)}}return i.index-s.index}function Fb(i,s,p,h){for(var b=-1,x=i.length,O=p.length,M=-1,X=s.length,J=_t(x-O,0),q=Y(X+J),Q=!h;++M<X;)q[M]=s[M];for(;++b<O;)(Q||b<x)&&(q[p[b]]=i[b]);for(;J--;)q[M++]=i[b++];return q}function Pb(i,s,p,h){for(var b=-1,x=i.length,O=-1,M=p.length,X=-1,J=s.length,q=_t(x-M,0),Q=Y(q+J),oe=!h;++b<q;)Q[b]=i[b];for(var fe=b;++X<J;)Q[fe+X]=s[X];for(;++O<M;)(oe||b<x)&&(Q[fe+p[O]]=i[b++]);return Q}function Xt(i,s){var p=-1,h=i.length;for(s||(s=Y(h));++p<h;)s[p]=i[p];return s}function rr(i,s,p,h){var b=!p;p||(p={});for(var x=-1,O=s.length;++x<O;){var M=s[x],X=h?h(p[M],i[M],M,p,i):r;X===r&&(X=i[M]),b?_r(p,M,X):el(p,M,X)}return p}function LD(i,s){return rr(i,of(i),s)}function OD(i,s){return rr(i,Qb(i),s)}function kc(i,s){return function(p,h){var b=Ve(p)?PP:rD,x=s?s():{};return b(p,i,be(h,2),x)}}function Ba(i){return $e(function(s,p){var h=-1,b=p.length,x=b>1?p[b-1]:r,O=b>2?p[2]:r;for(x=i.length>3&&typeof x=="function"?(b--,x):r,O&&zt(p[0],p[1],O)&&(x=b<3?r:x,b=1),s=Je(s);++h<b;){var M=p[h];M&&i(s,M,h,x)}return s})}function zb(i,s){return function(p,h){if(p==null)return p;if(!jt(p))return i(p,h);for(var b=p.length,x=s?b:-1,O=Je(p);(s?x--:++x<b)&&h(O[x],x,O)!==!1;);return p}}function Db(i){return function(s,p,h){for(var b=-1,x=Je(s),O=h(s),M=O.length;M--;){var X=O[i?M:++b];if(p(x[X],X,x)===!1)break}return s}}function $D(i,s,p){var h=s&T,b=al(i);function x(){var O=this&&this!==St&&this instanceof x?b:i;return O.apply(h?p:this,arguments)}return x}function Wb(i){return function(s){s=je(s);var p=xa(s)?zn(s):r,h=p?p[0]:s.charAt(0),b=p?to(p,1).join(""):s.slice(1);return h[i]()+b}}function Ta(i){return function(s){return xp(z_(P_(s).replace(EP,"")),i,"")}}function al(i){return function(){var s=arguments;switch(s.length){case 0:return new i;case 1:return new i(s[0]);case 2:return new i(s[0],s[1]);case 3:return new i(s[0],s[1],s[2]);case 4:return new i(s[0],s[1],s[2],s[3]);case 5:return new i(s[0],s[1],s[2],s[3],s[4]);case 6:return new i(s[0],s[1],s[2],s[3],s[4],s[5]);case 7:return new i(s[0],s[1],s[2],s[3],s[4],s[5],s[6])}var p=Va(i.prototype),h=i.apply(p,s);return lt(h)?h:p}}function ZD(i,s,p){var h=al(i);function b(){for(var x=arguments.length,O=Y(x),M=x,X=Ra(b);M--;)O[M]=arguments[M];var J=x<3&&O[0]!==X&&O[x-1]!==X?[]:Kr(O,X);if(x-=J.length,x<p)return jb(i,s,xc,b.placeholder,r,O,J,r,r,p-x);var q=this&&this!==St&&this instanceof b?h:i;return an(q,this,O)}return b}function Gb(i){return function(s,p,h){var b=Je(s);if(!jt(s)){var x=be(p,3);s=xt(s),p=function(M){return x(b[M],M,b)}}var O=i(s,p,h);return O>-1?b[x?s[O]:O]:r}}function Ub(i){return kr(function(s){var p=s.length,h=p,b=hn.prototype.thru;for(i&&s.reverse();h--;){var x=s[h];if(typeof x!="function")throw new mn(c);if(b&&!O&&Ec(x)=="wrapper")var O=new hn([],!0)}for(h=O?h:p;++h<p;){x=s[h];var M=Ec(x),X=M=="wrapper"?nf(x):r;X&&lf(X[0])&&X[1]==(P|E|A|H)&&!X[4].length&&X[9]==1?O=O[Ec(X[0])].apply(O,X[3]):O=x.length==1&&lf(x)?O[M]():O.thru(x)}return function(){var J=arguments,q=J[0];if(O&&J.length==1&&Ve(q))return O.plant(q).value();for(var Q=0,oe=p?s[Q].apply(this,J):q;++Q<p;)oe=s[Q].call(this,oe);return oe}})}function xc(i,s,p,h,b,x,O,M,X,J){var q=s&P,Q=s&T,oe=s&$,fe=s&(E|D),_e=s&S,Oe=oe?r:al(i);function we(){for(var Ze=arguments.length,De=Y(Ze),dn=Ze;dn--;)De[dn]=arguments[dn];if(fe)var Dt=Ra(we),un=YP(De,Dt);if(h&&(De=Fb(De,h,b,fe)),x&&(De=Pb(De,x,O,fe)),Ze-=un,fe&&Ze<J){var pt=Kr(De,Dt);return jb(i,s,xc,we.placeholder,p,De,pt,M,X,J-Ze)}var Gn=Q?p:this,Sr=oe?Gn[i]:i;return Ze=De.length,M?De=r9(De,M):_e&&Ze>1&&De.reverse(),q&&X<Ze&&(De.length=X),this&&this!==St&&this instanceof we&&(Sr=Oe||al(Sr)),Sr.apply(Gn,De)}return we}function Hb(i,s){return function(p,h){return uD(p,i,s(h),{})}}function vc(i,s){return function(p,h){var b;if(p===r&&h===r)return s;if(p!==r&&(b=p),h!==r){if(b===r)return h;typeof p=="string"||typeof h=="string"?(p=sn(p),h=sn(h)):(p=Rb(p),h=Rb(h)),b=i(p,h)}return b}}function qp(i){return kr(function(s){return s=nt(s,ln(be())),$e(function(p){var h=this;return i(s,function(b){return an(b,h,p)})})})}function Cc(i,s){s=s===r?" ":sn(s);var p=s.length;if(p<2)return p?Up(s,i):s;var h=Up(s,dc(i/va(s)));return xa(s)?to(zn(h),0,i).join(""):h.slice(0,i)}function MD(i,s,p,h){var b=s&T,x=al(i);function O(){for(var M=-1,X=arguments.length,J=-1,q=h.length,Q=Y(q+X),oe=this&&this!==St&&this instanceof O?x:i;++J<q;)Q[J]=h[J];for(;X--;)Q[J++]=arguments[++M];return an(oe,b?p:this,Q)}return O}function Xb(i){return function(s,p,h){return h&&typeof h!="number"&&zt(s,p,h)&&(p=h=r),s=Cr(s),p===r?(p=s,s=0):p=Cr(p),h=h===r?s<p?1:-1:Cr(h),vD(s,p,h,i)}}function Sc(i){return function(s,p){return typeof s=="string"&&typeof p=="string"||(s=_n(s),p=_n(p)),i(s,p)}}function jb(i,s,p,h,b,x,O,M,X,J){var q=s&E,Q=q?O:r,oe=q?r:O,fe=q?x:r,_e=q?r:x;s|=q?A:B,s&=~(q?B:A),s&W||(s&=~(T|$));var Oe=[i,s,b,fe,Q,_e,oe,M,X,J],we=p.apply(r,Oe);return lf(i)&&i_(we,Oe),we.placeholder=h,l_(we,i,s)}function Qp(i){var s=bt[i];return function(p,h){if(p=_n(p),h=h==null?0:Rt(Re(h),292),h&&lb(p)){var b=(je(p)+"e").split("e"),x=s(b[0]+"e"+(+b[1]+h));return b=(je(x)+"e").split("e"),+(b[0]+"e"+(+b[1]-h))}return s(p)}}var FD=Ea&&1/ec(new Ea([,-0]))[1]==F?function(i){return new Ea(i)}:xf;function Yb(i){return function(s){var p=It(s);return p==Fn?Bp(s):p==Pn?nz(s):jP(s,i(s))}}function wr(i,s,p,h,b,x,O,M){var X=s&$;if(!X&&typeof i!="function")throw new mn(c);var J=h?h.length:0;if(J||(s&=~(A|B),h=b=r),O=O===r?O:_t(Re(O),0),M=M===r?M:Re(M),J-=b?b.length:0,s&B){var q=h,Q=b;h=b=r}var oe=X?r:nf(i),fe=[i,s,p,h,b,q,Q,x,O,M];if(oe&&e9(fe,oe),i=fe[0],s=fe[1],p=fe[2],h=fe[3],b=fe[4],M=fe[9]=fe[9]===r?X?0:i.length:_t(fe[9]-J,0),!M&&s&(E|D)&&(s&=~(E|D)),!s||s==T)var _e=$D(i,s,p);else s==E||s==D?_e=ZD(i,s,M):(s==A||s==(T|A))&&!b.length?_e=MD(i,s,p,h):_e=xc.apply(r,fe);var Oe=oe?Bb:i_;return l_(Oe(_e,fe),i,s)}function Kb(i,s,p,h){return i===r||Wn(i,Sa[p])&&!Ke.call(h,p)?s:i}function Jb(i,s,p,h,b,x){return lt(i)&<(s)&&(x.set(s,i),bc(i,s,r,Jb,x),x.delete(s)),i}function PD(i){return sl(i)?r:i}function qb(i,s,p,h,b,x){var O=p&C,M=i.length,X=s.length;if(M!=X&&!(O&&X>M))return!1;var J=x.get(i),q=x.get(s);if(J&&q)return J==s&&q==i;var Q=-1,oe=!0,fe=p&N?new Ro:r;for(x.set(i,s),x.set(s,i);++Q<M;){var _e=i[Q],Oe=s[Q];if(h)var we=O?h(Oe,_e,Q,s,i,x):h(_e,Oe,Q,i,s,x);if(we!==r){if(we)continue;oe=!1;break}if(fe){if(!vp(s,function(Ze,De){if(!ji(fe,De)&&(_e===Ze||b(_e,Ze,p,h,x)))return fe.push(De)})){oe=!1;break}}else if(!(_e===Oe||b(_e,Oe,p,h,x))){oe=!1;break}}return x.delete(i),x.delete(s),oe}function zD(i,s,p,h,b,x,O){switch(p){case _a:if(i.byteLength!=s.byteLength||i.byteOffset!=s.byteOffset)return!1;i=i.buffer,s=s.buffer;case Xi:return!(i.byteLength!=s.byteLength||!x(new ic(i),new ic(s)));case zi:case Di:case Wi:return Wn(+i,+s);case Hs:return i.name==s.name&&i.message==s.message;case Gi:case Ui:return i==s+"";case Fn:var M=Bp;case Pn:var X=h&C;if(M||(M=ec),i.size!=s.size&&!X)return!1;var J=O.get(i);if(J)return J==s;h|=N,O.set(i,s);var q=qb(M(i),M(s),h,b,x,O);return O.delete(i),q;case js:if(Qi)return Qi.call(i)==Qi.call(s)}return!1}function DD(i,s,p,h,b,x){var O=p&C,M=ef(i),X=M.length,J=ef(s),q=J.length;if(X!=q&&!O)return!1;for(var Q=X;Q--;){var oe=M[Q];if(!(O?oe in s:Ke.call(s,oe)))return!1}var fe=x.get(i),_e=x.get(s);if(fe&&_e)return fe==s&&_e==i;var Oe=!0;x.set(i,s),x.set(s,i);for(var we=O;++Q<X;){oe=M[Q];var Ze=i[oe],De=s[oe];if(h)var dn=O?h(De,Ze,oe,s,i,x):h(Ze,De,oe,i,s,x);if(!(dn===r?Ze===De||b(Ze,De,p,h,x):dn)){Oe=!1;break}we||(we=oe=="constructor")}if(Oe&&!we){var Dt=i.constructor,un=s.constructor;Dt!=un&&"constructor"in i&&"constructor"in s&&!(typeof Dt=="function"&&Dt instanceof Dt&&typeof un=="function"&&un instanceof un)&&(Oe=!1)}return x.delete(i),x.delete(s),Oe}function kr(i){return cf(o_(i,r,f_),i+"")}function ef(i){return bb(i,xt,of)}function tf(i){return bb(i,Yt,Qb)}var nf=pc?function(i){return pc.get(i)}:xf;function Ec(i){for(var s=i.name+"",p=Na[s],h=Ke.call(Na,s)?p.length:0;h--;){var b=p[h],x=b.func;if(x==null||x==i)return b.name}return s}function Ra(i){var s=Ke.call(w,"placeholder")?w:i;return s.placeholder}function be(){var i=w.iteratee||wf;return i=i===wf?kb:i,arguments.length?i(arguments[0],arguments[1]):i}function Nc(i,s){var p=i.__data__;return KD(s)?p[typeof s=="string"?"string":"hash"]:p.map}function rf(i){for(var s=xt(i),p=s.length;p--;){var h=s[p],b=i[h];s[p]=[h,b,n_(b)]}return s}function Lo(i,s){var p=QP(i,s);return wb(p)?p:r}function WD(i){var s=Ke.call(i,Bo),p=i[Bo];try{i[Bo]=r;var h=!0}catch{}var b=oc.call(i);return h&&(s?i[Bo]=p:delete i[Bo]),b}var of=Rp?function(i){return i==null?[]:(i=Je(i),jr(Rp(i),function(s){return ab.call(i,s)}))}:vf,Qb=Rp?function(i){for(var s=[];i;)Yr(s,of(i)),i=lc(i);return s}:vf,It=Pt;(Ip&&It(new Ip(new ArrayBuffer(1)))!=_a||Ki&&It(new Ki)!=Fn||Ap&&It(Ap.resolve())!=h0||Ea&&It(new Ea)!=Pn||Ji&&It(new Ji)!=Hi)&&(It=function(i){var s=Pt(i),p=s==gr?i.constructor:r,h=p?Oo(p):"";if(h)switch(h){case Sz:return _a;case Ez:return Fn;case Nz:return h0;case Vz:return Pn;case Bz:return Hi}return s});function GD(i,s,p){for(var h=-1,b=p.length;++h<b;){var x=p[h],O=x.size;switch(x.type){case"drop":i+=O;break;case"dropRight":s-=O;break;case"take":s=Rt(s,i+O);break;case"takeRight":i=_t(i,s-O);break}}return{start:i,end:s}}function UD(i){var s=i.match(JF);return s?s[1].split(qF):[]}function e_(i,s,p){s=eo(s,i);for(var h=-1,b=s.length,x=!1;++h<b;){var O=or(s[h]);if(!(x=i!=null&&p(i,O)))break;i=i[O]}return x||++h!=b?x:(b=i==null?0:i.length,!!b&&Lc(b)&&xr(O,b)&&(Ve(i)||$o(i)))}function HD(i){var s=i.length,p=new i.constructor(s);return s&&typeof i[0]=="string"&&Ke.call(i,"index")&&(p.index=i.index,p.input=i.input),p}function t_(i){return typeof i.constructor=="function"&&!il(i)?Va(lc(i)):{}}function XD(i,s,p){var h=i.constructor;switch(s){case Xi:return Jp(i);case zi:case Di:return new h(+i);case _a:return TD(i,p);case rp:case op:case ap:case ip:case lp:case sp:case cp:case dp:case up:return Zb(i,p);case Fn:return new h;case Wi:case Ui:return new h(i);case Gi:return RD(i);case Pn:return new h;case js:return ID(i)}}function jD(i,s){var p=s.length;if(!p)return i;var h=p-1;return s[h]=(p>1?"& ":"")+s[h],s=s.join(p>2?", ":" "),i.replace(KF,`{
|
|
61
|
+
/* [wrapped with `+s+`] */
|
|
62
|
+
`)}function YD(i){return Ve(i)||$o(i)||!!(ib&&i&&i[ib])}function xr(i,s){var p=typeof i;return s=s??j,!!s&&(p=="number"||p!="symbol"&&lP.test(i))&&i>-1&&i%1==0&&i<s}function zt(i,s,p){if(!lt(p))return!1;var h=typeof s;return(h=="number"?jt(p)&&xr(s,p.length):h=="string"&&s in p)?Wn(p[s],i):!1}function af(i,s){if(Ve(i))return!1;var p=typeof i;return p=="number"||p=="symbol"||p=="boolean"||i==null||cn(i)?!0:HF.test(i)||!UF.test(i)||s!=null&&i in Je(s)}function KD(i){var s=typeof i;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?i!=="__proto__":i===null}function lf(i){var s=Ec(i),p=w[s];if(typeof p!="function"||!(s in Fe.prototype))return!1;if(i===p)return!0;var h=nf(p);return!!h&&i===h[0]}function JD(i){return!!nb&&nb in i}var qD=nc?vr:Cf;function il(i){var s=i&&i.constructor,p=typeof s=="function"&&s.prototype||Sa;return i===p}function n_(i){return i===i&&!lt(i)}function r_(i,s){return function(p){return p==null?!1:p[i]===s&&(s!==r||i in Je(p))}}function QD(i){var s=Ic(i,function(h){return p.size===f&&p.clear(),h}),p=s.cache;return s}function e9(i,s){var p=i[1],h=s[1],b=p|h,x=b<(T|$|P),O=h==P&&p==E||h==P&&p==H&&i[7].length<=s[8]||h==(P|H)&&s[7].length<=s[8]&&p==E;if(!(x||O))return i;h&T&&(i[2]=s[2],b|=p&T?0:W);var M=s[3];if(M){var X=i[3];i[3]=X?Fb(X,M,s[4]):M,i[4]=X?Kr(i[3],m):s[4]}return M=s[5],M&&(X=i[5],i[5]=X?Pb(X,M,s[6]):M,i[6]=X?Kr(i[5],m):s[6]),M=s[7],M&&(i[7]=M),h&P&&(i[8]=i[8]==null?s[8]:Rt(i[8],s[8])),i[9]==null&&(i[9]=s[9]),i[0]=s[0],i[1]=b,i}function t9(i){var s=[];if(i!=null)for(var p in Je(i))s.push(p);return s}function n9(i){return oc.call(i)}function o_(i,s,p){return s=_t(s===r?i.length-1:s,0),function(){for(var h=arguments,b=-1,x=_t(h.length-s,0),O=Y(x);++b<x;)O[b]=h[s+b];b=-1;for(var M=Y(s+1);++b<s;)M[b]=h[b];return M[s]=p(O),an(i,this,M)}}function a_(i,s){return s.length<2?i:Ao(i,yn(s,0,-1))}function r9(i,s){for(var p=i.length,h=Rt(s.length,p),b=Xt(i);h--;){var x=s[h];i[h]=xr(x,p)?b[x]:r}return i}function sf(i,s){if(!(s==="constructor"&&typeof i[s]=="function")&&s!="__proto__")return i[s]}var i_=s_(Bb),ll=bz||function(i,s){return St.setTimeout(i,s)},cf=s_(ED);function l_(i,s,p){var h=s+"";return cf(i,jD(h,o9(UD(h),p)))}function s_(i){var s=0,p=0;return function(){var h=xz(),b=V-(h-p);if(p=h,b>0){if(++s>=L)return arguments[0]}else s=0;return i.apply(r,arguments)}}function Vc(i,s){var p=-1,h=i.length,b=h-1;for(s=s===r?h:s;++p<s;){var x=Gp(p,b),O=i[x];i[x]=i[p],i[p]=O}return i.length=s,i}var c_=QD(function(i){var s=[];return i.charCodeAt(0)===46&&s.push(""),i.replace(XF,function(p,h,b,x){s.push(b?x.replace(tP,"$1"):h||p)}),s});function or(i){if(typeof i=="string"||cn(i))return i;var s=i+"";return s=="0"&&1/i==-F?"-0":s}function Oo(i){if(i!=null){try{return rc.call(i)}catch{}try{return i+""}catch{}}return""}function o9(i,s){return fn(Ct,function(p){var h="_."+p[0];s&p[1]&&!qs(i,h)&&i.push(h)}),i.sort()}function d_(i){if(i instanceof Fe)return i.clone();var s=new hn(i.__wrapped__,i.__chain__);return s.__actions__=Xt(i.__actions__),s.__index__=i.__index__,s.__values__=i.__values__,s}function a9(i,s,p){(p?zt(i,s,p):s===r)?s=1:s=_t(Re(s),0);var h=i==null?0:i.length;if(!h||s<1)return[];for(var b=0,x=0,O=Y(dc(h/s));b<h;)O[x++]=yn(i,b,b+=s);return O}function i9(i){for(var s=-1,p=i==null?0:i.length,h=0,b=[];++s<p;){var x=i[s];x&&(b[h++]=x)}return b}function l9(){var i=arguments.length;if(!i)return[];for(var s=Y(i-1),p=arguments[0],h=i;h--;)s[h-1]=arguments[h];return Yr(Ve(p)?Xt(p):[p],Et(s,1))}var s9=$e(function(i,s){return ut(i)?tl(i,Et(s,1,ut,!0)):[]}),c9=$e(function(i,s){var p=bn(s);return ut(p)&&(p=r),ut(i)?tl(i,Et(s,1,ut,!0),be(p,2)):[]}),d9=$e(function(i,s){var p=bn(s);return ut(p)&&(p=r),ut(i)?tl(i,Et(s,1,ut,!0),r,p):[]});function u9(i,s,p){var h=i==null?0:i.length;return h?(s=p||s===r?1:Re(s),yn(i,s<0?0:s,h)):[]}function p9(i,s,p){var h=i==null?0:i.length;return h?(s=p||s===r?1:Re(s),s=h-s,yn(i,0,s<0?0:s)):[]}function f9(i,s){return i&&i.length?wc(i,be(s,3),!0,!0):[]}function m9(i,s){return i&&i.length?wc(i,be(s,3),!0):[]}function h9(i,s,p,h){var b=i==null?0:i.length;return b?(p&&typeof p!="number"&&zt(i,s,p)&&(p=0,h=b),lD(i,s,p,h)):[]}function u_(i,s,p){var h=i==null?0:i.length;if(!h)return-1;var b=p==null?0:Re(p);return b<0&&(b=_t(h+b,0)),Qs(i,be(s,3),b)}function p_(i,s,p){var h=i==null?0:i.length;if(!h)return-1;var b=h-1;return p!==r&&(b=Re(p),b=p<0?_t(h+b,0):Rt(b,h-1)),Qs(i,be(s,3),b,!0)}function f_(i){var s=i==null?0:i.length;return s?Et(i,1):[]}function g9(i){var s=i==null?0:i.length;return s?Et(i,F):[]}function y9(i,s){var p=i==null?0:i.length;return p?(s=s===r?1:Re(s),Et(i,s)):[]}function b9(i){for(var s=-1,p=i==null?0:i.length,h={};++s<p;){var b=i[s];h[b[0]]=b[1]}return h}function m_(i){return i&&i.length?i[0]:r}function _9(i,s,p){var h=i==null?0:i.length;if(!h)return-1;var b=p==null?0:Re(p);return b<0&&(b=_t(h+b,0)),ka(i,s,b)}function w9(i){var s=i==null?0:i.length;return s?yn(i,0,-1):[]}var k9=$e(function(i){var s=nt(i,Yp);return s.length&&s[0]===i[0]?Fp(s):[]}),x9=$e(function(i){var s=bn(i),p=nt(i,Yp);return s===bn(p)?s=r:p.pop(),p.length&&p[0]===i[0]?Fp(p,be(s,2)):[]}),v9=$e(function(i){var s=bn(i),p=nt(i,Yp);return s=typeof s=="function"?s:r,s&&p.pop(),p.length&&p[0]===i[0]?Fp(p,r,s):[]});function C9(i,s){return i==null?"":wz.call(i,s)}function bn(i){var s=i==null?0:i.length;return s?i[s-1]:r}function S9(i,s,p){var h=i==null?0:i.length;if(!h)return-1;var b=h;return p!==r&&(b=Re(p),b=b<0?_t(h+b,0):Rt(b,h-1)),s===s?oz(i,s,b):Qs(i,j0,b,!0)}function E9(i,s){return i&&i.length?Sb(i,Re(s)):r}var N9=$e(h_);function h_(i,s){return i&&i.length&&s&&s.length?Wp(i,s):i}function V9(i,s,p){return i&&i.length&&s&&s.length?Wp(i,s,be(p,2)):i}function B9(i,s,p){return i&&i.length&&s&&s.length?Wp(i,s,r,p):i}var T9=kr(function(i,s){var p=i==null?0:i.length,h=Op(i,s);return Vb(i,nt(s,function(b){return xr(b,p)?+b:b}).sort(Mb)),h});function R9(i,s){var p=[];if(!(i&&i.length))return p;var h=-1,b=[],x=i.length;for(s=be(s,3);++h<x;){var O=i[h];s(O,h,i)&&(p.push(O),b.push(h))}return Vb(i,b),p}function df(i){return i==null?i:Cz.call(i)}function I9(i,s,p){var h=i==null?0:i.length;return h?(p&&typeof p!="number"&&zt(i,s,p)?(s=0,p=h):(s=s==null?0:Re(s),p=p===r?h:Re(p)),yn(i,s,p)):[]}function A9(i,s){return _c(i,s)}function L9(i,s,p){return Hp(i,s,be(p,2))}function O9(i,s){var p=i==null?0:i.length;if(p){var h=_c(i,s);if(h<p&&Wn(i[h],s))return h}return-1}function $9(i,s){return _c(i,s,!0)}function Z9(i,s,p){return Hp(i,s,be(p,2),!0)}function M9(i,s){var p=i==null?0:i.length;if(p){var h=_c(i,s,!0)-1;if(Wn(i[h],s))return h}return-1}function F9(i){return i&&i.length?Tb(i):[]}function P9(i,s){return i&&i.length?Tb(i,be(s,2)):[]}function z9(i){var s=i==null?0:i.length;return s?yn(i,1,s):[]}function D9(i,s,p){return i&&i.length?(s=p||s===r?1:Re(s),yn(i,0,s<0?0:s)):[]}function W9(i,s,p){var h=i==null?0:i.length;return h?(s=p||s===r?1:Re(s),s=h-s,yn(i,s<0?0:s,h)):[]}function G9(i,s){return i&&i.length?wc(i,be(s,3),!1,!0):[]}function U9(i,s){return i&&i.length?wc(i,be(s,3)):[]}var H9=$e(function(i){return Qr(Et(i,1,ut,!0))}),X9=$e(function(i){var s=bn(i);return ut(s)&&(s=r),Qr(Et(i,1,ut,!0),be(s,2))}),j9=$e(function(i){var s=bn(i);return s=typeof s=="function"?s:r,Qr(Et(i,1,ut,!0),r,s)});function Y9(i){return i&&i.length?Qr(i):[]}function K9(i,s){return i&&i.length?Qr(i,be(s,2)):[]}function J9(i,s){return s=typeof s=="function"?s:r,i&&i.length?Qr(i,r,s):[]}function uf(i){if(!(i&&i.length))return[];var s=0;return i=jr(i,function(p){if(ut(p))return s=_t(p.length,s),!0}),Np(s,function(p){return nt(i,Cp(p))})}function g_(i,s){if(!(i&&i.length))return[];var p=uf(i);return s==null?p:nt(p,function(h){return an(s,r,h)})}var q9=$e(function(i,s){return ut(i)?tl(i,s):[]}),Q9=$e(function(i){return jp(jr(i,ut))}),eW=$e(function(i){var s=bn(i);return ut(s)&&(s=r),jp(jr(i,ut),be(s,2))}),tW=$e(function(i){var s=bn(i);return s=typeof s=="function"?s:r,jp(jr(i,ut),r,s)}),nW=$e(uf);function rW(i,s){return Lb(i||[],s||[],el)}function oW(i,s){return Lb(i||[],s||[],ol)}var aW=$e(function(i){var s=i.length,p=s>1?i[s-1]:r;return p=typeof p=="function"?(i.pop(),p):r,g_(i,p)});function y_(i){var s=w(i);return s.__chain__=!0,s}function iW(i,s){return s(i),i}function Bc(i,s){return s(i)}var lW=kr(function(i){var s=i.length,p=s?i[0]:0,h=this.__wrapped__,b=function(x){return Op(x,i)};return s>1||this.__actions__.length||!(h instanceof Fe)||!xr(p)?this.thru(b):(h=h.slice(p,+p+(s?1:0)),h.__actions__.push({func:Bc,args:[b],thisArg:r}),new hn(h,this.__chain__).thru(function(x){return s&&!x.length&&x.push(r),x}))});function sW(){return y_(this)}function cW(){return new hn(this.value(),this.__chain__)}function dW(){this.__values__===r&&(this.__values__=R_(this.value()));var i=this.__index__>=this.__values__.length,s=i?r:this.__values__[this.__index__++];return{done:i,value:s}}function uW(){return this}function pW(i){for(var s,p=this;p instanceof mc;){var h=d_(p);h.__index__=0,h.__values__=r,s?b.__wrapped__=h:s=h;var b=h;p=p.__wrapped__}return b.__wrapped__=i,s}function fW(){var i=this.__wrapped__;if(i instanceof Fe){var s=i;return this.__actions__.length&&(s=new Fe(this)),s=s.reverse(),s.__actions__.push({func:Bc,args:[df],thisArg:r}),new hn(s,this.__chain__)}return this.thru(df)}function mW(){return Ab(this.__wrapped__,this.__actions__)}var hW=kc(function(i,s,p){Ke.call(i,p)?++i[p]:_r(i,p,1)});function gW(i,s,p){var h=Ve(i)?H0:iD;return p&&zt(i,s,p)&&(s=r),h(i,be(s,3))}function yW(i,s){var p=Ve(i)?jr:gb;return p(i,be(s,3))}var bW=Gb(u_),_W=Gb(p_);function wW(i,s){return Et(Tc(i,s),1)}function kW(i,s){return Et(Tc(i,s),F)}function xW(i,s,p){return p=p===r?1:Re(p),Et(Tc(i,s),p)}function b_(i,s){var p=Ve(i)?fn:qr;return p(i,be(s,3))}function __(i,s){var p=Ve(i)?zP:hb;return p(i,be(s,3))}var vW=kc(function(i,s,p){Ke.call(i,p)?i[p].push(s):_r(i,p,[s])});function CW(i,s,p,h){i=jt(i)?i:Aa(i),p=p&&!h?Re(p):0;var b=i.length;return p<0&&(p=_t(b+p,0)),Oc(i)?p<=b&&i.indexOf(s,p)>-1:!!b&&ka(i,s,p)>-1}var SW=$e(function(i,s,p){var h=-1,b=typeof s=="function",x=jt(i)?Y(i.length):[];return qr(i,function(O){x[++h]=b?an(s,O,p):nl(O,s,p)}),x}),EW=kc(function(i,s,p){_r(i,p,s)});function Tc(i,s){var p=Ve(i)?nt:xb;return p(i,be(s,3))}function NW(i,s,p,h){return i==null?[]:(Ve(s)||(s=s==null?[]:[s]),p=h?r:p,Ve(p)||(p=p==null?[]:[p]),Eb(i,s,p))}var VW=kc(function(i,s,p){i[p?0:1].push(s)},function(){return[[],[]]});function BW(i,s,p){var h=Ve(i)?xp:K0,b=arguments.length<3;return h(i,be(s,4),p,b,qr)}function TW(i,s,p){var h=Ve(i)?DP:K0,b=arguments.length<3;return h(i,be(s,4),p,b,hb)}function RW(i,s){var p=Ve(i)?jr:gb;return p(i,Ac(be(s,3)))}function IW(i){var s=Ve(i)?ub:CD;return s(i)}function AW(i,s,p){(p?zt(i,s,p):s===r)?s=1:s=Re(s);var h=Ve(i)?tD:SD;return h(i,s)}function LW(i){var s=Ve(i)?nD:ND;return s(i)}function OW(i){if(i==null)return 0;if(jt(i))return Oc(i)?va(i):i.length;var s=It(i);return s==Fn||s==Pn?i.size:zp(i).length}function $W(i,s,p){var h=Ve(i)?vp:VD;return p&&zt(i,s,p)&&(s=r),h(i,be(s,3))}var ZW=$e(function(i,s){if(i==null)return[];var p=s.length;return p>1&&zt(i,s[0],s[1])?s=[]:p>2&&zt(s[0],s[1],s[2])&&(s=[s[0]]),Eb(i,Et(s,1),[])}),Rc=yz||function(){return St.Date.now()};function MW(i,s){if(typeof s!="function")throw new mn(c);return i=Re(i),function(){if(--i<1)return s.apply(this,arguments)}}function w_(i,s,p){return s=p?r:s,s=i&&s==null?i.length:s,wr(i,P,r,r,r,r,s)}function k_(i,s){var p;if(typeof s!="function")throw new mn(c);return i=Re(i),function(){return--i>0&&(p=s.apply(this,arguments)),i<=1&&(s=r),p}}var pf=$e(function(i,s,p){var h=T;if(p.length){var b=Kr(p,Ra(pf));h|=A}return wr(i,h,s,p,b)}),x_=$e(function(i,s,p){var h=T|$;if(p.length){var b=Kr(p,Ra(x_));h|=A}return wr(s,h,i,p,b)});function v_(i,s,p){s=p?r:s;var h=wr(i,E,r,r,r,r,r,s);return h.placeholder=v_.placeholder,h}function C_(i,s,p){s=p?r:s;var h=wr(i,D,r,r,r,r,r,s);return h.placeholder=C_.placeholder,h}function S_(i,s,p){var h,b,x,O,M,X,J=0,q=!1,Q=!1,oe=!0;if(typeof i!="function")throw new mn(c);s=_n(s)||0,lt(p)&&(q=!!p.leading,Q="maxWait"in p,x=Q?_t(_n(p.maxWait)||0,s):x,oe="trailing"in p?!!p.trailing:oe);function fe(pt){var Gn=h,Sr=b;return h=b=r,J=pt,O=i.apply(Sr,Gn),O}function _e(pt){return J=pt,M=ll(Ze,s),q?fe(pt):O}function Oe(pt){var Gn=pt-X,Sr=pt-J,G_=s-Gn;return Q?Rt(G_,x-Sr):G_}function we(pt){var Gn=pt-X,Sr=pt-J;return X===r||Gn>=s||Gn<0||Q&&Sr>=x}function Ze(){var pt=Rc();if(we(pt))return De(pt);M=ll(Ze,Oe(pt))}function De(pt){return M=r,oe&&h?fe(pt):(h=b=r,O)}function dn(){M!==r&&Ob(M),J=0,h=X=b=M=r}function Dt(){return M===r?O:De(Rc())}function un(){var pt=Rc(),Gn=we(pt);if(h=arguments,b=this,X=pt,Gn){if(M===r)return _e(X);if(Q)return Ob(M),M=ll(Ze,s),fe(X)}return M===r&&(M=ll(Ze,s)),O}return un.cancel=dn,un.flush=Dt,un}var FW=$e(function(i,s){return mb(i,1,s)}),PW=$e(function(i,s,p){return mb(i,_n(s)||0,p)});function zW(i){return wr(i,S)}function Ic(i,s){if(typeof i!="function"||s!=null&&typeof s!="function")throw new mn(c);var p=function(){var h=arguments,b=s?s.apply(this,h):h[0],x=p.cache;if(x.has(b))return x.get(b);var O=i.apply(this,h);return p.cache=x.set(b,O)||x,O};return p.cache=new(Ic.Cache||br),p}Ic.Cache=br;function Ac(i){if(typeof i!="function")throw new mn(c);return function(){var s=arguments;switch(s.length){case 0:return!i.call(this);case 1:return!i.call(this,s[0]);case 2:return!i.call(this,s[0],s[1]);case 3:return!i.call(this,s[0],s[1],s[2])}return!i.apply(this,s)}}function DW(i){return k_(2,i)}var WW=BD(function(i,s){s=s.length==1&&Ve(s[0])?nt(s[0],ln(be())):nt(Et(s,1),ln(be()));var p=s.length;return $e(function(h){for(var b=-1,x=Rt(h.length,p);++b<x;)h[b]=s[b].call(this,h[b]);return an(i,this,h)})}),ff=$e(function(i,s){var p=Kr(s,Ra(ff));return wr(i,A,r,s,p)}),E_=$e(function(i,s){var p=Kr(s,Ra(E_));return wr(i,B,r,s,p)}),GW=kr(function(i,s){return wr(i,H,r,r,r,s)});function UW(i,s){if(typeof i!="function")throw new mn(c);return s=s===r?s:Re(s),$e(i,s)}function HW(i,s){if(typeof i!="function")throw new mn(c);return s=s==null?0:_t(Re(s),0),$e(function(p){var h=p[s],b=to(p,0,s);return h&&Yr(b,h),an(i,this,b)})}function XW(i,s,p){var h=!0,b=!0;if(typeof i!="function")throw new mn(c);return lt(p)&&(h="leading"in p?!!p.leading:h,b="trailing"in p?!!p.trailing:b),S_(i,s,{leading:h,maxWait:s,trailing:b})}function jW(i){return w_(i,1)}function YW(i,s){return ff(Kp(s),i)}function KW(){if(!arguments.length)return[];var i=arguments[0];return Ve(i)?i:[i]}function JW(i){return gn(i,_)}function qW(i,s){return s=typeof s=="function"?s:r,gn(i,_,s)}function QW(i){return gn(i,g|_)}function e4(i,s){return s=typeof s=="function"?s:r,gn(i,g|_,s)}function t4(i,s){return s==null||fb(i,s,xt(s))}function Wn(i,s){return i===s||i!==i&&s!==s}var n4=Sc(Mp),r4=Sc(function(i,s){return i>=s}),$o=_b(function(){return arguments}())?_b:function(i){return dt(i)&&Ke.call(i,"callee")&&!ab.call(i,"callee")},Ve=Y.isArray,o4=P0?ln(P0):pD;function jt(i){return i!=null&&Lc(i.length)&&!vr(i)}function ut(i){return dt(i)&&jt(i)}function a4(i){return i===!0||i===!1||dt(i)&&Pt(i)==zi}var no=_z||Cf,i4=z0?ln(z0):fD;function l4(i){return dt(i)&&i.nodeType===1&&!sl(i)}function s4(i){if(i==null)return!0;if(jt(i)&&(Ve(i)||typeof i=="string"||typeof i.splice=="function"||no(i)||Ia(i)||$o(i)))return!i.length;var s=It(i);if(s==Fn||s==Pn)return!i.size;if(il(i))return!zp(i).length;for(var p in i)if(Ke.call(i,p))return!1;return!0}function c4(i,s){return rl(i,s)}function d4(i,s,p){p=typeof p=="function"?p:r;var h=p?p(i,s):r;return h===r?rl(i,s,r,p):!!h}function mf(i){if(!dt(i))return!1;var s=Pt(i);return s==Hs||s==AF||typeof i.message=="string"&&typeof i.name=="string"&&!sl(i)}function u4(i){return typeof i=="number"&&lb(i)}function vr(i){if(!lt(i))return!1;var s=Pt(i);return s==Xs||s==m0||s==IF||s==OF}function N_(i){return typeof i=="number"&&i==Re(i)}function Lc(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=j}function lt(i){var s=typeof i;return i!=null&&(s=="object"||s=="function")}function dt(i){return i!=null&&typeof i=="object"}var V_=D0?ln(D0):hD;function p4(i,s){return i===s||Pp(i,s,rf(s))}function f4(i,s,p){return p=typeof p=="function"?p:r,Pp(i,s,rf(s),p)}function m4(i){return B_(i)&&i!=+i}function h4(i){if(qD(i))throw new Ne(l);return wb(i)}function g4(i){return i===null}function y4(i){return i==null}function B_(i){return typeof i=="number"||dt(i)&&Pt(i)==Wi}function sl(i){if(!dt(i)||Pt(i)!=gr)return!1;var s=lc(i);if(s===null)return!0;var p=Ke.call(s,"constructor")&&s.constructor;return typeof p=="function"&&p instanceof p&&rc.call(p)==fz}var hf=W0?ln(W0):gD;function b4(i){return N_(i)&&i>=-j&&i<=j}var T_=G0?ln(G0):yD;function Oc(i){return typeof i=="string"||!Ve(i)&&dt(i)&&Pt(i)==Ui}function cn(i){return typeof i=="symbol"||dt(i)&&Pt(i)==js}var Ia=U0?ln(U0):bD;function _4(i){return i===r}function w4(i){return dt(i)&&It(i)==Hi}function k4(i){return dt(i)&&Pt(i)==ZF}var x4=Sc(Dp),v4=Sc(function(i,s){return i<=s});function R_(i){if(!i)return[];if(jt(i))return Oc(i)?zn(i):Xt(i);if(Yi&&i[Yi])return tz(i[Yi]());var s=It(i),p=s==Fn?Bp:s==Pn?ec:Aa;return p(i)}function Cr(i){if(!i)return i===0?i:0;if(i=_n(i),i===F||i===-F){var s=i<0?-1:1;return s*ee}return i===i?i:0}function Re(i){var s=Cr(i),p=s%1;return s===s?p?s-p:s:0}function I_(i){return i?Io(Re(i),0,ye):0}function _n(i){if(typeof i=="number")return i;if(cn(i))return ue;if(lt(i)){var s=typeof i.valueOf=="function"?i.valueOf():i;i=lt(s)?s+"":s}if(typeof i!="string")return i===0?i:+i;i=J0(i);var p=oP.test(i);return p||iP.test(i)?MP(i.slice(2),p?2:8):rP.test(i)?ue:+i}function A_(i){return rr(i,Yt(i))}function C4(i){return i?Io(Re(i),-j,j):i===0?i:0}function je(i){return i==null?"":sn(i)}var S4=Ba(function(i,s){if(il(s)||jt(s)){rr(s,xt(s),i);return}for(var p in s)Ke.call(s,p)&&el(i,p,s[p])}),L_=Ba(function(i,s){rr(s,Yt(s),i)}),$c=Ba(function(i,s,p,h){rr(s,Yt(s),i,h)}),E4=Ba(function(i,s,p,h){rr(s,xt(s),i,h)}),N4=kr(Op);function V4(i,s){var p=Va(i);return s==null?p:pb(p,s)}var B4=$e(function(i,s){i=Je(i);var p=-1,h=s.length,b=h>2?s[2]:r;for(b&&zt(s[0],s[1],b)&&(h=1);++p<h;)for(var x=s[p],O=Yt(x),M=-1,X=O.length;++M<X;){var J=O[M],q=i[J];(q===r||Wn(q,Sa[J])&&!Ke.call(i,J))&&(i[J]=x[J])}return i}),T4=$e(function(i){return i.push(r,Jb),an(O_,r,i)});function R4(i,s){return X0(i,be(s,3),nr)}function I4(i,s){return X0(i,be(s,3),Zp)}function A4(i,s){return i==null?i:$p(i,be(s,3),Yt)}function L4(i,s){return i==null?i:yb(i,be(s,3),Yt)}function O4(i,s){return i&&nr(i,be(s,3))}function $4(i,s){return i&&Zp(i,be(s,3))}function Z4(i){return i==null?[]:yc(i,xt(i))}function M4(i){return i==null?[]:yc(i,Yt(i))}function gf(i,s,p){var h=i==null?r:Ao(i,s);return h===r?p:h}function F4(i,s){return i!=null&&e_(i,s,sD)}function yf(i,s){return i!=null&&e_(i,s,cD)}var P4=Hb(function(i,s,p){s!=null&&typeof s.toString!="function"&&(s=oc.call(s)),i[s]=p},_f(Kt)),z4=Hb(function(i,s,p){s!=null&&typeof s.toString!="function"&&(s=oc.call(s)),Ke.call(i,s)?i[s].push(p):i[s]=[p]},be),D4=$e(nl);function xt(i){return jt(i)?db(i):zp(i)}function Yt(i){return jt(i)?db(i,!0):_D(i)}function W4(i,s){var p={};return s=be(s,3),nr(i,function(h,b,x){_r(p,s(h,b,x),h)}),p}function G4(i,s){var p={};return s=be(s,3),nr(i,function(h,b,x){_r(p,b,s(h,b,x))}),p}var U4=Ba(function(i,s,p){bc(i,s,p)}),O_=Ba(function(i,s,p,h){bc(i,s,p,h)}),H4=kr(function(i,s){var p={};if(i==null)return p;var h=!1;s=nt(s,function(x){return x=eo(x,i),h||(h=x.length>1),x}),rr(i,tf(i),p),h&&(p=gn(p,g|y|_,PD));for(var b=s.length;b--;)Xp(p,s[b]);return p});function X4(i,s){return $_(i,Ac(be(s)))}var j4=kr(function(i,s){return i==null?{}:kD(i,s)});function $_(i,s){if(i==null)return{};var p=nt(tf(i),function(h){return[h]});return s=be(s),Nb(i,p,function(h,b){return s(h,b[0])})}function Y4(i,s,p){s=eo(s,i);var h=-1,b=s.length;for(b||(b=1,i=r);++h<b;){var x=i==null?r:i[or(s[h])];x===r&&(h=b,x=p),i=vr(x)?x.call(i):x}return i}function K4(i,s,p){return i==null?i:ol(i,s,p)}function J4(i,s,p,h){return h=typeof h=="function"?h:r,i==null?i:ol(i,s,p,h)}var Z_=Yb(xt),M_=Yb(Yt);function q4(i,s,p){var h=Ve(i),b=h||no(i)||Ia(i);if(s=be(s,4),p==null){var x=i&&i.constructor;b?p=h?new x:[]:lt(i)?p=vr(x)?Va(lc(i)):{}:p={}}return(b?fn:nr)(i,function(O,M,X){return s(p,O,M,X)}),p}function Q4(i,s){return i==null?!0:Xp(i,s)}function eG(i,s,p){return i==null?i:Ib(i,s,Kp(p))}function tG(i,s,p,h){return h=typeof h=="function"?h:r,i==null?i:Ib(i,s,Kp(p),h)}function Aa(i){return i==null?[]:Vp(i,xt(i))}function nG(i){return i==null?[]:Vp(i,Yt(i))}function rG(i,s,p){return p===r&&(p=s,s=r),p!==r&&(p=_n(p),p=p===p?p:0),s!==r&&(s=_n(s),s=s===s?s:0),Io(_n(i),s,p)}function oG(i,s,p){return s=Cr(s),p===r?(p=s,s=0):p=Cr(p),i=_n(i),dD(i,s,p)}function aG(i,s,p){if(p&&typeof p!="boolean"&&zt(i,s,p)&&(s=p=r),p===r&&(typeof s=="boolean"?(p=s,s=r):typeof i=="boolean"&&(p=i,i=r)),i===r&&s===r?(i=0,s=1):(i=Cr(i),s===r?(s=i,i=0):s=Cr(s)),i>s){var h=i;i=s,s=h}if(p||i%1||s%1){var b=sb();return Rt(i+b*(s-i+ZP("1e-"+((b+"").length-1))),s)}return Gp(i,s)}var iG=Ta(function(i,s,p){return s=s.toLowerCase(),i+(p?F_(s):s)});function F_(i){return bf(je(i).toLowerCase())}function P_(i){return i=je(i),i&&i.replace(sP,KP).replace(NP,"")}function lG(i,s,p){i=je(i),s=sn(s);var h=i.length;p=p===r?h:Io(Re(p),0,h);var b=p;return p-=s.length,p>=0&&i.slice(p,b)==s}function sG(i){return i=je(i),i&&DF.test(i)?i.replace(y0,JP):i}function cG(i){return i=je(i),i&&jF.test(i)?i.replace(pp,"\\$&"):i}var dG=Ta(function(i,s,p){return i+(p?"-":"")+s.toLowerCase()}),uG=Ta(function(i,s,p){return i+(p?" ":"")+s.toLowerCase()}),pG=Wb("toLowerCase");function fG(i,s,p){i=je(i),s=Re(s);var h=s?va(i):0;if(!s||h>=s)return i;var b=(s-h)/2;return Cc(uc(b),p)+i+Cc(dc(b),p)}function mG(i,s,p){i=je(i),s=Re(s);var h=s?va(i):0;return s&&h<s?i+Cc(s-h,p):i}function hG(i,s,p){i=je(i),s=Re(s);var h=s?va(i):0;return s&&h<s?Cc(s-h,p)+i:i}function gG(i,s,p){return p||s==null?s=0:s&&(s=+s),vz(je(i).replace(fp,""),s||0)}function yG(i,s,p){return(p?zt(i,s,p):s===r)?s=1:s=Re(s),Up(je(i),s)}function bG(){var i=arguments,s=je(i[0]);return i.length<3?s:s.replace(i[1],i[2])}var _G=Ta(function(i,s,p){return i+(p?"_":"")+s.toLowerCase()});function wG(i,s,p){return p&&typeof p!="number"&&zt(i,s,p)&&(s=p=r),p=p===r?ye:p>>>0,p?(i=je(i),i&&(typeof s=="string"||s!=null&&!hf(s))&&(s=sn(s),!s&&xa(i))?to(zn(i),0,p):i.split(s,p)):[]}var kG=Ta(function(i,s,p){return i+(p?" ":"")+bf(s)});function xG(i,s,p){return i=je(i),p=p==null?0:Io(Re(p),0,i.length),s=sn(s),i.slice(p,p+s.length)==s}function vG(i,s,p){var h=w.templateSettings;p&&zt(i,s,p)&&(s=r),i=je(i),s=$c({},s,h,Kb);var b=$c({},s.imports,h.imports,Kb),x=xt(b),O=Vp(b,x),M,X,J=0,q=s.interpolate||Ys,Q="__p += '",oe=Tp((s.escape||Ys).source+"|"+q.source+"|"+(q===b0?nP:Ys).source+"|"+(s.evaluate||Ys).source+"|$","g"),fe="//# sourceURL="+(Ke.call(s,"sourceURL")?(s.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++IP+"]")+`
|
|
63
|
+
`;i.replace(oe,function(we,Ze,De,dn,Dt,un){return De||(De=dn),Q+=i.slice(J,un).replace(cP,qP),Ze&&(M=!0,Q+=`' +
|
|
64
|
+
__e(`+Ze+`) +
|
|
65
|
+
'`),Dt&&(X=!0,Q+=`';
|
|
66
|
+
`+Dt+`;
|
|
67
|
+
__p += '`),De&&(Q+=`' +
|
|
68
|
+
((__t = (`+De+`)) == null ? '' : __t) +
|
|
69
|
+
'`),J=un+we.length,we}),Q+=`';
|
|
70
|
+
`;var _e=Ke.call(s,"variable")&&s.variable;if(!_e)Q=`with (obj) {
|
|
71
71
|
`+Q+`
|
|
72
72
|
}
|
|
73
|
-
`;else if(
|
|
74
|
-
`+(
|
|
75
|
-
`)+"var __t, __p = ''"+(
|
|
73
|
+
`;else if(eP.test(_e))throw new Ne(d);Q=(X?Q.replace(MF,""):Q).replace(FF,"$1").replace(PF,"$1;"),Q="function("+(_e||"obj")+`) {
|
|
74
|
+
`+(_e?"":`obj || (obj = {});
|
|
75
|
+
`)+"var __t, __p = ''"+(M?", __e = _.escape":"")+(X?`, __j = Array.prototype.join;
|
|
76
76
|
function print() { __p += __j.call(arguments, '') }
|
|
77
77
|
`:`;
|
|
78
78
|
`)+Q+`return __p
|
|
79
|
-
}`;var Ie=Q_(function(){return qe(x,pe+"return "+Q).apply(r,I)});if(Ie.source=Q,Wf(Ie))throw Ie;return Ie}function F8(i){return Ge(i).toLowerCase()}function z8(i){return Ge(i).toUpperCase()}function U8(i,l,f){if(i=Ge(i),i&&(f||l===r))return l0(i);if(!i||!(l=sn(l)))return i;var m=zn(i),_=zn(l),x=c0(m,_),I=d0(m,_)+1;return Jr(m,x,I).join("")}function j8(i,l,f){if(i=Ge(i),i&&(f||l===r))return i.slice(0,f0(i)+1);if(!i||!(l=sn(l)))return i;var m=zn(i),_=d0(m,zn(l))+1;return Jr(m,0,_).join("")}function Z8(i,l,f){if(i=Ge(i),i&&(f||l===r))return i.replace(Zu,"");if(!i||!(l=sn(l)))return i;var m=zn(i),_=c0(m,zn(l));return Jr(m,_).join("")}function W8(i,l){var f=A,m=v;if(st(l)){var _="separator"in l?l.separator:_;f="length"in l?Ae(l.length):f,m="omission"in l?sn(l.omission):m}i=Ge(i);var x=i.length;if(ma(i)){var I=zn(i);x=I.length}if(f>=x)return i;var P=f-ga(m);if(P<1)return m;var H=I?Jr(I,0,P).join(""):i.slice(0,P);if(_===r)return H+m;if(I&&(P+=H.length-P),Hf(_)){if(i.slice(P).search(_)){var Y,J=H;for(_.global||(_=lf(_.source,Ge(Ty.exec(_))+"g")),_.lastIndex=0;Y=_.exec(J);)var Q=Y.index;H=H.slice(0,Q===r?P:Q)}}else if(i.indexOf(sn(_),P)!=P){var oe=H.lastIndexOf(_);oe>-1&&(H=H.slice(0,oe))}return H+m}function H8(i){return i=Ge(i),i&&r3.test(i)?i.replace(Ny,kF):i}var q8=va(function(i,l,f){return i+(f?" ":"")+l.toUpperCase()}),Kf=e_("toUpperCase");function J_(i,l,f){return i=Ge(i),l=f?r:l,l===r?gF(i)?CF(i):sF(i):i.match(l)||[]}var Q_=De(function(i,l){try{return on(i,r,l)}catch(f){return Wf(f)?f:new Ne(f)}}),G8=_r(function(i,l){return pn(l,function(f){f=rr(f),gr(i,f,jf(i[f],i))}),i});function K8(i){var l=i==null?0:i.length,f=_e();return i=l?nt(i,function(m){if(typeof m[1]!="function")throw new hn(c);return[f(m[0]),m[1]]}):[],De(function(m){for(var _=-1;++_<l;){var x=i[_];if(on(x[0],this,m))return on(x[1],this,m)}})}function X8(i){return k4(gn(i,g))}function Xf(i){return function(){return i}}function Y8(i,l){return i==null||i!==i?l:i}var J8=n_(),Q8=n_(!0);function Kt(i){return i}function Yf(i){return $0(typeof i=="function"?i:gn(i,g))}function e9(i){return O0(gn(i,g))}function t9(i,l){return I0(i,gn(l,g))}var n9=De(function(i,l){return function(f){return Yi(f,i,l)}}),r9=De(function(i,l){return function(f){return Yi(i,f,l)}});function Jf(i,l,f){var m=xt(l),_=rc(l,m);f==null&&!(st(l)&&(_.length||!m.length))&&(f=l,l=i,i=this,_=rc(l,xt(l)));var x=!(st(f)&&"chain"in f)||!!f.chain,I=br(i);return pn(_,function(P){var H=l[P];i[P]=H,I&&(i.prototype[P]=function(){var Y=this.__chain__;if(x||Y){var J=i(this.__wrapped__),Q=J.__actions__=Ht(this.__actions__);return Q.push({func:H,args:arguments,thisArg:i}),J.__chain__=Y,J}return H.apply(i,Hr([this.value()],arguments))})}),i}function o9(){return Et._===this&&(Et._=TF),this}function Qf(){}function a9(i){return i=Ae(i),De(function(l){return D0(l,i)})}var i9=Tf(nt),s9=Tf(r0),l9=Tf(ef);function ew(i){return Mf(i)?tf(rr(i)):P4(i)}function c9(i){return function(l){return i==null?r:Bo(i,l)}}var d9=o_(),u9=o_(!0);function ep(){return[]}function tp(){return!1}function f9(){return{}}function p9(){return""}function h9(){return!0}function m9(i,l){if(i=Ae(i),i<1||i>G)return[];var f=ye,m=At(i,ye);l=_e(l),i-=ye;for(var _=of(m,l);++f<i;)l(f);return _}function g9(i){return Be(i)?nt(i,rr):ln(i)?[i]:Ht(b_(Ge(i)))}function y9(i){var l=++BF;return Ge(i)+l}var _9=cc(function(i,l){return i+l},0),w9=Af("ceil"),b9=cc(function(i,l){return i/l},1),k9=Af("floor");function x9(i){return i&&i.length?nc(i,Kt,gf):r}function v9(i,l){return i&&i.length?nc(i,_e(l,2),gf):r}function C9(i){return i0(i,Kt)}function E9(i,l){return i0(i,_e(l,2))}function S9(i){return i&&i.length?nc(i,Kt,bf):r}function N9(i,l){return i&&i.length?nc(i,_e(l,2),bf):r}var B9=cc(function(i,l){return i*l},1),V9=Af("round"),T9=cc(function(i,l){return i-l},0);function A9(i){return i&&i.length?rf(i,Kt):0}function $9(i,l){return i&&i.length?rf(i,_e(l,2)):0}return b.after=e6,b.ary=A_,b.assign=z6,b.assignIn=W_,b.assignInWith=xc,b.assignWith=U6,b.at=j6,b.before=$_,b.bind=jf,b.bindAll=G8,b.bindKey=R_,b.castArray=f6,b.chain=B_,b.chunk=kz,b.compact=xz,b.concat=vz,b.cond=K8,b.conforms=X8,b.constant=Xf,b.countBy=A5,b.create=Z6,b.curry=O_,b.curryRight=I_,b.debounce=D_,b.defaults=W6,b.defaultsDeep=H6,b.defer=t6,b.delay=n6,b.difference=Cz,b.differenceBy=Ez,b.differenceWith=Sz,b.drop=Nz,b.dropRight=Bz,b.dropRightWhile=Vz,b.dropWhile=Tz,b.fill=Az,b.filter=R5,b.flatMap=D5,b.flatMapDeep=M5,b.flatMapDepth=P5,b.flatten=C_,b.flattenDeep=$z,b.flattenDepth=Rz,b.flip=r6,b.flow=J8,b.flowRight=Q8,b.fromPairs=Oz,b.functions=Q6,b.functionsIn=e8,b.groupBy=L5,b.initial=Dz,b.intersection=Mz,b.intersectionBy=Pz,b.intersectionWith=Lz,b.invert=n8,b.invertBy=r8,b.invokeMap=z5,b.iteratee=Yf,b.keyBy=U5,b.keys=xt,b.keysIn=Gt,b.map=gc,b.mapKeys=a8,b.mapValues=i8,b.matches=e9,b.matchesProperty=t9,b.memoize=_c,b.merge=s8,b.mergeWith=H_,b.method=n9,b.methodOf=r9,b.mixin=Jf,b.negate=wc,b.nthArg=a9,b.omit=l8,b.omitBy=c8,b.once=o6,b.orderBy=j5,b.over=i9,b.overArgs=a6,b.overEvery=s9,b.overSome=l9,b.partial=Zf,b.partialRight=M_,b.partition=Z5,b.pick=d8,b.pickBy=q_,b.property=ew,b.propertyOf=c9,b.pull=jz,b.pullAll=S_,b.pullAllBy=Zz,b.pullAllWith=Wz,b.pullAt=Hz,b.range=d9,b.rangeRight=u9,b.rearg=i6,b.reject=q5,b.remove=qz,b.rest=s6,b.reverse=zf,b.sampleSize=K5,b.set=f8,b.setWith=p8,b.shuffle=X5,b.slice=Gz,b.sortBy=Q5,b.sortedUniq=t5,b.sortedUniqBy=n5,b.split=D8,b.spread=l6,b.tail=r5,b.take=o5,b.takeRight=a5,b.takeRightWhile=i5,b.takeWhile=s5,b.tap=x5,b.throttle=c6,b.thru=mc,b.toArray=U_,b.toPairs=G_,b.toPairsIn=K_,b.toPath=g9,b.toPlainObject=Z_,b.transform=h8,b.unary=d6,b.union=l5,b.unionBy=c5,b.unionWith=d5,b.uniq=u5,b.uniqBy=f5,b.uniqWith=p5,b.unset=m8,b.unzip=Uf,b.unzipWith=N_,b.update=g8,b.updateWith=y8,b.values=Sa,b.valuesIn=_8,b.without=h5,b.words=J_,b.wrap=u6,b.xor=m5,b.xorBy=g5,b.xorWith=y5,b.zip=_5,b.zipObject=w5,b.zipObjectDeep=b5,b.zipWith=k5,b.entries=G_,b.entriesIn=K_,b.extend=W_,b.extendWith=xc,Jf(b,b),b.add=_9,b.attempt=Q_,b.camelCase=x8,b.capitalize=X_,b.ceil=w9,b.clamp=w8,b.clone=p6,b.cloneDeep=m6,b.cloneDeepWith=g6,b.cloneWith=h6,b.conformsTo=y6,b.deburr=Y_,b.defaultTo=Y8,b.divide=b9,b.endsWith=v8,b.eq=jn,b.escape=C8,b.escapeRegExp=E8,b.every=$5,b.find=O5,b.findIndex=x_,b.findKey=q6,b.findLast=I5,b.findLastIndex=v_,b.findLastKey=G6,b.floor=k9,b.forEach=V_,b.forEachRight=T_,b.forIn=K6,b.forInRight=X6,b.forOwn=Y6,b.forOwnRight=J6,b.get=qf,b.gt=_6,b.gte=w6,b.has=t8,b.hasIn=Gf,b.head=E_,b.identity=Kt,b.includes=F5,b.indexOf=Iz,b.inRange=b8,b.invoke=o8,b.isArguments=Ao,b.isArray=Be,b.isArrayBuffer=b6,b.isArrayLike=qt,b.isArrayLikeObject=ut,b.isBoolean=k6,b.isBuffer=Qr,b.isDate=x6,b.isElement=v6,b.isEmpty=C6,b.isEqual=E6,b.isEqualWith=S6,b.isError=Wf,b.isFinite=N6,b.isFunction=br,b.isInteger=P_,b.isLength=bc,b.isMap=L_,b.isMatch=B6,b.isMatchWith=V6,b.isNaN=T6,b.isNative=A6,b.isNil=R6,b.isNull=$6,b.isNumber=F_,b.isObject=st,b.isObjectLike=ct,b.isPlainObject=rs,b.isRegExp=Hf,b.isSafeInteger=O6,b.isSet=z_,b.isString=kc,b.isSymbol=ln,b.isTypedArray=Ea,b.isUndefined=I6,b.isWeakMap=D6,b.isWeakSet=M6,b.join=Fz,b.kebabCase=S8,b.last=_n,b.lastIndexOf=zz,b.lowerCase=N8,b.lowerFirst=B8,b.lt=P6,b.lte=L6,b.max=x9,b.maxBy=v9,b.mean=C9,b.meanBy=E9,b.min=S9,b.minBy=N9,b.stubArray=ep,b.stubFalse=tp,b.stubObject=f9,b.stubString=p9,b.stubTrue=h9,b.multiply=B9,b.nth=Uz,b.noConflict=o9,b.noop=Qf,b.now=yc,b.pad=V8,b.padEnd=T8,b.padStart=A8,b.parseInt=$8,b.random=k8,b.reduce=W5,b.reduceRight=H5,b.repeat=R8,b.replace=O8,b.result=u8,b.round=V9,b.runInContext=Z,b.sample=G5,b.size=Y5,b.snakeCase=I8,b.some=J5,b.sortedIndex=Kz,b.sortedIndexBy=Xz,b.sortedIndexOf=Yz,b.sortedLastIndex=Jz,b.sortedLastIndexBy=Qz,b.sortedLastIndexOf=e5,b.startCase=M8,b.startsWith=P8,b.subtract=T9,b.sum=A9,b.sumBy=$9,b.template=L8,b.times=m9,b.toFinite=kr,b.toInteger=Ae,b.toLength=j_,b.toLower=F8,b.toNumber=wn,b.toSafeInteger=F6,b.toString=Ge,b.toUpper=z8,b.trim=U8,b.trimEnd=j8,b.trimStart=Z8,b.truncate=W8,b.unescape=H8,b.uniqueId=y9,b.upperCase=q8,b.upperFirst=Kf,b.each=V_,b.eachRight=T_,b.first=E_,Jf(b,function(){var i={};return tr(b,function(l,f){Xe.call(b.prototype,f)||(i[f]=l)}),i}(),{chain:!1}),b.VERSION=o,pn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){b[i].placeholder=b}),pn(["drop","take"],function(i,l){Pe.prototype[i]=function(f){f=f===r?1:wt(Ae(f),0);var m=this.__filtered__&&!l?new Pe(this):this.clone();return m.__filtered__?m.__takeCount__=At(f,m.__takeCount__):m.__views__.push({size:At(f,ye),type:i+(m.__dir__<0?"Right":"")}),m},Pe.prototype[i+"Right"]=function(f){return this.reverse()[i](f).reverse()}}),pn(["filter","map","takeWhile"],function(i,l){var f=l+1,m=f==k||f==U;Pe.prototype[i]=function(_){var x=this.clone();return x.__iteratees__.push({iteratee:_e(_,3),type:f}),x.__filtered__=x.__filtered__||m,x}}),pn(["head","last"],function(i,l){var f="take"+(l?"Right":"");Pe.prototype[i]=function(){return this[f](1).value()[0]}}),pn(["initial","tail"],function(i,l){var f="drop"+(l?"":"Right");Pe.prototype[i]=function(){return this.__filtered__?new Pe(this):this[f](1)}}),Pe.prototype.compact=function(){return this.filter(Kt)},Pe.prototype.find=function(i){return this.filter(i).head()},Pe.prototype.findLast=function(i){return this.reverse().find(i)},Pe.prototype.invokeMap=De(function(i,l){return typeof i=="function"?new Pe(this):this.map(function(f){return Yi(f,i,l)})}),Pe.prototype.reject=function(i){return this.filter(wc(_e(i)))},Pe.prototype.slice=function(i,l){i=Ae(i);var f=this;return f.__filtered__&&(i>0||l<0)?new Pe(f):(i<0?f=f.takeRight(-i):i&&(f=f.drop(i)),l!==r&&(l=Ae(l),f=l<0?f.dropRight(-l):f.take(l-i)),f)},Pe.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Pe.prototype.toArray=function(){return this.take(ye)},tr(Pe.prototype,function(i,l){var f=/^(?:filter|find|map|reject)|While$/.test(l),m=/^(?:head|last)$/.test(l),_=b[m?"take"+(l=="last"?"Right":""):l],x=m||/^find/.test(l);_&&(b.prototype[l]=function(){var I=this.__wrapped__,P=m?[1]:arguments,H=I instanceof Pe,Y=P[0],J=H||Be(I),Q=function(Me){var Ue=_.apply(b,Hr([Me],P));return m&&oe?Ue[0]:Ue};J&&f&&typeof Y=="function"&&Y.length!=1&&(H=J=!1);var oe=this.__chain__,pe=!!this.__actions__.length,we=x&&!oe,Ie=H&&!pe;if(!x&&J){I=Ie?I:new Pe(this);var be=i.apply(I,P);return be.__actions__.push({func:mc,args:[Q],thisArg:r}),new mn(be,oe)}return we&&Ie?i.apply(this,P):(be=this.thru(Q),we?m?be.value()[0]:be.value():be)})}),pn(["pop","push","shift","sort","splice","unshift"],function(i){var l=zl[i],f=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",m=/^(?:pop|shift)$/.test(i);b.prototype[i]=function(){var _=arguments;if(m&&!this.__chain__){var x=this.value();return l.apply(Be(x)?x:[],_)}return this[f](function(I){return l.apply(Be(I)?I:[],_)})}}),tr(Pe.prototype,function(i,l){var f=b[l];if(f){var m=f.name+"";Xe.call(ba,m)||(ba[m]=[]),ba[m].push({name:l,func:f})}}),ba[lc(r,D).name]=[{name:"wrapper",func:r}],Pe.prototype.clone=HF,Pe.prototype.reverse=qF,Pe.prototype.value=GF,b.prototype.at=v5,b.prototype.chain=C5,b.prototype.commit=E5,b.prototype.next=S5,b.prototype.plant=B5,b.prototype.reverse=V5,b.prototype.toJSON=b.prototype.valueOf=b.prototype.value=T5,b.prototype.first=b.prototype.head,Zi&&(b.prototype[Zi]=N5),b},ya=EF();vo?((vo.exports=ya)._=ya,Xu._=ya):Et._=ya}).call(Ba)}(hl,hl.exports);var ze=hl.exports;const ml={container:"_container_2caon_1",notReadyWrapper:"_notReadyWrapper_2caon_11",iconCatInBag:"_iconCatInBag_2caon_21",text:"_text_2caon_29"},gl=t.defineComponent({__name:"PlAgOverlayLoading",props:{params:{}},setup(n){return(e,r)=>(t.openBlock(),t.createBlock(t.unref(Es),{loading:!e.params.notReady,type:e.params.overlayType??"table","loading-text":e.params.loadingText??"Loading",class:t.normalizeClass(t.unref(ml).container)},{default:t.withCtx(()=>[e.params.notReady?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(ml).notReadyWrapper)},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(ml).iconCatInBag)},null,2),t.createElementVNode("h3",{class:t.normalizeClass(t.unref(ml).text)},t.toDisplayString(e.params.notReadyText||"No datasource"),3)],2)):t.createCommentVNode("",!0)]),_:1},8,["loading","type","loading-text","class"]))}}),ND={class:"grid-overlay-container"},BD={class:"text-subtitle-m"},yl=t.defineComponent({__name:"PlAgOverlayNoRows",props:{params:{}},setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",ND,[r[0]||(r[0]=t.createElementVNode("div",{class:"grid-icon-sad-cat"},null,-1)),t.createElementVNode("span",BD,t.toDisplayString(e.params.text||"Empty"),1)]))}});async function VD(n,e){throw Error("not implemented")}const TD={class:"pl-ag-column-header__title d-flex align-center gap-6 flex-grow-1"},au=t.defineComponent({__name:"PlAgColumnHeader",props:{params:{}},setup(n){const e=n,r=t.computed(()=>{var h,g;const p=(g=(h=e.params.column.getUserProvidedColDef())==null?void 0:h.headerComponentParams)==null?void 0:g.type;switch(p){case void 0:case"Text":return"cell-type-txt";case"Number":return"cell-type-num";case"File":return"paper-clip";case"Date":return"calendar";case"Duration":return"time";case"Progress":return"progress";default:throw Error(`unsupported data type: ${p} for PlAgColumnHeader component. Column ${e.params.column.getColId()}`)}}),o=t.ref(null),a=()=>o.value=e.params.column.getSort()??null;t.onMounted(()=>a());function s(){e.params.column.isSortable()&&(e.params.progressSort(),a())}const c=t.computed(()=>{const p=o.value;switch(p){case"asc":return"arrow-up";case"desc":return"arrow-down";case null:return null;default:throw Error(`unsupported sort direction: ${p}. Column ${e.params.column.getColId()}`)}}),d=t.ref();function u(){const p=d.value;p&&e.params.showColumnMenu(p)}return(p,h)=>(t.openBlock(),t.createElementBlock("div",{class:"pl-ag-column-header d-flex align-center gap-6",onClick:s},[t.createElementVNode("div",TD,[t.createVNode(t.unref(Yt),{name:r.value,class:"pl-ag-column-header__type-icon"},null,8,["name"]),t.createElementVNode("span",null,t.toDisplayString(p.params.displayName),1),c.value?(t.openBlock(),t.createBlock(t.unref(Yt),{key:0,name:c.value},null,8,["name"])):t.createCommentVNode("",!0)]),p.params.enableMenu?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"menuActivatorBtn",ref:d,class:"pl-ag-column-header__menu-icon",onClick:t.withModifiers(u,["stop"])},[t.createVNode(t.unref(Yt),{name:"more"})],512)):t.createCommentVNode("",!0)]))}}),AD={class:"pl-ag-grid-open-cell d-flex"},$D={class:"pl-ag-grid-open-cell__value"},iu=t.defineComponent({__name:"PlAgTextAndButtonCell",props:{params:{}},setup(n){const e=n;function r(){var o,a;if(e.params.invokeRowsOnDoubleClick){const s=e.params.api,c={rowPinned:e.params.node.rowPinned,api:s,rowIndex:e.params.node.rowIndex,context:s,type:"rowDoubleClicked",node:e.params.node,data:e.params.data,event:null};s.dispatchEvent(c)}else(a=(o=e.params).onClick)==null||a.call(o,e.params)}return(o,a)=>(t.openBlock(),t.createElementBlock("div",AD,[t.createElementVNode("div",$D,t.toDisplayString(o.params.value),1),t.createElementVNode("div",{class:"pl-ag-grid-open-cell__activator text-caps11 align-center",onClick:t.withModifiers(r,["stop"])},[t.createVNode(t.unref(Yt),{name:o.params.icon??"maximize"},null,8,["name"]),t.createTextVNode(" "+t.toDisplayString(o.params.btnLabel??"Open"),1)])]))}});function _g(){return["sortAscending","sortDescending","separator","pinSubMenu"]}const RD={type:"hidden"};function OD(n){return typeof n=="object"&&n!==null&&n.type==="hidden"}const wg=n=>n.value===void 0?"undefined":OD(n.value)?"loading...":h1(n.value)||n.value===vp?"":n.value.toString();function bg(n,e,r,o){var c,d;const a=E1(e),s=e.type==="axis"?e.spec.type:e.spec.valueType;return{colId:a,mainMenuItems:_g,context:e,field:n.toString(),headerName:((d=(c=e.spec.annotations)==null?void 0:c["pl7.app/label"])==null?void 0:d.trim())??"Unlabeled "+e.type+" "+n.toString(),lockPosition:e.type==="axis",hide:(r==null?void 0:r.includes(a))??N1(e.spec),valueFormatter:wg,headerComponent:au,cellRendererSelector:o!=null&&o.showCellButtonForAxisId?u=>{var h,g;if(e.type!=="axis")return;const p=(g=(h=u.colDef)==null?void 0:h.context)==null?void 0:g.id;if(ze.isEqual(p,o.showCellButtonForAxisId))return{component:iu,params:{invokeRowsOnDoubleClick:o.cellButtonInvokeRowsOnDoubleClick,onClick:y=>{var w;o.trigger((w=y.data)==null?void 0:w.key)}}}}:void 0,headerComponentParams:{type:(()=>{switch(s){case"Int":case"Long":case"Float":case"Double":return"Number";case"String":case"Bytes":return"Text";default:throw Error(`unsupported data type: ${s}`)}})()},cellDataType:(()=>{switch(s){case"Int":case"Long":case"Float":case"Double":return"number";case"String":case"Bytes":return"text";default:throw Error(`unsupported data type: ${s}`)}})()}}function ra(n){return Ic(n)}function kg(n){return n.type==="column"&&S1(n.spec)}const Vi={container:"_container_1g3ar_1",text:"_text_1g3ar_7",checkbox:"_checkbox_1g3ar_11","allowed-selection":"_allowed-selection_1g3ar_15",checked:"_checked_1g3ar_23"},ID=t.defineComponent({__name:"PlAgRowNumCheckbox",props:{params:{}},setup(n){const e=n,r=e.params.api,o=t.ref(!!e.params.node.isSelected()),a=t.computed(()=>o.value||r.getGridOption("rowSelection")),s=t.ref(r.getGridOption("rowSelection")),c=()=>{o.value=!!e.params.node.isSelected()},d=u=>{r.getGridOption("rowSelection")&&(e.params.node.setSelected(u),c())};return t.onBeforeMount(()=>{e.params.node.addEventListener("rowSelected",c)}),t.onBeforeUnmount(()=>{e.params.node.removeEventListener("rowSelected",c)}),(u,p)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([t.unref(Vi).container,{[t.unref(Vi)["allowed-selection"]]:s.value},"d-flex","justify-center","align-center"])},[o.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass([t.unref(Vi).text])},t.toDisplayString(u.params.value),3)),a.value?(t.openBlock(),t.createBlock(t.unref(fd),{key:1,modelValue:o.value,"onUpdate:modelValue":[p[0]||(p[0]=h=>o.value=h),d],class:t.normalizeClass([t.unref(Vi).checkbox,o.value&&t.unref(Vi).checked])},null,8,["modelValue","class"])):t.createCommentVNode("",!0)],2))}}),DD={style:{position:"absolute",inset:"0",display:"flex","justify-content":"center","align-items":"center"}},MD={key:1},PD=t.defineComponent({__name:"PlAgRowNumHeader",props:{params:{}},setup(n){const e=t.ref(n.params.api.getSelectedRows().length),r=t.ref(n.params.api.getDisplayedRowCount()),o=t.ref(!!n.params.api.getGridOption("rowSelection")),a=t.computed(()=>e.value===r.value&&e.value>0);function s(){e.value=n.params.api.getSelectedRows().length,r.value=n.params.api.getDisplayedRowCount()}function c(){o.value=!!n.params.api.getGridOption("rowSelection")}return t.onBeforeMount(()=>{n.params.api.addEventListener("selectionChanged",s),n.params.api.addEventListener("rowDataUpdated",s),n.params.api.addEventListener("modelUpdated",s),n.params.api.addEventListener("stateUpdated",c)}),t.onBeforeUnmount(()=>{n.params.api.removeEventListener("selectionChanged",s),n.params.api.removeEventListener("rowDataUpdated",s),n.params.api.removeEventListener("modelUpdated",s),n.params.api.removeEventListener("stateUpdated",c)}),(d,u)=>(t.openBlock(),t.createElementBlock("div",DD,[o.value?(t.openBlock(),t.createBlock(t.unref(fd),{key:0,"model-value":a.value,indeterminate:!a.value&&e.value>0,"onUpdate:modelValue":u[0]||(u[0]=p=>a.value?d.params.api.deselectAll():d.params.api.selectAll())},null,8,["model-value","indeterminate"])):(t.openBlock(),t.createElementBlock("span",MD,t.toDisplayString(d.params.displayName),1))]))}}),Qt='"##RowNumberColumnId##"',xg=45;function _l(){return{colId:Qt,headerName:"#",headerComponent:PD,valueGetter:n=>n.node===null||n.node.rowIndex===null?null:n.node.rowIndex+1,cellRenderer:ID,headerClass:"pl-ag-header-align-center",suppressNavigable:!0,suppressMovable:!0,mainMenuItems:[],contextMenuItems:[],lockPosition:"left",pinned:"left",lockPinned:!0,width:xg,suppressSizeToFit:!0,suppressAutoSize:!0,cellStyle:{color:"var(--txt-03)","background-color":"var(--bg-base-light)",overflow:"visible !important","text-align":"center"},sortable:!1,resizable:!1}}function LD(){const n=document.createElement("div");return n.style.visibility="hidden",n.style.position="absolute",n.style.boxSizing="border-box",n.style.padding="15.5px",n.style.border="1px solid",n.style.width="auto",document.body.appendChild(n),n}function FD(n){document.body.removeChild(n)}function Ti(n,e,r){const o=n.getDisplayedRowAtIndex(n.getLastDisplayedRowIndex());if(!o)return;const a=n.getCellValue({rowNode:o,colKey:Qt});if(typeof a!="number")return;const s=a.toString().length;if(!r&&e.innerHTML.length===s)return;const c="5";e.innerHTML=c.repeat(s),t.nextTick(()=>{n.applyColumnState({state:[{colId:Qt,pinned:"left",width:Math.max(xg,e.offsetWidth)}]})})}function vg(n){if(n.isDestroyed())return;const e=n.getAllGridColumns()??[],r=e.findIndex($e.isColumnSelectionCol),o=e.findIndex(a=>a.getId()===Qt);o!==-1&&(r!==-1?(r!==0||o!==1)&&n.moveColumns([e[o],e[r]],0):o!==0&&n.moveColumns([e[o]],0))}function Ai(n){const e=LD();n.addEventListener("firstDataRendered",a=>{Ti(a.api,e)}),n.addEventListener("viewportChanged",a=>{Ti(a.api,e)}),n.addEventListener("columnVisible",a=>{a.columns&&a.columns.some(s=>s.isVisible()&&s.getColId()===Qt)&&Ti(a.api,e)}),n.addEventListener("columnResized",a=>{var s;a.finished&&a.source==="autosizeColumns"&&((s=a.columns)!=null&&s.some(c=>c.isVisible()&&c.getColId()===Qt))&&Ti(a.api,e,!0)});const r=a=>a.api.refreshCells();["sortChanged","filterChanged","modelUpdated"].forEach(a=>n.addEventListener(a,r)),n.addEventListener("displayedColumnsChanged",a=>{vg(a.api)}),n.addEventListener("gridPreDestroyed",()=>{FD(e)}),Ti(n,e),vg(n)}function zD(n){return n.axesSpec.filter(e=>{var r;return((r=e.annotations)==null?void 0:r["pl7.app/axisNature"])==="heterogeneous"})}function UD(n,e){const r=[];for(const o of e)if(n[o].type==="column"){const a=zD(n[o].spec);for(const s of a){if(s.type!=="String"){console.warn("heterogeneous axis with string type expected, got",s,"skipping");continue}const c=un(s),d=e.find(u=>ze.isEqual(n[u].id,c));if(d===void 0)throw console.error("axis not found",o,c,n,e),Error("axis not found");r.push({columnIdx:o,axisIdx:d})}}return r}const Cg=(n,e)=>`hC${n+e}`;function jD(n,e,r,o,a,s){let c=-1,d=-1;for(let h=0;h<s.length;++h)s[h]===n.axisIdx&&(c=h),s[h]===n.columnIdx&&(d=h);if(c===-1||d===-1)throw console.error(`axisIdx === -1 || columnIdx === -1: ${c} ${d}`,n,s),Error(`axisIdx === -1 || columnIdx === -1: ${c} ${d}`);const u=(()=>{const g=o[c].data.filter(y=>y!==null);return Array.from(new Set(g))})();u.sort(),d>c?(r.splice(d+1,1),r.splice(c+1,1)):(r.splice(c+1,1),r.splice(d+1,1));const p=ZD(a,o,c,d,u,e.rows);for(let h=0;h<u.length;++h){const g=u[h],y=vr(g+"@"+h);r.push({colId:y,field:Cg(o.length,h),headerName:g,valueFormatter:wg})}return{rowModelType:"clientSide",columnDefs:r,rowData:p}}function ZD(n,e,r,o,a,s){const c=new Map;for(let d=0;d<s;d++){const u={};for(let w=0;w<e.length;++w){if(w===r||w===o)continue;const E=n[w].toString();u[E]=Po(e[w],d)}let p;const h=vr(Object.values(u))??"";c.has(h)?p=c.get(h):(p={id:`${c.size}`,...u},c.set(h,p));const g=a.indexOf(e[r].data[d]);if(g===-1)throw Error("index not found");const y=Cg(e.length,g);p[y]=Po(e[o],d)}return[...c.values()]}async function su(n){const e=vr(n);if(e===void 0)throw new Error("Failed to canonicalize object: Invalid input type or structure");const o=new TextEncoder().encode(e),a=await crypto.subtle.digest("SHA-256",o);return Array.from(new Uint8Array(a)).map(c=>c.toString(16).padStart(2,"0")).join("")}function Eg(n,e,r){const o=[];for(let a=0;a<e[0].data.length;++a){const s=r.map(d=>Po(e[d],a)),c={id:ra(s),key:s};n.forEach((d,u)=>{c[d.toString()]=Po(e[u],a)}),o.push(c)}return o}async function WD(n,e,r,o,a,s){const c=await n.getSpec(e),d=a.value.sourceId,u=await su(c),p=d!==u,h=p?void 0:a.value.columnVisibility;p&&(a.value={...a.value,sourceId:u});let g=c.findIndex(q=>q.type==="column");g===-1&&(g=c.length);const y=[...c.keys()].filter(q=>!ze.some(r,C=>ze.isEqual(un(C.axis),c[q].id)||c[q].type==="column"&&c[q].spec.name==="pl7.app/label"&&c[q].spec.axesSpec.length===1&&ze.isEqual(un(C.axis),un(c[q].spec.axesSpec[0])))).sort((q,C)=>{var O,S;if(c[q].type!==c[C].type)return c[q].type==="axis"?-1:1;const A=(O=c[q].spec.annotations)==null?void 0:O["pl7.app/table/orderPriority"],v=(S=c[C].spec.annotations)==null?void 0:S["pl7.app/table/orderPriority"];return A===void 0?v===void 0?0:1:v===void 0?-1:Number(v)-Number(A)}),w=ze.cloneDeep(y),E=UD(c,y),N=y.findIndex(q=>c[q].type==="column");for(let q=y.length-1;q>=N;--q){const C=y[q];if(!kg(c[C]))continue;const A=un(c[C].spec.axesSpec[0]),v=y.findIndex(S=>ze.isEqual(c[S].id,A));v!==-1?y[v]=C:console.warn(`multiple label columns match axisId: ${JSON.stringify(A)}`);const O=y[v];y[v]=C;for(const S of E)S.axisIdx===O&&(S.axisIdx=C);y.splice(q,1),w.splice(q,1)}const V=await n.getShape(e),D=V.rows,F=[_l(),...w.map(q=>bg(q,c[q],h==null?void 0:h.hiddenColIds,s))];if(E.length>0){let q;if(E.length==1)q=E[0];else{const C=E.filter(A=>{var v;return((v=c[A.columnIdx].spec.annotations)==null?void 0:v["pl7.app/table/hValue"])==="true"});C.length===1&&(q=C[0])}if(!q)console.warn(`Currently, only one heterogeneous axis / column is supported in the table, got ${E.length} transposition will not be applied.`);else return jD(q,V,F,await n.getData(e,y),w,y)}const $=[...y],W=new Map;for(let q=0;q<g;++q)W.set(q,-1);for(let q=0;q<$.length;++q){const C=$[q];W.has(C)&&W.set(C,q)}for(const[q,C]of W)C===-1&&(W.set(q,$.length),$.push(q));const R=[];for(let q=0;q<g;++q){const C=W.get(q);if(C===void 0||C===-1)throw new Error("assertion exception");R.push(C)}if(o)return{rowModelType:"clientSide",columnDefs:F,rowData:Eg(w,await n.getData(e,$),R)};let B;return{rowModelType:"serverSide",columnDefs:F,serverSideDatasource:{getRows:async q=>{try{if(D==0){q.success({rowData:[],rowCount:D}),q.api.setGridOption("loading",!1),q.api.showNoRowsOverlay();return}if(B&&!ze.isEqual(B.request.sortModel,q.request.sortModel)){B=void 0,q.api.setGridOption("loading",!0),q.success({rowData:[],rowCount:0});return}B=q;let C=0,A=[];if(D>0&&q.request.startRow!==void 0&&q.request.endRow!==void 0&&(C=Math.min(D,q.request.endRow)-q.request.startRow,C>0)){const v=await n.getData(e,$,{offset:q.request.startRow,length:C});A=Eg(w,v,R)}q.success({rowData:A,rowCount:D}),q.api.autoSizeColumns(q.api.getAllDisplayedColumns().filter(v=>v.getColId()!==Qt)),q.api.setGridOption("loading",!1)}catch(C){q.api.setGridOption("loading",!0),q.fail(),console.trace(C)}}}}}const Sg=cw(),HD=["id"],qD=t.defineComponent({__name:"PlAgDataTableToolsPanel",setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",{id:t.unref(Sg),class:"d-flex gap-6"},[t.renderSlot(e.$slots,"default")],8,HD))}}),Ng="#"+Sg;function lu(){const n=t.ref(),e=()=>{t.nextTick(()=>{n.value=document.querySelector(Ng)?Ng:void 0,n.value||console.error(`[PlAgDataTable] Error: 'PlAgDataTableToolsPanel' component is missing.
|
|
79
|
+
}`;var Oe=D_(function(){return Xe(x,fe+"return "+Q).apply(r,O)});if(Oe.source=Q,mf(Oe))throw Oe;return Oe}function CG(i){return je(i).toLowerCase()}function SG(i){return je(i).toUpperCase()}function EG(i,s,p){if(i=je(i),i&&(p||s===r))return J0(i);if(!i||!(s=sn(s)))return i;var h=zn(i),b=zn(s),x=q0(h,b),O=Q0(h,b)+1;return to(h,x,O).join("")}function NG(i,s,p){if(i=je(i),i&&(p||s===r))return i.slice(0,tb(i)+1);if(!i||!(s=sn(s)))return i;var h=zn(i),b=Q0(h,zn(s))+1;return to(h,0,b).join("")}function VG(i,s,p){if(i=je(i),i&&(p||s===r))return i.replace(fp,"");if(!i||!(s=sn(s)))return i;var h=zn(i),b=q0(h,zn(s));return to(h,b).join("")}function BG(i,s){var p=I,h=v;if(lt(s)){var b="separator"in s?s.separator:b;p="length"in s?Re(s.length):p,h="omission"in s?sn(s.omission):h}i=je(i);var x=i.length;if(xa(i)){var O=zn(i);x=O.length}if(p>=x)return i;var M=p-va(h);if(M<1)return h;var X=O?to(O,0,M).join(""):i.slice(0,M);if(b===r)return X+h;if(O&&(M+=X.length-M),hf(b)){if(i.slice(M).search(b)){var J,q=X;for(b.global||(b=Tp(b.source,je(_0.exec(b))+"g")),b.lastIndex=0;J=b.exec(q);)var Q=J.index;X=X.slice(0,Q===r?M:Q)}}else if(i.indexOf(sn(b),M)!=M){var oe=X.lastIndexOf(b);oe>-1&&(X=X.slice(0,oe))}return X+h}function TG(i){return i=je(i),i&&zF.test(i)?i.replace(g0,az):i}var RG=Ta(function(i,s,p){return i+(p?" ":"")+s.toUpperCase()}),bf=Wb("toUpperCase");function z_(i,s,p){return i=je(i),s=p?r:s,s===r?ez(i)?sz(i):UP(i):i.match(s)||[]}var D_=$e(function(i,s){try{return an(i,r,s)}catch(p){return mf(p)?p:new Ne(p)}}),IG=kr(function(i,s){return fn(s,function(p){p=or(p),_r(i,p,pf(i[p],i))}),i});function AG(i){var s=i==null?0:i.length,p=be();return i=s?nt(i,function(h){if(typeof h[1]!="function")throw new mn(c);return[p(h[0]),h[1]]}):[],$e(function(h){for(var b=-1;++b<s;){var x=i[b];if(an(x[0],this,h))return an(x[1],this,h)}})}function LG(i){return aD(gn(i,g))}function _f(i){return function(){return i}}function OG(i,s){return i==null||i!==i?s:i}var $G=Ub(),ZG=Ub(!0);function Kt(i){return i}function wf(i){return kb(typeof i=="function"?i:gn(i,g))}function MG(i){return vb(gn(i,g))}function FG(i,s){return Cb(i,gn(s,g))}var PG=$e(function(i,s){return function(p){return nl(p,i,s)}}),zG=$e(function(i,s){return function(p){return nl(i,p,s)}});function kf(i,s,p){var h=xt(s),b=yc(s,h);p==null&&!(lt(s)&&(b.length||!h.length))&&(p=s,s=i,i=this,b=yc(s,xt(s)));var x=!(lt(p)&&"chain"in p)||!!p.chain,O=vr(i);return fn(b,function(M){var X=s[M];i[M]=X,O&&(i.prototype[M]=function(){var J=this.__chain__;if(x||J){var q=i(this.__wrapped__),Q=q.__actions__=Xt(this.__actions__);return Q.push({func:X,args:arguments,thisArg:i}),q.__chain__=J,q}return X.apply(i,Yr([this.value()],arguments))})}),i}function DG(){return St._===this&&(St._=mz),this}function xf(){}function WG(i){return i=Re(i),$e(function(s){return Sb(s,i)})}var GG=qp(nt),UG=qp(H0),HG=qp(vp);function W_(i){return af(i)?Cp(or(i)):xD(i)}function XG(i){return function(s){return i==null?r:Ao(i,s)}}var jG=Xb(),YG=Xb(!0);function vf(){return[]}function Cf(){return!1}function KG(){return{}}function JG(){return""}function qG(){return!0}function QG(i,s){if(i=Re(i),i<1||i>j)return[];var p=ye,h=Rt(i,ye);s=be(s),i-=ye;for(var b=Np(h,s);++p<i;)s(p);return b}function eU(i){return Ve(i)?nt(i,or):cn(i)?[i]:Xt(c_(je(i)))}function tU(i){var s=++pz;return je(i)+s}var nU=vc(function(i,s){return i+s},0),rU=Qp("ceil"),oU=vc(function(i,s){return i/s},1),aU=Qp("floor");function iU(i){return i&&i.length?gc(i,Kt,Mp):r}function lU(i,s){return i&&i.length?gc(i,be(s,2),Mp):r}function sU(i){return Y0(i,Kt)}function cU(i,s){return Y0(i,be(s,2))}function dU(i){return i&&i.length?gc(i,Kt,Dp):r}function uU(i,s){return i&&i.length?gc(i,be(s,2),Dp):r}var pU=vc(function(i,s){return i*s},1),fU=Qp("round"),mU=vc(function(i,s){return i-s},0);function hU(i){return i&&i.length?Ep(i,Kt):0}function gU(i,s){return i&&i.length?Ep(i,be(s,2)):0}return w.after=MW,w.ary=w_,w.assign=S4,w.assignIn=L_,w.assignInWith=$c,w.assignWith=E4,w.at=N4,w.before=k_,w.bind=pf,w.bindAll=IG,w.bindKey=x_,w.castArray=KW,w.chain=y_,w.chunk=a9,w.compact=i9,w.concat=l9,w.cond=AG,w.conforms=LG,w.constant=_f,w.countBy=hW,w.create=V4,w.curry=v_,w.curryRight=C_,w.debounce=S_,w.defaults=B4,w.defaultsDeep=T4,w.defer=FW,w.delay=PW,w.difference=s9,w.differenceBy=c9,w.differenceWith=d9,w.drop=u9,w.dropRight=p9,w.dropRightWhile=f9,w.dropWhile=m9,w.fill=h9,w.filter=yW,w.flatMap=wW,w.flatMapDeep=kW,w.flatMapDepth=xW,w.flatten=f_,w.flattenDeep=g9,w.flattenDepth=y9,w.flip=zW,w.flow=$G,w.flowRight=ZG,w.fromPairs=b9,w.functions=Z4,w.functionsIn=M4,w.groupBy=vW,w.initial=w9,w.intersection=k9,w.intersectionBy=x9,w.intersectionWith=v9,w.invert=P4,w.invertBy=z4,w.invokeMap=SW,w.iteratee=wf,w.keyBy=EW,w.keys=xt,w.keysIn=Yt,w.map=Tc,w.mapKeys=W4,w.mapValues=G4,w.matches=MG,w.matchesProperty=FG,w.memoize=Ic,w.merge=U4,w.mergeWith=O_,w.method=PG,w.methodOf=zG,w.mixin=kf,w.negate=Ac,w.nthArg=WG,w.omit=H4,w.omitBy=X4,w.once=DW,w.orderBy=NW,w.over=GG,w.overArgs=WW,w.overEvery=UG,w.overSome=HG,w.partial=ff,w.partialRight=E_,w.partition=VW,w.pick=j4,w.pickBy=$_,w.property=W_,w.propertyOf=XG,w.pull=N9,w.pullAll=h_,w.pullAllBy=V9,w.pullAllWith=B9,w.pullAt=T9,w.range=jG,w.rangeRight=YG,w.rearg=GW,w.reject=RW,w.remove=R9,w.rest=UW,w.reverse=df,w.sampleSize=AW,w.set=K4,w.setWith=J4,w.shuffle=LW,w.slice=I9,w.sortBy=ZW,w.sortedUniq=F9,w.sortedUniqBy=P9,w.split=wG,w.spread=HW,w.tail=z9,w.take=D9,w.takeRight=W9,w.takeRightWhile=G9,w.takeWhile=U9,w.tap=iW,w.throttle=XW,w.thru=Bc,w.toArray=R_,w.toPairs=Z_,w.toPairsIn=M_,w.toPath=eU,w.toPlainObject=A_,w.transform=q4,w.unary=jW,w.union=H9,w.unionBy=X9,w.unionWith=j9,w.uniq=Y9,w.uniqBy=K9,w.uniqWith=J9,w.unset=Q4,w.unzip=uf,w.unzipWith=g_,w.update=eG,w.updateWith=tG,w.values=Aa,w.valuesIn=nG,w.without=q9,w.words=z_,w.wrap=YW,w.xor=Q9,w.xorBy=eW,w.xorWith=tW,w.zip=nW,w.zipObject=rW,w.zipObjectDeep=oW,w.zipWith=aW,w.entries=Z_,w.entriesIn=M_,w.extend=L_,w.extendWith=$c,kf(w,w),w.add=nU,w.attempt=D_,w.camelCase=iG,w.capitalize=F_,w.ceil=rU,w.clamp=rG,w.clone=JW,w.cloneDeep=QW,w.cloneDeepWith=e4,w.cloneWith=qW,w.conformsTo=t4,w.deburr=P_,w.defaultTo=OG,w.divide=oU,w.endsWith=lG,w.eq=Wn,w.escape=sG,w.escapeRegExp=cG,w.every=gW,w.find=bW,w.findIndex=u_,w.findKey=R4,w.findLast=_W,w.findLastIndex=p_,w.findLastKey=I4,w.floor=aU,w.forEach=b_,w.forEachRight=__,w.forIn=A4,w.forInRight=L4,w.forOwn=O4,w.forOwnRight=$4,w.get=gf,w.gt=n4,w.gte=r4,w.has=F4,w.hasIn=yf,w.head=m_,w.identity=Kt,w.includes=CW,w.indexOf=_9,w.inRange=oG,w.invoke=D4,w.isArguments=$o,w.isArray=Ve,w.isArrayBuffer=o4,w.isArrayLike=jt,w.isArrayLikeObject=ut,w.isBoolean=a4,w.isBuffer=no,w.isDate=i4,w.isElement=l4,w.isEmpty=s4,w.isEqual=c4,w.isEqualWith=d4,w.isError=mf,w.isFinite=u4,w.isFunction=vr,w.isInteger=N_,w.isLength=Lc,w.isMap=V_,w.isMatch=p4,w.isMatchWith=f4,w.isNaN=m4,w.isNative=h4,w.isNil=y4,w.isNull=g4,w.isNumber=B_,w.isObject=lt,w.isObjectLike=dt,w.isPlainObject=sl,w.isRegExp=hf,w.isSafeInteger=b4,w.isSet=T_,w.isString=Oc,w.isSymbol=cn,w.isTypedArray=Ia,w.isUndefined=_4,w.isWeakMap=w4,w.isWeakSet=k4,w.join=C9,w.kebabCase=dG,w.last=bn,w.lastIndexOf=S9,w.lowerCase=uG,w.lowerFirst=pG,w.lt=x4,w.lte=v4,w.max=iU,w.maxBy=lU,w.mean=sU,w.meanBy=cU,w.min=dU,w.minBy=uU,w.stubArray=vf,w.stubFalse=Cf,w.stubObject=KG,w.stubString=JG,w.stubTrue=qG,w.multiply=pU,w.nth=E9,w.noConflict=DG,w.noop=xf,w.now=Rc,w.pad=fG,w.padEnd=mG,w.padStart=hG,w.parseInt=gG,w.random=aG,w.reduce=BW,w.reduceRight=TW,w.repeat=yG,w.replace=bG,w.result=Y4,w.round=fU,w.runInContext=G,w.sample=IW,w.size=OW,w.snakeCase=_G,w.some=$W,w.sortedIndex=A9,w.sortedIndexBy=L9,w.sortedIndexOf=O9,w.sortedLastIndex=$9,w.sortedLastIndexBy=Z9,w.sortedLastIndexOf=M9,w.startCase=kG,w.startsWith=xG,w.subtract=mU,w.sum=hU,w.sumBy=gU,w.template=vG,w.times=QG,w.toFinite=Cr,w.toInteger=Re,w.toLength=I_,w.toLower=CG,w.toNumber=_n,w.toSafeInteger=C4,w.toString=je,w.toUpper=SG,w.trim=EG,w.trimEnd=NG,w.trimStart=VG,w.truncate=BG,w.unescape=TG,w.uniqueId=tU,w.upperCase=RG,w.upperFirst=bf,w.each=b_,w.eachRight=__,w.first=m_,kf(w,function(){var i={};return nr(w,function(s,p){Ke.call(w.prototype,p)||(i[p]=s)}),i}(),{chain:!1}),w.VERSION=o,fn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){w[i].placeholder=w}),fn(["drop","take"],function(i,s){Fe.prototype[i]=function(p){p=p===r?1:_t(Re(p),0);var h=this.__filtered__&&!s?new Fe(this):this.clone();return h.__filtered__?h.__takeCount__=Rt(p,h.__takeCount__):h.__views__.push({size:Rt(p,ye),type:i+(h.__dir__<0?"Right":"")}),h},Fe.prototype[i+"Right"]=function(p){return this.reverse()[i](p).reverse()}}),fn(["filter","map","takeWhile"],function(i,s){var p=s+1,h=p==k||p==U;Fe.prototype[i]=function(b){var x=this.clone();return x.__iteratees__.push({iteratee:be(b,3),type:p}),x.__filtered__=x.__filtered__||h,x}}),fn(["head","last"],function(i,s){var p="take"+(s?"Right":"");Fe.prototype[i]=function(){return this[p](1).value()[0]}}),fn(["initial","tail"],function(i,s){var p="drop"+(s?"":"Right");Fe.prototype[i]=function(){return this.__filtered__?new Fe(this):this[p](1)}}),Fe.prototype.compact=function(){return this.filter(Kt)},Fe.prototype.find=function(i){return this.filter(i).head()},Fe.prototype.findLast=function(i){return this.reverse().find(i)},Fe.prototype.invokeMap=$e(function(i,s){return typeof i=="function"?new Fe(this):this.map(function(p){return nl(p,i,s)})}),Fe.prototype.reject=function(i){return this.filter(Ac(be(i)))},Fe.prototype.slice=function(i,s){i=Re(i);var p=this;return p.__filtered__&&(i>0||s<0)?new Fe(p):(i<0?p=p.takeRight(-i):i&&(p=p.drop(i)),s!==r&&(s=Re(s),p=s<0?p.dropRight(-s):p.take(s-i)),p)},Fe.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Fe.prototype.toArray=function(){return this.take(ye)},nr(Fe.prototype,function(i,s){var p=/^(?:filter|find|map|reject)|While$/.test(s),h=/^(?:head|last)$/.test(s),b=w[h?"take"+(s=="last"?"Right":""):s],x=h||/^find/.test(s);b&&(w.prototype[s]=function(){var O=this.__wrapped__,M=h?[1]:arguments,X=O instanceof Fe,J=M[0],q=X||Ve(O),Q=function(Ze){var De=b.apply(w,Yr([Ze],M));return h&&oe?De[0]:De};q&&p&&typeof J=="function"&&J.length!=1&&(X=q=!1);var oe=this.__chain__,fe=!!this.__actions__.length,_e=x&&!oe,Oe=X&&!fe;if(!x&&q){O=Oe?O:new Fe(this);var we=i.apply(O,M);return we.__actions__.push({func:Bc,args:[Q],thisArg:r}),new hn(we,oe)}return _e&&Oe?i.apply(this,M):(we=this.thru(Q),_e?h?we.value()[0]:we.value():we)})}),fn(["pop","push","shift","sort","splice","unshift"],function(i){var s=tc[i],p=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",h=/^(?:pop|shift)$/.test(i);w.prototype[i]=function(){var b=arguments;if(h&&!this.__chain__){var x=this.value();return s.apply(Ve(x)?x:[],b)}return this[p](function(O){return s.apply(Ve(O)?O:[],b)})}}),nr(Fe.prototype,function(i,s){var p=w[s];if(p){var h=p.name+"";Ke.call(Na,h)||(Na[h]=[]),Na[h].push({name:s,func:p})}}),Na[xc(r,$).name]=[{name:"wrapper",func:r}],Fe.prototype.clone=Tz,Fe.prototype.reverse=Rz,Fe.prototype.value=Iz,w.prototype.at=lW,w.prototype.chain=sW,w.prototype.commit=cW,w.prototype.next=dW,w.prototype.plant=pW,w.prototype.reverse=fW,w.prototype.toJSON=w.prototype.valueOf=w.prototype.value=mW,w.prototype.first=w.prototype.head,Yi&&(w.prototype[Yi]=uW),w},Ca=cz();Vo?((Vo.exports=Ca)._=Ca,_p._=Ca):St._=Ca}).call(Oa)}(_s,_s.exports);var Me=_s.exports;const ws={container:"_container_2caon_1",notReadyWrapper:"_notReadyWrapper_2caon_11",iconCatInBag:"_iconCatInBag_2caon_21",text:"_text_2caon_29"},ks=t.defineComponent({__name:"PlAgOverlayLoading",props:{params:{}},setup(n){return(e,r)=>(t.openBlock(),t.createBlock(t.unref(Bl),{loading:!e.params.notReady,type:e.params.overlayType??"table","loading-text":e.params.loadingText??"Loading",class:t.normalizeClass(t.unref(ws).container)},{default:t.withCtx(()=>[e.params.notReady?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(t.unref(ws).notReadyWrapper)},[t.createElementVNode("div",{class:t.normalizeClass(t.unref(ws).iconCatInBag)},null,2),t.createElementVNode("h3",{class:t.normalizeClass(t.unref(ws).text)},t.toDisplayString(e.params.notReadyText||"No datasource"),3)],2)):t.createCommentVNode("",!0)]),_:1},8,["loading","type","loading-text","class"]))}}),y5={class:"grid-overlay-container"},b5={class:"text-subtitle-m"},xs=t.defineComponent({__name:"PlAgOverlayNoRows",props:{params:{}},setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",y5,[r[0]||(r[0]=t.createElementVNode("div",{class:"grid-icon-sad-cat"},null,-1)),t.createElementVNode("span",b5,t.toDisplayString(e.params.text||"Empty"),1)]))}});async function _5(n,e){throw Error("not implemented")}const Li={container:"_container_1g3ar_1",text:"_text_1g3ar_7",checkbox:"_checkbox_1g3ar_11","allowed-selection":"_allowed-selection_1g3ar_15",checked:"_checked_1g3ar_23"},w5=t.defineComponent({__name:"PlAgRowNumCheckbox",props:{params:{}},setup(n){const e=n,r=e.params.api,o=t.ref(!!e.params.node.isSelected()),a=t.computed(()=>o.value||r.getGridOption("rowSelection")),l=t.ref(r.getGridOption("rowSelection")),c=()=>{o.value=!!e.params.node.isSelected()},d=u=>{r.getGridOption("rowSelection")&&(e.params.node.setSelected(u),c())};return t.onBeforeMount(()=>{e.params.node.addEventListener("rowSelected",c)}),t.onBeforeUnmount(()=>{e.params.node.removeEventListener("rowSelected",c)}),(u,f)=>(t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass([t.unref(Li).container,{[t.unref(Li)["allowed-selection"]]:l.value},"d-flex","justify-center","align-center"])},[o.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass([t.unref(Li).text])},t.toDisplayString(u.params.value),3)),a.value?(t.openBlock(),t.createBlock(t.unref(Vd),{key:1,modelValue:o.value,"onUpdate:modelValue":[f[0]||(f[0]=m=>o.value=m),d],class:t.normalizeClass([t.unref(Li).checkbox,o.value&&t.unref(Li).checked])},null,8,["modelValue","class"])):t.createCommentVNode("",!0)],2))}}),k5={style:{position:"absolute",inset:"0",display:"flex","justify-content":"center","align-items":"center"}},x5={key:1},v5=t.defineComponent({__name:"PlAgRowNumHeader",props:{params:{}},setup(n){const e=t.ref(n.params.api.getSelectedRows().length),r=t.ref(n.params.api.getDisplayedRowCount()),o=t.ref(!!n.params.api.getGridOption("rowSelection")),a=t.computed(()=>e.value===r.value&&e.value>0);function l(){e.value=n.params.api.getSelectedRows().length,r.value=n.params.api.getDisplayedRowCount()}function c(){o.value=!!n.params.api.getGridOption("rowSelection")}return t.onBeforeMount(()=>{n.params.api.addEventListener("selectionChanged",l),n.params.api.addEventListener("rowDataUpdated",l),n.params.api.addEventListener("modelUpdated",l),n.params.api.addEventListener("stateUpdated",c)}),t.onBeforeUnmount(()=>{n.params.api.removeEventListener("selectionChanged",l),n.params.api.removeEventListener("rowDataUpdated",l),n.params.api.removeEventListener("modelUpdated",l),n.params.api.removeEventListener("stateUpdated",c)}),(d,u)=>(t.openBlock(),t.createElementBlock("div",k5,[o.value?(t.openBlock(),t.createBlock(t.unref(Vd),{key:0,"model-value":a.value,indeterminate:!a.value&&e.value>0,"onUpdate:modelValue":u[0]||(u[0]=f=>a.value?d.params.api.deselectAll():d.params.api.selectAll())},null,8,["model-value","indeterminate"])):(t.openBlock(),t.createElementBlock("span",x5,t.toDisplayString(d.params.displayName),1))]))}}),en='"##RowNumberColumnId##"',zg=45;function vs(){return{colId:en,headerName:"#",headerComponent:v5,valueGetter:n=>n.node===null||n.node.rowIndex===null?null:n.node.rowIndex+1,cellRenderer:w5,headerClass:"pl-ag-header-align-center",suppressNavigable:!0,suppressMovable:!0,mainMenuItems:[],contextMenuItems:[],lockPosition:"left",pinned:"left",lockPinned:!0,width:zg,suppressSizeToFit:!0,suppressAutoSize:!0,cellStyle:{color:"var(--txt-03)","background-color":"var(--bg-base-light)",overflow:"visible !important","text-align":"center"},sortable:!1,resizable:!1}}function C5(){const n=document.createElement("div");return n.style.visibility="hidden",n.style.position="absolute",n.style.boxSizing="border-box",n.style.padding="15.5px",n.style.border="1px solid",n.style.width="auto",document.body.appendChild(n),n}function S5(n){document.body.removeChild(n)}function Oi(n,e,r){const o=n.getDisplayedRowAtIndex(n.getLastDisplayedRowIndex());if(!o)return;const a=n.getCellValue({rowNode:o,colKey:en});if(typeof a!="number")return;const l=a.toString().length;if(!r&&e.innerHTML.length===l)return;const c="5";e.innerHTML=c.repeat(l),t.nextTick(()=>{n.applyColumnState({state:[{colId:en,pinned:"left",width:Math.max(zg,e.offsetWidth)}]})})}function Dg(n){if(n.isDestroyed())return;const e=n.getAllGridColumns()??[],r=e.findIndex(Ie.isColumnSelectionCol),o=e.findIndex(a=>a.getId()===en);o!==-1&&(r!==-1?(r!==0||o!==1)&&n.moveColumns([e[o],e[r]],0):o!==0&&n.moveColumns([e[o]],0))}function $i(n){const e=C5();n.addEventListener("firstDataRendered",a=>{Oi(a.api,e)}),n.addEventListener("viewportChanged",a=>{Oi(a.api,e)}),n.addEventListener("columnVisible",a=>{a.columns&&a.columns.some(l=>l.isVisible()&&l.getColId()===en)&&Oi(a.api,e)}),n.addEventListener("columnResized",a=>{var l;a.finished&&a.source==="autosizeColumns"&&((l=a.columns)!=null&&l.some(c=>c.isVisible()&&c.getColId()===en))&&Oi(a.api,e,!0)});const r=a=>a.api.refreshCells();["sortChanged","filterChanged","modelUpdated"].forEach(a=>n.addEventListener(a,r)),n.addEventListener("displayedColumnsChanged",a=>{Dg(a.api)}),n.addEventListener("gridPreDestroyed",()=>{S5(e)}),Oi(n,e),Dg(n)}const E5={type:"hidden"};function N5(n){return typeof n=="object"&&n!==null&&n.type==="hidden"}const ku=n=>n.value===void 0?"undefined":N5(n.value)?"loading...":Hf(n.value)||n.value===Yc?"":n.value.toString();function Wg(n){return n.type==="column"&&qc(n.spec)}function V5(n){return n.axesSpec.filter(e=>{var r;return((r=e.annotations)==null?void 0:r["pl7.app/axisNature"])==="heterogeneous"})}function B5(n,e){const r=[];for(const o of e)if(n[o].type==="column"){const a=V5(n[o].spec);for(const l of a){if(l.type!=="String"){console.warn("heterogeneous axis with string type expected, got",l,"skipping");continue}const c=Lt(l),d=e.find(u=>Me.isEqual(n[u].id,c));if(d===void 0)throw console.error("axis not found",o,c,n,e),Error("axis not found");r.push({columnIdx:o,axisIdx:d})}}return r}const Gg=(n,e)=>`hC${n+e}`;function T5(n,e,r,o,a,l){let c=-1,d=-1;for(let m=0;m<l.length;++m)l[m]===n.axisIdx&&(c=m),l[m]===n.columnIdx&&(d=m);if(c===-1||d===-1)throw console.error(`axisIdx === -1 || columnIdx === -1: ${c} ${d}`,n,l),Error(`axisIdx === -1 || columnIdx === -1: ${c} ${d}`);const u=(()=>{const g=o[c].data.filter(y=>y!==null);return Array.from(new Set(g))})();u.sort(),d>c?(r.splice(d+1,1),r.splice(c+1,1)):(r.splice(c+1,1),r.splice(d+1,1));const f=R5(a,o,c,d,u,e.rows);for(let m=0;m<u.length;++m){const g=u[m],y=Er(g+"@"+m);r.push({colId:y,field:Gg(o.length,m),headerName:g,valueFormatter:ku})}return{rowModelType:"clientSide",columnDefs:r,rowData:f}}function R5(n,e,r,o,a,l){const c=new Map;for(let d=0;d<l;d++){const u={};for(let _=0;_<e.length;++_){if(_===r||_===o)continue;const C=n[_].toString();u[C]=Ir(e[_],d)}let f;const m=Er(Object.values(u))??"";c.has(m)?f=c.get(m):(f={id:`${c.size}`,...u},c.set(m,f));const g=a.indexOf(e[r].data[d]);if(g===-1)throw Error("index not found");const y=Gg(e.length,g);f[y]=Ir(e[o],d)}return[...c.values()]}async function xu(n){const e=Er(n);if(e===void 0)throw new Error("Failed to canonicalize object: Invalid input type or structure");const o=new TextEncoder().encode(e),a=await crypto.subtle.digest("SHA-256",o);return Array.from(new Uint8Array(a)).map(c=>c.toString(16).padStart(2,"0")).join("")}function vu(){return["sortAscending","sortDescending","separator","pinSubMenu"]}const I5={class:"pl-ag-column-header__title d-flex align-center gap-6 flex-grow-1"},Cs=t.defineComponent({__name:"PlAgColumnHeader",props:{params:{}},setup(n){const e=n,r=t.computed(()=>{var m,g;const f=(g=(m=e.params.column.getUserProvidedColDef())==null?void 0:m.headerComponentParams)==null?void 0:g.type;switch(f){case void 0:case"Text":return"cell-type-txt";case"Number":return"cell-type-num";case"File":return"paper-clip";case"Date":return"calendar";case"Duration":return"time";case"Progress":return"progress";default:throw Error(`unsupported data type: ${f} for PlAgColumnHeader component. Column ${e.params.column.getColId()}`)}}),o=t.ref(null),a=()=>o.value=e.params.column.getSort()??null;t.onMounted(()=>a());function l(){e.params.column.isSortable()&&(e.params.progressSort(),a())}const c=t.computed(()=>{const f=o.value;switch(f){case"asc":return"arrow-up";case"desc":return"arrow-down";case null:return null;default:throw Error(`unsupported sort direction: ${f}. Column ${e.params.column.getColId()}`)}}),d=t.ref();function u(){const f=d.value;f&&e.params.showColumnMenu(f)}return(f,m)=>(t.openBlock(),t.createElementBlock("div",{class:"pl-ag-column-header d-flex align-center gap-6",onClick:l},[t.createElementVNode("div",I5,[t.createVNode(t.unref(qt),{name:r.value,class:"pl-ag-column-header__type-icon"},null,8,["name"]),t.createElementVNode("span",null,t.toDisplayString(f.params.displayName),1),c.value?(t.openBlock(),t.createBlock(t.unref(qt),{key:0,name:c.value},null,8,["name"])):t.createCommentVNode("",!0)]),f.params.enableMenu?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"menuActivatorBtn",ref:d,class:"pl-ag-column-header__menu-icon",onClick:t.withModifiers(u,["stop"])},[t.createVNode(t.unref(qt),{name:"more"})],512)):t.createCommentVNode("",!0)]))}}),A5={class:"pl-ag-grid-open-cell d-flex"},L5={class:"pl-ag-grid-open-cell__value"},Ss=t.defineComponent({__name:"PlAgTextAndButtonCell",props:{params:{}},setup(n){const e=n;function r(){var o,a;if(e.params.invokeRowsOnDoubleClick){const l=e.params.api,c={rowPinned:e.params.node.rowPinned,api:l,rowIndex:e.params.node.rowIndex,context:l,type:"rowDoubleClicked",node:e.params.node,data:e.params.data,event:null};l.dispatchEvent(c)}else(a=(o=e.params).onClick)==null||a.call(o,e.params)}return(o,a)=>(t.openBlock(),t.createElementBlock("div",A5,[t.createElementVNode("div",L5,t.toDisplayString(o.params.value),1),t.createElementVNode("div",{class:"pl-ag-grid-open-cell__activator text-caps11 align-center",onClick:t.withModifiers(r,["stop"])},[t.createVNode(t.unref(qt),{name:o.params.icon??"maximize"},null,8,["name"]),t.createTextVNode(" "+t.toDisplayString(o.params.btnLabel??"Open"),1)])]))}});function Ug(n,e,r){const o=[];for(let a=0;a<e[0].data.length;++a){const l=r.map(d=>Ir(e[d],a)),c={id:Cu(l),key:l};n.forEach((d,u)=>{c[d.toString()]=Ir(e[u],a)}),o.push(c)}return o}async function O5(n,e,r,o,a,l){const c=await n.getSpec(e),d=a.value.sourceId,u=await xu(c),f=d!==u,m=f?void 0:a.value.columnVisibility;f&&(a.value={...a.value,sourceId:u});let g=c.findIndex(H=>H.type==="column");g===-1&&(g=c.length);const y=[...c.keys()].filter(H=>!Me.some(r,S=>Me.isEqual(Lt(S.axis),c[H].id)||c[H].type==="column"&&c[H].spec.name==="pl7.app/label"&&c[H].spec.axesSpec.length===1&&Me.isEqual(Lt(S.axis),Lt(c[H].spec.axesSpec[0])))).sort((H,S)=>{var L,V;if(c[H].type!==c[S].type)return c[H].type==="axis"?-1:1;const I=(L=c[H].spec.annotations)==null?void 0:L["pl7.app/table/orderPriority"],v=(V=c[S].spec.annotations)==null?void 0:V["pl7.app/table/orderPriority"];return I===void 0?v===void 0?0:1:v===void 0?-1:Number(v)-Number(I)}),_=Me.cloneDeep(y),C=B5(c,y),N=y.findIndex(H=>c[H].type==="column");for(let H=y.length-1;H>=N;--H){const S=y[H];if(!Wg(c[S]))continue;const I=Lt(c[S].spec.axesSpec[0]),v=y.findIndex(V=>Me.isEqual(c[V].id,I));v!==-1?y[v]=S:console.warn(`multiple label columns match axisId: ${JSON.stringify(I)}`);const L=y[v];y[v]=S;for(const V of C)V.axisIdx===L&&(V.axisIdx=S);y.splice(H,1),_.splice(H,1)}const T=await n.getShape(e),$=T.rows,W=[vs(),..._.map(H=>$5(H,c[H],m==null?void 0:m.hiddenColIds,l))];if(C.length>0){let H;if(C.length==1)H=C[0];else{const S=C.filter(I=>{var v;return((v=c[I.columnIdx].spec.annotations)==null?void 0:v["pl7.app/table/hValue"])==="true"});S.length===1&&(H=S[0])}if(!H)console.warn(`Currently, only one heterogeneous axis / column is supported in the table, got ${C.length} transposition will not be applied.`);else return T5(H,T,W,await n.getData(e,y),_,y)}const E=[...y],D=new Map;for(let H=0;H<g;++H)D.set(H,-1);for(let H=0;H<E.length;++H){const S=E[H];D.has(S)&&D.set(S,H)}for(const[H,S]of D)S===-1&&(D.set(H,E.length),E.push(H));const A=[];for(let H=0;H<g;++H){const S=D.get(H);if(S===void 0||S===-1)throw new Error("assertion exception");A.push(S)}if(o)return{rowModelType:"clientSide",columnDefs:W,rowData:Ug(_,await n.getData(e,E),A)};let B;return{rowModelType:"serverSide",columnDefs:W,serverSideDatasource:{getRows:async H=>{try{if($==0){H.success({rowData:[],rowCount:$}),H.api.setGridOption("loading",!1),H.api.showNoRowsOverlay();return}if(B&&!Me.isEqual(B.request.sortModel,H.request.sortModel)){B=void 0,H.api.setGridOption("loading",!0),H.success({rowData:[],rowCount:0});return}B=H;let S=0,I=[];if($>0&&H.request.startRow!==void 0&&H.request.endRow!==void 0&&(S=Math.min($,H.request.endRow)-H.request.startRow,S>0)){const v=await n.getData(e,E,{offset:H.request.startRow,length:S});I=Ug(_,v,A)}H.success({rowData:I,rowCount:$}),H.api.autoSizeColumns(H.api.getAllDisplayedColumns().filter(v=>v.getColId()!==en)),H.api.setGridOption("loading",!1)}catch(S){H.api.setGridOption("loading",!0),H.fail(),console.trace(S)}}}}}function $5(n,e,r,o){var c,d;const a=Xf(e),l=e.type==="axis"?e.spec.type:e.spec.valueType;return{colId:a,mainMenuItems:vu,context:e,field:n.toString(),headerName:((d=(c=e.spec.annotations)==null?void 0:c["pl7.app/label"])==null?void 0:d.trim())??"Unlabeled "+e.type+" "+n.toString(),lockPosition:e.type==="axis",hide:(r==null?void 0:r.includes(a))??jf(e.spec),valueFormatter:ku,headerComponent:Cs,cellRendererSelector:o!=null&&o.showCellButtonForAxisId?u=>{var m,g;if(e.type!=="axis")return;const f=(g=(m=u.colDef)==null?void 0:m.context)==null?void 0:g.id;if(Me.isEqual(f,o.showCellButtonForAxisId))return{component:Ss,params:{invokeRowsOnDoubleClick:o.cellButtonInvokeRowsOnDoubleClick,onClick:y=>{var _;o.trigger((_=y.data)==null?void 0:_.key)}}}}:void 0,headerComponentParams:{type:(()=>{switch(l){case"Int":case"Long":case"Float":case"Double":return"Number";case"String":case"Bytes":return"Text";default:throw Error(`unsupported data type: ${l}`)}})()},cellDataType:(()=>{switch(l){case"Int":case"Long":case"Float":case"Double":return"number";case"String":case"Bytes":return"text";default:throw Error(`unsupported data type: ${l}`)}})()}}function Cu(n){return Yn(n)}const Hg=q_(),Z5=["id"],M5=t.defineComponent({__name:"PlAgDataTableToolsPanel",setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",{id:t.unref(Hg),class:"d-flex gap-6"},[t.renderSlot(e.$slots,"default")],8,Z5))}}),Xg="#"+Hg;function Es(){const n=t.ref(),e=()=>{t.nextTick(()=>{n.value=document.querySelector(Xg)?Xg:void 0,n.value||console.error(`[PlAgDataTable] Error: 'PlAgDataTableToolsPanel' component is missing.
|
|
80
80
|
Ensure that you import and place <PlAgDataTableToolsPanel /> somewhere in your layout
|
|
81
|
-
(e.g., in the block header).`)})};return t.onMounted(e),t.onUpdated(e),n}const GD=["onClick"],KD={key:0,class:"pl-ag-columns__pin"},cu=t.defineComponent({__name:"PlAgGridColumnManager",props:{api:{},width:{}},setup(n){const e=n,{api:r}=t.toRefs(e),o=t.ref([]),a=t.ref(),s=t.ref(!1),c=t.ref(0);yg(a,{handle:".handle",onChange(p){r.value.moveColumns(p.map(h=>o.value[h]),0)}});function d(p){r.value.setColumnsVisible([p],!p.isVisible())}t.watch(()=>r.value,p=>{p.isDestroyed()||(o.value=p.getAllGridColumns(),o.value.length>0&&p.moveColumns(o.value,0),p.addEventListener("displayedColumnsChanged",h=>{p.isDestroyed()||(o.value=h.api.getAllGridColumns(),c.value++)}))},{immediate:!0});const u=lu();return(p,h)=>(t.openBlock(),t.createElementBlock("div",null,[t.unref(u)?(t.openBlock(),t.createBlock(t.Teleport,{key:0,to:t.unref(u)},[t.createVNode(t.unref(Ar),{onClick:h[0]||(h[0]=t.withModifiers(g=>s.value=!s.value,["stop"]))},{append:t.withCtx(()=>[t.createVNode(t.unref(at),{name:"columns"})]),default:t.withCtx(()=>[h[2]||(h[2]=t.createTextVNode(" Columns "))]),_:1})],8,["to"])):t.createCommentVNode("",!0),t.createVNode(t.unref(Qa),{modelValue:s.value,"onUpdate:modelValue":h[1]||(h[1]=g=>s.value=g),width:p.width,"close-on-outside-click":""},{title:t.withCtx(()=>h[3]||(h[3]=[t.createTextVNode("Manage Columns")])),default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("div",{ref_key:"listRef",ref:a,key:c.value,class:"pl-ag-columns pl-2 pr-2"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.value,g=>(t.openBlock(),t.createElementBlock("div",{key:g.getId(),class:t.normalizeClass([{pinned:g.getColDef().lockPosition},"pl-ag-columns__item"])},[t.createElementVNode("div",{class:t.normalizeClass([{handle:!g.getColDef().lockPosition},"pl-ag-columns__drag"])},[t.createVNode(t.unref(Yt),{name:"drag-dots"})],2),t.createElementVNode("div",{class:t.normalizeClass([{visible:g.isVisible()},"pl-ag-columns__title text-s-btn"])},t.toDisplayString(g.getColDef().headerName),3),t.createElementVNode("div",{class:"pl-ag-columns__visibility",onClick:y=>d(g)},[t.createVNode(t.unref(dt),{"close-delay":500,position:"top"},{tooltip:t.withCtx(()=>h[4]||(h[4]=[t.createTextVNode("Show/Hide")])),default:t.withCtx(()=>[t.createVNode(t.unref(at),{name:g.isVisible()?"view-show":"view-hide"},null,8,["name"])]),_:2},1024)],8,GD),g.getColDef().lockPosition?(t.openBlock(),t.createElementBlock("div",KD,[t.createVNode(t.unref(at),{name:"pin"})])):t.createCommentVNode("",!0)],2))),128))]))]),_:1},8,["modelValue","width"])]))}});function du(){const n=t.shallowRef([!1,void 0]);return{track:a=>n.value=[!0,a],reset:()=>n.value=[!1,void 0],onceTracked:a=>{const{stop:s}=t.watchEffect(()=>{const[c,d]=n.value;c&&(a(d),s())});return s}}}function uu(n,e){n.addEventListener("firstDataRendered",r=>{r.api.getGridOption("rowModelType")==="clientSide"&&e.track(r.api)}),n.addEventListener("modelUpdated",r=>{if(r.api.getGridOption("rowModelType")==="serverSide"){const o=r.api.getServerSideGroupLevelState();o&&o.length>0&&o[0].lastRowIndexKnown&&e.track(r.api)}}),n.addEventListener("gridPreDestroyed",()=>e.reset())}function XD(n,e){let r=null;const o=a=>a.id===e?(r=a.rowIndex,!0):!1;if(n.ensureNodeVisible(o,"middle"),r){const a=n.getAllDisplayedColumns();a.length>0&&(n.ensureColumnVisible(a[0]),n.setFocusedCell(r,a[0]))}}async function fu(n,e){return new Promise(r=>{t.nextTick(()=>e.onceTracked(o=>{XD(o,n),r()}))})}function YD(){const n=document.createElement("div");return n.style.visibility="hidden",n.style.position="absolute",document.body.appendChild(n),n}function JD(n){document.body.removeChild(n)}async function QD(n,e){var o;const r=n.getGridOption("rowModelType");switch(r){case"clientSide":return n.exportDataAsCsv(),e();case"serverSide":{const a=n.getServerSideGroupLevelState();if(a.length===0||a[0].rowCount<=a[0].cacheBlockSize)return n.exportDataAsCsv(),e();const s=YD(),c={rowModelType:"serverSide",columnDefs:((o=n.getColumnDefs())==null?void 0:o.filter(d=>!("children"in d)).map(d=>({headerName:d.headerName,field:d.field,valueFormatter:d.valueFormatter,valueGetter:d.valueGetter})))??[],serverSideDatasource:n.getGridOption("serverSideDatasource"),cacheBlockSize:a[0].rowCount,onModelUpdated:d=>{const u=d.api.getServerSideGroupLevelState();if(u.length>0&&u[0].rowCount===u[0].cacheBlockSize)return d.api.exportDataAsCsv(),JD(s),e()},defaultCsvExportParams:n.getGridOption("defaultCsvExportParams")};return $e.createGrid(s,c,{modules:[$e.ServerSideRowModelModule]})}default:throw e(),Error(`exportCsv unsupported for rowModelType = ${r}`)}}const pu=t.defineComponent({__name:"PlAgCsvExporter",props:{api:{}},setup(n){const e=n,{api:r}=t.toRefs(e),o=t.shallowRef(!1),a=()=>{o.value=!0,QD(r.value,()=>o.value=!1)},s=lu();return(c,d)=>(t.openBlock(),t.createElementBlock("div",null,[t.unref(s)?(t.openBlock(),t.createBlock(t.Teleport,{key:0,to:t.unref(s)},[t.createVNode(t.unref(Ar),{loading:o.value,onClick:t.withModifiers(a,["stop"])},{append:t.withCtx(()=>[t.createVNode(t.unref(at),{name:"export"})]),default:t.withCtx(()=>[d[0]||(d[0]=t.createTextVNode(" Export "))]),_:1},8,["loading"])],8,["to"])):t.createCommentVNode("",!0)]))}}),eM={class:"ap-ag-data-table-container"},tM={key:2,class:"ap-ag-data-table-sheets"},Bg=yo(t.defineComponent({__name:"PlAgDataTable",props:t.mergeModels({settings:{},showColumnsPanel:{type:Boolean},columnsPanelWidth:{},showExportButton:{type:Boolean},clientSideModel:{type:Boolean},showCellButtonForAxisId:{},cellButtonInvokeRowsOnDoubleClick:{type:Boolean}},{modelValue:{default:{gridState:{}}},modelModifiers:{},selectedRows:{},selectedRowsModifiers:{}}),emits:t.mergeModels(["rowDoubleClicked","columnsChanged","cellButtonClicked"],["update:modelValue","update:selectedRows"]),setup(n,{expose:e,emit:r}){$e.ModuleRegistry.registerModules([$e.ClientSideRowModelModule,$e.ClipboardModule,$e.ServerSideRowModelModule,$e.CellSelectionModule]);const o=t.useModel(n,"modelValue"),a=t.useModel(n,"selectedRows"),s=n,{settings:c}=t.toRefs(s),d=r;o.value.pTableParams||(o.value.pTableParams={});function u(C){return(C==null?void 0:C.sortModel.map(A=>{const{spec:v,...O}=gs(A.colId);return{column:O,ascending:A.sort==="asc",naAndAbsentAreLeastValues:A.sort==="asc"}}))??[]}const p=t.computed({get:()=>{const C=o.value;return{sourceId:C.gridState.sourceId,columnOrder:C.gridState.columnOrder,sort:C.gridState.sort,columnVisibility:C.gridState.columnVisibility}},set:C=>{var S;const A=((S=c.value)==null?void 0:S.sourceType)!=="ptable"||D.value.rowModelType==="clientSide"?void 0:u(C.sort),v=o.value,O={...v,gridState:{...v.gridState,...C},pTableParams:{...v.pTableParams,sorting:A}};Ut(v,O)||(o.value=O)}}),h=C=>vr(un(C));function g(C){var A,v;if(((A=c.value)==null?void 0:A.sourceType)==="ptable")return((v=c.value.sheets)==null?void 0:v.map(O=>({type:"bySingleColumnV2",column:{type:"axis",id:O.axis},predicate:{operator:"Equal",reference:C[h(O.axis)]}})))??[]}const y=t.computed({get:()=>o.value.gridState.sheets??{},set:C=>{const A=g(C),v=o.value;o.value={...v,gridState:{...v.gridState,sheets:C},pTableParams:{...v.pTableParams,filters:A}}}}),w=C=>(C==null?void 0:C.sourceType)==="ptable"&&!!C.sheets&&C.sheets.length>0;t.watch(()=>c.value,(C,A)=>{var S;if((C==null?void 0:C.sourceType)!=="ptable"||!C.sheets){y.value={};return}if(A&&A.sourceType==="ptable"&&ze.isEqual(C.sheets,A.sheets))return;const v=y.value,O={};for(const k of C.sheets){const M=h(k.axis);O[M]=v[M]??k.defaultValue??((S=k.options[0])==null?void 0:S.value)}y.value=O},{immediate:!0});const E=t.shallowRef(),N=t.shallowRef(new as),V=du(),D=t.shallowRef({animateRows:!1,suppressColumnMoveAnimation:!0,cellSelection:a.value===void 0,initialState:p.value,autoSizeStrategy:{type:"fitCellContents"},rowSelection:a.value!==void 0?{mode:"multiRow",checkboxes:!1,headerCheckbox:!1,enableClickSelection:!1}:void 0,selectionColumnDef:{mainMenuItems:[],contextMenuItems:[],pinned:"left",lockPinned:!0,suppressSizeToFit:!0,suppressAutoSize:!0,sortable:!1,resizable:!1},onRowDataUpdated:C=>{const A=a.value;if(A){const v=A.map(O=>C.api.getRowNode(ra(O))).filter(O=>!!O);C.api.setNodesSelected({nodes:v,newValue:!0})}},onSelectionChanged:C=>{a.value&&(a.value=C.api.getSelectedNodes().map(A=>{var v;return(v=A.data)==null?void 0:v.key}).filter(A=>!!A))},onRowDoubleClicked:C=>{C.data&&C.data.key&&d("rowDoubleClicked",C.data.key)},defaultColDef:{suppressHeaderMenuButton:!0,sortingOrder:["desc","asc",null]},maintainColumnOrder:!0,localeText:{loadingError:"..."},rowModelType:"clientSide",maxBlocksInCache:1e3,blockLoadDebounceMillis:500,serverSideSortAllLevels:!0,suppressServerSideFullWidthLoadingRow:!0,getRowId:C=>C.data.id,loading:!0,loadingOverlayComponentParams:{notReady:!0},loadingOverlayComponent:gl,noRowsOverlayComponent:yl,defaultCsvExportParams:{allColumns:!0,suppressQuotes:!0,fileName:"table.csv"}}),F=C=>{const A=C.api;uu(A,V),Ai(A),E.value=new Proxy(A,{get(v,O,S){switch(O){case"setGridOption":return(k,M)=>{const U=D.value;U[k]=M,D.value=U,A.setGridOption(k,M)};case"updateGridOptions":return k=>{D.value={...D.value,...k},A.updateGridOptions(k)};default:return Reflect.get(v,O,S)}}}),N.value.resolve(E.value)},$=C=>({sourceId:p.value.sourceId,columnOrder:C.columnOrder,sort:C.sort,columnVisibility:C.columnVisibility}),W=C=>{D.value.initialState=p.value=$(C.state),C.api.autoSizeColumns(C.api.getAllDisplayedColumns().filter(A=>A.getColId()!==Qt))},R=()=>{D.value.initialState=p.value=$(E.value.getState()),E.value=void 0,N.value=new as};e({focusRow:C=>fu(ra(C),V)});const B=t.ref(0);t.watch(()=>[E.value,p.value],(C,A)=>{if(ze.isEqual(C,A))return;const[v,O]=C;if(!v)return;const S=$(v.getState());ze.isEqual(O,S)||(D.value.initialState=O,++B.value)}),t.watch(()=>D.value,(C,A)=>{var v,O;if(A){if(C.rowModelType!=A.rowModelType&&++B.value,C.columnDefs&&!ze.isEqual(C.columnDefs,A.columnDefs)){const S=U=>!("children"in U),M=(((v=C.columnDefs)==null?void 0:v.filter(S))??[]).map(U=>U.colId).filter(U=>U!==void 0).filter(U=>U!==Qt).filter(U=>!$e.isColumnSelectionCol(U)).map(U=>gs(U))??[];d("columnsChanged",M)}!ze.isEqual(C.loadingOverlayComponentParams,A.loadingOverlayComponentParams)&&C.loading&&((O=E.value)==null||O.setGridOption("loading",!1),t.nextTick(()=>{var S;return(S=E.value)==null?void 0:S.setGridOption("loading",!0)}))}},{immediate:!0});const z=(C,A)=>{var O;const v=y.value;if(v[C]!==A)return v[C]=A,y.value=v,(O=E.value)==null?void 0:O.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1}})};let q;return t.watch(()=>[c.value],async C=>{try{const[A]=C,v=await N.value.promise;if(v.isDestroyed()){console.warn("gridApi is destroyed");return}if(ze.isEqual(A,q))return;q=A;const O=A==null?void 0:A.sourceType;switch(O){case void 0:return v.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[],rowData:void 0,datasource:void 0});case"ptable":{if(!(A!=null&&A.pTable))return v.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},columnDefs:[],rowData:void 0,datasource:void 0});v.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1}});const S=await WD(Lo().pFrameDriver,A.pTable,A.sheets??[],!!s.clientSideModel||!!a.value,p,{showCellButtonForAxisId:s.showCellButtonForAxisId,cellButtonInvokeRowsOnDoubleClick:s.cellButtonInvokeRowsOnDoubleClick,trigger:k=>d("cellButtonClicked",k)}).catch(k=>{throw v.updateGridOptions({loading:!1,loadingOverlayComponentParams:{notReady:!1}}),k});return v.updateGridOptions({loading:!1,loadingOverlayComponentParams:{notReady:!1},...S})}case"xsv":{const S=A==null?void 0:A.xsvFile;if(!S)return v.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},columnDefs:[],rowData:void 0,datasource:void 0});const k=Lo().blobDriver,M=await VD(k,S);return v.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},...M})}default:throw Error(`unsupported source type: ${O}`)}}catch(A){console.trace(A)}},{immediate:!0,deep:!0}),(C,A)=>(t.openBlock(),t.createElementBlock("div",eM,[E.value&&C.showColumnsPanel?(t.openBlock(),t.createBlock(t.unref(cu),{key:0,api:E.value,width:C.columnsPanelWidth},null,8,["api","width"])):t.createCommentVNode("",!0),E.value&&C.showExportButton?(t.openBlock(),t.createBlock(pu,{key:1,api:E.value},null,8,["api"])):t.createCommentVNode("",!0),w(t.unref(c))||C.$slots["before-sheets"]||C.$slots["after-sheets"]?(t.openBlock(),t.createElementBlock("div",tM,[t.renderSlot(C.$slots,"before-sheets",{},void 0,!0),w(t.unref(c))?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(c).sheets,(v,O)=>{var S,k;return t.openBlock(),t.createBlock(t.unref(cd),{key:O,"model-value":y.value[h(v.axis)],options:v.options,prefix:(((k=(S=v.axis.annotations)==null?void 0:S["pl7.app/label"])==null?void 0:k.trim())??`Unlabeled axis ${O}`)+":","onUpdate:modelValue":M=>z(h(v.axis),M)},null,8,["model-value","options","prefix","onUpdate:modelValue"])}),128)):t.createCommentVNode("",!0),t.renderSlot(C.$slots,"after-sheets",{},void 0,!0)])):t.createCommentVNode("",!0),(t.openBlock(),t.createBlock(t.unref(ro.AgGridVue),{key:B.value,theme:t.unref(_s),class:"ap-ag-data-table-grid","grid-options":D.value,onGridReady:F,onStateUpdated:W,onGridPreDestroyed:R},null,8,["theme","grid-options"]))]))}}),[["__scopeId","data-v-fe9704ef"]]);function Vg(n,e,r,o){const a=[];for(let s=0;s<e[0].data.length;++s){const c=r.map(u=>Po(e[o[u]],s)),d={id:ra(c),key:c};n.forEach((u,p)=>{d[u.toString()]=o[p]===-1?RD:Po(e[o[p]],s)}),a.push(d)}return a}async function nM(n,e,r,o,a,s){const c=e.tableHandle,d=e.tableSpec,u=k=>k.type==="axis"?vr(un(k.spec)):k.id,p=await n.getSpec(c),h=new Map;p.forEach((k,M)=>{h.set(u(k),M)});const g=new Map;d.forEach((k,M)=>{const U=h.get(u(k));if(U===void 0&&k.type==="axis")throw new Error(`axis ${JSON.stringify(k.spec)} not present in join result`);g.set(M,U??-1)});const y=a.value.sourceId,w=await su(d),E=y!==w,N=E?void 0:a.value.columnVisibility;E&&(a.value={...a.value,sourceId:w});let V=d.findIndex(k=>k.type==="column");V===-1&&(V=d.length);const D=[...d.keys()].filter(k=>!ze.some(r,M=>ze.isEqual(un(M.axis),d[k].id)||d[k].type==="column"&&d[k].spec.name==="pl7.app/label"&&d[k].spec.axesSpec.length===1&&ze.isEqual(un(M.axis),un(d[k].spec.axesSpec[0])))).sort((k,M)=>{var G,ee;if(d[k].type!==d[M].type)return d[k].type==="axis"?-1:1;const U=(G=d[k].spec.annotations)==null?void 0:G["pl7.app/table/orderPriority"],j=(ee=d[M].spec.annotations)==null?void 0:ee["pl7.app/table/orderPriority"];return U===void 0?j===void 0?0:1:j===void 0?-1:Number(j)-Number(U)}),F=[...D],$=D.findIndex(k=>d[k].type==="column");for(let k=D.length-1;k>=$;--k){const M=D[k];if(!kg(d[M]))continue;const U=un(d[M].spec.axesSpec[0]),j=D.findIndex(G=>ze.isEqual(d[G].id,U));j!==-1?D[j]=M:console.warn(`multiple label columns match axisId: ${JSON.stringify(U)}`),D.splice(k,1),F.splice(k,1)}const R=(await n.getShape(c)).rows,B=[_l(),...F.map(k=>bg(k,d[k],N==null?void 0:N.hiddenColIds,s))],z=[...D],q=new Map;for(let k=0;k<V;++k)q.set(k,-1);z.forEach((k,M)=>{q.has(k)&&q.set(k,M)});for(const[k,M]of q)M===-1&&(q.set(k,z.length),z.push(k));const C=[];for(let k=0;k<V;++k){const M=q.get(k);if(M===void 0||M===-1)throw new Error("assertion exception");C.push(M)}const A=[],v=[];if(z.forEach(k=>{const M=g.get(k);M!==-1?(v.push(A.length),A.push(M)):v.push(-1)}),o){const k=await n.getData(c,A);return{rowModelType:"clientSide",columnDefs:B,rowData:Vg(F,k,C,v)}}let O;return{rowModelType:"serverSide",columnDefs:B,serverSideDatasource:{getRows:async k=>{try{if(R==0){k.success({rowData:[],rowCount:R}),k.api.setGridOption("loading",!1),k.api.showNoRowsOverlay();return}if(O&&!ze.isEqual(O.request.sortModel,k.request.sortModel)){O=void 0,k.api.setGridOption("loading",!0),k.success({rowData:[],rowCount:0});return}O=k;let M=0,U=[];if(R>0&&k.request.startRow!==void 0&&k.request.endRow!==void 0&&(M=Math.min(R,k.request.endRow)-k.request.startRow,M>0)){const j=await n.getData(c,A,{offset:k.request.startRow,length:M});U=Vg(F,j,C,v)}k.success({rowData:U,rowCount:R}),k.api.autoSizeColumns(k.api.getAllDisplayedColumns().filter(j=>j.getColId()!==Qt)),k.api.setGridOption("loading",!1)}catch(M){k.api.setGridOption("loading",!0),k.fail(),console.trace(M)}}}}}const rM=t.defineComponent({__name:"PlAgRowCount",props:{params:{}},setup(n){const e=t.ref(n.params.api.getDisplayedRowCount()),r=t.ref(n.params.api.getSelectedRows().length),o=new Intl.PluralRules("en"),a=new Intl.NumberFormat("en"),s=t.computed(()=>{let d=a.format(e.value)+" ";return d+=o.select(e.value)==="one"?"row":"rows",r.value>0&&(d+=" ("+a.format(r.value)+" selected)"),d});function c(){e.value=n.params.api.getDisplayedRowCount(),r.value=n.params.api.getSelectedRows().length}return t.onBeforeMount(()=>{n.params.api.addEventListener("selectionChanged",c),n.params.api.addEventListener("rowDataUpdated",c),n.params.api.addEventListener("modelUpdated",c)}),t.onBeforeUnmount(()=>{n.params.api.removeEventListener("selectionChanged",c),n.params.api.removeEventListener("rowDataUpdated",c),n.params.api.removeEventListener("modelUpdated",c)}),(d,u)=>t.toDisplayString(s.value)}}),oM={class:"ap-ag-data-table-container"},aM={key:2,class:"ap-ag-data-table-sheets"},Tg=yo(t.defineComponent({__name:"PlAgDataTableV2",props:t.mergeModels({settings:{},showColumnsPanel:{type:Boolean},columnsPanelWidth:{},showExportButton:{type:Boolean},clientSideModel:{type:Boolean},showCellButtonForAxisId:{},cellButtonInvokeRowsOnDoubleClick:{type:Boolean},loadingText:{},notReadyText:{},noRowsText:{},cellRendererSelector:{type:Function}},{modelValue:{default:{gridState:{}}},modelModifiers:{},selectedRows:{},selectedRowsModifiers:{}}),emits:t.mergeModels(["rowDoubleClicked","columnsChanged","cellButtonClicked"],["update:modelValue","update:selectedRows"]),setup(n,{expose:e,emit:r}){$e.ModuleRegistry.registerModules([$e.ClientSideRowModelModule,$e.ClipboardModule,$e.ServerSideRowModelModule,$e.CellSelectionModule]);const o=t.useModel(n,"modelValue"),a=t.useModel(n,"selectedRows"),s=n,{settings:c}=t.toRefs(s),d=r;o.value.pTableParams||(o.value.pTableParams={});function u(C){return(C==null?void 0:C.sortModel.map(A=>{const{spec:v,...O}=gs(A.colId);return{column:O,ascending:A.sort==="asc",naAndAbsentAreLeastValues:A.sort==="asc"}}))??[]}const p=t.computed({get:()=>{const C=o.value;return{sourceId:C.gridState.sourceId,columnOrder:C.gridState.columnOrder,sort:C.gridState.sort,columnVisibility:C.gridState.columnVisibility}},set:C=>{var S;const A=((S=c.value)==null?void 0:S.sourceType)!=="ptable"||D.value.rowModelType==="clientSide"?void 0:u(C.sort),v=o.value,O={...v,gridState:{...v.gridState,...C},pTableParams:{...v.pTableParams,sorting:A}};Ut(v,O)||(o.value=O)}}),h=C=>vr(un(C));function g(C){var A,v;if(((A=c.value)==null?void 0:A.sourceType)==="ptable")return((v=c.value.sheets)==null?void 0:v.map(O=>({type:"bySingleColumnV2",column:{type:"axis",id:O.axis},predicate:{operator:"Equal",reference:C[h(O.axis)]}})))??[]}const y=t.computed({get:()=>o.value.gridState.sheets??{},set:C=>{const A=g(C),v=o.value;o.value={...v,gridState:{...v.gridState,sheets:C},pTableParams:{...v.pTableParams,filters:A}}}}),w=C=>(C==null?void 0:C.sourceType)==="ptable"&&!!C.sheets&&C.sheets.length>0;t.watch(()=>c.value,(C,A)=>{var S;if((C==null?void 0:C.sourceType)!=="ptable"||!C.sheets){y.value={};return}if(A&&A.sourceType==="ptable"&&ze.isEqual(C.sheets,A.sheets))return;const v=y.value,O={};for(const k of C.sheets){const M=h(k.axis);O[M]=v[M]??k.defaultValue??((S=k.options[0])==null?void 0:S.value)}y.value=O},{immediate:!0});const E=t.shallowRef(),N=t.shallowRef(new as),V=du(),D=t.shallowRef({animateRows:!1,suppressColumnMoveAnimation:!0,cellSelection:a.value===void 0,initialState:p.value,autoSizeStrategy:{type:"fitCellContents"},rowSelection:a.value!==void 0?{mode:"multiRow",checkboxes:!1,headerCheckbox:!1,enableClickSelection:!1}:void 0,selectionColumnDef:{mainMenuItems:[],contextMenuItems:[],pinned:"left",lockPinned:!0,suppressSizeToFit:!0,suppressAutoSize:!0,sortable:!1,resizable:!1},onRowDataUpdated:C=>{const A=a.value;if(A){const v=A.map(O=>C.api.getRowNode(ra(O))).filter(O=>!!O);C.api.setNodesSelected({nodes:v,newValue:!0})}},onSelectionChanged:C=>{a.value&&(a.value=C.api.getSelectedNodes().map(A=>{var v;return(v=A.data)==null?void 0:v.key}).filter(A=>!!A))},onRowDoubleClicked:C=>{C.data&&C.data.key&&d("rowDoubleClicked",C.data.key)},defaultColDef:{suppressHeaderMenuButton:!0,sortingOrder:["desc","asc",null],cellRendererSelector:s.cellRendererSelector},maintainColumnOrder:!0,localeText:{loadingError:"..."},rowModelType:"clientSide",maxBlocksInCache:1e3,blockLoadDebounceMillis:500,serverSideSortAllLevels:!0,suppressServerSideFullWidthLoadingRow:!0,getRowId:C=>C.data.id,loading:!0,loadingOverlayComponentParams:{notReady:!0,loadingText:s.loadingText,notReadyText:s.notReadyText},loadingOverlayComponent:gl,noRowsOverlayComponent:yl,noRowsOverlayComponentParams:{text:s.noRowsText},defaultCsvExportParams:{allColumns:!0,suppressQuotes:!0,fileName:"table.csv"},statusBar:{statusPanels:[{statusPanel:rM,align:"left"}]}}),F=C=>{const A=C.api;uu(A,V),Ai(A),E.value=new Proxy(A,{get(v,O,S){switch(O){case"setGridOption":return(k,M)=>{const U=D.value;U[k]=M,D.value=U,A.setGridOption(k,M)};case"updateGridOptions":return k=>{D.value={...D.value,...k},A.updateGridOptions(k)};default:return Reflect.get(v,O,S)}}}),N.value.resolve(E.value)},$=C=>({sourceId:p.value.sourceId,columnOrder:C.columnOrder,sort:C.sort,columnVisibility:C.columnVisibility}),W=C=>{D.value.initialState=p.value=$(C.state),C.api.autoSizeColumns(C.api.getAllDisplayedColumns().filter(A=>A.getColId()!==Qt))},R=()=>{D.value.initialState=p.value=$(E.value.getState()),E.value=void 0,N.value=new as};e({focusRow:C=>fu(ra(C),V)});const B=t.ref(0);t.watch(()=>[E.value,p.value],(C,A)=>{if(ze.isEqual(C,A))return;const[v,O]=C;if(!v)return;const S=$(v.getState());ze.isEqual(O,S)||(D.value.initialState=O,++B.value)}),t.watch(()=>D.value,(C,A)=>{var v,O;if(A){if(C.rowModelType!=A.rowModelType&&++B.value,C.columnDefs&&!ze.isEqual(C.columnDefs,A.columnDefs)){const S=U=>!("children"in U),M=(((v=C.columnDefs)==null?void 0:v.filter(S))??[]).map(U=>U.colId).filter(U=>U!==void 0).filter(U=>U!==Qt).filter(U=>!$e.isColumnSelectionCol(U)).map(U=>gs(U))??[];d("columnsChanged",M)}!ze.isEqual(C.loadingOverlayComponentParams,A.loadingOverlayComponentParams)&&C.loading&&((O=E.value)==null||O.setGridOption("loading",!1),t.nextTick(()=>{var S;return(S=E.value)==null?void 0:S.setGridOption("loading",!0)}))}},{immediate:!0});const z=(C,A)=>{var O;const v=y.value;if(v[C]!==A)return v[C]=A,y.value=v,(O=E.value)==null?void 0:O.updateGridOptions({loading:!0,loadingOverlayComponentParams:{...D.value.loadingOverlayComponentParams,notReady:!1}})};let q;return t.watch(()=>[c.value],async C=>{try{const[A]=C,v=await N.value.promise;if(v.isDestroyed()){console.warn("gridApi is destroyed");return}if(ze.isEqual(A,q))return;q=A;const O=A==null?void 0:A.sourceType;switch(O){case void 0:return v.updateGridOptions({loading:!0,loadingOverlayComponentParams:{...D.value.loadingOverlayComponentParams,notReady:!0},columnDefs:[],rowData:void 0,datasource:void 0});case"ptable":{if(!(A!=null&&A.model))return v.updateGridOptions({loading:!0,loadingOverlayComponentParams:{...D.value.loadingOverlayComponentParams,notReady:!1},columnDefs:[],rowData:void 0,datasource:void 0});v.updateGridOptions({loading:!0,loadingOverlayComponentParams:{...D.value.loadingOverlayComponentParams,notReady:!1}});const S=await nM(Lo().pFrameDriver,A.model,A.sheets??[],!!s.clientSideModel||!!a.value,p,{showCellButtonForAxisId:s.showCellButtonForAxisId,cellButtonInvokeRowsOnDoubleClick:s.cellButtonInvokeRowsOnDoubleClick,trigger:k=>d("cellButtonClicked",k)}).catch(k=>{throw v.updateGridOptions({loading:!1,loadingOverlayComponentParams:{...D.value.loadingOverlayComponentParams,notReady:!1}}),k});return v.updateGridOptions({loading:!1,loadingOverlayComponentParams:{...D.value.loadingOverlayComponentParams,notReady:!1},...S})}default:throw Error(`unsupported source type: ${O}`)}}catch(A){console.trace(A)}},{immediate:!0,deep:!0}),t.watch(()=>s.cellRendererSelector,C=>{E.value&&E.value.setGridOption("defaultColDef",{...D.value.defaultColDef,cellRendererSelector:C})}),(C,A)=>(t.openBlock(),t.createElementBlock("div",oM,[E.value&&C.showColumnsPanel?(t.openBlock(),t.createBlock(t.unref(cu),{key:0,api:E.value,width:C.columnsPanelWidth},null,8,["api","width"])):t.createCommentVNode("",!0),E.value&&C.showExportButton?(t.openBlock(),t.createBlock(pu,{key:1,api:E.value},null,8,["api"])):t.createCommentVNode("",!0),w(t.unref(c))||C.$slots["before-sheets"]||C.$slots["after-sheets"]?(t.openBlock(),t.createElementBlock("div",aM,[t.renderSlot(C.$slots,"before-sheets",{},void 0,!0),w(t.unref(c))?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(c).sheets,(v,O)=>{var S,k;return t.openBlock(),t.createBlock(t.unref(cd),{key:O,"model-value":y.value[h(v.axis)],options:v.options,prefix:(((k=(S=v.axis.annotations)==null?void 0:S["pl7.app/label"])==null?void 0:k.trim())??`Unlabeled axis ${O}`)+":","onUpdate:modelValue":M=>z(h(v.axis),M)},null,8,["model-value","options","prefix","onUpdate:modelValue"])}),128)):t.createCommentVNode("",!0),t.renderSlot(C.$slots,"after-sheets",{},void 0,!0)])):t.createCommentVNode("",!0),(t.openBlock(),t.createBlock(t.unref(ro.AgGridVue),{key:B.value,theme:t.unref(_s),class:"ap-ag-data-table-grid","grid-options":D.value,onGridReady:F,onStateUpdated:W,onGridPreDestroyed:R},null,8,["theme","grid-options"]))]))}}),[["__scopeId","data-v-c92ccd0c"]]),iM={key:1,class:"alert-error"},sM={key:2},lM=t.defineComponent({__name:"ValueOrErrorsComponent",props:{valueOrError:{}},setup(n){const e=n,r=t.computed(()=>e.valueOrError&&e.valueOrError.ok?e.valueOrError.value:void 0),o=t.computed(()=>e.valueOrError&&!e.valueOrError.ok?e.valueOrError.errors:void 0),a=t.computed(()=>r.value===void 0&&o.value===void 0);return(s,c)=>(t.openBlock(),t.createElementBlock("div",null,[r.value!==void 0?t.renderSlot(s.$slots,"default",t.normalizeProps(t.mergeProps({key:0},{value:r.value}))):t.createCommentVNode("",!0),o.value?(t.openBlock(),t.createElementBlock("div",iM,t.toDisplayString(o.value),1)):t.createCommentVNode("",!0),a.value?(t.openBlock(),t.createElementBlock("div",sM,"Unresolved")):t.createCommentVNode("",!0)]))}}),cM={style:{height:"100%"}},Ag=t.defineComponent({__name:"PlAgCellFile",props:{params:{}},setup(n){const e=n,r=t.computed(()=>e.params.extensions),o=t.computed(()=>e.params.value);function a(c){e.params.setValue(c)}const s=t.computed(()=>e.params.resolveProgress?e.params.resolveProgress(o.value):void 0);return(c,d)=>(t.openBlock(),t.createElementBlock("div",cM,[t.createVNode(t.unref(jh),{"show-filename-only":"",clearable:"","cell-style":"","file-dialog-title":"Select any file",placeholder:`Choose file ${r.value?r.value[0]:""}`,extensions:r.value,"model-value":o.value,progress:s.value,"onUpdate:modelValue":a},null,8,["placeholder","extensions","model-value","progress"])]))}}),dM={class:"pl-ag-chart-stacked-bar-cell"},uM={key:1,class:"pl-ag-chart-stacked-bar-cell__not-ready"},$g=t.defineComponent({__name:"PlAgChartStackedBarCell",props:{params:{}},setup(n){const e=n,r=t.computed(()=>e.params.value||void 0);return(o,a)=>(t.openBlock(),t.createElementBlock("div",dM,[r.value?(t.openBlock(),t.createBlock(t.unref(Wh),{key:0,settings:r.value},null,8,["settings"])):(t.openBlock(),t.createElementBlock("div",uM,"Not ready"))]))}}),fM={key:1,class:"pl-ag-chart-histogram-cell__not-ready"},Rg=t.defineComponent({__name:"PlAgChartHistogramCell",props:{params:{}},setup(n){const e=n,r=t.ref(),{width:o}=q1(r),a=t.computed(()=>{if(e.params.value&&o.value)return{...e.params.value,compact:!0,totalHeight:24,totalWidth:o.value}});return(s,c)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"root",ref:r,class:"pl-ag-chart-histogram-cell"},[a.value?(t.openBlock(),t.createBlock(t.unref(rg),{key:0,settings:a.value},null,8,["settings"])):(t.openBlock(),t.createElementBlock("div",fM,"Not ready"))],512))}}),pM={class:"pl-ag-cell-status-tag d-flex align-center"},Og=t.defineComponent({__name:"PlAgCellStatusTag",props:{params:{}},setup(n){return(e,r)=>{var o;return t.openBlock(),t.createElementBlock("div",pM,[t.createVNode(t.unref(Mh),{type:(o=e.params)==null?void 0:o.type},null,8,["type"])])}}});class Ig{constructor(){Le(this,mt,{})}options(e){return ge(this,mt,Object.assign({},T(this,mt),e)),this}get columnDefs(){return T(this,mt).columnDefs??[]}setDefaultColDef(e){return T(this,mt).defaultColDef=e,this}setLoading(e){return T(this,mt).loading=e,this}setLoadingText(e){return T(this,mt).loadingText=e,this}setNotReady(e){return T(this,mt).notReady=e,this}setLoadingOverlayType(e){return T(this,mt).loadingOverlayType=e,this}setNotReadyText(e){return T(this,mt).notReadyText=e,this}setNoRowsText(e){return T(this,mt).noRowsText=e,this}setRowSelection(e){return T(this,mt).rowSelection=e,this}setRowData(e){return T(this,mt).rowData=e,this}setComponents(e){return T(this,mt).components=e,this}setOption(e,r){return T(this,mt)[e]=r,this}column(e){return T(this,mt).columnDefs=[...this.columnDefs,e],this}columnRowNumbers(e=!0){return T(this,mt).rowNumbersColumn=e,this}columnFileInput(e){return this.column(Object.assign({cellRenderer:"PlAgCellFile",headerComponentParams:{type:"File"},cellStyle:{padding:0},valueSetter:r=>{var o;return(o=e.setImportFileHandle)==null||o.call(e,r),!0},cellRendererSelector:r=>{var o;return{component:"PlAgCellFile",params:{extensions:e.extensions,value:(o=e.resolveImportFileHandle)==null?void 0:o.call(e,r),resolveProgress:()=>{var a;return(a=e.resolveImportProgress)==null?void 0:a.call(e,r)}}}}},e))}build(){return T(this,mt)}}mt=new WeakMap;function hM(n){const e=t.shallowRef(),r=t.computed(()=>{var u;const a={theme:_s,loadingOverlayComponent:gl,noRowsOverlayComponent:yl,onGridReady:p=>{e.value=p.api,Ai(p.api)}},s=p=>p,c=n({builder:new Ig,column:s}),d=Object.assign({},a,c instanceof Ig?c.build():c);return d.rowNumbersColumn&&(d.columnDefs=[_l(),...d.columnDefs??[]]),d.noRowsText&&(d.noRowsOverlayComponentParams={text:d.noRowsText}),"loadingOverlayComponentParams"in d&&console.warn("useAgGridOptions: remove loadingOverlayComponentParams from options, use loading, notReady, loadingText, loadingOverlayType instead"),d.loading=d.notReady||d.loading,d.columnDefs=(u=d.columnDefs)==null?void 0:u.map(p=>Pg(p)),d.components=Object.assign({},d.components??{},{PlAgCellFile:Ag,PlAgChartStackedBarCell:$g,PlAgChartHistogramCell:Rg,PlAgCellStatusTag:Og}),d}),o=t.computed(()=>{const a=r.value;return{...a,loadingOverlayComponentParams:{notReady:a.notReady,notReadyText:a.notReadyText,overlayType:a.loadingOverlayType}}});return j1(()=>r.value.rowNumbersColumn,()=>{e.value&&Ai(e.value)}),t.watch([()=>r.value.notReady,()=>r.value.loading],([a,s])=>{var d,u;const c={notReady:a,notReadyText:r.value.notReadyText,overlayType:r.value.loadingOverlayType,loadingText:r.value.loadingText};(d=e.value)==null||d.updateGridOptions({loading:!s,loadingOverlayComponentParams:c}),(u=e.value)==null||u.updateGridOptions({loading:s,loadingOverlayComponentParams:c})},{deep:!0,immediate:!0}),{gridOptions:o,gridApi:e}}const Dg=t.defineComponent({__name:"PlAgCellProgress",props:{params:{}},setup(n){const e=n;return(r,o)=>(t.openBlock(),t.createBlock(t.unref(Ph),t.normalizeProps(t.guardReactiveProps(e.params)),null,16))}}),mM={not_started:"Not Started",running:"Running",done:"Done"};function Mg(){return{"--ag-cell-horizontal-padding":"0px","--ag-cell-vertical-padding":"0px"}}function gM(n){return{component:Dg,params:n}}function yM(n){if(n.progress){const e=n.progress,r=n.cellRendererSelector;n.cellStyle=Object.assign({},n.cellStyle??{},Mg()),n.cellRendererSelector=o=>{const a=e(o.value,o);return a?gM({progress:iw(Number(a.percent),s=>Number.isFinite(s)?s<0?0:s:void 0),progressString:a.suffix??(a.status==="running"?`${a.percent??0}%`:""),step:a.text??mM[a.status],stage:a.status,error:a.error}):r==null?void 0:r(o)}}}function Pg(n){return yM(n),n.noGutters&&(n.cellStyle=Object.assign({},n.cellStyle??{},Mg())),n.headerComponentParams&&(n.headerComponent=au),n.textWithButton&&(n.cellRenderer=iu,typeof n.textWithButton!="boolean"?n.cellRendererParams=n.textWithButton:n.cellRendererParams={invokeRowsOnDoubleClick:!0}),delete n.textWithButton,delete n.progress,delete n.noGutters,n}var hu={exports:{}};const _M="2.0.0",Lg=256,wM=Number.MAX_SAFE_INTEGER||9007199254740991,bM=16,kM=Lg-6;var wl={MAX_LENGTH:Lg,MAX_SAFE_COMPONENT_LENGTH:bM,MAX_SAFE_BUILD_LENGTH:kM,MAX_SAFE_INTEGER:wM,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:_M,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},bl=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{};(function(n,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:a}=wl,s=bl;e=n.exports={};const c=e.re=[],d=e.safeRe=[],u=e.src=[],p=e.safeSrc=[],h=e.t={};let g=0;const y="[a-zA-Z0-9-]",w=[["\\s",1],["\\d",a],[y,o]],E=V=>{for(const[D,F]of w)V=V.split(`${D}*`).join(`${D}{0,${F}}`).split(`${D}+`).join(`${D}{1,${F}}`);return V},N=(V,D,F)=>{const $=E(D),W=g++;s(V,W,D),h[V]=W,u[W]=D,p[W]=$,c[W]=new RegExp(D,F?"g":void 0),d[W]=new RegExp($,F?"g":void 0)};N("NUMERICIDENTIFIER","0|[1-9]\\d*"),N("NUMERICIDENTIFIERLOOSE","\\d+"),N("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${y}*`),N("MAINVERSION",`(${u[h.NUMERICIDENTIFIER]})\\.(${u[h.NUMERICIDENTIFIER]})\\.(${u[h.NUMERICIDENTIFIER]})`),N("MAINVERSIONLOOSE",`(${u[h.NUMERICIDENTIFIERLOOSE]})\\.(${u[h.NUMERICIDENTIFIERLOOSE]})\\.(${u[h.NUMERICIDENTIFIERLOOSE]})`),N("PRERELEASEIDENTIFIER",`(?:${u[h.NUMERICIDENTIFIER]}|${u[h.NONNUMERICIDENTIFIER]})`),N("PRERELEASEIDENTIFIERLOOSE",`(?:${u[h.NUMERICIDENTIFIERLOOSE]}|${u[h.NONNUMERICIDENTIFIER]})`),N("PRERELEASE",`(?:-(${u[h.PRERELEASEIDENTIFIER]}(?:\\.${u[h.PRERELEASEIDENTIFIER]})*))`),N("PRERELEASELOOSE",`(?:-?(${u[h.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[h.PRERELEASEIDENTIFIERLOOSE]})*))`),N("BUILDIDENTIFIER",`${y}+`),N("BUILD",`(?:\\+(${u[h.BUILDIDENTIFIER]}(?:\\.${u[h.BUILDIDENTIFIER]})*))`),N("FULLPLAIN",`v?${u[h.MAINVERSION]}${u[h.PRERELEASE]}?${u[h.BUILD]}?`),N("FULL",`^${u[h.FULLPLAIN]}$`),N("LOOSEPLAIN",`[v=\\s]*${u[h.MAINVERSIONLOOSE]}${u[h.PRERELEASELOOSE]}?${u[h.BUILD]}?`),N("LOOSE",`^${u[h.LOOSEPLAIN]}$`),N("GTLT","((?:<|>)?=?)"),N("XRANGEIDENTIFIERLOOSE",`${u[h.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),N("XRANGEIDENTIFIER",`${u[h.NUMERICIDENTIFIER]}|x|X|\\*`),N("XRANGEPLAIN",`[v=\\s]*(${u[h.XRANGEIDENTIFIER]})(?:\\.(${u[h.XRANGEIDENTIFIER]})(?:\\.(${u[h.XRANGEIDENTIFIER]})(?:${u[h.PRERELEASE]})?${u[h.BUILD]}?)?)?`),N("XRANGEPLAINLOOSE",`[v=\\s]*(${u[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[h.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[h.XRANGEIDENTIFIERLOOSE]})(?:${u[h.PRERELEASELOOSE]})?${u[h.BUILD]}?)?)?`),N("XRANGE",`^${u[h.GTLT]}\\s*${u[h.XRANGEPLAIN]}$`),N("XRANGELOOSE",`^${u[h.GTLT]}\\s*${u[h.XRANGEPLAINLOOSE]}$`),N("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),N("COERCE",`${u[h.COERCEPLAIN]}(?:$|[^\\d])`),N("COERCEFULL",u[h.COERCEPLAIN]+`(?:${u[h.PRERELEASE]})?(?:${u[h.BUILD]})?(?:$|[^\\d])`),N("COERCERTL",u[h.COERCE],!0),N("COERCERTLFULL",u[h.COERCEFULL],!0),N("LONETILDE","(?:~>?)"),N("TILDETRIM",`(\\s*)${u[h.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",N("TILDE",`^${u[h.LONETILDE]}${u[h.XRANGEPLAIN]}$`),N("TILDELOOSE",`^${u[h.LONETILDE]}${u[h.XRANGEPLAINLOOSE]}$`),N("LONECARET","(?:\\^)"),N("CARETTRIM",`(\\s*)${u[h.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",N("CARET",`^${u[h.LONECARET]}${u[h.XRANGEPLAIN]}$`),N("CARETLOOSE",`^${u[h.LONECARET]}${u[h.XRANGEPLAINLOOSE]}$`),N("COMPARATORLOOSE",`^${u[h.GTLT]}\\s*(${u[h.LOOSEPLAIN]})$|^$`),N("COMPARATOR",`^${u[h.GTLT]}\\s*(${u[h.FULLPLAIN]})$|^$`),N("COMPARATORTRIM",`(\\s*)${u[h.GTLT]}\\s*(${u[h.LOOSEPLAIN]}|${u[h.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",N("HYPHENRANGE",`^\\s*(${u[h.XRANGEPLAIN]})\\s+-\\s+(${u[h.XRANGEPLAIN]})\\s*$`),N("HYPHENRANGELOOSE",`^\\s*(${u[h.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[h.XRANGEPLAINLOOSE]})\\s*$`),N("STAR","(<|>)?=?\\s*\\*"),N("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),N("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(hu,hu.exports);var $i=hu.exports;const xM=Object.freeze({loose:!0}),vM=Object.freeze({});var mu=n=>n?typeof n!="object"?xM:n:vM;const Fg=/^[0-9]+$/,zg=(n,e)=>{const r=Fg.test(n),o=Fg.test(e);return r&&o&&(n=+n,e=+e),n===e?0:r&&!o?-1:o&&!r?1:n<e?-1:1};var Ug={compareIdentifiers:zg,rcompareIdentifiers:(n,e)=>zg(e,n)};const kl=bl,{MAX_LENGTH:jg,MAX_SAFE_INTEGER:xl}=wl,{safeRe:Zg,safeSrc:Wg,t:vl}=$i,CM=mu,{compareIdentifiers:oa}=Ug;var Dt=class or{constructor(e,r){if(r=CM(r),e instanceof or){if(e.loose===!!r.loose&&e.includePrerelease===!!r.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>jg)throw new TypeError(`version is longer than ${jg} characters`);kl("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const o=e.trim().match(r.loose?Zg[vl.LOOSE]:Zg[vl.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>xl||this.major<0)throw new TypeError("Invalid major version");if(this.minor>xl||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>xl||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){const s=+a;if(s>=0&&s<xl)return s}return a}):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(kl("SemVer.compare",this.version,this.options,e),!(e instanceof or)){if(typeof e=="string"&&e===this.version)return 0;e=new or(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof or||(e=new or(e,this.options)),oa(this.major,e.major)||oa(this.minor,e.minor)||oa(this.patch,e.patch)}comparePre(e){if(e instanceof or||(e=new or(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 r=0;do{const o=this.prerelease[r],a=e.prerelease[r];if(kl("prerelease compare",r,o,a),o===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(o===void 0)return-1;if(o===a)continue;return oa(o,a)}while(++r)}compareBuild(e){e instanceof or||(e=new or(e,this.options));let r=0;do{const o=this.build[r],a=e.build[r];if(kl("build compare",r,o,a),o===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(o===void 0)return-1;if(o===a)continue;return oa(o,a)}while(++r)}inc(e,r,o){if(e.startsWith("pre")){if(!r&&o===!1)throw new Error("invalid increment argument: identifier is empty");if(r){const a=new RegExp(`^${this.options.loose?Wg[vl.PRERELEASELOOSE]:Wg[vl.PRERELEASE]}$`),s=`-${r}`.match(a);if(!s||s[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,o);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,o);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,o),this.inc("pre",r,o);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,o),this.inc("pre",r,o);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;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 a=Number(o)?1:0;if(this.prerelease.length===0)this.prerelease=[a];else{let s=this.prerelease.length;for(;--s>=0;)typeof this.prerelease[s]=="number"&&(this.prerelease[s]++,s=-2);if(s===-1){if(r===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(r){let s=[r,a];o===!1&&(s=[r]),oa(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=s):this.prerelease=s}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};const Hg=Dt;var aa=(n,e,r=!1)=>{if(n instanceof Hg)return n;try{return new Hg(n,e)}catch(o){if(!r)return null;throw o}};const EM=aa;var SM=(n,e)=>{const r=EM(n,e);return r?r.version:null};const NM=aa;var BM=(n,e)=>{const r=NM(n.trim().replace(/^[=v]+/,""),e);return r?r.version:null};const qg=Dt;var VM=(n,e,r,o,a)=>{typeof r=="string"&&(a=o,o=r,r=void 0);try{return new qg(n instanceof qg?n.version:n,r).inc(e,o,a).version}catch{return null}};const Gg=aa;var TM=(n,e)=>{const r=Gg(n,null,!0),o=Gg(e,null,!0),a=r.compare(o);if(a===0)return null;const s=a>0,c=s?r:o,d=s?o:r,u=!!c.prerelease.length;if(!!d.prerelease.length&&!u){if(!d.patch&&!d.minor)return"major";if(d.compareMain(c)===0)return d.minor&&!d.patch?"minor":"patch"}const h=u?"pre":"";return r.major!==o.major?h+"major":r.minor!==o.minor?h+"minor":r.patch!==o.patch?h+"patch":"prerelease"};const AM=Dt;var $M=(n,e)=>new AM(n,e).major;const RM=Dt;var OM=(n,e)=>new RM(n,e).minor;const IM=Dt;var DM=(n,e)=>new IM(n,e).patch;const MM=aa;var PM=(n,e)=>{const r=MM(n,e);return r&&r.prerelease.length?r.prerelease:null};const Kg=Dt;var Vn=(n,e,r)=>new Kg(n,r).compare(new Kg(e,r));const LM=Vn;var FM=(n,e,r)=>LM(e,n,r);const zM=Vn;var UM=(n,e)=>zM(n,e,!0);const Xg=Dt;var gu=(n,e,r)=>{const o=new Xg(n,r),a=new Xg(e,r);return o.compare(a)||o.compareBuild(a)};const jM=gu;var ZM=(n,e)=>n.sort((r,o)=>jM(r,o,e));const WM=gu;var HM=(n,e)=>n.sort((r,o)=>WM(o,r,e));const qM=Vn;var Cl=(n,e,r)=>qM(n,e,r)>0;const GM=Vn;var yu=(n,e,r)=>GM(n,e,r)<0;const KM=Vn;var Yg=(n,e,r)=>KM(n,e,r)===0;const XM=Vn;var Jg=(n,e,r)=>XM(n,e,r)!==0;const YM=Vn;var _u=(n,e,r)=>YM(n,e,r)>=0;const JM=Vn;var wu=(n,e,r)=>JM(n,e,r)<=0;const QM=Yg,eP=Jg,tP=Cl,nP=_u,rP=yu,oP=wu;var Qg=(n,e,r,o)=>{switch(e){case"===":return typeof n=="object"&&(n=n.version),typeof r=="object"&&(r=r.version),n===r;case"!==":return typeof n=="object"&&(n=n.version),typeof r=="object"&&(r=r.version),n!==r;case"":case"=":case"==":return QM(n,r,o);case"!=":return eP(n,r,o);case">":return tP(n,r,o);case">=":return nP(n,r,o);case"<":return rP(n,r,o);case"<=":return oP(n,r,o);default:throw new TypeError(`Invalid operator: ${e}`)}};const aP=Dt,iP=aa,{safeRe:El,t:Sl}=$i;var sP=(n,e)=>{if(n instanceof aP)return n;if(typeof n=="number"&&(n=String(n)),typeof n!="string")return null;e=e||{};let r=null;if(!e.rtl)r=n.match(e.includePrerelease?El[Sl.COERCEFULL]:El[Sl.COERCE]);else{const u=e.includePrerelease?El[Sl.COERCERTLFULL]:El[Sl.COERCERTL];let p;for(;(p=u.exec(n))&&(!r||r.index+r[0].length!==n.length);)(!r||p.index+p[0].length!==r.index+r[0].length)&&(r=p),u.lastIndex=p.index+p[1].length+p[2].length;u.lastIndex=-1}if(r===null)return null;const o=r[2],a=r[3]||"0",s=r[4]||"0",c=e.includePrerelease&&r[5]?`-${r[5]}`:"",d=e.includePrerelease&&r[6]?`+${r[6]}`:"";return iP(`${o}.${a}.${s}${c}${d}`,e)},lP=class{constructor(){this.max=1e3,this.map=new Map}get(e){const r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){const a=this.map.keys().next().value;this.delete(a)}this.map.set(e,r)}return this}},bu,ey;function Tn(){if(ey)return bu;ey=1;const n=/\s+/g;class e{constructor(M,U){if(U=a(U),M instanceof e)return M.loose===!!U.loose&&M.includePrerelease===!!U.includePrerelease?M:new e(M.raw,U);if(M instanceof s)return this.raw=M.value,this.set=[[M]],this.formatted=void 0,this;if(this.options=U,this.loose=!!U.loose,this.includePrerelease=!!U.includePrerelease,this.raw=M.trim().replace(n," "),this.set=this.raw.split("||").map(j=>this.parseRange(j.trim())).filter(j=>j.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const j=this.set[0];if(this.set=this.set.filter(G=>!N(G[0])),this.set.length===0)this.set=[j];else if(this.set.length>1){for(const G of this.set)if(G.length===1&&V(G[0])){this.set=[G];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let M=0;M<this.set.length;M++){M>0&&(this.formatted+="||");const U=this.set[M];for(let j=0;j<U.length;j++)j>0&&(this.formatted+=" "),this.formatted+=U[j].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(M){const j=((this.options.includePrerelease&&w)|(this.options.loose&&E))+":"+M,G=o.get(j);if(G)return G;const ee=this.options.loose,ue=ee?u[p.HYPHENRANGELOOSE]:u[p.HYPHENRANGE];M=M.replace(ue,O(this.options.includePrerelease)),c("hyphen replace",M),M=M.replace(u[p.COMPARATORTRIM],h),c("comparator trim",M),M=M.replace(u[p.TILDETRIM],g),c("tilde trim",M),M=M.replace(u[p.CARETTRIM],y),c("caret trim",M);let ye=M.split(" ").map(Ke=>F(Ke,this.options)).join(" ").split(/\s+/).map(Ke=>v(Ke,this.options));ee&&(ye=ye.filter(Ke=>(c("loose invalid filter",Ke,this.options),!!Ke.match(u[p.COMPARATORLOOSE])))),c("range list",ye);const Ce=new Map,He=ye.map(Ke=>new s(Ke,this.options));for(const Ke of He){if(N(Ke))return[Ke];Ce.set(Ke.value,Ke)}Ce.size>1&&Ce.has("")&&Ce.delete("");const Ct=[...Ce.values()];return o.set(j,Ct),Ct}intersects(M,U){if(!(M instanceof e))throw new TypeError("a Range is required");return this.set.some(j=>D(j,U)&&M.set.some(G=>D(G,U)&&j.every(ee=>G.every(ue=>ee.intersects(ue,U)))))}test(M){if(!M)return!1;if(typeof M=="string")try{M=new d(M,this.options)}catch{return!1}for(let U=0;U<this.set.length;U++)if(S(this.set[U],M,this.options))return!0;return!1}}bu=e;const r=lP,o=new r,a=mu,s=Nl(),c=bl,d=Dt,{safeRe:u,t:p,comparatorTrimReplace:h,tildeTrimReplace:g,caretTrimReplace:y}=$i,{FLAG_INCLUDE_PRERELEASE:w,FLAG_LOOSE:E}=wl,N=k=>k.value==="<0.0.0-0",V=k=>k.value==="",D=(k,M)=>{let U=!0;const j=k.slice();let G=j.pop();for(;U&&j.length;)U=j.every(ee=>G.intersects(ee,M)),G=j.pop();return U},F=(k,M)=>(c("comp",k,M),k=B(k,M),c("caret",k),k=W(k,M),c("tildes",k),k=q(k,M),c("xrange",k),k=A(k,M),c("stars",k),k),$=k=>!k||k.toLowerCase()==="x"||k==="*",W=(k,M)=>k.trim().split(/\s+/).map(U=>R(U,M)).join(" "),R=(k,M)=>{const U=M.loose?u[p.TILDELOOSE]:u[p.TILDE];return k.replace(U,(j,G,ee,ue,ye)=>{c("tilde",k,j,G,ee,ue,ye);let Ce;return $(G)?Ce="":$(ee)?Ce=`>=${G}.0.0 <${+G+1}.0.0-0`:$(ue)?Ce=`>=${G}.${ee}.0 <${G}.${+ee+1}.0-0`:ye?(c("replaceTilde pr",ye),Ce=`>=${G}.${ee}.${ue}-${ye} <${G}.${+ee+1}.0-0`):Ce=`>=${G}.${ee}.${ue} <${G}.${+ee+1}.0-0`,c("tilde return",Ce),Ce})},B=(k,M)=>k.trim().split(/\s+/).map(U=>z(U,M)).join(" "),z=(k,M)=>{c("caret",k,M);const U=M.loose?u[p.CARETLOOSE]:u[p.CARET],j=M.includePrerelease?"-0":"";return k.replace(U,(G,ee,ue,ye,Ce)=>{c("caret",k,G,ee,ue,ye,Ce);let He;return $(ee)?He="":$(ue)?He=`>=${ee}.0.0${j} <${+ee+1}.0.0-0`:$(ye)?ee==="0"?He=`>=${ee}.${ue}.0${j} <${ee}.${+ue+1}.0-0`:He=`>=${ee}.${ue}.0${j} <${+ee+1}.0.0-0`:Ce?(c("replaceCaret pr",Ce),ee==="0"?ue==="0"?He=`>=${ee}.${ue}.${ye}-${Ce} <${ee}.${ue}.${+ye+1}-0`:He=`>=${ee}.${ue}.${ye}-${Ce} <${ee}.${+ue+1}.0-0`:He=`>=${ee}.${ue}.${ye}-${Ce} <${+ee+1}.0.0-0`):(c("no pr"),ee==="0"?ue==="0"?He=`>=${ee}.${ue}.${ye}${j} <${ee}.${ue}.${+ye+1}-0`:He=`>=${ee}.${ue}.${ye}${j} <${ee}.${+ue+1}.0-0`:He=`>=${ee}.${ue}.${ye} <${+ee+1}.0.0-0`),c("caret return",He),He})},q=(k,M)=>(c("replaceXRanges",k,M),k.split(/\s+/).map(U=>C(U,M)).join(" ")),C=(k,M)=>{k=k.trim();const U=M.loose?u[p.XRANGELOOSE]:u[p.XRANGE];return k.replace(U,(j,G,ee,ue,ye,Ce)=>{c("xRange",k,j,G,ee,ue,ye,Ce);const He=$(ee),Ct=He||$(ue),Ke=Ct||$(ye),Wt=Ke;return G==="="&&Wt&&(G=""),Ce=M.includePrerelease?"-0":"",He?G===">"||G==="<"?j="<0.0.0-0":j="*":G&&Wt?(Ct&&(ue=0),ye=0,G===">"?(G=">=",Ct?(ee=+ee+1,ue=0,ye=0):(ue=+ue+1,ye=0)):G==="<="&&(G="<",Ct?ee=+ee+1:ue=+ue+1),G==="<"&&(Ce="-0"),j=`${G+ee}.${ue}.${ye}${Ce}`):Ct?j=`>=${ee}.0.0${Ce} <${+ee+1}.0.0-0`:Ke&&(j=`>=${ee}.${ue}.0${Ce} <${ee}.${+ue+1}.0-0`),c("xRange return",j),j})},A=(k,M)=>(c("replaceStars",k,M),k.trim().replace(u[p.STAR],"")),v=(k,M)=>(c("replaceGTE0",k,M),k.trim().replace(u[M.includePrerelease?p.GTE0PRE:p.GTE0],"")),O=k=>(M,U,j,G,ee,ue,ye,Ce,He,Ct,Ke,Wt)=>($(j)?U="":$(G)?U=`>=${j}.0.0${k?"-0":""}`:$(ee)?U=`>=${j}.${G}.0${k?"-0":""}`:ue?U=`>=${U}`:U=`>=${U}${k?"-0":""}`,$(He)?Ce="":$(Ct)?Ce=`<${+He+1}.0.0-0`:$(Ke)?Ce=`<${He}.${+Ct+1}.0-0`:Wt?Ce=`<=${He}.${Ct}.${Ke}-${Wt}`:k?Ce=`<${He}.${Ct}.${+Ke+1}-0`:Ce=`<=${Ce}`,`${U} ${Ce}`.trim()),S=(k,M,U)=>{for(let j=0;j<k.length;j++)if(!k[j].test(M))return!1;if(M.prerelease.length&&!U.includePrerelease){for(let j=0;j<k.length;j++)if(c(k[j].semver),k[j].semver!==s.ANY&&k[j].semver.prerelease.length>0){const G=k[j].semver;if(G.major===M.major&&G.minor===M.minor&&G.patch===M.patch)return!0}return!1}return!0};return bu}var ku,ty;function Nl(){if(ty)return ku;ty=1;const n=Symbol("SemVer ANY");class e{static get ANY(){return n}constructor(h,g){if(g=r(g),h instanceof e){if(h.loose===!!g.loose)return h;h=h.value}h=h.trim().split(/\s+/).join(" "),c("comparator",h,g),this.options=g,this.loose=!!g.loose,this.parse(h),this.semver===n?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(h){const g=this.options.loose?o[a.COMPARATORLOOSE]:o[a.COMPARATOR],y=h.match(g);if(!y)throw new TypeError(`Invalid comparator: ${h}`);this.operator=y[1]!==void 0?y[1]:"",this.operator==="="&&(this.operator=""),y[2]?this.semver=new d(y[2],this.options.loose):this.semver=n}toString(){return this.value}test(h){if(c("Comparator.test",h,this.options.loose),this.semver===n||h===n)return!0;if(typeof h=="string")try{h=new d(h,this.options)}catch{return!1}return s(h,this.operator,this.semver,this.options)}intersects(h,g){if(!(h instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new u(h.value,g).test(this.value):h.operator===""?h.value===""?!0:new u(this.value,g).test(h.semver):(g=r(g),g.includePrerelease&&(this.value==="<0.0.0-0"||h.value==="<0.0.0-0")||!g.includePrerelease&&(this.value.startsWith("<0.0.0")||h.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&h.operator.startsWith(">")||this.operator.startsWith("<")&&h.operator.startsWith("<")||this.semver.version===h.semver.version&&this.operator.includes("=")&&h.operator.includes("=")||s(this.semver,"<",h.semver,g)&&this.operator.startsWith(">")&&h.operator.startsWith("<")||s(this.semver,">",h.semver,g)&&this.operator.startsWith("<")&&h.operator.startsWith(">")))}}ku=e;const r=mu,{safeRe:o,t:a}=$i,s=Qg,c=bl,d=Dt,u=Tn();return ku}const cP=Tn();var Bl=(n,e,r)=>{try{e=new cP(e,r)}catch{return!1}return e.test(n)};const dP=Tn();var uP=(n,e)=>new dP(n,e).set.map(r=>r.map(o=>o.value).join(" ").trim().split(" "));const fP=Dt,pP=Tn();var hP=(n,e,r)=>{let o=null,a=null,s=null;try{s=new pP(e,r)}catch{return null}return n.forEach(c=>{s.test(c)&&(!o||a.compare(c)===-1)&&(o=c,a=new fP(o,r))}),o};const mP=Dt,gP=Tn();var yP=(n,e,r)=>{let o=null,a=null,s=null;try{s=new gP(e,r)}catch{return null}return n.forEach(c=>{s.test(c)&&(!o||a.compare(c)===1)&&(o=c,a=new mP(o,r))}),o};const xu=Dt,_P=Tn(),ny=Cl;var wP=(n,e)=>{n=new _P(n,e);let r=new xu("0.0.0");if(n.test(r)||(r=new xu("0.0.0-0"),n.test(r)))return r;r=null;for(let o=0;o<n.set.length;++o){const a=n.set[o];let s=null;a.forEach(c=>{const d=new xu(c.semver.version);switch(c.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!s||ny(d,s))&&(s=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),s&&(!r||ny(r,s))&&(r=s)}return r&&n.test(r)?r:null};const bP=Tn();var kP=(n,e)=>{try{return new bP(n,e).range||"*"}catch{return null}};const xP=Dt,ry=Nl(),{ANY:vP}=ry,CP=Tn(),EP=Bl,oy=Cl,ay=yu,SP=wu,NP=_u;var vu=(n,e,r,o)=>{n=new xP(n,o),e=new CP(e,o);let a,s,c,d,u;switch(r){case">":a=oy,s=SP,c=ay,d=">",u=">=";break;case"<":a=ay,s=NP,c=oy,d="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(EP(n,e,o))return!1;for(let p=0;p<e.set.length;++p){const h=e.set[p];let g=null,y=null;if(h.forEach(w=>{w.semver===vP&&(w=new ry(">=0.0.0")),g=g||w,y=y||w,a(w.semver,g.semver,o)?g=w:c(w.semver,y.semver,o)&&(y=w)}),g.operator===d||g.operator===u||(!y.operator||y.operator===d)&&s(n,y.semver))return!1;if(y.operator===u&&c(n,y.semver))return!1}return!0};const BP=vu;var VP=(n,e,r)=>BP(n,e,">",r);const TP=vu;var AP=(n,e,r)=>TP(n,e,"<",r);const iy=Tn();var $P=(n,e,r)=>(n=new iy(n,r),e=new iy(e,r),n.intersects(e,r));const RP=Bl,OP=Vn;var IP=(n,e,r)=>{const o=[];let a=null,s=null;const c=n.sort((h,g)=>OP(h,g,r));for(const h of c)RP(h,e,r)?(s=h,a||(a=h)):(s&&o.push([a,s]),s=null,a=null);a&&o.push([a,null]);const d=[];for(const[h,g]of o)h===g?d.push(h):!g&&h===c[0]?d.push("*"):g?h===c[0]?d.push(`<=${g}`):d.push(`${h} - ${g}`):d.push(`>=${h}`);const u=d.join(" || "),p=typeof e.raw=="string"?e.raw:String(e);return u.length<p.length?u:e};const sy=Tn(),Cu=Nl(),{ANY:Eu}=Cu,Ri=Bl,Su=Vn,DP=(n,e,r={})=>{if(n===e)return!0;n=new sy(n,r),e=new sy(e,r);let o=!1;e:for(const a of n.set){for(const s of e.set){const c=PP(a,s,r);if(o=o||c!==null,c)continue e}if(o)return!1}return!0},MP=[new Cu(">=0.0.0-0")],ly=[new Cu(">=0.0.0")],PP=(n,e,r)=>{if(n===e)return!0;if(n.length===1&&n[0].semver===Eu){if(e.length===1&&e[0].semver===Eu)return!0;r.includePrerelease?n=MP:n=ly}if(e.length===1&&e[0].semver===Eu){if(r.includePrerelease)return!0;e=ly}const o=new Set;let a,s;for(const w of n)w.operator===">"||w.operator===">="?a=cy(a,w,r):w.operator==="<"||w.operator==="<="?s=dy(s,w,r):o.add(w.semver);if(o.size>1)return null;let c;if(a&&s){if(c=Su(a.semver,s.semver,r),c>0)return null;if(c===0&&(a.operator!==">="||s.operator!=="<="))return null}for(const w of o){if(a&&!Ri(w,String(a),r)||s&&!Ri(w,String(s),r))return null;for(const E of e)if(!Ri(w,String(E),r))return!1;return!0}let d,u,p,h,g=s&&!r.includePrerelease&&s.semver.prerelease.length?s.semver:!1,y=a&&!r.includePrerelease&&a.semver.prerelease.length?a.semver:!1;g&&g.prerelease.length===1&&s.operator==="<"&&g.prerelease[0]===0&&(g=!1);for(const w of e){if(h=h||w.operator===">"||w.operator===">=",p=p||w.operator==="<"||w.operator==="<=",a){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(d=cy(a,w,r),d===w&&d!==a)return!1}else if(a.operator===">="&&!Ri(a.semver,String(w),r))return!1}if(s){if(g&&w.semver.prerelease&&w.semver.prerelease.length&&w.semver.major===g.major&&w.semver.minor===g.minor&&w.semver.patch===g.patch&&(g=!1),w.operator==="<"||w.operator==="<="){if(u=dy(s,w,r),u===w&&u!==s)return!1}else if(s.operator==="<="&&!Ri(s.semver,String(w),r))return!1}if(!w.operator&&(s||a)&&c!==0)return!1}return!(a&&p&&!s&&c!==0||s&&h&&!a&&c!==0||y||g)},cy=(n,e,r)=>{if(!n)return e;const o=Su(n.semver,e.semver,r);return o>0?n:o<0||e.operator===">"&&n.operator===">="?e:n},dy=(n,e,r)=>{if(!n)return e;const o=Su(n.semver,e.semver,r);return o<0?n:o>0||e.operator==="<"&&n.operator==="<="?e:n};var LP=DP;const Nu=$i,uy=wl,FP=Dt,fy=Ug,zP=aa,UP=SM,jP=BM,ZP=VM,WP=TM,HP=$M,qP=OM,GP=DM,KP=PM,XP=Vn,YP=FM,JP=UM,QP=gu,eL=ZM,tL=HM,nL=Cl,rL=yu,oL=Yg,aL=Jg,iL=_u,sL=wu,lL=Qg,cL=sP,dL=Nl(),uL=Tn();var fL={parse:zP,valid:UP,clean:jP,inc:ZP,diff:WP,major:HP,minor:qP,patch:GP,prerelease:KP,compare:XP,rcompare:YP,compareLoose:JP,compareBuild:QP,sort:eL,rsort:tL,gt:nL,lt:rL,eq:oL,neq:aL,gte:iL,lte:sL,cmp:lL,coerce:cL,Comparator:dL,Range:uL,satisfies:Bl,toComparators:uP,maxSatisfying:hP,minSatisfying:yP,minVersion:wP,validRange:kP,outside:vu,gtr:VP,ltr:AP,intersects:$P,simplifyRange:IP,subset:LP,SemVer:FP,re:Nu.re,src:Nu.src,tokens:Nu.t,SEMVER_SPEC_VERSION:uy.SEMVER_SPEC_VERSION,RELEASE_TYPES:uy.RELEASE_TYPES,compareIdentifiers:fy.compareIdentifiers,rcompareIdentifiers:fy.rcompareIdentifiers};const pL=Bc(fL);function hL(n){return vr(n.id)}function mL(n){switch(n){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: ${n}`)}}const gL=["isNotNA","isNA","number_equals","number_notEquals","number_greaterThan","number_greaterThanOrEqualTo","number_lessThan","number_lessThanOrEqualTo","number_between"],yL=["isNotNA","isNA","string_equals","string_notEquals","string_contains","string_doesNotContain","string_matches","string_doesNotMatch","string_containsFuzzyMatch"],_L=["number_equals","number_notEquals","string_equals","string_notEquals"],py=n=>_L.includes(n),wL=n=>py(n.type);function hy(n,e){var r,o;return((o=(r=n.spec.annotations)==null?void 0:r["pl7.app/label"])==null?void 0:o.trim())??"Unlabeled "+n.type+" "+e.toString()}function bL(n){const e=n.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 n.reference;case"number_between":return n.lowerBound;case"string_equals":case"string_notEquals":case"string_contains":case"string_doesNotContain":case"string_matches":case"string_doesNotMatch":case"string_containsFuzzyMatch":return n.reference;default:throw Error(`unsupported filter type: ${e}`)}}function my(n,e){switch(n){case"isNotNA":case"isNA":return{type:n};case"number_equals":case"number_notEquals":case"number_greaterThan":case"number_greaterThanOrEqualTo":case"number_lessThan":case"number_lessThanOrEqualTo":return{type:n,reference:typeof e=="number"?e:0};case"number_between":return{type:n,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:n,reference:typeof e=="string"?e:""};case"string_containsFuzzyMatch":return{type:n,reference:typeof e=="string"?e:"",maxEdits:2,substitutionsOnly:!1,wildcard:void 0};default:throw Error(`unsupported filter type: ${n}`)}}function kL(n,e,r){let o=bL(n.filter);return py(e)&&r!==void 0&&r.length>0&&!ze.find(r,a=>a.value===o)&&(o=r[0].value),{columnId:n.columnId,filter:my(e,o),disabled:n.disabled}}function Bu(n,e){var c,d;const r=Number(e);if(!Number.isFinite(r))throw Error("Model value is not a number.");const o=n.type==="column"?n.spec.valueType:n.spec.type;if((o==="Int"||o==="Long")&&!Number.isInteger(r))throw Error("Model value is not an integer.");const a=(c=n.spec.annotations)==null?void 0:c["pl7.app/min"];if(a!==void 0){const u=Number(a);if(Number.isFinite(u)&&r<Number(a))throw Error("Model value is too low.")}const s=(d=n.spec.annotations)==null?void 0:d["pl7.app/max"];if(s!==void 0){const u=Number(s);if(Number.isFinite(u)&&r>Number(s))throw Error("Model value is too high.")}return r}function gy(n,e){var o,a;const r=((o=n.spec.domain)==null?void 0:o["pl7.app/alphabet"])??((a=n.spec.annotations)==null?void 0:a["pl7.app/alphabet"]);if(r==="nucleotide"&&!/^[AaTtGgCcNn]+$/.test(e))throw Error("Model value is not a nucleotide.");if(r==="aminoacid"&&!/^[AaCcDdEeFfGgHhIiKkLlMmNnPpQqRrSsTtVvWwYyXx*_]+$/.test(e))throw Error("Model value is not an aminoacid.");return e}function xL(n){try{return new RegExp(n),n}catch(e){throw e instanceof SyntaxError?Error("Model value is not a regexp."):e}}function vL(n,e){var a,s;const r=((a=n.spec.domain)==null?void 0:a["pl7.app/alphabet"])??((s=n.spec.annotations)==null?void 0:s["pl7.app/alphabet"]);if(r==="nucleotide")return[{label:"N",value:"N"}];if(r==="aminoacid")return[{label:"X",value:"X"}];const o=ze.uniq(e);return o.sort(),o.map(c=>({label:c,value:c}))}function CL(n){var o;const e=(o=n.spec.annotations)==null?void 0:o["pl7.app/discreteValues"];return e?JSON.parse(e).map(a=>({label:a.toString(),value:a})):[]}function EL(n,e){var a,s;const r=pL.gt(Lo().sdkInfo.sdkVersion,"1.14.0")&&(n.type==="column"?n.spec.valueType:n.spec.type)==="String"&&(((a=n.spec.domain)==null?void 0:a["pl7.app/alphabet"])??((s=n.spec.annotations)==null?void 0:s["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:r?"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:r?"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:r?"StringIContains":"StringContains",substring:e.reference};case"string_doesNotContain":return{operator:"Not",operand:{operator:r?"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:r?"StringIContainsFuzzy":"StringContainsFuzzy",reference:e.reference,maxEdits:e.maxEdits,substitutionsOnly:e.substitutionsOnly,wildcard:e.wildcard};default:throw Error(`unsupported filter type: ${o}`)}}const SL={class:"d-flex flex-column gap-24"},yy=t.defineComponent({__name:"PlTableFilterEntry",props:t.mergeModels({column:{},options:{},disabled:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=t.useModel(n,"modelValue"),r=n,{column:o,options:a}=t.toRefs(r),s=t.computed(()=>CL(o.value));return(c,d)=>(t.openBlock(),t.createElementBlock("div",SL,[t.createVNode(t.unref(Rr),{"model-value":e.value.filter.type,options:t.unref(a),disabled:c.disabled,label:"Predicate","onUpdate:modelValue":d[0]||(d[0]=u=>e.value=t.unref(kL)(e.value,u,s.value))},null,8,["model-value","options","disabled"]),s.value.length>0&&t.unref(wL)(e.value.filter)?(t.openBlock(),t.createBlock(t.unref(Rr),{key:0,modelValue:e.value.filter.reference,"onUpdate:modelValue":d[1]||(d[1]=u=>e.value.filter.reference=u),options:s.value},null,8,["modelValue","options"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[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"?(t.openBlock(),t.createBlock(t.unref(lo),{key:0,modelValue:e.value.filter.reference,"onUpdate:modelValue":d[2]||(d[2]=u=>e.value.filter.reference=u),disabled:c.disabled,parse:u=>t.unref(Bu)(t.unref(o),u),label:"Reference value"},null,8,["modelValue","disabled","parse"])):t.createCommentVNode("",!0),e.value.filter.type==="number_between"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(t.unref(lo),{modelValue:e.value.filter.lowerBound,"onUpdate:modelValue":d[3]||(d[3]=u=>e.value.filter.lowerBound=u),disabled:c.disabled,parse:u=>t.unref(Bu)(t.unref(o),u),label:"Lower bound"},null,8,["modelValue","disabled","parse"]),t.createVNode(t.unref(Rs),{modelValue:e.value.filter.includeLowerBound,"onUpdate:modelValue":d[4]||(d[4]=u=>e.value.filter.includeLowerBound=u),disabled:c.disabled,label:"Include lower bound"},null,8,["modelValue","disabled"]),t.createVNode(t.unref(lo),{modelValue:e.value.filter.upperBound,"onUpdate:modelValue":d[5]||(d[5]=u=>e.value.filter.upperBound=u),disabled:c.disabled,parse:u=>t.unref(Bu)(t.unref(o),u),label:"Upper bound"},null,8,["modelValue","disabled","parse"]),t.createVNode(t.unref(Rs),{modelValue:e.value.filter.includeUpperBound,"onUpdate:modelValue":d[6]||(d[6]=u=>e.value.filter.includeUpperBound=u),disabled:c.disabled,label:"Include upper bound"},null,8,["modelValue","disabled"])],64)):t.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"?(t.openBlock(),t.createBlock(t.unref(lo),{key:2,modelValue:e.value.filter.reference,"onUpdate:modelValue":d[7]||(d[7]=u=>e.value.filter.reference=u),disabled:c.disabled,parse:u=>t.unref(gy)(t.unref(o),u),label:"Reference value"},null,8,["modelValue","disabled","parse"])):t.createCommentVNode("",!0),e.value.filter.type==="string_matches"||e.value.filter.type==="string_doesNotMatch"?(t.openBlock(),t.createBlock(t.unref(lo),{key:3,modelValue:e.value.filter.reference,"onUpdate:modelValue":d[8]||(d[8]=u=>e.value.filter.reference=u),disabled:c.disabled,parse:t.unref(xL),label:"Reference value"},null,8,["modelValue","disabled","parse"])):t.createCommentVNode("",!0),e.value.filter.type==="string_containsFuzzyMatch"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[t.createVNode(t.unref(lo),{modelValue:e.value.filter.reference,"onUpdate:modelValue":d[9]||(d[9]=u=>e.value.filter.reference=u),disabled:c.disabled,parse:u=>t.unref(gy)(t.unref(o),u),label:"Reference value"},null,8,["modelValue","disabled","parse"]),t.createVNode(t.unref(pg),{modelValue:e.value.filter.maxEdits,"onUpdate:modelValue":d[10]||(d[10]=u=>e.value.filter.maxEdits=u),max:5,disabled:c.disabled,breakpoints:"",label:"Maximum nuber of substitutions and indels"},null,8,["modelValue","disabled"]),t.createVNode(t.unref(Rs),{modelValue:e.value.filter.substitutionsOnly,"onUpdate:modelValue":d[11]||(d[11]=u=>e.value.filter.substitutionsOnly=u),disabled:c.disabled,label:"Substitutions only"},null,8,["modelValue","disabled"]),t.createVNode(t.unref(Rr),{modelValue:e.value.filter.wildcard,"onUpdate:modelValue":d[12]||(d[12]=u=>e.value.filter.wildcard=u),disabled:c.disabled,options:t.unref(vL)(t.unref(o),e.value.filter.reference),clearable:"",label:"Wildcard symbol"},null,8,["modelValue","disabled","options"])],64)):t.createCommentVNode("",!0)],64))]))}}),NL={class:"d-flex flex-column gap-24"},BL={key:0,class:"text-subtitle-m",style:{color:"var(--txt-mask)"}},VL=t.defineComponent({__name:"PlTableAddFilter",props:t.mergeModels({columnsById:{},columnOptions:{},filterOptions:{},makeFilter:{type:Function}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:t.mergeModels(["addFilter"],["update:modelValue"]),setup(n,{emit:e}){const r=t.useModel(n,"modelValue"),o=n,{columnsById:a,columnOptions:s,filterOptions:c}=t.toRefs(o),d=e,u=t.ref(),p=t.ref();t.watch(()=>u.value,y=>{y?p.value=o.makeFilter(y):p.value=void 0});const h=()=>{u.value=void 0,r.value=!1},g=()=>{p.value&&(d("addFilter",p.value),h())};return(y,w)=>(t.openBlock(),t.createBlock(t.unref(Qa),{modelValue:r.value,"onUpdate:modelValue":w[2]||(w[2]=E=>r.value=E),"close-on-outside-click":!1},{title:t.withCtx(()=>w[3]||(w[3]=[t.createTextVNode("Add Filter")])),actions:t.withCtx(()=>[t.createVNode(t.unref(Ns),{disabled:!p.value,onClick:g},{default:t.withCtx(()=>w[4]||(w[4]=[t.createTextVNode("Add Filter")])),_:1},8,["disabled"]),t.createVNode(t.unref(Ar),{"justify-center":!1,onClick:h},{default:t.withCtx(()=>w[5]||(w[5]=[t.createTextVNode("Cancel")])),_:1})]),default:t.withCtx(()=>[t.createElementVNode("div",NL,[t.createVNode(t.unref(Rr),{modelValue:u.value,"onUpdate:modelValue":w[0]||(w[0]=E=>u.value=E),options:t.unref(s),label:"Column",placeholder:"Choose..."},null,8,["modelValue","options"]),p.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",BL,"Choose a column to view and adjust its options")),p.value?(t.openBlock(),t.createBlock(yy,{key:1,modelValue:p.value,"onUpdate:modelValue":w[1]||(w[1]=E=>p.value=E),column:t.unref(a)[p.value.columnId],options:t.unref(c)[p.value.columnId]},null,8,["modelValue","column","options"])):t.createCommentVNode("",!0)])]),_:1},8,["modelValue"]))}}),TL=["onClick"],AL={class:"pl-filter-manager__expand-icon"},$L={class:"pl-filter-manager__title flex-grow-1 text-s-btn"},RL={class:"pl-filter-manager__actions d-flex gap-12"},OL=["onClick"],IL=["onClick"],DL={class:"pl-filter-manager__content d-flex gap-24 p-24 flex-column"},ML={class:"d-flex justify-center"},PL=["onClick"],LL={class:"pl-filter-manager__add-btn-icon"},FL={key:0},zL=t.defineComponent({__name:"PlTableFilters",props:t.mergeModels({columns:{},restrictions:{},defaults:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=t.useModel(n,"modelValue"),r=n,{columns:o,restrictions:a,defaults:s}=t.toRefs(r),c=t.computed(()=>{const v=o.value.filter(S=>{const k=S.type;switch(k){case"axis":return S.spec.type!=="Bytes";case"column":return S.spec.valueType!=="Bytes";default:throw Error(`unsupported data type: ${k}`)}}),O={};for(const S of v)O[hL(S)]=S;return O}),d=t.computed(()=>{const v=a.value??[],O={};for(const[S,k]of Object.entries(c.value)){const M=ze.find(v,U=>ze.isEqual(U.column.id,k.id));M&&(O[S]=M.allowedFilterTypes)}return O}),u=t.computed(()=>{const v=s.value??[],O={};for(const[S,k]of Object.entries(c.value)){const M=ze.find(v,U=>ze.isEqual(U.column.id,k.id));M&&(O[S]={columnId:S,filter:M.default,disabled:!1})}return O});(()=>{const v=e.value.state;typeof v=="object"&&!Array.isArray(v)&&(e.value.state=Object.entries(v).map(([O,S])=>({columnId:O,filter:S,disabled:!1})))})();const p=v=>v??Object.values(u.value),h=t.reactive({state:p(e.value.state)});t.watch(()=>e.value,v=>{ze.isEqual(h.state,v.state)||(h.state=p(v.state))}),t.watch(()=>h,v=>{ze.isEqual(v.state,e.value.state)||(e.value={state:ze.cloneDeep(v.state),filters:v.state.filter(O=>!O.disabled).map(O=>{const S=c.value[O.columnId],{spec:k,...M}=S;return{type:"bySingleColumnV2",column:M,predicate:EL(S,O.filter)}})})},{immediate:!0,deep:!0}),t.watch(()=>c.value,v=>{Object.keys(v).length===0&&h.state!==void 0||(h.state=h.state.filter(O=>!!v[O.columnId]))},{immediate:!0});const g=t.computed(()=>Object.keys(c).length>0&&h.state.length>0),y=t.computed(()=>{const v=d.value,O={};for(const[S,k]of Object.entries(c.value)){let U=(k.type==="column"?k.spec.valueType:k.spec.type)==="String"?yL:gL;const j=v[S];j&&(U=U.filter(G=>j.includes(G))),O[S]=U.map(G=>({value:G,text:mL(G)}))}return O}),w=t.computed(()=>ze.some(Object.values(y.value),v=>v.length>0)),E=t.computed(()=>Object.entries(Object.entries(c.value)).filter(([v,[O,S]])=>y.value[O].length>0).filter(([v,[O,S]])=>!h.state.some(k=>k.columnId===O)).map(([v,[O,S]])=>({label:hy(S,v),value:O}))),N=v=>u.value[v]??{columnId:v,filter:my(y.value[v][0].value),disabled:!1},V=v=>{h.state[v]=N(h.state[v].columnId)},D=v=>h.state.splice(v,1),F=t.ref(!1),$=t.ref(!1),W=t.ref(!1);t.onMounted(()=>{W.value=!0});const R=t.reactive({}),B=v=>{R[v]?delete R[v]:R[v]=!0},z=t.ref(!1),q=t.ref();let C;t.onMounted(()=>{C=new ResizeObserver(()=>{var O;const v=(O=q.value)==null?void 0:O.parentElement;v&&(z.value=v.scrollHeight>v.clientHeight||v.scrollWidth>v.clientWidth)}),q.value&&q.value.parentElement&&C.observe(q.value.parentElement)}),t.watch(q,(v,O)=>{O!=null&&O.parentElement&&C.unobserve(O.parentElement),v!=null&&v.parentElement&&C.observe(v.parentElement)}),t.onBeforeUnmount(()=>{C!==void 0&&C.disconnect()});const A=lu();return(v,O)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[W.value&&t.unref(A)?(t.openBlock(),t.createBlock(t.Teleport,{key:0,to:t.unref(A)},[t.createVNode(t.unref(Ar),{onClick:O[0]||(O[0]=t.withModifiers(S=>F.value=!0,["stop"]))},{append:t.withCtx(()=>[t.createVNode(t.unref(Ja),{name:g.value?"filter-on":"filter"},null,8,["name"])]),default:t.withCtx(()=>[O[5]||(O[5]=t.createTextVNode(" Filters "))]),_:1})],8,["to"])):t.createCommentVNode("",!0),t.createVNode(t.unref(Qa),{modelValue:F.value,"onUpdate:modelValue":O[2]||(O[2]=S=>F.value=S),"close-on-outside-click":!1},{title:t.withCtx(()=>O[6]||(O[6]=[t.createTextVNode("Manage Filters")])),default:t.withCtx(()=>[t.createElementVNode("div",{ref_key:"filterManager",ref:q,class:"pl-filter-manager d-flex flex-column gap-6"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(h.state,(S,k)=>(t.openBlock(),t.createElementBlock("div",{key:S.columnId,class:t.normalizeClass([{open:R[S.columnId],disabled:S.disabled},"pl-filter-manager__filter"])},[t.createElementVNode("div",{class:"pl-filter-manager__header d-flex align-center gap-8",onClick:M=>B(S.columnId)},[t.createElementVNode("div",AL,[t.createVNode(t.unref(Yt),{name:"chevron-right"})]),t.createElementVNode("div",$L,t.toDisplayString(t.unref(hy)(c.value[S.columnId],k)),1),t.createElementVNode("div",RL,[t.createElementVNode("div",{class:"pl-filter-manager__toggle",onClick:t.withModifiers(M=>S.disabled=!S.disabled,["stop"])},[t.createVNode(t.unref(at),{name:S.disabled?"view-hide":"view-show"},null,8,["name"])],8,OL),t.createElementVNode("div",{class:"pl-filter-manager__delete",onClick:t.withModifiers(M=>D(k),["stop"])},[t.createVNode(t.unref(at),{name:"close"})],8,IL)])],8,TL),t.createElementVNode("div",DL,[t.createVNode(yy,{modelValue:h.state[k],"onUpdate:modelValue":M=>h.state[k]=M,disabled:S.disabled,column:c.value[S.columnId],options:y.value[S.columnId]},null,8,["modelValue","onUpdate:modelValue","disabled","column","options"]),t.createElementVNode("div",ML,[t.createElementVNode("div",{class:t.normalizeClass([{disabled:S.disabled},"pl-filter-manager__revert-btn text-s-btn d-flex align-center gap-8"]),onClick:M=>V(k)},[O[7]||(O[7]=t.createTextVNode(" Revert Settings to Default ")),t.createVNode(t.unref(at),{name:"reverse"})],10,PL)])])],2))),128)),t.createElementVNode("div",{class:t.normalizeClass([{"pt-24":z.value},"pl-filter-manager__add-action-wrapper"])},[E.value.length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"pl-filter-manager__add-btn",onClick:O[1]||(O[1]=S=>$.value=!0)},[t.createElementVNode("div",LL,[t.createVNode(t.unref(Yt),{name:"add"})]),O[8]||(O[8]=t.createElementVNode("div",{class:"pl-filter-manager__add-btn-title text-s-btn"},"Add Filter",-1))])):t.createCommentVNode("",!0)],2),w.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",FL,"No filters applicable"))],512)]),_:1},8,["modelValue"]),t.createVNode(VL,{modelValue:$.value,"onUpdate:modelValue":O[3]||(O[3]=S=>$.value=S),"columns-by-id":c.value,"column-options":E.value,"filter-options":y.value,"make-filter":N,onAddFilter:O[4]||(O[4]=S=>h.state.push(S))},null,8,["modelValue","columns-by-id","column-options","filter-options"])],64))}}),Vl=new Map;function UL(n,e){const r=t.getCurrentScope()??t.effectScope(),o=r.run(()=>(t.onScopeDispose(()=>{Vl.delete(n)}),t.reactive(e())));return o[Symbol.dispose]=()=>{r.stop()},o}function jL(n){const e=Symbol();return()=>(Vl.has(e)||Vl.set(e,UL(e,n)),Vl.get(e))}function ZL(n){return t.computed(()=>{try{return Ep(n())}catch(e){return{errors:[Ha(e)],value:void 0}}})}const ia=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,_y=new Set,Vu=typeof process=="object"&&process?process:{},wy=(n,e,r,o)=>{typeof Vu.emitWarning=="function"?Vu.emitWarning(n,e,r,o):console.error(`[${r}] ${e}: ${n}`)};let Tl=globalThis.AbortController,by=globalThis.AbortSignal;if(typeof Tl>"u"){by=class{constructor(){We(this,"onabort");We(this,"_onabort",[]);We(this,"reason");We(this,"aborted",!1)}addEventListener(o,a){this._onabort.push(a)}},Tl=class{constructor(){We(this,"signal",new by);e()}abort(o){var a,s;if(!this.signal.aborted){this.signal.reason=o,this.signal.aborted=!0;for(const c of this.signal._onabort)c(o);(s=(a=this.signal).onabort)==null||s.call(a,o)}}};let n=((xy=Vu.env)==null?void 0:xy.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{n&&(n=!1,wy("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 WL=n=>!_y.has(n),jr=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),ky=n=>jr(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?Al:null:null;class Al extends Array{constructor(e){super(e),this.fill(0)}}const _o=class _o{constructor(e,r){We(this,"heap");We(this,"length");if(!T(_o,sa))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}static create(e){const r=ky(e);if(!r)return[];ge(_o,sa,!0);const o=new _o(e,r);return ge(_o,sa,!1),o}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};sa=new WeakMap,Le(_o,sa,!1);let Tu=_o;const Ru=class Ru{constructor(e){Le(this,re);Le(this,An);Le(this,en);Le(this,$n);Le(this,wo);Le(this,Rn);Le(this,la);Le(this,ca);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");Le(this,yt);Le(this,On);Le(this,gt);Le(this,Qe);Le(this,Se);Le(this,Mt);Le(this,tn);Le(this,Tt);Le(this,bt);Le(this,In);Le(this,kt);Le(this,Dn);Le(this,Mn);Le(this,nn);Le(this,Pn);Le(this,Zr);Le(this,Pt);Le(this,da);Le(this,bo,()=>{});Le(this,fr,()=>{});Le(this,Oi,()=>{});Le(this,rn,()=>!1);Le(this,ko,e=>{});Le(this,ua,(e,r,o)=>{});Le(this,Ii,(e,r,o,a)=>{if(o||a)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});We(this,vy,"LRUCache");const{max:r=0,ttl:o,ttlResolution:a=1,ttlAutopurge:s,updateAgeOnGet:c,updateAgeOnHas:d,allowStale:u,dispose:p,onInsert:h,disposeAfter:g,noDisposeOnSet:y,noUpdateTTL:w,maxSize:E=0,maxEntrySize:N=0,sizeCalculation:V,fetchMethod:D,memoMethod:F,noDeleteOnFetchRejection:$,noDeleteOnStaleGet:W,allowStaleOnFetchRejection:R,allowStaleOnFetchAbort:B,ignoreFetchAbort:z}=e;if(r!==0&&!jr(r))throw new TypeError("max option must be a nonnegative integer");const q=r?ky(r):Array;if(!q)throw new Error("invalid max value: "+r);if(ge(this,An,r),ge(this,en,E),this.maxEntrySize=N||T(this,en),this.sizeCalculation=V,this.sizeCalculation){if(!T(this,en)&&!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(F!==void 0&&typeof F!="function")throw new TypeError("memoMethod must be a function if defined");if(ge(this,ca,F),D!==void 0&&typeof D!="function")throw new TypeError("fetchMethod must be a function if specified");if(ge(this,la,D),ge(this,Zr,!!D),ge(this,gt,new Map),ge(this,Qe,new Array(r).fill(void 0)),ge(this,Se,new Array(r).fill(void 0)),ge(this,Mt,new q(r)),ge(this,tn,new q(r)),ge(this,Tt,0),ge(this,bt,0),ge(this,In,Tu.create(r)),ge(this,yt,0),ge(this,On,0),typeof p=="function"&&ge(this,$n,p),typeof h=="function"&&ge(this,wo,h),typeof g=="function"?(ge(this,Rn,g),ge(this,kt,[])):(ge(this,Rn,void 0),ge(this,kt,void 0)),ge(this,Pn,!!T(this,$n)),ge(this,da,!!T(this,wo)),ge(this,Pt,!!T(this,Rn)),this.noDisposeOnSet=!!y,this.noUpdateTTL=!!w,this.noDeleteOnFetchRejection=!!$,this.allowStaleOnFetchRejection=!!R,this.allowStaleOnFetchAbort=!!B,this.ignoreFetchAbort=!!z,this.maxEntrySize!==0){if(T(this,en)!==0&&!jr(T(this,en)))throw new TypeError("maxSize must be a positive integer if specified");if(!jr(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");de(this,re,rw).call(this)}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!W,this.updateAgeOnGet=!!c,this.updateAgeOnHas=!!d,this.ttlResolution=jr(a)||a===0?a:1,this.ttlAutopurge=!!s,this.ttl=o||0,this.ttl){if(!jr(this.ttl))throw new TypeError("ttl must be a positive integer if specified");de(this,re,rp).call(this)}if(T(this,An)===0&&this.ttl===0&&T(this,en)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!T(this,An)&&!T(this,en)){const C="LRU_CACHE_UNBOUNDED";WL(C)&&(_y.add(C),wy("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",C,Ru))}}static unsafeExposeInternals(e){return{starts:T(e,Mn),ttls:T(e,nn),sizes:T(e,Dn),keyMap:T(e,gt),keyList:T(e,Qe),valList:T(e,Se),next:T(e,Mt),prev:T(e,tn),get head(){return T(e,Tt)},get tail(){return T(e,bt)},free:T(e,In),isBackgroundFetch:r=>{var o;return de(o=e,re,tt).call(o,r)},backgroundFetch:(r,o,a,s)=>{var c;return de(c=e,re,Ec).call(c,r,o,a,s)},moveToTail:r=>{var o;return de(o=e,re,os).call(o,r)},indexes:r=>{var o;return de(o=e,re,eo).call(o,r)},rindexes:r=>{var o;return de(o=e,re,to).call(o,r)},isStale:r=>{var o;return T(o=e,rn).call(o,r)}}}get max(){return T(this,An)}get maxSize(){return T(this,en)}get calculatedSize(){return T(this,On)}get size(){return T(this,yt)}get fetchMethod(){return T(this,la)}get memoMethod(){return T(this,ca)}get dispose(){return T(this,$n)}get onInsert(){return T(this,wo)}get disposeAfter(){return T(this,Rn)}getRemainingTTL(e){return T(this,gt).has(e)?1/0:0}*entries(){for(const e of de(this,re,eo).call(this))T(this,Se)[e]!==void 0&&T(this,Qe)[e]!==void 0&&!de(this,re,tt).call(this,T(this,Se)[e])&&(yield[T(this,Qe)[e],T(this,Se)[e]])}*rentries(){for(const e of de(this,re,to).call(this))T(this,Se)[e]!==void 0&&T(this,Qe)[e]!==void 0&&!de(this,re,tt).call(this,T(this,Se)[e])&&(yield[T(this,Qe)[e],T(this,Se)[e]])}*keys(){for(const e of de(this,re,eo).call(this)){const r=T(this,Qe)[e];r!==void 0&&!de(this,re,tt).call(this,T(this,Se)[e])&&(yield r)}}*rkeys(){for(const e of de(this,re,to).call(this)){const r=T(this,Qe)[e];r!==void 0&&!de(this,re,tt).call(this,T(this,Se)[e])&&(yield r)}}*values(){for(const e of de(this,re,eo).call(this))T(this,Se)[e]!==void 0&&!de(this,re,tt).call(this,T(this,Se)[e])&&(yield T(this,Se)[e])}*rvalues(){for(const e of de(this,re,to).call(this))T(this,Se)[e]!==void 0&&!de(this,re,tt).call(this,T(this,Se)[e])&&(yield T(this,Se)[e])}[(Cy=Symbol.iterator,vy=Symbol.toStringTag,Cy)](){return this.entries()}find(e,r={}){for(const o of de(this,re,eo).call(this)){const a=T(this,Se)[o],s=de(this,re,tt).call(this,a)?a.__staleWhileFetching:a;if(s!==void 0&&e(s,T(this,Qe)[o],this))return this.get(T(this,Qe)[o],r)}}forEach(e,r=this){for(const o of de(this,re,eo).call(this)){const a=T(this,Se)[o],s=de(this,re,tt).call(this,a)?a.__staleWhileFetching:a;s!==void 0&&e.call(r,s,T(this,Qe)[o],this)}}rforEach(e,r=this){for(const o of de(this,re,to).call(this)){const a=T(this,Se)[o],s=de(this,re,tt).call(this,a)?a.__staleWhileFetching:a;s!==void 0&&e.call(r,s,T(this,Qe)[o],this)}}purgeStale(){let e=!1;for(const r of de(this,re,to).call(this,{allowStale:!0}))T(this,rn).call(this,r)&&(de(this,re,no).call(this,T(this,Qe)[r],"expire"),e=!0);return e}info(e){const r=T(this,gt).get(e);if(r===void 0)return;const o=T(this,Se)[r],a=de(this,re,tt).call(this,o)?o.__staleWhileFetching:o;if(a===void 0)return;const s={value:a};if(T(this,nn)&&T(this,Mn)){const c=T(this,nn)[r],d=T(this,Mn)[r];if(c&&d){const u=c-(ia.now()-d);s.ttl=u,s.start=Date.now()}}return T(this,Dn)&&(s.size=T(this,Dn)[r]),s}dump(){const e=[];for(const r of de(this,re,eo).call(this,{allowStale:!0})){const o=T(this,Qe)[r],a=T(this,Se)[r],s=de(this,re,tt).call(this,a)?a.__staleWhileFetching:a;if(s===void 0||o===void 0)continue;const c={value:s};if(T(this,nn)&&T(this,Mn)){c.ttl=T(this,nn)[r];const d=ia.now()-T(this,Mn)[r];c.start=Math.floor(Date.now()-d)}T(this,Dn)&&(c.size=T(this,Dn)[r]),e.unshift([o,c])}return e}load(e){this.clear();for(const[r,o]of e){if(o.start){const a=Date.now()-o.start;o.start=ia.now()-a}this.set(r,o.value,o)}}set(e,r,o={}){var y,w,E,N,V,D,F;if(r===void 0)return this.delete(e),this;const{ttl:a=this.ttl,start:s,noDisposeOnSet:c=this.noDisposeOnSet,sizeCalculation:d=this.sizeCalculation,status:u}=o;let{noUpdateTTL:p=this.noUpdateTTL}=o;const h=T(this,Ii).call(this,e,r,o.size||0,d);if(this.maxEntrySize&&h>this.maxEntrySize)return u&&(u.set="miss",u.maxEntrySizeExceeded=!0),de(this,re,no).call(this,e,"set"),this;let g=T(this,yt)===0?void 0:T(this,gt).get(e);if(g===void 0)g=T(this,yt)===0?T(this,bt):T(this,In).length!==0?T(this,In).pop():T(this,yt)===T(this,An)?de(this,re,Cc).call(this,!1):T(this,yt),T(this,Qe)[g]=e,T(this,Se)[g]=r,T(this,gt).set(e,g),T(this,Mt)[T(this,bt)]=g,T(this,tn)[g]=T(this,bt),ge(this,bt,g),vc(this,yt)._++,T(this,ua).call(this,g,h,u),u&&(u.set="add"),p=!1,T(this,da)&&((y=T(this,wo))==null||y.call(this,r,e,"add"));else{de(this,re,os).call(this,g);const $=T(this,Se)[g];if(r!==$){if(T(this,Zr)&&de(this,re,tt).call(this,$)){$.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:W}=$;W!==void 0&&!c&&(T(this,Pn)&&((w=T(this,$n))==null||w.call(this,W,e,"set")),T(this,Pt)&&((E=T(this,kt))==null||E.push([W,e,"set"])))}else c||(T(this,Pn)&&((N=T(this,$n))==null||N.call(this,$,e,"set")),T(this,Pt)&&((V=T(this,kt))==null||V.push([$,e,"set"])));if(T(this,ko).call(this,g),T(this,ua).call(this,g,h,u),T(this,Se)[g]=r,u){u.set="replace";const W=$&&de(this,re,tt).call(this,$)?$.__staleWhileFetching:$;W!==void 0&&(u.oldValue=W)}}else u&&(u.set="update");T(this,da)&&((D=this.onInsert)==null||D.call(this,r,e,r===$?"update":"replace"))}if(a!==0&&!T(this,nn)&&de(this,re,rp).call(this),T(this,nn)&&(p||T(this,Oi).call(this,g,a,s),u&&T(this,fr).call(this,u,g)),!c&&T(this,Pt)&&T(this,kt)){const $=T(this,kt);let W;for(;W=$==null?void 0:$.shift();)(F=T(this,Rn))==null||F.call(this,...W)}return this}pop(){var e;try{for(;T(this,yt);){const r=T(this,Se)[T(this,Tt)];if(de(this,re,Cc).call(this,!0),de(this,re,tt).call(this,r)){if(r.__staleWhileFetching)return r.__staleWhileFetching}else if(r!==void 0)return r}}finally{if(T(this,Pt)&&T(this,kt)){const r=T(this,kt);let o;for(;o=r==null?void 0:r.shift();)(e=T(this,Rn))==null||e.call(this,...o)}}}has(e,r={}){const{updateAgeOnHas:o=this.updateAgeOnHas,status:a}=r,s=T(this,gt).get(e);if(s!==void 0){const c=T(this,Se)[s];if(de(this,re,tt).call(this,c)&&c.__staleWhileFetching===void 0)return!1;if(T(this,rn).call(this,s))a&&(a.has="stale",T(this,fr).call(this,a,s));else return o&&T(this,bo).call(this,s),a&&(a.has="hit",T(this,fr).call(this,a,s)),!0}else a&&(a.has="miss");return!1}peek(e,r={}){const{allowStale:o=this.allowStale}=r,a=T(this,gt).get(e);if(a===void 0||!o&&T(this,rn).call(this,a))return;const s=T(this,Se)[a];return de(this,re,tt).call(this,s)?s.__staleWhileFetching:s}async fetch(e,r={}){const{allowStale:o=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:c=this.ttl,noDisposeOnSet:d=this.noDisposeOnSet,size:u=0,sizeCalculation:p=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:g=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:y=this.allowStaleOnFetchRejection,ignoreFetchAbort:w=this.ignoreFetchAbort,allowStaleOnFetchAbort:E=this.allowStaleOnFetchAbort,context:N,forceRefresh:V=!1,status:D,signal:F}=r;if(!T(this,Zr))return D&&(D.fetch="get"),this.get(e,{allowStale:o,updateAgeOnGet:a,noDeleteOnStaleGet:s,status:D});const $={allowStale:o,updateAgeOnGet:a,noDeleteOnStaleGet:s,ttl:c,noDisposeOnSet:d,size:u,sizeCalculation:p,noUpdateTTL:h,noDeleteOnFetchRejection:g,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:E,ignoreFetchAbort:w,status:D,signal:F};let W=T(this,gt).get(e);if(W===void 0){D&&(D.fetch="miss");const R=de(this,re,Ec).call(this,e,W,$,N);return R.__returned=R}else{const R=T(this,Se)[W];if(de(this,re,tt).call(this,R)){const A=o&&R.__staleWhileFetching!==void 0;return D&&(D.fetch="inflight",A&&(D.returnedStale=!0)),A?R.__staleWhileFetching:R.__returned=R}const B=T(this,rn).call(this,W);if(!V&&!B)return D&&(D.fetch="hit"),de(this,re,os).call(this,W),a&&T(this,bo).call(this,W),D&&T(this,fr).call(this,D,W),R;const z=de(this,re,Ec).call(this,e,W,$,N),C=z.__staleWhileFetching!==void 0&&o;return D&&(D.fetch=B?"stale":"refresh",C&&B&&(D.returnedStale=!0)),C?z.__staleWhileFetching:z.__returned=z}}async forceFetch(e,r={}){const o=await this.fetch(e,r);if(o===void 0)throw new Error("fetch() returned undefined");return o}memo(e,r={}){const o=T(this,ca);if(!o)throw new Error("no memoMethod provided to constructor");const{context:a,forceRefresh:s,...c}=r,d=this.get(e,c);if(!s&&d!==void 0)return d;const u=o(e,d,{options:c,context:a});return this.set(e,u,c),u}get(e,r={}){const{allowStale:o=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:c}=r,d=T(this,gt).get(e);if(d!==void 0){const u=T(this,Se)[d],p=de(this,re,tt).call(this,u);return c&&T(this,fr).call(this,c,d),T(this,rn).call(this,d)?(c&&(c.get="stale"),p?(c&&o&&u.__staleWhileFetching!==void 0&&(c.returnedStale=!0),o?u.__staleWhileFetching:void 0):(s||de(this,re,no).call(this,e,"expire"),c&&o&&(c.returnedStale=!0),o?u:void 0)):(c&&(c.get="hit"),p?u.__staleWhileFetching:(de(this,re,os).call(this,d),a&&T(this,bo).call(this,d),u))}else c&&(c.get="miss")}delete(e){return de(this,re,no).call(this,e,"delete")}clear(){return de(this,re,ip).call(this,"delete")}};An=new WeakMap,en=new WeakMap,$n=new WeakMap,wo=new WeakMap,Rn=new WeakMap,la=new WeakMap,ca=new WeakMap,yt=new WeakMap,On=new WeakMap,gt=new WeakMap,Qe=new WeakMap,Se=new WeakMap,Mt=new WeakMap,tn=new WeakMap,Tt=new WeakMap,bt=new WeakMap,In=new WeakMap,kt=new WeakMap,Dn=new WeakMap,Mn=new WeakMap,nn=new WeakMap,Pn=new WeakMap,Zr=new WeakMap,Pt=new WeakMap,da=new WeakMap,re=new WeakSet,rp=function(){const e=new Al(T(this,An)),r=new Al(T(this,An));ge(this,nn,e),ge(this,Mn,r),ge(this,Oi,(s,c,d=ia.now())=>{if(r[s]=c!==0?d:0,e[s]=c,c!==0&&this.ttlAutopurge){const u=setTimeout(()=>{T(this,rn).call(this,s)&&de(this,re,no).call(this,T(this,Qe)[s],"expire")},c+1);u.unref&&u.unref()}}),ge(this,bo,s=>{r[s]=e[s]!==0?ia.now():0}),ge(this,fr,(s,c)=>{if(e[c]){const d=e[c],u=r[c];if(!d||!u)return;s.ttl=d,s.start=u,s.now=o||a();const p=s.now-u;s.remainingTTL=d-p}});let o=0;const a=()=>{const s=ia.now();if(this.ttlResolution>0){o=s;const c=setTimeout(()=>o=0,this.ttlResolution);c.unref&&c.unref()}return s};this.getRemainingTTL=s=>{const c=T(this,gt).get(s);if(c===void 0)return 0;const d=e[c],u=r[c];if(!d||!u)return 1/0;const p=(o||a())-u;return d-p},ge(this,rn,s=>{const c=r[s],d=e[s];return!!d&&!!c&&(o||a())-c>d})},bo=new WeakMap,fr=new WeakMap,Oi=new WeakMap,rn=new WeakMap,rw=function(){const e=new Al(T(this,An));ge(this,On,0),ge(this,Dn,e),ge(this,ko,r=>{ge(this,On,T(this,On)-e[r]),e[r]=0}),ge(this,Ii,(r,o,a,s)=>{if(de(this,re,tt).call(this,o))return 0;if(!jr(a))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(a=s(o,r),!jr(a))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 a}),ge(this,ua,(r,o,a)=>{if(e[r]=o,T(this,en)){const s=T(this,en)-e[r];for(;T(this,On)>s;)de(this,re,Cc).call(this,!0)}ge(this,On,T(this,On)+e[r]),a&&(a.entrySize=o,a.totalCalculatedSize=T(this,On))})},ko=new WeakMap,ua=new WeakMap,Ii=new WeakMap,eo=function*({allowStale:e=this.allowStale}={}){if(T(this,yt))for(let r=T(this,bt);!(!de(this,re,op).call(this,r)||((e||!T(this,rn).call(this,r))&&(yield r),r===T(this,Tt)));)r=T(this,tn)[r]},to=function*({allowStale:e=this.allowStale}={}){if(T(this,yt))for(let r=T(this,Tt);!(!de(this,re,op).call(this,r)||((e||!T(this,rn).call(this,r))&&(yield r),r===T(this,bt)));)r=T(this,Mt)[r]},op=function(e){return e!==void 0&&T(this,gt).get(T(this,Qe)[e])===e},Cc=function(e){var s,c;const r=T(this,Tt),o=T(this,Qe)[r],a=T(this,Se)[r];return T(this,Zr)&&de(this,re,tt).call(this,a)?a.__abortController.abort(new Error("evicted")):(T(this,Pn)||T(this,Pt))&&(T(this,Pn)&&((s=T(this,$n))==null||s.call(this,a,o,"evict")),T(this,Pt)&&((c=T(this,kt))==null||c.push([a,o,"evict"]))),T(this,ko).call(this,r),e&&(T(this,Qe)[r]=void 0,T(this,Se)[r]=void 0,T(this,In).push(r)),T(this,yt)===1?(ge(this,Tt,ge(this,bt,0)),T(this,In).length=0):ge(this,Tt,T(this,Mt)[r]),T(this,gt).delete(o),vc(this,yt)._--,r},Ec=function(e,r,o,a){const s=r===void 0?void 0:T(this,Se)[r];if(de(this,re,tt).call(this,s))return s;const c=new Tl,{signal:d}=o;d==null||d.addEventListener("abort",()=>c.abort(d.reason),{signal:c.signal});const u={signal:c.signal,options:o,context:a},p=(N,V=!1)=>{const{aborted:D}=c.signal,F=o.ignoreFetchAbort&&N!==void 0;if(o.status&&(D&&!V?(o.status.fetchAborted=!0,o.status.fetchError=c.signal.reason,F&&(o.status.fetchAbortIgnored=!0)):o.status.fetchResolved=!0),D&&!F&&!V)return g(c.signal.reason);const $=w;return T(this,Se)[r]===w&&(N===void 0?$.__staleWhileFetching?T(this,Se)[r]=$.__staleWhileFetching:de(this,re,no).call(this,e,"fetch"):(o.status&&(o.status.fetchUpdated=!0),this.set(e,N,u.options))),N},h=N=>(o.status&&(o.status.fetchRejected=!0,o.status.fetchError=N),g(N)),g=N=>{const{aborted:V}=c.signal,D=V&&o.allowStaleOnFetchAbort,F=D||o.allowStaleOnFetchRejection,$=F||o.noDeleteOnFetchRejection,W=w;if(T(this,Se)[r]===w&&(!$||W.__staleWhileFetching===void 0?de(this,re,no).call(this,e,"fetch"):D||(T(this,Se)[r]=W.__staleWhileFetching)),F)return o.status&&W.__staleWhileFetching!==void 0&&(o.status.returnedStale=!0),W.__staleWhileFetching;if(W.__returned===W)throw N},y=(N,V)=>{var F;const D=(F=T(this,la))==null?void 0:F.call(this,e,s,u);D&&D instanceof Promise&&D.then($=>N($===void 0?void 0:$),V),c.signal.addEventListener("abort",()=>{(!o.ignoreFetchAbort||o.allowStaleOnFetchAbort)&&(N(void 0),o.allowStaleOnFetchAbort&&(N=$=>p($,!0)))})};o.status&&(o.status.fetchDispatched=!0);const w=new Promise(y).then(p,h),E=Object.assign(w,{__abortController:c,__staleWhileFetching:s,__returned:void 0});return r===void 0?(this.set(e,E,{...u.options,status:void 0}),r=T(this,gt).get(e)):T(this,Se)[r]=E,E},tt=function(e){if(!T(this,Zr))return!1;const r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof Tl},ap=function(e,r){T(this,tn)[r]=e,T(this,Mt)[e]=r},os=function(e){e!==T(this,bt)&&(e===T(this,Tt)?ge(this,Tt,T(this,Mt)[e]):de(this,re,ap).call(this,T(this,tn)[e],T(this,Mt)[e]),de(this,re,ap).call(this,T(this,bt),e),ge(this,bt,e))},no=function(e,r){var a,s,c,d;let o=!1;if(T(this,yt)!==0){const u=T(this,gt).get(e);if(u!==void 0)if(o=!0,T(this,yt)===1)de(this,re,ip).call(this,r);else{T(this,ko).call(this,u);const p=T(this,Se)[u];if(de(this,re,tt).call(this,p)?p.__abortController.abort(new Error("deleted")):(T(this,Pn)||T(this,Pt))&&(T(this,Pn)&&((a=T(this,$n))==null||a.call(this,p,e,r)),T(this,Pt)&&((s=T(this,kt))==null||s.push([p,e,r]))),T(this,gt).delete(e),T(this,Qe)[u]=void 0,T(this,Se)[u]=void 0,u===T(this,bt))ge(this,bt,T(this,tn)[u]);else if(u===T(this,Tt))ge(this,Tt,T(this,Mt)[u]);else{const h=T(this,tn)[u];T(this,Mt)[h]=T(this,Mt)[u];const g=T(this,Mt)[u];T(this,tn)[g]=T(this,tn)[u]}vc(this,yt)._--,T(this,In).push(u)}}if(T(this,Pt)&&((c=T(this,kt))!=null&&c.length)){const u=T(this,kt);let p;for(;p=u==null?void 0:u.shift();)(d=T(this,Rn))==null||d.call(this,...p)}return o},ip=function(e){var r,o,a;for(const s of de(this,re,to).call(this,{allowStale:!0})){const c=T(this,Se)[s];if(de(this,re,tt).call(this,c))c.__abortController.abort(new Error("deleted"));else{const d=T(this,Qe)[s];T(this,Pn)&&((r=T(this,$n))==null||r.call(this,c,d,e)),T(this,Pt)&&((o=T(this,kt))==null||o.push([c,d,e]))}}if(T(this,gt).clear(),T(this,Se).fill(void 0),T(this,Qe).fill(void 0),T(this,nn)&&T(this,Mn)&&(T(this,nn).fill(0),T(this,Mn).fill(0)),T(this,Dn)&&T(this,Dn).fill(0),ge(this,Tt,0),ge(this,bt,0),T(this,In).length=0,ge(this,On,0),ge(this,yt,0),T(this,Pt)&&T(this,kt)){const s=T(this,kt);let c;for(;c=s==null?void 0:s.shift();)(a=T(this,Rn))==null||a.call(this,...c)}};let Au=Ru;const HL={cacheSize:15e6};class qL{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 xo=class xo{constructor(e){We(this,"fileDataCache");We(this,"fileDataRefs",new Map);const r={...HL,...e??{}};this.fileDataCache=new Au({maxSize:r.cacheSize,fetchMethod:async o=>new qL(await Lo().blobDriver.getContent(o)),sizeCalculation:o=>o.bytes.length,dispose:(o,a)=>{this.fileDataRefs.delete(a)}})}getDataRef(e){const r=this.fileDataRefs.get(e);if(r!==void 0)return r;const o=t.shallowRef();return this.fileDataRefs.set(e,o),(async()=>{try{const a=await this.fileDataCache.fetch(e);o.value=a}catch(a){console.error(a)}})(),o}getContentBytes(e){if(e===void 0)return;const r=this.getDataRef(e);return t.computed(()=>{var o;return(o=r.value)==null?void 0:o.bytes})}getContentString(e){if(e===void 0)return;const r=this.getDataRef(e);return t.computed(()=>{var o;return(o=r==null?void 0:r.value)==null?void 0:o.str})}getContentJson(e,r){if(e===void 0)return;const o=this.getDataRef(e);return t.computed(()=>{var a,s;return r===void 0?(a=o==null?void 0:o.value)==null?void 0:a.rawJson:(s=o==null?void 0:o.value)==null?void 0:s.validatedJson(r)})}static getContentBytes(e){return xo.globalInstance.getContentBytes(e)}static getContentString(e){return xo.globalInstance.getContentString(e)}static getContentJson(e,r){return xo.globalInstance.getContentJson(e,r)}};We(xo,"globalInstance",new xo);let $u=xo;L.AgGridTheme=_s,L.BlockLayout=SD,L.Color=Zt,L.ContextProvider=z$,L.DataTable=vk,L.DemoData=qI,L.DropdownListItem=so,L.DropdownOverlay=$s,L.Gradient=F$,L.LongText=Ts,L.MultiError=ys,L.PlAccordion=rN,L.PlAccordionSection=pN,L.PlAgCellFile=Ag,L.PlAgCellProgress=Dg,L.PlAgCellStatusTag=Og,L.PlAgChartHistogramCell=Rg,L.PlAgChartStackedBarCell=$g,L.PlAgColumnHeader=au,L.PlAgCsvExporter=pu,L.PlAgDataTable=Bg,L.PlAgDataTableRowNumberColId=Qt,L.PlAgDataTableToolsPanel=qD,L.PlAgDataTableV2=Tg,L.PlAgGridColumnManager=cu,L.PlAgOverlayLoading=gl,L.PlAgOverlayNoRows=yl,L.PlAgTextAndButtonCell=iu,L.PlAlert=qp,L.PlAutocomplete=$N,L.PlBlockPage=jk,L.PlBtnAccent=Cx,L.PlBtnDanger=Sx,L.PlBtnGhost=Ar,L.PlBtnGroup=nh,L.PlBtnLink=Ox,L.PlBtnPrimary=Ns,L.PlBtnSecondary=Bs,L.PlBtnSplit=wx,L.PlChartHistogram=rg,L.PlChartStackedBar=HB,L.PlChartStackedBarCompact=Wh,L.PlCheckbox=fd,L.PlCheckboxGroup=oE,L.PlChip=dd,L.PlCloseModalBtn=hh,L.PlContainer=Wk,L.PlDataTable=Bg,L.PlDataTableV2=Tg,L.PlDialogModal=pd,L.PlDropdown=Rr,L.PlDropdownLegacy=BC,L.PlDropdownLine=cd,L.PlDropdownMulti=ph,L.PlDropdownMultiRef=QC,L.PlDropdownRef=rC,L.PlEditableTitle=ov,L.PlFileDialog=Uh,L.PlFileInput=jh,L.PlGrid=Yk,L.PlIcon16=$r,L.PlIcon24=Ja,L.PlLoaderCircular=Wp,L.PlLogView=Ih,L.PlMaskIcon16=Yt,L.PlMaskIcon24=at,L.PlNotificationAlert=Zh,L.PlNumberField=PC,L.PlProgressBar=RC,L.PlProgressCell=Ph,L.PlRadio=ig,L.PlRadioGroup=T$,L.PlRow=qk,L.PlSearchField=lh,L.PlSectionSeparator=Dh,L.PlSlideModal=Qa,L.PlSpacer=Hp,L.PlSplash=Es,L.PlStatusTag=Mh,L.PlTableFilters=zL,L.PlTabs=YS,L.PlTextArea=Fv,L.PlTextField=lo,L.PlToggleSwitch=Rs,L.PlTooltip=dt,L.ReactiveFileContent=$u,L.Scrollable=RR,L.Slider=pg,L.SliderRange=VR,L.SliderRangeTriple=yR,L.ThemeSwitcher=Vk,L.UnresolvedError=Pc,L.ValueOrErrorsComponent=lM,L.activateAgGrid=Bp,L.animate=Qp,L.animateInfinite=fx,L.autoSizeRowNumberColumn=Ai,L.call=Gp,L.categoricalColors=dg,L.computedResult=ZL,L.createAgGridColDef=Pg,L.createModel=jc,L.defaultMainMenuItems=_g,L.defineApp=Y1,L.defineStore=jL,L.delay=Kp,L.detectOutside=zv,L.ensureError=Fc,L.eventListener=ld,L.focusRow=fu,L.formatZodError=Uc,L.getElementScrollPosition=fh,L.identity=Lc,L.interpolateColor=ug,L.isDefined=$1,L.isElementVisible=uh,L.isZodError=zc,L.listToOptions=px,L.magma=lg,L.makeEaseInOut=ux,L.makeEaseOut=Jp,L.makeOnceTracker=du,L.makeRowNumberColDef=_l,L.maskIcons16=WI,L.maskIcons24=HI,L.normalizeGradient=fg,L.normalizeListOptions=sr,L.objectHash=su,L.palettes=cg,L.randomInt=Yp,L.randomString=dx,L.requestTick=rd,L.scrollIntoView=As,L.showContextMenu=Yc,L.throttle=eh,L.timeout=Xp,L.trackFirstDataRendered=uu,L.unwrapOptionalResult=A1,L.unwrapValueOrErrors=Cp,L.useAgGridOptions=hM,L.useClickOutside=Vs,L.useComponentProp=iR,L.useDraggable=aR,L.useEventListener=ot,L.useFormState=rR,L.useHover=Fp,L.useInterval=nR,L.useLabelNotch=Kn,L.useLocalStorage=Up,L.useMouse=Lp,L.useMouseCapture=Tr,L.usePosition=Ya,L.useQuery=oR,L.useResizeObserver=hg,L.useScroll=J$,L.useSdkPlugin=ws,L.useSortable=eR,L.useSortable2=yg,L.useTheme=Zp,L.useWatchFetch=bd,L.viridis=sg,L.wrapOptionalResult=Ep,L.wrapValueOrErrors=T1,Object.defineProperty(L,Symbol.toStringTag,{value:"Module"})});
|
|
81
|
+
(e.g., in the block header).`)})};return t.onMounted(e),t.onUpdated(e),n}const F5=["onClick"],P5={key:0,class:"pl-ag-columns__pin"},Su=t.defineComponent({__name:"PlAgGridColumnManager",props:{api:{},width:{}},setup(n){const e=n,{api:r}=t.toRefs(e),o=t.ref([]),a=t.ref(),l=t.ref(!1),c=t.ref(0);Pg(a,{handle:".handle",onChange(f){r.value.moveColumns(f.map(m=>o.value[m]),0)}});function d(f){r.value.setColumnsVisible([f],!f.isVisible())}t.watch(()=>r.value,f=>{f.isDestroyed()||(o.value=f.getAllGridColumns(),o.value.length>0&&f.moveColumns(o.value,0),f.addEventListener("displayedColumnsChanged",m=>{f.isDestroyed()||(o.value=m.api.getAllGridColumns(),c.value++)}))},{immediate:!0});const u=Es();return(f,m)=>(t.openBlock(),t.createElementBlock("div",null,[t.unref(u)?(t.openBlock(),t.createBlock(t.Teleport,{key:0,to:t.unref(u)},[t.createVNode(t.unref(cr),{onClick:m[0]||(m[0]=t.withModifiers(g=>l.value=!l.value,["stop"]))},{append:t.withCtx(()=>[t.createVNode(t.unref(at),{name:"columns"})]),default:t.withCtx(()=>[m[2]||(m[2]=t.createTextVNode(" Columns "))]),_:1})],8,["to"])):t.createCommentVNode("",!0),t.createVNode(t.unref(Ko),{modelValue:l.value,"onUpdate:modelValue":m[1]||(m[1]=g=>l.value=g),width:f.width,"close-on-outside-click":""},{title:t.withCtx(()=>m[3]||(m[3]=[t.createTextVNode("Manage Columns")])),default:t.withCtx(()=>[(t.openBlock(),t.createElementBlock("div",{ref_key:"listRef",ref:a,key:c.value,class:"pl-ag-columns pl-2 pr-2"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(o.value,g=>(t.openBlock(),t.createElementBlock("div",{key:g.getId(),class:t.normalizeClass([{pinned:g.getColDef().lockPosition},"pl-ag-columns__item"])},[t.createElementVNode("div",{class:t.normalizeClass([{handle:!g.getColDef().lockPosition},"pl-ag-columns__drag"])},[t.createVNode(t.unref(qt),{name:"drag-dots"})],2),t.createElementVNode("div",{class:t.normalizeClass([{visible:g.isVisible()},"pl-ag-columns__title text-s-btn"])},t.toDisplayString(g.getColDef().headerName),3),t.createElementVNode("div",{class:"pl-ag-columns__visibility",onClick:y=>d(g)},[t.createVNode(t.unref(ct),{"close-delay":500,position:"top"},{tooltip:t.withCtx(()=>m[4]||(m[4]=[t.createTextVNode("Show/Hide")])),default:t.withCtx(()=>[t.createVNode(t.unref(at),{name:g.isVisible()?"view-show":"view-hide"},null,8,["name"])]),_:2},1024)],8,F5),g.getColDef().lockPosition?(t.openBlock(),t.createElementBlock("div",P5,[t.createVNode(t.unref(at),{name:"pin"})])):t.createCommentVNode("",!0)],2))),128))]))]),_:1},8,["modelValue","width"])]))}});function Eu(){const n=t.shallowRef([!1,void 0]);return{track:a=>n.value=[!0,a],reset:()=>n.value=[!1,void 0],onceTracked:a=>{const{stop:l}=t.watchEffect(()=>{const[c,d]=n.value;c&&(a(d),l())});return l}}}function Nu(n,e){n.addEventListener("firstDataRendered",r=>{r.api.getGridOption("rowModelType")==="clientSide"&&e.track(r.api)}),n.addEventListener("modelUpdated",r=>{if(r.api.getGridOption("rowModelType")==="serverSide"){const o=r.api.getServerSideGroupLevelState();o&&o.length>0&&o[0].lastRowIndexKnown&&e.track(r.api)}}),n.addEventListener("gridPreDestroyed",()=>e.reset())}function z5(n,e){let r=null;const o=a=>a.id===e?(r=a.rowIndex,!0):!1;if(n.ensureNodeVisible(o,"middle"),r){const a=n.getAllDisplayedColumns();a.length>0&&(n.ensureColumnVisible(a[0]),n.setFocusedCell(r,a[0]))}}async function Vu(n,e){return new Promise(r=>{t.nextTick(()=>e.onceTracked(o=>{z5(o,n),r()}))})}function D5(){const n=document.createElement("div");return n.style.visibility="hidden",n.style.position="absolute",document.body.appendChild(n),n}function W5(n){document.body.removeChild(n)}async function G5(n,e){var o;const r=n.getGridOption("rowModelType");switch(r){case"clientSide":return n.exportDataAsCsv(),e();case"serverSide":{const a=n.getServerSideGroupLevelState();if(a.length===0||a[0].rowCount<=a[0].cacheBlockSize)return n.exportDataAsCsv(),e();const l=D5(),c={rowModelType:"serverSide",columnDefs:((o=n.getColumnDefs())==null?void 0:o.filter(d=>!("children"in d)).map(d=>({headerName:d.headerName,field:d.field,valueFormatter:d.valueFormatter,valueGetter:d.valueGetter})))??[],serverSideDatasource:n.getGridOption("serverSideDatasource"),cacheBlockSize:a[0].rowCount,onModelUpdated:d=>{const u=d.api.getServerSideGroupLevelState();if(u.length>0&&u[0].rowCount===u[0].cacheBlockSize)return d.api.exportDataAsCsv(),W5(l),e()},defaultCsvExportParams:n.getGridOption("defaultCsvExportParams")};return Ie.createGrid(l,c,{modules:[Ie.ServerSideRowModelModule]})}default:throw e(),Error(`exportCsv unsupported for rowModelType = ${r}`)}}const Bu=t.defineComponent({__name:"PlAgCsvExporter",props:{api:{}},setup(n){const e=n,{api:r}=t.toRefs(e),o=t.shallowRef(!1),a=()=>{o.value=!0,G5(r.value,()=>o.value=!1)},l=Es();return(c,d)=>(t.openBlock(),t.createElementBlock("div",null,[t.unref(l)?(t.openBlock(),t.createBlock(t.Teleport,{key:0,to:t.unref(l)},[t.createVNode(t.unref(cr),{loading:o.value,onClick:t.withModifiers(a,["stop"])},{append:t.withCtx(()=>[t.createVNode(t.unref(at),{name:"export"})]),default:t.withCtx(()=>[d[0]||(d[0]=t.createTextVNode(" Export "))]),_:1},8,["loading"])],8,["to"])):t.createCommentVNode("",!0)]))}}),U5={class:"ap-ag-data-table-container"},H5={key:2,class:"ap-ag-data-table-sheets"},jg=mr(t.defineComponent({__name:"PlAgDataTable",props:t.mergeModels({settings:{},showColumnsPanel:{type:Boolean},columnsPanelWidth:{},showExportButton:{type:Boolean},clientSideModel:{type:Boolean},showCellButtonForAxisId:{},cellButtonInvokeRowsOnDoubleClick:{type:Boolean}},{modelValue:{default:{gridState:{}}},modelModifiers:{},selectedRows:{},selectedRowsModifiers:{}}),emits:t.mergeModels(["rowDoubleClicked","columnsChanged","cellButtonClicked"],["update:modelValue","update:selectedRows"]),setup(n,{expose:e,emit:r}){Ie.ModuleRegistry.registerModules([Ie.ClientSideRowModelModule,Ie.ClipboardModule,Ie.ServerSideRowModelModule,Ie.CellSelectionModule]);const o=t.useModel(n,"modelValue"),a=t.useModel(n,"selectedRows"),l=n,{settings:c}=t.toRefs(l),d=r;o.value.pTableParams||(o.value.pTableParams={});function u(S){return(S==null?void 0:S.sortModel.map(I=>{const{spec:v,...L}=Wo(I.colId);return{column:L,ascending:I.sort==="asc",naAndAbsentAreLeastValues:I.sort==="asc"}}))??[]}const f=t.computed({get:()=>{const S=o.value;return{sourceId:S.gridState.sourceId,columnOrder:S.gridState.columnOrder,sort:S.gridState.sort,columnVisibility:S.gridState.columnVisibility}},set:S=>{var V;const I=((V=c.value)==null?void 0:V.sourceType)!=="ptable"||$.value.rowModelType==="clientSide"?void 0:u(S.sort),v=o.value,L={...v,gridState:{...v.gridState,...S},pTableParams:{...v.pTableParams,sorting:I}};Wt(v,L)||(o.value=L)}}),m=S=>Er(Lt(S));function g(S){var I,v;if(((I=c.value)==null?void 0:I.sourceType)==="ptable")return((v=c.value.sheets)==null?void 0:v.map(L=>({type:"bySingleColumnV2",column:{type:"axis",id:L.axis},predicate:{operator:"Equal",reference:S[m(L.axis)]}})))??[]}const y=t.computed({get:()=>o.value.gridState.sheets??{},set:S=>{const I=g(S),v=o.value;o.value={...v,gridState:{...v.gridState,sheets:S},pTableParams:{...v.pTableParams,filters:I}}}}),_=S=>(S==null?void 0:S.sourceType)==="ptable"&&!!S.sheets&&S.sheets.length>0;t.watch(()=>c.value,(S,I)=>{var V;if((S==null?void 0:S.sourceType)!=="ptable"||!S.sheets){y.value={};return}if(I&&I.sourceType==="ptable"&&Me.isEqual(S.sheets,I.sheets))return;const v=y.value,L={};for(const k of S.sheets){const Z=m(k.axis);L[Z]=v[Z]??k.defaultValue??((V=k.options[0])==null?void 0:V.value)}y.value=L},{immediate:!0});const C=t.shallowRef(),N=t.shallowRef(new dl),T=Eu(),$=t.shallowRef({animateRows:!1,suppressColumnMoveAnimation:!0,cellSelection:a.value===void 0,initialState:f.value,autoSizeStrategy:{type:"fitCellContents"},rowSelection:a.value!==void 0?{mode:"multiRow",checkboxes:!1,headerCheckbox:!1,enableClickSelection:!1}:void 0,selectionColumnDef:{mainMenuItems:[],contextMenuItems:[],pinned:"left",lockPinned:!0,suppressSizeToFit:!0,suppressAutoSize:!0,sortable:!1,resizable:!1},onRowDataUpdated:S=>{const I=a.value;if(I){const v=I.map(L=>S.api.getRowNode(Cu(L))).filter(L=>!!L);S.api.setNodesSelected({nodes:v,newValue:!0})}},onSelectionChanged:S=>{a.value&&(a.value=S.api.getSelectedNodes().map(I=>{var v;return(v=I.data)==null?void 0:v.key}).filter(I=>!!I))},onRowDoubleClicked:S=>{S.data&&S.data.key&&d("rowDoubleClicked",S.data.key)},defaultColDef:{suppressHeaderMenuButton:!0,sortingOrder:["desc","asc",null]},maintainColumnOrder:!0,localeText:{loadingError:"..."},rowModelType:"clientSide",maxBlocksInCache:1e3,blockLoadDebounceMillis:500,serverSideSortAllLevels:!0,suppressServerSideFullWidthLoadingRow:!0,getRowId:S=>S.data.id,loading:!0,loadingOverlayComponentParams:{notReady:!0},loadingOverlayComponent:ks,noRowsOverlayComponent:xs,defaultCsvExportParams:{allColumns:!0,suppressQuotes:!0,fileName:"table.csv"}}),W=S=>{const I=S.api;Nu(I,T),$i(I),C.value=new Proxy(I,{get(v,L,V){switch(L){case"setGridOption":return(k,Z)=>{const U=$.value;U[k]=Z,$.value=U,I.setGridOption(k,Z)};case"updateGridOptions":return k=>{$.value={...$.value,...k},I.updateGridOptions(k)};default:return Reflect.get(v,L,V)}}}),N.value.resolve(C.value)},E=S=>({sourceId:f.value.sourceId,columnOrder:S.columnOrder,sort:S.sort,columnVisibility:S.columnVisibility}),D=S=>{$.value.initialState=f.value=E(S.state),S.api.autoSizeColumns(S.api.getAllDisplayedColumns().filter(I=>I.getColId()!==en))},A=()=>{$.value.initialState=f.value=E(C.value.getState()),C.value=void 0,N.value=new dl};e({focusRow:S=>Vu(Cu(S),T)});const B=t.ref(0);t.watch(()=>[C.value,f.value],(S,I)=>{if(Me.isEqual(S,I))return;const[v,L]=S;if(!v)return;const V=E(v.getState());Me.isEqual(L,V)||($.value.initialState=L,++B.value)}),t.watch(()=>$.value,(S,I)=>{var v,L;if(I){if(S.rowModelType!=I.rowModelType&&++B.value,S.columnDefs&&!Me.isEqual(S.columnDefs,I.columnDefs)){const V=U=>!("children"in U),Z=(((v=S.columnDefs)==null?void 0:v.filter(V))??[]).map(U=>U.colId).filter(U=>U!==void 0).filter(U=>U!==en).filter(U=>!Ie.isColumnSelectionCol(U)).map(U=>Wo(U))??[];d("columnsChanged",Z)}!Me.isEqual(S.loadingOverlayComponentParams,I.loadingOverlayComponentParams)&&S.loading&&((L=C.value)==null||L.setGridOption("loading",!1),t.nextTick(()=>{var V;return(V=C.value)==null?void 0:V.setGridOption("loading",!0)}))}},{immediate:!0});const P=(S,I)=>{var L;const v=y.value;if(v[S]!==I)return v[S]=I,y.value=v,(L=C.value)==null?void 0:L.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1}})};let H;return t.watch(()=>[c.value],async S=>{try{const[I]=S,v=await N.value.promise;if(v.isDestroyed()){console.warn("gridApi is destroyed");return}if(Me.isEqual(I,H))return;H=I;const L=I==null?void 0:I.sourceType;switch(L){case void 0:return v.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[],rowData:void 0,datasource:void 0});case"ptable":{if(!(I!=null&&I.pTable))return v.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},columnDefs:[],rowData:void 0,datasource:void 0});v.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1}});const V=await O5(uo().pFrameDriver,I.pTable,I.sheets??[],!!l.clientSideModel||!!a.value,f,{showCellButtonForAxisId:l.showCellButtonForAxisId,cellButtonInvokeRowsOnDoubleClick:l.cellButtonInvokeRowsOnDoubleClick,trigger:k=>d("cellButtonClicked",k)}).catch(k=>{throw v.updateGridOptions({loading:!1,loadingOverlayComponentParams:{notReady:!1}}),k});return v.updateGridOptions({loading:!1,loadingOverlayComponentParams:{notReady:!1},...V})}case"xsv":{const V=I==null?void 0:I.xsvFile;if(!V)return v.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},columnDefs:[],rowData:void 0,datasource:void 0});const k=uo().blobDriver,Z=await _5(k,V);return v.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},...Z})}default:throw Error(`unsupported source type: ${L}`)}}catch(I){console.trace(I)}},{immediate:!0,deep:!0}),(S,I)=>(t.openBlock(),t.createElementBlock("div",U5,[C.value&&S.showColumnsPanel?(t.openBlock(),t.createBlock(t.unref(Su),{key:0,api:C.value,width:S.columnsPanelWidth},null,8,["api","width"])):t.createCommentVNode("",!0),C.value&&S.showExportButton?(t.openBlock(),t.createBlock(Bu,{key:1,api:C.value},null,8,["api"])):t.createCommentVNode("",!0),_(t.unref(c))||S.$slots["before-sheets"]||S.$slots["after-sheets"]?(t.openBlock(),t.createElementBlock("div",H5,[t.renderSlot(S.$slots,"before-sheets",{},void 0,!0),_(t.unref(c))?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(c).sheets,(v,L)=>{var V,k;return t.openBlock(),t.createBlock(t.unref(Sd),{key:L,"model-value":y.value[m(v.axis)],options:v.options,prefix:(((k=(V=v.axis.annotations)==null?void 0:V["pl7.app/label"])==null?void 0:k.trim())??`Unlabeled axis ${L}`)+":","onUpdate:modelValue":Z=>P(m(v.axis),Z)},null,8,["model-value","options","prefix","onUpdate:modelValue"])}),128)):t.createCommentVNode("",!0),t.renderSlot(S.$slots,"after-sheets",{},void 0,!0)])):t.createCommentVNode("",!0),(t.openBlock(),t.createBlock(t.unref(io.AgGridVue),{key:B.value,theme:t.unref(xl),class:"ap-ag-data-table-grid","grid-options":$.value,onGridReady:W,onStateUpdated:D,onGridPreDestroyed:A},null,8,["theme","grid-options"]))]))}}),[["__scopeId","data-v-e2be0f3a"]]),X5=t.defineComponent({__name:"PlAgRowCount",props:{params:{}},setup(n){const e=t.ref(n.params.api.getDisplayedRowCount()),r=t.ref(n.params.api.getSelectedRows().length),o=new Intl.PluralRules("en"),a=new Intl.NumberFormat("en"),l=t.computed(()=>{let d=a.format(e.value)+" ";return d+=o.select(e.value)==="one"?"row":"rows",r.value>0&&(d+=" ("+a.format(r.value)+" selected)"),d});function c(){e.value=n.params.api.getDisplayedRowCount(),r.value=n.params.api.getSelectedRows().length}return t.onBeforeMount(()=>{n.params.api.addEventListener("selectionChanged",c),n.params.api.addEventListener("rowDataUpdated",c),n.params.api.addEventListener("modelUpdated",c)}),t.onBeforeUnmount(()=>{n.params.api.removeEventListener("selectionChanged",c),n.params.api.removeEventListener("rowDataUpdated",c),n.params.api.removeEventListener("modelUpdated",c)}),(d,u)=>t.toDisplayString(l.value)}});function Yg(n,e,r,o){const a=[];for(let l=0;l<e[0].data.length;++l){const c=r.map(u=>yw(Ir(e[o[u]],l))),d={id:Tu(c),key:c};n.forEach((u,f)=>{d[u.toString()]=o[f]===-1?E5:Ir(e[o[f]],l)}),a.push(d)}return a}async function j5(n,e,r,o,a,l){const c=e.tableHandle,d=e.tableSpec,u=k=>k.type==="axis"?Er(Lt(k.spec)):k.id,f=await n.getSpec(c),m=new Map;f.forEach((k,Z)=>{m.set(u(k),Z)});const g=new Map;d.forEach((k,Z)=>{const U=m.get(u(k));if(U===void 0&&k.type==="axis")throw new Error(`axis ${JSON.stringify(k.spec)} not present in join result`);g.set(Z,U??-1)});const y=a.value.sourceId,_=await xu(d),C=y!==_,N=C?void 0:a.value.columnVisibility;C&&(a.value={...a.value,sourceId:_});let T=d.findIndex(k=>k.type==="column");T===-1&&(T=d.length);const $=[...d.keys()].filter(k=>!Me.some(r,Z=>Me.isEqual(Lt(Z.axis),d[k].id)||d[k].type==="column"&&d[k].spec.name==="pl7.app/label"&&d[k].spec.axesSpec.length===1&&Me.isEqual(Lt(Z.axis),Lt(d[k].spec.axesSpec[0])))).sort((k,Z)=>{var j,ee;if(d[k].type!==d[Z].type)return d[k].type==="axis"?-1:1;const U=(j=d[k].spec.annotations)==null?void 0:j["pl7.app/table/orderPriority"],F=(ee=d[Z].spec.annotations)==null?void 0:ee["pl7.app/table/orderPriority"];return U===void 0?F===void 0?0:1:F===void 0?-1:Number(F)-Number(U)}),W=[...$],E=$.findIndex(k=>d[k].type==="column");for(let k=$.length-1;k>=E;--k){const Z=$[k];if(!Wg(d[Z]))continue;const U=Lt(d[Z].spec.axesSpec[0]),F=$.findIndex(j=>Me.isEqual(d[j].id,U));F!==-1?$[F]=Z:console.warn(`multiple label columns match axisId: ${JSON.stringify(U)}`),$.splice(k,1),W.splice(k,1)}const A=(await n.getShape(c)).rows,B=[vs(),...W.map(k=>Y5(k,d[k],N==null?void 0:N.hiddenColIds,l))],P=[...$],H=new Map;for(let k=0;k<T;++k)H.set(k,-1);P.forEach((k,Z)=>{H.has(k)&&H.set(k,Z)});for(const[k,Z]of H)Z===-1&&(H.set(k,P.length),P.push(k));const S=[];for(let k=0;k<T;++k){const Z=H.get(k);if(Z===void 0||Z===-1)throw new Error("assertion exception");S.push(Z)}const I=[],v=[];if(P.forEach(k=>{const Z=g.get(k);Z!==-1?(v.push(I.length),I.push(Z)):v.push(-1)}),o){const k=await n.getData(c,I);return{rowModelType:"clientSide",columnDefs:B,rowData:Yg(W,k,S,v)}}let L;return{rowModelType:"serverSide",columnDefs:B,serverSideDatasource:{getRows:async k=>{try{if(A==0){k.success({rowData:[],rowCount:A}),k.api.setGridOption("loading",!1),k.api.showNoRowsOverlay();return}if(L&&!Me.isEqual(L.request.sortModel,k.request.sortModel)){L=void 0,k.api.setGridOption("loading",!0),k.success({rowData:[],rowCount:0});return}L=k;let Z=0,U=[];if(A>0&&k.request.startRow!==void 0&&k.request.endRow!==void 0&&(Z=Math.min(A,k.request.endRow)-k.request.startRow,Z>0)){const F=await n.getData(c,I,{offset:k.request.startRow,length:Z});U=Yg(W,F,S,v)}k.success({rowData:U,rowCount:A}),k.api.autoSizeColumns(k.api.getAllDisplayedColumns().filter(F=>F.getColId()!==en)),k.api.setGridOption("loading",!1)}catch(Z){k.api.setGridOption("loading",!0),k.fail(),console.trace(Z)}}}}}function Y5(n,e,r,o){var c,d;const a=Xf(e),l=e.type==="axis"?e.spec.type:e.spec.valueType;return{colId:a,mainMenuItems:vu,context:e,field:n.toString(),headerName:((d=(c=e.spec.annotations)==null?void 0:c["pl7.app/label"])==null?void 0:d.trim())??"Unlabeled "+e.type+" "+n.toString(),lockPosition:e.type==="axis",hide:(r==null?void 0:r.includes(a))??jf(e.spec),valueFormatter:ku,headerComponent:Cs,cellRendererSelector:o!=null&&o.showCellButtonForAxisId?u=>{var m,g;if(e.type!=="axis")return;const f=(g=(m=u.colDef)==null?void 0:m.context)==null?void 0:g.id;if(Me.isEqual(f,o.showCellButtonForAxisId))return{component:Ss,params:{invokeRowsOnDoubleClick:o.cellButtonInvokeRowsOnDoubleClick,onClick:y=>{var _;o.trigger((_=y.data)==null?void 0:_.key)}}}}:void 0,headerComponentParams:{type:(()=>{switch(l){case"Int":case"Long":case"Float":case"Double":return"Number";case"String":case"Bytes":return"Text";default:throw Error(`unsupported data type: ${l}`)}})()},cellDataType:(()=>{switch(l){case"Int":case"Long":case"Float":case"Double":return"number";case"String":case"Bytes":return"text";default:throw Error(`unsupported data type: ${l}`)}})()}}function Tu(n){return Yn(n)}const K5={class:"ap-ag-data-table-container"},J5={key:2,class:"ap-ag-data-table-sheets"},Kg=mr(t.defineComponent({__name:"PlAgDataTableV2",props:t.mergeModels({settings:{},showColumnsPanel:{type:Boolean},columnsPanelWidth:{},showExportButton:{type:Boolean},clientSideModel:{type:Boolean},showCellButtonForAxisId:{},cellButtonInvokeRowsOnDoubleClick:{type:Boolean},loadingText:{},notReadyText:{},noRowsText:{},cellRendererSelector:{type:Function}},{modelValue:{default:{gridState:{}}},modelModifiers:{},selection:{},selectionModifiers:{}}),emits:t.mergeModels(["rowDoubleClicked","columnsChanged","cellButtonClicked"],["update:modelValue","update:selection"]),setup(n,{expose:e,emit:r}){Ie.ModuleRegistry.registerModules([Ie.ClientSideRowModelModule,Ie.ClipboardModule,Ie.ServerSideRowModelModule,Ie.CellSelectionModule]);const o=t.useModel(n,"modelValue"),a=t.useModel(n,"selection"),l=n,{settings:c}=t.toRefs(l),d=r;o.value.pTableParams||(o.value.pTableParams={});function u(S){return(S==null?void 0:S.sortModel.map(I=>{const{spec:v,...L}=Wo(I.colId);return{column:L,ascending:I.sort==="asc",naAndAbsentAreLeastValues:I.sort==="asc"}}))??[]}const f=t.computed({get:()=>{const S=o.value;return{sourceId:S.gridState.sourceId,columnOrder:S.gridState.columnOrder,sort:S.gridState.sort,columnVisibility:S.gridState.columnVisibility}},set:S=>{var V;const I=((V=c.value)==null?void 0:V.sourceType)!=="ptable"||$.value.rowModelType==="clientSide"?void 0:u(S.sort),v=o.value,L={...v,gridState:{...v.gridState,...S},pTableParams:{...v.pTableParams,sorting:I}};Wt(v,L)||(o.value=L)}}),m=S=>Er(Lt(S));function g(S){var I,v;if(((I=c.value)==null?void 0:I.sourceType)==="ptable")return((v=c.value.sheets)==null?void 0:v.map(L=>({type:"bySingleColumnV2",column:{type:"axis",id:L.axis},predicate:{operator:"Equal",reference:S[m(L.axis)]}})))??[]}const y=t.computed({get:()=>o.value.gridState.sheets??{},set:S=>{const I=g(S),v=o.value;o.value={...v,gridState:{...v.gridState,sheets:S},pTableParams:{...v.pTableParams,filters:I}}}}),_=S=>(S==null?void 0:S.sourceType)==="ptable"&&!!S.sheets&&S.sheets.length>0;t.watch(()=>c.value,(S,I)=>{var V;if((S==null?void 0:S.sourceType)!=="ptable"||!S.sheets){y.value={};return}if(I&&I.sourceType==="ptable"&&Me.isEqual(S.sheets,I.sheets))return;const v=y.value,L={};for(const k of S.sheets){const Z=m(k.axis);L[Z]=v[Z]??k.defaultValue??((V=k.options[0])==null?void 0:V.value)}y.value=L},{immediate:!0});const C=t.shallowRef(),N=t.shallowRef(new dl),T=Eu(),$=t.shallowRef({animateRows:!1,suppressColumnMoveAnimation:!0,cellSelection:a.value===void 0,initialState:f.value,autoSizeStrategy:{type:"fitCellContents"},rowSelection:a.value!==void 0?{mode:"multiRow",checkboxes:!1,headerCheckbox:!1,enableClickSelection:!1}:void 0,selectionColumnDef:{mainMenuItems:[],contextMenuItems:[],pinned:"left",lockPinned:!0,suppressSizeToFit:!0,suppressAutoSize:!0,sortable:!1,resizable:!1},onRowDataUpdated:S=>{const I=a.value;if(I){const v=I.selectedKeys.map(L=>S.api.getRowNode(Tu(L))).filter(L=>!!L);S.api.setNodesSelected({nodes:v,newValue:!0})}},onSelectionChanged:S=>{if(a.value){const I=S.api.getSelectedNodes().map(v=>{var L;return(L=v.data)==null?void 0:L.key}).filter(v=>!!v);a.value={...a.value,selectedKeys:I}}},onRowDoubleClicked:S=>{S.data&&S.data.key&&d("rowDoubleClicked",S.data.key)},defaultColDef:{suppressHeaderMenuButton:!0,sortingOrder:["desc","asc",null],cellRendererSelector:l.cellRendererSelector},maintainColumnOrder:!0,localeText:{loadingError:"..."},rowModelType:"clientSide",maxBlocksInCache:1e3,blockLoadDebounceMillis:500,serverSideSortAllLevels:!0,suppressServerSideFullWidthLoadingRow:!0,getRowId:S=>S.data.id,loading:!0,loadingOverlayComponentParams:{notReady:!0,loadingText:l.loadingText,notReadyText:l.notReadyText},loadingOverlayComponent:ks,noRowsOverlayComponent:xs,noRowsOverlayComponentParams:{text:l.noRowsText},defaultCsvExportParams:{allColumns:!0,suppressQuotes:!0,fileName:"table.csv"},statusBar:{statusPanels:[{statusPanel:X5,align:"left"}]}}),W=S=>{const I=S.api;Nu(I,T),$i(I),C.value=new Proxy(I,{get(v,L,V){switch(L){case"setGridOption":return(k,Z)=>{const U=$.value;U[k]=Z,$.value=U,I.setGridOption(k,Z)};case"updateGridOptions":return k=>{$.value={...$.value,...k},I.updateGridOptions(k)};default:return Reflect.get(v,L,V)}}}),N.value.resolve(C.value)},E=S=>({sourceId:f.value.sourceId,columnOrder:S.columnOrder,sort:S.sort,columnVisibility:S.columnVisibility}),D=S=>{$.value.initialState=f.value=E(S.state),S.api.autoSizeColumns(S.api.getAllDisplayedColumns().filter(I=>I.getColId()!==en))},A=()=>{$.value.initialState=f.value=E(C.value.getState()),C.value=void 0,N.value=new dl};e({focusRow:S=>Vu(Tu(S),T)});const B=t.ref(0);t.watch(()=>[C.value,f.value],(S,I)=>{if(Me.isEqual(S,I))return;const[v,L]=S;if(!v)return;const V=E(v.getState());Me.isEqual(L,V)||($.value.initialState=L,++B.value)}),t.watch(()=>$.value,(S,I)=>{var v,L;if(I){if(S.rowModelType!=I.rowModelType&&++B.value,S.columnDefs&&!Me.isEqual(S.columnDefs,I.columnDefs)){const V=F=>!("children"in F),Z=(((v=S.columnDefs)==null?void 0:v.filter(V))??[]).map(F=>F.colId).filter(F=>F!==void 0).filter(F=>F!==en).filter(F=>!Ie.isColumnSelectionCol(F)).map(F=>Wo(F))??[],U=Z.filter(F=>F.type==="axis").map(F=>F.spec);a.value&&(a.value={...a.value,axesSpec:U}),d("columnsChanged",Z)}!Me.isEqual(S.loadingOverlayComponentParams,I.loadingOverlayComponentParams)&&S.loading&&((L=C.value)==null||L.setGridOption("loading",!1),t.nextTick(()=>{var V;return(V=C.value)==null?void 0:V.setGridOption("loading",!0)}))}},{immediate:!0});const P=(S,I)=>{var L;const v=y.value;if(v[S]!==I)return v[S]=I,y.value=v,(L=C.value)==null?void 0:L.updateGridOptions({loading:!0,loadingOverlayComponentParams:{...$.value.loadingOverlayComponentParams,notReady:!1}})};let H;return t.watch(()=>[c.value],async S=>{try{const[I]=S,v=await N.value.promise;if(v.isDestroyed()){console.warn("gridApi is destroyed");return}if(Me.isEqual(I,H))return;H=I;const L=I==null?void 0:I.sourceType;switch(L){case void 0:return v.updateGridOptions({loading:!0,loadingOverlayComponentParams:{...$.value.loadingOverlayComponentParams,notReady:!0},columnDefs:[],rowData:void 0,datasource:void 0});case"ptable":{if(!(I!=null&&I.model))return v.updateGridOptions({loading:!0,loadingOverlayComponentParams:{...$.value.loadingOverlayComponentParams,notReady:!1},columnDefs:[],rowData:void 0,datasource:void 0});v.updateGridOptions({loading:!0,loadingOverlayComponentParams:{...$.value.loadingOverlayComponentParams,notReady:!1}});const V=await j5(uo().pFrameDriver,I.model,I.sheets??[],!!l.clientSideModel||!!a.value,f,{showCellButtonForAxisId:l.showCellButtonForAxisId,cellButtonInvokeRowsOnDoubleClick:l.cellButtonInvokeRowsOnDoubleClick,trigger:k=>d("cellButtonClicked",k)}).catch(k=>{throw v.updateGridOptions({loading:!1,loadingOverlayComponentParams:{...$.value.loadingOverlayComponentParams,notReady:!1}}),k});return v.updateGridOptions({loading:!1,loadingOverlayComponentParams:{...$.value.loadingOverlayComponentParams,notReady:!1},...V})}default:throw Error(`unsupported source type: ${L}`)}}catch(I){console.trace(I)}},{immediate:!0,deep:!0}),t.watch(()=>l.cellRendererSelector,S=>{C.value&&C.value.setGridOption("defaultColDef",{...$.value.defaultColDef,cellRendererSelector:S})}),(S,I)=>(t.openBlock(),t.createElementBlock("div",K5,[C.value&&S.showColumnsPanel?(t.openBlock(),t.createBlock(t.unref(Su),{key:0,api:C.value,width:S.columnsPanelWidth},null,8,["api","width"])):t.createCommentVNode("",!0),C.value&&S.showExportButton?(t.openBlock(),t.createBlock(Bu,{key:1,api:C.value},null,8,["api"])):t.createCommentVNode("",!0),_(t.unref(c))||S.$slots["before-sheets"]||S.$slots["after-sheets"]?(t.openBlock(),t.createElementBlock("div",J5,[t.renderSlot(S.$slots,"before-sheets",{},void 0,!0),_(t.unref(c))?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(c).sheets,(v,L)=>{var V,k;return t.openBlock(),t.createBlock(t.unref(Sd),{key:L,"model-value":y.value[m(v.axis)],options:v.options,prefix:(((k=(V=v.axis.annotations)==null?void 0:V["pl7.app/label"])==null?void 0:k.trim())??`Unlabeled axis ${L}`)+":","onUpdate:modelValue":Z=>P(m(v.axis),Z)},null,8,["model-value","options","prefix","onUpdate:modelValue"])}),128)):t.createCommentVNode("",!0),t.renderSlot(S.$slots,"after-sheets",{},void 0,!0)])):t.createCommentVNode("",!0),(t.openBlock(),t.createBlock(t.unref(io.AgGridVue),{key:B.value,theme:t.unref(xl),class:"ap-ag-data-table-grid","grid-options":$.value,onGridReady:W,onStateUpdated:D,onGridPreDestroyed:A},null,8,["theme","grid-options"]))]))}}),[["__scopeId","data-v-5568b72e"]]),q5={key:1,class:"alert-error"},Q5={key:2},eZ=t.defineComponent({__name:"ValueOrErrorsComponent",props:{valueOrError:{}},setup(n){const e=n,r=t.computed(()=>e.valueOrError&&e.valueOrError.ok?e.valueOrError.value:void 0),o=t.computed(()=>e.valueOrError&&!e.valueOrError.ok?e.valueOrError.errors:void 0),a=t.computed(()=>r.value===void 0&&o.value===void 0);return(l,c)=>(t.openBlock(),t.createElementBlock("div",null,[r.value!==void 0?t.renderSlot(l.$slots,"default",t.normalizeProps(t.mergeProps({key:0},{value:r.value}))):t.createCommentVNode("",!0),o.value?(t.openBlock(),t.createElementBlock("div",q5,t.toDisplayString(o.value),1)):t.createCommentVNode("",!0),a.value?(t.openBlock(),t.createElementBlock("div",Q5,"Unresolved")):t.createCommentVNode("",!0)]))}}),tZ={style:{height:"100%"}},Jg=t.defineComponent({__name:"PlAgCellFile",props:{params:{}},setup(n){const e=n,r=t.computed(()=>e.params.extensions),o=t.computed(()=>e.params.value);function a(c){e.params.setValue(c)}const l=t.computed(()=>e.params.resolveProgress?e.params.resolveProgress(o.value):void 0);return(c,d)=>(t.openBlock(),t.createElementBlock("div",tZ,[t.createVNode(t.unref(ph),{"show-filename-only":"",clearable:"","cell-style":"","file-dialog-title":"Select any file",placeholder:`Choose file ${r.value?r.value[0]:""}`,extensions:r.value,"model-value":o.value,progress:l.value,"onUpdate:modelValue":a},null,8,["placeholder","extensions","model-value","progress"])]))}}),nZ={class:"pl-ag-chart-stacked-bar-cell"},rZ={key:1,class:"pl-ag-chart-stacked-bar-cell__not-ready"},qg=t.defineComponent({__name:"PlAgChartStackedBarCell",props:{params:{}},setup(n){const e=n,r=t.computed(()=>e.params.value||void 0);return(o,a)=>(t.openBlock(),t.createElementBlock("div",nZ,[r.value?(t.openBlock(),t.createBlock(t.unref(mh),{key:0,settings:r.value},null,8,["settings"])):(t.openBlock(),t.createElementBlock("div",rZ,"Not ready"))]))}}),oZ={key:1,class:"pl-ag-chart-histogram-cell__not-ready"},Qg=t.defineComponent({__name:"PlAgChartHistogramCell",props:{params:{}},setup(n){const e=n,r=t.ref(),{width:o}=Zw(r),a=t.computed(()=>{if(e.params.value&&o.value)return{...e.params.value,compact:!0,totalHeight:24,totalWidth:o.value}});return(l,c)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"root",ref:r,class:"pl-ag-chart-histogram-cell"},[a.value?(t.openBlock(),t.createBlock(t.unref(Eg),{key:0,settings:a.value},null,8,["settings"])):(t.openBlock(),t.createElementBlock("div",oZ,"Not ready"))],512))}}),aZ={class:"pl-ag-cell-status-tag d-flex align-center"},ey=t.defineComponent({__name:"PlAgCellStatusTag",props:{params:{}},setup(n){return(e,r)=>{var o;return t.openBlock(),t.createElementBlock("div",aZ,[t.createVNode(t.unref(ih),{type:(o=e.params)==null?void 0:o.type},null,8,["type"])])}}});class ty{constructor(){Pe(this,ht,{})}options(e){return ge(this,ht,Object.assign({},R(this,ht),e)),this}get columnDefs(){return R(this,ht).columnDefs??[]}setDefaultColDef(e){return R(this,ht).defaultColDef=e,this}setLoading(e){return R(this,ht).loading=e,this}setLoadingText(e){return R(this,ht).loadingText=e,this}setNotReady(e){return R(this,ht).notReady=e,this}setLoadingOverlayType(e){return R(this,ht).loadingOverlayType=e,this}setNotReadyText(e){return R(this,ht).notReadyText=e,this}setNoRowsText(e){return R(this,ht).noRowsText=e,this}setRowSelection(e){return R(this,ht).rowSelection=e,this}setRowData(e){return R(this,ht).rowData=e,this}setComponents(e){return R(this,ht).components=e,this}setOption(e,r){return R(this,ht)[e]=r,this}column(e){return R(this,ht).columnDefs=[...this.columnDefs,e],this}columnRowNumbers(e=!0){return R(this,ht).rowNumbersColumn=e,this}columnFileInput(e){return this.column(Object.assign({cellRenderer:"PlAgCellFile",headerComponentParams:{type:"File"},cellStyle:{padding:0},valueSetter:r=>{var o;return(o=e.setImportFileHandle)==null||o.call(e,r),!0},cellRendererSelector:r=>{var o;return{component:"PlAgCellFile",params:{extensions:e.extensions,value:(o=e.resolveImportFileHandle)==null?void 0:o.call(e,r),resolveProgress:()=>{var a;return(a=e.resolveImportProgress)==null?void 0:a.call(e,r)}}}}},e))}build(){return R(this,ht)}}ht=new WeakMap;function iZ(n){const e=t.shallowRef(),r=t.computed(()=>{var u;const a={theme:xl,loadingOverlayComponent:ks,noRowsOverlayComponent:xs,onGridReady:f=>{e.value=f.api,$i(f.api)}},l=f=>f,c=n({builder:new ty,column:l}),d=Object.assign({},a,c instanceof ty?c.build():c);return d.rowNumbersColumn&&(d.columnDefs=[vs(),...d.columnDefs??[]]),d.noRowsText&&(d.noRowsOverlayComponentParams={text:d.noRowsText}),"loadingOverlayComponentParams"in d&&console.warn("useAgGridOptions: remove loadingOverlayComponentParams from options, use loading, notReady, loadingText, loadingOverlayType instead"),d.loading=d.notReady||d.loading,d.columnDefs=(u=d.columnDefs)==null?void 0:u.map(f=>oy(f)),d.components=Object.assign({},d.components??{},{PlAgCellFile:Jg,PlAgChartStackedBarCell:qg,PlAgChartHistogramCell:Qg,PlAgCellStatusTag:ey}),d}),o=t.computed(()=>{const a=r.value;return{...a,loadingOverlayComponentParams:{notReady:a.notReady,notReadyText:a.notReadyText,overlayType:a.loadingOverlayType}}});return Aw(()=>r.value.rowNumbersColumn,()=>{e.value&&$i(e.value)}),t.watch([()=>r.value.notReady,()=>r.value.loading],([a,l])=>{var d,u;const c={notReady:a,notReadyText:r.value.notReadyText,overlayType:r.value.loadingOverlayType,loadingText:r.value.loadingText};(d=e.value)==null||d.updateGridOptions({loading:!l,loadingOverlayComponentParams:c}),(u=e.value)==null||u.updateGridOptions({loading:l,loadingOverlayComponentParams:c})},{deep:!0,immediate:!0}),{gridOptions:o,gridApi:e}}const ny=t.defineComponent({__name:"PlAgCellProgress",props:{params:{}},setup(n){const e=n;return(r,o)=>(t.openBlock(),t.createBlock(t.unref(lh),t.normalizeProps(t.guardReactiveProps(e.params)),null,16))}}),lZ={not_started:"Not Started",running:"Running",done:"Done"};function ry(){return{"--ag-cell-horizontal-padding":"0px","--ag-cell-vertical-padding":"0px"}}function sZ(n){return{component:ny,params:n}}function cZ(n){if(n.progress){const e=n.progress,r=n.cellRendererSelector;n.cellStyle=Object.assign({},n.cellStyle??{},ry()),n.cellRendererSelector=o=>{const a=e(o.value,o);return a?sZ({progress:Y_(Number(a.percent),l=>Number.isFinite(l)?l<0?0:l:void 0),progressString:a.suffix??(a.status==="running"?`${a.percent??0}%`:""),step:a.text??lZ[a.status],stage:a.status,error:a.error}):r==null?void 0:r(o)}}}function oy(n){return cZ(n),n.noGutters&&(n.cellStyle=Object.assign({},n.cellStyle??{},ry())),n.headerComponentParams&&(n.headerComponent=Cs),n.textWithButton&&(n.cellRenderer=Ss,typeof n.textWithButton!="boolean"?n.cellRendererParams=n.textWithButton:n.cellRendererParams={invokeRowsOnDoubleClick:!0}),delete n.textWithButton,delete n.progress,delete n.noGutters,n}var Ru={exports:{}};const dZ="2.0.0",ay=256,uZ=Number.MAX_SAFE_INTEGER||9007199254740991,pZ=16,fZ=ay-6;var Ns={MAX_LENGTH:ay,MAX_SAFE_COMPONENT_LENGTH:pZ,MAX_SAFE_BUILD_LENGTH:fZ,MAX_SAFE_INTEGER:uZ,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:dZ,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},Vs=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{};(function(n,e){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:a}=Ns,l=Vs;e=n.exports={};const c=e.re=[],d=e.safeRe=[],u=e.src=[],f=e.safeSrc=[],m=e.t={};let g=0;const y="[a-zA-Z0-9-]",_=[["\\s",1],["\\d",a],[y,o]],C=T=>{for(const[$,W]of _)T=T.split(`${$}*`).join(`${$}{0,${W}}`).split(`${$}+`).join(`${$}{1,${W}}`);return T},N=(T,$,W)=>{const E=C($),D=g++;l(T,D,$),m[T]=D,u[D]=$,f[D]=E,c[D]=new RegExp($,W?"g":void 0),d[D]=new RegExp(E,W?"g":void 0)};N("NUMERICIDENTIFIER","0|[1-9]\\d*"),N("NUMERICIDENTIFIERLOOSE","\\d+"),N("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${y}*`),N("MAINVERSION",`(${u[m.NUMERICIDENTIFIER]})\\.(${u[m.NUMERICIDENTIFIER]})\\.(${u[m.NUMERICIDENTIFIER]})`),N("MAINVERSIONLOOSE",`(${u[m.NUMERICIDENTIFIERLOOSE]})\\.(${u[m.NUMERICIDENTIFIERLOOSE]})\\.(${u[m.NUMERICIDENTIFIERLOOSE]})`),N("PRERELEASEIDENTIFIER",`(?:${u[m.NUMERICIDENTIFIER]}|${u[m.NONNUMERICIDENTIFIER]})`),N("PRERELEASEIDENTIFIERLOOSE",`(?:${u[m.NUMERICIDENTIFIERLOOSE]}|${u[m.NONNUMERICIDENTIFIER]})`),N("PRERELEASE",`(?:-(${u[m.PRERELEASEIDENTIFIER]}(?:\\.${u[m.PRERELEASEIDENTIFIER]})*))`),N("PRERELEASELOOSE",`(?:-?(${u[m.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[m.PRERELEASEIDENTIFIERLOOSE]})*))`),N("BUILDIDENTIFIER",`${y}+`),N("BUILD",`(?:\\+(${u[m.BUILDIDENTIFIER]}(?:\\.${u[m.BUILDIDENTIFIER]})*))`),N("FULLPLAIN",`v?${u[m.MAINVERSION]}${u[m.PRERELEASE]}?${u[m.BUILD]}?`),N("FULL",`^${u[m.FULLPLAIN]}$`),N("LOOSEPLAIN",`[v=\\s]*${u[m.MAINVERSIONLOOSE]}${u[m.PRERELEASELOOSE]}?${u[m.BUILD]}?`),N("LOOSE",`^${u[m.LOOSEPLAIN]}$`),N("GTLT","((?:<|>)?=?)"),N("XRANGEIDENTIFIERLOOSE",`${u[m.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),N("XRANGEIDENTIFIER",`${u[m.NUMERICIDENTIFIER]}|x|X|\\*`),N("XRANGEPLAIN",`[v=\\s]*(${u[m.XRANGEIDENTIFIER]})(?:\\.(${u[m.XRANGEIDENTIFIER]})(?:\\.(${u[m.XRANGEIDENTIFIER]})(?:${u[m.PRERELEASE]})?${u[m.BUILD]}?)?)?`),N("XRANGEPLAINLOOSE",`[v=\\s]*(${u[m.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[m.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[m.XRANGEIDENTIFIERLOOSE]})(?:${u[m.PRERELEASELOOSE]})?${u[m.BUILD]}?)?)?`),N("XRANGE",`^${u[m.GTLT]}\\s*${u[m.XRANGEPLAIN]}$`),N("XRANGELOOSE",`^${u[m.GTLT]}\\s*${u[m.XRANGEPLAINLOOSE]}$`),N("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),N("COERCE",`${u[m.COERCEPLAIN]}(?:$|[^\\d])`),N("COERCEFULL",u[m.COERCEPLAIN]+`(?:${u[m.PRERELEASE]})?(?:${u[m.BUILD]})?(?:$|[^\\d])`),N("COERCERTL",u[m.COERCE],!0),N("COERCERTLFULL",u[m.COERCEFULL],!0),N("LONETILDE","(?:~>?)"),N("TILDETRIM",`(\\s*)${u[m.LONETILDE]}\\s+`,!0),e.tildeTrimReplace="$1~",N("TILDE",`^${u[m.LONETILDE]}${u[m.XRANGEPLAIN]}$`),N("TILDELOOSE",`^${u[m.LONETILDE]}${u[m.XRANGEPLAINLOOSE]}$`),N("LONECARET","(?:\\^)"),N("CARETTRIM",`(\\s*)${u[m.LONECARET]}\\s+`,!0),e.caretTrimReplace="$1^",N("CARET",`^${u[m.LONECARET]}${u[m.XRANGEPLAIN]}$`),N("CARETLOOSE",`^${u[m.LONECARET]}${u[m.XRANGEPLAINLOOSE]}$`),N("COMPARATORLOOSE",`^${u[m.GTLT]}\\s*(${u[m.LOOSEPLAIN]})$|^$`),N("COMPARATOR",`^${u[m.GTLT]}\\s*(${u[m.FULLPLAIN]})$|^$`),N("COMPARATORTRIM",`(\\s*)${u[m.GTLT]}\\s*(${u[m.LOOSEPLAIN]}|${u[m.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace="$1$2$3",N("HYPHENRANGE",`^\\s*(${u[m.XRANGEPLAIN]})\\s+-\\s+(${u[m.XRANGEPLAIN]})\\s*$`),N("HYPHENRANGELOOSE",`^\\s*(${u[m.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[m.XRANGEPLAINLOOSE]})\\s*$`),N("STAR","(<|>)?=?\\s*\\*"),N("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),N("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(Ru,Ru.exports);var Zi=Ru.exports;const mZ=Object.freeze({loose:!0}),hZ=Object.freeze({});var Iu=n=>n?typeof n!="object"?mZ:n:hZ;const iy=/^[0-9]+$/,ly=(n,e)=>{const r=iy.test(n),o=iy.test(e);return r&&o&&(n=+n,e=+e),n===e?0:r&&!o?-1:o&&!r?1:n<e?-1:1};var sy={compareIdentifiers:ly,rcompareIdentifiers:(n,e)=>ly(e,n)};const Bs=Vs,{MAX_LENGTH:cy,MAX_SAFE_INTEGER:Ts}=Ns,{safeRe:dy,safeSrc:uy,t:Rs}=Zi,gZ=Iu,{compareIdentifiers:ca}=sy;var Zt=class ar{constructor(e,r){if(r=gZ(r),e instanceof ar){if(e.loose===!!r.loose&&e.includePrerelease===!!r.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>cy)throw new TypeError(`version is longer than ${cy} characters`);Bs("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const o=e.trim().match(r.loose?dy[Rs.LOOSE]:dy[Rs.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>Ts||this.major<0)throw new TypeError("Invalid major version");if(this.minor>Ts||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>Ts||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){const l=+a;if(l>=0&&l<Ts)return l}return a}):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(Bs("SemVer.compare",this.version,this.options,e),!(e instanceof ar)){if(typeof e=="string"&&e===this.version)return 0;e=new ar(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof ar||(e=new ar(e,this.options)),ca(this.major,e.major)||ca(this.minor,e.minor)||ca(this.patch,e.patch)}comparePre(e){if(e instanceof ar||(e=new ar(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 r=0;do{const o=this.prerelease[r],a=e.prerelease[r];if(Bs("prerelease compare",r,o,a),o===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(o===void 0)return-1;if(o===a)continue;return ca(o,a)}while(++r)}compareBuild(e){e instanceof ar||(e=new ar(e,this.options));let r=0;do{const o=this.build[r],a=e.build[r];if(Bs("build compare",r,o,a),o===void 0&&a===void 0)return 0;if(a===void 0)return 1;if(o===void 0)return-1;if(o===a)continue;return ca(o,a)}while(++r)}inc(e,r,o){if(e.startsWith("pre")){if(!r&&o===!1)throw new Error("invalid increment argument: identifier is empty");if(r){const a=new RegExp(`^${this.options.loose?uy[Rs.PRERELEASELOOSE]:uy[Rs.PRERELEASE]}$`),l=`-${r}`.match(a);if(!l||l[1]!==r)throw new Error(`invalid identifier: ${r}`)}}switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",r,o);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",r,o);break;case"prepatch":this.prerelease.length=0,this.inc("patch",r,o),this.inc("pre",r,o);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",r,o),this.inc("pre",r,o);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;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 a=Number(o)?1:0;if(this.prerelease.length===0)this.prerelease=[a];else{let l=this.prerelease.length;for(;--l>=0;)typeof this.prerelease[l]=="number"&&(this.prerelease[l]++,l=-2);if(l===-1){if(r===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(r){let l=[r,a];o===!1&&(l=[r]),ca(this.prerelease[0],r)===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 py=Zt;var da=(n,e,r=!1)=>{if(n instanceof py)return n;try{return new py(n,e)}catch(o){if(!r)return null;throw o}};const yZ=da;var bZ=(n,e)=>{const r=yZ(n,e);return r?r.version:null};const _Z=da;var wZ=(n,e)=>{const r=_Z(n.trim().replace(/^[=v]+/,""),e);return r?r.version:null};const fy=Zt;var kZ=(n,e,r,o,a)=>{typeof r=="string"&&(a=o,o=r,r=void 0);try{return new fy(n instanceof fy?n.version:n,r).inc(e,o,a).version}catch{return null}};const my=da;var xZ=(n,e)=>{const r=my(n,null,!0),o=my(e,null,!0),a=r.compare(o);if(a===0)return null;const l=a>0,c=l?r:o,d=l?o:r,u=!!c.prerelease.length;if(!!d.prerelease.length&&!u){if(!d.patch&&!d.minor)return"major";if(d.compareMain(c)===0)return d.minor&&!d.patch?"minor":"patch"}const m=u?"pre":"";return r.major!==o.major?m+"major":r.minor!==o.minor?m+"minor":r.patch!==o.patch?m+"patch":"prerelease"};const vZ=Zt;var CZ=(n,e)=>new vZ(n,e).major;const SZ=Zt;var EZ=(n,e)=>new SZ(n,e).minor;const NZ=Zt;var VZ=(n,e)=>new NZ(n,e).patch;const BZ=da;var TZ=(n,e)=>{const r=BZ(n,e);return r&&r.prerelease.length?r.prerelease:null};const hy=Zt;var Bn=(n,e,r)=>new hy(n,r).compare(new hy(e,r));const RZ=Bn;var IZ=(n,e,r)=>RZ(e,n,r);const AZ=Bn;var LZ=(n,e)=>AZ(n,e,!0);const gy=Zt;var Au=(n,e,r)=>{const o=new gy(n,r),a=new gy(e,r);return o.compare(a)||o.compareBuild(a)};const OZ=Au;var $Z=(n,e)=>n.sort((r,o)=>OZ(r,o,e));const ZZ=Au;var MZ=(n,e)=>n.sort((r,o)=>ZZ(o,r,e));const FZ=Bn;var Is=(n,e,r)=>FZ(n,e,r)>0;const PZ=Bn;var Lu=(n,e,r)=>PZ(n,e,r)<0;const zZ=Bn;var yy=(n,e,r)=>zZ(n,e,r)===0;const DZ=Bn;var by=(n,e,r)=>DZ(n,e,r)!==0;const WZ=Bn;var Ou=(n,e,r)=>WZ(n,e,r)>=0;const GZ=Bn;var $u=(n,e,r)=>GZ(n,e,r)<=0;const UZ=yy,HZ=by,XZ=Is,jZ=Ou,YZ=Lu,KZ=$u;var _y=(n,e,r,o)=>{switch(e){case"===":return typeof n=="object"&&(n=n.version),typeof r=="object"&&(r=r.version),n===r;case"!==":return typeof n=="object"&&(n=n.version),typeof r=="object"&&(r=r.version),n!==r;case"":case"=":case"==":return UZ(n,r,o);case"!=":return HZ(n,r,o);case">":return XZ(n,r,o);case">=":return jZ(n,r,o);case"<":return YZ(n,r,o);case"<=":return KZ(n,r,o);default:throw new TypeError(`Invalid operator: ${e}`)}};const JZ=Zt,qZ=da,{safeRe:As,t:Ls}=Zi;var QZ=(n,e)=>{if(n instanceof JZ)return n;if(typeof n=="number"&&(n=String(n)),typeof n!="string")return null;e=e||{};let r=null;if(!e.rtl)r=n.match(e.includePrerelease?As[Ls.COERCEFULL]:As[Ls.COERCE]);else{const u=e.includePrerelease?As[Ls.COERCERTLFULL]:As[Ls.COERCERTL];let f;for(;(f=u.exec(n))&&(!r||r.index+r[0].length!==n.length);)(!r||f.index+f[0].length!==r.index+r[0].length)&&(r=f),u.lastIndex=f.index+f[1].length+f[2].length;u.lastIndex=-1}if(r===null)return null;const o=r[2],a=r[3]||"0",l=r[4]||"0",c=e.includePrerelease&&r[5]?`-${r[5]}`:"",d=e.includePrerelease&&r[6]?`+${r[6]}`:"";return qZ(`${o}.${a}.${l}${c}${d}`,e)},e3=class{constructor(){this.max=1e3,this.map=new Map}get(e){const r=this.map.get(e);if(r!==void 0)return this.map.delete(e),this.map.set(e,r),r}delete(e){return this.map.delete(e)}set(e,r){if(!this.delete(e)&&r!==void 0){if(this.map.size>=this.max){const a=this.map.keys().next().value;this.delete(a)}this.map.set(e,r)}return this}},Zu,wy;function Tn(){if(wy)return Zu;wy=1;const n=/\s+/g;class e{constructor(Z,U){if(U=a(U),Z instanceof e)return Z.loose===!!U.loose&&Z.includePrerelease===!!U.includePrerelease?Z:new e(Z.raw,U);if(Z instanceof l)return this.raw=Z.value,this.set=[[Z]],this.formatted=void 0,this;if(this.options=U,this.loose=!!U.loose,this.includePrerelease=!!U.includePrerelease,this.raw=Z.trim().replace(n," "),this.set=this.raw.split("||").map(F=>this.parseRange(F.trim())).filter(F=>F.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const F=this.set[0];if(this.set=this.set.filter(j=>!N(j[0])),this.set.length===0)this.set=[F];else if(this.set.length>1){for(const j of this.set)if(j.length===1&&T(j[0])){this.set=[j];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let Z=0;Z<this.set.length;Z++){Z>0&&(this.formatted+="||");const U=this.set[Z];for(let F=0;F<U.length;F++)F>0&&(this.formatted+=" "),this.formatted+=U[F].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(Z){const F=((this.options.includePrerelease&&_)|(this.options.loose&&C))+":"+Z,j=o.get(F);if(j)return j;const ee=this.options.loose,ue=ee?u[f.HYPHENRANGELOOSE]:u[f.HYPHENRANGE];Z=Z.replace(ue,L(this.options.includePrerelease)),c("hyphen replace",Z),Z=Z.replace(u[f.COMPARATORTRIM],m),c("comparator trim",Z),Z=Z.replace(u[f.TILDETRIM],g),c("tilde trim",Z),Z=Z.replace(u[f.CARETTRIM],y),c("caret trim",Z);let ye=Z.split(" ").map(Ye=>W(Ye,this.options)).join(" ").split(/\s+/).map(Ye=>v(Ye,this.options));ee&&(ye=ye.filter(Ye=>(c("loose invalid filter",Ye,this.options),!!Ye.match(u[f.COMPARATORLOOSE])))),c("range list",ye);const Ce=new Map,He=ye.map(Ye=>new l(Ye,this.options));for(const Ye of He){if(N(Ye))return[Ye];Ce.set(Ye.value,Ye)}Ce.size>1&&Ce.has("")&&Ce.delete("");const Ct=[...Ce.values()];return o.set(F,Ct),Ct}intersects(Z,U){if(!(Z instanceof e))throw new TypeError("a Range is required");return this.set.some(F=>$(F,U)&&Z.set.some(j=>$(j,U)&&F.every(ee=>j.every(ue=>ee.intersects(ue,U)))))}test(Z){if(!Z)return!1;if(typeof Z=="string")try{Z=new d(Z,this.options)}catch{return!1}for(let U=0;U<this.set.length;U++)if(V(this.set[U],Z,this.options))return!0;return!1}}Zu=e;const r=e3,o=new r,a=Iu,l=Os(),c=Vs,d=Zt,{safeRe:u,t:f,comparatorTrimReplace:m,tildeTrimReplace:g,caretTrimReplace:y}=Zi,{FLAG_INCLUDE_PRERELEASE:_,FLAG_LOOSE:C}=Ns,N=k=>k.value==="<0.0.0-0",T=k=>k.value==="",$=(k,Z)=>{let U=!0;const F=k.slice();let j=F.pop();for(;U&&F.length;)U=F.every(ee=>j.intersects(ee,Z)),j=F.pop();return U},W=(k,Z)=>(c("comp",k,Z),k=B(k,Z),c("caret",k),k=D(k,Z),c("tildes",k),k=H(k,Z),c("xrange",k),k=I(k,Z),c("stars",k),k),E=k=>!k||k.toLowerCase()==="x"||k==="*",D=(k,Z)=>k.trim().split(/\s+/).map(U=>A(U,Z)).join(" "),A=(k,Z)=>{const U=Z.loose?u[f.TILDELOOSE]:u[f.TILDE];return k.replace(U,(F,j,ee,ue,ye)=>{c("tilde",k,F,j,ee,ue,ye);let Ce;return E(j)?Ce="":E(ee)?Ce=`>=${j}.0.0 <${+j+1}.0.0-0`:E(ue)?Ce=`>=${j}.${ee}.0 <${j}.${+ee+1}.0-0`:ye?(c("replaceTilde pr",ye),Ce=`>=${j}.${ee}.${ue}-${ye} <${j}.${+ee+1}.0-0`):Ce=`>=${j}.${ee}.${ue} <${j}.${+ee+1}.0-0`,c("tilde return",Ce),Ce})},B=(k,Z)=>k.trim().split(/\s+/).map(U=>P(U,Z)).join(" "),P=(k,Z)=>{c("caret",k,Z);const U=Z.loose?u[f.CARETLOOSE]:u[f.CARET],F=Z.includePrerelease?"-0":"";return k.replace(U,(j,ee,ue,ye,Ce)=>{c("caret",k,j,ee,ue,ye,Ce);let He;return E(ee)?He="":E(ue)?He=`>=${ee}.0.0${F} <${+ee+1}.0.0-0`:E(ye)?ee==="0"?He=`>=${ee}.${ue}.0${F} <${ee}.${+ue+1}.0-0`:He=`>=${ee}.${ue}.0${F} <${+ee+1}.0.0-0`:Ce?(c("replaceCaret pr",Ce),ee==="0"?ue==="0"?He=`>=${ee}.${ue}.${ye}-${Ce} <${ee}.${ue}.${+ye+1}-0`:He=`>=${ee}.${ue}.${ye}-${Ce} <${ee}.${+ue+1}.0-0`:He=`>=${ee}.${ue}.${ye}-${Ce} <${+ee+1}.0.0-0`):(c("no pr"),ee==="0"?ue==="0"?He=`>=${ee}.${ue}.${ye}${F} <${ee}.${ue}.${+ye+1}-0`:He=`>=${ee}.${ue}.${ye}${F} <${ee}.${+ue+1}.0-0`:He=`>=${ee}.${ue}.${ye} <${+ee+1}.0.0-0`),c("caret return",He),He})},H=(k,Z)=>(c("replaceXRanges",k,Z),k.split(/\s+/).map(U=>S(U,Z)).join(" ")),S=(k,Z)=>{k=k.trim();const U=Z.loose?u[f.XRANGELOOSE]:u[f.XRANGE];return k.replace(U,(F,j,ee,ue,ye,Ce)=>{c("xRange",k,F,j,ee,ue,ye,Ce);const He=E(ee),Ct=He||E(ue),Ye=Ct||E(ye),Ht=Ye;return j==="="&&Ht&&(j=""),Ce=Z.includePrerelease?"-0":"",He?j===">"||j==="<"?F="<0.0.0-0":F="*":j&&Ht?(Ct&&(ue=0),ye=0,j===">"?(j=">=",Ct?(ee=+ee+1,ue=0,ye=0):(ue=+ue+1,ye=0)):j==="<="&&(j="<",Ct?ee=+ee+1:ue=+ue+1),j==="<"&&(Ce="-0"),F=`${j+ee}.${ue}.${ye}${Ce}`):Ct?F=`>=${ee}.0.0${Ce} <${+ee+1}.0.0-0`:Ye&&(F=`>=${ee}.${ue}.0${Ce} <${ee}.${+ue+1}.0-0`),c("xRange return",F),F})},I=(k,Z)=>(c("replaceStars",k,Z),k.trim().replace(u[f.STAR],"")),v=(k,Z)=>(c("replaceGTE0",k,Z),k.trim().replace(u[Z.includePrerelease?f.GTE0PRE:f.GTE0],"")),L=k=>(Z,U,F,j,ee,ue,ye,Ce,He,Ct,Ye,Ht)=>(E(F)?U="":E(j)?U=`>=${F}.0.0${k?"-0":""}`:E(ee)?U=`>=${F}.${j}.0${k?"-0":""}`:ue?U=`>=${U}`:U=`>=${U}${k?"-0":""}`,E(He)?Ce="":E(Ct)?Ce=`<${+He+1}.0.0-0`:E(Ye)?Ce=`<${He}.${+Ct+1}.0-0`:Ht?Ce=`<=${He}.${Ct}.${Ye}-${Ht}`:k?Ce=`<${He}.${Ct}.${+Ye+1}-0`:Ce=`<=${Ce}`,`${U} ${Ce}`.trim()),V=(k,Z,U)=>{for(let F=0;F<k.length;F++)if(!k[F].test(Z))return!1;if(Z.prerelease.length&&!U.includePrerelease){for(let F=0;F<k.length;F++)if(c(k[F].semver),k[F].semver!==l.ANY&&k[F].semver.prerelease.length>0){const j=k[F].semver;if(j.major===Z.major&&j.minor===Z.minor&&j.patch===Z.patch)return!0}return!1}return!0};return Zu}var Mu,ky;function Os(){if(ky)return Mu;ky=1;const n=Symbol("SemVer ANY");class e{static get ANY(){return n}constructor(m,g){if(g=r(g),m instanceof e){if(m.loose===!!g.loose)return m;m=m.value}m=m.trim().split(/\s+/).join(" "),c("comparator",m,g),this.options=g,this.loose=!!g.loose,this.parse(m),this.semver===n?this.value="":this.value=this.operator+this.semver.version,c("comp",this)}parse(m){const g=this.options.loose?o[a.COMPARATORLOOSE]:o[a.COMPARATOR],y=m.match(g);if(!y)throw new TypeError(`Invalid comparator: ${m}`);this.operator=y[1]!==void 0?y[1]:"",this.operator==="="&&(this.operator=""),y[2]?this.semver=new d(y[2],this.options.loose):this.semver=n}toString(){return this.value}test(m){if(c("Comparator.test",m,this.options.loose),this.semver===n||m===n)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,g){if(!(m instanceof e))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new u(m.value,g).test(this.value):m.operator===""?m.value===""?!0:new u(this.value,g).test(m.semver):(g=r(g),g.includePrerelease&&(this.value==="<0.0.0-0"||m.value==="<0.0.0-0")||!g.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,g)&&this.operator.startsWith(">")&&m.operator.startsWith("<")||l(this.semver,">",m.semver,g)&&this.operator.startsWith("<")&&m.operator.startsWith(">")))}}Mu=e;const r=Iu,{safeRe:o,t:a}=Zi,l=_y,c=Vs,d=Zt,u=Tn();return Mu}const t3=Tn();var $s=(n,e,r)=>{try{e=new t3(e,r)}catch{return!1}return e.test(n)};const n3=Tn();var r3=(n,e)=>new n3(n,e).set.map(r=>r.map(o=>o.value).join(" ").trim().split(" "));const o3=Zt,a3=Tn();var i3=(n,e,r)=>{let o=null,a=null,l=null;try{l=new a3(e,r)}catch{return null}return n.forEach(c=>{l.test(c)&&(!o||a.compare(c)===-1)&&(o=c,a=new o3(o,r))}),o};const l3=Zt,s3=Tn();var c3=(n,e,r)=>{let o=null,a=null,l=null;try{l=new s3(e,r)}catch{return null}return n.forEach(c=>{l.test(c)&&(!o||a.compare(c)===1)&&(o=c,a=new l3(o,r))}),o};const Fu=Zt,d3=Tn(),xy=Is;var u3=(n,e)=>{n=new d3(n,e);let r=new Fu("0.0.0");if(n.test(r)||(r=new Fu("0.0.0-0"),n.test(r)))return r;r=null;for(let o=0;o<n.set.length;++o){const a=n.set[o];let l=null;a.forEach(c=>{const d=new Fu(c.semver.version);switch(c.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!l||xy(d,l))&&(l=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),l&&(!r||xy(r,l))&&(r=l)}return r&&n.test(r)?r:null};const p3=Tn();var f3=(n,e)=>{try{return new p3(n,e).range||"*"}catch{return null}};const m3=Zt,vy=Os(),{ANY:h3}=vy,g3=Tn(),y3=$s,Cy=Is,Sy=Lu,b3=$u,_3=Ou;var Pu=(n,e,r,o)=>{n=new m3(n,o),e=new g3(e,o);let a,l,c,d,u;switch(r){case">":a=Cy,l=b3,c=Sy,d=">",u=">=";break;case"<":a=Sy,l=_3,c=Cy,d="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(y3(n,e,o))return!1;for(let f=0;f<e.set.length;++f){const m=e.set[f];let g=null,y=null;if(m.forEach(_=>{_.semver===h3&&(_=new vy(">=0.0.0")),g=g||_,y=y||_,a(_.semver,g.semver,o)?g=_:c(_.semver,y.semver,o)&&(y=_)}),g.operator===d||g.operator===u||(!y.operator||y.operator===d)&&l(n,y.semver))return!1;if(y.operator===u&&c(n,y.semver))return!1}return!0};const w3=Pu;var k3=(n,e,r)=>w3(n,e,">",r);const x3=Pu;var v3=(n,e,r)=>x3(n,e,"<",r);const Ey=Tn();var C3=(n,e,r)=>(n=new Ey(n,r),e=new Ey(e,r),n.intersects(e,r));const S3=$s,E3=Bn;var N3=(n,e,r)=>{const o=[];let a=null,l=null;const c=n.sort((m,g)=>E3(m,g,r));for(const m of c)S3(m,e,r)?(l=m,a||(a=m)):(l&&o.push([a,l]),l=null,a=null);a&&o.push([a,null]);const d=[];for(const[m,g]of o)m===g?d.push(m):!g&&m===c[0]?d.push("*"):g?m===c[0]?d.push(`<=${g}`):d.push(`${m} - ${g}`):d.push(`>=${m}`);const u=d.join(" || "),f=typeof e.raw=="string"?e.raw:String(e);return u.length<f.length?u:e};const Ny=Tn(),zu=Os(),{ANY:Du}=zu,Mi=$s,Wu=Bn,V3=(n,e,r={})=>{if(n===e)return!0;n=new Ny(n,r),e=new Ny(e,r);let o=!1;e:for(const a of n.set){for(const l of e.set){const c=T3(a,l,r);if(o=o||c!==null,c)continue e}if(o)return!1}return!0},B3=[new zu(">=0.0.0-0")],Vy=[new zu(">=0.0.0")],T3=(n,e,r)=>{if(n===e)return!0;if(n.length===1&&n[0].semver===Du){if(e.length===1&&e[0].semver===Du)return!0;r.includePrerelease?n=B3:n=Vy}if(e.length===1&&e[0].semver===Du){if(r.includePrerelease)return!0;e=Vy}const o=new Set;let a,l;for(const _ of n)_.operator===">"||_.operator===">="?a=By(a,_,r):_.operator==="<"||_.operator==="<="?l=Ty(l,_,r):o.add(_.semver);if(o.size>1)return null;let c;if(a&&l){if(c=Wu(a.semver,l.semver,r),c>0)return null;if(c===0&&(a.operator!==">="||l.operator!=="<="))return null}for(const _ of o){if(a&&!Mi(_,String(a),r)||l&&!Mi(_,String(l),r))return null;for(const C of e)if(!Mi(_,String(C),r))return!1;return!0}let d,u,f,m,g=l&&!r.includePrerelease&&l.semver.prerelease.length?l.semver:!1,y=a&&!r.includePrerelease&&a.semver.prerelease.length?a.semver:!1;g&&g.prerelease.length===1&&l.operator==="<"&&g.prerelease[0]===0&&(g=!1);for(const _ of e){if(m=m||_.operator===">"||_.operator===">=",f=f||_.operator==="<"||_.operator==="<=",a){if(y&&_.semver.prerelease&&_.semver.prerelease.length&&_.semver.major===y.major&&_.semver.minor===y.minor&&_.semver.patch===y.patch&&(y=!1),_.operator===">"||_.operator===">="){if(d=By(a,_,r),d===_&&d!==a)return!1}else if(a.operator===">="&&!Mi(a.semver,String(_),r))return!1}if(l){if(g&&_.semver.prerelease&&_.semver.prerelease.length&&_.semver.major===g.major&&_.semver.minor===g.minor&&_.semver.patch===g.patch&&(g=!1),_.operator==="<"||_.operator==="<="){if(u=Ty(l,_,r),u===_&&u!==l)return!1}else if(l.operator==="<="&&!Mi(l.semver,String(_),r))return!1}if(!_.operator&&(l||a)&&c!==0)return!1}return!(a&&f&&!l&&c!==0||l&&m&&!a&&c!==0||y||g)},By=(n,e,r)=>{if(!n)return e;const o=Wu(n.semver,e.semver,r);return o>0?n:o<0||e.operator===">"&&n.operator===">="?e:n},Ty=(n,e,r)=>{if(!n)return e;const o=Wu(n.semver,e.semver,r);return o<0?n:o>0||e.operator==="<"&&n.operator==="<="?e:n};var R3=V3;const Gu=Zi,Ry=Ns,I3=Zt,Iy=sy,A3=da,L3=bZ,O3=wZ,$3=kZ,Z3=xZ,M3=CZ,F3=EZ,P3=VZ,z3=TZ,D3=Bn,W3=IZ,G3=LZ,U3=Au,H3=$Z,X3=MZ,j3=Is,Y3=Lu,K3=yy,J3=by,q3=Ou,Q3=$u,eM=_y,tM=QZ,nM=Os(),rM=Tn();var oM={parse:A3,valid:L3,clean:O3,inc:$3,diff:Z3,major:M3,minor:F3,patch:P3,prerelease:z3,compare:D3,rcompare:W3,compareLoose:G3,compareBuild:U3,sort:H3,rsort:X3,gt:j3,lt:Y3,eq:K3,neq:J3,gte:q3,lte:Q3,cmp:eM,coerce:tM,Comparator:nM,Range:rM,satisfies:$s,toComparators:r3,maxSatisfying:i3,minSatisfying:c3,minVersion:u3,validRange:f3,outside:Pu,gtr:k3,ltr:v3,intersects:C3,simplifyRange:N3,subset:R3,SemVer:I3,re:Gu.re,src:Gu.src,tokens:Gu.t,SEMVER_SPEC_VERSION:Ry.SEMVER_SPEC_VERSION,RELEASE_TYPES:Ry.RELEASE_TYPES,compareIdentifiers:Iy.compareIdentifiers,rcompareIdentifiers:Iy.rcompareIdentifiers};const aM=Dc(oM);function iM(n){return Er(n.id)}function lM(n){switch(n){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: ${n}`)}}const sM=["isNotNA","isNA","number_equals","number_notEquals","number_greaterThan","number_greaterThanOrEqualTo","number_lessThan","number_lessThanOrEqualTo","number_between"],cM=["isNotNA","isNA","string_equals","string_notEquals","string_contains","string_doesNotContain","string_matches","string_doesNotMatch","string_containsFuzzyMatch"],dM=["number_equals","number_notEquals","string_equals","string_notEquals"],Ay=n=>dM.includes(n),uM=n=>Ay(n.type);function Ly(n,e){var r,o;return((o=(r=n.spec.annotations)==null?void 0:r["pl7.app/label"])==null?void 0:o.trim())??"Unlabeled "+n.type+" "+e.toString()}function pM(n){const e=n.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 n.reference;case"number_between":return n.lowerBound;case"string_equals":case"string_notEquals":case"string_contains":case"string_doesNotContain":case"string_matches":case"string_doesNotMatch":case"string_containsFuzzyMatch":return n.reference;default:throw Error(`unsupported filter type: ${e}`)}}function Oy(n,e){switch(n){case"isNotNA":case"isNA":return{type:n};case"number_equals":case"number_notEquals":case"number_greaterThan":case"number_greaterThanOrEqualTo":case"number_lessThan":case"number_lessThanOrEqualTo":return{type:n,reference:typeof e=="number"?e:0};case"number_between":return{type:n,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:n,reference:typeof e=="string"?e:""};case"string_containsFuzzyMatch":return{type:n,reference:typeof e=="string"?e:"",maxEdits:2,substitutionsOnly:!1,wildcard:void 0};default:throw Error(`unsupported filter type: ${n}`)}}function fM(n,e,r){let o=pM(n.filter);return Ay(e)&&r!==void 0&&r.length>0&&!Me.find(r,a=>a.value===o)&&(o=r[0].value),{columnId:n.columnId,filter:Oy(e,o),disabled:n.disabled}}function Uu(n,e){var c,d;const r=Number(e);if(!Number.isFinite(r))throw Error("Model value is not a number.");const o=n.type==="column"?n.spec.valueType:n.spec.type;if((o==="Int"||o==="Long")&&!Number.isInteger(r))throw Error("Model value is not an integer.");const a=(c=n.spec.annotations)==null?void 0:c["pl7.app/min"];if(a!==void 0){const u=Number(a);if(Number.isFinite(u)&&r<Number(a))throw Error("Model value is too low.")}const l=(d=n.spec.annotations)==null?void 0:d["pl7.app/max"];if(l!==void 0){const u=Number(l);if(Number.isFinite(u)&&r>Number(l))throw Error("Model value is too high.")}return r}function $y(n,e){var o,a;const r=((o=n.spec.domain)==null?void 0:o["pl7.app/alphabet"])??((a=n.spec.annotations)==null?void 0:a["pl7.app/alphabet"]);if(r==="nucleotide"&&!/^[AaTtGgCcNn]+$/.test(e))throw Error("Model value is not a nucleotide.");if(r==="aminoacid"&&!/^[AaCcDdEeFfGgHhIiKkLlMmNnPpQqRrSsTtVvWwYyXx*_]+$/.test(e))throw Error("Model value is not an aminoacid.");return e}function mM(n){try{return new RegExp(n),n}catch(e){throw e instanceof SyntaxError?Error("Model value is not a regexp."):e}}function hM(n,e){var a,l;const r=((a=n.spec.domain)==null?void 0:a["pl7.app/alphabet"])??((l=n.spec.annotations)==null?void 0:l["pl7.app/alphabet"]);if(r==="nucleotide")return[{label:"N",value:"N"}];if(r==="aminoacid")return[{label:"X",value:"X"}];const o=Me.uniq(e);return o.sort(),o.map(c=>({label:c,value:c}))}function gM(n){var o;const e=(o=n.spec.annotations)==null?void 0:o["pl7.app/discreteValues"];return e?JSON.parse(e).map(a=>({label:a.toString(),value:a})):[]}function yM(n,e){var a,l;const r=aM.gt(uo().sdkInfo.sdkVersion,"1.14.0")&&(n.type==="column"?n.spec.valueType:n.spec.type)==="String"&&(((a=n.spec.domain)==null?void 0:a["pl7.app/alphabet"])??((l=n.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:r?"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:r?"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:r?"StringIContains":"StringContains",substring:e.reference};case"string_doesNotContain":return{operator:"Not",operand:{operator:r?"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:r?"StringIContainsFuzzy":"StringContainsFuzzy",reference:e.reference,maxEdits:e.maxEdits,substitutionsOnly:e.substitutionsOnly,wildcard:e.wildcard};default:throw Error(`unsupported filter type: ${o}`)}}const bM={class:"d-flex flex-column gap-24"},Zy=t.defineComponent({__name:"PlTableFilterEntry",props:t.mergeModels({column:{},options:{},disabled:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=t.useModel(n,"modelValue"),r=n,{column:o,options:a}=t.toRefs(r),l=t.computed(()=>gM(o.value));return(c,d)=>(t.openBlock(),t.createElementBlock("div",bM,[t.createVNode(t.unref($r),{"model-value":e.value.filter.type,options:t.unref(a),disabled:c.disabled,label:"Predicate","onUpdate:modelValue":d[0]||(d[0]=u=>e.value=t.unref(fM)(e.value,u,l.value))},null,8,["model-value","options","disabled"]),l.value.length>0&&t.unref(uM)(e.value.filter)?(t.openBlock(),t.createBlock(t.unref($r),{key:0,modelValue:e.value.filter.reference,"onUpdate:modelValue":d[1]||(d[1]=u=>e.value.filter.reference=u),options:l.value},null,8,["modelValue","options"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[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"?(t.openBlock(),t.createBlock(t.unref(fo),{key:0,modelValue:e.value.filter.reference,"onUpdate:modelValue":d[2]||(d[2]=u=>e.value.filter.reference=u),disabled:c.disabled,parse:u=>t.unref(Uu)(t.unref(o),u),label:"Reference value"},null,8,["modelValue","disabled","parse"])):t.createCommentVNode("",!0),e.value.filter.type==="number_between"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[t.createVNode(t.unref(fo),{modelValue:e.value.filter.lowerBound,"onUpdate:modelValue":d[3]||(d[3]=u=>e.value.filter.lowerBound=u),disabled:c.disabled,parse:u=>t.unref(Uu)(t.unref(o),u),label:"Lower bound"},null,8,["modelValue","disabled","parse"]),t.createVNode(t.unref(Ml),{modelValue:e.value.filter.includeLowerBound,"onUpdate:modelValue":d[4]||(d[4]=u=>e.value.filter.includeLowerBound=u),disabled:c.disabled,label:"Include lower bound"},null,8,["modelValue","disabled"]),t.createVNode(t.unref(fo),{modelValue:e.value.filter.upperBound,"onUpdate:modelValue":d[5]||(d[5]=u=>e.value.filter.upperBound=u),disabled:c.disabled,parse:u=>t.unref(Uu)(t.unref(o),u),label:"Upper bound"},null,8,["modelValue","disabled","parse"]),t.createVNode(t.unref(Ml),{modelValue:e.value.filter.includeUpperBound,"onUpdate:modelValue":d[6]||(d[6]=u=>e.value.filter.includeUpperBound=u),disabled:c.disabled,label:"Include upper bound"},null,8,["modelValue","disabled"])],64)):t.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"?(t.openBlock(),t.createBlock(t.unref(fo),{key:2,modelValue:e.value.filter.reference,"onUpdate:modelValue":d[7]||(d[7]=u=>e.value.filter.reference=u),disabled:c.disabled,parse:u=>t.unref($y)(t.unref(o),u),label:"Reference value"},null,8,["modelValue","disabled","parse"])):t.createCommentVNode("",!0),e.value.filter.type==="string_matches"||e.value.filter.type==="string_doesNotMatch"?(t.openBlock(),t.createBlock(t.unref(fo),{key:3,modelValue:e.value.filter.reference,"onUpdate:modelValue":d[8]||(d[8]=u=>e.value.filter.reference=u),disabled:c.disabled,parse:t.unref(mM),label:"Reference value"},null,8,["modelValue","disabled","parse"])):t.createCommentVNode("",!0),e.value.filter.type==="string_containsFuzzyMatch"?(t.openBlock(),t.createElementBlock(t.Fragment,{key:4},[t.createVNode(t.unref(fo),{modelValue:e.value.filter.reference,"onUpdate:modelValue":d[9]||(d[9]=u=>e.value.filter.reference=u),disabled:c.disabled,parse:u=>t.unref($y)(t.unref(o),u),label:"Reference value"},null,8,["modelValue","disabled","parse"]),t.createVNode(t.unref($g),{modelValue:e.value.filter.maxEdits,"onUpdate:modelValue":d[10]||(d[10]=u=>e.value.filter.maxEdits=u),max:5,disabled:c.disabled,breakpoints:"",label:"Maximum nuber of substitutions and indels"},null,8,["modelValue","disabled"]),t.createVNode(t.unref(Ml),{modelValue:e.value.filter.substitutionsOnly,"onUpdate:modelValue":d[11]||(d[11]=u=>e.value.filter.substitutionsOnly=u),disabled:c.disabled,label:"Substitutions only"},null,8,["modelValue","disabled"]),t.createVNode(t.unref($r),{modelValue:e.value.filter.wildcard,"onUpdate:modelValue":d[12]||(d[12]=u=>e.value.filter.wildcard=u),disabled:c.disabled,options:t.unref(hM)(t.unref(o),e.value.filter.reference),clearable:"",label:"Wildcard symbol"},null,8,["modelValue","disabled","options"])],64)):t.createCommentVNode("",!0)],64))]))}}),_M={class:"d-flex flex-column gap-24"},wM={key:0,class:"text-subtitle-m",style:{color:"var(--txt-mask)"}},kM=t.defineComponent({__name:"PlTableAddFilter",props:t.mergeModels({columnsById:{},columnOptions:{},filterOptions:{},makeFilter:{type:Function}},{modelValue:{type:Boolean,required:!0},modelModifiers:{}}),emits:t.mergeModels(["addFilter"],["update:modelValue"]),setup(n,{emit:e}){const r=t.useModel(n,"modelValue"),o=n,{columnsById:a,columnOptions:l,filterOptions:c}=t.toRefs(o),d=e,u=t.ref(),f=t.ref();t.watch(()=>u.value,y=>{y?f.value=o.makeFilter(y):f.value=void 0});const m=()=>{u.value=void 0,r.value=!1},g=()=>{f.value&&(d("addFilter",f.value),m())};return(y,_)=>(t.openBlock(),t.createBlock(t.unref(Ko),{modelValue:r.value,"onUpdate:modelValue":_[2]||(_[2]=C=>r.value=C),"close-on-outside-click":!1},{title:t.withCtx(()=>_[3]||(_[3]=[t.createTextVNode("Add Filter")])),actions:t.withCtx(()=>[t.createVNode(t.unref(Rl),{disabled:!f.value,onClick:g},{default:t.withCtx(()=>_[4]||(_[4]=[t.createTextVNode("Add Filter")])),_:1},8,["disabled"]),t.createVNode(t.unref(cr),{"justify-center":!1,onClick:m},{default:t.withCtx(()=>_[5]||(_[5]=[t.createTextVNode("Cancel")])),_:1})]),default:t.withCtx(()=>[t.createElementVNode("div",_M,[t.createVNode(t.unref($r),{modelValue:u.value,"onUpdate:modelValue":_[0]||(_[0]=C=>u.value=C),options:t.unref(l),label:"Column",placeholder:"Choose..."},null,8,["modelValue","options"]),f.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",wM,"Choose a column to view and adjust its options")),f.value?(t.openBlock(),t.createBlock(Zy,{key:1,modelValue:f.value,"onUpdate:modelValue":_[1]||(_[1]=C=>f.value=C),column:t.unref(a)[f.value.columnId],options:t.unref(c)[f.value.columnId]},null,8,["modelValue","column","options"])):t.createCommentVNode("",!0)])]),_:1},8,["modelValue"]))}}),xM=["onClick"],vM={class:"pl-filter-manager__expand-icon"},CM={class:"pl-filter-manager__title flex-grow-1 text-s-btn"},SM={class:"pl-filter-manager__actions d-flex gap-12"},EM=["onClick"],NM=["onClick"],VM={class:"pl-filter-manager__content d-flex gap-24 p-24 flex-column"},BM={class:"d-flex justify-center"},TM=["onClick"],RM={class:"pl-filter-manager__add-btn-icon"},IM={key:0},AM=t.defineComponent({__name:"PlTableFilters",props:t.mergeModels({columns:{},restrictions:{},defaults:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=t.useModel(n,"modelValue"),r=n,{columns:o,restrictions:a,defaults:l}=t.toRefs(r),c=t.computed(()=>{const v=o.value.filter(V=>{const k=V.type;switch(k){case"axis":return V.spec.type!=="Bytes";case"column":return V.spec.valueType!=="Bytes";default:throw Error(`unsupported data type: ${k}`)}}),L={};for(const V of v)L[iM(V)]=V;return L}),d=t.computed(()=>{const v=a.value??[],L={};for(const[V,k]of Object.entries(c.value)){const Z=Me.find(v,U=>Me.isEqual(U.column.id,k.id));Z&&(L[V]=Z.allowedFilterTypes)}return L}),u=t.computed(()=>{const v=l.value??[],L={};for(const[V,k]of Object.entries(c.value)){const Z=Me.find(v,U=>Me.isEqual(U.column.id,k.id));Z&&(L[V]={columnId:V,filter:Z.default,disabled:!1})}return L});(()=>{const v=e.value.state;typeof v=="object"&&!Array.isArray(v)&&(e.value.state=Object.entries(v).map(([L,V])=>({columnId:L,filter:V,disabled:!1})))})();const f=v=>v??Object.values(u.value),m=t.reactive({state:f(e.value.state)});t.watch(()=>e.value,v=>{Me.isEqual(m.state,v.state)||(m.state=f(v.state))}),t.watch(()=>m,v=>{Me.isEqual(v.state,e.value.state)||(e.value={state:Me.cloneDeep(v.state),filters:v.state.filter(L=>!L.disabled).map(L=>{const V=c.value[L.columnId],{spec:k,...Z}=V;return{type:"bySingleColumnV2",column:Z,predicate:yM(V,L.filter)}})})},{immediate:!0,deep:!0}),t.watch(()=>c.value,v=>{Object.keys(v).length===0&&m.state!==void 0||(m.state=m.state.filter(L=>!!v[L.columnId]))},{immediate:!0});const g=t.computed(()=>Object.keys(c).length>0&&m.state.length>0),y=t.computed(()=>{const v=d.value,L={};for(const[V,k]of Object.entries(c.value)){let U=(k.type==="column"?k.spec.valueType:k.spec.type)==="String"?cM:sM;const F=v[V];F&&(U=U.filter(j=>F.includes(j))),L[V]=U.map(j=>({value:j,text:lM(j)}))}return L}),_=t.computed(()=>Me.some(Object.values(y.value),v=>v.length>0)),C=t.computed(()=>Object.entries(Object.entries(c.value)).filter(([v,[L,V]])=>y.value[L].length>0).filter(([v,[L,V]])=>!m.state.some(k=>k.columnId===L)).map(([v,[L,V]])=>({label:Ly(V,v),value:L}))),N=v=>u.value[v]??{columnId:v,filter:Oy(y.value[v][0].value),disabled:!1},T=v=>{m.state[v]=N(m.state[v].columnId)},$=v=>m.state.splice(v,1),W=t.ref(!1),E=t.ref(!1),D=t.ref(!1);t.onMounted(()=>{D.value=!0});const A=t.reactive({}),B=v=>{A[v]?delete A[v]:A[v]=!0},P=t.ref(!1),H=t.ref();let S;t.onMounted(()=>{S=new ResizeObserver(()=>{var L;const v=(L=H.value)==null?void 0:L.parentElement;v&&(P.value=v.scrollHeight>v.clientHeight||v.scrollWidth>v.clientWidth)}),H.value&&H.value.parentElement&&S.observe(H.value.parentElement)}),t.watch(H,(v,L)=>{L!=null&&L.parentElement&&S.unobserve(L.parentElement),v!=null&&v.parentElement&&S.observe(v.parentElement)}),t.onBeforeUnmount(()=>{S!==void 0&&S.disconnect()});const I=Es();return(v,L)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[D.value&&t.unref(I)?(t.openBlock(),t.createBlock(t.Teleport,{key:0,to:t.unref(I)},[t.createVNode(t.unref(cr),{onClick:L[0]||(L[0]=t.withModifiers(V=>W.value=!0,["stop"]))},{append:t.withCtx(()=>[t.createVNode(t.unref(Yo),{name:g.value?"filter-on":"filter"},null,8,["name"])]),default:t.withCtx(()=>[L[5]||(L[5]=t.createTextVNode(" Filters "))]),_:1})],8,["to"])):t.createCommentVNode("",!0),t.createVNode(t.unref(Ko),{modelValue:W.value,"onUpdate:modelValue":L[2]||(L[2]=V=>W.value=V),"close-on-outside-click":!1},{title:t.withCtx(()=>L[6]||(L[6]=[t.createTextVNode("Manage Filters")])),default:t.withCtx(()=>[t.createElementVNode("div",{ref_key:"filterManager",ref:H,class:"pl-filter-manager d-flex flex-column gap-6"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(m.state,(V,k)=>(t.openBlock(),t.createElementBlock("div",{key:V.columnId,class:t.normalizeClass([{open:A[V.columnId],disabled:V.disabled},"pl-filter-manager__filter"])},[t.createElementVNode("div",{class:"pl-filter-manager__header d-flex align-center gap-8",onClick:Z=>B(V.columnId)},[t.createElementVNode("div",vM,[t.createVNode(t.unref(qt),{name:"chevron-right"})]),t.createElementVNode("div",CM,t.toDisplayString(t.unref(Ly)(c.value[V.columnId],k)),1),t.createElementVNode("div",SM,[t.createElementVNode("div",{class:"pl-filter-manager__toggle",onClick:t.withModifiers(Z=>V.disabled=!V.disabled,["stop"])},[t.createVNode(t.unref(at),{name:V.disabled?"view-hide":"view-show"},null,8,["name"])],8,EM),t.createElementVNode("div",{class:"pl-filter-manager__delete",onClick:t.withModifiers(Z=>$(k),["stop"])},[t.createVNode(t.unref(at),{name:"close"})],8,NM)])],8,xM),t.createElementVNode("div",VM,[t.createVNode(Zy,{modelValue:m.state[k],"onUpdate:modelValue":Z=>m.state[k]=Z,disabled:V.disabled,column:c.value[V.columnId],options:y.value[V.columnId]},null,8,["modelValue","onUpdate:modelValue","disabled","column","options"]),t.createElementVNode("div",BM,[t.createElementVNode("div",{class:t.normalizeClass([{disabled:V.disabled},"pl-filter-manager__revert-btn text-s-btn d-flex align-center gap-8"]),onClick:Z=>T(k)},[L[7]||(L[7]=t.createTextVNode(" Revert Settings to Default ")),t.createVNode(t.unref(at),{name:"reverse"})],10,TM)])])],2))),128)),t.createElementVNode("div",{class:t.normalizeClass([{"pt-24":P.value},"pl-filter-manager__add-action-wrapper"])},[C.value.length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"pl-filter-manager__add-btn",onClick:L[1]||(L[1]=V=>E.value=!0)},[t.createElementVNode("div",RM,[t.createVNode(t.unref(qt),{name:"add"})]),L[8]||(L[8]=t.createElementVNode("div",{class:"pl-filter-manager__add-btn-title text-s-btn"},"Add Filter",-1))])):t.createCommentVNode("",!0)],2),_.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",IM,"No filters applicable"))],512)]),_:1},8,["modelValue"]),t.createVNode(kM,{modelValue:E.value,"onUpdate:modelValue":L[3]||(L[3]=V=>E.value=V),"columns-by-id":c.value,"column-options":C.value,"filter-options":y.value,"make-filter":N,onAddFilter:L[4]||(L[4]=V=>m.state.push(V))},null,8,["modelValue","columns-by-id","column-options","filter-options"])],64))}}),Hu=()=>uo().pFrameDriver;function LM(n){const e=t.ref([]),r=t.ref([]),o=t.ref(!1);return t.watchEffect(async()=>{const{pframe:a,sequenceColumnPredicate:l}=t.toValue(n);if(!a){e.value=[],r.value=[];return}let c=!1;t.onWatcherCleanup(()=>{c=!0});try{o.value=!0;const d=await ZM({pframe:a,sequenceColumnPredicate:l});if(c)return;e.value=d.options,r.value=d.defaults}catch(d){console.error(d)}finally{o.value=!1}}),{options:e,defaults:r,loading:o}}function OM(n){const e=t.ref([]),r=t.ref([]),o=t.ref(!1);return t.watchEffect(async()=>{const{pframe:a,sequenceColumnIds:l,labelColumnOptionPredicate:c}=t.toValue(n);if(!a){e.value=[],r.value=[];return}let d=!1;t.onWatcherCleanup(()=>{d=!0});try{o.value=!0;const u=await MM({pframe:a,sequenceColumnIds:l,labelColumnOptionPredicate:c});if(d)return;e.value=u.options,r.value=u.defaults}catch(u){console.error(u)}finally{o.value=!1}}),{options:e,defaults:r,loading:o}}function $M(n){const e=t.ref([]),r=t.ref(!1);return t.watchEffect(async()=>{const{pframe:o,sequenceColumnIds:a,labelColumnIds:l,linkerColumnPredicate:c,selection:d}=t.toValue(n);let u=!1;t.onWatcherCleanup(()=>{u=!0});try{r.value=!1;const f=await FM({pframe:o,sequenceColumnIds:a,labelColumnIds:l,linkerColumnPredicate:c,selection:d});if(u)return;e.value=f}catch(f){console.error(f)}finally{r.value=!1}}),{data:e,loading:r}}async function ZM({pframe:n,sequenceColumnPredicate:e}){const a=(await Hu().listColumns(n)).filter(c=>e(c)).map(c=>{var d;return{label:((d=c.spec.annotations)==null?void 0:d["pl7.app/label"])??"Unlabelled column",value:c.columnId}}),l=a.map(c=>c.value);return{options:a,defaults:l}}async function MM({pframe:n,sequenceColumnIds:e,labelColumnOptionPredicate:r}){var f,m;const o=new Set,a=new Map,c=await Hu().listColumns(n);for(const g of c){if(e.includes(g.columnId))for(const y of g.spec.axesSpec){const _=Lt(y),C=Yn(_);if(o.has(C))continue;o.add(C);const N=c.find(({spec:T})=>qc(T)&&ow(_,Lt(T.axesSpec[0])));a.set(Yn(N?{type:"column",id:N.columnId}:{type:"axis",id:_}),((f=y.annotations)==null?void 0:f["pl7.app/label"])??"Unlabelled axis")}r!=null&&r(g)&&a.set(Yn({type:"column",id:g.columnId}),((m=g.spec.annotations)==null?void 0:m["pl7.app/label"])??"Unlabelled column")}const d=Array.from(a).map(([g,y])=>({label:y,value:g})),u=d.filter(g=>{const y=Wo(g.value);if(y.type==="axis")return!0;const _=c.find(C=>C.columnId===y.id);return _&&qc(_.spec)}).map(g=>g.value);return{options:d,defaults:u}}async function FM({pframe:n,sequenceColumnIds:e,labelColumnIds:r,linkerColumnPredicate:o,selection:a}){if(!n||e.length===0)return[];const l=Hu(),c=await l.listColumns(n),d=o?c.filter(E=>o(E)):[],u="__FILTER_COLUMN__",f=gw(u,a),m={src:{type:"outer",primary:{type:"inner",entries:[...f&&f.data.length>0?[{type:"inlineColumn",column:f}]:[],...d.map(E=>({type:"column",column:E.columnId})),...e.map(E=>({type:"column",column:E}))].filter(E=>E!==void 0)},secondary:r.map(E=>Wo(E)).filter(E=>E.type==="column").map(E=>({type:"column",column:E.id}))},filters:[],sorting:e.map(E=>({column:{type:"column",id:E},ascending:!0,naAndAbsentAreLeastValues:!0}))},g=JSON.parse(JSON.stringify(m)),y=await l.calculateTableData(n,g),_=[],C=new Map,N=new Map;for(let E=0;E<y.length;E++){const D=y[E].spec;if(D.type==="column"){if(D.id===u)continue;const P=e.findIndex(H=>H===D.id);if(P!==-1){N.set(E,P);continue}}const A=hw(D.type==="axis"?{type:"axis",id:Lt(D.spec)}:{type:"column",id:D.id}),B=r.findIndex(P=>P===A);B!==-1&&C.set(E,B)}if(C.size!==r.length||N.size!==e.length)throw new Error("Some label or sequence columns are missing");const T=[...C.keys()];T.sort((E,D)=>C.get(E)-C.get(D));const $=[...N.keys()];$.sort((E,D)=>N.get(E)-N.get(D));const W=y[0].data.data.length;for(let E=0;E<W;E++){const D=T.map(P=>{var H;return(H=Ir(y[P].data,E,{na:"",absent:""}))==null?void 0:H.toString()}),A=$.map(P=>{var H;return(H=Ir(y[P].data,E,{na:"",absent:""}))==null?void 0:H.toString()}),B=P=>typeof P=="string";D.every(B)&&A.every(B)?_.push({labels:D,sequence:A.join(""),header:String(E)}):console.warn(`skipping record at row ${E} because of invalid labels or sequences`,D,A)}return _}/**
|
|
82
|
+
* @license
|
|
83
|
+
* Copyright 2019 Google LLC
|
|
84
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
85
|
+
*/const My=Symbol("Comlink.proxy"),PM=Symbol("Comlink.endpoint"),zM=Symbol("Comlink.releaseProxy"),Xu=Symbol("Comlink.finalizer"),Zs=Symbol("Comlink.thrown"),Fy=n=>typeof n=="object"&&n!==null||typeof n=="function",DM={canHandle:n=>Fy(n)&&n[My],serialize(n){const{port1:e,port2:r}=new MessageChannel;return zy(n,e),[r,[r]]},deserialize(n){return n.start(),Wy(n)}},WM={canHandle:n=>Fy(n)&&Zs in n,serialize({value:n}){let e;return n instanceof Error?e={isError:!0,value:{message:n.message,name:n.name,stack:n.stack}}:e={isError:!1,value:n},[e,[]]},deserialize(n){throw n.isError?Object.assign(new Error(n.value.message),n.value):n.value}},Py=new Map([["proxy",DM],["throw",WM]]);function GM(n,e){for(const r of n)if(e===r||r==="*"||r instanceof RegExp&&r.test(e))return!0;return!1}function zy(n,e=globalThis,r=["*"]){e.addEventListener("message",function o(a){if(!a||!a.data)return;if(!GM(r,a.origin)){console.warn(`Invalid origin '${a.origin}' for comlink proxy`);return}const{id:l,type:c,path:d}=Object.assign({path:[]},a.data),u=(a.data.argumentList||[]).map(ko);let f;try{const m=d.slice(0,-1).reduce((y,_)=>y[_],n),g=d.reduce((y,_)=>y[_],n);switch(c){case"GET":f=g;break;case"SET":m[d.slice(-1)[0]]=ko(a.data.value),f=!0;break;case"APPLY":f=g.apply(m,u);break;case"CONSTRUCT":{const y=new g(...u);f=KM(y)}break;case"ENDPOINT":{const{port1:y,port2:_}=new MessageChannel;zy(n,_),f=YM(y,[y])}break;case"RELEASE":f=void 0;break;default:return}}catch(m){f={value:m,[Zs]:0}}Promise.resolve(f).catch(m=>({value:m,[Zs]:0})).then(m=>{const[g,y]=zs(m);e.postMessage(Object.assign(Object.assign({},g),{id:l}),y),c==="RELEASE"&&(e.removeEventListener("message",o),Dy(e),Xu in n&&typeof n[Xu]=="function"&&n[Xu]())}).catch(m=>{const[g,y]=zs({value:new TypeError("Unserializable return value"),[Zs]:0});e.postMessage(Object.assign(Object.assign({},g),{id:l}),y)})}),e.start&&e.start()}function UM(n){return n.constructor.name==="MessagePort"}function Dy(n){UM(n)&&n.close()}function Wy(n,e){const r=new Map;return n.addEventListener("message",function(a){const{data:l}=a;if(!l||!l.id)return;const c=r.get(l.id);if(c)try{c(l)}finally{r.delete(l.id)}}),ju(n,r,[],e)}function Ms(n){if(n)throw new Error("Proxy has been released and is not useable")}function Gy(n){return ua(n,new Map,{type:"RELEASE"}).then(()=>{Dy(n)})}const Fs=new WeakMap,Ps="FinalizationRegistry"in globalThis&&new FinalizationRegistry(n=>{const e=(Fs.get(n)||0)-1;Fs.set(n,e),e===0&&Gy(n)});function HM(n,e){const r=(Fs.get(e)||0)+1;Fs.set(e,r),Ps&&Ps.register(n,e,n)}function XM(n){Ps&&Ps.unregister(n)}function ju(n,e,r=[],o=function(){}){let a=!1;const l=new Proxy(o,{get(c,d){if(Ms(a),d===zM)return()=>{XM(l),Gy(n),e.clear(),a=!0};if(d==="then"){if(r.length===0)return{then:()=>l};const u=ua(n,e,{type:"GET",path:r.map(f=>f.toString())}).then(ko);return u.then.bind(u)}return ju(n,e,[...r,d])},set(c,d,u){Ms(a);const[f,m]=zs(u);return ua(n,e,{type:"SET",path:[...r,d].map(g=>g.toString()),value:f},m).then(ko)},apply(c,d,u){Ms(a);const f=r[r.length-1];if(f===PM)return ua(n,e,{type:"ENDPOINT"}).then(ko);if(f==="bind")return ju(n,e,r.slice(0,-1));const[m,g]=Uy(u);return ua(n,e,{type:"APPLY",path:r.map(y=>y.toString()),argumentList:m},g).then(ko)},construct(c,d){Ms(a);const[u,f]=Uy(d);return ua(n,e,{type:"CONSTRUCT",path:r.map(m=>m.toString()),argumentList:u},f).then(ko)}});return HM(l,n),l}function jM(n){return Array.prototype.concat.apply([],n)}function Uy(n){const e=n.map(zs);return[e.map(r=>r[0]),jM(e.map(r=>r[1]))]}const Hy=new WeakMap;function YM(n,e){return Hy.set(n,e),n}function KM(n){return Object.assign(n,{[My]:!0})}function zs(n){for(const[e,r]of Py)if(r.canHandle(n)){const[o,a]=r.serialize(n);return[{type:"HANDLER",name:e,value:o},a]}return[{type:"RAW",value:n},Hy.get(n)||[]]}function ko(n){switch(n.type){case"HANDLER":return Py.get(n.name).deserialize(n.value);case"RAW":return n.value}}function ua(n,e,r,o){return new Promise(a=>{const l=JM();e.set(l,a),n.start&&n.start(),n.postMessage(Object.assign({id:l},r),o)})}function JM(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const Xy="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiOy8qKgogKiBAbGljZW5zZQogKiBDb3B5cmlnaHQgMjAxOSBHb29nbGUgTExDCiAqIFNQRFgtTGljZW5zZS1JZGVudGlmaWVyOiBBcGFjaGUtMi4wCiAqL2NvbnN0IEM9U3ltYm9sKCJDb21saW5rLnByb3h5IiksTj1TeW1ib2woIkNvbWxpbmsuZW5kcG9pbnQiKSxJPVN5bWJvbCgiQ29tbGluay5yZWxlYXNlUHJveHkiKSxNPVN5bWJvbCgiQ29tbGluay5maW5hbGl6ZXIiKSx5PVN5bWJvbCgiQ29tbGluay50aHJvd24iKSxrPWU9PnR5cGVvZiBlPT0ib2JqZWN0IiYmZSE9PW51bGx8fHR5cGVvZiBlPT0iZnVuY3Rpb24iLEw9e2NhbkhhbmRsZTplPT5rKGUpJiZlW0NdLHNlcmlhbGl6ZShlKXtjb25zdHtwb3J0MTpyLHBvcnQyOnR9PW5ldyBNZXNzYWdlQ2hhbm5lbDtyZXR1cm4gUChlLHIpLFt0LFt0XV19LGRlc2VyaWFsaXplKGUpe3JldHVybiBlLnN0YXJ0KCksVyhlKX19LFY9e2NhbkhhbmRsZTplPT5rKGUpJiZ5IGluIGUsc2VyaWFsaXplKHt2YWx1ZTplfSl7bGV0IHI7cmV0dXJuIGUgaW5zdGFuY2VvZiBFcnJvcj9yPXtpc0Vycm9yOiEwLHZhbHVlOnttZXNzYWdlOmUubWVzc2FnZSxuYW1lOmUubmFtZSxzdGFjazplLnN0YWNrfX06cj17aXNFcnJvcjohMSx2YWx1ZTplfSxbcixbXV19LGRlc2VyaWFsaXplKGUpe3Rocm93IGUuaXNFcnJvcj9PYmplY3QuYXNzaWduKG5ldyBFcnJvcihlLnZhbHVlLm1lc3NhZ2UpLGUudmFsdWUpOmUudmFsdWV9fSxTPW5ldyBNYXAoW1sicHJveHkiLExdLFsidGhyb3ciLFZdXSk7ZnVuY3Rpb24geihlLHIpe2Zvcihjb25zdCB0IG9mIGUpaWYocj09PXR8fHQ9PT0iKiJ8fHQgaW5zdGFuY2VvZiBSZWdFeHAmJnQudGVzdChyKSlyZXR1cm4hMDtyZXR1cm4hMX1mdW5jdGlvbiBQKGUscj1nbG9iYWxUaGlzLHQ9WyIqIl0pe3IuYWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsZnVuY3Rpb24gaChhKXtpZighYXx8IWEuZGF0YSlyZXR1cm47aWYoIXoodCxhLm9yaWdpbikpe2NvbnNvbGUud2FybihgSW52YWxpZCBvcmlnaW4gJyR7YS5vcmlnaW59JyBmb3IgY29tbGluayBwcm94eWApO3JldHVybn1jb25zdHtpZDpvLHR5cGU6bCxwYXRoOmN9PU9iamVjdC5hc3NpZ24oe3BhdGg6W119LGEuZGF0YSksaT0oYS5kYXRhLmFyZ3VtZW50TGlzdHx8W10pLm1hcChkKTtsZXQgbjt0cnl7Y29uc3Qgcz1jLnNsaWNlKDAsLTEpLnJlZHVjZSgoZyxmKT0+Z1tmXSxlKSx1PWMucmVkdWNlKChnLGYpPT5nW2ZdLGUpO3N3aXRjaChsKXtjYXNlIkdFVCI6bj11O2JyZWFrO2Nhc2UiU0VUIjpzW2Muc2xpY2UoLTEpWzBdXT1kKGEuZGF0YS52YWx1ZSksbj0hMDticmVhaztjYXNlIkFQUExZIjpuPXUuYXBwbHkocyxpKTticmVhaztjYXNlIkNPTlNUUlVDVCI6e2NvbnN0IGc9bmV3IHUoLi4uaSk7bj1ZKGcpfWJyZWFrO2Nhc2UiRU5EUE9JTlQiOntjb25zdHtwb3J0MTpnLHBvcnQyOmZ9PW5ldyBNZXNzYWdlQ2hhbm5lbDtQKGUsZiksbj1RKGcsW2ddKX1icmVhaztjYXNlIlJFTEVBU0UiOm49dm9pZCAwO2JyZWFrO2RlZmF1bHQ6cmV0dXJufX1jYXRjaChzKXtuPXt2YWx1ZTpzLFt5XTowfX1Qcm9taXNlLnJlc29sdmUobikuY2F0Y2gocz0+KHt2YWx1ZTpzLFt5XTowfSkpLnRoZW4ocz0+e2NvbnN0W3UsZ109YihzKTtyLnBvc3RNZXNzYWdlKE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSx1KSx7aWQ6b30pLGcpLGw9PT0iUkVMRUFTRSImJihyLnJlbW92ZUV2ZW50TGlzdGVuZXIoIm1lc3NhZ2UiLGgpLHgociksTSBpbiBlJiZ0eXBlb2YgZVtNXT09ImZ1bmN0aW9uIiYmZVtNXSgpKX0pLmNhdGNoKHM9Pntjb25zdFt1LGddPWIoe3ZhbHVlOm5ldyBUeXBlRXJyb3IoIlVuc2VyaWFsaXphYmxlIHJldHVybiB2YWx1ZSIpLFt5XTowfSk7ci5wb3N0TWVzc2FnZShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdSkse2lkOm99KSxnKX0pfSksci5zdGFydCYmci5zdGFydCgpfWZ1bmN0aW9uIEQoZSl7cmV0dXJuIGUuY29uc3RydWN0b3IubmFtZT09PSJNZXNzYWdlUG9ydCJ9ZnVuY3Rpb24geChlKXtEKGUpJiZlLmNsb3NlKCl9ZnVuY3Rpb24gVyhlLHIpe2NvbnN0IHQ9bmV3IE1hcDtyZXR1cm4gZS5hZGRFdmVudExpc3RlbmVyKCJtZXNzYWdlIixmdW5jdGlvbihhKXtjb25zdHtkYXRhOm99PWE7aWYoIW98fCFvLmlkKXJldHVybjtjb25zdCBsPXQuZ2V0KG8uaWQpO2lmKGwpdHJ5e2wobyl9ZmluYWxseXt0LmRlbGV0ZShvLmlkKX19KSxBKGUsdCxbXSxyKX1mdW5jdGlvbiBtKGUpe2lmKGUpdGhyb3cgbmV3IEVycm9yKCJQcm94eSBoYXMgYmVlbiByZWxlYXNlZCBhbmQgaXMgbm90IHVzZWFibGUiKX1mdW5jdGlvbiBUKGUpe3JldHVybiBwKGUsbmV3IE1hcCx7dHlwZToiUkVMRUFTRSJ9KS50aGVuKCgpPT57eChlKX0pfWNvbnN0IEU9bmV3IFdlYWtNYXAsdz0iRmluYWxpemF0aW9uUmVnaXN0cnkiaW4gZ2xvYmFsVGhpcyYmbmV3IEZpbmFsaXphdGlvblJlZ2lzdHJ5KGU9Pntjb25zdCByPShFLmdldChlKXx8MCktMTtFLnNldChlLHIpLHI9PT0wJiZUKGUpfSk7ZnVuY3Rpb24gRihlLHIpe2NvbnN0IHQ9KEUuZ2V0KHIpfHwwKSsxO0Uuc2V0KHIsdCksdyYmdy5yZWdpc3RlcihlLHIsZSl9ZnVuY3Rpb24gXyhlKXt3JiZ3LnVucmVnaXN0ZXIoZSl9ZnVuY3Rpb24gQShlLHIsdD1bXSxoPWZ1bmN0aW9uKCl7fSl7bGV0IGE9ITE7Y29uc3Qgbz1uZXcgUHJveHkoaCx7Z2V0KGwsYyl7aWYobShhKSxjPT09SSlyZXR1cm4oKT0+e18obyksVChlKSxyLmNsZWFyKCksYT0hMH07aWYoYz09PSJ0aGVuIil7aWYodC5sZW5ndGg9PT0wKXJldHVybnt0aGVuOigpPT5vfTtjb25zdCBpPXAoZSxyLHt0eXBlOiJHRVQiLHBhdGg6dC5tYXAobj0+bi50b1N0cmluZygpKX0pLnRoZW4oZCk7cmV0dXJuIGkudGhlbi5iaW5kKGkpfXJldHVybiBBKGUscixbLi4udCxjXSl9LHNldChsLGMsaSl7bShhKTtjb25zdFtuLHNdPWIoaSk7cmV0dXJuIHAoZSxyLHt0eXBlOiJTRVQiLHBhdGg6Wy4uLnQsY10ubWFwKHU9PnUudG9TdHJpbmcoKSksdmFsdWU6bn0scykudGhlbihkKX0sYXBwbHkobCxjLGkpe20oYSk7Y29uc3Qgbj10W3QubGVuZ3RoLTFdO2lmKG49PT1OKXJldHVybiBwKGUscix7dHlwZToiRU5EUE9JTlQifSkudGhlbihkKTtpZihuPT09ImJpbmQiKXJldHVybiBBKGUscix0LnNsaWNlKDAsLTEpKTtjb25zdFtzLHVdPVIoaSk7cmV0dXJuIHAoZSxyLHt0eXBlOiJBUFBMWSIscGF0aDp0Lm1hcChnPT5nLnRvU3RyaW5nKCkpLGFyZ3VtZW50TGlzdDpzfSx1KS50aGVuKGQpfSxjb25zdHJ1Y3QobCxjKXttKGEpO2NvbnN0W2ksbl09UihjKTtyZXR1cm4gcChlLHIse3R5cGU6IkNPTlNUUlVDVCIscGF0aDp0Lm1hcChzPT5zLnRvU3RyaW5nKCkpLGFyZ3VtZW50TGlzdDppfSxuKS50aGVuKGQpfX0pO3JldHVybiBGKG8sZSksb31mdW5jdGlvbiBLKGUpe3JldHVybiBBcnJheS5wcm90b3R5cGUuY29uY2F0LmFwcGx5KFtdLGUpfWZ1bmN0aW9uIFIoZSl7Y29uc3Qgcj1lLm1hcChiKTtyZXR1cm5bci5tYXAodD0+dFswXSksSyhyLm1hcCh0PT50WzFdKSldfWNvbnN0IE89bmV3IFdlYWtNYXA7ZnVuY3Rpb24gUShlLHIpe3JldHVybiBPLnNldChlLHIpLGV9ZnVuY3Rpb24gWShlKXtyZXR1cm4gT2JqZWN0LmFzc2lnbihlLHtbQ106ITB9KX1mdW5jdGlvbiBiKGUpe2Zvcihjb25zdFtyLHRdb2YgUylpZih0LmNhbkhhbmRsZShlKSl7Y29uc3RbaCxhXT10LnNlcmlhbGl6ZShlKTtyZXR1cm5be3R5cGU6IkhBTkRMRVIiLG5hbWU6cix2YWx1ZTpofSxhXX1yZXR1cm5be3R5cGU6IlJBVyIsdmFsdWU6ZX0sTy5nZXQoZSl8fFtdXX1mdW5jdGlvbiBkKGUpe3N3aXRjaChlLnR5cGUpe2Nhc2UiSEFORExFUiI6cmV0dXJuIFMuZ2V0KGUubmFtZSkuZGVzZXJpYWxpemUoZS52YWx1ZSk7Y2FzZSJSQVciOnJldHVybiBlLnZhbHVlfX1mdW5jdGlvbiBwKGUscix0LGgpe3JldHVybiBuZXcgUHJvbWlzZShhPT57Y29uc3Qgbz1qKCk7ci5zZXQobyxhKSxlLnN0YXJ0JiZlLnN0YXJ0KCksZS5wb3N0TWVzc2FnZShPYmplY3QuYXNzaWduKHtpZDpvfSx0KSxoKX0pfWZ1bmN0aW9uIGooKXtyZXR1cm4gbmV3IEFycmF5KDQpLmZpbGwoMCkubWFwKCgpPT5NYXRoLmZsb29yKE1hdGgucmFuZG9tKCkqTnVtYmVyLk1BWF9TQUZFX0lOVEVHRVIpLnRvU3RyaW5nKDE2KSkuam9pbigiLSIpfWZ1bmN0aW9uIEcoZSl7dmFyIGE7aWYoIWUubGVuZ3RoKXJldHVybltdO2NvbnN0IHI9QXJyYXkuZnJvbShuZXcgU2V0KEguZmxhdE1hcCgoe3J1bGVzOm99KT0+by5mbGF0TWFwKCh7Z3JvdXBzOmx9KT0+bCkpKSksdD1BcnJheS5mcm9tKHtsZW5ndGg6ZVswXS5sZW5ndGh9LCgpPT4oe2dyb3VwTWF0Y2hlczp7fSxzZWdtZW50czpbXX0pKTtmb3IoY29uc3RbbyxsXW9mIGUuZW50cmllcygpKWZvcihsZXQgYz0wO2M8bC5sZW5ndGg7Yys9MSl7Y29uc3QgaT1sW2NdO2lmKGk9PT0iLSIpY29udGludWU7Y29uc3Qgbj10W2NdLHM9bi5zZWdtZW50cy5hdCgtMSk7KHM9PW51bGw/dm9pZCAwOnMucmVzaWR1ZSk9PT1pJiZzLmVuZCsxPT09bz9zLmVuZD1vOm4uc2VnbWVudHMucHVzaCh7cmVzaWR1ZTppLHN0YXJ0Om8sZW5kOm99KTtmb3IoY29uc3QgdSBvZiByKXUuaW5jbHVkZXMoaSkmJigoYT1uLmdyb3VwTWF0Y2hlcylbdV0/PyhhW3VdPTApLG4uZ3JvdXBNYXRjaGVzW3VdKz0xKX1yZXR1cm4gdC5tYXAoKHtncm91cE1hdGNoZXM6byxzZWdtZW50czpsfSk9Pntjb25zdCBjPVtdO2Zvcihjb25zdCBpIG9mIGwpe2NvbnN0IG49SC5maW5kKCh7cmVzaWR1ZXM6dSxydWxlczpnfSk9PnUuaW5jbHVkZXMoaS5yZXNpZHVlKSYmZy5zb21lKGY9PmYuZ3JvdXBzLnNvbWUoVT0+KG9bVV0/PzApPmUubGVuZ3RoKmYudGhyZXNob2xkKSkpO2lmKCFuKWNvbnRpbnVlO2NvbnN0IHM9Yy5hdCgtMSk7KHM9PW51bGw/dm9pZCAwOnMuY2F0ZWdvcnkpPT09bi5jYXRlZ29yeSYmcy5lbmQrMT09PWkuc3RhcnQ/cy5lbmQ9aS5zdGFydDpjLnB1c2goe2NhdGVnb3J5Om4uY2F0ZWdvcnksc3RhcnQ6aS5zdGFydCxlbmQ6aS5lbmR9KX1yZXR1cm4gY30pfWNvbnN0IEg9W3tyZXNpZHVlczoiQUNJTE1GV1YiLGNhdGVnb3J5OiJoeWRyb3Bob2JpYyIscnVsZXM6W3tncm91cHM6WyJXTFZJTUFGQ1lIUCJdLHRocmVzaG9sZDouNn1dfSx7cmVzaWR1ZXM6IktSIixjYXRlZ29yeToicG9zaXRpdmVfY2hhcmdlIixydWxlczpbe2dyb3VwczpbIktSIl0sdGhyZXNob2xkOi42fSx7Z3JvdXBzOlsuLi4iS1JRIl0sdGhyZXNob2xkOi44fV19LHtyZXNpZHVlczoiRSIsY2F0ZWdvcnk6Im5lZ2F0aXZlX2NoYXJnZSIscnVsZXM6W3tncm91cHM6WyJLUiJdLHRocmVzaG9sZDouNn0se2dyb3VwczpbIlFFIl0sdGhyZXNob2xkOi41fSx7Z3JvdXBzOlsiRUQiXSx0aHJlc2hvbGQ6LjV9LHtncm91cHM6Wy4uLiJFUUQiXSx0aHJlc2hvbGQ6Ljg1fV19LHtyZXNpZHVlczoiRCIsY2F0ZWdvcnk6Im5lZ2F0aXZlX2NoYXJnZSIscnVsZXM6W3tncm91cHM6WyJLUiJdLHRocmVzaG9sZDouNn0se2dyb3VwczpbLi4uIkRFTiJdLHRocmVzaG9sZDouODV9LHtncm91cHM6WyJFRCJdLHRocmVzaG9sZDouNX1dfSx7cmVzaWR1ZXM6Ik4iLGNhdGVnb3J5OiJwb2xhciIscnVsZXM6W3tncm91cHM6WyJOIl0sdGhyZXNob2xkOi41fSx7Z3JvdXBzOlsuLi4iTkQiXSx0aHJlc2hvbGQ6Ljg1fV19LHtyZXNpZHVlczoiUSIsY2F0ZWdvcnk6InBvbGFyIixydWxlczpbe2dyb3VwczpbIktSIl0sdGhyZXNob2xkOi42fSx7Z3JvdXBzOlsiUUUiXSx0aHJlc2hvbGQ6LjV9LHtncm91cHM6Wy4uLiJRVEtSIl0sdGhyZXNob2xkOi44NX1dfSx7cmVzaWR1ZXM6IlNUIixjYXRlZ29yeToicG9sYXIiLHJ1bGVzOlt7Z3JvdXBzOlsiV0xWSU1BRkNZSFAiXSx0aHJlc2hvbGQ6LjZ9LHtncm91cHM6WyJUUyJdLHRocmVzaG9sZDouNX0se2dyb3VwczpbLi4uIlNUIl0sdGhyZXNob2xkOi44NX1dfSx7cmVzaWR1ZXM6IkMiLGNhdGVnb3J5OiJjeXN0ZWluZSIscnVsZXM6W3tncm91cHM6WyJDIl0sdGhyZXNob2xkOi44NX1dfSx7cmVzaWR1ZXM6IkciLGNhdGVnb3J5OiJnbHljaW5lIixydWxlczpbe2dyb3VwczpbIkciXSx0aHJlc2hvbGQ6MH1dfSx7cmVzaWR1ZXM6IlAiLGNhdGVnb3J5OiJwcm9saW5lIixydWxlczpbe2dyb3VwczpbIlAiXSx0aHJlc2hvbGQ6MH1dfSx7cmVzaWR1ZXM6IkhZIixjYXRlZ29yeToiYXJvbWF0aWMiLHJ1bGVzOlt7Z3JvdXBzOlsiV0xWSU1BRkNZSFAiXSx0aHJlc2hvbGQ6LjZ9LHtncm91cHM6Wy4uLiJXWUFDUFFGSElMTVYiXSx0aHJlc2hvbGQ6Ljg1fV19XTtQKHtnZXRDaGVtaWNhbFByb3BlcnRpZXNIaWdobGlnaHQ6R30pfSkoKTsKLy8jIHNvdXJjZU1hcHBpbmdVUkw9Y2hlbWljYWwtcHJvcGVydGllcy53b3JrZXItdGhZdHJCRG4uanMubWFwCg==",qM=n=>Uint8Array.from(atob(n),e=>e.charCodeAt(0)),jy=typeof self<"u"&&self.Blob&&new Blob([qM(Xy)],{type:"text/javascript;charset=utf-8"});function QM(n){let e;try{if(e=jy&&(self.URL||self.webkitURL).createObjectURL(jy),!e)throw"";const r=new Worker(e,{name:n==null?void 0:n.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),r}catch{return new Worker("data:text/javascript;base64,"+Xy,{name:n==null?void 0:n.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}const eF=Wy(new QM),tF=["hydrophobic","positive_charge","negative_charge","polar","cysteine","glycine","proline","aromatic"],nF={hydrophobic:"Hydrophobic",positive_charge:"Positive Charge",negative_charge:"Negative Charge",polar:"Polar",cysteine:"Cysteine",glycine:"Glycine",proline:"Proline",aromatic:"Aromatic"},Yy={hydrophobic:"#99CCFF",positive_charge:"#FFA2A3",negative_charge:"#C1ADFF",polar:"#99E099",cysteine:"#FAAAFA",glycine:"#F7BC5D",proline:"#FFFF8F",aromatic:"#A2F5FA"};function rF(n){const e=t.ref([]),r=t.ref(!1);return t.watchEffect(async()=>{const o=t.toValue(n);if(!o)return;let a=!1;t.onWatcherCleanup(()=>{a=!0});try{r.value=!0;const l=await eF.getChemicalPropertiesHighlight(o);if(a)return;e.value=l}catch(l){console.error(l),e.value=[]}finally{r.value=!1}}),{data:e,loading:r}}function oF({columns:n,rowCount:e,colors:r}){const o=n.flatMap((l,c)=>l.length?l.map(({category:d,start:u,end:f})=>`<rect x="${c}" y="${u}" width="1" height="${f-u+1}" fill="${r[d]}" />`):[]),a=`<svg viewBox="0 0 ${n.length} ${e}" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none">${o.join("")}</svg>`;return`url('data:image/svg+xml;base64,${btoa(a)}')`}const Ky=Symbol("Comlink.proxy"),aF=Symbol("Comlink.endpoint"),iF=Symbol("Comlink.releaseProxy"),Yu=Symbol("Comlink.thrown"),Jy=n=>typeof n=="object"&&n!==null||typeof n=="function",lF={canHandle:n=>Jy(n)&&n[Ky],serialize(n){const{port1:e,port2:r}=new MessageChannel;return Qy(n,e),[r,[r]]},deserialize(n){return n.start(),t0(n)}},sF={canHandle:n=>Jy(n)&&Yu in n,serialize({value:n}){let e;return n instanceof Error?e={isError:!0,value:{message:n.message,name:n.name,stack:n.stack}}:e={isError:!1,value:n},[e,[]]},deserialize(n){throw n.isError?Object.assign(new Error(n.value.message),n.value):n.value}},qy=new Map([["proxy",lF],["throw",sF]]);function Qy(n,e=self){e.addEventListener("message",function r(o){if(!o||!o.data)return;const{id:a,type:l,path:c}=Object.assign({path:[]},o.data),d=(o.data.argumentList||[]).map(xo);let u;try{const f=c.slice(0,-1).reduce((g,y)=>g[y],n),m=c.reduce((g,y)=>g[y],n);switch(l){case"GET":u=m;break;case"SET":f[c.slice(-1)[0]]=xo(o.data.value),u=!0;break;case"APPLY":u=m.apply(f,d);break;case"CONSTRUCT":{const g=new m(...d);u=pF(g)}break;case"ENDPOINT":{const{port1:g,port2:y}=new MessageChannel;Qy(n,y),u=uF(g,[g])}break;case"RELEASE":u=void 0;break;default:return}}catch(f){u={value:f,[Yu]:0}}Promise.resolve(u).catch(f=>({value:f,[Yu]:0})).then(f=>{const[m,g]=Ju(f);e.postMessage(Object.assign(Object.assign({},m),{id:a}),g),l==="RELEASE"&&(e.removeEventListener("message",r),e0(e))})}),e.start&&e.start()}function cF(n){return n.constructor.name==="MessagePort"}function e0(n){cF(n)&&n.close()}function t0(n,e){return Ku(n,[],e)}function Ds(n){if(n)throw new Error("Proxy has been released and is not useable")}function Ku(n,e=[],r=function(){}){let o=!1;const a=new Proxy(r,{get(l,c){if(Ds(o),c===iF)return()=>pa(n,{type:"RELEASE",path:e.map(d=>d.toString())}).then(()=>{e0(n),o=!0});if(c==="then"){if(e.length===0)return{then:()=>a};const d=pa(n,{type:"GET",path:e.map(u=>u.toString())}).then(xo);return d.then.bind(d)}return Ku(n,[...e,c])},set(l,c,d){Ds(o);const[u,f]=Ju(d);return pa(n,{type:"SET",path:[...e,c].map(m=>m.toString()),value:u},f).then(xo)},apply(l,c,d){Ds(o);const u=e[e.length-1];if(u===aF)return pa(n,{type:"ENDPOINT"}).then(xo);if(u==="bind")return Ku(n,e.slice(0,-1));const[f,m]=n0(d);return pa(n,{type:"APPLY",path:e.map(g=>g.toString()),argumentList:f},m).then(xo)},construct(l,c){Ds(o);const[d,u]=n0(c);return pa(n,{type:"CONSTRUCT",path:e.map(f=>f.toString()),argumentList:d},u).then(xo)}});return a}function dF(n){return Array.prototype.concat.apply([],n)}function n0(n){const e=n.map(Ju);return[e.map(r=>r[0]),dF(e.map(r=>r[1]))]}const r0=new WeakMap;function uF(n,e){return r0.set(n,e),n}function pF(n){return Object.assign(n,{[Ky]:!0})}function Ju(n){for(const[e,r]of qy)if(r.canHandle(n)){const[o,a]=r.serialize(n);return[{type:"HANDLER",name:e,value:o},a]}return[{type:"RAW",value:n},r0.get(n)||[]]}function xo(n){switch(n.type){case"HANDLER":return qy.get(n.name).deserialize(n.value);case"RAW":return n.value}}function pa(n,e,r){return new Promise(o=>{const a=fF();n.addEventListener("message",function l(c){!c.data||!c.data.id||c.data.id!==a||(n.removeEventListener("message",l),o(c.data))}),n.start&&n.start(),n.postMessage(Object.assign({id:a},e),r)})}function fF(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const o0="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0ICQ9U3ltYm9sKCJDb21saW5rLnByb3h5IiksQT1TeW1ib2woIkNvbWxpbmsuZW5kcG9pbnQiKSxSPVN5bWJvbCgiQ29tbGluay5yZWxlYXNlUHJveHkiKSx5PVN5bWJvbCgiQ29tbGluay50aHJvd24iKSxfPWU9PnR5cGVvZiBlPT0ib2JqZWN0IiYmZSE9PW51bGx8fHR5cGVvZiBlPT0iZnVuY3Rpb24iLEw9e2NhbkhhbmRsZTplPT5fKGUpJiZlWyRdLHNlcmlhbGl6ZShlKXtjb25zdHtwb3J0MTpyLHBvcnQyOml9PW5ldyBNZXNzYWdlQ2hhbm5lbDtyZXR1cm4gdyhlLHIpLFtpLFtpXV19LGRlc2VyaWFsaXplKGUpe3JldHVybiBlLnN0YXJ0KCksQyhlKX19LE89e2NhbkhhbmRsZTplPT5fKGUpJiZ5IGluIGUsc2VyaWFsaXplKHt2YWx1ZTplfSl7bGV0IHI7cmV0dXJuIGUgaW5zdGFuY2VvZiBFcnJvcj9yPXtpc0Vycm9yOiEwLHZhbHVlOnttZXNzYWdlOmUubWVzc2FnZSxuYW1lOmUubmFtZSxzdGFjazplLnN0YWNrfX06cj17aXNFcnJvcjohMSx2YWx1ZTplfSxbcixbXV19LGRlc2VyaWFsaXplKGUpe3Rocm93IGUuaXNFcnJvcj9PYmplY3QuYXNzaWduKG5ldyBFcnJvcihlLnZhbHVlLm1lc3NhZ2UpLGUudmFsdWUpOmUudmFsdWV9fSxFPW5ldyBNYXAoW1sicHJveHkiLExdLFsidGhyb3ciLE9dXSk7ZnVuY3Rpb24gdyhlLHI9c2VsZil7ci5hZGRFdmVudExpc3RlbmVyKCJtZXNzYWdlIixmdW5jdGlvbiBpKHMpe2lmKCFzfHwhcy5kYXRhKXJldHVybjtjb25zdHtpZDpvLHR5cGU6YSxwYXRoOm59PU9iamVjdC5hc3NpZ24oe3BhdGg6W119LHMuZGF0YSksYz0ocy5kYXRhLmFyZ3VtZW50TGlzdHx8W10pLm1hcChtKTtsZXQgbDt0cnl7Y29uc3QgdT1uLnNsaWNlKDAsLTEpLnJlZHVjZSgoZCxwKT0+ZFtwXSxlKSxmPW4ucmVkdWNlKChkLHApPT5kW3BdLGUpO3N3aXRjaChhKXtjYXNlIkdFVCI6bD1mO2JyZWFrO2Nhc2UiU0VUIjp1W24uc2xpY2UoLTEpWzBdXT1tKHMuZGF0YS52YWx1ZSksbD0hMDticmVhaztjYXNlIkFQUExZIjpsPWYuYXBwbHkodSxjKTticmVhaztjYXNlIkNPTlNUUlVDVCI6e2NvbnN0IGQ9bmV3IGYoLi4uYyk7bD16KGQpfWJyZWFrO2Nhc2UiRU5EUE9JTlQiOntjb25zdHtwb3J0MTpkLHBvcnQyOnB9PW5ldyBNZXNzYWdlQ2hhbm5lbDt3KGUscCksbD1OKGQsW2RdKX1icmVhaztjYXNlIlJFTEVBU0UiOmw9dm9pZCAwO2JyZWFrO2RlZmF1bHQ6cmV0dXJufX1jYXRjaCh1KXtsPXt2YWx1ZTp1LFt5XTowfX1Qcm9taXNlLnJlc29sdmUobCkuY2F0Y2godT0+KHt2YWx1ZTp1LFt5XTowfSkpLnRoZW4odT0+e2NvbnN0W2YsZF09Uyh1KTtyLnBvc3RNZXNzYWdlKE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxmKSx7aWQ6b30pLGQpLGE9PT0iUkVMRUFTRSImJihyLnJlbW92ZUV2ZW50TGlzdGVuZXIoIm1lc3NhZ2UiLGkpLE0ocikpfSl9KSxyLnN0YXJ0JiZyLnN0YXJ0KCl9ZnVuY3Rpb24gVChlKXtyZXR1cm4gZS5jb25zdHJ1Y3Rvci5uYW1lPT09Ik1lc3NhZ2VQb3J0In1mdW5jdGlvbiBNKGUpe1QoZSkmJmUuY2xvc2UoKX1mdW5jdGlvbiBDKGUscil7cmV0dXJuIGIoZSxbXSxyKX1mdW5jdGlvbiBoKGUpe2lmKGUpdGhyb3cgbmV3IEVycm9yKCJQcm94eSBoYXMgYmVlbiByZWxlYXNlZCBhbmQgaXMgbm90IHVzZWFibGUiKX1mdW5jdGlvbiBiKGUscj1bXSxpPWZ1bmN0aW9uKCl7fSl7bGV0IHM9ITE7Y29uc3Qgbz1uZXcgUHJveHkoaSx7Z2V0KGEsbil7aWYoaChzKSxuPT09UilyZXR1cm4oKT0+ZyhlLHt0eXBlOiJSRUxFQVNFIixwYXRoOnIubWFwKGM9PmMudG9TdHJpbmcoKSl9KS50aGVuKCgpPT57TShlKSxzPSEwfSk7aWYobj09PSJ0aGVuIil7aWYoci5sZW5ndGg9PT0wKXJldHVybnt0aGVuOigpPT5vfTtjb25zdCBjPWcoZSx7dHlwZToiR0VUIixwYXRoOnIubWFwKGw9PmwudG9TdHJpbmcoKSl9KS50aGVuKG0pO3JldHVybiBjLnRoZW4uYmluZChjKX1yZXR1cm4gYihlLFsuLi5yLG5dKX0sc2V0KGEsbixjKXtoKHMpO2NvbnN0W2wsdV09UyhjKTtyZXR1cm4gZyhlLHt0eXBlOiJTRVQiLHBhdGg6Wy4uLnIsbl0ubWFwKGY9PmYudG9TdHJpbmcoKSksdmFsdWU6bH0sdSkudGhlbihtKX0sYXBwbHkoYSxuLGMpe2gocyk7Y29uc3QgbD1yW3IubGVuZ3RoLTFdO2lmKGw9PT1BKXJldHVybiBnKGUse3R5cGU6IkVORFBPSU5UIn0pLnRoZW4obSk7aWYobD09PSJiaW5kIilyZXR1cm4gYihlLHIuc2xpY2UoMCwtMSkpO2NvbnN0W3UsZl09RihjKTtyZXR1cm4gZyhlLHt0eXBlOiJBUFBMWSIscGF0aDpyLm1hcChkPT5kLnRvU3RyaW5nKCkpLGFyZ3VtZW50TGlzdDp1fSxmKS50aGVuKG0pfSxjb25zdHJ1Y3QoYSxuKXtoKHMpO2NvbnN0W2MsbF09RihuKTtyZXR1cm4gZyhlLHt0eXBlOiJDT05TVFJVQ1QiLHBhdGg6ci5tYXAodT0+dS50b1N0cmluZygpKSxhcmd1bWVudExpc3Q6Y30sbCkudGhlbihtKX19KTtyZXR1cm4gb31mdW5jdGlvbiBEKGUpe3JldHVybiBBcnJheS5wcm90b3R5cGUuY29uY2F0LmFwcGx5KFtdLGUpfWZ1bmN0aW9uIEYoZSl7Y29uc3Qgcj1lLm1hcChTKTtyZXR1cm5bci5tYXAoaT0+aVswXSksRChyLm1hcChpPT5pWzFdKSldfWNvbnN0IFA9bmV3IFdlYWtNYXA7ZnVuY3Rpb24gTihlLHIpe3JldHVybiBQLnNldChlLHIpLGV9ZnVuY3Rpb24geihlKXtyZXR1cm4gT2JqZWN0LmFzc2lnbihlLHtbJF06ITB9KX1mdW5jdGlvbiBTKGUpe2Zvcihjb25zdFtyLGldb2YgRSlpZihpLmNhbkhhbmRsZShlKSl7Y29uc3RbcyxvXT1pLnNlcmlhbGl6ZShlKTtyZXR1cm5be3R5cGU6IkhBTkRMRVIiLG5hbWU6cix2YWx1ZTpzfSxvXX1yZXR1cm5be3R5cGU6IlJBVyIsdmFsdWU6ZX0sUC5nZXQoZSl8fFtdXX1mdW5jdGlvbiBtKGUpe3N3aXRjaChlLnR5cGUpe2Nhc2UiSEFORExFUiI6cmV0dXJuIEUuZ2V0KGUubmFtZSkuZGVzZXJpYWxpemUoZS52YWx1ZSk7Y2FzZSJSQVciOnJldHVybiBlLnZhbHVlfX1mdW5jdGlvbiBnKGUscixpKXtyZXR1cm4gbmV3IFByb21pc2Uocz0+e2NvbnN0IG89VSgpO2UuYWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsZnVuY3Rpb24gYShuKXshbi5kYXRhfHwhbi5kYXRhLmlkfHxuLmRhdGEuaWQhPT1vfHwoZS5yZW1vdmVFdmVudExpc3RlbmVyKCJtZXNzYWdlIixhKSxzKG4uZGF0YSkpfSksZS5zdGFydCYmZS5zdGFydCgpLGUucG9zdE1lc3NhZ2UoT2JqZWN0LmFzc2lnbih7aWQ6b30sciksaSl9KX1mdW5jdGlvbiBVKCl7cmV0dXJuIG5ldyBBcnJheSg0KS5maWxsKDApLm1hcCgoKT0+TWF0aC5mbG9vcihNYXRoLnJhbmRvbSgpKk51bWJlci5NQVhfU0FGRV9JTlRFR0VSKS50b1N0cmluZygxNikpLmpvaW4oIi0iKX1jb25zdCBXPWFzeW5jKCk9PldlYkFzc2VtYmx5LnZhbGlkYXRlKG5ldyBVaW50OEFycmF5KFswLDk3LDExNSwxMDksMSwwLDAsMCwxLDUsMSw5NiwwLDEsMTIzLDMsMiwxLDAsMTAsMTAsMSw4LDAsNjUsMCwyNTMsMTUsMjUzLDk4LDExXSkpLGs9ImVhZ2VyIix4PSJsYXp5IixqPXtzc3c6WyJzaW1kIl0sbWluaW1hcDI6WyJzaW1kIl19LHQ9e3Rvb2xzOltdLGNvbmZpZzp7fSxmaWxlczpbXSxiYXNlOnt9LGZzOnt9LGFzeW5jIGluaXQoKXtpZih0LnRvb2xzLmxlbmd0aD09PTApdGhyb3ciRXhwZWN0aW5nIGF0IGxlYXN0IDEgdG9vbC4iO2lmKG5ldyBTZXQodC50b29scy5tYXAocj0+YCR7ci50b29sfS8ke3IucHJvZ3JhbXx8ci50b29sfWApKS5zaXplIT09dC50b29scy5sZW5ndGgpdGhyb3ciRm91bmQgZHVwbGljYXRlIHRvb2xzOyBjYW4gb25seSBoYXZlIGVhY2ggdG9vbC9wcm9ncmFtIGNvbWJpbmF0aW9uIGF0IG1vc3Qgb25jZS4iO2lmKHQuYmFzZT10LnRvb2xzLmZpbmQocj0+ci5yZWluaXQhPT0hMCksIXQuYmFzZSl0aHJvdyJDb3VsZCBub3QgZmluZCBhIHRvb2wgd2l0aCBgcmVpbml0OiBmYWxzZWAgdG8gdXNlIGFzIHRoZSBiYXNlIG1vZHVsZS4gVG8gZml4IHRoaXMgaXNzdWUsIGluY2x1ZGUgdGhlIHRvb2wgYGJhc2UvMS4wLjBgIHdoZW4gaW5pdGlhbGl6aW5nIEFpb2xpLiI7cmV0dXJuIHQuYmFzZS5pc0Jhc2VNb2R1bGU9ITAsYXdhaXQgdGhpcy5fc2V0dXAodC5iYXNlKSxhd2FpdCB0aGlzLl9pbml0TW9kdWxlcygpLHQuX2xvZygiUmVhZHkiKSwhMH0sYXN5bmMgX2luaXRNb2R1bGVzKCl7YXdhaXQgUHJvbWlzZS5hbGwodC50b29scy5tYXAodGhpcy5fc2V0dXApKSxhd2FpdCB0aGlzLl9zZXR1cEZTKCl9LG1vdW50KGU9W10pe2NvbnN0IHI9YCR7dC5jb25maWcuZGlyU2hhcmVkfSR7dC5jb25maWcuZGlyRGF0YX1gLGk9YCR7dC5jb25maWcuZGlyU2hhcmVkfSR7dC5jb25maWcuZGlyTW91bnRlZH1gO2xldCBzPVtdLG89W10sYT1bXTshQXJyYXkuaXNBcnJheShlKSYmIShlIGluc3RhbmNlb2YgRmlsZUxpc3QpJiYoZT1bZV0pLHQuX2xvZyhgTW91bnRpbmcgJHtlLmxlbmd0aH0gZmlsZXNgKTtmb3IobGV0IG4gb2YgZSl7aWYobiBpbnN0YW5jZW9mIEZpbGV8fChuPT1udWxsP3ZvaWQgMDpuLmRhdGEpaW5zdGFuY2VvZiBCbG9iJiZuLm5hbWV8fHR5cGVvZihuPT1udWxsP3ZvaWQgMDpuLmRhdGEpPT0ic3RyaW5nIiYmbi5uYW1lKXR5cGVvZihuPT1udWxsP3ZvaWQgMDpuLmRhdGEpPT0ic3RyaW5nIiYmKG4uZGF0YT1uZXcgQmxvYihbbi5kYXRhXSx7dHlwZToidGV4dC9wbGFpbiJ9KSkscy5wdXNoKG4pO2Vsc2UgaWYobi5uYW1lJiZuLnVybClvLnB1c2gobik7ZWxzZSBpZih0eXBlb2Ygbj09InN0cmluZyImJm4uc3RhcnRzV2l0aCgiaHR0cCIpKW49e3VybDpuLG5hbWU6bi5zcGxpdCgiLy8iKS5wb3AoKS5yZXBsYWNlKC9cLy9nLCItIil9LG8ucHVzaChuKTtlbHNlIHRocm93J0Nhbm5vdCBtb3VudCBmaWxlKHMpIHNwZWNpZmllZC4gTXVzdCBiZSBhIEZpbGUsIEJsb2IsIGEgVVJMIHN0cmluZywgb3IgeyBuYW1lOiAiZmlsZS50eHQiLCBkYXRhOiAic3RyaW5nIiB9Lic7YS5wdXNoKG4ubmFtZSl9dHJ5e3QuZnMudW5tb3VudChpKX1jYXRjaHt9Zm9yKGxldCBuIG9mIG8pdC5mcy5jcmVhdGVMYXp5RmlsZShyLG4ubmFtZSxuLnVybCwhMCwhMCk7cmV0dXJuIHQuZmlsZXM9dC5maWxlcy5jb25jYXQocyksdC5iYXNlLm1vZHVsZS5GUy5tb3VudCh0LmJhc2UubW9kdWxlLldPUktFUkZTLHtmaWxlczp0LmZpbGVzLmZpbHRlcihuPT5uIGluc3RhbmNlb2YgRmlsZSksYmxvYnM6dC5maWxlcy5maWx0ZXIobj0+KG49PW51bGw/dm9pZCAwOm4uZGF0YSlpbnN0YW5jZW9mIEJsb2IpfSxpKSxzLm1hcChuPT57Y29uc3QgYz1gJHtpfS8ke24ubmFtZX1gLGw9YCR7cn0vJHtuLm5hbWV9YDt0cnl7dC5mcy51bmxpbmsobCl9Y2F0Y2h7fXQuX2xvZyhgQ3JlYXRpbmcgc3ltbGluazogJHtsfSAtLT4gJHtjfWApLHQuZnMuc3ltbGluayhjLGwpfSksYS5tYXAobj0+YCR7cn0vJHtufWApfSxhc3luYyBleGVjKGUscj1udWxsKXtpZih0Ll9sb2coYEV4ZWN1dGluZyAlYyR7ZX0lYyBhcmdzPSR7cn1gLCJjb2xvcjpkYXJrYmx1ZTsgZm9udC13ZWlnaHQ6Ym9sZCIsIiIpLCFlKXRocm93IkV4cGVjdGluZyBhIGNvbW1hbmQiO2xldCBpPWU7cj09bnVsbCYmKHI9ZS5zcGxpdCgiICIpLGk9ci5zaGlmdCgpKTtjb25zdCBzPXQudG9vbHMuZmluZChhPT57dmFyIGM7bGV0IG49aTtyZXR1cm4oKGM9YT09bnVsbD92b2lkIDA6YS5mZWF0dXJlcyk9PW51bGw/dm9pZCAwOmMuc2ltZCk9PT0hMCYmKG49YCR7bn0tc2ltZGApLGEucHJvZ3JhbT09bn0pO2lmKHM9PW51bGwpdGhyb3dgUHJvZ3JhbSAke2l9IG5vdCBmb3VuZC5gO3Muc3Rkb3V0PSIiLHMuc3RkZXJyPSIiLHMubG9hZGluZz09eCYmKHMubG9hZGluZz1rLGF3YWl0IHRoaXMuX2luaXRNb2R1bGVzKCkpO3RyeXtzLm1vZHVsZS5jYWxsTWFpbihyKX1jYXRjaChhKXtjb25zb2xlLmVycm9yKGEpfXRyeXtzLm1vZHVsZS5GUy5jbG9zZShzLm1vZHVsZS5GUy5zdHJlYW1zWzFdKSxzLm1vZHVsZS5GUy5jbG9zZShzLm1vZHVsZS5GUy5zdHJlYW1zWzJdKX1jYXRjaHt9cy5tb2R1bGUuRlMuc3RyZWFtc1sxXT1zLm1vZHVsZS5GUy5vcGVuKCIvZGV2L3N0ZG91dCIsInciKSxzLm1vZHVsZS5GUy5zdHJlYW1zWzJdPXMubW9kdWxlLkZTLm9wZW4oIi9kZXYvc3RkZXJyIiwidyIpO2xldCBvPXtzdGRvdXQ6cy5zdGRvdXQsc3RkZXJyOnMuc3RkZXJyfTtyZXR1cm4gdC5jb25maWcucHJpbnRJbnRlcmxlYXZlZCYmKG89cy5zdGRvdXQpLHMucmVpbml0PT09ITAmJmF3YWl0IHRoaXMucmVpbml0KHMudG9vbCksb30sY2F0KGUpe3JldHVybiB0Ll9maWxlb3AoImNhdCIsZSl9LGxzKGUpe3JldHVybiB0Ll9maWxlb3AoImxzIixlKX0sZG93bmxvYWQoZSl7cmV0dXJuIHQuX2ZpbGVvcCgiZG93bmxvYWQiLGUpfSxwd2QoKXtyZXR1cm4gdC5mcy5jd2QoKX0sY2QoZSl7Zm9yKGxldCByIG9mIHQudG9vbHMpIXIubW9kdWxlfHxyLm1vZHVsZS5GUy5jaGRpcihlKX0sbWtkaXIoZSl7cmV0dXJuIHQuZnMubWtkaXIoZSksITB9LHJlYWQoe3BhdGg6ZSxsZW5ndGg6cixmbGFnOmk9InIiLG9mZnNldDpzPTAscG9zaXRpb246bz0wfSl7Y29uc3QgYT10LmZzLm9wZW4oZSxpKSxuPW5ldyBVaW50OEFycmF5KHIpO3JldHVybiB0LmZzLnJlYWQoYSxuLHMscixvKSx0LmZzLmNsb3NlKGEpLG59LHdyaXRlKHtwYXRoOmUsYnVmZmVyOnIsZmxhZzppPSJ3KyIsb2Zmc2V0OnM9MCxwb3NpdGlvbjpvPTB9KXtjb25zdCBhPXQuZnMub3BlbihlLGkpO3QuZnMud3JpdGUoYSxyLHMsci5sZW5ndGgsbyksdC5mcy5jbG9zZShhKX0sYXN5bmMgcmVpbml0KGUpe2NvbnN0IHI9dC50b29scy5maW5kKHM9PnMudG9vbD09ZSksaT10LmJhc2UubW9kdWxlLkZTLmN3ZCgpO09iamVjdC5hc3NpZ24ocixyLmNvbmZpZyksci5yZWFkeT0hMSxhd2FpdCB0aGlzLmluaXQoKSxyLmlzQmFzZU1vZHVsZSYmdGhpcy5tb3VudCgpLHRoaXMuY2QoaSl9LF9zdGRpblR4dDoiIixfc3RkaW5QdHI6MCxnZXQgc3RkaW4oKXtyZXR1cm4gdC5fc3RkaW5UeHR9LHNldCBzdGRpbihlPSIiKXt0Ll9sb2coYFNldHRpbmcgc3RkaW4gdG8gJWMke2V9JWNgLCJjb2xvcjpkYXJrYmx1ZSIsIiIpLHQuX3N0ZGluVHh0PWUsdC5fc3RkaW5QdHI9MH0sYXN5bmMgX3NldHVwKGUpe2lmKGUucmVhZHkpcmV0dXJuO2lmKHQuX2xvZyhgU2V0dGluZyB1cCAke2UudG9vbH0gKGJhc2UgPSAke2UuaXNCYXNlTW9kdWxlPT09ITB9KS4uLmApLGUuY29uZmlnPU9iamVjdC5hc3NpZ24oe30sZSksZS51cmxQcmVmaXh8fChlLnVybFByZWZpeD1gJHt0LmNvbmZpZy51cmxDRE59LyR7ZS50b29sfS8ke2UudmVyc2lvbn1gKSxlLnByb2dyYW18fChlLnByb2dyYW09ZS50b29sKSxlLmZlYXR1cmVzfHwoZS5mZWF0dXJlcz17fSwoaltlLnByb2dyYW1dfHxbXSkuaW5jbHVkZXMoInNpbWQiKSYmKGF3YWl0IFcoKT8oZS5wcm9ncmFtKz0iLXNpbWQiLGUuZmVhdHVyZXMuc2ltZD0hMCk6dC5fbG9nKGBXZWJBc3NlbWJseSBTSU1EIGlzIG5vdCBzdXBwb3J0ZWQgaW4gdGhpcyBicm93c2VyOyB3aWxsIGxvYWQgbm9uLVNJTUQgdmVyc2lvbiBvZiAke2UucHJvZ3JhbX0uYCkpKSxlLmlzQmFzZU1vZHVsZSYmKGUubG9hZGluZz1rKSxlLmxvYWRpbmc9PT14KXt0Ll9sb2coYFdpbGwgbGF6eS1sb2FkICR7ZS50b29sfTsgc2tpcHBpbmcgaW5pdGlhbGl6YXRpb24uYCk7cmV0dXJufXNlbGYuaW1wb3J0U2NyaXB0cyhgJHtlLnVybFByZWZpeH0vJHtlLnByb2dyYW19LmpzYCksZS5tb2R1bGU9YXdhaXQgTW9kdWxlKHt0aGlzUHJvZ3JhbTplLnByb2dyYW0sbG9jYXRlRmlsZTooaSxzKT0+YCR7ZS51cmxQcmVmaXh9LyR7aX1gLHN0ZGluOigpPT50Ll9zdGRpblB0cjx0LnN0ZGluLmxlbmd0aD90LnN0ZGluLmNoYXJDb2RlQXQodC5fc3RkaW5QdHIrKyk6KHQuc3RkaW49IiIsbnVsbCkscHJpbnQ6aT0+e3QuY29uZmlnLnByaW50U3RyZWFtP3Bvc3RNZXNzYWdlKHt0eXBlOiJiaW93YXNtIix2YWx1ZTp7c3Rkb3V0Oml9fSk6ZS5zdGRvdXQrPWkrYApgfSxwcmludEVycjppPT57Y29uc3Qgcz10LmNvbmZpZy5wcmludEludGVybGVhdmVkPyJzdGRvdXQiOiJzdGRlcnIiO3QuY29uZmlnLnByaW50U3RyZWFtP3Bvc3RNZXNzYWdlKHt0eXBlOiJiaW93YXNtIix2YWx1ZTp7W3NdOml9fSk6ZVtzXSs9aStgCmB9fSk7Y29uc3Qgcj1lLm1vZHVsZS5GUztlLmlzQmFzZU1vZHVsZT8odC5fbG9nKGBTZXR0aW5nIHVwICR7ZS50b29sfSB3aXRoIGJhc2UgbW9kdWxlIGZpbGVzeXN0ZW0uLi5gKSxyLm1rZGlyKHQuY29uZmlnLmRpclNoYXJlZCw1MTEpLHIubWtkaXIoYCR7dC5jb25maWcuZGlyU2hhcmVkfS8ke3QuY29uZmlnLmRpckRhdGF9YCw1MTEpLHIubWtkaXIoYCR7dC5jb25maWcuZGlyU2hhcmVkfS8ke3QuY29uZmlnLmRpck1vdW50ZWR9YCw1MTEpLHIuY2hkaXIoYCR7dC5jb25maWcuZGlyU2hhcmVkfS8ke3QuY29uZmlnLmRpckRhdGF9YCksdC5mcz1yKToodC5fbG9nKGBTZXR0aW5nIHVwICR7ZS50b29sfSB3aXRoIGZpbGVzeXN0ZW0uLi5gKSxyLm1rZGlyKHQuY29uZmlnLmRpclNoYXJlZCksci5tb3VudChlLm1vZHVsZS5QUk9YWUZTLHtyb290OnQuY29uZmlnLmRpclNoYXJlZCxmczp0LmZzfSx0LmNvbmZpZy5kaXJTaGFyZWQpLHIuY2hkaXIodC5mcy5jd2QoKSkpLGUuc3Rkb3V0PSIiLGUuc3RkZXJyPSIiLGUucmVhZHk9ITB9LGFzeW5jIF9zZXR1cEZTKCl7Y29uc3QgZT10LmZzO2ZvcihsZXQgciBvZiB0LnRvb2xzKXtpZighci5yZWFkeSljb250aW51ZTtjb25zdCBpPXIubW9kdWxlLkZTLHM9YC8ke3IudG9vbH1gLG89YCR7dC5jb25maWcuZGlyU2hhcmVkfSR7c31gOyFpLmFuYWx5emVQYXRoKHMpLmV4aXN0c3x8ZS5hbmFseXplUGF0aChvKS5leGlzdHN8fCh0Ll9sb2coYE1vdW50aW5nICR7c30gb250byAke3QuYmFzZS50b29sfSBmaWxlc3lzdGVtIGF0ICR7b31gKSxlLm1rZGlyKG8pLGUubW91bnQodC5iYXNlLm1vZHVsZS5QUk9YWUZTLHtyb290OnMsZnM6aX0sbykpfX0sX2ZpbGVvcChlLHIpe3QuX2xvZyhgUnVubmluZyAke2V9ICR7cn1gKTtjb25zdCBpPXQuZnMuYW5hbHl6ZVBhdGgocik7aWYoIWkuZXhpc3RzKXJldHVybiB0Ll9sb2coYEZpbGUgJHtyfSBub3QgZm91bmQuYCksITE7c3dpdGNoKGUpe2Nhc2UiY2F0IjpyZXR1cm4gdC5mcy5yZWFkRmlsZShyLHtlbmNvZGluZzoidXRmOCJ9KTtjYXNlImxzIjpyZXR1cm4gdC5mcy5pc0ZpbGUoaS5vYmplY3QubW9kZSk/dC5mcy5zdGF0KHIpOnQuZnMucmVhZGRpcihyKTtjYXNlImRvd25sb2FkIjpjb25zdCBzPW5ldyBCbG9iKFt0aGlzLmNhdChyKV0pO3JldHVybiBVUkwuY3JlYXRlT2JqZWN0VVJMKHMpfXJldHVybiExfSxfbG9nKGUpe2lmKCF0LmNvbmZpZy5kZWJ1ZylyZXR1cm47bGV0IHI9Wy4uLmFyZ3VtZW50c107ci5zaGlmdCgpLGNvbnNvbGUubG9nKGAlY1tXZWJXb3JrZXJdJWMgJHtlfWAsImZvbnQtd2VpZ2h0OmJvbGQiLCIiLC4uLnIpfX07dyh0KX0pKCk7Cg==",a0=typeof window<"u"&&window.Blob&&new Blob([atob(o0)],{type:"text/javascript;charset=utf-8"});function mF(){const n=a0&&(window.URL||window.webkitURL).createObjectURL(a0);try{return n?new Worker(n):new Worker("data:application/javascript;base64,"+o0)}finally{n&&(window.URL||window.webkitURL).revokeObjectURL(n)}}const hF="https://biowasm.com/cdn/v3",gF="https://stg.biowasm.com/cdn/v3",yF={urlCDN:hF,urlCDNStg:gF,dirShared:"/shared",dirMounted:"/mnt",dirData:"/data",printInterleaved:!0,printStream:!1,callback:null,debug:!1,env:"prd"};class bF{constructor(e,r={}){if(e==null)throw"Expecting array of tools as input to Aioli constructor.";return Array.isArray(e)||(e=[e]),r=Object.assign({},yF,r),e=e.map(this._parseTool),r.env==="stg"&&(r.urlCDN=r.urlCDNStg),this.tools=e,this.config=r,this.config.callback!=null&&(this.callback=this.config.callback),delete this.config.callback,this.init()}async init(){const e=new mF;this.callback&&(e.onmessage=o=>{o.data.type==="biowasm"&&this.callback(o.data.value)});const r=t0(e);return r.tools=this.tools,r.config=this.config,await r.init(),r}_parseTool(e){if(typeof e!="string")return e;const r=e.split("/");if(r.length!=2&&r.length!=3)throw"Expecting '<tool>/<version>' or '<tool>/<program>/<version>'";return{tool:r[0],program:r.length==3?r[1]:r[0],version:r[r.length-1]}}}function _F(n){const e=t.reactive({value:new Map,loading:!1});return t.watchEffect(async()=>{const r=t.toValue(n);let o=!1;t.onWatcherCleanup(()=>{o=!0});try{e.loading=!0;const a=await wF(r);if(o)return;e.value=a}catch(a){console.error(a),e.value.clear()}finally{e.loading=!1}}),e}const i0=new Map;async function wF(n){const e=await xF(n);let r=i0.get(e);if(r)return r;const o=await new bF(["kalign/3.3.1"]),a=new File(n.map(c=>`>${c.header}
|
|
86
|
+
${c.sequence}
|
|
87
|
+
`),"input");await o.mount(a),await o.exec("kalign -f fasta -i input -o output");const l=await o.cat("output");return r=kF(l),i0.set(e,r),r}function kF(n){const e=new Map;let r="";for(let o of n.split(`
|
|
88
|
+
`)){if(o=o.trim(),!o)continue;if(o.startsWith(">")){const l=o.slice(1);e.set(l,""),r=l;continue}const a=e.get(r);if(a===void 0)throw new Error("Malformed kalign output, aborting.");e.set(r,a+o)}return e}async function xF(n){const e=new TextEncoder,r=new TextDecoder,o=c=>crypto.subtle.digest("SHA-256",c),a=await Promise.all(n.map(({header:c,sequence:d})=>o(e.encode(`${c} ${d}`)))),l=a.reduce((c,d,u)=>(c.set(new Uint8Array(d),u*32),c),new Uint8Array(a.length*32));return r.decode(await o(l))}const vF="12px",CF=mr(t.defineComponent({__name:"MultiSequenceAlignmentView",props:{sequenceRows:{},highlight:{}},setup(n){t.useCssVars(c=>({"91e4d8a4":o.value,ffe371c0:a.value,"1b845511":vF}));const e=_F(()=>n.sequenceRows),r=t.reactive(rF(()=>{if(!(n.highlight!=="chemical-properties"||e.loading))return n.sequenceRows.map(({header:c})=>(e.value.get(c)||console.error(`Missing aligned row for header ${c}`),e.value.get(c)??""))})),o=t.computed(()=>{var c;return(((c=n.sequenceRows.at(0))==null?void 0:c.labels.length)??0)+1}),a=t.computed(()=>n.sequenceRows.length),l=t.computed(()=>{if(n.highlight)switch(n.highlight){case"chemical-properties":return r;default:throw new Error(`Unknown highlight ${n.highlight}`)}});return(c,d)=>t.unref(e).loading?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["pl-scrollable",c.$style.container])},[l.value&&!l.value.loading?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(c.$style.highlight),style:t.normalizeStyle({backgroundImage:t.unref(oF)({columns:l.value.data,rowCount:c.sequenceRows.length,colors:t.unref(Yy)})})},null,6)):t.createCommentVNode("",!0),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(c.sequenceRows,u=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:u.header},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(u.labels,(f,m)=>(t.openBlock(),t.createElementBlock("div",{key:m,class:t.normalizeClass([c.$style.label,m===u.labels.length-1&&c.$style.last])},t.toDisplayString(f),3))),128)),t.createElementVNode("div",{class:t.normalizeClass(c.$style.sequence)},t.toDisplayString(t.unref(e).value.get(u.header)),3)],64))),128))],2))}}),[["__cssModules",{$style:{container:"_container_gmfps_2",highlight:"_highlight_gmfps_19",label:"_label_gmfps_28",last:"_last_gmfps_35",sequence:"_sequence_gmfps_41"}}]]),SF=mr(t.defineComponent({__name:"PlMultiSequenceAlignment",props:t.mergeModels({pFrame:{},sequenceColumnPredicate:{type:Function},labelColumnOptionPredicate:{type:Function},linkerColumnPredicate:{type:Function},selection:{}},{modelValue:{default:{}},modelModifiers:{}}),emits:["update:modelValue"],setup(n){const e=t.useModel(n,"modelValue"),r=n,o=t.ref(!1),a=t.ref(!1);t.onMounted(()=>{a.value=!0});const l=Es(),c=t.reactive(LM(()=>({pframe:r.pFrame,sequenceColumnPredicate:r.sequenceColumnPredicate}))),d=t.reactive(OM(()=>({pframe:r.pFrame,sequenceColumnIds:c.defaults,labelColumnOptionPredicate:r.labelColumnOptionPredicate}))),u=t.computed({get:()=>e.value.sequenceColumnIds??c.defaults,set:g=>{e.value.sequenceColumnIds=g}}),f=t.computed({get:()=>e.value.labelColumnIds??d.defaults,set:g=>{e.value.labelColumnIds=g}}),m=t.reactive($M(()=>({pframe:r.pFrame,sequenceColumnIds:u.value,labelColumnIds:f.value,linkerColumnPredicate:r.linkerColumnPredicate,selection:r.selection})));return(g,y)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[a.value&&t.unref(l)?(t.openBlock(),t.createBlock(t.Teleport,{key:0,to:t.unref(l)},[t.createVNode(t.unref(cr),{icon:"dna",onClick:y[0]||(y[0]=t.withModifiers(_=>o.value=!0,["stop"]))},{default:t.withCtx(()=>y[4]||(y[4]=[t.createTextVNode(" Multi Alignment ")])),_:1})],8,["to"])):t.createCommentVNode("",!0),t.createVNode(t.unref(Ko),{modelValue:o.value,"onUpdate:modelValue":y[3]||(y[3]=_=>o.value=_),width:"100%","close-on-outside-click":!1},{title:t.withCtx(()=>[y[5]||(y[5]=t.createTextVNode(" Multi Alignment ")),t.createVNode(t.unref(ct),{class:t.normalizeClass(g.$style.tooltip),position:"southwest"},{tooltip:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(tF),_=>(t.openBlock(),t.createElementBlock("div",{key:_},[t.createElementVNode("span",{class:t.normalizeClass(g.$style["color-sample"]),style:t.normalizeStyle({backgroundColor:t.unref(Yy)[_]})},null,6),t.createTextVNode(" "+t.toDisplayString(t.unref(nF)[_]),1)]))),128))]),default:t.withCtx(()=>[t.createVNode(t.unref(Yo),{name:"info"})]),_:1},8,["class"])]),default:t.withCtx(()=>[t.createVNode(t.unref(Zl),{modelValue:u.value,"onUpdate:modelValue":y[1]||(y[1]=_=>u.value=_),label:"Sequence Columns",options:c.options,disabled:c.loading,clearable:""},null,8,["modelValue","options","disabled"]),t.createVNode(t.unref(Zl),{modelValue:f.value,"onUpdate:modelValue":y[2]||(y[2]=_=>f.value=_),label:"Label Columns",options:d.options,disabled:d.loading,clearable:""},null,8,["modelValue","options","disabled"]),m.data.length<2?(t.openBlock(),t.createBlock(t.unref(bd),{key:0,type:"warn"},{default:t.withCtx(()=>y[6]||(y[6]=[t.createTextVNode(" Please select at least one sequence column and two or more rows to run alignment ")])),_:1})):(t.openBlock(),t.createBlock(CF,{key:1,sequenceRows:m.data,highlight:"chemical-properties"},null,8,["sequenceRows"]))]),_:1},8,["modelValue"])],64))}}),[["__cssModules",{$style:{tooltip:"_tooltip_sryku_2","color-sample":"_color-sample_sryku_5"}}]]),Ws=new Map;function EF(n,e){const r=t.getCurrentScope()??t.effectScope(),o=r.run(()=>(t.onScopeDispose(()=>{Ws.delete(n)}),t.reactive(e())));return o[Symbol.dispose]=()=>{r.stop()},o}function NF(n){const e=Symbol();return()=>(Ws.has(e)||Ws.set(e,EF(e,n)),Ws.get(e))}function VF(n){return t.computed(()=>{try{return Kf(n())}catch(e){return{errors:[Qa(e)],value:void 0}}})}const fa=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,l0=new Set,qu=typeof process=="object"&&process?process:{},s0=(n,e,r,o)=>{typeof qu.emitWarning=="function"?qu.emitWarning(n,e,r,o):console.error(`[${r}] ${e}: ${n}`)};let Gs=globalThis.AbortController,c0=globalThis.AbortSignal;if(typeof Gs>"u"){c0=class{constructor(){Ue(this,"onabort");Ue(this,"_onabort",[]);Ue(this,"reason");Ue(this,"aborted",!1)}addEventListener(o,a){this._onabort.push(a)}},Gs=class{constructor(){Ue(this,"signal",new c0);e()}abort(o){var a,l;if(!this.signal.aborted){this.signal.reason=o,this.signal.aborted=!0;for(const c of this.signal._onabort)c(o);(l=(a=this.signal).onabort)==null||l.call(a,o)}}};let n=((u0=qu.env)==null?void 0:u0.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{n&&(n=!1,s0("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 BF=n=>!l0.has(n),Hr=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),d0=n=>Hr(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?Us:null:null;class Us extends Array{constructor(e){super(e),this.fill(0)}}const vo=class vo{constructor(e,r){Ue(this,"heap");Ue(this,"length");if(!R(vo,ma))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}static create(e){const r=d0(e);if(!r)return[];ge(vo,ma,!0);const o=new vo(e,r);return ge(vo,ma,!1),o}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};ma=new WeakMap,Pe(vo,ma,!1);let Qu=vo;const np=class np{constructor(e){Pe(this,re);Pe(this,Rn);Pe(this,tn);Pe(this,In);Pe(this,Co);Pe(this,An);Pe(this,ha);Pe(this,ga);Ue(this,"ttl");Ue(this,"ttlResolution");Ue(this,"ttlAutopurge");Ue(this,"updateAgeOnGet");Ue(this,"updateAgeOnHas");Ue(this,"allowStale");Ue(this,"noDisposeOnSet");Ue(this,"noUpdateTTL");Ue(this,"maxEntrySize");Ue(this,"sizeCalculation");Ue(this,"noDeleteOnFetchRejection");Ue(this,"noDeleteOnStaleGet");Ue(this,"allowStaleOnFetchAbort");Ue(this,"allowStaleOnFetchRejection");Ue(this,"ignoreFetchAbort");Pe(this,yt);Pe(this,Ln);Pe(this,gt);Pe(this,Qe);Pe(this,Ee);Pe(this,Mt);Pe(this,nn);Pe(this,Tt);Pe(this,wt);Pe(this,On);Pe(this,kt);Pe(this,$n);Pe(this,Zn);Pe(this,rn);Pe(this,Mn);Pe(this,Xr);Pe(this,Ft);Pe(this,ya);Pe(this,So,()=>{});Pe(this,hr,()=>{});Pe(this,Fi,()=>{});Pe(this,on,()=>!1);Pe(this,Eo,e=>{});Pe(this,ba,(e,r,o)=>{});Pe(this,Pi,(e,r,o,a)=>{if(o||a)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});Ue(this,p0,"LRUCache");const{max:r=0,ttl:o,ttlResolution:a=1,ttlAutopurge:l,updateAgeOnGet:c,updateAgeOnHas:d,allowStale:u,dispose:f,onInsert:m,disposeAfter:g,noDisposeOnSet:y,noUpdateTTL:_,maxSize:C=0,maxEntrySize:N=0,sizeCalculation:T,fetchMethod:$,memoMethod:W,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:D,allowStaleOnFetchRejection:A,allowStaleOnFetchAbort:B,ignoreFetchAbort:P}=e;if(r!==0&&!Hr(r))throw new TypeError("max option must be a nonnegative integer");const H=r?d0(r):Array;if(!H)throw new Error("invalid max value: "+r);if(ge(this,Rn,r),ge(this,tn,C),this.maxEntrySize=N||R(this,tn),this.sizeCalculation=T,this.sizeCalculation){if(!R(this,tn)&&!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(W!==void 0&&typeof W!="function")throw new TypeError("memoMethod must be a function if defined");if(ge(this,ga,W),$!==void 0&&typeof $!="function")throw new TypeError("fetchMethod must be a function if specified");if(ge(this,ha,$),ge(this,Xr,!!$),ge(this,gt,new Map),ge(this,Qe,new Array(r).fill(void 0)),ge(this,Ee,new Array(r).fill(void 0)),ge(this,Mt,new H(r)),ge(this,nn,new H(r)),ge(this,Tt,0),ge(this,wt,0),ge(this,On,Qu.create(r)),ge(this,yt,0),ge(this,Ln,0),typeof f=="function"&&ge(this,In,f),typeof m=="function"&&ge(this,Co,m),typeof g=="function"?(ge(this,An,g),ge(this,kt,[])):(ge(this,An,void 0),ge(this,kt,void 0)),ge(this,Mn,!!R(this,In)),ge(this,ya,!!R(this,Co)),ge(this,Ft,!!R(this,An)),this.noDisposeOnSet=!!y,this.noUpdateTTL=!!_,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!A,this.allowStaleOnFetchAbort=!!B,this.ignoreFetchAbort=!!P,this.maxEntrySize!==0){if(R(this,tn)!==0&&!Hr(R(this,tn)))throw new TypeError("maxSize must be a positive integer if specified");if(!Hr(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");de(this,re,H_).call(this)}if(this.allowStale=!!u,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!c,this.updateAgeOnHas=!!d,this.ttlResolution=Hr(a)||a===0?a:1,this.ttlAutopurge=!!l,this.ttl=o||0,this.ttl){if(!Hr(this.ttl))throw new TypeError("ttl must be a positive integer if specified");de(this,re,Ef).call(this)}if(R(this,Rn)===0&&this.ttl===0&&R(this,tn)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!R(this,Rn)&&!R(this,tn)){const S="LRU_CACHE_UNBOUNDED";BF(S)&&(l0.add(S),s0("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",S,np))}}static unsafeExposeInternals(e){return{starts:R(e,Zn),ttls:R(e,rn),sizes:R(e,$n),keyMap:R(e,gt),keyList:R(e,Qe),valList:R(e,Ee),next:R(e,Mt),prev:R(e,nn),get head(){return R(e,Tt)},get tail(){return R(e,wt)},free:R(e,On),isBackgroundFetch:r=>{var o;return de(o=e,re,tt).call(o,r)},backgroundFetch:(r,o,a,l)=>{var c;return de(c=e,re,Fc).call(c,r,o,a,l)},moveToTail:r=>{var o;return de(o=e,re,cl).call(o,r)},indexes:r=>{var o;return de(o=e,re,ro).call(o,r)},rindexes:r=>{var o;return de(o=e,re,oo).call(o,r)},isStale:r=>{var o;return R(o=e,on).call(o,r)}}}get max(){return R(this,Rn)}get maxSize(){return R(this,tn)}get calculatedSize(){return R(this,Ln)}get size(){return R(this,yt)}get fetchMethod(){return R(this,ha)}get memoMethod(){return R(this,ga)}get dispose(){return R(this,In)}get onInsert(){return R(this,Co)}get disposeAfter(){return R(this,An)}getRemainingTTL(e){return R(this,gt).has(e)?1/0:0}*entries(){for(const e of de(this,re,ro).call(this))R(this,Ee)[e]!==void 0&&R(this,Qe)[e]!==void 0&&!de(this,re,tt).call(this,R(this,Ee)[e])&&(yield[R(this,Qe)[e],R(this,Ee)[e]])}*rentries(){for(const e of de(this,re,oo).call(this))R(this,Ee)[e]!==void 0&&R(this,Qe)[e]!==void 0&&!de(this,re,tt).call(this,R(this,Ee)[e])&&(yield[R(this,Qe)[e],R(this,Ee)[e]])}*keys(){for(const e of de(this,re,ro).call(this)){const r=R(this,Qe)[e];r!==void 0&&!de(this,re,tt).call(this,R(this,Ee)[e])&&(yield r)}}*rkeys(){for(const e of de(this,re,oo).call(this)){const r=R(this,Qe)[e];r!==void 0&&!de(this,re,tt).call(this,R(this,Ee)[e])&&(yield r)}}*values(){for(const e of de(this,re,ro).call(this))R(this,Ee)[e]!==void 0&&!de(this,re,tt).call(this,R(this,Ee)[e])&&(yield R(this,Ee)[e])}*rvalues(){for(const e of de(this,re,oo).call(this))R(this,Ee)[e]!==void 0&&!de(this,re,tt).call(this,R(this,Ee)[e])&&(yield R(this,Ee)[e])}[(f0=Symbol.iterator,p0=Symbol.toStringTag,f0)](){return this.entries()}find(e,r={}){for(const o of de(this,re,ro).call(this)){const a=R(this,Ee)[o],l=de(this,re,tt).call(this,a)?a.__staleWhileFetching:a;if(l!==void 0&&e(l,R(this,Qe)[o],this))return this.get(R(this,Qe)[o],r)}}forEach(e,r=this){for(const o of de(this,re,ro).call(this)){const a=R(this,Ee)[o],l=de(this,re,tt).call(this,a)?a.__staleWhileFetching:a;l!==void 0&&e.call(r,l,R(this,Qe)[o],this)}}rforEach(e,r=this){for(const o of de(this,re,oo).call(this)){const a=R(this,Ee)[o],l=de(this,re,tt).call(this,a)?a.__staleWhileFetching:a;l!==void 0&&e.call(r,l,R(this,Qe)[o],this)}}purgeStale(){let e=!1;for(const r of de(this,re,oo).call(this,{allowStale:!0}))R(this,on).call(this,r)&&(de(this,re,ao).call(this,R(this,Qe)[r],"expire"),e=!0);return e}info(e){const r=R(this,gt).get(e);if(r===void 0)return;const o=R(this,Ee)[r],a=de(this,re,tt).call(this,o)?o.__staleWhileFetching:o;if(a===void 0)return;const l={value:a};if(R(this,rn)&&R(this,Zn)){const c=R(this,rn)[r],d=R(this,Zn)[r];if(c&&d){const u=c-(fa.now()-d);l.ttl=u,l.start=Date.now()}}return R(this,$n)&&(l.size=R(this,$n)[r]),l}dump(){const e=[];for(const r of de(this,re,ro).call(this,{allowStale:!0})){const o=R(this,Qe)[r],a=R(this,Ee)[r],l=de(this,re,tt).call(this,a)?a.__staleWhileFetching:a;if(l===void 0||o===void 0)continue;const c={value:l};if(R(this,rn)&&R(this,Zn)){c.ttl=R(this,rn)[r];const d=fa.now()-R(this,Zn)[r];c.start=Math.floor(Date.now()-d)}R(this,$n)&&(c.size=R(this,$n)[r]),e.unshift([o,c])}return e}load(e){this.clear();for(const[r,o]of e){if(o.start){const a=Date.now()-o.start;o.start=fa.now()-a}this.set(r,o.value,o)}}set(e,r,o={}){var y,_,C,N,T,$,W;if(r===void 0)return this.delete(e),this;const{ttl:a=this.ttl,start:l,noDisposeOnSet:c=this.noDisposeOnSet,sizeCalculation:d=this.sizeCalculation,status:u}=o;let{noUpdateTTL:f=this.noUpdateTTL}=o;const m=R(this,Pi).call(this,e,r,o.size||0,d);if(this.maxEntrySize&&m>this.maxEntrySize)return u&&(u.set="miss",u.maxEntrySizeExceeded=!0),de(this,re,ao).call(this,e,"set"),this;let g=R(this,yt)===0?void 0:R(this,gt).get(e);if(g===void 0)g=R(this,yt)===0?R(this,wt):R(this,On).length!==0?R(this,On).pop():R(this,yt)===R(this,Rn)?de(this,re,Mc).call(this,!1):R(this,yt),R(this,Qe)[g]=e,R(this,Ee)[g]=r,R(this,gt).set(e,g),R(this,Mt)[R(this,wt)]=g,R(this,nn)[g]=R(this,wt),ge(this,wt,g),Zc(this,yt)._++,R(this,ba).call(this,g,m,u),u&&(u.set="add"),f=!1,R(this,ya)&&((y=R(this,Co))==null||y.call(this,r,e,"add"));else{de(this,re,cl).call(this,g);const E=R(this,Ee)[g];if(r!==E){if(R(this,Xr)&&de(this,re,tt).call(this,E)){E.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:D}=E;D!==void 0&&!c&&(R(this,Mn)&&((_=R(this,In))==null||_.call(this,D,e,"set")),R(this,Ft)&&((C=R(this,kt))==null||C.push([D,e,"set"])))}else c||(R(this,Mn)&&((N=R(this,In))==null||N.call(this,E,e,"set")),R(this,Ft)&&((T=R(this,kt))==null||T.push([E,e,"set"])));if(R(this,Eo).call(this,g),R(this,ba).call(this,g,m,u),R(this,Ee)[g]=r,u){u.set="replace";const D=E&&de(this,re,tt).call(this,E)?E.__staleWhileFetching:E;D!==void 0&&(u.oldValue=D)}}else u&&(u.set="update");R(this,ya)&&(($=this.onInsert)==null||$.call(this,r,e,r===E?"update":"replace"))}if(a!==0&&!R(this,rn)&&de(this,re,Ef).call(this),R(this,rn)&&(f||R(this,Fi).call(this,g,a,l),u&&R(this,hr).call(this,u,g)),!c&&R(this,Ft)&&R(this,kt)){const E=R(this,kt);let D;for(;D=E==null?void 0:E.shift();)(W=R(this,An))==null||W.call(this,...D)}return this}pop(){var e;try{for(;R(this,yt);){const r=R(this,Ee)[R(this,Tt)];if(de(this,re,Mc).call(this,!0),de(this,re,tt).call(this,r)){if(r.__staleWhileFetching)return r.__staleWhileFetching}else if(r!==void 0)return r}}finally{if(R(this,Ft)&&R(this,kt)){const r=R(this,kt);let o;for(;o=r==null?void 0:r.shift();)(e=R(this,An))==null||e.call(this,...o)}}}has(e,r={}){const{updateAgeOnHas:o=this.updateAgeOnHas,status:a}=r,l=R(this,gt).get(e);if(l!==void 0){const c=R(this,Ee)[l];if(de(this,re,tt).call(this,c)&&c.__staleWhileFetching===void 0)return!1;if(R(this,on).call(this,l))a&&(a.has="stale",R(this,hr).call(this,a,l));else return o&&R(this,So).call(this,l),a&&(a.has="hit",R(this,hr).call(this,a,l)),!0}else a&&(a.has="miss");return!1}peek(e,r={}){const{allowStale:o=this.allowStale}=r,a=R(this,gt).get(e);if(a===void 0||!o&&R(this,on).call(this,a))return;const l=R(this,Ee)[a];return de(this,re,tt).call(this,l)?l.__staleWhileFetching:l}async fetch(e,r={}){const{allowStale:o=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,ttl:c=this.ttl,noDisposeOnSet:d=this.noDisposeOnSet,size:u=0,sizeCalculation:f=this.sizeCalculation,noUpdateTTL:m=this.noUpdateTTL,noDeleteOnFetchRejection:g=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:y=this.allowStaleOnFetchRejection,ignoreFetchAbort:_=this.ignoreFetchAbort,allowStaleOnFetchAbort:C=this.allowStaleOnFetchAbort,context:N,forceRefresh:T=!1,status:$,signal:W}=r;if(!R(this,Xr))return $&&($.fetch="get"),this.get(e,{allowStale:o,updateAgeOnGet:a,noDeleteOnStaleGet:l,status:$});const E={allowStale:o,updateAgeOnGet:a,noDeleteOnStaleGet:l,ttl:c,noDisposeOnSet:d,size:u,sizeCalculation:f,noUpdateTTL:m,noDeleteOnFetchRejection:g,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:C,ignoreFetchAbort:_,status:$,signal:W};let D=R(this,gt).get(e);if(D===void 0){$&&($.fetch="miss");const A=de(this,re,Fc).call(this,e,D,E,N);return A.__returned=A}else{const A=R(this,Ee)[D];if(de(this,re,tt).call(this,A)){const I=o&&A.__staleWhileFetching!==void 0;return $&&($.fetch="inflight",I&&($.returnedStale=!0)),I?A.__staleWhileFetching:A.__returned=A}const B=R(this,on).call(this,D);if(!T&&!B)return $&&($.fetch="hit"),de(this,re,cl).call(this,D),a&&R(this,So).call(this,D),$&&R(this,hr).call(this,$,D),A;const P=de(this,re,Fc).call(this,e,D,E,N),S=P.__staleWhileFetching!==void 0&&o;return $&&($.fetch=B?"stale":"refresh",S&&B&&($.returnedStale=!0)),S?P.__staleWhileFetching:P.__returned=P}}async forceFetch(e,r={}){const o=await this.fetch(e,r);if(o===void 0)throw new Error("fetch() returned undefined");return o}memo(e,r={}){const o=R(this,ga);if(!o)throw new Error("no memoMethod provided to constructor");const{context:a,forceRefresh:l,...c}=r,d=this.get(e,c);if(!l&&d!==void 0)return d;const u=o(e,d,{options:c,context:a});return this.set(e,u,c),u}get(e,r={}){const{allowStale:o=this.allowStale,updateAgeOnGet:a=this.updateAgeOnGet,noDeleteOnStaleGet:l=this.noDeleteOnStaleGet,status:c}=r,d=R(this,gt).get(e);if(d!==void 0){const u=R(this,Ee)[d],f=de(this,re,tt).call(this,u);return c&&R(this,hr).call(this,c,d),R(this,on).call(this,d)?(c&&(c.get="stale"),f?(c&&o&&u.__staleWhileFetching!==void 0&&(c.returnedStale=!0),o?u.__staleWhileFetching:void 0):(l||de(this,re,ao).call(this,e,"expire"),c&&o&&(c.returnedStale=!0),o?u:void 0)):(c&&(c.get="hit"),f?u.__staleWhileFetching:(de(this,re,cl).call(this,d),a&&R(this,So).call(this,d),u))}else c&&(c.get="miss")}delete(e){return de(this,re,ao).call(this,e,"delete")}clear(){return de(this,re,Bf).call(this,"delete")}};Rn=new WeakMap,tn=new WeakMap,In=new WeakMap,Co=new WeakMap,An=new WeakMap,ha=new WeakMap,ga=new WeakMap,yt=new WeakMap,Ln=new WeakMap,gt=new WeakMap,Qe=new WeakMap,Ee=new WeakMap,Mt=new WeakMap,nn=new WeakMap,Tt=new WeakMap,wt=new WeakMap,On=new WeakMap,kt=new WeakMap,$n=new WeakMap,Zn=new WeakMap,rn=new WeakMap,Mn=new WeakMap,Xr=new WeakMap,Ft=new WeakMap,ya=new WeakMap,re=new WeakSet,Ef=function(){const e=new Us(R(this,Rn)),r=new Us(R(this,Rn));ge(this,rn,e),ge(this,Zn,r),ge(this,Fi,(l,c,d=fa.now())=>{if(r[l]=c!==0?d:0,e[l]=c,c!==0&&this.ttlAutopurge){const u=setTimeout(()=>{R(this,on).call(this,l)&&de(this,re,ao).call(this,R(this,Qe)[l],"expire")},c+1);u.unref&&u.unref()}}),ge(this,So,l=>{r[l]=e[l]!==0?fa.now():0}),ge(this,hr,(l,c)=>{if(e[c]){const d=e[c],u=r[c];if(!d||!u)return;l.ttl=d,l.start=u,l.now=o||a();const f=l.now-u;l.remainingTTL=d-f}});let o=0;const a=()=>{const l=fa.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=R(this,gt).get(l);if(c===void 0)return 0;const d=e[c],u=r[c];if(!d||!u)return 1/0;const f=(o||a())-u;return d-f},ge(this,on,l=>{const c=r[l],d=e[l];return!!d&&!!c&&(o||a())-c>d})},So=new WeakMap,hr=new WeakMap,Fi=new WeakMap,on=new WeakMap,H_=function(){const e=new Us(R(this,Rn));ge(this,Ln,0),ge(this,$n,e),ge(this,Eo,r=>{ge(this,Ln,R(this,Ln)-e[r]),e[r]=0}),ge(this,Pi,(r,o,a,l)=>{if(de(this,re,tt).call(this,o))return 0;if(!Hr(a))if(l){if(typeof l!="function")throw new TypeError("sizeCalculation must be a function");if(a=l(o,r),!Hr(a))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 a}),ge(this,ba,(r,o,a)=>{if(e[r]=o,R(this,tn)){const l=R(this,tn)-e[r];for(;R(this,Ln)>l;)de(this,re,Mc).call(this,!0)}ge(this,Ln,R(this,Ln)+e[r]),a&&(a.entrySize=o,a.totalCalculatedSize=R(this,Ln))})},Eo=new WeakMap,ba=new WeakMap,Pi=new WeakMap,ro=function*({allowStale:e=this.allowStale}={}){if(R(this,yt))for(let r=R(this,wt);!(!de(this,re,Nf).call(this,r)||((e||!R(this,on).call(this,r))&&(yield r),r===R(this,Tt)));)r=R(this,nn)[r]},oo=function*({allowStale:e=this.allowStale}={}){if(R(this,yt))for(let r=R(this,Tt);!(!de(this,re,Nf).call(this,r)||((e||!R(this,on).call(this,r))&&(yield r),r===R(this,wt)));)r=R(this,Mt)[r]},Nf=function(e){return e!==void 0&&R(this,gt).get(R(this,Qe)[e])===e},Mc=function(e){var l,c;const r=R(this,Tt),o=R(this,Qe)[r],a=R(this,Ee)[r];return R(this,Xr)&&de(this,re,tt).call(this,a)?a.__abortController.abort(new Error("evicted")):(R(this,Mn)||R(this,Ft))&&(R(this,Mn)&&((l=R(this,In))==null||l.call(this,a,o,"evict")),R(this,Ft)&&((c=R(this,kt))==null||c.push([a,o,"evict"]))),R(this,Eo).call(this,r),e&&(R(this,Qe)[r]=void 0,R(this,Ee)[r]=void 0,R(this,On).push(r)),R(this,yt)===1?(ge(this,Tt,ge(this,wt,0)),R(this,On).length=0):ge(this,Tt,R(this,Mt)[r]),R(this,gt).delete(o),Zc(this,yt)._--,r},Fc=function(e,r,o,a){const l=r===void 0?void 0:R(this,Ee)[r];if(de(this,re,tt).call(this,l))return l;const c=new Gs,{signal:d}=o;d==null||d.addEventListener("abort",()=>c.abort(d.reason),{signal:c.signal});const u={signal:c.signal,options:o,context:a},f=(N,T=!1)=>{const{aborted:$}=c.signal,W=o.ignoreFetchAbort&&N!==void 0;if(o.status&&($&&!T?(o.status.fetchAborted=!0,o.status.fetchError=c.signal.reason,W&&(o.status.fetchAbortIgnored=!0)):o.status.fetchResolved=!0),$&&!W&&!T)return g(c.signal.reason);const E=_;return R(this,Ee)[r]===_&&(N===void 0?E.__staleWhileFetching?R(this,Ee)[r]=E.__staleWhileFetching:de(this,re,ao).call(this,e,"fetch"):(o.status&&(o.status.fetchUpdated=!0),this.set(e,N,u.options))),N},m=N=>(o.status&&(o.status.fetchRejected=!0,o.status.fetchError=N),g(N)),g=N=>{const{aborted:T}=c.signal,$=T&&o.allowStaleOnFetchAbort,W=$||o.allowStaleOnFetchRejection,E=W||o.noDeleteOnFetchRejection,D=_;if(R(this,Ee)[r]===_&&(!E||D.__staleWhileFetching===void 0?de(this,re,ao).call(this,e,"fetch"):$||(R(this,Ee)[r]=D.__staleWhileFetching)),W)return o.status&&D.__staleWhileFetching!==void 0&&(o.status.returnedStale=!0),D.__staleWhileFetching;if(D.__returned===D)throw N},y=(N,T)=>{var W;const $=(W=R(this,ha))==null?void 0:W.call(this,e,l,u);$&&$ instanceof Promise&&$.then(E=>N(E===void 0?void 0:E),T),c.signal.addEventListener("abort",()=>{(!o.ignoreFetchAbort||o.allowStaleOnFetchAbort)&&(N(void 0),o.allowStaleOnFetchAbort&&(N=E=>f(E,!0)))})};o.status&&(o.status.fetchDispatched=!0);const _=new Promise(y).then(f,m),C=Object.assign(_,{__abortController:c,__staleWhileFetching:l,__returned:void 0});return r===void 0?(this.set(e,C,{...u.options,status:void 0}),r=R(this,gt).get(e)):R(this,Ee)[r]=C,C},tt=function(e){if(!R(this,Xr))return!1;const r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof Gs},Vf=function(e,r){R(this,nn)[r]=e,R(this,Mt)[e]=r},cl=function(e){e!==R(this,wt)&&(e===R(this,Tt)?ge(this,Tt,R(this,Mt)[e]):de(this,re,Vf).call(this,R(this,nn)[e],R(this,Mt)[e]),de(this,re,Vf).call(this,R(this,wt),e),ge(this,wt,e))},ao=function(e,r){var a,l,c,d;let o=!1;if(R(this,yt)!==0){const u=R(this,gt).get(e);if(u!==void 0)if(o=!0,R(this,yt)===1)de(this,re,Bf).call(this,r);else{R(this,Eo).call(this,u);const f=R(this,Ee)[u];if(de(this,re,tt).call(this,f)?f.__abortController.abort(new Error("deleted")):(R(this,Mn)||R(this,Ft))&&(R(this,Mn)&&((a=R(this,In))==null||a.call(this,f,e,r)),R(this,Ft)&&((l=R(this,kt))==null||l.push([f,e,r]))),R(this,gt).delete(e),R(this,Qe)[u]=void 0,R(this,Ee)[u]=void 0,u===R(this,wt))ge(this,wt,R(this,nn)[u]);else if(u===R(this,Tt))ge(this,Tt,R(this,Mt)[u]);else{const m=R(this,nn)[u];R(this,Mt)[m]=R(this,Mt)[u];const g=R(this,Mt)[u];R(this,nn)[g]=R(this,nn)[u]}Zc(this,yt)._--,R(this,On).push(u)}}if(R(this,Ft)&&((c=R(this,kt))!=null&&c.length)){const u=R(this,kt);let f;for(;f=u==null?void 0:u.shift();)(d=R(this,An))==null||d.call(this,...f)}return o},Bf=function(e){var r,o,a;for(const l of de(this,re,oo).call(this,{allowStale:!0})){const c=R(this,Ee)[l];if(de(this,re,tt).call(this,c))c.__abortController.abort(new Error("deleted"));else{const d=R(this,Qe)[l];R(this,Mn)&&((r=R(this,In))==null||r.call(this,c,d,e)),R(this,Ft)&&((o=R(this,kt))==null||o.push([c,d,e]))}}if(R(this,gt).clear(),R(this,Ee).fill(void 0),R(this,Qe).fill(void 0),R(this,rn)&&R(this,Zn)&&(R(this,rn).fill(0),R(this,Zn).fill(0)),R(this,$n)&&R(this,$n).fill(0),ge(this,Tt,0),ge(this,wt,0),R(this,On).length=0,ge(this,Ln,0),ge(this,yt,0),R(this,Ft)&&R(this,kt)){const l=R(this,kt);let c;for(;c=l==null?void 0:l.shift();)(a=R(this,An))==null||a.call(this,...c)}};let ep=np;const TF={cacheSize:15e6};class RF{constructor(e){Ue(this,"_str");Ue(this,"_rawJson");Ue(this,"_zodSchema");Ue(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 No=class No{constructor(e){Ue(this,"fileDataCache");Ue(this,"fileDataRefs",new Map);const r={...TF,...e??{}};this.fileDataCache=new ep({maxSize:r.cacheSize,fetchMethod:async o=>new RF(await uo().blobDriver.getContent(o)),sizeCalculation:o=>o.bytes.length,dispose:(o,a)=>{this.fileDataRefs.delete(a)}})}getDataRef(e){const r=this.fileDataRefs.get(e);if(r!==void 0)return r;const o=t.shallowRef();return this.fileDataRefs.set(e,o),(async()=>{try{const a=await this.fileDataCache.fetch(e);o.value=a}catch(a){console.error(a)}})(),o}getContentBytes(e){if(e===void 0)return;const r=this.getDataRef(e);return t.computed(()=>{var o;return(o=r.value)==null?void 0:o.bytes})}getContentString(e){if(e===void 0)return;const r=this.getDataRef(e);return t.computed(()=>{var o;return(o=r==null?void 0:r.value)==null?void 0:o.str})}getContentJson(e,r){if(e===void 0)return;const o=this.getDataRef(e);return t.computed(()=>{var a,l;return r===void 0?(a=o==null?void 0:o.value)==null?void 0:a.rawJson:(l=o==null?void 0:o.value)==null?void 0:l.validatedJson(r)})}static getContentBytes(e){return No.globalInstance.getContentBytes(e)}static getContentString(e){return No.globalInstance.getContentString(e)}static getContentJson(e,r){return No.globalInstance.getContentJson(e,r)}};Ue(No,"globalInstance",new No);let tp=No;z.AgGridTheme=xl,z.BlockLayout=g5,z.Color=Ut,z.ContextProvider=RA,z.DataTable=fx,z.DemoData=Z$,z.DropdownListItem=po,z.DropdownOverlay=$l,z.Gradient=TA,z.LongText=Ll,z.MultiError=kl,z.PlAccordion=XN,z.PlAccordionSection=rV,z.PlAgCellFile=Jg,z.PlAgCellProgress=ny,z.PlAgCellStatusTag=ey,z.PlAgChartHistogramCell=Qg,z.PlAgChartStackedBarCell=qg,z.PlAgColumnHeader=Cs,z.PlAgCsvExporter=Bu,z.PlAgDataTable=jg,z.PlAgDataTableRowNumberColId=en,z.PlAgDataTableToolsPanel=M5,z.PlAgDataTableV2=Kg,z.PlAgGridColumnManager=Su,z.PlAgOverlayLoading=ks,z.PlAgOverlayNoRows=xs,z.PlAgTextAndButtonCell=Ss,z.PlAlert=bd,z.PlAutocomplete=xV,z.PlBlockPage=Ax,z.PlBtnAccent=mv,z.PlBtnDanger=gv,z.PlBtnGhost=cr,z.PlBtnGroup=Em,z.PlBtnLink=Cv,z.PlBtnPrimary=Rl,z.PlBtnSecondary=Il,z.PlBtnSplit=cv,z.PlChartHistogram=Eg,z.PlChartStackedBar=$B,z.PlChartStackedBarCompact=mh,z.PlCheckbox=Vd,z.PlCheckboxGroup=jS,z.PlChip=Ed,z.PlCloseModalBtn=Zm,z.PlContainer=Ox,z.PlDataTable=jg,z.PlDataTableV2=Kg,z.PlDialogModal=Bd,z.PlDropdown=$r,z.PlDropdownLegacy=bS,z.PlDropdownLine=Sd,z.PlDropdownMulti=Zl,z.PlDropdownMultiRef=WS,z.PlDropdownRef=XC,z.PlEditableTitle=jv,z.PlFileDialog=uh,z.PlFileInput=ph,z.PlGrid=zx,z.PlIcon16=Or,z.PlIcon24=Yo,z.PlLoaderCircular=gm,z.PlLogView=oh,z.PlMaskIcon16=qt,z.PlMaskIcon24=at,z.PlMultiSequenceAlignment=SF,z.PlNotificationAlert=fh,z.PlNumberField=VS,z.PlProgressBar=vS,z.PlProgressCell=lh,z.PlRadio=Bg,z.PlRadioGroup=wA,z.PlRow=Zx,z.PlSearchField=Im,z.PlSectionSeparator=ah,z.PlSlideModal=Ko,z.PlSpacer=ym,z.PlSplash=Bl,z.PlStatusTag=ih,z.PlTableFilters=AM,z.PlTabs=zN,z.PlTextArea=TC,z.PlTextField=fo,z.PlToggleSwitch=Ml,z.PlTooltip=ct,z.ReactiveFileContent=tp,z.Scrollable=vL,z.Slider=$g,z.SliderRange=_L,z.SliderRangeTriple=lL,z.ThemeSwitcher=_x,z.UnresolvedError=Qc,z.ValueOrErrorsComponent=eZ,z.activateAgGrid=Qf,z.animate=vm,z.animateInfinite=nv,z.autoSizeRowNumberColumn=$i,z.call=bm,z.categoricalColors=Ag,z.computedResult=VF,z.createAgGridColDef=oy,z.createModel=od,z.defaultMainMenuItems=vu,z.defineApp=zw,z.defineStore=NF,z.delay=_m,z.detectOutside=RC,z.ensureError=td,z.eventListener=Cd,z.focusRow=Vu,z.formatZodError=rd,z.getElementScrollPosition=$m,z.identity=ed,z.interpolateColor=Lg,z.isDefined=xw,z.isElementVisible=Om,z.isZodError=nd,z.listToOptions=rv,z.magma=Rg,z.makeEaseInOut=tv,z.makeEaseOut=xm,z.makeOnceTracker=Eu,z.makeRowNumberColDef=vs,z.maskIcons16=O$,z.maskIcons24=$$,z.normalizeGradient=Og,z.normalizeListOptions=sr,z.objectHash=xu,z.palettes=Ig,z.randomInt=km,z.randomString=ev,z.requestTick=_d,z.scrollIntoView=Ol,z.showContextMenu=pd,z.throttle=Cm,z.timeout=wm,z.trackFirstDataRendered=Nu,z.unwrapOptionalResult=kw,z.unwrapValueOrErrors=Yf,z.useAgGridOptions=iZ,z.useClickOutside=Al,z.useComponentProp=KA,z.useDraggable=YA,z.useEventListener=ot,z.useFormState=XA,z.useHover=um,z.useInterval=HA,z.useLabelNotch=Kn,z.useLocalStorage=fm,z.useMouse=dm,z.useMouseCapture=Lr,z.usePosition=oi,z.useQuery=jA,z.useResizeObserver=Zg,z.useScroll=DA,z.useSdkPlugin=vl,z.useSortable=GA,z.useSortable2=Pg,z.useTheme=hm,z.useWatchFetch=$d,z.viridis=Tg,z.wrapOptionalResult=Kf,z.wrapValueOrErrors=ww,Object.defineProperty(z,Symbol.toStringTag,{value:"Module"})});
|
|
82
89
|
//# sourceMappingURL=lib.umd.cjs.map
|