@platforma-sdk/ui-vue 1.30.38 → 1.31.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/lib.js +6240 -6219
- package/dist/lib.js.map +1 -1
- package/dist/lib.umd.cjs +19 -19
- package/dist/lib.umd.cjs.map +1 -1
- package/dist/src/components/PlAgDataTable/sources/table-source-v2.d.ts +2 -2
- package/dist/src/components/PlAgDataTable/sources/table-source-v2.d.ts.map +1 -1
- package/dist/src/components/PlMultiSequenceAlignment/data.d.ts.map +1 -1
- package/dist/src/components/PlTableFilters/PlTableFilters.vue.d.ts +4 -3
- package/dist/src/components/PlTableFilters/PlTableFilters.vue.d.ts.map +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/components/PlAgDataTable/sources/table-source-v2.ts +31 -21
- package/src/components/PlMultiSequenceAlignment/data.ts +20 -31
- package/src/components/PlTableFilters/PlTableFilters.vue +56 -26
package/dist/lib.umd.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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 bU=Object.defineProperty;var H_=z=>{throw TypeError(z)};var _U=(z,t,Ie)=>t in z?bU(z,t,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):z[t]=Ie;var Ue=(z,t,Ie)=>_U(z,typeof t!="symbol"?t+"":t,Ie),Ef=(z,t,Ie)=>t.has(z)||H_("Cannot "+Ie);var R=(z,t,Ie)=>(Ef(z,t,"read from private field"),Ie?Ie.call(z):t.get(z)),Pe=(z,t,Ie)=>t.has(z)?H_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(z):t.set(z,Ie),ge=(z,t,Ie,io)=>(Ef(z,t,"write to private field"),io?io.call(z,Ie):t.set(z,Ie),Ie),de=(z,t,Ie)=>(Ef(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,p0,ma,f0,m0,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,Nf,So,hr,Fi,on,X_,Eo,ba,Pi,ro,oo,Vf,Mc,Fc,tt,Bf,cl,ao,Tf;var Pc=Object.defineProperty,j_=(n,e,r)=>e in n?Pc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,zc=(n,e,r)=>j_(n,typeof e!="symbol"?e+"":e,r);function Y_(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 K_(n,e){if(n!=null)return e(n)}function J_(n,e){return n=Math.ceil(n),e=Math.floor(e),Math.floor(Math.random()*(e-n))+n}function q_(n){let e="";for(let r=0;r<n;r++)e+=String.fromCharCode(J_(65,91));return e}function Q_(){return q_(42)}const ul=Array.isArray;function Rf(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 If(n){return Object.values(n).reduce((e,r)=>r!==void 0?e+1:e,0)}function Wt(n,e){if(!(Rf(n)&&Rf(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 If(n)!==If(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 Af(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?Af(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 e1=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(e1);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"]),t1=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 Lf=Zo;function n1(n){Lf=n}function pl(){return Lf}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}},r1=[];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 Of(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 $f=(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 $f(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 $f(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 o1=/^c[^\s-]{8,}$/i,a1=/^[0-9a-z]+$/,i1=/^[0-9A-HJKMNP-TV-Z]{26}$/,l1=/^[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,s1=/^[a-z0-9_-]{21}$/i,c1=/^[-+]?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)?)??$/,d1=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,u1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Hc;const p1=/^(?:(?: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])$/,f1=/^(([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})))$/,m1=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Zf="((\\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])))",h1=new RegExp(`^${Zf}$`);function Mf(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 g1(n){return new RegExp(`^${Mf(n)}$`)}function Ff(n){let e=`${Zf}T${Mf(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 y1(n,e){return!!((e==="v4"||!e)&&p1.test(n)||(e==="v6"||!e)&&f1.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")d1.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(u1,"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")l1.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")s1.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")o1.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")a1.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")i1.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"?Ff(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"?h1.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{code:te.invalid_string,validation:"date",message:l.message}),o.dirty()):l.kind==="time"?g1(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"?c1.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"duration",code:te.invalid_string,message:l.message}),o.dirty()):l.kind==="ip"?y1(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"?m1.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 b1(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"?b1(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 Pf(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 Pf(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)||Of(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=Pf;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)||Of(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 _1=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 zf(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 w1={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 k1=(n,e={message:`Input not instance of ${n.name}`})=>zf(r=>r instanceof n,e),Df=wn.create,Wf=Vr.create,x1=_l.create,v1=Br.create,Gf=Pa.create,C1=lo.create,S1=hl.create,E1=za.create,N1=Da.create,V1=Fo.create,B1=so.create,T1=ir.create,R1=gl.create,I1=kn.create,A1=rt.create,L1=rt.strictCreate,O1=Wa.create,$1=yl.create,Z1=Ga.create,M1=Xn.create,F1=Ua.create,P1=bl.create,z1=co.create,D1=zo.create,W1=Ha.create,G1=Xa.create,U1=Tr.create,H1=ja.create,X1=Do.create,Uf=xn.create,j1=jn.create,Y1=Rr.create,K1=xn.createWithPreprocess,J1=Ja.create;var pe=Object.freeze({__proto__:null,defaultErrorMap:Zo,setErrorMap:n1,getErrorMap:pl,makeIssue:fl,EMPTY_PATH:r1,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:Ff,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:_1,ZodBranded:jc,ZodPipeline:Ja,ZodReadonly:qa,custom:zf,Schema:Ae,ZodSchema:Ae,late:w1,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:V1,array:I1,bigint:v1,boolean:Gf,date:C1,discriminatedUnion:$1,effect:Uf,enum:U1,function:D1,instanceof:k1,intersection:Z1,lazy:W1,literal:G1,map:P1,nan:x1,nativeEnum:H1,never:T1,null:N1,nullable:Y1,number:Wf,object:A1,oboolean:()=>Gf().optional(),onumber:()=>Wf().optional(),optional:j1,ostring:()=>Df().optional(),pipeline:J1,preprocess:K1,promise:X1,record:F1,set:z1,strictObject:L1,string:Df,symbol:S1,transformer:Uf,tuple:M1,undefined:E1,union:O1,unknown:B1,void:R1,NEVER:ve,ZodIssueCode:te,quotelessJson:t1,ZodError:Jt});const q1=-2147483648,Hf=-9007199254740991n,Q1=null,ew=null;function tw(n,e){switch(e){case"Int":return n===q1;case"Long":return n===Number(Hf)||n===Hf;case"Float":return Number.isNaN(n);case"Double":return Number.isNaN(n);case"String":return n===Q1;case"Bytes":return n===ew;default:throw Error(`unsupported data type: ${e}`)}}function nw(n,e){const r=Math.floor(e/8),o=1<<7-e%8;return(n[r]&o)>0}const rw={type:"absent"},Yc=null;function Xf(n){return typeof n=="object"&&n!==null&&n.type==="absent"}function Ir(n,e,r={}){if(nw(n.absent,e))return r.absent===void 0?rw:r.absent;const o=n.data[e],a=n.type;if(tw(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 ow(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 aw(n,e){return n.name===e.name&&ow(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 iw=Kc.exports;const lw=Dc(iw),sw=pe.object({type:pe.literal("PlError"),name:pe.string(),message:pe.string(),fullMessage:pe.string().optional(),stack:pe.string().optional()}),cw=sw.extend({cause:pe.lazy(()=>wl).optional(),errors:pe.lazy(()=>wl.array()).optional()}),dw=pe.object({type:pe.literal("StandardError"),name:pe.string(),message:pe.string(),stack:pe.string().optional()}),uw=dw.extend({cause:pe.lazy(()=>wl).optional(),errors:pe.lazy(()=>wl.array()).optional()}),wl=pe.union([uw,cw]);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:lw(n)}}const pw=pe.object({name:pe.string(),message:pe.string(),fullMessage:pe.string().optional(),stack:pe.string().optional()}),Jc=pw.extend({cause:pe.lazy(()=>Jc).optional(),errors:pe.lazy(()=>Jc.array()).optional()});function fw(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 mw=pe.object({type:pe.string(),importance:pe.number().optional(),id:pe.string().optional(),label:pe.string()});pe.array(mw);const hw="1.30.37";function jf(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 Yf(n){var e;return((e=n.annotations)==null?void 0:e["pl7.app/table/visibility"])==="optional"}function gw(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 yw(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=>Xf(l))).map(a=>({key:a,val:1}))}}function bw(n){if(n===Yc)throw new Error("Axis value can never be N/A");return n}function uo(){return fw({sdkVersion:hw})}function _w(n){try{return uo()}catch{return n}}function ww(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(`
|
|
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 bU=Object.defineProperty;var X_=z=>{throw TypeError(z)};var _U=(z,t,Ie)=>t in z?bU(z,t,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):z[t]=Ie;var Ue=(z,t,Ie)=>_U(z,typeof t!="symbol"?t+"":t,Ie),Ef=(z,t,Ie)=>t.has(z)||X_("Cannot "+Ie);var T=(z,t,Ie)=>(Ef(z,t,"read from private field"),Ie?Ie.call(z):t.get(z)),Fe=(z,t,Ie)=>t.has(z)?X_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(z):t.set(z,Ie),ge=(z,t,Ie,io)=>(Ef(z,t,"write to private field"),io?io.call(z,Ie):t.set(z,Ie),Ie),ue=(z,t,Ie)=>(Ef(z,t,"access private method"),Ie);var Zc=(z,t,Ie,io)=>({set _(Pc){ge(z,t,Pc,Ie)},get _(){return T(z,t,io)}});var ht,f0,ma,m0,h0,Rn,tn,In,vo,An,ha,ga,yt,Ln,gt,Qe,Ee,Mt,nn,Tt,wt,On,kt,$n,Zn,rn,Mn,Xr,Ft,ya,re,Nf,So,hr,Pi,on,j_,Eo,ba,zi,ro,oo,Vf,Mc,Fc,tt,Bf,dl,ao,Tf;var Pc=Object.defineProperty,Y_=(n,e,r)=>e in n?Pc(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,zc=(n,e,r)=>Y_(n,typeof e!="symbol"?e+"":e,r);function K_(n,e){if(n==null)throw Error(e??"Empty (null | undefined) value");return n}let ul=class{constructor(){zc(this,"promise"),zc(this,"resolve",()=>{}),zc(this,"reject",()=>{}),this.promise=new Promise((e,r)=>{this.resolve=e,this.reject=r})}};function J_(n,e){if(n!=null)return e(n)}function q_(n,e){return n=Math.ceil(n),e=Math.floor(e),Math.floor(Math.random()*(e-n))+n}function Q_(n){let e="";for(let r=0;r<n;r++)e+=String.fromCharCode(q_(65,91));return e}function e1(){return Q_(42)}const pl=Array.isArray;function Rf(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 If(n){return Object.values(n).reduce((e,r)=>r!==void 0?e+1:e,0)}function Wt(n,e){if(!(Rf(n)&&Rf(e)))return n===e;if(pl(n)&&pl(e))return n.length!==e.length?!1:[...n.keys()].every(r=>Wt(n[r],e[r]));if(La(n)&&La(e))return If(n)!==If(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 Af(n,e){return new Set([...Object.keys(n),...Object.keys(e)]).forEach(r=>{const o=n[r],a=e[r];La(o)&&La(a)||pl(o)&&pl(a)&&o.length===a.length?Af(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 t1=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(t1);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"]),n1=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 Lf=Zo;function r1(n){Lf=n}function fl(){return Lf}const ml=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}},o1=[];function ae(n,e){const r=fl(),o=ml({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 Ce;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 Ce;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 Ce=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 hl(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 Of(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 $f=(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 $f(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 $f(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 a1=/^c[^\s-]{8,}$/i,i1=/^[0-9a-z]+$/,l1=/^[0-9A-HJKMNP-TV-Z]{26}$/,s1=/^[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,c1=/^[a-z0-9_-]{21}$/i,d1=/^[-+]?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)?)??$/,u1=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,p1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Hc;const f1=/^(?:(?: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])$/,m1=/^(([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})))$/,h1=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Zf="((\\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])))",g1=new RegExp(`^${Zf}$`);function Mf(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 y1(n){return new RegExp(`^${Mf(n)}$`)}function Ff(n){let e=`${Zf}T${Mf(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 b1(n,e){return!!((e==="v4"||!e)&&f1.test(n)||(e==="v6"||!e)&&m1.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}),Ce}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")u1.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(p1,"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")s1.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")c1.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")a1.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")i1.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")l1.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"?Ff(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"?g1.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{code:te.invalid_string,validation:"date",message:l.message}),o.dirty()):l.kind==="time"?y1(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"?d1.test(e.data)||(a=this._getOrReturnCtx(e,a),ae(a,{validation:"duration",code:te.invalid_string,message:l.message}),o.dirty()):l.kind==="ip"?b1(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"?h1.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 _1(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}),Ce}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"?_1(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}),Ce}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}),Ce}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}),Ce}if(isNaN(e.data.getTime())){const l=this._getOrReturnCtx(e);return ae(l,{code:te.invalid_date}),Ce}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 gl 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}),Ce}return At(e.data)}}gl.create=n=>new gl({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}),Ce}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}),Ce}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}),Ce}}ir.create=n=>new ir({typeName:ke.ZodNever,...Be(n)});class yl 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}),Ce}return At(e.data)}}yl.create=n=>new yl({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}),Ce;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}),Ce}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 Pf(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}),Ce}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}),Ce}}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 bl 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}),Ce;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]}),Ce)}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 bl({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 Ce;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}),Ce)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([l,c])=>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}),Ce;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"}),Ce;!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}),Ce;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 _l 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}),Ce;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 Ce;(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 Ce;(f.status==="dirty"||m.status==="dirty")&&r.dirty(),d.set(f.value,m.value)}return{status:r.value,value:d}}}}_l.create=(n,e,r)=>new _l({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}),Ce;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 Ce;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}),Ce;function o(d,u){return ml({data:d,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,fl(),Zo].filter(f=>!!f),issueData:{code:te.invalid_arguments,argumentsError:u}})}function a(d,u){return ml({data:d,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,fl(),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}),Ce}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 Pf(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}),Ce}if(hl(this,Ma)||Of(this,Ma,new Set(this._def.values)),!hl(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}),Ce}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=Pf;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}),Ce}if(hl(this,Fa)||Of(this,Fa,new Set(We.getValidEnumValues(this._def.values))),!hl(this,Fa).has(e.data)){const a=We.objectValues(r);return ae(o,{received:o.data,code:te.invalid_enum_value,options:a}),Ce}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}),Ce;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 Ce;const u=await this._def.schema._parseAsync({data:d,path:o.path,parent:o});return u.status==="aborted"?Ce:u.status==="dirty"||r.value==="dirty"?Mo(u.value):u});{if(r.value==="aborted")return Ce;const d=this._def.schema._parseSync({data:c,path:o.path,parent:o});return d.status==="aborted"?Ce: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"?Ce:(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"?Ce:(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 wl 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}),Ce}return{status:"valid",value:e.data}}}wl.create=n=>new wl({typeName:ke.ZodNaN,...Be(n)});const w1=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"?Ce: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"?Ce: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 zf(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 k1={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 x1=(n,e={message:`Input not instance of ${n.name}`})=>zf(r=>r instanceof n,e),Df=wn.create,Wf=Vr.create,C1=wl.create,v1=Br.create,Gf=Pa.create,S1=lo.create,E1=gl.create,N1=za.create,V1=Da.create,B1=Fo.create,T1=so.create,R1=ir.create,I1=yl.create,A1=kn.create,L1=rt.create,O1=rt.strictCreate,$1=Wa.create,Z1=bl.create,M1=Ga.create,F1=Xn.create,P1=Ua.create,z1=_l.create,D1=co.create,W1=zo.create,G1=Ha.create,U1=Xa.create,H1=Tr.create,X1=ja.create,j1=Do.create,Uf=xn.create,Y1=jn.create,K1=Rr.create,J1=xn.createWithPreprocess,q1=Ja.create;var pe=Object.freeze({__proto__:null,defaultErrorMap:Zo,setErrorMap:r1,getErrorMap:fl,makeIssue:ml,EMPTY_PATH:o1,addIssueToContext:ae,ParseStatus:Nt,INVALID:Ce,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:Ff,ZodString:wn,ZodNumber:Vr,ZodBigInt:Br,ZodBoolean:Pa,ZodDate:lo,ZodSymbol:gl,ZodUndefined:za,ZodNull:Da,ZodAny:Fo,ZodUnknown:so,ZodNever:ir,ZodVoid:yl,ZodArray:kn,ZodObject:rt,ZodUnion:Wa,ZodDiscriminatedUnion:bl,ZodIntersection:Ga,ZodTuple:Xn,ZodRecord:Ua,ZodMap:_l,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:wl,BRAND:w1,ZodBranded:jc,ZodPipeline:Ja,ZodReadonly:qa,custom:zf,Schema:Ae,ZodSchema:Ae,late:k1,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:B1,array:A1,bigint:v1,boolean:Gf,date:S1,discriminatedUnion:Z1,effect:Uf,enum:H1,function:W1,instanceof:x1,intersection:M1,lazy:G1,literal:U1,map:z1,nan:C1,nativeEnum:X1,never:R1,null:V1,nullable:K1,number:Wf,object:L1,oboolean:()=>Gf().optional(),onumber:()=>Wf().optional(),optional:Y1,ostring:()=>Df().optional(),pipeline:q1,preprocess:J1,promise:j1,record:P1,set:D1,strictObject:O1,string:Df,symbol:E1,transformer:Uf,tuple:F1,undefined:N1,union:$1,unknown:T1,void:I1,NEVER:Ce,ZodIssueCode:te,quotelessJson:n1,ZodError:Jt});const Q1=-2147483648,Hf=-9007199254740991n,ew=null,tw=null;function nw(n,e){switch(e){case"Int":return n===Q1;case"Long":return n===Number(Hf)||n===Hf;case"Float":return Number.isNaN(n);case"Double":return Number.isNaN(n);case"String":return n===ew;case"Bytes":return n===tw;default:throw Error(`unsupported data type: ${e}`)}}function rw(n,e){const r=Math.floor(e/8),o=1<<7-e%8;return(n[r]&o)>0}const ow={type:"absent"},Yc=null;function Xf(n){return typeof n=="object"&&n!==null&&n.type==="absent"}function Ir(n,e,r={}){if(rw(n.absent,e))return r.absent===void 0?ow:r.absent;const o=n.data[e],a=n.type;if(nw(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 aw(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 iw(n,e){return n.name===e.name&&aw(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 lw=Kc.exports;const sw=Dc(lw),cw=pe.object({type:pe.literal("PlError"),name:pe.string(),message:pe.string(),fullMessage:pe.string().optional(),stack:pe.string().optional()}),dw=cw.extend({cause:pe.lazy(()=>kl).optional(),errors:pe.lazy(()=>kl.array()).optional()}),uw=pe.object({type:pe.literal("StandardError"),name:pe.string(),message:pe.string(),stack:pe.string().optional()}),pw=uw.extend({cause:pe.lazy(()=>kl).optional(),errors:pe.lazy(()=>kl.array()).optional()}),kl=pe.union([pw,dw]);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:sw(n)}}const fw=pe.object({name:pe.string(),message:pe.string(),fullMessage:pe.string().optional(),stack:pe.string().optional()}),Jc=fw.extend({cause:pe.lazy(()=>Jc).optional(),errors:pe.lazy(()=>Jc.array()).optional()});function mw(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 hw=pe.object({type:pe.string(),importance:pe.number().optional(),id:pe.string().optional(),label:pe.string()});pe.array(hw);const gw="1.30.37";function jf(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 Yf(n){var e;return((e=n.annotations)==null?void 0:e["pl7.app/table/visibility"])==="optional"}function yw(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 bw(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=>Xf(l))).map(a=>({key:a,val:1}))}}function _w(n){if(n===Yc)throw new Error("Axis value can never be N/A");return n}function uo(){return mw({sdkVersion:gw})}function ww(n){try{return uo()}catch{return n}}function kw(n){if(typeof globalThis.getEnvironmentValue=="function")return globalThis.getEnvironmentValue(n)}class Qc extends Error{}class xl extends Error{constructor(r){super(r.map(o=>typeof o=="string"?o:o.message).join(`
|
|
2
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
|
|
3
|
+
`)}}function xw(n){return{ok:!0,value:n}}function Kf(n){if(!n)throw new Qc;if(!n.ok)throw new xl(n.errors);return n.value}function Jf(n){return{value:n,errors:void 0}}function Cw(n){if(n.errors)throw new xl(n.errors);if(!n.value)throw new Qc;return n.value}function vw(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 Sw(n,e,r){const o=n.validate??ed,{autoSave:a}=n,l=t.ref(),c=t.ref(),d=B=>{var $;if(r.deepPatchModel){const W=($=c.value)==null?void 0:$.model,E=Object.assign(Un(B),e??{});c.value={model:W?Af(W,E):E,stage:Symbol()}}else c.value={model:Object.assign(Un(B),e??{}),stage:Symbol()}};t.watch(()=>n.get(),B=>d(B),{immediate:!0});const u=()=>{var B;n.onSave(o(Un((B=c.value)==null?void 0:B.model)))},f=()=>{d(n.get()),l.value=void 0},m=B=>{const $=td(B);nd($)?l.value=Error(rd($)):l.value=$},g=B=>{l.value=void 0;try{o(B),a&&u()}catch($){m($)}},y=t.computed({get:()=>{var B;return(B=c.value)==null?void 0:B.model},set(){throw Error("Cannot replace base model")}});t.watch([()=>({args:y.value.args,ui:y.value.ui}),()=>{var B;return(B=c.value)==null?void 0:B.stage}],([B,$],[W,E])=>{$===E&&g(B)},{deep:!0});const _=t.computed(()=>!l.value),C=t.computed(()=>{var W;const{args:B,ui:$}=((W=t.unref(c))==null?void 0:W.model)??{};return!Wt(n.get(),{args:B,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 Ew=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 Nw=n=>n!=null,Vw=Object.prototype.toString,Bw=n=>Vw.call(n)==="[object Object]",id=()=>{};function Tw(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 Rw(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 Iw(n){return t.getCurrentInstance()}function ld(n){return Array.isArray(n)?n:[n]}function sd(n,e=200,r={}){return Tw(Rw(e,r),n)}function Aw(n,e=!0,r){Iw()?t.onMounted(n,r):e?n():t.nextTick(n)}function Lw(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 Ow(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 qf(...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=Bw(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 $w(){const n=t.ref(!1),e=t.getCurrentInstance();return e&&t.onMounted(()=>{n.value=!0},e),n}function Qf(n){const e=$w();return t.computed(()=>(e.value,!!n()))}function Zw(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(Nw);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 Mw(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 Fw(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 B(){c==="sync"?N():c==="next-frame"&&requestAnimationFrame(()=>N())}return Mw(n,B),t.watch(()=>Go(n),$=>!$&&B()),Zw(n,B,{attributeFilter:["style","class"]}),a&&qf("scroll",B,{capture:!0,passive:!0}),o&&qf("resize",B,{passive:!0}),Aw(()=>{l&&B()}),{height:d,bottom:u,left:f,right:m,top:g,width:y,x:_,y:C,update:B}}function Pw(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(I=>[I,Kf(E[I])]);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 xl(D.errors):void 0]);return Object.fromEntries(W)}),B={snapshot:a,queryParams:t.computed(()=>Ew(a.navigationState.href)),href:t.computed(()=>a.navigationState.href),hasErrors:t.computed(()=>Object.values(a.outputs).some(W=>!(W!=null&&W.ok)))},$=Sw({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($,_,B))}const zw=`.ag-header {
|
|
4
4
|
border-bottom: 1px solid var(--border-color-default);
|
|
5
5
|
}
|
|
6
6
|
|
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
|
|
27
27
|
.ag-menu-separator-part:after {
|
|
28
28
|
border-color: var(--btn-sec-hover-grey);
|
|
29
|
-
}`;function em(){Ie.ModuleRegistry.registerModules([Ie.AllEnterpriseModule]);const n=ww("AGGRID_LICENSE");n?(Ie.LicenseManager.setLicenseKey(n),console.log("AG Grid Activated")):console.log("AG Grid License not found")}const zw=Ie.createPart({feature:"headerBottomBorder",css:Pw}),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(zw),tm=Symbol("sdk-vue");function vl(){return t.inject(tm)}function Dw(n,e,r={}){let o;em();const a=()=>{_w(n).loadBlockState().then(c=>{l.loaded=!0;const d=Fw(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 Y_(o,"App is not loaded")},install(c){c.provide(tm,this),a()}});return l}var Ww=Object.defineProperty,Gw=(n,e,r)=>e in n?Ww(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,Uw=(n,e,r)=>Gw(n,e+"",r);function Uo(n,e){if(n==null)throw Error(e??"Empty (null | undefined) value");return n}function Hw(n,e,r){const o=Math.min(e,r),a=Math.max(e,r);return n>=o&&n<=a}function Xw(n){return new Promise(e=>setTimeout(e,n))}function jw(n){return n()}function Cl(n,e,r){return e>n?e:n>r?r:n}function nm(n,e){return e(n)}function Ar(n,e){if(n!=null)return e(n)}function Yw(n){if(n&&n.ok)return n.value}async function Kw(n){return Object.fromEntries(await Promise.all(Object.entries(n).map(async([e,r])=>[e,await r])))}const rm=n=>n;function Jw(n,e){return n=Math.ceil(n),e=Math.floor(e),Math.floor(Math.random()*(e-n))+n}function qw(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 ek(n){let e="";for(let r=0;r<n;r++)e+=String.fromCharCode(Jw(65,91));return e}function om(){return ek(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 tk(n,e){return Object.keys(n).map(r=>e(n[r],r))}function am(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 am(n)!==am(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 nk(n){return Array.isArray(n)?Object.assign([],n):Sl(n)?Object.assign({},n):n}function rk(n,e){const r={};for(const o in e)e[o]!==n[o]&&(r[o]=n[o]);return r}function ok(n){return Object.entries(n).forEach(([e,r])=>{r instanceof Function&&(n[e]=r.bind(n))}),n}function ak(n,e,r){return n[e]=r,n}function ik(n,e){return n[e]}function lk(n,e){n={...n};const r=n[e];return delete n[e],[r,n]}function sk(n,...e){return Object.assign({},...e.map(r=>({[r]:n[r]})))}function ck(n,...e){return e.map(r=>n[r])}function dk(n,...e){const r=Object.assign({},n);return e.forEach(o=>delete r[o]),r}function im(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?im(o,a):n[r]=a}),n}const dd=Object.freeze(Object.defineProperty({__proto__:null,bindMethods:ok,deepClone:ni,deepEqual:Nl,deepPatch:im,getProp:ik,isArray:ti,isJsonEqual:El,isNonPrimitive:Sl,isPlainObject:Ho,map:tk,omit:dk,pick:sk,pickValues:ck,setProp:ak,shallowClone:nk,shallowDiff:rk,shiftProp:lk},Symbol.toStringTag,{value:"Module"}));function uk(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 lm(n,e,r){let o;return function(...a){o&&clearTimeout(o),o=setTimeout(()=>{o=void 0,n.apply(this,a)},e)}}function pk(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 fk=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],mk=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],hk=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],gk=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],sm=(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?gk:hk:e.binary?mk:fk;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=sm(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=sm(Number(n),e.locale),d=r[l];return a+c+" "+d}const yk={class:"context-menu"},bk=["onClick"],_k=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",yk,[(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,bk))),128))]))}}),st=(n,e)=>{const r=n.__vccOpts||n;for(const[o,a]of e)r[o]=a;return r},wk=st(_k,[["__scopeId","data-v-12530966"]]);function pd(n,e){n.preventDefault();const r=()=>{t.render(null,document.body)},o=t.h(wk,{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 cm=Symbol(),Vl=()=>t.inject(cm),kk=["value"],xk={key:1},vk=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),_=jw(()=>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,kk)):(t.openBlock(),t.createElementBlock("div",xk,t.toDisplayString(f.modelValue),1))],2))}}),Ck=["^data-row-index"],Sk={key:0,class:"control-cell"},Ek=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",Sk,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(vk,{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,Ck))}}),Nk={},Vk={width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Bk(n,e){return t.openBlock(),t.createElementBlock("svg",Vk,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 Tk=st(Nk,[["render",Bk]]),Rk={class:"tr-head"},Ik=t.defineComponent({__name:"TrHead",setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",Rk,[t.renderSlot(e.$slots,"default")]))}});function Ak(n,e){const r=e.indexOf(n)+1;return e[r>=e.length?0:r]}function Lk(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 Ok=["^data-col-id"],$k=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:Ak(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,Ok))}}),Zk=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))}}),Mk=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 Fk(n){t.onMounted(()=>window.addEventListener("mouseup",n)),t.onUnmounted(()=>window.removeEventListener("mouseup",n))}function Pk(n){let e=!1;return function(...r){e||(requestAnimationFrame(()=>{n(...r),e=!1}),e=!0)}}function zk(n,e){let r;function o(l){r={...l}}Fk(()=>{r=void 0,e()});const a=Pk(n);return ot(window,"mousemove",l=>{r&&a({x:r.x,width:r.width,diff:l.x-r.x})}),{start:o}}const Xo=1,Dk=10,Wk=30,dm=60;function um(){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 pm(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 Gk(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 rm({colId:c,width:a,x:l,right:l+a})}).slice(0,r.length-1)}function Uk(n,e){const r=um(),o=pm(e,{}),{data:a}=n,l=zk(d=>{Ar(a.resizeTh,u=>{const f=a.columns.find(m=>m.id===u.colId);f&&(f.width=Cl(d.width+d.diff,Wk,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=Gk(e).find(u=>Math.abs(r.x-u.right)<Dk);d?(document.body.style.cursor="col-resize",a.resizeTh=d):(a.resizeTh=void 0,document.body.style.cursor="")}),{mouseDown:c}}const Hk={key:0,class:"command-menu"},Xk={key:0},jk=["onClick"],Yk=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",Hk,[r.value.length?(t.openBlock(),t.createElementBlock("span",Xk,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,jk))),128))])):t.createCommentVNode("",!0)}}),Kk={key:0,class:"command-menu"},Jk={key:0},qk=["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",Kk,[r.value.length?(t.openBlock(),t.createElementBlock("span",Jk,"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,qk))),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 ex=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 tx(n){return t.computed(()=>{const{data:e,settings:r}=n,{bodyWidth:o,scrollLeft:a}=e,l=[...e.columns],c=om();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 uk(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 nx(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 rm({style:{top:`${c-n.scrollTop}px`,height:`${o.height}px`},primaryKey:l,offset:c,height:u,cells:f,selected:n.selectedRows.has(l)})}))}const rx=async(n,e)=>{const{scrollTop:r,bodyHeight:o}=n;return await Xw(0),Kw({rows:e.getRows(r,o),dataWindow:n})};function ox(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(()=>nm(f.data.dataHeight-f.data.bodyHeight,m=>m>0?m:0)),l=t.computed(()=>nm(o.value-f.data.bodyWidth,m=>m>0?m:0)),c=t.computed(()=>({bodyHeight:e.bodyHeight,scrollTop:e.scrollTop,current:e.currentWindow})),d=tx({data:e,settings:r}),u=nx(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-dm,bodyHeight:m.bodyHeight+dm*2},rx(ni(e.currentWindow),r.value.dataSource).then(({rows:_,dataWindow:C})=>{Nl(e.currentWindow,C)&&(e.rows=_)}))},{deep:!0,immediate:!0}),t.provide(cm,f),f}const ax={class:"command-menu__container"},ix={key:0,class:"table-body__no-data"},lx={class:"carets"},fd=t.defineComponent({__name:"TableComponent",props:{settings:{}},emits:["update:data","change:sort"],setup(n,{emit:e}){const r=e,o=n,a=ox(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:_}=Uk(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",ax,[t.createVNode(Yk),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(Ik,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(g),($,W)=>(t.openBlock(),t.createBlock($k,{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",ix,[t.createElementVNode("div",null,[t.createVNode(Tk),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(Zk,{key:W,row:$},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.cells,E=>(t.openBlock(),t.createBlock(Ek,{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",lx,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(g),($,W)=>(t.openBlock(),t.createBlock(Mk,{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(ex,{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))}}),fm=new WeakMap;class sx{constructor(e,r,o){Uw(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)}));fm.set(this,l)}get rows(){return fm.get(this)}async getHeight(){return this.dataHeight}async getRows(e,r){return Lk(this.rows,o=>{const a=o.offset;return e<a+o.height&&a<r+e})}}class cx{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 dx(n){return Object.freeze(n)}function ux(n){return t.h(fd,{settings:Object.freeze(n)})}function md(n,e){const r=new sx(n,e.resolveRowHeight,e.resolvePrimaryKey);return{...e,dataSource:r}}function px(n,e){return t.computed(()=>{const r=t.unref(n);return md(r,t.unref(e))})}function fx(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 mx=Object.freeze(Object.defineProperty({__proto__:null,AsyncData:cx,Component:fd,factory:ux,rawDataSettings:md,settings:dx,useRawData:px,useRawDataComponent:fx},Symbol.toStringTag,{value:"Module"}));function*hx(n,e){for(const r of n)yield e(r)}function gx(n){const e=[];for(const r of n)e.push(r);return e}const hd=new Map;function yx(n){return hd.has(n)||hd.set(n,t.ref(localStorage.getItem(n))),Uo(hd.get(n),"...")}function bx(n,e){e==null?localStorage.removeItem(n):localStorage.setItem(n,e)}function mm(n){const e=yx(n);return t.watch(e,r=>bx(n,r)),e}const gd=new Set;window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",n=>{gx(hx(gd.values(),e=>e(n.matches?"dark":"light")))});const _x=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",hm=t.ref(_x),yd=mm("theme");function gm(n){const e=t.computed(()=>yd.value?yd.value:hm.value),r=a=>{hm.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 wx=t.defineComponent({__name:"ThemeSwitcher",setup(n){const[e,r]=gm();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))}}),kx="_splash_itlwi_1",xx="_table_itlwi_5",vx="_transparent_itlwi_8",Cx="_overlay_itlwi_11",Sx="_text_itlwi_29",ri={splash:kx,table:xx,transparent:vx,overlay:Cx,text:Sx},Ex={class:"pl-loader-circular"},Nx={class:"pl-loader-circular__svg",viewBox:"25 25 50 50"},Vx=["stroke"],ym=t.defineComponent({__name:"PlLoaderCircular",props:{size:{default:"16"}},setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",Ex,[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",Nx,[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,Vx)]))],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(ym),{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))}}),Bx={key:0,class:"pl-block-page__title"},Tx={class:"pl-block-page__title__default"},Rx={class:"pl-block-page__title__append"},Ix={key:1},Ax={name:"PlBlockPage"},Lx=t.defineComponent({...Ax,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",Bx,[t.createElementVNode("div",Tx,[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",Rx,[t.renderSlot(a.$slots,"append")])])):(t.openBlock(),t.createElementBlock("div",Ix)),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))}}),Ox={name:"PlContainer"},$x=t.defineComponent({...Ox,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"]))}}),Zx={name:"PlRow"},Mx=t.defineComponent({...Zx,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))}}),Fx={class:"pl-layout-component",style:{"flex-grow":"1"}},Px={name:"PlSpacer"},bm=t.defineComponent({...Px,setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",Fx))}}),zx={name:"PlGrid"},Dx=t.defineComponent({...zx,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))}}),Wx={key:0,class:"pl-alert__icon"},Gx={class:"pl-alert__main"},Ux={key:0},Hx={class:"pl-alert__main__text"},Xx={name:"PlAlert"},bd=t.defineComponent({...Xx,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",Wx,[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",Gx,[r.label?(t.openBlock(),t.createElementBlock("label",Ux,t.toDisplayString(r.label),1)):t.createCommentVNode("",!0),o[1]||(o[1]=t.createTextVNode()),t.createElementVNode("div",Hx,[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)}}),jx=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
29
|
+
}`;function em(){Ie.ModuleRegistry.registerModules([Ie.AllEnterpriseModule]);const n=kw("AGGRID_LICENSE");n?(Ie.LicenseManager.setLicenseKey(n),console.log("AG Grid Activated")):console.log("AG Grid License not found")}const Dw=Ie.createPart({feature:"headerBottomBorder",css:zw}),Cl=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(Dw),tm=Symbol("sdk-vue");function vl(){return t.inject(tm)}function Ww(n,e,r={}){let o;em();const a=()=>{ww(n).loadBlockState().then(c=>{l.loaded=!0;const d=Pw(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 K_(o,"App is not loaded")},install(c){c.provide(tm,this),a()}});return l}var Gw=Object.defineProperty,Uw=(n,e,r)=>e in n?Gw(n,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):n[e]=r,Hw=(n,e,r)=>Uw(n,e+"",r);function Uo(n,e){if(n==null)throw Error(e??"Empty (null | undefined) value");return n}function Xw(n,e,r){const o=Math.min(e,r),a=Math.max(e,r);return n>=o&&n<=a}function jw(n){return new Promise(e=>setTimeout(e,n))}function Yw(n){return n()}function Sl(n,e,r){return e>n?e:n>r?r:n}function nm(n,e){return e(n)}function Ar(n,e){if(n!=null)return e(n)}function Kw(n){if(n&&n.ok)return n.value}async function Jw(n){return Object.fromEntries(await Promise.all(Object.entries(n).map(async([e,r])=>[e,await r])))}const rm=n=>n;function qw(n,e){return n=Math.ceil(n),e=Math.floor(e),Math.floor(Math.random()*(e-n))+n}function Qw(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 ek(n,e=[]){for(n=n?String(n):"";e.includes(n.charAt(0));)n=n.substring(1);return n}function tk(n){let e="";for(let r=0;r<n;r++)e+=String.fromCharCode(qw(65,91));return e}function om(){return tk(42)}const ti=Array.isArray;function El(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 nk(n,e){return Object.keys(n).map(r=>e(n[r],r))}function am(n){return Object.values(n).reduce((e,r)=>r!==void 0?e+1:e,0)}function Nl(n,e){if(!(El(n)&&El(e)))return n===e;if(ti(n)&&ti(e))return n.length!==e.length?!1:[...n.keys()].every(r=>Nl(n[r],e[r]));if(Ho(n)&&Ho(e))return am(n)!==am(e)?!1:Object.keys(n).every(r=>Nl(n[r],e[r]));throw Error(`Cannot compare a ${String(n)} and b ${String(e)}`)}const Vl=Nl;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 rk(n){return Array.isArray(n)?Object.assign([],n):El(n)?Object.assign({},n):n}function ok(n,e){const r={};for(const o in e)e[o]!==n[o]&&(r[o]=n[o]);return r}function ak(n){return Object.entries(n).forEach(([e,r])=>{r instanceof Function&&(n[e]=r.bind(n))}),n}function ik(n,e,r){return n[e]=r,n}function lk(n,e){return n[e]}function sk(n,e){n={...n};const r=n[e];return delete n[e],[r,n]}function ck(n,...e){return Object.assign({},...e.map(r=>({[r]:n[r]})))}function dk(n,...e){return e.map(r=>n[r])}function uk(n,...e){const r=Object.assign({},n);return e.forEach(o=>delete r[o]),r}function im(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?im(o,a):n[r]=a}),n}const dd=Object.freeze(Object.defineProperty({__proto__:null,bindMethods:ak,deepClone:ni,deepEqual:Vl,deepPatch:im,getProp:lk,isArray:ti,isJsonEqual:Nl,isNonPrimitive:El,isPlainObject:Ho,map:nk,omit:uk,pick:ck,pickValues:dk,setProp:ik,shallowClone:rk,shallowDiff:ok,shiftProp:sk},Symbol.toStringTag,{value:"Module"}));function pk(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 lm(n,e,r){let o;return function(...a){o&&clearTimeout(o),o=setTimeout(()=>{o=void 0,n.apply(this,a)},e)}}function fk(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 mk=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],hk=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],gk=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],yk=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],sm=(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?yk:gk:e.binary?hk:mk;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=sm(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=sm(Number(n),e.locale),d=r[l];return a+c+" "+d}const bk={class:"context-menu"},_k=["onClick"],wk=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",bk,[(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,_k))),128))]))}}),st=(n,e)=>{const r=n.__vccOpts||n;for(const[o,a]of e)r[o]=a;return r},kk=st(wk,[["__scopeId","data-v-12530966"]]);function pd(n,e){n.preventDefault();const r=()=>{t.render(null,document.body)},o=t.h(kk,{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 cm=Symbol(),Bl=()=>t.inject(cm),xk=["value"],Ck={key:1},vk=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),_=Yw(()=>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,xk)):(t.openBlock(),t.createElementBlock("div",Ck,t.toDisplayString(f.modelValue),1))],2))}}),Sk=["^data-row-index"],Ek={key:0,class:"control-cell"},Nk=t.defineComponent({__name:"TdCell",props:{cell:{}},setup(n){const e=n,r=Bl(),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",Ek,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(vk,{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,Sk))}}),Vk={},Bk={width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Tk(n,e){return t.openBlock(),t.createElementBlock("svg",Bk,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 Rk=st(Vk,[["render",Tk]]),Ik={class:"tr-head"},Ak=t.defineComponent({__name:"TrHead",setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",Ik,[t.renderSlot(e.$slots,"default")]))}});function Lk(n,e){const r=e.indexOf(n)+1;return e[r>=e.length?0:r]}function Ok(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 $k=["^data-col-id"],Zk=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:Lk(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,$k))}}),Mk=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))}}),Fk=t.defineComponent({__name:"ColumnCaret",props:{column:{}},setup(n){const e=Bl(),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 Pk(n){t.onMounted(()=>window.addEventListener("mouseup",n)),t.onUnmounted(()=>window.removeEventListener("mouseup",n))}function zk(n){let e=!1;return function(...r){e||(requestAnimationFrame(()=>{n(...r),e=!1}),e=!0)}}function Dk(n,e){let r;function o(l){r={...l}}Pk(()=>{r=void 0,e()});const a=zk(n);return ot(window,"mousemove",l=>{r&&a({x:r.x,width:r.width,diff:l.x-r.x})}),{start:o}}const Xo=1,Wk=10,Gk=30,dm=60;function um(){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 pm(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 Uk(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 rm({colId:c,width:a,x:l,right:l+a})}).slice(0,r.length-1)}function Hk(n,e){const r=um(),o=pm(e,{}),{data:a}=n,l=Dk(d=>{Ar(a.resizeTh,u=>{const f=a.columns.find(m=>m.id===u.colId);f&&(f.width=Sl(d.width+d.diff,Gk,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=Uk(e).find(u=>Math.abs(r.x-u.right)<Wk);d?(document.body.style.cursor="col-resize",a.resizeTh=d):(a.resizeTh=void 0,document.body.style.cursor="")}),{mouseDown:c}}const Xk={key:0,class:"command-menu"},jk={key:0},Yk=["onClick"],Kk=t.defineComponent({__name:"RowsCommandMenu",setup(n){const e=Bl(),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",Xk,[r.value.length?(t.openBlock(),t.createElementBlock("span",jk,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,Yk))),128))])):t.createCommentVNode("",!0)}}),Jk={key:0,class:"command-menu"},qk={key:0},Qk=["onClick"],ex=t.defineComponent({__name:"ColumnsCommandMenu",setup(n){const e=Bl(),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",Jk,[r.value.length?(t.openBlock(),t.createElementBlock("span",qk,"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,Qk))),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 tx=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 nx(n){return t.computed(()=>{const{data:e,settings:r}=n,{bodyWidth:o,scrollLeft:a}=e,l=[...e.columns],c=om();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 pk(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 rx(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 rm({style:{top:`${c-n.scrollTop}px`,height:`${o.height}px`},primaryKey:l,offset:c,height:u,cells:f,selected:n.selectedRows.has(l)})}))}const ox=async(n,e)=>{const{scrollTop:r,bodyHeight:o}=n;return await jw(0),Jw({rows:e.getRows(r,o),dataWindow:n})};function ax(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(()=>nm(f.data.dataHeight-f.data.bodyHeight,m=>m>0?m:0)),l=t.computed(()=>nm(o.value-f.data.bodyWidth,m=>m>0?m:0)),c=t.computed(()=>({bodyHeight:e.bodyHeight,scrollTop:e.scrollTop,current:e.currentWindow})),d=nx({data:e,settings:r}),u=rx(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=Sl(m,0,a.value)},updateScrollLeft(m){e.scrollLeft=Sl(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-dm,bodyHeight:m.bodyHeight+dm*2},ox(ni(e.currentWindow),r.value.dataSource).then(({rows:_,dataWindow:C})=>{Vl(e.currentWindow,C)&&(e.rows=_)}))},{deep:!0,immediate:!0}),t.provide(cm,f),f}const ix={class:"command-menu__container"},lx={key:0,class:"table-body__no-data"},sx={class:"carets"},fd=t.defineComponent({__name:"TableComponent",props:{settings:{}},emits:["update:data","change:sort"],setup(n,{emit:e}){const r=e,o=n,a=ax(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:_}=Hk(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,B)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"tableRef",ref:d,class:"data-table",onMousedown:B[2]||(B[2]=(...$)=>t.unref(_)&&t.unref(_)(...$))},[t.createElementVNode("div",ix,[t.createVNode(Kk),B[3]||(B[3]=t.createTextVNode()),t.createVNode(ex)]),B[7]||(B[7]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"headRef",ref:u,class:"table-head"},[t.createVNode(Ak,null,{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(g),($,W)=>(t.openBlock(),t.createBlock(Zk,{key:W,col:$,style:t.normalizeStyle($.style),"onChange:sort":B[0]||(B[0]=E=>N.$emit("change:sort",E))},null,8,["col","style"]))),128))]),_:1})],512),B[8]||(B[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",lx,[t.createElementVNode("div",null,[t.createVNode(Rk),B[4]||(B[4]=t.createTextVNode()),B[5]||(B[5]=t.createElementVNode("div",null,"No Data To Show",-1))])])):t.createCommentVNode("",!0),B[6]||(B[6]=t.createTextVNode()),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(y),($,W)=>(t.openBlock(),t.createBlock(Mk,{key:W,row:$},{default:t.withCtx(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList($.cells,E=>(t.openBlock(),t.createBlock(Nk,{key:E.column.id+":"+W,cell:E,style:t.normalizeStyle(E.style)},null,8,["cell","style"]))),128))]),_:2},1032,["row"]))),128))],36),B[9]||(B[9]=t.createTextVNode()),t.createElementVNode("div",sx,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(g),($,W)=>(t.openBlock(),t.createBlock(Fk,{key:W,column:$,style:t.normalizeStyle($.style),"onChange:sort":B[1]||(B[1]=E=>N.$emit("change:sort",E))},null,8,["column","style"]))),128))]),B[10]||(B[10]=t.createTextVNode()),t.createVNode(tx,{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))}}),fm=new WeakMap;class cx{constructor(e,r,o){Hw(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)}));fm.set(this,l)}get rows(){return fm.get(this)}async getHeight(){return this.dataHeight}async getRows(e,r){return Ok(this.rows,o=>{const a=o.offset;return e<a+o.height&&a<r+e})}}class dx{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=Sl(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 ux(n){return Object.freeze(n)}function px(n){return t.h(fd,{settings:Object.freeze(n)})}function md(n,e){const r=new cx(n,e.resolveRowHeight,e.resolvePrimaryKey);return{...e,dataSource:r}}function fx(n,e){return t.computed(()=>{const r=t.unref(n);return md(r,t.unref(e))})}function mx(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 hx=Object.freeze(Object.defineProperty({__proto__:null,AsyncData:dx,Component:fd,factory:px,rawDataSettings:md,settings:ux,useRawData:fx,useRawDataComponent:mx},Symbol.toStringTag,{value:"Module"}));function*gx(n,e){for(const r of n)yield e(r)}function yx(n){const e=[];for(const r of n)e.push(r);return e}const hd=new Map;function bx(n){return hd.has(n)||hd.set(n,t.ref(localStorage.getItem(n))),Uo(hd.get(n),"...")}function _x(n,e){e==null?localStorage.removeItem(n):localStorage.setItem(n,e)}function mm(n){const e=bx(n);return t.watch(e,r=>_x(n,r)),e}const gd=new Set;window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",n=>{yx(gx(gd.values(),e=>e(n.matches?"dark":"light")))});const wx=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",hm=t.ref(wx),yd=mm("theme");function gm(n){const e=t.computed(()=>yd.value?yd.value:hm.value),r=a=>{hm.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 kx=t.defineComponent({__name:"ThemeSwitcher",setup(n){const[e,r]=gm();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))}}),xx="_splash_itlwi_1",Cx="_table_itlwi_5",vx="_transparent_itlwi_8",Sx="_overlay_itlwi_11",Ex="_text_itlwi_29",ri={splash:xx,table:Cx,transparent:vx,overlay:Sx,text:Ex},Nx={class:"pl-loader-circular"},Vx={class:"pl-loader-circular__svg",viewBox:"25 25 50 50"},Bx=["stroke"],ym=t.defineComponent({__name:"PlLoaderCircular",props:{size:{default:"16"}},setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",Nx,[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",Vx,[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,Bx)]))],4)]))}}),Tl=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(ym),{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))}}),Tx={key:0,class:"pl-block-page__title"},Rx={class:"pl-block-page__title__default"},Ix={class:"pl-block-page__title__append"},Ax={key:1},Lx={name:"PlBlockPage"},Ox=t.defineComponent({...Lx,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",Tx,[t.createElementVNode("div",Rx,[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",Ix,[t.renderSlot(a.$slots,"append")])])):(t.openBlock(),t.createElementBlock("div",Ax)),l[2]||(l[2]=t.createTextVNode()),t.createVNode(Tl,{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))}}),$x={name:"PlContainer"},Zx=t.defineComponent({...$x,props:{width:{},loading:{type:Boolean},loadingText:{}},setup(n){const e=n,r=t.computed(()=>({width:e.width}));return(o,a)=>(t.openBlock(),t.createBlock(Tl,{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"]))}}),Mx={name:"PlRow"},Fx=t.defineComponent({...Mx,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))}}),Px={class:"pl-layout-component",style:{"flex-grow":"1"}},zx={name:"PlSpacer"},bm=t.defineComponent({...zx,setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",Px))}}),Dx={name:"PlGrid"},Wx=t.defineComponent({...Dx,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))}}),Gx={key:0,class:"pl-alert__icon"},Ux={class:"pl-alert__main"},Hx={key:0},Xx={class:"pl-alert__main__text"},jx={name:"PlAlert"},bd=t.defineComponent({...jx,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",Gx,[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",Ux,[r.label?(t.openBlock(),t.createElementBlock("label",Hx,t.toDisplayString(r.label),1)):t.createCommentVNode("",!0),o[1]||(o[1]=t.createTextVNode()),t.createElementVNode("div",Xx,[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)}}),Yx=`<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
|
+
`,Kx=`<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
|
-
`,Kx=["innerHTML"],Jx={class:"dropdown-list-item__title-container"},qx={class:"dropdown-list-item__title text-s"},Qx={key:0,class:"dropdown-list-item__description text-description"},ev={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?Yx:jx);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,Kx)):t.createCommentVNode("",!0),c[1]||(c[1]=t.createTextVNode()),t.createElementVNode("div",Jx,[t.createElementVNode("div",qx,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",ev)):t.createCommentVNode("",!0)],2))}});function _m(n){return n()}function _d(n){let e=!1;return function(...r){e||(requestAnimationFrame(()=>{n(...r),e=!1}),e=!0)}}function wm(n){return new Promise(e=>setTimeout(e,n))}function km(n,e){const r=setTimeout(n,e);return()=>{clearTimeout(r)}}function xm(n,e){return n=Math.ceil(n),e=Math.floor(e),Math.floor(Math.random()*(e-n))+n}function tv(n){let e="";for(let r=0;r<n;r++)e+=String.fromCharCode(xm(65,91));return e}function vm(n){return function(e){return 1-n(1-e)}}function nv(n){return function(e){return e<.5?n(2*e)/2:(2-n(2*(1-e)))/2}}function Cm(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 rv(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 Sm(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 ov(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 av=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))}}),iv="_icon_1ugxm_2",lv={icon:iv},sv={$style:lv},qt=st(av,[["__cssModules",sv]]),cv=["onKeyup"],dv=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,cv),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 Em(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 uv={key:0},pv={inheritAttrs:!1},Tl=t.defineComponent({...pv,__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 Em(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",uv,[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))}}),fv={name:"PlBtnPrimary"},Rl=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-primary"},e),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:3},16))}}),mv={name:"PlBtnAccent"},hv=t.defineComponent({...mv,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))}}),gv={name:"PlBtnDanger"},yv=t.defineComponent({...gv,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))}}),bv={name:"PlBtnSecondary"},Il=t.defineComponent({...bv,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))}}),_v=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))}}),wv="_icon_1ugxm_2",kv={icon:wv},xv={$style:kv},at=st(_v,[["__cssModules",xv]]),vv={key:0},Cv={name:"PlBtnGhost"},cr=t.defineComponent({...Cv,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 Em(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",vv,[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))}}),Sv=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 Ev(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 Nv(n){return Array.isArray(n)?n:[n]}function Vv(n,e,...r){r.forEach(o=>{n[o]=e[o]})}function Al(n,e){ot(document,"click",r=>{document.contains(r.target)&&(Nv(n).map(o=>o.value).filter(o=>!!o).some(o=>o==null?void 0:o.contains(r.target))||e())})}const Bv={},Tv={class:"beak",width:"5",height:"9",viewBox:"0 0 3 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Rv(n,e){return t.openBlock(),t.createElementBlock("svg",Tv,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 Iv=st(Bv,[["render",Rv]]),wd=new Map,Av={name:"PlTooltip"},ct=t.defineComponent({...Av,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=Sm(()=>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 wm(100),l.over&&u())},g=()=>{l.over=!1,c=km(()=>{l.over||f()},a.closeDelay)};t.watch(()=>a.hide,T=>{T&&f()});const y=t.ref(),_=t.ref(),C=Ev(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(Iv)],38)],4)):t.createCommentVNode("",!0)]),_:3})])):t.createCommentVNode("",!0)]),_:3},16))}}),Lv={},Ov={class:"inner-border"};function $v(n,e,r,o,a,l){return t.openBlock(),t.createElementBlock("div",Ov,[t.renderSlot(n.$slots,"default")])}const Zv=st(Lv,[["render",$v]]),Mv={key:0},Fv=["tabindex","onKeydown","onClick"],Pv={key:1,class:"pl-btn-group__helper"},zv={key:2,class:"pl-btn-group__error"},Dv={name:"PlBtnGroup"},Nm=t.defineComponent({...Dv,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",Mv,[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(Zv,{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,Fv))),128))]),_:1}),u[2]||(u[2]=t.createTextVNode()),d.helper?(t.openBlock(),t.createElementBlock("div",Pv,t.toDisplayString(d.helper),1)):d.error?(t.openBlock(),t.createElementBlock("div",zv,t.toDisplayString(d.error),1)):t.createCommentVNode("",!0)],2))}});function Wv(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 Gv="_component_1prpy_1",Uv="_container_1prpy_15",Hv="_error_1prpy_69",kd={component:Gv,container:Uv,error:Hv},Xv={key:0},jv=["placeholder"],Yv=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=Wv(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",Xv,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,jv),[[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))}}),Kv={inheritAttrs:!1},Jv={class:"double-contour"};function qv(n,e,r,o,a,l){return t.openBlock(),t.createElementBlock("div",Jv,[t.createElementVNode("div",t.normalizeProps(t.guardReactiveProps(n.$attrs)),[t.renderSlot(n.$slots,"default")],16)])}const dr=st(Kv,[["render",qv]]);function Vm(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 Bm(n,e){xd.set(n,e),vd.unobserve(n),vd.observe(n)}function Tm(n){vd.unobserve(n),xd.delete(n)}const Qv=8,Rm=4;function Kn(n,e="label"){const r=new Set;Vm(()=>{vt(n==null?void 0:n.value,o=>{const a=o.querySelector(e);a&&(r.add(a),Bm(a,()=>{const l=_m(()=>a.getBoundingClientRect().width+jo(Qv,c=>Number.isNaN(c)?Rm:c+Rm));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=>Tm(o))})}function eC(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 Im(n,e){return t.computed(()=>eC(n.value,e))}const tC=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))}}),nC="_icon_1ugxm_2",rC={icon:nC},oC={$style:rC},Or=st(tC,[["__cssModules",oC]]),aC={class:"pl-text-field__envelope"},iC={key:0,ref:"label"},lC={key:0,class:"required-icon"},sC={key:1,class:"pl-text-field__prefix"},cC=["disabled","placeholder","type"],dC={key:0,class:"pl-text-field__error"},uC={key:1,class:"pl-text-field__helper"},pC={name:"PlTextField"},fo=t.defineComponent({...pC,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=Im(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",aC,[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",iC,[A.required?(t.openBlock(),t.createElementBlock("i",lC)):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",sC,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,cC),[[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",dC,t.toDisplayString(N.value.join(" ")),1)):A.helper?(t.openBlock(),t.createElementBlock("div",uC,t.toDisplayString(A.helper),1)):t.createCommentVNode("",!0)]))}}),fC=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))}}),mC="_icon_1ugxm_2",hC={icon:mC},gC={$style:hC},Yo=st(fC,[["__cssModules",gC]]),yC=["disabled","placeholder"],bC=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,yC),[[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))}}),_C="_component_pz0lo_1",wC="_clear_pz0lo_35",kC={component:_C,clear:wC},xC={$style:kC},Am=st(bC,[["__cssModules",xC]]),vC={class:"ui-text-area__envelope"},CC={key:0,ref:"label"},SC={key:0,class:"required-icon"},EC=["readonly","rows","disabled","placeholder"],NC={class:"ui-text-area__append"},VC={key:0,class:"ui-text-area__error"},BC={key:1,class:"ui-text-area__helper"},TC={name:"PlTextArea"},RC=t.defineComponent({...TC,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=Im(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",vC,[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",CC,[_.required?(t.openBlock(),t.createElementBlock("i",SC)):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,EC),[[t.vModelText,d.value]]),C[4]||(C[4]=t.createTextVNode()),t.createElementVNode("div",NC,[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",VC,t.toDisplayString(m.value.join(" ")),1)):_.helper?(t.openBlock(),t.createElementBlock("div",BC,t.toDisplayString(_.helper),1)):t.createCommentVNode("",!0)]))}});function Lm(n){return n!==null&&typeof n=="object"}function ft(n,e){return Lm(n)&&Lm(e)?Object.keys(n).length!==Object.keys(e).length?!1:Object.keys(n).every(r=>ft(n[r],e[r])):n===e}function Om(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=lm(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 $m(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 Zm(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=Zm(n,e);if(d==="visible")return;const u=f=>{const m=d==="floor"?c-(a-l):c;n.scrollTop=o+f*(m-o)};$m(n,e)||Cm({duration:r.duration||100,timing:vm(f=>f),draw:u})}function Cd(n,e,r,o){return n.addEventListener(e,r,o),function(){n.removeEventListener(e,r)}}function IC(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)]))}}),AC=["tabindex"],LC={class:"pl-dropdown__container"},OC={class:"pl-dropdown__field"},$C=["disabled","placeholder"],ZC={key:0,class:"input-value"},MC={class:"pl-dropdown__controls"},FC={key:2,class:"arrow-icon arrow-icon-default"},PC={key:0},zC={key:0,class:"required-icon"},DC={key:0,class:"nothing-found"},WC={key:0,class:"pl-dropdown__error"},GC={key:1,class:"pl-dropdown__helper"},UC={key:2,class:"pl-dropdown__helper"},HC={name:"PlDropdown"},$r=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},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",LC,[t.createElementVNode("div",OC,[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,$C),[[t.vModelText,u.search]]),V[4]||(V[4]=t.createTextVNode()),u.open?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",ZC,[t.createVNode(Ll,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(T.value),1)]),_:1})])),V[5]||(V[5]=t.createTextVNode()),t.createElementVNode("div",MC,[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",FC))])])]),V[9]||(V[9]=t.createTextVNode()),L.label?(t.openBlock(),t.createElementBlock("label",PC,[L.required?(t.openBlock(),t.createElementBlock("i",zC)):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",DC,"Nothing found"))]),_:1},8,["root"])):t.createCommentVNode("",!0),V[11]||(V[11]=t.createTextVNode()),t.createVNode(dr,{class:"pl-dropdown__contour"})])],42,AC),V[12]||(V[12]=t.createTextVNode()),C.value?(t.openBlock(),t.createElementBlock("div",WC,t.toDisplayString(C.value),1)):g.value&&L.loadingOptionsHelper?(t.openBlock(),t.createElementBlock("div",GC,t.toDisplayString(L.loadingOptionsHelper),1)):L.helper?(t.openBlock(),t.createElementBlock("div",UC,t.toDisplayString(L.helper),1)):t.createCommentVNode("",!0)]))}}),XC={name:"PlDropdownRef"},jC=t.defineComponent({...XC,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 YC(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 KC={class:"resizable-input"},JC=["placeholder","value","disabled"],qC=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",KC,[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,JC)]))}}),QC={class:"dropdown-tab-item__title text-caps13"},eS=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))}}),tS={class:"pl-line-dropdown__prefix"},nS={class:"pl-line-dropdown__icon-wrapper"},rS={class:"pl-line-dropdown__icon"},oS={key:0,class:"pl-line-dropdown__no-item"},aS={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=YC(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",tS,t.toDisplayString(o==null?void 0:o.prefix),1),v[6]||(v[6]=t.createTextVNode()),t.createVNode(qC,{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",nS,[t.withDirectives(t.createElementVNode("div",rS,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",oS,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(eS,{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",aS,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))}}),iS={class:"ui-dropdown__envelope"},lS=["tabindex"],sS={class:"ui-dropdown__container"},cS={class:"ui-dropdown__field"},dS=["disabled","placeholder"],uS={class:"ui-dropdown__controls"},pS={key:0},fS={key:0,class:"required-icon"},mS={key:0,class:"nothing-found"},hS={key:0,class:"ui-dropdown__error"},gS={key:1,class:"ui-dropdown__helper"},yS={key:2,class:"ui-dropdown__helper"},bS={name:"PlDropdown"},_S=t.defineComponent({...bS,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",iS,[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",sS,[t.createElementVNode("div",cS,[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,dS),[[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",uS,[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",pS,[V.required?(t.openBlock(),t.createElementBlock("i",fS)):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",mS,"Nothing found"))],512)):t.createCommentVNode("",!0),k[11]||(k[11]=t.createTextVNode()),t.createVNode(dr,{class:"ui-dropdown__contour"})])],42,lS),k[12]||(k[12]=t.createTextVNode()),C.value?(t.openBlock(),t.createElementBlock("div",hS,t.toDisplayString(C.value),1)):g.value&&V.loadingOptionsHelper?(t.openBlock(),t.createElementBlock("div",gS,t.toDisplayString(V.loadingOptionsHelper),1)):V.helper?(t.openBlock(),t.createElementBlock("div",yS,t.toDisplayString(V.helper),1)):t.createCommentVNode("",!0)]))}}),wS={key:0,class:"ui-progress-bar"},kS={class:"ui-progress-bar__messages d-flex align-center pl-6 pr-6"},xS={class:"ui-progress-bar__message flex-grow-1"},vS={class:"ui-progress-bar__percent"},CS=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",wS,[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",kS,[t.createElementVNode("div",xS,t.toDisplayString(r.value),1),a[0]||(a[0]=t.createTextVNode()),t.createElementVNode("div",vS,t.toDisplayString(o.progress+"%"),1)])])):t.createCommentVNode("",!0)}}),SS={class:"mi-number-field__main-wrapper d-flex"},ES={key:0,class:"text-description"},NS=["disabled","placeholder"],VS={key:0,class:"mi-number-field__hint text-description"},BS=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",SS,[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",ES,[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,NS),[[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",VS,t.toDisplayString(N.value),1)):t.createCommentVNode("",!0)],34))}}),TS={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",TS,[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))}}),RS=["tabindex"],IS={class:"pl-dropdown-multi__container"},AS={class:"pl-dropdown-multi__field"},LS=["disabled","placeholder"],OS={key:0,class:"chips-container"},$S={class:"pl-dropdown-multi__controls"},ZS={key:0},MS={key:0,class:"required-icon"},FS={class:"pl-dropdown-multi__open-chips-container"},PS={key:0,class:"nothing-found"},zS={key:0,class:"pl-dropdown-multi__error"},DS={key:1,class:"pl-dropdown-multi__helper"},WS={name:"PlDropdownMulti"},Zl=t.defineComponent({...WS,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:Om(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(Om(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",IS,[t.createElementVNode("div",AS,[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,LS),[[t.vModelText,f.search]]),I[6]||(I[6]=t.createTextVNode()),f.open?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",OS,[(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",$S,[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",ZS,[S.required?(t.openBlock(),t.createElementBlock("i",MS)):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",FS,[(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",PS,"Nothing found"))]),_:1},8,["root"])):t.createCommentVNode("",!0),I[14]||(I[14]=t.createTextVNode()),t.createVNode(dr,{class:"pl-dropdown-multi__contour"})])],42,RS),I[15]||(I[15]=t.createTextVNode()),S.error?(t.openBlock(),t.createElementBlock("div",zS,t.toDisplayString(S.error),1)):S.helper?(t.openBlock(),t.createElementBlock("div",DS,t.toDisplayString(S.helper),1)):t.createCommentVNode("",!0)]))}}),GS=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))}}),US={name:"PlCheckbox"},Vd=t.defineComponent({...US,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))}}),HS={key:0},XS=["onClick"],jS={name:"PlCheckboxGroup"},YS=t.defineComponent({...jS,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",HS,[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,XS)]))),128))],2))}}),KS="_component_tupwt_1",JS={component:KS},qS={};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 eE={$style:JS},Mm=st(qS,[["render",QS],["__cssModules",eE]]),tE={key:1,class:"pl-dialog-modal__title"},nE={inheritAttrs:!1},Bd=t.defineComponent({...nE,__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(Mm,{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",tE,[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})]))}}),rE=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}))}}),oE={key:0,class:"pl-slide-modal__title"},aE={class:"pl-slide-modal__title-content"},iE={class:"pl-slide-modal__content"},lE={key:1,class:"pl-slide-modal__actions"},sE={name:"PlSlideModal",inheritAttrs:!1},Ko=t.defineComponent({...sE,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(rE,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",oE,[t.createElementVNode("span",aE,[t.renderSlot(d.$slots,"title")])])):t.createCommentVNode("",!0),u[4]||(u[4]=t.createTextVNode()),t.createElementVNode("div",iE,[t.renderSlot(d.$slots,"default")]),u[5]||(u[5]=t.createTextVNode()),t.unref(r).actions?(t.openBlock(),t.createElementBlock("div",lE,[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)]))}}),cE={key:0,class:"label"},dE={name:"PlToggleSwitch"},Ml=t.defineComponent({...dE,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",cE,t.toDisplayString(e.label),1)):t.createCommentVNode("",!0)],34))}});function Fm(n){return t.getCurrentScope()?(t.onScopeDispose(n),!0):!1}const Pm=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const zm=()=>{};function uE(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 pE(n,e={}){let r,o,a=zm;const l=c=>{clearTimeout(c),a(),a=zm};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 fE(n,e=200,r={}){return uE(pE(e,r),n)}function mE(n,e=200,r={}){const o=t.ref(n.value),a=fE(()=>{o.value=n.value},e,r);return t.watch(n,()=>a()),o}function hE(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,Pm&&u()),Fm(d),{isPending:t.readonly(a),start:u,stop:d}}function gE(n,e,r){return t.watch(n,(o,a,l)=>{o&&e(o,a,l)},{...r,once:!1})}function yE(n,e,r={}){const{immediate:o=!0}=r,{start:a}=hE(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&&Pm&&d(),Fm(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"]),bE=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 Dm=Jo;function _E(n){Dm=n}function Fl(){return Dm}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}},wE=[];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 Wm(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 Gm=(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 Gm(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 Gm(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 kE=/^c[^\s-]{8,}$/i,xE=/^[0-9a-z]+$/,vE=/^[0-9A-HJKMNP-TV-Z]{26}$/,CE=/^[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,SE=/^[a-z0-9_-]{21}$/i,EE=/^[-+]?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)?)??$/,NE=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,VE="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ad;const BE=/^(?:(?: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])$/,TE=/^(([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})))$/,RE=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Um="((\\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])))",IE=new RegExp(`^${Um}$`);function Hm(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 AE(n){return new RegExp(`^${Hm(n)}$`)}function Xm(n){let e=`${Um}T${Hm(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 LE(n,e){return!!((e==="v4"||!e)&&BE.test(n)||(e==="v6"||!e)&&TE.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")NE.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(VE,"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")CE.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")SE.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")kE.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")xE.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")vE.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"?Xm(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"?IE.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{code:ne.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?AE(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"?EE.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"duration",code:ne.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?LE(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"?RE.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 OE(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"?OE(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 jm(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 jm(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)||Wm(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=jm;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)||Wm(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 $E=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 Ym(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 ZE={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 ME=(n,e={message:`Input not instance of ${n.name}`})=>Ym(r=>r instanceof n,e),Km=vn.create,Jm=Mr.create,FE=Xl.create,PE=Fr.create,qm=ci.create,zE=mo.create,DE=Wl.create,WE=di.create,GE=ui.create,UE=qo.create,HE=ho.create,XE=ur.create,jE=Gl.create,YE=Cn.create,KE=it.create,JE=it.strictCreate,qE=pi.create,QE=Ul.create,eN=fi.create,tN=qn.create,nN=mi.create,rN=Hl.create,oN=go.create,aN=ea.create,iN=hi.create,lN=gi.create,sN=zr.create,cN=yi.create,dN=ta.create,Qm=Sn.create,uN=Qn.create,pN=Dr.create,fN=Sn.createWithPreprocess,mN=wi.create;var ze=Object.freeze({__proto__:null,defaultErrorMap:Jo,setErrorMap:_E,getErrorMap:Fl,makeIssue:Pl,EMPTY_PATH:wE,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:Xm,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:$E,ZodBranded:Od,ZodPipeline:wi,ZodReadonly:ki,custom:Ym,Schema:Le,ZodSchema:Le,late:ZE,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:UE,array:YE,bigint:PE,boolean:qm,date:zE,discriminatedUnion:QE,effect:Qm,enum:sN,function:aN,instanceof:ME,intersection:eN,lazy:iN,literal:lN,map:rN,nan:FE,nativeEnum:cN,never:XE,null:GE,nullable:pN,number:Jm,object:KE,oboolean:()=>qm().optional(),onumber:()=>Jm().optional(),optional:uN,ostring:()=>Km().optional(),pipeline:mN,preprocess:fN,promise:dN,record:nN,set:oN,strictObject:JE,string:Km,symbol:DE,transformer:Qm,tuple:tN,undefined:WE,union:qE,unknown:HE,void:jE,NEVER:Se,ZodIssueCode:ne,quotelessJson:bE,ZodError:Qt});function hN(n){throw new Error("Unexpected object: "+n)}const eh="upload://upload/",th="index://index/";function gN(n){return n.startsWith(eh)}function yN(n){return n.startsWith(th)}function nh(n){if(yN(n)){const e=n.slice(th.length);return JSON.parse(decodeURIComponent(e)).path}else if(gN(n)){const e=n.slice(eh.length);return JSON.parse(decodeURIComponent(e)).localPath}hN(n)}function bN(n){return n.replace(/^.*[\\/]/,"")}function _N(n){return bN(nh(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 rh={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)}}})(rh,rh.exports);const wN=ze.object({type:ze.literal("PlError"),name:ze.string(),message:ze.string(),fullMessage:ze.string().optional(),stack:ze.string().optional()}),kN=wN.extend({cause:ze.lazy(()=>jl).optional(),errors:ze.lazy(()=>jl.array()).optional()}),xN=ze.object({type:ze.literal("StandardError"),name:ze.string(),message:ze.string(),stack:ze.string().optional()}),vN=xN.extend({cause:ze.lazy(()=>jl).optional(),errors:ze.lazy(()=>jl.array()).optional()}),jl=ze.union([vN,kN]),CN=ze.object({name:ze.string(),message:ze.string(),fullMessage:ze.string().optional(),stack:ze.string().optional()}),oh=CN.extend({cause:ze.lazy(()=>oh).optional(),errors:ze.lazy(()=>oh.array()).optional()});function SN(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 EN=ze.object({type:ze.string(),importance:ze.number().optional(),id:ze.string().optional(),label:ze.string()});ze.array(EN);const NN="1.30.37";function Wr(){return SN({sdkVersion:NN})}const VN="[==PROGRESS==]";function BN(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function TN(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??VN,m=new TextDecoder().decode(u.data).replace(new RegExp(`${BN(f)}`,"g"),"");if(c=Object.assign(c,{lines:c.lines+m,lastOffset:u.newOffset,finished:!u.live}),u.newOffset>=u.size)break}}const a=yE(()=>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 gE(()=>{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 RN={key:0},IN={class:"pl-log-view__copy"},AN={key:1,class:"pl-log-view__error"},LN={name:"PlLogView"},ah=t.defineComponent({...LN,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=TN(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??Yw(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",RN,[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",IN,[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",AN,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))}}),ON="_component_1ukal_1",$N="_tab_1ukal_14",ZN="_disabled_1ukal_27",MN="_active_1ukal_56",FN="_topLine_1ukal_69",na={component:ON,tab:$N,disabled:ZN,active:MN,topLine:FN},PN=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"]))}}),zN={name:"PlTabs"},DN=t.defineComponent({...zN,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(PN,{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))}}),WN=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))}}),GN="_compact_rhd5u_16",UN="_content_rhd5u_20",HN={compact:GN,content:UN},XN={$style:HN},ih=st(WN,[["__cssModules",XN]]),jN=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))}}),YN=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}))}}),KN={class:"pl-accordion-section"},JN=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=om(),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",KN,[t.createVNode(t.unref(ih),{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(YN,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})]))}}),qN="_content_e3dof_2",QN="_separator_e3dof_19",eV="_chevron_e3dof_27",tV="_down_e3dof_31",nV={content:qN,separator:QN,chevron:eV,down:tV},rV={$style:nV},oV=st(JN,[["__cssModules",rV]]),lh=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)}}),aV={key:0,class:"progress-cell__infinity-loader"},iV={class:"progress-cell__body"},lV={class:"progress-cell__stage text-s"},sV={class:"progress-cell__percentage text-s d-flex align-center justify-end"},sh=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",aV,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",iV,[t.createElementVNode("div",lV,t.toDisplayString(l.error?l.error:l.step),1),c[2]||(c[2]=t.createTextVNode()),t.createElementVNode("div",sV,[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=pk(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 cV=["tabindex"],dV={class:"pl-autocomplete__container"},uV={class:"pl-autocomplete__field"},pV=["disabled","placeholder"],fV={key:0,class:"input-value"},mV={class:"pl-autocomplete__controls"},hV={key:2,class:"arrow-icon arrow-icon-default"},gV={key:0},yV={key:0,class:"required-icon"},bV={key:0,class:"nothing-found"},_V={key:0,class:"pl-autocomplete__error"},wV={key:1,class:"pl-autocomplete__helper"},kV={key:2,class:"pl-autocomplete__helper"},xV={name:"PlAutocomplete"},vV=t.defineComponent({...xV,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=mE(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",dV,[t.createElementVNode("div",uV,[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,pV),[[t.vModelText,d.value]]),j[4]||(j[4]=t.createTextVNode()),u.open?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",fV,[t.createVNode(Ll,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(E.value),1)]),_:1})])),j[5]||(j[5]=t.createTextVNode()),t.createElementVNode("div",mV,[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",hV))])])]),j[9]||(j[9]=t.createTextVNode()),F.label?(t.openBlock(),t.createElementBlock("label",gV,[F.required?(t.openBlock(),t.createElementBlock("i",yV)):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",bV,"Nothing found"))]),_:1},8,["root"])):t.createCommentVNode("",!0),j[11]||(j[11]=t.createTextVNode()),t.createVNode(dr,{class:"pl-autocomplete__contour"})])],42,cV),j[12]||(j[12]=t.createTextVNode()),W.value?(t.openBlock(),t.createElementBlock("div",_V,t.toDisplayString(W.value),1)):C.value&&F.loadingOptionsHelper?(t.openBlock(),t.createElementBlock("div",wV,t.toDisplayString(F.loadingOptionsHelper),1)):F.helper?(t.openBlock(),t.createElementBlock("div",kV,t.toDisplayString(F.helper),1)):t.createCommentVNode("",!0)]))}}),CV="_component_1uz6e_1",SV="_local_1uz6e_1",EV="_supported_1uz6e_26",NV="_remote_1uz6e_32",VV="_search_1uz6e_40",BV="_selected_1uz6e_72",TV="_breadcrumbs_1uz6e_86",RV="_cat_1uz6e_116",IV="_message_1uz6e_122",AV="_isFile_1uz6e_196",LV="_isDir_1uz6e_200",OV="_canBeSelected_1uz6e_206",$V="_spin_1uz6e_1",mt={component:CV,local:SV,supported:EV,remote:NV,search:VV,"ls-container":"_ls-container_1uz6e_50","ls-head":"_ls-head_1uz6e_57",selected:BV,breadcrumbs:TV,"ls-error":"_ls-error_1uz6e_108",cat:RV,message:IV,"ls-empty":"_ls-empty_1uz6e_131","ls-body":"_ls-body_1uz6e_152",isFile:AV,isDir:LV,canBeSelected:OV,"ls-loader":"_ls-loader_1uz6e_212","loader-icon":"_loader-icon_1uz6e_220",spin:$V},ZV=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}))}}),MV="_title_14dct_2",FV="_row_14dct_10",PV="_head_14dct_30",zV="_body_14dct_58",DV={title:MV,row:FV,head:PV,body:zV},WV={$style:DV},GV=st(ZV,[["__cssModules",WV]]),ch=()=>({dirPath:"",search:"",storageEntry:void 0,items:[],error:"",storageOptions:[],selected:[],lastSelected:void 0,currentLoadingPath:void 0,showHiddenItems:!1});function UV(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 dh={mounted:n=>{if(n.clientWidth<n.scrollWidth){const e=n.innerText;n.innerText=e.substring(0,57)+"..."+e.substring(e.length-10)}}};function uh(n){return n?n.map(e=>"."+Qw(e,["."])):void 0}function HV(n){const e="/",r=n.startsWith(e),o=qw(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 XV=["title","onClick"],jV={key:0,class:"ls-loader"},YV=["onClick"],KV=["title"],JV=["onClick"],qV=["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(ch()),l=()=>{a.search="",a.error="",a.lastSelected=void 0},c=t.computed(()=>uh(o.extensions)),d=UV(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(()=>HV(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=>{Hw(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,ch())},{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(Am),{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,XV),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(GV)],2)],2),B[11]||(B[11]=t.createTextVNode()),a.currentLoadingPath!==void 0?(t.openBlock(),t.createElementBlock("div",jV,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,KV)),[[t.unref(dh)]])],10,YV)):(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,qV)),[[t.unref(dh)]])],10,JV))],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))}}),eB={key:1,class:"alert-error"},tB=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=uh(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",eB,t.toDisplayString(r.error),1)):t.createCommentVNode("",!0)],34))}}),nB={style:{margin:"0 24px"}},ph=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",nB,[t.createVNode(t.unref(Nm),{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(tB,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"]))}}),rB={key:0,ref:"label"},oB={key:0,class:"required-icon"},aB=["data-placeholder"],iB={key:5,class:"pl-file-input__stats"},lB={key:0,class:"pl-file-input__error"},sB={key:1,class:"pl-file-input__helper"},fh=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,_N)),u=t.computed(()=>c(l.modelValue,nh)),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",rB,[E.required?(t.openBlock(),t.createElementBlock("i",oB)):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,aB),D[6]||(D[6]=t.createTextVNode()),_.value?(t.openBlock(),t.createElementBlock("div",iB,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",lB,t.toDisplayString(g.value),1)):E.helper?(t.openBlock(),t.createElementBlock("div",sB,t.toDisplayString(E.helper),1)):t.createCommentVNode("",!0)],2),D[10]||(D[10]=t.createTextVNode()),t.createVNode(t.unref(ph),{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))}}),cB={class:"pl-notification-alert__wrapper d-flex text-s"},dB={class:"pl-notification-alert__content flex-grow-1"},uB={key:0,class:"pl-notification-alert__close"},pB={key:0,class:"pl-notification-alert__actions d-flex"},mh=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",cB,[t.createElementVNode("div",dB,[t.renderSlot(a.$slots,"default")]),l[0]||(l[0]=t.createTextVNode()),a.closable?(t.openBlock(),t.createElementBlock("div",uB,[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",pB,[t.renderSlot(a.$slots,"actions")])):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0)}}),fB=["data-content"],mB=[".title"],hB=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,fB)),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,mB))),128))],2)],6))}}),gB="_component_5hdjy_1",yB="_container_5hdjy_11",bB="_track_5hdjy_25",_B="_notReady_5hdjy_47",wB={component:gB,container:yB,track:bB,notReady:_B},kB={$style:wB},xB=st(hB,[["__cssModules",kB]]),vB=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))}}),CB="_component_blzj7_2",SB="_legend_blzj7_9",EB="_chip_blzj7_19",NB="_group_blzj7_26",VB="_item_blzj7_32",BB={component:CB,legend:SB,chip:EB,group:NB,item:VB},TB={$style:BB},RB=st(vB,[["__cssModules",TB]]),IB=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(xB,{value:o.value},null,8,["value"]),c[1]||(c[1]=t.createTextVNode()),r.value&&a.value.length?(t.openBlock(),t.createBlock(RB,{key:1,legends:a.value,"max-in-column":l.settings.maxLegendsInColumn},null,8,["legends","max-in-column"])):t.createCommentVNode("",!0)],2))}}),AB="_component_1j1iz_1",LB="_title_1j1iz_7",OB={component:AB,title:LB},$B={$style:OB},ZB=st(IB,[["__cssModules",$B]]),MB=[".title"],FB=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,MB))),128))],2)],6))}}),PB="_component_1utnb_1",zB="_notReady_1utnb_8",DB="_container_1utnb_16",WB={component:PB,notReady:zB,container:DB},GB={$style:WB},UB=st(FB,[["__cssModules",GB]]),HB=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(UB,{value:r.value},null,8,["value"])],2))}}),XB="_component_1gn0t_1",jB={component:XB},YB={$style:jB},hh=st(HB,[["__cssModules",YB]]);function Yl(n,e){return n==null||e==null?NaN:n<e?-1:n>e?1:n>=e?0:NaN}function KB(n,e){return n==null||e==null?NaN:e<n?-1:e>n?1:e>=n?0:NaN}function gh(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===KB?n:JB,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 JB(){return 0}function qB(n){return n===null?NaN:+n}const QB=gh(Yl),yh=QB.right;gh(qB).center;function eT(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 tT(n){return n}var nT=Array.prototype,rT=nT.slice;function Md(n){return()=>n}const oT=Math.sqrt(50),aT=Math.sqrt(10),iT=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>=oT?10:l>=aT?5:l>=iT?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 bh(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 lT(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 sT(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 cT(n){return Math.max(1,Math.ceil(Math.log(eT(n))/Math.LN2)+1)}function _h(){var n=tT,e=Zd,r=cT;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]=sT(g,y,D)),_=bh(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&&$[yh(_,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)?rT.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 dT(n){return n}var Pd=1,zd=2,Dd=3,xi=4,wh=1e-6;function uT(n){return"translate("+n+",0)"}function pT(n){return"translate(0,"+n+")"}function fT(n){return e=>+n(e)}function mT(n,e){return e=Math.max(0,n.bandwidth()-e*2)/2,n.round()&&(e=Math.round(e)),r=>+n(r)+e}function hT(){return!this.__axis}function kh(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?uT:pT;function y(_){var C=o??(e.ticks?e.ticks.apply(e,r):e.domain()),N=a??(e.tickFormat?e.tickFormat.apply(e,r):dT),T=Math.max(l,0)+d,$=e.range(),W=+$[0]+u,E=+$[$.length-1]+u,D=(e.bandwidth?mT:fT)(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",wh).attr("transform",function(L){return isFinite(L=D(L))?g(L+u):this.getAttribute("transform")}),S.attr("opacity",wh).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(hT).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 kh(Dd,n)}function Ql(n){return kh(xi,n)}var gT={value:()=>{}};function xh(){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 yT(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=xh.prototype={constructor:es,on:function(n,e){var r=this._,o=yT(n+"",r),a,l=-1,c=o.length;if(arguments.length<2){for(;++l<c;)if((a=(n=o[l]).type)&&(a=bT(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]=vh(r[a],n.name,e);else if(e==null)for(a in r)r[a]=vh(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 bT(n,e){for(var r=0,o=n.length,a;r<o;++r)if((a=n[r]).name===e)return a.value}function vh(n,e,r){for(var o=0,a=n.length;o<a;++o)if(n[o].name===e){n[o]=gT,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 Ch={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)),Ch.hasOwnProperty(e)?{space:Ch[e],local:n}:n}function _T(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 wT(n){return function(){return this.ownerDocument.createElementNS(n.space,n.local)}}function Sh(n){var e=ts(n);return(e.local?wT:_T)(e)}function kT(){}function Gd(n){return n==null?kT:function(){return this.querySelector(n)}}function xT(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 Eh(n){return n==null?[]:Array.isArray(n)?n:Array.from(n)}function vT(){return[]}function Nh(n){return n==null?vT:function(){return this.querySelectorAll(n)}}function CT(n){return function(){return Eh(n.apply(this,arguments))}}function ST(n){typeof n=="function"?n=CT(n):n=Nh(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 Vh(n){return function(){return this.matches(n)}}function Bh(n){return function(e){return e.matches(n)}}var ET=Array.prototype.find;function NT(n){return function(){return ET.call(this.children,n)}}function VT(){return this.firstElementChild}function BT(n){return this.select(n==null?VT:NT(typeof n=="function"?n:Bh(n)))}var TT=Array.prototype.filter;function RT(){return Array.from(this.children)}function IT(n){return function(){return TT.call(this.children,n)}}function AT(n){return this.selectAll(n==null?RT:IT(typeof n=="function"?n:Bh(n)))}function LT(n){typeof n!="function"&&(n=Vh(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 Th(n){return new Array(n.length)}function OT(){return new $t(this._enter||this._groups.map(Th),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 $T(n){return function(){return n}}function ZT(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 MT(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 FT(n){return n.__data__}function PT(n,e){if(!arguments.length)return Array.from(this,FT);var r=e?MT:ZT,o=this._parents,a=this._groups;typeof n!="function"&&(n=$T(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,_=zT(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 zT(n){return typeof n=="object"&&"length"in n?n:Array.from(n)}function DT(){return new $t(this._exit||this._groups.map(Th),this._parents)}function WT(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 GT(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 UT(){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 HT(n){n||(n=XT);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 XT(n,e){return n<e?-1:n>e?1:n>=e?0:NaN}function jT(){var n=arguments[0];return arguments[0]=this,n.apply(null,arguments),this}function YT(){return Array.from(this)}function KT(){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 JT(){let n=0;for(const e of this)++n;return n}function qT(){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 e2(n){return function(){this.removeAttribute(n)}}function t2(n){return function(){this.removeAttributeNS(n.space,n.local)}}function n2(n,e){return function(){this.setAttribute(n,e)}}function r2(n,e){return function(){this.setAttributeNS(n.space,n.local,e)}}function o2(n,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(n):this.setAttribute(n,r)}}function a2(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 i2(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?t2:e2:typeof e=="function"?r.local?a2:o2:r.local?r2:n2)(r,e))}function Rh(n){return n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView}function l2(n){return function(){this.style.removeProperty(n)}}function s2(n,e,r){return function(){this.style.setProperty(n,e,r)}}function c2(n,e,r){return function(){var o=e.apply(this,arguments);o==null?this.style.removeProperty(n):this.style.setProperty(n,o,r)}}function d2(n,e,r){return arguments.length>1?this.each((e==null?l2:typeof e=="function"?c2:s2)(n,e,r??"")):oa(this.node(),n)}function oa(n,e){return n.style.getPropertyValue(e)||Rh(n).getComputedStyle(n,null).getPropertyValue(e)}function u2(n){return function(){delete this[n]}}function p2(n,e){return function(){this[n]=e}}function f2(n,e){return function(){var r=e.apply(this,arguments);r==null?delete this[n]:this[n]=r}}function m2(n,e){return arguments.length>1?this.each((e==null?u2:typeof e=="function"?f2:p2)(n,e)):this.node()[n]}function Ih(n){return n.trim().split(/^|\s+/)}function Ud(n){return n.classList||new Ah(n)}function Ah(n){this._node=n,this._names=Ih(n.getAttribute("class")||"")}Ah.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 Lh(n,e){for(var r=Ud(n),o=-1,a=e.length;++o<a;)r.add(e[o])}function Oh(n,e){for(var r=Ud(n),o=-1,a=e.length;++o<a;)r.remove(e[o])}function h2(n){return function(){Lh(this,n)}}function g2(n){return function(){Oh(this,n)}}function y2(n,e){return function(){(e.apply(this,arguments)?Lh:Oh)(this,n)}}function b2(n,e){var r=Ih(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"?y2:e?h2:g2)(r,e))}function _2(){this.textContent=""}function w2(n){return function(){this.textContent=n}}function k2(n){return function(){var e=n.apply(this,arguments);this.textContent=e??""}}function x2(n){return arguments.length?this.each(n==null?_2:(typeof n=="function"?k2:w2)(n)):this.node().textContent}function v2(){this.innerHTML=""}function C2(n){return function(){this.innerHTML=n}}function S2(n){return function(){var e=n.apply(this,arguments);this.innerHTML=e??""}}function E2(n){return arguments.length?this.each(n==null?v2:(typeof n=="function"?S2:C2)(n)):this.node().innerHTML}function N2(){this.nextSibling&&this.parentNode.appendChild(this)}function V2(){return this.each(N2)}function B2(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function T2(){return this.each(B2)}function R2(n){var e=typeof n=="function"?n:Sh(n);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function I2(){return null}function A2(n,e){var r=typeof n=="function"?n:Sh(n),o=e==null?I2:typeof e=="function"?e:Gd(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),o.apply(this,arguments)||null)})}function L2(){var n=this.parentNode;n&&n.removeChild(this)}function O2(){return this.each(L2)}function $2(){var n=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(n,this.nextSibling):n}function Z2(){var n=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(n,this.nextSibling):n}function M2(n){return this.select(n?Z2:$2)}function F2(n){return arguments.length?this.property("__data__",n):this.node().__data__}function P2(n){return function(e){n.call(this,e,this.__data__)}}function z2(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 D2(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 W2(n,e,r){return function(){var o=this.__on,a,l=P2(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 G2(n,e,r){var o=z2(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?W2:D2,a=0;a<l;++a)this.each(d(o[a],e,r));return this}function $h(n,e,r){var o=Rh(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 U2(n,e){return function(){return $h(this,n,e)}}function H2(n,e){return function(){return $h(this,n,e.apply(this,arguments))}}function X2(n,e){return this.each((typeof e=="function"?H2:U2)(n,e))}function*j2(){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 Y2(){return this}$t.prototype=vi.prototype={constructor:$t,select:xT,selectAll:ST,selectChild:BT,selectChildren:AT,filter:LT,data:PT,enter:OT,exit:DT,join:WT,merge:GT,selection:Y2,order:UT,sort:HT,call:jT,nodes:YT,node:KT,size:JT,empty:qT,each:QT,attr:i2,style:d2,property:m2,classed:b2,text:x2,html:E2,raise:V2,lower:T2,append:R2,insert:A2,remove:O2,clone:M2,datum:F2,on:G2,dispatch:X2,[Symbol.iterator]:j2};function Zh(n){return typeof n=="string"?new $t([[document.querySelector(n)]],[document.documentElement]):new $t([[n]],Hd)}function K2(n){return typeof n=="string"?new $t([document.querySelectorAll(n)],[document.documentElement]):new $t([Eh(n)],Hd)}function Xd(n,e,r){n.prototype=e.prototype=r,r.constructor=n}function Mh(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*",J2=/^#([0-9a-f]{3,8})$/,q2=new RegExp(`^rgb\\(${aa},${aa},${aa}\\)$`),Q2=new RegExp(`^rgb\\(${er},${er},${er}\\)$`),eR=new RegExp(`^rgba\\(${aa},${aa},${aa},${Ei}\\)$`),tR=new RegExp(`^rgba\\(${er},${er},${er},${Ei}\\)$`),nR=new RegExp(`^hsl\\(${Ei},${er},${er}\\)$`),rR=new RegExp(`^hsla\\(${Ei},${er},${er},${Ei}\\)$`),Fh={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:Ph,formatHex:Ph,formatHex8:oR,formatHsl:aR,formatRgb:zh,toString:zh});function Ph(){return this.rgb().formatHex()}function oR(){return this.rgb().formatHex8()}function aR(){return Hh(this).formatHsl()}function zh(){return this.rgb().formatRgb()}function yo(n){var e,r;return n=(n+"").trim().toLowerCase(),(e=J2.exec(n))?(r=e[1].length,e=parseInt(e[1],16),r===6?Dh(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=q2.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=eR.exec(n))?os(e[1],e[2],e[3],e[4]):(e=tR.exec(n))?os(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=nR.exec(n))?Uh(e[1],e[2]/100,e[3]/100,1):(e=rR.exec(n))?Uh(e[1],e[2]/100,e[3]/100,e[4]):Fh.hasOwnProperty(n)?Dh(Fh[n]):n==="transparent"?new Gt(NaN,NaN,NaN,0):null}function Dh(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 iR(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?iR(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,Mh(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:Wh,formatHex:Wh,formatHex8:lR,formatRgb:Gh,toString:Gh}));function Wh(){return`#${_o(this.r)}${_o(this.g)}${_o(this.b)}`}function lR(){return`#${_o(this.r)}${_o(this.g)}${_o(this.b)}${_o((isNaN(this.opacity)?1:this.opacity)*255)}`}function Gh(){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 Uh(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 Hh(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 sR(n,e,r,o){return arguments.length===1?Hh(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,sR,Mh(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(Xh(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("}${Xh(this.h)}, ${is(this.s)*100}%, ${is(this.l)*100}%${n===1?")":`, ${n})`}`}}));function Xh(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 cR(n,e){return function(r){return n+r*e}}function dR(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 uR(n){return(n=+n)==1?jh:function(e,r){return r-e?dR(e,r,n):Kd(isNaN(e)?r:e)}}function jh(n,e){var r=e-n;return r?cR(n,r):Kd(isNaN(n)?e:n)}const ls=function n(e){var r=uR(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=jh(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 pR(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 fR(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function mR(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 hR(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 gR(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 yR(n){return function(){return n}}function bR(n){return function(e){return n(e)+""}}function Yh(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]?bR(u[0].x):yR(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):Yh:e instanceof yo?ls:e instanceof Date?hR:fR(e)?pR:Array.isArray(e)?mR:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?gR:Nn)(n,e)}function _R(n,e){return n=+n,e=+e,function(r){return Math.round(n*(1-r)+e*r)}}var Kh=180/Math.PI,Jh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function qh(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)*Kh,skewX:Math.atan(u)*Kh,scaleX:c,scaleY:d}}var ss;function wR(n){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(n+"");return e.isIdentity?Jh:qh(e.a,e.b,e.c,e.d,e.e,e.f)}function kR(n){return n==null||(ss||(ss=document.createElementNS("http://www.w3.org/2000/svg","g")),ss.setAttribute("transform",n),!(n=ss.transform.baseVal.consolidate()))?Jh:(n=n.matrix,qh(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 xR=Qh(wR,"px, ","px)","deg)"),vR=Qh(kR,", ",")",")"),ia=0,Ni=0,Vi=0,eg=1e3,cs,Bi,ds=0,wo=0,us=0,Ti=typeof performance=="object"&&performance.now?performance:Date,tg=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(n){setTimeout(n,17)};function eu(){return wo||(tg(CR),wo=Ti.now()+us)}function CR(){wo=0}function ps(){this._call=this._time=this._next=null}ps.prototype=ng.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 ng(n,e,r){var o=new ps;return o.restart(n,e,r),o}function SR(){eu(),++ia;for(var n=cs,e;n;)(e=wo-n._time)>=0&&n._call.call(void 0,e),n=n._next;--ia}function rg(){wo=(ds=Ti.now())+us,ia=Ni=0;try{SR()}finally{ia=0,NR(),wo=0}}function ER(){var n=Ti.now(),e=n-ds;e>eg&&(us-=e,ds=n)}function NR(){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(rg,n-Ti.now()-us)),Vi&&(Vi=clearInterval(Vi))):(Vi||(ds=Ti.now(),Vi=setInterval(ER,eg)),ia=1,tg(rg))}}function og(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 VR=xh("start","end","cancel","interrupt"),BR=[],ag=0,ig=1,nu=2,fs=3,lg=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;TR(n,r,{name:e,index:o,group:a,on:VR,tween:BR,time:l.time,delay:l.delay,duration:l.duration,ease:l.ease,timer:null,state:ag})}function ou(n,e){var r=Vn(n,e);if(r.state>ag)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 TR(n,e,r){var o=n.__transition,a;o[e]=r,r.timer=ng(l,0,r.time);function l(f){r.state=ig,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!==ig)return u();for(m in o)if(_=o[m],_.name===r.name){if(_.state===fs)return og(c);_.state===lg?(_.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(og(function(){r.state===fs&&(r.state=lg,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 RR(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 IR(n){return this.each(function(){RR(this,n)})}function AR(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 LR(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 OR(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?AR:LR)(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 sg(n,e){var r;return(typeof e=="number"?Nn:e instanceof yo?ls:(r=yo(e))?(e=r,ls):Yh)(n,e)}function $R(n){return function(){this.removeAttribute(n)}}function ZR(n){return function(){this.removeAttributeNS(n.space,n.local)}}function MR(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 FR(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 PR(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 zR(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 DR(n,e){var r=ts(n),o=r==="transform"?vR:sg;return this.attrTween(n,typeof e=="function"?(r.local?zR:PR)(r,o,au(this,"attr."+n,e)):e==null?(r.local?ZR:$R)(r):(r.local?FR:MR)(r,o,e))}function WR(n,e){return function(r){this.setAttribute(n,e.call(this,r))}}function GR(n,e){return function(r){this.setAttributeNS(n.space,n.local,e.call(this,r))}}function UR(n,e){var r,o;function a(){var l=e.apply(this,arguments);return l!==o&&(r=(o=l)&&GR(n,l)),r}return a._value=e,a}function HR(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 XR(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?UR:HR)(o,e))}function jR(n,e){return function(){ou(this,n).delay=+e.apply(this,arguments)}}function YR(n,e){return e=+e,function(){ou(this,n).delay=e}}function KR(n){var e=this._id;return arguments.length?this.each((typeof n=="function"?jR:YR)(e,n)):Vn(this.node(),e).delay}function JR(n,e){return function(){tr(this,n).duration=+e.apply(this,arguments)}}function qR(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"?JR:qR)(e,n)):Vn(this.node(),e).duration}function eI(n,e){if(typeof e!="function")throw new Error;return function(){tr(this,n).ease=e}}function tI(n){var e=this._id;return arguments.length?this.each(eI(e,n)):Vn(this.node(),e).ease}function nI(n,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;tr(this,n).ease=r}}function rI(n){if(typeof n!="function")throw new Error;return this.each(nI(this._id,n))}function oI(n){typeof n!="function"&&(n=Vh(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 aI(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 iI(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 lI(n,e,r){var o,a,l=iI(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 sI(n,e){var r=this._id;return arguments.length<2?Vn(this.node(),r).on.on(n):this.each(lI(r,n,e))}function cI(n){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==n)return;e&&e.removeChild(this)}}function dI(){return this.on("end.remove",cI(this._id))}function uI(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 pI(n){var e=this._name,r=this._id;typeof n!="function"&&(n=Nh(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 fI=vi.prototype.constructor;function mI(){return new fI(this._groups,this._parents)}function hI(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 cg(n){return function(){this.style.removeProperty(n)}}function gI(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 yI(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 bI(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=cg(e)):void 0;(f!==r||a!==m)&&(o=(r=f).copy()).on(c,a=m),u.on=o}}function _I(n,e,r){var o=(n+="")=="transform"?xR:sg;return e==null?this.styleTween(n,hI(n,o)).on("end.style."+n,cg(n)):typeof e=="function"?this.styleTween(n,yI(n,o,au(this,"style."+n,e))).each(bI(this._id,n)):this.styleTween(n,gI(n,o,e),r).on("end.style."+n,null)}function wI(n,e,r){return function(o){this.style.setProperty(n,e.call(this,o),r)}}function kI(n,e,r){var o,a;function l(){var c=e.apply(this,arguments);return c!==a&&(o=(a=c)&&wI(n,c,r)),o}return l._value=e,l}function xI(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,kI(n,e,r??""))}function vI(n){return function(){this.textContent=n}}function CI(n){return function(){var e=n(this);this.textContent=e??""}}function SI(n){return this.tween("text",typeof n=="function"?CI(au(this,"text",n)):vI(n==null?"":n+""))}function EI(n){return function(e){this.textContent=n.call(this,e)}}function NI(n){var e,r;function o(){var a=n.apply(this,arguments);return a!==r&&(e=(r=a)&&EI(a)),e}return o._value=n,o}function VI(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,NI(n))}function BI(){for(var n=this._name,e=this._id,r=dg(),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 TI(){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 RI=0;function pr(n,e,r,o){this._groups=n,this._parents=e,this._name=r,this._id=o}function dg(){return++RI}var fr=vi.prototype;pr.prototype={constructor:pr,select:uI,selectAll:pI,selectChild:fr.selectChild,selectChildren:fr.selectChildren,filter:oI,merge:aI,selection:mI,transition:BI,call:fr.call,nodes:fr.nodes,node:fr.node,size:fr.size,empty:fr.empty,each:fr.each,on:sI,attr:DR,attrTween:XR,style:_I,styleTween:xI,text:SI,textTween:VI,remove:dI,tween:OR,delay:KR,duration:QR,ease:tI,easeVarying:rI,end:TI,[Symbol.iterator]:fr[Symbol.iterator]};function II(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}var AI={time:null,delay:0,duration:250,ease:II};function LI(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 OI(n){var e,r;n instanceof pr?(e=n._id,n=n._name):(e=dg(),(r=AI).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||LI(u,e));return new pr(o,this._parents,n,e)}vi.prototype.interrupt=IR,vi.prototype.transition=OI;function $I(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 ZI(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 MI(n){return function(e){return e.replace(/[0-9]/g,function(r){return n[+r]})}}var FI=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ys(n){if(!(e=FI.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 PI(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 ug;function zI(n,e){var r=gs(n,e);if(!r)return n+"";var o=r[0],a=r[1],l=a-(ug=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 pg(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 fg={"%":(n,e)=>(n*100).toFixed(e),b:n=>Math.round(n).toString(2),c:n=>n+"",d:$I,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)=>pg(n*100,e),r:pg,s:zI,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function mg(n){return n}var hg=Array.prototype.map,gg=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function DI(n){var e=n.grouping===void 0||n.thousands===void 0?mg:ZI(hg.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?mg:MI(hg.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"):fg[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=fg[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=PI(v)),F&&+v==0&&C!=="+"&&(F=!1),L=(F?C==="("?C:d:C==="-"||C==="("?"":C)+L,V=(A==="s"?gg[8+ug/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=gg[8+C/3];return function($){return _(N*$)+T}}return{format:f,formatPrefix:m}}var bs,yg,bg;WI({thousands:",",grouping:[3],currency:["$",""]});function WI(n){return bs=DI(n),yg=bs.format,bg=bs.formatPrefix,bs}function GI(n){return Math.max(0,-la(Math.abs(n)))}function UI(n,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(la(e)/3)))*3-la(Math.abs(n)))}function HI(n,e){return n=Math.abs(n),e=Math.abs(e)-n,Math.max(0,la(e)-la(n))+1}function _g(n,e){switch(arguments.length){case 0:break;case 1:this.range(n);break;default:this.range(e).domain(n);break}return this}function XI(n){return function(){return n}}function jI(n){return+n}var wg=[0,1];function sa(n){return n}function lu(n,e){return(e-=n=+n)?function(r){return(r-n)/e}:XI(isNaN(e)?NaN:.5)}function YI(n,e){var r;return n>e&&(r=n,n=e,e=r),function(o){return Math.max(n,Math.min(e,o))}}function KI(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 JI(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=yh(n,d,1,o)-1;return l[u](a[u](d))}}function kg(n,e){return e.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function xg(){var n=wg,e=wg,r=Qd,o,a,l,c=sa,d,u,f;function m(){var y=Math.min(n.length,e.length);return c!==sa&&(c=YI(n[0],n[y-1])),d=y>2?JI:KI,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,jI),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=_R,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 qI(){return xg()(sa,sa)}function QI(n,e,r,o){var a=lT(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=UI(a,c))&&(o.precision=l),bg(o,c)}case"":case"e":case"g":case"p":case"r":{o.precision==null&&!isNaN(l=HI(a,Math.max(Math.abs(n),Math.abs(e))))&&(o.precision=l-(o.type==="e"));break}case"f":case"%":{o.precision==null&&!isNaN(l=GI(a))&&(o.precision=l-(o.type==="%")*2);break}}return yg(o)}function vg(n){var e=n.domain;return n.ticks=function(r){var o=e();return bh(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=qI();return n.copy=function(){return kg(n,su())},_g.apply(n,arguments),vg(n)}function Cg(n){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/n))}}function Sg(n){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*n}}function eA(n){var e=1,r=n(Cg(e),Sg(e));return r.constant=function(o){return arguments.length?n(Cg(e=+o),Sg(e)):e},vg(r)}function cu(){var n=eA(xg());return n.copy=function(){return kg(n,cu()).constant(n.constant())},_g.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"),Zh(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=Zh("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
|
+
`,Jx=["innerHTML"],qx={class:"dropdown-list-item__title-container"},Qx={class:"dropdown-list-item__title text-s"},eC={key:0,class:"dropdown-list-item__description text-description"},tC={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?Kx:Yx);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,Jx)):t.createCommentVNode("",!0),c[1]||(c[1]=t.createTextVNode()),t.createElementVNode("div",qx,[t.createElementVNode("div",Qx,t.toDisplayString(l.option.label),1),c[0]||(c[0]=t.createTextVNode()),l.option.description?(t.openBlock(),t.createElementBlock("div",eC,t.toDisplayString(l.option.description),1)):t.createCommentVNode("",!0)]),c[2]||(c[2]=t.createTextVNode()),!e.useCheckbox&&e.isSelected?(t.openBlock(),t.createElementBlock("div",tC)):t.createCommentVNode("",!0)],2))}});function _m(n){return n()}function _d(n){let e=!1;return function(...r){e||(requestAnimationFrame(()=>{n(...r),e=!1}),e=!0)}}function wm(n){return new Promise(e=>setTimeout(e,n))}function km(n,e){const r=setTimeout(n,e);return()=>{clearTimeout(r)}}function xm(n,e){return n=Math.ceil(n),e=Math.floor(e),Math.floor(Math.random()*(e-n))+n}function nC(n){let e="";for(let r=0;r<n;r++)e+=String.fromCharCode(xm(65,91));return e}function Cm(n){return function(e){return 1-n(1-e)}}function rC(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 oC(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 Sm(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 aC(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 iC=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))}}),lC="_icon_1ugxm_2",sC={icon:lC},cC={$style:sC},qt=st(iC,[["__cssModules",cC]]),dC=["onKeyup"],uC=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,I=>{if(I){const V=I.getBoundingClientRect();m.optionsHeight=V.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(I=>Vl(I.value,l.value))),C=t.computed(()=>sr(o.options??[]).map((I,V)=>({...I,index:V,isSelected:V===_.value,isActive:V===m.activeIndex}))),N=t.computed(()=>o.loading||o.options===void 0),B=t.computed(()=>{var I;return((I=C.value.find(V=>Vl(V.value,l.value)))==null?void 0:I.label)??(o.options===void 0?"...":"")});oi(c,I=>{const V=I.top+I.height+3;V+m.optionsHeight>I.clientHeight?g.top=I.top-m.optionsHeight-3+"px":g.top=V+"px",g.left=I.left+"px",g.width=I.width+"px"});const $=I=>{var V;l.value=I,m.open=!1,(V=c==null?void 0:c.value)==null||V.focus()};function W(){a("click")}const E=I=>{var V,P;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(I.code))I.preventDefault();else return;if(I.target===f.value&&I.code==="Enter"){W();return}const{open:X,activeIndex:S}=m;if(!X&&I.target===u.value){I.code==="Enter"&&(m.open=!0);return}I.code==="Escape"&&(m.open=!1,(V=c.value)==null||V.focus());const R=t.unref(C),{length:A}=R;if(!A)return;I.code==="Enter"&&$((P=R.find(L=>L.index===S))==null?void 0:P.value);const M=R.findIndex(L=>L.index===S)??-1,v=I.code==="ArrowDown"?1:I.code==="ArrowUp"?-1:0,w=Math.abs(M+v+A)%A;m.activeIndex=C.value[w].index??-1},D=I=>{var V,P;const X=I.relatedTarget;!((V=c.value)!=null&&V.contains(X))&&!((P=d.value)!=null&&P.contains(X))&&(m.open=!1)};return(I,V)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"root",ref:c,class:t.normalizeClass([{disabled:I.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(B.value),41,dC),V[1]||(V[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:V[0]||(V[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),V[2]||(V[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,X)=>(t.openBlock(),t.createBlock(po,{key:X,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 Em(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 pC={key:0},fC={inheritAttrs:!1},Rl=t.defineComponent({...fC,__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 Em(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",pC,[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))}}),mC={name:"PlBtnPrimary"},Il=t.defineComponent({...mC,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(Rl,t.mergeProps({class:"pl-btn-primary"},e),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:3},16))}}),hC={name:"PlBtnAccent"},gC=t.defineComponent({...hC,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(Rl,t.mergeProps({class:"pl-btn-accent"},e),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:3},16))}}),yC={name:"PlBtnDanger"},bC=t.defineComponent({...yC,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(Rl,t.mergeProps({class:"pl-btn-danger"},e),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:3},16))}}),_C={name:"PlBtnSecondary"},ai=t.defineComponent({..._C,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(Rl,t.mergeProps(e,{class:"pl-btn-secondary"}),{default:t.withCtx(()=>[t.renderSlot(r.$slots,"default")]),_:3},16))}}),wC=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))}}),kC="_icon_1ugxm_2",xC={icon:kC},CC={$style:xC},at=st(wC,[["__cssModules",CC]]),vC={key:0},SC={name:"PlBtnGhost"},cr=t.defineComponent({...SC,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 Em(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",vC,[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))}}),EC=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(ai,t.mergeProps({round:"",hover:r.value},e),null,16,["hover"]),a[2]||(a[2]=t.createTextVNode()),t.renderSlot(o.$slots,"default")],34))}});function NC(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 Ct(n,e){if(n!=null)return e(n)}function VC(n){return Array.isArray(n)?n:[n]}function BC(n,e,...r){r.forEach(o=>{n[o]=e[o]})}function Al(n,e){ot(document,"click",r=>{document.contains(r.target)&&(VC(n).map(o=>o.value).filter(o=>!!o).some(o=>o==null?void 0:o.contains(r.target))||e())})}const TC={},RC={class:"beak",width:"5",height:"9",viewBox:"0 0 3 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function IC(n,e){return t.openBlock(),t.createElementBlock("svg",RC,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 AC=st(TC,[["render",IC]]),wd=new Map,LC={name:"PlTooltip"},ct=t.defineComponent({...LC,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,B=>{requestAnimationFrame(()=>{l.tooltipOpen=B})});let c=()=>{};const d=Sm(()=>window.dispatchEvent(new CustomEvent("adjust")),1e3),u=()=>{l.open=!0;for(const[B,$]of wd.entries())B!==o&&$()},f=()=>{l.open=!1,r("tooltip:close")},m=async()=>{a.hide||(d(),l.over=!0,c(),await wm(100),l.over&&u())},g=()=>{l.over=!1,c=km(()=>{l.over||f()},a.closeDelay)};t.watch(()=>a.hide,B=>{B&&f()});const y=t.ref(),_=t.ref(),C=NC(y,t.toRef(a));Al([y,_],()=>f());const N=t.computed(()=>({"--pl-tooltip-max-width":a.maxWidth}));return t.onUnmounted(()=>{wd.delete(o)}),(B,$)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(B.element),t.mergeProps(B.$attrs,{ref_key:"rootRef",ref:y,onClick:m,onMouseover:m,onMouseleave:g}),{default:t.withCtx(()=>[t.renderSlot(B.$slots,"default"),$[1]||($[1]=t.createTextVNode()),B.$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",B.position]),style:t.normalizeStyle(N.value),onMouseover:m,onMouseleave:g},[t.createElementVNode("div",null,[t.renderSlot(B.$slots,"tooltip")]),$[0]||($[0]=t.createTextVNode()),t.createVNode(AC)],38)],4)):t.createCommentVNode("",!0)]),_:3})])):t.createCommentVNode("",!0)]),_:3},16))}}),OC={},$C={class:"inner-border"};function ZC(n,e,r,o,a,l){return t.openBlock(),t.createElementBlock("div",$C,[t.renderSlot(n.$slots,"default")])}const MC=st(OC,[["render",ZC]]),FC={key:0},PC=["tabindex","onKeydown","onClick"],zC={key:1,class:"pl-btn-group__helper"},DC={key:2,class:"pl-btn-group__error"},WC={name:"PlBtnGroup"},Nm=t.defineComponent({...WC,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",FC,[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(MC,{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,PC))),128))]),_:1}),u[2]||(u[2]=t.createTextVNode()),d.helper?(t.openBlock(),t.createElementBlock("div",zC,t.toDisplayString(d.helper),1)):d.error?(t.openBlock(),t.createElementBlock("div",DC,t.toDisplayString(d.error),1)):t.createCommentVNode("",!0)],2))}});function GC(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 UC="_component_1prpy_1",HC="_container_1prpy_15",XC="_error_1prpy_69",kd={component:UC,container:HC,error:XC},jC={key:0},YC=["placeholder"],KC=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=GC(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",jC,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,YC),[[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))}}),JC={inheritAttrs:!1},qC={class:"double-contour"};function QC(n,e,r,o,a,l){return t.openBlock(),t.createElementBlock("div",qC,[t.createElementVNode("div",t.normalizeProps(t.guardReactiveProps(n.$attrs)),[t.renderSlot(n.$slots,"default")],16)])}const dr=st(JC,[["render",QC]]);function Vm(n){t.onMounted(n),t.onUpdated(n)}const xd=new WeakMap,Cd=new ResizeObserver(n=>{for(const e of n)Ct(xd.get(e.target),r=>r(e))});function Bm(n,e){xd.set(n,e),Cd.unobserve(n),Cd.observe(n)}function Tm(n){Cd.unobserve(n),xd.delete(n)}const ev=8,Rm=4;function Kn(n,e="label"){const r=new Set;Vm(()=>{Ct(n==null?void 0:n.value,o=>{const a=o.querySelector(e);a&&(r.add(a),Bm(a,()=>{const l=_m(()=>a.getBoundingClientRect().width+jo(ev,c=>Number.isNaN(c)?Rm:c+Rm));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=>Tm(o))})}function tv(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 Im(n,e){return t.computed(()=>tv(n.value,e))}const nv=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))}}),rv="_icon_1ugxm_2",ov={icon:rv},av={$style:ov},Or=st(nv,[["__cssModules",av]]),iv={class:"pl-text-field__envelope"},lv={key:0,ref:"label"},sv={key:0,class:"required-icon"},cv={key:1,class:"pl-text-field__prefix"},dv=["disabled","placeholder","type"],uv={key:0,class:"pl-text-field__error"},pv={key:1,class:"pl-text-field__helper"},fv={name:"PlTextField"},fo=t.defineComponent({...fv,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(I){if(d.cached=void 0,o.parse)try{r.value=o.parse(I)}catch(V){d.cached={error:V instanceof Error?V.message:String(V),value:I}}else r.value=I}}),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=Im(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 I=[];return o.error&&I.push(o.error),d.cached&&I.push(d.cached.error),y.value.isValid||I.push(...y.value.errors),I}),B=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 I;return(I=l.value)==null?void 0:I.focus()};return Kn(a),(I,V)=>(t.openBlock(),t.createElementBlock("div",iv,[t.createElementVNode("div",{ref_key:"rootRef",ref:a,class:t.normalizeClass(["pl-text-field",{error:B.value,disabled:I.disabled,dashed:I.dashed,nonEmpty:C.value}])},[I.label?(t.openBlock(),t.createElementBlock("label",lv,[I.required?(t.openBlock(),t.createElementBlock("i",sv)):t.createCommentVNode("",!0),V[1]||(V[1]=t.createTextVNode()),t.createElementVNode("span",null,t.toDisplayString(I.label),1),V[2]||(V[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(I.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)],512)):t.createCommentVNode("",!0),V[5]||(V[5]=t.createTextVNode()),I.prefix?(t.openBlock(),t.createElementBlock("div",cv,t.toDisplayString(I.prefix),1)):t.createCommentVNode("",!0),V[6]||(V[6]=t.createTextVNode()),t.withDirectives(t.createElementVNode("input",{ref_key:"inputRef",ref:l,"onUpdate:modelValue":V[0]||(V[0]=P=>u.value=P),disabled:I.disabled,placeholder:I.placeholder||"...",type:f.value,spellcheck:"false",onFocusout:E},null,40,dv),[[t.vModelDynamic,u.value]]),V[7]||(V[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),V[3]||(V[3]=t.createTextVNode()),I.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),V[4]||(V[4]=t.createTextVNode()),t.renderSlot(I.$slots,"append")]),V[8]||(V[8]=t.createTextVNode()),t.createVNode(dr,{class:"pl-text-field__contour"})],2),V[9]||(V[9]=t.createTextVNode()),B.value?(t.openBlock(),t.createElementBlock("div",uv,t.toDisplayString(N.value.join(" ")),1)):I.helper?(t.openBlock(),t.createElementBlock("div",pv,t.toDisplayString(I.helper),1)):t.createCommentVNode("",!0)]))}}),mv=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))}}),hv="_icon_1ugxm_2",gv={icon:hv},yv={$style:gv},Yo=st(mv,[["__cssModules",yv]]),bv=["disabled","placeholder"],_v=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,bv),[[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))}}),wv="_component_pz0lo_1",kv="_clear_pz0lo_35",xv={component:wv,clear:kv},Cv={$style:xv},Am=st(_v,[["__cssModules",Cv]]),vv={class:"ui-text-area__envelope"},Sv={key:0,ref:"label"},Ev={key:0,class:"required-icon"},Nv=["readonly","rows","disabled","placeholder"],Vv={class:"ui-text-area__append"},Bv={key:0,class:"ui-text-area__error"},Tv={key:1,class:"ui-text-area__helper"},Rv={name:"PlTextArea"},Iv=t.defineComponent({...Rv,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=Im(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",vv,[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",Sv,[_.required?(t.openBlock(),t.createElementBlock("i",Ev)):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,Nv),[[t.vModelText,d.value]]),C[4]||(C[4]=t.createTextVNode()),t.createElementVNode("div",Vv,[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",Bv,t.toDisplayString(m.value.join(" ")),1)):_.helper?(t.openBlock(),t.createElementBlock("div",Tv,t.toDisplayString(_.helper),1)):t.createCommentVNode("",!0)]))}});function Lm(n){return n!==null&&typeof n=="object"}function ft(n,e){return Lm(n)&&Lm(e)?Object.keys(n).length!==Object.keys(e).length?!1:Object.keys(n).every(r=>ft(n[r],e[r])):n===e}function Om(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=lm(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 $m(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 Zm(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=Zm(n,e);if(d==="visible")return;const u=f=>{const m=d==="floor"?c-(a-l):c;n.scrollTop=o+f*(m-o)};$m(n,e)||vm({duration:r.duration||100,timing:Cm(f=>f),draw:u})}function vd(n,e,r,o){return n.addEventListener(e,r,o),function(){n.removeEventListener(e,r)}}function Av(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)]))}}),Lv=["tabindex"],Ov={class:"pl-dropdown__container"},$v={class:"pl-dropdown__field"},Zv=["disabled","placeholder"],Mv={key:0,class:"input-value"},Fv={class:"pl-dropdown__controls"},Pv={key:2,class:"arrow-icon arrow-icon-default"},zv={key:0},Dv={key:0,class:"required-icon"},Wv={key:0,class:"nothing-found"},Gv={key:0,class:"pl-dropdown__error"},Uv={key:1,class:"pl-dropdown__helper"},Hv={key:2,class:"pl-dropdown__helper"},Xv={name:"PlDropdown"},$r=t.defineComponent({...Xv,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(M=>ft(M.value,o.modelValue)),M=>M<0?0:M),m=()=>u.activeIndex=f(),g=t.computed(()=>o.options===void 0),y=t.computed(()=>g.value?!0:o.disabled),_=t.computed(()=>(o.options??[]).findIndex(M=>ft(M.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((M,v)=>({...M,index:v,isSelected:v===_.value,isActive:v===u.activeIndex}))),B=t.computed(()=>{const M=t.unref(N).find(v=>ft(v.value,o.modelValue));return(M==null?void 0:M.label)||o.modelValue}),$=t.computed(()=>!u.open&&o.modelValue?"":o.modelValue?String(B.value):o.placeholder),W=t.computed(()=>o.modelValue!==void 0&&o.modelValue!==null),E=t.computed(()=>{const M=N.value;return u.search?M.filter(v=>{const w=u.search.toLowerCase();return v.label.toLowerCase().includes(w)||v.description&&v.description.toLowerCase().includes(w)?!0:typeof v.value=="string"?v.value.toLowerCase().includes(w):v.value===u.search}):M}),D=t.computed(()=>y.value?void 0:"0"),I=M=>{var v;r("update:modelValue",M),u.search="",u.open=!1,(v=l==null?void 0:l.value)==null||v.focus()},V=()=>r("update:modelValue",void 0),P=()=>{var M;return(M=c.value)==null?void 0:M.focus()},X=()=>{u.open=!u.open,u.open||(u.search="")},S=()=>u.open=!0,R=M=>{var v,w,L;const G=M.relatedTarget;!((v=l.value)!=null&&v.contains(G))&&!((L=(w=d.value)==null?void 0:w.listRef)!=null&&L.contains(G))&&(u.search="",u.open=!1)},A=M=>{var v,w;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(M.code))M.preventDefault();else return;const{open:L,activeIndex:G}=u;if(!L){M.code==="Enter"&&(u.open=!0);return}M.code==="Escape"&&(u.open=!1,(v=l.value)==null||v.focus());const Z=t.unref(E),{length:j}=Z;if(!j)return;M.code==="Enter"&&I((w=Z.find(ve=>ve.index===G))==null?void 0:w.value);const ee=Z.findIndex(ve=>ve.index===G)??-1,ce=M.code==="ArrowDown"?1:M.code==="ArrowUp"?-1:0,ye=Math.abs(ee+ce+j)%j;u.activeIndex=E.value[ye].index??-1};return Kn(l),t.watch(()=>o.modelValue,m,{immediate:!0}),t.watch(()=>u.open,M=>{var v;return M?(v=c.value)==null?void 0:v.focus():""}),t.watchPostEffect(()=>{var M;u.search,u.activeIndex>=0&&u.open&&((M=d.value)==null||M.scrollIntoActive())}),(M,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:M.error,disabled:y.value}]),onKeydown:A,onFocusout:R},[t.createElementVNode("div",Ov,[t.createElementVNode("div",$v,[t.withDirectives(t.createElementVNode("input",{ref_key:"input",ref:c,"onUpdate:modelValue":v[0]||(v[0]=w=>u.search=w),type:"text",tabindex:"-1",disabled:y.value,placeholder:$.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:S},null,40,Zv),[[t.vModelText,u.search]]),v[4]||(v[4]=t.createTextVNode()),u.open?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",Mv,[t.createVNode(Ll,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(B.value),1)]),_:1})])),v[5]||(v[5]=t.createTextVNode()),t.createElementVNode("div",Fv,[g.value?(t.openBlock(),t.createBlock(t.unref(at),{key:0,name:"loading"})):t.createCommentVNode("",!0),v[1]||(v[1]=t.createTextVNode()),M.clearable&&W.value?(t.openBlock(),t.createBlock(t.unref(Or),{key:1,name:"delete-clear",onClick:t.withModifiers(V,["stop"])})):t.createCommentVNode("",!0),v[2]||(v[2]=t.createTextVNode()),t.renderSlot(M.$slots,"append"),v[3]||(v[3]=t.createTextVNode()),t.createElementVNode("div",{class:"pl-dropdown__arrow-wrapper",onClick:t.withModifiers(X,["stop"])},[M.arrowIconLarge?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["arrow-icon",[`icon-24 ${M.arrowIconLarge}`]])},null,2)):M.arrowIcon?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["arrow-icon",[`icon-16 ${M.arrowIcon}`]])},null,2)):(t.openBlock(),t.createElementBlock("div",Pv))])])]),v[9]||(v[9]=t.createTextVNode()),M.label?(t.openBlock(),t.createElementBlock("label",zv,[M.required?(t.openBlock(),t.createElementBlock("i",Dv)):t.createCommentVNode("",!0),v[6]||(v[6]=t.createTextVNode()),t.createElementVNode("span",null,t.toDisplayString(M.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(M.$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,(w,L)=>(t.openBlock(),t.createBlock(po,{key:L,option:w,"is-selected":w.isSelected,"is-hovered":w.isActive,size:M.optionSize,onClick:t.withModifiers(G=>I(w.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",Wv,"Nothing found"))]),_:1},8,["root"])):t.createCommentVNode("",!0),v[11]||(v[11]=t.createTextVNode()),t.createVNode(dr,{class:"pl-dropdown__contour"})])],42,Lv),v[12]||(v[12]=t.createTextVNode()),C.value?(t.openBlock(),t.createElementBlock("div",Gv,t.toDisplayString(C.value),1)):g.value&&M.loadingOptionsHelper?(t.openBlock(),t.createElementBlock("div",Uv,t.toDisplayString(M.loadingOptionsHelper),1)):M.helper?(t.openBlock(),t.createElementBlock("div",Hv,t.toDisplayString(M.helper),1)):t.createCommentVNode("",!0)]))}}),jv={name:"PlDropdownRef"},Yv=t.defineComponent({...jv,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 Kv(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 Jv={class:"resizable-input"},qv=["placeholder","value","disabled"],Qv=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",Jv,[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,qv)]))}}),eS={class:"dropdown-tab-item__title text-caps13"},tS=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",eS,t.toDisplayString(r.value),1)],2))}}),nS={class:"pl-line-dropdown__prefix"},rS={class:"pl-line-dropdown__icon-wrapper"},oS={class:"pl-line-dropdown__icon"},aS={key:0,class:"pl-line-dropdown__no-item"},iS={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 R=[];return a.isOpen&&R.push("open"),o.disabled&&R.push("disabled"),R.join(" ")}),u=t.ref(""),f=Kv(t.toRef(o,"options"),u),m=t.computed(()=>!!(o.clearable&&a.isOpen&&o.modelValue&&g.value)),g=t.computed(()=>{if(o.modelValue){const R=C();if(R!==-1)return sr(o.options)[R].label}return""}),y=t.ref(g.value);t.watch(g,R=>{y.value=R});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,R=>{g.value!==R?u.value=R:u.value=""}),t.watch(()=>a.isOpen,R=>{var A;R&&l.value&&((A=l.value.querySelector("input"))==null||A.focus(),t.nextTick(()=>P()))}),t.watch(()=>o.modelValue,()=>N(),{immediate:!0});function C(){return o.options.findIndex(R=>ft(R.value,o.modelValue))}function N(){a.activeOption=jo(f.value.findIndex(R=>ft(R.value,o.modelValue)),R=>R<0?0:R)}function B(){u.value=""}function $(){o.disabled?a.isOpen=!1:t.nextTick(()=>{a.isOpen=!a.isOpen})}function W(){o.mode==="list"&&(a.isOpen=!1)}function E(R){R&&(r("update:modelValue",R.value),W(),B())}function D(R){return ft(R.value,o.modelValue)}const I=R=>{var A,M;const v=R.relatedTarget;!((A=l.value)!=null&&A.contains(v))&&!((M=c.value)!=null&&M.contains(v))&&(u.value="",a.isOpen=!1)};function V(R){const{activeOption:A}=a;if(!a.isOpen&&R.code==="Enter"){a.isOpen=!0;return}const{length:M}=f.value;if(!M)return;["ArrowDown","ArrowUp","Enter"].includes(R.code)&&R.preventDefault(),R.code==="Enter"&&E(f.value[A]);const v=R.code==="ArrowDown"?1:R.code==="ArrowUp"?-1:0;a.activeOption=Math.abs(A+v+M)%M,requestAnimationFrame(P)}function P(){const R=c.value;R&&Ct(R.querySelector(".hovered-item"),A=>{o.mode==="list"?Ol(R,A):A.scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}function X(){r("update:modelValue",void 0)}const S=t.reactive({top:"0px",left:"0px"});return t.watch(c,R=>{if(R){const A=R.getBoundingClientRect();a.optionsHeight=A.height,window.dispatchEvent(new CustomEvent("adjust"))}}),oi(l,R=>{const A=R.top+R.height+2;A+a.optionsHeight>R.clientHeight?S.top=R.top-a.optionsHeight-2+"px":S.top=A+"px",S.left=R.left+"px"}),(R,A)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"container",ref:l,tabindex:"0",class:t.normalizeClass([d.value,"pl-line-dropdown uc-pointer"]),onKeydown:V,onFocusout:I,onClick:$},[t.createElementVNode("div",nS,t.toDisplayString(o==null?void 0:o.prefix),1),A[6]||(A[6]=t.createTextVNode()),t.createVNode(Qv,{modelValue:y.value,"onUpdate:modelValue":A[0]||(A[0]=M=>y.value=M),placeholder:_.value,disabled:o.disabled,class:"pl-line-dropdown__input"},null,8,["modelValue","placeholder","disabled"]),A[7]||(A[7]=t.createTextVNode()),t.createElementVNode("div",rS,[t.withDirectives(t.createElementVNode("div",oS,null,512),[[t.vShow,!m.value]]),A[1]||(A[1]=t.createTextVNode()),t.withDirectives(t.createElementVNode("div",{class:"pl-line-dropdown__icon-clear",onClick:X},null,512),[[t.vShow,m.value]])]),A[8]||(A[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:I},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(f),(M,v)=>t.renderSlot(R.$slots,"item",{key:v,item:M,textItem:"text",isSelected:D(M),isHovered:a.activeOption==v,onClick:t.withModifiers(w=>E(M),["stop"])},()=>[t.createVNode(po,{option:M,"text-item":"text","is-selected":D(M),"is-hovered":a.activeOption==v,size:"medium",onClick:t.withModifiers(w=>E(M),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),A[3]||(A[3]=t.createTextVNode()),t.unref(f).length===0?(t.openBlock(),t.createElementBlock("div",aS,A[2]||(A[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:I},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(f),(M,v)=>t.renderSlot(R.$slots,"item",{key:v,item:M,isSelected:D(M),isHovered:a.activeOption==v,onClick:t.withModifiers(w=>E(M),["stop"])},()=>[t.createVNode(tS,{option:M,"is-selected":D(M),"is-hovered":a.activeOption==v,onClick:t.withModifiers(w=>E(M),["stop"])},null,8,["option","is-selected","is-hovered","onClick"])])),128)),A[5]||(A[5]=t.createTextVNode()),t.unref(f).length===0?(t.openBlock(),t.createElementBlock("div",iS,A[4]||(A[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))}}),lS={class:"ui-dropdown__envelope"},sS=["tabindex"],cS={class:"ui-dropdown__container"},dS={class:"ui-dropdown__field"},uS=["disabled","placeholder"],pS={class:"ui-dropdown__controls"},fS={key:0},mS={key:0,class:"required-icon"},hS={key:0,class:"nothing-found"},gS={key:0,class:"ui-dropdown__error"},yS={key:1,class:"ui-dropdown__helper"},bS={key:2,class:"ui-dropdown__helper"},_S={name:"PlDropdown"},wS=t.defineComponent({..._S,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,w)=>({...v,index:w,isSelected:w===_.value,isActive:w===u.activeIndex}))),B=t.computed(()=>{const v=t.unref(N).find(w=>ft(w.value,o.modelValue));return(v==null?void 0:v.label)||o.modelValue}),$=t.computed(()=>!u.open&&o.modelValue?"":o.modelValue?String(B.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(w=>{const L=u.search.toLowerCase();return w.label.toLowerCase().includes(L)||w.description&&w.description.toLowerCase().includes(L)?!0:typeof w.value=="string"?w.value.toLowerCase().includes(L):w.value===u.search}):v}),D=t.computed(()=>y.value?void 0:"0"),I=v=>{var w;r("update:modelValue",v),u.search="",u.open=!1,(w=l==null?void 0:l.value)==null||w.focus()},V=()=>r("update:modelValue",void 0),P=()=>{var v;return(v=d.value)==null?void 0:v.focus()},X=()=>u.open=!u.open,S=()=>u.open=!0,R=v=>{var w;(w=l==null?void 0:l.value)!=null&&w.contains(v.relatedTarget)||(u.search="",u.open=!1)},A=()=>{const v=c.value;v&&Ct(v.querySelector(".hovered-item"),w=>{Ol(v,w)})},M=v=>{var w,L;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(v.code))v.preventDefault();else return;const{open:G,activeIndex:Z}=u;if(!G){v.code==="Enter"&&(u.open=!0);return}v.code==="Escape"&&(u.open=!1,(w=l.value)==null||w.focus());const j=t.unref(E),{length:ee}=j;if(!ee)return;v.code==="Enter"&&I((L=j.find(He=>He.index===Z))==null?void 0:L.value);const ce=j.findIndex(He=>He.index===Z)??-1,ye=v.code==="ArrowDown"?1:v.code==="ArrowUp"?-1:0,ve=Math.abs(ce+ye+ee)%ee;u.activeIndex=E.value[ve].index??-1};return Kn(l),t.watch(()=>o.modelValue,m,{immediate:!0}),t.watch(()=>u.open,v=>{var w;return v?(w=d.value)==null?void 0:w.focus():""}),t.watchPostEffect(()=>{u.search,u.activeIndex>=0&&u.open&&A()}),(v,w)=>(t.openBlock(),t.createElementBlock("div",lS,[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:M,onFocusout:R},[t.createElementVNode("div",cS,[t.createElementVNode("div",dS,[t.withDirectives(t.createElementVNode("input",{ref_key:"input",ref:d,"onUpdate:modelValue":w[0]||(w[0]=L=>u.search=L),type:"text",tabindex:"-1",disabled:y.value,placeholder:$.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:S},null,40,uS),[[t.vModelText,u.search]]),w[4]||(w[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(B.value),1)]),_:1})])),w[5]||(w[5]=t.createTextVNode()),t.createElementVNode("div",pS,[g.value?(t.openBlock(),t.createBlock(t.unref(at),{key:0,name:"loading"})):t.createCommentVNode("",!0),w[1]||(w[1]=t.createTextVNode()),v.clearable&&W.value?(t.openBlock(),t.createBlock(t.unref(Or),{key:1,name:"delete-clear",onClick:t.withModifiers(V,["stop"])})):t.createCommentVNode("",!0),w[2]||(w[2]=t.createTextVNode()),t.renderSlot(v.$slots,"append"),w[3]||(w[3]=t.createTextVNode()),v.arrowIconLarge?(t.openBlock(),t.createElementBlock("div",{key:2,class:t.normalizeClass(["arrow-icon",[`icon-24 ${v.arrowIconLarge}`]]),onClick:t.withModifiers(X,["stop"])},null,2)):v.arrowIcon?(t.openBlock(),t.createElementBlock("div",{key:3,class:t.normalizeClass(["arrow-icon",[`icon-16 ${v.arrowIcon}`]]),onClick:t.withModifiers(X,["stop"])},null,2)):(t.openBlock(),t.createElementBlock("div",{key:4,class:"arrow-icon arrow-icon-default",onClick:t.withModifiers(X,["stop"])}))])]),w[9]||(w[9]=t.createTextVNode()),v.label?(t.openBlock(),t.createElementBlock("label",fS,[v.required?(t.openBlock(),t.createElementBlock("i",mS)):t.createCommentVNode("",!0),w[6]||(w[6]=t.createTextVNode()),t.createElementVNode("span",null,t.toDisplayString(v.label),1),w[7]||(w[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),w[10]||(w[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,(L,G)=>(t.openBlock(),t.createBlock(po,{key:G,option:L,"is-selected":L.isSelected,"is-hovered":L.isActive,size:v.optionSize,onClick:t.withModifiers(Z=>I(L.value),["stop"])},null,8,["option","is-selected","is-hovered","size","onClick"]))),128)),w[8]||(w[8]=t.createTextVNode()),E.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",hS,"Nothing found"))],512)):t.createCommentVNode("",!0),w[11]||(w[11]=t.createTextVNode()),t.createVNode(dr,{class:"ui-dropdown__contour"})])],42,sS),w[12]||(w[12]=t.createTextVNode()),C.value?(t.openBlock(),t.createElementBlock("div",gS,t.toDisplayString(C.value),1)):g.value&&v.loadingOptionsHelper?(t.openBlock(),t.createElementBlock("div",yS,t.toDisplayString(v.loadingOptionsHelper),1)):v.helper?(t.openBlock(),t.createElementBlock("div",bS,t.toDisplayString(v.helper),1)):t.createCommentVNode("",!0)]))}}),kS={key:0,class:"ui-progress-bar"},xS={class:"ui-progress-bar__messages d-flex align-center pl-6 pr-6"},CS={class:"ui-progress-bar__message flex-grow-1"},vS={class:"ui-progress-bar__percent"},SS=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",kS,[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",xS,[t.createElementVNode("div",CS,t.toDisplayString(r.value),1),a[0]||(a[0]=t.createTextVNode()),t.createElementVNode("div",vS,t.toDisplayString(o.progress+"%"),1)])])):t.createCommentVNode("",!0)}}),ES={class:"mi-number-field__main-wrapper d-flex"},NS={key:0,class:"text-description"},VS=["disabled","placeholder"],BS={key:0,class:"mi-number-field__hint text-description"},TS=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(V){return V===void 0?"":String(+V)}function d(V){return V==="."||V===","||V==="-"}function u(V){if(V==="")return;if(d(V))return 0;let P=V;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,V=>{parseFloat(f.value)!==V&&(f.value=c(V))});const g=/^[-−–+]?(\d+)?[\\.,]?(\d+)?$/,y=t.computed({get(){return f.value},set(V){const P=u(V);P===void 0||V.match(g)&&!isNaN(P)?(f.value=V,!e.updateOnEnterOrClickOutside&&!d(V)&&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 V=[];e.errorMessage&&V.push(e.errorMessage);const P=m.value;if(P!==void 0&&isNaN(P))V.push("Value is not a number");else if(e.validate&&P!==void 0){const X=e.validate(P);X&&V.push(X)}else e.minValue!==void 0&&P!==void 0&&P<e.minValue&&V.push(`Value must be higher than ${e.minValue}`),e.maxValue!==void 0&&P!==void 0&&P>e.maxValue&&V.push(`Value must be less than ${e.maxValue}`);return V=[...V],V.join(" ")}),B=t.computed(()=>{const V=m.value;return e.maxValue!==void 0&&V!==void 0?V>=e.maxValue:!1}),$=t.computed(()=>{const V=m.value;return e.minValue!==void 0&&V!==void 0?V<=e.minValue:!1});function W(){const V=m.value;if(!B.value){let P;V===void 0?P=e.minValue?e.minValue:0:P=(V||0)+e.step,r.value=e.maxValue!==void 0?Math.min(e.maxValue,P):P}}function E(){const V=m.value;if(!$.value){let P;V===void 0?P=0:P=+(V||0)-e.step,r.value=e.minValue!==void 0?Math.max(e.minValue,P):P}}function D(V){var P,X;e.updateOnEnterOrClickOutside&&(V.code==="Escape"&&(f.value=c(r.value),(P=l.value)==null||P.blur()),V.code==="Enter"&&((X=l.value)==null||X.blur())),V.code==="Enter"&&(f.value=String(r.value)),["ArrowDown","ArrowUp"].includes(V.code)&&V.preventDefault(),e.useIncrementButtons&&V.code==="ArrowUp"&&W(),e.useIncrementButtons&&V.code==="ArrowDown"&&E()}const I=V=>{V.detail>1&&V.preventDefault()};return(V,P)=>(t.openBlock(),t.createElementBlock("div",{ref_key:"root",ref:o,class:t.normalizeClass([{error:!!N.value.trim(),disabled:V.disabled},"mi-number-field d-flex-column"]),onKeydown:P[3]||(P[3]=X=>D(X))},[t.createElementVNode("div",ES,[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:!V.useIncrementButtons}])},[V.label?(t.openBlock(),t.createElementBlock("label",NS,[t.createTextVNode(t.toDisplayString(V.label)+" ",1),t.unref(a).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),P[4]||(P[4]=t.createTextVNode()),t.withDirectives(t.createElementVNode("input",{ref_key:"input",ref:l,"onUpdate:modelValue":P[0]||(P[0]=X=>y.value=X),disabled:V.disabled,placeholder:V.placeholder,class:"text-s flex-grow",onFocusin:P[1]||(P[1]=X=>_.value=!0),onFocusout:P[2]||(P[2]=X=>{_.value=!1,C()})},null,40,VS),[[t.vModelText,y.value]])],2),P[9]||(P[9]=t.createTextVNode()),V.useIncrementButtons?(t.openBlock(),t.createElementBlock("div",{key:0,class:"mi-number-field__icons d-flex-column",onMousedown:I},[t.createElementVNode("div",{class:t.normalizeClass([{disabled:B.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",BS,t.toDisplayString(N.value),1)):t.createCommentVNode("",!0)],34))}}),RS={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",RS,[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))}}),IS=["tabindex"],AS={class:"pl-dropdown-multi__container"},LS={class:"pl-dropdown-multi__field"},OS=["disabled","placeholder"],$S={key:0,class:"chips-container"},ZS={class:"pl-dropdown-multi__controls"},MS={key:0},FS={key:0,class:"required-icon"},PS={class:"pl-dropdown-multi__open-chips-container"},zS={key:0,class:"nothing-found"},DS={key:0,class:"pl-dropdown-multi__error"},WS={key:1,class:"pl-dropdown-multi__helper"},GS={name:"PlDropdownMulti"},Zl=t.defineComponent({...GS,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(R=>ft(R.value,S))).filter(S=>S!==void 0)),C=t.computed(()=>{const S=t.unref(m),R=t.unref(y);return(f.search?R.filter(A=>{const M=f.search.toLowerCase();return A.label.toLowerCase().includes(M)?!0:typeof A.value=="string"?A.value.toLowerCase().includes(M):A.value===f.search}):[...R]).map(A=>({...A,selected:Om(S,A.value)}))}),N=t.computed(()=>l.options===void 0),B=t.computed(()=>N.value?!0:l.disabled),$=t.computed(()=>B.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 R;const A=t.unref(m);o(Om(A,S)?A.filter(M=>!ft(M,S)):[...A,S]),f.search="",(R=c==null?void 0:c.value)==null||R.focus()},D=S=>o(t.unref(m).filter(R=>!ft(R,S))),I=()=>{var S;return(S=d.value)==null?void 0:S.focus()},V=()=>{f.open=!f.open,f.open||(f.search="")},P=S=>{var R,A,M;const v=S.relatedTarget;!((R=c.value)!=null&&R.contains(v))&&!((M=(A=u.value)==null?void 0:A.listRef)!=null&&M.contains(v))&&(f.search="",f.open=!1)},X=S=>{var R;const{open:A,activeOption:M}=f;if(!A){S.code==="Enter"&&(f.open=!0);return}S.code==="Escape"&&(f.open=!1,(R=c.value)==null||R.focus());const v=t.unref(C),{length:w}=v;if(!w)return;["ArrowDown","ArrowUp","Enter"].includes(S.code)&&S.preventDefault(),S.code==="Enter"&&E(v[M].value);const L=S.code==="ArrowDown"?1:S.code==="ArrowUp"?-1:0;f.activeOption=Math.abs(M+L+w)%w,requestAnimationFrame(()=>{var G;return(G=u.value)==null?void 0:G.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,R)=>(t.openBlock(),t.createElementBlock("div",{class:"pl-dropdown-multi__envelope",onClick:I},[t.createElementVNode("div",{ref_key:"rootRef",ref:c,tabindex:$.value,class:t.normalizeClass(["pl-dropdown-multi",{open:f.open,error:S.error,disabled:B.value}]),onKeydown:X,onFocusout:P},[t.createElementVNode("div",AS,[t.createElementVNode("div",LS,[t.withDirectives(t.createElementVNode("input",{ref_key:"input",ref:d,"onUpdate:modelValue":R[0]||(R[0]=A=>f.search=A),type:"text",tabindex:"-1",disabled:B.value,placeholder:g.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:R[1]||(R[1]=A=>f.open=!0)},null,40,OS),[[t.vModelText,f.search]]),R[6]||(R[6]=t.createTextVNode()),f.open?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",$S,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_.value,(A,M)=>(t.openBlock(),t.createBlock(t.unref(Ed),{key:M,closeable:"",small:"",onClick:R[2]||(R[2]=t.withModifiers(v=>f.open=!0,["stop"])),onClose:v=>D(A.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(A.label||A.value),1)]),_:2},1032,["onClose"]))),128))])),R[7]||(R[7]=t.createTextVNode()),t.createElementVNode("div",ZS,[N.value?(t.openBlock(),t.createBlock(t.unref(at),{key:0,name:"loading"})):t.createCommentVNode("",!0),R[4]||(R[4]=t.createTextVNode()),t.renderSlot(S.$slots,"append"),R[5]||(R[5]=t.createTextVNode()),t.createElementVNode("div",{class:"pl-dropdown-multi__arrow-wrapper",onClick:t.withModifiers(V,["stop"])},R[3]||(R[3]=[t.createElementVNode("div",{class:"arrow-icon arrow-icon-default"},null,-1)]))])]),R[12]||(R[12]=t.createTextVNode()),S.label?(t.openBlock(),t.createElementBlock("label",MS,[S.required?(t.openBlock(),t.createElementBlock("i",FS)):t.createCommentVNode("",!0),R[8]||(R[8]=t.createTextVNode()),t.createElementVNode("span",null,t.toDisplayString(S.label),1),R[9]||(R[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),R[13]||(R[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",PS,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(_.value,(A,M)=>(t.openBlock(),t.createBlock(t.unref(Ed),{key:M,closeable:"",small:"",onClose:v=>D(A.value)},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(A.label||A.value),1)]),_:2},1032,["onClose"]))),128))]),R[10]||(R[10]=t.createTextVNode()),(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(C.value,(A,M)=>(t.openBlock(),t.createBlock(po,{key:M,option:A,"text-item":"text","is-selected":A.selected,"is-hovered":f.activeOption==M,size:"medium","use-checkbox":"",onClick:t.withModifiers(v=>E(A.value),["stop"])},null,8,["option","is-selected","is-hovered","onClick"]))),128)),R[11]||(R[11]=t.createTextVNode()),C.value.length?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",zS,"Nothing found"))]),_:1},8,["root"])):t.createCommentVNode("",!0),R[14]||(R[14]=t.createTextVNode()),t.createVNode(dr,{class:"pl-dropdown-multi__contour"})])],42,IS),R[15]||(R[15]=t.createTextVNode()),S.error?(t.openBlock(),t.createElementBlock("div",DS,t.toDisplayString(S.error),1)):S.helper?(t.openBlock(),t.createElementBlock("div",WS,t.toDisplayString(S.helper),1)):t.createCommentVNode("",!0)]))}}),US=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))}}),HS={name:"PlCheckbox"},Vd=t.defineComponent({...HS,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))}}),XS={key:0},jS=["onClick"],YS={name:"PlCheckboxGroup"},KS=t.defineComponent({...YS,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",XS,[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,jS)]))),128))],2))}}),JS="_component_tupwt_1",qS={component:JS},QS={};function eE(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 tE={$style:qS},Mm=st(QS,[["render",eE],["__cssModules",tE]]),nE={key:1,class:"pl-dialog-modal__title"},rE={inheritAttrs:!1},Bd=t.defineComponent({...rE,__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(Mm,{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",nE,[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})]))}}),oE=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}))}}),aE={key:0,class:"pl-slide-modal__title"},iE={class:"pl-slide-modal__title-content"},lE={class:"pl-slide-modal__content"},sE={key:1,class:"pl-slide-modal__actions"},cE={name:"PlSlideModal",inheritAttrs:!1},Ko=t.defineComponent({...cE,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(oE,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",aE,[t.createElementVNode("span",iE,[t.renderSlot(d.$slots,"title")])])):t.createCommentVNode("",!0),u[4]||(u[4]=t.createTextVNode()),t.createElementVNode("div",lE,[t.renderSlot(d.$slots,"default")]),u[5]||(u[5]=t.createTextVNode()),t.unref(r).actions?(t.openBlock(),t.createElementBlock("div",sE,[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)]))}}),dE={key:0,class:"label"},uE={name:"PlToggleSwitch"},Ml=t.defineComponent({...uE,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",dE,t.toDisplayString(e.label),1)):t.createCommentVNode("",!0)],34))}});function Fm(n){return t.getCurrentScope()?(t.onScopeDispose(n),!0):!1}const Pm=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const zm=()=>{};function pE(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 fE(n,e={}){let r,o,a=zm;const l=c=>{clearTimeout(c),a(),a=zm};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 mE(n,e=200,r={}){return pE(fE(e,r),n)}function hE(n,e=200,r={}){const o=t.ref(n.value),a=mE(()=>{o.value=n.value},e,r);return t.watch(n,()=>a()),o}function gE(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,Pm&&u()),Fm(d),{isPending:t.readonly(a),start:u,stop:d}}function yE(n,e,r){return t.watch(n,(o,a,l)=>{o&&e(o,a,l)},{...r,once:!1})}function bE(n,e,r={}){const{immediate:o=!0}=r,{start:a}=gE(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&&Pm&&d(),Fm(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"]),_E=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 Dm=Jo;function wE(n){Dm=n}function Fl(){return Dm}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}},kE=[];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",ii=n=>n.status==="valid",li=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 Wm(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 si,ci;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 Gm=(n,e)=>{if(ii(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(li(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 Gm(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(li(a)?a:Promise.resolve(a));return Gm(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 vn.create(this,this._def)}promise(){return ta.create(this,this._def)}or(e){return fi.create([this,e],this._def)}and(e){return mi.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 _i({...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 wi({...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 ki.create(this,e)}readonly(){return xi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const xE=/^c[^\s-]{8,}$/i,CE=/^[0-9a-z]+$/,vE=/^[0-9A-HJKMNP-TV-Z]{26}$/,SE=/^[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,EE=/^[a-z0-9_-]{21}$/i,NE=/^[-+]?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)?)??$/,VE=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,BE="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Ad;const TE=/^(?:(?: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])$/,RE=/^(([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})))$/,IE=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Um="((\\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])))",AE=new RegExp(`^${Um}$`);function Hm(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 LE(n){return new RegExp(`^${Hm(n)}$`)}function Xm(n){let e=`${Um}T${Hm(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 OE(n,e){return!!((e==="v4"||!e)&&TE.test(n)||(e==="v6"||!e)&&RE.test(n))}class Cn 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")VE.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(BE,"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")SE.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")EE.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")xE.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")CE.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")vE.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"?Xm(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"?AE.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{code:ne.invalid_string,validation:"date",message:a.message}),r.dirty()):a.kind==="time"?LE(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"?NE.test(e.data)||(o=this._getOrReturnCtx(e,o),ie(o,{validation:"duration",code:ne.invalid_string,message:a.message}),r.dirty()):a.kind==="ip"?OE(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"?IE.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 Cn({...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 Cn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Cn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Cn({...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}}Cn.create=n=>{var e;return new Cn({checks:[],typeName:xe.ZodString,coerce:(e=n==null?void 0:n.coerce)!==null&&e!==void 0?e:!1,...Te(n)})};function $E(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"?$E(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 di 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)}}di.create=n=>new di({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 ui 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)}}ui.create=n=>new ui({typeName:xe.ZodUndefined,...Te(n)});class pi 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)}}pi.create=n=>new pi({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 vn 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 vn({...this._def,minLength:{value:e,message:he.toString(r)}})}max(e,r){return new vn({...this._def,maxLength:{value:e,message:he.toString(r)}})}length(e,r){return new vn({...this._def,exactLength:{value:e,message:he.toString(r)}})}nonempty(e){return this.min(1,e)}}vn.create=(n,e)=>new vn({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 vn?new vn({...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 jm(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 fi 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}}fi.create=(n,e)=>new fi({options:n,typeName:xe.ZodUnion,...Te(e)});const Pr=n=>n instanceof gi?Pr(n.schema):n instanceof Sn?Pr(n.innerType()):n instanceof yi?[n.value]:n instanceof zr?n.options:n instanceof bi?Ge.objectValues(n.enum):n instanceof _i?Pr(n._def.innerType):n instanceof ui?[void 0]:n instanceof pi?[null]:n instanceof Qn?[void 0,...Pr(n.unwrap())]:n instanceof Dr?[null,...Pr(n.unwrap())]:n instanceof Od||n instanceof xi?Pr(n.unwrap()):n instanceof wi?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 mi 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}))}}mi.create=(n,e,r)=>new mi({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 hi 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 hi({keyType:e,valueType:r,typeName:xe.ZodRecord,...Te(o)}):new hi({keyType:Cn.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 gi 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})}}gi.create=(n,e)=>new gi({getter:n,typeName:xe.ZodLazy,...Te(e)});class yi 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}}yi.create=(n,e)=>new yi({value:n,typeName:xe.ZodLiteral,...Te(e)});function jm(n,e){return new zr({values:n,typeName:xe.ZodEnum,...Te(e)})}class zr extends Le{constructor(){super(...arguments),si.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,si)||Wm(this,si,new Set(this._def.values)),!Dl(this,si).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})}}si=new WeakMap,zr.create=jm;class bi extends Le{constructor(){super(...arguments),ci.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,ci)||Wm(this,ci,new Set(Ge.getValidEnumValues(this._def.values))),!Dl(this,ci).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}}ci=new WeakMap,bi.create=(n,e)=>new bi({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(!ii(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=>ii(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 _i 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}}_i.create=(n,e)=>new _i({innerType:n,typeName:xe.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Te(e)});class wi 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 li(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}}wi.create=(n,e)=>new wi({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 ZE=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 ki 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 ki({in:e,out:r,typeName:xe.ZodPipeline})}}class xi extends Le{_parse(e){const r=this._def.innerType._parse(e),o=a=>(ii(a)&&(a.value=Object.freeze(a.value)),a);return li(r)?r.then(a=>o(a)):o(r)}unwrap(){return this._def.innerType}}xi.create=(n,e)=>new xi({innerType:n,typeName:xe.ZodReadonly,...Te(e)});function Ym(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 ME={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 FE=(n,e={message:`Input not instance of ${n.name}`})=>Ym(r=>r instanceof n,e),Km=Cn.create,Jm=Mr.create,PE=Xl.create,zE=Fr.create,qm=di.create,DE=mo.create,WE=Wl.create,GE=ui.create,UE=pi.create,HE=qo.create,XE=ho.create,jE=ur.create,YE=Gl.create,KE=vn.create,JE=it.create,qE=it.strictCreate,QE=fi.create,eN=Ul.create,tN=mi.create,nN=qn.create,rN=hi.create,oN=Hl.create,aN=go.create,iN=ea.create,lN=gi.create,sN=yi.create,cN=zr.create,dN=bi.create,uN=ta.create,Qm=Sn.create,pN=Qn.create,fN=Dr.create,mN=Sn.createWithPreprocess,hN=ki.create;var Pe=Object.freeze({__proto__:null,defaultErrorMap:Jo,setErrorMap:wE,getErrorMap:Fl,makeIssue:Pl,EMPTY_PATH:kE,addIssueToContext:ie,ParseStatus:Vt,INVALID:Se,DIRTY:zl,OK:Ot,isAborted:Rd,isDirty:Id,isValid:ii,isAsync:li,get util(){return Ge},get objectUtil(){return Td},ZodParsedType:se,getParsedType:Zr,ZodType:Le,datetimeRegex:Xm,ZodString:Cn,ZodNumber:Mr,ZodBigInt:Fr,ZodBoolean:di,ZodDate:mo,ZodSymbol:Wl,ZodUndefined:ui,ZodNull:pi,ZodAny:qo,ZodUnknown:ho,ZodNever:ur,ZodVoid:Gl,ZodArray:vn,ZodObject:it,ZodUnion:fi,ZodDiscriminatedUnion:Ul,ZodIntersection:mi,ZodTuple:qn,ZodRecord:hi,ZodMap:Hl,ZodSet:go,ZodFunction:ea,ZodLazy:gi,ZodLiteral:yi,ZodEnum:zr,ZodNativeEnum:bi,ZodPromise:ta,ZodEffects:Sn,ZodTransformer:Sn,ZodOptional:Qn,ZodNullable:Dr,ZodDefault:_i,ZodCatch:wi,ZodNaN:Xl,BRAND:ZE,ZodBranded:Od,ZodPipeline:ki,ZodReadonly:xi,custom:Ym,Schema:Le,ZodSchema:Le,late:ME,get ZodFirstPartyTypeKind(){return xe},coerce:{string:n=>Cn.create({...n,coerce:!0}),number:n=>Mr.create({...n,coerce:!0}),boolean:n=>di.create({...n,coerce:!0}),bigint:n=>Fr.create({...n,coerce:!0}),date:n=>mo.create({...n,coerce:!0})},any:HE,array:KE,bigint:zE,boolean:qm,date:DE,discriminatedUnion:eN,effect:Qm,enum:cN,function:iN,instanceof:FE,intersection:tN,lazy:lN,literal:sN,map:oN,nan:PE,nativeEnum:dN,never:jE,null:UE,nullable:fN,number:Jm,object:JE,oboolean:()=>qm().optional(),onumber:()=>Jm().optional(),optional:pN,ostring:()=>Km().optional(),pipeline:hN,preprocess:mN,promise:uN,record:rN,set:aN,strictObject:qE,string:Km,symbol:WE,transformer:Qm,tuple:nN,undefined:GE,union:QE,unknown:XE,void:YE,NEVER:Se,ZodIssueCode:ne,quotelessJson:_E,ZodError:Qt});function gN(n){throw new Error("Unexpected object: "+n)}const eh="upload://upload/",th="index://index/";function yN(n){return n.startsWith(eh)}function bN(n){return n.startsWith(th)}function nh(n){if(bN(n)){const e=n.slice(th.length);return JSON.parse(decodeURIComponent(e)).path}else if(yN(n)){const e=n.slice(eh.length);return JSON.parse(decodeURIComponent(e)).localPath}gN(n)}function _N(n){return n.replace(/^.*[\\/]/,"")}function wN(n){return _N(nh(n))}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");var rh={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)}}})(rh,rh.exports);const kN=Pe.object({type:Pe.literal("PlError"),name:Pe.string(),message:Pe.string(),fullMessage:Pe.string().optional(),stack:Pe.string().optional()}),xN=kN.extend({cause:Pe.lazy(()=>jl).optional(),errors:Pe.lazy(()=>jl.array()).optional()}),CN=Pe.object({type:Pe.literal("StandardError"),name:Pe.string(),message:Pe.string(),stack:Pe.string().optional()}),vN=CN.extend({cause:Pe.lazy(()=>jl).optional(),errors:Pe.lazy(()=>jl.array()).optional()}),jl=Pe.union([vN,xN]),SN=Pe.object({name:Pe.string(),message:Pe.string(),fullMessage:Pe.string().optional(),stack:Pe.string().optional()}),oh=SN.extend({cause:Pe.lazy(()=>oh).optional(),errors:Pe.lazy(()=>oh.array()).optional()});function EN(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 NN=Pe.object({type:Pe.string(),importance:Pe.number().optional(),id:Pe.string().optional(),label:Pe.string()});Pe.array(NN);const VN="1.30.37";function Wr(){return EN({sdkVersion:VN})}const BN="[==PROGRESS==]";function TN(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function RN(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??BN,m=new TextDecoder().decode(u.data).replace(new RegExp(`${TN(f)}`,"g"),"");if(c=Object.assign(c,{lines:c.lines+m,lastOffset:u.newOffset,finished:!u.live}),u.newOffset>=u.size)break}}const a=bE(()=>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 yE(()=>{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 IN={key:0},AN={class:"pl-log-view__copy"},LN={key:1,class:"pl-log-view__error"},ON={name:"PlLogView"},ah=t.defineComponent({...ON,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=RN(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??Kw(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 B=N.target;l.value=B.scrollTop+20>=B.scrollHeight-B.offsetHeight};return(N,B)=>(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",IN,[t.createElementVNode("span",null,t.toDisplayString(N.label),1),B[0]||(B[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),B[2]||(B[2]=t.createTextVNode()),t.createVNode(dr,{class:"pl-log-view__contour"}),B[3]||(B[3]=t.createTextVNode()),t.createElementVNode("div",AN,[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"]),B[1]||(B[1]=t.createTextVNode())]),_:1})]),B[4]||(B[4]=t.createTextVNode()),u.value?(t.openBlock(),t.createElementBlock("div",LN,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))}}),$N="_component_1ukal_1",ZN="_tab_1ukal_14",MN="_disabled_1ukal_27",FN="_active_1ukal_56",PN="_topLine_1ukal_69",na={component:$N,tab:ZN,disabled:MN,active:FN,topLine:PN},zN=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"]))}}),DN={name:"PlTabs"},WN=t.defineComponent({...DN,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(zN,{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))}}),GN=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))}}),UN="_compact_rhd5u_16",HN="_content_rhd5u_20",XN={compact:UN,content:HN},jN={$style:XN},ih=st(GN,[["__cssModules",jN]]),YN=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))}}),KN=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}))}}),JN={class:"pl-accordion-section"},qN=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=om(),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",JN,[t.createVNode(t.unref(ih),{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(KN,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})]))}}),QN="_content_e3dof_2",eV="_separator_e3dof_19",tV="_chevron_e3dof_27",nV="_down_e3dof_31",rV={content:QN,separator:eV,chevron:tV,down:nV},oV={$style:rV},aV=st(qN,[["__cssModules",oV]]),lh=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)}}),iV={key:0,class:"progress-cell__infinity-loader"},lV={class:"progress-cell__body"},sV={class:"progress-cell__stage text-s"},cV={class:"progress-cell__percentage text-s d-flex align-center justify-end"},sh=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",iV,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",lV,[t.createElementVNode("div",sV,t.toDisplayString(l.error?l.error:l.step),1),c[2]||(c[2]=t.createTextVNode()),t.createElementVNode("div",cV,[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=fk(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 dV=["tabindex"],uV={class:"pl-autocomplete__container"},pV={class:"pl-autocomplete__field"},fV=["disabled","placeholder"],mV={key:0,class:"input-value"},hV={class:"pl-autocomplete__controls"},gV={key:2,class:"arrow-icon arrow-icon-default"},yV={key:0},bV={key:0,class:"required-icon"},_V={key:0,class:"nothing-found"},wV={key:0,class:"pl-autocomplete__error"},kV={key:1,class:"pl-autocomplete__helper"},xV={key:2,class:"pl-autocomplete__helper"},CV={name:"PlAutocomplete"},vV=t.defineComponent({...CV,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(Z=>ft(Z.value,e.value)),Z=>Z<0?0:Z),m=()=>u.activeIndex=f(),g=t.ref([]),y=t.ref(),_=t.computed(()=>sr(g.value).map((Z,j)=>({...Z,index:j,isSelected:j===$.value,isActive:j===u.activeIndex}))),C=t.ref(!0),N=t.ref(!1),B=t.computed(()=>r.disabled),$=t.computed(()=>g.value.findIndex(Z=>ft(Z.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 Z=t.unref(y),j=t.unref(_),ee=Z??j.find(ce=>ft(ce.value,e.value))??j.find(ce=>ft(ce.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),I=t.computed(()=>e.value!==void 0&&e.value!==null),V=t.computed(()=>B.value?void 0:"0"),P=Z=>{var j;e.value=Z==null?void 0:Z.value,y.value=Z,d.value=null,u.open=!1,(j=a==null?void 0:a.value)==null||j.focus()},X=()=>{e.value=void 0,y.value=void 0},S=()=>{var Z;return(Z=l.value)==null?void 0:Z.focus()},R=()=>{u.open=!u.open};t.watch(()=>u.open,Z=>{d.value=Z?"":null});const A=()=>{u.open=!0},M=Z=>{var j,ee,ce;const ye=Z.relatedTarget;!((j=a.value)!=null&&j.contains(ye))&&!((ce=(ee=c.value)==null?void 0:ee.listRef)!=null&&ce.contains(ye))&&(d.value=null,u.open=!1)},v=Z=>{var j;if(["ArrowDown","ArrowUp","Enter","Escape"].includes(Z.code))Z.preventDefault();else return;const{open:ee,activeIndex:ce}=u;if(!ee){Z.code==="Enter"&&(u.open=!0,d.value="");return}Z.code==="Escape"&&(u.open=!1,d.value=null,(j=a.value)==null||j.focus());const ye=t.unref(_),{length:ve}=ye;if(!ve)return;Z.code==="Enter"&&P(ye.find(Ht=>Ht.index===ce));const He=ye.findIndex(Ht=>Ht.index===ce)??-1,vt=Z.code==="ArrowDown"?1:Z.code==="ArrowUp"?-1:0,Ye=Math.abs(He+vt+ve)%ve;u.activeIndex=_.value[Ye].index??-1};Kn(a),t.watch(()=>e.value,m,{immediate:!0}),t.watch(()=>u.open,Z=>{var j;return Z?(j=l.value)==null?void 0:j.focus():""}),t.watchPostEffect(()=>{var Z;d.value,u.activeIndex>=0&&u.open&&((Z=c.value)==null||Z.scrollIntoActive())});const w=hE(d,300,{maxWait:1e3}),L=$d(()=>w.value,async Z=>Z!==null?r.optionsSearch(Z):[]),G=$d(()=>e.value,async Z=>{var j,ee;return Z&&!ft((j=y.value)==null?void 0:j.value,Z)?r.modelSearch?r.modelSearch(Z):(ee=await r.optionsSearch(String(Z)))==null?void 0:ee[0]:y.value});return t.watch(()=>L.value,Z=>{Z&&(g.value=Z,d.value!==null&&(N.value=!1))}),t.watch(()=>G.value,Z=>{Z&&(y.value=sr([Z])[0])}),t.watch(()=>L.error,Z=>{Z&&(N.value=!!Z)}),t.watch(()=>L.loading||G.loading,Z=>{C.value=Z}),(Z,j)=>(t.openBlock(),t.createElementBlock("div",{class:"pl-autocomplete__envelope",onClick:t.withModifiers(S,["stop"])},[t.createElementVNode("div",{ref_key:"rootRef",ref:a,tabindex:V.value,class:t.normalizeClass(["pl-autocomplete",{open:u.open,error:!!W.value,disabled:B.value}]),onKeydown:v,onFocusout:M},[t.createElementVNode("div",uV,[t.createElementVNode("div",pV,[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:B.value,placeholder:D.value,spellcheck:"false",autocomplete:"chrome-off",onFocus:A},null,40,fV),[[t.vModelText,d.value]]),j[4]||(j[4]=t.createTextVNode()),u.open?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",mV,[t.createVNode(Ll,null,{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(E.value),1)]),_:1})])),j[5]||(j[5]=t.createTextVNode()),t.createElementVNode("div",hV,[C.value?(t.openBlock(),t.createBlock(t.unref(at),{key:0,name:"loading"})):t.createCommentVNode("",!0),j[1]||(j[1]=t.createTextVNode()),Z.clearable&&I.value?(t.openBlock(),t.createBlock(t.unref(Or),{key:1,name:"delete-clear",onClick:t.withModifiers(X,["stop"])})):t.createCommentVNode("",!0),j[2]||(j[2]=t.createTextVNode()),t.renderSlot(Z.$slots,"append"),j[3]||(j[3]=t.createTextVNode()),t.createElementVNode("div",{class:"pl-autocomplete__arrow-wrapper",onClick:t.withModifiers(R,["stop"])},[Z.arrowIconLarge?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["arrow-icon",[`icon-24 ${Z.arrowIconLarge}`]])},null,2)):Z.arrowIcon?(t.openBlock(),t.createElementBlock("div",{key:1,class:t.normalizeClass(["arrow-icon",[`icon-16 ${Z.arrowIcon}`]])},null,2)):(t.openBlock(),t.createElementBlock("div",gV))])])]),j[9]||(j[9]=t.createTextVNode()),Z.label?(t.openBlock(),t.createElementBlock("label",yV,[Z.required?(t.openBlock(),t.createElementBlock("i",bV)):t.createCommentVNode("",!0),j[6]||(j[6]=t.createTextVNode()),t.createElementVNode("span",null,t.toDisplayString(Z.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(Z.$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,ce)=>(t.openBlock(),t.createBlock(po,{key:ce,option:ee,"is-selected":ee.isSelected,"is-hovered":ee.isActive,size:Z.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",_V,"Nothing found"))]),_:1},8,["root"])):t.createCommentVNode("",!0),j[11]||(j[11]=t.createTextVNode()),t.createVNode(dr,{class:"pl-autocomplete__contour"})])],42,dV),j[12]||(j[12]=t.createTextVNode()),W.value?(t.openBlock(),t.createElementBlock("div",wV,t.toDisplayString(W.value),1)):C.value&&Z.loadingOptionsHelper?(t.openBlock(),t.createElementBlock("div",kV,t.toDisplayString(Z.loadingOptionsHelper),1)):Z.helper?(t.openBlock(),t.createElementBlock("div",xV,t.toDisplayString(Z.helper),1)):t.createCommentVNode("",!0)]))}}),SV="_component_1uz6e_1",EV="_local_1uz6e_1",NV="_supported_1uz6e_26",VV="_remote_1uz6e_32",BV="_search_1uz6e_40",TV="_selected_1uz6e_72",RV="_breadcrumbs_1uz6e_86",IV="_cat_1uz6e_116",AV="_message_1uz6e_122",LV="_isFile_1uz6e_196",OV="_isDir_1uz6e_200",$V="_canBeSelected_1uz6e_206",ZV="_spin_1uz6e_1",mt={component:SV,local:EV,supported:NV,remote:VV,search:BV,"ls-container":"_ls-container_1uz6e_50","ls-head":"_ls-head_1uz6e_57",selected:TV,breadcrumbs:RV,"ls-error":"_ls-error_1uz6e_108",cat:IV,message:AV,"ls-empty":"_ls-empty_1uz6e_131","ls-body":"_ls-body_1uz6e_152",isFile:LV,isDir:OV,canBeSelected:$V,"ls-loader":"_ls-loader_1uz6e_212","loader-icon":"_loader-icon_1uz6e_220",spin:ZV},MV=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}))}}),FV="_title_14dct_2",PV="_row_14dct_10",zV="_head_14dct_30",DV="_body_14dct_58",WV={title:FV,row:PV,head:zV,body:DV},GV={$style:WV},UV=st(MV,[["__cssModules",GV]]),ch=()=>({dirPath:"",search:"",storageEntry:void 0,items:[],error:"",storageOptions:[],selected:[],lastSelected:void 0,currentLoadingPath:void 0,showHiddenItems:!1});function HV(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 dh={mounted:n=>{if(n.clientWidth<n.scrollWidth){const e=n.innerText;n.innerText=e.substring(0,57)+"..."+e.substring(e.length-10)}}};function uh(n){return n?n.map(e=>"."+ek(e,["."])):void 0}function XV(n){const e="/",r=n.startsWith(e),o=Qw(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 jV=["title","onClick"],YV={key:0,class:"ls-loader"},KV=["onClick"],JV=["title"],qV=["onClick"],QV=["title"],eB=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=I=>I.ctrlKey||I.metaKey,o=n,a=t.reactive(ch()),l=()=>{a.search="",a.error="",a.lastSelected=void 0},c=t.computed(()=>uh(o.extensions)),d=HV(a),u=t.computed(()=>{var I;return{modelValue:o.modelValue,dirPath:a.dirPath,storageHandle:(I=a.storageEntry)==null?void 0:I.handle}}),f=(I,V)=>{Wr()&&a.currentLoadingPath!==V&&(a.currentLoadingPath=V,Wr().lsDriver.listFiles(I,V).then(P=>{V===a.dirPath&&(a.items=Uo(P).entries.map(X=>({path:X.fullPath,name:X.name,isDir:X.type==="dir",canBeSelected:X.type==="file"&&(!c.value||c.value.some(S=>X.fullPath.endsWith(S))),handle:X.type==="file"?X.handle:void 0,selected:!1})).sort((X,S)=>X.isDir&&!S.isDir?-1:!X.isDir&&S.isDir?1:X.name.localeCompare(S.name)).map((X,S)=>({id:S,...X})),a.lastSelected=void 0)}).catch(P=>a.error=String(P)).finally(()=>{a.currentLoadingPath=void 0}))},m=()=>{l();const{storageHandle:I,dirPath:V,modelValue:P}=u.value;I&&P&&f(I,V)},g=t.computed(()=>XV(a.dirPath)),y=t.computed(()=>a.items.filter(I=>I.canBeSelected&&I.selected&&!I.isDir)),_=t.computed(()=>{var I;return y.value.length>0&&((I=a.storageEntry)==null?void 0:I.handle)}),C=()=>{var I;return{storageHandle:Uo((I=a.storageEntry)==null?void 0:I.handle),files:y.value.map(V=>V.handle)}},N=I=>{a.dirPath=I},B=(I,V)=>{const{shiftKey:P}=I,X=r(I),{lastSelected:S}=a;I.preventDefault();const R=d.value;if(V.canBeSelected){if(o.multi||R.forEach(A=>A.selected=!1),V.selected=!V.selected,!o.multi)return;!X&&!P&&R.forEach(A=>{A.id!==V.id&&(A.selected=!1)}),P&&S!==void 0&&R.forEach(A=>{Xw(A.id,S,V.id)&&(A.selected=!0)}),V.selected&&(a.lastSelected=V.id)}},$=I=>{I&&!o.multi||d.value.filter(V=>V.canBeSelected).forEach(V=>{V.selected=I})},W=()=>$(!0),E=()=>$(!1),D=()=>{if(l(),E(),!Wr()){console.warn("platforma API is not found");return}Wr().lsDriver.getStorageList().then(I=>{I=I.filter(V=>V.name!=="local"&&!V.name.startsWith("local_disk_")),a.storageOptions=I.map(V=>({text:V.name,value:V})),o.autoSelectStorage&&Ar(I[0],V=>{a.storageEntry=V})}).catch(I=>a.error=String(I))};return t.watch(t.toRef(a,"storageEntry"),I=>{l(),a.dirPath=(I==null?void 0:I.initialFullPath)??""},{immediate:!0}),t.watch([()=>a.dirPath,()=>a.storageEntry],()=>{m()}),t.watch(()=>o.modelValue,I=>{I?D():Object.assign(a,ch())},{immediate:!0}),ot(document,"keydown",I=>{if(!o.modelValue||I.target!==document.body)return;const V=r(I);V&&I.code==="KeyA"&&(I.preventDefault(),W()),V&&I.shiftKey&&I.code==="Period"&&(I.preventDefault(),a.showHiddenItems=!a.showHiddenItems),I.code==="Enter"&&o.submit()}),e({isReady:_,getFilesToImport:C}),t.onMounted(D),(I,V)=>(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":V[0]||(V[0]=P=>a.storageEntry=P),label:"Select storage",options:a.storageOptions},null,8,["modelValue","options"])]),V[2]||(V[2]=t.createTextVNode()),t.createElementVNode("div",null,[t.createVNode(t.unref(Am),{modelValue:a.search,"onUpdate:modelValue":V[1]||(V[1]=P=>a.search=P),label:"Search in folder",clearable:""},null,8,["modelValue"])])],2),V[12]||(V[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,X)=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:X},[t.createElementVNode("div",{title:P.path,onClick:S=>N(P.path)},t.toDisplayString(P.name),9,jV),V[3]||(V[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),V[5]||(V[5]=t.createTextVNode()),t.createElementVNode("div",{class:t.normalizeClass(t.unref(mt).selected)},[t.createElementVNode("span",null,"Selected: "+t.toDisplayString(y.value.length),1),V[4]||(V[4]=t.createTextVNode()),t.createVNode(UV)],2)],2),V[11]||(V[11]=t.createTextVNode()),a.currentLoadingPath!==void 0?(t.openBlock(),t.createElementBlock("div",YV,V[6]||(V[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),V[8]||(V[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:X=>N(P.path)},[t.createVNode(t.unref(Or),{name:"chevron-right"}),V[9]||(V[9]=t.createTextVNode()),t.withDirectives((t.openBlock(),t.createElementBlock("span",{title:P.name},[t.createTextVNode(t.toDisplayString(P.name),1)],8,JV)),[[t.unref(dh)]])],10,KV)):(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(X=>B(X,P),["stop"])},[t.createVNode(t.unref(qt),{name:"box",class:t.normalizeClass(t.unref(mt).isFile)},null,8,["class"]),V[10]||(V[10]=t.createTextVNode()),t.withDirectives((t.openBlock(),t.createElementBlock("span",{title:P.name},[t.createTextVNode(t.toDisplayString(P.name),1)],8,QV)),[[t.unref(dh)]])],10,qV))],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),V[7]||(V[7]=t.createTextVNode()),t.createElementVNode("div",{class:t.normalizeClass(t.unref(mt).message)},"Select storage to preview",2)],2))],2)],2))}}),tB={key:1,class:"alert-error"},nB=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=uh(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",tB,t.toDisplayString(r.error),1)):t.createCommentVNode("",!0)],34))}}),rB={style:{margin:"0 24px"}},ph=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",rB,[t.createVNode(t.unref(Nm),{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(eB,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(nB,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(Il),{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"]))}}),oB={key:0,ref:"label"},aB={key:0,class:"required-icon"},iB=["data-placeholder"],lB={key:5,class:"pl-file-input__stats"},sB={key:0,class:"pl-file-input__error"},cB={key:1,class:"pl-file-input__helper"},fh=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(I){return r.error=I instanceof Error?I.message:String(I),E}},d=t.computed(()=>c(l.modelValue,wN)),u=t.computed(()=>c(l.modelValue,nh)),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},B=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",oB,[E.required?(t.openBlock(),t.createElementBlock("i",aB)):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,iB),D[6]||(D[6]=t.createTextVNode()),_.value?(t.openBlock(),t.createElementBlock("div",lB,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",sB,t.toDisplayString(g.value),1)):E.helper?(t.openBlock(),t.createElementBlock("div",cB,t.toDisplayString(E.helper),1)):t.createCommentVNode("",!0)],2),D[10]||(D[10]=t.createTextVNode()),t.createVNode(t.unref(ph),{modelValue:r.fileDialogOpen,"onUpdate:modelValue":D[0]||(D[0]=I=>r.fileDialogOpen=I),extensions:E.extensions,title:E.fileDialogTitle,"close-on-outside-click":E.fileDialogCloseOnOutsideClick,"onImport:files":B},null,8,["modelValue","extensions","title","close-on-outside-click"])],64))}}),dB={class:"pl-notification-alert__wrapper d-flex text-s"},uB={class:"pl-notification-alert__content flex-grow-1"},pB={key:0,class:"pl-notification-alert__close"},fB={key:0,class:"pl-notification-alert__actions d-flex"},mh=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",dB,[t.createElementVNode("div",uB,[t.renderSlot(a.$slots,"default")]),l[0]||(l[0]=t.createTextVNode()),a.closable?(t.openBlock(),t.createElementBlock("div",pB,[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",fB,[t.renderSlot(a.$slots,"actions")])):t.createCommentVNode("",!0)],6)):t.createCommentVNode("",!0)}}),mB=["data-content"],hB=[".title"],gB=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,mB)),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,hB))),128))],2)],6))}}),yB="_component_5hdjy_1",bB="_container_5hdjy_11",_B="_track_5hdjy_25",wB="_notReady_5hdjy_47",kB={component:yB,container:bB,track:_B,notReady:wB},xB={$style:kB},CB=st(gB,[["__cssModules",xB]]),vB=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))}}),SB="_component_blzj7_2",EB="_legend_blzj7_9",NB="_chip_blzj7_19",VB="_group_blzj7_26",BB="_item_blzj7_32",TB={component:SB,legend:EB,chip:NB,group:VB,item:BB},RB={$style:TB},IB=st(vB,[["__cssModules",RB]]),AB=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(CB,{value:o.value},null,8,["value"]),c[1]||(c[1]=t.createTextVNode()),r.value&&a.value.length?(t.openBlock(),t.createBlock(IB,{key:1,legends:a.value,"max-in-column":l.settings.maxLegendsInColumn},null,8,["legends","max-in-column"])):t.createCommentVNode("",!0)],2))}}),LB="_component_1j1iz_1",OB="_title_1j1iz_7",$B={component:LB,title:OB},ZB={$style:$B},MB=st(AB,[["__cssModules",ZB]]),FB=[".title"],PB=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,FB))),128))],2)],6))}}),zB="_component_1utnb_1",DB="_notReady_1utnb_8",WB="_container_1utnb_16",GB={component:zB,notReady:DB,container:WB},UB={$style:GB},HB=st(PB,[["__cssModules",UB]]),XB=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(HB,{value:r.value},null,8,["value"])],2))}}),jB="_component_1gn0t_1",YB={component:jB},KB={$style:YB},hh=st(XB,[["__cssModules",KB]]);function Yl(n,e){return n==null||e==null?NaN:n<e?-1:n>e?1:n>=e?0:NaN}function JB(n,e){return n==null||e==null?NaN:e<n?-1:e>n?1:e>=n?0:NaN}function gh(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===JB?n:qB,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 qB(){return 0}function QB(n){return n===null?NaN:+n}const eT=gh(Yl),yh=eT.right;gh(QB).center;function tT(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 nT(n){return n}var rT=Array.prototype,oT=rT.slice;function Md(n){return()=>n}const aT=Math.sqrt(50),iT=Math.sqrt(10),lT=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>=aT?10:l>=iT?5:l>=lT?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 bh(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 sT(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 cT(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 dT(n){return Math.max(1,Math.ceil(Math.log(tT(n))/Math.LN2)+1)}function _h(){var n=nT,e=Zd,r=dT;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]=cT(g,y,D)),_=bh(g,y,D),_[0]<=g&&(u=ra(g,y,D)),_[_.length-1]>=y)if(E>=y&&e===Zd){const I=ra(g,y,D);isFinite(I)&&(I>0?y=(Math.floor(y/I)+1)*I:I<0&&(y=(Math.ceil(y*-I)+1)/-I))}else _.pop()}for(var C=_.length,N=0,B=C;_[N]<=g;)++N;for(;_[B-1]>y;)--B;(N||B<C)&&(_=_.slice(N,B),C=B-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&&$[yh(_,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)?oT.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 uT(n){return n}var Pd=1,zd=2,Dd=3,Ci=4,wh=1e-6;function pT(n){return"translate("+n+",0)"}function fT(n){return"translate(0,"+n+")"}function mT(n){return e=>+n(e)}function hT(n,e){return e=Math.max(0,n.bandwidth()-e*2)/2,n.round()&&(e=Math.round(e)),r=>+n(r)+e}function gT(){return!this.__axis}function kh(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===Ci?-1:1,m=n===Ci||n===zd?"x":"y",g=n===Pd||n===Dd?pT:fT;function y(_){var C=o??(e.ticks?e.ticks.apply(e,r):e.domain()),N=a??(e.tickFormat?e.tickFormat.apply(e,r):uT),B=Math.max(l,0)+d,$=e.range(),W=+$[0]+u,E=+$[$.length-1]+u,D=(e.bandwidth?hT:mT)(e.copy(),u),I=_.selection?_.selection():_,V=I.selectAll(".domain").data([null]),P=I.selectAll(".tick").data(C,e).order(),X=P.exit(),S=P.enter().append("g").attr("class","tick"),R=P.select("line"),A=P.select("text");V=V.merge(V.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),P=P.merge(S),R=R.merge(S.append("line").attr("stroke","currentColor").attr(m+"2",f*l)),A=A.merge(S.append("text").attr("fill","currentColor").attr(m,f*B).attr("dy",n===Pd?"0em":n===Dd?"0.71em":"0.32em")),_!==I&&(V=V.transition(_),P=P.transition(_),R=R.transition(_),A=A.transition(_),X=X.transition(_).attr("opacity",wh).attr("transform",function(M){return isFinite(M=D(M))?g(M+u):this.getAttribute("transform")}),S.attr("opacity",wh).attr("transform",function(M){var v=this.parentNode.__axis;return g((v&&isFinite(v=v(M))?v:D(M))+u)})),X.remove(),V.attr("d",n===Ci||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(M){return g(D(M)+u)}),R.attr(m+"2",f*l),A.attr(m,f*B).text(N),I.filter(gT).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",n===zd?"start":n===Ci?"end":"middle"),I.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 kh(Dd,n)}function Ql(n){return kh(Ci,n)}var yT={value:()=>{}};function xh(){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 bT(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=xh.prototype={constructor:es,on:function(n,e){var r=this._,o=bT(n+"",r),a,l=-1,c=o.length;if(arguments.length<2){for(;++l<c;)if((a=(n=o[l]).type)&&(a=_T(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]=Ch(r[a],n.name,e);else if(e==null)for(a in r)r[a]=Ch(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 _T(n,e){for(var r=0,o=n.length,a;r<o;++r)if((a=n[r]).name===e)return a.value}function Ch(n,e,r){for(var o=0,a=n.length;o<a;++o)if(n[o].name===e){n[o]=yT,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 wT(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 kT(n){return function(){return this.ownerDocument.createElementNS(n.space,n.local)}}function Sh(n){var e=ts(n);return(e.local?kT:wT)(e)}function xT(){}function Gd(n){return n==null?xT:function(){return this.querySelector(n)}}function CT(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 Eh(n){return n==null?[]:Array.isArray(n)?n:Array.from(n)}function vT(){return[]}function Nh(n){return n==null?vT:function(){return this.querySelectorAll(n)}}function ST(n){return function(){return Eh(n.apply(this,arguments))}}function ET(n){typeof n=="function"?n=ST(n):n=Nh(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 Vh(n){return function(){return this.matches(n)}}function Bh(n){return function(e){return e.matches(n)}}var NT=Array.prototype.find;function VT(n){return function(){return NT.call(this.children,n)}}function BT(){return this.firstElementChild}function TT(n){return this.select(n==null?BT:VT(typeof n=="function"?n:Bh(n)))}var RT=Array.prototype.filter;function IT(){return Array.from(this.children)}function AT(n){return function(){return RT.call(this.children,n)}}function LT(n){return this.selectAll(n==null?IT:AT(typeof n=="function"?n:Bh(n)))}function OT(n){typeof n!="function"&&(n=Vh(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 Th(n){return new Array(n.length)}function $T(){return new $t(this._enter||this._groups.map(Th),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 ZT(n){return function(){return n}}function MT(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 FT(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 PT(n){return n.__data__}function zT(n,e){if(!arguments.length)return Array.from(this,PT);var r=e?FT:MT,o=this._parents,a=this._groups;typeof n!="function"&&(n=ZT(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,_=DT(n.call(m,m&&m.__data__,f,o)),C=_.length,N=d[f]=new Array(C),B=c[f]=new Array(C),$=u[f]=new Array(y);r(m,g,N,B,$,_,e);for(var W=0,E=0,D,I;W<C;++W)if(D=N[W]){for(W>=E&&(E=W+1);!(I=B[E])&&++E<C;);D._next=I||null}}return c=new $t(c,o),c._enter=d,c._exit=u,c}function DT(n){return typeof n=="object"&&"length"in n?n:Array.from(n)}function WT(){return new $t(this._exit||this._groups.map(Th),this._parents)}function GT(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 UT(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 HT(){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 XT(n){n||(n=jT);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 jT(n,e){return n<e?-1:n>e?1:n>=e?0:NaN}function YT(){var n=arguments[0];return arguments[0]=this,n.apply(null,arguments),this}function KT(){return Array.from(this)}function JT(){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 qT(){let n=0;for(const e of this)++n;return n}function QT(){return!this.node()}function e2(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 t2(n){return function(){this.removeAttribute(n)}}function n2(n){return function(){this.removeAttributeNS(n.space,n.local)}}function r2(n,e){return function(){this.setAttribute(n,e)}}function o2(n,e){return function(){this.setAttributeNS(n.space,n.local,e)}}function a2(n,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(n):this.setAttribute(n,r)}}function i2(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 l2(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?n2:t2:typeof e=="function"?r.local?i2:a2:r.local?o2:r2)(r,e))}function Rh(n){return n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView}function s2(n){return function(){this.style.removeProperty(n)}}function c2(n,e,r){return function(){this.style.setProperty(n,e,r)}}function d2(n,e,r){return function(){var o=e.apply(this,arguments);o==null?this.style.removeProperty(n):this.style.setProperty(n,o,r)}}function u2(n,e,r){return arguments.length>1?this.each((e==null?s2:typeof e=="function"?d2:c2)(n,e,r??"")):oa(this.node(),n)}function oa(n,e){return n.style.getPropertyValue(e)||Rh(n).getComputedStyle(n,null).getPropertyValue(e)}function p2(n){return function(){delete this[n]}}function f2(n,e){return function(){this[n]=e}}function m2(n,e){return function(){var r=e.apply(this,arguments);r==null?delete this[n]:this[n]=r}}function h2(n,e){return arguments.length>1?this.each((e==null?p2:typeof e=="function"?m2:f2)(n,e)):this.node()[n]}function Ih(n){return n.trim().split(/^|\s+/)}function Ud(n){return n.classList||new Ah(n)}function Ah(n){this._node=n,this._names=Ih(n.getAttribute("class")||"")}Ah.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 Lh(n,e){for(var r=Ud(n),o=-1,a=e.length;++o<a;)r.add(e[o])}function Oh(n,e){for(var r=Ud(n),o=-1,a=e.length;++o<a;)r.remove(e[o])}function g2(n){return function(){Lh(this,n)}}function y2(n){return function(){Oh(this,n)}}function b2(n,e){return function(){(e.apply(this,arguments)?Lh:Oh)(this,n)}}function _2(n,e){var r=Ih(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"?b2:e?g2:y2)(r,e))}function w2(){this.textContent=""}function k2(n){return function(){this.textContent=n}}function x2(n){return function(){var e=n.apply(this,arguments);this.textContent=e??""}}function C2(n){return arguments.length?this.each(n==null?w2:(typeof n=="function"?x2:k2)(n)):this.node().textContent}function v2(){this.innerHTML=""}function S2(n){return function(){this.innerHTML=n}}function E2(n){return function(){var e=n.apply(this,arguments);this.innerHTML=e??""}}function N2(n){return arguments.length?this.each(n==null?v2:(typeof n=="function"?E2:S2)(n)):this.node().innerHTML}function V2(){this.nextSibling&&this.parentNode.appendChild(this)}function B2(){return this.each(V2)}function T2(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function R2(){return this.each(T2)}function I2(n){var e=typeof n=="function"?n:Sh(n);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function A2(){return null}function L2(n,e){var r=typeof n=="function"?n:Sh(n),o=e==null?A2:typeof e=="function"?e:Gd(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),o.apply(this,arguments)||null)})}function O2(){var n=this.parentNode;n&&n.removeChild(this)}function $2(){return this.each(O2)}function Z2(){var n=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(n,this.nextSibling):n}function M2(){var n=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(n,this.nextSibling):n}function F2(n){return this.select(n?M2:Z2)}function P2(n){return arguments.length?this.property("__data__",n):this.node().__data__}function z2(n){return function(e){n.call(this,e,this.__data__)}}function D2(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 W2(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 G2(n,e,r){return function(){var o=this.__on,a,l=z2(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 U2(n,e,r){var o=D2(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?G2:W2,a=0;a<l;++a)this.each(d(o[a],e,r));return this}function $h(n,e,r){var o=Rh(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 H2(n,e){return function(){return $h(this,n,e)}}function X2(n,e){return function(){return $h(this,n,e.apply(this,arguments))}}function j2(n,e){return this.each((typeof e=="function"?X2:H2)(n,e))}function*Y2(){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 K2(){return this}$t.prototype=vi.prototype={constructor:$t,select:CT,selectAll:ET,selectChild:TT,selectChildren:LT,filter:OT,data:zT,enter:$T,exit:WT,join:GT,merge:UT,selection:K2,order:HT,sort:XT,call:YT,nodes:KT,node:JT,size:qT,empty:QT,each:e2,attr:l2,style:u2,property:h2,classed:_2,text:C2,html:N2,raise:B2,lower:R2,append:I2,insert:L2,remove:$2,clone:F2,datum:P2,on:U2,dispatch:j2,[Symbol.iterator]:Y2};function Zh(n){return typeof n=="string"?new $t([[document.querySelector(n)]],[document.documentElement]):new $t([[n]],Hd)}function J2(n){return typeof n=="string"?new $t([document.querySelectorAll(n)],[document.documentElement]):new $t([Eh(n)],Hd)}function Xd(n,e,r){n.prototype=e.prototype=r,r.constructor=n}function Mh(n,e){var r=Object.create(n.prototype);for(var o in e)r[o]=e[o];return r}function Si(){}var Ei=.7,rs=1/Ei,aa="\\s*([+-]?\\d+)\\s*",Ni="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",er="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",q2=/^#([0-9a-f]{3,8})$/,Q2=new RegExp(`^rgb\\(${aa},${aa},${aa}\\)$`),eR=new RegExp(`^rgb\\(${er},${er},${er}\\)$`),tR=new RegExp(`^rgba\\(${aa},${aa},${aa},${Ni}\\)$`),nR=new RegExp(`^rgba\\(${er},${er},${er},${Ni}\\)$`),rR=new RegExp(`^hsl\\(${Ni},${er},${er}\\)$`),oR=new RegExp(`^hsla\\(${Ni},${er},${er},${Ni}\\)$`),Fh={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(Si,yo,{copy(n){return Object.assign(new this.constructor,this,n)},displayable(){return this.rgb().displayable()},hex:Ph,formatHex:Ph,formatHex8:aR,formatHsl:iR,formatRgb:zh,toString:zh});function Ph(){return this.rgb().formatHex()}function aR(){return this.rgb().formatHex8()}function iR(){return Hh(this).formatHsl()}function zh(){return this.rgb().formatRgb()}function yo(n){var e,r;return n=(n+"").trim().toLowerCase(),(e=q2.exec(n))?(r=e[1].length,e=parseInt(e[1],16),r===6?Dh(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=Q2.exec(n))?new Gt(e[1],e[2],e[3],1):(e=eR.exec(n))?new Gt(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=tR.exec(n))?os(e[1],e[2],e[3],e[4]):(e=nR.exec(n))?os(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=rR.exec(n))?Uh(e[1],e[2]/100,e[3]/100,1):(e=oR.exec(n))?Uh(e[1],e[2]/100,e[3]/100,e[4]):Fh.hasOwnProperty(n)?Dh(Fh[n]):n==="transparent"?new Gt(NaN,NaN,NaN,0):null}function Dh(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 lR(n){return n instanceof Si||(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?lR(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,Mh(Si,{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?Ei:Math.pow(Ei,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:Wh,formatHex:Wh,formatHex8:sR,formatRgb:Gh,toString:Gh}));function Wh(){return`#${_o(this.r)}${_o(this.g)}${_o(this.b)}`}function sR(){return`#${_o(this.r)}${_o(this.g)}${_o(this.b)}${_o((isNaN(this.opacity)?1:this.opacity)*255)}`}function Gh(){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 Uh(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 Hh(n){if(n instanceof En)return new En(n.h,n.s,n.l,n.opacity);if(n instanceof Si||(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 cR(n,e,r,o){return arguments.length===1?Hh(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,cR,Mh(Si,{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?Ei:Math.pow(Ei,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(Xh(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("}${Xh(this.h)}, ${is(this.s)*100}%, ${is(this.l)*100}%${n===1?")":`, ${n})`}`}}));function Xh(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 dR(n,e){return function(r){return n+r*e}}function uR(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 pR(n){return(n=+n)==1?jh:function(e,r){return r-e?uR(e,r,n):Kd(isNaN(e)?r:e)}}function jh(n,e){var r=e-n;return r?dR(n,r):Kd(isNaN(n)?e:n)}const ls=function n(e){var r=pR(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=jh(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 fR(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 mR(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function hR(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 gR(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 yR(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 bR(n){return function(){return n}}function _R(n){return function(e){return n(e)+""}}function Yh(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]?_R(u[0].x):bR(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):Yh:e instanceof yo?ls:e instanceof Date?gR:mR(e)?fR:Array.isArray(e)?hR:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?yR:Nn)(n,e)}function wR(n,e){return n=+n,e=+e,function(r){return Math.round(n*(1-r)+e*r)}}var Kh=180/Math.PI,Jh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function qh(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)*Kh,skewX:Math.atan(u)*Kh,scaleX:c,scaleY:d}}var ss;function kR(n){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(n+"");return e.isIdentity?Jh:qh(e.a,e.b,e.c,e.d,e.e,e.f)}function xR(n){return n==null||(ss||(ss=document.createElementNS("http://www.w3.org/2000/svg","g")),ss.setAttribute("transform",n),!(n=ss.transform.baseVal.consolidate()))?Jh:(n=n.matrix,qh(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,B;++C<N;)g[(B=y[C]).i]=B.x(_);return g.join("")}}}var CR=Qh(kR,"px, ","px)","deg)"),vR=Qh(xR,", ",")",")"),ia=0,Vi=0,Bi=0,eg=1e3,cs,Ti,ds=0,wo=0,us=0,Ri=typeof performance=="object"&&performance.now?performance:Date,tg=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(n){setTimeout(n,17)};function eu(){return wo||(tg(SR),wo=Ri.now()+us)}function SR(){wo=0}function ps(){this._call=this._time=this._next=null}ps.prototype=ng.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&&Ti!==this&&(Ti?Ti._next=this:cs=this,Ti=this),this._call=n,this._time=r,tu()},stop:function(){this._call&&(this._call=null,this._time=1/0,tu())}};function ng(n,e,r){var o=new ps;return o.restart(n,e,r),o}function ER(){eu(),++ia;for(var n=cs,e;n;)(e=wo-n._time)>=0&&n._call.call(void 0,e),n=n._next;--ia}function rg(){wo=(ds=Ri.now())+us,ia=Vi=0;try{ER()}finally{ia=0,VR(),wo=0}}function NR(){var n=Ri.now(),e=n-ds;e>eg&&(us-=e,ds=n)}function VR(){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);Ti=n,tu(o)}function tu(n){if(!ia){Vi&&(Vi=clearTimeout(Vi));var e=n-wo;e>24?(n<1/0&&(Vi=setTimeout(rg,n-Ri.now()-us)),Bi&&(Bi=clearInterval(Bi))):(Bi||(ds=Ri.now(),Bi=setInterval(NR,eg)),ia=1,tg(rg))}}function og(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 BR=xh("start","end","cancel","interrupt"),TR=[],ag=0,ig=1,nu=2,fs=3,lg=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;RR(n,r,{name:e,index:o,group:a,on:BR,tween:TR,time:l.time,delay:l.delay,duration:l.duration,ease:l.ease,timer:null,state:ag})}function ou(n,e){var r=Vn(n,e);if(r.state>ag)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 RR(n,e,r){var o=n.__transition,a;o[e]=r,r.timer=ng(l,0,r.time);function l(f){r.state=ig,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!==ig)return u();for(m in o)if(_=o[m],_.name===r.name){if(_.state===fs)return og(c);_.state===lg?(_.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(og(function(){r.state===fs&&(r.state=lg,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 IR(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 AR(n){return this.each(function(){IR(this,n)})}function LR(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 OR(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 $R(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?LR:OR)(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 sg(n,e){var r;return(typeof e=="number"?Nn:e instanceof yo?ls:(r=yo(e))?(e=r,ls):Yh)(n,e)}function ZR(n){return function(){this.removeAttribute(n)}}function MR(n){return function(){this.removeAttributeNS(n.space,n.local)}}function FR(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 PR(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 zR(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 DR(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 WR(n,e){var r=ts(n),o=r==="transform"?vR:sg;return this.attrTween(n,typeof e=="function"?(r.local?DR:zR)(r,o,au(this,"attr."+n,e)):e==null?(r.local?MR:ZR)(r):(r.local?PR:FR)(r,o,e))}function GR(n,e){return function(r){this.setAttribute(n,e.call(this,r))}}function UR(n,e){return function(r){this.setAttributeNS(n.space,n.local,e.call(this,r))}}function HR(n,e){var r,o;function a(){var l=e.apply(this,arguments);return l!==o&&(r=(o=l)&&UR(n,l)),r}return a._value=e,a}function XR(n,e){var r,o;function a(){var l=e.apply(this,arguments);return l!==o&&(r=(o=l)&&GR(n,l)),r}return a._value=e,a}function jR(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?HR:XR)(o,e))}function YR(n,e){return function(){ou(this,n).delay=+e.apply(this,arguments)}}function KR(n,e){return e=+e,function(){ou(this,n).delay=e}}function JR(n){var e=this._id;return arguments.length?this.each((typeof n=="function"?YR:KR)(e,n)):Vn(this.node(),e).delay}function qR(n,e){return function(){tr(this,n).duration=+e.apply(this,arguments)}}function QR(n,e){return e=+e,function(){tr(this,n).duration=e}}function eI(n){var e=this._id;return arguments.length?this.each((typeof n=="function"?qR:QR)(e,n)):Vn(this.node(),e).duration}function tI(n,e){if(typeof e!="function")throw new Error;return function(){tr(this,n).ease=e}}function nI(n){var e=this._id;return arguments.length?this.each(tI(e,n)):Vn(this.node(),e).ease}function rI(n,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;tr(this,n).ease=r}}function oI(n){if(typeof n!="function")throw new Error;return this.each(rI(this._id,n))}function aI(n){typeof n!="function"&&(n=Vh(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 iI(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 lI(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 sI(n,e,r){var o,a,l=lI(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 cI(n,e){var r=this._id;return arguments.length<2?Vn(this.node(),r).on.on(n):this.each(sI(r,n,e))}function dI(n){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==n)return;e&&e.removeChild(this)}}function uI(){return this.on("end.remove",dI(this._id))}function pI(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 fI(n){var e=this._name,r=this._id;typeof n!="function"&&(n=Nh(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,B=y.length;N<B;++N)(_=y[N])&&hs(_,e,r,N,y,C);l.push(y),c.push(m)}return new pr(l,c,e,r)}var mI=vi.prototype.constructor;function hI(){return new mI(this._groups,this._parents)}function gI(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 cg(n){return function(){this.style.removeProperty(n)}}function yI(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 bI(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 _I(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=cg(e)):void 0;(f!==r||a!==m)&&(o=(r=f).copy()).on(c,a=m),u.on=o}}function wI(n,e,r){var o=(n+="")=="transform"?CR:sg;return e==null?this.styleTween(n,gI(n,o)).on("end.style."+n,cg(n)):typeof e=="function"?this.styleTween(n,bI(n,o,au(this,"style."+n,e))).each(_I(this._id,n)):this.styleTween(n,yI(n,o,e),r).on("end.style."+n,null)}function kI(n,e,r){return function(o){this.style.setProperty(n,e.call(this,o),r)}}function xI(n,e,r){var o,a;function l(){var c=e.apply(this,arguments);return c!==a&&(o=(a=c)&&kI(n,c,r)),o}return l._value=e,l}function CI(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,xI(n,e,r??""))}function vI(n){return function(){this.textContent=n}}function SI(n){return function(){var e=n(this);this.textContent=e??""}}function EI(n){return this.tween("text",typeof n=="function"?SI(au(this,"text",n)):vI(n==null?"":n+""))}function NI(n){return function(e){this.textContent=n.call(this,e)}}function VI(n){var e,r;function o(){var a=n.apply(this,arguments);return a!==r&&(e=(r=a)&&NI(a)),e}return o._value=n,o}function BI(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,VI(n))}function TI(){for(var n=this._name,e=this._id,r=dg(),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 RI(){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 II=0;function pr(n,e,r,o){this._groups=n,this._parents=e,this._name=r,this._id=o}function dg(){return++II}var fr=vi.prototype;pr.prototype={constructor:pr,select:pI,selectAll:fI,selectChild:fr.selectChild,selectChildren:fr.selectChildren,filter:aI,merge:iI,selection:hI,transition:TI,call:fr.call,nodes:fr.nodes,node:fr.node,size:fr.size,empty:fr.empty,each:fr.each,on:cI,attr:WR,attrTween:jR,style:wI,styleTween:CI,text:EI,textTween:BI,remove:uI,tween:$R,delay:JR,duration:eI,ease:nI,easeVarying:oI,end:RI,[Symbol.iterator]:fr[Symbol.iterator]};function AI(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}var LI={time:null,delay:0,duration:250,ease:AI};function OI(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 $I(n){var e,r;n instanceof pr?(e=n._id,n=n._name):(e=dg(),(r=LI).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||OI(u,e));return new pr(o,this._parents,n,e)}vi.prototype.interrupt=AR,vi.prototype.transition=$I;function ZI(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 MI(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 FI(n){return function(e){return e.replace(/[0-9]/g,function(r){return n[+r]})}}var PI=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ys(n){if(!(e=PI.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 zI(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 ug;function DI(n,e){var r=gs(n,e);if(!r)return n+"";var o=r[0],a=r[1],l=a-(ug=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 pg(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 fg={"%":(n,e)=>(n*100).toFixed(e),b:n=>Math.round(n).toString(2),c:n=>n+"",d:ZI,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)=>pg(n*100,e),r:pg,s:DI,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function mg(n){return n}var hg=Array.prototype.map,gg=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function WI(n){var e=n.grouping===void 0||n.thousands===void 0?mg:MI(hg.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?mg:FI(hg.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,B=g.zero,$=g.width,W=g.comma,E=g.precision,D=g.trim,I=g.type;I==="n"?(W=!0,I="g"):fg[I]||(E===void 0&&(E=12),D=!0,I="g"),(B||y==="0"&&_==="=")&&(B=!0,y="0",_="=");var V=N==="$"?r:N==="#"&&/[boxX]/.test(I)?"0"+I.toLowerCase():"",P=N==="$"?o:/[%p]/.test(I)?c:"",X=fg[I],S=/[defgprs%]/.test(I);E=E===void 0?6:/[gprs]/.test(I)?Math.max(1,Math.min(21,E)):Math.max(0,Math.min(20,E));function R(A){var M=V,v=P,w,L,G;if(I==="c")v=X(A)+v,A="";else{A=+A;var Z=A<0||1/A<0;if(A=isNaN(A)?u:X(Math.abs(A),E),D&&(A=zI(A)),Z&&+A==0&&C!=="+"&&(Z=!1),M=(Z?C==="("?C:d:C==="-"||C==="("?"":C)+M,v=(I==="s"?gg[8+ug/3]:"")+v+(Z&&C==="("?")":""),S){for(w=-1,L=A.length;++w<L;)if(G=A.charCodeAt(w),48>G||G>57){v=(G===46?a+A.slice(w+1):A.slice(w))+v,A=A.slice(0,w);break}}}W&&!B&&(A=e(A,1/0));var j=M.length+A.length+v.length,ee=j<$?new Array($-j+1).join(y):"";switch(W&&B&&(A=e(ee+A,ee.length?$-v.length:1/0),ee=""),_){case"<":A=M+A+v+ee;break;case"=":A=M+ee+A+v;break;case"^":A=ee.slice(0,j=ee.length>>1)+M+A+v+ee.slice(j);break;default:A=ee+M+A+v;break}return l(A)}return R.toString=function(){return g+""},R}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),B=gg[8+C/3];return function($){return _(N*$)+B}}return{format:f,formatPrefix:m}}var bs,yg,bg;GI({thousands:",",grouping:[3],currency:["$",""]});function GI(n){return bs=WI(n),yg=bs.format,bg=bs.formatPrefix,bs}function UI(n){return Math.max(0,-la(Math.abs(n)))}function HI(n,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(la(e)/3)))*3-la(Math.abs(n)))}function XI(n,e){return n=Math.abs(n),e=Math.abs(e)-n,Math.max(0,la(e)-la(n))+1}function _g(n,e){switch(arguments.length){case 0:break;case 1:this.range(n);break;default:this.range(e).domain(n);break}return this}function jI(n){return function(){return n}}function YI(n){return+n}var wg=[0,1];function sa(n){return n}function lu(n,e){return(e-=n=+n)?function(r){return(r-n)/e}:jI(isNaN(e)?NaN:.5)}function KI(n,e){var r;return n>e&&(r=n,n=e,e=r),function(o){return Math.max(n,Math.min(e,o))}}function JI(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 qI(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=yh(n,d,1,o)-1;return l[u](a[u](d))}}function kg(n,e){return e.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function xg(){var n=wg,e=wg,r=Qd,o,a,l,c=sa,d,u,f;function m(){var y=Math.min(n.length,e.length);return c!==sa&&(c=KI(n[0],n[y-1])),d=y>2?qI:JI,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,YI),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=wR,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 QI(){return xg()(sa,sa)}function eA(n,e,r,o){var a=sT(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=HI(a,c))&&(o.precision=l),bg(o,c)}case"":case"e":case"g":case"p":case"r":{o.precision==null&&!isNaN(l=XI(a,Math.max(Math.abs(n),Math.abs(e))))&&(o.precision=l-(o.type==="e"));break}case"f":case"%":{o.precision==null&&!isNaN(l=UI(a))&&(o.precision=l-(o.type==="%")*2);break}}return yg(o)}function Cg(n){var e=n.domain;return n.ticks=function(r){var o=e();return bh(o[0],o[o.length-1],r??10)},n.tickFormat=function(r,o){var a=e();return eA(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=QI();return n.copy=function(){return kg(n,su())},_g.apply(n,arguments),Cg(n)}function vg(n){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/n))}}function Sg(n){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*n}}function tA(n){var e=1,r=n(vg(e),Sg(e));return r.constant=function(o){return arguments.length?n(vg(e=+o),Sg(e)):e},Cg(r)}function cu(){var n=tA(xg());return n.copy=function(){return kg(n,cu()).constant(n.constant())},_g.apply(n,arguments)}function Ii(n,e,r){this.k=n,this.x=e,this.y=r}Ii.prototype={constructor:Ii,scale:function(n){return n===1?this:new Ii(this.k*n,this.x,this.y)},translate:function(n,e){return n===0&e===0?this:new Ii(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+")"}},Ii.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"),Zh(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=Zh("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
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 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(()=>"")),K2(".grid line").style("stroke","#E1E3EB").style("opacity",.7)}function Eg(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 tA(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(_h().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 nA(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(_h().domain(f.domain()).thresholds(m(l))(r)),y=bu(g,a),_=Eg(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 rA(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=Eg(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 oA=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"){rA(r.value,o.value,l.bins);return}l.log?nA(r.value,o.value,l.numbers):tA(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))}}),aA="_component_t90zs_2",iA="_title_t90zs_11",lA={component:aA,title:iA},sA={$style:lA},Ng=st(oA,[["__cssModules",sA]]),Vg=Symbol(),Bg=Symbol(),cA=["name"],dA=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(Vg,n.name),a=t.inject(Bg,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,cA),[[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))}}),uA="_container_1yonu_2",pA="_input_1yonu_19",fA="_label_1yonu_53",mA={container:uA,input:pA,label:fA},hA={$style:mA},Tg=st(dA,[["__cssModules",hA]]),gA=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(Vg,r.name),t.provide(Bg,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(Tg,{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))}}),yA="_container_10fxa_2",bA="_label_10fxa_7",_A={container:yA,label:bA},wA={$style:_A},kA=st(gA,[["__cssModules",wA]]),Rg=["#FFF680","#E8F66C","#C4F16B","#9AEB71","#70E084","#43D18A","#2DBD96","#28A8A0","#2793A3","#337B9E","#3B6399","#424C8F","#4A3584","#481B70","#4A005C"],Ig=["#FFF680","#FFE871","#FDCD6F","#FEAD66","#FA935F","#F57258","#EB555E","#D64470","#B83778","#982D82","#7E2584","#611B84","#49187A","#38116B","#2B125C"],xA=["#DFFADC","#C9F5D3","#B3F2CF","#9AEBCD","#80DCCC","#6DC8D2","#61B7DB","#5C97DB","#5A7CD6","#6060C7","#674BB3","#693799","#6A277B","#671D60","#611347"],vA=["#FAFAB4","#ECFBA1","#D6F598","#BEEB91","#A2E082","#82D67C","#67C77E","#4FB281","#429E8C","#36898F","#2B668F","#254B85","#213475","#1E1E6B","#1C0F5C"],CA=["#FFEA80","#FFD971","#FFC171","#FFA76C","#FB8B6F","#EB7179","#D75F7F","#C2518D","#A64392","#8038A4","#6135A4","#4735A3","#283A8F","#013C70","#003752"],SA=["#FFF780","#E7FA6F","#C1FA6A","#9BF56C","#79F080","#66E698","#56D7AC","#50C7C7","#56B4D7","#6898EB","#7481FA","#8769FA","#9450EB","#9634D6","#942AAE"],EA=["#43317B","#3B57A3","#3390B3","#5DC2B1","#95DBA5","#B9EBA0","#DBF5A6","#F5F5B7","#FEEA9D","#FFD285","#FA9B78","#E55C72","#C23665","#8F1150","#5C1243"],NA=["#122B5C","#1A496B","#1D7C8F","#21A3A3","#5FC7AB","#99E0B1","#CEF0CE","#F0F0F0","#FAE6D2","#FAC5AA","#FA9282","#E55C72","#C23665","#8F1150","#5C1243"],VA=["#0E0E8F","#1D23B8","#3748E5","#647DFA","#96A7FA","#C3CCFA","#E1E5FA","#F0F0F0","#F9DBDB","#F9BDBD","#F59393","#E55C72","#C23665","#8F1150","#5C1243"],BA=["#2E5C00","#49850D","#3748E5","#8FC758","#ABDB7B","#C5EBA0","#DCF5C4","#F0F0F0","#FADCF5","#F5C4ED","#F0A3E3","#E573D2","#CC49B6","#991884","#701260"],TA=["#4A005C","#4A2F7F","#3F5895","#3181A0","#28A8A0","#3ECD8D","#86E67B","#CEF36C","#FFF680","#FED470","#FDA163","#F36C5A","#D64470","#A03080","#702084","#451777","#2B125C"],Ag={viridis:Rg,magma:Ig,density:xA,salinity:vA,sunset:CA,rainbow:SA,spectrum:EA,teal_red:NA,blue_red:VA,lime_rose:BA,viridis_magma:TA},Lg={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(Lg[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 Og(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 $g(n){return typeof n=="string"?Ag[n].map(e=>Ut.fromString(e)):n.map(e=>typeof e=="string"?Ut.fromString(e):e)}function RA(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 Og(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}}($g(n))}const IA=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}),AA={class:"ui-slider__wrapper"},LA={class:"ui-slider__label-section"},OA={key:0,class:"text-s"},$A={key:1,class:"ui-slider__value-static text-s"},ZA={class:"ui-slider__base"},MA={class:"ui-slider__container"},FA={class:"ui-slider__container ui-slider__container-thumb"},PA={class:"ui-slider__input-wrapper d-flex"},zA=["value"],DA={key:0,class:"ui-slider__error"},Zg=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",AA,[t.createElementVNode("div",LA,[A.label?(t.openBlock(),t.createElementBlock("label",OA,[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",$A,t.toDisplayString(u.value)+t.toDisplayString(A.measure),1)):t.createCommentVNode("",!0)]),B[6]||(B[6]=t.createTextVNode()),t.createElementVNode("div",ZA,[t.createElementVNode("div",MA,[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",FA,[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",PA,[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,zA)):t.createCommentVNode("",!0)])],2),B[8]||(B[8]=t.createTextVNode()),f.value?(t.openBlock(),t.createElementBlock("div",DA,t.toDisplayString(f.value),1)):t.createCommentVNode("",!0)],2))}});function WA(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(
|
|
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(()=>"")),J2(".grid line").style("stroke","#E1E3EB").style("opacity",.7)}function Eg(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 nA(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(_h().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 rA(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 B=0;B<=C;B++)N.push(Number(f.invert(o*(B/C)).toFixed(2)));return N},g=hu(_h().domain(f.domain()).thresholds(m(l))(r)),y=bu(g,a),_=Eg(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 oA(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=Eg(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 aA=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"){oA(r.value,o.value,l.bins);return}l.log?rA(r.value,o.value,l.numbers):nA(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))}}),iA="_component_t90zs_2",lA="_title_t90zs_11",sA={component:iA,title:lA},cA={$style:sA},Ng=st(aA,[["__cssModules",cA]]),Vg=Symbol(),Bg=Symbol(),dA=["name"],uA=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(Vg,n.name),a=t.inject(Bg,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,dA),[[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))}}),pA="_container_1yonu_2",fA="_input_1yonu_19",mA="_label_1yonu_53",hA={container:pA,input:fA,label:mA},gA={$style:hA},Tg=st(uA,[["__cssModules",gA]]),yA=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(Vg,r.name),t.provide(Bg,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(Tg,{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))}}),bA="_container_10fxa_2",_A="_label_10fxa_7",wA={container:bA,label:_A},kA={$style:wA},xA=st(yA,[["__cssModules",kA]]),Rg=["#FFF680","#E8F66C","#C4F16B","#9AEB71","#70E084","#43D18A","#2DBD96","#28A8A0","#2793A3","#337B9E","#3B6399","#424C8F","#4A3584","#481B70","#4A005C"],Ig=["#FFF680","#FFE871","#FDCD6F","#FEAD66","#FA935F","#F57258","#EB555E","#D64470","#B83778","#982D82","#7E2584","#611B84","#49187A","#38116B","#2B125C"],CA=["#DFFADC","#C9F5D3","#B3F2CF","#9AEBCD","#80DCCC","#6DC8D2","#61B7DB","#5C97DB","#5A7CD6","#6060C7","#674BB3","#693799","#6A277B","#671D60","#611347"],vA=["#FAFAB4","#ECFBA1","#D6F598","#BEEB91","#A2E082","#82D67C","#67C77E","#4FB281","#429E8C","#36898F","#2B668F","#254B85","#213475","#1E1E6B","#1C0F5C"],SA=["#FFEA80","#FFD971","#FFC171","#FFA76C","#FB8B6F","#EB7179","#D75F7F","#C2518D","#A64392","#8038A4","#6135A4","#4735A3","#283A8F","#013C70","#003752"],EA=["#FFF780","#E7FA6F","#C1FA6A","#9BF56C","#79F080","#66E698","#56D7AC","#50C7C7","#56B4D7","#6898EB","#7481FA","#8769FA","#9450EB","#9634D6","#942AAE"],NA=["#43317B","#3B57A3","#3390B3","#5DC2B1","#95DBA5","#B9EBA0","#DBF5A6","#F5F5B7","#FEEA9D","#FFD285","#FA9B78","#E55C72","#C23665","#8F1150","#5C1243"],VA=["#122B5C","#1A496B","#1D7C8F","#21A3A3","#5FC7AB","#99E0B1","#CEF0CE","#F0F0F0","#FAE6D2","#FAC5AA","#FA9282","#E55C72","#C23665","#8F1150","#5C1243"],BA=["#0E0E8F","#1D23B8","#3748E5","#647DFA","#96A7FA","#C3CCFA","#E1E5FA","#F0F0F0","#F9DBDB","#F9BDBD","#F59393","#E55C72","#C23665","#8F1150","#5C1243"],TA=["#2E5C00","#49850D","#3748E5","#8FC758","#ABDB7B","#C5EBA0","#DCF5C4","#F0F0F0","#FADCF5","#F5C4ED","#F0A3E3","#E573D2","#CC49B6","#991884","#701260"],RA=["#4A005C","#4A2F7F","#3F5895","#3181A0","#28A8A0","#3ECD8D","#86E67B","#CEF36C","#FFF680","#FED470","#FDA163","#F36C5A","#D64470","#A03080","#702084","#451777","#2B125C"],Ag={viridis:Rg,magma:Ig,density:CA,salinity:vA,sunset:SA,rainbow:EA,spectrum:NA,teal_red:VA,blue_red:BA,lime_rose:TA,viridis_magma:RA},Lg={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(Lg[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 Og(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 $g(n){return typeof n=="string"?Ag[n].map(e=>Ut.fromString(e)):n.map(e=>typeof e=="string"?Ut.fromString(e):e)}function IA(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 Og(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}}($g(n))}const AA=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}),LA={class:"ui-slider__wrapper"},OA={class:"ui-slider__label-section"},$A={key:0,class:"text-s"},ZA={key:1,class:"ui-slider__value-static text-s"},MA={class:"ui-slider__base"},FA={class:"ui-slider__container"},PA={class:"ui-slider__container ui-slider__container-thumb"},zA={class:"ui-slider__input-wrapper d-flex"},DA=["value"],WA={key:0,class:"ui-slider__error"},Zg=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 I=a.modelValue;return Number.isFinite(I)?I<a.min?`Min value: ${a.min}`:I>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(),B=t.ref();t.watch(()=>a.modelValue,I=>{u.value=I});function $(I){const V=Bt(I,a.min,a.max);return Math.round((V+Number.EPSILON)*(1/a.step))/(1/a.step)}Lr(B,I=>{var V;Ct((V=t.unref(N))==null?void 0:V.getBoundingClientRect(),P=>{const{dx:X}=I;l.deltaValue=X/P.width*c.value,u.value=$(Bt((a.modelValue??0)+l.deltaValue,a.min,a.max)),I.stop&&(o("update:modelValue",$(d.value)),l.deltaValue=0)})});function W(I){o("update:modelValue",$(I))}function E(I){W(+I.target.value)}function D(I){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(I.code)&&I.preventDefault();const V=I.code==="ArrowUp"||I.code==="ArrowRight"?a.step*1:I.code==="ArrowDown"||I.code==="ArrowLeft"?a.step*-1:0;W(a.modelValue+V)}return(I,V)=>(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",LA,[t.createElementVNode("div",OA,[I.label?(t.openBlock(),t.createElementBlock("label",$A,[t.createElementVNode("span",null,t.toDisplayString(I.label),1),V[1]||(V[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(I.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0),V[2]||(V[2]=t.createTextVNode()),a.mode==="text"?(t.openBlock(),t.createElementBlock("div",ZA,t.toDisplayString(u.value)+t.toDisplayString(I.measure),1)):t.createCommentVNode("",!0)]),V[6]||(V[6]=t.createTextVNode()),t.createElementVNode("div",MA,[t.createElementVNode("div",FA,[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)]),V[5]||(V[5]=t.createTextVNode()),t.createElementVNode("div",PA,[a.breakpoints?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(g),(P,X)=>(t.openBlock(),t.createElementBlock("div",{key:X,style:t.normalizeStyle({right:`${P}%`}),class:"ui-slider__thumb-step"},null,4))),128)):t.createCommentVNode("",!0),V[4]||(V[4]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"thumbRef",ref:B,tabindex:"0",class:"ui-slider__thumb ui-slider__thumb-active",style:t.normalizeStyle(C.value),onKeydown:D},V[3]||(V[3]=[t.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),V[7]||(V[7]=t.createTextVNode()),t.createElementVNode("div",zA,[a.mode==="input"?(t.openBlock(),t.createElementBlock("input",{key:0,value:u.value,class:"ui-slider__value text-s",onChange:V[0]||(V[0]=P=>E(P))},null,40,DA)):t.createCommentVNode("",!0)])],2),V[8]||(V[8]=t.createTextVNode()),f.value?(t.openBlock(),t.createElementBlock("div",WA,t.toDisplayString(f.value),1)):t.createCommentVNode("",!0)],2))}});function GA(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,
|
|
@@ -50,19 +50,19 @@ x1: ${y.x1}`)},f=function(g){d.style("top",g.pageY-10+"px").style("left",g.pageX
|
|
|
50
50
|
black ${y}px,
|
|
51
51
|
black ${_}px,
|
|
52
52
|
transparent 100%
|
|
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 Mg(n,e){Vm(()=>{vt(t.unref(n),r=>{Bm(r,()=>e(r))})}),t.onUnmounted(()=>{vt(t.unref(n),r=>{Tm(r)})})}const Gr={item:"sortable__item",animate:"sortable__animate"},Ii=n=>n.getBoundingClientRect().y,Fg=n=>{const{y:e,height:r}=n.getBoundingClientRect();return e+Math.ceil(r/2)},GA=n=>{const{y:e,height:r}=n.getBoundingClientRect();return e+r};function UA(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=GA(r.item.el),$=d(C),W=u(C);$.forEach(E=>{const D=Fg(E);N+a<D&&y(f(E,C))}),W.forEach(E=>{const D=Fg(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,Pg=n=>{const{y:e,height:r}=n.getBoundingClientRect();return e+Math.ceil(r/2)},HA=n=>{const{y:e,height:r}=n.getBoundingClientRect();return e+r};function zg(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),$=HA(r.item.el),W=u(N),E=f(N);if(W.forEach(D=>{const A=Pg(D);T+l<A&&_(m(D,N))}),E.forEach(D=>{const A=Pg(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 XA(n,e){let r;t.onMounted(()=>{r=setInterval(n,e)}),t.onUnmounted(()=>clearInterval(r))}function jA(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 YA(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 lm(()=>{const a=r();this.run(...a).catch(console.error)},o)}});return e.run=e.run.bind(e),e}function KA(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 JA(n){return t.computed(n)}const qA={class:"ui-slider__wrapper"},QA={class:"ui-slider__label-section"},eL={key:0,class:"text-s"},tL={class:"ui-slider__base"},nL={class:"ui-slider__container"},rL={class:"ui-slider__container ui-slider__container-thumb"},oL=["data-percent"],aL=["data-percent"],iL=["data-percent"],lL={key:0,class:"ui-slider__error"},sL=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",qA,[t.createElementVNode("div",QA,[Z.label?(t.openBlock(),t.createElementBlock("label",eL,[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",tL,[t.createElementVNode("div",nL,[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",rL,[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,oL),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,aL),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,iL)])])]),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",lL,t.toDisplayString(T.value),1)):t.createCommentVNode("",!0)],2))}}),cL={class:"ui-input-range__separator"},dL=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",cL,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))}}),uL={class:"ui-slider__wrapper"},pL={class:"ui-slider__label-section"},fL={key:0,class:"text-s"},mL={key:1,class:"ui-slider__value-static text-s"},hL={class:"ui-slider__base"},gL={class:"ui-slider__container"},yL={class:"ui-slider__container ui-slider__container-thumb"},bL={class:"ui-slider__input-wrapper d-flex"},_L={key:0,class:"ui-slider__error"},wL=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",uL,[t.createElementVNode("div",pL,[V.label?(t.openBlock(),t.createElementBlock("label",fL,[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",mL,t.toDisplayString(C.value),1)):t.createCommentVNode("",!0)]),k[10]||(k[10]=t.createTextVNode()),t.createElementVNode("div",hL,[t.createElementVNode("div",gL,[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",yL,[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",bL,[a.mode==="input"?(t.openBlock(),t.createBlock(dL,{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",_L,t.toDisplayString(W.value),1)):t.createCommentVNode("",!0)],2))}}),kL=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)}}),xL=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)}}),vL={class:"ui-scrollable"},CL=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){Vv(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 Mg(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",vL,[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(kL,{"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(xL,{"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"])]))}}),SL="add.svg",EL="box.svg",NL="calendar.svg",VL="checkmark.svg",BL="clipboard.svg",TL="close.svg",RL="copy.svg",IL="download.svg",AL="duplicate.svg",LL="edit.svg",OL="error.svg",$L="filter.svg",ZL="help.svg",ML="info.svg",FL="link.svg",PL="loading.svg",zL="lock.svg",DL="maximize.svg",WL="minimize.svg",GL="minus.svg",UL="more.svg",HL="open.svg",XL="pause.svg",jL="play.svg",YL="progress.svg",KL="renew.svg",JL="restart.svg",qL="reverse.svg",QL="settings.svg",eO="sort.svg",tO="stop.svg",nO="success.svg",rO="time.svg",oO="tune.svg",aO="warning.svg",iO="zip.svg",lO={add:SL,"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:EL,calendar:NL,"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:VL,"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:BL,close:TL,copy:RL,"data-dimentions":"data-dimentions.svg","delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg",download:IL,"drag-dots":"drag-dots.svg",duplicate:AL,edit:LL,error:OL,export:"export.svg","filter-on":"filter-on.svg",filter:$L,"help-outline":"help-outline.svg",help:ZL,"info-outline":"info-outline.svg",info:ML,"jump-link":"jump-link.svg",link:FL,loading:PL,lock:zL,maximize:DL,minimize:WL,minus:GL,more:UL,open:HL,"paper-clip":"paper-clip.svg",pause:XL,play:jL,progress:YL,renew:KL,restart:JL,reverse:qL,settings:QL,sort:eO,stop:tO,success:nO,time:rO,tune:oO,warning:aO,"x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:iO},sO="add.svg",cO="annotate.svg",dO="annotation.svg",uO="area.svg",pO="axes.svg",fO="bar.svg",mO="bindot.svg",hO="box.svg",gO="boxplot.svg",yO="bubble.svg",bO="calendar.svg",_O="canvas.svg",wO="checkbox.svg",kO="checkmark.svg",xO="clipboard.svg",vO="close.svg",CO="cluster.svg",SO="code.svg",EO="color.svg",NO="columns.svg",VO="container.svg",BO="cookie.svg",TO="copy.svg",RO="cpu.svg",IO="debug.svg",AO="dna.svg",LO="download.svg",OO="duplicate.svg",$O="edit.svg",ZO="error.svg",MO="filter.svg",FO="generate.svg",PO="graph.svg",zO="heatmap.svg",DO="help.svg",WO="info.svg",GO="jitter.svg",UO="lasso.svg",HO="layers.svg",XO="learn.svg",jO="legend.svg",YO="line.svg",KO="link.svg",JO="loading.svg",qO="lock.svg",QO="maximize.svg",e$="menu.svg",t$="minimize.svg",n$="minus.svg",r$="monetization.svg",o$="more.svg",a$="pause.svg",i$="pin.svg",l$="play.svg",s$="product.svg",c$="progress.svg",d$="publications.svg",u$="renew.svg",p$="restart.svg",f$="reverse.svg",m$="search.svg",h$="server.svg",g$="settings.svg",y$="sina.svg",b$="skatterplot.svg",_$="slice.svg",w$="sort.svg",k$="statistics.svg",x$="stop.svg",v$="success.svg",C$="table.svg",S$="template.svg",E$="terminal.svg",N$="time.svg",V$="tune.svg",B$="venn.svg",T$="violin.svg",R$="warning.svg",I$="wetlab.svg",A$="zip.svg",L$={"add-layer":"add-layer.svg",add:sO,"align-center":"align-center.svg","align-left":"align-left.svg","align-right":"align-right.svg",annotate:cO,annotation:dO,area:uO,"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:pO,"bar-cross":"bar-cross.svg","bar-error":"bar-error.svg","bar-stacked":"bar-stacked.svg","bar-trend":"bar-trend.svg",bar:fO,bindot:mO,box:hO,"boxplot-binned":"boxplot-binned.svg","boxplot-jitter":"boxplot-jitter.svg","boxplot-notched":"boxplot-notched.svg",boxplot:gO,bubble:yO,calendar:bO,canvas:_O,"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:wO,checkmark:kO,"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:xO,close:vO,"cloud-download":"cloud-download.svg","cloud-offline":"cloud-offline.svg","cloud-online":"cloud-online.svg","cloud-upload":"cloud-upload.svg",cluster:CO,code:SO,"color-fill":"color-fill.svg","color-none":"color-none.svg","color-stroke":"color-stroke.svg",color:EO,columns:NO,"connected-points":"connected-points.svg",container:VO,cookie:BO,copy:TO,cpu:RO,"data-dimentions":"data-dimentions.svg",debug:IO,"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:AO,download:LO,"drag-dots":"drag-dots.svg","drag-horizontal":"drag-horizontal.svg","drag-vertical":"drag-vertical.svg",duplicate:OO,edit:$O,"error-bar":"error-bar.svg",error:ZO,"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:MO,"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:FO,graph:PO,heatmap:zO,"help-outline":"help-outline.svg",help:DO,"info-outline":"info-outline.svg",info:WO,jitter:GO,"jump-link":"jump-link.svg",lasso:UO,layers:HO,learn:XO,"legend-box-dot":"legend-box-dot.svg","legend-box":"legend-box.svg",legend:jO,"line-binned":"line-binned.svg","line-error":"line-error.svg","line-jitter":"line-jitter.svg",line:YO,"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:KO,loading:JO,lock:qO,maximize:QO,menu:e$,minimize:t$,minus:n$,"monetization-off":"monetization-off.svg","monetization-on":"monetization-on.svg",monetization:r$,more:o$,"paper-clip":"paper-clip.svg",pause:a$,pin:i$,play:l$,"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:s$,progress:c$,publications:d$,"radio-button-checked":"radio-button-checked.svg","radio-button":"radio-button.svg",renew:u$,restart:p$,reverse:f$,"rotation-0":"rotation-0.svg","rotation-45":"rotation-45.svg","rotation-90":"rotation-90.svg",search:m$,"server-on":"server-on.svg",server:h$,settings:g$,sina:y$,skatterplot:b$,slice:_$,"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:w$,statistics:k$,stop:x$,"strip-plot":"strip-plot.svg",success:v$,"table-add":"table-add.svg","table-alias":"table-alias.svg","table-import":"table-import.svg",table:C$,template:S$,terminal:E$,"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:N$,tune:V$,venn:B$,"view-hide":"view-hide.svg","view-show":"view-show.svg","violin-binned":"violin-binned.svg","violin-jitter":"violin-jitter.svg",violin:T$,warning:R$,wetlab:I$,"windows-collapse":"windows-collapse.svg","windows-expand":"windows-expand.svg","x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:A$,"zoom-in":"zoom-in.svg","zoom-out":"zoom-out.svg"};function O$(){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 $$=["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"],Z$=["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"],M$={allCssVariables:O$(),icons16:lO,icons24:L$},F$={class:"block__not-found"},P$=t.defineComponent({__name:"NotFound",setup(n){const r=vl().useApp(),o=()=>{r.updateNavigationState(a=>{a.href="/"})};return(a,l)=>(t.openBlock(),t.createElementBlock("div",F$,[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},z$={},D$={class:"block__loader-page"};function W$(n,e){return t.openBlock(),t.createElementBlock("div",D$,e[0]||(e[0]=[t.createElementVNode("div",{class:"loader-container"},[t.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"})],-1)]))}const G$=mr(z$,[["render",W$]]),U$={class:"pl-app-notification-alert"},H$={class:"pl-app-notification-alert__content"},X$={class:"pl-app-notification-alert__title"},j$=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",U$,[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",H$,[(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",X$,"Block output: "+t.toDisplayString(u[0]),1),t.createVNode(t.unref(ah),{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(mh),{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(bm))]),default:t.withCtx(()=>[d[4]||(d[4]=t.createTextVNode(" Some outputs have errors. "))]),_:1},8,["modelValue"])]))}}),Y$={key:0,class:"block__loader"},K$=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",Y$)):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 J$(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 q$=pe.literal("trial"),Q$=pe.literal("free"),e5=pe.literal("single_payment"),t5=pe.literal("subscription"),n5=pe.union([q$,Q$,e5,t5,pe.literal("base")]),r5=pe.object({type:pe.union([pe.literal("unique_launches"),pe.literal("volume_limit")]),used:pe.number(),toSpend:pe.number(),available:pe.number().nullable()}),o5=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:n5.optional(),endOfBillingPeriod:pe.string().nullable().optional(),limits:pe.array(r5).optional()})},{message:"Invalid DryRunResult"}),a5=pe.object({httpError:pe.string().optional(),response:pe.object({result:o5.optional(),error:pe.unknown().optional()}).optional()}).optional();function i5(){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 a5.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&&Aw(N,6e4),{hasMonetization:r,result:f,error:l,canRun:m,status:g,customerEmail:y,endOfBillingPeriod:_,limits:C,refresh:N,version:u,isLoading:d}}const l5=["title"],s5=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,l5),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"}}]]),c5=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"}}]]),d5={key:0},u5={key:1},p5=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",d5,[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",u5,"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"}}]]),f5=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"}}]]),m5=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}=i5(),y=J$(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(c5,{"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(s5,{key:1,"user-cabinet-url":C.value},null,8,["user-cabinet-url"])):t.createCommentVNode("",!0),t.unref(u)?(t.openBlock(),t.createBlock(f5,{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(p5,{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))}}),h5={class:"block block__layout"},g5={key:0},y5=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",h5,[t.createVNode(K$,{value:u.value},null,8,["value"]),t.unref(e).error?(t.openBlock(),t.createElementBlock("div",g5,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(P$,{key:3})):(t.openBlock(),t.createBlock(G$,{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(j$),{key:4,errors:c.value},null,8,["errors"])):t.createCommentVNode("",!0)]),a.value?(t.openBlock(),t.createBlock(t.unref(m5),{key:0})):t.createCommentVNode("",!0)],64))}});var _s={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 Mg(n,e){Vm(()=>{Ct(t.unref(n),r=>{Bm(r,()=>e(r))})}),t.onUnmounted(()=>{Ct(t.unref(n),r=>{Tm(r)})})}const Gr={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 HA(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),B=N.indexOf(_);return N.splice(B,0,C),N}function m(_,C){const N=r.options().filter($=>$!==C),B=N.indexOf(_);return N.splice(B+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 B=_.map(V=>Ai(V)),$=Ai(N);(C=n.value)==null||C.replaceChildren(..._);const W=Ai(N),E=_.map(V=>Ai(V)),D=[];for(let V=0;V<E.length;V++){const P=_[V];if(P===r.item.el)continue;const X=E[V],S=B[V]-X;P.style.transform=`translateY(${S}px)`,D.push(P)}const I=W-$;r.item.y=r.item.y+I,r.item.dy=r.item.dy-I,r.item.orderChanged=!0,r.item.el.style.setProperty("transform",`translateY(${r.item.dy}px)`),D.forEach(V=>V.classList.remove(Gr.animate)),requestAnimationFrame(function(){D.forEach(V=>{V.classList.add(Gr.animate),V.style.transform="",V.addEventListener("transitionend",()=>{V.classList.remove(Gr.animate)})})})}ot(window,"mousemove",_=>{if(!r.item)return;const{el:C}=r.item;g(r.item,_.y);const N=Ai(r.item.el),B=UA(r.item.el),$=d(C),W=u(C);$.forEach(E=>{const D=Fg(E);N+a<D&&y(f(E,C))}),W.forEach(E=>{const D=Fg(E);B-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"))),B=n.value;if(B){for(const $ of r.options())B.removeChild($);o.value.forEach($=>{B.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"},Li=n=>n.getBoundingClientRect().y,Pg=n=>{const{y:e,height:r}=n.getBoundingClientRect();return e+Math.ceil(r/2)},XA=n=>{const{y:e,height:r}=n.getBoundingClientRect();return e+r};function zg(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 B=e.handle?this.querySelector(e.handle):null;B&&(B&&!B.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 B=r.options().filter(W=>W!==N),$=B.indexOf(C);return B.splice($,0,N),B}function g(C,N){const B=r.options().filter(W=>W!==N),$=B.indexOf(C);return B.splice($+1,0,N),B}function y(C,N){var B;const $=(((B=n.value)==null?void 0:B.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:B}=r.item;if(!B.isConnected){r.item=void 0;return}const $=C.map(P=>Li(P)),W=Li(B);(N=n.value)==null||N.replaceChildren(...C);const E=Li(B),D=C.map(P=>Li(P)),I=[];for(let P=0;P<D.length;P++){const X=C[P];if(X===r.item.el)continue;const S=D[P],R=$[P]-S;X.style.transform=`translateY(${R}px)`,I.push(X)}const V=E-W;r.item.y=r.item.y+V,r.item.dy=r.item.dy-V,r.item.orderChanged=!0,r.item.el.style.setProperty("transform",`translateY(${r.item.dy}px)`),I.forEach(P=>P.classList.remove(Ur.animate)),requestAnimationFrame(function(){I.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 B=Li(r.item.el),$=XA(r.item.el),W=u(N),E=f(N);if(W.forEach(D=>{const I=Pg(D);B+l<I&&_(m(D,N))}),E.forEach(D=>{const I=Pg(D);$-l>I&&_(g(D,N))}),n.value){const D=n.value.getBoundingClientRect(),I=D.top+N.getBoundingClientRect().height/2;C.clientY<I&&(n.value.scrollTop+=C.clientY-I);const V=D.bottom-N.getBoundingClientRect().height/2;C.clientY>V&&(n.value.scrollTop+=C.clientY-V)}}),ot(window,"mouseup",()=>{var C;if(!r.item)return;o=((C=n.value)==null?void 0:C.scrollTop)||0;const{el:N,orderChanged:B}=r.item;N.classList.add(Ur.animate),N.style.removeProperty("transform"),N.addEventListener("transitionend",()=>{N.classList.remove(Ur.animate,Ur.item)}),setTimeout(()=>{if(!B)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 jA(n,e){let r;t.onMounted(()=>{r=setInterval(n,e)}),t.onUnmounted(()=>clearInterval(r))}function YA(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 KA(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 lm(()=>{const a=r();this.run(...a).catch(console.error)},o)}});return e.run=e.run.bind(e),e}function JA(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 qA(n){return t.computed(n)}const QA={class:"ui-slider__wrapper"},eL={class:"ui-slider__label-section"},tL={key:0,class:"text-s"},nL={class:"ui-slider__base"},rL={class:"ui-slider__container"},oL={class:"ui-slider__container ui-slider__container-thumb"},aL=["data-percent"],iL=["data-percent"],lL=["data-percent"],sL={key:0,class:"ui-slider__error"},cL=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)),B=t.computed(()=>{const L=a.modelValue;if(!(Array.isArray(L)&&L.length===3&&L.every(Z=>Number.isFinite(Z))))return"Expected model [number, number, number]";const G=[];return[...a.modelValue].forEach(Z=>{Z>a.max&&G.push(`Max model value must be lower than max props ${a.max}.`),Z<a.min&&G.push("Min model value must be greater than max props.")}),G.length>0?G.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(()=>R()),I=t.computed(()=>({right:D.value[0]+"%",left:100-D.value[2]+"%"})),V=t.computed(()=>({right:Math.ceil((1-$.value)*100)+"%"})),P=t.computed(()=>({right:Math.ceil((1-W.value)*100)+"%"})),X=t.computed(()=>({right:Math.ceil((1-E.value)*100)+"%"}));Lr(d,L=>{var G;Ct((G=t.unref(c))==null?void 0:G.getBoundingClientRect(),Z=>{const{dx:j}=L;l.deltaValue1=j/Z.width*m.value,d.value&&S(d.value,a.modelValue[0],l.deltaValue1),L.stop&&(M([A(_.value),A(C.value),A(N.value)]),l.deltaValue1=0)})}),Lr(u,L=>{var G;Ct((G=t.unref(c))==null?void 0:G.getBoundingClientRect(),Z=>{const{dx:j}=L;l.deltaValue2=j/Z.width*m.value,u.value&&S(u.value,a.modelValue[1],l.deltaValue2),L.stop&&(M([A(_.value),A(C.value),A(N.value)]),l.deltaValue2=0)})}),Lr(f,L=>{var G;Ct((G=t.unref(c))==null?void 0:G.getBoundingClientRect(),Z=>{const{dx:j}=L;l.deltaValue3=j/Z.width*m.value,f.value&&S(f.value,a.modelValue[2],l.deltaValue3),L.stop&&(M([A(_.value),A(C.value),A(N.value)]),l.deltaValue3=0)})});function S(L,G,Z){const j=A(Bt((G??0)+Z,a.min,a.max));L.dataset.percent=`${j}${a.measure}`,v()}function R(){const L=Math.ceil((1-$.value)*100),G=Math.ceil((1-W.value)*100),Z=Math.ceil((1-E.value)*100);return[L,G,Z].sort((j,ee)=>j-ee)}function A(L){const G=Bt(L,a.min,a.max);return Math.round((G+Number.EPSILON)*(1/a.step))/(1/a.step)}function M(L){o("update:modelValue",L)}function v(){const L=Number(V.value.right.substring(0,V.value.right.length-1)),G=Number(P.value.right.substring(0,P.value.right.length-1)),Z=Number(X.value.right.substring(0,X.value.right.length-1)),j=[{r:L,th:d},{r:G,th:u},{r:Z,th:f}].sort((ee,ce)=>ee.r-ce.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 w(L,G){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(L.code)&&L.preventDefault();const Z=L.code==="ArrowUp"||L.code==="ArrowRight"?a.step*1:L.code==="ArrowDown"||L.code==="ArrowLeft"?a.step*-1:0,j=[...a.modelValue];j[G]=Bt(j[G]+Z,a.min,a.max),M(j),v()}return t.onMounted(()=>{v()}),(L,G)=>(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",QA,[t.createElementVNode("div",eL,[L.label?(t.openBlock(),t.createElementBlock("label",tL,[t.createElementVNode("span",null,t.toDisplayString(L.label),1),G[3]||(G[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(L.$slots,"tooltip")]),_:3})):t.createCommentVNode("",!0)])):t.createCommentVNode("",!0)]),G[11]||(G[11]=t.createTextVNode()),t.createElementVNode("div",nL,[t.createElementVNode("div",rL,[t.createElementVNode("div",{ref_key:"barRef",ref:c,class:"ui-slider__bar"},[t.createElementVNode("div",{class:"ui-slider__progress",style:t.normalizeStyle(I.value)},null,4)],512)]),G[10]||(G[10]=t.createTextVNode()),t.createElementVNode("div",oL,[a.breakpoints?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(y),(Z,j)=>(t.openBlock(),t.createElementBlock("div",{key:j,style:t.normalizeStyle({right:`${Z}%`}),class:"ui-slider__thumb-step"},null,4))),128)):t.createCommentVNode("",!0),G[7]||(G[7]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"thumbRef1",ref:d,style:t.normalizeStyle(V.value),"data-percent":a.modelValue[0]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r1:"",tabindex:"0",onKeydown:G[0]||(G[0]=Z=>w(Z,0))},G[4]||(G[4]=[t.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,aL),G[8]||(G[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:G[1]||(G[1]=Z=>w(Z,1))},G[5]||(G[5]=[t.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,iL),G[9]||(G[9]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"thumbRef3",ref:f,style:t.normalizeStyle(X.value),"data-percent":a.modelValue[2]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r3:"",tabindex:"0",onKeydown:G[2]||(G[2]=Z=>w(Z,2))},G[6]||(G[6]=[t.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,lL)])])]),G[12]||(G[12]=t.createTextVNode()),G[13]||(G[13]=t.createElementVNode("div",{class:"ui-slider__input-wrapper d-flex"},null,-1))],2),G[14]||(G[14]=t.createTextVNode()),B.value?(t.openBlock(),t.createElementBlock("div",sL,t.toDisplayString(B.value),1)):t.createCommentVNode("",!0)],2))}}),dL={class:"ui-input-range__separator"},uL=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",dL,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))}}),pL={class:"ui-slider__wrapper"},fL={class:"ui-slider__label-section"},mL={key:0,class:"text-s"},hL={key:1,class:"ui-slider__value-static text-s"},gL={class:"ui-slider__base"},yL={class:"ui-slider__container"},bL={class:"ui-slider__container ui-slider__container-thumb"},_L={class:"ui-slider__input-wrapper d-flex"},wL={key:0,class:"ui-slider__error"},kL=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,w)=>v-w).join("-")),N=t.computed(()=>a.max-a.min),B=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(w=>Number.isFinite(w))?a.error:"Expected model [number, number]"}),E=t.computed(()=>(B.value-a.min)/N.value),D=t.computed(()=>($.value-a.min)/N.value),I=t.computed(()=>S()),V=t.computed(()=>({right:I.value[0]+"%",left:100-I.value[1]+"%"})),P=t.computed(()=>({right:Math.ceil((1-E.value)*100)+"%"})),X=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 w;Ct((w=t.unref(c))==null?void 0:w.getBoundingClientRect(),L=>{const{dx:G}=v;l.deltaValue1=G/L.width*N.value,m.value=R(Bt((a.modelValue[0]??0)+l.deltaValue1,a.min,a.max)),f.value=[m.value,g.value].sort((Z,j)=>Z-j),v.stop&&(A([R(B.value),R($.value)]),l.deltaValue1=0)})}),Lr(u,v=>{var w;Ct((w=t.unref(c))==null?void 0:w.getBoundingClientRect(),L=>{const{dx:G}=v;l.deltaValue2=G/L.width*N.value,g.value=R(Bt((a.modelValue[1]??0)+l.deltaValue2,a.min,a.max)),f.value=[m.value,g.value].sort((Z,j)=>Z-j),v.stop&&(A([R(B.value),R($.value)]),l.deltaValue2=0)})});function S(){const v=Math.ceil((1-E.value)*100),w=Math.ceil((1-D.value)*100);return[v,w].sort((L,G)=>L-G)}function R(v){const w=Bt(v,a.min,a.max);return Math.round((w+Number.EPSILON)*(1/a.step))/(1/a.step)}function A(v){o("update:modelValue",v)}function M(v,w){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(v.code)&&v.preventDefault();const L=v.code==="ArrowUp"||v.code==="ArrowRight"?a.step*1:v.code==="ArrowDown"||v.code==="ArrowLeft"?a.step*-1:0,G=[...a.modelValue];G[w]=Bt(G[w]+L,a.min,a.max),A(G)}return(v,w)=>(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",pL,[t.createElementVNode("div",fL,[v.label?(t.openBlock(),t.createElementBlock("label",mL,[t.createElementVNode("span",null,t.toDisplayString(v.label),1),w[3]||(w[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),w[4]||(w[4]=t.createTextVNode()),a.mode==="text"?(t.openBlock(),t.createElementBlock("div",hL,t.toDisplayString(C.value),1)):t.createCommentVNode("",!0)]),w[10]||(w[10]=t.createTextVNode()),t.createElementVNode("div",gL,[t.createElementVNode("div",yL,[t.createElementVNode("div",{ref_key:"barRef",ref:c,class:"ui-slider__bar"},[t.createElementVNode("div",{class:"ui-slider__progress",style:t.normalizeStyle(V.value)},null,4)],512)]),w[9]||(w[9]=t.createTextVNode()),t.createElementVNode("div",bL,[a.breakpoints?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(_),(L,G)=>(t.openBlock(),t.createElementBlock("div",{key:G,style:t.normalizeStyle({right:`${L}%`}),class:"ui-slider__thumb-step"},null,4))),128)):t.createCommentVNode("",!0),w[7]||(w[7]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"thumbRef1",ref:d,style:t.normalizeStyle(P.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:w[0]||(w[0]=L=>M(L,0))},w[5]||(w[5]=[t.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36),w[8]||(w[8]=t.createTextVNode()),t.createElementVNode("div",{ref_key:"thumbRef2",ref:u,style:t.normalizeStyle(X.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:w[1]||(w[1]=L=>M(L,1))},w[6]||(w[6]=[t.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),w[11]||(w[11]=t.createTextVNode()),t.createElementVNode("div",_L,[a.mode==="input"?(t.openBlock(),t.createBlock(uL,{key:0,modelValue:f.value,"onUpdate:modelValue":w[2]||(w[2]=L=>f.value=L),class:"ui-focused-border",onChange:A},null,8,["modelValue"])):t.createCommentVNode("",!0)])],2),w[12]||(w[12]=t.createTextVNode()),W.value?(t.openBlock(),t.createElementBlock("div",wL,t.toDisplayString(W.value),1)):t.createCommentVNode("",!0)],2))}}),xL=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=vd(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)}}),CL=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=vd(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)}}),vL={class:"ui-scrollable"},SL=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){BC(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){Ct(t.unref(e),u=>{u.scrollTop=d,o(u)})}function c(d){Ct(t.unref(e),u=>{u.scrollLeft=d,o(u)})}return Mg(e,d=>{Ct(d,u=>o(u))}),t.onMounted(()=>{Ct(t.unref(e),d=>{o(d),d.addEventListener("wheel",a)})}),t.onUnmounted(()=>{Ct(t.unref(e),d=>d.removeEventListener("wheel",a))}),(d,u)=>(t.openBlock(),t.createElementBlock("div",vL,[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(xL,{"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(CL,{"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"])]))}}),EL="add.svg",NL="box.svg",VL="calendar.svg",BL="checkmark.svg",TL="clipboard.svg",RL="close.svg",IL="copy.svg",AL="download.svg",LL="duplicate.svg",OL="edit.svg",$L="error.svg",ZL="filter.svg",ML="help.svg",FL="info.svg",PL="link.svg",zL="loading.svg",DL="lock.svg",WL="maximize.svg",GL="minimize.svg",UL="minus.svg",HL="more.svg",XL="open.svg",jL="pause.svg",YL="play.svg",KL="progress.svg",JL="renew.svg",qL="restart.svg",QL="reverse.svg",eO="settings.svg",tO="sort.svg",nO="stop.svg",rO="success.svg",oO="time.svg",aO="tune.svg",iO="warning.svg",lO="zip.svg",sO={add:EL,"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:NL,calendar:VL,"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:BL,"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:TL,close:RL,copy:IL,"data-dimentions":"data-dimentions.svg","delete-bin":"delete-bin.svg","delete-circle":"delete-circle.svg","delete-clear":"delete-clear.svg",download:AL,"drag-dots":"drag-dots.svg",duplicate:LL,edit:OL,error:$L,export:"export.svg","filter-on":"filter-on.svg",filter:ZL,"help-outline":"help-outline.svg",help:ML,"info-outline":"info-outline.svg",info:FL,"jump-link":"jump-link.svg",link:PL,loading:zL,lock:DL,maximize:WL,minimize:GL,minus:UL,more:HL,open:XL,"paper-clip":"paper-clip.svg",pause:jL,play:YL,progress:KL,renew:JL,restart:qL,reverse:QL,settings:eO,sort:tO,stop:nO,success:rO,time:oO,tune:aO,warning:iO,"x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:lO},cO="add.svg",dO="annotate.svg",uO="annotation.svg",pO="area.svg",fO="axes.svg",mO="bar.svg",hO="bindot.svg",gO="box.svg",yO="boxplot.svg",bO="bubble.svg",_O="calendar.svg",wO="canvas.svg",kO="checkbox.svg",xO="checkmark.svg",CO="clipboard.svg",vO="close.svg",SO="cluster.svg",EO="code.svg",NO="color.svg",VO="columns.svg",BO="container.svg",TO="cookie.svg",RO="copy.svg",IO="cpu.svg",AO="debug.svg",LO="dna.svg",OO="download.svg",$O="duplicate.svg",ZO="edit.svg",MO="error.svg",FO="filter.svg",PO="generate.svg",zO="graph.svg",DO="heatmap.svg",WO="help.svg",GO="info.svg",UO="jitter.svg",HO="lasso.svg",XO="layers.svg",jO="learn.svg",YO="legend.svg",KO="line.svg",JO="link.svg",qO="loading.svg",QO="lock.svg",e$="maximize.svg",t$="menu.svg",n$="minimize.svg",r$="minus.svg",o$="monetization.svg",a$="more.svg",i$="pause.svg",l$="pin.svg",s$="play.svg",c$="product.svg",d$="progress.svg",u$="publications.svg",p$="renew.svg",f$="restart.svg",m$="reverse.svg",h$="search.svg",g$="server.svg",y$="settings.svg",b$="sina.svg",_$="skatterplot.svg",w$="slice.svg",k$="sort.svg",x$="statistics.svg",C$="stop.svg",v$="success.svg",S$="table.svg",E$="template.svg",N$="terminal.svg",V$="time.svg",B$="tune.svg",T$="venn.svg",R$="violin.svg",I$="warning.svg",A$="wetlab.svg",L$="zip.svg",O$={"add-layer":"add-layer.svg",add:cO,"align-center":"align-center.svg","align-left":"align-left.svg","align-right":"align-right.svg",annotate:dO,annotation:uO,area:pO,"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:fO,"bar-cross":"bar-cross.svg","bar-error":"bar-error.svg","bar-stacked":"bar-stacked.svg","bar-trend":"bar-trend.svg",bar:mO,bindot:hO,box:gO,"boxplot-binned":"boxplot-binned.svg","boxplot-jitter":"boxplot-jitter.svg","boxplot-notched":"boxplot-notched.svg",boxplot:yO,bubble:bO,calendar:_O,canvas:wO,"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:kO,checkmark:xO,"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:CO,close:vO,"cloud-download":"cloud-download.svg","cloud-offline":"cloud-offline.svg","cloud-online":"cloud-online.svg","cloud-upload":"cloud-upload.svg",cluster:SO,code:EO,"color-fill":"color-fill.svg","color-none":"color-none.svg","color-stroke":"color-stroke.svg",color:NO,columns:VO,"connected-points":"connected-points.svg",container:BO,cookie:TO,copy:RO,cpu:IO,"data-dimentions":"data-dimentions.svg",debug:AO,"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:LO,download:OO,"drag-dots":"drag-dots.svg","drag-horizontal":"drag-horizontal.svg","drag-vertical":"drag-vertical.svg",duplicate:$O,edit:ZO,"error-bar":"error-bar.svg",error:MO,"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:FO,"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:PO,graph:zO,heatmap:DO,"help-outline":"help-outline.svg",help:WO,"info-outline":"info-outline.svg",info:GO,jitter:UO,"jump-link":"jump-link.svg",lasso:HO,layers:XO,learn:jO,"legend-box-dot":"legend-box-dot.svg","legend-box":"legend-box.svg",legend:YO,"line-binned":"line-binned.svg","line-error":"line-error.svg","line-jitter":"line-jitter.svg",line:KO,"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:JO,loading:qO,lock:QO,maximize:e$,menu:t$,minimize:n$,minus:r$,"monetization-off":"monetization-off.svg","monetization-on":"monetization-on.svg",monetization:o$,more:a$,"paper-clip":"paper-clip.svg",pause:i$,pin:l$,play:s$,"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:c$,progress:d$,publications:u$,"radio-button-checked":"radio-button-checked.svg","radio-button":"radio-button.svg",renew:p$,restart:f$,reverse:m$,"rotation-0":"rotation-0.svg","rotation-45":"rotation-45.svg","rotation-90":"rotation-90.svg",search:h$,"server-on":"server-on.svg",server:g$,settings:y$,sina:b$,skatterplot:_$,slice:w$,"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:k$,statistics:x$,stop:C$,"strip-plot":"strip-plot.svg",success:v$,"table-add":"table-add.svg","table-alias":"table-alias.svg","table-import":"table-import.svg",table:S$,template:E$,terminal:N$,"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:V$,tune:B$,venn:T$,"view-hide":"view-hide.svg","view-show":"view-show.svg","violin-binned":"violin-binned.svg","violin-jitter":"violin-jitter.svg",violin:R$,warning:I$,wetlab:A$,"windows-collapse":"windows-collapse.svg","windows-expand":"windows-expand.svg","x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:L$,"zoom-in":"zoom-in.svg","zoom-out":"zoom-out.svg"};function $$(){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 Z$=["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"],M$=["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"],F$={allCssVariables:$$(),icons16:sO,icons24:O$},P$={class:"block__not-found"},z$=t.defineComponent({__name:"NotFound",setup(n){const r=vl().useApp(),o=()=>{r.updateNavigationState(a=>{a.href="/"})};return(a,l)=>(t.openBlock(),t.createElementBlock("div",P$,[t.createElementVNode("h1",null,"Not found route: "+t.toDisplayString(t.unref(r).snapshot.navigationState.href),1),t.createVNode(t.unref(ai),{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},D$={},W$={class:"block__loader-page"};function G$(n,e){return t.openBlock(),t.createElementBlock("div",W$,e[0]||(e[0]=[t.createElementVNode("div",{class:"loader-container"},[t.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"})],-1)]))}const U$=mr(D$,[["render",G$]]),H$={class:"pl-app-notification-alert"},X$={class:"pl-app-notification-alert__content"},j$={class:"pl-app-notification-alert__title"},Y$=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",H$,[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",X$,[(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",j$,"Block output: "+t.toDisplayString(u[0]),1),t.createVNode(t.unref(ah),{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(mh),{modelValue:o.value,"onUpdate:modelValue":d[1]||(d[1]=u=>o.value=u),type:"error",closable:""},{actions:t.withCtx(()=>[t.createVNode(t.unref(Il),{icon:"arrow-right",onClick:l},{default:t.withCtx(()=>d[3]||(d[3]=[t.createTextVNode("See errors")])),_:1}),t.createVNode(t.unref(bm))]),default:t.withCtx(()=>[d[4]||(d[4]=t.createTextVNode(" Some outputs have errors. "))]),_:1},8,["modelValue"])]))}}),K$={key:0,class:"block__loader"},J$=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",K$)):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 q$(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 Q$=pe.literal("trial"),e5=pe.literal("free"),t5=pe.literal("single_payment"),n5=pe.literal("subscription"),r5=pe.union([Q$,e5,t5,n5,pe.literal("base")]),o5=pe.object({type:pe.union([pe.literal("unique_launches"),pe.literal("volume_limit")]),used:pe.number(),toSpend:pe.number(),available:pe.number().nullable()}),a5=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:r5.optional(),endOfBillingPeriod:pe.string().nullable().optional(),limits:pe.array(o5).optional()})},{message:"Invalid DryRunResult"}),i5=pe.object({httpError:pe.string().optional(),response:pe.object({result:a5.optional(),error:pe.unknown().optional()}).optional()}).optional();function l5(){const n=vl(),e=t.computed(()=>n.loaded?n.useApp():void 0),r=t.computed(()=>{var B,$;return"__mnzDate"in(($=(B=e.value)==null?void 0:B.model)==null?void 0:$.args)}),o=t.computed(()=>{var B;return i5.safeParse((B=e.value)==null?void 0:B.model.outputs.__mnzInfo)}),a=t.computed(()=>{var B;return(B=o.value)==null?void 0:B.data}),l=t.computed(()=>{var B,$,W;return((B=o.value)==null?void 0:B.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],([B])=>{if(B){c.value=B;const $=++u.value;setTimeout(()=>{u.value===$&&(d.value=!1)},1e3)}},{immediate:!0});const f=t.computed(()=>{var B,$;return($=(B=c.value)==null?void 0:B.response)==null?void 0:$.result}),m=t.computed(()=>{var B;return!!((B=f.value)!=null&&B.canRun)}),g=t.computed(()=>{var B;return a.value?(B=f.value)==null?void 0:B.status:"awaiting"}),y=t.computed(()=>{var B;return(B=f.value)==null?void 0:B.customerEmail}),_=t.computed(()=>{var B;return(B=f.value)==null?void 0:B.mnz.endOfBillingPeriod}),C=t.computed(()=>{var B;return(B=f.value)==null?void 0:B.mnz.limits}),N=()=>{var B;d.value=!0,((B=e.value)==null?void 0:B.model.args).__mnzDate=new Date().toISOString()};return t.watch(m,B=>{var $;r.value&&((($=e.value)==null?void 0:$.model.args).__mnzCanRun=B)}),r.value&&Lw(N,6e4),{hasMonetization:r,result:f,error:l,canRun:m,status:g,customerEmail:y,endOfBillingPeriod:_,limits:C,refresh:N,version:u,isLoading:d}}const s5=["title"],c5=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,s5),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"}}]]),d5=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"}}]]),u5={key:0},p5={key:1},f5=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",u5,[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",p5,"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"}}]]),m5=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"}}]]),h5=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}=l5(),y=q$(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}]:[]),B=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(d5,{"can-run":t.unref(l),"status-text":B.value},{default:t.withCtx(()=>[t.createVNode(t.unref(ai),{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(c5,{key:1,"user-cabinet-url":C.value},null,8,["user-cabinet-url"])):t.createCommentVNode("",!0),t.unref(u)?(t.openBlock(),t.createBlock(m5,{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(f5,{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))}}),g5={class:"block block__layout"},y5={key:0},b5=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",g5,[t.createVNode(J$,{value:u.value},null,8,["value"]),t.unref(e).error?(t.openBlock(),t.createElementBlock("div",y5,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(z$,{key:3})):(t.openBlock(),t.createBlock(U$,{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(Y$),{key:4,errors:c.value},null,8,["errors"])):t.createCommentVNode("",!0)]),a.value?(t.openBlock(),t.createBlock(t.unref(h5),{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
|
-
*/_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]",AF="[object AsyncFunction]",zi="[object Boolean]",Di="[object Date]",LF="[object DOMException]",Hs="[object Error]",Xs="[object Function]",h0="[object GeneratorFunction]",Fn="[object Map]",Wi="[object Number]",OF="[object Null]",gr="[object Object]",g0="[object Promise]",$F="[object Proxy]",Gi="[object RegExp]",Pn="[object Set]",Ui="[object String]",js="[object Symbol]",ZF="[object Undefined]",Hi="[object WeakMap]",MF="[object WeakSet]",Xi="[object ArrayBuffer]",_a="[object DataView]",op="[object Float32Array]",ap="[object Float64Array]",ip="[object Int8Array]",lp="[object Int16Array]",sp="[object Int32Array]",cp="[object Uint8Array]",dp="[object Uint8ClampedArray]",up="[object Uint16Array]",pp="[object Uint32Array]",FF=/\b__p \+= '';/g,PF=/\b(__p \+=) '' \+/g,zF=/(__e\(.*?\)|\b__t\)) \+\n'';/g,y0=/&(?:amp|lt|gt|quot|#39);/g,b0=/[&<>"']/g,DF=RegExp(y0.source),WF=RegExp(b0.source),GF=/<%-([\s\S]+?)%>/g,UF=/<%([\s\S]+?)%>/g,_0=/<%=([\s\S]+?)%>/g,HF=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,XF=/^\w*$/,jF=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fp=/[\\^$.*+?()[\]{}|]/g,YF=RegExp(fp.source),mp=/^\s+/,KF=/\s/,JF=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,qF=/\{\n\/\* \[wrapped with (.+)\] \*/,QF=/,? & /,eP=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,tP=/[()=,{}\[\]\/\s]/,nP=/\\(\\)?/g,rP=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,w0=/\w*$/,oP=/^[-+]0x[0-9a-f]+$/i,aP=/^0b[01]+$/i,iP=/^\[object .+?Constructor\]$/,lP=/^0o[0-7]+$/i,sP=/^(?:0|[1-9]\d*)$/,cP=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ys=/($^)/,dP=/['\n\r\u2028\u2029\\]/g,Ks="\\ud800-\\udfff",uP="\\u0300-\\u036f",pP="\\ufe20-\\ufe2f",fP="\\u20d0-\\u20ff",k0=uP+pP+fP,x0="\\u2700-\\u27bf",v0="a-z\\xdf-\\xf6\\xf8-\\xff",mP="\\xac\\xb1\\xd7\\xf7",hP="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",gP="\\u2000-\\u206f",yP=" \\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",C0="A-Z\\xc0-\\xd6\\xd8-\\xde",S0="\\ufe0e\\ufe0f",E0=mP+hP+gP+yP,hp="['’]",bP="["+Ks+"]",N0="["+E0+"]",Js="["+k0+"]",V0="\\d+",_P="["+x0+"]",B0="["+v0+"]",T0="[^"+Ks+E0+V0+x0+v0+C0+"]",gp="\\ud83c[\\udffb-\\udfff]",wP="(?:"+Js+"|"+gp+")",R0="[^"+Ks+"]",yp="(?:\\ud83c[\\udde6-\\uddff]){2}",bp="[\\ud800-\\udbff][\\udc00-\\udfff]",wa="["+C0+"]",I0="\\u200d",A0="(?:"+B0+"|"+T0+")",kP="(?:"+wa+"|"+T0+")",L0="(?:"+hp+"(?:d|ll|m|re|s|t|ve))?",O0="(?:"+hp+"(?:D|LL|M|RE|S|T|VE))?",$0=wP+"?",Z0="["+S0+"]?",xP="(?:"+I0+"(?:"+[R0,yp,bp].join("|")+")"+Z0+$0+")*",vP="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",CP="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",M0=Z0+$0+xP,SP="(?:"+[_P,yp,bp].join("|")+")"+M0,EP="(?:"+[R0+Js+"?",Js,yp,bp,bP].join("|")+")",NP=RegExp(hp,"g"),VP=RegExp(Js,"g"),_p=RegExp(gp+"(?="+gp+")|"+EP+M0,"g"),BP=RegExp([wa+"?"+B0+"+"+L0+"(?="+[N0,wa,"$"].join("|")+")",kP+"+"+O0+"(?="+[N0,wa+A0,"$"].join("|")+")",wa+"?"+A0+"+"+L0,wa+"+"+O0,CP,vP,V0,SP].join("|"),"g"),TP=RegExp("["+I0+Ks+k0+S0+"]"),RP=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,IP=["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"],AP=-1,et={};et[op]=et[ap]=et[ip]=et[lp]=et[sp]=et[cp]=et[dp]=et[up]=et[pp]=!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[op]=qe[ap]=qe[ip]=qe[lp]=qe[sp]=qe[Fn]=qe[Wi]=qe[gr]=qe[Gi]=qe[Pn]=qe[Ui]=qe[js]=qe[cp]=qe[dp]=qe[up]=qe[pp]=!0,qe[Hs]=qe[Xs]=qe[Hi]=!1;var LP={À:"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"},OP={"&":"&","<":"<",">":">",'"':""","'":"'"},$P={"&":"&","<":"<",">":">",""":'"',"'":"'"},ZP={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},MP=parseFloat,FP=parseInt,F0=typeof Oa=="object"&&Oa&&Oa.Object===Object&&Oa,PP=typeof self=="object"&&self&&self.Object===Object&&self,St=F0||PP||Function("return this")(),wp=e&&!e.nodeType&&e,Vo=wp&&!0&&n&&!n.nodeType&&n,P0=Vo&&Vo.exports===wp,kp=P0&&F0.process,pn=function(){try{var G=Vo&&Vo.require&&Vo.require("util").types;return G||kp&&kp.binding&&kp.binding("util")}catch{}}(),z0=pn&&pn.isArrayBuffer,D0=pn&&pn.isDate,W0=pn&&pn.isMap,G0=pn&&pn.isRegExp,U0=pn&&pn.isSet,H0=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 zP(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 DP(G,K){for(var Y=G==null?0:G.length;Y--&&K(G[Y],Y,G)!==!1;);return G}function X0(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 xp(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 vp(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 WP(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 Cp(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 GP=Sp("length");function UP(G){return G.split("")}function HP(G){return G.match(eP)||[]}function j0(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?oz(G,K,Y):Qs(G,Y0,Y)}function XP(G,K,Y,ce){for(var Ne=Y-1,Xe=G.length;++Ne<Xe;)if(ce(G[Ne],K))return Ne;return-1}function Y0(G){return G!==G}function K0(G,K){var Y=G==null?0:G.length;return Y?Np(G,K)/Y:ue}function Sp(G){return function(K){return K==null?r:K[G]}}function Ep(G){return function(K){return G==null?r:G[K]}}function J0(G,K,Y,ce,Ne){return Ne(G,function(Xe,bt,Je){Y=ce?(ce=!1,Xe):K(Y,Xe,bt,Je)}),Y}function jP(G,K){var Y=G.length;for(G.sort(K);Y--;)G[Y]=G[Y].value;return G}function Np(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 Vp(G,K){for(var Y=-1,ce=Array(G);++Y<G;)ce[Y]=K(Y);return ce}function YP(G,K){return nt(K,function(Y){return[Y,G[Y]]})}function q0(G){return G&&G.slice(0,nb(G)+1).replace(mp,"")}function ln(G){return function(K){return G(K)}}function Bp(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 eb(G,K){for(var Y=G.length;Y--&&ka(K,G[Y],0)>-1;);return Y}function KP(G,K){for(var Y=G.length,ce=0;Y--;)G[Y]===K&&++ce;return ce}var JP=Ep(LP),qP=Ep(OP);function QP(G){return"\\"+ZP[G]}function ez(G,K){return G==null?r:G[K]}function xa(G){return TP.test(G)}function tz(G){return RP.test(G)}function nz(G){for(var K,Y=[];!(K=G.next()).done;)Y.push(K.value);return Y}function Tp(G){var K=-1,Y=Array(G.size);return G.forEach(function(ce,Ne){Y[++K]=[Ne,ce]}),Y}function tb(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 rz(G){var K=-1,Y=Array(G.size);return G.forEach(function(ce){Y[++K]=[ce,ce]}),Y}function oz(G,K,Y){for(var ce=Y-1,Ne=G.length;++ce<Ne;)if(G[ce]===K)return ce;return-1}function az(G,K,Y){for(var ce=Y+1;ce--;)if(G[ce]===K)return ce;return ce}function va(G){return xa(G)?lz(G):GP(G)}function zn(G){return xa(G)?sz(G):UP(G)}function nb(G){for(var K=G.length;K--&&KF.test(G.charAt(K)););return K}var iz=Ep($P);function lz(G){for(var K=_p.lastIndex=0;_p.test(G);)++K;return K}function sz(G){return G.match(_p)||[]}function cz(G){return G.match(BP)||[]}var dz=function G(K){K=K==null?St:Ca.defaults(St.Object(),K,Ca.pick(St,IP));var Y=K.Array,ce=K.Date,Ne=K.Error,Xe=K.Function,bt=K.Math,Je=K.Object,Rp=K.RegExp,uz=K.String,mn=K.TypeError,tc=Y.prototype,pz=Xe.prototype,Sa=Je.prototype,nc=K["__core-js_shared__"],rc=pz.toString,Ke=Sa.hasOwnProperty,fz=0,rb=function(){var i=/[^.]+$/.exec(nc&&nc.keys&&nc.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),oc=Sa.toString,mz=rc.call(Je),hz=St._,gz=Rp("^"+rc.call(Ke).replace(fp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ac=P0?K.Buffer:r,Jr=K.Symbol,ic=K.Uint8Array,ob=ac?ac.allocUnsafe:r,lc=tb(Je.getPrototypeOf,Je),ab=Je.create,ib=Sa.propertyIsEnumerable,sc=tc.splice,lb=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{}}(),yz=K.clearTimeout!==St.clearTimeout&&K.clearTimeout,bz=ce&&ce.now!==St.Date.now&&ce.now,_z=K.setTimeout!==St.setTimeout&&K.setTimeout,dc=bt.ceil,uc=bt.floor,Ip=Je.getOwnPropertySymbols,wz=ac?ac.isBuffer:r,sb=K.isFinite,kz=tc.join,xz=tb(Je.keys,Je),_t=bt.max,Rt=bt.min,vz=ce.now,Cz=K.parseInt,cb=bt.random,Sz=tc.reverse,Ap=Lo(K,"DataView"),Ki=Lo(K,"Map"),Lp=Lo(K,"Promise"),Ea=Lo(K,"Set"),Ji=Lo(K,"WeakMap"),qi=Lo(Je,"create"),pc=Ji&&new Ji,Na={},Ez=Oo(Ap),Nz=Oo(Ki),Vz=Oo(Lp),Bz=Oo(Ea),Tz=Oo(Ji),fc=Jr?Jr.prototype:r,Qi=fc?fc.valueOf:r,db=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 u_(i)}return new hn(i)}var Va=function(){function i(){}return function(s){if(!lt(s))return{};if(ab)return ab(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:GF,evaluate:UF,interpolate:_0,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 Rz(){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 Iz(){if(this.__filtered__){var i=new Fe(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function Az(){var i=this.__wrapped__.value(),s=this.__dir__,p=Ve(i),h=s<0,b=p?i.length:0,x=UD(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 Lb(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 Lz(){this.__data__=qi?qi(null):{},this.size=0}function Oz(i){var s=this.has(i)&&delete this.__data__[i];return this.size-=s?1:0,s}function $z(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 Zz(i){var s=this.__data__;return qi?s[i]!==r:Ke.call(s,i)}function Mz(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=Lz,To.prototype.delete=Oz,To.prototype.get=$z,To.prototype.has=Zz,To.prototype.set=Mz;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 Fz(){this.__data__=[],this.size=0}function Pz(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 zz(i){var s=this.__data__,p=hc(s,i);return p<0?r:s[p][1]}function Dz(i){return hc(this.__data__,i)>-1}function Wz(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=Fz,yr.prototype.delete=Pz,yr.prototype.get=zz,yr.prototype.has=Dz,yr.prototype.set=Wz;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 Gz(){this.size=0,this.__data__={hash:new To,map:new(Ki||yr),string:new To}}function Uz(i){var s=Nc(this,i).delete(i);return this.size-=s?1:0,s}function Hz(i){return Nc(this,i).get(i)}function Xz(i){return Nc(this,i).has(i)}function jz(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=Gz,br.prototype.delete=Uz,br.prototype.get=Hz,br.prototype.has=Xz,br.prototype.set=jz;function Ro(i){var s=-1,p=i==null?0:i.length;for(this.__data__=new br;++s<p;)this.add(i[s])}function Yz(i){return this.__data__.set(i,u),this}function Kz(i){return this.__data__.has(i)}Ro.prototype.add=Ro.prototype.push=Yz,Ro.prototype.has=Kz;function Dn(i){var s=this.__data__=new yr(i);this.size=s.size}function Jz(){this.__data__=new yr,this.size=0}function qz(i){var s=this.__data__,p=s.delete(i);return this.size=s.size,p}function Qz(i){return this.__data__.get(i)}function eD(i){return this.__data__.has(i)}function tD(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=Jz,Dn.prototype.delete=qz,Dn.prototype.get=Qz,Dn.prototype.has=eD,Dn.prototype.set=tD;function ub(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?Vp(i.length,uz):[],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 pb(i){var s=i.length;return s?i[Up(0,s-1)]:r}function nD(i,s){return Vc(Xt(i),Io(s,0,i.length))}function rD(i){return Vc(Xt(i))}function Op(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 oD(i,s,p,h){return qr(i,function(b,x,O){s(h,b,p(b),O)}),h}function fb(i,s){return i&&rr(s,xt(s),i)}function aD(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 $p(i,s){for(var p=-1,h=s.length,b=Y(h),x=i==null;++p<h;)b[p]=x?r:yf(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=XD(i),!M)return Xt(i,O)}else{var Q=It(i),oe=Q==Xs||Q==h0;if(no(i))return Zb(i,M);if(Q==gr||Q==Ye||oe&&!b){if(O=X||oe?{}:n_(i),!M)return X?$D(i,aD(O,i)):OD(i,fb(O,i))}else{if(!qe[Q])return b?i:{};O=jD(i,Q,M)}}x||(x=new Dn);var fe=x.get(i);if(fe)return fe;x.set(i,O),R_(i)?i.forEach(function(we){O.add(gn(we,s,p,we,i,x))}):B_(i)&&i.forEach(function(we,Ze){O.set(Ze,gn(we,s,p,Ze,i,x))});var _e=J?X?nf:tf: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 iD(i){var s=xt(i);return function(p){return mb(p,i,s)}}function mb(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 hb(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=xp,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=Db(nr),gb=Db(Mp,!0);function lD(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 sD(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:A_(h);p<h;)i[p++]=s;return i}function yb(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=KD),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 Zp=Wb(),bb=Wb(!0);function nr(i,s){return i&&Zp(i,s,xt)}function Mp(i,s){return i&&bb(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 _b(i,s,p){var h=s(i);return Ve(i)?h:Yr(h,p(i))}function Pt(i){return i==null?i===r?ZF:OF:Bo&&Bo in Je(i)?GD(i):r9(i)}function Fp(i,s){return i>s}function cD(i,s){return i!=null&&Ke.call(i,s)}function dD(i,s){return i!=null&&s in Je(i)}function uD(i,s,p){return i>=Rt(s,p)&&i<_t(s,p)}function Pp(i,s,p){for(var h=p?xp: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 pD(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=i_(i,s);var h=i==null?i:i[or(bn(s))];return h==null?r:an(h,i,p)}function wb(i){return dt(i)&&Pt(i)==Ye}function fD(i){return dt(i)&&Pt(i)==Xi}function mD(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:hD(i,s,p,h,rl,b)}function hD(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):DD(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),WD(i,s,p,h,b,x)):!1}function gD(i){return dt(i)&&It(i)==Fn}function zp(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 kb(i){if(!lt(i)||qD(i))return!1;var s=vr(i)?gz:iP;return s.test(Oo(i))}function yD(i){return dt(i)&&Pt(i)==Gi}function bD(i){return dt(i)&&It(i)==Pn}function _D(i){return dt(i)&&Lc(i.length)&&!!et[Pt(i)]}function xb(i){return typeof i=="function"?i:i==null?Kt:typeof i=="object"?Ve(i)?Sb(i[0],i[1]):Cb(i):G_(i)}function Dp(i){if(!il(i))return xz(i);var s=[];for(var p in Je(i))Ke.call(i,p)&&p!="constructor"&&s.push(p);return s}function wD(i){if(!lt(i))return n9(i);var s=il(i),p=[];for(var h in i)h=="constructor"&&(s||!Ke.call(i,h))||p.push(h);return p}function Wp(i,s){return i<s}function vb(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 Cb(i){var s=of(i);return s.length==1&&s[0][2]?o_(s[0][0],s[0][1]):function(p){return p===i||zp(p,i,s)}}function Sb(i,s){return lf(i)&&r_(s)?o_(or(i),s):function(p){var h=yf(p,i);return h===r&&h===s?bf(p,i):rl(s,h,C|N)}}function bc(i,s,p,h,b){i!==s&&Zp(s,function(x,O){if(b||(b=new Dn),lt(x))kD(i,s,O,p,bc,h,b);else{var M=h?h(cf(i,O),x,O+"",i,s,b):r;M===r&&(M=x),Op(i,O,M)}},Yt)}function kD(i,s,p,h,b,x,O){var M=cf(i,p),X=cf(s,p),J=O.get(X);if(J){Op(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=Zb(X,!0)):_e?(Q=!1,q=Mb(X,!0)):q=[]:sl(X)||$o(X)?(q=M,$o(M)?q=L_(M):(!lt(M)||vr(M))&&(q=n_(X))):Q=!1}Q&&(O.set(X,q),b(q,X,h,x,O),O.delete(X)),Op(i,p,q)}function Eb(i,s){var p=i.length;if(p)return s+=s<0?p:0,xr(s,p)?i[s]:r}function Nb(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=vb(i,function(x,O,M){var X=nt(s,function(J){return J(x)});return{criteria:X,index:++h,value:x}});return jP(b,function(x,O){return LD(x,O,p)})}function xD(i,s){return Vb(i,s,function(p,h){return bf(i,h)})}function Vb(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 vD(i){return function(s){return Ao(s,i)}}function Gp(i,s,p,h){var b=h?XP: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 Bb(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):jp(i,b)}}return i}function Up(i,s){return i+uc(cb()*(s-i+1))}function CD(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 Hp(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 df(a_(i,s,Kt),i+"")}function SD(i){return pb(Aa(i))}function ED(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 Tb=pc?function(i,s){return pc.set(i,s),i}:Kt,ND=cc?function(i,s){return cc(i,"toString",{configurable:!0,enumerable:!1,value:wf(s),writable:!0})}:Kt;function VD(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 BD(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 Xp(i,s,Kt,p)}function Xp(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 Rb(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 Ib(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 db?db.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=xp;else if(x>=a){var J=s?null:PD(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 jp(i,s){return s=eo(s,i),i=i_(i,s),i==null||delete i[or(bn(s))]}function Ab(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 Lb(i,s){var p=i;return p instanceof Fe&&(p=p.value()),vp(s,function(h,b){return b.func.apply(b.thisArg,Yr([h],b.args))},p)}function Yp(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 Ob(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 Kp(i){return ut(i)?i:[]}function Jp(i){return typeof i=="function"?i:Kt}function eo(i,s){return Ve(i)?i:lf(i,s)?[i]:d_(je(i))}var TD=$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 $b=yz||function(i){return St.clearTimeout(i)};function Zb(i,s){if(s)return i.slice();var p=i.length,h=ob?ob(p):new i.constructor(p);return i.copy(h),h}function qp(i){var s=new i.constructor(i.byteLength);return new ic(s).set(new ic(i)),s}function RD(i,s){var p=s?qp(i.buffer):i.buffer;return new i.constructor(p,i.byteOffset,i.byteLength)}function ID(i){var s=new i.constructor(i.source,w0.exec(i));return s.lastIndex=i.lastIndex,s}function AD(i){return Qi?Je(Qi.call(i)):{}}function Mb(i,s){var p=s?qp(i.buffer):i.buffer;return new i.constructor(p,i.byteOffset,i.length)}function Fb(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 LD(i,s,p){for(var h=-1,b=i.criteria,x=s.criteria,O=b.length,M=p.length;++h<O;){var X=Fb(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 Pb(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 zb(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 OD(i,s){return rr(i,af(i),s)}function $D(i,s){return rr(i,e_(i),s)}function kc(i,s){return function(p,h){var b=Ve(p)?zP:oD,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 Db(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 Wb(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 ZD(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 Gb(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 vp(D_(z_(s).replace(NP,"")),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 MD(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 Yb(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 Ub(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 Hb(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"?rf(x):r;X&&sf(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&&sf(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=KP(De,Dt);if(h&&(De=Pb(De,h,b,fe)),x&&(De=zb(De,x,O,fe)),Ze-=un,fe&&Ze<J){var pt=Kr(De,Dt);return Yb(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=o9(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 Xb(i,s){return function(p,h){return pD(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=Ib(p),h=Ib(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?Hp(s,i):s;var h=Hp(s,dc(i/va(s)));return xa(s)?to(zn(h),0,i).join(""):h.slice(0,i)}function FD(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 jb(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),CD(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 Yb(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 sf(i)&&l_(we,Oe),we.placeholder=h,s_(we,i,s)}function ef(i){var s=bt[i];return function(p,h){if(p=_n(p),h=h==null?0:Rt(Re(h),292),h&&sb(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 PD=Ea&&1/ec(new Ea([,-0]))[1]==F?function(i){return new Ea(i)}:vf;function Kb(i){return function(s){var p=It(s);return p==Fn?Tp(s):p==Pn?rz(s):YP(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:rf(i),fe=[i,s,p,h,b,q,Q,x,O,M];if(oe&&t9(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=ZD(i,s,p);else s==E||s==D?_e=MD(i,s,M):(s==A||s==(T|A))&&!b.length?_e=FD(i,s,p,h):_e=xc.apply(r,fe);var Oe=oe?Tb:l_;return s_(Oe(_e,fe),i,s)}function Jb(i,s,p,h){return i===r||Wn(i,Sa[p])&&!Ke.call(h,p)?s:i}function qb(i,s,p,h,b,x){return lt(i)&<(s)&&(x.set(s,i),bc(i,s,r,qb,x),x.delete(s)),i}function zD(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(!Cp(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 DD(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=Tp;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 WD(i,s,p,h,b,x){var O=p&C,M=tf(i),X=M.length,J=tf(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 df(a_(i,r,m_),i+"")}function tf(i){return _b(i,xt,af)}function nf(i){return _b(i,Yt,e_)}var rf=pc?function(i){return pc.get(i)}:vf;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||kf;return i=i===kf?xb:i,arguments.length?i(arguments[0],arguments[1]):i}function Nc(i,s){var p=i.__data__;return JD(s)?p[typeof s=="string"?"string":"hash"]:p.map}function of(i){for(var s=xt(i),p=s.length;p--;){var h=s[p],b=i[h];s[p]=[h,b,r_(b)]}return s}function Lo(i,s){var p=ez(i,s);return kb(p)?p:r}function GD(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 af=Ip?function(i){return i==null?[]:(i=Je(i),jr(Ip(i),function(s){return ib.call(i,s)}))}:Cf,e_=Ip?function(i){for(var s=[];i;)Yr(s,af(i)),i=lc(i);return s}:Cf,It=Pt;(Ap&&It(new Ap(new ArrayBuffer(1)))!=_a||Ki&&It(new Ki)!=Fn||Lp&&It(Lp.resolve())!=g0||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 Ez:return _a;case Nz:return Fn;case Vz:return g0;case Bz:return Pn;case Tz:return Hi}return s});function UD(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 HD(i){var s=i.match(qF);return s?s[1].split(QF):[]}function t_(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 XD(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 n_(i){return typeof i.constructor=="function"&&!il(i)?Va(lc(i)):{}}function jD(i,s,p){var h=i.constructor;switch(s){case Xi:return qp(i);case zi:case Di:return new h(+i);case _a:return RD(i,p);case op:case ap:case ip:case lp:case sp:case cp:case dp:case up:case pp:return Mb(i,p);case Fn:return new h;case Wi:case Ui:return new h(i);case Gi:return ID(i);case Pn:return new h;case js:return AD(i)}}function YD(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(JF,`{
|
|
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,B=1,$=2,W=4,E=8,D=16,I=32,V=64,P=128,X=256,S=512,R=30,A="...",M=800,v=16,w=1,L=2,G=3,Z=1/0,j=9007199254740991,ee=17976931348623157e292,ce=NaN,ye=4294967295,ve=ye-1,He=ye>>>1,vt=[["ary",P],["bind",B],["bindKey",$],["curry",E],["curryRight",D],["flip",S],["partial",I],["partialRight",V],["rearg",X]],Ye="[object Arguments]",Ht="[object Array]",AF="[object AsyncFunction]",Di="[object Boolean]",Wi="[object Date]",LF="[object DOMException]",Hs="[object Error]",Xs="[object Function]",g0="[object GeneratorFunction]",Fn="[object Map]",Gi="[object Number]",OF="[object Null]",gr="[object Object]",y0="[object Promise]",$F="[object Proxy]",Ui="[object RegExp]",Pn="[object Set]",Hi="[object String]",js="[object Symbol]",ZF="[object Undefined]",Xi="[object WeakMap]",MF="[object WeakSet]",ji="[object ArrayBuffer]",_a="[object DataView]",op="[object Float32Array]",ap="[object Float64Array]",ip="[object Int8Array]",lp="[object Int16Array]",sp="[object Int32Array]",cp="[object Uint8Array]",dp="[object Uint8ClampedArray]",up="[object Uint16Array]",pp="[object Uint32Array]",FF=/\b__p \+= '';/g,PF=/\b(__p \+=) '' \+/g,zF=/(__e\(.*?\)|\b__t\)) \+\n'';/g,b0=/&(?:amp|lt|gt|quot|#39);/g,_0=/[&<>"']/g,DF=RegExp(b0.source),WF=RegExp(_0.source),GF=/<%-([\s\S]+?)%>/g,UF=/<%([\s\S]+?)%>/g,w0=/<%=([\s\S]+?)%>/g,HF=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,XF=/^\w*$/,jF=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fp=/[\\^$.*+?()[\]{}|]/g,YF=RegExp(fp.source),mp=/^\s+/,KF=/\s/,JF=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,qF=/\{\n\/\* \[wrapped with (.+)\] \*/,QF=/,? & /,eP=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,tP=/[()=,{}\[\]\/\s]/,nP=/\\(\\)?/g,rP=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,k0=/\w*$/,oP=/^[-+]0x[0-9a-f]+$/i,aP=/^0b[01]+$/i,iP=/^\[object .+?Constructor\]$/,lP=/^0o[0-7]+$/i,sP=/^(?:0|[1-9]\d*)$/,cP=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ys=/($^)/,dP=/['\n\r\u2028\u2029\\]/g,Ks="\\ud800-\\udfff",uP="\\u0300-\\u036f",pP="\\ufe20-\\ufe2f",fP="\\u20d0-\\u20ff",x0=uP+pP+fP,C0="\\u2700-\\u27bf",v0="a-z\\xdf-\\xf6\\xf8-\\xff",mP="\\xac\\xb1\\xd7\\xf7",hP="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",gP="\\u2000-\\u206f",yP=" \\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",S0="A-Z\\xc0-\\xd6\\xd8-\\xde",E0="\\ufe0e\\ufe0f",N0=mP+hP+gP+yP,hp="['’]",bP="["+Ks+"]",V0="["+N0+"]",Js="["+x0+"]",B0="\\d+",_P="["+C0+"]",T0="["+v0+"]",R0="[^"+Ks+N0+B0+C0+v0+S0+"]",gp="\\ud83c[\\udffb-\\udfff]",wP="(?:"+Js+"|"+gp+")",I0="[^"+Ks+"]",yp="(?:\\ud83c[\\udde6-\\uddff]){2}",bp="[\\ud800-\\udbff][\\udc00-\\udfff]",wa="["+S0+"]",A0="\\u200d",L0="(?:"+T0+"|"+R0+")",kP="(?:"+wa+"|"+R0+")",O0="(?:"+hp+"(?:d|ll|m|re|s|t|ve))?",$0="(?:"+hp+"(?:D|LL|M|RE|S|T|VE))?",Z0=wP+"?",M0="["+E0+"]?",xP="(?:"+A0+"(?:"+[I0,yp,bp].join("|")+")"+M0+Z0+")*",CP="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vP="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",F0=M0+Z0+xP,SP="(?:"+[_P,yp,bp].join("|")+")"+F0,EP="(?:"+[I0+Js+"?",Js,yp,bp,bP].join("|")+")",NP=RegExp(hp,"g"),VP=RegExp(Js,"g"),_p=RegExp(gp+"(?="+gp+")|"+EP+F0,"g"),BP=RegExp([wa+"?"+T0+"+"+O0+"(?="+[V0,wa,"$"].join("|")+")",kP+"+"+$0+"(?="+[V0,wa+L0,"$"].join("|")+")",wa+"?"+L0+"+"+O0,wa+"+"+$0,vP,CP,B0,SP].join("|"),"g"),TP=RegExp("["+A0+Ks+x0+E0+"]"),RP=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,IP=["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"],AP=-1,et={};et[op]=et[ap]=et[ip]=et[lp]=et[sp]=et[cp]=et[dp]=et[up]=et[pp]=!0,et[Ye]=et[Ht]=et[ji]=et[Di]=et[_a]=et[Wi]=et[Hs]=et[Xs]=et[Fn]=et[Gi]=et[gr]=et[Ui]=et[Pn]=et[Hi]=et[Xi]=!1;var qe={};qe[Ye]=qe[Ht]=qe[ji]=qe[_a]=qe[Di]=qe[Wi]=qe[op]=qe[ap]=qe[ip]=qe[lp]=qe[sp]=qe[Fn]=qe[Gi]=qe[gr]=qe[Ui]=qe[Pn]=qe[Hi]=qe[js]=qe[cp]=qe[dp]=qe[up]=qe[pp]=!0,qe[Hs]=qe[Xs]=qe[Xi]=!1;var LP={À:"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"},OP={"&":"&","<":"<",">":">",'"':""","'":"'"},$P={"&":"&","<":"<",">":">",""":'"',"'":"'"},ZP={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},MP=parseFloat,FP=parseInt,P0=typeof Oa=="object"&&Oa&&Oa.Object===Object&&Oa,PP=typeof self=="object"&&self&&self.Object===Object&&self,St=P0||PP||Function("return this")(),wp=e&&!e.nodeType&&e,Vo=wp&&!0&&n&&!n.nodeType&&n,z0=Vo&&Vo.exports===wp,kp=z0&&P0.process,pn=function(){try{var U=Vo&&Vo.require&&Vo.require("util").types;return U||kp&&kp.binding&&kp.binding("util")}catch{}}(),D0=pn&&pn.isArrayBuffer,W0=pn&&pn.isDate,G0=pn&&pn.isMap,U0=pn&&pn.isRegExp,H0=pn&&pn.isSet,X0=pn&&pn.isTypedArray;function an(U,K,Y){switch(Y.length){case 0:return U.call(K);case 1:return U.call(K,Y[0]);case 2:return U.call(K,Y[0],Y[1]);case 3:return U.call(K,Y[0],Y[1],Y[2])}return U.apply(K,Y)}function zP(U,K,Y,de){for(var Ne=-1,Xe=U==null?0:U.length;++Ne<Xe;){var bt=U[Ne];K(de,bt,Y(bt),U)}return de}function fn(U,K){for(var Y=-1,de=U==null?0:U.length;++Y<de&&K(U[Y],Y,U)!==!1;);return U}function DP(U,K){for(var Y=U==null?0:U.length;Y--&&K(U[Y],Y,U)!==!1;);return U}function j0(U,K){for(var Y=-1,de=U==null?0:U.length;++Y<de;)if(!K(U[Y],Y,U))return!1;return!0}function jr(U,K){for(var Y=-1,de=U==null?0:U.length,Ne=0,Xe=[];++Y<de;){var bt=U[Y];K(bt,Y,U)&&(Xe[Ne++]=bt)}return Xe}function qs(U,K){var Y=U==null?0:U.length;return!!Y&&ka(U,K,0)>-1}function xp(U,K,Y){for(var de=-1,Ne=U==null?0:U.length;++de<Ne;)if(Y(K,U[de]))return!0;return!1}function nt(U,K){for(var Y=-1,de=U==null?0:U.length,Ne=Array(de);++Y<de;)Ne[Y]=K(U[Y],Y,U);return Ne}function Yr(U,K){for(var Y=-1,de=K.length,Ne=U.length;++Y<de;)U[Ne+Y]=K[Y];return U}function Cp(U,K,Y,de){var Ne=-1,Xe=U==null?0:U.length;for(de&&Xe&&(Y=U[++Ne]);++Ne<Xe;)Y=K(Y,U[Ne],Ne,U);return Y}function WP(U,K,Y,de){var Ne=U==null?0:U.length;for(de&&Ne&&(Y=U[--Ne]);Ne--;)Y=K(Y,U[Ne],Ne,U);return Y}function vp(U,K){for(var Y=-1,de=U==null?0:U.length;++Y<de;)if(K(U[Y],Y,U))return!0;return!1}var GP=Sp("length");function UP(U){return U.split("")}function HP(U){return U.match(eP)||[]}function Y0(U,K,Y){var de;return Y(U,function(Ne,Xe,bt){if(K(Ne,Xe,bt))return de=Xe,!1}),de}function Qs(U,K,Y,de){for(var Ne=U.length,Xe=Y+(de?1:-1);de?Xe--:++Xe<Ne;)if(K(U[Xe],Xe,U))return Xe;return-1}function ka(U,K,Y){return K===K?oz(U,K,Y):Qs(U,K0,Y)}function XP(U,K,Y,de){for(var Ne=Y-1,Xe=U.length;++Ne<Xe;)if(de(U[Ne],K))return Ne;return-1}function K0(U){return U!==U}function J0(U,K){var Y=U==null?0:U.length;return Y?Np(U,K)/Y:ce}function Sp(U){return function(K){return K==null?r:K[U]}}function Ep(U){return function(K){return U==null?r:U[K]}}function q0(U,K,Y,de,Ne){return Ne(U,function(Xe,bt,Je){Y=de?(de=!1,Xe):K(Y,Xe,bt,Je)}),Y}function jP(U,K){var Y=U.length;for(U.sort(K);Y--;)U[Y]=U[Y].value;return U}function Np(U,K){for(var Y,de=-1,Ne=U.length;++de<Ne;){var Xe=K(U[de]);Xe!==r&&(Y=Y===r?Xe:Y+Xe)}return Y}function Vp(U,K){for(var Y=-1,de=Array(U);++Y<U;)de[Y]=K(Y);return de}function YP(U,K){return nt(K,function(Y){return[Y,U[Y]]})}function Q0(U){return U&&U.slice(0,rb(U)+1).replace(mp,"")}function ln(U){return function(K){return U(K)}}function Bp(U,K){return nt(K,function(Y){return U[Y]})}function Yi(U,K){return U.has(K)}function eb(U,K){for(var Y=-1,de=U.length;++Y<de&&ka(K,U[Y],0)>-1;);return Y}function tb(U,K){for(var Y=U.length;Y--&&ka(K,U[Y],0)>-1;);return Y}function KP(U,K){for(var Y=U.length,de=0;Y--;)U[Y]===K&&++de;return de}var JP=Ep(LP),qP=Ep(OP);function QP(U){return"\\"+ZP[U]}function ez(U,K){return U==null?r:U[K]}function xa(U){return TP.test(U)}function tz(U){return RP.test(U)}function nz(U){for(var K,Y=[];!(K=U.next()).done;)Y.push(K.value);return Y}function Tp(U){var K=-1,Y=Array(U.size);return U.forEach(function(de,Ne){Y[++K]=[Ne,de]}),Y}function nb(U,K){return function(Y){return U(K(Y))}}function Kr(U,K){for(var Y=-1,de=U.length,Ne=0,Xe=[];++Y<de;){var bt=U[Y];(bt===K||bt===m)&&(U[Y]=m,Xe[Ne++]=Y)}return Xe}function ec(U){var K=-1,Y=Array(U.size);return U.forEach(function(de){Y[++K]=de}),Y}function rz(U){var K=-1,Y=Array(U.size);return U.forEach(function(de){Y[++K]=[de,de]}),Y}function oz(U,K,Y){for(var de=Y-1,Ne=U.length;++de<Ne;)if(U[de]===K)return de;return-1}function az(U,K,Y){for(var de=Y+1;de--;)if(U[de]===K)return de;return de}function Ca(U){return xa(U)?lz(U):GP(U)}function zn(U){return xa(U)?sz(U):UP(U)}function rb(U){for(var K=U.length;K--&&KF.test(U.charAt(K)););return K}var iz=Ep($P);function lz(U){for(var K=_p.lastIndex=0;_p.test(U);)++K;return K}function sz(U){return U.match(_p)||[]}function cz(U){return U.match(BP)||[]}var dz=function U(K){K=K==null?St:va.defaults(St.Object(),K,va.pick(St,IP));var Y=K.Array,de=K.Date,Ne=K.Error,Xe=K.Function,bt=K.Math,Je=K.Object,Rp=K.RegExp,uz=K.String,mn=K.TypeError,tc=Y.prototype,pz=Xe.prototype,Sa=Je.prototype,nc=K["__core-js_shared__"],rc=pz.toString,Ke=Sa.hasOwnProperty,fz=0,ob=function(){var i=/[^.]+$/.exec(nc&&nc.keys&&nc.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""}(),oc=Sa.toString,mz=rc.call(Je),hz=St._,gz=Rp("^"+rc.call(Ke).replace(fp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ac=z0?K.Buffer:r,Jr=K.Symbol,ic=K.Uint8Array,ab=ac?ac.allocUnsafe:r,lc=nb(Je.getPrototypeOf,Je),ib=Je.create,lb=Sa.propertyIsEnumerable,sc=tc.splice,sb=Jr?Jr.isConcatSpreadable:r,Ki=Jr?Jr.iterator:r,Bo=Jr?Jr.toStringTag:r,cc=function(){try{var i=Lo(Je,"defineProperty");return i({},"",{}),i}catch{}}(),yz=K.clearTimeout!==St.clearTimeout&&K.clearTimeout,bz=de&&de.now!==St.Date.now&&de.now,_z=K.setTimeout!==St.setTimeout&&K.setTimeout,dc=bt.ceil,uc=bt.floor,Ip=Je.getOwnPropertySymbols,wz=ac?ac.isBuffer:r,cb=K.isFinite,kz=tc.join,xz=nb(Je.keys,Je),_t=bt.max,Rt=bt.min,Cz=de.now,vz=K.parseInt,db=bt.random,Sz=tc.reverse,Ap=Lo(K,"DataView"),Ji=Lo(K,"Map"),Lp=Lo(K,"Promise"),Ea=Lo(K,"Set"),qi=Lo(K,"WeakMap"),Qi=Lo(Je,"create"),pc=qi&&new qi,Na={},Ez=Oo(Ap),Nz=Oo(Ji),Vz=Oo(Lp),Bz=Oo(Ea),Tz=Oo(qi),fc=Jr?Jr.prototype:r,el=fc?fc.valueOf:r,ub=fc?fc.toString:r;function k(i){if(dt(i)&&!Ve(i)&&!(i instanceof Me)){if(i instanceof hn)return i;if(Ke.call(i,"__wrapped__"))return p_(i)}return new hn(i)}var Va=function(){function i(){}return function(s){if(!lt(s))return{};if(ib)return ib(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}k.templateSettings={escape:GF,evaluate:UF,interpolate:w0,variable:"",imports:{_:k}},k.prototype=mc.prototype,k.prototype.constructor=k,hn.prototype=Va(mc.prototype),hn.prototype.constructor=hn;function Me(i){this.__wrapped__=i,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=ye,this.__views__=[]}function Rz(){var i=new Me(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 Iz(){if(this.__filtered__){var i=new Me(this);i.__dir__=-1,i.__filtered__=!0}else i=this.clone(),i.__dir__*=-1;return i}function Az(){var i=this.__wrapped__.value(),s=this.__dir__,p=Ve(i),h=s<0,b=p?i.length:0,x=UD(0,b,this.__views__),O=x.start,F=x.end,H=F-O,J=h?F:O-1,q=this.__iteratees__,Q=q.length,oe=0,fe=Rt(H,this.__takeCount__);if(!p||!h&&b==H&&fe==H)return Ob(i,this.__actions__);var _e=[];e:for(;H--&&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==L)we=Dt;else if(!Dt){if(dn==w)continue e;break e}}_e[oe++]=we}return _e}Me.prototype=Va(mc.prototype),Me.prototype.constructor=Me;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 Lz(){this.__data__=Qi?Qi(null):{},this.size=0}function Oz(i){var s=this.has(i)&&delete this.__data__[i];return this.size-=s?1:0,s}function $z(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 Zz(i){var s=this.__data__;return Qi?s[i]!==r:Ke.call(s,i)}function Mz(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=Lz,To.prototype.delete=Oz,To.prototype.get=$z,To.prototype.has=Zz,To.prototype.set=Mz;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 Fz(){this.__data__=[],this.size=0}function Pz(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 zz(i){var s=this.__data__,p=hc(s,i);return p<0?r:s[p][1]}function Dz(i){return hc(this.__data__,i)>-1}function Wz(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=Fz,yr.prototype.delete=Pz,yr.prototype.get=zz,yr.prototype.has=Dz,yr.prototype.set=Wz;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 Gz(){this.size=0,this.__data__={hash:new To,map:new(Ji||yr),string:new To}}function Uz(i){var s=Nc(this,i).delete(i);return this.size-=s?1:0,s}function Hz(i){return Nc(this,i).get(i)}function Xz(i){return Nc(this,i).has(i)}function jz(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=Gz,br.prototype.delete=Uz,br.prototype.get=Hz,br.prototype.has=Xz,br.prototype.set=jz;function Ro(i){var s=-1,p=i==null?0:i.length;for(this.__data__=new br;++s<p;)this.add(i[s])}function Yz(i){return this.__data__.set(i,u),this}function Kz(i){return this.__data__.has(i)}Ro.prototype.add=Ro.prototype.push=Yz,Ro.prototype.has=Kz;function Dn(i){var s=this.__data__=new yr(i);this.size=s.size}function Jz(){this.__data__=new yr,this.size=0}function qz(i){var s=this.__data__,p=s.delete(i);return this.size=s.size,p}function Qz(i){return this.__data__.get(i)}function eD(i){return this.__data__.has(i)}function tD(i,s){var p=this.__data__;if(p instanceof yr){var h=p.__data__;if(!Ji||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=Jz,Dn.prototype.delete=qz,Dn.prototype.get=Qz,Dn.prototype.has=eD,Dn.prototype.set=tD;function pb(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,F=O?Vp(i.length,uz):[],H=F.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,H)))&&F.push(J);return F}function fb(i){var s=i.length;return s?i[Up(0,s-1)]:r}function nD(i,s){return Vc(Xt(i),Io(s,0,i.length))}function rD(i){return Vc(Xt(i))}function Op(i,s,p){(p!==r&&!Wn(i[s],p)||p===r&&!(s in i))&&_r(i,s,p)}function tl(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 oD(i,s,p,h){return qr(i,function(b,x,O){s(h,b,p(b),O)}),h}function mb(i,s){return i&&rr(s,xt(s),i)}function aD(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 $p(i,s){for(var p=-1,h=s.length,b=Y(h),x=i==null;++p<h;)b[p]=x?r:yf(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,F=s&g,H=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=XD(i),!F)return Xt(i,O)}else{var Q=It(i),oe=Q==Xs||Q==g0;if(no(i))return Mb(i,F);if(Q==gr||Q==Ye||oe&&!b){if(O=H||oe?{}:r_(i),!F)return H?$D(i,aD(O,i)):OD(i,mb(O,i))}else{if(!qe[Q])return b?i:{};O=jD(i,Q,F)}}x||(x=new Dn);var fe=x.get(i);if(fe)return fe;x.set(i,O),I_(i)?i.forEach(function(we){O.add(gn(we,s,p,we,i,x))}):T_(i)&&i.forEach(function(we,Ze){O.set(Ze,gn(we,s,p,Ze,i,x))});var _e=J?H?nf:tf:H?Yt:xt,Oe=q?r:_e(i);return fn(Oe||i,function(we,Ze){Oe&&(Ze=we,we=i[Ze]),tl(O,Ze,gn(we,s,p,Ze,i,x))}),O}function iD(i){var s=xt(i);return function(p){return hb(p,i,s)}}function hb(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 gb(i,s,p){if(typeof i!="function")throw new mn(c);return sl(function(){i.apply(r,p)},s)}function nl(i,s,p,h){var b=-1,x=qs,O=!0,F=i.length,H=[],J=s.length;if(!F)return H;p&&(s=nt(s,ln(p))),h?(x=xp,O=!1):s.length>=a&&(x=Yi,O=!1,s=new Ro(s));e:for(;++b<F;){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;H.push(q)}else x(s,Q,h)||H.push(q)}return H}var qr=Wb(nr),yb=Wb(Mp,!0);function lD(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&&(F===r?O===O&&!cn(O):p(O,F)))var F=O,H=x}return H}function sD(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:L_(h);p<h;)i[p++]=s;return i}function bb(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=KD),b||(b=[]);++x<O;){var F=i[x];s>0&&p(F)?s>1?Et(F,s-1,p,h,b):Yr(b,F):h||(b[b.length]=F)}return b}var Zp=Gb(),_b=Gb(!0);function nr(i,s){return i&&Zp(i,s,xt)}function Mp(i,s){return i&&_b(i,s,xt)}function yc(i,s){return jr(s,function(p){return Cr(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 wb(i,s,p){var h=s(i);return Ve(i)?h:Yr(h,p(i))}function Pt(i){return i==null?i===r?ZF:OF:Bo&&Bo in Je(i)?GD(i):r9(i)}function Fp(i,s){return i>s}function cD(i,s){return i!=null&&Ke.call(i,s)}function dD(i,s){return i!=null&&s in Je(i)}function uD(i,s,p){return i>=Rt(s,p)&&i<_t(s,p)}function Pp(i,s,p){for(var h=p?xp:qs,b=i[0].length,x=i.length,O=x,F=Y(x),H=1/0,J=[];O--;){var q=i[O];O&&s&&(q=nt(q,ln(s))),H=Rt(q.length,H),F[O]=!p&&(s||b>=120&&q.length>=120)?new Ro(O&&q):r}q=i[0];var Q=-1,oe=F[0];e:for(;++Q<b&&J.length<H;){var fe=q[Q],_e=s?s(fe):fe;if(fe=p||fe!==0?fe:0,!(oe?Yi(oe,_e):h(J,_e,p))){for(O=x;--O;){var Oe=F[O];if(!(Oe?Yi(Oe,_e):h(i[O],_e,p)))continue e}oe&&oe.push(_e),J.push(fe)}}return J}function pD(i,s,p,h){return nr(i,function(b,x,O){s(h,p(b),x,O)}),h}function rl(i,s,p){s=eo(s,i),i=l_(i,s);var h=i==null?i:i[or(bn(s))];return h==null?r:an(h,i,p)}function kb(i){return dt(i)&&Pt(i)==Ye}function fD(i){return dt(i)&&Pt(i)==ji}function mD(i){return dt(i)&&Pt(i)==Wi}function ol(i,s,p,h,b){return i===s?!0:i==null||s==null||!dt(i)&&!dt(s)?i!==i&&s!==s:hD(i,s,p,h,ol,b)}function hD(i,s,p,h,b,x){var O=Ve(i),F=Ve(s),H=O?Ht:It(i),J=F?Ht:It(s);H=H==Ye?gr:H,J=J==Ye?gr:J;var q=H==gr,Q=J==gr,oe=H==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)?e_(i,s,p,h,b,x):DD(i,s,H,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),WD(i,s,p,h,b,x)):!1}function gD(i){return dt(i)&&It(i)==Fn}function zp(i,s,p,h){var b=p.length,x=b,O=!h;if(i==null)return!x;for(i=Je(i);b--;){var F=p[b];if(O&&F[2]?F[1]!==i[F[0]]:!(F[0]in i))return!1}for(;++b<x;){F=p[b];var H=F[0],J=i[H],q=F[1];if(O&&F[2]){if(J===r&&!(H in i))return!1}else{var Q=new Dn;if(h)var oe=h(J,q,H,i,s,Q);if(!(oe===r?ol(q,J,C|N,h,Q):oe))return!1}}return!0}function xb(i){if(!lt(i)||qD(i))return!1;var s=Cr(i)?gz:iP;return s.test(Oo(i))}function yD(i){return dt(i)&&Pt(i)==Ui}function bD(i){return dt(i)&&It(i)==Pn}function _D(i){return dt(i)&&Lc(i.length)&&!!et[Pt(i)]}function Cb(i){return typeof i=="function"?i:i==null?Kt:typeof i=="object"?Ve(i)?Eb(i[0],i[1]):Sb(i):U_(i)}function Dp(i){if(!ll(i))return xz(i);var s=[];for(var p in Je(i))Ke.call(i,p)&&p!="constructor"&&s.push(p);return s}function wD(i){if(!lt(i))return n9(i);var s=ll(i),p=[];for(var h in i)h=="constructor"&&(s||!Ke.call(i,h))||p.push(h);return p}function Wp(i,s){return i<s}function vb(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 Sb(i){var s=of(i);return s.length==1&&s[0][2]?a_(s[0][0],s[0][1]):function(p){return p===i||zp(p,i,s)}}function Eb(i,s){return lf(i)&&o_(s)?a_(or(i),s):function(p){var h=yf(p,i);return h===r&&h===s?bf(p,i):ol(s,h,C|N)}}function bc(i,s,p,h,b){i!==s&&Zp(s,function(x,O){if(b||(b=new Dn),lt(x))kD(i,s,O,p,bc,h,b);else{var F=h?h(cf(i,O),x,O+"",i,s,b):r;F===r&&(F=x),Op(i,O,F)}},Yt)}function kD(i,s,p,h,b,x,O){var F=cf(i,p),H=cf(s,p),J=O.get(H);if(J){Op(i,p,J);return}var q=x?x(F,H,p+"",i,s,O):r,Q=q===r;if(Q){var oe=Ve(H),fe=!oe&&no(H),_e=!oe&&!fe&&Ia(H);q=H,oe||fe||_e?Ve(F)?q=F:ut(F)?q=Xt(F):fe?(Q=!1,q=Mb(H,!0)):_e?(Q=!1,q=Fb(H,!0)):q=[]:cl(H)||$o(H)?(q=F,$o(F)?q=O_(F):(!lt(F)||Cr(F))&&(q=r_(H))):Q=!1}Q&&(O.set(H,q),b(q,H,h,x,O),O.delete(H)),Op(i,p,q)}function Nb(i,s){var p=i.length;if(p)return s+=s<0?p:0,xr(s,p)?i[s]:r}function Vb(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=vb(i,function(x,O,F){var H=nt(s,function(J){return J(x)});return{criteria:H,index:++h,value:x}});return jP(b,function(x,O){return LD(x,O,p)})}function xD(i,s){return Bb(i,s,function(p,h){return bf(i,h)})}function Bb(i,s,p){for(var h=-1,b=s.length,x={};++h<b;){var O=s[h],F=Ao(i,O);p(F,O)&&al(x,eo(O,i),F)}return x}function CD(i){return function(s){return Ao(s,i)}}function Gp(i,s,p,h){var b=h?XP:ka,x=-1,O=s.length,F=i;for(i===s&&(s=Xt(s)),p&&(F=nt(i,ln(p)));++x<O;)for(var H=0,J=s[x],q=p?p(J):J;(H=b(F,q,H,h))>-1;)F!==i&&sc.call(F,H,1),sc.call(i,H,1);return i}function Tb(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):jp(i,b)}}return i}function Up(i,s){return i+uc(db()*(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 Hp(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 df(i_(i,s,Kt),i+"")}function SD(i){return fb(Aa(i))}function ED(i,s){var p=Aa(i);return Vc(p,Io(s,0,p.length))}function al(i,s,p,h){if(!lt(i))return i;s=eo(s,i);for(var b=-1,x=s.length,O=x-1,F=i;F!=null&&++b<x;){var H=or(s[b]),J=p;if(H==="__proto__"||H==="constructor"||H==="prototype")return i;if(b!=O){var q=F[H];J=h?h(q,H,F):r,J===r&&(J=lt(q)?q:xr(s[b+1])?[]:{})}tl(F,H,J),F=F[H]}return i}var Rb=pc?function(i,s){return pc.set(i,s),i}:Kt,ND=cc?function(i,s){return cc(i,"toString",{configurable:!0,enumerable:!1,value:wf(s),writable:!0})}:Kt;function VD(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 BD(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 Xp(i,s,Kt,p)}function Xp(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,F=s===null,H=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):F?we=_e&&oe&&(h||!fe):H?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,ve)}function Ib(i,s){for(var p=-1,h=i.length,b=0,x=[];++p<h;){var O=i[p],F=s?s(O):O;if(!p||!Wn(F,H)){var H=F;x[b++]=O===0?0:O}}return x}function Ab(i){return typeof i=="number"?i:cn(i)?ce:+i}function sn(i){if(typeof i=="string")return i;if(Ve(i))return nt(i,sn)+"";if(cn(i))return ub?ub.call(i):"";var s=i+"";return s=="0"&&1/i==-Z?"-0":s}function Qr(i,s,p){var h=-1,b=qs,x=i.length,O=!0,F=[],H=F;if(p)O=!1,b=xp;else if(x>=a){var J=s?null:PD(i);if(J)return ec(J);O=!1,b=Yi,H=new Ro}else H=s?[]:F;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=H.length;oe--;)if(H[oe]===Q)continue e;s&&H.push(Q),F.push(q)}else b(H,Q,p)||(H!==F&&H.push(Q),F.push(q))}return F}function jp(i,s){return s=eo(s,i),i=l_(i,s),i==null||delete i[or(bn(s))]}function Lb(i,s,p,h){return al(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 Ob(i,s){var p=i;return p instanceof Me&&(p=p.value()),Cp(s,function(h,b){return b.func.apply(b.thisArg,Yr([h],b.args))},p)}function Yp(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],F=-1;++F<h;)F!=b&&(x[b]=nl(x[b]||O,i[F],s,p));return Qr(Et(x,1),s,p)}function $b(i,s,p){for(var h=-1,b=i.length,x=s.length,O={};++h<b;){var F=h<x?s[h]:r;p(O,i[h],F)}return O}function Kp(i){return ut(i)?i:[]}function Jp(i){return typeof i=="function"?i:Kt}function eo(i,s){return Ve(i)?i:lf(i,s)?[i]:u_(je(i))}var TD=$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 Zb=yz||function(i){return St.clearTimeout(i)};function Mb(i,s){if(s)return i.slice();var p=i.length,h=ab?ab(p):new i.constructor(p);return i.copy(h),h}function qp(i){var s=new i.constructor(i.byteLength);return new ic(s).set(new ic(i)),s}function RD(i,s){var p=s?qp(i.buffer):i.buffer;return new i.constructor(p,i.byteOffset,i.byteLength)}function ID(i){var s=new i.constructor(i.source,k0.exec(i));return s.lastIndex=i.lastIndex,s}function AD(i){return el?Je(el.call(i)):{}}function Fb(i,s){var p=s?qp(i.buffer):i.buffer;return new i.constructor(p,i.byteOffset,i.length)}function Pb(i,s){if(i!==s){var p=i!==r,h=i===null,b=i===i,x=cn(i),O=s!==r,F=s===null,H=s===s,J=cn(s);if(!F&&!J&&!x&&i>s||x&&O&&H&&!F&&!J||h&&O&&H||!p&&H||!b)return 1;if(!h&&!x&&!J&&i<s||J&&p&&b&&!h&&!x||F&&p&&b||!O&&b||!H)return-1}return 0}function LD(i,s,p){for(var h=-1,b=i.criteria,x=s.criteria,O=b.length,F=p.length;++h<O;){var H=Pb(b[h],x[h]);if(H){if(h>=F)return H;var J=p[h];return H*(J=="desc"?-1:1)}}return i.index-s.index}function zb(i,s,p,h){for(var b=-1,x=i.length,O=p.length,F=-1,H=s.length,J=_t(x-O,0),q=Y(H+J),Q=!h;++F<H;)q[F]=s[F];for(;++b<O;)(Q||b<x)&&(q[p[b]]=i[b]);for(;J--;)q[F++]=i[b++];return q}function Db(i,s,p,h){for(var b=-1,x=i.length,O=-1,F=p.length,H=-1,J=s.length,q=_t(x-F,0),Q=Y(q+J),oe=!h;++b<q;)Q[b]=i[b];for(var fe=b;++H<J;)Q[fe+H]=s[H];for(;++O<F;)(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 F=s[x],H=h?h(p[F],i[F],F,p,i):r;H===r&&(H=i[F]),b?_r(p,F,H):tl(p,F,H)}return p}function OD(i,s){return rr(i,af(i),s)}function $D(i,s){return rr(i,t_(i),s)}function kc(i,s){return function(p,h){var b=Ve(p)?zP:oD,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 F=p[h];F&&i(s,F,h,x)}return s})}function Wb(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 Gb(i){return function(s,p,h){for(var b=-1,x=Je(s),O=h(s),F=O.length;F--;){var H=O[i?F:++b];if(p(x[H],H,x)===!1)break}return s}}function ZD(i,s,p){var h=s&B,b=il(i);function x(){var O=this&&this!==St&&this instanceof x?b:i;return O.apply(h?p:this,arguments)}return x}function Ub(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 Cp(W_(D_(s).replace(NP,"")),i,"")}}function il(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 MD(i,s,p){var h=il(i);function b(){for(var x=arguments.length,O=Y(x),F=x,H=Ra(b);F--;)O[F]=arguments[F];var J=x<3&&O[0]!==H&&O[x-1]!==H?[]:Kr(O,H);if(x-=J.length,x<p)return Kb(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 Hb(i){return function(s,p,h){var b=Je(s);if(!jt(s)){var x=be(p,3);s=xt(s),p=function(F){return x(b[F],F,b)}}var O=i(s,p,h);return O>-1?b[x?s[O]:O]:r}}function Xb(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 F=Ec(x),H=F=="wrapper"?rf(x):r;H&&sf(H[0])&&H[1]==(P|E|I|X)&&!H[4].length&&H[9]==1?O=O[Ec(H[0])].apply(O,H[3]):O=x.length==1&&sf(x)?O[F]():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,F,H,J){var q=s&P,Q=s&B,oe=s&$,fe=s&(E|D),_e=s&S,Oe=oe?r:il(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=KP(De,Dt);if(h&&(De=zb(De,h,b,fe)),x&&(De=Db(De,x,O,fe)),Ze-=un,fe&&Ze<J){var pt=Kr(De,Dt);return Kb(i,s,xc,we.placeholder,p,De,pt,F,H,J-Ze)}var Gn=Q?p:this,Sr=oe?Gn[i]:i;return Ze=De.length,F?De=o9(De,F):_e&&Ze>1&&De.reverse(),q&&H<Ze&&(De.length=H),this&&this!==St&&this instanceof we&&(Sr=Oe||il(Sr)),Sr.apply(Gn,De)}return we}function jb(i,s){return function(p,h){return pD(p,i,s(h),{})}}function Cc(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=Ab(p),h=Ab(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 vc(i,s){s=s===r?" ":sn(s);var p=s.length;if(p<2)return p?Hp(s,i):s;var h=Hp(s,dc(i/Ca(s)));return xa(s)?to(zn(h),0,i).join(""):h.slice(0,i)}function FD(i,s,p,h){var b=s&B,x=il(i);function O(){for(var F=-1,H=arguments.length,J=-1,q=h.length,Q=Y(q+H),oe=this&&this!==St&&this instanceof O?x:i;++J<q;)Q[J]=h[J];for(;H--;)Q[J++]=arguments[++F];return an(oe,b?p:this,Q)}return O}function Yb(i){return function(s,p,h){return h&&typeof h!="number"&&zt(s,p,h)&&(p=h=r),s=vr(s),p===r?(p=s,s=0):p=vr(p),h=h===r?s<p?1:-1:vr(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 Kb(i,s,p,h,b,x,O,F,H,J){var q=s&E,Q=q?O:r,oe=q?r:O,fe=q?x:r,_e=q?r:x;s|=q?I:V,s&=~(q?V:I),s&W||(s&=~(B|$));var Oe=[i,s,b,fe,Q,_e,oe,F,H,J],we=p.apply(r,Oe);return sf(i)&&s_(we,Oe),we.placeholder=h,c_(we,i,s)}function ef(i){var s=bt[i];return function(p,h){if(p=_n(p),h=h==null?0:Rt(Re(h),292),h&&cb(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 PD=Ea&&1/ec(new Ea([,-0]))[1]==Z?function(i){return new Ea(i)}:Cf;function Jb(i){return function(s){var p=It(s);return p==Fn?Tp(s):p==Pn?rz(s):YP(s,i(s))}}function wr(i,s,p,h,b,x,O,F){var H=s&$;if(!H&&typeof i!="function")throw new mn(c);var J=h?h.length:0;if(J||(s&=~(I|V),h=b=r),O=O===r?O:_t(Re(O),0),F=F===r?F:Re(F),J-=b?b.length:0,s&V){var q=h,Q=b;h=b=r}var oe=H?r:rf(i),fe=[i,s,p,h,b,q,Q,x,O,F];if(oe&&t9(fe,oe),i=fe[0],s=fe[1],p=fe[2],h=fe[3],b=fe[4],F=fe[9]=fe[9]===r?H?0:i.length:_t(fe[9]-J,0),!F&&s&(E|D)&&(s&=~(E|D)),!s||s==B)var _e=ZD(i,s,p);else s==E||s==D?_e=MD(i,s,F):(s==I||s==(B|I))&&!b.length?_e=FD(i,s,p,h):_e=xc.apply(r,fe);var Oe=oe?Rb:s_;return c_(Oe(_e,fe),i,s)}function qb(i,s,p,h){return i===r||Wn(i,Sa[p])&&!Ke.call(h,p)?s:i}function Qb(i,s,p,h,b,x){return lt(i)&<(s)&&(x.set(s,i),bc(i,s,r,Qb,x),x.delete(s)),i}function zD(i){return cl(i)?r:i}function e_(i,s,p,h,b,x){var O=p&C,F=i.length,H=s.length;if(F!=H&&!(O&&H>F))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<F;){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(!Yi(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 DD(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 ji:return!(i.byteLength!=s.byteLength||!x(new ic(i),new ic(s)));case Di:case Wi:case Gi:return Wn(+i,+s);case Hs:return i.name==s.name&&i.message==s.message;case Ui:case Hi:return i==s+"";case Fn:var F=Tp;case Pn:var H=h&C;if(F||(F=ec),i.size!=s.size&&!H)return!1;var J=O.get(i);if(J)return J==s;h|=N,O.set(i,s);var q=e_(F(i),F(s),h,b,x,O);return O.delete(i),q;case js:if(el)return el.call(i)==el.call(s)}return!1}function WD(i,s,p,h,b,x){var O=p&C,F=tf(i),H=F.length,J=tf(s),q=J.length;if(H!=q&&!O)return!1;for(var Q=H;Q--;){var oe=F[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<H;){oe=F[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 df(i_(i,r,h_),i+"")}function tf(i){return wb(i,xt,af)}function nf(i){return wb(i,Yt,t_)}var rf=pc?function(i){return pc.get(i)}:Cf;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(k,"placeholder")?k:i;return s.placeholder}function be(){var i=k.iteratee||kf;return i=i===kf?Cb:i,arguments.length?i(arguments[0],arguments[1]):i}function Nc(i,s){var p=i.__data__;return JD(s)?p[typeof s=="string"?"string":"hash"]:p.map}function of(i){for(var s=xt(i),p=s.length;p--;){var h=s[p],b=i[h];s[p]=[h,b,o_(b)]}return s}function Lo(i,s){var p=ez(i,s);return xb(p)?p:r}function GD(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 af=Ip?function(i){return i==null?[]:(i=Je(i),jr(Ip(i),function(s){return lb.call(i,s)}))}:vf,t_=Ip?function(i){for(var s=[];i;)Yr(s,af(i)),i=lc(i);return s}:vf,It=Pt;(Ap&&It(new Ap(new ArrayBuffer(1)))!=_a||Ji&&It(new Ji)!=Fn||Lp&&It(Lp.resolve())!=y0||Ea&&It(new Ea)!=Pn||qi&&It(new qi)!=Xi)&&(It=function(i){var s=Pt(i),p=s==gr?i.constructor:r,h=p?Oo(p):"";if(h)switch(h){case Ez:return _a;case Nz:return Fn;case Vz:return y0;case Bz:return Pn;case Tz:return Xi}return s});function UD(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 HD(i){var s=i.match(qF);return s?s[1].split(QF):[]}function n_(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 XD(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 r_(i){return typeof i.constructor=="function"&&!ll(i)?Va(lc(i)):{}}function jD(i,s,p){var h=i.constructor;switch(s){case ji:return qp(i);case Di:case Wi:return new h(+i);case _a:return RD(i,p);case op:case ap:case ip:case lp:case sp:case cp:case dp:case up:case pp:return Fb(i,p);case Fn:return new h;case Gi:case Hi:return new h(i);case Ui:return ID(i);case Pn:return new h;case js:return AD(i)}}function YD(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(JF,`{
|
|
61
61
|
/* [wrapped with `+s+`] */
|
|
62
|
-
`)}function KD(i){return Ve(i)||$o(i)||!!(lb&&i&&i[lb])}function xr(i,s){var p=typeof i;return s=s??j,!!s&&(p=="number"||p!="symbol"&&sP.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 lf(i,s){if(Ve(i))return!1;var p=typeof i;return p=="number"||p=="symbol"||p=="boolean"||i==null||cn(i)?!0:XF.test(i)||!HF.test(i)||s!=null&&i in Je(s)}function JD(i){var s=typeof i;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?i!=="__proto__":i===null}function sf(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=rf(p);return!!h&&i===h[0]}function qD(i){return!!rb&&rb in i}var QD=nc?vr:Sf;function il(i){var s=i&&i.constructor,p=typeof s=="function"&&s.prototype||Sa;return i===p}function r_(i){return i===i&&!lt(i)}function o_(i,s){return function(p){return p==null?!1:p[i]===s&&(s!==r||i in Je(p))}}function e9(i){var s=Ic(i,function(h){return p.size===f&&p.clear(),h}),p=s.cache;return s}function t9(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?Pb(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?zb(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 n9(i){var s=[];if(i!=null)for(var p in Je(i))s.push(p);return s}function r9(i){return oc.call(i)}function a_(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 i_(i,s){return s.length<2?i:Ao(i,yn(s,0,-1))}function o9(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 cf(i,s){if(!(s==="constructor"&&typeof i[s]=="function")&&s!="__proto__")return i[s]}var l_=c_(Tb),ll=_z||function(i,s){return St.setTimeout(i,s)},df=c_(ND);function s_(i,s,p){var h=s+"";return df(i,YD(h,a9(HD(h),p)))}function c_(i){var s=0,p=0;return function(){var h=vz(),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=Up(p,b),O=i[x];i[x]=i[p],i[p]=O}return i.length=s,i}var d_=e9(function(i){var s=[];return i.charCodeAt(0)===46&&s.push(""),i.replace(jF,function(p,h,b,x){s.push(b?x.replace(nP,"$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 a9(i,s){return fn(Ct,function(p){var h="_."+p[0];s&p[1]&&!qs(i,h)&&i.push(h)}),i.sort()}function u_(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 i9(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 l9(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 s9(){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 c9=$e(function(i,s){return ut(i)?tl(i,Et(s,1,ut,!0)):[]}),d9=$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)):[]}),u9=$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 p9(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 f9(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 m9(i,s){return i&&i.length?wc(i,be(s,3),!0,!0):[]}function h9(i,s){return i&&i.length?wc(i,be(s,3),!0):[]}function g9(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),sD(i,s,p,h)):[]}function p_(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 f_(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 m_(i){var s=i==null?0:i.length;return s?Et(i,1):[]}function y9(i){var s=i==null?0:i.length;return s?Et(i,F):[]}function b9(i,s){var p=i==null?0:i.length;return p?(s=s===r?1:Re(s),Et(i,s)):[]}function _9(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 h_(i){return i&&i.length?i[0]:r}function w9(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 k9(i){var s=i==null?0:i.length;return s?yn(i,0,-1):[]}var x9=$e(function(i){var s=nt(i,Kp);return s.length&&s[0]===i[0]?Pp(s):[]}),v9=$e(function(i){var s=bn(i),p=nt(i,Kp);return s===bn(p)?s=r:p.pop(),p.length&&p[0]===i[0]?Pp(p,be(s,2)):[]}),C9=$e(function(i){var s=bn(i),p=nt(i,Kp);return s=typeof s=="function"?s:r,s&&p.pop(),p.length&&p[0]===i[0]?Pp(p,r,s):[]});function S9(i,s){return i==null?"":kz.call(i,s)}function bn(i){var s=i==null?0:i.length;return s?i[s-1]:r}function E9(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?az(i,s,b):Qs(i,Y0,b,!0)}function N9(i,s){return i&&i.length?Eb(i,Re(s)):r}var V9=$e(g_);function g_(i,s){return i&&i.length&&s&&s.length?Gp(i,s):i}function B9(i,s,p){return i&&i.length&&s&&s.length?Gp(i,s,be(p,2)):i}function T9(i,s,p){return i&&i.length&&s&&s.length?Gp(i,s,r,p):i}var R9=kr(function(i,s){var p=i==null?0:i.length,h=$p(i,s);return Bb(i,nt(s,function(b){return xr(b,p)?+b:b}).sort(Fb)),h});function I9(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 Bb(i,b),p}function uf(i){return i==null?i:Sz.call(i)}function A9(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 L9(i,s){return _c(i,s)}function O9(i,s,p){return Xp(i,s,be(p,2))}function $9(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 Z9(i,s){return _c(i,s,!0)}function M9(i,s,p){return Xp(i,s,be(p,2),!0)}function F9(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 P9(i){return i&&i.length?Rb(i):[]}function z9(i,s){return i&&i.length?Rb(i,be(s,2)):[]}function D9(i){var s=i==null?0:i.length;return s?yn(i,1,s):[]}function W9(i,s,p){return i&&i.length?(s=p||s===r?1:Re(s),yn(i,0,s<0?0:s)):[]}function G9(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 U9(i,s){return i&&i.length?wc(i,be(s,3),!1,!0):[]}function H9(i,s){return i&&i.length?wc(i,be(s,3)):[]}var X9=$e(function(i){return Qr(Et(i,1,ut,!0))}),j9=$e(function(i){var s=bn(i);return ut(s)&&(s=r),Qr(Et(i,1,ut,!0),be(s,2))}),Y9=$e(function(i){var s=bn(i);return s=typeof s=="function"?s:r,Qr(Et(i,1,ut,!0),r,s)});function K9(i){return i&&i.length?Qr(i):[]}function J9(i,s){return i&&i.length?Qr(i,be(s,2)):[]}function q9(i,s){return s=typeof s=="function"?s:r,i&&i.length?Qr(i,r,s):[]}function pf(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}),Vp(s,function(p){return nt(i,Sp(p))})}function y_(i,s){if(!(i&&i.length))return[];var p=pf(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):[]}),eW=$e(function(i){return Yp(jr(i,ut))}),tW=$e(function(i){var s=bn(i);return ut(s)&&(s=r),Yp(jr(i,ut),be(s,2))}),nW=$e(function(i){var s=bn(i);return s=typeof s=="function"?s:r,Yp(jr(i,ut),r,s)}),rW=$e(pf);function oW(i,s){return Ob(i||[],s||[],el)}function aW(i,s){return Ob(i||[],s||[],ol)}var iW=$e(function(i){var s=i.length,p=s>1?i[s-1]:r;return p=typeof p=="function"?(i.pop(),p):r,y_(i,p)});function b_(i){var s=w(i);return s.__chain__=!0,s}function lW(i,s){return s(i),i}function Bc(i,s){return s(i)}var sW=kr(function(i){var s=i.length,p=s?i[0]:0,h=this.__wrapped__,b=function(x){return $p(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 cW(){return b_(this)}function dW(){return new hn(this.value(),this.__chain__)}function uW(){this.__values__===r&&(this.__values__=I_(this.value()));var i=this.__index__>=this.__values__.length,s=i?r:this.__values__[this.__index__++];return{done:i,value:s}}function pW(){return this}function fW(i){for(var s,p=this;p instanceof mc;){var h=u_(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 mW(){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:[uf],thisArg:r}),new hn(s,this.__chain__)}return this.thru(uf)}function hW(){return Lb(this.__wrapped__,this.__actions__)}var gW=kc(function(i,s,p){Ke.call(i,p)?++i[p]:_r(i,p,1)});function yW(i,s,p){var h=Ve(i)?X0:lD;return p&&zt(i,s,p)&&(s=r),h(i,be(s,3))}function bW(i,s){var p=Ve(i)?jr:yb;return p(i,be(s,3))}var _W=Ub(p_),wW=Ub(f_);function kW(i,s){return Et(Tc(i,s),1)}function xW(i,s){return Et(Tc(i,s),F)}function vW(i,s,p){return p=p===r?1:Re(p),Et(Tc(i,s),p)}function __(i,s){var p=Ve(i)?fn:qr;return p(i,be(s,3))}function w_(i,s){var p=Ve(i)?DP:gb;return p(i,be(s,3))}var CW=kc(function(i,s,p){Ke.call(i,p)?i[p].push(s):_r(i,p,[s])});function SW(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 EW=$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}),NW=kc(function(i,s,p){_r(i,p,s)});function Tc(i,s){var p=Ve(i)?nt:vb;return p(i,be(s,3))}function VW(i,s,p,h){return i==null?[]:(Ve(s)||(s=s==null?[]:[s]),p=h?r:p,Ve(p)||(p=p==null?[]:[p]),Nb(i,s,p))}var BW=kc(function(i,s,p){i[p?0:1].push(s)},function(){return[[],[]]});function TW(i,s,p){var h=Ve(i)?vp:J0,b=arguments.length<3;return h(i,be(s,4),p,b,qr)}function RW(i,s,p){var h=Ve(i)?WP:J0,b=arguments.length<3;return h(i,be(s,4),p,b,gb)}function IW(i,s){var p=Ve(i)?jr:yb;return p(i,Ac(be(s,3)))}function AW(i){var s=Ve(i)?pb:SD;return s(i)}function LW(i,s,p){(p?zt(i,s,p):s===r)?s=1:s=Re(s);var h=Ve(i)?nD:ED;return h(i,s)}function OW(i){var s=Ve(i)?rD:VD;return s(i)}function $W(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:Dp(i).length}function ZW(i,s,p){var h=Ve(i)?Cp:BD;return p&&zt(i,s,p)&&(s=r),h(i,be(s,3))}var MW=$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]]),Nb(i,Et(s,1),[])}),Rc=bz||function(){return St.Date.now()};function FW(i,s){if(typeof s!="function")throw new mn(c);return i=Re(i),function(){if(--i<1)return s.apply(this,arguments)}}function k_(i,s,p){return s=p?r:s,s=i&&s==null?i.length:s,wr(i,P,r,r,r,r,s)}function x_(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 ff=$e(function(i,s,p){var h=T;if(p.length){var b=Kr(p,Ra(ff));h|=A}return wr(i,h,s,p,b)}),v_=$e(function(i,s,p){var h=T|$;if(p.length){var b=Kr(p,Ra(v_));h|=A}return wr(s,h,i,p,b)});function C_(i,s,p){s=p?r:s;var h=wr(i,E,r,r,r,r,r,s);return h.placeholder=C_.placeholder,h}function S_(i,s,p){s=p?r:s;var h=wr(i,D,r,r,r,r,r,s);return h.placeholder=S_.placeholder,h}function E_(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,U_=s-Gn;return Q?Rt(U_,x-Sr):U_}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&&$b(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 $b(M),M=ll(Ze,s),fe(X)}return M===r&&(M=ll(Ze,s)),O}return un.cancel=dn,un.flush=Dt,un}var PW=$e(function(i,s){return hb(i,1,s)}),zW=$e(function(i,s,p){return hb(i,_n(s)||0,p)});function DW(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 WW(i){return x_(2,i)}var GW=TD(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)})}),mf=$e(function(i,s){var p=Kr(s,Ra(mf));return wr(i,A,r,s,p)}),N_=$e(function(i,s){var p=Kr(s,Ra(N_));return wr(i,B,r,s,p)}),UW=kr(function(i,s){return wr(i,H,r,r,r,s)});function HW(i,s){if(typeof i!="function")throw new mn(c);return s=s===r?s:Re(s),$e(i,s)}function XW(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 jW(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),E_(i,s,{leading:h,maxWait:s,trailing:b})}function YW(i){return k_(i,1)}function KW(i,s){return mf(Jp(s),i)}function JW(){if(!arguments.length)return[];var i=arguments[0];return Ve(i)?i:[i]}function qW(i){return gn(i,_)}function QW(i,s){return s=typeof s=="function"?s:r,gn(i,_,s)}function e4(i){return gn(i,g|_)}function t4(i,s){return s=typeof s=="function"?s:r,gn(i,g|_,s)}function n4(i,s){return s==null||mb(i,s,xt(s))}function Wn(i,s){return i===s||i!==i&&s!==s}var r4=Sc(Fp),o4=Sc(function(i,s){return i>=s}),$o=wb(function(){return arguments}())?wb:function(i){return dt(i)&&Ke.call(i,"callee")&&!ib.call(i,"callee")},Ve=Y.isArray,a4=z0?ln(z0):fD;function jt(i){return i!=null&&Lc(i.length)&&!vr(i)}function ut(i){return dt(i)&&jt(i)}function i4(i){return i===!0||i===!1||dt(i)&&Pt(i)==zi}var no=wz||Sf,l4=D0?ln(D0):mD;function s4(i){return dt(i)&&i.nodeType===1&&!sl(i)}function c4(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!Dp(i).length;for(var p in i)if(Ke.call(i,p))return!1;return!0}function d4(i,s){return rl(i,s)}function u4(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 hf(i){if(!dt(i))return!1;var s=Pt(i);return s==Hs||s==LF||typeof i.message=="string"&&typeof i.name=="string"&&!sl(i)}function p4(i){return typeof i=="number"&&sb(i)}function vr(i){if(!lt(i))return!1;var s=Pt(i);return s==Xs||s==h0||s==AF||s==$F}function V_(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 B_=W0?ln(W0):gD;function f4(i,s){return i===s||zp(i,s,of(s))}function m4(i,s,p){return p=typeof p=="function"?p:r,zp(i,s,of(s),p)}function h4(i){return T_(i)&&i!=+i}function g4(i){if(QD(i))throw new Ne(l);return kb(i)}function y4(i){return i===null}function b4(i){return i==null}function T_(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)==mz}var gf=G0?ln(G0):yD;function _4(i){return V_(i)&&i>=-j&&i<=j}var R_=U0?ln(U0):bD;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=H0?ln(H0):_D;function w4(i){return i===r}function k4(i){return dt(i)&&It(i)==Hi}function x4(i){return dt(i)&&Pt(i)==MF}var v4=Sc(Wp),C4=Sc(function(i,s){return i<=s});function I_(i){if(!i)return[];if(jt(i))return Oc(i)?zn(i):Xt(i);if(Yi&&i[Yi])return nz(i[Yi]());var s=It(i),p=s==Fn?Tp: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 A_(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=q0(i);var p=aP.test(i);return p||lP.test(i)?FP(i.slice(2),p?2:8):oP.test(i)?ue:+i}function L_(i){return rr(i,Yt(i))}function S4(i){return i?Io(Re(i),-j,j):i===0?i:0}function je(i){return i==null?"":sn(i)}var E4=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])}),O_=Ba(function(i,s){rr(s,Yt(s),i)}),$c=Ba(function(i,s,p,h){rr(s,Yt(s),i,h)}),N4=Ba(function(i,s,p,h){rr(s,xt(s),i,h)}),V4=kr($p);function B4(i,s){var p=Va(i);return s==null?p:fb(p,s)}var T4=$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}),R4=$e(function(i){return i.push(r,qb),an($_,r,i)});function I4(i,s){return j0(i,be(s,3),nr)}function A4(i,s){return j0(i,be(s,3),Mp)}function L4(i,s){return i==null?i:Zp(i,be(s,3),Yt)}function O4(i,s){return i==null?i:bb(i,be(s,3),Yt)}function $4(i,s){return i&&nr(i,be(s,3))}function Z4(i,s){return i&&Mp(i,be(s,3))}function M4(i){return i==null?[]:yc(i,xt(i))}function F4(i){return i==null?[]:yc(i,Yt(i))}function yf(i,s,p){var h=i==null?r:Ao(i,s);return h===r?p:h}function P4(i,s){return i!=null&&t_(i,s,cD)}function bf(i,s){return i!=null&&t_(i,s,dD)}var z4=Xb(function(i,s,p){s!=null&&typeof s.toString!="function"&&(s=oc.call(s)),i[s]=p},wf(Kt)),D4=Xb(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),W4=$e(nl);function xt(i){return jt(i)?ub(i):Dp(i)}function Yt(i){return jt(i)?ub(i,!0):wD(i)}function G4(i,s){var p={};return s=be(s,3),nr(i,function(h,b,x){_r(p,s(h,b,x),h)}),p}function U4(i,s){var p={};return s=be(s,3),nr(i,function(h,b,x){_r(p,b,s(h,b,x))}),p}var H4=Ba(function(i,s,p){bc(i,s,p)}),$_=Ba(function(i,s,p,h){bc(i,s,p,h)}),X4=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,nf(i),p),h&&(p=gn(p,g|y|_,zD));for(var b=s.length;b--;)jp(p,s[b]);return p});function j4(i,s){return Z_(i,Ac(be(s)))}var Y4=kr(function(i,s){return i==null?{}:xD(i,s)});function Z_(i,s){if(i==null)return{};var p=nt(nf(i),function(h){return[h]});return s=be(s),Vb(i,p,function(h,b){return s(h,b[0])})}function K4(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 J4(i,s,p){return i==null?i:ol(i,s,p)}function q4(i,s,p,h){return h=typeof h=="function"?h:r,i==null?i:ol(i,s,p,h)}var M_=Kb(xt),F_=Kb(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 eG(i,s){return i==null?!0:jp(i,s)}function tG(i,s,p){return i==null?i:Ab(i,s,Jp(p))}function nG(i,s,p,h){return h=typeof h=="function"?h:r,i==null?i:Ab(i,s,Jp(p),h)}function Aa(i){return i==null?[]:Bp(i,xt(i))}function rG(i){return i==null?[]:Bp(i,Yt(i))}function oG(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 aG(i,s,p){return s=Cr(s),p===r?(p=s,s=0):p=Cr(p),i=_n(i),uD(i,s,p)}function iG(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=cb();return Rt(i+b*(s-i+MP("1e-"+((b+"").length-1))),s)}return Up(i,s)}var lG=Ta(function(i,s,p){return s=s.toLowerCase(),i+(p?P_(s):s)});function P_(i){return _f(je(i).toLowerCase())}function z_(i){return i=je(i),i&&i.replace(cP,JP).replace(VP,"")}function sG(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 cG(i){return i=je(i),i&&WF.test(i)?i.replace(b0,qP):i}function dG(i){return i=je(i),i&&YF.test(i)?i.replace(fp,"\\$&"):i}var uG=Ta(function(i,s,p){return i+(p?"-":"")+s.toLowerCase()}),pG=Ta(function(i,s,p){return i+(p?" ":"")+s.toLowerCase()}),fG=Gb("toLowerCase");function mG(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 hG(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 gG(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 yG(i,s,p){return p||s==null?s=0:s&&(s=+s),Cz(je(i).replace(mp,""),s||0)}function bG(i,s,p){return(p?zt(i,s,p):s===r)?s=1:s=Re(s),Hp(je(i),s)}function _G(){var i=arguments,s=je(i[0]);return i.length<3?s:s.replace(i[1],i[2])}var wG=Ta(function(i,s,p){return i+(p?"_":"")+s.toLowerCase()});function kG(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&&!gf(s))&&(s=sn(s),!s&&xa(i))?to(zn(i),0,p):i.split(s,p)):[]}var xG=Ta(function(i,s,p){return i+(p?" ":"")+_f(s)});function vG(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 CG(i,s,p){var h=w.templateSettings;p&&zt(i,s,p)&&(s=r),i=je(i),s=$c({},s,h,Jb);var b=$c({},s.imports,h.imports,Jb),x=xt(b),O=Bp(b,x),M,X,J=0,q=s.interpolate||Ys,Q="__p += '",oe=Rp((s.escape||Ys).source+"|"+q.source+"|"+(q===_0?rP:Ys).source+"|"+(s.evaluate||Ys).source+"|$","g"),fe="//# sourceURL="+(Ke.call(s,"sourceURL")?(s.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++AP+"]")+`
|
|
63
|
-
`;i.replace(oe,function(we,Ze,De,dn,Dt,un){return De||(De=dn),Q+=i.slice(J,un).replace(dP,QP),Ze&&(
|
|
62
|
+
`)}function KD(i){return Ve(i)||$o(i)||!!(sb&&i&&i[sb])}function xr(i,s){var p=typeof i;return s=s??j,!!s&&(p=="number"||p!="symbol"&&sP.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 lf(i,s){if(Ve(i))return!1;var p=typeof i;return p=="number"||p=="symbol"||p=="boolean"||i==null||cn(i)?!0:XF.test(i)||!HF.test(i)||s!=null&&i in Je(s)}function JD(i){var s=typeof i;return s=="string"||s=="number"||s=="symbol"||s=="boolean"?i!=="__proto__":i===null}function sf(i){var s=Ec(i),p=k[s];if(typeof p!="function"||!(s in Me.prototype))return!1;if(i===p)return!0;var h=rf(p);return!!h&&i===h[0]}function qD(i){return!!ob&&ob in i}var QD=nc?Cr:Sf;function ll(i){var s=i&&i.constructor,p=typeof s=="function"&&s.prototype||Sa;return i===p}function o_(i){return i===i&&!lt(i)}function a_(i,s){return function(p){return p==null?!1:p[i]===s&&(s!==r||i in Je(p))}}function e9(i){var s=Ic(i,function(h){return p.size===f&&p.clear(),h}),p=s.cache;return s}function t9(i,s){var p=i[1],h=s[1],b=p|h,x=b<(B|$|P),O=h==P&&p==E||h==P&&p==X&&i[7].length<=s[8]||h==(P|X)&&s[7].length<=s[8]&&p==E;if(!(x||O))return i;h&B&&(i[2]=s[2],b|=p&B?0:W);var F=s[3];if(F){var H=i[3];i[3]=H?zb(H,F,s[4]):F,i[4]=H?Kr(i[3],m):s[4]}return F=s[5],F&&(H=i[5],i[5]=H?Db(H,F,s[6]):F,i[6]=H?Kr(i[5],m):s[6]),F=s[7],F&&(i[7]=F),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 n9(i){var s=[];if(i!=null)for(var p in Je(i))s.push(p);return s}function r9(i){return oc.call(i)}function i_(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 F=Y(s+1);++b<s;)F[b]=h[b];return F[s]=p(O),an(i,this,F)}}function l_(i,s){return s.length<2?i:Ao(i,yn(s,0,-1))}function o9(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 cf(i,s){if(!(s==="constructor"&&typeof i[s]=="function")&&s!="__proto__")return i[s]}var s_=d_(Rb),sl=_z||function(i,s){return St.setTimeout(i,s)},df=d_(ND);function c_(i,s,p){var h=s+"";return df(i,YD(h,a9(HD(h),p)))}function d_(i){var s=0,p=0;return function(){var h=Cz(),b=v-(h-p);if(p=h,b>0){if(++s>=M)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=Up(p,b),O=i[x];i[x]=i[p],i[p]=O}return i.length=s,i}var u_=e9(function(i){var s=[];return i.charCodeAt(0)===46&&s.push(""),i.replace(jF,function(p,h,b,x){s.push(b?x.replace(nP,"$1"):h||p)}),s});function or(i){if(typeof i=="string"||cn(i))return i;var s=i+"";return s=="0"&&1/i==-Z?"-0":s}function Oo(i){if(i!=null){try{return rc.call(i)}catch{}try{return i+""}catch{}}return""}function a9(i,s){return fn(vt,function(p){var h="_."+p[0];s&p[1]&&!qs(i,h)&&i.push(h)}),i.sort()}function p_(i){if(i instanceof Me)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 i9(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 l9(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 s9(){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 c9=$e(function(i,s){return ut(i)?nl(i,Et(s,1,ut,!0)):[]}),d9=$e(function(i,s){var p=bn(s);return ut(p)&&(p=r),ut(i)?nl(i,Et(s,1,ut,!0),be(p,2)):[]}),u9=$e(function(i,s){var p=bn(s);return ut(p)&&(p=r),ut(i)?nl(i,Et(s,1,ut,!0),r,p):[]});function p9(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 f9(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 m9(i,s){return i&&i.length?wc(i,be(s,3),!0,!0):[]}function h9(i,s){return i&&i.length?wc(i,be(s,3),!0):[]}function g9(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),sD(i,s,p,h)):[]}function f_(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 m_(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 h_(i){var s=i==null?0:i.length;return s?Et(i,1):[]}function y9(i){var s=i==null?0:i.length;return s?Et(i,Z):[]}function b9(i,s){var p=i==null?0:i.length;return p?(s=s===r?1:Re(s),Et(i,s)):[]}function _9(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 g_(i){return i&&i.length?i[0]:r}function w9(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 k9(i){var s=i==null?0:i.length;return s?yn(i,0,-1):[]}var x9=$e(function(i){var s=nt(i,Kp);return s.length&&s[0]===i[0]?Pp(s):[]}),C9=$e(function(i){var s=bn(i),p=nt(i,Kp);return s===bn(p)?s=r:p.pop(),p.length&&p[0]===i[0]?Pp(p,be(s,2)):[]}),v9=$e(function(i){var s=bn(i),p=nt(i,Kp);return s=typeof s=="function"?s:r,s&&p.pop(),p.length&&p[0]===i[0]?Pp(p,r,s):[]});function S9(i,s){return i==null?"":kz.call(i,s)}function bn(i){var s=i==null?0:i.length;return s?i[s-1]:r}function E9(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?az(i,s,b):Qs(i,K0,b,!0)}function N9(i,s){return i&&i.length?Nb(i,Re(s)):r}var V9=$e(y_);function y_(i,s){return i&&i.length&&s&&s.length?Gp(i,s):i}function B9(i,s,p){return i&&i.length&&s&&s.length?Gp(i,s,be(p,2)):i}function T9(i,s,p){return i&&i.length&&s&&s.length?Gp(i,s,r,p):i}var R9=kr(function(i,s){var p=i==null?0:i.length,h=$p(i,s);return Tb(i,nt(s,function(b){return xr(b,p)?+b:b}).sort(Pb)),h});function I9(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 Tb(i,b),p}function uf(i){return i==null?i:Sz.call(i)}function A9(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 L9(i,s){return _c(i,s)}function O9(i,s,p){return Xp(i,s,be(p,2))}function $9(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 Z9(i,s){return _c(i,s,!0)}function M9(i,s,p){return Xp(i,s,be(p,2),!0)}function F9(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 P9(i){return i&&i.length?Ib(i):[]}function z9(i,s){return i&&i.length?Ib(i,be(s,2)):[]}function D9(i){var s=i==null?0:i.length;return s?yn(i,1,s):[]}function W9(i,s,p){return i&&i.length?(s=p||s===r?1:Re(s),yn(i,0,s<0?0:s)):[]}function G9(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 U9(i,s){return i&&i.length?wc(i,be(s,3),!1,!0):[]}function H9(i,s){return i&&i.length?wc(i,be(s,3)):[]}var X9=$e(function(i){return Qr(Et(i,1,ut,!0))}),j9=$e(function(i){var s=bn(i);return ut(s)&&(s=r),Qr(Et(i,1,ut,!0),be(s,2))}),Y9=$e(function(i){var s=bn(i);return s=typeof s=="function"?s:r,Qr(Et(i,1,ut,!0),r,s)});function K9(i){return i&&i.length?Qr(i):[]}function J9(i,s){return i&&i.length?Qr(i,be(s,2)):[]}function q9(i,s){return s=typeof s=="function"?s:r,i&&i.length?Qr(i,r,s):[]}function pf(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}),Vp(s,function(p){return nt(i,Sp(p))})}function b_(i,s){if(!(i&&i.length))return[];var p=pf(i);return s==null?p:nt(p,function(h){return an(s,r,h)})}var Q9=$e(function(i,s){return ut(i)?nl(i,s):[]}),eW=$e(function(i){return Yp(jr(i,ut))}),tW=$e(function(i){var s=bn(i);return ut(s)&&(s=r),Yp(jr(i,ut),be(s,2))}),nW=$e(function(i){var s=bn(i);return s=typeof s=="function"?s:r,Yp(jr(i,ut),r,s)}),rW=$e(pf);function oW(i,s){return $b(i||[],s||[],tl)}function aW(i,s){return $b(i||[],s||[],al)}var iW=$e(function(i){var s=i.length,p=s>1?i[s-1]:r;return p=typeof p=="function"?(i.pop(),p):r,b_(i,p)});function __(i){var s=k(i);return s.__chain__=!0,s}function lW(i,s){return s(i),i}function Bc(i,s){return s(i)}var sW=kr(function(i){var s=i.length,p=s?i[0]:0,h=this.__wrapped__,b=function(x){return $p(x,i)};return s>1||this.__actions__.length||!(h instanceof Me)||!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 cW(){return __(this)}function dW(){return new hn(this.value(),this.__chain__)}function uW(){this.__values__===r&&(this.__values__=A_(this.value()));var i=this.__index__>=this.__values__.length,s=i?r:this.__values__[this.__index__++];return{done:i,value:s}}function pW(){return this}function fW(i){for(var s,p=this;p instanceof mc;){var h=p_(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 mW(){var i=this.__wrapped__;if(i instanceof Me){var s=i;return this.__actions__.length&&(s=new Me(this)),s=s.reverse(),s.__actions__.push({func:Bc,args:[uf],thisArg:r}),new hn(s,this.__chain__)}return this.thru(uf)}function hW(){return Ob(this.__wrapped__,this.__actions__)}var gW=kc(function(i,s,p){Ke.call(i,p)?++i[p]:_r(i,p,1)});function yW(i,s,p){var h=Ve(i)?j0:lD;return p&&zt(i,s,p)&&(s=r),h(i,be(s,3))}function bW(i,s){var p=Ve(i)?jr:bb;return p(i,be(s,3))}var _W=Hb(f_),wW=Hb(m_);function kW(i,s){return Et(Tc(i,s),1)}function xW(i,s){return Et(Tc(i,s),Z)}function CW(i,s,p){return p=p===r?1:Re(p),Et(Tc(i,s),p)}function w_(i,s){var p=Ve(i)?fn:qr;return p(i,be(s,3))}function k_(i,s){var p=Ve(i)?DP:yb;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 SW(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 EW=$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):rl(O,s,p)}),x}),NW=kc(function(i,s,p){_r(i,p,s)});function Tc(i,s){var p=Ve(i)?nt:vb;return p(i,be(s,3))}function VW(i,s,p,h){return i==null?[]:(Ve(s)||(s=s==null?[]:[s]),p=h?r:p,Ve(p)||(p=p==null?[]:[p]),Vb(i,s,p))}var BW=kc(function(i,s,p){i[p?0:1].push(s)},function(){return[[],[]]});function TW(i,s,p){var h=Ve(i)?Cp:q0,b=arguments.length<3;return h(i,be(s,4),p,b,qr)}function RW(i,s,p){var h=Ve(i)?WP:q0,b=arguments.length<3;return h(i,be(s,4),p,b,yb)}function IW(i,s){var p=Ve(i)?jr:bb;return p(i,Ac(be(s,3)))}function AW(i){var s=Ve(i)?fb:SD;return s(i)}function LW(i,s,p){(p?zt(i,s,p):s===r)?s=1:s=Re(s);var h=Ve(i)?nD:ED;return h(i,s)}function OW(i){var s=Ve(i)?rD:VD;return s(i)}function $W(i){if(i==null)return 0;if(jt(i))return Oc(i)?Ca(i):i.length;var s=It(i);return s==Fn||s==Pn?i.size:Dp(i).length}function ZW(i,s,p){var h=Ve(i)?vp:BD;return p&&zt(i,s,p)&&(s=r),h(i,be(s,3))}var MW=$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]]),Vb(i,Et(s,1),[])}),Rc=bz||function(){return St.Date.now()};function FW(i,s){if(typeof s!="function")throw new mn(c);return i=Re(i),function(){if(--i<1)return s.apply(this,arguments)}}function x_(i,s,p){return s=p?r:s,s=i&&s==null?i.length:s,wr(i,P,r,r,r,r,s)}function C_(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 ff=$e(function(i,s,p){var h=B;if(p.length){var b=Kr(p,Ra(ff));h|=I}return wr(i,h,s,p,b)}),v_=$e(function(i,s,p){var h=B|$;if(p.length){var b=Kr(p,Ra(v_));h|=I}return wr(s,h,i,p,b)});function S_(i,s,p){s=p?r:s;var h=wr(i,E,r,r,r,r,r,s);return h.placeholder=S_.placeholder,h}function E_(i,s,p){s=p?r:s;var h=wr(i,D,r,r,r,r,r,s);return h.placeholder=E_.placeholder,h}function N_(i,s,p){var h,b,x,O,F,H,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,F=sl(Ze,s),q?fe(pt):O}function Oe(pt){var Gn=pt-H,Sr=pt-J,H_=s-Gn;return Q?Rt(H_,x-Sr):H_}function we(pt){var Gn=pt-H,Sr=pt-J;return H===r||Gn>=s||Gn<0||Q&&Sr>=x}function Ze(){var pt=Rc();if(we(pt))return De(pt);F=sl(Ze,Oe(pt))}function De(pt){return F=r,oe&&h?fe(pt):(h=b=r,O)}function dn(){F!==r&&Zb(F),J=0,h=H=b=F=r}function Dt(){return F===r?O:De(Rc())}function un(){var pt=Rc(),Gn=we(pt);if(h=arguments,b=this,H=pt,Gn){if(F===r)return _e(H);if(Q)return Zb(F),F=sl(Ze,s),fe(H)}return F===r&&(F=sl(Ze,s)),O}return un.cancel=dn,un.flush=Dt,un}var PW=$e(function(i,s){return gb(i,1,s)}),zW=$e(function(i,s,p){return gb(i,_n(s)||0,p)});function DW(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 WW(i){return C_(2,i)}var GW=TD(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)})}),mf=$e(function(i,s){var p=Kr(s,Ra(mf));return wr(i,I,r,s,p)}),V_=$e(function(i,s){var p=Kr(s,Ra(V_));return wr(i,V,r,s,p)}),UW=kr(function(i,s){return wr(i,X,r,r,r,s)});function HW(i,s){if(typeof i!="function")throw new mn(c);return s=s===r?s:Re(s),$e(i,s)}function XW(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 jW(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),N_(i,s,{leading:h,maxWait:s,trailing:b})}function YW(i){return x_(i,1)}function KW(i,s){return mf(Jp(s),i)}function JW(){if(!arguments.length)return[];var i=arguments[0];return Ve(i)?i:[i]}function qW(i){return gn(i,_)}function QW(i,s){return s=typeof s=="function"?s:r,gn(i,_,s)}function e4(i){return gn(i,g|_)}function t4(i,s){return s=typeof s=="function"?s:r,gn(i,g|_,s)}function n4(i,s){return s==null||hb(i,s,xt(s))}function Wn(i,s){return i===s||i!==i&&s!==s}var r4=Sc(Fp),o4=Sc(function(i,s){return i>=s}),$o=kb(function(){return arguments}())?kb:function(i){return dt(i)&&Ke.call(i,"callee")&&!lb.call(i,"callee")},Ve=Y.isArray,a4=D0?ln(D0):fD;function jt(i){return i!=null&&Lc(i.length)&&!Cr(i)}function ut(i){return dt(i)&&jt(i)}function i4(i){return i===!0||i===!1||dt(i)&&Pt(i)==Di}var no=wz||Sf,l4=W0?ln(W0):mD;function s4(i){return dt(i)&&i.nodeType===1&&!cl(i)}function c4(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(ll(i))return!Dp(i).length;for(var p in i)if(Ke.call(i,p))return!1;return!0}function d4(i,s){return ol(i,s)}function u4(i,s,p){p=typeof p=="function"?p:r;var h=p?p(i,s):r;return h===r?ol(i,s,r,p):!!h}function hf(i){if(!dt(i))return!1;var s=Pt(i);return s==Hs||s==LF||typeof i.message=="string"&&typeof i.name=="string"&&!cl(i)}function p4(i){return typeof i=="number"&&cb(i)}function Cr(i){if(!lt(i))return!1;var s=Pt(i);return s==Xs||s==g0||s==AF||s==$F}function B_(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 T_=G0?ln(G0):gD;function f4(i,s){return i===s||zp(i,s,of(s))}function m4(i,s,p){return p=typeof p=="function"?p:r,zp(i,s,of(s),p)}function h4(i){return R_(i)&&i!=+i}function g4(i){if(QD(i))throw new Ne(l);return xb(i)}function y4(i){return i===null}function b4(i){return i==null}function R_(i){return typeof i=="number"||dt(i)&&Pt(i)==Gi}function cl(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)==mz}var gf=U0?ln(U0):yD;function _4(i){return B_(i)&&i>=-j&&i<=j}var I_=H0?ln(H0):bD;function Oc(i){return typeof i=="string"||!Ve(i)&&dt(i)&&Pt(i)==Hi}function cn(i){return typeof i=="symbol"||dt(i)&&Pt(i)==js}var Ia=X0?ln(X0):_D;function w4(i){return i===r}function k4(i){return dt(i)&&It(i)==Xi}function x4(i){return dt(i)&&Pt(i)==MF}var C4=Sc(Wp),v4=Sc(function(i,s){return i<=s});function A_(i){if(!i)return[];if(jt(i))return Oc(i)?zn(i):Xt(i);if(Ki&&i[Ki])return nz(i[Ki]());var s=It(i),p=s==Fn?Tp:s==Pn?ec:Aa;return p(i)}function vr(i){if(!i)return i===0?i:0;if(i=_n(i),i===Z||i===-Z){var s=i<0?-1:1;return s*ee}return i===i?i:0}function Re(i){var s=vr(i),p=s%1;return s===s?p?s-p:s:0}function L_(i){return i?Io(Re(i),0,ye):0}function _n(i){if(typeof i=="number")return i;if(cn(i))return ce;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=Q0(i);var p=aP.test(i);return p||lP.test(i)?FP(i.slice(2),p?2:8):oP.test(i)?ce:+i}function O_(i){return rr(i,Yt(i))}function S4(i){return i?Io(Re(i),-j,j):i===0?i:0}function je(i){return i==null?"":sn(i)}var E4=Ba(function(i,s){if(ll(s)||jt(s)){rr(s,xt(s),i);return}for(var p in s)Ke.call(s,p)&&tl(i,p,s[p])}),$_=Ba(function(i,s){rr(s,Yt(s),i)}),$c=Ba(function(i,s,p,h){rr(s,Yt(s),i,h)}),N4=Ba(function(i,s,p,h){rr(s,xt(s),i,h)}),V4=kr($p);function B4(i,s){var p=Va(i);return s==null?p:mb(p,s)}var T4=$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),F=-1,H=O.length;++F<H;){var J=O[F],q=i[J];(q===r||Wn(q,Sa[J])&&!Ke.call(i,J))&&(i[J]=x[J])}return i}),R4=$e(function(i){return i.push(r,Qb),an(Z_,r,i)});function I4(i,s){return Y0(i,be(s,3),nr)}function A4(i,s){return Y0(i,be(s,3),Mp)}function L4(i,s){return i==null?i:Zp(i,be(s,3),Yt)}function O4(i,s){return i==null?i:_b(i,be(s,3),Yt)}function $4(i,s){return i&&nr(i,be(s,3))}function Z4(i,s){return i&&Mp(i,be(s,3))}function M4(i){return i==null?[]:yc(i,xt(i))}function F4(i){return i==null?[]:yc(i,Yt(i))}function yf(i,s,p){var h=i==null?r:Ao(i,s);return h===r?p:h}function P4(i,s){return i!=null&&n_(i,s,cD)}function bf(i,s){return i!=null&&n_(i,s,dD)}var z4=jb(function(i,s,p){s!=null&&typeof s.toString!="function"&&(s=oc.call(s)),i[s]=p},wf(Kt)),D4=jb(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),W4=$e(rl);function xt(i){return jt(i)?pb(i):Dp(i)}function Yt(i){return jt(i)?pb(i,!0):wD(i)}function G4(i,s){var p={};return s=be(s,3),nr(i,function(h,b,x){_r(p,s(h,b,x),h)}),p}function U4(i,s){var p={};return s=be(s,3),nr(i,function(h,b,x){_r(p,b,s(h,b,x))}),p}var H4=Ba(function(i,s,p){bc(i,s,p)}),Z_=Ba(function(i,s,p,h){bc(i,s,p,h)}),X4=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,nf(i),p),h&&(p=gn(p,g|y|_,zD));for(var b=s.length;b--;)jp(p,s[b]);return p});function j4(i,s){return M_(i,Ac(be(s)))}var Y4=kr(function(i,s){return i==null?{}:xD(i,s)});function M_(i,s){if(i==null)return{};var p=nt(nf(i),function(h){return[h]});return s=be(s),Bb(i,p,function(h,b){return s(h,b[0])})}function K4(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=Cr(x)?x.call(i):x}return i}function J4(i,s,p){return i==null?i:al(i,s,p)}function q4(i,s,p,h){return h=typeof h=="function"?h:r,i==null?i:al(i,s,p,h)}var F_=Jb(xt),P_=Jb(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=Cr(x)?Va(lc(i)):{}:p={}}return(b?fn:nr)(i,function(O,F,H){return s(p,O,F,H)}),p}function eG(i,s){return i==null?!0:jp(i,s)}function tG(i,s,p){return i==null?i:Lb(i,s,Jp(p))}function nG(i,s,p,h){return h=typeof h=="function"?h:r,i==null?i:Lb(i,s,Jp(p),h)}function Aa(i){return i==null?[]:Bp(i,xt(i))}function rG(i){return i==null?[]:Bp(i,Yt(i))}function oG(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 aG(i,s,p){return s=vr(s),p===r?(p=s,s=0):p=vr(p),i=_n(i),uD(i,s,p)}function iG(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=vr(i),s===r?(s=i,i=0):s=vr(s)),i>s){var h=i;i=s,s=h}if(p||i%1||s%1){var b=db();return Rt(i+b*(s-i+MP("1e-"+((b+"").length-1))),s)}return Up(i,s)}var lG=Ta(function(i,s,p){return s=s.toLowerCase(),i+(p?z_(s):s)});function z_(i){return _f(je(i).toLowerCase())}function D_(i){return i=je(i),i&&i.replace(cP,JP).replace(VP,"")}function sG(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 cG(i){return i=je(i),i&&WF.test(i)?i.replace(_0,qP):i}function dG(i){return i=je(i),i&&YF.test(i)?i.replace(fp,"\\$&"):i}var uG=Ta(function(i,s,p){return i+(p?"-":"")+s.toLowerCase()}),pG=Ta(function(i,s,p){return i+(p?" ":"")+s.toLowerCase()}),fG=Ub("toLowerCase");function mG(i,s,p){i=je(i),s=Re(s);var h=s?Ca(i):0;if(!s||h>=s)return i;var b=(s-h)/2;return vc(uc(b),p)+i+vc(dc(b),p)}function hG(i,s,p){i=je(i),s=Re(s);var h=s?Ca(i):0;return s&&h<s?i+vc(s-h,p):i}function gG(i,s,p){i=je(i),s=Re(s);var h=s?Ca(i):0;return s&&h<s?vc(s-h,p)+i:i}function yG(i,s,p){return p||s==null?s=0:s&&(s=+s),vz(je(i).replace(mp,""),s||0)}function bG(i,s,p){return(p?zt(i,s,p):s===r)?s=1:s=Re(s),Hp(je(i),s)}function _G(){var i=arguments,s=je(i[0]);return i.length<3?s:s.replace(i[1],i[2])}var wG=Ta(function(i,s,p){return i+(p?"_":"")+s.toLowerCase()});function kG(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&&!gf(s))&&(s=sn(s),!s&&xa(i))?to(zn(i),0,p):i.split(s,p)):[]}var xG=Ta(function(i,s,p){return i+(p?" ":"")+_f(s)});function CG(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=k.templateSettings;p&&zt(i,s,p)&&(s=r),i=je(i),s=$c({},s,h,qb);var b=$c({},s.imports,h.imports,qb),x=xt(b),O=Bp(b,x),F,H,J=0,q=s.interpolate||Ys,Q="__p += '",oe=Rp((s.escape||Ys).source+"|"+q.source+"|"+(q===w0?rP:Ys).source+"|"+(s.evaluate||Ys).source+"|$","g"),fe="//# sourceURL="+(Ke.call(s,"sourceURL")?(s.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++AP+"]")+`
|
|
63
|
+
`;i.replace(oe,function(we,Ze,De,dn,Dt,un){return De||(De=dn),Q+=i.slice(J,un).replace(dP,QP),Ze&&(F=!0,Q+=`' +
|
|
64
64
|
__e(`+Ze+`) +
|
|
65
|
-
'`),Dt&&(
|
|
65
|
+
'`),Dt&&(H=!0,Q+=`';
|
|
66
66
|
`+Dt+`;
|
|
67
67
|
__p += '`),De&&(Q+=`' +
|
|
68
68
|
((__t = (`+De+`)) == null ? '' : __t) +
|
|
@@ -70,20 +70,20 @@ __p += '`),De&&(Q+=`' +
|
|
|
70
70
|
`;var _e=Ke.call(s,"variable")&&s.variable;if(!_e)Q=`with (obj) {
|
|
71
71
|
`+Q+`
|
|
72
72
|
}
|
|
73
|
-
`;else if(tP.test(_e))throw new Ne(d);Q=(
|
|
73
|
+
`;else if(tP.test(_e))throw new Ne(d);Q=(H?Q.replace(FF,""):Q).replace(PF,"$1").replace(zF,"$1;"),Q="function("+(_e||"obj")+`) {
|
|
74
74
|
`+(_e?"":`obj || (obj = {});
|
|
75
|
-
`)+"var __t, __p = ''"+(
|
|
75
|
+
`)+"var __t, __p = ''"+(F?", __e = _.escape":"")+(H?`, __j = Array.prototype.join;
|
|
76
76
|
function print() { __p += __j.call(arguments, '') }
|
|
77
77
|
`:`;
|
|
78
78
|
`)+Q+`return __p
|
|
79
|
-
}`;var Oe=W_(function(){return Xe(x,fe+"return "+Q).apply(r,O)});if(Oe.source=Q,hf(Oe))throw Oe;return Oe}function SG(i){return je(i).toLowerCase()}function EG(i){return je(i).toUpperCase()}function NG(i,s,p){if(i=je(i),i&&(p||s===r))return q0(i);if(!i||!(s=sn(s)))return i;var h=zn(i),b=zn(s),x=Q0(h,b),O=eb(h,b)+1;return to(h,x,O).join("")}function VG(i,s,p){if(i=je(i),i&&(p||s===r))return i.slice(0,nb(i)+1);if(!i||!(s=sn(s)))return i;var h=zn(i),b=eb(h,zn(s))+1;return to(h,0,b).join("")}function BG(i,s,p){if(i=je(i),i&&(p||s===r))return i.replace(mp,"");if(!i||!(s=sn(s)))return i;var h=zn(i),b=Q0(h,zn(s));return to(h,b).join("")}function TG(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),gf(b)){if(i.slice(M).search(b)){var J,q=X;for(b.global||(b=Rp(b.source,je(w0.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 RG(i){return i=je(i),i&&DF.test(i)?i.replace(y0,iz):i}var IG=Ta(function(i,s,p){return i+(p?" ":"")+s.toUpperCase()}),_f=Gb("toUpperCase");function D_(i,s,p){return i=je(i),s=p?r:s,s===r?tz(i)?cz(i):HP(i):i.match(s)||[]}var W_=$e(function(i,s){try{return an(i,r,s)}catch(p){return hf(p)?p:new Ne(p)}}),AG=kr(function(i,s){return fn(s,function(p){p=or(p),_r(i,p,ff(i[p],i))}),i});function LG(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 OG(i){return iD(gn(i,g))}function wf(i){return function(){return i}}function $G(i,s){return i==null||i!==i?s:i}var ZG=Hb(),MG=Hb(!0);function Kt(i){return i}function kf(i){return xb(typeof i=="function"?i:gn(i,g))}function FG(i){return Cb(gn(i,g))}function PG(i,s){return Sb(i,gn(s,g))}var zG=$e(function(i,s){return function(p){return nl(p,i,s)}}),DG=$e(function(i,s){return function(p){return nl(i,p,s)}});function xf(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 WG(){return St._===this&&(St._=hz),this}function vf(){}function GG(i){return i=Re(i),$e(function(s){return Eb(s,i)})}var UG=Qp(nt),HG=Qp(X0),XG=Qp(Cp);function G_(i){return lf(i)?Sp(or(i)):vD(i)}function jG(i){return function(s){return i==null?r:Ao(i,s)}}var YG=jb(),KG=jb(!0);function Cf(){return[]}function Sf(){return!1}function JG(){return{}}function qG(){return""}function QG(){return!0}function eU(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=Vp(h,s);++p<i;)s(p);return b}function tU(i){return Ve(i)?nt(i,or):cn(i)?[i]:Xt(d_(je(i)))}function nU(i){var s=++fz;return je(i)+s}var rU=vc(function(i,s){return i+s},0),oU=ef("ceil"),aU=vc(function(i,s){return i/s},1),iU=ef("floor");function lU(i){return i&&i.length?gc(i,Kt,Fp):r}function sU(i,s){return i&&i.length?gc(i,be(s,2),Fp):r}function cU(i){return K0(i,Kt)}function dU(i,s){return K0(i,be(s,2))}function uU(i){return i&&i.length?gc(i,Kt,Wp):r}function pU(i,s){return i&&i.length?gc(i,be(s,2),Wp):r}var fU=vc(function(i,s){return i*s},1),mU=ef("round"),hU=vc(function(i,s){return i-s},0);function gU(i){return i&&i.length?Np(i,Kt):0}function yU(i,s){return i&&i.length?Np(i,be(s,2)):0}return w.after=FW,w.ary=k_,w.assign=E4,w.assignIn=O_,w.assignInWith=$c,w.assignWith=N4,w.at=V4,w.before=x_,w.bind=ff,w.bindAll=AG,w.bindKey=v_,w.castArray=JW,w.chain=b_,w.chunk=i9,w.compact=l9,w.concat=s9,w.cond=LG,w.conforms=OG,w.constant=wf,w.countBy=gW,w.create=B4,w.curry=C_,w.curryRight=S_,w.debounce=E_,w.defaults=T4,w.defaultsDeep=R4,w.defer=PW,w.delay=zW,w.difference=c9,w.differenceBy=d9,w.differenceWith=u9,w.drop=p9,w.dropRight=f9,w.dropRightWhile=m9,w.dropWhile=h9,w.fill=g9,w.filter=bW,w.flatMap=kW,w.flatMapDeep=xW,w.flatMapDepth=vW,w.flatten=m_,w.flattenDeep=y9,w.flattenDepth=b9,w.flip=DW,w.flow=ZG,w.flowRight=MG,w.fromPairs=_9,w.functions=M4,w.functionsIn=F4,w.groupBy=CW,w.initial=k9,w.intersection=x9,w.intersectionBy=v9,w.intersectionWith=C9,w.invert=z4,w.invertBy=D4,w.invokeMap=EW,w.iteratee=kf,w.keyBy=NW,w.keys=xt,w.keysIn=Yt,w.map=Tc,w.mapKeys=G4,w.mapValues=U4,w.matches=FG,w.matchesProperty=PG,w.memoize=Ic,w.merge=H4,w.mergeWith=$_,w.method=zG,w.methodOf=DG,w.mixin=xf,w.negate=Ac,w.nthArg=GG,w.omit=X4,w.omitBy=j4,w.once=WW,w.orderBy=VW,w.over=UG,w.overArgs=GW,w.overEvery=HG,w.overSome=XG,w.partial=mf,w.partialRight=N_,w.partition=BW,w.pick=Y4,w.pickBy=Z_,w.property=G_,w.propertyOf=jG,w.pull=V9,w.pullAll=g_,w.pullAllBy=B9,w.pullAllWith=T9,w.pullAt=R9,w.range=YG,w.rangeRight=KG,w.rearg=UW,w.reject=IW,w.remove=I9,w.rest=HW,w.reverse=uf,w.sampleSize=LW,w.set=J4,w.setWith=q4,w.shuffle=OW,w.slice=A9,w.sortBy=MW,w.sortedUniq=P9,w.sortedUniqBy=z9,w.split=kG,w.spread=XW,w.tail=D9,w.take=W9,w.takeRight=G9,w.takeRightWhile=U9,w.takeWhile=H9,w.tap=lW,w.throttle=jW,w.thru=Bc,w.toArray=I_,w.toPairs=M_,w.toPairsIn=F_,w.toPath=tU,w.toPlainObject=L_,w.transform=Q4,w.unary=YW,w.union=X9,w.unionBy=j9,w.unionWith=Y9,w.uniq=K9,w.uniqBy=J9,w.uniqWith=q9,w.unset=eG,w.unzip=pf,w.unzipWith=y_,w.update=tG,w.updateWith=nG,w.values=Aa,w.valuesIn=rG,w.without=Q9,w.words=D_,w.wrap=KW,w.xor=eW,w.xorBy=tW,w.xorWith=nW,w.zip=rW,w.zipObject=oW,w.zipObjectDeep=aW,w.zipWith=iW,w.entries=M_,w.entriesIn=F_,w.extend=O_,w.extendWith=$c,xf(w,w),w.add=rU,w.attempt=W_,w.camelCase=lG,w.capitalize=P_,w.ceil=oU,w.clamp=oG,w.clone=qW,w.cloneDeep=e4,w.cloneDeepWith=t4,w.cloneWith=QW,w.conformsTo=n4,w.deburr=z_,w.defaultTo=$G,w.divide=aU,w.endsWith=sG,w.eq=Wn,w.escape=cG,w.escapeRegExp=dG,w.every=yW,w.find=_W,w.findIndex=p_,w.findKey=I4,w.findLast=wW,w.findLastIndex=f_,w.findLastKey=A4,w.floor=iU,w.forEach=__,w.forEachRight=w_,w.forIn=L4,w.forInRight=O4,w.forOwn=$4,w.forOwnRight=Z4,w.get=yf,w.gt=r4,w.gte=o4,w.has=P4,w.hasIn=bf,w.head=h_,w.identity=Kt,w.includes=SW,w.indexOf=w9,w.inRange=aG,w.invoke=W4,w.isArguments=$o,w.isArray=Ve,w.isArrayBuffer=a4,w.isArrayLike=jt,w.isArrayLikeObject=ut,w.isBoolean=i4,w.isBuffer=no,w.isDate=l4,w.isElement=s4,w.isEmpty=c4,w.isEqual=d4,w.isEqualWith=u4,w.isError=hf,w.isFinite=p4,w.isFunction=vr,w.isInteger=V_,w.isLength=Lc,w.isMap=B_,w.isMatch=f4,w.isMatchWith=m4,w.isNaN=h4,w.isNative=g4,w.isNil=b4,w.isNull=y4,w.isNumber=T_,w.isObject=lt,w.isObjectLike=dt,w.isPlainObject=sl,w.isRegExp=gf,w.isSafeInteger=_4,w.isSet=R_,w.isString=Oc,w.isSymbol=cn,w.isTypedArray=Ia,w.isUndefined=w4,w.isWeakMap=k4,w.isWeakSet=x4,w.join=S9,w.kebabCase=uG,w.last=bn,w.lastIndexOf=E9,w.lowerCase=pG,w.lowerFirst=fG,w.lt=v4,w.lte=C4,w.max=lU,w.maxBy=sU,w.mean=cU,w.meanBy=dU,w.min=uU,w.minBy=pU,w.stubArray=Cf,w.stubFalse=Sf,w.stubObject=JG,w.stubString=qG,w.stubTrue=QG,w.multiply=fU,w.nth=N9,w.noConflict=WG,w.noop=vf,w.now=Rc,w.pad=mG,w.padEnd=hG,w.padStart=gG,w.parseInt=yG,w.random=iG,w.reduce=TW,w.reduceRight=RW,w.repeat=bG,w.replace=_G,w.result=K4,w.round=mU,w.runInContext=G,w.sample=AW,w.size=$W,w.snakeCase=wG,w.some=ZW,w.sortedIndex=L9,w.sortedIndexBy=O9,w.sortedIndexOf=$9,w.sortedLastIndex=Z9,w.sortedLastIndexBy=M9,w.sortedLastIndexOf=F9,w.startCase=xG,w.startsWith=vG,w.subtract=hU,w.sum=gU,w.sumBy=yU,w.template=CG,w.times=eU,w.toFinite=Cr,w.toInteger=Re,w.toLength=A_,w.toLower=SG,w.toNumber=_n,w.toSafeInteger=S4,w.toString=je,w.toUpper=EG,w.trim=NG,w.trimEnd=VG,w.trimStart=BG,w.truncate=TG,w.unescape=RG,w.uniqueId=nU,w.upperCase=IG,w.upperFirst=_f,w.each=__,w.eachRight=w_,w.first=h_,xf(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=Rz,Fe.prototype.reverse=Iz,Fe.prototype.value=Az,w.prototype.at=sW,w.prototype.chain=cW,w.prototype.commit=dW,w.prototype.next=uW,w.prototype.plant=fW,w.prototype.reverse=mW,w.prototype.toJSON=w.prototype.valueOf=w.prototype.value=hW,w.prototype.first=w.prototype.head,Yi&&(w.prototype[Yi]=pW),w},Ca=dz();Vo?((Vo.exports=Ca)._=Ca,wp._=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"]))}}),b5={class:"grid-overlay-container"},_5={class:"text-subtitle-m"},xs=t.defineComponent({__name:"PlAgOverlayNoRows",props:{params:{}},setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",b5,[r[0]||(r[0]=t.createElementVNode("div",{class:"grid-icon-sad-cat"},null,-1)),t.createElementVNode("span",_5,t.toDisplayString(e.params.text||"Empty"),1)]))}});async function w5(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"},k5=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))}}),x5={style:{position:"absolute",inset:"0",display:"flex","justify-content":"center","align-items":"center"}},v5={key:1},C5=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",x5,[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",v5,t.toDisplayString(d.params.displayName),1))]))}}),en='"##RowNumberColumnId##"',Dg=45;function vs(){return{colId:en,headerName:"#",headerComponent:C5,valueGetter:n=>n.node===null||n.node.rowIndex===null?null:n.node.rowIndex+1,cellRenderer:k5,headerClass:"pl-ag-header-align-center",suppressNavigable:!0,suppressMovable:!0,mainMenuItems:[],contextMenuItems:[],lockPosition:"left",pinned:"left",lockPinned:!0,width:Dg,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 S5(){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 E5(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(Dg,e.offsetWidth)}]})})}function Wg(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=S5();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=>{Wg(a.api)}),n.addEventListener("gridPreDestroyed",()=>{E5(e)}),Oi(n,e),Wg(n)}const N5={type:"hidden"};function V5(n){return typeof n=="object"&&n!==null&&n.type==="hidden"}const ku=n=>n.value===void 0?"undefined":V5(n.value)?"loading...":Xf(n.value)||n.value===Yc?"":n.value.toString();function Gg(n){return n.type==="column"&&qc(n.spec)}function B5(n){return n.axesSpec.filter(e=>{var r;return((r=e.annotations)==null?void 0:r["pl7.app/axisNature"])==="heterogeneous"})}function T5(n,e){const r=[];for(const o of e)if(n[o].type==="column"){const a=B5(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 Ug=(n,e)=>`hC${n+e}`;function R5(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=I5(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:Ug(o.length,m),headerName:g,valueFormatter:ku})}return{rowModelType:"clientSide",columnDefs:r,rowData:f}}function I5(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=Ug(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 A5={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",A5,[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)]))}}),L5={class:"pl-ag-grid-open-cell d-flex"},O5={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",L5,[t.createElementVNode("div",O5,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 Hg(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 $5(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=T5(c,y),N=y.findIndex(H=>c[H].type==="column");for(let H=y.length-1;H>=N;--H){const S=y[H];if(!Gg(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=>Z5(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 R5(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:Hg(_,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=Hg(_,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 Z5(n,e,r,o){var c,d;const a=jf(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))??Yf(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 Xg=Q_(),M5=["id"],F5=t.defineComponent({__name:"PlAgDataTableToolsPanel",setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",{id:t.unref(Xg),class:"d-flex gap-6"},[t.renderSlot(e.$slots,"default")],8,M5))}}),jg="#"+Xg;function Es(){const n=t.ref(),e=()=>{t.nextTick(()=>{n.value=document.querySelector(jg)?jg:void 0,n.value||console.error(`[PlAgDataTable] Error: 'PlAgDataTableToolsPanel' component is missing.
|
|
79
|
+
}`;var Oe=G_(function(){return Xe(x,fe+"return "+Q).apply(r,O)});if(Oe.source=Q,hf(Oe))throw Oe;return Oe}function SG(i){return je(i).toLowerCase()}function EG(i){return je(i).toUpperCase()}function NG(i,s,p){if(i=je(i),i&&(p||s===r))return Q0(i);if(!i||!(s=sn(s)))return i;var h=zn(i),b=zn(s),x=eb(h,b),O=tb(h,b)+1;return to(h,x,O).join("")}function VG(i,s,p){if(i=je(i),i&&(p||s===r))return i.slice(0,rb(i)+1);if(!i||!(s=sn(s)))return i;var h=zn(i),b=tb(h,zn(s))+1;return to(h,0,b).join("")}function BG(i,s,p){if(i=je(i),i&&(p||s===r))return i.replace(mp,"");if(!i||!(s=sn(s)))return i;var h=zn(i),b=eb(h,zn(s));return to(h,b).join("")}function TG(i,s){var p=R,h=A;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 F=p-Ca(h);if(F<1)return h;var H=O?to(O,0,F).join(""):i.slice(0,F);if(b===r)return H+h;if(O&&(F+=H.length-F),gf(b)){if(i.slice(F).search(b)){var J,q=H;for(b.global||(b=Rp(b.source,je(k0.exec(b))+"g")),b.lastIndex=0;J=b.exec(q);)var Q=J.index;H=H.slice(0,Q===r?F:Q)}}else if(i.indexOf(sn(b),F)!=F){var oe=H.lastIndexOf(b);oe>-1&&(H=H.slice(0,oe))}return H+h}function RG(i){return i=je(i),i&&DF.test(i)?i.replace(b0,iz):i}var IG=Ta(function(i,s,p){return i+(p?" ":"")+s.toUpperCase()}),_f=Ub("toUpperCase");function W_(i,s,p){return i=je(i),s=p?r:s,s===r?tz(i)?cz(i):HP(i):i.match(s)||[]}var G_=$e(function(i,s){try{return an(i,r,s)}catch(p){return hf(p)?p:new Ne(p)}}),AG=kr(function(i,s){return fn(s,function(p){p=or(p),_r(i,p,ff(i[p],i))}),i});function LG(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 OG(i){return iD(gn(i,g))}function wf(i){return function(){return i}}function $G(i,s){return i==null||i!==i?s:i}var ZG=Xb(),MG=Xb(!0);function Kt(i){return i}function kf(i){return Cb(typeof i=="function"?i:gn(i,g))}function FG(i){return Sb(gn(i,g))}function PG(i,s){return Eb(i,gn(s,g))}var zG=$e(function(i,s){return function(p){return rl(p,i,s)}}),DG=$e(function(i,s){return function(p){return rl(i,p,s)}});function xf(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=Cr(i);return fn(b,function(F){var H=s[F];i[F]=H,O&&(i.prototype[F]=function(){var J=this.__chain__;if(x||J){var q=i(this.__wrapped__),Q=q.__actions__=Xt(this.__actions__);return Q.push({func:H,args:arguments,thisArg:i}),q.__chain__=J,q}return H.apply(i,Yr([this.value()],arguments))})}),i}function WG(){return St._===this&&(St._=hz),this}function Cf(){}function GG(i){return i=Re(i),$e(function(s){return Nb(s,i)})}var UG=Qp(nt),HG=Qp(j0),XG=Qp(vp);function U_(i){return lf(i)?Sp(or(i)):CD(i)}function jG(i){return function(s){return i==null?r:Ao(i,s)}}var YG=Yb(),KG=Yb(!0);function vf(){return[]}function Sf(){return!1}function JG(){return{}}function qG(){return""}function QG(){return!0}function eU(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=Vp(h,s);++p<i;)s(p);return b}function tU(i){return Ve(i)?nt(i,or):cn(i)?[i]:Xt(u_(je(i)))}function nU(i){var s=++fz;return je(i)+s}var rU=Cc(function(i,s){return i+s},0),oU=ef("ceil"),aU=Cc(function(i,s){return i/s},1),iU=ef("floor");function lU(i){return i&&i.length?gc(i,Kt,Fp):r}function sU(i,s){return i&&i.length?gc(i,be(s,2),Fp):r}function cU(i){return J0(i,Kt)}function dU(i,s){return J0(i,be(s,2))}function uU(i){return i&&i.length?gc(i,Kt,Wp):r}function pU(i,s){return i&&i.length?gc(i,be(s,2),Wp):r}var fU=Cc(function(i,s){return i*s},1),mU=ef("round"),hU=Cc(function(i,s){return i-s},0);function gU(i){return i&&i.length?Np(i,Kt):0}function yU(i,s){return i&&i.length?Np(i,be(s,2)):0}return k.after=FW,k.ary=x_,k.assign=E4,k.assignIn=$_,k.assignInWith=$c,k.assignWith=N4,k.at=V4,k.before=C_,k.bind=ff,k.bindAll=AG,k.bindKey=v_,k.castArray=JW,k.chain=__,k.chunk=i9,k.compact=l9,k.concat=s9,k.cond=LG,k.conforms=OG,k.constant=wf,k.countBy=gW,k.create=B4,k.curry=S_,k.curryRight=E_,k.debounce=N_,k.defaults=T4,k.defaultsDeep=R4,k.defer=PW,k.delay=zW,k.difference=c9,k.differenceBy=d9,k.differenceWith=u9,k.drop=p9,k.dropRight=f9,k.dropRightWhile=m9,k.dropWhile=h9,k.fill=g9,k.filter=bW,k.flatMap=kW,k.flatMapDeep=xW,k.flatMapDepth=CW,k.flatten=h_,k.flattenDeep=y9,k.flattenDepth=b9,k.flip=DW,k.flow=ZG,k.flowRight=MG,k.fromPairs=_9,k.functions=M4,k.functionsIn=F4,k.groupBy=vW,k.initial=k9,k.intersection=x9,k.intersectionBy=C9,k.intersectionWith=v9,k.invert=z4,k.invertBy=D4,k.invokeMap=EW,k.iteratee=kf,k.keyBy=NW,k.keys=xt,k.keysIn=Yt,k.map=Tc,k.mapKeys=G4,k.mapValues=U4,k.matches=FG,k.matchesProperty=PG,k.memoize=Ic,k.merge=H4,k.mergeWith=Z_,k.method=zG,k.methodOf=DG,k.mixin=xf,k.negate=Ac,k.nthArg=GG,k.omit=X4,k.omitBy=j4,k.once=WW,k.orderBy=VW,k.over=UG,k.overArgs=GW,k.overEvery=HG,k.overSome=XG,k.partial=mf,k.partialRight=V_,k.partition=BW,k.pick=Y4,k.pickBy=M_,k.property=U_,k.propertyOf=jG,k.pull=V9,k.pullAll=y_,k.pullAllBy=B9,k.pullAllWith=T9,k.pullAt=R9,k.range=YG,k.rangeRight=KG,k.rearg=UW,k.reject=IW,k.remove=I9,k.rest=HW,k.reverse=uf,k.sampleSize=LW,k.set=J4,k.setWith=q4,k.shuffle=OW,k.slice=A9,k.sortBy=MW,k.sortedUniq=P9,k.sortedUniqBy=z9,k.split=kG,k.spread=XW,k.tail=D9,k.take=W9,k.takeRight=G9,k.takeRightWhile=U9,k.takeWhile=H9,k.tap=lW,k.throttle=jW,k.thru=Bc,k.toArray=A_,k.toPairs=F_,k.toPairsIn=P_,k.toPath=tU,k.toPlainObject=O_,k.transform=Q4,k.unary=YW,k.union=X9,k.unionBy=j9,k.unionWith=Y9,k.uniq=K9,k.uniqBy=J9,k.uniqWith=q9,k.unset=eG,k.unzip=pf,k.unzipWith=b_,k.update=tG,k.updateWith=nG,k.values=Aa,k.valuesIn=rG,k.without=Q9,k.words=W_,k.wrap=KW,k.xor=eW,k.xorBy=tW,k.xorWith=nW,k.zip=rW,k.zipObject=oW,k.zipObjectDeep=aW,k.zipWith=iW,k.entries=F_,k.entriesIn=P_,k.extend=$_,k.extendWith=$c,xf(k,k),k.add=rU,k.attempt=G_,k.camelCase=lG,k.capitalize=z_,k.ceil=oU,k.clamp=oG,k.clone=qW,k.cloneDeep=e4,k.cloneDeepWith=t4,k.cloneWith=QW,k.conformsTo=n4,k.deburr=D_,k.defaultTo=$G,k.divide=aU,k.endsWith=sG,k.eq=Wn,k.escape=cG,k.escapeRegExp=dG,k.every=yW,k.find=_W,k.findIndex=f_,k.findKey=I4,k.findLast=wW,k.findLastIndex=m_,k.findLastKey=A4,k.floor=iU,k.forEach=w_,k.forEachRight=k_,k.forIn=L4,k.forInRight=O4,k.forOwn=$4,k.forOwnRight=Z4,k.get=yf,k.gt=r4,k.gte=o4,k.has=P4,k.hasIn=bf,k.head=g_,k.identity=Kt,k.includes=SW,k.indexOf=w9,k.inRange=aG,k.invoke=W4,k.isArguments=$o,k.isArray=Ve,k.isArrayBuffer=a4,k.isArrayLike=jt,k.isArrayLikeObject=ut,k.isBoolean=i4,k.isBuffer=no,k.isDate=l4,k.isElement=s4,k.isEmpty=c4,k.isEqual=d4,k.isEqualWith=u4,k.isError=hf,k.isFinite=p4,k.isFunction=Cr,k.isInteger=B_,k.isLength=Lc,k.isMap=T_,k.isMatch=f4,k.isMatchWith=m4,k.isNaN=h4,k.isNative=g4,k.isNil=b4,k.isNull=y4,k.isNumber=R_,k.isObject=lt,k.isObjectLike=dt,k.isPlainObject=cl,k.isRegExp=gf,k.isSafeInteger=_4,k.isSet=I_,k.isString=Oc,k.isSymbol=cn,k.isTypedArray=Ia,k.isUndefined=w4,k.isWeakMap=k4,k.isWeakSet=x4,k.join=S9,k.kebabCase=uG,k.last=bn,k.lastIndexOf=E9,k.lowerCase=pG,k.lowerFirst=fG,k.lt=C4,k.lte=v4,k.max=lU,k.maxBy=sU,k.mean=cU,k.meanBy=dU,k.min=uU,k.minBy=pU,k.stubArray=vf,k.stubFalse=Sf,k.stubObject=JG,k.stubString=qG,k.stubTrue=QG,k.multiply=fU,k.nth=N9,k.noConflict=WG,k.noop=Cf,k.now=Rc,k.pad=mG,k.padEnd=hG,k.padStart=gG,k.parseInt=yG,k.random=iG,k.reduce=TW,k.reduceRight=RW,k.repeat=bG,k.replace=_G,k.result=K4,k.round=mU,k.runInContext=U,k.sample=AW,k.size=$W,k.snakeCase=wG,k.some=ZW,k.sortedIndex=L9,k.sortedIndexBy=O9,k.sortedIndexOf=$9,k.sortedLastIndex=Z9,k.sortedLastIndexBy=M9,k.sortedLastIndexOf=F9,k.startCase=xG,k.startsWith=CG,k.subtract=hU,k.sum=gU,k.sumBy=yU,k.template=vG,k.times=eU,k.toFinite=vr,k.toInteger=Re,k.toLength=L_,k.toLower=SG,k.toNumber=_n,k.toSafeInteger=S4,k.toString=je,k.toUpper=EG,k.trim=NG,k.trimEnd=VG,k.trimStart=BG,k.truncate=TG,k.unescape=RG,k.uniqueId=nU,k.upperCase=IG,k.upperFirst=_f,k.each=w_,k.eachRight=k_,k.first=g_,xf(k,function(){var i={};return nr(k,function(s,p){Ke.call(k.prototype,p)||(i[p]=s)}),i}(),{chain:!1}),k.VERSION=o,fn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){k[i].placeholder=k}),fn(["drop","take"],function(i,s){Me.prototype[i]=function(p){p=p===r?1:_t(Re(p),0);var h=this.__filtered__&&!s?new Me(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},Me.prototype[i+"Right"]=function(p){return this.reverse()[i](p).reverse()}}),fn(["filter","map","takeWhile"],function(i,s){var p=s+1,h=p==w||p==G;Me.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":"");Me.prototype[i]=function(){return this[p](1).value()[0]}}),fn(["initial","tail"],function(i,s){var p="drop"+(s?"":"Right");Me.prototype[i]=function(){return this.__filtered__?new Me(this):this[p](1)}}),Me.prototype.compact=function(){return this.filter(Kt)},Me.prototype.find=function(i){return this.filter(i).head()},Me.prototype.findLast=function(i){return this.reverse().find(i)},Me.prototype.invokeMap=$e(function(i,s){return typeof i=="function"?new Me(this):this.map(function(p){return rl(p,i,s)})}),Me.prototype.reject=function(i){return this.filter(Ac(be(i)))},Me.prototype.slice=function(i,s){i=Re(i);var p=this;return p.__filtered__&&(i>0||s<0)?new Me(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)},Me.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Me.prototype.toArray=function(){return this.take(ye)},nr(Me.prototype,function(i,s){var p=/^(?:filter|find|map|reject)|While$/.test(s),h=/^(?:head|last)$/.test(s),b=k[h?"take"+(s=="last"?"Right":""):s],x=h||/^find/.test(s);b&&(k.prototype[s]=function(){var O=this.__wrapped__,F=h?[1]:arguments,H=O instanceof Me,J=F[0],q=H||Ve(O),Q=function(Ze){var De=b.apply(k,Yr([Ze],F));return h&&oe?De[0]:De};q&&p&&typeof J=="function"&&J.length!=1&&(H=q=!1);var oe=this.__chain__,fe=!!this.__actions__.length,_e=x&&!oe,Oe=H&&!fe;if(!x&&q){O=Oe?O:new Me(this);var we=i.apply(O,F);return we.__actions__.push({func:Bc,args:[Q],thisArg:r}),new hn(we,oe)}return _e&&Oe?i.apply(this,F):(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);k.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(Me.prototype,function(i,s){var p=k[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}],Me.prototype.clone=Rz,Me.prototype.reverse=Iz,Me.prototype.value=Az,k.prototype.at=sW,k.prototype.chain=cW,k.prototype.commit=dW,k.prototype.next=uW,k.prototype.plant=fW,k.prototype.reverse=mW,k.prototype.toJSON=k.prototype.valueOf=k.prototype.value=hW,k.prototype.first=k.prototype.head,Ki&&(k.prototype[Ki]=pW),k},va=dz();Vo?((Vo.exports=va)._=va,wp._=va):St._=va}).call(Oa)}(_s,_s.exports);var ze=_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(Tl),{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"]))}}),_5={class:"grid-overlay-container"},w5={class:"text-subtitle-m"},xs=t.defineComponent({__name:"PlAgOverlayNoRows",props:{params:{}},setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",_5,[r[0]||(r[0]=t.createElementVNode("div",{class:"grid-icon-sad-cat"},null,-1)),t.createElementVNode("span",w5,t.toDisplayString(e.params.text||"Empty"),1)]))}});async function k5(n,e){throw Error("not implemented")}const Oi={container:"_container_1g3ar_1",text:"_text_1g3ar_7",checkbox:"_checkbox_1g3ar_11","allowed-selection":"_allowed-selection_1g3ar_15",checked:"_checked_1g3ar_23"},x5=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(Oi).container,{[t.unref(Oi)["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(Oi).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(Oi).checkbox,o.value&&t.unref(Oi).checked])},null,8,["modelValue","class"])):t.createCommentVNode("",!0)],2))}}),C5={style:{position:"absolute",inset:"0",display:"flex","justify-content":"center","align-items":"center"}},v5={key:1},S5=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",C5,[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",v5,t.toDisplayString(d.params.displayName),1))]))}}),en='"##RowNumberColumnId##"',Dg=45;function Cs(){return{colId:en,headerName:"#",headerComponent:S5,valueGetter:n=>n.node===null||n.node.rowIndex===null?null:n.node.rowIndex+1,cellRenderer:x5,headerClass:"pl-ag-header-align-center",suppressNavigable:!0,suppressMovable:!0,mainMenuItems:[],contextMenuItems:[],lockPosition:"left",pinned:"left",lockPinned:!0,width:Dg,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 E5(){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 N5(n){document.body.removeChild(n)}function $i(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(Dg,e.offsetWidth)}]})})}function Wg(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 Zi(n){const e=E5();n.addEventListener("firstDataRendered",a=>{$i(a.api,e)}),n.addEventListener("viewportChanged",a=>{$i(a.api,e)}),n.addEventListener("columnVisible",a=>{a.columns&&a.columns.some(l=>l.isVisible()&&l.getColId()===en)&&$i(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))&&$i(a.api,e,!0)});const r=a=>a.api.refreshCells();["sortChanged","filterChanged","modelUpdated"].forEach(a=>n.addEventListener(a,r)),n.addEventListener("displayedColumnsChanged",a=>{Wg(a.api)}),n.addEventListener("gridPreDestroyed",()=>{N5(e)}),$i(n,e),Wg(n)}const V5={type:"hidden"};function B5(n){return typeof n=="object"&&n!==null&&n.type==="hidden"}const ku=n=>n.value===void 0?"undefined":B5(n.value)?"loading...":Xf(n.value)||n.value===Yc?"":n.value.toString();function Gg(n){return n.type==="column"&&qc(n.spec)}function T5(n){return n.axesSpec.filter(e=>{var r;return((r=e.annotations)==null?void 0:r["pl7.app/axisNature"])==="heterogeneous"})}function R5(n,e){const r=[];for(const o of e)if(n[o].type==="column"){const a=T5(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=>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 Ug=(n,e)=>`hC${n+e}`;function I5(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=A5(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:Ug(o.length,m),headerName:g,valueFormatter:ku})}return{rowModelType:"clientSide",columnDefs:r,rowData:f}}function A5(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=Ug(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 Cu(){return["sortAscending","sortDescending","separator","pinSubMenu"]}const L5={class:"pl-ag-column-header__title d-flex align-center gap-6 flex-grow-1"},vs=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",L5,[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)]))}}),O5={class:"pl-ag-grid-open-cell d-flex"},$5={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",O5,[t.createElementVNode("div",$5,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 Hg(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:vu(l),key:l};n.forEach((d,u)=>{c[d.toString()]=Ir(e[u],a)}),o.push(c)}return o}async function Z5(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(X=>X.type==="column");g===-1&&(g=c.length);const y=[...c.keys()].filter(X=>!ze.some(r,S=>ze.isEqual(Lt(S.axis),c[X].id)||c[X].type==="column"&&c[X].spec.name==="pl7.app/label"&&c[X].spec.axesSpec.length===1&&ze.isEqual(Lt(S.axis),Lt(c[X].spec.axesSpec[0])))).sort((X,S)=>{var M,v;if(c[X].type!==c[S].type)return c[X].type==="axis"?-1:1;const R=(M=c[X].spec.annotations)==null?void 0:M["pl7.app/table/orderPriority"],A=(v=c[S].spec.annotations)==null?void 0:v["pl7.app/table/orderPriority"];return R===void 0?A===void 0?0:1:A===void 0?-1:Number(A)-Number(R)}),_=ze.cloneDeep(y),C=R5(c,y),N=y.findIndex(X=>c[X].type==="column");for(let X=y.length-1;X>=N;--X){const S=y[X];if(!Gg(c[S]))continue;const R=Lt(c[S].spec.axesSpec[0]),A=y.findIndex(v=>ze.isEqual(c[v].id,R));A!==-1?y[A]=S:console.warn(`multiple label columns match axisId: ${JSON.stringify(R)}`);const M=y[A];y[A]=S;for(const v of C)v.axisIdx===M&&(v.axisIdx=S);y.splice(X,1),_.splice(X,1)}const B=await n.getShape(e),$=B.rows,W=[Cs(),..._.map(X=>M5(X,c[X],m==null?void 0:m.hiddenColIds,l))];if(C.length>0){let X;if(C.length==1)X=C[0];else{const S=C.filter(R=>{var A;return((A=c[R.columnIdx].spec.annotations)==null?void 0:A["pl7.app/table/hValue"])==="true"});S.length===1&&(X=S[0])}if(!X)console.warn(`Currently, only one heterogeneous axis / column is supported in the table, got ${C.length} transposition will not be applied.`);else return I5(X,B,W,await n.getData(e,y),_,y)}const E=[...y],D=new Map;for(let X=0;X<g;++X)D.set(X,-1);for(let X=0;X<E.length;++X){const S=E[X];D.has(S)&&D.set(S,X)}for(const[X,S]of D)S===-1&&(D.set(X,E.length),E.push(X));const I=[];for(let X=0;X<g;++X){const S=D.get(X);if(S===void 0||S===-1)throw new Error("assertion exception");I.push(S)}if(o)return{rowModelType:"clientSide",columnDefs:W,rowData:Hg(_,await n.getData(e,E),I)};let V;return{rowModelType:"serverSide",columnDefs:W,serverSideDatasource:{getRows:async X=>{try{if($==0){X.success({rowData:[],rowCount:$}),X.api.setGridOption("loading",!1),X.api.showNoRowsOverlay();return}if(V&&!ze.isEqual(V.request.sortModel,X.request.sortModel)){V=void 0,X.api.setGridOption("loading",!0),X.success({rowData:[],rowCount:0});return}V=X;let S=0,R=[];if($>0&&X.request.startRow!==void 0&&X.request.endRow!==void 0&&(S=Math.min($,X.request.endRow)-X.request.startRow,S>0)){const A=await n.getData(e,E,{offset:X.request.startRow,length:S});R=Hg(_,A,I)}X.success({rowData:R,rowCount:$}),X.api.autoSizeColumns(X.api.getAllDisplayedColumns().filter(A=>A.getColId()!==en)),X.api.setGridOption("loading",!1)}catch(S){X.api.setGridOption("loading",!0),X.fail(),console.trace(S)}}}}}function M5(n,e,r,o){var c,d;const a=jf(e),l=e.type==="axis"?e.spec.type:e.spec.valueType;return{colId:a,mainMenuItems:Cu,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))??Yf(e.spec),valueFormatter:ku,headerComponent:vs,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(ze.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 vu(n){return Yn(n)}const Xg=e1(),F5=["id"],P5=t.defineComponent({__name:"PlAgDataTableToolsPanel",setup(n){return(e,r)=>(t.openBlock(),t.createElementBlock("div",{id:t.unref(Xg),class:"d-flex gap-6"},[t.renderSlot(e.$slots,"default")],8,F5))}}),jg="#"+Xg;function Es(){const n=t.ref(),e=()=>{t.nextTick(()=>{n.value=document.querySelector(jg)?jg: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 P5=["onClick"],z5={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);zg(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,P5),g.getColDef().lockPosition?(t.openBlock(),t.createElementBlock("div",z5,[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 D5(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=>{D5(o,n),r()}))})}function W5(){const n=document.createElement("div");return n.style.visibility="hidden",n.style.position="absolute",document.body.appendChild(n),n}function G5(n){document.body.removeChild(n)}async function U5(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=W5(),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(),G5(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,U5(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)]))}}),H5={class:"ap-ag-data-table-container"},X5={key:2,class:"ap-ag-data-table-sheets"},Yg=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 $5(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 w5(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",H5,[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",X5,[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"]]),j5=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 Kg(n,e,r,o){const a=[];for(let l=0;l<e[0].data.length;++l){const c=r.map(u=>bw(Ir(e[o[u]],l))),d={id:Tu(c),key:c};n.forEach((u,f)=>{d[u.toString()]=o[f]===-1?N5:Ir(e[o[f]],l)}),a.push(d)}return a}async function Y5(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(!Gg(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=>K5(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:Kg(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=Kg(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 K5(n,e,r,o){var c,d;const a=jf(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))??Yf(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 J5={class:"ap-ag-data-table-container"},q5={key:2,class:"ap-ag-data-table-sheets"},Jg=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:j5,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 Y5(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",J5,[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",q5,[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"},eZ={key:2},tZ=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",eZ,"Unresolved")):t.createCommentVNode("",!0)]))}}),nZ={style:{height:"100%"}},qg=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",nZ,[t.createVNode(t.unref(fh),{"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"])]))}}),rZ={class:"pl-ag-chart-stacked-bar-cell"},oZ={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",rZ,[r.value?(t.openBlock(),t.createBlock(t.unref(hh),{key:0,settings:r.value},null,8,["settings"])):(t.openBlock(),t.createElementBlock("div",oZ,"Not ready"))]))}}),aZ={key:1,class:"pl-ag-chart-histogram-cell__not-ready"},ey=t.defineComponent({__name:"PlAgChartHistogramCell",props:{params:{}},setup(n){const e=n,r=t.ref(),{width:o}=Mw(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(Ng),{key:0,settings:a.value},null,8,["settings"])):(t.openBlock(),t.createElementBlock("div",aZ,"Not ready"))],512))}}),iZ={class:"pl-ag-cell-status-tag d-flex align-center"},ty=t.defineComponent({__name:"PlAgCellStatusTag",props:{params:{}},setup(n){return(e,r)=>{var o;return t.openBlock(),t.createElementBlock("div",iZ,[t.createVNode(t.unref(lh),{type:(o=e.params)==null?void 0:o.type},null,8,["type"])])}}});class ny{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 lZ(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 ny,column:l}),d=Object.assign({},a,c instanceof ny?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=>ay(f)),d.components=Object.assign({},d.components??{},{PlAgCellFile:qg,PlAgChartStackedBarCell:Qg,PlAgChartHistogramCell:ey,PlAgCellStatusTag:ty}),d}),o=t.computed(()=>{const a=r.value;return{...a,loadingOverlayComponentParams:{notReady:a.notReady,notReadyText:a.notReadyText,overlayType:a.loadingOverlayType}}});return Lw(()=>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 ry=t.defineComponent({__name:"PlAgCellProgress",props:{params:{}},setup(n){const e=n;return(r,o)=>(t.openBlock(),t.createBlock(t.unref(sh),t.normalizeProps(t.guardReactiveProps(e.params)),null,16))}}),sZ={not_started:"Not Started",running:"Running",done:"Done"};function oy(){return{"--ag-cell-horizontal-padding":"0px","--ag-cell-vertical-padding":"0px"}}function cZ(n){return{component:ry,params:n}}function dZ(n){if(n.progress){const e=n.progress,r=n.cellRendererSelector;n.cellStyle=Object.assign({},n.cellStyle??{},oy()),n.cellRendererSelector=o=>{const a=e(o.value,o);return a?cZ({progress:K_(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??sZ[a.status],stage:a.status,error:a.error}):r==null?void 0:r(o)}}}function ay(n){return dZ(n),n.noGutters&&(n.cellStyle=Object.assign({},n.cellStyle??{},oy())),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 uZ="2.0.0",iy=256,pZ=Number.MAX_SAFE_INTEGER||9007199254740991,fZ=16,mZ=iy-6;var Ns={MAX_LENGTH:iy,MAX_SAFE_COMPONENT_LENGTH:fZ,MAX_SAFE_BUILD_LENGTH:mZ,MAX_SAFE_INTEGER:pZ,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:uZ,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 hZ=Object.freeze({loose:!0}),gZ=Object.freeze({});var Iu=n=>n?typeof n!="object"?hZ:n:gZ;const ly=/^[0-9]+$/,sy=(n,e)=>{const r=ly.test(n),o=ly.test(e);return r&&o&&(n=+n,e=+e),n===e?0:r&&!o?-1:o&&!r?1:n<e?-1:1};var cy={compareIdentifiers:sy,rcompareIdentifiers:(n,e)=>sy(e,n)};const Bs=Vs,{MAX_LENGTH:dy,MAX_SAFE_INTEGER:Ts}=Ns,{safeRe:uy,safeSrc:py,t:Rs}=Zi,yZ=Iu,{compareIdentifiers:ca}=cy;var Zt=class ar{constructor(e,r){if(r=yZ(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>dy)throw new TypeError(`version is longer than ${dy} characters`);Bs("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const o=e.trim().match(r.loose?uy[Rs.LOOSE]:uy[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?py[Rs.PRERELEASELOOSE]:py[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 fy=Zt;var da=(n,e,r=!1)=>{if(n instanceof fy)return n;try{return new fy(n,e)}catch(o){if(!r)return null;throw o}};const bZ=da;var _Z=(n,e)=>{const r=bZ(n,e);return r?r.version:null};const wZ=da;var kZ=(n,e)=>{const r=wZ(n.trim().replace(/^[=v]+/,""),e);return r?r.version:null};const my=Zt;var xZ=(n,e,r,o,a)=>{typeof r=="string"&&(a=o,o=r,r=void 0);try{return new my(n instanceof my?n.version:n,r).inc(e,o,a).version}catch{return null}};const hy=da;var vZ=(n,e)=>{const r=hy(n,null,!0),o=hy(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 CZ=Zt;var SZ=(n,e)=>new CZ(n,e).major;const EZ=Zt;var NZ=(n,e)=>new EZ(n,e).minor;const VZ=Zt;var BZ=(n,e)=>new VZ(n,e).patch;const TZ=da;var RZ=(n,e)=>{const r=TZ(n,e);return r&&r.prerelease.length?r.prerelease:null};const gy=Zt;var Bn=(n,e,r)=>new gy(n,r).compare(new gy(e,r));const IZ=Bn;var AZ=(n,e,r)=>IZ(e,n,r);const LZ=Bn;var OZ=(n,e)=>LZ(n,e,!0);const yy=Zt;var Au=(n,e,r)=>{const o=new yy(n,r),a=new yy(e,r);return o.compare(a)||o.compareBuild(a)};const $Z=Au;var ZZ=(n,e)=>n.sort((r,o)=>$Z(r,o,e));const MZ=Au;var FZ=(n,e)=>n.sort((r,o)=>MZ(o,r,e));const PZ=Bn;var Is=(n,e,r)=>PZ(n,e,r)>0;const zZ=Bn;var Lu=(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 _y=(n,e,r)=>WZ(n,e,r)!==0;const GZ=Bn;var Ou=(n,e,r)=>GZ(n,e,r)>=0;const UZ=Bn;var $u=(n,e,r)=>UZ(n,e,r)<=0;const HZ=by,XZ=_y,jZ=Is,YZ=Ou,KZ=Lu,JZ=$u;var wy=(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 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);case"<=":return JZ(n,r,o);default:throw new TypeError(`Invalid operator: ${e}`)}};const qZ=Zt,QZ=da,{safeRe:As,t:Ls}=Zi;var e3=(n,e)=>{if(n instanceof qZ)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)},t3=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,ky;function Tn(){if(ky)return Zu;ky=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=t3,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,xy;function Os(){if(xy)return Mu;xy=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=wy,c=Vs,d=Zt,u=Tn();return Mu}const n3=Tn();var $s=(n,e,r)=>{try{e=new n3(e,r)}catch{return!1}return e.test(n)};const r3=Tn();var o3=(n,e)=>new r3(n,e).set.map(r=>r.map(o=>o.value).join(" ").trim().split(" "));const a3=Zt,i3=Tn();var l3=(n,e,r)=>{let o=null,a=null,l=null;try{l=new i3(e,r)}catch{return null}return n.forEach(c=>{l.test(c)&&(!o||a.compare(c)===-1)&&(o=c,a=new a3(o,r))}),o};const s3=Zt,c3=Tn();var d3=(n,e,r)=>{let o=null,a=null,l=null;try{l=new c3(e,r)}catch{return null}return n.forEach(c=>{l.test(c)&&(!o||a.compare(c)===1)&&(o=c,a=new s3(o,r))}),o};const Fu=Zt,u3=Tn(),vy=Is;var p3=(n,e)=>{n=new u3(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||vy(d,l))&&(l=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),l&&(!r||vy(r,l))&&(r=l)}return r&&n.test(r)?r:null};const f3=Tn();var m3=(n,e)=>{try{return new f3(n,e).range||"*"}catch{return null}};const h3=Zt,Cy=Os(),{ANY:g3}=Cy,y3=Tn(),b3=$s,Sy=Is,Ey=Lu,_3=$u,w3=Ou;var Pu=(n,e,r,o)=>{n=new h3(n,o),e=new y3(e,o);let a,l,c,d,u;switch(r){case">":a=Sy,l=_3,c=Ey,d=">",u=">=";break;case"<":a=Ey,l=w3,c=Sy,d="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(b3(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===g3&&(_=new Cy(">=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 k3=Pu;var x3=(n,e,r)=>k3(n,e,">",r);const v3=Pu;var C3=(n,e,r)=>v3(n,e,"<",r);const Ny=Tn();var S3=(n,e,r)=>(n=new Ny(n,r),e=new Ny(e,r),n.intersects(e,r));const E3=$s,N3=Bn;var V3=(n,e,r)=>{const o=[];let a=null,l=null;const c=n.sort((m,g)=>N3(m,g,r));for(const m of c)E3(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 Vy=Tn(),zu=Os(),{ANY:Du}=zu,Mi=$s,Wu=Bn,B3=(n,e,r={})=>{if(n===e)return!0;n=new Vy(n,r),e=new Vy(e,r);let o=!1;e:for(const a of n.set){for(const l of e.set){const c=R3(a,l,r);if(o=o||c!==null,c)continue e}if(o)return!1}return!0},T3=[new zu(">=0.0.0-0")],By=[new zu(">=0.0.0")],R3=(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=T3:n=By}if(e.length===1&&e[0].semver===Du){if(r.includePrerelease)return!0;e=By}const o=new Set;let a,l;for(const _ of n)_.operator===">"||_.operator===">="?a=Ty(a,_,r):_.operator==="<"||_.operator==="<="?l=Ry(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=Ty(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=Ry(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)},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},Ry=(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 I3=B3;const Gu=Zi,Iy=Ns,A3=Zt,Ay=cy,L3=da,O3=_Z,$3=kZ,Z3=xZ,M3=vZ,F3=SZ,P3=NZ,z3=BZ,D3=RZ,W3=Bn,G3=AZ,U3=OZ,H3=Au,X3=ZZ,j3=FZ,Y3=Is,K3=Lu,J3=by,q3=_y,Q3=Ou,eM=$u,tM=wy,nM=e3,rM=Os(),oM=Tn();var aM={parse:L3,valid:O3,clean:$3,inc:Z3,diff:M3,major:F3,minor:P3,patch:z3,prerelease:D3,compare:W3,rcompare:G3,compareLoose:U3,compareBuild:H3,sort:X3,rsort:j3,gt:Y3,lt:K3,eq:J3,neq:q3,gte:Q3,lte:eM,cmp:tM,coerce:nM,Comparator:rM,Range:oM,satisfies:$s,toComparators:o3,maxSatisfying:l3,minSatisfying:d3,minVersion:p3,validRange:m3,outside:Pu,gtr:x3,ltr:C3,intersects:S3,simplifyRange:V3,subset:I3,SemVer:A3,re:Gu.re,src:Gu.src,tokens:Gu.t,SEMVER_SPEC_VERSION:Iy.SEMVER_SPEC_VERSION,RELEASE_TYPES:Iy.RELEASE_TYPES,compareIdentifiers:Ay.compareIdentifiers,rcompareIdentifiers:Ay.rcompareIdentifiers};const iM=Dc(aM);function lM(n){return Er(n.id)}function sM(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 cM=["isNotNA","isNA","number_equals","number_notEquals","number_greaterThan","number_greaterThanOrEqualTo","number_lessThan","number_lessThanOrEqualTo","number_between"],dM=["isNotNA","isNA","string_equals","string_notEquals","string_contains","string_doesNotContain","string_matches","string_doesNotMatch","string_containsFuzzyMatch"],uM=["number_equals","number_notEquals","string_equals","string_notEquals"],Ly=n=>uM.includes(n),pM=n=>Ly(n.type);function Oy(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 fM(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 $y(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 mM(n,e,r){let o=fM(n.filter);return Ly(e)&&r!==void 0&&r.length>0&&!Me.find(r,a=>a.value===o)&&(o=r[0].value),{columnId:n.columnId,filter:$y(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 Zy(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 hM(n){try{return new RegExp(n),n}catch(e){throw e instanceof SyntaxError?Error("Model value is not a regexp."):e}}function gM(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 yM(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 bM(n,e){var a,l;const r=iM.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 _M={class:"d-flex flex-column gap-24"},My=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(()=>yM(o.value));return(c,d)=>(t.openBlock(),t.createElementBlock("div",_M,[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(mM)(e.value,u,l.value))},null,8,["model-value","options","disabled"]),l.value.length>0&&t.unref(pM)(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(Zy)(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(hM),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(Zy)(t.unref(o),u),label:"Reference value"},null,8,["modelValue","disabled","parse"]),t.createVNode(t.unref(Zg),{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(gM)(t.unref(o),e.value.filter.reference),clearable:"",label:"Wildcard symbol"},null,8,["modelValue","disabled","options"])],64)):t.createCommentVNode("",!0)],64))]))}}),wM={class:"d-flex flex-column gap-24"},kM={key:0,class:"text-subtitle-m",style:{color:"var(--txt-mask)"}},xM=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",wM,[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",kM,"Choose a column to view and adjust its options")),f.value?(t.openBlock(),t.createBlock(My,{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"]))}}),vM=["onClick"],CM={class:"pl-filter-manager__expand-icon"},SM={class:"pl-filter-manager__title flex-grow-1 text-s-btn"},EM={class:"pl-filter-manager__actions d-flex gap-12"},NM=["onClick"],VM=["onClick"],BM={class:"pl-filter-manager__content d-flex gap-24 p-24 flex-column"},TM={class:"d-flex justify-center"},RM=["onClick"],IM={class:"pl-filter-manager__add-btn-icon"},AM={key:0},LM=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[lM(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:bM(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"?dM:cM;const F=v[V];F&&(U=U.filter(j=>F.includes(j))),L[V]=U.map(j=>({value:j,text:sM(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:Oy(V,v),value:L}))),N=v=>u.value[v]??{columnId:v,filter:$y(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",CM,[t.createVNode(t.unref(qt),{name:"chevron-right"})]),t.createElementVNode("div",SM,t.toDisplayString(t.unref(Oy)(c.value[V.columnId],k)),1),t.createElementVNode("div",EM,[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,NM),t.createElementVNode("div",{class:"pl-filter-manager__delete",onClick:t.withModifiers(Z=>$(k),["stop"])},[t.createVNode(t.unref(at),{name:"close"})],8,VM)])],8,vM),t.createElementVNode("div",BM,[t.createVNode(My,{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",TM,[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,RM)])])],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",IM,[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",AM,"No filters applicable"))],512)]),_:1},8,["modelValue"]),t.createVNode(xM,{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 OM(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 MM({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 $M(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 FM({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 ZM(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 PM({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 MM({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 FM({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)&&aw(_,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 PM({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=yw(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=gw(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 _}/**
|
|
81
|
+
(e.g., in the block header).`)})};return t.onMounted(e),t.onUpdated(e),n}const z5=["onClick"],D5={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);zg(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,z5),g.getColDef().lockPosition?(t.openBlock(),t.createElementBlock("div",D5,[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 W5(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=>{W5(o,n),r()}))})}function G5(){const n=document.createElement("div");return n.style.visibility="hidden",n.style.position="absolute",document.body.appendChild(n),n}function U5(n){document.body.removeChild(n)}async function H5(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=G5(),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(),U5(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,H5(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)]))}}),X5={class:"ap-ag-data-table-container"},j5={key:2,class:"ap-ag-data-table-sheets"},Yg=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(R=>{const{spec:A,...M}=Wo(R.colId);return{column:M,ascending:R.sort==="asc",naAndAbsentAreLeastValues:R.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 R=((v=c.value)==null?void 0:v.sourceType)!=="ptable"||$.value.rowModelType==="clientSide"?void 0:u(S.sort),A=o.value,M={...A,gridState:{...A.gridState,...S},pTableParams:{...A.pTableParams,sorting:R}};Wt(A,M)||(o.value=M)}}),m=S=>Er(Lt(S));function g(S){var R,A;if(((R=c.value)==null?void 0:R.sourceType)==="ptable")return((A=c.value.sheets)==null?void 0:A.map(M=>({type:"bySingleColumnV2",column:{type:"axis",id:M.axis},predicate:{operator:"Equal",reference:S[m(M.axis)]}})))??[]}const y=t.computed({get:()=>o.value.gridState.sheets??{},set:S=>{const R=g(S),A=o.value;o.value={...A,gridState:{...A.gridState,sheets:S},pTableParams:{...A.pTableParams,filters:R}}}}),_=S=>(S==null?void 0:S.sourceType)==="ptable"&&!!S.sheets&&S.sheets.length>0;t.watch(()=>c.value,(S,R)=>{var v;if((S==null?void 0:S.sourceType)!=="ptable"||!S.sheets){y.value={};return}if(R&&R.sourceType==="ptable"&&ze.isEqual(S.sheets,R.sheets))return;const A=y.value,M={};for(const w of S.sheets){const L=m(w.axis);M[L]=A[L]??w.defaultValue??((v=w.options[0])==null?void 0:v.value)}y.value=M},{immediate:!0});const C=t.shallowRef(),N=t.shallowRef(new ul),B=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 R=a.value;if(R){const A=R.map(M=>S.api.getRowNode(vu(M))).filter(M=>!!M);S.api.setNodesSelected({nodes:A,newValue:!0})}},onSelectionChanged:S=>{a.value&&(a.value=S.api.getSelectedNodes().map(R=>{var A;return(A=R.data)==null?void 0:A.key}).filter(R=>!!R))},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 R=S.api;Nu(R,B),Zi(R),C.value=new Proxy(R,{get(A,M,v){switch(M){case"setGridOption":return(w,L)=>{const G=$.value;G[w]=L,$.value=G,R.setGridOption(w,L)};case"updateGridOptions":return w=>{$.value={...$.value,...w},R.updateGridOptions(w)};default:return Reflect.get(A,M,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(R=>R.getColId()!==en))},I=()=>{$.value.initialState=f.value=E(C.value.getState()),C.value=void 0,N.value=new ul};e({focusRow:S=>Vu(vu(S),B)});const V=t.ref(0);t.watch(()=>[C.value,f.value],(S,R)=>{if(ze.isEqual(S,R))return;const[A,M]=S;if(!A)return;const v=E(A.getState());ze.isEqual(M,v)||($.value.initialState=M,++V.value)}),t.watch(()=>$.value,(S,R)=>{var A,M;if(R){if(S.rowModelType!=R.rowModelType&&++V.value,S.columnDefs&&!ze.isEqual(S.columnDefs,R.columnDefs)){const v=G=>!("children"in G),L=(((A=S.columnDefs)==null?void 0:A.filter(v))??[]).map(G=>G.colId).filter(G=>G!==void 0).filter(G=>G!==en).filter(G=>!Ie.isColumnSelectionCol(G)).map(G=>Wo(G))??[];d("columnsChanged",L)}!ze.isEqual(S.loadingOverlayComponentParams,R.loadingOverlayComponentParams)&&S.loading&&((M=C.value)==null||M.setGridOption("loading",!1),t.nextTick(()=>{var v;return(v=C.value)==null?void 0:v.setGridOption("loading",!0)}))}},{immediate:!0});const P=(S,R)=>{var M;const A=y.value;if(A[S]!==R)return A[S]=R,y.value=A,(M=C.value)==null?void 0:M.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1}})};let X;return t.watch(()=>[c.value],async S=>{try{const[R]=S,A=await N.value.promise;if(A.isDestroyed()){console.warn("gridApi is destroyed");return}if(ze.isEqual(R,X))return;X=R;const M=R==null?void 0:R.sourceType;switch(M){case void 0:return A.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!0},columnDefs:[],rowData:void 0,datasource:void 0});case"ptable":{if(!(R!=null&&R.pTable))return A.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},columnDefs:[],rowData:void 0,datasource:void 0});A.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1}});const v=await Z5(uo().pFrameDriver,R.pTable,R.sheets??[],!!l.clientSideModel||!!a.value,f,{showCellButtonForAxisId:l.showCellButtonForAxisId,cellButtonInvokeRowsOnDoubleClick:l.cellButtonInvokeRowsOnDoubleClick,trigger:w=>d("cellButtonClicked",w)}).catch(w=>{throw A.updateGridOptions({loading:!1,loadingOverlayComponentParams:{notReady:!1}}),w});return A.updateGridOptions({loading:!1,loadingOverlayComponentParams:{notReady:!1},...v})}case"xsv":{const v=R==null?void 0:R.xsvFile;if(!v)return A.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},columnDefs:[],rowData:void 0,datasource:void 0});const w=uo().blobDriver,L=await k5(w,v);return A.updateGridOptions({loading:!0,loadingOverlayComponentParams:{notReady:!1},...L})}default:throw Error(`unsupported source type: ${M}`)}}catch(R){console.trace(R)}},{immediate:!0,deep:!0}),(S,R)=>(t.openBlock(),t.createElementBlock("div",X5,[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,(A,M)=>{var v,w;return t.openBlock(),t.createBlock(t.unref(Sd),{key:M,"model-value":y.value[m(A.axis)],options:A.options,prefix:(((w=(v=A.axis.annotations)==null?void 0:v["pl7.app/label"])==null?void 0:w.trim())??`Unlabeled axis ${M}`)+":","onUpdate:modelValue":L=>P(m(A.axis),L)},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:V.value,theme:t.unref(Cl),class:"ap-ag-data-table-grid","grid-options":$.value,onGridReady:W,onStateUpdated:D,onGridPreDestroyed:I},null,8,["theme","grid-options"]))]))}}),[["__scopeId","data-v-e2be0f3a"]]),Y5=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 Kg(n,e,r,o){const a=[];for(let l=0;l<e[0].data.length;++l){const c=r.map(u=>_w(Ir(e[o[u]],l))),d={id:Tu(c),key:c};n.forEach((u,f)=>{d[u.toString()]=o[f]===-1?V5:Ir(e[o[f]],l)}),a.push(d)}return a}async function K5(n,e,r,o,a,l){const c=e.tableHandle,d=e.tableSpec,u=w=>w.type==="axis"?Er(Lt(w.spec)):w.id,f=await n.getSpec(c),m=new Map;f.forEach((w,L)=>{m.set(u(w),L)});const g=new Map;d.forEach((w,L)=>{const G=m.get(u(w));if(G===void 0&&w.type==="axis")throw new Error(`axis ${JSON.stringify(w.spec)} not present in join result`);g.set(L,G??-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 B=d.findIndex(w=>w.type==="column");B===-1&&(B=d.length);const $=[...d.keys()].filter(w=>!ze.some(r,L=>ze.isEqual(Lt(L.axis),d[w].id)||d[w].type==="column"&&d[w].spec.name==="pl7.app/label"&&d[w].spec.axesSpec.length===1&&ze.isEqual(Lt(L.axis),Lt(d[w].spec.axesSpec[0])))).sort((w,L)=>{var j,ee;if(d[w].type!==d[L].type)return d[w].type==="axis"?-1:1;const G=(j=d[w].spec.annotations)==null?void 0:j["pl7.app/table/orderPriority"],Z=(ee=d[L].spec.annotations)==null?void 0:ee["pl7.app/table/orderPriority"];return G===void 0?Z===void 0?0:1:Z===void 0?-1:Number(Z)-Number(G)}),W=[...$],E=$.findIndex(w=>d[w].type==="column");for(let w=$.length-1;w>=E;--w){const L=$[w];if(!Gg(d[L]))continue;const G=Lt(d[L].spec.axesSpec[0]),Z=$.findIndex(j=>ze.isEqual(d[j].id,G));Z!==-1?$[Z]=L:console.warn(`multiple label columns match axisId: ${JSON.stringify(G)}`),$.splice(w,1),W.splice(w,1)}const I=(await n.getShape(c)).rows,V=[Cs(),...W.map(w=>J5(w,d[w],N==null?void 0:N.hiddenColIds,l))],P=[...$],X=new Map;for(let w=0;w<B;++w)X.set(w,-1);P.forEach((w,L)=>{X.has(w)&&X.set(w,L)});for(const[w,L]of X)L===-1&&(X.set(w,P.length),P.push(w));const S=W.filter(w=>d[w].type==="axis").map(w=>{const L=P.indexOf(w);if(L===-1)throw console.error("Key construction error: Original axis spec index from `fields` not found in `allIndices`.",{originalAxisSpecIdx:w}),new Error(`Assertion failed: Original axis spec index ${w} (from fields) for key construction not found in allIndices.`);return L}),R=[],A=[];if(P.forEach(w=>{const L=g.get(w);L!==-1?(A.push(R.length),R.push(L)):A.push(-1)}),o){const w=await n.getData(c,R);return{rowModelType:"clientSide",columnDefs:V,rowData:Kg(W,w,S,A)}}let M;return{rowModelType:"serverSide",columnDefs:V,serverSideDatasource:{getRows:async w=>{try{if(I==0){w.success({rowData:[],rowCount:I}),w.api.setGridOption("loading",!1),w.api.showNoRowsOverlay();return}if(M&&!ze.isEqual(M.request.sortModel,w.request.sortModel)){M=void 0,w.api.setGridOption("loading",!0),w.success({rowData:[],rowCount:0});return}M=w;let L=0,G=[];if(I>0&&w.request.startRow!==void 0&&w.request.endRow!==void 0&&(L=Math.min(I,w.request.endRow)-w.request.startRow,L>0)){const Z=await n.getData(c,R,{offset:w.request.startRow,length:L});G=Kg(W,Z,S,A)}w.success({rowData:G,rowCount:I}),w.api.autoSizeColumns(w.api.getAllDisplayedColumns().filter(Z=>Z.getColId()!==en)),w.api.setGridOption("loading",!1)}catch(L){w.api.setGridOption("loading",!0),w.fail(),console.trace(L)}}}}}function J5(n,e,r,o){var c,d;const a=jf(e),l=e.type==="axis"?e.spec.type:e.spec.valueType;return{colId:a,mainMenuItems:Cu,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))??Yf(e.spec),valueFormatter:ku,headerComponent:vs,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(ze.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 q5={class:"ap-ag-data-table-container"},Q5={key:2,class:"ap-ag-data-table-sheets"},Jg=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(R=>{const{spec:A,...M}=Wo(R.colId);return{column:M,ascending:R.sort==="asc",naAndAbsentAreLeastValues:R.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 R=((v=c.value)==null?void 0:v.sourceType)!=="ptable"||$.value.rowModelType==="clientSide"?void 0:u(S.sort),A=o.value,M={...A,gridState:{...A.gridState,...S},pTableParams:{...A.pTableParams,sorting:R}};Wt(A,M)||(o.value=M)}}),m=S=>Er(Lt(S));function g(S){var R,A;if(((R=c.value)==null?void 0:R.sourceType)==="ptable")return((A=c.value.sheets)==null?void 0:A.map(M=>({type:"bySingleColumnV2",column:{type:"axis",id:M.axis},predicate:{operator:"Equal",reference:S[m(M.axis)]}})))??[]}const y=t.computed({get:()=>o.value.gridState.sheets??{},set:S=>{const R=g(S),A=o.value;o.value={...A,gridState:{...A.gridState,sheets:S},pTableParams:{...A.pTableParams,filters:R}}}}),_=S=>(S==null?void 0:S.sourceType)==="ptable"&&!!S.sheets&&S.sheets.length>0;t.watch(()=>c.value,(S,R)=>{var v;if((S==null?void 0:S.sourceType)!=="ptable"||!S.sheets){y.value={};return}if(R&&R.sourceType==="ptable"&&ze.isEqual(S.sheets,R.sheets))return;const A=y.value,M={};for(const w of S.sheets){const L=m(w.axis);M[L]=A[L]??w.defaultValue??((v=w.options[0])==null?void 0:v.value)}y.value=M},{immediate:!0});const C=t.shallowRef(),N=t.shallowRef(new ul),B=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 R=a.value;if(R){const A=R.selectedKeys.map(M=>S.api.getRowNode(Tu(M))).filter(M=>!!M);S.api.setNodesSelected({nodes:A,newValue:!0})}},onSelectionChanged:S=>{if(a.value){const R=S.api.getSelectedNodes().map(A=>{var M;return(M=A.data)==null?void 0:M.key}).filter(A=>!!A);a.value={...a.value,selectedKeys:R}}},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:Y5,align:"left"}]}}),W=S=>{const R=S.api;Nu(R,B),Zi(R),C.value=new Proxy(R,{get(A,M,v){switch(M){case"setGridOption":return(w,L)=>{const G=$.value;G[w]=L,$.value=G,R.setGridOption(w,L)};case"updateGridOptions":return w=>{$.value={...$.value,...w},R.updateGridOptions(w)};default:return Reflect.get(A,M,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(R=>R.getColId()!==en))},I=()=>{$.value.initialState=f.value=E(C.value.getState()),C.value=void 0,N.value=new ul};e({focusRow:S=>Vu(Tu(S),B)});const V=t.ref(0);t.watch(()=>[C.value,f.value],(S,R)=>{if(ze.isEqual(S,R))return;const[A,M]=S;if(!A)return;const v=E(A.getState());ze.isEqual(M,v)||($.value.initialState=M,++V.value)}),t.watch(()=>$.value,(S,R)=>{var A,M;if(R){if(S.rowModelType!=R.rowModelType&&++V.value,S.columnDefs&&!ze.isEqual(S.columnDefs,R.columnDefs)){const v=Z=>!("children"in Z),L=(((A=S.columnDefs)==null?void 0:A.filter(v))??[]).map(Z=>Z.colId).filter(Z=>Z!==void 0).filter(Z=>Z!==en).filter(Z=>!Ie.isColumnSelectionCol(Z)).map(Z=>Wo(Z))??[],G=L.filter(Z=>Z.type==="axis").map(Z=>Z.spec);a.value&&(a.value={...a.value,axesSpec:G}),d("columnsChanged",L)}!ze.isEqual(S.loadingOverlayComponentParams,R.loadingOverlayComponentParams)&&S.loading&&((M=C.value)==null||M.setGridOption("loading",!1),t.nextTick(()=>{var v;return(v=C.value)==null?void 0:v.setGridOption("loading",!0)}))}},{immediate:!0});const P=(S,R)=>{var M;const A=y.value;if(A[S]!==R)return A[S]=R,y.value=A,(M=C.value)==null?void 0:M.updateGridOptions({loading:!0,loadingOverlayComponentParams:{...$.value.loadingOverlayComponentParams,notReady:!1}})};let X;return t.watch(()=>[c.value],async S=>{try{const[R]=S,A=await N.value.promise;if(A.isDestroyed()){console.warn("gridApi is destroyed");return}if(ze.isEqual(R,X))return;X=R;const M=R==null?void 0:R.sourceType;switch(M){case void 0:return A.updateGridOptions({loading:!0,loadingOverlayComponentParams:{...$.value.loadingOverlayComponentParams,notReady:!0},columnDefs:[],rowData:void 0,datasource:void 0});case"ptable":{if(!(R!=null&&R.model))return A.updateGridOptions({loading:!0,loadingOverlayComponentParams:{...$.value.loadingOverlayComponentParams,notReady:!1},columnDefs:[],rowData:void 0,datasource:void 0});A.updateGridOptions({loading:!0,loadingOverlayComponentParams:{...$.value.loadingOverlayComponentParams,notReady:!1}});const v=await K5(uo().pFrameDriver,R.model,R.sheets??[],!!l.clientSideModel||!!a.value,f,{showCellButtonForAxisId:l.showCellButtonForAxisId,cellButtonInvokeRowsOnDoubleClick:l.cellButtonInvokeRowsOnDoubleClick,trigger:w=>d("cellButtonClicked",w)}).catch(w=>{throw A.updateGridOptions({loading:!1,loadingOverlayComponentParams:{...$.value.loadingOverlayComponentParams,notReady:!1}}),w});return A.updateGridOptions({loading:!1,loadingOverlayComponentParams:{...$.value.loadingOverlayComponentParams,notReady:!1},...v})}default:throw Error(`unsupported source type: ${M}`)}}catch(R){console.trace(R)}},{immediate:!0,deep:!0}),t.watch(()=>l.cellRendererSelector,S=>{C.value&&C.value.setGridOption("defaultColDef",{...$.value.defaultColDef,cellRendererSelector:S})}),(S,R)=>(t.openBlock(),t.createElementBlock("div",q5,[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",Q5,[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,(A,M)=>{var v,w;return t.openBlock(),t.createBlock(t.unref(Sd),{key:M,"model-value":y.value[m(A.axis)],options:A.options,prefix:(((w=(v=A.axis.annotations)==null?void 0:v["pl7.app/label"])==null?void 0:w.trim())??`Unlabeled axis ${M}`)+":","onUpdate:modelValue":L=>P(m(A.axis),L)},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:V.value,theme:t.unref(Cl),class:"ap-ag-data-table-grid","grid-options":$.value,onGridReady:W,onStateUpdated:D,onGridPreDestroyed:I},null,8,["theme","grid-options"]))]))}}),[["__scopeId","data-v-5568b72e"]]),eZ={key:1,class:"alert-error"},tZ={key:2},nZ=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",eZ,t.toDisplayString(o.value),1)):t.createCommentVNode("",!0),a.value?(t.openBlock(),t.createElementBlock("div",tZ,"Unresolved")):t.createCommentVNode("",!0)]))}}),rZ={style:{height:"100%"}},qg=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",rZ,[t.createVNode(t.unref(fh),{"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"])]))}}),oZ={class:"pl-ag-chart-stacked-bar-cell"},aZ={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",oZ,[r.value?(t.openBlock(),t.createBlock(t.unref(hh),{key:0,settings:r.value},null,8,["settings"])):(t.openBlock(),t.createElementBlock("div",aZ,"Not ready"))]))}}),iZ={key:1,class:"pl-ag-chart-histogram-cell__not-ready"},ey=t.defineComponent({__name:"PlAgChartHistogramCell",props:{params:{}},setup(n){const e=n,r=t.ref(),{width:o}=Fw(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(Ng),{key:0,settings:a.value},null,8,["settings"])):(t.openBlock(),t.createElementBlock("div",iZ,"Not ready"))],512))}}),lZ={class:"pl-ag-cell-status-tag d-flex align-center"},ty=t.defineComponent({__name:"PlAgCellStatusTag",props:{params:{}},setup(n){return(e,r)=>{var o;return t.openBlock(),t.createElementBlock("div",lZ,[t.createVNode(t.unref(lh),{type:(o=e.params)==null?void 0:o.type},null,8,["type"])])}}});class ny{constructor(){Fe(this,ht,{})}options(e){return ge(this,ht,Object.assign({},T(this,ht),e)),this}get columnDefs(){return T(this,ht).columnDefs??[]}setDefaultColDef(e){return T(this,ht).defaultColDef=e,this}setLoading(e){return T(this,ht).loading=e,this}setLoadingText(e){return T(this,ht).loadingText=e,this}setNotReady(e){return T(this,ht).notReady=e,this}setLoadingOverlayType(e){return T(this,ht).loadingOverlayType=e,this}setNotReadyText(e){return T(this,ht).notReadyText=e,this}setNoRowsText(e){return T(this,ht).noRowsText=e,this}setRowSelection(e){return T(this,ht).rowSelection=e,this}setRowData(e){return T(this,ht).rowData=e,this}setComponents(e){return T(this,ht).components=e,this}setOption(e,r){return T(this,ht)[e]=r,this}column(e){return T(this,ht).columnDefs=[...this.columnDefs,e],this}columnRowNumbers(e=!0){return T(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 T(this,ht)}}ht=new WeakMap;function sZ(n){const e=t.shallowRef(),r=t.computed(()=>{var u;const a={theme:Cl,loadingOverlayComponent:ks,noRowsOverlayComponent:xs,onGridReady:f=>{e.value=f.api,Zi(f.api)}},l=f=>f,c=n({builder:new ny,column:l}),d=Object.assign({},a,c instanceof ny?c.build():c);return d.rowNumbersColumn&&(d.columnDefs=[Cs(),...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=>ay(f)),d.components=Object.assign({},d.components??{},{PlAgCellFile:qg,PlAgChartStackedBarCell:Qg,PlAgChartHistogramCell:ey,PlAgCellStatusTag:ty}),d}),o=t.computed(()=>{const a=r.value;return{...a,loadingOverlayComponentParams:{notReady:a.notReady,notReadyText:a.notReadyText,overlayType:a.loadingOverlayType}}});return Ow(()=>r.value.rowNumbersColumn,()=>{e.value&&Zi(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 ry=t.defineComponent({__name:"PlAgCellProgress",props:{params:{}},setup(n){const e=n;return(r,o)=>(t.openBlock(),t.createBlock(t.unref(sh),t.normalizeProps(t.guardReactiveProps(e.params)),null,16))}}),cZ={not_started:"Not Started",running:"Running",done:"Done"};function oy(){return{"--ag-cell-horizontal-padding":"0px","--ag-cell-vertical-padding":"0px"}}function dZ(n){return{component:ry,params:n}}function uZ(n){if(n.progress){const e=n.progress,r=n.cellRendererSelector;n.cellStyle=Object.assign({},n.cellStyle??{},oy()),n.cellRendererSelector=o=>{const a=e(o.value,o);return a?dZ({progress:J_(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??cZ[a.status],stage:a.status,error:a.error}):r==null?void 0:r(o)}}}function ay(n){return uZ(n),n.noGutters&&(n.cellStyle=Object.assign({},n.cellStyle??{},oy())),n.headerComponentParams&&(n.headerComponent=vs),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 pZ="2.0.0",iy=256,fZ=Number.MAX_SAFE_INTEGER||9007199254740991,mZ=16,hZ=iy-6;var Ns={MAX_LENGTH:iy,MAX_SAFE_COMPONENT_LENGTH:mZ,MAX_SAFE_BUILD_LENGTH:hZ,MAX_SAFE_INTEGER:fZ,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:pZ,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=B=>{for(const[$,W]of _)B=B.split(`${$}*`).join(`${$}{0,${W}}`).split(`${$}+`).join(`${$}{1,${W}}`);return B},N=(B,$,W)=>{const E=C($),D=g++;l(B,D,$),m[B]=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 Mi=Ru.exports;const gZ=Object.freeze({loose:!0}),yZ=Object.freeze({});var Iu=n=>n?typeof n!="object"?gZ:n:yZ;const ly=/^[0-9]+$/,sy=(n,e)=>{const r=ly.test(n),o=ly.test(e);return r&&o&&(n=+n,e=+e),n===e?0:r&&!o?-1:o&&!r?1:n<e?-1:1};var cy={compareIdentifiers:sy,rcompareIdentifiers:(n,e)=>sy(e,n)};const Bs=Vs,{MAX_LENGTH:dy,MAX_SAFE_INTEGER:Ts}=Ns,{safeRe:uy,safeSrc:py,t:Rs}=Mi,bZ=Iu,{compareIdentifiers:ca}=cy;var Zt=class ar{constructor(e,r){if(r=bZ(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>dy)throw new TypeError(`version is longer than ${dy} characters`);Bs("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;const o=e.trim().match(r.loose?uy[Rs.LOOSE]:uy[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?py[Rs.PRERELEASELOOSE]:py[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 fy=Zt;var da=(n,e,r=!1)=>{if(n instanceof fy)return n;try{return new fy(n,e)}catch(o){if(!r)return null;throw o}};const _Z=da;var wZ=(n,e)=>{const r=_Z(n,e);return r?r.version:null};const kZ=da;var xZ=(n,e)=>{const r=kZ(n.trim().replace(/^[=v]+/,""),e);return r?r.version:null};const my=Zt;var CZ=(n,e,r,o,a)=>{typeof r=="string"&&(a=o,o=r,r=void 0);try{return new my(n instanceof my?n.version:n,r).inc(e,o,a).version}catch{return null}};const hy=da;var vZ=(n,e)=>{const r=hy(n,null,!0),o=hy(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 SZ=Zt;var EZ=(n,e)=>new SZ(n,e).major;const NZ=Zt;var VZ=(n,e)=>new NZ(n,e).minor;const BZ=Zt;var TZ=(n,e)=>new BZ(n,e).patch;const RZ=da;var IZ=(n,e)=>{const r=RZ(n,e);return r&&r.prerelease.length?r.prerelease:null};const gy=Zt;var Bn=(n,e,r)=>new gy(n,r).compare(new gy(e,r));const AZ=Bn;var LZ=(n,e,r)=>AZ(e,n,r);const OZ=Bn;var $Z=(n,e)=>OZ(n,e,!0);const yy=Zt;var Au=(n,e,r)=>{const o=new yy(n,r),a=new yy(e,r);return o.compare(a)||o.compareBuild(a)};const ZZ=Au;var MZ=(n,e)=>n.sort((r,o)=>ZZ(r,o,e));const FZ=Au;var PZ=(n,e)=>n.sort((r,o)=>FZ(o,r,e));const zZ=Bn;var Is=(n,e,r)=>zZ(n,e,r)>0;const DZ=Bn;var Lu=(n,e,r)=>DZ(n,e,r)<0;const WZ=Bn;var by=(n,e,r)=>WZ(n,e,r)===0;const GZ=Bn;var _y=(n,e,r)=>GZ(n,e,r)!==0;const UZ=Bn;var Ou=(n,e,r)=>UZ(n,e,r)>=0;const HZ=Bn;var $u=(n,e,r)=>HZ(n,e,r)<=0;const XZ=by,jZ=_y,YZ=Is,KZ=Ou,JZ=Lu,qZ=$u;var wy=(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 XZ(n,r,o);case"!=":return jZ(n,r,o);case">":return YZ(n,r,o);case">=":return KZ(n,r,o);case"<":return JZ(n,r,o);case"<=":return qZ(n,r,o);default:throw new TypeError(`Invalid operator: ${e}`)}};const QZ=Zt,e3=da,{safeRe:As,t:Ls}=Mi;var t3=(n,e)=>{if(n instanceof QZ)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 e3(`${o}.${a}.${l}${c}${d}`,e)},n3=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,ky;function Tn(){if(ky)return Zu;ky=1;const n=/\s+/g;class e{constructor(L,G){if(G=a(G),L instanceof e)return L.loose===!!G.loose&&L.includePrerelease===!!G.includePrerelease?L:new e(L.raw,G);if(L instanceof l)return this.raw=L.value,this.set=[[L]],this.formatted=void 0,this;if(this.options=G,this.loose=!!G.loose,this.includePrerelease=!!G.includePrerelease,this.raw=L.trim().replace(n," "),this.set=this.raw.split("||").map(Z=>this.parseRange(Z.trim())).filter(Z=>Z.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const Z=this.set[0];if(this.set=this.set.filter(j=>!N(j[0])),this.set.length===0)this.set=[Z];else if(this.set.length>1){for(const j of this.set)if(j.length===1&&B(j[0])){this.set=[j];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let L=0;L<this.set.length;L++){L>0&&(this.formatted+="||");const G=this.set[L];for(let Z=0;Z<G.length;Z++)Z>0&&(this.formatted+=" "),this.formatted+=G[Z].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(L){const Z=((this.options.includePrerelease&&_)|(this.options.loose&&C))+":"+L,j=o.get(Z);if(j)return j;const ee=this.options.loose,ce=ee?u[f.HYPHENRANGELOOSE]:u[f.HYPHENRANGE];L=L.replace(ce,M(this.options.includePrerelease)),c("hyphen replace",L),L=L.replace(u[f.COMPARATORTRIM],m),c("comparator trim",L),L=L.replace(u[f.TILDETRIM],g),c("tilde trim",L),L=L.replace(u[f.CARETTRIM],y),c("caret trim",L);let ye=L.split(" ").map(Ye=>W(Ye,this.options)).join(" ").split(/\s+/).map(Ye=>A(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 ve=new Map,He=ye.map(Ye=>new l(Ye,this.options));for(const Ye of He){if(N(Ye))return[Ye];ve.set(Ye.value,Ye)}ve.size>1&&ve.has("")&&ve.delete("");const vt=[...ve.values()];return o.set(Z,vt),vt}intersects(L,G){if(!(L instanceof e))throw new TypeError("a Range is required");return this.set.some(Z=>$(Z,G)&&L.set.some(j=>$(j,G)&&Z.every(ee=>j.every(ce=>ee.intersects(ce,G)))))}test(L){if(!L)return!1;if(typeof L=="string")try{L=new d(L,this.options)}catch{return!1}for(let G=0;G<this.set.length;G++)if(v(this.set[G],L,this.options))return!0;return!1}}Zu=e;const r=n3,o=new r,a=Iu,l=Os(),c=Vs,d=Zt,{safeRe:u,t:f,comparatorTrimReplace:m,tildeTrimReplace:g,caretTrimReplace:y}=Mi,{FLAG_INCLUDE_PRERELEASE:_,FLAG_LOOSE:C}=Ns,N=w=>w.value==="<0.0.0-0",B=w=>w.value==="",$=(w,L)=>{let G=!0;const Z=w.slice();let j=Z.pop();for(;G&&Z.length;)G=Z.every(ee=>j.intersects(ee,L)),j=Z.pop();return G},W=(w,L)=>(c("comp",w,L),w=V(w,L),c("caret",w),w=D(w,L),c("tildes",w),w=X(w,L),c("xrange",w),w=R(w,L),c("stars",w),w),E=w=>!w||w.toLowerCase()==="x"||w==="*",D=(w,L)=>w.trim().split(/\s+/).map(G=>I(G,L)).join(" "),I=(w,L)=>{const G=L.loose?u[f.TILDELOOSE]:u[f.TILDE];return w.replace(G,(Z,j,ee,ce,ye)=>{c("tilde",w,Z,j,ee,ce,ye);let ve;return E(j)?ve="":E(ee)?ve=`>=${j}.0.0 <${+j+1}.0.0-0`:E(ce)?ve=`>=${j}.${ee}.0 <${j}.${+ee+1}.0-0`:ye?(c("replaceTilde pr",ye),ve=`>=${j}.${ee}.${ce}-${ye} <${j}.${+ee+1}.0-0`):ve=`>=${j}.${ee}.${ce} <${j}.${+ee+1}.0-0`,c("tilde return",ve),ve})},V=(w,L)=>w.trim().split(/\s+/).map(G=>P(G,L)).join(" "),P=(w,L)=>{c("caret",w,L);const G=L.loose?u[f.CARETLOOSE]:u[f.CARET],Z=L.includePrerelease?"-0":"";return w.replace(G,(j,ee,ce,ye,ve)=>{c("caret",w,j,ee,ce,ye,ve);let He;return E(ee)?He="":E(ce)?He=`>=${ee}.0.0${Z} <${+ee+1}.0.0-0`:E(ye)?ee==="0"?He=`>=${ee}.${ce}.0${Z} <${ee}.${+ce+1}.0-0`:He=`>=${ee}.${ce}.0${Z} <${+ee+1}.0.0-0`:ve?(c("replaceCaret pr",ve),ee==="0"?ce==="0"?He=`>=${ee}.${ce}.${ye}-${ve} <${ee}.${ce}.${+ye+1}-0`:He=`>=${ee}.${ce}.${ye}-${ve} <${ee}.${+ce+1}.0-0`:He=`>=${ee}.${ce}.${ye}-${ve} <${+ee+1}.0.0-0`):(c("no pr"),ee==="0"?ce==="0"?He=`>=${ee}.${ce}.${ye}${Z} <${ee}.${ce}.${+ye+1}-0`:He=`>=${ee}.${ce}.${ye}${Z} <${ee}.${+ce+1}.0-0`:He=`>=${ee}.${ce}.${ye} <${+ee+1}.0.0-0`),c("caret return",He),He})},X=(w,L)=>(c("replaceXRanges",w,L),w.split(/\s+/).map(G=>S(G,L)).join(" ")),S=(w,L)=>{w=w.trim();const G=L.loose?u[f.XRANGELOOSE]:u[f.XRANGE];return w.replace(G,(Z,j,ee,ce,ye,ve)=>{c("xRange",w,Z,j,ee,ce,ye,ve);const He=E(ee),vt=He||E(ce),Ye=vt||E(ye),Ht=Ye;return j==="="&&Ht&&(j=""),ve=L.includePrerelease?"-0":"",He?j===">"||j==="<"?Z="<0.0.0-0":Z="*":j&&Ht?(vt&&(ce=0),ye=0,j===">"?(j=">=",vt?(ee=+ee+1,ce=0,ye=0):(ce=+ce+1,ye=0)):j==="<="&&(j="<",vt?ee=+ee+1:ce=+ce+1),j==="<"&&(ve="-0"),Z=`${j+ee}.${ce}.${ye}${ve}`):vt?Z=`>=${ee}.0.0${ve} <${+ee+1}.0.0-0`:Ye&&(Z=`>=${ee}.${ce}.0${ve} <${ee}.${+ce+1}.0-0`),c("xRange return",Z),Z})},R=(w,L)=>(c("replaceStars",w,L),w.trim().replace(u[f.STAR],"")),A=(w,L)=>(c("replaceGTE0",w,L),w.trim().replace(u[L.includePrerelease?f.GTE0PRE:f.GTE0],"")),M=w=>(L,G,Z,j,ee,ce,ye,ve,He,vt,Ye,Ht)=>(E(Z)?G="":E(j)?G=`>=${Z}.0.0${w?"-0":""}`:E(ee)?G=`>=${Z}.${j}.0${w?"-0":""}`:ce?G=`>=${G}`:G=`>=${G}${w?"-0":""}`,E(He)?ve="":E(vt)?ve=`<${+He+1}.0.0-0`:E(Ye)?ve=`<${He}.${+vt+1}.0-0`:Ht?ve=`<=${He}.${vt}.${Ye}-${Ht}`:w?ve=`<${He}.${vt}.${+Ye+1}-0`:ve=`<=${ve}`,`${G} ${ve}`.trim()),v=(w,L,G)=>{for(let Z=0;Z<w.length;Z++)if(!w[Z].test(L))return!1;if(L.prerelease.length&&!G.includePrerelease){for(let Z=0;Z<w.length;Z++)if(c(w[Z].semver),w[Z].semver!==l.ANY&&w[Z].semver.prerelease.length>0){const j=w[Z].semver;if(j.major===L.major&&j.minor===L.minor&&j.patch===L.patch)return!0}return!1}return!0};return Zu}var Mu,xy;function Os(){if(xy)return Mu;xy=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}=Mi,l=wy,c=Vs,d=Zt,u=Tn();return Mu}const r3=Tn();var $s=(n,e,r)=>{try{e=new r3(e,r)}catch{return!1}return e.test(n)};const o3=Tn();var a3=(n,e)=>new o3(n,e).set.map(r=>r.map(o=>o.value).join(" ").trim().split(" "));const i3=Zt,l3=Tn();var s3=(n,e,r)=>{let o=null,a=null,l=null;try{l=new l3(e,r)}catch{return null}return n.forEach(c=>{l.test(c)&&(!o||a.compare(c)===-1)&&(o=c,a=new i3(o,r))}),o};const c3=Zt,d3=Tn();var u3=(n,e,r)=>{let o=null,a=null,l=null;try{l=new d3(e,r)}catch{return null}return n.forEach(c=>{l.test(c)&&(!o||a.compare(c)===1)&&(o=c,a=new c3(o,r))}),o};const Fu=Zt,p3=Tn(),Cy=Is;var f3=(n,e)=>{n=new p3(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||Cy(d,l))&&(l=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${c.operator}`)}}),l&&(!r||Cy(r,l))&&(r=l)}return r&&n.test(r)?r:null};const m3=Tn();var h3=(n,e)=>{try{return new m3(n,e).range||"*"}catch{return null}};const g3=Zt,vy=Os(),{ANY:y3}=vy,b3=Tn(),_3=$s,Sy=Is,Ey=Lu,w3=$u,k3=Ou;var Pu=(n,e,r,o)=>{n=new g3(n,o),e=new b3(e,o);let a,l,c,d,u;switch(r){case">":a=Sy,l=w3,c=Ey,d=">",u=">=";break;case"<":a=Ey,l=k3,c=Sy,d="<",u="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(_3(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===y3&&(_=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 x3=Pu;var C3=(n,e,r)=>x3(n,e,">",r);const v3=Pu;var S3=(n,e,r)=>v3(n,e,"<",r);const Ny=Tn();var E3=(n,e,r)=>(n=new Ny(n,r),e=new Ny(e,r),n.intersects(e,r));const N3=$s,V3=Bn;var B3=(n,e,r)=>{const o=[];let a=null,l=null;const c=n.sort((m,g)=>V3(m,g,r));for(const m of c)N3(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 Vy=Tn(),zu=Os(),{ANY:Du}=zu,Fi=$s,Wu=Bn,T3=(n,e,r={})=>{if(n===e)return!0;n=new Vy(n,r),e=new Vy(e,r);let o=!1;e:for(const a of n.set){for(const l of e.set){const c=I3(a,l,r);if(o=o||c!==null,c)continue e}if(o)return!1}return!0},R3=[new zu(">=0.0.0-0")],By=[new zu(">=0.0.0")],I3=(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=R3:n=By}if(e.length===1&&e[0].semver===Du){if(r.includePrerelease)return!0;e=By}const o=new Set;let a,l;for(const _ of n)_.operator===">"||_.operator===">="?a=Ty(a,_,r):_.operator==="<"||_.operator==="<="?l=Ry(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&&!Fi(_,String(a),r)||l&&!Fi(_,String(l),r))return null;for(const C of e)if(!Fi(_,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=Ty(a,_,r),d===_&&d!==a)return!1}else if(a.operator===">="&&!Fi(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=Ry(l,_,r),u===_&&u!==l)return!1}else if(l.operator==="<="&&!Fi(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)},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},Ry=(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 A3=T3;const Gu=Mi,Iy=Ns,L3=Zt,Ay=cy,O3=da,$3=wZ,Z3=xZ,M3=CZ,F3=vZ,P3=EZ,z3=VZ,D3=TZ,W3=IZ,G3=Bn,U3=LZ,H3=$Z,X3=Au,j3=MZ,Y3=PZ,K3=Is,J3=Lu,q3=by,Q3=_y,eM=Ou,tM=$u,nM=wy,rM=t3,oM=Os(),aM=Tn();var iM={parse:O3,valid:$3,clean:Z3,inc:M3,diff:F3,major:P3,minor:z3,patch:D3,prerelease:W3,compare:G3,rcompare:U3,compareLoose:H3,compareBuild:X3,sort:j3,rsort:Y3,gt:K3,lt:J3,eq:q3,neq:Q3,gte:eM,lte:tM,cmp:nM,coerce:rM,Comparator:oM,Range:aM,satisfies:$s,toComparators:a3,maxSatisfying:s3,minSatisfying:u3,minVersion:f3,validRange:h3,outside:Pu,gtr:C3,ltr:S3,intersects:E3,simplifyRange:B3,subset:A3,SemVer:L3,re:Gu.re,src:Gu.src,tokens:Gu.t,SEMVER_SPEC_VERSION:Iy.SEMVER_SPEC_VERSION,RELEASE_TYPES:Iy.RELEASE_TYPES,compareIdentifiers:Ay.compareIdentifiers,rcompareIdentifiers:Ay.rcompareIdentifiers};const lM=Dc(iM);function Ly(n){return Er(n.id)}function sM(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 cM=["isNotNA","isNA","number_equals","number_notEquals","number_greaterThan","number_greaterThanOrEqualTo","number_lessThan","number_lessThanOrEqualTo","number_between"],dM=["isNotNA","isNA","string_equals","string_notEquals","string_contains","string_doesNotContain","string_matches","string_doesNotMatch","string_containsFuzzyMatch"],uM=["number_equals","number_notEquals","string_equals","string_notEquals"],Oy=n=>uM.includes(n),pM=n=>Oy(n.type);function $y(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 fM(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 Zy(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 mM(n,e,r){let o=fM(n.filter);return Oy(e)&&r!==void 0&&r.length>0&&!ze.find(r,a=>a.value===o)&&(o=r[0].value),{columnId:n.columnId,filter:Zy(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 My(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 hM(n){try{return new RegExp(n),n}catch(e){throw e instanceof SyntaxError?Error("Model value is not a regexp."):e}}function gM(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=ze.uniq(e);return o.sort(),o.map(c=>({label:c,value:c}))}function yM(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 bM(n,e){var a,l;const r=lM.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 _M={class:"d-flex flex-column gap-24"},Fy=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(()=>yM(o.value));return(c,d)=>(t.openBlock(),t.createElementBlock("div",_M,[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(mM)(e.value,u,l.value))},null,8,["model-value","options","disabled"]),l.value.length>0&&t.unref(pM)(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(My)(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(hM),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(My)(t.unref(o),u),label:"Reference value"},null,8,["modelValue","disabled","parse"]),t.createVNode(t.unref(Zg),{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(gM)(t.unref(o),e.value.filter.reference),clearable:"",label:"Wildcard symbol"},null,8,["modelValue","disabled","options"])],64)):t.createCommentVNode("",!0)],64))]))}}),wM={class:"d-flex flex-column gap-24"},kM={key:0,class:"text-subtitle-m",style:{color:"var(--txt-mask)"}},xM=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(Il),{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",wM,[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",kM,"Choose a column to view and adjust its options")),f.value?(t.openBlock(),t.createBlock(Fy,{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"]))}}),CM=["onClick"],vM={class:"pl-filter-manager__expand-icon"},SM={class:"pl-filter-manager__title flex-grow-1 text-s-btn"},EM={class:"pl-filter-manager__actions d-flex gap-12"},NM=["onClick"],VM=["onClick"],BM={class:"pl-filter-manager__content d-flex gap-24 p-24 flex-column"},TM={class:"d-flex justify-center"},RM=["onClick"],IM={class:"pl-filter-manager__add-btn-icon"},AM={key:0},LM=t.defineComponent({__name:"PlTableFilters",props:t.mergeModels({columns:{},restrictions:{},defaults:{type:Function}},{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(L=>{const G=L.type;switch(G){case"axis":return L.spec.type!=="Bytes";case"column":return L.spec.valueType!=="Bytes";default:throw Error(`unsupported data type: ${G}`)}}),w={};for(const L of v)w[Ly(L)]=L;return w}),d=t.computed(()=>{const v=o.value,w=l.value;if(!v||!w)return{};const L={};for(const G of v){const Z=w(G);if(!Z)continue;const j=Ly(G);L[j]={columnId:j,filter:Z,disabled:!1}}return L}),u=t.computed(()=>{const v=a.value??[],w={};for(const[L,G]of Object.entries(c.value)){const Z=ze.find(v,j=>ze.isEqual(j.column.id,G.id));Z&&(w[L]=Z.allowedFilterTypes)}return w});(()=>{const v=e.value.state;typeof v=="object"&&!Array.isArray(v)&&(e.value.state=Object.entries(v).map(([w,L])=>({columnId:w,filter:L,disabled:!1})))})();const f=()=>ze.cloneDeep(Object.values(d.value)),m=v=>v??[],g=t.reactive({state:m(e.value.state)}),y=()=>{g.state=f()};t.watch(()=>o.value,(v,w)=>{var L;l.value&&((L=e.value.state)==null?void 0:L.length)===0&&(!w||w.length===0)&&v.length>0&&y()},{immediate:!0}),t.watch(()=>e.value,v=>{ze.isEqual(g.state,v.state)||(g.state=m(v.state))}),t.watch(()=>g,v=>{ze.isEqual(v.state,e.value.state)||(e.value={state:ze.cloneDeep(v.state),filters:v.state.filter(w=>!w.disabled).map(w=>{const L=c.value[w.columnId],{spec:G,...Z}=L;return{type:"bySingleColumnV2",column:Z,predicate:bM(L,w.filter)}})})},{immediate:!0,deep:!0}),t.watch(()=>c.value,v=>{Object.keys(v).length===0&&g.state!==void 0||(g.state=g.state.filter(w=>!!v[w.columnId]))},{immediate:!0});const _=t.computed(()=>Object.keys(c).length>0&&g.state.length>0),C=t.computed(()=>{const v=u.value,w={};for(const[L,G]of Object.entries(c.value)){let j=(G.type==="column"?G.spec.valueType:G.spec.type)==="String"?dM:cM;const ee=v[L];ee&&(j=j.filter(ce=>ee.includes(ce))),w[L]=j.map(ce=>({value:ce,text:sM(ce)}))}return w}),N=t.computed(()=>ze.some(Object.values(C.value),v=>v.length>0)),B=t.computed(()=>Object.entries(Object.entries(c.value)).filter(([v,[w,L]])=>C.value[w].length>0).filter(([v,[w,L]])=>!g.state.some(G=>G.columnId===w)).map(([v,[w,L]])=>({label:$y(L,v),value:w}))),$=v=>d.value[v]??{columnId:v,filter:Zy(C.value[v][0].value),disabled:!1},W=v=>{g.state[v]=$(g.state[v].columnId)},E=v=>g.state.splice(v,1),D=t.ref(!1),I=t.ref(!1),V=t.ref(!1);t.onMounted(()=>{V.value=!0});const P=t.reactive({}),X=v=>{P[v]?delete P[v]:P[v]=!0},S=t.ref(!1),R=t.ref();let A;t.onMounted(()=>{A=new ResizeObserver(()=>{var w;const v=(w=R.value)==null?void 0:w.parentElement;v&&(S.value=v.scrollHeight>v.clientHeight||v.scrollWidth>v.clientWidth)}),R.value&&R.value.parentElement&&A.observe(R.value.parentElement)}),t.watch(R,(v,w)=>{w!=null&&w.parentElement&&A.unobserve(w.parentElement),v!=null&&v.parentElement&&A.observe(v.parentElement)}),t.onBeforeUnmount(()=>{A!==void 0&&A.disconnect()});const M=Es();return(v,w)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[V.value&&t.unref(M)?(t.openBlock(),t.createBlock(t.Teleport,{key:0,to:t.unref(M)},[t.createVNode(t.unref(cr),{onClick:w[0]||(w[0]=t.withModifiers(L=>D.value=!0,["stop"]))},{append:t.withCtx(()=>[t.createVNode(t.unref(Yo),{name:_.value?"filter-on":"filter"},null,8,["name"])]),default:t.withCtx(()=>[w[5]||(w[5]=t.createTextVNode(" Filters "))]),_:1})],8,["to"])):t.createCommentVNode("",!0),t.createVNode(t.unref(Ko),{modelValue:D.value,"onUpdate:modelValue":w[2]||(w[2]=L=>D.value=L),"close-on-outside-click":!1},{title:t.withCtx(()=>w[6]||(w[6]=[t.createTextVNode("Manage Filters")])),default:t.withCtx(()=>[t.createElementVNode("div",{ref_key:"filterManager",ref:R,class:"pl-filter-manager d-flex flex-column gap-6"},[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(g.state,(L,G)=>(t.openBlock(),t.createElementBlock("div",{key:L.columnId,class:t.normalizeClass([{open:P[L.columnId],disabled:L.disabled},"pl-filter-manager__filter"])},[t.createElementVNode("div",{class:"pl-filter-manager__header d-flex align-center gap-8",onClick:Z=>X(L.columnId)},[t.createElementVNode("div",vM,[t.createVNode(t.unref(qt),{name:"chevron-right"})]),t.createElementVNode("div",SM,t.toDisplayString(t.unref($y)(c.value[L.columnId],G)),1),t.createElementVNode("div",EM,[t.createElementVNode("div",{class:"pl-filter-manager__toggle",onClick:t.withModifiers(Z=>L.disabled=!L.disabled,["stop"])},[t.createVNode(t.unref(at),{name:L.disabled?"view-hide":"view-show"},null,8,["name"])],8,NM),t.createElementVNode("div",{class:"pl-filter-manager__delete",onClick:t.withModifiers(Z=>E(G),["stop"])},[t.createVNode(t.unref(at),{name:"close"})],8,VM)])],8,CM),t.createElementVNode("div",BM,[t.createVNode(Fy,{modelValue:g.state[G],"onUpdate:modelValue":Z=>g.state[G]=Z,disabled:L.disabled,column:c.value[L.columnId],options:C.value[L.columnId]},null,8,["modelValue","onUpdate:modelValue","disabled","column","options"]),t.createElementVNode("div",TM,[t.createElementVNode("div",{class:t.normalizeClass([{disabled:L.disabled},"pl-filter-manager__revert-btn text-s-btn d-flex align-center gap-8"]),onClick:Z=>W(G)},[w[7]||(w[7]=t.createTextVNode(" Revert Settings to Default ")),t.createVNode(t.unref(at),{name:"reverse"})],10,RM)])])],2))),128)),t.createElementVNode("div",{class:t.normalizeClass([{"pt-24":S.value},"pl-filter-manager__add-action-wrapper"])},[B.value.length>0?(t.openBlock(),t.createElementBlock("div",{key:0,class:"pl-filter-manager__add-btn",onClick:w[1]||(w[1]=L=>I.value=!0)},[t.createElementVNode("div",IM,[t.createVNode(t.unref(qt),{name:"add"})]),w[8]||(w[8]=t.createElementVNode("div",{class:"pl-filter-manager__add-btn-title text-s-btn"},"Add Filter",-1))])):t.createCommentVNode("",!0)],2),N.value?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("div",AM,"No filters applicable"))],512),t.unref(l)?(t.openBlock(),t.createBlock(t.unref(ai),{key:0,onClick:t.withModifiers(y,["stop"])},{default:t.withCtx(()=>w[9]||(w[9]=[t.createTextVNode("Reset to defaults")])),_:1})):t.createCommentVNode("",!0)]),_:1},8,["modelValue"]),t.createVNode(xM,{modelValue:I.value,"onUpdate:modelValue":w[3]||(w[3]=L=>I.value=L),"columns-by-id":c.value,"column-options":B.value,"filter-options":C.value,"make-filter":$,onAddFilter:w[4]||(w[4]=L=>g.state.push(L))},null,8,["modelValue","columns-by-id","column-options","filter-options"])],64))}}),Hu=()=>uo().pFrameDriver;function OM(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 MM({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 $M(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 FM({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 ZM(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 PM({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 MM({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 FM({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:B})=>qc(B)&&iw(_,Lt(B.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 PM({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=bw(u,a),m={src:{type:"outer",primary:{type:"inner",entries:[...f&&f.data.length>0?[{type:"inlineColumn",column:f}]:[],...e.map(E=>({type:"column",column:E}))]},secondary:[...d.map(E=>E.columnId),...r.map(E=>Wo(E)).filter(E=>E.type==="column").map(E=>E.id)].map(E=>({type:"column",column:E}))},filters:[],sorting:[]},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(X=>X===D.id);if(P!==-1){N.set(E,P);continue}}const I=yw(D.type==="axis"?{type:"axis",id:Lt(D.spec)}:{type:"column",id:D.id}),V=r.findIndex(P=>P===I);V!==-1&&C.set(E,V)}if(C.size!==r.length||N.size!==e.length)throw new Error("Some label or sequence columns are missing");const B=[...C.keys()];B.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=B.map(P=>{var X;return(X=Ir(y[P].data,E,{na:"",absent:""}))==null?void 0:X.toString()}),I=$.map(P=>{var X;return(X=Ir(y[P].data,E,{na:"",absent:""}))==null?void 0:X.toString()}),V=P=>typeof P=="string";D.every(V)&&I.every(V)?_.push({labels:D,sequence:I.join(""),header:String(E)}):console.warn(`skipping record at row ${E} because of invalid labels or sequences`,D,I)}return _}/**
|
|
82
82
|
* @license
|
|
83
83
|
* Copyright 2019 Google LLC
|
|
84
84
|
* SPDX-License-Identifier: Apache-2.0
|
|
85
|
-
*/const Fy=Symbol("Comlink.proxy"),zM=Symbol("Comlink.endpoint"),DM=Symbol("Comlink.releaseProxy"),Xu=Symbol("Comlink.finalizer"),Zs=Symbol("Comlink.thrown"),Py=n=>typeof n=="object"&&n!==null||typeof n=="function",WM={canHandle:n=>Py(n)&&n[Fy],serialize(n){const{port1:e,port2:r}=new MessageChannel;return Dy(n,e),[r,[r]]},deserialize(n){return n.start(),Gy(n)}},GM={canHandle:n=>Py(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}},zy=new Map([["proxy",WM],["throw",GM]]);function UM(n,e){for(const r of n)if(e===r||r==="*"||r instanceof RegExp&&r.test(e))return!0;return!1}function Dy(n,e=globalThis,r=["*"]){e.addEventListener("message",function o(a){if(!a||!a.data)return;if(!UM(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=JM(y)}break;case"ENDPOINT":{const{port1:y,port2:_}=new MessageChannel;Dy(n,_),f=KM(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),Wy(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 HM(n){return n.constructor.name==="MessagePort"}function Wy(n){HM(n)&&n.close()}function Gy(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 Uy(n){return ua(n,new Map,{type:"RELEASE"}).then(()=>{Wy(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&&Uy(n)});function XM(n,e){const r=(Fs.get(e)||0)+1;Fs.set(e,r),Ps&&Ps.register(n,e,n)}function jM(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===DM)return()=>{jM(l),Uy(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===zM)return ua(n,e,{type:"ENDPOINT"}).then(ko);if(f==="bind")return ju(n,e,r.slice(0,-1));const[m,g]=Hy(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]=Hy(d);return ua(n,e,{type:"CONSTRUCT",path:r.map(m=>m.toString()),argumentList:u},f).then(ko)}});return XM(l,n),l}function YM(n){return Array.prototype.concat.apply([],n)}function Hy(n){const e=n.map(zs);return[e.map(r=>r[0]),YM(e.map(r=>r[1]))]}const Xy=new WeakMap;function KM(n,e){return Xy.set(n,e),n}function JM(n){return Object.assign(n,{[Fy]:!0})}function zs(n){for(const[e,r]of zy)if(r.canHandle(n)){const[o,a]=r.serialize(n);return[{type:"HANDLER",name:e,value:o},a]}return[{type:"RAW",value:n},Xy.get(n)||[]]}function ko(n){switch(n.type){case"HANDLER":return zy.get(n.name).deserialize(n.value);case"RAW":return n.value}}function ua(n,e,r,o){return new Promise(a=>{const l=qM();e.set(l,a),n.start&&n.start(),n.postMessage(Object.assign({id:l},r),o)})}function qM(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const jy="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)),Yy=typeof self<"u"&&self.Blob&&new Blob([QM(jy)],{type:"text/javascript;charset=utf-8"});function eF(n){let e;try{if(e=Yy&&(self.URL||self.webkitURL).createObjectURL(Yy),!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,"+jy,{name:n==null?void 0:n.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}let Yu;function tF(){return Yu||(Yu=Gy(new eF)),Yu}const nF=["hydrophobic","positive_charge","negative_charge","polar","cysteine","glycine","proline","aromatic"],rF={hydrophobic:"Hydrophobic",positive_charge:"Positive Charge",negative_charge:"Negative Charge",polar:"Polar",cysteine:"Cysteine",glycine:"Glycine",proline:"Proline",aromatic:"Aromatic"},Ky={hydrophobic:"#99CCFF",positive_charge:"#FFA2A3",negative_charge:"#C1ADFF",polar:"#99E099",cysteine:"#FAAAFA",glycine:"#F7BC5D",proline:"#FFFF8F",aromatic:"#A2F5FA"};function oF(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 tF().getChemicalPropertiesHighlight(o);if(a)return;e.value=l}catch(l){console.error(l),e.value=[]}finally{r.value=!1}}),{data:e,loading:r}}function aF({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 Jy=Symbol("Comlink.proxy"),iF=Symbol("Comlink.endpoint"),lF=Symbol("Comlink.releaseProxy"),Ku=Symbol("Comlink.thrown"),qy=n=>typeof n=="object"&&n!==null||typeof n=="function",sF={canHandle:n=>qy(n)&&n[Jy],serialize(n){const{port1:e,port2:r}=new MessageChannel;return e0(n,e),[r,[r]]},deserialize(n){return n.start(),n0(n)}},cF={canHandle:n=>qy(n)&&Ku 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",sF],["throw",cF]]);function e0(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=fF(g)}break;case"ENDPOINT":{const{port1:g,port2:y}=new MessageChannel;e0(n,y),u=pF(g,[g])}break;case"RELEASE":u=void 0;break;default:return}}catch(f){u={value:f,[Ku]:0}}Promise.resolve(u).catch(f=>({value:f,[Ku]:0})).then(f=>{const[m,g]=qu(f);e.postMessage(Object.assign(Object.assign({},m),{id:a}),g),l==="RELEASE"&&(e.removeEventListener("message",r),t0(e))})}),e.start&&e.start()}function dF(n){return n.constructor.name==="MessagePort"}function t0(n){dF(n)&&n.close()}function n0(n,e){return Ju(n,[],e)}function Ds(n){if(n)throw new Error("Proxy has been released and is not useable")}function Ju(n,e=[],r=function(){}){let o=!1;const a=new Proxy(r,{get(l,c){if(Ds(o),c===lF)return()=>pa(n,{type:"RELEASE",path:e.map(d=>d.toString())}).then(()=>{t0(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 Ju(n,[...e,c])},set(l,c,d){Ds(o);const[u,f]=qu(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===iF)return pa(n,{type:"ENDPOINT"}).then(xo);if(u==="bind")return Ju(n,e.slice(0,-1));const[f,m]=r0(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]=r0(c);return pa(n,{type:"CONSTRUCT",path:e.map(f=>f.toString()),argumentList:d},u).then(xo)}});return a}function uF(n){return Array.prototype.concat.apply([],n)}function r0(n){const e=n.map(qu);return[e.map(r=>r[0]),uF(e.map(r=>r[1]))]}const o0=new WeakMap;function pF(n,e){return o0.set(n,e),n}function fF(n){return Object.assign(n,{[Jy]:!0})}function qu(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},o0.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=mF();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 mF(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const a0="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0ICQ9U3ltYm9sKCJDb21saW5rLnByb3h5IiksQT1TeW1ib2woIkNvbWxpbmsuZW5kcG9pbnQiKSxSPVN5bWJvbCgiQ29tbGluay5yZWxlYXNlUHJveHkiKSx5PVN5bWJvbCgiQ29tbGluay50aHJvd24iKSxfPWU9PnR5cGVvZiBlPT0ib2JqZWN0IiYmZSE9PW51bGx8fHR5cGVvZiBlPT0iZnVuY3Rpb24iLEw9e2NhbkhhbmRsZTplPT5fKGUpJiZlWyRdLHNlcmlhbGl6ZShlKXtjb25zdHtwb3J0MTpyLHBvcnQyOml9PW5ldyBNZXNzYWdlQ2hhbm5lbDtyZXR1cm4gdyhlLHIpLFtpLFtpXV19LGRlc2VyaWFsaXplKGUpe3JldHVybiBlLnN0YXJ0KCksQyhlKX19LE89e2NhbkhhbmRsZTplPT5fKGUpJiZ5IGluIGUsc2VyaWFsaXplKHt2YWx1ZTplfSl7bGV0IHI7cmV0dXJuIGUgaW5zdGFuY2VvZiBFcnJvcj9yPXtpc0Vycm9yOiEwLHZhbHVlOnttZXNzYWdlOmUubWVzc2FnZSxuYW1lOmUubmFtZSxzdGFjazplLnN0YWNrfX06cj17aXNFcnJvcjohMSx2YWx1ZTplfSxbcixbXV19LGRlc2VyaWFsaXplKGUpe3Rocm93IGUuaXNFcnJvcj9PYmplY3QuYXNzaWduKG5ldyBFcnJvcihlLnZhbHVlLm1lc3NhZ2UpLGUudmFsdWUpOmUudmFsdWV9fSxFPW5ldyBNYXAoW1sicHJveHkiLExdLFsidGhyb3ciLE9dXSk7ZnVuY3Rpb24gdyhlLHI9c2VsZil7ci5hZGRFdmVudExpc3RlbmVyKCJtZXNzYWdlIixmdW5jdGlvbiBpKHMpe2lmKCFzfHwhcy5kYXRhKXJldHVybjtjb25zdHtpZDpvLHR5cGU6YSxwYXRoOm59PU9iamVjdC5hc3NpZ24oe3BhdGg6W119LHMuZGF0YSksYz0ocy5kYXRhLmFyZ3VtZW50TGlzdHx8W10pLm1hcChtKTtsZXQgbDt0cnl7Y29uc3QgdT1uLnNsaWNlKDAsLTEpLnJlZHVjZSgoZCxwKT0+ZFtwXSxlKSxmPW4ucmVkdWNlKChkLHApPT5kW3BdLGUpO3N3aXRjaChhKXtjYXNlIkdFVCI6bD1mO2JyZWFrO2Nhc2UiU0VUIjp1W24uc2xpY2UoLTEpWzBdXT1tKHMuZGF0YS52YWx1ZSksbD0hMDticmVhaztjYXNlIkFQUExZIjpsPWYuYXBwbHkodSxjKTticmVhaztjYXNlIkNPTlNUUlVDVCI6e2NvbnN0IGQ9bmV3IGYoLi4uYyk7bD16KGQpfWJyZWFrO2Nhc2UiRU5EUE9JTlQiOntjb25zdHtwb3J0MTpkLHBvcnQyOnB9PW5ldyBNZXNzYWdlQ2hhbm5lbDt3KGUscCksbD1OKGQsW2RdKX1icmVhaztjYXNlIlJFTEVBU0UiOmw9dm9pZCAwO2JyZWFrO2RlZmF1bHQ6cmV0dXJufX1jYXRjaCh1KXtsPXt2YWx1ZTp1LFt5XTowfX1Qcm9taXNlLnJlc29sdmUobCkuY2F0Y2godT0+KHt2YWx1ZTp1LFt5XTowfSkpLnRoZW4odT0+e2NvbnN0W2YsZF09Uyh1KTtyLnBvc3RNZXNzYWdlKE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxmKSx7aWQ6b30pLGQpLGE9PT0iUkVMRUFTRSImJihyLnJlbW92ZUV2ZW50TGlzdGVuZXIoIm1lc3NhZ2UiLGkpLE0ocikpfSl9KSxyLnN0YXJ0JiZyLnN0YXJ0KCl9ZnVuY3Rpb24gVChlKXtyZXR1cm4gZS5jb25zdHJ1Y3Rvci5uYW1lPT09Ik1lc3NhZ2VQb3J0In1mdW5jdGlvbiBNKGUpe1QoZSkmJmUuY2xvc2UoKX1mdW5jdGlvbiBDKGUscil7cmV0dXJuIGIoZSxbXSxyKX1mdW5jdGlvbiBoKGUpe2lmKGUpdGhyb3cgbmV3IEVycm9yKCJQcm94eSBoYXMgYmVlbiByZWxlYXNlZCBhbmQgaXMgbm90IHVzZWFibGUiKX1mdW5jdGlvbiBiKGUscj1bXSxpPWZ1bmN0aW9uKCl7fSl7bGV0IHM9ITE7Y29uc3Qgbz1uZXcgUHJveHkoaSx7Z2V0KGEsbil7aWYoaChzKSxuPT09UilyZXR1cm4oKT0+ZyhlLHt0eXBlOiJSRUxFQVNFIixwYXRoOnIubWFwKGM9PmMudG9TdHJpbmcoKSl9KS50aGVuKCgpPT57TShlKSxzPSEwfSk7aWYobj09PSJ0aGVuIil7aWYoci5sZW5ndGg9PT0wKXJldHVybnt0aGVuOigpPT5vfTtjb25zdCBjPWcoZSx7dHlwZToiR0VUIixwYXRoOnIubWFwKGw9PmwudG9TdHJpbmcoKSl9KS50aGVuKG0pO3JldHVybiBjLnRoZW4uYmluZChjKX1yZXR1cm4gYihlLFsuLi5yLG5dKX0sc2V0KGEsbixjKXtoKHMpO2NvbnN0W2wsdV09UyhjKTtyZXR1cm4gZyhlLHt0eXBlOiJTRVQiLHBhdGg6Wy4uLnIsbl0ubWFwKGY9PmYudG9TdHJpbmcoKSksdmFsdWU6bH0sdSkudGhlbihtKX0sYXBwbHkoYSxuLGMpe2gocyk7Y29uc3QgbD1yW3IubGVuZ3RoLTFdO2lmKGw9PT1BKXJldHVybiBnKGUse3R5cGU6IkVORFBPSU5UIn0pLnRoZW4obSk7aWYobD09PSJiaW5kIilyZXR1cm4gYihlLHIuc2xpY2UoMCwtMSkpO2NvbnN0W3UsZl09RihjKTtyZXR1cm4gZyhlLHt0eXBlOiJBUFBMWSIscGF0aDpyLm1hcChkPT5kLnRvU3RyaW5nKCkpLGFyZ3VtZW50TGlzdDp1fSxmKS50aGVuKG0pfSxjb25zdHJ1Y3QoYSxuKXtoKHMpO2NvbnN0W2MsbF09RihuKTtyZXR1cm4gZyhlLHt0eXBlOiJDT05TVFJVQ1QiLHBhdGg6ci5tYXAodT0+dS50b1N0cmluZygpKSxhcmd1bWVudExpc3Q6Y30sbCkudGhlbihtKX19KTtyZXR1cm4gb31mdW5jdGlvbiBEKGUpe3JldHVybiBBcnJheS5wcm90b3R5cGUuY29uY2F0LmFwcGx5KFtdLGUpfWZ1bmN0aW9uIEYoZSl7Y29uc3Qgcj1lLm1hcChTKTtyZXR1cm5bci5tYXAoaT0+aVswXSksRChyLm1hcChpPT5pWzFdKSldfWNvbnN0IFA9bmV3IFdlYWtNYXA7ZnVuY3Rpb24gTihlLHIpe3JldHVybiBQLnNldChlLHIpLGV9ZnVuY3Rpb24geihlKXtyZXR1cm4gT2JqZWN0LmFzc2lnbihlLHtbJF06ITB9KX1mdW5jdGlvbiBTKGUpe2Zvcihjb25zdFtyLGldb2YgRSlpZihpLmNhbkhhbmRsZShlKSl7Y29uc3RbcyxvXT1pLnNlcmlhbGl6ZShlKTtyZXR1cm5be3R5cGU6IkhBTkRMRVIiLG5hbWU6cix2YWx1ZTpzfSxvXX1yZXR1cm5be3R5cGU6IlJBVyIsdmFsdWU6ZX0sUC5nZXQoZSl8fFtdXX1mdW5jdGlvbiBtKGUpe3N3aXRjaChlLnR5cGUpe2Nhc2UiSEFORExFUiI6cmV0dXJuIEUuZ2V0KGUubmFtZSkuZGVzZXJpYWxpemUoZS52YWx1ZSk7Y2FzZSJSQVciOnJldHVybiBlLnZhbHVlfX1mdW5jdGlvbiBnKGUscixpKXtyZXR1cm4gbmV3IFByb21pc2Uocz0+e2NvbnN0IG89VSgpO2UuYWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsZnVuY3Rpb24gYShuKXshbi5kYXRhfHwhbi5kYXRhLmlkfHxuLmRhdGEuaWQhPT1vfHwoZS5yZW1vdmVFdmVudExpc3RlbmVyKCJtZXNzYWdlIixhKSxzKG4uZGF0YSkpfSksZS5zdGFydCYmZS5zdGFydCgpLGUucG9zdE1lc3NhZ2UoT2JqZWN0LmFzc2lnbih7aWQ6b30sciksaSl9KX1mdW5jdGlvbiBVKCl7cmV0dXJuIG5ldyBBcnJheSg0KS5maWxsKDApLm1hcCgoKT0+TWF0aC5mbG9vcihNYXRoLnJhbmRvbSgpKk51bWJlci5NQVhfU0FGRV9JTlRFR0VSKS50b1N0cmluZygxNikpLmpvaW4oIi0iKX1jb25zdCBXPWFzeW5jKCk9PldlYkFzc2VtYmx5LnZhbGlkYXRlKG5ldyBVaW50OEFycmF5KFswLDk3LDExNSwxMDksMSwwLDAsMCwxLDUsMSw5NiwwLDEsMTIzLDMsMiwxLDAsMTAsMTAsMSw4LDAsNjUsMCwyNTMsMTUsMjUzLDk4LDExXSkpLGs9ImVhZ2VyIix4PSJsYXp5IixqPXtzc3c6WyJzaW1kIl0sbWluaW1hcDI6WyJzaW1kIl19LHQ9e3Rvb2xzOltdLGNvbmZpZzp7fSxmaWxlczpbXSxiYXNlOnt9LGZzOnt9LGFzeW5jIGluaXQoKXtpZih0LnRvb2xzLmxlbmd0aD09PTApdGhyb3ciRXhwZWN0aW5nIGF0IGxlYXN0IDEgdG9vbC4iO2lmKG5ldyBTZXQodC50b29scy5tYXAocj0+YCR7ci50b29sfS8ke3IucHJvZ3JhbXx8ci50b29sfWApKS5zaXplIT09dC50b29scy5sZW5ndGgpdGhyb3ciRm91bmQgZHVwbGljYXRlIHRvb2xzOyBjYW4gb25seSBoYXZlIGVhY2ggdG9vbC9wcm9ncmFtIGNvbWJpbmF0aW9uIGF0IG1vc3Qgb25jZS4iO2lmKHQuYmFzZT10LnRvb2xzLmZpbmQocj0+ci5yZWluaXQhPT0hMCksIXQuYmFzZSl0aHJvdyJDb3VsZCBub3QgZmluZCBhIHRvb2wgd2l0aCBgcmVpbml0OiBmYWxzZWAgdG8gdXNlIGFzIHRoZSBiYXNlIG1vZHVsZS4gVG8gZml4IHRoaXMgaXNzdWUsIGluY2x1ZGUgdGhlIHRvb2wgYGJhc2UvMS4wLjBgIHdoZW4gaW5pdGlhbGl6aW5nIEFpb2xpLiI7cmV0dXJuIHQuYmFzZS5pc0Jhc2VNb2R1bGU9ITAsYXdhaXQgdGhpcy5fc2V0dXAodC5iYXNlKSxhd2FpdCB0aGlzLl9pbml0TW9kdWxlcygpLHQuX2xvZygiUmVhZHkiKSwhMH0sYXN5bmMgX2luaXRNb2R1bGVzKCl7YXdhaXQgUHJvbWlzZS5hbGwodC50b29scy5tYXAodGhpcy5fc2V0dXApKSxhd2FpdCB0aGlzLl9zZXR1cEZTKCl9LG1vdW50KGU9W10pe2NvbnN0IHI9YCR7dC5jb25maWcuZGlyU2hhcmVkfSR7dC5jb25maWcuZGlyRGF0YX1gLGk9YCR7dC5jb25maWcuZGlyU2hhcmVkfSR7dC5jb25maWcuZGlyTW91bnRlZH1gO2xldCBzPVtdLG89W10sYT1bXTshQXJyYXkuaXNBcnJheShlKSYmIShlIGluc3RhbmNlb2YgRmlsZUxpc3QpJiYoZT1bZV0pLHQuX2xvZyhgTW91bnRpbmcgJHtlLmxlbmd0aH0gZmlsZXNgKTtmb3IobGV0IG4gb2YgZSl7aWYobiBpbnN0YW5jZW9mIEZpbGV8fChuPT1udWxsP3ZvaWQgMDpuLmRhdGEpaW5zdGFuY2VvZiBCbG9iJiZuLm5hbWV8fHR5cGVvZihuPT1udWxsP3ZvaWQgMDpuLmRhdGEpPT0ic3RyaW5nIiYmbi5uYW1lKXR5cGVvZihuPT1udWxsP3ZvaWQgMDpuLmRhdGEpPT0ic3RyaW5nIiYmKG4uZGF0YT1uZXcgQmxvYihbbi5kYXRhXSx7dHlwZToidGV4dC9wbGFpbiJ9KSkscy5wdXNoKG4pO2Vsc2UgaWYobi5uYW1lJiZuLnVybClvLnB1c2gobik7ZWxzZSBpZih0eXBlb2Ygbj09InN0cmluZyImJm4uc3RhcnRzV2l0aCgiaHR0cCIpKW49e3VybDpuLG5hbWU6bi5zcGxpdCgiLy8iKS5wb3AoKS5yZXBsYWNlKC9cLy9nLCItIil9LG8ucHVzaChuKTtlbHNlIHRocm93J0Nhbm5vdCBtb3VudCBmaWxlKHMpIHNwZWNpZmllZC4gTXVzdCBiZSBhIEZpbGUsIEJsb2IsIGEgVVJMIHN0cmluZywgb3IgeyBuYW1lOiAiZmlsZS50eHQiLCBkYXRhOiAic3RyaW5nIiB9Lic7YS5wdXNoKG4ubmFtZSl9dHJ5e3QuZnMudW5tb3VudChpKX1jYXRjaHt9Zm9yKGxldCBuIG9mIG8pdC5mcy5jcmVhdGVMYXp5RmlsZShyLG4ubmFtZSxuLnVybCwhMCwhMCk7cmV0dXJuIHQuZmlsZXM9dC5maWxlcy5jb25jYXQocyksdC5iYXNlLm1vZHVsZS5GUy5tb3VudCh0LmJhc2UubW9kdWxlLldPUktFUkZTLHtmaWxlczp0LmZpbGVzLmZpbHRlcihuPT5uIGluc3RhbmNlb2YgRmlsZSksYmxvYnM6dC5maWxlcy5maWx0ZXIobj0+KG49PW51bGw/dm9pZCAwOm4uZGF0YSlpbnN0YW5jZW9mIEJsb2IpfSxpKSxzLm1hcChuPT57Y29uc3QgYz1gJHtpfS8ke24ubmFtZX1gLGw9YCR7cn0vJHtuLm5hbWV9YDt0cnl7dC5mcy51bmxpbmsobCl9Y2F0Y2h7fXQuX2xvZyhgQ3JlYXRpbmcgc3ltbGluazogJHtsfSAtLT4gJHtjfWApLHQuZnMuc3ltbGluayhjLGwpfSksYS5tYXAobj0+YCR7cn0vJHtufWApfSxhc3luYyBleGVjKGUscj1udWxsKXtpZih0Ll9sb2coYEV4ZWN1dGluZyAlYyR7ZX0lYyBhcmdzPSR7cn1gLCJjb2xvcjpkYXJrYmx1ZTsgZm9udC13ZWlnaHQ6Ym9sZCIsIiIpLCFlKXRocm93IkV4cGVjdGluZyBhIGNvbW1hbmQiO2xldCBpPWU7cj09bnVsbCYmKHI9ZS5zcGxpdCgiICIpLGk9ci5zaGlmdCgpKTtjb25zdCBzPXQudG9vbHMuZmluZChhPT57dmFyIGM7bGV0IG49aTtyZXR1cm4oKGM9YT09bnVsbD92b2lkIDA6YS5mZWF0dXJlcyk9PW51bGw/dm9pZCAwOmMuc2ltZCk9PT0hMCYmKG49YCR7bn0tc2ltZGApLGEucHJvZ3JhbT09bn0pO2lmKHM9PW51bGwpdGhyb3dgUHJvZ3JhbSAke2l9IG5vdCBmb3VuZC5gO3Muc3Rkb3V0PSIiLHMuc3RkZXJyPSIiLHMubG9hZGluZz09eCYmKHMubG9hZGluZz1rLGF3YWl0IHRoaXMuX2luaXRNb2R1bGVzKCkpO3RyeXtzLm1vZHVsZS5jYWxsTWFpbihyKX1jYXRjaChhKXtjb25zb2xlLmVycm9yKGEpfXRyeXtzLm1vZHVsZS5GUy5jbG9zZShzLm1vZHVsZS5GUy5zdHJlYW1zWzFdKSxzLm1vZHVsZS5GUy5jbG9zZShzLm1vZHVsZS5GUy5zdHJlYW1zWzJdKX1jYXRjaHt9cy5tb2R1bGUuRlMuc3RyZWFtc1sxXT1zLm1vZHVsZS5GUy5vcGVuKCIvZGV2L3N0ZG91dCIsInciKSxzLm1vZHVsZS5GUy5zdHJlYW1zWzJdPXMubW9kdWxlLkZTLm9wZW4oIi9kZXYvc3RkZXJyIiwidyIpO2xldCBvPXtzdGRvdXQ6cy5zdGRvdXQsc3RkZXJyOnMuc3RkZXJyfTtyZXR1cm4gdC5jb25maWcucHJpbnRJbnRlcmxlYXZlZCYmKG89cy5zdGRvdXQpLHMucmVpbml0PT09ITAmJmF3YWl0IHRoaXMucmVpbml0KHMudG9vbCksb30sY2F0KGUpe3JldHVybiB0Ll9maWxlb3AoImNhdCIsZSl9LGxzKGUpe3JldHVybiB0Ll9maWxlb3AoImxzIixlKX0sZG93bmxvYWQoZSl7cmV0dXJuIHQuX2ZpbGVvcCgiZG93bmxvYWQiLGUpfSxwd2QoKXtyZXR1cm4gdC5mcy5jd2QoKX0sY2QoZSl7Zm9yKGxldCByIG9mIHQudG9vbHMpIXIubW9kdWxlfHxyLm1vZHVsZS5GUy5jaGRpcihlKX0sbWtkaXIoZSl7cmV0dXJuIHQuZnMubWtkaXIoZSksITB9LHJlYWQoe3BhdGg6ZSxsZW5ndGg6cixmbGFnOmk9InIiLG9mZnNldDpzPTAscG9zaXRpb246bz0wfSl7Y29uc3QgYT10LmZzLm9wZW4oZSxpKSxuPW5ldyBVaW50OEFycmF5KHIpO3JldHVybiB0LmZzLnJlYWQoYSxuLHMscixvKSx0LmZzLmNsb3NlKGEpLG59LHdyaXRlKHtwYXRoOmUsYnVmZmVyOnIsZmxhZzppPSJ3KyIsb2Zmc2V0OnM9MCxwb3NpdGlvbjpvPTB9KXtjb25zdCBhPXQuZnMub3BlbihlLGkpO3QuZnMud3JpdGUoYSxyLHMsci5sZW5ndGgsbyksdC5mcy5jbG9zZShhKX0sYXN5bmMgcmVpbml0KGUpe2NvbnN0IHI9dC50b29scy5maW5kKHM9PnMudG9vbD09ZSksaT10LmJhc2UubW9kdWxlLkZTLmN3ZCgpO09iamVjdC5hc3NpZ24ocixyLmNvbmZpZyksci5yZWFkeT0hMSxhd2FpdCB0aGlzLmluaXQoKSxyLmlzQmFzZU1vZHVsZSYmdGhpcy5tb3VudCgpLHRoaXMuY2QoaSl9LF9zdGRpblR4dDoiIixfc3RkaW5QdHI6MCxnZXQgc3RkaW4oKXtyZXR1cm4gdC5fc3RkaW5UeHR9LHNldCBzdGRpbihlPSIiKXt0Ll9sb2coYFNldHRpbmcgc3RkaW4gdG8gJWMke2V9JWNgLCJjb2xvcjpkYXJrYmx1ZSIsIiIpLHQuX3N0ZGluVHh0PWUsdC5fc3RkaW5QdHI9MH0sYXN5bmMgX3NldHVwKGUpe2lmKGUucmVhZHkpcmV0dXJuO2lmKHQuX2xvZyhgU2V0dGluZyB1cCAke2UudG9vbH0gKGJhc2UgPSAke2UuaXNCYXNlTW9kdWxlPT09ITB9KS4uLmApLGUuY29uZmlnPU9iamVjdC5hc3NpZ24oe30sZSksZS51cmxQcmVmaXh8fChlLnVybFByZWZpeD1gJHt0LmNvbmZpZy51cmxDRE59LyR7ZS50b29sfS8ke2UudmVyc2lvbn1gKSxlLnByb2dyYW18fChlLnByb2dyYW09ZS50b29sKSxlLmZlYXR1cmVzfHwoZS5mZWF0dXJlcz17fSwoaltlLnByb2dyYW1dfHxbXSkuaW5jbHVkZXMoInNpbWQiKSYmKGF3YWl0IFcoKT8oZS5wcm9ncmFtKz0iLXNpbWQiLGUuZmVhdHVyZXMuc2ltZD0hMCk6dC5fbG9nKGBXZWJBc3NlbWJseSBTSU1EIGlzIG5vdCBzdXBwb3J0ZWQgaW4gdGhpcyBicm93c2VyOyB3aWxsIGxvYWQgbm9uLVNJTUQgdmVyc2lvbiBvZiAke2UucHJvZ3JhbX0uYCkpKSxlLmlzQmFzZU1vZHVsZSYmKGUubG9hZGluZz1rKSxlLmxvYWRpbmc9PT14KXt0Ll9sb2coYFdpbGwgbGF6eS1sb2FkICR7ZS50b29sfTsgc2tpcHBpbmcgaW5pdGlhbGl6YXRpb24uYCk7cmV0dXJufXNlbGYuaW1wb3J0U2NyaXB0cyhgJHtlLnVybFByZWZpeH0vJHtlLnByb2dyYW19LmpzYCksZS5tb2R1bGU9YXdhaXQgTW9kdWxlKHt0aGlzUHJvZ3JhbTplLnByb2dyYW0sbG9jYXRlRmlsZTooaSxzKT0+YCR7ZS51cmxQcmVmaXh9LyR7aX1gLHN0ZGluOigpPT50Ll9zdGRpblB0cjx0LnN0ZGluLmxlbmd0aD90LnN0ZGluLmNoYXJDb2RlQXQodC5fc3RkaW5QdHIrKyk6KHQuc3RkaW49IiIsbnVsbCkscHJpbnQ6aT0+e3QuY29uZmlnLnByaW50U3RyZWFtP3Bvc3RNZXNzYWdlKHt0eXBlOiJiaW93YXNtIix2YWx1ZTp7c3Rkb3V0Oml9fSk6ZS5zdGRvdXQrPWkrYApgfSxwcmludEVycjppPT57Y29uc3Qgcz10LmNvbmZpZy5wcmludEludGVybGVhdmVkPyJzdGRvdXQiOiJzdGRlcnIiO3QuY29uZmlnLnByaW50U3RyZWFtP3Bvc3RNZXNzYWdlKHt0eXBlOiJiaW93YXNtIix2YWx1ZTp7W3NdOml9fSk6ZVtzXSs9aStgCmB9fSk7Y29uc3Qgcj1lLm1vZHVsZS5GUztlLmlzQmFzZU1vZHVsZT8odC5fbG9nKGBTZXR0aW5nIHVwICR7ZS50b29sfSB3aXRoIGJhc2UgbW9kdWxlIGZpbGVzeXN0ZW0uLi5gKSxyLm1rZGlyKHQuY29uZmlnLmRpclNoYXJlZCw1MTEpLHIubWtkaXIoYCR7dC5jb25maWcuZGlyU2hhcmVkfS8ke3QuY29uZmlnLmRpckRhdGF9YCw1MTEpLHIubWtkaXIoYCR7dC5jb25maWcuZGlyU2hhcmVkfS8ke3QuY29uZmlnLmRpck1vdW50ZWR9YCw1MTEpLHIuY2hkaXIoYCR7dC5jb25maWcuZGlyU2hhcmVkfS8ke3QuY29uZmlnLmRpckRhdGF9YCksdC5mcz1yKToodC5fbG9nKGBTZXR0aW5nIHVwICR7ZS50b29sfSB3aXRoIGZpbGVzeXN0ZW0uLi5gKSxyLm1rZGlyKHQuY29uZmlnLmRpclNoYXJlZCksci5tb3VudChlLm1vZHVsZS5QUk9YWUZTLHtyb290OnQuY29uZmlnLmRpclNoYXJlZCxmczp0LmZzfSx0LmNvbmZpZy5kaXJTaGFyZWQpLHIuY2hkaXIodC5mcy5jd2QoKSkpLGUuc3Rkb3V0PSIiLGUuc3RkZXJyPSIiLGUucmVhZHk9ITB9LGFzeW5jIF9zZXR1cEZTKCl7Y29uc3QgZT10LmZzO2ZvcihsZXQgciBvZiB0LnRvb2xzKXtpZighci5yZWFkeSljb250aW51ZTtjb25zdCBpPXIubW9kdWxlLkZTLHM9YC8ke3IudG9vbH1gLG89YCR7dC5jb25maWcuZGlyU2hhcmVkfSR7c31gOyFpLmFuYWx5emVQYXRoKHMpLmV4aXN0c3x8ZS5hbmFseXplUGF0aChvKS5leGlzdHN8fCh0Ll9sb2coYE1vdW50aW5nICR7c30gb250byAke3QuYmFzZS50b29sfSBmaWxlc3lzdGVtIGF0ICR7b31gKSxlLm1rZGlyKG8pLGUubW91bnQodC5iYXNlLm1vZHVsZS5QUk9YWUZTLHtyb290OnMsZnM6aX0sbykpfX0sX2ZpbGVvcChlLHIpe3QuX2xvZyhgUnVubmluZyAke2V9ICR7cn1gKTtjb25zdCBpPXQuZnMuYW5hbHl6ZVBhdGgocik7aWYoIWkuZXhpc3RzKXJldHVybiB0Ll9sb2coYEZpbGUgJHtyfSBub3QgZm91bmQuYCksITE7c3dpdGNoKGUpe2Nhc2UiY2F0IjpyZXR1cm4gdC5mcy5yZWFkRmlsZShyLHtlbmNvZGluZzoidXRmOCJ9KTtjYXNlImxzIjpyZXR1cm4gdC5mcy5pc0ZpbGUoaS5vYmplY3QubW9kZSk/dC5mcy5zdGF0KHIpOnQuZnMucmVhZGRpcihyKTtjYXNlImRvd25sb2FkIjpjb25zdCBzPW5ldyBCbG9iKFt0aGlzLmNhdChyKV0pO3JldHVybiBVUkwuY3JlYXRlT2JqZWN0VVJMKHMpfXJldHVybiExfSxfbG9nKGUpe2lmKCF0LmNvbmZpZy5kZWJ1ZylyZXR1cm47bGV0IHI9Wy4uLmFyZ3VtZW50c107ci5zaGlmdCgpLGNvbnNvbGUubG9nKGAlY1tXZWJXb3JrZXJdJWMgJHtlfWAsImZvbnQtd2VpZ2h0OmJvbGQiLCIiLC4uLnIpfX07dyh0KX0pKCk7Cg==",i0=typeof window<"u"&&window.Blob&&new Blob([atob(a0)],{type:"text/javascript;charset=utf-8"});function hF(){const n=i0&&(window.URL||window.webkitURL).createObjectURL(i0);try{return n?new Worker(n):new Worker("data:application/javascript;base64,"+a0)}finally{n&&(window.URL||window.webkitURL).revokeObjectURL(n)}}const gF="https://biowasm.com/cdn/v3",yF="https://stg.biowasm.com/cdn/v3",bF={urlCDN:gF,urlCDNStg:yF,dirShared:"/shared",dirMounted:"/mnt",dirData:"/data",printInterleaved:!0,printStream:!1,callback:null,debug:!1,env:"prd"};class _F{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({},bF,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 hF;this.callback&&(e.onmessage=o=>{o.data.type==="biowasm"&&this.callback(o.data.value)});const r=n0(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 wF(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 kF(r);if(o)return;e.value=a}catch(a){console.error(a),e.value.clear()}finally{e.loading=!1}}),e}const l0=new Map;async function kF(n){const e=await vF(n);let r=l0.get(e);if(r)return r;const o=await new _F(["kalign/3.3.1"]),a=new File(n.map(c=>`>${c.header}
|
|
85
|
+
*/const Py=Symbol("Comlink.proxy"),zM=Symbol("Comlink.endpoint"),DM=Symbol("Comlink.releaseProxy"),Xu=Symbol("Comlink.finalizer"),Zs=Symbol("Comlink.thrown"),zy=n=>typeof n=="object"&&n!==null||typeof n=="function",WM={canHandle:n=>zy(n)&&n[Py],serialize(n){const{port1:e,port2:r}=new MessageChannel;return Wy(n,e),[r,[r]]},deserialize(n){return n.start(),Uy(n)}},GM={canHandle:n=>zy(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}},Dy=new Map([["proxy",WM],["throw",GM]]);function UM(n,e){for(const r of n)if(e===r||r==="*"||r instanceof RegExp&&r.test(e))return!0;return!1}function Wy(n,e=globalThis,r=["*"]){e.addEventListener("message",function o(a){if(!a||!a.data)return;if(!UM(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=JM(y)}break;case"ENDPOINT":{const{port1:y,port2:_}=new MessageChannel;Wy(n,_),f=KM(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),Gy(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 HM(n){return n.constructor.name==="MessagePort"}function Gy(n){HM(n)&&n.close()}function Uy(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 Hy(n){return ua(n,new Map,{type:"RELEASE"}).then(()=>{Gy(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&&Hy(n)});function XM(n,e){const r=(Fs.get(e)||0)+1;Fs.set(e,r),Ps&&Ps.register(n,e,n)}function jM(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===DM)return()=>{jM(l),Hy(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===zM)return ua(n,e,{type:"ENDPOINT"}).then(ko);if(f==="bind")return ju(n,e,r.slice(0,-1));const[m,g]=Xy(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]=Xy(d);return ua(n,e,{type:"CONSTRUCT",path:r.map(m=>m.toString()),argumentList:u},f).then(ko)}});return XM(l,n),l}function YM(n){return Array.prototype.concat.apply([],n)}function Xy(n){const e=n.map(zs);return[e.map(r=>r[0]),YM(e.map(r=>r[1]))]}const jy=new WeakMap;function KM(n,e){return jy.set(n,e),n}function JM(n){return Object.assign(n,{[Py]:!0})}function zs(n){for(const[e,r]of Dy)if(r.canHandle(n)){const[o,a]=r.serialize(n);return[{type:"HANDLER",name:e,value:o},a]}return[{type:"RAW",value:n},jy.get(n)||[]]}function ko(n){switch(n.type){case"HANDLER":return Dy.get(n.name).deserialize(n.value);case"RAW":return n.value}}function ua(n,e,r,o){return new Promise(a=>{const l=qM();e.set(l,a),n.start&&n.start(),n.postMessage(Object.assign({id:l},r),o)})}function qM(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const Yy="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)),Ky=typeof self<"u"&&self.Blob&&new Blob([QM(Yy)],{type:"text/javascript;charset=utf-8"});function eF(n){let e;try{if(e=Ky&&(self.URL||self.webkitURL).createObjectURL(Ky),!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,"+Yy,{name:n==null?void 0:n.name})}finally{e&&(self.URL||self.webkitURL).revokeObjectURL(e)}}let Yu;function tF(){return Yu||(Yu=Uy(new eF)),Yu}const nF=["hydrophobic","positive_charge","negative_charge","polar","cysteine","glycine","proline","aromatic"],rF={hydrophobic:"Hydrophobic",positive_charge:"Positive Charge",negative_charge:"Negative Charge",polar:"Polar",cysteine:"Cysteine",glycine:"Glycine",proline:"Proline",aromatic:"Aromatic"},Jy={hydrophobic:"#99CCFF",positive_charge:"#FFA2A3",negative_charge:"#C1ADFF",polar:"#99E099",cysteine:"#FAAAFA",glycine:"#F7BC5D",proline:"#FFFF8F",aromatic:"#A2F5FA"};function oF(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 tF().getChemicalPropertiesHighlight(o);if(a)return;e.value=l}catch(l){console.error(l),e.value=[]}finally{r.value=!1}}),{data:e,loading:r}}function aF({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 qy=Symbol("Comlink.proxy"),iF=Symbol("Comlink.endpoint"),lF=Symbol("Comlink.releaseProxy"),Ku=Symbol("Comlink.thrown"),Qy=n=>typeof n=="object"&&n!==null||typeof n=="function",sF={canHandle:n=>Qy(n)&&n[qy],serialize(n){const{port1:e,port2:r}=new MessageChannel;return t0(n,e),[r,[r]]},deserialize(n){return n.start(),r0(n)}},cF={canHandle:n=>Qy(n)&&Ku 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}},e0=new Map([["proxy",sF],["throw",cF]]);function t0(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=fF(g)}break;case"ENDPOINT":{const{port1:g,port2:y}=new MessageChannel;t0(n,y),u=pF(g,[g])}break;case"RELEASE":u=void 0;break;default:return}}catch(f){u={value:f,[Ku]:0}}Promise.resolve(u).catch(f=>({value:f,[Ku]:0})).then(f=>{const[m,g]=qu(f);e.postMessage(Object.assign(Object.assign({},m),{id:a}),g),l==="RELEASE"&&(e.removeEventListener("message",r),n0(e))})}),e.start&&e.start()}function dF(n){return n.constructor.name==="MessagePort"}function n0(n){dF(n)&&n.close()}function r0(n,e){return Ju(n,[],e)}function Ds(n){if(n)throw new Error("Proxy has been released and is not useable")}function Ju(n,e=[],r=function(){}){let o=!1;const a=new Proxy(r,{get(l,c){if(Ds(o),c===lF)return()=>pa(n,{type:"RELEASE",path:e.map(d=>d.toString())}).then(()=>{n0(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 Ju(n,[...e,c])},set(l,c,d){Ds(o);const[u,f]=qu(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===iF)return pa(n,{type:"ENDPOINT"}).then(xo);if(u==="bind")return Ju(n,e.slice(0,-1));const[f,m]=o0(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]=o0(c);return pa(n,{type:"CONSTRUCT",path:e.map(f=>f.toString()),argumentList:d},u).then(xo)}});return a}function uF(n){return Array.prototype.concat.apply([],n)}function o0(n){const e=n.map(qu);return[e.map(r=>r[0]),uF(e.map(r=>r[1]))]}const a0=new WeakMap;function pF(n,e){return a0.set(n,e),n}function fF(n){return Object.assign(n,{[qy]:!0})}function qu(n){for(const[e,r]of e0)if(r.canHandle(n)){const[o,a]=r.serialize(n);return[{type:"HANDLER",name:e,value:o},a]}return[{type:"RAW",value:n},a0.get(n)||[]]}function xo(n){switch(n.type){case"HANDLER":return e0.get(n.name).deserialize(n.value);case"RAW":return n.value}}function pa(n,e,r){return new Promise(o=>{const a=mF();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 mF(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}const i0="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2NvbnN0ICQ9U3ltYm9sKCJDb21saW5rLnByb3h5IiksQT1TeW1ib2woIkNvbWxpbmsuZW5kcG9pbnQiKSxSPVN5bWJvbCgiQ29tbGluay5yZWxlYXNlUHJveHkiKSx5PVN5bWJvbCgiQ29tbGluay50aHJvd24iKSxfPWU9PnR5cGVvZiBlPT0ib2JqZWN0IiYmZSE9PW51bGx8fHR5cGVvZiBlPT0iZnVuY3Rpb24iLEw9e2NhbkhhbmRsZTplPT5fKGUpJiZlWyRdLHNlcmlhbGl6ZShlKXtjb25zdHtwb3J0MTpyLHBvcnQyOml9PW5ldyBNZXNzYWdlQ2hhbm5lbDtyZXR1cm4gdyhlLHIpLFtpLFtpXV19LGRlc2VyaWFsaXplKGUpe3JldHVybiBlLnN0YXJ0KCksQyhlKX19LE89e2NhbkhhbmRsZTplPT5fKGUpJiZ5IGluIGUsc2VyaWFsaXplKHt2YWx1ZTplfSl7bGV0IHI7cmV0dXJuIGUgaW5zdGFuY2VvZiBFcnJvcj9yPXtpc0Vycm9yOiEwLHZhbHVlOnttZXNzYWdlOmUubWVzc2FnZSxuYW1lOmUubmFtZSxzdGFjazplLnN0YWNrfX06cj17aXNFcnJvcjohMSx2YWx1ZTplfSxbcixbXV19LGRlc2VyaWFsaXplKGUpe3Rocm93IGUuaXNFcnJvcj9PYmplY3QuYXNzaWduKG5ldyBFcnJvcihlLnZhbHVlLm1lc3NhZ2UpLGUudmFsdWUpOmUudmFsdWV9fSxFPW5ldyBNYXAoW1sicHJveHkiLExdLFsidGhyb3ciLE9dXSk7ZnVuY3Rpb24gdyhlLHI9c2VsZil7ci5hZGRFdmVudExpc3RlbmVyKCJtZXNzYWdlIixmdW5jdGlvbiBpKHMpe2lmKCFzfHwhcy5kYXRhKXJldHVybjtjb25zdHtpZDpvLHR5cGU6YSxwYXRoOm59PU9iamVjdC5hc3NpZ24oe3BhdGg6W119LHMuZGF0YSksYz0ocy5kYXRhLmFyZ3VtZW50TGlzdHx8W10pLm1hcChtKTtsZXQgbDt0cnl7Y29uc3QgdT1uLnNsaWNlKDAsLTEpLnJlZHVjZSgoZCxwKT0+ZFtwXSxlKSxmPW4ucmVkdWNlKChkLHApPT5kW3BdLGUpO3N3aXRjaChhKXtjYXNlIkdFVCI6bD1mO2JyZWFrO2Nhc2UiU0VUIjp1W24uc2xpY2UoLTEpWzBdXT1tKHMuZGF0YS52YWx1ZSksbD0hMDticmVhaztjYXNlIkFQUExZIjpsPWYuYXBwbHkodSxjKTticmVhaztjYXNlIkNPTlNUUlVDVCI6e2NvbnN0IGQ9bmV3IGYoLi4uYyk7bD16KGQpfWJyZWFrO2Nhc2UiRU5EUE9JTlQiOntjb25zdHtwb3J0MTpkLHBvcnQyOnB9PW5ldyBNZXNzYWdlQ2hhbm5lbDt3KGUscCksbD1OKGQsW2RdKX1icmVhaztjYXNlIlJFTEVBU0UiOmw9dm9pZCAwO2JyZWFrO2RlZmF1bHQ6cmV0dXJufX1jYXRjaCh1KXtsPXt2YWx1ZTp1LFt5XTowfX1Qcm9taXNlLnJlc29sdmUobCkuY2F0Y2godT0+KHt2YWx1ZTp1LFt5XTowfSkpLnRoZW4odT0+e2NvbnN0W2YsZF09Uyh1KTtyLnBvc3RNZXNzYWdlKE9iamVjdC5hc3NpZ24oT2JqZWN0LmFzc2lnbih7fSxmKSx7aWQ6b30pLGQpLGE9PT0iUkVMRUFTRSImJihyLnJlbW92ZUV2ZW50TGlzdGVuZXIoIm1lc3NhZ2UiLGkpLE0ocikpfSl9KSxyLnN0YXJ0JiZyLnN0YXJ0KCl9ZnVuY3Rpb24gVChlKXtyZXR1cm4gZS5jb25zdHJ1Y3Rvci5uYW1lPT09Ik1lc3NhZ2VQb3J0In1mdW5jdGlvbiBNKGUpe1QoZSkmJmUuY2xvc2UoKX1mdW5jdGlvbiBDKGUscil7cmV0dXJuIGIoZSxbXSxyKX1mdW5jdGlvbiBoKGUpe2lmKGUpdGhyb3cgbmV3IEVycm9yKCJQcm94eSBoYXMgYmVlbiByZWxlYXNlZCBhbmQgaXMgbm90IHVzZWFibGUiKX1mdW5jdGlvbiBiKGUscj1bXSxpPWZ1bmN0aW9uKCl7fSl7bGV0IHM9ITE7Y29uc3Qgbz1uZXcgUHJveHkoaSx7Z2V0KGEsbil7aWYoaChzKSxuPT09UilyZXR1cm4oKT0+ZyhlLHt0eXBlOiJSRUxFQVNFIixwYXRoOnIubWFwKGM9PmMudG9TdHJpbmcoKSl9KS50aGVuKCgpPT57TShlKSxzPSEwfSk7aWYobj09PSJ0aGVuIil7aWYoci5sZW5ndGg9PT0wKXJldHVybnt0aGVuOigpPT5vfTtjb25zdCBjPWcoZSx7dHlwZToiR0VUIixwYXRoOnIubWFwKGw9PmwudG9TdHJpbmcoKSl9KS50aGVuKG0pO3JldHVybiBjLnRoZW4uYmluZChjKX1yZXR1cm4gYihlLFsuLi5yLG5dKX0sc2V0KGEsbixjKXtoKHMpO2NvbnN0W2wsdV09UyhjKTtyZXR1cm4gZyhlLHt0eXBlOiJTRVQiLHBhdGg6Wy4uLnIsbl0ubWFwKGY9PmYudG9TdHJpbmcoKSksdmFsdWU6bH0sdSkudGhlbihtKX0sYXBwbHkoYSxuLGMpe2gocyk7Y29uc3QgbD1yW3IubGVuZ3RoLTFdO2lmKGw9PT1BKXJldHVybiBnKGUse3R5cGU6IkVORFBPSU5UIn0pLnRoZW4obSk7aWYobD09PSJiaW5kIilyZXR1cm4gYihlLHIuc2xpY2UoMCwtMSkpO2NvbnN0W3UsZl09RihjKTtyZXR1cm4gZyhlLHt0eXBlOiJBUFBMWSIscGF0aDpyLm1hcChkPT5kLnRvU3RyaW5nKCkpLGFyZ3VtZW50TGlzdDp1fSxmKS50aGVuKG0pfSxjb25zdHJ1Y3QoYSxuKXtoKHMpO2NvbnN0W2MsbF09RihuKTtyZXR1cm4gZyhlLHt0eXBlOiJDT05TVFJVQ1QiLHBhdGg6ci5tYXAodT0+dS50b1N0cmluZygpKSxhcmd1bWVudExpc3Q6Y30sbCkudGhlbihtKX19KTtyZXR1cm4gb31mdW5jdGlvbiBEKGUpe3JldHVybiBBcnJheS5wcm90b3R5cGUuY29uY2F0LmFwcGx5KFtdLGUpfWZ1bmN0aW9uIEYoZSl7Y29uc3Qgcj1lLm1hcChTKTtyZXR1cm5bci5tYXAoaT0+aVswXSksRChyLm1hcChpPT5pWzFdKSldfWNvbnN0IFA9bmV3IFdlYWtNYXA7ZnVuY3Rpb24gTihlLHIpe3JldHVybiBQLnNldChlLHIpLGV9ZnVuY3Rpb24geihlKXtyZXR1cm4gT2JqZWN0LmFzc2lnbihlLHtbJF06ITB9KX1mdW5jdGlvbiBTKGUpe2Zvcihjb25zdFtyLGldb2YgRSlpZihpLmNhbkhhbmRsZShlKSl7Y29uc3RbcyxvXT1pLnNlcmlhbGl6ZShlKTtyZXR1cm5be3R5cGU6IkhBTkRMRVIiLG5hbWU6cix2YWx1ZTpzfSxvXX1yZXR1cm5be3R5cGU6IlJBVyIsdmFsdWU6ZX0sUC5nZXQoZSl8fFtdXX1mdW5jdGlvbiBtKGUpe3N3aXRjaChlLnR5cGUpe2Nhc2UiSEFORExFUiI6cmV0dXJuIEUuZ2V0KGUubmFtZSkuZGVzZXJpYWxpemUoZS52YWx1ZSk7Y2FzZSJSQVciOnJldHVybiBlLnZhbHVlfX1mdW5jdGlvbiBnKGUscixpKXtyZXR1cm4gbmV3IFByb21pc2Uocz0+e2NvbnN0IG89VSgpO2UuYWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsZnVuY3Rpb24gYShuKXshbi5kYXRhfHwhbi5kYXRhLmlkfHxuLmRhdGEuaWQhPT1vfHwoZS5yZW1vdmVFdmVudExpc3RlbmVyKCJtZXNzYWdlIixhKSxzKG4uZGF0YSkpfSksZS5zdGFydCYmZS5zdGFydCgpLGUucG9zdE1lc3NhZ2UoT2JqZWN0LmFzc2lnbih7aWQ6b30sciksaSl9KX1mdW5jdGlvbiBVKCl7cmV0dXJuIG5ldyBBcnJheSg0KS5maWxsKDApLm1hcCgoKT0+TWF0aC5mbG9vcihNYXRoLnJhbmRvbSgpKk51bWJlci5NQVhfU0FGRV9JTlRFR0VSKS50b1N0cmluZygxNikpLmpvaW4oIi0iKX1jb25zdCBXPWFzeW5jKCk9PldlYkFzc2VtYmx5LnZhbGlkYXRlKG5ldyBVaW50OEFycmF5KFswLDk3LDExNSwxMDksMSwwLDAsMCwxLDUsMSw5NiwwLDEsMTIzLDMsMiwxLDAsMTAsMTAsMSw4LDAsNjUsMCwyNTMsMTUsMjUzLDk4LDExXSkpLGs9ImVhZ2VyIix4PSJsYXp5IixqPXtzc3c6WyJzaW1kIl0sbWluaW1hcDI6WyJzaW1kIl19LHQ9e3Rvb2xzOltdLGNvbmZpZzp7fSxmaWxlczpbXSxiYXNlOnt9LGZzOnt9LGFzeW5jIGluaXQoKXtpZih0LnRvb2xzLmxlbmd0aD09PTApdGhyb3ciRXhwZWN0aW5nIGF0IGxlYXN0IDEgdG9vbC4iO2lmKG5ldyBTZXQodC50b29scy5tYXAocj0+YCR7ci50b29sfS8ke3IucHJvZ3JhbXx8ci50b29sfWApKS5zaXplIT09dC50b29scy5sZW5ndGgpdGhyb3ciRm91bmQgZHVwbGljYXRlIHRvb2xzOyBjYW4gb25seSBoYXZlIGVhY2ggdG9vbC9wcm9ncmFtIGNvbWJpbmF0aW9uIGF0IG1vc3Qgb25jZS4iO2lmKHQuYmFzZT10LnRvb2xzLmZpbmQocj0+ci5yZWluaXQhPT0hMCksIXQuYmFzZSl0aHJvdyJDb3VsZCBub3QgZmluZCBhIHRvb2wgd2l0aCBgcmVpbml0OiBmYWxzZWAgdG8gdXNlIGFzIHRoZSBiYXNlIG1vZHVsZS4gVG8gZml4IHRoaXMgaXNzdWUsIGluY2x1ZGUgdGhlIHRvb2wgYGJhc2UvMS4wLjBgIHdoZW4gaW5pdGlhbGl6aW5nIEFpb2xpLiI7cmV0dXJuIHQuYmFzZS5pc0Jhc2VNb2R1bGU9ITAsYXdhaXQgdGhpcy5fc2V0dXAodC5iYXNlKSxhd2FpdCB0aGlzLl9pbml0TW9kdWxlcygpLHQuX2xvZygiUmVhZHkiKSwhMH0sYXN5bmMgX2luaXRNb2R1bGVzKCl7YXdhaXQgUHJvbWlzZS5hbGwodC50b29scy5tYXAodGhpcy5fc2V0dXApKSxhd2FpdCB0aGlzLl9zZXR1cEZTKCl9LG1vdW50KGU9W10pe2NvbnN0IHI9YCR7dC5jb25maWcuZGlyU2hhcmVkfSR7dC5jb25maWcuZGlyRGF0YX1gLGk9YCR7dC5jb25maWcuZGlyU2hhcmVkfSR7dC5jb25maWcuZGlyTW91bnRlZH1gO2xldCBzPVtdLG89W10sYT1bXTshQXJyYXkuaXNBcnJheShlKSYmIShlIGluc3RhbmNlb2YgRmlsZUxpc3QpJiYoZT1bZV0pLHQuX2xvZyhgTW91bnRpbmcgJHtlLmxlbmd0aH0gZmlsZXNgKTtmb3IobGV0IG4gb2YgZSl7aWYobiBpbnN0YW5jZW9mIEZpbGV8fChuPT1udWxsP3ZvaWQgMDpuLmRhdGEpaW5zdGFuY2VvZiBCbG9iJiZuLm5hbWV8fHR5cGVvZihuPT1udWxsP3ZvaWQgMDpuLmRhdGEpPT0ic3RyaW5nIiYmbi5uYW1lKXR5cGVvZihuPT1udWxsP3ZvaWQgMDpuLmRhdGEpPT0ic3RyaW5nIiYmKG4uZGF0YT1uZXcgQmxvYihbbi5kYXRhXSx7dHlwZToidGV4dC9wbGFpbiJ9KSkscy5wdXNoKG4pO2Vsc2UgaWYobi5uYW1lJiZuLnVybClvLnB1c2gobik7ZWxzZSBpZih0eXBlb2Ygbj09InN0cmluZyImJm4uc3RhcnRzV2l0aCgiaHR0cCIpKW49e3VybDpuLG5hbWU6bi5zcGxpdCgiLy8iKS5wb3AoKS5yZXBsYWNlKC9cLy9nLCItIil9LG8ucHVzaChuKTtlbHNlIHRocm93J0Nhbm5vdCBtb3VudCBmaWxlKHMpIHNwZWNpZmllZC4gTXVzdCBiZSBhIEZpbGUsIEJsb2IsIGEgVVJMIHN0cmluZywgb3IgeyBuYW1lOiAiZmlsZS50eHQiLCBkYXRhOiAic3RyaW5nIiB9Lic7YS5wdXNoKG4ubmFtZSl9dHJ5e3QuZnMudW5tb3VudChpKX1jYXRjaHt9Zm9yKGxldCBuIG9mIG8pdC5mcy5jcmVhdGVMYXp5RmlsZShyLG4ubmFtZSxuLnVybCwhMCwhMCk7cmV0dXJuIHQuZmlsZXM9dC5maWxlcy5jb25jYXQocyksdC5iYXNlLm1vZHVsZS5GUy5tb3VudCh0LmJhc2UubW9kdWxlLldPUktFUkZTLHtmaWxlczp0LmZpbGVzLmZpbHRlcihuPT5uIGluc3RhbmNlb2YgRmlsZSksYmxvYnM6dC5maWxlcy5maWx0ZXIobj0+KG49PW51bGw/dm9pZCAwOm4uZGF0YSlpbnN0YW5jZW9mIEJsb2IpfSxpKSxzLm1hcChuPT57Y29uc3QgYz1gJHtpfS8ke24ubmFtZX1gLGw9YCR7cn0vJHtuLm5hbWV9YDt0cnl7dC5mcy51bmxpbmsobCl9Y2F0Y2h7fXQuX2xvZyhgQ3JlYXRpbmcgc3ltbGluazogJHtsfSAtLT4gJHtjfWApLHQuZnMuc3ltbGluayhjLGwpfSksYS5tYXAobj0+YCR7cn0vJHtufWApfSxhc3luYyBleGVjKGUscj1udWxsKXtpZih0Ll9sb2coYEV4ZWN1dGluZyAlYyR7ZX0lYyBhcmdzPSR7cn1gLCJjb2xvcjpkYXJrYmx1ZTsgZm9udC13ZWlnaHQ6Ym9sZCIsIiIpLCFlKXRocm93IkV4cGVjdGluZyBhIGNvbW1hbmQiO2xldCBpPWU7cj09bnVsbCYmKHI9ZS5zcGxpdCgiICIpLGk9ci5zaGlmdCgpKTtjb25zdCBzPXQudG9vbHMuZmluZChhPT57dmFyIGM7bGV0IG49aTtyZXR1cm4oKGM9YT09bnVsbD92b2lkIDA6YS5mZWF0dXJlcyk9PW51bGw/dm9pZCAwOmMuc2ltZCk9PT0hMCYmKG49YCR7bn0tc2ltZGApLGEucHJvZ3JhbT09bn0pO2lmKHM9PW51bGwpdGhyb3dgUHJvZ3JhbSAke2l9IG5vdCBmb3VuZC5gO3Muc3Rkb3V0PSIiLHMuc3RkZXJyPSIiLHMubG9hZGluZz09eCYmKHMubG9hZGluZz1rLGF3YWl0IHRoaXMuX2luaXRNb2R1bGVzKCkpO3RyeXtzLm1vZHVsZS5jYWxsTWFpbihyKX1jYXRjaChhKXtjb25zb2xlLmVycm9yKGEpfXRyeXtzLm1vZHVsZS5GUy5jbG9zZShzLm1vZHVsZS5GUy5zdHJlYW1zWzFdKSxzLm1vZHVsZS5GUy5jbG9zZShzLm1vZHVsZS5GUy5zdHJlYW1zWzJdKX1jYXRjaHt9cy5tb2R1bGUuRlMuc3RyZWFtc1sxXT1zLm1vZHVsZS5GUy5vcGVuKCIvZGV2L3N0ZG91dCIsInciKSxzLm1vZHVsZS5GUy5zdHJlYW1zWzJdPXMubW9kdWxlLkZTLm9wZW4oIi9kZXYvc3RkZXJyIiwidyIpO2xldCBvPXtzdGRvdXQ6cy5zdGRvdXQsc3RkZXJyOnMuc3RkZXJyfTtyZXR1cm4gdC5jb25maWcucHJpbnRJbnRlcmxlYXZlZCYmKG89cy5zdGRvdXQpLHMucmVpbml0PT09ITAmJmF3YWl0IHRoaXMucmVpbml0KHMudG9vbCksb30sY2F0KGUpe3JldHVybiB0Ll9maWxlb3AoImNhdCIsZSl9LGxzKGUpe3JldHVybiB0Ll9maWxlb3AoImxzIixlKX0sZG93bmxvYWQoZSl7cmV0dXJuIHQuX2ZpbGVvcCgiZG93bmxvYWQiLGUpfSxwd2QoKXtyZXR1cm4gdC5mcy5jd2QoKX0sY2QoZSl7Zm9yKGxldCByIG9mIHQudG9vbHMpIXIubW9kdWxlfHxyLm1vZHVsZS5GUy5jaGRpcihlKX0sbWtkaXIoZSl7cmV0dXJuIHQuZnMubWtkaXIoZSksITB9LHJlYWQoe3BhdGg6ZSxsZW5ndGg6cixmbGFnOmk9InIiLG9mZnNldDpzPTAscG9zaXRpb246bz0wfSl7Y29uc3QgYT10LmZzLm9wZW4oZSxpKSxuPW5ldyBVaW50OEFycmF5KHIpO3JldHVybiB0LmZzLnJlYWQoYSxuLHMscixvKSx0LmZzLmNsb3NlKGEpLG59LHdyaXRlKHtwYXRoOmUsYnVmZmVyOnIsZmxhZzppPSJ3KyIsb2Zmc2V0OnM9MCxwb3NpdGlvbjpvPTB9KXtjb25zdCBhPXQuZnMub3BlbihlLGkpO3QuZnMud3JpdGUoYSxyLHMsci5sZW5ndGgsbyksdC5mcy5jbG9zZShhKX0sYXN5bmMgcmVpbml0KGUpe2NvbnN0IHI9dC50b29scy5maW5kKHM9PnMudG9vbD09ZSksaT10LmJhc2UubW9kdWxlLkZTLmN3ZCgpO09iamVjdC5hc3NpZ24ocixyLmNvbmZpZyksci5yZWFkeT0hMSxhd2FpdCB0aGlzLmluaXQoKSxyLmlzQmFzZU1vZHVsZSYmdGhpcy5tb3VudCgpLHRoaXMuY2QoaSl9LF9zdGRpblR4dDoiIixfc3RkaW5QdHI6MCxnZXQgc3RkaW4oKXtyZXR1cm4gdC5fc3RkaW5UeHR9LHNldCBzdGRpbihlPSIiKXt0Ll9sb2coYFNldHRpbmcgc3RkaW4gdG8gJWMke2V9JWNgLCJjb2xvcjpkYXJrYmx1ZSIsIiIpLHQuX3N0ZGluVHh0PWUsdC5fc3RkaW5QdHI9MH0sYXN5bmMgX3NldHVwKGUpe2lmKGUucmVhZHkpcmV0dXJuO2lmKHQuX2xvZyhgU2V0dGluZyB1cCAke2UudG9vbH0gKGJhc2UgPSAke2UuaXNCYXNlTW9kdWxlPT09ITB9KS4uLmApLGUuY29uZmlnPU9iamVjdC5hc3NpZ24oe30sZSksZS51cmxQcmVmaXh8fChlLnVybFByZWZpeD1gJHt0LmNvbmZpZy51cmxDRE59LyR7ZS50b29sfS8ke2UudmVyc2lvbn1gKSxlLnByb2dyYW18fChlLnByb2dyYW09ZS50b29sKSxlLmZlYXR1cmVzfHwoZS5mZWF0dXJlcz17fSwoaltlLnByb2dyYW1dfHxbXSkuaW5jbHVkZXMoInNpbWQiKSYmKGF3YWl0IFcoKT8oZS5wcm9ncmFtKz0iLXNpbWQiLGUuZmVhdHVyZXMuc2ltZD0hMCk6dC5fbG9nKGBXZWJBc3NlbWJseSBTSU1EIGlzIG5vdCBzdXBwb3J0ZWQgaW4gdGhpcyBicm93c2VyOyB3aWxsIGxvYWQgbm9uLVNJTUQgdmVyc2lvbiBvZiAke2UucHJvZ3JhbX0uYCkpKSxlLmlzQmFzZU1vZHVsZSYmKGUubG9hZGluZz1rKSxlLmxvYWRpbmc9PT14KXt0Ll9sb2coYFdpbGwgbGF6eS1sb2FkICR7ZS50b29sfTsgc2tpcHBpbmcgaW5pdGlhbGl6YXRpb24uYCk7cmV0dXJufXNlbGYuaW1wb3J0U2NyaXB0cyhgJHtlLnVybFByZWZpeH0vJHtlLnByb2dyYW19LmpzYCksZS5tb2R1bGU9YXdhaXQgTW9kdWxlKHt0aGlzUHJvZ3JhbTplLnByb2dyYW0sbG9jYXRlRmlsZTooaSxzKT0+YCR7ZS51cmxQcmVmaXh9LyR7aX1gLHN0ZGluOigpPT50Ll9zdGRpblB0cjx0LnN0ZGluLmxlbmd0aD90LnN0ZGluLmNoYXJDb2RlQXQodC5fc3RkaW5QdHIrKyk6KHQuc3RkaW49IiIsbnVsbCkscHJpbnQ6aT0+e3QuY29uZmlnLnByaW50U3RyZWFtP3Bvc3RNZXNzYWdlKHt0eXBlOiJiaW93YXNtIix2YWx1ZTp7c3Rkb3V0Oml9fSk6ZS5zdGRvdXQrPWkrYApgfSxwcmludEVycjppPT57Y29uc3Qgcz10LmNvbmZpZy5wcmludEludGVybGVhdmVkPyJzdGRvdXQiOiJzdGRlcnIiO3QuY29uZmlnLnByaW50U3RyZWFtP3Bvc3RNZXNzYWdlKHt0eXBlOiJiaW93YXNtIix2YWx1ZTp7W3NdOml9fSk6ZVtzXSs9aStgCmB9fSk7Y29uc3Qgcj1lLm1vZHVsZS5GUztlLmlzQmFzZU1vZHVsZT8odC5fbG9nKGBTZXR0aW5nIHVwICR7ZS50b29sfSB3aXRoIGJhc2UgbW9kdWxlIGZpbGVzeXN0ZW0uLi5gKSxyLm1rZGlyKHQuY29uZmlnLmRpclNoYXJlZCw1MTEpLHIubWtkaXIoYCR7dC5jb25maWcuZGlyU2hhcmVkfS8ke3QuY29uZmlnLmRpckRhdGF9YCw1MTEpLHIubWtkaXIoYCR7dC5jb25maWcuZGlyU2hhcmVkfS8ke3QuY29uZmlnLmRpck1vdW50ZWR9YCw1MTEpLHIuY2hkaXIoYCR7dC5jb25maWcuZGlyU2hhcmVkfS8ke3QuY29uZmlnLmRpckRhdGF9YCksdC5mcz1yKToodC5fbG9nKGBTZXR0aW5nIHVwICR7ZS50b29sfSB3aXRoIGZpbGVzeXN0ZW0uLi5gKSxyLm1rZGlyKHQuY29uZmlnLmRpclNoYXJlZCksci5tb3VudChlLm1vZHVsZS5QUk9YWUZTLHtyb290OnQuY29uZmlnLmRpclNoYXJlZCxmczp0LmZzfSx0LmNvbmZpZy5kaXJTaGFyZWQpLHIuY2hkaXIodC5mcy5jd2QoKSkpLGUuc3Rkb3V0PSIiLGUuc3RkZXJyPSIiLGUucmVhZHk9ITB9LGFzeW5jIF9zZXR1cEZTKCl7Y29uc3QgZT10LmZzO2ZvcihsZXQgciBvZiB0LnRvb2xzKXtpZighci5yZWFkeSljb250aW51ZTtjb25zdCBpPXIubW9kdWxlLkZTLHM9YC8ke3IudG9vbH1gLG89YCR7dC5jb25maWcuZGlyU2hhcmVkfSR7c31gOyFpLmFuYWx5emVQYXRoKHMpLmV4aXN0c3x8ZS5hbmFseXplUGF0aChvKS5leGlzdHN8fCh0Ll9sb2coYE1vdW50aW5nICR7c30gb250byAke3QuYmFzZS50b29sfSBmaWxlc3lzdGVtIGF0ICR7b31gKSxlLm1rZGlyKG8pLGUubW91bnQodC5iYXNlLm1vZHVsZS5QUk9YWUZTLHtyb290OnMsZnM6aX0sbykpfX0sX2ZpbGVvcChlLHIpe3QuX2xvZyhgUnVubmluZyAke2V9ICR7cn1gKTtjb25zdCBpPXQuZnMuYW5hbHl6ZVBhdGgocik7aWYoIWkuZXhpc3RzKXJldHVybiB0Ll9sb2coYEZpbGUgJHtyfSBub3QgZm91bmQuYCksITE7c3dpdGNoKGUpe2Nhc2UiY2F0IjpyZXR1cm4gdC5mcy5yZWFkRmlsZShyLHtlbmNvZGluZzoidXRmOCJ9KTtjYXNlImxzIjpyZXR1cm4gdC5mcy5pc0ZpbGUoaS5vYmplY3QubW9kZSk/dC5mcy5zdGF0KHIpOnQuZnMucmVhZGRpcihyKTtjYXNlImRvd25sb2FkIjpjb25zdCBzPW5ldyBCbG9iKFt0aGlzLmNhdChyKV0pO3JldHVybiBVUkwuY3JlYXRlT2JqZWN0VVJMKHMpfXJldHVybiExfSxfbG9nKGUpe2lmKCF0LmNvbmZpZy5kZWJ1ZylyZXR1cm47bGV0IHI9Wy4uLmFyZ3VtZW50c107ci5zaGlmdCgpLGNvbnNvbGUubG9nKGAlY1tXZWJXb3JrZXJdJWMgJHtlfWAsImZvbnQtd2VpZ2h0OmJvbGQiLCIiLC4uLnIpfX07dyh0KX0pKCk7Cg==",l0=typeof window<"u"&&window.Blob&&new Blob([atob(i0)],{type:"text/javascript;charset=utf-8"});function hF(){const n=l0&&(window.URL||window.webkitURL).createObjectURL(l0);try{return n?new Worker(n):new Worker("data:application/javascript;base64,"+i0)}finally{n&&(window.URL||window.webkitURL).revokeObjectURL(n)}}const gF="https://biowasm.com/cdn/v3",yF="https://stg.biowasm.com/cdn/v3",bF={urlCDN:gF,urlCDNStg:yF,dirShared:"/shared",dirMounted:"/mnt",dirData:"/data",printInterleaved:!0,printStream:!1,callback:null,debug:!1,env:"prd"};class _F{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({},bF,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 hF;this.callback&&(e.onmessage=o=>{o.data.type==="biowasm"&&this.callback(o.data.value)});const r=r0(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 wF(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 kF(r);if(o)return;e.value=a}catch(a){console.error(a),e.value.clear()}finally{e.loading=!1}}),e}const s0=new Map;async function kF(n){const e=await CF(n);let r=s0.get(e);if(r)return r;const o=await new _F(["kalign/3.3.1"]),a=new File(n.map(c=>`>${c.header}
|
|
86
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=xF(l),
|
|
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 vF(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 CF="12px",SF=mr(t.defineComponent({__name:"MultiSequenceAlignmentView",props:{sequenceRows:{},highlight:{}},setup(n){t.useCssVars(c=>({"91e4d8a4":o.value,ffe371c0:a.value,"1b845511":CF}));const e=wF(()=>n.sequenceRows),r=t.reactive(oF(()=>{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(aF)({columns:l.value.data,rowCount:c.sequenceRows.length,colors:t.unref(Ky)})})},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"}}]]),EF=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(OM(()=>({pframe:r.pFrame,sequenceColumnPredicate:r.sequenceColumnPredicate}))),d=t.reactive($M(()=>({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(ZM(()=>({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(nF),_=>(t.openBlock(),t.createElementBlock("div",{key:_},[t.createElementVNode("span",{class:t.normalizeClass(g.$style["color-sample"]),style:t.normalizeStyle({backgroundColor:t.unref(Ky)[_]})},null,6),t.createTextVNode(" "+t.toDisplayString(t.unref(rF)[_]),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(SF,{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 NF(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 VF(n){const e=Symbol();return()=>(Ws.has(e)||Ws.set(e,NF(e,n)),Ws.get(e))}function BF(n){return t.computed(()=>{try{return Jf(n())}catch(e){return{errors:[Qa(e)],value:void 0}}})}const fa=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,s0=new Set,Qu=typeof process=="object"&&process?process:{},c0=(n,e,r,o)=>{typeof Qu.emitWarning=="function"?Qu.emitWarning(n,e,r,o):console.error(`[${r}] ${e}: ${n}`)};let Gs=globalThis.AbortController,d0=globalThis.AbortSignal;if(typeof Gs>"u"){d0=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 d0);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=((p0=Qu.env)==null?void 0:p0.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{n&&(n=!1,c0("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 TF=n=>!s0.has(n),Hr=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),u0=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=u0(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 ep=vo;const rp=class rp{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,f0,"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?u0(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,ep.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,X_).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,Nf).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";TF(S)&&(s0.add(S),c0("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",S,rp))}}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])}[(m0=Symbol.iterator,f0=Symbol.toStringTag,m0)](){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,Nf).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,Tf).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,Nf=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,X_=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,Vf).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,Vf).call(this,r)||((e||!R(this,on).call(this,r))&&(yield r),r===R(this,wt)));)r=R(this,Mt)[r]},Vf=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},Bf=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,Bf).call(this,R(this,nn)[e],R(this,Mt)[e]),de(this,re,Bf).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,Tf).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},Tf=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 tp=rp;const RF={cacheSize:15e6};class IF{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={...RF,...e??{}};this.fileDataCache=new tp({maxSize:r.cacheSize,fetchMethod:async o=>new IF(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 np=No;z.AgGridTheme=xl,z.BlockLayout=y5,z.Color=Ut,z.ContextProvider=IA,z.DataTable=mx,z.DemoData=M$,z.DropdownListItem=po,z.DropdownOverlay=$l,z.Gradient=RA,z.LongText=Ll,z.MultiError=kl,z.PlAccordion=jN,z.PlAccordionSection=oV,z.PlAgCellFile=qg,z.PlAgCellProgress=ry,z.PlAgCellStatusTag=ty,z.PlAgChartHistogramCell=ey,z.PlAgChartStackedBarCell=Qg,z.PlAgColumnHeader=Cs,z.PlAgCsvExporter=Bu,z.PlAgDataTable=Yg,z.PlAgDataTableRowNumberColId=en,z.PlAgDataTableToolsPanel=F5,z.PlAgDataTableV2=Jg,z.PlAgGridColumnManager=Su,z.PlAgOverlayLoading=ks,z.PlAgOverlayNoRows=xs,z.PlAgTextAndButtonCell=Ss,z.PlAlert=bd,z.PlAutocomplete=vV,z.PlBlockPage=Lx,z.PlBtnAccent=hv,z.PlBtnDanger=yv,z.PlBtnGhost=cr,z.PlBtnGroup=Nm,z.PlBtnLink=Sv,z.PlBtnPrimary=Rl,z.PlBtnSecondary=Il,z.PlBtnSplit=dv,z.PlChartHistogram=Ng,z.PlChartStackedBar=ZB,z.PlChartStackedBarCompact=hh,z.PlCheckbox=Vd,z.PlCheckboxGroup=YS,z.PlChip=Ed,z.PlCloseModalBtn=Mm,z.PlContainer=$x,z.PlDataTable=Yg,z.PlDataTableV2=Jg,z.PlDialogModal=Bd,z.PlDropdown=$r,z.PlDropdownLegacy=_S,z.PlDropdownLine=Sd,z.PlDropdownMulti=Zl,z.PlDropdownMultiRef=GS,z.PlDropdownRef=jC,z.PlEditableTitle=Yv,z.PlFileDialog=ph,z.PlFileInput=fh,z.PlGrid=Dx,z.PlIcon16=Or,z.PlIcon24=Yo,z.PlLoaderCircular=ym,z.PlLogView=ah,z.PlMaskIcon16=qt,z.PlMaskIcon24=at,z.PlMultiSequenceAlignment=EF,z.PlNotificationAlert=mh,z.PlNumberField=BS,z.PlProgressBar=CS,z.PlProgressCell=sh,z.PlRadio=Tg,z.PlRadioGroup=kA,z.PlRow=Mx,z.PlSearchField=Am,z.PlSectionSeparator=ih,z.PlSlideModal=Ko,z.PlSpacer=bm,z.PlSplash=Bl,z.PlStatusTag=lh,z.PlTableFilters=LM,z.PlTabs=DN,z.PlTextArea=RC,z.PlTextField=fo,z.PlToggleSwitch=Ml,z.PlTooltip=ct,z.ReactiveFileContent=np,z.Scrollable=CL,z.Slider=Zg,z.SliderRange=wL,z.SliderRangeTriple=sL,z.ThemeSwitcher=wx,z.UnresolvedError=Qc,z.ValueOrErrorsComponent=tZ,z.activateAgGrid=em,z.animate=Cm,z.animateInfinite=rv,z.autoSizeRowNumberColumn=$i,z.call=_m,z.categoricalColors=Lg,z.computedResult=BF,z.createAgGridColDef=ay,z.createModel=od,z.defaultMainMenuItems=vu,z.defineApp=Dw,z.defineStore=VF,z.delay=wm,z.detectOutside=IC,z.ensureError=td,z.eventListener=Cd,z.focusRow=Vu,z.formatZodError=rd,z.getElementScrollPosition=Zm,z.identity=ed,z.interpolateColor=Og,z.isDefined=vw,z.isElementVisible=$m,z.isZodError=nd,z.listToOptions=ov,z.magma=Ig,z.makeEaseInOut=nv,z.makeEaseOut=vm,z.makeOnceTracker=Eu,z.makeRowNumberColDef=vs,z.maskIcons16=$$,z.maskIcons24=Z$,z.normalizeGradient=$g,z.normalizeListOptions=sr,z.objectHash=xu,z.palettes=Ag,z.randomInt=xm,z.randomString=tv,z.requestTick=_d,z.scrollIntoView=Ol,z.showContextMenu=pd,z.throttle=Sm,z.timeout=km,z.trackFirstDataRendered=Nu,z.unwrapOptionalResult=xw,z.unwrapValueOrErrors=Kf,z.useAgGridOptions=lZ,z.useClickOutside=Al,z.useComponentProp=JA,z.useDraggable=KA,z.useEventListener=ot,z.useFormState=jA,z.useHover=pm,z.useInterval=XA,z.useLabelNotch=Kn,z.useLocalStorage=mm,z.useMouse=um,z.useMouseCapture=Lr,z.usePosition=oi,z.useQuery=YA,z.useResizeObserver=Mg,z.useScroll=WA,z.useSdkPlugin=vl,z.useSortable=UA,z.useSortable2=zg,z.useTheme=gm,z.useWatchFetch=$d,z.viridis=Rg,z.wrapOptionalResult=Jf,z.wrapValueOrErrors=kw,Object.defineProperty(z,Symbol.toStringTag,{value:"Module"})});
|
|
87
|
+
`),"input");await o.mount(a),await o.exec("kalign -f fasta -i input -o output");const l=await o.cat("output");return r=xF(l),s0.set(e,r),r}function xF(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 CF(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",SF=mr(t.defineComponent({__name:"MultiSequenceAlignmentView",props:{sequenceRows:{},highlight:{}},setup(n){t.useCssVars(c=>({"91e4d8a4":o.value,ffe371c0:a.value,"1b845511":vF}));const e=wF(()=>n.sequenceRows),r=t.reactive(oF(()=>{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(aF)({columns:l.value.data,rowCount:c.sequenceRows.length,colors:t.unref(Jy)})})},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"}}]]),EF=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(OM(()=>({pframe:r.pFrame,sequenceColumnPredicate:r.sequenceColumnPredicate}))),d=t.reactive($M(()=>({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(ZM(()=>({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(nF),_=>(t.openBlock(),t.createElementBlock("div",{key:_},[t.createElementVNode("span",{class:t.normalizeClass(g.$style["color-sample"]),style:t.normalizeStyle({backgroundColor:t.unref(Jy)[_]})},null,6),t.createTextVNode(" "+t.toDisplayString(t.unref(rF)[_]),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(SF,{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 NF(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 VF(n){const e=Symbol();return()=>(Ws.has(e)||Ws.set(e,NF(e,n)),Ws.get(e))}function BF(n){return t.computed(()=>{try{return Jf(n())}catch(e){return{errors:[Qa(e)],value:void 0}}})}const fa=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,c0=new Set,Qu=typeof process=="object"&&process?process:{},d0=(n,e,r,o)=>{typeof Qu.emitWarning=="function"?Qu.emitWarning(n,e,r,o):console.error(`[${r}] ${e}: ${n}`)};let Gs=globalThis.AbortController,u0=globalThis.AbortSignal;if(typeof Gs>"u"){u0=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 u0);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=((f0=Qu.env)==null?void 0:f0.LRU_CACHE_IGNORE_AC_WARNING)!=="1";const e=()=>{n&&(n=!1,d0("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 TF=n=>!c0.has(n),Hr=n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),p0=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 Co=class Co{constructor(e,r){Ue(this,"heap");Ue(this,"length");if(!T(Co,ma))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(e),this.length=0}static create(e){const r=p0(e);if(!r)return[];ge(Co,ma,!0);const o=new Co(e,r);return ge(Co,ma,!1),o}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}};ma=new WeakMap,Fe(Co,ma,!1);let ep=Co;const rp=class rp{constructor(e){Fe(this,re);Fe(this,Rn);Fe(this,tn);Fe(this,In);Fe(this,vo);Fe(this,An);Fe(this,ha);Fe(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");Fe(this,yt);Fe(this,Ln);Fe(this,gt);Fe(this,Qe);Fe(this,Ee);Fe(this,Mt);Fe(this,nn);Fe(this,Tt);Fe(this,wt);Fe(this,On);Fe(this,kt);Fe(this,$n);Fe(this,Zn);Fe(this,rn);Fe(this,Mn);Fe(this,Xr);Fe(this,Ft);Fe(this,ya);Fe(this,So,()=>{});Fe(this,hr,()=>{});Fe(this,Pi,()=>{});Fe(this,on,()=>!1);Fe(this,Eo,e=>{});Fe(this,ba,(e,r,o)=>{});Fe(this,zi,(e,r,o,a)=>{if(o||a)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0});Ue(this,m0,"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:B,fetchMethod:$,memoMethod:W,noDeleteOnFetchRejection:E,noDeleteOnStaleGet:D,allowStaleOnFetchRejection:I,allowStaleOnFetchAbort:V,ignoreFetchAbort:P}=e;if(r!==0&&!Hr(r))throw new TypeError("max option must be a nonnegative integer");const X=r?p0(r):Array;if(!X)throw new Error("invalid max value: "+r);if(ge(this,Rn,r),ge(this,tn,C),this.maxEntrySize=N||T(this,tn),this.sizeCalculation=B,this.sizeCalculation){if(!T(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 X(r)),ge(this,nn,new X(r)),ge(this,Tt,0),ge(this,wt,0),ge(this,On,ep.create(r)),ge(this,yt,0),ge(this,Ln,0),typeof f=="function"&&ge(this,In,f),typeof m=="function"&&ge(this,vo,m),typeof g=="function"?(ge(this,An,g),ge(this,kt,[])):(ge(this,An,void 0),ge(this,kt,void 0)),ge(this,Mn,!!T(this,In)),ge(this,ya,!!T(this,vo)),ge(this,Ft,!!T(this,An)),this.noDisposeOnSet=!!y,this.noUpdateTTL=!!_,this.noDeleteOnFetchRejection=!!E,this.allowStaleOnFetchRejection=!!I,this.allowStaleOnFetchAbort=!!V,this.ignoreFetchAbort=!!P,this.maxEntrySize!==0){if(T(this,tn)!==0&&!Hr(T(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");ue(this,re,j_).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");ue(this,re,Nf).call(this)}if(T(this,Rn)===0&&this.ttl===0&&T(this,tn)===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!T(this,Rn)&&!T(this,tn)){const S="LRU_CACHE_UNBOUNDED";TF(S)&&(c0.add(S),d0("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",S,rp))}}static unsafeExposeInternals(e){return{starts:T(e,Zn),ttls:T(e,rn),sizes:T(e,$n),keyMap:T(e,gt),keyList:T(e,Qe),valList:T(e,Ee),next:T(e,Mt),prev:T(e,nn),get head(){return T(e,Tt)},get tail(){return T(e,wt)},free:T(e,On),isBackgroundFetch:r=>{var o;return ue(o=e,re,tt).call(o,r)},backgroundFetch:(r,o,a,l)=>{var c;return ue(c=e,re,Fc).call(c,r,o,a,l)},moveToTail:r=>{var o;return ue(o=e,re,dl).call(o,r)},indexes:r=>{var o;return ue(o=e,re,ro).call(o,r)},rindexes:r=>{var o;return ue(o=e,re,oo).call(o,r)},isStale:r=>{var o;return T(o=e,on).call(o,r)}}}get max(){return T(this,Rn)}get maxSize(){return T(this,tn)}get calculatedSize(){return T(this,Ln)}get size(){return T(this,yt)}get fetchMethod(){return T(this,ha)}get memoMethod(){return T(this,ga)}get dispose(){return T(this,In)}get onInsert(){return T(this,vo)}get disposeAfter(){return T(this,An)}getRemainingTTL(e){return T(this,gt).has(e)?1/0:0}*entries(){for(const e of ue(this,re,ro).call(this))T(this,Ee)[e]!==void 0&&T(this,Qe)[e]!==void 0&&!ue(this,re,tt).call(this,T(this,Ee)[e])&&(yield[T(this,Qe)[e],T(this,Ee)[e]])}*rentries(){for(const e of ue(this,re,oo).call(this))T(this,Ee)[e]!==void 0&&T(this,Qe)[e]!==void 0&&!ue(this,re,tt).call(this,T(this,Ee)[e])&&(yield[T(this,Qe)[e],T(this,Ee)[e]])}*keys(){for(const e of ue(this,re,ro).call(this)){const r=T(this,Qe)[e];r!==void 0&&!ue(this,re,tt).call(this,T(this,Ee)[e])&&(yield r)}}*rkeys(){for(const e of ue(this,re,oo).call(this)){const r=T(this,Qe)[e];r!==void 0&&!ue(this,re,tt).call(this,T(this,Ee)[e])&&(yield r)}}*values(){for(const e of ue(this,re,ro).call(this))T(this,Ee)[e]!==void 0&&!ue(this,re,tt).call(this,T(this,Ee)[e])&&(yield T(this,Ee)[e])}*rvalues(){for(const e of ue(this,re,oo).call(this))T(this,Ee)[e]!==void 0&&!ue(this,re,tt).call(this,T(this,Ee)[e])&&(yield T(this,Ee)[e])}[(h0=Symbol.iterator,m0=Symbol.toStringTag,h0)](){return this.entries()}find(e,r={}){for(const o of ue(this,re,ro).call(this)){const a=T(this,Ee)[o],l=ue(this,re,tt).call(this,a)?a.__staleWhileFetching:a;if(l!==void 0&&e(l,T(this,Qe)[o],this))return this.get(T(this,Qe)[o],r)}}forEach(e,r=this){for(const o of ue(this,re,ro).call(this)){const a=T(this,Ee)[o],l=ue(this,re,tt).call(this,a)?a.__staleWhileFetching:a;l!==void 0&&e.call(r,l,T(this,Qe)[o],this)}}rforEach(e,r=this){for(const o of ue(this,re,oo).call(this)){const a=T(this,Ee)[o],l=ue(this,re,tt).call(this,a)?a.__staleWhileFetching:a;l!==void 0&&e.call(r,l,T(this,Qe)[o],this)}}purgeStale(){let e=!1;for(const r of ue(this,re,oo).call(this,{allowStale:!0}))T(this,on).call(this,r)&&(ue(this,re,ao).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,Ee)[r],a=ue(this,re,tt).call(this,o)?o.__staleWhileFetching:o;if(a===void 0)return;const l={value:a};if(T(this,rn)&&T(this,Zn)){const c=T(this,rn)[r],d=T(this,Zn)[r];if(c&&d){const u=c-(fa.now()-d);l.ttl=u,l.start=Date.now()}}return T(this,$n)&&(l.size=T(this,$n)[r]),l}dump(){const e=[];for(const r of ue(this,re,ro).call(this,{allowStale:!0})){const o=T(this,Qe)[r],a=T(this,Ee)[r],l=ue(this,re,tt).call(this,a)?a.__staleWhileFetching:a;if(l===void 0||o===void 0)continue;const c={value:l};if(T(this,rn)&&T(this,Zn)){c.ttl=T(this,rn)[r];const d=fa.now()-T(this,Zn)[r];c.start=Math.floor(Date.now()-d)}T(this,$n)&&(c.size=T(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,B,$,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=T(this,zi).call(this,e,r,o.size||0,d);if(this.maxEntrySize&&m>this.maxEntrySize)return u&&(u.set="miss",u.maxEntrySizeExceeded=!0),ue(this,re,ao).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,wt):T(this,On).length!==0?T(this,On).pop():T(this,yt)===T(this,Rn)?ue(this,re,Mc).call(this,!1):T(this,yt),T(this,Qe)[g]=e,T(this,Ee)[g]=r,T(this,gt).set(e,g),T(this,Mt)[T(this,wt)]=g,T(this,nn)[g]=T(this,wt),ge(this,wt,g),Zc(this,yt)._++,T(this,ba).call(this,g,m,u),u&&(u.set="add"),f=!1,T(this,ya)&&((y=T(this,vo))==null||y.call(this,r,e,"add"));else{ue(this,re,dl).call(this,g);const E=T(this,Ee)[g];if(r!==E){if(T(this,Xr)&&ue(this,re,tt).call(this,E)){E.__abortController.abort(new Error("replaced"));const{__staleWhileFetching:D}=E;D!==void 0&&!c&&(T(this,Mn)&&((_=T(this,In))==null||_.call(this,D,e,"set")),T(this,Ft)&&((C=T(this,kt))==null||C.push([D,e,"set"])))}else c||(T(this,Mn)&&((N=T(this,In))==null||N.call(this,E,e,"set")),T(this,Ft)&&((B=T(this,kt))==null||B.push([E,e,"set"])));if(T(this,Eo).call(this,g),T(this,ba).call(this,g,m,u),T(this,Ee)[g]=r,u){u.set="replace";const D=E&&ue(this,re,tt).call(this,E)?E.__staleWhileFetching:E;D!==void 0&&(u.oldValue=D)}}else u&&(u.set="update");T(this,ya)&&(($=this.onInsert)==null||$.call(this,r,e,r===E?"update":"replace"))}if(a!==0&&!T(this,rn)&&ue(this,re,Nf).call(this),T(this,rn)&&(f||T(this,Pi).call(this,g,a,l),u&&T(this,hr).call(this,u,g)),!c&&T(this,Ft)&&T(this,kt)){const E=T(this,kt);let D;for(;D=E==null?void 0:E.shift();)(W=T(this,An))==null||W.call(this,...D)}return this}pop(){var e;try{for(;T(this,yt);){const r=T(this,Ee)[T(this,Tt)];if(ue(this,re,Mc).call(this,!0),ue(this,re,tt).call(this,r)){if(r.__staleWhileFetching)return r.__staleWhileFetching}else if(r!==void 0)return r}}finally{if(T(this,Ft)&&T(this,kt)){const r=T(this,kt);let o;for(;o=r==null?void 0:r.shift();)(e=T(this,An))==null||e.call(this,...o)}}}has(e,r={}){const{updateAgeOnHas:o=this.updateAgeOnHas,status:a}=r,l=T(this,gt).get(e);if(l!==void 0){const c=T(this,Ee)[l];if(ue(this,re,tt).call(this,c)&&c.__staleWhileFetching===void 0)return!1;if(T(this,on).call(this,l))a&&(a.has="stale",T(this,hr).call(this,a,l));else return o&&T(this,So).call(this,l),a&&(a.has="hit",T(this,hr).call(this,a,l)),!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,on).call(this,a))return;const l=T(this,Ee)[a];return ue(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:B=!1,status:$,signal:W}=r;if(!T(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=T(this,gt).get(e);if(D===void 0){$&&($.fetch="miss");const I=ue(this,re,Fc).call(this,e,D,E,N);return I.__returned=I}else{const I=T(this,Ee)[D];if(ue(this,re,tt).call(this,I)){const R=o&&I.__staleWhileFetching!==void 0;return $&&($.fetch="inflight",R&&($.returnedStale=!0)),R?I.__staleWhileFetching:I.__returned=I}const V=T(this,on).call(this,D);if(!B&&!V)return $&&($.fetch="hit"),ue(this,re,dl).call(this,D),a&&T(this,So).call(this,D),$&&T(this,hr).call(this,$,D),I;const P=ue(this,re,Fc).call(this,e,D,E,N),S=P.__staleWhileFetching!==void 0&&o;return $&&($.fetch=V?"stale":"refresh",S&&V&&($.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=T(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=T(this,gt).get(e);if(d!==void 0){const u=T(this,Ee)[d],f=ue(this,re,tt).call(this,u);return c&&T(this,hr).call(this,c,d),T(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||ue(this,re,ao).call(this,e,"expire"),c&&o&&(c.returnedStale=!0),o?u:void 0)):(c&&(c.get="hit"),f?u.__staleWhileFetching:(ue(this,re,dl).call(this,d),a&&T(this,So).call(this,d),u))}else c&&(c.get="miss")}delete(e){return ue(this,re,ao).call(this,e,"delete")}clear(){return ue(this,re,Tf).call(this,"delete")}};Rn=new WeakMap,tn=new WeakMap,In=new WeakMap,vo=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,Nf=function(){const e=new Us(T(this,Rn)),r=new Us(T(this,Rn));ge(this,rn,e),ge(this,Zn,r),ge(this,Pi,(l,c,d=fa.now())=>{if(r[l]=c!==0?d:0,e[l]=c,c!==0&&this.ttlAutopurge){const u=setTimeout(()=>{T(this,on).call(this,l)&&ue(this,re,ao).call(this,T(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=T(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,Pi=new WeakMap,on=new WeakMap,j_=function(){const e=new Us(T(this,Rn));ge(this,Ln,0),ge(this,$n,e),ge(this,Eo,r=>{ge(this,Ln,T(this,Ln)-e[r]),e[r]=0}),ge(this,zi,(r,o,a,l)=>{if(ue(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,T(this,tn)){const l=T(this,tn)-e[r];for(;T(this,Ln)>l;)ue(this,re,Mc).call(this,!0)}ge(this,Ln,T(this,Ln)+e[r]),a&&(a.entrySize=o,a.totalCalculatedSize=T(this,Ln))})},Eo=new WeakMap,ba=new WeakMap,zi=new WeakMap,ro=function*({allowStale:e=this.allowStale}={}){if(T(this,yt))for(let r=T(this,wt);!(!ue(this,re,Vf).call(this,r)||((e||!T(this,on).call(this,r))&&(yield r),r===T(this,Tt)));)r=T(this,nn)[r]},oo=function*({allowStale:e=this.allowStale}={}){if(T(this,yt))for(let r=T(this,Tt);!(!ue(this,re,Vf).call(this,r)||((e||!T(this,on).call(this,r))&&(yield r),r===T(this,wt)));)r=T(this,Mt)[r]},Vf=function(e){return e!==void 0&&T(this,gt).get(T(this,Qe)[e])===e},Mc=function(e){var l,c;const r=T(this,Tt),o=T(this,Qe)[r],a=T(this,Ee)[r];return T(this,Xr)&&ue(this,re,tt).call(this,a)?a.__abortController.abort(new Error("evicted")):(T(this,Mn)||T(this,Ft))&&(T(this,Mn)&&((l=T(this,In))==null||l.call(this,a,o,"evict")),T(this,Ft)&&((c=T(this,kt))==null||c.push([a,o,"evict"]))),T(this,Eo).call(this,r),e&&(T(this,Qe)[r]=void 0,T(this,Ee)[r]=void 0,T(this,On).push(r)),T(this,yt)===1?(ge(this,Tt,ge(this,wt,0)),T(this,On).length=0):ge(this,Tt,T(this,Mt)[r]),T(this,gt).delete(o),Zc(this,yt)._--,r},Fc=function(e,r,o,a){const l=r===void 0?void 0:T(this,Ee)[r];if(ue(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,B=!1)=>{const{aborted:$}=c.signal,W=o.ignoreFetchAbort&&N!==void 0;if(o.status&&($&&!B?(o.status.fetchAborted=!0,o.status.fetchError=c.signal.reason,W&&(o.status.fetchAbortIgnored=!0)):o.status.fetchResolved=!0),$&&!W&&!B)return g(c.signal.reason);const E=_;return T(this,Ee)[r]===_&&(N===void 0?E.__staleWhileFetching?T(this,Ee)[r]=E.__staleWhileFetching:ue(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:B}=c.signal,$=B&&o.allowStaleOnFetchAbort,W=$||o.allowStaleOnFetchRejection,E=W||o.noDeleteOnFetchRejection,D=_;if(T(this,Ee)[r]===_&&(!E||D.__staleWhileFetching===void 0?ue(this,re,ao).call(this,e,"fetch"):$||(T(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,B)=>{var W;const $=(W=T(this,ha))==null?void 0:W.call(this,e,l,u);$&&$ instanceof Promise&&$.then(E=>N(E===void 0?void 0:E),B),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=T(this,gt).get(e)):T(this,Ee)[r]=C,C},tt=function(e){if(!T(this,Xr))return!1;const r=e;return!!r&&r instanceof Promise&&r.hasOwnProperty("__staleWhileFetching")&&r.__abortController instanceof Gs},Bf=function(e,r){T(this,nn)[r]=e,T(this,Mt)[e]=r},dl=function(e){e!==T(this,wt)&&(e===T(this,Tt)?ge(this,Tt,T(this,Mt)[e]):ue(this,re,Bf).call(this,T(this,nn)[e],T(this,Mt)[e]),ue(this,re,Bf).call(this,T(this,wt),e),ge(this,wt,e))},ao=function(e,r){var a,l,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)ue(this,re,Tf).call(this,r);else{T(this,Eo).call(this,u);const f=T(this,Ee)[u];if(ue(this,re,tt).call(this,f)?f.__abortController.abort(new Error("deleted")):(T(this,Mn)||T(this,Ft))&&(T(this,Mn)&&((a=T(this,In))==null||a.call(this,f,e,r)),T(this,Ft)&&((l=T(this,kt))==null||l.push([f,e,r]))),T(this,gt).delete(e),T(this,Qe)[u]=void 0,T(this,Ee)[u]=void 0,u===T(this,wt))ge(this,wt,T(this,nn)[u]);else if(u===T(this,Tt))ge(this,Tt,T(this,Mt)[u]);else{const m=T(this,nn)[u];T(this,Mt)[m]=T(this,Mt)[u];const g=T(this,Mt)[u];T(this,nn)[g]=T(this,nn)[u]}Zc(this,yt)._--,T(this,On).push(u)}}if(T(this,Ft)&&((c=T(this,kt))!=null&&c.length)){const u=T(this,kt);let f;for(;f=u==null?void 0:u.shift();)(d=T(this,An))==null||d.call(this,...f)}return o},Tf=function(e){var r,o,a;for(const l of ue(this,re,oo).call(this,{allowStale:!0})){const c=T(this,Ee)[l];if(ue(this,re,tt).call(this,c))c.__abortController.abort(new Error("deleted"));else{const d=T(this,Qe)[l];T(this,Mn)&&((r=T(this,In))==null||r.call(this,c,d,e)),T(this,Ft)&&((o=T(this,kt))==null||o.push([c,d,e]))}}if(T(this,gt).clear(),T(this,Ee).fill(void 0),T(this,Qe).fill(void 0),T(this,rn)&&T(this,Zn)&&(T(this,rn).fill(0),T(this,Zn).fill(0)),T(this,$n)&&T(this,$n).fill(0),ge(this,Tt,0),ge(this,wt,0),T(this,On).length=0,ge(this,Ln,0),ge(this,yt,0),T(this,Ft)&&T(this,kt)){const l=T(this,kt);let c;for(;c=l==null?void 0:l.shift();)(a=T(this,An))==null||a.call(this,...c)}};let tp=rp;const RF={cacheSize:15e6};class IF{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={...RF,...e??{}};this.fileDataCache=new tp({maxSize:r.cacheSize,fetchMethod:async o=>new IF(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 np=No;z.AgGridTheme=Cl,z.BlockLayout=b5,z.Color=Ut,z.ContextProvider=AA,z.DataTable=hx,z.DemoData=F$,z.DropdownListItem=po,z.DropdownOverlay=$l,z.Gradient=IA,z.LongText=Ll,z.MultiError=xl,z.PlAccordion=YN,z.PlAccordionSection=aV,z.PlAgCellFile=qg,z.PlAgCellProgress=ry,z.PlAgCellStatusTag=ty,z.PlAgChartHistogramCell=ey,z.PlAgChartStackedBarCell=Qg,z.PlAgColumnHeader=vs,z.PlAgCsvExporter=Bu,z.PlAgDataTable=Yg,z.PlAgDataTableRowNumberColId=en,z.PlAgDataTableToolsPanel=P5,z.PlAgDataTableV2=Jg,z.PlAgGridColumnManager=Su,z.PlAgOverlayLoading=ks,z.PlAgOverlayNoRows=xs,z.PlAgTextAndButtonCell=Ss,z.PlAlert=bd,z.PlAutocomplete=vV,z.PlBlockPage=Ox,z.PlBtnAccent=gC,z.PlBtnDanger=bC,z.PlBtnGhost=cr,z.PlBtnGroup=Nm,z.PlBtnLink=EC,z.PlBtnPrimary=Il,z.PlBtnSecondary=ai,z.PlBtnSplit=uC,z.PlChartHistogram=Ng,z.PlChartStackedBar=MB,z.PlChartStackedBarCompact=hh,z.PlCheckbox=Vd,z.PlCheckboxGroup=KS,z.PlChip=Ed,z.PlCloseModalBtn=Mm,z.PlContainer=Zx,z.PlDataTable=Yg,z.PlDataTableV2=Jg,z.PlDialogModal=Bd,z.PlDropdown=$r,z.PlDropdownLegacy=wS,z.PlDropdownLine=Sd,z.PlDropdownMulti=Zl,z.PlDropdownMultiRef=US,z.PlDropdownRef=Yv,z.PlEditableTitle=KC,z.PlFileDialog=ph,z.PlFileInput=fh,z.PlGrid=Wx,z.PlIcon16=Or,z.PlIcon24=Yo,z.PlLoaderCircular=ym,z.PlLogView=ah,z.PlMaskIcon16=qt,z.PlMaskIcon24=at,z.PlMultiSequenceAlignment=EF,z.PlNotificationAlert=mh,z.PlNumberField=TS,z.PlProgressBar=SS,z.PlProgressCell=sh,z.PlRadio=Tg,z.PlRadioGroup=xA,z.PlRow=Fx,z.PlSearchField=Am,z.PlSectionSeparator=ih,z.PlSlideModal=Ko,z.PlSpacer=bm,z.PlSplash=Tl,z.PlStatusTag=lh,z.PlTableFilters=LM,z.PlTabs=WN,z.PlTextArea=Iv,z.PlTextField=fo,z.PlToggleSwitch=Ml,z.PlTooltip=ct,z.ReactiveFileContent=np,z.Scrollable=SL,z.Slider=Zg,z.SliderRange=kL,z.SliderRangeTriple=cL,z.ThemeSwitcher=kx,z.UnresolvedError=Qc,z.ValueOrErrorsComponent=nZ,z.activateAgGrid=em,z.animate=vm,z.animateInfinite=oC,z.autoSizeRowNumberColumn=Zi,z.call=_m,z.categoricalColors=Lg,z.computedResult=BF,z.createAgGridColDef=ay,z.createModel=od,z.defaultMainMenuItems=Cu,z.defineApp=Ww,z.defineStore=VF,z.delay=wm,z.detectOutside=Av,z.ensureError=td,z.eventListener=vd,z.focusRow=Vu,z.formatZodError=rd,z.getElementScrollPosition=Zm,z.identity=ed,z.interpolateColor=Og,z.isDefined=vw,z.isElementVisible=$m,z.isZodError=nd,z.listToOptions=aC,z.magma=Ig,z.makeEaseInOut=rC,z.makeEaseOut=Cm,z.makeOnceTracker=Eu,z.makeRowNumberColDef=Cs,z.maskIcons16=Z$,z.maskIcons24=M$,z.normalizeGradient=$g,z.normalizeListOptions=sr,z.objectHash=xu,z.palettes=Ag,z.randomInt=xm,z.randomString=nC,z.requestTick=_d,z.scrollIntoView=Ol,z.showContextMenu=pd,z.throttle=Sm,z.timeout=km,z.trackFirstDataRendered=Nu,z.unwrapOptionalResult=Cw,z.unwrapValueOrErrors=Kf,z.useAgGridOptions=sZ,z.useClickOutside=Al,z.useComponentProp=qA,z.useDraggable=JA,z.useEventListener=ot,z.useFormState=YA,z.useHover=pm,z.useInterval=jA,z.useLabelNotch=Kn,z.useLocalStorage=mm,z.useMouse=um,z.useMouseCapture=Lr,z.usePosition=oi,z.useQuery=KA,z.useResizeObserver=Mg,z.useScroll=GA,z.useSdkPlugin=vl,z.useSortable=HA,z.useSortable2=zg,z.useTheme=gm,z.useWatchFetch=$d,z.viridis=Rg,z.wrapOptionalResult=Jf,z.wrapValueOrErrors=xw,Object.defineProperty(z,Symbol.toStringTag,{value:"Module"})});
|
|
89
89
|
//# sourceMappingURL=lib.umd.cjs.map
|