@platforma-sdk/ui-vue 1.7.31 → 1.7.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/lib.umd.cjs CHANGED
@@ -1,4 +1,4 @@
1
- (function(R,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("@ag-grid-enterprise/core"),require("@ag-grid-community/core"),require("@ag-grid-community/client-side-row-model"),require("@ag-grid-community/infinite-row-model"),require("@ag-grid-enterprise/server-side-row-model"),require("@ag-grid-community/csv-export"),require("@ag-grid-enterprise/clipboard"),require("@ag-grid-enterprise/range-selection"),require("@ag-grid-enterprise/rich-select"),require("@ag-grid-enterprise/menu"),require("@ag-grid-enterprise/excel-export"),require("@ag-grid-community/vue3")):typeof define=="function"&&define.amd?define(["exports","vue","@ag-grid-enterprise/core","@ag-grid-community/core","@ag-grid-community/client-side-row-model","@ag-grid-community/infinite-row-model","@ag-grid-enterprise/server-side-row-model","@ag-grid-community/csv-export","@ag-grid-enterprise/clipboard","@ag-grid-enterprise/range-selection","@ag-grid-enterprise/rich-select","@ag-grid-enterprise/menu","@ag-grid-enterprise/excel-export","@ag-grid-community/vue3"],n):(R=typeof globalThis<"u"?globalThis:R||self,n(R.SdkVueLib={},R.Vue,R.core$1,R.core,R.clientSideRowModel,R.infiniteRowModel,R.serverSideRowModel,R.csvExport,R.clipboard,R.rangeSelection,R.richSelect,R.menu,R.excelExport,R.vue3))})(this,function(R,n,Qe,wr,Mo,dh,$c,uh,zc,Zc,fh,ph,hh,mh){"use strict";var cO=Object.defineProperty;var lh=R=>{throw TypeError(R)};var dO=(R,n,Qe)=>n in R?cO(R,n,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):R[n]=Qe;var Le=(R,n,Qe)=>dO(R,typeof n!="symbol"?n+"":n,Qe),Ic=(R,n,Qe)=>n.has(R)||lh("Cannot "+Qe);var w=(R,n,Qe)=>(Ic(R,n,"read from private field"),Qe?Qe.call(R):n.get(R)),Me=(R,n,Qe)=>n.has(R)?lh("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(R):n.set(R,Qe),fe=(R,n,Qe,wr)=>(Ic(R,n,"write to private field"),wr?wr.call(R,Qe):n.set(R,Qe),Qe),ie=(R,n,Qe)=>(Ic(R,n,"access private method"),Qe);var ss=(R,n,Qe,wr)=>({set _(Mo){fe(R,n,Mo,Qe)},get _(){return w(R,n,wr)}});var Tu,ri,Vu,Bu,on,At,an,sn,ii,oi,rt,ln,nt,Ue,we,bt,Rt,mt,st,cn,lt,dn,un,Dt,fn,or,kt,Y,Mc,Br,An,uo,It,ch,Nr,ai,fo,gr,yr,Pc,ls,cs,We,Lc,Io,_r,Fc;function gh(i,e){if(i==null)throw Error(e??"Empty (null | undefined) value");return i}function yh(i){return i!==null&&typeof i=="object"}function Vn(i){if(Array.isArray(i)){const e=[];for(let t=0;t<i.length;t++)e[t]=Vn(i[t]);return e}else if(yh(i)){const e={};return Object.keys(i).forEach(t=>{e[t]=Vn(i[t])}),e}else return i}function ds(i,e,t=!0){let a=0,s;return function(...c){s=()=>{i.apply(this,c),a=new Date().getTime()+e,s=null,t&&setTimeout(()=>{s&&s()},e)},new Date().getTime()>a&&s()}}function _h(i){let e=0n,t;return async function(...a){const s=++e;try{await t}catch{}if(e!==s)return{ok:!1};const c=i(...a);return t=c,{ok:!0,value:await c}}}var xi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wh(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var bh=function i(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?i(e.toJSON()):Array.isArray(e)?`[${e.reduce((s,c,d)=>`${s}${d===0?"":","}${i(c===void 0||typeof c=="symbol"?null:c)}`,"")}]`:`{${Object.keys(e).sort().reduce((a,s)=>{if(e[s]===void 0||typeof e[s]=="symbol")return a;const c=a.length===0?"":",";return`${a}${c}${i(s)}:${i(e[s])}`},"")}}`};const Ci=wh(bh);class us extends Error{}class fs extends Error{constructor(e){super(),this.errors=e}toString(){return this.errors.join(",")}}function kh(i){return{ok:!0,value:i}}function Uc(i){if(!i)throw new us;if(!i.ok)throw Error(i.errors.join(";"));return i.value}function jc(i){return{value:i,errors:void 0}}function vh(i){if(i.errors)throw new fs(i.errors);if(!i.value)throw new us;return i.value}function xh(i){return i!==void 0}function ps(i,e){return Ci(i)===Ci(e)}const hs=i=>i,ms=i=>i instanceof Error?i:Error(String(i)),gs=i=>i.name==="ZodError",ys=i=>{const{formErrors:e,fieldErrors:t}=i.flatten(),a=Object.entries(t).map(([s,c])=>s+":"+(c==null?void 0:c.join(",")));return e.concat(a).join("; ")};function _s(i){const e=i.validate??hs,{autoSave:t}=i,a=n.ref(),s=n.ref(),c=O=>{s.value={model:Vn(O)}};n.watch(()=>i.get(),O=>c(O),{immediate:!0});const d=()=>{var O;i.onSave(e(Vn((O=s.value)==null?void 0:O.model)))},u=()=>{c(i.get()),a.value=void 0},p=O=>{const C=ms(O);gs(C)?a.value=Error(ys(C)):a.value=C},h=O=>{a.value=void 0;try{e(O),t&&d()}catch(C){p(C)}},g=n.computed({get:()=>{var O;return(O=s.value)==null?void 0:O.model},set(O){c(O),h(O)}});n.watch(s,(O,C)=>{O&&O===C&&h(O.model)},{deep:!0});const v=n.computed(()=>!a.value),T=n.computed(()=>!ps(i.get(),n.unref(s))),B=n.computed(()=>a.value?a.value.message:"");return n.reactive({model:g,valid:v,isChanged:T,error:a,errorString:B,save:d,revert:u,setError:p})}function Ch(i,e){const t=i.validate??hs,{autoSave:a}=i,s=n.ref(),c=n.ref(),d=C=>{c.value={model:Object.assign(Vn(C),e??{}),stage:Symbol()}};n.watch(()=>i.get(),C=>d(C),{immediate:!0});const u=()=>{var C;i.onSave(t(Vn((C=c.value)==null?void 0:C.model)))},p=()=>{d(i.get()),s.value=void 0},h=C=>{const A=ms(C);gs(A)?s.value=Error(ys(A)):s.value=A},g=C=>{s.value=void 0;try{t(C),a&&u()}catch(A){h(A)}},v=n.computed({get:()=>{var C;return(C=c.value)==null?void 0:C.model},set(){throw Error("Cannot replace base model")}});n.watch([()=>({args:v.value.args,ui:v.value.ui}),()=>{var C;return(C=c.value)==null?void 0:C.stage}],([C,A],[b,D])=>{A===D&&g(C)},{deep:!0});const T=n.computed(()=>!s.value),B=n.computed(()=>!ps(i.get(),n.unref(c))),O=n.computed(()=>s.value?s.value.message:"");return n.reactive({model:v,valid:T,isChanged:B,error:s,errorString:O,save:u,revert:p,setError:h})}const Eh=i=>Object.fromEntries(new URL(i,"http://dummy").searchParams);function Sh(i,e){const a=ds(e.setBlockArgs,100),s=ds(e.setBlockUiState,100),c=ds(e.setBlockArgsAndUiState,100),d=n.reactive({args:Object.freeze(i.args),outputs:Object.freeze(i.outputs),ui:Object.freeze(i.ui),navigationState:Object.freeze(i.navigationState)});e.onStateUpdates(async C=>{C.forEach(A=>{A.key==="args"&&(d.args=Object.freeze(A.value)),A.key==="ui"&&(d.ui=Object.freeze(A.value)),A.key==="outputs"&&(d.outputs=Object.freeze(A.value)),A.key==="navigationState"&&(d.navigationState=Object.freeze(A.value))}),await n.nextTick()});const u=()=>Vn(d.args),p=()=>Vn(d.ui),h=()=>Vn(d.navigationState),g={createArgsModel(C={}){return _s({get(){return C.transform?C.transform(d.args):d.args},validate:C.validate,autoSave:!0,onSave(A){a(A)}})},createUiModel(C={},A){return _s({get(){return C.transform?C.transform(d.ui):d.ui??A()},validate:C.validate,autoSave:!0,onSave(b){s(b)}})},useOutputs(...C){const A=n.reactive({errors:void 0,value:void 0});return n.watch(()=>d.outputs,()=>{try{Object.assign(A,{value:this.unwrapOutputs(...C),errors:void 0})}catch(b){Object.assign(A,{value:void 0,errors:[String(b)]})}},{immediate:!0,deep:!0}),A},unwrapOutputs(...C){const A=d.outputs,b=C.map(D=>[D,Uc(A[D])]);return Object.fromEntries(b)},getOutputField(C){return d.outputs[C]},getOutputFieldOkOptional(C){console.warn("use reactive app.outputValues.fieldName instead instead of getOutputFieldOkOptional(fieldName)");const A=this.getOutputField(C);if(A&&A.ok)return A.value},getOutputFieldErrorsOptional(C){console.warn("use reactive app.outputErrors.fieldName instead instead of getOutputFieldErrorsOptional(fieldName)");const A=this.getOutputField(C);if(A&&!A.ok)return A.errors},updateArgs(C){const A=u();return C(A),e.setBlockArgs(A)},updateUiState(C){const A=p();return e.setBlockUiState(C(A))},updateNavigationState(C){const A=h();return C(A),e.setNavigationState(A)},navigateTo(C){const A=h();return A.href=C,e.setNavigationState(A)}},v=n.computed(()=>{const C=Object.entries(d.outputs).map(([A,b])=>[A,b.ok&&b.value!==void 0?b.value:void 0]);return Object.fromEntries(C)}),T=n.computed(()=>{const C=Object.entries(d.outputs).map(([A,b])=>[A,b&&!b.ok?new fs(b.errors):void 0]);return Object.fromEntries(C)}),B={snapshot:d,queryParams:n.computed(()=>Eh(d.navigationState.href)),href:n.computed(()=>d.navigationState.href),hasErrors:n.computed(()=>Object.values(d.outputs).some(C=>!(C!=null&&C.ok))),outputValues:n.computed(()=>(console.warn("Change app.outputValues to app.model.outputs"),v.value)),outputErrors:n.computed(()=>(console.warn("Change app.outputErrors to app.model.outputErrors"),T.value)),args:n.computed(()=>(console.warn("Change app.args to app.snapshot.args"),d.args)),outputs:n.computed(()=>(console.warn("Change app.outputs to app.snapshot.outputs"),d.outputs)),ui:n.computed(()=>(console.warn("Change app.ui to app.snapshot.ui"),d.ui)),navigationState:n.computed(()=>(console.warn("Change app.navigationState to app.snapshot.navigationState"),d.navigationState))},O=Ch({get(){return{args:d.args,ui:d.ui}},autoSave:!0,onSave(C){c(C.args,C.ui)}},{outputs:v,outputErrors:T});return n.reactive(Object.assign(O,g,B))}var De;(function(i){i.assertEqual=s=>s;function e(s){}i.assertIs=e;function t(s){throw new Error}i.assertNever=t,i.arrayToEnum=s=>{const c={};for(const d of s)c[d]=d;return c},i.getValidEnumValues=s=>{const c=i.objectKeys(s).filter(u=>typeof s[s[u]]!="number"),d={};for(const u of c)d[u]=s[u];return i.objectValues(d)},i.objectValues=s=>i.objectKeys(s).map(function(c){return s[c]}),i.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const c=[];for(const d in s)Object.prototype.hasOwnProperty.call(s,d)&&c.push(d);return c},i.find=(s,c)=>{for(const d of s)if(c(d))return d},i.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function a(s,c=" | "){return s.map(d=>typeof d=="string"?`'${d}'`:d).join(c)}i.joinValues=a,i.jsonStringifyReplacer=(s,c)=>typeof c=="bigint"?c.toString():c})(De||(De={}));var ws;(function(i){i.mergeShapes=(e,t)=>({...e,...t})})(ws||(ws={}));const te=De.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Un=i=>{switch(typeof i){case"undefined":return te.undefined;case"string":return te.string;case"number":return isNaN(i)?te.nan:te.number;case"boolean":return te.boolean;case"function":return te.function;case"bigint":return te.bigint;case"symbol":return te.symbol;case"object":return Array.isArray(i)?te.array:i===null?te.null:i.then&&typeof i.then=="function"&&i.catch&&typeof i.catch=="function"?te.promise:typeof Map<"u"&&i instanceof Map?te.map:typeof Set<"u"&&i instanceof Set?te.set:typeof Date<"u"&&i instanceof Date?te.date:te.object;default:return te.unknown}},G=De.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"]),Th=i=>JSON.stringify(i,null,2).replace(/"([^"]+)":/g,"$1:");class Nt extends Error{constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(c){return c.message},a={_errors:[]},s=c=>{for(const d of c.issues)if(d.code==="invalid_union")d.unionErrors.map(s);else if(d.code==="invalid_return_type")s(d.returnTypeError);else if(d.code==="invalid_arguments")s(d.argumentsError);else if(d.path.length===0)a._errors.push(t(d));else{let u=a,p=0;for(;p<d.path.length;){const h=d.path[p];p===d.path.length-1?(u[h]=u[h]||{_errors:[]},u[h]._errors.push(t(d))):u[h]=u[h]||{_errors:[]},u=u[h],p++}}};return s(this),a}static assert(e){if(!(e instanceof Nt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,De.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},a=[];for(const s of this.issues)s.path.length>0?(t[s.path[0]]=t[s.path[0]]||[],t[s.path[0]].push(e(s))):a.push(e(s));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}Nt.create=i=>new Nt(i);const Zr=(i,e)=>{let t;switch(i.code){case G.invalid_type:i.received===te.undefined?t="Required":t=`Expected ${i.expected}, received ${i.received}`;break;case G.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(i.expected,De.jsonStringifyReplacer)}`;break;case G.unrecognized_keys:t=`Unrecognized key(s) in object: ${De.joinValues(i.keys,", ")}`;break;case G.invalid_union:t="Invalid input";break;case G.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${De.joinValues(i.options)}`;break;case G.invalid_enum_value:t=`Invalid enum value. Expected ${De.joinValues(i.options)}, received '${i.received}'`;break;case G.invalid_arguments:t="Invalid function arguments";break;case G.invalid_return_type:t="Invalid function return type";break;case G.invalid_date:t="Invalid date";break;case G.invalid_string:typeof i.validation=="object"?"includes"in i.validation?(t=`Invalid input: must include "${i.validation.includes}"`,typeof i.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${i.validation.position}`)):"startsWith"in i.validation?t=`Invalid input: must start with "${i.validation.startsWith}"`:"endsWith"in i.validation?t=`Invalid input: must end with "${i.validation.endsWith}"`:De.assertNever(i.validation):i.validation!=="regex"?t=`Invalid ${i.validation}`:t="Invalid";break;case G.too_small:i.type==="array"?t=`Array must contain ${i.exact?"exactly":i.inclusive?"at least":"more than"} ${i.minimum} element(s)`:i.type==="string"?t=`String must contain ${i.exact?"exactly":i.inclusive?"at least":"over"} ${i.minimum} character(s)`:i.type==="number"?t=`Number must be ${i.exact?"exactly equal to ":i.inclusive?"greater than or equal to ":"greater than "}${i.minimum}`:i.type==="date"?t=`Date must be ${i.exact?"exactly equal to ":i.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(i.minimum))}`:t="Invalid input";break;case G.too_big:i.type==="array"?t=`Array must contain ${i.exact?"exactly":i.inclusive?"at most":"less than"} ${i.maximum} element(s)`:i.type==="string"?t=`String must contain ${i.exact?"exactly":i.inclusive?"at most":"under"} ${i.maximum} character(s)`:i.type==="number"?t=`Number must be ${i.exact?"exactly":i.inclusive?"less than or equal to":"less than"} ${i.maximum}`:i.type==="bigint"?t=`BigInt must be ${i.exact?"exactly":i.inclusive?"less than or equal to":"less than"} ${i.maximum}`:i.type==="date"?t=`Date must be ${i.exact?"exactly":i.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(i.maximum))}`:t="Invalid input";break;case G.custom:t="Invalid input";break;case G.invalid_intersection_types:t="Intersection results could not be merged";break;case G.not_multiple_of:t=`Number must be a multiple of ${i.multipleOf}`;break;case G.not_finite:t="Number must be finite";break;default:t=e.defaultError,De.assertNever(i)}return{message:t}};let Wc=Zr;function Vh(i){Wc=i}function Po(){return Wc}const Lo=i=>{const{data:e,path:t,errorMaps:a,issueData:s}=i,c=[...t,...s.path||[]],d={...s,path:c};if(s.message!==void 0)return{...s,path:c,message:s.message};let u="";const p=a.filter(h=>!!h).slice().reverse();for(const h of p)u=h(d,{data:e,defaultError:u}).message;return{...s,path:c,message:u}},Bh=[];function Q(i,e){const t=Po(),a=Lo({issueData:e,data:i.data,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,t,t===Zr?void 0:Zr].filter(s=>!!s)});i.common.issues.push(a)}class ft{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const s of t){if(s.status==="aborted")return ye;s.status==="dirty"&&e.dirty(),a.push(s.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const s of t){const c=await s.key,d=await s.value;a.push({key:c,value:d})}return ft.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const s of t){const{key:c,value:d}=s;if(c.status==="aborted"||d.status==="aborted")return ye;c.status==="dirty"&&e.dirty(),d.status==="dirty"&&e.dirty(),c.value!=="__proto__"&&(typeof d.value<"u"||s.alwaysSet)&&(a[c.value]=d.value)}return{status:e.value,value:a}}}const ye=Object.freeze({status:"aborted"}),Ur=i=>({status:"dirty",value:i}),_t=i=>({status:"valid",value:i}),bs=i=>i.status==="aborted",ks=i=>i.status==="dirty",Ei=i=>i.status==="valid",Si=i=>typeof Promise<"u"&&i instanceof Promise;function Fo(i,e,t,a){if(typeof e=="function"?i!==e||!a:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(i)}function Hc(i,e,t,a,s){if(typeof e=="function"?i!==e||!s:!e.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(i,t),t}typeof SuppressedError=="function"&&SuppressedError;var le;(function(i){i.errToObj=e=>typeof e=="string"?{message:e}:e||{},i.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(le||(le={}));var Ti,Vi;class wn{constructor(e,t,a,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const qc=(i,e)=>{if(Ei(e))return{success:!0,data:e.value};if(!i.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Nt(i.common.issues);return this._error=t,this._error}}};function ve(i){if(!i)return{};const{errorMap:e,invalid_type_error:t,required_error:a,description:s}=i;if(e&&(t||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(d,u)=>{var p,h;const{message:g}=i;return d.code==="invalid_enum_value"?{message:g??u.defaultError}:typeof u.data>"u"?{message:(p=g??a)!==null&&p!==void 0?p:u.defaultError}:d.code!=="invalid_type"?{message:u.defaultError}:{message:(h=g??t)!==null&&h!==void 0?h:u.defaultError}},description:s}}class Se{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 Un(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Un(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ft,ctx:{common:e.parent.common,data:e.data,parsedType:Un(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Si(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){var a;const s={common:{issues:[],async:(a=t==null?void 0:t.async)!==null&&a!==void 0?a:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Un(e)},c=this._parseSync({data:e,path:s.path,parent:s});return qc(s,c)}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Un(e)},s=this._parse({data:e,path:a.path,parent:a}),c=await(Si(s)?s:Promise.resolve(s));return qc(a,c)}refine(e,t){const a=s=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(s):t;return this._refinement((s,c)=>{const d=e(s),u=()=>c.addIssue({code:G.custom,...a(s)});return typeof Promise<"u"&&d instanceof Promise?d.then(p=>p?!0:(u(),!1)):d?!0:(u(),!1)})}refinement(e,t){return this._refinement((a,s)=>e(a)?!0:(s.addIssue(typeof t=="function"?t(a,s):t),!1))}_refinement(e){return new Qt({schema:this,typeName:me.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return kn.create(this,this._def)}nullable(){return qn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Xt.create(this,this._def)}promise(){return qr.create(this,this._def)}or(e){return Ai.create([this,e],this._def)}and(e){return Ri.create(this,e,this._def)}transform(e){return new Qt({...ve(this._def),schema:this,typeName:me.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new Li({...ve(this._def),innerType:this,defaultValue:t,typeName:me.ZodDefault})}brand(){return new Cs({typeName:me.ZodBranded,type:this,...ve(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new Fi({...ve(this._def),innerType:this,catchValue:t,typeName:me.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return $i.create(this,e)}readonly(){return zi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Nh=/^c[^\s-]{8,}$/i,Oh=/^[0-9a-z]+$/,Ah=/^[0-9A-HJKMNP-TV-Z]{26}$/,Rh=/^[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,Dh=/^[a-z0-9_-]{21}$/i,Ih=/^[-+]?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)?)??$/,Mh=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ph="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let vs;const Lh=/^(?:(?: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])$/,Fh=/^(([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})))$/,$h=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Gc="((\\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])))",zh=new RegExp(`^${Gc}$`);function Kc(i){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return i.precision?e=`${e}\\.\\d{${i.precision}}`:i.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Zh(i){return new RegExp(`^${Kc(i)}$`)}function Yc(i){let e=`${Gc}T${Kc(i)}`;const t=[];return t.push(i.local?"Z?":"Z"),i.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Uh(i,e){return!!((e==="v4"||!e)&&Lh.test(i)||(e==="v6"||!e)&&Fh.test(i))}class Jt extends Se{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==te.string){const c=this._getOrReturnCtx(e);return Q(c,{code:G.invalid_type,expected:te.string,received:c.parsedType}),ye}const a=new ft;let s;for(const c of this._def.checks)if(c.kind==="min")e.data.length<c.value&&(s=this._getOrReturnCtx(e,s),Q(s,{code:G.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),a.dirty());else if(c.kind==="max")e.data.length>c.value&&(s=this._getOrReturnCtx(e,s),Q(s,{code:G.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),a.dirty());else if(c.kind==="length"){const d=e.data.length>c.value,u=e.data.length<c.value;(d||u)&&(s=this._getOrReturnCtx(e,s),d?Q(s,{code:G.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}):u&&Q(s,{code:G.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}),a.dirty())}else if(c.kind==="email")Mh.test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{validation:"email",code:G.invalid_string,message:c.message}),a.dirty());else if(c.kind==="emoji")vs||(vs=new RegExp(Ph,"u")),vs.test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{validation:"emoji",code:G.invalid_string,message:c.message}),a.dirty());else if(c.kind==="uuid")Rh.test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{validation:"uuid",code:G.invalid_string,message:c.message}),a.dirty());else if(c.kind==="nanoid")Dh.test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{validation:"nanoid",code:G.invalid_string,message:c.message}),a.dirty());else if(c.kind==="cuid")Nh.test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{validation:"cuid",code:G.invalid_string,message:c.message}),a.dirty());else if(c.kind==="cuid2")Oh.test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{validation:"cuid2",code:G.invalid_string,message:c.message}),a.dirty());else if(c.kind==="ulid")Ah.test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{validation:"ulid",code:G.invalid_string,message:c.message}),a.dirty());else if(c.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),Q(s,{validation:"url",code:G.invalid_string,message:c.message}),a.dirty()}else c.kind==="regex"?(c.regex.lastIndex=0,c.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{validation:"regex",code:G.invalid_string,message:c.message}),a.dirty())):c.kind==="trim"?e.data=e.data.trim():c.kind==="includes"?e.data.includes(c.value,c.position)||(s=this._getOrReturnCtx(e,s),Q(s,{code:G.invalid_string,validation:{includes:c.value,position:c.position},message:c.message}),a.dirty()):c.kind==="toLowerCase"?e.data=e.data.toLowerCase():c.kind==="toUpperCase"?e.data=e.data.toUpperCase():c.kind==="startsWith"?e.data.startsWith(c.value)||(s=this._getOrReturnCtx(e,s),Q(s,{code:G.invalid_string,validation:{startsWith:c.value},message:c.message}),a.dirty()):c.kind==="endsWith"?e.data.endsWith(c.value)||(s=this._getOrReturnCtx(e,s),Q(s,{code:G.invalid_string,validation:{endsWith:c.value},message:c.message}),a.dirty()):c.kind==="datetime"?Yc(c).test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{code:G.invalid_string,validation:"datetime",message:c.message}),a.dirty()):c.kind==="date"?zh.test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{code:G.invalid_string,validation:"date",message:c.message}),a.dirty()):c.kind==="time"?Zh(c).test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{code:G.invalid_string,validation:"time",message:c.message}),a.dirty()):c.kind==="duration"?Ih.test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{validation:"duration",code:G.invalid_string,message:c.message}),a.dirty()):c.kind==="ip"?Uh(e.data,c.version)||(s=this._getOrReturnCtx(e,s),Q(s,{validation:"ip",code:G.invalid_string,message:c.message}),a.dirty()):c.kind==="base64"?$h.test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{validation:"base64",code:G.invalid_string,message:c.message}),a.dirty()):De.assertNever(c);return{status:a.value,value:e.data}}_regex(e,t,a){return this.refinement(s=>e.test(s),{validation:t,code:G.invalid_string,...le.errToObj(a)})}_addCheck(e){return new Jt({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...le.errToObj(e)})}url(e){return this._addCheck({kind:"url",...le.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...le.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...le.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...le.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...le.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...le.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...le.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...le.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...le.errToObj(e)})}datetime(e){var t,a;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:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(a=e==null?void 0:e.local)!==null&&a!==void 0?a:!1,...le.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,...le.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...le.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...le.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...le.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...le.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...le.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...le.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...le.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...le.errToObj(t)})}nonempty(e){return this.min(1,le.errToObj(e))}trim(){return new Jt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Jt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Jt({...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 t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}Jt.create=i=>{var e;return new Jt({checks:[],typeName:me.ZodString,coerce:(e=i==null?void 0:i.coerce)!==null&&e!==void 0?e:!1,...ve(i)})};function jh(i,e){const t=(i.toString().split(".")[1]||"").length,a=(e.toString().split(".")[1]||"").length,s=t>a?t:a,c=parseInt(i.toFixed(s).replace(".","")),d=parseInt(e.toFixed(s).replace(".",""));return c%d/Math.pow(10,s)}class jn extends Se{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)!==te.number){const c=this._getOrReturnCtx(e);return Q(c,{code:G.invalid_type,expected:te.number,received:c.parsedType}),ye}let a;const s=new ft;for(const c of this._def.checks)c.kind==="int"?De.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),Q(a,{code:G.invalid_type,expected:"integer",received:"float",message:c.message}),s.dirty()):c.kind==="min"?(c.inclusive?e.data<c.value:e.data<=c.value)&&(a=this._getOrReturnCtx(e,a),Q(a,{code:G.too_small,minimum:c.value,type:"number",inclusive:c.inclusive,exact:!1,message:c.message}),s.dirty()):c.kind==="max"?(c.inclusive?e.data>c.value:e.data>=c.value)&&(a=this._getOrReturnCtx(e,a),Q(a,{code:G.too_big,maximum:c.value,type:"number",inclusive:c.inclusive,exact:!1,message:c.message}),s.dirty()):c.kind==="multipleOf"?jh(e.data,c.value)!==0&&(a=this._getOrReturnCtx(e,a),Q(a,{code:G.not_multiple_of,multipleOf:c.value,message:c.message}),s.dirty()):c.kind==="finite"?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),Q(a,{code:G.not_finite,message:c.message}),s.dirty()):De.assertNever(c);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,le.toString(t))}gt(e,t){return this.setLimit("min",e,!1,le.toString(t))}lte(e,t){return this.setLimit("max",e,!0,le.toString(t))}lt(e,t){return this.setLimit("max",e,!1,le.toString(t))}setLimit(e,t,a,s){return new jn({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:le.toString(s)}]})}_addCheck(e){return new jn({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:le.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:le.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:le.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:le.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:le.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:le.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:le.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:le.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:le.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&De.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(t===null||a.value>t)&&(t=a.value):a.kind==="max"&&(e===null||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}jn.create=i=>new jn({checks:[],typeName:me.ZodNumber,coerce:(i==null?void 0:i.coerce)||!1,...ve(i)});class Wn extends Se{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)!==te.bigint){const c=this._getOrReturnCtx(e);return Q(c,{code:G.invalid_type,expected:te.bigint,received:c.parsedType}),ye}let a;const s=new ft;for(const c of this._def.checks)c.kind==="min"?(c.inclusive?e.data<c.value:e.data<=c.value)&&(a=this._getOrReturnCtx(e,a),Q(a,{code:G.too_small,type:"bigint",minimum:c.value,inclusive:c.inclusive,message:c.message}),s.dirty()):c.kind==="max"?(c.inclusive?e.data>c.value:e.data>=c.value)&&(a=this._getOrReturnCtx(e,a),Q(a,{code:G.too_big,type:"bigint",maximum:c.value,inclusive:c.inclusive,message:c.message}),s.dirty()):c.kind==="multipleOf"?e.data%c.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),Q(a,{code:G.not_multiple_of,multipleOf:c.value,message:c.message}),s.dirty()):De.assertNever(c);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,le.toString(t))}gt(e,t){return this.setLimit("min",e,!1,le.toString(t))}lte(e,t){return this.setLimit("max",e,!0,le.toString(t))}lt(e,t){return this.setLimit("max",e,!1,le.toString(t))}setLimit(e,t,a,s){return new Wn({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:le.toString(s)}]})}_addCheck(e){return new Wn({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:le.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:le.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:le.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:le.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:le.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}Wn.create=i=>{var e;return new Wn({checks:[],typeName:me.ZodBigInt,coerce:(e=i==null?void 0:i.coerce)!==null&&e!==void 0?e:!1,...ve(i)})};class Bi extends Se{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==te.boolean){const a=this._getOrReturnCtx(e);return Q(a,{code:G.invalid_type,expected:te.boolean,received:a.parsedType}),ye}return _t(e.data)}}Bi.create=i=>new Bi({typeName:me.ZodBoolean,coerce:(i==null?void 0:i.coerce)||!1,...ve(i)});class br extends Se{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==te.date){const c=this._getOrReturnCtx(e);return Q(c,{code:G.invalid_type,expected:te.date,received:c.parsedType}),ye}if(isNaN(e.data.getTime())){const c=this._getOrReturnCtx(e);return Q(c,{code:G.invalid_date}),ye}const a=new ft;let s;for(const c of this._def.checks)c.kind==="min"?e.data.getTime()<c.value&&(s=this._getOrReturnCtx(e,s),Q(s,{code:G.too_small,message:c.message,inclusive:!0,exact:!1,minimum:c.value,type:"date"}),a.dirty()):c.kind==="max"?e.data.getTime()>c.value&&(s=this._getOrReturnCtx(e,s),Q(s,{code:G.too_big,message:c.message,inclusive:!0,exact:!1,maximum:c.value,type:"date"}),a.dirty()):De.assertNever(c);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new br({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:le.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:le.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}br.create=i=>new br({checks:[],coerce:(i==null?void 0:i.coerce)||!1,typeName:me.ZodDate,...ve(i)});class $o extends Se{_parse(e){if(this._getType(e)!==te.symbol){const a=this._getOrReturnCtx(e);return Q(a,{code:G.invalid_type,expected:te.symbol,received:a.parsedType}),ye}return _t(e.data)}}$o.create=i=>new $o({typeName:me.ZodSymbol,...ve(i)});class Ni extends Se{_parse(e){if(this._getType(e)!==te.undefined){const a=this._getOrReturnCtx(e);return Q(a,{code:G.invalid_type,expected:te.undefined,received:a.parsedType}),ye}return _t(e.data)}}Ni.create=i=>new Ni({typeName:me.ZodUndefined,...ve(i)});class Oi extends Se{_parse(e){if(this._getType(e)!==te.null){const a=this._getOrReturnCtx(e);return Q(a,{code:G.invalid_type,expected:te.null,received:a.parsedType}),ye}return _t(e.data)}}Oi.create=i=>new Oi({typeName:me.ZodNull,...ve(i)});class jr extends Se{constructor(){super(...arguments),this._any=!0}_parse(e){return _t(e.data)}}jr.create=i=>new jr({typeName:me.ZodAny,...ve(i)});class kr extends Se{constructor(){super(...arguments),this._unknown=!0}_parse(e){return _t(e.data)}}kr.create=i=>new kr({typeName:me.ZodUnknown,...ve(i)});class Bn extends Se{_parse(e){const t=this._getOrReturnCtx(e);return Q(t,{code:G.invalid_type,expected:te.never,received:t.parsedType}),ye}}Bn.create=i=>new Bn({typeName:me.ZodNever,...ve(i)});class zo extends Se{_parse(e){if(this._getType(e)!==te.undefined){const a=this._getOrReturnCtx(e);return Q(a,{code:G.invalid_type,expected:te.void,received:a.parsedType}),ye}return _t(e.data)}}zo.create=i=>new zo({typeName:me.ZodVoid,...ve(i)});class Xt extends Se{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),s=this._def;if(t.parsedType!==te.array)return Q(t,{code:G.invalid_type,expected:te.array,received:t.parsedType}),ye;if(s.exactLength!==null){const d=t.data.length>s.exactLength.value,u=t.data.length<s.exactLength.value;(d||u)&&(Q(t,{code:d?G.too_big:G.too_small,minimum:u?s.exactLength.value:void 0,maximum:d?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),a.dirty())}if(s.minLength!==null&&t.data.length<s.minLength.value&&(Q(t,{code:G.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),a.dirty()),s.maxLength!==null&&t.data.length>s.maxLength.value&&(Q(t,{code:G.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map((d,u)=>s.type._parseAsync(new wn(t,d,t.path,u)))).then(d=>ft.mergeArray(a,d));const c=[...t.data].map((d,u)=>s.type._parseSync(new wn(t,d,t.path,u)));return ft.mergeArray(a,c)}get element(){return this._def.type}min(e,t){return new Xt({...this._def,minLength:{value:e,message:le.toString(t)}})}max(e,t){return new Xt({...this._def,maxLength:{value:e,message:le.toString(t)}})}length(e,t){return new Xt({...this._def,exactLength:{value:e,message:le.toString(t)}})}nonempty(e){return this.min(1,e)}}Xt.create=(i,e)=>new Xt({type:i,minLength:null,maxLength:null,exactLength:null,typeName:me.ZodArray,...ve(e)});function Wr(i){if(i instanceof qe){const e={};for(const t in i.shape){const a=i.shape[t];e[t]=kn.create(Wr(a))}return new qe({...i._def,shape:()=>e})}else return i instanceof Xt?new Xt({...i._def,type:Wr(i.element)}):i instanceof kn?kn.create(Wr(i.unwrap())):i instanceof qn?qn.create(Wr(i.unwrap())):i instanceof bn?bn.create(i.items.map(e=>Wr(e))):i}class qe extends Se{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(),t=De.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==te.object){const h=this._getOrReturnCtx(e);return Q(h,{code:G.invalid_type,expected:te.object,received:h.parsedType}),ye}const{status:a,ctx:s}=this._processInputParams(e),{shape:c,keys:d}=this._getCached(),u=[];if(!(this._def.catchall instanceof Bn&&this._def.unknownKeys==="strip"))for(const h in s.data)d.includes(h)||u.push(h);const p=[];for(const h of d){const g=c[h],v=s.data[h];p.push({key:{status:"valid",value:h},value:g._parse(new wn(s,v,s.path,h)),alwaysSet:h in s.data})}if(this._def.catchall instanceof Bn){const h=this._def.unknownKeys;if(h==="passthrough")for(const g of u)p.push({key:{status:"valid",value:g},value:{status:"valid",value:s.data[g]}});else if(h==="strict")u.length>0&&(Q(s,{code:G.unrecognized_keys,keys:u}),a.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const g of u){const v=s.data[g];p.push({key:{status:"valid",value:g},value:h._parse(new wn(s,v,s.path,g)),alwaysSet:g in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const h=[];for(const g of p){const v=await g.key,T=await g.value;h.push({key:v,value:T,alwaysSet:g.alwaysSet})}return h}).then(h=>ft.mergeObjectSync(a,h)):ft.mergeObjectSync(a,p)}get shape(){return this._def.shape()}strict(e){return le.errToObj,new qe({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,a)=>{var s,c,d,u;const p=(d=(c=(s=this._def).errorMap)===null||c===void 0?void 0:c.call(s,t,a).message)!==null&&d!==void 0?d:a.defaultError;return t.code==="unrecognized_keys"?{message:(u=le.errToObj(e).message)!==null&&u!==void 0?u:p}:{message:p}}}:{}})}strip(){return new qe({...this._def,unknownKeys:"strip"})}passthrough(){return new qe({...this._def,unknownKeys:"passthrough"})}extend(e){return new qe({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new qe({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:me.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new qe({...this._def,catchall:e})}pick(e){const t={};return De.objectKeys(e).forEach(a=>{e[a]&&this.shape[a]&&(t[a]=this.shape[a])}),new qe({...this._def,shape:()=>t})}omit(e){const t={};return De.objectKeys(this.shape).forEach(a=>{e[a]||(t[a]=this.shape[a])}),new qe({...this._def,shape:()=>t})}deepPartial(){return Wr(this)}partial(e){const t={};return De.objectKeys(this.shape).forEach(a=>{const s=this.shape[a];e&&!e[a]?t[a]=s:t[a]=s.optional()}),new qe({...this._def,shape:()=>t})}required(e){const t={};return De.objectKeys(this.shape).forEach(a=>{if(e&&!e[a])t[a]=this.shape[a];else{let c=this.shape[a];for(;c instanceof kn;)c=c._def.innerType;t[a]=c}}),new qe({...this._def,shape:()=>t})}keyof(){return Jc(De.objectKeys(this.shape))}}qe.create=(i,e)=>new qe({shape:()=>i,unknownKeys:"strip",catchall:Bn.create(),typeName:me.ZodObject,...ve(e)}),qe.strictCreate=(i,e)=>new qe({shape:()=>i,unknownKeys:"strict",catchall:Bn.create(),typeName:me.ZodObject,...ve(e)}),qe.lazycreate=(i,e)=>new qe({shape:i,unknownKeys:"strip",catchall:Bn.create(),typeName:me.ZodObject,...ve(e)});class Ai extends Se{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;function s(c){for(const u of c)if(u.result.status==="valid")return u.result;for(const u of c)if(u.result.status==="dirty")return t.common.issues.push(...u.ctx.common.issues),u.result;const d=c.map(u=>new Nt(u.ctx.common.issues));return Q(t,{code:G.invalid_union,unionErrors:d}),ye}if(t.common.async)return Promise.all(a.map(async c=>{const d={...t,common:{...t.common,issues:[]},parent:null};return{result:await c._parseAsync({data:t.data,path:t.path,parent:d}),ctx:d}})).then(s);{let c;const d=[];for(const p of a){const h={...t,common:{...t.common,issues:[]},parent:null},g=p._parseSync({data:t.data,path:t.path,parent:h});if(g.status==="valid")return g;g.status==="dirty"&&!c&&(c={result:g,ctx:h}),h.common.issues.length&&d.push(h.common.issues)}if(c)return t.common.issues.push(...c.ctx.common.issues),c.result;const u=d.map(p=>new Nt(p));return Q(t,{code:G.invalid_union,unionErrors:u}),ye}}get options(){return this._def.options}}Ai.create=(i,e)=>new Ai({options:i,typeName:me.ZodUnion,...ve(e)});const Nn=i=>i instanceof Ii?Nn(i.schema):i instanceof Qt?Nn(i.innerType()):i instanceof Mi?[i.value]:i instanceof Hn?i.options:i instanceof Pi?De.objectValues(i.enum):i instanceof Li?Nn(i._def.innerType):i instanceof Ni?[void 0]:i instanceof Oi?[null]:i instanceof kn?[void 0,...Nn(i.unwrap())]:i instanceof qn?[null,...Nn(i.unwrap())]:i instanceof Cs||i instanceof zi?Nn(i.unwrap()):i instanceof Fi?Nn(i._def.innerType):[];class Zo extends Se{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==te.object)return Q(t,{code:G.invalid_type,expected:te.object,received:t.parsedType}),ye;const a=this.discriminator,s=t.data[a],c=this.optionsMap.get(s);return c?t.common.async?c._parseAsync({data:t.data,path:t.path,parent:t}):c._parseSync({data:t.data,path:t.path,parent:t}):(Q(t,{code:G.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),ye)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,a){const s=new Map;for(const c of t){const d=Nn(c.shape[e]);if(!d.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const u of d){if(s.has(u))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(u)}`);s.set(u,c)}}return new Zo({typeName:me.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:s,...ve(a)})}}function xs(i,e){const t=Un(i),a=Un(e);if(i===e)return{valid:!0,data:i};if(t===te.object&&a===te.object){const s=De.objectKeys(e),c=De.objectKeys(i).filter(u=>s.indexOf(u)!==-1),d={...i,...e};for(const u of c){const p=xs(i[u],e[u]);if(!p.valid)return{valid:!1};d[u]=p.data}return{valid:!0,data:d}}else if(t===te.array&&a===te.array){if(i.length!==e.length)return{valid:!1};const s=[];for(let c=0;c<i.length;c++){const d=i[c],u=e[c],p=xs(d,u);if(!p.valid)return{valid:!1};s.push(p.data)}return{valid:!0,data:s}}else return t===te.date&&a===te.date&&+i==+e?{valid:!0,data:i}:{valid:!1}}class Ri extends Se{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),s=(c,d)=>{if(bs(c)||bs(d))return ye;const u=xs(c.value,d.value);return u.valid?((ks(c)||ks(d))&&t.dirty(),{status:t.value,value:u.data}):(Q(a,{code:G.invalid_intersection_types}),ye)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([c,d])=>s(c,d)):s(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}Ri.create=(i,e,t)=>new Ri({left:i,right:e,typeName:me.ZodIntersection,...ve(t)});class bn extends Se{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==te.array)return Q(a,{code:G.invalid_type,expected:te.array,received:a.parsedType}),ye;if(a.data.length<this._def.items.length)return Q(a,{code:G.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ye;!this._def.rest&&a.data.length>this._def.items.length&&(Q(a,{code:G.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const c=[...a.data].map((d,u)=>{const p=this._def.items[u]||this._def.rest;return p?p._parse(new wn(a,d,a.path,u)):null}).filter(d=>!!d);return a.common.async?Promise.all(c).then(d=>ft.mergeArray(t,d)):ft.mergeArray(t,c)}get items(){return this._def.items}rest(e){return new bn({...this._def,rest:e})}}bn.create=(i,e)=>{if(!Array.isArray(i))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new bn({items:i,typeName:me.ZodTuple,rest:null,...ve(e)})};class Di extends Se{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==te.object)return Q(a,{code:G.invalid_type,expected:te.object,received:a.parsedType}),ye;const s=[],c=this._def.keyType,d=this._def.valueType;for(const u in a.data)s.push({key:c._parse(new wn(a,u,a.path,u)),value:d._parse(new wn(a,a.data[u],a.path,u)),alwaysSet:u in a.data});return a.common.async?ft.mergeObjectAsync(t,s):ft.mergeObjectSync(t,s)}get element(){return this._def.valueType}static create(e,t,a){return t instanceof Se?new Di({keyType:e,valueType:t,typeName:me.ZodRecord,...ve(a)}):new Di({keyType:Jt.create(),valueType:e,typeName:me.ZodRecord,...ve(t)})}}class Uo extends Se{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==te.map)return Q(a,{code:G.invalid_type,expected:te.map,received:a.parsedType}),ye;const s=this._def.keyType,c=this._def.valueType,d=[...a.data.entries()].map(([u,p],h)=>({key:s._parse(new wn(a,u,a.path,[h,"key"])),value:c._parse(new wn(a,p,a.path,[h,"value"]))}));if(a.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const p of d){const h=await p.key,g=await p.value;if(h.status==="aborted"||g.status==="aborted")return ye;(h.status==="dirty"||g.status==="dirty")&&t.dirty(),u.set(h.value,g.value)}return{status:t.value,value:u}})}else{const u=new Map;for(const p of d){const h=p.key,g=p.value;if(h.status==="aborted"||g.status==="aborted")return ye;(h.status==="dirty"||g.status==="dirty")&&t.dirty(),u.set(h.value,g.value)}return{status:t.value,value:u}}}}Uo.create=(i,e,t)=>new Uo({valueType:e,keyType:i,typeName:me.ZodMap,...ve(t)});class vr extends Se{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==te.set)return Q(a,{code:G.invalid_type,expected:te.set,received:a.parsedType}),ye;const s=this._def;s.minSize!==null&&a.data.size<s.minSize.value&&(Q(a,{code:G.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),t.dirty()),s.maxSize!==null&&a.data.size>s.maxSize.value&&(Q(a,{code:G.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),t.dirty());const c=this._def.valueType;function d(p){const h=new Set;for(const g of p){if(g.status==="aborted")return ye;g.status==="dirty"&&t.dirty(),h.add(g.value)}return{status:t.value,value:h}}const u=[...a.data.values()].map((p,h)=>c._parse(new wn(a,p,a.path,h)));return a.common.async?Promise.all(u).then(p=>d(p)):d(u)}min(e,t){return new vr({...this._def,minSize:{value:e,message:le.toString(t)}})}max(e,t){return new vr({...this._def,maxSize:{value:e,message:le.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}vr.create=(i,e)=>new vr({valueType:i,minSize:null,maxSize:null,typeName:me.ZodSet,...ve(e)});class Hr extends Se{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==te.function)return Q(t,{code:G.invalid_type,expected:te.function,received:t.parsedType}),ye;function a(u,p){return Lo({data:u,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Po(),Zr].filter(h=>!!h),issueData:{code:G.invalid_arguments,argumentsError:p}})}function s(u,p){return Lo({data:u,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Po(),Zr].filter(h=>!!h),issueData:{code:G.invalid_return_type,returnTypeError:p}})}const c={errorMap:t.common.contextualErrorMap},d=t.data;if(this._def.returns instanceof qr){const u=this;return _t(async function(...p){const h=new Nt([]),g=await u._def.args.parseAsync(p,c).catch(B=>{throw h.addIssue(a(p,B)),h}),v=await Reflect.apply(d,this,g);return await u._def.returns._def.type.parseAsync(v,c).catch(B=>{throw h.addIssue(s(v,B)),h})})}else{const u=this;return _t(function(...p){const h=u._def.args.safeParse(p,c);if(!h.success)throw new Nt([a(p,h.error)]);const g=Reflect.apply(d,this,h.data),v=u._def.returns.safeParse(g,c);if(!v.success)throw new Nt([s(g,v.error)]);return v.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Hr({...this._def,args:bn.create(e).rest(kr.create())})}returns(e){return new Hr({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new Hr({args:e||bn.create([]).rest(kr.create()),returns:t||kr.create(),typeName:me.ZodFunction,...ve(a)})}}class Ii extends Se{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Ii.create=(i,e)=>new Ii({getter:i,typeName:me.ZodLazy,...ve(e)});class Mi extends Se{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return Q(t,{received:t.data,code:G.invalid_literal,expected:this._def.value}),ye}return{status:"valid",value:e.data}}get value(){return this._def.value}}Mi.create=(i,e)=>new Mi({value:i,typeName:me.ZodLiteral,...ve(e)});function Jc(i,e){return new Hn({values:i,typeName:me.ZodEnum,...ve(e)})}class Hn extends Se{constructor(){super(...arguments),Ti.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),a=this._def.values;return Q(t,{expected:De.joinValues(a),received:t.parsedType,code:G.invalid_type}),ye}if(Fo(this,Ti)||Hc(this,Ti,new Set(this._def.values)),!Fo(this,Ti).has(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return Q(t,{received:t.data,code:G.invalid_enum_value,options:a}),ye}return _t(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Hn.create(e,{...this._def,...t})}exclude(e,t=this._def){return Hn.create(this.options.filter(a=>!e.includes(a)),{...this._def,...t})}}Ti=new WeakMap,Hn.create=Jc;class Pi extends Se{constructor(){super(...arguments),Vi.set(this,void 0)}_parse(e){const t=De.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==te.string&&a.parsedType!==te.number){const s=De.objectValues(t);return Q(a,{expected:De.joinValues(s),received:a.parsedType,code:G.invalid_type}),ye}if(Fo(this,Vi)||Hc(this,Vi,new Set(De.getValidEnumValues(this._def.values))),!Fo(this,Vi).has(e.data)){const s=De.objectValues(t);return Q(a,{received:a.data,code:G.invalid_enum_value,options:s}),ye}return _t(e.data)}get enum(){return this._def.values}}Vi=new WeakMap,Pi.create=(i,e)=>new Pi({values:i,typeName:me.ZodNativeEnum,...ve(e)});class qr extends Se{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==te.promise&&t.common.async===!1)return Q(t,{code:G.invalid_type,expected:te.promise,received:t.parsedType}),ye;const a=t.parsedType===te.promise?t.data:Promise.resolve(t.data);return _t(a.then(s=>this._def.type.parseAsync(s,{path:t.path,errorMap:t.common.contextualErrorMap})))}}qr.create=(i,e)=>new qr({type:i,typeName:me.ZodPromise,...ve(e)});class Qt extends Se{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===me.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),s=this._def.effect||null,c={addIssue:d=>{Q(a,d),d.fatal?t.abort():t.dirty()},get path(){return a.path}};if(c.addIssue=c.addIssue.bind(c),s.type==="preprocess"){const d=s.transform(a.data,c);if(a.common.async)return Promise.resolve(d).then(async u=>{if(t.value==="aborted")return ye;const p=await this._def.schema._parseAsync({data:u,path:a.path,parent:a});return p.status==="aborted"?ye:p.status==="dirty"||t.value==="dirty"?Ur(p.value):p});{if(t.value==="aborted")return ye;const u=this._def.schema._parseSync({data:d,path:a.path,parent:a});return u.status==="aborted"?ye:u.status==="dirty"||t.value==="dirty"?Ur(u.value):u}}if(s.type==="refinement"){const d=u=>{const p=s.refinement(u,c);if(a.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(a.common.async===!1){const u=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return u.status==="aborted"?ye:(u.status==="dirty"&&t.dirty(),d(u.value),{status:t.value,value:u.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(u=>u.status==="aborted"?ye:(u.status==="dirty"&&t.dirty(),d(u.value).then(()=>({status:t.value,value:u.value}))))}if(s.type==="transform")if(a.common.async===!1){const d=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!Ei(d))return d;const u=s.transform(d.value,c);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:u}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(d=>Ei(d)?Promise.resolve(s.transform(d.value,c)).then(u=>({status:t.value,value:u})):d);De.assertNever(s)}}Qt.create=(i,e,t)=>new Qt({schema:i,typeName:me.ZodEffects,effect:e,...ve(t)}),Qt.createWithPreprocess=(i,e,t)=>new Qt({schema:e,effect:{type:"preprocess",transform:i},typeName:me.ZodEffects,...ve(t)});class kn extends Se{_parse(e){return this._getType(e)===te.undefined?_t(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}kn.create=(i,e)=>new kn({innerType:i,typeName:me.ZodOptional,...ve(e)});class qn extends Se{_parse(e){return this._getType(e)===te.null?_t(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}qn.create=(i,e)=>new qn({innerType:i,typeName:me.ZodNullable,...ve(e)});class Li extends Se{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===te.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Li.create=(i,e)=>new Li({innerType:i,typeName:me.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ve(e)});class Fi extends Se{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},s=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return Si(s)?s.then(c=>({status:"valid",value:c.status==="valid"?c.value:this._def.catchValue({get error(){return new Nt(a.common.issues)},input:a.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Nt(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}Fi.create=(i,e)=>new Fi({innerType:i,typeName:me.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ve(e)});class jo extends Se{_parse(e){if(this._getType(e)!==te.nan){const a=this._getOrReturnCtx(e);return Q(a,{code:G.invalid_type,expected:te.nan,received:a.parsedType}),ye}return{status:"valid",value:e.data}}}jo.create=i=>new jo({typeName:me.ZodNaN,...ve(i)});const Wh=Symbol("zod_brand");class Cs extends Se{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class $i extends Se{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{const c=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return c.status==="aborted"?ye:c.status==="dirty"?(t.dirty(),Ur(c.value)):this._def.out._parseAsync({data:c.value,path:a.path,parent:a})})();{const s=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return s.status==="aborted"?ye:s.status==="dirty"?(t.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:a.path,parent:a})}}static create(e,t){return new $i({in:e,out:t,typeName:me.ZodPipeline})}}class zi extends Se{_parse(e){const t=this._def.innerType._parse(e),a=s=>(Ei(s)&&(s.value=Object.freeze(s.value)),s);return Si(t)?t.then(s=>a(s)):a(t)}unwrap(){return this._def.innerType}}zi.create=(i,e)=>new zi({innerType:i,typeName:me.ZodReadonly,...ve(e)});function Xc(i,e={},t){return i?jr.create().superRefine((a,s)=>{var c,d;if(!i(a)){const u=typeof e=="function"?e(a):typeof e=="string"?{message:e}:e,p=(d=(c=u.fatal)!==null&&c!==void 0?c:t)!==null&&d!==void 0?d:!0,h=typeof u=="string"?{message:u}:u;s.addIssue({code:"custom",...h,fatal:p})}}):jr.create()}const Hh={object:qe.lazycreate};var me;(function(i){i.ZodString="ZodString",i.ZodNumber="ZodNumber",i.ZodNaN="ZodNaN",i.ZodBigInt="ZodBigInt",i.ZodBoolean="ZodBoolean",i.ZodDate="ZodDate",i.ZodSymbol="ZodSymbol",i.ZodUndefined="ZodUndefined",i.ZodNull="ZodNull",i.ZodAny="ZodAny",i.ZodUnknown="ZodUnknown",i.ZodNever="ZodNever",i.ZodVoid="ZodVoid",i.ZodArray="ZodArray",i.ZodObject="ZodObject",i.ZodUnion="ZodUnion",i.ZodDiscriminatedUnion="ZodDiscriminatedUnion",i.ZodIntersection="ZodIntersection",i.ZodTuple="ZodTuple",i.ZodRecord="ZodRecord",i.ZodMap="ZodMap",i.ZodSet="ZodSet",i.ZodFunction="ZodFunction",i.ZodLazy="ZodLazy",i.ZodLiteral="ZodLiteral",i.ZodEnum="ZodEnum",i.ZodEffects="ZodEffects",i.ZodNativeEnum="ZodNativeEnum",i.ZodOptional="ZodOptional",i.ZodNullable="ZodNullable",i.ZodDefault="ZodDefault",i.ZodCatch="ZodCatch",i.ZodPromise="ZodPromise",i.ZodBranded="ZodBranded",i.ZodPipeline="ZodPipeline",i.ZodReadonly="ZodReadonly"})(me||(me={}));const qh=(i,e={message:`Input not instance of ${i.name}`})=>Xc(t=>t instanceof i,e),Qc=Jt.create,ed=jn.create,Gh=jo.create,Kh=Wn.create,td=Bi.create,Yh=br.create,Jh=$o.create,Xh=Ni.create,Qh=Oi.create,em=jr.create,tm=kr.create,nm=Bn.create,rm=zo.create,im=Xt.create,om=qe.create,am=qe.strictCreate,sm=Ai.create,lm=Zo.create,cm=Ri.create,dm=bn.create,um=Di.create,fm=Uo.create,pm=vr.create,hm=Hr.create,mm=Ii.create,gm=Mi.create,ym=Hn.create,_m=Pi.create,wm=qr.create,nd=Qt.create,bm=kn.create,km=qn.create,vm=Qt.createWithPreprocess,xm=$i.create;var Wo=Object.freeze({__proto__:null,defaultErrorMap:Zr,setErrorMap:Vh,getErrorMap:Po,makeIssue:Lo,EMPTY_PATH:Bh,addIssueToContext:Q,ParseStatus:ft,INVALID:ye,DIRTY:Ur,OK:_t,isAborted:bs,isDirty:ks,isValid:Ei,isAsync:Si,get util(){return De},get objectUtil(){return ws},ZodParsedType:te,getParsedType:Un,ZodType:Se,datetimeRegex:Yc,ZodString:Jt,ZodNumber:jn,ZodBigInt:Wn,ZodBoolean:Bi,ZodDate:br,ZodSymbol:$o,ZodUndefined:Ni,ZodNull:Oi,ZodAny:jr,ZodUnknown:kr,ZodNever:Bn,ZodVoid:zo,ZodArray:Xt,ZodObject:qe,ZodUnion:Ai,ZodDiscriminatedUnion:Zo,ZodIntersection:Ri,ZodTuple:bn,ZodRecord:Di,ZodMap:Uo,ZodSet:vr,ZodFunction:Hr,ZodLazy:Ii,ZodLiteral:Mi,ZodEnum:Hn,ZodNativeEnum:Pi,ZodPromise:qr,ZodEffects:Qt,ZodTransformer:Qt,ZodOptional:kn,ZodNullable:qn,ZodDefault:Li,ZodCatch:Fi,ZodNaN:jo,BRAND:Wh,ZodBranded:Cs,ZodPipeline:$i,ZodReadonly:zi,custom:Xc,Schema:Se,ZodSchema:Se,late:Hh,get ZodFirstPartyTypeKind(){return me},coerce:{string:i=>Jt.create({...i,coerce:!0}),number:i=>jn.create({...i,coerce:!0}),boolean:i=>Bi.create({...i,coerce:!0}),bigint:i=>Wn.create({...i,coerce:!0}),date:i=>br.create({...i,coerce:!0})},any:em,array:im,bigint:Kh,boolean:td,date:Yh,discriminatedUnion:lm,effect:nd,enum:ym,function:hm,instanceof:qh,intersection:cm,lazy:mm,literal:gm,map:fm,nan:Gh,nativeEnum:_m,never:nm,null:Qh,nullable:km,number:ed,object:om,oboolean:()=>td().optional(),onumber:()=>ed().optional(),optional:bm,ostring:()=>Qc().optional(),pipeline:xm,preprocess:vm,promise:wm,record:um,set:pm,strictObject:am,string:Qc,symbol:Jh,transformer:nd,tuple:dm,undefined:Xh,union:sm,unknown:tm,void:rm,NEVER:ye,ZodIssueCode:G,quotelessJson:Th,ZodError:Nt});function Cm(i){throw new Error("Unexpected object: "+i)}const Em=-2147483648,rd=-9007199254740991n,Sm=NaN,Tm=NaN,Vm=null,Bm=null;function id(i,e){switch(e){case"Int":return i===Em;case"Long":return i===Number(rd)||i===rd;case"Float":return i===Sm;case"Double":return i===Tm;case"String":return i===Vm;case"Bytes":return i===Bm;default:throw Error(`unsupported data type: ${e}`)}}function Nm(i,e){const t=Math.floor(e/8),a=1<<7-e%8;return(i[t]&a)>0}function od(i){const{type:e,name:t,domain:a}=i;return{type:e,name:t,...a&&{domain:a}}}function Es(i){return i.map(od)}function Ho(i,e){switch(i.type){case"column":return{type:"column",column:e(i.column)};case"inner":case"full":return{type:i.type,entries:i.entries.map(t=>Ho(t,e))};case"outer":return{type:"outer",primary:Ho(i.primary,e),secondary:i.secondary.map(t=>Ho(t,e))};default:Cm(i)}}Wo.object({__isRef:Wo.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:Wo.string().describe("Upstream block id"),name:Wo.string().describe("Name of the output provided to the upstream block's output context")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").strict().readonly();function Om(i){if(typeof globalThis.platforma<"u")return globalThis.platforma;throw new Error("Can't get platforma instance.")}function Am(){return Om()}function Rm(i){if(typeof globalThis.getEnvironmentValue=="function")return globalThis.getEnvironmentValue(i)}function ad(){wr.ModuleRegistry.registerModules([Mo.ClientSideRowModelModule,dh.InfiniteRowModelModule,$c.ServerSideRowModelModule,uh.CsvExportModule,zc.ClipboardModule,Zc.RangeSelectionModule,fh.RichSelectModule,ph.MenuModule,hh.ExcelExportModule]);const i=Rm("AGGRID_LICENSE");i?(Qe.LicenseManager.setLicenseKey(i),console.log("AG Grid Activated")):console.log("AG Grid License not found")}const sd=Symbol("sdk-vue");function Ss(){return n.inject(sd)}function Dm(i,e){let t;ad();const a=()=>{i.loadBlockState().then(c=>{s.loaded=!0;const d=Sh(c,i),u=e(d);t=Object.assign(d,{...u,routes:Object.fromEntries(Object.entries(u.routes).map(([p,h])=>[p,n.markRaw(h)]))})}).catch(c=>{console.error("load initial state error",c),s.error=c})},s=n.reactive({loaded:!1,error:void 0,useApp(){return gh(t,"App is not loaded")},install(c){c.provide(sd,this),a()}});return s}var Im=Object.defineProperty,Mm=(i,e,t)=>e in i?Im(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Pm=(i,e,t)=>Mm(i,e+"",t);const Lm=10,Fm=30,$m=[{text:"Delete row",value:"delete:row"},{text:"Update value",value:"update:value"}],zm=[{text:"Delete column",value:"delete:column"},{text:"Fit content",value:"expand:column"}],Zm=["^data-row-index"],Um=["value"],jm=n.defineComponent({__name:"TdCell",props:{cell:{},showContextOptions:{type:Function},cellEvents:{}},emits:["delete:row","update:value"],setup(i,{emit:e}){const t=e,a=i,s=n.reactive({edit:!1});function c(h){t("update:value",{rowIndex:a.cell.rowIndex,name:a.cell.colName,value:h.target.value}),s.edit=!1}function d(){const h=a.cellEvents??[];if(!a.showContextOptions){console.warn("inject showContextOptions interface for the table");return}const g=$m.filter(v=>h.includes(v.value));g.length&&a.showContextOptions(g,v=>{t(v,a.cell.rowIndex)})}const u=n.ref();function p(){a.cell.editable&&(s.edit=!0,requestAnimationFrame(()=>{var h,g;(g=(h=u.value)==null?void 0:h.querySelector("input"))==null||g.focus()}))}return(h,g)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"cellRef",ref:u,class:n.normalizeClass(["cell",{[h.cell.class]:!0,edit:s.edit}]),"^data-row-index":h.cell.rowIndex,onContextmenu:d,onClick:n.withModifiers(p,["stop"])},[s.edit?(n.openBlock(),n.createElementBlock("input",{key:0,value:h.cell.value,onFocusout:g[0]||(g[0]=v=>s.edit=!1),onChange:c},null,40,Um)):n.renderSlot(h.$slots,"default",{key:1})],42,Zm))}});function Ge(i,e,t,a=!1){n.onMounted(()=>{var s;return(s=n.unref(i))==null?void 0:s.addEventListener(e,t,a)}),n.onUnmounted(()=>{var s;return(s=n.unref(i))==null?void 0:s.removeEventListener(e,t,a)})}function Wm(i){n.onMounted(()=>window.addEventListener("mouseup",i)),n.onUnmounted(()=>window.removeEventListener("mouseup",i))}function ld(i){let e=!1;return function(...t){e?console.log("handle pressure"):(requestAnimationFrame(()=>{i(...t),e=!1}),e=!0)}}function Hm(i,e){let t;function a(c){t={...c}}Wm(()=>{t=void 0,e()});const s=ld(i);return Ge(window,"mousemove",c=>{t&&s({x:t.x,width:t.width,diff:c.x-t.x})}),{start:a}}var qm=Object.defineProperty,Gm=(i,e,t)=>e in i?qm(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ts=(i,e,t)=>Gm(i,typeof e!="symbol"?e+"":e,t);function Vs(i,e){if(i==null)throw Error(e??"Empty (null | undefined) value");return i}function Km(i,e){if(i===void 0)throw Error(e??"Undefined value");return i}function Ym(i=void 0){return i}function Jm(i){return i}function Xm(i){return[...new Set(i)]}function Qm(i,e){if(i==null)throw Error(e??"Empty (null | undefined) value")}function eg(i,e){if(i===void 0)throw Error(e??"Undefined value")}function cd(i,e,t){const a=Math.min(e,t),s=Math.max(e,t);return i>=a&&i<=s}function tg(i){return i.map(e=>({text:String(e),value:e}))}function ng(i){return function(...e){const t=i(...e);async function a(s){return s.done?Promise.resolve(s.value):Promise.resolve(s.value).then(c=>a(t.next(c))).catch(c=>a(t.throw(c)))}try{return a(t.next())}catch(s){return Promise.reject(s)}}}class rg{constructor(){Ts(this,"promise"),Ts(this,"resolve",()=>{}),Ts(this,"reject",()=>{}),this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}function qo(i){return new Promise(e=>setTimeout(e,i))}function ig(){return new Promise(i=>queueMicrotask(i))}function og(){const i=new Date().getTime();return function(){return new Date().getTime()-i}}function ag(){const i=performance.now();return function(){return performance.now()-i}}function dd(i){return i()}function Zi(i,e,t){return e>i?e:i>t?t:i}function Bs(i,e){return e(i)}function Gn(i,e){if(i!=null)return e(i)}function sg(i,e){return i=Math.ceil(i),e=Math.floor(e),Math.floor(Math.random()*(e-i))+i}function*ud(i,e,t=1){for(let a=i;a<e;a+=t)yield a}function fd(i){const e=[];for(const t of i)e.push(t);return e}function lg(i,e){return fd(ud(0,i)).map(e)}class cg{constructor(e){this._delay=e}async*generate(){let e=0;for(;;)await qo(this._delay),yield e++}async*[Symbol.asyncIterator](){let e=0;for(;;)await qo(this._delay),yield e++}}function dg(i,e){return Array.from({length:i},(t,a)=>e(a))}function ug(i,e){throw Error(e)}function fg(i){return e=>i[e]()}function pd(i){if(i&&i.ok)return i.value}function pg(i){if(i&&!i.ok)return i.error}function hg(i){if(i.ok)return i.value;throw Error(i.error)}function mg(i){return Array.isArray(i)?i:[i]}async function hd(i){return Object.fromEntries(await Promise.all(Object.entries(i).map(async([e,t])=>[e,await t])))}function gg(i,e){return Object.keys(e).every(t=>i[t]===e[t])}const Ns=i=>i;function yg(i){return i}function _g(i){return Object.entries(i).map(([e,t])=>({key:e,value:t}))}const Go=Object.freeze(Object.defineProperty({__proto__:null,Deferred:rg,Interval:cg,alike:gg,arrayFrom:dg,asConst:yg,async:ng,between:cd,bool:Jm,call:dd,checkIfDefined:eg,checkIfNotEmpty:Qm,clamp:Zi,delay:qo,errorOptional:pg,exhaustive:ug,flatValue:mg,identity:Ns,listToOptions:tg,match:fg,notEmpty:Vs,notUndef:Km,okOptional:pd,performanceTimer:ag,randomInt:sg,range:ud,resolveAwaited:hd,tap:Bs,tapIf:Gn,tear:ig,timer:og,times:lg,toList:fd,undef:Ym,unionize:_g,uniqueValues:Xm,unwrap:hg},Symbol.toStringTag,{value:"Module"}));function wg(i,e){return i=Math.ceil(i),e=Math.floor(e),Math.floor(Math.random()*(e-i))+i}function bg(i){return i=i.replace(" ","-"),(i[0]||"").toLowerCase()+i.slice(1).replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function kg(i,e=[]){for(i=i?String(i):"";e.includes(i.charAt(0));)i=i.substr(1);for(;e.includes(i.charAt(i.length-1));)i=i.substr(0,i.length-1);return i}function md(i){return i.replace(/^.*[\\/]/,"")}function gd(i){return i.replace(/^.*?[.]/,"")}function vg(i,e){const t=[];if(i.dataTransfer)for(let a=0;a<i.dataTransfer.items.length;a++){if(i.dataTransfer.items[a].kind!=="file")continue;const s=i.dataTransfer.items[a].getAsFile();s&&s.path&&t.push(s.path)}return e?t.filter(a=>e.includes(gd(md(a)))):t}const xg=(i,e,t="s")=>`${i} ${e}${i!==1?t:""}`;function Cg(i){try{return new RegExp(i),!0}catch{return!1}}function Eg(i){return i?i.charAt(0).toUpperCase()+i.slice(1):""}function Sg(i){return i?i.charAt(0).toLowerCase()+i.slice(1):""}function yd(i){let e="";for(let t=0;t<i;t++)e+=String.fromCharCode(wg(65,91));return e}function _d(){return yd(42)}function Tg(i,e){return i.substring(0,i.indexOf(e))}function Vg(i,e){return i.substring(0,i.lastIndexOf(e))}function Bg(i,e){return i.substring(i.indexOf(e)+e.length,i.length)}function Ng(i){if(typeof i!="string")throw Error("Expect string value, got: "+typeof i)}function Og(i){let e=0,t,a;if(i.length===0)return e;for(t=0;t<i.length;t++)a=i.charCodeAt(t),e=(e<<5)-e+a,e|=0;return e}const Ag=Object.freeze(Object.defineProperty({__proto__:null,after:Bg,assertString:Ng,before:Tg,beforeLast:Vg,camelToKebab:bg,extractExtension:gd,extractFileName:md,extractPaths:vg,hashCode:Og,isRegexpValid:Cg,lcFirst:Sg,pluralize:xg,randomString:yd,trimChars:kg,ucFirst:Eg,uniqueId:_d},Symbol.toStringTag,{value:"Module"}));function Ui(i){return i!==null&&typeof i=="object"}function Rg(i,e){return Object.keys(i).map(t=>e(i[t],t))}function Os(i,e){return Ui(i)&&Ui(e)?Object.keys(i).length!==Object.keys(e).length?!1:Object.keys(i).every(t=>Os(i[t],e[t])):i===e}function ji(i){if(Array.isArray(i)){const e=[];for(let t=0;t<i.length;t++)e[t]=ji(i[t]);return e}else if(Ui(i)){const e={};return Object.keys(i).forEach(t=>{e[t]=ji(i[t])}),e}else return i}function Dg(i){return Array.isArray(i)?Object.assign([],i):Ui(i)?Object.assign({},i):i}function Ig(i,e){const t={};for(const a in e)e[a]!==i[a]&&(t[a]=i[a]);return t}function Mg(i,e,t){return Object.assign({},i,{[e]:t})}function Pg(i){return Object.entries(i).forEach(([e,t])=>{t instanceof Function&&(i[e]=t.bind(i))}),i}function Lg(i,e,t){return i[e]=t,i}function Fg(i,e){return i[e]}function $g(i,e){i={...i};const t=i[e];return delete i[e],[t,i]}function zg(i,...e){return Object.assign({},...e.map(t=>({[t]:i[t]})))}function Zg(i,...e){return e.map(t=>i[t])}function Ug(i,...e){const t=Object.assign({},i);return e.forEach(a=>delete t[a]),t}const As=Object.freeze(Object.defineProperty({__proto__:null,bindMethods:Pg,deepClone:ji,deepEqual:Os,getProp:Fg,iSet:Mg,isObject:Ui,map:Rg,omit:Ug,pick:zg,pickValues:Zg,setProp:Lg,shallowClone:Dg,shallowDiff:Ig,shiftProp:$g},Symbol.toStringTag,{value:"Module"}));function jg(i,e){const t=i.findIndex(e);if(t<0)return[];const a=(()=>{for(let s=t;s<i.length;s++)if(!e(i[s],s))return s;return i.length})();return i.slice(t,a)}function wd(i,e,t){let a;return function(...s){a&&clearTimeout(a),a=setTimeout(()=>{a=void 0,i.apply(this,s)},e)}}const Wg=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Hg=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],qg=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Gg=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bd=(i,e)=>{let t=String(i);return typeof e=="string"||Array.isArray(e)?t=i.toLocaleString(e):e===!0&&(t=i.toLocaleString(void 0)),t};function Rs(i,e){if(i=typeof i=="bigint"?Number(i):i,!Number.isFinite(i))throw new TypeError(`Expected a finite number, got ${typeof i}: ${i}`);Object.assign(e,{bits:!1,binary:!1});const t=e.bits?e.binary?Gg:qg:e.binary?Hg:Wg;if(e.signed&&i===0)return` 0 ${t[0]}`;const a=i<0,s=a?"-":e.signed?"+":"";if(a&&(i=-i),i<1){const p=bd(i,e.locale);return s+p+" "+t[0]}const c=Math.min(Math.floor(e.binary?Math.log(i)/Math.log(1024):Math.log10(i)/3),t.length-1);i/=(e.binary?1024:1e3)**c,i=Number(i.toPrecision(3));const d=bd(Number(i),e.locale),u=t[c];return s+d+" "+u}function Kg(i){var e;const t=Go.tapIf((e=n.unref(i))==null?void 0:e.querySelectorAll(".th-cell"),a=>[...a])??[];return t.map((a,s)=>{const{width:c,x:d}=a.getBoundingClientRect();return{index:s,width:c,x:d,right:d+c}}).slice(0,t.length-1)}function Ds(){const i=n.reactive({x:0,y:0});function e(t){i.x=t.pageX,i.y=t.pageY}return n.onMounted(()=>window.addEventListener("mousemove",e)),n.onUnmounted(()=>window.removeEventListener("mousemove",e)),i}function Is(i,e={}){const{delayEnter:t=0,delayLeave:a=0}=e,s=n.ref(!1);let c;const d=u=>{const p=u?t:a;c&&(clearTimeout(c),c=void 0),p?c=setTimeout(()=>s.value=u,p):s.value=u};return window&&(Ge(i,"mouseenter",()=>d(!0)),Ge(i,"mouseleave",()=>d(!1))),s}const{tapIf:Yg,clamp:Jg}=Go;function Xg(i,e){const t=Ds(),a=Is(e,{}),s=Hm(d=>{Yg(i.resizeTh,u=>{i.columnsMeta[u.index]={width:Jg(d.width+d.diff,Fm,1e4)}})},()=>{i.resize=!1,i.resizeTh=void 0,document.body.style.cursor=""});function c(d){i.resizeTh&&(i.resize=!0,s.start({x:d.x,width:i.resizeTh.width}))}return n.watchEffect(()=>{if(!a.value){document.body.style.cursor="";return}if(i.resize)return;const d=Kg(e).find(u=>Math.abs(t.x-u.right)<Lm);d?(document.body.style.cursor="col-resize",i.resizeTh=d):(i.resizeTh=void 0,document.body.style.cursor="")}),{mouseDown:c}}const Kn=(i,e)=>{const t=i.__vccOpts||i;for(const[a,s]of e)t[a]=s;return t},Qg={},ey={class:"add-column-btn"};function ty(i,e){return n.openBlock(),n.createElementBlock("div",ey,e[0]||(e[0]=[n.createElementVNode("div",null,null,-1)]))}const ny=Kn(Qg,[["render",ty]]),ry={},iy={width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function oy(i,e){return n.openBlock(),n.createElementBlock("svg",iy,e[0]||(e[0]=[n.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),n.createTextVNode(),n.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 ay=Kn(ry,[["render",oy]]),sy=n.defineComponent({__name:"ThCell",props:{col:{},showContextOptions:{type:Function},columnEvents:{}},emits:["delete:column","expand:column","change:sort"],setup(i,{emit:e}){const t=e,a=i;function s(u,p){const h=p.indexOf(u)+1;return p[h>=p.length?0:h]}function c(){const u=a.columnEvents??[];if(!a.showContextOptions){console.warn("inject showContextOptions interface for the table");return}const p=zm.filter(h=>u.includes(h.value));p.length&&a.showContextOptions(p,h=>{t(h,a.col.name)})}function d(u,p){t("change:sort",{colName:u,direction:s(p??"DESC",["DESC","ASC"])})}return(u,p)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["cell th-cell",{"justify-center":u.col.justify}]),onContextmenu:c},[u.col.valueType?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(u.col.valueType)},null,2)):n.createCommentVNode("",!0),n.createTextVNode(" "+n.toDisplayString(u.col.text)+" ",1),u.col.sort?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["sort",u.col.sort.direction]),onClick:p[0]||(p[0]=n.withModifiers(()=>{var h;return d(u.col.name,(h=u.col.sort)==null?void 0:h.direction)},["stop"]))},null,2)):n.createCommentVNode("",!0)],34))}}),ly=n.defineComponent({__name:"TRow",props:{index:{},visible:{type:Boolean},height:{}},setup(i){return(e,t)=>(n.openBlock(),n.createElementBlock("div",{class:"t-row",style:n.normalizeStyle(`height: ${e.height}px`)},[e.visible?n.renderSlot(e.$slots,"default",{key:0}):n.createCommentVNode("",!0)],4))}});function kd(i){return typeof i=="number"||typeof i=="string"?i:String(i)}function cy(i,e,t){for(const[a,s]of Object.entries(i)){const c=kd(e[a]),d=kd(t[a]),u=s==="DESC"?-1:1;if(c!==d)return(c>d?1:-1)*u}return 0}function vd(i){return i()}function Ms(i,e){if(i==null)throw Error(e);return i}function Ps(i){let e=!1;return function(...t){e||(requestAnimationFrame(()=>{i(...t),e=!1}),e=!0)}}function xd(i){return new Promise(e=>setTimeout(e,i))}function Cd(i,e){const t=setTimeout(i,e);return()=>{clearTimeout(t)}}function Ed(i,e){return i=Math.ceil(i),e=Math.floor(e),Math.floor(Math.random()*(e-i))+i}function dy(i){let e="";for(let t=0;t<i;t++)e+=String.fromCharCode(Ed(65,91));return e}function Sd(i){return function(e){return 1-i(1-e)}}function uy(i){return function(e){return e<.5?i(2*e)/2:(2-i(2*(1-e)))/2}}function Td(i){const{duration:e,draw:t,timing:a}=i,s=performance.now();let c=!1;return requestAnimationFrame(function d(u){let p=(u-s)/e;(p>1||c)&&(p=1);const h=a(p);t(h),p<1&&requestAnimationFrame(d)}),function(){c=!0}}function fy(i){const{getFraction:e,draw:t,timing:a}=i,s=performance.now();let c=!1;return requestAnimationFrame(function d(u){let p=e(u-s);if(c)return;p>1&&(p=1);const h=a(p);t(h),p<1&&requestAnimationFrame(d)}),function(){c=!0}}function Vd(i,e){let t=-1;return(...a)=>{t!==-1&&(clearTimeout(t),t=-1),t=window.setTimeout(()=>i(...a),e)}}function Ls(i,e,t=!0){let a=0,s;return function(...c){s=()=>{i.apply(this,c),a=new Date().getTime()+e,s=null,t&&setTimeout(()=>{s&&s()},e)},new Date().getTime()>a&&s()}}function py(i){return i.map(e=>({text:String(e),value:e}))}function Gr(i){return i.map(e=>({label:"label"in e?e.label:e.text,value:e.value,description:e.description}))}const Fs=40,hy=n.defineComponent({__name:"index",props:{settings:{}},emits:["click:cell","delete:row","delete:column","change:sort","update:value"],setup(i){const{tapIf:e,tap:t}=Go,{uniqueId:a}=Ag,s=i,c=n.reactive({rowIndex:-1,columnsMeta:{},resize:!1,resizeTh:void 0,bodyHeight:0,scrollTop:0}),d=n.ref(),u=n.ref(),p=n.ref(),h=()=>{e(p.value,j=>{c.bodyHeight=j.getBoundingClientRect().height})},g=n.computed(()=>s.settings.autoLastColumn?[...s.settings.columns,{name:a(),text:"_"}]:s.settings.columns),v=n.computed(()=>{const{columnsMeta:j}=c,P=n.unref(g),U=Object.keys(j).length;return P.map((N,S)=>S==P.length-1?U?"minmax(100px, 1fr)":N.width??"minmax(100px, 1fr)":j[S]?j[S].width+"px":N.width??"140px").join(" ")}),T=n.computed(()=>({gridColumn:"1 / "+n.unref(g).length+1})),B=n.computed(()=>n.unref(g).reduce((j,P)=>(j[P.name]=P.justify?"justify-"+P.justify:"",j),{})),O=n.computed(()=>{const j=n.unref(g),P=s.settings.rows.slice(),{bodyHeight:U,scrollTop:N}=c;if(s.settings.selfSort){const W=j.reduce((F,q)=>{var oe;return(oe=q.sort)!=null&&oe.direction&&(F[q.name]=q.sort.direction),F},{});Object.keys(W).length&&P.sort((F,q)=>cy(W,F,q))}const S=160;let M=0;return P.map((W,F)=>{const q=t(W.__height?Number(W.__height):Fs,ae=>!Number.isFinite(ae)||ae<Fs?Fs:ae),oe=j.map(ae=>{const J=ae.name;return{colName:J,rowIndex:F,value:W[J],class:B.value[J]+(F===c.rowIndex?" hovered":""),slot:ae.slot,editable:ae.editable}}),de=U?N<M+q+S&&M<U+N+S:!1;return M+=q+1,{visible:de,height:q,cells:oe}})}),{mouseDown:C}=Xg(c,d);function A(){e(u.value,j=>{var P;j.scrollLeft=((P=p.value)==null?void 0:P.scrollLeft)??0})}const b=Ls(()=>{var j;c.scrollTop=((j=p.value)==null?void 0:j.scrollTop)??0},10),D=()=>{A(),b()};function $(j){const P=g.value.findIndex(N=>N.name===j);if(P<0)return;const U=s.settings.rows.reduce((N,S)=>{const M=9.52*Go.call(()=>{const W=S[j];return W&&typeof W=="object"&&"segments"in W?W.segments.map(F=>F.sequence).join("").length:String(W??"").length});return M>N?M:N},0);c.columnsMeta[P]={width:U}}return n.onMounted(()=>{n.nextTick(h)}),n.watchPostEffect(()=>{n.unref(s.settings),n.nextTick(h)}),Ge(window,"resize",()=>n.nextTick(h)),(j,P)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"tableRef",ref:d,class:"grid-table",onMousedown:P[5]||(P[5]=(...U)=>n.unref(C)&&n.unref(C)(...U))},[j.settings.addColumn?(n.openBlock(),n.createBlock(ny,{key:0,onClick:n.withModifiers(j.settings.addColumn,["stop"])},null,8,["onClick"])):n.createCommentVNode("",!0),P[9]||(P[9]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"headRef",ref:u,class:"table-head",style:n.normalizeStyle({gridTemplateColumns:v.value})},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(g.value,(U,N)=>(n.openBlock(),n.createBlock(sy,{key:N,col:U,"show-context-options":j.settings.showContextOptions,"column-events":j.settings.columnEvents,"onDelete:column":P[0]||(P[0]=S=>j.$emit("delete:column",S)),"onChange:sort":P[1]||(P[1]=S=>j.$emit("change:sort",S)),"onExpand:column":P[2]||(P[2]=S=>$(S))},null,8,["col","show-context-options","column-events"]))),128))],4),P[10]||(P[10]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"bodyRef",ref:p,class:"table-body",onScroll:D},[O.value.length===0?(n.openBlock(),n.createElementBlock("div",{key:0,class:"table-body__no-data",style:n.normalizeStyle(T.value)},[n.createElementVNode("div",null,[n.createVNode(ay),P[6]||(P[6]=n.createTextVNode()),P[7]||(P[7]=n.createElementVNode("div",null,"No Data To Show",-1))])],4)):n.createCommentVNode("",!0),P[8]||(P[8]=n.createTextVNode()),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(O.value,(U,N)=>(n.openBlock(),n.createBlock(ly,{key:N,visible:U.visible,height:U.height,index:N,style:n.normalizeStyle({gridTemplateColumns:v.value})},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(U.cells,(S,M)=>(n.openBlock(),n.createBlock(jm,{key:M,cell:S,"show-context-options":j.settings.showContextOptions,"cell-events":j.settings.cellEvents,onClick:n.withModifiers(W=>j.$emit("click:cell",S),["stop"]),"onDelete:row":P[3]||(P[3]=W=>j.$emit("delete:row",W)),"onUpdate:value":P[4]||(P[4]=W=>j.$emit("update:value",W))},{default:n.withCtx(()=>[S.slot?n.renderSlot(j.$slots,S.colName,n.mergeProps({key:0,ref_for:!0},S),()=>[n.createTextVNode(n.toDisplayString(S.value),1)]):n.renderSlot(j.$slots,"default",n.mergeProps({key:1,ref_for:!0},S),()=>[n.createTextVNode(n.toDisplayString(S.value),1)])]),_:2},1032,["cell","show-context-options","cell-events","onClick"]))),128))]),_:2},1032,["visible","height","index","style"]))),128))],544)],544))}}),my={class:"context-menu"},gy=["onClick"],yy=n.defineComponent({__name:"Menu",props:{options:{}},emits:["close"],setup(i,{emit:e}){const t=e,a=s=>{s.cb(),t("close")};return(s,c)=>(n.openBlock(),n.createElementBlock("div",my,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.options,(d,u)=>(n.openBlock(),n.createElementBlock("div",{key:u,onClick:n.withModifiers(p=>a(d),["stop"])},[n.createElementVNode("span",null,n.toDisplayString(d.text),1)],8,gy))),128))]))}}),_y=Kn(yy,[["__scopeId","data-v-12530966"]]);function $s(i,e){i.preventDefault();const t=()=>{n.render(null,document.body)},a=n.h(_y,{options:e,onClose:()=>{t()}});n.render(a,document.body);const s=a.el;return s.style.top=i.clientY+"px",s.style.left=i.clientX+"px",document.addEventListener("click",c=>{s.contains(c.target)||t()}),t}const Bd=Symbol(),Ko=()=>n.inject(Bd),wy=["value"],by={key:1},ky=n.defineComponent({__name:"BaseCellComponent",props:{modelValue:{},valueType:{},editable:{type:Boolean}},emits:["update:modelValue"],setup(i,{emit:e}){const t=e,a=i,s=n.reactive({edit:!1}),c=n.computed(()=>a.valueType),d=h=>{var g;let v=(g=h.target)==null?void 0:g.value;const T=n.unref(c),B=dd(()=>T==="integer"?parseInt(v,10):T==="float"?Number(v):v);t("update:modelValue",B),s.edit=!1},u=n.ref(),p=h=>{!h.metaKey&&a.editable&&(s.edit=!0,requestAnimationFrame(()=>{var g,v;(v=(g=u.value)==null?void 0:g.querySelector("input"))==null||v.focus()}))};return(h,g)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"baseRef",ref:u,class:n.normalizeClass(["base-cell",{"base-cell__edit":s.edit}]),onClick:p},[s.edit?(n.openBlock(),n.createElementBlock("input",{key:0,value:h.modelValue,onFocusout:g[0]||(g[0]=v=>s.edit=!1),onChange:d},null,40,wy)):(n.openBlock(),n.createElementBlock("div",by,n.toDisplayString(h.modelValue),1))],2))}}),vy=["^data-row-index"],xy={key:0,class:"control-cell"},Cy=n.defineComponent({__name:"TdCell",props:{cell:{}},setup(i){const e=i,t=Ko(),a=n.computed(()=>e.cell.column.valueType),s=h=>{Gn(t.settings.value.onUpdatedRow,g=>{const v=e.cell.row,T={...v.dataRow,[e.cell.id]:h};g({...v,dataRow:T})})},c=h=>{h.metaKey&&t.selectRow(e.cell.row.primaryKey)},d=(h,g)=>{if(h.type==="contextmenu")h.preventDefault();else return;const v=t.settings??{},T=[],{onSelectedRows:B,onSelectedColumns:O}=v.value,C=t.data.selectedRows.has(g.primaryKey);B&&B.length&&(C?T.push({text:"Deselect row",cb(){t.data.selectedRows.delete(e.cell.row.primaryKey)}}):T.push({text:"Select row",cb(){t.selectRow(e.cell.row.primaryKey)}})),O&&O.length&&(T.push({text:"Select column",cb(){t.selectColumn(e.cell.column.id)}}),T.push({text:"Unselect column",cb(){t.unselectColumn(e.cell.column.id)}})),T.length&&$s(h,T)},u=n.ref(),p=n.computed(()=>e.cell.column.component?e.cell.column.component():void 0);return(h,g)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"cellRef",ref:u,class:n.normalizeClass(["td-cell",{[h.cell.class]:!0}]),"^data-row-index":h.cell.row.index,onClick:c,onContextmenu:g[0]||(g[0]=v=>d(v,h.cell.row))},[h.cell.control?(n.openBlock(),n.createElementBlock("div",xy,n.toDisplayString(h.cell.row.index),1)):p.value?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(p.value),{key:1,"model-value":h.cell.value,"onUpdate:modelValue":s},null,8,["model-value"])):(n.openBlock(),n.createBlock(ky,{key:2,"model-value":h.cell.value,"value-type":a.value,editable:h.cell.column.editable,"onUpdate:modelValue":s},null,8,["model-value","value-type","editable"]))],42,vy))}}),Ey={},Sy={width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ty(i,e){return n.openBlock(),n.createElementBlock("svg",Sy,e[0]||(e[0]=[n.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),n.createTextVNode(),n.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 Vy=Kn(Ey,[["render",Ty]]),By={class:"tr-head"},Ny=n.defineComponent({__name:"TrHead",setup(i){return(e,t)=>(n.openBlock(),n.createElementBlock("div",By,[n.renderSlot(e.$slots,"default")]))}});function Oy(i,e){const t=e.indexOf(i)+1;return e[t>=e.length?0:t]}function Ay(i,e){const t=i.findIndex(e);if(t<0)return[];const a=(()=>{for(let s=t;s<i.length;s++)if(!e(i[s],s))return s;return i.length})();return i.slice(t,a)}const Ry=["^data-col-id"],Dy=n.defineComponent({__name:"ThCell",props:{col:{}},emits:["delete:column","expand:column","change:sort"],setup(i,{emit:e}){const t=e;function a(c){c.preventDefault();const d=[];d.length&&$s(c,d)}function s(c){var d;const u=((d=c.sort)==null?void 0:d.direction)??"DESC";t("change:sort",{colId:c.id,direction:Oy(u,["DESC","ASC"])})}return(c,d)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["cell th-cell",{"justify-center":c.col.justify,frozen:c.col.frozen}]),"^data-col-id":c.col.id,onContextmenu:a},[c.col.valueType?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(c.col.valueType)},null,2)):n.createCommentVNode("",!0),n.createTextVNode(" "+n.toDisplayString(c.col.label)+" ",1),c.col.sort?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["sort",c.col.sort.direction]),onClick:d[0]||(d[0]=n.withModifiers(()=>s(c.col),["stop"]))},null,2)):n.createCommentVNode("",!0)],42,Ry))}}),Iy=n.defineComponent({__name:"TrBody",props:{row:{}},setup(i){const e=n.ref(),t=()=>{n.nextTick().then(()=>{Gn(e.value,a=>a.scrollLeft=0)})};return(a,s)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"trRef",ref:e,class:n.normalizeClass(["tr-body",{selected:a.row.selected}]),scroll:"no",style:n.normalizeStyle(a.row.style),onScroll:t},[n.renderSlot(a.$slots,"default")],38))}}),My=n.defineComponent({__name:"ColumnCaret",props:{column:{}},setup(i){const e=Ko(),t=i,a=n.computed(()=>e.data.selectedColumns.has(t.column.id));return(s,c)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["column-caret",{selected:a.value,frozen:s.column.frozen}])},null,2))}});function Py(i){n.onMounted(()=>window.addEventListener("mouseup",i)),n.onUnmounted(()=>window.removeEventListener("mouseup",i))}function Ly(i,e){let t;function a(c){t={...c}}Py(()=>{t=void 0,e()});const s=ld(i);return Ge(window,"mousemove",c=>{t&&s({x:t.x,width:t.width,diff:c.x-t.x})}),{start:a}}const Kr=1,Fy=10,$y=30,Nd=60;function zy(i){var e;const t=Gn((e=n.unref(i))==null?void 0:e.querySelectorAll(".th-cell"),a=>[...a])??[];return t.map(a=>{const{width:s,x:c}=a.getBoundingClientRect(),d=a.getAttribute("data-col-id");return Ns({colId:d,width:s,x:c,right:c+s})}).slice(0,t.length-1)}function Zy(i,e){const t=Ds(),a=Is(e,{}),{data:s}=i,c=Ly(u=>{Gn(s.resizeTh,p=>{const h=s.columns.find(g=>g.id===p.colId);h&&(h.width=Zi(u.width+u.diff,$y,1e4),i.adjustWidth())})},()=>{s.resize=!1,s.resizeTh=void 0,document.body.style.cursor=""}),d=u=>{s.resizeTh&&(s.resize=!0,c.start({x:u.x,width:s.resizeTh.width}))};return n.watchEffect(()=>{if(!a.value){document.body.style.cursor="";return}if(s.resize)return;const u=zy(e).find(p=>Math.abs(t.x-p.right)<Fy);u?(document.body.style.cursor="col-resize",s.resizeTh=u):(s.resizeTh=void 0,document.body.style.cursor="")}),{mouseDown:d}}const Uy={key:0,class:"command-menu"},jy={key:0},Wy=["onClick"],Hy=n.defineComponent({__name:"RowsCommandMenu",setup(i){const e=Ko(),t=n.computed(()=>e.getSelectedRows()),a=n.computed(()=>t.value.length>0),s=n.computed(()=>{var d;return((d=e.settings)==null?void 0:d.value.onSelectedRows)??[]}),c=n.computed(()=>s.value.map(d=>({label:d.label,cb:()=>{d.cb(t.value),e.data.selectedRows.clear(),e.data.rows=[]}})));return(d,u)=>a.value?(n.openBlock(),n.createElementBlock("div",Uy,[t.value.length?(n.openBlock(),n.createElementBlock("span",jy,n.toDisplayString(t.value.length)+" rows selected",1)):n.createCommentVNode("",!0),u[0]||(u[0]=n.createTextVNode()),u[1]||(u[1]=n.createElementVNode("hr",null,null,-1)),u[2]||(u[2]=n.createTextVNode()),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(c.value,(p,h)=>(n.openBlock(),n.createElementBlock("span",{key:h,class:"command",onClick:n.withModifiers(p.cb,["stop"])},n.toDisplayString(p.label),9,Wy))),128))])):n.createCommentVNode("",!0)}}),qy={key:0,class:"command-menu"},Gy={key:0},Ky=["onClick"],Yy=n.defineComponent({__name:"ColumnsCommandMenu",setup(i){const e=Ko(),t=n.computed(()=>e.getSelectedColumns()),a=n.computed(()=>t.value.length>0),s=n.computed(()=>{var d;return((d=e.settings)==null?void 0:d.value.onSelectedColumns)??[]}),c=n.computed(()=>s.value.map(d=>({label:d.label,cb:()=>{d.cb(t.value),e.data.selectedColumns.clear()}})));return(d,u)=>a.value?(n.openBlock(),n.createElementBlock("div",qy,[t.value.length?(n.openBlock(),n.createElementBlock("span",Gy,"selected columns "+n.toDisplayString(t.value.length),1)):n.createCommentVNode("",!0),u[0]||(u[0]=n.createTextVNode()),u[1]||(u[1]=n.createElementVNode("hr",null,null,-1)),u[2]||(u[2]=n.createTextVNode()),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(c.value,(p,h)=>(n.openBlock(),n.createElementBlock("span",{key:h,class:"command",onClick:n.withModifiers(p.cb,["stop"])},n.toDisplayString(p.label),9,Ky))),128))])):n.createCommentVNode("",!0)}});function Yn(i,e){const t={el:void 0,x:0,y:0},a=s=>({x:s.x,y:s.y,dx:s.x-t.x,dy:s.y-t.y});Ge(document,"mousedown",s=>{s.target===n.unref(i)&&(s.stopPropagation&&s.stopPropagation(),s.preventDefault&&s.preventDefault(),t.el=n.unref(i),t.x=s.x,t.y=s.y)}),Ge(document,"mouseup",s=>{t.el&&(t.el=void 0,e({...a(s),stop:!0},t))}),Ge(document,"mousemove",s=>{t.el&&e(a(s),t)})}const Jy=n.defineComponent({__name:"TScroll",props:{offset:{},windowSize:{},dataSize:{}},emits:["change:offset"],setup(i,{emit:e}){const t=e,a=i,s=n.ref(),c=n.computed(()=>a.windowSize-12),d=n.computed(()=>a.windowSize<a.dataSize),u=n.computed(()=>Math.ceil(a.offset*(c.value/a.dataSize))),p=n.computed(()=>Math.ceil(c.value*c.value/a.dataSize)),h=n.computed(()=>({top:`${u.value}px`,height:`${p.value}px`}));return Yn(s,(g,v)=>{const T=(u.value+g.dy)*a.dataSize/c.value;t("change:offset",T),v.x=g.x,v.y=g.y}),(g,v)=>(n.openBlock(),n.createElementBlock("div",{class:"t-scroll",style:n.normalizeStyle({height:`${g.windowSize}px`})},[n.createElementVNode("div",null,[d.value?(n.openBlock(),n.createElementBlock("div",{key:0,ref_key:"handleRef",ref:s,class:"t-scroll__handle",style:n.normalizeStyle(h.value)},null,4)):n.createCommentVNode("",!0)])],4))}});function Xy(i){return n.computed(()=>{const{data:e,settings:t}=i,{bodyWidth:a,scrollLeft:s}=e,c=[...e.columns],d=_d();t.value.controlColumn&&c.unshift({id:d,label:"#",width:60,frozen:!0});let u=0;const p=c.map(g=>{const v={...g,offset:u};return u+=g.width+Kr,v}),h=p.filter(g=>g.frozen);return jg(p,g=>g.frozen?!1:s<g.offset+g.width&&g.offset<a+s).concat(h).map(g=>({...g,style:{left:g.frozen?`${g.offset}px`:`${g.offset-e.scrollLeft}px`,width:`${g.width}px`},control:g.id===d}))})}function Qy(i,e){const t=n.computed(()=>e.value.reduce((a,s)=>(a[s.id]=s.justify?"justify-"+s.justify:"",a),{}));return n.computed(()=>i.rows.map(a=>{const s=t.value,{primaryKey:c,offset:d,dataRow:u,height:p}=a,h=e.value.map(g=>({id:g.id,column:g,row:a,value:u[g.id],class:s[g.id],editable:g.editable,width:g.width,style:g.style,control:g.control}));return Ns({style:{top:`${d-i.scrollTop}px`,height:`${a.height}px`},primaryKey:c,offset:d,height:p,cells:h,selected:i.selectedRows.has(c)})}))}const e_=async(i,e)=>{const{scrollTop:t,bodyHeight:a}=i;return await qo(0),hd({rows:e.getRows(t,a),dataWindow:i})};function t_(i){const e=n.reactive({rowIndex:-1,columns:[],pendingLoads:0,currentWindow:void 0,rows:[],resize:!1,resizeTh:void 0,dataHeight:0,bodyHeight:i.settings.height,bodyWidth:0,scrollTop:0,scrollLeft:0,selectedRows:new Set,selectedColumns:new Set});n.watch(()=>i.settings,g=>{e.columns=ji(g.columns),e.currentWindow=void 0,g.dataSource.getHeight().then(v=>{e.dataHeight=v,h.updateBodyHeight()}).catch(v=>e.error=v)},{immediate:!0});const t=n.computed(()=>i.settings),a=n.computed(()=>e.columns.reduce((g,v)=>g+v.width+Kr,0)),s=n.computed(()=>Bs(h.data.dataHeight-h.data.bodyHeight,g=>g>0?g:0)),c=n.computed(()=>Bs(a.value-h.data.bodyWidth,g=>g>0?g:0)),d=n.computed(()=>({bodyHeight:e.bodyHeight,scrollTop:e.scrollTop,current:e.currentWindow})),u=Xy({data:e,settings:t}),p=Qy(e,u),h={data:e,settings:t,tableColumns:u,tableRows:p,adjustWidth:()=>{const g=e.columns.reduce((T,B)=>T+B.width+Kr,0),v=e.bodyWidth+e.scrollLeft;if(g<v){const T=e.columns[e.columns.length-1];T.width=T.width+(v-g)}},updateOffsets(g){this.updateScrollTop(e.scrollTop+g.deltaY),this.updateScrollLeft(e.scrollLeft+g.deltaX)},getSelectedRows(){return e.rows.filter(g=>e.selectedRows.has(g.primaryKey))},getSelectedColumns(){return e.columns.filter(g=>e.selectedColumns.has(g.id))},selectRow(g){e.selectedRows.add(g)},unselectRow(g){e.selectedRows.delete(g)},selectColumn(g){e.selectedColumns.add(g)},unselectColumn(g){e.selectedColumns.delete(g)},updateScrollTop(g){e.scrollTop=Zi(g,0,s.value)},updateScrollLeft(g){e.scrollLeft=Zi(g,0,c.value)},updateBodyHeight(){const{height:g}=i.settings,{dataHeight:v}=e,T=g>v?v:g;e.bodyHeight=T},updateDimensions(g){this.updateBodyHeight(),h.data.bodyWidth=g.width,h.adjustWidth(),e.rows=[],e.currentWindow=void 0}};return n.watch(d,(g,v)=>{const T=g.current;(!T||g.scrollTop<T.scrollTop||g.scrollTop+g.bodyHeight>T.bodyHeight+T.scrollTop)&&(e.currentWindow={scrollTop:g.scrollTop-Nd,bodyHeight:g.bodyHeight+Nd*2},e_(ji(e.currentWindow),t.value.dataSource).then(({rows:B,dataWindow:O})=>{Os(e.currentWindow,O)&&(e.rows=B)}))},{deep:!0,immediate:!0}),n.provide(Bd,h),h}const n_={class:"command-menu__container"},r_={key:0,class:"table-body__no-data"},i_={class:"carets"},zs=n.defineComponent({__name:"TableComponent",props:{settings:{}},emits:["update:data","change:sort"],setup(i,{emit:e}){const t=e,a=i,s=t_(a),c=n.computed(()=>s.data.rows.length===0),d=n.computed(()=>({height:c.value?"212px":s.data.bodyHeight+"px"}));n.watch(s.data,C=>t("update:data",C),{deep:!0}),n.watch(a,()=>g);const u=n.ref(),p=n.ref(),h=n.ref(),g=()=>{Gn(h.value,C=>{s.updateDimensions(C.getBoundingClientRect())})},v=s.tableColumns,T=s.tableRows,{mouseDown:B}=Zy(s,u);n.onMounted(()=>{n.nextTick(g)}),n.watchPostEffect(()=>{n.unref(a.settings),n.nextTick(g)}),Ge(window,"resize",()=>n.nextTick(g));const O=C=>{C.preventDefault(),s.updateOffsets(C)};return(C,A)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"tableRef",ref:u,class:"data-table",onMousedown:A[2]||(A[2]=(...b)=>n.unref(B)&&n.unref(B)(...b))},[n.createElementVNode("div",n_,[n.createVNode(Hy),A[3]||(A[3]=n.createTextVNode()),n.createVNode(Yy)]),A[7]||(A[7]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"headRef",ref:p,class:"table-head"},[n.createVNode(Ny,null,{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(v),(b,D)=>(n.openBlock(),n.createBlock(Dy,{key:D,col:b,style:n.normalizeStyle(b.style),"onChange:sort":A[0]||(A[0]=$=>C.$emit("change:sort",$))},null,8,["col","style"]))),128))]),_:1})],512),A[8]||(A[8]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"bodyRef",ref:h,class:"table-body",style:n.normalizeStyle(d.value),onWheel:O},[c.value?(n.openBlock(),n.createElementBlock("div",r_,[n.createElementVNode("div",null,[n.createVNode(Vy),A[4]||(A[4]=n.createTextVNode()),A[5]||(A[5]=n.createElementVNode("div",null,"No Data To Show",-1))])])):n.createCommentVNode("",!0),A[6]||(A[6]=n.createTextVNode()),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(T),(b,D)=>(n.openBlock(),n.createBlock(Iy,{key:D,row:b},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(b.cells,$=>(n.openBlock(),n.createBlock(Cy,{key:$.column.id+":"+D,cell:$,style:n.normalizeStyle($.style)},null,8,["cell","style"]))),128))]),_:2},1032,["row"]))),128))],36),A[9]||(A[9]=n.createTextVNode()),n.createElementVNode("div",i_,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(v),(b,D)=>(n.openBlock(),n.createBlock(My,{key:D,column:b,style:n.normalizeStyle(b.style),"onChange:sort":A[1]||(A[1]=$=>C.$emit("change:sort",$))},null,8,["column","style"]))),128))]),A[10]||(A[10]=n.createTextVNode()),n.createVNode(Jy,{offset:n.unref(s).data.scrollTop,"window-size":n.unref(s).data.bodyHeight,"data-size":n.unref(s).data.dataHeight,"onChange:offset":n.unref(s).updateScrollTop},null,8,["offset","window-size","data-size","onChange:offset"])],544))}}),Od=new WeakMap;class o_{constructor(e,t,a){Pm(this,"dataHeight"),this.datum=e,this.resolveHeight=t,this.resolvePrimaryKey=a;const s=e.reduce((d,u,p)=>(d.indices.set(p,d.total),d.total+=this.resolveHeight(u,p)+Kr,d),{total:0,indices:new Map});this.dataHeight=s.total;const c=e.map((d,u)=>({dataRow:d,index:u,primaryKey:this.resolvePrimaryKey(d,u),offset:Vs(s.indices.get(u)),height:this.resolveHeight(d,u)}));Od.set(this,c)}get rows(){return Od.get(this)}async getHeight(){return this.dataHeight}async getRows(e,t){return Ay(this.rows,a=>{const s=a.offset;return e<s+a.height&&s<t+e})}}class a_{constructor(e,t,a){this.api=e,this.rowHeight=t,this.resolvePrimaryKey=a}get height(){return this.rowHeight+Kr}async getHeight(){return await this.api.count()*this.height}async getRows(e,t){const a=Zi(Math.floor(e/this.height),0,Number.POSITIVE_INFINITY),s=Math.ceil(t+40/this.height);return(await this.api.query({offset:a,limit:s})).map((c,d)=>({dataRow:c,index:a+d,primaryKey:this.resolvePrimaryKey(c,a+d),offset:(a+d)*(this.rowHeight+Kr),height:this.rowHeight}))}}function s_(i){return Object.freeze(i)}function l_(i){return n.h(zs,{settings:Object.freeze(i)})}function Zs(i,e){const t=new o_(i,e.resolveRowHeight,e.resolvePrimaryKey);return{...e,dataSource:t}}function c_(i,e){return n.computed(()=>{const t=n.unref(i);return Zs(t,n.unref(e))})}function d_(i,e){const t=n.computed(()=>{const s=n.unref(i);return Zs(s,n.unref(e))}),a=n.reactive({settings:t});return n.computed(()=>n.h(zs,a))}const u_=Object.freeze(Object.defineProperty({__proto__:null,AsyncData:a_,Component:zs,factory:l_,rawDataSettings:Zs,settings:s_,useRawData:c_,useRawDataComponent:d_},Symbol.toStringTag,{value:"Module"}));function*f_(i,e){for(const t of i)yield e(t)}function p_(i){const e=[];for(const t of i)e.push(t);return e}const Us=new Map;function h_(i){return Us.has(i)||Us.set(i,n.ref(localStorage.getItem(i))),Ms(Us.get(i),"...")}function m_(i,e){e==null?localStorage.removeItem(i):localStorage.setItem(i,e)}function Ad(i){const e=h_(i);return n.watch(e,t=>m_(i,t)),e}const js=new Set;window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",i=>{p_(f_(js.values(),e=>e(i.matches?"dark":"light")))});const g_=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",Rd=n.ref(g_),Ws=Ad("theme");function Dd(i){const e=n.computed(()=>Ws.value?Ws.value:Rd.value),t=s=>{Rd.value=s,i&&i(s)};function a(){Ws.value=e.value==="light"?"dark":(e.value,"light")}return n.watch(e,s=>{i&&i(n.unref(s))}),n.onMounted(()=>{js.add(t)}),n.onUnmounted(()=>{js.delete(t)}),[e,a]}const y_=n.defineComponent({__name:"ThemeSwitcher",setup(i){const[e,t]=Dd();return(a,s)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["ui-theme-switcher",n.unref(e)]),onClick:s[0]||(s[0]=(...c)=>n.unref(t)&&n.unref(t)(...c))},s[1]||(s[1]=[n.createElementVNode("div",null,null,-1)]),2))}}),__={class:"pl-layout-component pl-block-page"},w_={key:0,class:"pl-block-page__title"},b_={class:"pl-block-page__title__append"},k_={key:1},v_={class:"pl-block-page__body"},x_={name:"PlBlockPage"},C_=n.defineComponent({...x_,setup(i){const e=n.useSlots();return(t,a)=>(n.openBlock(),n.createElementBlock("div",__,[n.unref(e).title?(n.openBlock(),n.createElementBlock("div",w_,[n.createElementVNode("h1",null,[n.renderSlot(t.$slots,"title")]),a[0]||(a[0]=n.createTextVNode()),n.createElementVNode("div",b_,[n.renderSlot(t.$slots,"append")])])):(n.openBlock(),n.createElementBlock("div",k_)),a[1]||(a[1]=n.createTextVNode()),n.createElementVNode("div",v_,[n.renderSlot(t.$slots,"default")])]))}}),E_={name:"PlContainer"},S_=n.defineComponent({...E_,props:{width:{}},setup(i){const e=i,t=n.computed(()=>({width:e.width}));return(a,s)=>(n.openBlock(),n.createElementBlock("div",{class:"pl-container pl-layout-component",style:n.normalizeStyle(t.value)},[n.renderSlot(a.$slots,"default")],4))}}),T_={name:"PlRow"},V_=n.defineComponent({...T_,props:{wrap:{type:Boolean},alignCenter:{type:Boolean}},setup(i){return(e,t)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["pl-layout-component pl-row",{wrap:e.wrap,"align-center":e.alignCenter}])},[n.renderSlot(e.$slots,"default")],2))}}),B_={class:"pl-layout-component",style:{"flex-grow":"1"}},N_={name:"PlSpacer"},O_=n.defineComponent({...N_,setup(i){return(e,t)=>(n.openBlock(),n.createElementBlock("div",B_))}}),A_={name:"PlGrid"},R_=n.defineComponent({...A_,props:{columns:{}},setup(i){const e=i,t=n.computed(()=>({gridTemplateColumns:`repeat(${e.columns}, minmax(0, 1fr))`}));return(a,s)=>(n.openBlock(),n.createElementBlock("div",{class:"pl-layout-component pl-grid",style:n.normalizeStyle(t.value)},[n.renderSlot(a.$slots,"default")],4))}}),D_={key:0,class:"pl-alert__icon"},I_={class:"pl-alert__main"},M_={key:0},P_={class:"pl-alert__main__text"},L_={name:"PlAlert"},F_=n.defineComponent({...L_,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(i){const e={success:"success",warn:"warning",info:"edit",error:"error"};return(t,a)=>t.modelValue?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["pl-alert",[{monospace:t.monospace,whiteSpacePre:t.whiteSpacePre},t.type?`pl-alert__${t.type}`:""]]),style:n.normalizeStyle({maxHeight:t.maxHeight})},[t.icon&&t.type?(n.openBlock(),n.createElementBlock("div",D_,[n.createElementVNode("div",{class:n.normalizeClass(`icon-24 icon-${e[t.type]}`)},null,2)])):n.createCommentVNode("",!0),a[2]||(a[2]=n.createTextVNode()),n.createElementVNode("div",I_,[t.label?(n.openBlock(),n.createElementBlock("label",M_,n.toDisplayString(t.label),1)):n.createCommentVNode("",!0),a[1]||(a[1]=n.createTextVNode()),n.createElementVNode("div",P_,[n.renderSlot(t.$slots,"default")])]),a[3]||(a[3]=n.createTextVNode()),t.closeable?(n.openBlock(),n.createElementBlock("div",{key:1,class:"pl-alert__close-btn","aria-label":"Close alert",role:"button",onClick:a[0]||(a[0]=s=>t.$emit("update:modelValue",!1))})):n.createCommentVNode("",!0)],6)):n.createCommentVNode("",!0)}}),Wi=n.defineComponent({__name:"MaskIcon16",props:{name:{},size:{}},setup(i){const e=i,t=n.computed(()=>e.size==="large"?"--mask-size: 24px":""),a=n.computed(()=>`mask-16 mask-${e.name}`);return(s,c)=>(n.openBlock(),n.createElementBlock("i",{style:n.normalizeStyle(t.value),class:n.normalizeClass(a.value)},null,6))}});function Id(i){function e(t){const a=t.currentTarget,s=document.createElement("span"),c=Math.max(a.clientWidth,a.clientHeight),d=c/2;s.style.width=s.style.height=`${c}px`,s.style.left=`${t.clientX-a.offsetLeft-d}px`,s.style.top=`${t.clientY-a.offsetTop-d}px`,s.classList.add("ripple");const u=a.getElementsByClassName("ripple")[0];u&&u.remove(),a.appendChild(s)}n.onMounted(()=>{var t;(t=i.value)==null||t.addEventListener("click",e)})}const $_={key:0},z_={inheritAttrs:!1},Yo=n.defineComponent({...z_,__name:"BtnBase",props:{loading:{type:Boolean},small:{type:Boolean},large:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(i){const e=i,t=n.ref(),a=n.computed(()=>e.small||e.size==="small"),s=n.computed(()=>e.large||e.size==="large");return Id(t),(c,d)=>(n.openBlock(),n.createElementBlock("button",n.mergeProps({ref_key:"btn",ref:t,tabindex:"0",class:{loading:c.loading,small:a.value,large:s.value,round:c.round,reverse:c.reverse,justifyCenter:c.justifyCenter,[c.$attrs.class+""]:!0}},{...c.$attrs,disabled:!!c.$attrs.disabled||c.loading}),[c.round?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("span",$_,[n.renderSlot(c.$slots,"default")])),d[0]||(d[0]=n.createTextVNode()),c.loading?(n.openBlock(),n.createBlock(Wi,{key:1,name:"loading",size:c.size},null,8,["size"])):c.icon?(n.openBlock(),n.createBlock(Wi,{key:2,name:c.icon,size:c.size},null,8,["name","size"])):n.createCommentVNode("",!0)],16))}}),Z_={name:"PlBtnPrimary"},Md=n.defineComponent({...Z_,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(i){const e=i;return(t,a)=>(n.openBlock(),n.createBlock(Yo,n.mergeProps({class:"pl-btn-primary"},e),{default:n.withCtx(()=>[n.renderSlot(t.$slots,"default")]),_:3},16))}}),U_={name:"PlBtnAccent"},j_=n.defineComponent({...U_,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(i){const e=i;return(t,a)=>(n.openBlock(),n.createBlock(Yo,n.mergeProps({class:"pl-btn-accent"},e),{default:n.withCtx(()=>[n.renderSlot(t.$slots,"default")]),_:3},16))}}),W_={name:"PlBtnDanger"},H_=n.defineComponent({...W_,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(i){const e=i;return(t,a)=>(n.openBlock(),n.createBlock(Yo,n.mergeProps({class:"pl-btn-danger"},e),{default:n.withCtx(()=>[n.renderSlot(t.$slots,"default")]),_:3},16))}}),q_={name:"PlBtnSecondary"},Hs=n.defineComponent({...q_,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(i){const e=i;return(t,a)=>(n.openBlock(),n.createBlock(Yo,n.mergeProps(e,{class:"pl-btn-secondary"}),{default:n.withCtx(()=>[n.renderSlot(t.$slots,"default")]),_:3},16))}}),G_={key:0},K_={name:"PlBtnGhost"},Pd=n.defineComponent({...K_,props:{loading:{type:Boolean},size:{default:void 0},round:{type:Boolean},icon:{default:void 0},reverse:{type:Boolean},justifyCenter:{type:Boolean,default:!1}},setup(i){const e=i,t=n.computed(()=>e.size==="small"),a=n.computed(()=>e.size==="large"),s=n.ref(),c=n.useSlots();return Id(s),(d,u)=>(n.openBlock(),n.createElementBlock("button",n.mergeProps({ref_key:"btnRef",ref:s,tabindex:"0",class:["ui-btn-ghost",{loading:d.loading,small:t.value,large:a.value,round:d.round,reverse:d.reverse,justifyCenter:d.justifyCenter,[d.$attrs.class+""]:!0}]},{...d.$attrs,disabled:!!d.$attrs.disabled||d.loading}),[n.unref(c).default&&!d.round?(n.openBlock(),n.createElementBlock("span",G_,[n.renderSlot(d.$slots,"default")])):n.createCommentVNode("",!0),u[0]||(u[0]=n.createTextVNode()),d.loading?(n.openBlock(),n.createBlock(Wi,{key:1,name:"loading",size:d.size},null,8,["size"])):d.icon?(n.openBlock(),n.createBlock(Wi,{key:2,name:d.icon,size:d.size},null,8,["name","size"])):n.createCommentVNode("",!0)],16))}}),Y_=n.defineComponent({__name:"PlBtnLink",props:{loading:{type:Boolean},size:{},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean},disabled:{type:Boolean}},setup(i){const e=i,t=n.ref(!1);return(a,s)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["ui-btn-link",{disabled:a.disabled,loading:a.loading,hover:t.value}]),onMouseover:s[0]||(s[0]=c=>t.value=!0),onMouseleave:s[1]||(s[1]=c=>t.value=!1)},[n.createVNode(Hs,n.mergeProps({round:"",hover:t.value},e),null,16,["hover"]),s[2]||(s[2]=n.createTextVNode()),n.renderSlot(a.$slots,"default")],34))}});function Ld(i,e){const t=Ps(()=>{if(i.value){const{scrollTop:a,scrollLeft:s,scrollHeight:c,scrollWidth:d,clientHeight:u,clientWidth:p}=document.documentElement,h=i.value.getBoundingClientRect();e({scrollTop:a,scrollLeft:s,scrollHeight:c,scrollWidth:d,clientHeight:u,clientWidth:p,offsetY:a+h.y,offsetX:s+h.x,top:h.top,right:h.right,bottom:h.bottom,left:h.left,width:h.width,height:h.height,x:h.x,y:h.y})}});n.onMounted(t),Ge(window,"scroll",t,!0),Ge(window,"resize",t,!0),Ge(window,"adjust",t,!0)}function J_(i,e){const t=n.ref();return Ld(i,a=>{t.value=a}),n.computed(()=>{const a=n.unref(t),s=n.unref(e),c=s.position??"top",d=s.gap??8;if(!a)return"";const u=a.offsetY+Math.floor(a.height/2),p=a.offsetX+Math.floor(a.width/2);return c==="top-left"?`left: ${a.offsetX}px; top: ${a.offsetY-d}px;`:c==="top"?`left: ${p}px; top: ${a.offsetY-d}px;`:c==="right"?`left: ${a.offsetX+a.width+d}px; top: ${u}px;`:c==="left"?`right: ${a.scrollWidth-a.x+d}px; top: ${u}px;`:""})}function Jo(i,e){return e(i)}function at(i,e){if(i!=null)return e(i)}function X_(i){return Array.isArray(i)?i:[i]}function Q_(i,e,...t){t.forEach(a=>{i[a]=e[a]})}function Xo(i,e){Ge(document,"click",t=>{document.contains(t.target)&&(X_(i).map(a=>a.value).filter(a=>!!a).some(a=>a==null?void 0:a.contains(t.target))||e())})}const e0={},t0={class:"beak",width:"5",height:"9",viewBox:"0 0 3 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function n0(i,e){return n.openBlock(),n.createElementBlock("svg",t0,e[0]||(e[0]=[n.createElementVNode("path",{d:"M4.00222 8.00933L0 4.00711L4.00222 0.00488281L4.00222 8.00933Z",fill:"#24223D"},null,-1)]))}const r0=Kn(e0,[["render",n0]]),qs=new Map,i0={name:"PlTooltip"},Zt=n.defineComponent({...i0,props:{openDelay:{default:100},closeDelay:{default:1e3},position:{default:"top"},hide:{type:Boolean},gap:{default:8},element:{default:"div"}},emits:["tooltip:close"],setup(i,{emit:e}){const t=e,a=Symbol(),s=i,c=n.reactive({open:!1,over:!1,tooltipOpen:!1,key:Symbol()});qs.set(a,()=>h()),n.watch(()=>c.open,C=>{requestAnimationFrame(()=>{c.tooltipOpen=C})});let d=()=>{};const u=Ls(()=>window.dispatchEvent(new CustomEvent("adjust")),1e3),p=()=>{c.open=!0;for(let[C,A]of qs.entries())C!==a&&A()},h=()=>{c.open=!1,t("tooltip:close")},g=async()=>{s.hide||(u(),c.over=!0,d(),await xd(100),c.over&&p())},v=()=>{c.over=!1,d=Cd(()=>{c.over||h()},s.closeDelay)};n.watch(()=>s.hide,C=>{C&&h()});const T=n.ref(),B=n.ref(),O=J_(T,n.toRef(s));return Xo([T,B],()=>h()),n.onUnmounted(()=>{qs.delete(a)}),(C,A)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(C.element),n.mergeProps(C.$attrs,{ref_key:"rootRef",ref:T,onClick:g,onMouseover:g,onMouseleave:v}),{default:n.withCtx(()=>[n.renderSlot(C.$slots,"default"),A[1]||(A[1]=n.createTextVNode()),C.$slots.tooltip&&c.open?(n.openBlock(),n.createBlock(n.Teleport,{key:0,to:"body"},[n.createVNode(n.Transition,{name:"tooltip-transition"},{default:n.withCtx(()=>[c.tooltipOpen?(n.openBlock(),n.createElementBlock("div",{key:0,class:"pl-tooltip__container",style:n.normalizeStyle(n.unref(O))},[n.createElementVNode("div",{ref_key:"tooltip",ref:B,class:n.normalizeClass(["pl-tooltip",C.position]),onMouseover:g,onMouseleave:v},[n.createElementVNode("div",null,[n.renderSlot(C.$slots,"tooltip")]),A[0]||(A[0]=n.createTextVNode()),n.createVNode(r0)],34)],4)):n.createCommentVNode("",!0)]),_:3})])):n.createCommentVNode("",!0)]),_:3},16))}}),o0={},a0={class:"inner-border"};function s0(i,e,t,a,s,c){return n.openBlock(),n.createElementBlock("div",a0,[n.renderSlot(i.$slots,"default")])}const l0=Kn(o0,[["render",s0]]),c0={key:0},d0=["tabindex","onKeydown","onClick"],u0={key:1,class:"ui-btn-group__helper"},f0={key:2,class:"ui-btn-group__error"},p0={name:"PlBtnGroup"},h0=n.defineComponent({...p0,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean},helper:{},error:{}},emits:["update:modelValue"],setup(i,{emit:e}){const t=n.useSlots(),a=e,s=u=>a("update:modelValue",u),c=i,d=n.computed(()=>c.options.map(u=>({label:"label"in u?u.label:u.text,value:u.value})));return(u,p)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["ui-btn-group",{disabled:u.disabled}])},[u.label?(n.openBlock(),n.createElementBlock("label",c0,[n.createElementVNode("span",null,n.toDisplayString(u.label),1),p[0]||(p[0]=n.createTextVNode()),n.unref(t).tooltip?(n.openBlock(),n.createBlock(n.unref(Zt),{key:0,class:"info",position:"top"},{tooltip:n.withCtx(()=>[n.renderSlot(u.$slots,"tooltip")]),_:3})):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),p[1]||(p[1]=n.createTextVNode()),n.createVNode(l0,{class:"ui-btn-group__container"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(d.value,(h,g)=>(n.openBlock(),n.createElementBlock("div",{key:g,class:n.normalizeClass(["ui-btn-group__option",{active:u.modelValue===h.value}]),tabindex:u.modelValue===h.value||u.disabled?void 0:0,onKeydown:n.withKeys(v=>s(h.value),["enter"]),onClick:v=>s(h.value)},n.toDisplayString(h.label),43,d0))),128))]),_:1}),p[2]||(p[2]=n.createTextVNode()),u.helper?(n.openBlock(),n.createElementBlock("div",u0,n.toDisplayString(u.helper),1)):u.error?(n.openBlock(),n.createElementBlock("div",f0,n.toDisplayString(u.error),1)):n.createCommentVNode("",!0)],2))}}),m0={inheritAttrs:!1},g0={class:"double-contour"};function y0(i,e,t,a,s,c){return n.openBlock(),n.createElementBlock("div",g0,[n.createElementVNode("div",n.normalizeProps(n.guardReactiveProps(i.$attrs)),[n.renderSlot(i.$slots,"default")],16)])}const Yr=Kn(m0,[["render",y0]]);function Fd(i){n.onMounted(i),n.onUpdated(i)}const Gs=new WeakMap,Ks=new ResizeObserver(i=>{for(const e of i)at(Gs.get(e.target),t=>t(e))});function $d(i,e){Gs.set(i,e),Ks.unobserve(i),Ks.observe(i)}function zd(i){Ks.unobserve(i),Gs.delete(i)}const _0=8,Zd=4;function xr(i,e="label"){const t=new Set;Fd(()=>{at(i==null?void 0:i.value,a=>{const s=a.querySelector(e);s&&(t.add(s),$d(s,()=>{const c=vd(()=>s.getBoundingClientRect().width+Jo(_0,d=>Number.isNaN(d)?Zd:d+Zd));a.style.getPropertyValue("--label-offset-right-x")!==`${c}px`&&a.style.setProperty("--label-offset-right-x",`${c}px`)}))})}),n.onBeforeUnmount(()=>{Array.from(t.values()).map(a=>zd(a))})}function w0(i,e){const t=[];return e&&e.length>0&&e.forEach(a=>{const s=a(i);typeof s=="string"&&t.push(s)}),{isValid:t.length===0,errors:t}}function Ud(i,e){return n.computed(()=>w0(i.value,e))}const b0={class:"ui-text-field__envelope"},k0={key:0,ref:"label"},v0={key:0,class:"required-icon"},x0={key:1,class:"ui-text-field__prefix"},C0=["disabled","placeholder"],E0={class:"ui-text-field__append"},S0={key:0,class:"ui-text-field__error"},T0={key:1,class:"ui-text-field__helper"},V0={name:"PlTextField"},jd=n.defineComponent({...V0,props:{modelValue:{},label:{},clearable:{type:[Boolean,Function]},required:{type:Boolean},error:{},helper:{},placeholder:{},disabled:{type:Boolean},dashed:{type:Boolean},prefix:{},rules:{}},emits:["update:modelValue"],setup(i,{emit:e}){const t=n.useSlots(),a=e,s=i,c=n.ref(void 0),d=n.ref(),u=n.computed({get(){return s.modelValue??""},set(O){a("update:modelValue",O)}}),p=()=>{s.clearable&&a("update:modelValue",s.clearable===!0?"":s.clearable())},h=Ud(u,s.rules||[]),g=n.computed(()=>s.clearable?s.clearable===!0?s.modelValue==="":s.modelValue===s.clearable():s.modelValue===""),v=n.computed(()=>!g.value),T=n.computed(()=>{const O=[];return s.error&&O.push(s.error),h.value.isValid||O.push(...h.value.errors),O}),B=n.computed(()=>T.value.length>0);return xr(c),(O,C)=>(n.openBlock(),n.createElementBlock("div",b0,[n.createElementVNode("div",{ref_key:"rootRef",ref:c,class:n.normalizeClass(["ui-text-field",{error:B.value,disabled:O.disabled,dashed:O.dashed,nonEmpty:v.value}])},[O.label?(n.openBlock(),n.createElementBlock("label",k0,[O.required?(n.openBlock(),n.createElementBlock("i",v0)):n.createCommentVNode("",!0),C[1]||(C[1]=n.createTextVNode()),n.createElementVNode("span",null,n.toDisplayString(O.label),1),C[2]||(C[2]=n.createTextVNode()),n.unref(t).tooltip?(n.openBlock(),n.createBlock(n.unref(Zt),{key:1,class:"info",position:"top"},{tooltip:n.withCtx(()=>[n.renderSlot(O.$slots,"tooltip")]),_:3})):n.createCommentVNode("",!0)],512)):n.createCommentVNode("",!0),C[4]||(C[4]=n.createTextVNode()),O.prefix?(n.openBlock(),n.createElementBlock("div",x0,n.toDisplayString(O.prefix),1)):n.createCommentVNode("",!0),C[5]||(C[5]=n.createTextVNode()),n.withDirectives(n.createElementVNode("input",{ref_key:"inputRef",ref:d,"onUpdate:modelValue":C[0]||(C[0]=A=>u.value=A),disabled:O.disabled,placeholder:O.placeholder||"...",type:"text",spellcheck:"false"},null,8,C0),[[n.vModelText,u.value]]),C[6]||(C[6]=n.createTextVNode()),n.createElementVNode("div",E0,[O.clearable&&v.value?(n.openBlock(),n.createElementBlock("div",{key:0,class:"icon icon--clear",onClick:p})):n.createCommentVNode("",!0),C[3]||(C[3]=n.createTextVNode()),n.renderSlot(O.$slots,"append")]),C[7]||(C[7]=n.createTextVNode()),n.createVNode(Yr,{class:"ui-text-field__contour"})],2),C[8]||(C[8]=n.createTextVNode()),B.value?(n.openBlock(),n.createElementBlock("div",S0,n.toDisplayString(T.value.join(" ")),1)):O.helper?(n.openBlock(),n.createElementBlock("div",T0,n.toDisplayString(O.helper),1)):n.createCommentVNode("",!0)]))}}),B0={class:"ui-text-area__envelope"},N0={key:0,ref:"label"},O0={key:0,class:"required-icon"},A0=["readonly","rows","disabled","placeholder"],R0={class:"ui-text-area__append"},D0={key:0,class:"ui-text-area__error"},I0={key:1,class:"ui-text-area__helper"},M0={name:"PlTextArea"},P0=n.defineComponent({...M0,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(i,{emit:e}){const t=n.useSlots(),a=e,s=i,c=n.ref(),d=n.ref(),u=n.computed({get(){return s.modelValue??""},set(B){a("update:modelValue",B)}}),p=n.computed(()=>!!s.modelValue),h=Ud(u,s.rules||[]);xr(c);const g=n.computed(()=>{const B=[];return s.error&&B.push(s.error),B.push(...h.value.errors),B}),v=n.computed(()=>g.value.length>0),T=()=>{if(!s.autogrow)return;const B=d.value;B&&(B.style.height="auto",B.style.height=`${B.scrollHeight}px`)};return n.onMounted(()=>{T()}),(B,O)=>(n.openBlock(),n.createElementBlock("div",B0,[n.createElementVNode("div",{ref_key:"root",ref:c,class:n.normalizeClass(["ui-text-area",{error:v.value,disabled:B.disabled,dashed:B.dashed,nonEmpty:p.value}])},[B.label?(n.openBlock(),n.createElementBlock("label",N0,[B.required?(n.openBlock(),n.createElementBlock("i",O0)):n.createCommentVNode("",!0),O[1]||(O[1]=n.createTextVNode()),n.createElementVNode("span",null,n.toDisplayString(B.label),1),O[2]||(O[2]=n.createTextVNode()),n.unref(t).tooltip?(n.openBlock(),n.createBlock(n.unref(Zt),{key:1,class:"info",position:"top"},{tooltip:n.withCtx(()=>[n.renderSlot(B.$slots,"tooltip")]),_:3})):n.createCommentVNode("",!0)],512)):n.createCommentVNode("",!0),O[3]||(O[3]=n.createTextVNode()),n.withDirectives(n.createElementVNode("textarea",{ref_key:"input",ref:d,"onUpdate:modelValue":O[0]||(O[0]=C=>u.value=C),readonly:B.readonly,rows:B.rows,disabled:B.disabled,placeholder:B.placeholder??"...",spellcheck:"false",onInput:T},null,40,A0),[[n.vModelText,u.value]]),O[4]||(O[4]=n.createTextVNode()),n.createElementVNode("div",R0,[n.renderSlot(B.$slots,"append")]),O[5]||(O[5]=n.createTextVNode()),n.createVNode(Yr,{class:"ui-text-area__contour"})],2),O[6]||(O[6]=n.createTextVNode()),v.value?(n.openBlock(),n.createElementBlock("div",D0,n.toDisplayString(g.value.join(" ")),1)):B.helper?(n.openBlock(),n.createElementBlock("div",I0,n.toDisplayString(B.helper),1)):n.createCommentVNode("",!0)]))}});function Wd(i,e){const t=i.scrollTop,a=i.getBoundingClientRect().height,s=e.offsetTop,c=e.getBoundingClientRect().height;return s+c<a+t&&s>t}function Hd(i,e){const t=i.scrollTop,a=i.getBoundingClientRect().height,s=e.offsetTop,c=e.getBoundingClientRect().height;return s+c<a+t?"ceil":s>t?"floor":"visible"}function Qo(i,e,t={}){const a=i.scrollTop,s=i.getBoundingClientRect().height,c=e.getBoundingClientRect().height,d=e.offsetTop,u=Hd(i,e);if(u==="visible")return;const p=h=>{const g=u==="floor"?d-(s-c):d;i.scrollTop=a+h*(g-a)};Wd(i,e)||Td({duration:t.duration||100,timing:Sd(h=>h),draw:p})}function Ys(i,e,t,a){return i.addEventListener(e,t,a),function(){i.removeEventListener(e,t)}}function L0(i,e){const t=e.getBoundingClientRect();return i.x<t.x||i.x>t.x+t.width||i.y<t.y||i.y>t.y+t.height}function qd(i){return i!==null&&typeof i=="object"}function en(i,e){return qd(i)&&qd(e)?Object.keys(i).length!==Object.keys(e).length?!1:Object.keys(i).every(t=>en(i[t],e[t])):i===e}function Js(i,e){return i.some(t=>en(t,e))}const F0=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
1
+ (function(R,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("@ag-grid-enterprise/core"),require("@ag-grid-community/core"),require("@ag-grid-community/client-side-row-model"),require("@ag-grid-community/infinite-row-model"),require("@ag-grid-enterprise/server-side-row-model"),require("@ag-grid-community/csv-export"),require("@ag-grid-enterprise/clipboard"),require("@ag-grid-enterprise/range-selection"),require("@ag-grid-enterprise/rich-select"),require("@ag-grid-enterprise/menu"),require("@ag-grid-enterprise/excel-export"),require("@ag-grid-community/vue3")):typeof define=="function"&&define.amd?define(["exports","vue","@ag-grid-enterprise/core","@ag-grid-community/core","@ag-grid-community/client-side-row-model","@ag-grid-community/infinite-row-model","@ag-grid-enterprise/server-side-row-model","@ag-grid-community/csv-export","@ag-grid-enterprise/clipboard","@ag-grid-enterprise/range-selection","@ag-grid-enterprise/rich-select","@ag-grid-enterprise/menu","@ag-grid-enterprise/excel-export","@ag-grid-community/vue3"],n):(R=typeof globalThis<"u"?globalThis:R||self,n(R.SdkVueLib={},R.Vue,R.core$1,R.core,R.clientSideRowModel,R.infiniteRowModel,R.serverSideRowModel,R.csvExport,R.clipboard,R.rangeSelection,R.richSelect,R.menu,R.excelExport,R.vue3))})(this,function(R,n,Qe,wr,Mo,dh,$c,uh,zc,Zc,fh,ph,hh,mh){"use strict";var cO=Object.defineProperty;var lh=R=>{throw TypeError(R)};var dO=(R,n,Qe)=>n in R?cO(R,n,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):R[n]=Qe;var Le=(R,n,Qe)=>dO(R,typeof n!="symbol"?n+"":n,Qe),Ic=(R,n,Qe)=>n.has(R)||lh("Cannot "+Qe);var w=(R,n,Qe)=>(Ic(R,n,"read from private field"),Qe?Qe.call(R):n.get(R)),Me=(R,n,Qe)=>n.has(R)?lh("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(R):n.set(R,Qe),fe=(R,n,Qe,wr)=>(Ic(R,n,"write to private field"),wr?wr.call(R,Qe):n.set(R,Qe),Qe),ie=(R,n,Qe)=>(Ic(R,n,"access private method"),Qe);var ss=(R,n,Qe,wr)=>({set _(Mo){fe(R,n,Mo,Qe)},get _(){return w(R,n,wr)}});var Tu,ri,Vu,Bu,on,At,an,sn,ii,oi,rt,ln,nt,Ue,we,bt,Rt,mt,st,cn,lt,dn,un,Dt,fn,or,kt,Y,Mc,Br,An,uo,It,ch,Nr,ai,fo,gr,yr,Pc,ls,cs,We,Lc,Io,_r,Fc;function gh(i,e){if(i==null)throw Error(e??"Empty (null | undefined) value");return i}function yh(i){return i!==null&&typeof i=="object"}function Vn(i){if(Array.isArray(i)){const e=[];for(let t=0;t<i.length;t++)e[t]=Vn(i[t]);return e}else if(yh(i)){const e={};return Object.keys(i).forEach(t=>{e[t]=Vn(i[t])}),e}else return i}function ds(i,e,t=!0){let a=0,s;return function(...c){s=()=>{i.apply(this,c),a=new Date().getTime()+e,s=null,t&&setTimeout(()=>{s&&s()},e)},new Date().getTime()>a&&s()}}function _h(i){let e=0n,t;return async function(...a){const s=++e;try{await t}catch{}if(e!==s)return{ok:!1};const c=i(...a);return t=c,{ok:!0,value:await c}}}var xi=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wh(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var bh=function i(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?i(e.toJSON()):Array.isArray(e)?`[${e.reduce((s,c,d)=>`${s}${d===0?"":","}${i(c===void 0||typeof c=="symbol"?null:c)}`,"")}]`:`{${Object.keys(e).sort().reduce((a,s)=>{if(e[s]===void 0||typeof e[s]=="symbol")return a;const c=a.length===0?"":",";return`${a}${c}${i(s)}:${i(e[s])}`},"")}}`};const Ci=wh(bh);class us extends Error{}class fs extends Error{constructor(e){super(),this.errors=e}toString(){return this.errors.join(",")}}function kh(i){return{ok:!0,value:i}}function Uc(i){if(!i)throw new us;if(!i.ok)throw Error(i.errors.join(";"));return i.value}function jc(i){return{value:i,errors:void 0}}function vh(i){if(i.errors)throw new fs(i.errors);if(!i.value)throw new us;return i.value}function xh(i){return i!==void 0}function ps(i,e){return Ci(i)===Ci(e)}const hs=i=>i,ms=i=>i instanceof Error?i:Error(String(i)),gs=i=>i.name==="ZodError",ys=i=>{const{formErrors:e,fieldErrors:t}=i.flatten(),a=Object.entries(t).map(([s,c])=>s+":"+(c==null?void 0:c.join(",")));return e.concat(a).join("; ")};function _s(i){const e=i.validate??hs,{autoSave:t}=i,a=n.ref(),s=n.ref(),c=O=>{s.value={model:Vn(O)}};n.watch(()=>i.get(),O=>c(O),{immediate:!0});const d=()=>{var O;i.onSave(e(Vn((O=s.value)==null?void 0:O.model)))},u=()=>{c(i.get()),a.value=void 0},p=O=>{const C=ms(O);gs(C)?a.value=Error(ys(C)):a.value=C},h=O=>{a.value=void 0;try{e(O),t&&d()}catch(C){p(C)}},g=n.computed({get:()=>{var O;return(O=s.value)==null?void 0:O.model},set(O){c(O),h(O)}});n.watch(s,(O,C)=>{O&&O===C&&h(O.model)},{deep:!0});const v=n.computed(()=>!a.value),T=n.computed(()=>!ps(i.get(),n.unref(s))),B=n.computed(()=>a.value?a.value.message:"");return n.reactive({model:g,valid:v,isChanged:T,error:a,errorString:B,save:d,revert:u,setError:p})}function Ch(i,e){const t=i.validate??hs,{autoSave:a}=i,s=n.ref(),c=n.ref(),d=C=>{c.value={model:Object.assign(Vn(C),e??{}),stage:Symbol()}};n.watch(()=>i.get(),C=>d(C),{immediate:!0});const u=()=>{var C;i.onSave(t(Vn((C=c.value)==null?void 0:C.model)))},p=()=>{d(i.get()),s.value=void 0},h=C=>{const A=ms(C);gs(A)?s.value=Error(ys(A)):s.value=A},g=C=>{s.value=void 0;try{t(C),a&&u()}catch(A){h(A)}},v=n.computed({get:()=>{var C;return(C=c.value)==null?void 0:C.model},set(){throw Error("Cannot replace base model")}});n.watch([()=>({args:v.value.args,ui:v.value.ui}),()=>{var C;return(C=c.value)==null?void 0:C.stage}],([C,A],[b,D])=>{A===D&&g(C)},{deep:!0});const T=n.computed(()=>!s.value),B=n.computed(()=>!ps(i.get(),n.unref(c))),O=n.computed(()=>s.value?s.value.message:"");return n.reactive({model:v,valid:T,isChanged:B,error:s,errorString:O,save:u,revert:p,setError:h})}const Eh=i=>Object.fromEntries(new URL(i,"http://dummy").searchParams);function Sh(i,e){const a=ds(e.setBlockArgs,100),s=ds(e.setBlockUiState,100),c=ds(e.setBlockArgsAndUiState,100),d=n.reactive({args:Object.freeze(i.args),outputs:Object.freeze(i.outputs),ui:Object.freeze(i.ui),navigationState:Object.freeze(i.navigationState)});e.onStateUpdates(async C=>{C.forEach(A=>{A.key==="args"&&(d.args=Object.freeze(A.value)),A.key==="ui"&&(d.ui=Object.freeze(A.value)),A.key==="outputs"&&(d.outputs=Object.freeze(A.value)),A.key==="navigationState"&&(d.navigationState=Object.freeze(A.value))}),await n.nextTick()});const u=()=>Vn(d.args),p=()=>Vn(d.ui),h=()=>Vn(d.navigationState),g={createArgsModel(C={}){return _s({get(){return C.transform?C.transform(d.args):d.args},validate:C.validate,autoSave:!0,onSave(A){a(A)}})},createUiModel(C={},A){return _s({get(){return C.transform?C.transform(d.ui):d.ui??A()},validate:C.validate,autoSave:!0,onSave(b){s(b)}})},useOutputs(...C){const A=n.reactive({errors:void 0,value:void 0});return n.watch(()=>d.outputs,()=>{try{Object.assign(A,{value:this.unwrapOutputs(...C),errors:void 0})}catch(b){Object.assign(A,{value:void 0,errors:[String(b)]})}},{immediate:!0,deep:!0}),A},unwrapOutputs(...C){const A=d.outputs,b=C.map(D=>[D,Uc(A[D])]);return Object.fromEntries(b)},getOutputField(C){return d.outputs[C]},getOutputFieldOkOptional(C){console.warn("use reactive app.outputValues.fieldName instead instead of getOutputFieldOkOptional(fieldName)");const A=this.getOutputField(C);if(A&&A.ok)return A.value},getOutputFieldErrorsOptional(C){console.warn("use reactive app.outputErrors.fieldName instead instead of getOutputFieldErrorsOptional(fieldName)");const A=this.getOutputField(C);if(A&&!A.ok)return A.errors},updateArgs(C){const A=u();return C(A),e.setBlockArgs(A)},updateUiState(C){const A=p();return e.setBlockUiState(C(A))},updateNavigationState(C){const A=h();return C(A),e.setNavigationState(A)},navigateTo(C){const A=h();return A.href=C,e.setNavigationState(A)}},v=n.computed(()=>{const C=Object.entries(d.outputs).map(([A,b])=>[A,b.ok&&b.value!==void 0?b.value:void 0]);return Object.fromEntries(C)}),T=n.computed(()=>{const C=Object.entries(d.outputs).map(([A,b])=>[A,b&&!b.ok?new fs(b.errors):void 0]);return Object.fromEntries(C)}),B={snapshot:d,queryParams:n.computed(()=>Eh(d.navigationState.href)),href:n.computed(()=>d.navigationState.href),hasErrors:n.computed(()=>Object.values(d.outputs).some(C=>!(C!=null&&C.ok))),outputValues:n.computed(()=>(console.warn("Change app.outputValues to app.model.outputs"),v.value)),outputErrors:n.computed(()=>(console.warn("Change app.outputErrors to app.model.outputErrors"),T.value)),args:n.computed(()=>(console.warn("Change app.args to app.snapshot.args"),d.args)),outputs:n.computed(()=>(console.warn("Change app.outputs to app.snapshot.outputs"),d.outputs)),ui:n.computed(()=>(console.warn("Change app.ui to app.snapshot.ui"),d.ui)),navigationState:n.computed(()=>(console.warn("Change app.navigationState to app.snapshot.navigationState"),d.navigationState))},O=Ch({get(){return{args:d.args,ui:d.ui}},autoSave:!0,onSave(C){c(C.args,C.ui)}},{outputs:v,outputErrors:T});return n.reactive(Object.assign(O,g,B))}var De;(function(i){i.assertEqual=s=>s;function e(s){}i.assertIs=e;function t(s){throw new Error}i.assertNever=t,i.arrayToEnum=s=>{const c={};for(const d of s)c[d]=d;return c},i.getValidEnumValues=s=>{const c=i.objectKeys(s).filter(u=>typeof s[s[u]]!="number"),d={};for(const u of c)d[u]=s[u];return i.objectValues(d)},i.objectValues=s=>i.objectKeys(s).map(function(c){return s[c]}),i.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const c=[];for(const d in s)Object.prototype.hasOwnProperty.call(s,d)&&c.push(d);return c},i.find=(s,c)=>{for(const d of s)if(c(d))return d},i.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function a(s,c=" | "){return s.map(d=>typeof d=="string"?`'${d}'`:d).join(c)}i.joinValues=a,i.jsonStringifyReplacer=(s,c)=>typeof c=="bigint"?c.toString():c})(De||(De={}));var ws;(function(i){i.mergeShapes=(e,t)=>({...e,...t})})(ws||(ws={}));const te=De.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Un=i=>{switch(typeof i){case"undefined":return te.undefined;case"string":return te.string;case"number":return isNaN(i)?te.nan:te.number;case"boolean":return te.boolean;case"function":return te.function;case"bigint":return te.bigint;case"symbol":return te.symbol;case"object":return Array.isArray(i)?te.array:i===null?te.null:i.then&&typeof i.then=="function"&&i.catch&&typeof i.catch=="function"?te.promise:typeof Map<"u"&&i instanceof Map?te.map:typeof Set<"u"&&i instanceof Set?te.set:typeof Date<"u"&&i instanceof Date?te.date:te.object;default:return te.unknown}},G=De.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"]),Th=i=>JSON.stringify(i,null,2).replace(/"([^"]+)":/g,"$1:");class Nt extends Error{constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const t=e||function(c){return c.message},a={_errors:[]},s=c=>{for(const d of c.issues)if(d.code==="invalid_union")d.unionErrors.map(s);else if(d.code==="invalid_return_type")s(d.returnTypeError);else if(d.code==="invalid_arguments")s(d.argumentsError);else if(d.path.length===0)a._errors.push(t(d));else{let u=a,p=0;for(;p<d.path.length;){const h=d.path[p];p===d.path.length-1?(u[h]=u[h]||{_errors:[]},u[h]._errors.push(t(d))):u[h]=u[h]||{_errors:[]},u=u[h],p++}}};return s(this),a}static assert(e){if(!(e instanceof Nt))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,De.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},a=[];for(const s of this.issues)s.path.length>0?(t[s.path[0]]=t[s.path[0]]||[],t[s.path[0]].push(e(s))):a.push(e(s));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}Nt.create=i=>new Nt(i);const Zr=(i,e)=>{let t;switch(i.code){case G.invalid_type:i.received===te.undefined?t="Required":t=`Expected ${i.expected}, received ${i.received}`;break;case G.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(i.expected,De.jsonStringifyReplacer)}`;break;case G.unrecognized_keys:t=`Unrecognized key(s) in object: ${De.joinValues(i.keys,", ")}`;break;case G.invalid_union:t="Invalid input";break;case G.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${De.joinValues(i.options)}`;break;case G.invalid_enum_value:t=`Invalid enum value. Expected ${De.joinValues(i.options)}, received '${i.received}'`;break;case G.invalid_arguments:t="Invalid function arguments";break;case G.invalid_return_type:t="Invalid function return type";break;case G.invalid_date:t="Invalid date";break;case G.invalid_string:typeof i.validation=="object"?"includes"in i.validation?(t=`Invalid input: must include "${i.validation.includes}"`,typeof i.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${i.validation.position}`)):"startsWith"in i.validation?t=`Invalid input: must start with "${i.validation.startsWith}"`:"endsWith"in i.validation?t=`Invalid input: must end with "${i.validation.endsWith}"`:De.assertNever(i.validation):i.validation!=="regex"?t=`Invalid ${i.validation}`:t="Invalid";break;case G.too_small:i.type==="array"?t=`Array must contain ${i.exact?"exactly":i.inclusive?"at least":"more than"} ${i.minimum} element(s)`:i.type==="string"?t=`String must contain ${i.exact?"exactly":i.inclusive?"at least":"over"} ${i.minimum} character(s)`:i.type==="number"?t=`Number must be ${i.exact?"exactly equal to ":i.inclusive?"greater than or equal to ":"greater than "}${i.minimum}`:i.type==="date"?t=`Date must be ${i.exact?"exactly equal to ":i.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(i.minimum))}`:t="Invalid input";break;case G.too_big:i.type==="array"?t=`Array must contain ${i.exact?"exactly":i.inclusive?"at most":"less than"} ${i.maximum} element(s)`:i.type==="string"?t=`String must contain ${i.exact?"exactly":i.inclusive?"at most":"under"} ${i.maximum} character(s)`:i.type==="number"?t=`Number must be ${i.exact?"exactly":i.inclusive?"less than or equal to":"less than"} ${i.maximum}`:i.type==="bigint"?t=`BigInt must be ${i.exact?"exactly":i.inclusive?"less than or equal to":"less than"} ${i.maximum}`:i.type==="date"?t=`Date must be ${i.exact?"exactly":i.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(i.maximum))}`:t="Invalid input";break;case G.custom:t="Invalid input";break;case G.invalid_intersection_types:t="Intersection results could not be merged";break;case G.not_multiple_of:t=`Number must be a multiple of ${i.multipleOf}`;break;case G.not_finite:t="Number must be finite";break;default:t=e.defaultError,De.assertNever(i)}return{message:t}};let Wc=Zr;function Vh(i){Wc=i}function Po(){return Wc}const Lo=i=>{const{data:e,path:t,errorMaps:a,issueData:s}=i,c=[...t,...s.path||[]],d={...s,path:c};if(s.message!==void 0)return{...s,path:c,message:s.message};let u="";const p=a.filter(h=>!!h).slice().reverse();for(const h of p)u=h(d,{data:e,defaultError:u}).message;return{...s,path:c,message:u}},Bh=[];function Q(i,e){const t=Po(),a=Lo({issueData:e,data:i.data,path:i.path,errorMaps:[i.common.contextualErrorMap,i.schemaErrorMap,t,t===Zr?void 0:Zr].filter(s=>!!s)});i.common.issues.push(a)}class ft{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const a=[];for(const s of t){if(s.status==="aborted")return ye;s.status==="dirty"&&e.dirty(),a.push(s.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){const a=[];for(const s of t){const c=await s.key,d=await s.value;a.push({key:c,value:d})}return ft.mergeObjectSync(e,a)}static mergeObjectSync(e,t){const a={};for(const s of t){const{key:c,value:d}=s;if(c.status==="aborted"||d.status==="aborted")return ye;c.status==="dirty"&&e.dirty(),d.status==="dirty"&&e.dirty(),c.value!=="__proto__"&&(typeof d.value<"u"||s.alwaysSet)&&(a[c.value]=d.value)}return{status:e.value,value:a}}}const ye=Object.freeze({status:"aborted"}),Ur=i=>({status:"dirty",value:i}),_t=i=>({status:"valid",value:i}),bs=i=>i.status==="aborted",ks=i=>i.status==="dirty",Ei=i=>i.status==="valid",Si=i=>typeof Promise<"u"&&i instanceof Promise;function Fo(i,e,t,a){if(typeof e=="function"?i!==e||!a:!e.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(i)}function Hc(i,e,t,a,s){if(typeof e=="function"?i!==e||!s:!e.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(i,t),t}typeof SuppressedError=="function"&&SuppressedError;var le;(function(i){i.errToObj=e=>typeof e=="string"?{message:e}:e||{},i.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(le||(le={}));var Ti,Vi;class wn{constructor(e,t,a,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const qc=(i,e)=>{if(Ei(e))return{success:!0,data:e.value};if(!i.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new Nt(i.common.issues);return this._error=t,this._error}}};function ve(i){if(!i)return{};const{errorMap:e,invalid_type_error:t,required_error:a,description:s}=i;if(e&&(t||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(d,u)=>{var p,h;const{message:g}=i;return d.code==="invalid_enum_value"?{message:g??u.defaultError}:typeof u.data>"u"?{message:(p=g??a)!==null&&p!==void 0?p:u.defaultError}:d.code!=="invalid_type"?{message:u.defaultError}:{message:(h=g??t)!==null&&h!==void 0?h:u.defaultError}},description:s}}class Se{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 Un(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Un(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new ft,ctx:{common:e.parent.common,data:e.data,parsedType:Un(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(Si(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){var a;const s={common:{issues:[],async:(a=t==null?void 0:t.async)!==null&&a!==void 0?a:!1,contextualErrorMap:t==null?void 0:t.errorMap},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Un(e)},c=this._parseSync({data:e,path:s.path,parent:s});return qc(s,c)}async parseAsync(e,t){const a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){const a={common:{issues:[],contextualErrorMap:t==null?void 0:t.errorMap,async:!0},path:(t==null?void 0:t.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Un(e)},s=this._parse({data:e,path:a.path,parent:a}),c=await(Si(s)?s:Promise.resolve(s));return qc(a,c)}refine(e,t){const a=s=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(s):t;return this._refinement((s,c)=>{const d=e(s),u=()=>c.addIssue({code:G.custom,...a(s)});return typeof Promise<"u"&&d instanceof Promise?d.then(p=>p?!0:(u(),!1)):d?!0:(u(),!1)})}refinement(e,t){return this._refinement((a,s)=>e(a)?!0:(s.addIssue(typeof t=="function"?t(a,s):t),!1))}_refinement(e){return new Qt({schema:this,typeName:me.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return kn.create(this,this._def)}nullable(){return qn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Xt.create(this,this._def)}promise(){return qr.create(this,this._def)}or(e){return Ai.create([this,e],this._def)}and(e){return Ri.create(this,e,this._def)}transform(e){return new Qt({...ve(this._def),schema:this,typeName:me.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new Li({...ve(this._def),innerType:this,defaultValue:t,typeName:me.ZodDefault})}brand(){return new Cs({typeName:me.ZodBranded,type:this,...ve(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new Fi({...ve(this._def),innerType:this,catchValue:t,typeName:me.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return $i.create(this,e)}readonly(){return zi.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Nh=/^c[^\s-]{8,}$/i,Oh=/^[0-9a-z]+$/,Ah=/^[0-9A-HJKMNP-TV-Z]{26}$/,Rh=/^[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,Dh=/^[a-z0-9_-]{21}$/i,Ih=/^[-+]?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)?)??$/,Mh=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ph="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let vs;const Lh=/^(?:(?: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])$/,Fh=/^(([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})))$/,$h=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Gc="((\\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])))",zh=new RegExp(`^${Gc}$`);function Kc(i){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return i.precision?e=`${e}\\.\\d{${i.precision}}`:i.precision==null&&(e=`${e}(\\.\\d+)?`),e}function Zh(i){return new RegExp(`^${Kc(i)}$`)}function Yc(i){let e=`${Gc}T${Kc(i)}`;const t=[];return t.push(i.local?"Z?":"Z"),i.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Uh(i,e){return!!((e==="v4"||!e)&&Lh.test(i)||(e==="v6"||!e)&&Fh.test(i))}class Jt extends Se{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==te.string){const c=this._getOrReturnCtx(e);return Q(c,{code:G.invalid_type,expected:te.string,received:c.parsedType}),ye}const a=new ft;let s;for(const c of this._def.checks)if(c.kind==="min")e.data.length<c.value&&(s=this._getOrReturnCtx(e,s),Q(s,{code:G.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),a.dirty());else if(c.kind==="max")e.data.length>c.value&&(s=this._getOrReturnCtx(e,s),Q(s,{code:G.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),a.dirty());else if(c.kind==="length"){const d=e.data.length>c.value,u=e.data.length<c.value;(d||u)&&(s=this._getOrReturnCtx(e,s),d?Q(s,{code:G.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}):u&&Q(s,{code:G.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}),a.dirty())}else if(c.kind==="email")Mh.test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{validation:"email",code:G.invalid_string,message:c.message}),a.dirty());else if(c.kind==="emoji")vs||(vs=new RegExp(Ph,"u")),vs.test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{validation:"emoji",code:G.invalid_string,message:c.message}),a.dirty());else if(c.kind==="uuid")Rh.test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{validation:"uuid",code:G.invalid_string,message:c.message}),a.dirty());else if(c.kind==="nanoid")Dh.test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{validation:"nanoid",code:G.invalid_string,message:c.message}),a.dirty());else if(c.kind==="cuid")Nh.test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{validation:"cuid",code:G.invalid_string,message:c.message}),a.dirty());else if(c.kind==="cuid2")Oh.test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{validation:"cuid2",code:G.invalid_string,message:c.message}),a.dirty());else if(c.kind==="ulid")Ah.test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{validation:"ulid",code:G.invalid_string,message:c.message}),a.dirty());else if(c.kind==="url")try{new URL(e.data)}catch{s=this._getOrReturnCtx(e,s),Q(s,{validation:"url",code:G.invalid_string,message:c.message}),a.dirty()}else c.kind==="regex"?(c.regex.lastIndex=0,c.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{validation:"regex",code:G.invalid_string,message:c.message}),a.dirty())):c.kind==="trim"?e.data=e.data.trim():c.kind==="includes"?e.data.includes(c.value,c.position)||(s=this._getOrReturnCtx(e,s),Q(s,{code:G.invalid_string,validation:{includes:c.value,position:c.position},message:c.message}),a.dirty()):c.kind==="toLowerCase"?e.data=e.data.toLowerCase():c.kind==="toUpperCase"?e.data=e.data.toUpperCase():c.kind==="startsWith"?e.data.startsWith(c.value)||(s=this._getOrReturnCtx(e,s),Q(s,{code:G.invalid_string,validation:{startsWith:c.value},message:c.message}),a.dirty()):c.kind==="endsWith"?e.data.endsWith(c.value)||(s=this._getOrReturnCtx(e,s),Q(s,{code:G.invalid_string,validation:{endsWith:c.value},message:c.message}),a.dirty()):c.kind==="datetime"?Yc(c).test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{code:G.invalid_string,validation:"datetime",message:c.message}),a.dirty()):c.kind==="date"?zh.test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{code:G.invalid_string,validation:"date",message:c.message}),a.dirty()):c.kind==="time"?Zh(c).test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{code:G.invalid_string,validation:"time",message:c.message}),a.dirty()):c.kind==="duration"?Ih.test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{validation:"duration",code:G.invalid_string,message:c.message}),a.dirty()):c.kind==="ip"?Uh(e.data,c.version)||(s=this._getOrReturnCtx(e,s),Q(s,{validation:"ip",code:G.invalid_string,message:c.message}),a.dirty()):c.kind==="base64"?$h.test(e.data)||(s=this._getOrReturnCtx(e,s),Q(s,{validation:"base64",code:G.invalid_string,message:c.message}),a.dirty()):De.assertNever(c);return{status:a.value,value:e.data}}_regex(e,t,a){return this.refinement(s=>e.test(s),{validation:t,code:G.invalid_string,...le.errToObj(a)})}_addCheck(e){return new Jt({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...le.errToObj(e)})}url(e){return this._addCheck({kind:"url",...le.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...le.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...le.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...le.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...le.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...le.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...le.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...le.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...le.errToObj(e)})}datetime(e){var t,a;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:(t=e==null?void 0:e.offset)!==null&&t!==void 0?t:!1,local:(a=e==null?void 0:e.local)!==null&&a!==void 0?a:!1,...le.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,...le.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...le.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...le.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t==null?void 0:t.position,...le.errToObj(t==null?void 0:t.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...le.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...le.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...le.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...le.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...le.errToObj(t)})}nonempty(e){return this.min(1,le.errToObj(e))}trim(){return new Jt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Jt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Jt({...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 t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}Jt.create=i=>{var e;return new Jt({checks:[],typeName:me.ZodString,coerce:(e=i==null?void 0:i.coerce)!==null&&e!==void 0?e:!1,...ve(i)})};function jh(i,e){const t=(i.toString().split(".")[1]||"").length,a=(e.toString().split(".")[1]||"").length,s=t>a?t:a,c=parseInt(i.toFixed(s).replace(".","")),d=parseInt(e.toFixed(s).replace(".",""));return c%d/Math.pow(10,s)}class jn extends Se{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)!==te.number){const c=this._getOrReturnCtx(e);return Q(c,{code:G.invalid_type,expected:te.number,received:c.parsedType}),ye}let a;const s=new ft;for(const c of this._def.checks)c.kind==="int"?De.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),Q(a,{code:G.invalid_type,expected:"integer",received:"float",message:c.message}),s.dirty()):c.kind==="min"?(c.inclusive?e.data<c.value:e.data<=c.value)&&(a=this._getOrReturnCtx(e,a),Q(a,{code:G.too_small,minimum:c.value,type:"number",inclusive:c.inclusive,exact:!1,message:c.message}),s.dirty()):c.kind==="max"?(c.inclusive?e.data>c.value:e.data>=c.value)&&(a=this._getOrReturnCtx(e,a),Q(a,{code:G.too_big,maximum:c.value,type:"number",inclusive:c.inclusive,exact:!1,message:c.message}),s.dirty()):c.kind==="multipleOf"?jh(e.data,c.value)!==0&&(a=this._getOrReturnCtx(e,a),Q(a,{code:G.not_multiple_of,multipleOf:c.value,message:c.message}),s.dirty()):c.kind==="finite"?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),Q(a,{code:G.not_finite,message:c.message}),s.dirty()):De.assertNever(c);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,le.toString(t))}gt(e,t){return this.setLimit("min",e,!1,le.toString(t))}lte(e,t){return this.setLimit("max",e,!0,le.toString(t))}lt(e,t){return this.setLimit("max",e,!1,le.toString(t))}setLimit(e,t,a,s){return new jn({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:le.toString(s)}]})}_addCheck(e){return new jn({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:le.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:le.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:le.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:le.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:le.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:le.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:le.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:le.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:le.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&De.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(t===null||a.value>t)&&(t=a.value):a.kind==="max"&&(e===null||a.value<e)&&(e=a.value)}return Number.isFinite(t)&&Number.isFinite(e)}}jn.create=i=>new jn({checks:[],typeName:me.ZodNumber,coerce:(i==null?void 0:i.coerce)||!1,...ve(i)});class Wn extends Se{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)!==te.bigint){const c=this._getOrReturnCtx(e);return Q(c,{code:G.invalid_type,expected:te.bigint,received:c.parsedType}),ye}let a;const s=new ft;for(const c of this._def.checks)c.kind==="min"?(c.inclusive?e.data<c.value:e.data<=c.value)&&(a=this._getOrReturnCtx(e,a),Q(a,{code:G.too_small,type:"bigint",minimum:c.value,inclusive:c.inclusive,message:c.message}),s.dirty()):c.kind==="max"?(c.inclusive?e.data>c.value:e.data>=c.value)&&(a=this._getOrReturnCtx(e,a),Q(a,{code:G.too_big,type:"bigint",maximum:c.value,inclusive:c.inclusive,message:c.message}),s.dirty()):c.kind==="multipleOf"?e.data%c.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),Q(a,{code:G.not_multiple_of,multipleOf:c.value,message:c.message}),s.dirty()):De.assertNever(c);return{status:s.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,le.toString(t))}gt(e,t){return this.setLimit("min",e,!1,le.toString(t))}lte(e,t){return this.setLimit("max",e,!0,le.toString(t))}lt(e,t){return this.setLimit("max",e,!1,le.toString(t))}setLimit(e,t,a,s){return new Wn({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:le.toString(s)}]})}_addCheck(e){return new Wn({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:le.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:le.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:le.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:le.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:le.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}Wn.create=i=>{var e;return new Wn({checks:[],typeName:me.ZodBigInt,coerce:(e=i==null?void 0:i.coerce)!==null&&e!==void 0?e:!1,...ve(i)})};class Bi extends Se{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==te.boolean){const a=this._getOrReturnCtx(e);return Q(a,{code:G.invalid_type,expected:te.boolean,received:a.parsedType}),ye}return _t(e.data)}}Bi.create=i=>new Bi({typeName:me.ZodBoolean,coerce:(i==null?void 0:i.coerce)||!1,...ve(i)});class br extends Se{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==te.date){const c=this._getOrReturnCtx(e);return Q(c,{code:G.invalid_type,expected:te.date,received:c.parsedType}),ye}if(isNaN(e.data.getTime())){const c=this._getOrReturnCtx(e);return Q(c,{code:G.invalid_date}),ye}const a=new ft;let s;for(const c of this._def.checks)c.kind==="min"?e.data.getTime()<c.value&&(s=this._getOrReturnCtx(e,s),Q(s,{code:G.too_small,message:c.message,inclusive:!0,exact:!1,minimum:c.value,type:"date"}),a.dirty()):c.kind==="max"?e.data.getTime()>c.value&&(s=this._getOrReturnCtx(e,s),Q(s,{code:G.too_big,message:c.message,inclusive:!0,exact:!1,maximum:c.value,type:"date"}),a.dirty()):De.assertNever(c);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new br({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:le.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:le.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}br.create=i=>new br({checks:[],coerce:(i==null?void 0:i.coerce)||!1,typeName:me.ZodDate,...ve(i)});class $o extends Se{_parse(e){if(this._getType(e)!==te.symbol){const a=this._getOrReturnCtx(e);return Q(a,{code:G.invalid_type,expected:te.symbol,received:a.parsedType}),ye}return _t(e.data)}}$o.create=i=>new $o({typeName:me.ZodSymbol,...ve(i)});class Ni extends Se{_parse(e){if(this._getType(e)!==te.undefined){const a=this._getOrReturnCtx(e);return Q(a,{code:G.invalid_type,expected:te.undefined,received:a.parsedType}),ye}return _t(e.data)}}Ni.create=i=>new Ni({typeName:me.ZodUndefined,...ve(i)});class Oi extends Se{_parse(e){if(this._getType(e)!==te.null){const a=this._getOrReturnCtx(e);return Q(a,{code:G.invalid_type,expected:te.null,received:a.parsedType}),ye}return _t(e.data)}}Oi.create=i=>new Oi({typeName:me.ZodNull,...ve(i)});class jr extends Se{constructor(){super(...arguments),this._any=!0}_parse(e){return _t(e.data)}}jr.create=i=>new jr({typeName:me.ZodAny,...ve(i)});class kr extends Se{constructor(){super(...arguments),this._unknown=!0}_parse(e){return _t(e.data)}}kr.create=i=>new kr({typeName:me.ZodUnknown,...ve(i)});class Bn extends Se{_parse(e){const t=this._getOrReturnCtx(e);return Q(t,{code:G.invalid_type,expected:te.never,received:t.parsedType}),ye}}Bn.create=i=>new Bn({typeName:me.ZodNever,...ve(i)});class zo extends Se{_parse(e){if(this._getType(e)!==te.undefined){const a=this._getOrReturnCtx(e);return Q(a,{code:G.invalid_type,expected:te.void,received:a.parsedType}),ye}return _t(e.data)}}zo.create=i=>new zo({typeName:me.ZodVoid,...ve(i)});class Xt extends Se{_parse(e){const{ctx:t,status:a}=this._processInputParams(e),s=this._def;if(t.parsedType!==te.array)return Q(t,{code:G.invalid_type,expected:te.array,received:t.parsedType}),ye;if(s.exactLength!==null){const d=t.data.length>s.exactLength.value,u=t.data.length<s.exactLength.value;(d||u)&&(Q(t,{code:d?G.too_big:G.too_small,minimum:u?s.exactLength.value:void 0,maximum:d?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),a.dirty())}if(s.minLength!==null&&t.data.length<s.minLength.value&&(Q(t,{code:G.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),a.dirty()),s.maxLength!==null&&t.data.length>s.maxLength.value&&(Q(t,{code:G.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map((d,u)=>s.type._parseAsync(new wn(t,d,t.path,u)))).then(d=>ft.mergeArray(a,d));const c=[...t.data].map((d,u)=>s.type._parseSync(new wn(t,d,t.path,u)));return ft.mergeArray(a,c)}get element(){return this._def.type}min(e,t){return new Xt({...this._def,minLength:{value:e,message:le.toString(t)}})}max(e,t){return new Xt({...this._def,maxLength:{value:e,message:le.toString(t)}})}length(e,t){return new Xt({...this._def,exactLength:{value:e,message:le.toString(t)}})}nonempty(e){return this.min(1,e)}}Xt.create=(i,e)=>new Xt({type:i,minLength:null,maxLength:null,exactLength:null,typeName:me.ZodArray,...ve(e)});function Wr(i){if(i instanceof qe){const e={};for(const t in i.shape){const a=i.shape[t];e[t]=kn.create(Wr(a))}return new qe({...i._def,shape:()=>e})}else return i instanceof Xt?new Xt({...i._def,type:Wr(i.element)}):i instanceof kn?kn.create(Wr(i.unwrap())):i instanceof qn?qn.create(Wr(i.unwrap())):i instanceof bn?bn.create(i.items.map(e=>Wr(e))):i}class qe extends Se{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(),t=De.objectKeys(e);return this._cached={shape:e,keys:t}}_parse(e){if(this._getType(e)!==te.object){const h=this._getOrReturnCtx(e);return Q(h,{code:G.invalid_type,expected:te.object,received:h.parsedType}),ye}const{status:a,ctx:s}=this._processInputParams(e),{shape:c,keys:d}=this._getCached(),u=[];if(!(this._def.catchall instanceof Bn&&this._def.unknownKeys==="strip"))for(const h in s.data)d.includes(h)||u.push(h);const p=[];for(const h of d){const g=c[h],v=s.data[h];p.push({key:{status:"valid",value:h},value:g._parse(new wn(s,v,s.path,h)),alwaysSet:h in s.data})}if(this._def.catchall instanceof Bn){const h=this._def.unknownKeys;if(h==="passthrough")for(const g of u)p.push({key:{status:"valid",value:g},value:{status:"valid",value:s.data[g]}});else if(h==="strict")u.length>0&&(Q(s,{code:G.unrecognized_keys,keys:u}),a.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const g of u){const v=s.data[g];p.push({key:{status:"valid",value:g},value:h._parse(new wn(s,v,s.path,g)),alwaysSet:g in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const h=[];for(const g of p){const v=await g.key,T=await g.value;h.push({key:v,value:T,alwaysSet:g.alwaysSet})}return h}).then(h=>ft.mergeObjectSync(a,h)):ft.mergeObjectSync(a,p)}get shape(){return this._def.shape()}strict(e){return le.errToObj,new qe({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,a)=>{var s,c,d,u;const p=(d=(c=(s=this._def).errorMap)===null||c===void 0?void 0:c.call(s,t,a).message)!==null&&d!==void 0?d:a.defaultError;return t.code==="unrecognized_keys"?{message:(u=le.errToObj(e).message)!==null&&u!==void 0?u:p}:{message:p}}}:{}})}strip(){return new qe({...this._def,unknownKeys:"strip"})}passthrough(){return new qe({...this._def,unknownKeys:"passthrough"})}extend(e){return new qe({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new qe({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:me.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new qe({...this._def,catchall:e})}pick(e){const t={};return De.objectKeys(e).forEach(a=>{e[a]&&this.shape[a]&&(t[a]=this.shape[a])}),new qe({...this._def,shape:()=>t})}omit(e){const t={};return De.objectKeys(this.shape).forEach(a=>{e[a]||(t[a]=this.shape[a])}),new qe({...this._def,shape:()=>t})}deepPartial(){return Wr(this)}partial(e){const t={};return De.objectKeys(this.shape).forEach(a=>{const s=this.shape[a];e&&!e[a]?t[a]=s:t[a]=s.optional()}),new qe({...this._def,shape:()=>t})}required(e){const t={};return De.objectKeys(this.shape).forEach(a=>{if(e&&!e[a])t[a]=this.shape[a];else{let c=this.shape[a];for(;c instanceof kn;)c=c._def.innerType;t[a]=c}}),new qe({...this._def,shape:()=>t})}keyof(){return Jc(De.objectKeys(this.shape))}}qe.create=(i,e)=>new qe({shape:()=>i,unknownKeys:"strip",catchall:Bn.create(),typeName:me.ZodObject,...ve(e)}),qe.strictCreate=(i,e)=>new qe({shape:()=>i,unknownKeys:"strict",catchall:Bn.create(),typeName:me.ZodObject,...ve(e)}),qe.lazycreate=(i,e)=>new qe({shape:i,unknownKeys:"strip",catchall:Bn.create(),typeName:me.ZodObject,...ve(e)});class Ai extends Se{_parse(e){const{ctx:t}=this._processInputParams(e),a=this._def.options;function s(c){for(const u of c)if(u.result.status==="valid")return u.result;for(const u of c)if(u.result.status==="dirty")return t.common.issues.push(...u.ctx.common.issues),u.result;const d=c.map(u=>new Nt(u.ctx.common.issues));return Q(t,{code:G.invalid_union,unionErrors:d}),ye}if(t.common.async)return Promise.all(a.map(async c=>{const d={...t,common:{...t.common,issues:[]},parent:null};return{result:await c._parseAsync({data:t.data,path:t.path,parent:d}),ctx:d}})).then(s);{let c;const d=[];for(const p of a){const h={...t,common:{...t.common,issues:[]},parent:null},g=p._parseSync({data:t.data,path:t.path,parent:h});if(g.status==="valid")return g;g.status==="dirty"&&!c&&(c={result:g,ctx:h}),h.common.issues.length&&d.push(h.common.issues)}if(c)return t.common.issues.push(...c.ctx.common.issues),c.result;const u=d.map(p=>new Nt(p));return Q(t,{code:G.invalid_union,unionErrors:u}),ye}}get options(){return this._def.options}}Ai.create=(i,e)=>new Ai({options:i,typeName:me.ZodUnion,...ve(e)});const Nn=i=>i instanceof Ii?Nn(i.schema):i instanceof Qt?Nn(i.innerType()):i instanceof Mi?[i.value]:i instanceof Hn?i.options:i instanceof Pi?De.objectValues(i.enum):i instanceof Li?Nn(i._def.innerType):i instanceof Ni?[void 0]:i instanceof Oi?[null]:i instanceof kn?[void 0,...Nn(i.unwrap())]:i instanceof qn?[null,...Nn(i.unwrap())]:i instanceof Cs||i instanceof zi?Nn(i.unwrap()):i instanceof Fi?Nn(i._def.innerType):[];class Zo extends Se{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==te.object)return Q(t,{code:G.invalid_type,expected:te.object,received:t.parsedType}),ye;const a=this.discriminator,s=t.data[a],c=this.optionsMap.get(s);return c?t.common.async?c._parseAsync({data:t.data,path:t.path,parent:t}):c._parseSync({data:t.data,path:t.path,parent:t}):(Q(t,{code:G.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),ye)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,a){const s=new Map;for(const c of t){const d=Nn(c.shape[e]);if(!d.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const u of d){if(s.has(u))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(u)}`);s.set(u,c)}}return new Zo({typeName:me.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:s,...ve(a)})}}function xs(i,e){const t=Un(i),a=Un(e);if(i===e)return{valid:!0,data:i};if(t===te.object&&a===te.object){const s=De.objectKeys(e),c=De.objectKeys(i).filter(u=>s.indexOf(u)!==-1),d={...i,...e};for(const u of c){const p=xs(i[u],e[u]);if(!p.valid)return{valid:!1};d[u]=p.data}return{valid:!0,data:d}}else if(t===te.array&&a===te.array){if(i.length!==e.length)return{valid:!1};const s=[];for(let c=0;c<i.length;c++){const d=i[c],u=e[c],p=xs(d,u);if(!p.valid)return{valid:!1};s.push(p.data)}return{valid:!0,data:s}}else return t===te.date&&a===te.date&&+i==+e?{valid:!0,data:i}:{valid:!1}}class Ri extends Se{_parse(e){const{status:t,ctx:a}=this._processInputParams(e),s=(c,d)=>{if(bs(c)||bs(d))return ye;const u=xs(c.value,d.value);return u.valid?((ks(c)||ks(d))&&t.dirty(),{status:t.value,value:u.data}):(Q(a,{code:G.invalid_intersection_types}),ye)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([c,d])=>s(c,d)):s(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}Ri.create=(i,e,t)=>new Ri({left:i,right:e,typeName:me.ZodIntersection,...ve(t)});class bn extends Se{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==te.array)return Q(a,{code:G.invalid_type,expected:te.array,received:a.parsedType}),ye;if(a.data.length<this._def.items.length)return Q(a,{code:G.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ye;!this._def.rest&&a.data.length>this._def.items.length&&(Q(a,{code:G.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const c=[...a.data].map((d,u)=>{const p=this._def.items[u]||this._def.rest;return p?p._parse(new wn(a,d,a.path,u)):null}).filter(d=>!!d);return a.common.async?Promise.all(c).then(d=>ft.mergeArray(t,d)):ft.mergeArray(t,c)}get items(){return this._def.items}rest(e){return new bn({...this._def,rest:e})}}bn.create=(i,e)=>{if(!Array.isArray(i))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new bn({items:i,typeName:me.ZodTuple,rest:null,...ve(e)})};class Di extends Se{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==te.object)return Q(a,{code:G.invalid_type,expected:te.object,received:a.parsedType}),ye;const s=[],c=this._def.keyType,d=this._def.valueType;for(const u in a.data)s.push({key:c._parse(new wn(a,u,a.path,u)),value:d._parse(new wn(a,a.data[u],a.path,u)),alwaysSet:u in a.data});return a.common.async?ft.mergeObjectAsync(t,s):ft.mergeObjectSync(t,s)}get element(){return this._def.valueType}static create(e,t,a){return t instanceof Se?new Di({keyType:e,valueType:t,typeName:me.ZodRecord,...ve(a)}):new Di({keyType:Jt.create(),valueType:e,typeName:me.ZodRecord,...ve(t)})}}class Uo extends Se{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==te.map)return Q(a,{code:G.invalid_type,expected:te.map,received:a.parsedType}),ye;const s=this._def.keyType,c=this._def.valueType,d=[...a.data.entries()].map(([u,p],h)=>({key:s._parse(new wn(a,u,a.path,[h,"key"])),value:c._parse(new wn(a,p,a.path,[h,"value"]))}));if(a.common.async){const u=new Map;return Promise.resolve().then(async()=>{for(const p of d){const h=await p.key,g=await p.value;if(h.status==="aborted"||g.status==="aborted")return ye;(h.status==="dirty"||g.status==="dirty")&&t.dirty(),u.set(h.value,g.value)}return{status:t.value,value:u}})}else{const u=new Map;for(const p of d){const h=p.key,g=p.value;if(h.status==="aborted"||g.status==="aborted")return ye;(h.status==="dirty"||g.status==="dirty")&&t.dirty(),u.set(h.value,g.value)}return{status:t.value,value:u}}}}Uo.create=(i,e,t)=>new Uo({valueType:e,keyType:i,typeName:me.ZodMap,...ve(t)});class vr extends Se{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==te.set)return Q(a,{code:G.invalid_type,expected:te.set,received:a.parsedType}),ye;const s=this._def;s.minSize!==null&&a.data.size<s.minSize.value&&(Q(a,{code:G.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),t.dirty()),s.maxSize!==null&&a.data.size>s.maxSize.value&&(Q(a,{code:G.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),t.dirty());const c=this._def.valueType;function d(p){const h=new Set;for(const g of p){if(g.status==="aborted")return ye;g.status==="dirty"&&t.dirty(),h.add(g.value)}return{status:t.value,value:h}}const u=[...a.data.values()].map((p,h)=>c._parse(new wn(a,p,a.path,h)));return a.common.async?Promise.all(u).then(p=>d(p)):d(u)}min(e,t){return new vr({...this._def,minSize:{value:e,message:le.toString(t)}})}max(e,t){return new vr({...this._def,maxSize:{value:e,message:le.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}vr.create=(i,e)=>new vr({valueType:i,minSize:null,maxSize:null,typeName:me.ZodSet,...ve(e)});class Hr extends Se{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==te.function)return Q(t,{code:G.invalid_type,expected:te.function,received:t.parsedType}),ye;function a(u,p){return Lo({data:u,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Po(),Zr].filter(h=>!!h),issueData:{code:G.invalid_arguments,argumentsError:p}})}function s(u,p){return Lo({data:u,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Po(),Zr].filter(h=>!!h),issueData:{code:G.invalid_return_type,returnTypeError:p}})}const c={errorMap:t.common.contextualErrorMap},d=t.data;if(this._def.returns instanceof qr){const u=this;return _t(async function(...p){const h=new Nt([]),g=await u._def.args.parseAsync(p,c).catch(B=>{throw h.addIssue(a(p,B)),h}),v=await Reflect.apply(d,this,g);return await u._def.returns._def.type.parseAsync(v,c).catch(B=>{throw h.addIssue(s(v,B)),h})})}else{const u=this;return _t(function(...p){const h=u._def.args.safeParse(p,c);if(!h.success)throw new Nt([a(p,h.error)]);const g=Reflect.apply(d,this,h.data),v=u._def.returns.safeParse(g,c);if(!v.success)throw new Nt([s(g,v.error)]);return v.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new Hr({...this._def,args:bn.create(e).rest(kr.create())})}returns(e){return new Hr({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new Hr({args:e||bn.create([]).rest(kr.create()),returns:t||kr.create(),typeName:me.ZodFunction,...ve(a)})}}class Ii extends Se{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Ii.create=(i,e)=>new Ii({getter:i,typeName:me.ZodLazy,...ve(e)});class Mi extends Se{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return Q(t,{received:t.data,code:G.invalid_literal,expected:this._def.value}),ye}return{status:"valid",value:e.data}}get value(){return this._def.value}}Mi.create=(i,e)=>new Mi({value:i,typeName:me.ZodLiteral,...ve(e)});function Jc(i,e){return new Hn({values:i,typeName:me.ZodEnum,...ve(e)})}class Hn extends Se{constructor(){super(...arguments),Ti.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),a=this._def.values;return Q(t,{expected:De.joinValues(a),received:t.parsedType,code:G.invalid_type}),ye}if(Fo(this,Ti)||Hc(this,Ti,new Set(this._def.values)),!Fo(this,Ti).has(e.data)){const t=this._getOrReturnCtx(e),a=this._def.values;return Q(t,{received:t.data,code:G.invalid_enum_value,options:a}),ye}return _t(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Hn.create(e,{...this._def,...t})}exclude(e,t=this._def){return Hn.create(this.options.filter(a=>!e.includes(a)),{...this._def,...t})}}Ti=new WeakMap,Hn.create=Jc;class Pi extends Se{constructor(){super(...arguments),Vi.set(this,void 0)}_parse(e){const t=De.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==te.string&&a.parsedType!==te.number){const s=De.objectValues(t);return Q(a,{expected:De.joinValues(s),received:a.parsedType,code:G.invalid_type}),ye}if(Fo(this,Vi)||Hc(this,Vi,new Set(De.getValidEnumValues(this._def.values))),!Fo(this,Vi).has(e.data)){const s=De.objectValues(t);return Q(a,{received:a.data,code:G.invalid_enum_value,options:s}),ye}return _t(e.data)}get enum(){return this._def.values}}Vi=new WeakMap,Pi.create=(i,e)=>new Pi({values:i,typeName:me.ZodNativeEnum,...ve(e)});class qr extends Se{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==te.promise&&t.common.async===!1)return Q(t,{code:G.invalid_type,expected:te.promise,received:t.parsedType}),ye;const a=t.parsedType===te.promise?t.data:Promise.resolve(t.data);return _t(a.then(s=>this._def.type.parseAsync(s,{path:t.path,errorMap:t.common.contextualErrorMap})))}}qr.create=(i,e)=>new qr({type:i,typeName:me.ZodPromise,...ve(e)});class Qt extends Se{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===me.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:a}=this._processInputParams(e),s=this._def.effect||null,c={addIssue:d=>{Q(a,d),d.fatal?t.abort():t.dirty()},get path(){return a.path}};if(c.addIssue=c.addIssue.bind(c),s.type==="preprocess"){const d=s.transform(a.data,c);if(a.common.async)return Promise.resolve(d).then(async u=>{if(t.value==="aborted")return ye;const p=await this._def.schema._parseAsync({data:u,path:a.path,parent:a});return p.status==="aborted"?ye:p.status==="dirty"||t.value==="dirty"?Ur(p.value):p});{if(t.value==="aborted")return ye;const u=this._def.schema._parseSync({data:d,path:a.path,parent:a});return u.status==="aborted"?ye:u.status==="dirty"||t.value==="dirty"?Ur(u.value):u}}if(s.type==="refinement"){const d=u=>{const p=s.refinement(u,c);if(a.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return u};if(a.common.async===!1){const u=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return u.status==="aborted"?ye:(u.status==="dirty"&&t.dirty(),d(u.value),{status:t.value,value:u.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(u=>u.status==="aborted"?ye:(u.status==="dirty"&&t.dirty(),d(u.value).then(()=>({status:t.value,value:u.value}))))}if(s.type==="transform")if(a.common.async===!1){const d=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!Ei(d))return d;const u=s.transform(d.value,c);if(u instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:u}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(d=>Ei(d)?Promise.resolve(s.transform(d.value,c)).then(u=>({status:t.value,value:u})):d);De.assertNever(s)}}Qt.create=(i,e,t)=>new Qt({schema:i,typeName:me.ZodEffects,effect:e,...ve(t)}),Qt.createWithPreprocess=(i,e,t)=>new Qt({schema:e,effect:{type:"preprocess",transform:i},typeName:me.ZodEffects,...ve(t)});class kn extends Se{_parse(e){return this._getType(e)===te.undefined?_t(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}kn.create=(i,e)=>new kn({innerType:i,typeName:me.ZodOptional,...ve(e)});class qn extends Se{_parse(e){return this._getType(e)===te.null?_t(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}qn.create=(i,e)=>new qn({innerType:i,typeName:me.ZodNullable,...ve(e)});class Li extends Se{_parse(e){const{ctx:t}=this._processInputParams(e);let a=t.data;return t.parsedType===te.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Li.create=(i,e)=>new Li({innerType:i,typeName:me.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...ve(e)});class Fi extends Se{_parse(e){const{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},s=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return Si(s)?s.then(c=>({status:"valid",value:c.status==="valid"?c.value:this._def.catchValue({get error(){return new Nt(a.common.issues)},input:a.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Nt(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}Fi.create=(i,e)=>new Fi({innerType:i,typeName:me.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...ve(e)});class jo extends Se{_parse(e){if(this._getType(e)!==te.nan){const a=this._getOrReturnCtx(e);return Q(a,{code:G.invalid_type,expected:te.nan,received:a.parsedType}),ye}return{status:"valid",value:e.data}}}jo.create=i=>new jo({typeName:me.ZodNaN,...ve(i)});const Wh=Symbol("zod_brand");class Cs extends Se{_parse(e){const{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class $i extends Se{_parse(e){const{status:t,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{const c=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return c.status==="aborted"?ye:c.status==="dirty"?(t.dirty(),Ur(c.value)):this._def.out._parseAsync({data:c.value,path:a.path,parent:a})})();{const s=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return s.status==="aborted"?ye:s.status==="dirty"?(t.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:a.path,parent:a})}}static create(e,t){return new $i({in:e,out:t,typeName:me.ZodPipeline})}}class zi extends Se{_parse(e){const t=this._def.innerType._parse(e),a=s=>(Ei(s)&&(s.value=Object.freeze(s.value)),s);return Si(t)?t.then(s=>a(s)):a(t)}unwrap(){return this._def.innerType}}zi.create=(i,e)=>new zi({innerType:i,typeName:me.ZodReadonly,...ve(e)});function Xc(i,e={},t){return i?jr.create().superRefine((a,s)=>{var c,d;if(!i(a)){const u=typeof e=="function"?e(a):typeof e=="string"?{message:e}:e,p=(d=(c=u.fatal)!==null&&c!==void 0?c:t)!==null&&d!==void 0?d:!0,h=typeof u=="string"?{message:u}:u;s.addIssue({code:"custom",...h,fatal:p})}}):jr.create()}const Hh={object:qe.lazycreate};var me;(function(i){i.ZodString="ZodString",i.ZodNumber="ZodNumber",i.ZodNaN="ZodNaN",i.ZodBigInt="ZodBigInt",i.ZodBoolean="ZodBoolean",i.ZodDate="ZodDate",i.ZodSymbol="ZodSymbol",i.ZodUndefined="ZodUndefined",i.ZodNull="ZodNull",i.ZodAny="ZodAny",i.ZodUnknown="ZodUnknown",i.ZodNever="ZodNever",i.ZodVoid="ZodVoid",i.ZodArray="ZodArray",i.ZodObject="ZodObject",i.ZodUnion="ZodUnion",i.ZodDiscriminatedUnion="ZodDiscriminatedUnion",i.ZodIntersection="ZodIntersection",i.ZodTuple="ZodTuple",i.ZodRecord="ZodRecord",i.ZodMap="ZodMap",i.ZodSet="ZodSet",i.ZodFunction="ZodFunction",i.ZodLazy="ZodLazy",i.ZodLiteral="ZodLiteral",i.ZodEnum="ZodEnum",i.ZodEffects="ZodEffects",i.ZodNativeEnum="ZodNativeEnum",i.ZodOptional="ZodOptional",i.ZodNullable="ZodNullable",i.ZodDefault="ZodDefault",i.ZodCatch="ZodCatch",i.ZodPromise="ZodPromise",i.ZodBranded="ZodBranded",i.ZodPipeline="ZodPipeline",i.ZodReadonly="ZodReadonly"})(me||(me={}));const qh=(i,e={message:`Input not instance of ${i.name}`})=>Xc(t=>t instanceof i,e),Qc=Jt.create,ed=jn.create,Gh=jo.create,Kh=Wn.create,td=Bi.create,Yh=br.create,Jh=$o.create,Xh=Ni.create,Qh=Oi.create,em=jr.create,tm=kr.create,nm=Bn.create,rm=zo.create,im=Xt.create,om=qe.create,am=qe.strictCreate,sm=Ai.create,lm=Zo.create,cm=Ri.create,dm=bn.create,um=Di.create,fm=Uo.create,pm=vr.create,hm=Hr.create,mm=Ii.create,gm=Mi.create,ym=Hn.create,_m=Pi.create,wm=qr.create,nd=Qt.create,bm=kn.create,km=qn.create,vm=Qt.createWithPreprocess,xm=$i.create;var Wo=Object.freeze({__proto__:null,defaultErrorMap:Zr,setErrorMap:Vh,getErrorMap:Po,makeIssue:Lo,EMPTY_PATH:Bh,addIssueToContext:Q,ParseStatus:ft,INVALID:ye,DIRTY:Ur,OK:_t,isAborted:bs,isDirty:ks,isValid:Ei,isAsync:Si,get util(){return De},get objectUtil(){return ws},ZodParsedType:te,getParsedType:Un,ZodType:Se,datetimeRegex:Yc,ZodString:Jt,ZodNumber:jn,ZodBigInt:Wn,ZodBoolean:Bi,ZodDate:br,ZodSymbol:$o,ZodUndefined:Ni,ZodNull:Oi,ZodAny:jr,ZodUnknown:kr,ZodNever:Bn,ZodVoid:zo,ZodArray:Xt,ZodObject:qe,ZodUnion:Ai,ZodDiscriminatedUnion:Zo,ZodIntersection:Ri,ZodTuple:bn,ZodRecord:Di,ZodMap:Uo,ZodSet:vr,ZodFunction:Hr,ZodLazy:Ii,ZodLiteral:Mi,ZodEnum:Hn,ZodNativeEnum:Pi,ZodPromise:qr,ZodEffects:Qt,ZodTransformer:Qt,ZodOptional:kn,ZodNullable:qn,ZodDefault:Li,ZodCatch:Fi,ZodNaN:jo,BRAND:Wh,ZodBranded:Cs,ZodPipeline:$i,ZodReadonly:zi,custom:Xc,Schema:Se,ZodSchema:Se,late:Hh,get ZodFirstPartyTypeKind(){return me},coerce:{string:i=>Jt.create({...i,coerce:!0}),number:i=>jn.create({...i,coerce:!0}),boolean:i=>Bi.create({...i,coerce:!0}),bigint:i=>Wn.create({...i,coerce:!0}),date:i=>br.create({...i,coerce:!0})},any:em,array:im,bigint:Kh,boolean:td,date:Yh,discriminatedUnion:lm,effect:nd,enum:ym,function:hm,instanceof:qh,intersection:cm,lazy:mm,literal:gm,map:fm,nan:Gh,nativeEnum:_m,never:nm,null:Qh,nullable:km,number:ed,object:om,oboolean:()=>td().optional(),onumber:()=>ed().optional(),optional:bm,ostring:()=>Qc().optional(),pipeline:xm,preprocess:vm,promise:wm,record:um,set:pm,strictObject:am,string:Qc,symbol:Jh,transformer:nd,tuple:dm,undefined:Xh,union:sm,unknown:tm,void:rm,NEVER:ye,ZodIssueCode:G,quotelessJson:Th,ZodError:Nt});function Cm(i){throw new Error("Unexpected object: "+i)}const Em=-2147483648,rd=-9007199254740991n,Sm=NaN,Tm=NaN,Vm=null,Bm=null;function id(i,e){switch(e){case"Int":return i===Em;case"Long":return i===Number(rd)||i===rd;case"Float":return i===Sm;case"Double":return i===Tm;case"String":return i===Vm;case"Bytes":return i===Bm;default:throw Error(`unsupported data type: ${e}`)}}function Nm(i,e){const t=Math.floor(e/8),a=1<<7-e%8;return(i[t]&a)>0}function od(i){const{type:e,name:t,domain:a}=i;return{type:e,name:t,...a&&{domain:a}}}function Es(i){return i.map(od)}function Ho(i,e){switch(i.type){case"column":return{type:"column",column:e(i.column)};case"inner":case"full":return{type:i.type,entries:i.entries.map(t=>Ho(t,e))};case"outer":return{type:"outer",primary:Ho(i.primary,e),secondary:i.secondary.map(t=>Ho(t,e))};default:Cm(i)}}Wo.object({__isRef:Wo.literal(!0).describe("Crucial marker for the block dependency tree reconstruction"),blockId:Wo.string().describe("Upstream block id"),name:Wo.string().describe("Name of the output provided to the upstream block's output context")}).describe("Universal reference type, allowing to set block connections. It is crucial that {@link __isRef} is present and equal to true, internal logic relies on this marker to build block dependency trees.").strict().readonly();function Om(i){if(typeof globalThis.platforma<"u")return globalThis.platforma;throw new Error("Can't get platforma instance.")}function Am(){return Om()}function Rm(i){if(typeof globalThis.getEnvironmentValue=="function")return globalThis.getEnvironmentValue(i)}function ad(){wr.ModuleRegistry.registerModules([Mo.ClientSideRowModelModule,dh.InfiniteRowModelModule,$c.ServerSideRowModelModule,uh.CsvExportModule,zc.ClipboardModule,Zc.RangeSelectionModule,fh.RichSelectModule,ph.MenuModule,hh.ExcelExportModule]);const i=Rm("AGGRID_LICENSE");i?(Qe.LicenseManager.setLicenseKey(i),console.log("AG Grid Activated")):console.log("AG Grid License not found")}const sd=Symbol("sdk-vue");function Ss(){return n.inject(sd)}function Dm(i,e){let t;ad();const a=()=>{i.loadBlockState().then(c=>{s.loaded=!0;const d=Sh(c,i),u=e(d),p=Object.fromEntries(Object.entries(u.routes).map(([h,g])=>{const v=typeof g=="function"?g():g;return[h,n.markRaw(v)]}));t=Object.assign(d,{...u,getRoute(h){return p[h]}})}).catch(c=>{console.error("load initial state error",c),s.error=c})},s=n.reactive({loaded:!1,error:void 0,useApp(){return gh(t,"App is not loaded")},install(c){c.provide(sd,this),a()}});return s}var Im=Object.defineProperty,Mm=(i,e,t)=>e in i?Im(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Pm=(i,e,t)=>Mm(i,e+"",t);const Lm=10,Fm=30,$m=[{text:"Delete row",value:"delete:row"},{text:"Update value",value:"update:value"}],zm=[{text:"Delete column",value:"delete:column"},{text:"Fit content",value:"expand:column"}],Zm=["^data-row-index"],Um=["value"],jm=n.defineComponent({__name:"TdCell",props:{cell:{},showContextOptions:{type:Function},cellEvents:{}},emits:["delete:row","update:value"],setup(i,{emit:e}){const t=e,a=i,s=n.reactive({edit:!1});function c(h){t("update:value",{rowIndex:a.cell.rowIndex,name:a.cell.colName,value:h.target.value}),s.edit=!1}function d(){const h=a.cellEvents??[];if(!a.showContextOptions){console.warn("inject showContextOptions interface for the table");return}const g=$m.filter(v=>h.includes(v.value));g.length&&a.showContextOptions(g,v=>{t(v,a.cell.rowIndex)})}const u=n.ref();function p(){a.cell.editable&&(s.edit=!0,requestAnimationFrame(()=>{var h,g;(g=(h=u.value)==null?void 0:h.querySelector("input"))==null||g.focus()}))}return(h,g)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"cellRef",ref:u,class:n.normalizeClass(["cell",{[h.cell.class]:!0,edit:s.edit}]),"^data-row-index":h.cell.rowIndex,onContextmenu:d,onClick:n.withModifiers(p,["stop"])},[s.edit?(n.openBlock(),n.createElementBlock("input",{key:0,value:h.cell.value,onFocusout:g[0]||(g[0]=v=>s.edit=!1),onChange:c},null,40,Um)):n.renderSlot(h.$slots,"default",{key:1})],42,Zm))}});function Ge(i,e,t,a=!1){n.onMounted(()=>{var s;return(s=n.unref(i))==null?void 0:s.addEventListener(e,t,a)}),n.onUnmounted(()=>{var s;return(s=n.unref(i))==null?void 0:s.removeEventListener(e,t,a)})}function Wm(i){n.onMounted(()=>window.addEventListener("mouseup",i)),n.onUnmounted(()=>window.removeEventListener("mouseup",i))}function ld(i){let e=!1;return function(...t){e?console.log("handle pressure"):(requestAnimationFrame(()=>{i(...t),e=!1}),e=!0)}}function Hm(i,e){let t;function a(c){t={...c}}Wm(()=>{t=void 0,e()});const s=ld(i);return Ge(window,"mousemove",c=>{t&&s({x:t.x,width:t.width,diff:c.x-t.x})}),{start:a}}var qm=Object.defineProperty,Gm=(i,e,t)=>e in i?qm(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Ts=(i,e,t)=>Gm(i,typeof e!="symbol"?e+"":e,t);function Vs(i,e){if(i==null)throw Error(e??"Empty (null | undefined) value");return i}function Km(i,e){if(i===void 0)throw Error(e??"Undefined value");return i}function Ym(i=void 0){return i}function Jm(i){return i}function Xm(i){return[...new Set(i)]}function Qm(i,e){if(i==null)throw Error(e??"Empty (null | undefined) value")}function eg(i,e){if(i===void 0)throw Error(e??"Undefined value")}function cd(i,e,t){const a=Math.min(e,t),s=Math.max(e,t);return i>=a&&i<=s}function tg(i){return i.map(e=>({text:String(e),value:e}))}function ng(i){return function(...e){const t=i(...e);async function a(s){return s.done?Promise.resolve(s.value):Promise.resolve(s.value).then(c=>a(t.next(c))).catch(c=>a(t.throw(c)))}try{return a(t.next())}catch(s){return Promise.reject(s)}}}class rg{constructor(){Ts(this,"promise"),Ts(this,"resolve",()=>{}),Ts(this,"reject",()=>{}),this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}function qo(i){return new Promise(e=>setTimeout(e,i))}function ig(){return new Promise(i=>queueMicrotask(i))}function og(){const i=new Date().getTime();return function(){return new Date().getTime()-i}}function ag(){const i=performance.now();return function(){return performance.now()-i}}function dd(i){return i()}function Zi(i,e,t){return e>i?e:i>t?t:i}function Bs(i,e){return e(i)}function Gn(i,e){if(i!=null)return e(i)}function sg(i,e){return i=Math.ceil(i),e=Math.floor(e),Math.floor(Math.random()*(e-i))+i}function*ud(i,e,t=1){for(let a=i;a<e;a+=t)yield a}function fd(i){const e=[];for(const t of i)e.push(t);return e}function lg(i,e){return fd(ud(0,i)).map(e)}class cg{constructor(e){this._delay=e}async*generate(){let e=0;for(;;)await qo(this._delay),yield e++}async*[Symbol.asyncIterator](){let e=0;for(;;)await qo(this._delay),yield e++}}function dg(i,e){return Array.from({length:i},(t,a)=>e(a))}function ug(i,e){throw Error(e)}function fg(i){return e=>i[e]()}function pd(i){if(i&&i.ok)return i.value}function pg(i){if(i&&!i.ok)return i.error}function hg(i){if(i.ok)return i.value;throw Error(i.error)}function mg(i){return Array.isArray(i)?i:[i]}async function hd(i){return Object.fromEntries(await Promise.all(Object.entries(i).map(async([e,t])=>[e,await t])))}function gg(i,e){return Object.keys(e).every(t=>i[t]===e[t])}const Ns=i=>i;function yg(i){return i}function _g(i){return Object.entries(i).map(([e,t])=>({key:e,value:t}))}const Go=Object.freeze(Object.defineProperty({__proto__:null,Deferred:rg,Interval:cg,alike:gg,arrayFrom:dg,asConst:yg,async:ng,between:cd,bool:Jm,call:dd,checkIfDefined:eg,checkIfNotEmpty:Qm,clamp:Zi,delay:qo,errorOptional:pg,exhaustive:ug,flatValue:mg,identity:Ns,listToOptions:tg,match:fg,notEmpty:Vs,notUndef:Km,okOptional:pd,performanceTimer:ag,randomInt:sg,range:ud,resolveAwaited:hd,tap:Bs,tapIf:Gn,tear:ig,timer:og,times:lg,toList:fd,undef:Ym,unionize:_g,uniqueValues:Xm,unwrap:hg},Symbol.toStringTag,{value:"Module"}));function wg(i,e){return i=Math.ceil(i),e=Math.floor(e),Math.floor(Math.random()*(e-i))+i}function bg(i){return i=i.replace(" ","-"),(i[0]||"").toLowerCase()+i.slice(1).replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function kg(i,e=[]){for(i=i?String(i):"";e.includes(i.charAt(0));)i=i.substr(1);for(;e.includes(i.charAt(i.length-1));)i=i.substr(0,i.length-1);return i}function md(i){return i.replace(/^.*[\\/]/,"")}function gd(i){return i.replace(/^.*?[.]/,"")}function vg(i,e){const t=[];if(i.dataTransfer)for(let a=0;a<i.dataTransfer.items.length;a++){if(i.dataTransfer.items[a].kind!=="file")continue;const s=i.dataTransfer.items[a].getAsFile();s&&s.path&&t.push(s.path)}return e?t.filter(a=>e.includes(gd(md(a)))):t}const xg=(i,e,t="s")=>`${i} ${e}${i!==1?t:""}`;function Cg(i){try{return new RegExp(i),!0}catch{return!1}}function Eg(i){return i?i.charAt(0).toUpperCase()+i.slice(1):""}function Sg(i){return i?i.charAt(0).toLowerCase()+i.slice(1):""}function yd(i){let e="";for(let t=0;t<i;t++)e+=String.fromCharCode(wg(65,91));return e}function _d(){return yd(42)}function Tg(i,e){return i.substring(0,i.indexOf(e))}function Vg(i,e){return i.substring(0,i.lastIndexOf(e))}function Bg(i,e){return i.substring(i.indexOf(e)+e.length,i.length)}function Ng(i){if(typeof i!="string")throw Error("Expect string value, got: "+typeof i)}function Og(i){let e=0,t,a;if(i.length===0)return e;for(t=0;t<i.length;t++)a=i.charCodeAt(t),e=(e<<5)-e+a,e|=0;return e}const Ag=Object.freeze(Object.defineProperty({__proto__:null,after:Bg,assertString:Ng,before:Tg,beforeLast:Vg,camelToKebab:bg,extractExtension:gd,extractFileName:md,extractPaths:vg,hashCode:Og,isRegexpValid:Cg,lcFirst:Sg,pluralize:xg,randomString:yd,trimChars:kg,ucFirst:Eg,uniqueId:_d},Symbol.toStringTag,{value:"Module"}));function Ui(i){return i!==null&&typeof i=="object"}function Rg(i,e){return Object.keys(i).map(t=>e(i[t],t))}function Os(i,e){return Ui(i)&&Ui(e)?Object.keys(i).length!==Object.keys(e).length?!1:Object.keys(i).every(t=>Os(i[t],e[t])):i===e}function ji(i){if(Array.isArray(i)){const e=[];for(let t=0;t<i.length;t++)e[t]=ji(i[t]);return e}else if(Ui(i)){const e={};return Object.keys(i).forEach(t=>{e[t]=ji(i[t])}),e}else return i}function Dg(i){return Array.isArray(i)?Object.assign([],i):Ui(i)?Object.assign({},i):i}function Ig(i,e){const t={};for(const a in e)e[a]!==i[a]&&(t[a]=i[a]);return t}function Mg(i,e,t){return Object.assign({},i,{[e]:t})}function Pg(i){return Object.entries(i).forEach(([e,t])=>{t instanceof Function&&(i[e]=t.bind(i))}),i}function Lg(i,e,t){return i[e]=t,i}function Fg(i,e){return i[e]}function $g(i,e){i={...i};const t=i[e];return delete i[e],[t,i]}function zg(i,...e){return Object.assign({},...e.map(t=>({[t]:i[t]})))}function Zg(i,...e){return e.map(t=>i[t])}function Ug(i,...e){const t=Object.assign({},i);return e.forEach(a=>delete t[a]),t}const As=Object.freeze(Object.defineProperty({__proto__:null,bindMethods:Pg,deepClone:ji,deepEqual:Os,getProp:Fg,iSet:Mg,isObject:Ui,map:Rg,omit:Ug,pick:zg,pickValues:Zg,setProp:Lg,shallowClone:Dg,shallowDiff:Ig,shiftProp:$g},Symbol.toStringTag,{value:"Module"}));function jg(i,e){const t=i.findIndex(e);if(t<0)return[];const a=(()=>{for(let s=t;s<i.length;s++)if(!e(i[s],s))return s;return i.length})();return i.slice(t,a)}function wd(i,e,t){let a;return function(...s){a&&clearTimeout(a),a=setTimeout(()=>{a=void 0,i.apply(this,s)},e)}}const Wg=["B","kB","MB","GB","TB","PB","EB","ZB","YB"],Hg=["B","kiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],qg=["b","kbit","Mbit","Gbit","Tbit","Pbit","Ebit","Zbit","Ybit"],Gg=["b","kibit","Mibit","Gibit","Tibit","Pibit","Eibit","Zibit","Yibit"],bd=(i,e)=>{let t=String(i);return typeof e=="string"||Array.isArray(e)?t=i.toLocaleString(e):e===!0&&(t=i.toLocaleString(void 0)),t};function Rs(i,e){if(i=typeof i=="bigint"?Number(i):i,!Number.isFinite(i))throw new TypeError(`Expected a finite number, got ${typeof i}: ${i}`);Object.assign(e,{bits:!1,binary:!1});const t=e.bits?e.binary?Gg:qg:e.binary?Hg:Wg;if(e.signed&&i===0)return` 0 ${t[0]}`;const a=i<0,s=a?"-":e.signed?"+":"";if(a&&(i=-i),i<1){const p=bd(i,e.locale);return s+p+" "+t[0]}const c=Math.min(Math.floor(e.binary?Math.log(i)/Math.log(1024):Math.log10(i)/3),t.length-1);i/=(e.binary?1024:1e3)**c,i=Number(i.toPrecision(3));const d=bd(Number(i),e.locale),u=t[c];return s+d+" "+u}function Kg(i){var e;const t=Go.tapIf((e=n.unref(i))==null?void 0:e.querySelectorAll(".th-cell"),a=>[...a])??[];return t.map((a,s)=>{const{width:c,x:d}=a.getBoundingClientRect();return{index:s,width:c,x:d,right:d+c}}).slice(0,t.length-1)}function Ds(){const i=n.reactive({x:0,y:0});function e(t){i.x=t.pageX,i.y=t.pageY}return n.onMounted(()=>window.addEventListener("mousemove",e)),n.onUnmounted(()=>window.removeEventListener("mousemove",e)),i}function Is(i,e={}){const{delayEnter:t=0,delayLeave:a=0}=e,s=n.ref(!1);let c;const d=u=>{const p=u?t:a;c&&(clearTimeout(c),c=void 0),p?c=setTimeout(()=>s.value=u,p):s.value=u};return window&&(Ge(i,"mouseenter",()=>d(!0)),Ge(i,"mouseleave",()=>d(!1))),s}const{tapIf:Yg,clamp:Jg}=Go;function Xg(i,e){const t=Ds(),a=Is(e,{}),s=Hm(d=>{Yg(i.resizeTh,u=>{i.columnsMeta[u.index]={width:Jg(d.width+d.diff,Fm,1e4)}})},()=>{i.resize=!1,i.resizeTh=void 0,document.body.style.cursor=""});function c(d){i.resizeTh&&(i.resize=!0,s.start({x:d.x,width:i.resizeTh.width}))}return n.watchEffect(()=>{if(!a.value){document.body.style.cursor="";return}if(i.resize)return;const d=Kg(e).find(u=>Math.abs(t.x-u.right)<Lm);d?(document.body.style.cursor="col-resize",i.resizeTh=d):(i.resizeTh=void 0,document.body.style.cursor="")}),{mouseDown:c}}const Kn=(i,e)=>{const t=i.__vccOpts||i;for(const[a,s]of e)t[a]=s;return t},Qg={},ey={class:"add-column-btn"};function ty(i,e){return n.openBlock(),n.createElementBlock("div",ey,e[0]||(e[0]=[n.createElementVNode("div",null,null,-1)]))}const ny=Kn(Qg,[["render",ty]]),ry={},iy={width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function oy(i,e){return n.openBlock(),n.createElementBlock("svg",iy,e[0]||(e[0]=[n.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),n.createTextVNode(),n.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 ay=Kn(ry,[["render",oy]]),sy=n.defineComponent({__name:"ThCell",props:{col:{},showContextOptions:{type:Function},columnEvents:{}},emits:["delete:column","expand:column","change:sort"],setup(i,{emit:e}){const t=e,a=i;function s(u,p){const h=p.indexOf(u)+1;return p[h>=p.length?0:h]}function c(){const u=a.columnEvents??[];if(!a.showContextOptions){console.warn("inject showContextOptions interface for the table");return}const p=zm.filter(h=>u.includes(h.value));p.length&&a.showContextOptions(p,h=>{t(h,a.col.name)})}function d(u,p){t("change:sort",{colName:u,direction:s(p??"DESC",["DESC","ASC"])})}return(u,p)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["cell th-cell",{"justify-center":u.col.justify}]),onContextmenu:c},[u.col.valueType?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(u.col.valueType)},null,2)):n.createCommentVNode("",!0),n.createTextVNode(" "+n.toDisplayString(u.col.text)+" ",1),u.col.sort?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["sort",u.col.sort.direction]),onClick:p[0]||(p[0]=n.withModifiers(()=>{var h;return d(u.col.name,(h=u.col.sort)==null?void 0:h.direction)},["stop"]))},null,2)):n.createCommentVNode("",!0)],34))}}),ly=n.defineComponent({__name:"TRow",props:{index:{},visible:{type:Boolean},height:{}},setup(i){return(e,t)=>(n.openBlock(),n.createElementBlock("div",{class:"t-row",style:n.normalizeStyle(`height: ${e.height}px`)},[e.visible?n.renderSlot(e.$slots,"default",{key:0}):n.createCommentVNode("",!0)],4))}});function kd(i){return typeof i=="number"||typeof i=="string"?i:String(i)}function cy(i,e,t){for(const[a,s]of Object.entries(i)){const c=kd(e[a]),d=kd(t[a]),u=s==="DESC"?-1:1;if(c!==d)return(c>d?1:-1)*u}return 0}function vd(i){return i()}function Ms(i,e){if(i==null)throw Error(e);return i}function Ps(i){let e=!1;return function(...t){e||(requestAnimationFrame(()=>{i(...t),e=!1}),e=!0)}}function xd(i){return new Promise(e=>setTimeout(e,i))}function Cd(i,e){const t=setTimeout(i,e);return()=>{clearTimeout(t)}}function Ed(i,e){return i=Math.ceil(i),e=Math.floor(e),Math.floor(Math.random()*(e-i))+i}function dy(i){let e="";for(let t=0;t<i;t++)e+=String.fromCharCode(Ed(65,91));return e}function Sd(i){return function(e){return 1-i(1-e)}}function uy(i){return function(e){return e<.5?i(2*e)/2:(2-i(2*(1-e)))/2}}function Td(i){const{duration:e,draw:t,timing:a}=i,s=performance.now();let c=!1;return requestAnimationFrame(function d(u){let p=(u-s)/e;(p>1||c)&&(p=1);const h=a(p);t(h),p<1&&requestAnimationFrame(d)}),function(){c=!0}}function fy(i){const{getFraction:e,draw:t,timing:a}=i,s=performance.now();let c=!1;return requestAnimationFrame(function d(u){let p=e(u-s);if(c)return;p>1&&(p=1);const h=a(p);t(h),p<1&&requestAnimationFrame(d)}),function(){c=!0}}function Vd(i,e){let t=-1;return(...a)=>{t!==-1&&(clearTimeout(t),t=-1),t=window.setTimeout(()=>i(...a),e)}}function Ls(i,e,t=!0){let a=0,s;return function(...c){s=()=>{i.apply(this,c),a=new Date().getTime()+e,s=null,t&&setTimeout(()=>{s&&s()},e)},new Date().getTime()>a&&s()}}function py(i){return i.map(e=>({text:String(e),value:e}))}function Gr(i){return i.map(e=>({label:"label"in e?e.label:e.text,value:e.value,description:e.description}))}const Fs=40,hy=n.defineComponent({__name:"index",props:{settings:{}},emits:["click:cell","delete:row","delete:column","change:sort","update:value"],setup(i){const{tapIf:e,tap:t}=Go,{uniqueId:a}=Ag,s=i,c=n.reactive({rowIndex:-1,columnsMeta:{},resize:!1,resizeTh:void 0,bodyHeight:0,scrollTop:0}),d=n.ref(),u=n.ref(),p=n.ref(),h=()=>{e(p.value,j=>{c.bodyHeight=j.getBoundingClientRect().height})},g=n.computed(()=>s.settings.autoLastColumn?[...s.settings.columns,{name:a(),text:"_"}]:s.settings.columns),v=n.computed(()=>{const{columnsMeta:j}=c,P=n.unref(g),U=Object.keys(j).length;return P.map((N,S)=>S==P.length-1?U?"minmax(100px, 1fr)":N.width??"minmax(100px, 1fr)":j[S]?j[S].width+"px":N.width??"140px").join(" ")}),T=n.computed(()=>({gridColumn:"1 / "+n.unref(g).length+1})),B=n.computed(()=>n.unref(g).reduce((j,P)=>(j[P.name]=P.justify?"justify-"+P.justify:"",j),{})),O=n.computed(()=>{const j=n.unref(g),P=s.settings.rows.slice(),{bodyHeight:U,scrollTop:N}=c;if(s.settings.selfSort){const W=j.reduce((F,q)=>{var oe;return(oe=q.sort)!=null&&oe.direction&&(F[q.name]=q.sort.direction),F},{});Object.keys(W).length&&P.sort((F,q)=>cy(W,F,q))}const S=160;let M=0;return P.map((W,F)=>{const q=t(W.__height?Number(W.__height):Fs,ae=>!Number.isFinite(ae)||ae<Fs?Fs:ae),oe=j.map(ae=>{const J=ae.name;return{colName:J,rowIndex:F,value:W[J],class:B.value[J]+(F===c.rowIndex?" hovered":""),slot:ae.slot,editable:ae.editable}}),de=U?N<M+q+S&&M<U+N+S:!1;return M+=q+1,{visible:de,height:q,cells:oe}})}),{mouseDown:C}=Xg(c,d);function A(){e(u.value,j=>{var P;j.scrollLeft=((P=p.value)==null?void 0:P.scrollLeft)??0})}const b=Ls(()=>{var j;c.scrollTop=((j=p.value)==null?void 0:j.scrollTop)??0},10),D=()=>{A(),b()};function $(j){const P=g.value.findIndex(N=>N.name===j);if(P<0)return;const U=s.settings.rows.reduce((N,S)=>{const M=9.52*Go.call(()=>{const W=S[j];return W&&typeof W=="object"&&"segments"in W?W.segments.map(F=>F.sequence).join("").length:String(W??"").length});return M>N?M:N},0);c.columnsMeta[P]={width:U}}return n.onMounted(()=>{n.nextTick(h)}),n.watchPostEffect(()=>{n.unref(s.settings),n.nextTick(h)}),Ge(window,"resize",()=>n.nextTick(h)),(j,P)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"tableRef",ref:d,class:"grid-table",onMousedown:P[5]||(P[5]=(...U)=>n.unref(C)&&n.unref(C)(...U))},[j.settings.addColumn?(n.openBlock(),n.createBlock(ny,{key:0,onClick:n.withModifiers(j.settings.addColumn,["stop"])},null,8,["onClick"])):n.createCommentVNode("",!0),P[9]||(P[9]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"headRef",ref:u,class:"table-head",style:n.normalizeStyle({gridTemplateColumns:v.value})},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(g.value,(U,N)=>(n.openBlock(),n.createBlock(sy,{key:N,col:U,"show-context-options":j.settings.showContextOptions,"column-events":j.settings.columnEvents,"onDelete:column":P[0]||(P[0]=S=>j.$emit("delete:column",S)),"onChange:sort":P[1]||(P[1]=S=>j.$emit("change:sort",S)),"onExpand:column":P[2]||(P[2]=S=>$(S))},null,8,["col","show-context-options","column-events"]))),128))],4),P[10]||(P[10]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"bodyRef",ref:p,class:"table-body",onScroll:D},[O.value.length===0?(n.openBlock(),n.createElementBlock("div",{key:0,class:"table-body__no-data",style:n.normalizeStyle(T.value)},[n.createElementVNode("div",null,[n.createVNode(ay),P[6]||(P[6]=n.createTextVNode()),P[7]||(P[7]=n.createElementVNode("div",null,"No Data To Show",-1))])],4)):n.createCommentVNode("",!0),P[8]||(P[8]=n.createTextVNode()),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(O.value,(U,N)=>(n.openBlock(),n.createBlock(ly,{key:N,visible:U.visible,height:U.height,index:N,style:n.normalizeStyle({gridTemplateColumns:v.value})},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(U.cells,(S,M)=>(n.openBlock(),n.createBlock(jm,{key:M,cell:S,"show-context-options":j.settings.showContextOptions,"cell-events":j.settings.cellEvents,onClick:n.withModifiers(W=>j.$emit("click:cell",S),["stop"]),"onDelete:row":P[3]||(P[3]=W=>j.$emit("delete:row",W)),"onUpdate:value":P[4]||(P[4]=W=>j.$emit("update:value",W))},{default:n.withCtx(()=>[S.slot?n.renderSlot(j.$slots,S.colName,n.mergeProps({key:0,ref_for:!0},S),()=>[n.createTextVNode(n.toDisplayString(S.value),1)]):n.renderSlot(j.$slots,"default",n.mergeProps({key:1,ref_for:!0},S),()=>[n.createTextVNode(n.toDisplayString(S.value),1)])]),_:2},1032,["cell","show-context-options","cell-events","onClick"]))),128))]),_:2},1032,["visible","height","index","style"]))),128))],544)],544))}}),my={class:"context-menu"},gy=["onClick"],yy=n.defineComponent({__name:"Menu",props:{options:{}},emits:["close"],setup(i,{emit:e}){const t=e,a=s=>{s.cb(),t("close")};return(s,c)=>(n.openBlock(),n.createElementBlock("div",my,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.options,(d,u)=>(n.openBlock(),n.createElementBlock("div",{key:u,onClick:n.withModifiers(p=>a(d),["stop"])},[n.createElementVNode("span",null,n.toDisplayString(d.text),1)],8,gy))),128))]))}}),_y=Kn(yy,[["__scopeId","data-v-12530966"]]);function $s(i,e){i.preventDefault();const t=()=>{n.render(null,document.body)},a=n.h(_y,{options:e,onClose:()=>{t()}});n.render(a,document.body);const s=a.el;return s.style.top=i.clientY+"px",s.style.left=i.clientX+"px",document.addEventListener("click",c=>{s.contains(c.target)||t()}),t}const Bd=Symbol(),Ko=()=>n.inject(Bd),wy=["value"],by={key:1},ky=n.defineComponent({__name:"BaseCellComponent",props:{modelValue:{},valueType:{},editable:{type:Boolean}},emits:["update:modelValue"],setup(i,{emit:e}){const t=e,a=i,s=n.reactive({edit:!1}),c=n.computed(()=>a.valueType),d=h=>{var g;let v=(g=h.target)==null?void 0:g.value;const T=n.unref(c),B=dd(()=>T==="integer"?parseInt(v,10):T==="float"?Number(v):v);t("update:modelValue",B),s.edit=!1},u=n.ref(),p=h=>{!h.metaKey&&a.editable&&(s.edit=!0,requestAnimationFrame(()=>{var g,v;(v=(g=u.value)==null?void 0:g.querySelector("input"))==null||v.focus()}))};return(h,g)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"baseRef",ref:u,class:n.normalizeClass(["base-cell",{"base-cell__edit":s.edit}]),onClick:p},[s.edit?(n.openBlock(),n.createElementBlock("input",{key:0,value:h.modelValue,onFocusout:g[0]||(g[0]=v=>s.edit=!1),onChange:d},null,40,wy)):(n.openBlock(),n.createElementBlock("div",by,n.toDisplayString(h.modelValue),1))],2))}}),vy=["^data-row-index"],xy={key:0,class:"control-cell"},Cy=n.defineComponent({__name:"TdCell",props:{cell:{}},setup(i){const e=i,t=Ko(),a=n.computed(()=>e.cell.column.valueType),s=h=>{Gn(t.settings.value.onUpdatedRow,g=>{const v=e.cell.row,T={...v.dataRow,[e.cell.id]:h};g({...v,dataRow:T})})},c=h=>{h.metaKey&&t.selectRow(e.cell.row.primaryKey)},d=(h,g)=>{if(h.type==="contextmenu")h.preventDefault();else return;const v=t.settings??{},T=[],{onSelectedRows:B,onSelectedColumns:O}=v.value,C=t.data.selectedRows.has(g.primaryKey);B&&B.length&&(C?T.push({text:"Deselect row",cb(){t.data.selectedRows.delete(e.cell.row.primaryKey)}}):T.push({text:"Select row",cb(){t.selectRow(e.cell.row.primaryKey)}})),O&&O.length&&(T.push({text:"Select column",cb(){t.selectColumn(e.cell.column.id)}}),T.push({text:"Unselect column",cb(){t.unselectColumn(e.cell.column.id)}})),T.length&&$s(h,T)},u=n.ref(),p=n.computed(()=>e.cell.column.component?e.cell.column.component():void 0);return(h,g)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"cellRef",ref:u,class:n.normalizeClass(["td-cell",{[h.cell.class]:!0}]),"^data-row-index":h.cell.row.index,onClick:c,onContextmenu:g[0]||(g[0]=v=>d(v,h.cell.row))},[h.cell.control?(n.openBlock(),n.createElementBlock("div",xy,n.toDisplayString(h.cell.row.index),1)):p.value?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(p.value),{key:1,"model-value":h.cell.value,"onUpdate:modelValue":s},null,8,["model-value"])):(n.openBlock(),n.createBlock(ky,{key:2,"model-value":h.cell.value,"value-type":a.value,editable:h.cell.column.editable,"onUpdate:modelValue":s},null,8,["model-value","value-type","editable"]))],42,vy))}}),Ey={},Sy={width:"48",height:"48",viewBox:"0 0 48 48",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Ty(i,e){return n.openBlock(),n.createElementBlock("svg",Sy,e[0]||(e[0]=[n.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),n.createTextVNode(),n.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 Vy=Kn(Ey,[["render",Ty]]),By={class:"tr-head"},Ny=n.defineComponent({__name:"TrHead",setup(i){return(e,t)=>(n.openBlock(),n.createElementBlock("div",By,[n.renderSlot(e.$slots,"default")]))}});function Oy(i,e){const t=e.indexOf(i)+1;return e[t>=e.length?0:t]}function Ay(i,e){const t=i.findIndex(e);if(t<0)return[];const a=(()=>{for(let s=t;s<i.length;s++)if(!e(i[s],s))return s;return i.length})();return i.slice(t,a)}const Ry=["^data-col-id"],Dy=n.defineComponent({__name:"ThCell",props:{col:{}},emits:["delete:column","expand:column","change:sort"],setup(i,{emit:e}){const t=e;function a(c){c.preventDefault();const d=[];d.length&&$s(c,d)}function s(c){var d;const u=((d=c.sort)==null?void 0:d.direction)??"DESC";t("change:sort",{colId:c.id,direction:Oy(u,["DESC","ASC"])})}return(c,d)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["cell th-cell",{"justify-center":c.col.justify,frozen:c.col.frozen}]),"^data-col-id":c.col.id,onContextmenu:a},[c.col.valueType?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(c.col.valueType)},null,2)):n.createCommentVNode("",!0),n.createTextVNode(" "+n.toDisplayString(c.col.label)+" ",1),c.col.sort?(n.openBlock(),n.createElementBlock("div",{key:1,class:n.normalizeClass(["sort",c.col.sort.direction]),onClick:d[0]||(d[0]=n.withModifiers(()=>s(c.col),["stop"]))},null,2)):n.createCommentVNode("",!0)],42,Ry))}}),Iy=n.defineComponent({__name:"TrBody",props:{row:{}},setup(i){const e=n.ref(),t=()=>{n.nextTick().then(()=>{Gn(e.value,a=>a.scrollLeft=0)})};return(a,s)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"trRef",ref:e,class:n.normalizeClass(["tr-body",{selected:a.row.selected}]),scroll:"no",style:n.normalizeStyle(a.row.style),onScroll:t},[n.renderSlot(a.$slots,"default")],38))}}),My=n.defineComponent({__name:"ColumnCaret",props:{column:{}},setup(i){const e=Ko(),t=i,a=n.computed(()=>e.data.selectedColumns.has(t.column.id));return(s,c)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["column-caret",{selected:a.value,frozen:s.column.frozen}])},null,2))}});function Py(i){n.onMounted(()=>window.addEventListener("mouseup",i)),n.onUnmounted(()=>window.removeEventListener("mouseup",i))}function Ly(i,e){let t;function a(c){t={...c}}Py(()=>{t=void 0,e()});const s=ld(i);return Ge(window,"mousemove",c=>{t&&s({x:t.x,width:t.width,diff:c.x-t.x})}),{start:a}}const Kr=1,Fy=10,$y=30,Nd=60;function zy(i){var e;const t=Gn((e=n.unref(i))==null?void 0:e.querySelectorAll(".th-cell"),a=>[...a])??[];return t.map(a=>{const{width:s,x:c}=a.getBoundingClientRect(),d=a.getAttribute("data-col-id");return Ns({colId:d,width:s,x:c,right:c+s})}).slice(0,t.length-1)}function Zy(i,e){const t=Ds(),a=Is(e,{}),{data:s}=i,c=Ly(u=>{Gn(s.resizeTh,p=>{const h=s.columns.find(g=>g.id===p.colId);h&&(h.width=Zi(u.width+u.diff,$y,1e4),i.adjustWidth())})},()=>{s.resize=!1,s.resizeTh=void 0,document.body.style.cursor=""}),d=u=>{s.resizeTh&&(s.resize=!0,c.start({x:u.x,width:s.resizeTh.width}))};return n.watchEffect(()=>{if(!a.value){document.body.style.cursor="";return}if(s.resize)return;const u=zy(e).find(p=>Math.abs(t.x-p.right)<Fy);u?(document.body.style.cursor="col-resize",s.resizeTh=u):(s.resizeTh=void 0,document.body.style.cursor="")}),{mouseDown:d}}const Uy={key:0,class:"command-menu"},jy={key:0},Wy=["onClick"],Hy=n.defineComponent({__name:"RowsCommandMenu",setup(i){const e=Ko(),t=n.computed(()=>e.getSelectedRows()),a=n.computed(()=>t.value.length>0),s=n.computed(()=>{var d;return((d=e.settings)==null?void 0:d.value.onSelectedRows)??[]}),c=n.computed(()=>s.value.map(d=>({label:d.label,cb:()=>{d.cb(t.value),e.data.selectedRows.clear(),e.data.rows=[]}})));return(d,u)=>a.value?(n.openBlock(),n.createElementBlock("div",Uy,[t.value.length?(n.openBlock(),n.createElementBlock("span",jy,n.toDisplayString(t.value.length)+" rows selected",1)):n.createCommentVNode("",!0),u[0]||(u[0]=n.createTextVNode()),u[1]||(u[1]=n.createElementVNode("hr",null,null,-1)),u[2]||(u[2]=n.createTextVNode()),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(c.value,(p,h)=>(n.openBlock(),n.createElementBlock("span",{key:h,class:"command",onClick:n.withModifiers(p.cb,["stop"])},n.toDisplayString(p.label),9,Wy))),128))])):n.createCommentVNode("",!0)}}),qy={key:0,class:"command-menu"},Gy={key:0},Ky=["onClick"],Yy=n.defineComponent({__name:"ColumnsCommandMenu",setup(i){const e=Ko(),t=n.computed(()=>e.getSelectedColumns()),a=n.computed(()=>t.value.length>0),s=n.computed(()=>{var d;return((d=e.settings)==null?void 0:d.value.onSelectedColumns)??[]}),c=n.computed(()=>s.value.map(d=>({label:d.label,cb:()=>{d.cb(t.value),e.data.selectedColumns.clear()}})));return(d,u)=>a.value?(n.openBlock(),n.createElementBlock("div",qy,[t.value.length?(n.openBlock(),n.createElementBlock("span",Gy,"selected columns "+n.toDisplayString(t.value.length),1)):n.createCommentVNode("",!0),u[0]||(u[0]=n.createTextVNode()),u[1]||(u[1]=n.createElementVNode("hr",null,null,-1)),u[2]||(u[2]=n.createTextVNode()),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(c.value,(p,h)=>(n.openBlock(),n.createElementBlock("span",{key:h,class:"command",onClick:n.withModifiers(p.cb,["stop"])},n.toDisplayString(p.label),9,Ky))),128))])):n.createCommentVNode("",!0)}});function Yn(i,e){const t={el:void 0,x:0,y:0},a=s=>({x:s.x,y:s.y,dx:s.x-t.x,dy:s.y-t.y});Ge(document,"mousedown",s=>{s.target===n.unref(i)&&(s.stopPropagation&&s.stopPropagation(),s.preventDefault&&s.preventDefault(),t.el=n.unref(i),t.x=s.x,t.y=s.y)}),Ge(document,"mouseup",s=>{t.el&&(t.el=void 0,e({...a(s),stop:!0},t))}),Ge(document,"mousemove",s=>{t.el&&e(a(s),t)})}const Jy=n.defineComponent({__name:"TScroll",props:{offset:{},windowSize:{},dataSize:{}},emits:["change:offset"],setup(i,{emit:e}){const t=e,a=i,s=n.ref(),c=n.computed(()=>a.windowSize-12),d=n.computed(()=>a.windowSize<a.dataSize),u=n.computed(()=>Math.ceil(a.offset*(c.value/a.dataSize))),p=n.computed(()=>Math.ceil(c.value*c.value/a.dataSize)),h=n.computed(()=>({top:`${u.value}px`,height:`${p.value}px`}));return Yn(s,(g,v)=>{const T=(u.value+g.dy)*a.dataSize/c.value;t("change:offset",T),v.x=g.x,v.y=g.y}),(g,v)=>(n.openBlock(),n.createElementBlock("div",{class:"t-scroll",style:n.normalizeStyle({height:`${g.windowSize}px`})},[n.createElementVNode("div",null,[d.value?(n.openBlock(),n.createElementBlock("div",{key:0,ref_key:"handleRef",ref:s,class:"t-scroll__handle",style:n.normalizeStyle(h.value)},null,4)):n.createCommentVNode("",!0)])],4))}});function Xy(i){return n.computed(()=>{const{data:e,settings:t}=i,{bodyWidth:a,scrollLeft:s}=e,c=[...e.columns],d=_d();t.value.controlColumn&&c.unshift({id:d,label:"#",width:60,frozen:!0});let u=0;const p=c.map(g=>{const v={...g,offset:u};return u+=g.width+Kr,v}),h=p.filter(g=>g.frozen);return jg(p,g=>g.frozen?!1:s<g.offset+g.width&&g.offset<a+s).concat(h).map(g=>({...g,style:{left:g.frozen?`${g.offset}px`:`${g.offset-e.scrollLeft}px`,width:`${g.width}px`},control:g.id===d}))})}function Qy(i,e){const t=n.computed(()=>e.value.reduce((a,s)=>(a[s.id]=s.justify?"justify-"+s.justify:"",a),{}));return n.computed(()=>i.rows.map(a=>{const s=t.value,{primaryKey:c,offset:d,dataRow:u,height:p}=a,h=e.value.map(g=>({id:g.id,column:g,row:a,value:u[g.id],class:s[g.id],editable:g.editable,width:g.width,style:g.style,control:g.control}));return Ns({style:{top:`${d-i.scrollTop}px`,height:`${a.height}px`},primaryKey:c,offset:d,height:p,cells:h,selected:i.selectedRows.has(c)})}))}const e_=async(i,e)=>{const{scrollTop:t,bodyHeight:a}=i;return await qo(0),hd({rows:e.getRows(t,a),dataWindow:i})};function t_(i){const e=n.reactive({rowIndex:-1,columns:[],pendingLoads:0,currentWindow:void 0,rows:[],resize:!1,resizeTh:void 0,dataHeight:0,bodyHeight:i.settings.height,bodyWidth:0,scrollTop:0,scrollLeft:0,selectedRows:new Set,selectedColumns:new Set});n.watch(()=>i.settings,g=>{e.columns=ji(g.columns),e.currentWindow=void 0,g.dataSource.getHeight().then(v=>{e.dataHeight=v,h.updateBodyHeight()}).catch(v=>e.error=v)},{immediate:!0});const t=n.computed(()=>i.settings),a=n.computed(()=>e.columns.reduce((g,v)=>g+v.width+Kr,0)),s=n.computed(()=>Bs(h.data.dataHeight-h.data.bodyHeight,g=>g>0?g:0)),c=n.computed(()=>Bs(a.value-h.data.bodyWidth,g=>g>0?g:0)),d=n.computed(()=>({bodyHeight:e.bodyHeight,scrollTop:e.scrollTop,current:e.currentWindow})),u=Xy({data:e,settings:t}),p=Qy(e,u),h={data:e,settings:t,tableColumns:u,tableRows:p,adjustWidth:()=>{const g=e.columns.reduce((T,B)=>T+B.width+Kr,0),v=e.bodyWidth+e.scrollLeft;if(g<v){const T=e.columns[e.columns.length-1];T.width=T.width+(v-g)}},updateOffsets(g){this.updateScrollTop(e.scrollTop+g.deltaY),this.updateScrollLeft(e.scrollLeft+g.deltaX)},getSelectedRows(){return e.rows.filter(g=>e.selectedRows.has(g.primaryKey))},getSelectedColumns(){return e.columns.filter(g=>e.selectedColumns.has(g.id))},selectRow(g){e.selectedRows.add(g)},unselectRow(g){e.selectedRows.delete(g)},selectColumn(g){e.selectedColumns.add(g)},unselectColumn(g){e.selectedColumns.delete(g)},updateScrollTop(g){e.scrollTop=Zi(g,0,s.value)},updateScrollLeft(g){e.scrollLeft=Zi(g,0,c.value)},updateBodyHeight(){const{height:g}=i.settings,{dataHeight:v}=e,T=g>v?v:g;e.bodyHeight=T},updateDimensions(g){this.updateBodyHeight(),h.data.bodyWidth=g.width,h.adjustWidth(),e.rows=[],e.currentWindow=void 0}};return n.watch(d,(g,v)=>{const T=g.current;(!T||g.scrollTop<T.scrollTop||g.scrollTop+g.bodyHeight>T.bodyHeight+T.scrollTop)&&(e.currentWindow={scrollTop:g.scrollTop-Nd,bodyHeight:g.bodyHeight+Nd*2},e_(ji(e.currentWindow),t.value.dataSource).then(({rows:B,dataWindow:O})=>{Os(e.currentWindow,O)&&(e.rows=B)}))},{deep:!0,immediate:!0}),n.provide(Bd,h),h}const n_={class:"command-menu__container"},r_={key:0,class:"table-body__no-data"},i_={class:"carets"},zs=n.defineComponent({__name:"TableComponent",props:{settings:{}},emits:["update:data","change:sort"],setup(i,{emit:e}){const t=e,a=i,s=t_(a),c=n.computed(()=>s.data.rows.length===0),d=n.computed(()=>({height:c.value?"212px":s.data.bodyHeight+"px"}));n.watch(s.data,C=>t("update:data",C),{deep:!0}),n.watch(a,()=>g);const u=n.ref(),p=n.ref(),h=n.ref(),g=()=>{Gn(h.value,C=>{s.updateDimensions(C.getBoundingClientRect())})},v=s.tableColumns,T=s.tableRows,{mouseDown:B}=Zy(s,u);n.onMounted(()=>{n.nextTick(g)}),n.watchPostEffect(()=>{n.unref(a.settings),n.nextTick(g)}),Ge(window,"resize",()=>n.nextTick(g));const O=C=>{C.preventDefault(),s.updateOffsets(C)};return(C,A)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"tableRef",ref:u,class:"data-table",onMousedown:A[2]||(A[2]=(...b)=>n.unref(B)&&n.unref(B)(...b))},[n.createElementVNode("div",n_,[n.createVNode(Hy),A[3]||(A[3]=n.createTextVNode()),n.createVNode(Yy)]),A[7]||(A[7]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"headRef",ref:p,class:"table-head"},[n.createVNode(Ny,null,{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(v),(b,D)=>(n.openBlock(),n.createBlock(Dy,{key:D,col:b,style:n.normalizeStyle(b.style),"onChange:sort":A[0]||(A[0]=$=>C.$emit("change:sort",$))},null,8,["col","style"]))),128))]),_:1})],512),A[8]||(A[8]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"bodyRef",ref:h,class:"table-body",style:n.normalizeStyle(d.value),onWheel:O},[c.value?(n.openBlock(),n.createElementBlock("div",r_,[n.createElementVNode("div",null,[n.createVNode(Vy),A[4]||(A[4]=n.createTextVNode()),A[5]||(A[5]=n.createElementVNode("div",null,"No Data To Show",-1))])])):n.createCommentVNode("",!0),A[6]||(A[6]=n.createTextVNode()),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(T),(b,D)=>(n.openBlock(),n.createBlock(Iy,{key:D,row:b},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(b.cells,$=>(n.openBlock(),n.createBlock(Cy,{key:$.column.id+":"+D,cell:$,style:n.normalizeStyle($.style)},null,8,["cell","style"]))),128))]),_:2},1032,["row"]))),128))],36),A[9]||(A[9]=n.createTextVNode()),n.createElementVNode("div",i_,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(v),(b,D)=>(n.openBlock(),n.createBlock(My,{key:D,column:b,style:n.normalizeStyle(b.style),"onChange:sort":A[1]||(A[1]=$=>C.$emit("change:sort",$))},null,8,["column","style"]))),128))]),A[10]||(A[10]=n.createTextVNode()),n.createVNode(Jy,{offset:n.unref(s).data.scrollTop,"window-size":n.unref(s).data.bodyHeight,"data-size":n.unref(s).data.dataHeight,"onChange:offset":n.unref(s).updateScrollTop},null,8,["offset","window-size","data-size","onChange:offset"])],544))}}),Od=new WeakMap;class o_{constructor(e,t,a){Pm(this,"dataHeight"),this.datum=e,this.resolveHeight=t,this.resolvePrimaryKey=a;const s=e.reduce((d,u,p)=>(d.indices.set(p,d.total),d.total+=this.resolveHeight(u,p)+Kr,d),{total:0,indices:new Map});this.dataHeight=s.total;const c=e.map((d,u)=>({dataRow:d,index:u,primaryKey:this.resolvePrimaryKey(d,u),offset:Vs(s.indices.get(u)),height:this.resolveHeight(d,u)}));Od.set(this,c)}get rows(){return Od.get(this)}async getHeight(){return this.dataHeight}async getRows(e,t){return Ay(this.rows,a=>{const s=a.offset;return e<s+a.height&&s<t+e})}}class a_{constructor(e,t,a){this.api=e,this.rowHeight=t,this.resolvePrimaryKey=a}get height(){return this.rowHeight+Kr}async getHeight(){return await this.api.count()*this.height}async getRows(e,t){const a=Zi(Math.floor(e/this.height),0,Number.POSITIVE_INFINITY),s=Math.ceil(t+40/this.height);return(await this.api.query({offset:a,limit:s})).map((c,d)=>({dataRow:c,index:a+d,primaryKey:this.resolvePrimaryKey(c,a+d),offset:(a+d)*(this.rowHeight+Kr),height:this.rowHeight}))}}function s_(i){return Object.freeze(i)}function l_(i){return n.h(zs,{settings:Object.freeze(i)})}function Zs(i,e){const t=new o_(i,e.resolveRowHeight,e.resolvePrimaryKey);return{...e,dataSource:t}}function c_(i,e){return n.computed(()=>{const t=n.unref(i);return Zs(t,n.unref(e))})}function d_(i,e){const t=n.computed(()=>{const s=n.unref(i);return Zs(s,n.unref(e))}),a=n.reactive({settings:t});return n.computed(()=>n.h(zs,a))}const u_=Object.freeze(Object.defineProperty({__proto__:null,AsyncData:a_,Component:zs,factory:l_,rawDataSettings:Zs,settings:s_,useRawData:c_,useRawDataComponent:d_},Symbol.toStringTag,{value:"Module"}));function*f_(i,e){for(const t of i)yield e(t)}function p_(i){const e=[];for(const t of i)e.push(t);return e}const Us=new Map;function h_(i){return Us.has(i)||Us.set(i,n.ref(localStorage.getItem(i))),Ms(Us.get(i),"...")}function m_(i,e){e==null?localStorage.removeItem(i):localStorage.setItem(i,e)}function Ad(i){const e=h_(i);return n.watch(e,t=>m_(i,t)),e}const js=new Set;window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",i=>{p_(f_(js.values(),e=>e(i.matches?"dark":"light")))});const g_=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",Rd=n.ref(g_),Ws=Ad("theme");function Dd(i){const e=n.computed(()=>Ws.value?Ws.value:Rd.value),t=s=>{Rd.value=s,i&&i(s)};function a(){Ws.value=e.value==="light"?"dark":(e.value,"light")}return n.watch(e,s=>{i&&i(n.unref(s))}),n.onMounted(()=>{js.add(t)}),n.onUnmounted(()=>{js.delete(t)}),[e,a]}const y_=n.defineComponent({__name:"ThemeSwitcher",setup(i){const[e,t]=Dd();return(a,s)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["ui-theme-switcher",n.unref(e)]),onClick:s[0]||(s[0]=(...c)=>n.unref(t)&&n.unref(t)(...c))},s[1]||(s[1]=[n.createElementVNode("div",null,null,-1)]),2))}}),__={class:"pl-layout-component pl-block-page"},w_={key:0,class:"pl-block-page__title"},b_={class:"pl-block-page__title__append"},k_={key:1},v_={class:"pl-block-page__body"},x_={name:"PlBlockPage"},C_=n.defineComponent({...x_,setup(i){const e=n.useSlots();return(t,a)=>(n.openBlock(),n.createElementBlock("div",__,[n.unref(e).title?(n.openBlock(),n.createElementBlock("div",w_,[n.createElementVNode("h1",null,[n.renderSlot(t.$slots,"title")]),a[0]||(a[0]=n.createTextVNode()),n.createElementVNode("div",b_,[n.renderSlot(t.$slots,"append")])])):(n.openBlock(),n.createElementBlock("div",k_)),a[1]||(a[1]=n.createTextVNode()),n.createElementVNode("div",v_,[n.renderSlot(t.$slots,"default")])]))}}),E_={name:"PlContainer"},S_=n.defineComponent({...E_,props:{width:{}},setup(i){const e=i,t=n.computed(()=>({width:e.width}));return(a,s)=>(n.openBlock(),n.createElementBlock("div",{class:"pl-container pl-layout-component",style:n.normalizeStyle(t.value)},[n.renderSlot(a.$slots,"default")],4))}}),T_={name:"PlRow"},V_=n.defineComponent({...T_,props:{wrap:{type:Boolean},alignCenter:{type:Boolean}},setup(i){return(e,t)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["pl-layout-component pl-row",{wrap:e.wrap,"align-center":e.alignCenter}])},[n.renderSlot(e.$slots,"default")],2))}}),B_={class:"pl-layout-component",style:{"flex-grow":"1"}},N_={name:"PlSpacer"},O_=n.defineComponent({...N_,setup(i){return(e,t)=>(n.openBlock(),n.createElementBlock("div",B_))}}),A_={name:"PlGrid"},R_=n.defineComponent({...A_,props:{columns:{}},setup(i){const e=i,t=n.computed(()=>({gridTemplateColumns:`repeat(${e.columns}, minmax(0, 1fr))`}));return(a,s)=>(n.openBlock(),n.createElementBlock("div",{class:"pl-layout-component pl-grid",style:n.normalizeStyle(t.value)},[n.renderSlot(a.$slots,"default")],4))}}),D_={key:0,class:"pl-alert__icon"},I_={class:"pl-alert__main"},M_={key:0},P_={class:"pl-alert__main__text"},L_={name:"PlAlert"},F_=n.defineComponent({...L_,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(i){const e={success:"success",warn:"warning",info:"edit",error:"error"};return(t,a)=>t.modelValue?(n.openBlock(),n.createElementBlock("div",{key:0,class:n.normalizeClass(["pl-alert",[{monospace:t.monospace,whiteSpacePre:t.whiteSpacePre},t.type?`pl-alert__${t.type}`:""]]),style:n.normalizeStyle({maxHeight:t.maxHeight})},[t.icon&&t.type?(n.openBlock(),n.createElementBlock("div",D_,[n.createElementVNode("div",{class:n.normalizeClass(`icon-24 icon-${e[t.type]}`)},null,2)])):n.createCommentVNode("",!0),a[2]||(a[2]=n.createTextVNode()),n.createElementVNode("div",I_,[t.label?(n.openBlock(),n.createElementBlock("label",M_,n.toDisplayString(t.label),1)):n.createCommentVNode("",!0),a[1]||(a[1]=n.createTextVNode()),n.createElementVNode("div",P_,[n.renderSlot(t.$slots,"default")])]),a[3]||(a[3]=n.createTextVNode()),t.closeable?(n.openBlock(),n.createElementBlock("div",{key:1,class:"pl-alert__close-btn","aria-label":"Close alert",role:"button",onClick:a[0]||(a[0]=s=>t.$emit("update:modelValue",!1))})):n.createCommentVNode("",!0)],6)):n.createCommentVNode("",!0)}}),Wi=n.defineComponent({__name:"MaskIcon16",props:{name:{},size:{}},setup(i){const e=i,t=n.computed(()=>e.size==="large"?"--mask-size: 24px":""),a=n.computed(()=>`mask-16 mask-${e.name}`);return(s,c)=>(n.openBlock(),n.createElementBlock("i",{style:n.normalizeStyle(t.value),class:n.normalizeClass(a.value)},null,6))}});function Id(i){function e(t){const a=t.currentTarget,s=document.createElement("span"),c=Math.max(a.clientWidth,a.clientHeight),d=c/2;s.style.width=s.style.height=`${c}px`,s.style.left=`${t.clientX-a.offsetLeft-d}px`,s.style.top=`${t.clientY-a.offsetTop-d}px`,s.classList.add("ripple");const u=a.getElementsByClassName("ripple")[0];u&&u.remove(),a.appendChild(s)}n.onMounted(()=>{var t;(t=i.value)==null||t.addEventListener("click",e)})}const $_={key:0},z_={inheritAttrs:!1},Yo=n.defineComponent({...z_,__name:"BtnBase",props:{loading:{type:Boolean},small:{type:Boolean},large:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(i){const e=i,t=n.ref(),a=n.computed(()=>e.small||e.size==="small"),s=n.computed(()=>e.large||e.size==="large");return Id(t),(c,d)=>(n.openBlock(),n.createElementBlock("button",n.mergeProps({ref_key:"btn",ref:t,tabindex:"0",class:{loading:c.loading,small:a.value,large:s.value,round:c.round,reverse:c.reverse,justifyCenter:c.justifyCenter,[c.$attrs.class+""]:!0}},{...c.$attrs,disabled:!!c.$attrs.disabled||c.loading}),[c.round?n.createCommentVNode("",!0):(n.openBlock(),n.createElementBlock("span",$_,[n.renderSlot(c.$slots,"default")])),d[0]||(d[0]=n.createTextVNode()),c.loading?(n.openBlock(),n.createBlock(Wi,{key:1,name:"loading",size:c.size},null,8,["size"])):c.icon?(n.openBlock(),n.createBlock(Wi,{key:2,name:c.icon,size:c.size},null,8,["name","size"])):n.createCommentVNode("",!0)],16))}}),Z_={name:"PlBtnPrimary"},Md=n.defineComponent({...Z_,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(i){const e=i;return(t,a)=>(n.openBlock(),n.createBlock(Yo,n.mergeProps({class:"pl-btn-primary"},e),{default:n.withCtx(()=>[n.renderSlot(t.$slots,"default")]),_:3},16))}}),U_={name:"PlBtnAccent"},j_=n.defineComponent({...U_,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(i){const e=i;return(t,a)=>(n.openBlock(),n.createBlock(Yo,n.mergeProps({class:"pl-btn-accent"},e),{default:n.withCtx(()=>[n.renderSlot(t.$slots,"default")]),_:3},16))}}),W_={name:"PlBtnDanger"},H_=n.defineComponent({...W_,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(i){const e=i;return(t,a)=>(n.openBlock(),n.createBlock(Yo,n.mergeProps({class:"pl-btn-danger"},e),{default:n.withCtx(()=>[n.renderSlot(t.$slots,"default")]),_:3},16))}}),q_={name:"PlBtnSecondary"},Hs=n.defineComponent({...q_,props:{loading:{type:Boolean},size:{},round:{type:Boolean},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean}},setup(i){const e=i;return(t,a)=>(n.openBlock(),n.createBlock(Yo,n.mergeProps(e,{class:"pl-btn-secondary"}),{default:n.withCtx(()=>[n.renderSlot(t.$slots,"default")]),_:3},16))}}),G_={key:0},K_={name:"PlBtnGhost"},Pd=n.defineComponent({...K_,props:{loading:{type:Boolean},size:{default:void 0},round:{type:Boolean},icon:{default:void 0},reverse:{type:Boolean},justifyCenter:{type:Boolean,default:!1}},setup(i){const e=i,t=n.computed(()=>e.size==="small"),a=n.computed(()=>e.size==="large"),s=n.ref(),c=n.useSlots();return Id(s),(d,u)=>(n.openBlock(),n.createElementBlock("button",n.mergeProps({ref_key:"btnRef",ref:s,tabindex:"0",class:["ui-btn-ghost",{loading:d.loading,small:t.value,large:a.value,round:d.round,reverse:d.reverse,justifyCenter:d.justifyCenter,[d.$attrs.class+""]:!0}]},{...d.$attrs,disabled:!!d.$attrs.disabled||d.loading}),[n.unref(c).default&&!d.round?(n.openBlock(),n.createElementBlock("span",G_,[n.renderSlot(d.$slots,"default")])):n.createCommentVNode("",!0),u[0]||(u[0]=n.createTextVNode()),d.loading?(n.openBlock(),n.createBlock(Wi,{key:1,name:"loading",size:d.size},null,8,["size"])):d.icon?(n.openBlock(),n.createBlock(Wi,{key:2,name:d.icon,size:d.size},null,8,["name","size"])):n.createCommentVNode("",!0)],16))}}),Y_=n.defineComponent({__name:"PlBtnLink",props:{loading:{type:Boolean},size:{},icon:{},reverse:{type:Boolean},justifyCenter:{type:Boolean},disabled:{type:Boolean}},setup(i){const e=i,t=n.ref(!1);return(a,s)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["ui-btn-link",{disabled:a.disabled,loading:a.loading,hover:t.value}]),onMouseover:s[0]||(s[0]=c=>t.value=!0),onMouseleave:s[1]||(s[1]=c=>t.value=!1)},[n.createVNode(Hs,n.mergeProps({round:"",hover:t.value},e),null,16,["hover"]),s[2]||(s[2]=n.createTextVNode()),n.renderSlot(a.$slots,"default")],34))}});function Ld(i,e){const t=Ps(()=>{if(i.value){const{scrollTop:a,scrollLeft:s,scrollHeight:c,scrollWidth:d,clientHeight:u,clientWidth:p}=document.documentElement,h=i.value.getBoundingClientRect();e({scrollTop:a,scrollLeft:s,scrollHeight:c,scrollWidth:d,clientHeight:u,clientWidth:p,offsetY:a+h.y,offsetX:s+h.x,top:h.top,right:h.right,bottom:h.bottom,left:h.left,width:h.width,height:h.height,x:h.x,y:h.y})}});n.onMounted(t),Ge(window,"scroll",t,!0),Ge(window,"resize",t,!0),Ge(window,"adjust",t,!0)}function J_(i,e){const t=n.ref();return Ld(i,a=>{t.value=a}),n.computed(()=>{const a=n.unref(t),s=n.unref(e),c=s.position??"top",d=s.gap??8;if(!a)return"";const u=a.offsetY+Math.floor(a.height/2),p=a.offsetX+Math.floor(a.width/2);return c==="top-left"?`left: ${a.offsetX}px; top: ${a.offsetY-d}px;`:c==="top"?`left: ${p}px; top: ${a.offsetY-d}px;`:c==="right"?`left: ${a.offsetX+a.width+d}px; top: ${u}px;`:c==="left"?`right: ${a.scrollWidth-a.x+d}px; top: ${u}px;`:""})}function Jo(i,e){return e(i)}function at(i,e){if(i!=null)return e(i)}function X_(i){return Array.isArray(i)?i:[i]}function Q_(i,e,...t){t.forEach(a=>{i[a]=e[a]})}function Xo(i,e){Ge(document,"click",t=>{document.contains(t.target)&&(X_(i).map(a=>a.value).filter(a=>!!a).some(a=>a==null?void 0:a.contains(t.target))||e())})}const e0={},t0={class:"beak",width:"5",height:"9",viewBox:"0 0 3 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function n0(i,e){return n.openBlock(),n.createElementBlock("svg",t0,e[0]||(e[0]=[n.createElementVNode("path",{d:"M4.00222 8.00933L0 4.00711L4.00222 0.00488281L4.00222 8.00933Z",fill:"#24223D"},null,-1)]))}const r0=Kn(e0,[["render",n0]]),qs=new Map,i0={name:"PlTooltip"},Zt=n.defineComponent({...i0,props:{openDelay:{default:100},closeDelay:{default:1e3},position:{default:"top"},hide:{type:Boolean},gap:{default:8},element:{default:"div"}},emits:["tooltip:close"],setup(i,{emit:e}){const t=e,a=Symbol(),s=i,c=n.reactive({open:!1,over:!1,tooltipOpen:!1,key:Symbol()});qs.set(a,()=>h()),n.watch(()=>c.open,C=>{requestAnimationFrame(()=>{c.tooltipOpen=C})});let d=()=>{};const u=Ls(()=>window.dispatchEvent(new CustomEvent("adjust")),1e3),p=()=>{c.open=!0;for(let[C,A]of qs.entries())C!==a&&A()},h=()=>{c.open=!1,t("tooltip:close")},g=async()=>{s.hide||(u(),c.over=!0,d(),await xd(100),c.over&&p())},v=()=>{c.over=!1,d=Cd(()=>{c.over||h()},s.closeDelay)};n.watch(()=>s.hide,C=>{C&&h()});const T=n.ref(),B=n.ref(),O=J_(T,n.toRef(s));return Xo([T,B],()=>h()),n.onUnmounted(()=>{qs.delete(a)}),(C,A)=>(n.openBlock(),n.createBlock(n.resolveDynamicComponent(C.element),n.mergeProps(C.$attrs,{ref_key:"rootRef",ref:T,onClick:g,onMouseover:g,onMouseleave:v}),{default:n.withCtx(()=>[n.renderSlot(C.$slots,"default"),A[1]||(A[1]=n.createTextVNode()),C.$slots.tooltip&&c.open?(n.openBlock(),n.createBlock(n.Teleport,{key:0,to:"body"},[n.createVNode(n.Transition,{name:"tooltip-transition"},{default:n.withCtx(()=>[c.tooltipOpen?(n.openBlock(),n.createElementBlock("div",{key:0,class:"pl-tooltip__container",style:n.normalizeStyle(n.unref(O))},[n.createElementVNode("div",{ref_key:"tooltip",ref:B,class:n.normalizeClass(["pl-tooltip",C.position]),onMouseover:g,onMouseleave:v},[n.createElementVNode("div",null,[n.renderSlot(C.$slots,"tooltip")]),A[0]||(A[0]=n.createTextVNode()),n.createVNode(r0)],34)],4)):n.createCommentVNode("",!0)]),_:3})])):n.createCommentVNode("",!0)]),_:3},16))}}),o0={},a0={class:"inner-border"};function s0(i,e,t,a,s,c){return n.openBlock(),n.createElementBlock("div",a0,[n.renderSlot(i.$slots,"default")])}const l0=Kn(o0,[["render",s0]]),c0={key:0},d0=["tabindex","onKeydown","onClick"],u0={key:1,class:"ui-btn-group__helper"},f0={key:2,class:"ui-btn-group__error"},p0={name:"PlBtnGroup"},h0=n.defineComponent({...p0,props:{modelValue:{},label:{},options:{},disabled:{type:Boolean},helper:{},error:{}},emits:["update:modelValue"],setup(i,{emit:e}){const t=n.useSlots(),a=e,s=u=>a("update:modelValue",u),c=i,d=n.computed(()=>c.options.map(u=>({label:"label"in u?u.label:u.text,value:u.value})));return(u,p)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass(["ui-btn-group",{disabled:u.disabled}])},[u.label?(n.openBlock(),n.createElementBlock("label",c0,[n.createElementVNode("span",null,n.toDisplayString(u.label),1),p[0]||(p[0]=n.createTextVNode()),n.unref(t).tooltip?(n.openBlock(),n.createBlock(n.unref(Zt),{key:0,class:"info",position:"top"},{tooltip:n.withCtx(()=>[n.renderSlot(u.$slots,"tooltip")]),_:3})):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),p[1]||(p[1]=n.createTextVNode()),n.createVNode(l0,{class:"ui-btn-group__container"},{default:n.withCtx(()=>[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(d.value,(h,g)=>(n.openBlock(),n.createElementBlock("div",{key:g,class:n.normalizeClass(["ui-btn-group__option",{active:u.modelValue===h.value}]),tabindex:u.modelValue===h.value||u.disabled?void 0:0,onKeydown:n.withKeys(v=>s(h.value),["enter"]),onClick:v=>s(h.value)},n.toDisplayString(h.label),43,d0))),128))]),_:1}),p[2]||(p[2]=n.createTextVNode()),u.helper?(n.openBlock(),n.createElementBlock("div",u0,n.toDisplayString(u.helper),1)):u.error?(n.openBlock(),n.createElementBlock("div",f0,n.toDisplayString(u.error),1)):n.createCommentVNode("",!0)],2))}}),m0={inheritAttrs:!1},g0={class:"double-contour"};function y0(i,e,t,a,s,c){return n.openBlock(),n.createElementBlock("div",g0,[n.createElementVNode("div",n.normalizeProps(n.guardReactiveProps(i.$attrs)),[n.renderSlot(i.$slots,"default")],16)])}const Yr=Kn(m0,[["render",y0]]);function Fd(i){n.onMounted(i),n.onUpdated(i)}const Gs=new WeakMap,Ks=new ResizeObserver(i=>{for(const e of i)at(Gs.get(e.target),t=>t(e))});function $d(i,e){Gs.set(i,e),Ks.unobserve(i),Ks.observe(i)}function zd(i){Ks.unobserve(i),Gs.delete(i)}const _0=8,Zd=4;function xr(i,e="label"){const t=new Set;Fd(()=>{at(i==null?void 0:i.value,a=>{const s=a.querySelector(e);s&&(t.add(s),$d(s,()=>{const c=vd(()=>s.getBoundingClientRect().width+Jo(_0,d=>Number.isNaN(d)?Zd:d+Zd));a.style.getPropertyValue("--label-offset-right-x")!==`${c}px`&&a.style.setProperty("--label-offset-right-x",`${c}px`)}))})}),n.onBeforeUnmount(()=>{Array.from(t.values()).map(a=>zd(a))})}function w0(i,e){const t=[];return e&&e.length>0&&e.forEach(a=>{const s=a(i);typeof s=="string"&&t.push(s)}),{isValid:t.length===0,errors:t}}function Ud(i,e){return n.computed(()=>w0(i.value,e))}const b0={class:"ui-text-field__envelope"},k0={key:0,ref:"label"},v0={key:0,class:"required-icon"},x0={key:1,class:"ui-text-field__prefix"},C0=["disabled","placeholder"],E0={class:"ui-text-field__append"},S0={key:0,class:"ui-text-field__error"},T0={key:1,class:"ui-text-field__helper"},V0={name:"PlTextField"},jd=n.defineComponent({...V0,props:{modelValue:{},label:{},clearable:{type:[Boolean,Function]},required:{type:Boolean},error:{},helper:{},placeholder:{},disabled:{type:Boolean},dashed:{type:Boolean},prefix:{},rules:{}},emits:["update:modelValue"],setup(i,{emit:e}){const t=n.useSlots(),a=e,s=i,c=n.ref(void 0),d=n.ref(),u=n.computed({get(){return s.modelValue??""},set(O){a("update:modelValue",O)}}),p=()=>{s.clearable&&a("update:modelValue",s.clearable===!0?"":s.clearable())},h=Ud(u,s.rules||[]),g=n.computed(()=>s.clearable?s.clearable===!0?s.modelValue==="":s.modelValue===s.clearable():s.modelValue===""),v=n.computed(()=>!g.value),T=n.computed(()=>{const O=[];return s.error&&O.push(s.error),h.value.isValid||O.push(...h.value.errors),O}),B=n.computed(()=>T.value.length>0);return xr(c),(O,C)=>(n.openBlock(),n.createElementBlock("div",b0,[n.createElementVNode("div",{ref_key:"rootRef",ref:c,class:n.normalizeClass(["ui-text-field",{error:B.value,disabled:O.disabled,dashed:O.dashed,nonEmpty:v.value}])},[O.label?(n.openBlock(),n.createElementBlock("label",k0,[O.required?(n.openBlock(),n.createElementBlock("i",v0)):n.createCommentVNode("",!0),C[1]||(C[1]=n.createTextVNode()),n.createElementVNode("span",null,n.toDisplayString(O.label),1),C[2]||(C[2]=n.createTextVNode()),n.unref(t).tooltip?(n.openBlock(),n.createBlock(n.unref(Zt),{key:1,class:"info",position:"top"},{tooltip:n.withCtx(()=>[n.renderSlot(O.$slots,"tooltip")]),_:3})):n.createCommentVNode("",!0)],512)):n.createCommentVNode("",!0),C[4]||(C[4]=n.createTextVNode()),O.prefix?(n.openBlock(),n.createElementBlock("div",x0,n.toDisplayString(O.prefix),1)):n.createCommentVNode("",!0),C[5]||(C[5]=n.createTextVNode()),n.withDirectives(n.createElementVNode("input",{ref_key:"inputRef",ref:d,"onUpdate:modelValue":C[0]||(C[0]=A=>u.value=A),disabled:O.disabled,placeholder:O.placeholder||"...",type:"text",spellcheck:"false"},null,8,C0),[[n.vModelText,u.value]]),C[6]||(C[6]=n.createTextVNode()),n.createElementVNode("div",E0,[O.clearable&&v.value?(n.openBlock(),n.createElementBlock("div",{key:0,class:"icon icon--clear",onClick:p})):n.createCommentVNode("",!0),C[3]||(C[3]=n.createTextVNode()),n.renderSlot(O.$slots,"append")]),C[7]||(C[7]=n.createTextVNode()),n.createVNode(Yr,{class:"ui-text-field__contour"})],2),C[8]||(C[8]=n.createTextVNode()),B.value?(n.openBlock(),n.createElementBlock("div",S0,n.toDisplayString(T.value.join(" ")),1)):O.helper?(n.openBlock(),n.createElementBlock("div",T0,n.toDisplayString(O.helper),1)):n.createCommentVNode("",!0)]))}}),B0={class:"ui-text-area__envelope"},N0={key:0,ref:"label"},O0={key:0,class:"required-icon"},A0=["readonly","rows","disabled","placeholder"],R0={class:"ui-text-area__append"},D0={key:0,class:"ui-text-area__error"},I0={key:1,class:"ui-text-area__helper"},M0={name:"PlTextArea"},P0=n.defineComponent({...M0,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(i,{emit:e}){const t=n.useSlots(),a=e,s=i,c=n.ref(),d=n.ref(),u=n.computed({get(){return s.modelValue??""},set(B){a("update:modelValue",B)}}),p=n.computed(()=>!!s.modelValue),h=Ud(u,s.rules||[]);xr(c);const g=n.computed(()=>{const B=[];return s.error&&B.push(s.error),B.push(...h.value.errors),B}),v=n.computed(()=>g.value.length>0),T=()=>{if(!s.autogrow)return;const B=d.value;B&&(B.style.height="auto",B.style.height=`${B.scrollHeight}px`)};return n.onMounted(()=>{T()}),(B,O)=>(n.openBlock(),n.createElementBlock("div",B0,[n.createElementVNode("div",{ref_key:"root",ref:c,class:n.normalizeClass(["ui-text-area",{error:v.value,disabled:B.disabled,dashed:B.dashed,nonEmpty:p.value}])},[B.label?(n.openBlock(),n.createElementBlock("label",N0,[B.required?(n.openBlock(),n.createElementBlock("i",O0)):n.createCommentVNode("",!0),O[1]||(O[1]=n.createTextVNode()),n.createElementVNode("span",null,n.toDisplayString(B.label),1),O[2]||(O[2]=n.createTextVNode()),n.unref(t).tooltip?(n.openBlock(),n.createBlock(n.unref(Zt),{key:1,class:"info",position:"top"},{tooltip:n.withCtx(()=>[n.renderSlot(B.$slots,"tooltip")]),_:3})):n.createCommentVNode("",!0)],512)):n.createCommentVNode("",!0),O[3]||(O[3]=n.createTextVNode()),n.withDirectives(n.createElementVNode("textarea",{ref_key:"input",ref:d,"onUpdate:modelValue":O[0]||(O[0]=C=>u.value=C),readonly:B.readonly,rows:B.rows,disabled:B.disabled,placeholder:B.placeholder??"...",spellcheck:"false",onInput:T},null,40,A0),[[n.vModelText,u.value]]),O[4]||(O[4]=n.createTextVNode()),n.createElementVNode("div",R0,[n.renderSlot(B.$slots,"append")]),O[5]||(O[5]=n.createTextVNode()),n.createVNode(Yr,{class:"ui-text-area__contour"})],2),O[6]||(O[6]=n.createTextVNode()),v.value?(n.openBlock(),n.createElementBlock("div",D0,n.toDisplayString(g.value.join(" ")),1)):B.helper?(n.openBlock(),n.createElementBlock("div",I0,n.toDisplayString(B.helper),1)):n.createCommentVNode("",!0)]))}});function Wd(i,e){const t=i.scrollTop,a=i.getBoundingClientRect().height,s=e.offsetTop,c=e.getBoundingClientRect().height;return s+c<a+t&&s>t}function Hd(i,e){const t=i.scrollTop,a=i.getBoundingClientRect().height,s=e.offsetTop,c=e.getBoundingClientRect().height;return s+c<a+t?"ceil":s>t?"floor":"visible"}function Qo(i,e,t={}){const a=i.scrollTop,s=i.getBoundingClientRect().height,c=e.getBoundingClientRect().height,d=e.offsetTop,u=Hd(i,e);if(u==="visible")return;const p=h=>{const g=u==="floor"?d-(s-c):d;i.scrollTop=a+h*(g-a)};Wd(i,e)||Td({duration:t.duration||100,timing:Sd(h=>h),draw:p})}function Ys(i,e,t,a){return i.addEventListener(e,t,a),function(){i.removeEventListener(e,t)}}function L0(i,e){const t=e.getBoundingClientRect();return i.x<t.x||i.x>t.x+t.width||i.y<t.y||i.y>t.y+t.height}function qd(i){return i!==null&&typeof i=="object"}function en(i,e){return qd(i)&&qd(e)?Object.keys(i).length!==Object.keys(e).length?!1:Object.keys(i).every(t=>en(i[t],e[t])):i===e}function Js(i,e){return i.some(t=>en(t,e))}const F0=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
2
  <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"/>
3
3
  </svg>
4
4
  `,$0=`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -18,7 +18,7 @@
18
18
  black ${T}px,
19
19
  black ${B}px,
20
20
  transparent 100%
21
- )`}function c(){const u=i.value;if(!u)return;const p=[a(u),s(u)].filter(h=>h!==null);u.style.setProperty("-webkit-mask-image",p.join(",")),u.style.setProperty("mask-image",p.join(",")),p.length>1&&(u.style.setProperty("-webkit-mask-composite","source-in"),u.style.setProperty("mask-composite","source-in"))}const d=Ps(c);n.onMounted(c),Ge(window,"scroll",d,!0),Ge(window,"resize",d,!0)}function hu(i,e){Fd(()=>{at(n.unref(i),t=>{$d(t,()=>e(t))})}),n.onUnmounted(()=>{at(n.unref(i),t=>{zd(t)})})}const rr={item:"sortable__item",animate:"sortable__animate"},co=i=>i.getBoundingClientRect().y,mu=i=>{const{y:e,height:t}=i.getBoundingClientRect();return e+Math.ceil(t/2)},d1=i=>{const{y:e,height:t}=i.getBoundingClientRect();return e+t};function u1(i,e){const t={item:void 0,options(){var B;return[...((B=i.value)==null?void 0:B.children)??[]]}},a=n.computed(()=>t.options()),s=e.shakeBuffer??10,c=e.reorderDelay??100;function d(B){const O=e.handle?this.querySelector(e.handle):null;O&&!O.contains(B.target)||(this.classList.remove(rr.animate),this.classList.add(rr.item),t.item={el:this,y:B.y,dy:0,orderChanged:!1})}function u(B){const O=t.options();return O.slice(0,O.indexOf(B))}function p(B){const O=t.options();return O.slice(O.indexOf(B)+1)}function h(B,O){const C=t.options().filter(b=>b!==O),A=C.indexOf(B);return C.splice(A,0,O),C}function g(B,O){const C=t.options().filter(b=>b!==O),A=C.indexOf(B);return C.splice(A+1,0,O),C}function v(B,O){B.dy=O-B.y,B.el.style.setProperty("transform",`translateY(${B.dy}px)`)}function T(B){var O;if(!t.item)return;const{el:C}=t.item;if(!C.isConnected){t.item=void 0;return}const A=B.map(U=>co(U)),b=co(C);(O=i.value)==null||O.replaceChildren(...B);const D=co(C),$=B.map(U=>co(U)),j=[];for(let U=0;U<$.length;U++){const N=B[U];if(N===t.item.el)continue;const S=$[U],M=A[U]-S;N.style.transform=`translateY(${M}px)`,j.push(N)}const P=D-b;t.item.y=t.item.y+P,t.item.dy=t.item.dy-P,t.item.orderChanged=!0,t.item.el.style.setProperty("transform",`translateY(${t.item.dy}px)`),j.forEach(U=>U.classList.remove(rr.animate)),requestAnimationFrame(function(){j.forEach(U=>{U.classList.add(rr.animate),U.style.transform="",U.addEventListener("transitionend",()=>{U.classList.remove(rr.animate)})})})}Ge(window,"mousemove",B=>{if(!t.item)return;const{el:O}=t.item;v(t.item,B.y);const C=co(t.item.el),A=d1(t.item.el),b=u(O),D=p(O);b.forEach($=>{const j=mu($);C+s<j&&T(h($,O))}),D.forEach($=>{const j=mu($);A-s>j&&T(g($,O))})}),Ge(window,"mouseup",()=>{if(!t.item)return;const{el:B,orderChanged:O}=t.item;B.classList.add(rr.animate),B.style.removeProperty("transform"),B.addEventListener("transitionend",()=>{B.classList.remove(rr.animate,rr.item)}),setTimeout(()=>{if(!O)return;const C=t.options().map(b=>Number(b.getAttribute("data-index"))),A=i.value;if(A){for(const b of t.options())A.removeChild(b);a.value.forEach(b=>{A.appendChild(b)})}e.onChange(C)},c),t.item=void 0}),n.watchEffect(()=>{a.value.forEach((B,O)=>{B.removeEventListener("mousedown",d),B.addEventListener("mousedown",d),B.setAttribute("data-index",String(O))})})}function f1(i,e){let t;n.onMounted(()=>{t=setInterval(i,e)}),n.onUnmounted(()=>clearInterval(t))}function p1(i,e,t){const a=n.reactive({data:As.deepClone(e(i.value)),changed:!1});return n.watch(()=>a.data,s=>{a.changed?t(As.deepClone(s)):a.changed=!0},{deep:!0}),n.watch(i,s=>{Object.assign(a,{data:As.deepClone(e(s)),changed:!1})},{deep:!0,immediate:!0}),a}function h1(i){const e=n.reactive({isLoading:!1,result:void 0,error:void 0,async run(...t){this.isLoading=!0,this.error=void 0;try{this.result=await i(...t)}catch(a){this.error=a}finally{this.isLoading=!1}},debounce(t,a=1e3){return wd(()=>{const s=t();this.run(...s).catch(console.error)},a)}});return e.run=e.run.bind(e),e}function m1(i,e){function t(d,u){const p=n.unref(i);if(!p)return;const h=`translate(${u.x-d.x}px, ${u.y-d.y}px)`;p.style.setProperty("transform",h),e(u)}function a(d){const u=p=>t(d,p);document.addEventListener("mousemove",u),document.addEventListener("mouseup",()=>{const p=n.unref(i);document.removeEventListener("mousemove",u),p&&(p.style.setProperty("transition","all .3s ease-in-out"),p.style.removeProperty("transform"),p.addEventListener("transitionend",()=>{p.style.removeProperty("transition")}))},{once:!0})}function s(){var d;(d=n.unref(i))==null||d.addEventListener("mousedown",a)}function c(){var d;(d=n.unref(i))==null||d.removeEventListener("mousedown",a)}n.onMounted(s),n.onUnmounted(c)}const g1={class:"ui-slider__wrapper"},y1={class:"ui-slider__label-section"},_1={key:0,class:"text-s"},w1={class:"ui-slider__base"},b1={class:"ui-slider__container"},k1={class:"ui-slider__container ui-slider__container-thumb"},v1=["data-percent"],x1=["data-percent"],C1=["data-percent"],E1={key:0,class:"ui-slider__error"},S1=n.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(i,{emit:e}){const t=n.useSlots(),a=e,s=i,c=n.reactive({deltaValue1:0,deltaValue2:0,deltaValue3:0}),d=n.ref(),u=n.ref(),p=n.ref(),h=n.ref(),g=n.computed(()=>s.max-s.min),v=n.computed(()=>s),T=sl(v),B=n.computed(()=>ht((s.modelValue[0]??0)+c.deltaValue1,s.min,s.max)),O=n.computed(()=>ht((s.modelValue[1]??0)+c.deltaValue2,s.min,s.max)),C=n.computed(()=>ht((s.modelValue[2]??0)+c.deltaValue3,s.min,s.max)),A=n.computed(()=>{const ae=s.modelValue;if(!(Array.isArray(ae)&&ae.length===3&&ae.every(Ce=>Number.isFinite(Ce))))return"Expected model [number, number, number]";const J=[];return[...s.modelValue].forEach(Ce=>{Ce>s.max&&J.push(`Max model value must be lower than max props ${s.max}.`),Ce<s.min&&J.push("Min model value must be greater than max props.")}),J.length>0?J.join(" "):s.error}),b=n.computed(()=>(B.value-s.min)/g.value),D=n.computed(()=>(O.value-s.min)/g.value),$=n.computed(()=>(C.value-s.min)/g.value),j=n.computed(()=>W()),P=n.computed(()=>({right:j.value[0]+"%",left:100-j.value[2]+"%"})),U=n.computed(()=>({right:Math.ceil((1-b.value)*100)+"%"})),N=n.computed(()=>({right:Math.ceil((1-D.value)*100)+"%"})),S=n.computed(()=>({right:Math.ceil((1-$.value)*100)+"%"}));Yn(u,ae=>{var J;at((J=n.unref(d))==null?void 0:J.getBoundingClientRect(),Ce=>{const{dx:Ne}=ae;c.deltaValue1=Ne/Ce.width*g.value,u.value&&M(u.value,s.modelValue[0],c.deltaValue1),ae.stop&&(q([F(B.value),F(O.value),F(C.value)]),c.deltaValue1=0)})}),Yn(p,ae=>{var J;at((J=n.unref(d))==null?void 0:J.getBoundingClientRect(),Ce=>{const{dx:Ne}=ae;c.deltaValue2=Ne/Ce.width*g.value,p.value&&M(p.value,s.modelValue[1],c.deltaValue2),ae.stop&&(q([F(B.value),F(O.value),F(C.value)]),c.deltaValue2=0)})}),Yn(h,ae=>{var J;at((J=n.unref(d))==null?void 0:J.getBoundingClientRect(),Ce=>{const{dx:Ne}=ae;c.deltaValue3=Ne/Ce.width*g.value,h.value&&M(h.value,s.modelValue[2],c.deltaValue3),ae.stop&&(q([F(B.value),F(O.value),F(C.value)]),c.deltaValue3=0)})});function M(ae,J,Ce){const Ne=F(ht((J??0)+Ce,s.min,s.max));ae.dataset.percent=`${Ne}${s.measure}`,oe()}function W(){const ae=Math.ceil((1-b.value)*100),J=Math.ceil((1-D.value)*100),Ce=Math.ceil((1-$.value)*100);return[ae,J,Ce].sort((Ne,Ar)=>Ne-Ar)}function F(ae){const J=ht(ae,s.min,s.max);return Math.round((J+Number.EPSILON)*(1/s.step))/(1/s.step)}function q(ae){a("update:modelValue",ae)}function oe(){const ae=Number(U.value.right.substring(0,U.value.right.length-1)),J=Number(N.value.right.substring(0,N.value.right.length-1)),Ce=Number(S.value.right.substring(0,S.value.right.length-1)),Ne=[{r:ae,th:u},{r:J,th:p},{r:Ce,th:h}].sort((Ar,ar)=>Ar.r-ar.r);Ne[0].th.value&&(Ne[0].th.value.dataset.hint="high"),Ne[1].th.value&&(Ne[1].th.value.dataset.hint="mid"),Ne[2].th.value&&(Ne[2].th.value.dataset.hint="low")}function de(ae,J){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(ae.code)&&ae.preventDefault();const Ce=ae.code==="ArrowUp"||ae.code==="ArrowRight"?s.step*1:ae.code==="ArrowDown"||ae.code==="ArrowLeft"?s.step*-1:0,Ne=[...s.modelValue];Ne[J]=ht(Ne[J]+Ce,s.min,s.max),q(Ne),oe()}return n.onMounted(()=>{oe()}),(ae,J)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([s.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope ui-slider__triple"])},[n.createElementVNode("div",{class:n.normalizeClass([`ui-slider__mode-${s.mode}`,"ui-slider"])},[n.createElementVNode("div",g1,[n.createElementVNode("div",y1,[ae.label?(n.openBlock(),n.createElementBlock("label",_1,[n.createElementVNode("span",null,n.toDisplayString(ae.label),1),J[3]||(J[3]=n.createTextVNode()),n.unref(t).tooltip?(n.openBlock(),n.createBlock(n.unref(Zt),{key:0,class:"info",position:"top"},{tooltip:n.withCtx(()=>[n.renderSlot(ae.$slots,"tooltip")]),_:3})):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)]),J[11]||(J[11]=n.createTextVNode()),n.createElementVNode("div",w1,[n.createElementVNode("div",b1,[n.createElementVNode("div",{ref_key:"barRef",ref:d,class:"ui-slider__bar"},[n.createElementVNode("div",{class:"ui-slider__progress",style:n.normalizeStyle(P.value)},null,4)],512)]),J[10]||(J[10]=n.createTextVNode()),n.createElementVNode("div",k1,[s.breakpoints?(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:0},n.renderList(n.unref(T),(Ce,Ne)=>(n.openBlock(),n.createElementBlock("div",{key:Ne,style:n.normalizeStyle({right:`${Ce}%`}),class:"ui-slider__thumb-step"},null,4))),128)):n.createCommentVNode("",!0),J[7]||(J[7]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"thumbRef1",ref:u,style:n.normalizeStyle(U.value),"data-percent":s.modelValue[0]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r1:"",tabindex:"0",onKeydown:J[0]||(J[0]=Ce=>de(Ce,0))},J[4]||(J[4]=[n.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,v1),J[8]||(J[8]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"thumbRef2",ref:p,style:n.normalizeStyle(N.value),"data-percent":s.modelValue[1]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r2:"",tabindex:"0",onKeydown:J[1]||(J[1]=Ce=>de(Ce,1))},J[5]||(J[5]=[n.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,x1),J[9]||(J[9]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"thumbRef3",ref:h,style:n.normalizeStyle(S.value),"data-percent":s.modelValue[2]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r3:"",tabindex:"0",onKeydown:J[2]||(J[2]=Ce=>de(Ce,2))},J[6]||(J[6]=[n.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,C1)])])]),J[12]||(J[12]=n.createTextVNode()),J[13]||(J[13]=n.createElementVNode("div",{class:"ui-slider__input-wrapper d-flex"},null,-1))],2),J[14]||(J[14]=n.createTextVNode()),A.value?(n.openBlock(),n.createElementBlock("div",E1,n.toDisplayString(A.value),1)):n.createCommentVNode("",!0)],2))}}),T1={class:"ui-input-range__separator"},V1=n.defineComponent({__name:"InputRange",props:{modelValue:{},separator:{default:"-"}},emits:["update:modelValue","change"],setup(i,{emit:e}){const t=i,a=e,s=n.reactive({left:t.modelValue[0],right:t.modelValue[1]}),c=n.ref(!1),d=n.computed(()=>(c.value,"ui-input-range-focused")),u=n.computed({get(){return{left:Math.min(...t.modelValue),right:Math.max(...t.modelValue)}},set(){}});n.watch(()=>u.value,g=>(s.left=g.left)&&(s.right=g.right));function p(){a("update:modelValue",[+s.left,+s.right]),a("change",[+s.left,+s.right])}function h(g,v){const T=v.target.value;/^[0-9]{0,2}$/.test(T)?g?s.left=+T:s.right=+T:g?s.left=+T.slice(0,T.length-1):s.right=+T.slice(0,T.length-1)}return(g,v)=>(n.openBlock(),n.createElementBlock("div",n.mergeProps({class:[d.value,"ui-input-range"]},g.$attrs),[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":v[0]||(v[0]=T=>u.value.left=T),class:"text-s",type:"text",onChange:p,onFocus:v[1]||(v[1]=T=>c.value=!0),onFocusout:v[2]||(v[2]=T=>c.value=!1),onInput:v[3]||(v[3]=T=>h(!0,T))},null,544),[[n.vModelText,u.value.left]]),v[8]||(v[8]=n.createTextVNode()),n.createElementVNode("div",T1,n.toDisplayString(t.separator),1),v[9]||(v[9]=n.createTextVNode()),n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":v[4]||(v[4]=T=>u.value.right=T),class:"text-s",type:"text",onChange:p,onFocus:v[5]||(v[5]=T=>c.value=!0),onFocusout:v[6]||(v[6]=T=>c.value=!1),onInput:v[7]||(v[7]=T=>h(!1,T))},null,544),[[n.vModelText,u.value.right]])],16))}}),B1={class:"ui-slider__wrapper"},N1={class:"ui-slider__label-section"},O1={key:0,class:"text-s"},A1={key:1,class:"ui-slider__value-static text-s"},R1={class:"ui-slider__base"},D1={class:"ui-slider__container"},I1={class:"ui-slider__container ui-slider__container-thumb"},M1={class:"ui-slider__input-wrapper d-flex"},P1={key:0,class:"ui-slider__error"},L1=n.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(i,{emit:e}){const t=n.useSlots(),a=e,s=i,c=n.reactive({deltaValue1:0,deltaValue2:0}),d=n.ref(),u=n.ref(),p=n.ref(),h=n.ref(s.modelValue),g=n.ref(s.modelValue[0]),v=n.ref(s.modelValue[1]),T=n.computed(()=>s),B=sl(T),O=n.computed(()=>[g.value,v.value].sort((oe,de)=>oe-de).join("-")),C=n.computed(()=>s.max-s.min),A=n.computed(()=>ht((s.modelValue[0]??0)+c.deltaValue1,s.min,s.max)),b=n.computed(()=>ht((s.modelValue[1]??0)+c.deltaValue2,s.min,s.max)),D=n.computed(()=>{const oe=s.modelValue;return Array.isArray(oe)&&oe.length===2&&oe.every(de=>Number.isFinite(de))?s.error:"Expected model [number, number]"}),$=n.computed(()=>(A.value-s.min)/C.value),j=n.computed(()=>(b.value-s.min)/C.value),P=n.computed(()=>M()),U=n.computed(()=>({right:P.value[0]+"%",left:100-P.value[1]+"%"})),N=n.computed(()=>({right:Math.ceil((1-$.value)*100)+"%"})),S=n.computed(()=>({right:Math.ceil((1-j.value)*100)+"%"}));n.watch(()=>s.modelValue,oe=>{h.value=oe,g.value=+oe[0],v.value=+oe[1]},{immediate:!0}),Yn(u,oe=>{var de;at((de=n.unref(d))==null?void 0:de.getBoundingClientRect(),ae=>{const{dx:J}=oe;c.deltaValue1=J/ae.width*C.value,g.value=W(ht((s.modelValue[0]??0)+c.deltaValue1,s.min,s.max)),h.value=[g.value,v.value].sort((Ce,Ne)=>Ce-Ne),oe.stop&&(F([W(A.value),W(b.value)]),c.deltaValue1=0)})}),Yn(p,oe=>{var de;at((de=n.unref(d))==null?void 0:de.getBoundingClientRect(),ae=>{const{dx:J}=oe;c.deltaValue2=J/ae.width*C.value,v.value=W(ht((s.modelValue[1]??0)+c.deltaValue2,s.min,s.max)),h.value=[g.value,v.value].sort((Ce,Ne)=>Ce-Ne),oe.stop&&(F([W(A.value),W(b.value)]),c.deltaValue2=0)})});function M(){const oe=Math.ceil((1-$.value)*100),de=Math.ceil((1-j.value)*100);return[oe,de].sort((ae,J)=>ae-J)}function W(oe){const de=ht(oe,s.min,s.max);return Math.round((de+Number.EPSILON)*(1/s.step))/(1/s.step)}function F(oe){a("update:modelValue",oe)}function q(oe,de){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(oe.code)&&oe.preventDefault();const ae=oe.code==="ArrowUp"||oe.code==="ArrowRight"?s.step*1:oe.code==="ArrowDown"||oe.code==="ArrowLeft"?s.step*-1:0,J=[...s.modelValue];J[de]=ht(J[de]+ae,s.min,s.max),F(J)}return(oe,de)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([s.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[n.createElementVNode("div",{class:n.normalizeClass([`ui-slider__mode-${s.mode}`,"ui-slider"])},[n.createElementVNode("div",B1,[n.createElementVNode("div",N1,[oe.label?(n.openBlock(),n.createElementBlock("label",O1,[n.createElementVNode("span",null,n.toDisplayString(oe.label),1),de[3]||(de[3]=n.createTextVNode()),n.unref(t).tooltip?(n.openBlock(),n.createBlock(n.unref(Zt),{key:0,class:"info",position:"top"},{tooltip:n.withCtx(()=>[n.renderSlot(oe.$slots,"tooltip")]),_:3})):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),de[4]||(de[4]=n.createTextVNode()),s.mode==="text"?(n.openBlock(),n.createElementBlock("div",A1,n.toDisplayString(O.value),1)):n.createCommentVNode("",!0)]),de[10]||(de[10]=n.createTextVNode()),n.createElementVNode("div",R1,[n.createElementVNode("div",D1,[n.createElementVNode("div",{ref_key:"barRef",ref:d,class:"ui-slider__bar"},[n.createElementVNode("div",{class:"ui-slider__progress",style:n.normalizeStyle(U.value)},null,4)],512)]),de[9]||(de[9]=n.createTextVNode()),n.createElementVNode("div",I1,[s.breakpoints?(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:0},n.renderList(n.unref(B),(ae,J)=>(n.openBlock(),n.createElementBlock("div",{key:J,style:n.normalizeStyle({right:`${ae}%`}),class:"ui-slider__thumb-step"},null,4))),128)):n.createCommentVNode("",!0),de[7]||(de[7]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"thumbRef1",ref:u,style:n.normalizeStyle(N.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:de[0]||(de[0]=ae=>q(ae,0))},de[5]||(de[5]=[n.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36),de[8]||(de[8]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"thumbRef2",ref:p,style:n.normalizeStyle(S.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:de[1]||(de[1]=ae=>q(ae,1))},de[6]||(de[6]=[n.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),de[11]||(de[11]=n.createTextVNode()),n.createElementVNode("div",M1,[s.mode==="input"?(n.openBlock(),n.createBlock(V1,{key:0,modelValue:h.value,"onUpdate:modelValue":de[2]||(de[2]=ae=>h.value=ae),class:"ui-focused-border",onChange:F},null,8,["modelValue"])):n.createCommentVNode("",!0)])],2),de[12]||(de[12]=n.createTextVNode()),D.value?(n.openBlock(),n.createElementBlock("div",P1,n.toDisplayString(D.value),1)):n.createCommentVNode("",!0)],2))}}),F1=n.defineComponent({__name:"VScroll",props:{scrollTop:{},clientHeight:{},scrollHeight:{}},emits:["update:scrollTop"],setup(i,{emit:e}){const t=e,a=i,s=n.ref(),c=n.computed(()=>a.clientHeight/(a.scrollHeight||1)),d=n.computed(()=>c.value<1),u=n.computed(()=>{const p=n.unref(c);return{top:a.scrollTop*p+"px",height:Math.floor(a.clientHeight*p)+"px"}});return Ge(s,"pointerdown",p=>{const h={clientY:p.clientY},g=Ys(document,"mousemove",v=>{const T=(v.clientY-h.clientY)/c.value;t("update:scrollTop",a.scrollTop+T),h.clientY=v.clientY});["mouseup","pointercancel"].forEach(v=>{document.addEventListener(v,g,{once:!0})})}),(p,h)=>d.value?(n.openBlock(),n.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:s,class:"v-scroll"},[n.createElementVNode("div",{class:"v-scroll__scrollbar",style:n.normalizeStyle(u.value)},null,4)],512)):n.createCommentVNode("",!0)}}),$1=n.defineComponent({__name:"HScroll",props:{scrollLeft:{},clientWidth:{},scrollWidth:{}},emits:["update:scrollLeft"],setup(i,{emit:e}){const t=e,a=i,s=n.ref(),c=n.computed(()=>a.clientWidth/(a.scrollWidth||1)),d=n.computed(()=>c.value<1),u=n.computed(()=>{const p=n.unref(c);return{left:a.scrollLeft*p+"px",width:Math.floor(a.clientWidth*p)+"px"}});return Ge(s,"pointerdown",p=>{const h={clientX:p.clientX},g=Ys(document,"mousemove",v=>{const T=(v.clientX-h.clientX)/c.value;t("update:scrollLeft",a.scrollLeft+T),h.clientX=v.clientX});["mouseup","pointercancel"].forEach(v=>{document.addEventListener(v,g,{once:!0})})}),(p,h)=>d.value?(n.openBlock(),n.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:s,class:"h-scroll"},[n.createElementVNode("div",{class:"h-scroll__scrollbar",style:n.normalizeStyle(u.value)},null,4)],512)):n.createCommentVNode("",!0)}}),z1={class:"ui-scrollable"},Z1=n.defineComponent({__name:"Scrollable",setup(i){const e=n.ref(),t=n.reactive({scrollTop:0,scrollLeft:0,clientHeight:0,clientWidth:0,scrollHeight:0,scrollWidth:0});function a(u){Q_(t,u,"scrollTop","scrollLeft","clientHeight","clientWidth","scrollHeight","scrollWidth")}const s=u=>{u.preventDefault();const p=u.currentTarget;p.scrollTop+=u.deltaY,p.scrollLeft+=u.deltaX,a(p)};function c(u){at(n.unref(e),p=>{p.scrollTop=u,a(p)})}function d(u){at(n.unref(e),p=>{p.scrollLeft=u,a(p)})}return hu(e,u=>{at(u,p=>a(p))}),n.onMounted(()=>{at(n.unref(e),u=>{a(u),u.addEventListener("wheel",s)})}),n.onUnmounted(()=>{at(n.unref(e),u=>u.removeEventListener("wheel",s))}),(u,p)=>(n.openBlock(),n.createElementBlock("div",z1,[n.createElementVNode("div",{ref_key:"containerRef",ref:e,class:"ui-scrollable__container",onWheel:s},[n.renderSlot(u.$slots,"default")],544),p[2]||(p[2]=n.createTextVNode()),n.createVNode(F1,{"scroll-top":t.scrollTop,"client-height":t.clientHeight,"scroll-height":t.scrollHeight,onWheel:p[0]||(p[0]=n.withModifiers(()=>{},["stop"])),"onUpdate:scrollTop":c},null,8,["scroll-top","client-height","scroll-height"]),p[3]||(p[3]=n.createTextVNode()),n.createVNode($1,{"scroll-left":t.scrollLeft,"client-width":t.clientWidth,"scroll-width":t.scrollWidth,onWheel:p[1]||(p[1]=n.withModifiers(()=>{},["stop"])),"onUpdate:scrollLeft":d},null,8,["scroll-left","client-width","scroll-width"])]))}}),U1="add.svg",j1="checkmark.svg",W1="clear.svg",H1="clipboard.svg",q1="close.svg",G1="comp.svg",K1="compare.svg",Y1="copy.svg",J1="edit.svg",X1="error.svg",Q1="filter.svg",ev="help.svg",tv="info.svg",nv="link.svg",rv="loading.svg",iv="lock.svg",ov="maximize.svg",av="minimize.svg",sv="minus.svg",lv="open.svg",cv="pause.svg",dv="play.svg",uv="required.svg",fv="restart.svg",pv="sort.svg",hv="sorter.svg",mv="stop.svg",gv="success.svg",yv="warning.svg",_v="zip.svg",wv={add:U1,"arrow-down":"arrow-down.svg","arrow-left":"arrow-left.svg","arrow-right":"arrow-right.svg","arrow-up":"arrow-up.svg","cell-type-num":"cell-type-num.svg","cell-type-txt":"cell-type-txt.svg",checkmark:j1,"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",clear:W1,"clipboard-copied":"clipboard-copied.svg",clipboard:H1,close:q1,comp:G1,compare:K1,copy:Y1,"data-dimentions":"data-dimentions.svg",delete:"delete.svg","drag-dots":"drag-dots.svg",edit:J1,error:X1,export:"export.svg","filter-2":"filter-2.svg",filter:Q1,help:ev,import:"import.svg",info:tv,"link-arrow":"link-arrow.svg",link:nv,loading:rv,lock:iv,maximize:ov,minimize:av,minus:sv,"more-horizontal":"more-horizontal.svg",open:lv,pause:cv,play:dv,required:uv,restart:fv,"settings-2":"settings-2.svg",sort:pv,sorter:hv,stop:mv,success:gv,warning:yv,"x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:_v},bv="add.svg",kv="annotate.svg",vv="annotation.svg",xv="area.svg",Cv="axes.svg",Ev="bar.svg",Sv="bindot.svg",Tv="boxplot.svg",Vv="bubble.svg",Bv="canvas.svg",Nv="checkbox.svg",Ov="checkmark.svg",Av="clipboard.svg",Rv="close.svg",Dv="code.svg",Iv="color.svg",Mv="columns.svg",Pv="copy.svg",Lv="cpu.svg",Fv="dna.svg",$v="duplicate.svg",zv="edit.svg",Zv="error.svg",Uv="filter.svg",jv="generate.svg",Wv="graph.svg",Hv="heatmap.svg",qv="help.svg",Gv="hide.svg",Kv="jitter.svg",Yv="layers.svg",Jv="learn.svg",Xv="legend.svg",Qv="line.svg",ex="linetype.svg",tx="link.svg",nx="loading.svg",rx="local.svg",ix="logout.svg",ox="menu.svg",ax="minus.svg",sx="pin.svg",lx="position.svg",cx="progress.svg",dx="publications.svg",ux="restart.svg",fx="reverse.svg",px="rotation.svg",hx="save.svg",mx="search.svg",gx="show.svg",yx="sina.svg",_x="skatterplot.svg",wx="sort.svg",bx="statistics.svg",kx="stroke.svg",vx="success.svg",xx="table.svg",Cx="template.svg",Ex="venn.svg",Sx="violin.svg",Tx="warning.svg",Vx="wetlab.svg",Bx={"add-layer":"add-layer.svg",add:bv,annotate:kv,annotation:vv,area:xv,"arrow-down":"arrow-down.svg","arrow-left":"arrow-left.svg","arrow-right":"arrow-right.svg","arrow-up":"arrow-up.svg",axes:Cv,"bar-error":"bar-error.svg","bar-trend":"bar-trend.svg",bar:Ev,bindot:Sv,"box-dot":"box-dot.svg","boxplot-1":"boxplot-1.svg","boxplot-binned":"boxplot-binned.svg","boxplot-jitter":"boxplot-jitter.svg","boxplot-notched":"boxplot-notched.svg",boxplot:Tv,bubble:Vv,canvas:Bv,checkbox:Nv,checkmark:Ov,"chevron-down":"chevron-down.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:Av,close:Rv,"cloud-down":"cloud-down.svg","cloud-offline":"cloud-offline.svg","cloud-online":"cloud-online.svg","cloud-up":"cloud-up.svg","code-2":"code-2.svg",code:Dv,color:Iv,columns:Mv,"connected-points":"connected-points.svg",copy:Pv,cpu:Lv,"cross-bars":"cross-bars.svg","dark-mode":"dark-mode.svg",delete:"delete.svg","dendrogram-X-1":"dendrogram-X-1.svg","dendrogram-X":"dendrogram-X.svg","dendrogram-Y-1":"dendrogram-Y-1.svg","dendrogram-Y":"dendrogram-Y.svg",dna:Fv,"download-files":"download-files.svg",duplicate:$v,edit:zv,"error-bar":"error-bar.svg",error:Zv,"expand-left":"expand-left.svg","expand-right":"expand-right.svg","export-2":"export-2.svg",export:"export.svg","external-link":"external-link.svg","fill-color":"fill-color.svg","filter-on":"filter-on.svg",filter:Uv,"filters-gate":"filters-gate.svg","fire-tips":"fire-tips.svg","folder-parent":"folder-parent.svg","frame-type":"frame-type.svg",generate:jv,graph:Wv,heatmap:Hv,help:qv,hide:Gv,"import-2":"import-2.svg","import-download":"import-download.svg","info-circle-outline":"info-circle-outline.svg",jitter:Kv,layers:Yv,learn:Jv,legend:Xv,"light-mode":"light-mode.svg","line-binned":"line-binned.svg","line-error":"line-error.svg","line-jitter":"line-jitter.svg",line:Qv,linetype:ex,"link-disabled":"link-disabled.svg",link:tx,loading:nx,local:rx,logout:ix,menu:ox,minus:ax,"more-horizontal":"more-horizontal.svg","outlier-shape":"outlier-shape.svg","paper-clip":"paper-clip.svg",pin:sx,position:lx,"progress-2":"progress-2.svg",progress:cx,publications:dx,"radio-btn":"radio-btn.svg",restart:ux,reverse:fx,rotation:px,save:hx,search:mx,"server-2":"server-2.svg","settings-2":"settings-2.svg",show:gx,sina:yx,skatterplot:_x,"social-media":"social-media.svg",sort:wx,"stacked-bar":"stacked-bar.svg",statistics:bx,"strip-plot":"strip-plot.svg","stroke-non":"stroke-non.svg",stroke:kx,success:vx,"table-upload":"table-upload.svg",table:xx,template:Cx,"title-position":"title-position.svg","upload-files":"upload-files.svg",venn:Ex,"violin-binned":"violin-binned.svg","violin-jitter":"violin-jitter.svg",violin:Sx,warning:Tx,wetlab:Vx,"zoom-in":"zoom-in.svg"};function Nx(){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 Ox=["add","arrow-down","arrow-left","arrow-right","arrow-up","cell-type-num","cell-type-txt","checkmark","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-up","clear","clipboard-copied","clipboard","close","comp","compare","copy","data-dimentions","delete","drag-dots","edit","error","export","filter-2","filter","help","import","info","link-arrow","link","loading","lock","maximize","minimize","minus","more-horizontal","open","pause","play","required","restart","settings-2","sort","sorter","stop","success","warning","x-axis","y-axis","zip"],Ax=["add-layer","add","annotate","annotation","area","arrow-down","arrow-left","arrow-right","arrow-up","axes","bar-error","bar-trend","bar","bindot","box-dot","boxplot-1","boxplot-binned","boxplot-jitter","boxplot-notched","boxplot","bubble","canvas","checkbox","checkmark","chevron-down","chevron-left","chevron-right","chevron-sort","chevron-up","clipboard-copied","clipboard","close","cloud-down","cloud-offline","cloud-online","cloud-up","code-2","code","color","columns","connected-points","copy","cpu","cross-bars","dark-mode","delete","dendrogram-X-1","dendrogram-X","dendrogram-Y-1","dendrogram-Y","dna","download-files","duplicate","edit","error-bar","error","expand-left","expand-right","export-2","export","external-link","fill-color","filter-on","filter","filters-gate","fire-tips","folder-parent","frame-type","generate","graph","heatmap","help","hide","import-2","import-download","info-circle-outline","jitter","layers","learn","legend","light-mode","line-binned","line-error","line-jitter","line","linetype","link-disabled","link","loading","local","logout","menu","minus","more-horizontal","outlier-shape","paper-clip","pin","position","progress-2","progress","publications","radio-btn","restart","reverse","rotation","save","search","server-2","settings-2","show","sina","skatterplot","social-media","sort","stacked-bar","statistics","strip-plot","stroke-non","stroke","success","table-upload","table","template","title-position","upload-files","venn","violin-binned","violin-jitter","violin","warning","wetlab","zoom-in"],Rx={allCssVariables:Nx(),icons16:wv,icons24:Bx},Dx={class:"block__not-found"},Ix=n.defineComponent({__name:"NotFound",setup(i){const t=Ss().useApp(),a=()=>{t.updateNavigationState(s=>{s.href="/"})};return(s,c)=>(n.openBlock(),n.createElementBlock("div",Dx,[n.createElementVNode("h1",null,"Not found route: "+n.toDisplayString(n.unref(t).snapshot.navigationState.href),1),n.createVNode(n.unref(Hs),{onClick:n.withModifiers(a,["stop"])},{default:n.withCtx(()=>c[0]||(c[0]=[n.createTextVNode("Return to main page")])),_:1})]))}}),ll=(i,e)=>{const t=i.__vccOpts||i;for(const[a,s]of e)t[a]=s;return t},Mx={},Px={class:"block__loader-page"};function Lx(i,e){return n.openBlock(),n.createElementBlock("div",Px,e[0]||(e[0]=[n.createElementVNode("div",{class:"loader-container"},[n.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"})],-1)]))}const Fx=ll(Mx,[["render",Lx]]),$x={class:"block block__layout"},zx={key:0},Zx=n.defineComponent({__name:"BlockLayout",setup(i){const e=Ss(),t=c=>{try{return new URL(c,"http://dummy").pathname}catch{console.error("Invalid href",c);return}},a=n.computed(()=>e.loaded?e.useApp().href:void 0),s=n.computed(()=>{if(e.loaded){const c=e.useApp(),d=t(c.snapshot.navigationState.href);return d?c.routes[d]:void 0}});return(c,d)=>(n.openBlock(),n.createElementBlock("div",$x,[n.unref(e).error?(n.openBlock(),n.createElementBlock("div",zx,n.toDisplayString(n.unref(e).error),1)):n.unref(e).loaded?s.value?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(s.value),{key:a.value})):(n.openBlock(),n.createBlock(Ix,{key:3})):(n.openBlock(),n.createBlock(Fx,{key:1},{default:n.withCtx(()=>d[0]||(d[0]=[n.createTextVNode("Loading...")])),_:1}))]))}});var ua={exports:{}};/**
21
+ )`}function c(){const u=i.value;if(!u)return;const p=[a(u),s(u)].filter(h=>h!==null);u.style.setProperty("-webkit-mask-image",p.join(",")),u.style.setProperty("mask-image",p.join(",")),p.length>1&&(u.style.setProperty("-webkit-mask-composite","source-in"),u.style.setProperty("mask-composite","source-in"))}const d=Ps(c);n.onMounted(c),Ge(window,"scroll",d,!0),Ge(window,"resize",d,!0)}function hu(i,e){Fd(()=>{at(n.unref(i),t=>{$d(t,()=>e(t))})}),n.onUnmounted(()=>{at(n.unref(i),t=>{zd(t)})})}const rr={item:"sortable__item",animate:"sortable__animate"},co=i=>i.getBoundingClientRect().y,mu=i=>{const{y:e,height:t}=i.getBoundingClientRect();return e+Math.ceil(t/2)},d1=i=>{const{y:e,height:t}=i.getBoundingClientRect();return e+t};function u1(i,e){const t={item:void 0,options(){var B;return[...((B=i.value)==null?void 0:B.children)??[]]}},a=n.computed(()=>t.options()),s=e.shakeBuffer??10,c=e.reorderDelay??100;function d(B){const O=e.handle?this.querySelector(e.handle):null;O&&!O.contains(B.target)||(this.classList.remove(rr.animate),this.classList.add(rr.item),t.item={el:this,y:B.y,dy:0,orderChanged:!1})}function u(B){const O=t.options();return O.slice(0,O.indexOf(B))}function p(B){const O=t.options();return O.slice(O.indexOf(B)+1)}function h(B,O){const C=t.options().filter(b=>b!==O),A=C.indexOf(B);return C.splice(A,0,O),C}function g(B,O){const C=t.options().filter(b=>b!==O),A=C.indexOf(B);return C.splice(A+1,0,O),C}function v(B,O){B.dy=O-B.y,B.el.style.setProperty("transform",`translateY(${B.dy}px)`)}function T(B){var O;if(!t.item)return;const{el:C}=t.item;if(!C.isConnected){t.item=void 0;return}const A=B.map(U=>co(U)),b=co(C);(O=i.value)==null||O.replaceChildren(...B);const D=co(C),$=B.map(U=>co(U)),j=[];for(let U=0;U<$.length;U++){const N=B[U];if(N===t.item.el)continue;const S=$[U],M=A[U]-S;N.style.transform=`translateY(${M}px)`,j.push(N)}const P=D-b;t.item.y=t.item.y+P,t.item.dy=t.item.dy-P,t.item.orderChanged=!0,t.item.el.style.setProperty("transform",`translateY(${t.item.dy}px)`),j.forEach(U=>U.classList.remove(rr.animate)),requestAnimationFrame(function(){j.forEach(U=>{U.classList.add(rr.animate),U.style.transform="",U.addEventListener("transitionend",()=>{U.classList.remove(rr.animate)})})})}Ge(window,"mousemove",B=>{if(!t.item)return;const{el:O}=t.item;v(t.item,B.y);const C=co(t.item.el),A=d1(t.item.el),b=u(O),D=p(O);b.forEach($=>{const j=mu($);C+s<j&&T(h($,O))}),D.forEach($=>{const j=mu($);A-s>j&&T(g($,O))})}),Ge(window,"mouseup",()=>{if(!t.item)return;const{el:B,orderChanged:O}=t.item;B.classList.add(rr.animate),B.style.removeProperty("transform"),B.addEventListener("transitionend",()=>{B.classList.remove(rr.animate,rr.item)}),setTimeout(()=>{if(!O)return;const C=t.options().map(b=>Number(b.getAttribute("data-index"))),A=i.value;if(A){for(const b of t.options())A.removeChild(b);a.value.forEach(b=>{A.appendChild(b)})}e.onChange(C)},c),t.item=void 0}),n.watchEffect(()=>{a.value.forEach((B,O)=>{B.removeEventListener("mousedown",d),B.addEventListener("mousedown",d),B.setAttribute("data-index",String(O))})})}function f1(i,e){let t;n.onMounted(()=>{t=setInterval(i,e)}),n.onUnmounted(()=>clearInterval(t))}function p1(i,e,t){const a=n.reactive({data:As.deepClone(e(i.value)),changed:!1});return n.watch(()=>a.data,s=>{a.changed?t(As.deepClone(s)):a.changed=!0},{deep:!0}),n.watch(i,s=>{Object.assign(a,{data:As.deepClone(e(s)),changed:!1})},{deep:!0,immediate:!0}),a}function h1(i){const e=n.reactive({isLoading:!1,result:void 0,error:void 0,async run(...t){this.isLoading=!0,this.error=void 0;try{this.result=await i(...t)}catch(a){this.error=a}finally{this.isLoading=!1}},debounce(t,a=1e3){return wd(()=>{const s=t();this.run(...s).catch(console.error)},a)}});return e.run=e.run.bind(e),e}function m1(i,e){function t(d,u){const p=n.unref(i);if(!p)return;const h=`translate(${u.x-d.x}px, ${u.y-d.y}px)`;p.style.setProperty("transform",h),e(u)}function a(d){const u=p=>t(d,p);document.addEventListener("mousemove",u),document.addEventListener("mouseup",()=>{const p=n.unref(i);document.removeEventListener("mousemove",u),p&&(p.style.setProperty("transition","all .3s ease-in-out"),p.style.removeProperty("transform"),p.addEventListener("transitionend",()=>{p.style.removeProperty("transition")}))},{once:!0})}function s(){var d;(d=n.unref(i))==null||d.addEventListener("mousedown",a)}function c(){var d;(d=n.unref(i))==null||d.removeEventListener("mousedown",a)}n.onMounted(s),n.onUnmounted(c)}const g1={class:"ui-slider__wrapper"},y1={class:"ui-slider__label-section"},_1={key:0,class:"text-s"},w1={class:"ui-slider__base"},b1={class:"ui-slider__container"},k1={class:"ui-slider__container ui-slider__container-thumb"},v1=["data-percent"],x1=["data-percent"],C1=["data-percent"],E1={key:0,class:"ui-slider__error"},S1=n.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(i,{emit:e}){const t=n.useSlots(),a=e,s=i,c=n.reactive({deltaValue1:0,deltaValue2:0,deltaValue3:0}),d=n.ref(),u=n.ref(),p=n.ref(),h=n.ref(),g=n.computed(()=>s.max-s.min),v=n.computed(()=>s),T=sl(v),B=n.computed(()=>ht((s.modelValue[0]??0)+c.deltaValue1,s.min,s.max)),O=n.computed(()=>ht((s.modelValue[1]??0)+c.deltaValue2,s.min,s.max)),C=n.computed(()=>ht((s.modelValue[2]??0)+c.deltaValue3,s.min,s.max)),A=n.computed(()=>{const ae=s.modelValue;if(!(Array.isArray(ae)&&ae.length===3&&ae.every(Ce=>Number.isFinite(Ce))))return"Expected model [number, number, number]";const J=[];return[...s.modelValue].forEach(Ce=>{Ce>s.max&&J.push(`Max model value must be lower than max props ${s.max}.`),Ce<s.min&&J.push("Min model value must be greater than max props.")}),J.length>0?J.join(" "):s.error}),b=n.computed(()=>(B.value-s.min)/g.value),D=n.computed(()=>(O.value-s.min)/g.value),$=n.computed(()=>(C.value-s.min)/g.value),j=n.computed(()=>W()),P=n.computed(()=>({right:j.value[0]+"%",left:100-j.value[2]+"%"})),U=n.computed(()=>({right:Math.ceil((1-b.value)*100)+"%"})),N=n.computed(()=>({right:Math.ceil((1-D.value)*100)+"%"})),S=n.computed(()=>({right:Math.ceil((1-$.value)*100)+"%"}));Yn(u,ae=>{var J;at((J=n.unref(d))==null?void 0:J.getBoundingClientRect(),Ce=>{const{dx:Ne}=ae;c.deltaValue1=Ne/Ce.width*g.value,u.value&&M(u.value,s.modelValue[0],c.deltaValue1),ae.stop&&(q([F(B.value),F(O.value),F(C.value)]),c.deltaValue1=0)})}),Yn(p,ae=>{var J;at((J=n.unref(d))==null?void 0:J.getBoundingClientRect(),Ce=>{const{dx:Ne}=ae;c.deltaValue2=Ne/Ce.width*g.value,p.value&&M(p.value,s.modelValue[1],c.deltaValue2),ae.stop&&(q([F(B.value),F(O.value),F(C.value)]),c.deltaValue2=0)})}),Yn(h,ae=>{var J;at((J=n.unref(d))==null?void 0:J.getBoundingClientRect(),Ce=>{const{dx:Ne}=ae;c.deltaValue3=Ne/Ce.width*g.value,h.value&&M(h.value,s.modelValue[2],c.deltaValue3),ae.stop&&(q([F(B.value),F(O.value),F(C.value)]),c.deltaValue3=0)})});function M(ae,J,Ce){const Ne=F(ht((J??0)+Ce,s.min,s.max));ae.dataset.percent=`${Ne}${s.measure}`,oe()}function W(){const ae=Math.ceil((1-b.value)*100),J=Math.ceil((1-D.value)*100),Ce=Math.ceil((1-$.value)*100);return[ae,J,Ce].sort((Ne,Ar)=>Ne-Ar)}function F(ae){const J=ht(ae,s.min,s.max);return Math.round((J+Number.EPSILON)*(1/s.step))/(1/s.step)}function q(ae){a("update:modelValue",ae)}function oe(){const ae=Number(U.value.right.substring(0,U.value.right.length-1)),J=Number(N.value.right.substring(0,N.value.right.length-1)),Ce=Number(S.value.right.substring(0,S.value.right.length-1)),Ne=[{r:ae,th:u},{r:J,th:p},{r:Ce,th:h}].sort((Ar,ar)=>Ar.r-ar.r);Ne[0].th.value&&(Ne[0].th.value.dataset.hint="high"),Ne[1].th.value&&(Ne[1].th.value.dataset.hint="mid"),Ne[2].th.value&&(Ne[2].th.value.dataset.hint="low")}function de(ae,J){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(ae.code)&&ae.preventDefault();const Ce=ae.code==="ArrowUp"||ae.code==="ArrowRight"?s.step*1:ae.code==="ArrowDown"||ae.code==="ArrowLeft"?s.step*-1:0,Ne=[...s.modelValue];Ne[J]=ht(Ne[J]+Ce,s.min,s.max),q(Ne),oe()}return n.onMounted(()=>{oe()}),(ae,J)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([s.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope ui-slider__triple"])},[n.createElementVNode("div",{class:n.normalizeClass([`ui-slider__mode-${s.mode}`,"ui-slider"])},[n.createElementVNode("div",g1,[n.createElementVNode("div",y1,[ae.label?(n.openBlock(),n.createElementBlock("label",_1,[n.createElementVNode("span",null,n.toDisplayString(ae.label),1),J[3]||(J[3]=n.createTextVNode()),n.unref(t).tooltip?(n.openBlock(),n.createBlock(n.unref(Zt),{key:0,class:"info",position:"top"},{tooltip:n.withCtx(()=>[n.renderSlot(ae.$slots,"tooltip")]),_:3})):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0)]),J[11]||(J[11]=n.createTextVNode()),n.createElementVNode("div",w1,[n.createElementVNode("div",b1,[n.createElementVNode("div",{ref_key:"barRef",ref:d,class:"ui-slider__bar"},[n.createElementVNode("div",{class:"ui-slider__progress",style:n.normalizeStyle(P.value)},null,4)],512)]),J[10]||(J[10]=n.createTextVNode()),n.createElementVNode("div",k1,[s.breakpoints?(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:0},n.renderList(n.unref(T),(Ce,Ne)=>(n.openBlock(),n.createElementBlock("div",{key:Ne,style:n.normalizeStyle({right:`${Ce}%`}),class:"ui-slider__thumb-step"},null,4))),128)):n.createCommentVNode("",!0),J[7]||(J[7]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"thumbRef1",ref:u,style:n.normalizeStyle(U.value),"data-percent":s.modelValue[0]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r1:"",tabindex:"0",onKeydown:J[0]||(J[0]=Ce=>de(Ce,0))},J[4]||(J[4]=[n.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,v1),J[8]||(J[8]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"thumbRef2",ref:p,style:n.normalizeStyle(N.value),"data-percent":s.modelValue[1]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r2:"",tabindex:"0",onKeydown:J[1]||(J[1]=Ce=>de(Ce,1))},J[5]||(J[5]=[n.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,x1),J[9]||(J[9]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"thumbRef3",ref:h,style:n.normalizeStyle(S.value),"data-percent":s.modelValue[2]+"%",class:"ui-slider__thumb ui-slider__triple-thumb",r3:"",tabindex:"0",onKeydown:J[2]||(J[2]=Ce=>de(Ce,2))},J[6]||(J[6]=[n.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),44,C1)])])]),J[12]||(J[12]=n.createTextVNode()),J[13]||(J[13]=n.createElementVNode("div",{class:"ui-slider__input-wrapper d-flex"},null,-1))],2),J[14]||(J[14]=n.createTextVNode()),A.value?(n.openBlock(),n.createElementBlock("div",E1,n.toDisplayString(A.value),1)):n.createCommentVNode("",!0)],2))}}),T1={class:"ui-input-range__separator"},V1=n.defineComponent({__name:"InputRange",props:{modelValue:{},separator:{default:"-"}},emits:["update:modelValue","change"],setup(i,{emit:e}){const t=i,a=e,s=n.reactive({left:t.modelValue[0],right:t.modelValue[1]}),c=n.ref(!1),d=n.computed(()=>(c.value,"ui-input-range-focused")),u=n.computed({get(){return{left:Math.min(...t.modelValue),right:Math.max(...t.modelValue)}},set(){}});n.watch(()=>u.value,g=>(s.left=g.left)&&(s.right=g.right));function p(){a("update:modelValue",[+s.left,+s.right]),a("change",[+s.left,+s.right])}function h(g,v){const T=v.target.value;/^[0-9]{0,2}$/.test(T)?g?s.left=+T:s.right=+T:g?s.left=+T.slice(0,T.length-1):s.right=+T.slice(0,T.length-1)}return(g,v)=>(n.openBlock(),n.createElementBlock("div",n.mergeProps({class:[d.value,"ui-input-range"]},g.$attrs),[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":v[0]||(v[0]=T=>u.value.left=T),class:"text-s",type:"text",onChange:p,onFocus:v[1]||(v[1]=T=>c.value=!0),onFocusout:v[2]||(v[2]=T=>c.value=!1),onInput:v[3]||(v[3]=T=>h(!0,T))},null,544),[[n.vModelText,u.value.left]]),v[8]||(v[8]=n.createTextVNode()),n.createElementVNode("div",T1,n.toDisplayString(t.separator),1),v[9]||(v[9]=n.createTextVNode()),n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":v[4]||(v[4]=T=>u.value.right=T),class:"text-s",type:"text",onChange:p,onFocus:v[5]||(v[5]=T=>c.value=!0),onFocusout:v[6]||(v[6]=T=>c.value=!1),onInput:v[7]||(v[7]=T=>h(!1,T))},null,544),[[n.vModelText,u.value.right]])],16))}}),B1={class:"ui-slider__wrapper"},N1={class:"ui-slider__label-section"},O1={key:0,class:"text-s"},A1={key:1,class:"ui-slider__value-static text-s"},R1={class:"ui-slider__base"},D1={class:"ui-slider__container"},I1={class:"ui-slider__container ui-slider__container-thumb"},M1={class:"ui-slider__input-wrapper d-flex"},P1={key:0,class:"ui-slider__error"},L1=n.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(i,{emit:e}){const t=n.useSlots(),a=e,s=i,c=n.reactive({deltaValue1:0,deltaValue2:0}),d=n.ref(),u=n.ref(),p=n.ref(),h=n.ref(s.modelValue),g=n.ref(s.modelValue[0]),v=n.ref(s.modelValue[1]),T=n.computed(()=>s),B=sl(T),O=n.computed(()=>[g.value,v.value].sort((oe,de)=>oe-de).join("-")),C=n.computed(()=>s.max-s.min),A=n.computed(()=>ht((s.modelValue[0]??0)+c.deltaValue1,s.min,s.max)),b=n.computed(()=>ht((s.modelValue[1]??0)+c.deltaValue2,s.min,s.max)),D=n.computed(()=>{const oe=s.modelValue;return Array.isArray(oe)&&oe.length===2&&oe.every(de=>Number.isFinite(de))?s.error:"Expected model [number, number]"}),$=n.computed(()=>(A.value-s.min)/C.value),j=n.computed(()=>(b.value-s.min)/C.value),P=n.computed(()=>M()),U=n.computed(()=>({right:P.value[0]+"%",left:100-P.value[1]+"%"})),N=n.computed(()=>({right:Math.ceil((1-$.value)*100)+"%"})),S=n.computed(()=>({right:Math.ceil((1-j.value)*100)+"%"}));n.watch(()=>s.modelValue,oe=>{h.value=oe,g.value=+oe[0],v.value=+oe[1]},{immediate:!0}),Yn(u,oe=>{var de;at((de=n.unref(d))==null?void 0:de.getBoundingClientRect(),ae=>{const{dx:J}=oe;c.deltaValue1=J/ae.width*C.value,g.value=W(ht((s.modelValue[0]??0)+c.deltaValue1,s.min,s.max)),h.value=[g.value,v.value].sort((Ce,Ne)=>Ce-Ne),oe.stop&&(F([W(A.value),W(b.value)]),c.deltaValue1=0)})}),Yn(p,oe=>{var de;at((de=n.unref(d))==null?void 0:de.getBoundingClientRect(),ae=>{const{dx:J}=oe;c.deltaValue2=J/ae.width*C.value,v.value=W(ht((s.modelValue[1]??0)+c.deltaValue2,s.min,s.max)),h.value=[g.value,v.value].sort((Ce,Ne)=>Ce-Ne),oe.stop&&(F([W(A.value),W(b.value)]),c.deltaValue2=0)})});function M(){const oe=Math.ceil((1-$.value)*100),de=Math.ceil((1-j.value)*100);return[oe,de].sort((ae,J)=>ae-J)}function W(oe){const de=ht(oe,s.min,s.max);return Math.round((de+Number.EPSILON)*(1/s.step))/(1/s.step)}function F(oe){a("update:modelValue",oe)}function q(oe,de){["ArrowDown","ArrowUp","ArrowRight","ArrowLeft","Enter"].includes(oe.code)&&oe.preventDefault();const ae=oe.code==="ArrowUp"||oe.code==="ArrowRight"?s.step*1:oe.code==="ArrowDown"||oe.code==="ArrowLeft"?s.step*-1:0,J=[...s.modelValue];J[de]=ht(J[de]+ae,s.min,s.max),F(J)}return(oe,de)=>(n.openBlock(),n.createElementBlock("div",{class:n.normalizeClass([s.disabled?"ui-slider__disabled":void 0,"ui-slider__envelope"])},[n.createElementVNode("div",{class:n.normalizeClass([`ui-slider__mode-${s.mode}`,"ui-slider"])},[n.createElementVNode("div",B1,[n.createElementVNode("div",N1,[oe.label?(n.openBlock(),n.createElementBlock("label",O1,[n.createElementVNode("span",null,n.toDisplayString(oe.label),1),de[3]||(de[3]=n.createTextVNode()),n.unref(t).tooltip?(n.openBlock(),n.createBlock(n.unref(Zt),{key:0,class:"info",position:"top"},{tooltip:n.withCtx(()=>[n.renderSlot(oe.$slots,"tooltip")]),_:3})):n.createCommentVNode("",!0)])):n.createCommentVNode("",!0),de[4]||(de[4]=n.createTextVNode()),s.mode==="text"?(n.openBlock(),n.createElementBlock("div",A1,n.toDisplayString(O.value),1)):n.createCommentVNode("",!0)]),de[10]||(de[10]=n.createTextVNode()),n.createElementVNode("div",R1,[n.createElementVNode("div",D1,[n.createElementVNode("div",{ref_key:"barRef",ref:d,class:"ui-slider__bar"},[n.createElementVNode("div",{class:"ui-slider__progress",style:n.normalizeStyle(U.value)},null,4)],512)]),de[9]||(de[9]=n.createTextVNode()),n.createElementVNode("div",I1,[s.breakpoints?(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:0},n.renderList(n.unref(B),(ae,J)=>(n.openBlock(),n.createElementBlock("div",{key:J,style:n.normalizeStyle({right:`${ae}%`}),class:"ui-slider__thumb-step"},null,4))),128)):n.createCommentVNode("",!0),de[7]||(de[7]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"thumbRef1",ref:u,style:n.normalizeStyle(N.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:de[0]||(de[0]=ae=>q(ae,0))},de[5]||(de[5]=[n.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36),de[8]||(de[8]=n.createTextVNode()),n.createElementVNode("div",{ref_key:"thumbRef2",ref:p,style:n.normalizeStyle(S.value),class:"ui-slider__thumb",tabindex:"0",onKeydown:de[1]||(de[1]=ae=>q(ae,1))},de[6]||(de[6]=[n.createElementVNode("div",{class:"ui-slider__thumb-focused-contour"},null,-1)]),36)])])]),de[11]||(de[11]=n.createTextVNode()),n.createElementVNode("div",M1,[s.mode==="input"?(n.openBlock(),n.createBlock(V1,{key:0,modelValue:h.value,"onUpdate:modelValue":de[2]||(de[2]=ae=>h.value=ae),class:"ui-focused-border",onChange:F},null,8,["modelValue"])):n.createCommentVNode("",!0)])],2),de[12]||(de[12]=n.createTextVNode()),D.value?(n.openBlock(),n.createElementBlock("div",P1,n.toDisplayString(D.value),1)):n.createCommentVNode("",!0)],2))}}),F1=n.defineComponent({__name:"VScroll",props:{scrollTop:{},clientHeight:{},scrollHeight:{}},emits:["update:scrollTop"],setup(i,{emit:e}){const t=e,a=i,s=n.ref(),c=n.computed(()=>a.clientHeight/(a.scrollHeight||1)),d=n.computed(()=>c.value<1),u=n.computed(()=>{const p=n.unref(c);return{top:a.scrollTop*p+"px",height:Math.floor(a.clientHeight*p)+"px"}});return Ge(s,"pointerdown",p=>{const h={clientY:p.clientY},g=Ys(document,"mousemove",v=>{const T=(v.clientY-h.clientY)/c.value;t("update:scrollTop",a.scrollTop+T),h.clientY=v.clientY});["mouseup","pointercancel"].forEach(v=>{document.addEventListener(v,g,{once:!0})})}),(p,h)=>d.value?(n.openBlock(),n.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:s,class:"v-scroll"},[n.createElementVNode("div",{class:"v-scroll__scrollbar",style:n.normalizeStyle(u.value)},null,4)],512)):n.createCommentVNode("",!0)}}),$1=n.defineComponent({__name:"HScroll",props:{scrollLeft:{},clientWidth:{},scrollWidth:{}},emits:["update:scrollLeft"],setup(i,{emit:e}){const t=e,a=i,s=n.ref(),c=n.computed(()=>a.clientWidth/(a.scrollWidth||1)),d=n.computed(()=>c.value<1),u=n.computed(()=>{const p=n.unref(c);return{left:a.scrollLeft*p+"px",width:Math.floor(a.clientWidth*p)+"px"}});return Ge(s,"pointerdown",p=>{const h={clientX:p.clientX},g=Ys(document,"mousemove",v=>{const T=(v.clientX-h.clientX)/c.value;t("update:scrollLeft",a.scrollLeft+T),h.clientX=v.clientX});["mouseup","pointercancel"].forEach(v=>{document.addEventListener(v,g,{once:!0})})}),(p,h)=>d.value?(n.openBlock(),n.createElementBlock("div",{key:0,ref_key:"scrollRef",ref:s,class:"h-scroll"},[n.createElementVNode("div",{class:"h-scroll__scrollbar",style:n.normalizeStyle(u.value)},null,4)],512)):n.createCommentVNode("",!0)}}),z1={class:"ui-scrollable"},Z1=n.defineComponent({__name:"Scrollable",setup(i){const e=n.ref(),t=n.reactive({scrollTop:0,scrollLeft:0,clientHeight:0,clientWidth:0,scrollHeight:0,scrollWidth:0});function a(u){Q_(t,u,"scrollTop","scrollLeft","clientHeight","clientWidth","scrollHeight","scrollWidth")}const s=u=>{u.preventDefault();const p=u.currentTarget;p.scrollTop+=u.deltaY,p.scrollLeft+=u.deltaX,a(p)};function c(u){at(n.unref(e),p=>{p.scrollTop=u,a(p)})}function d(u){at(n.unref(e),p=>{p.scrollLeft=u,a(p)})}return hu(e,u=>{at(u,p=>a(p))}),n.onMounted(()=>{at(n.unref(e),u=>{a(u),u.addEventListener("wheel",s)})}),n.onUnmounted(()=>{at(n.unref(e),u=>u.removeEventListener("wheel",s))}),(u,p)=>(n.openBlock(),n.createElementBlock("div",z1,[n.createElementVNode("div",{ref_key:"containerRef",ref:e,class:"ui-scrollable__container",onWheel:s},[n.renderSlot(u.$slots,"default")],544),p[2]||(p[2]=n.createTextVNode()),n.createVNode(F1,{"scroll-top":t.scrollTop,"client-height":t.clientHeight,"scroll-height":t.scrollHeight,onWheel:p[0]||(p[0]=n.withModifiers(()=>{},["stop"])),"onUpdate:scrollTop":c},null,8,["scroll-top","client-height","scroll-height"]),p[3]||(p[3]=n.createTextVNode()),n.createVNode($1,{"scroll-left":t.scrollLeft,"client-width":t.clientWidth,"scroll-width":t.scrollWidth,onWheel:p[1]||(p[1]=n.withModifiers(()=>{},["stop"])),"onUpdate:scrollLeft":d},null,8,["scroll-left","client-width","scroll-width"])]))}}),U1="add.svg",j1="checkmark.svg",W1="clear.svg",H1="clipboard.svg",q1="close.svg",G1="comp.svg",K1="compare.svg",Y1="copy.svg",J1="edit.svg",X1="error.svg",Q1="filter.svg",ev="help.svg",tv="info.svg",nv="link.svg",rv="loading.svg",iv="lock.svg",ov="maximize.svg",av="minimize.svg",sv="minus.svg",lv="open.svg",cv="pause.svg",dv="play.svg",uv="required.svg",fv="restart.svg",pv="sort.svg",hv="sorter.svg",mv="stop.svg",gv="success.svg",yv="warning.svg",_v="zip.svg",wv={add:U1,"arrow-down":"arrow-down.svg","arrow-left":"arrow-left.svg","arrow-right":"arrow-right.svg","arrow-up":"arrow-up.svg","cell-type-num":"cell-type-num.svg","cell-type-txt":"cell-type-txt.svg",checkmark:j1,"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",clear:W1,"clipboard-copied":"clipboard-copied.svg",clipboard:H1,close:q1,comp:G1,compare:K1,copy:Y1,"data-dimentions":"data-dimentions.svg",delete:"delete.svg","drag-dots":"drag-dots.svg",edit:J1,error:X1,export:"export.svg","filter-2":"filter-2.svg",filter:Q1,help:ev,import:"import.svg",info:tv,"link-arrow":"link-arrow.svg",link:nv,loading:rv,lock:iv,maximize:ov,minimize:av,minus:sv,"more-horizontal":"more-horizontal.svg",open:lv,pause:cv,play:dv,required:uv,restart:fv,"settings-2":"settings-2.svg",sort:pv,sorter:hv,stop:mv,success:gv,warning:yv,"x-axis":"x-axis.svg","y-axis":"y-axis.svg",zip:_v},bv="add.svg",kv="annotate.svg",vv="annotation.svg",xv="area.svg",Cv="axes.svg",Ev="bar.svg",Sv="bindot.svg",Tv="boxplot.svg",Vv="bubble.svg",Bv="canvas.svg",Nv="checkbox.svg",Ov="checkmark.svg",Av="clipboard.svg",Rv="close.svg",Dv="code.svg",Iv="color.svg",Mv="columns.svg",Pv="copy.svg",Lv="cpu.svg",Fv="dna.svg",$v="duplicate.svg",zv="edit.svg",Zv="error.svg",Uv="filter.svg",jv="generate.svg",Wv="graph.svg",Hv="heatmap.svg",qv="help.svg",Gv="hide.svg",Kv="jitter.svg",Yv="layers.svg",Jv="learn.svg",Xv="legend.svg",Qv="line.svg",ex="linetype.svg",tx="link.svg",nx="loading.svg",rx="local.svg",ix="logout.svg",ox="menu.svg",ax="minus.svg",sx="pin.svg",lx="position.svg",cx="progress.svg",dx="publications.svg",ux="restart.svg",fx="reverse.svg",px="rotation.svg",hx="save.svg",mx="search.svg",gx="show.svg",yx="sina.svg",_x="skatterplot.svg",wx="sort.svg",bx="statistics.svg",kx="stroke.svg",vx="success.svg",xx="table.svg",Cx="template.svg",Ex="venn.svg",Sx="violin.svg",Tx="warning.svg",Vx="wetlab.svg",Bx={"add-layer":"add-layer.svg",add:bv,annotate:kv,annotation:vv,area:xv,"arrow-down":"arrow-down.svg","arrow-left":"arrow-left.svg","arrow-right":"arrow-right.svg","arrow-up":"arrow-up.svg",axes:Cv,"bar-error":"bar-error.svg","bar-trend":"bar-trend.svg",bar:Ev,bindot:Sv,"box-dot":"box-dot.svg","boxplot-1":"boxplot-1.svg","boxplot-binned":"boxplot-binned.svg","boxplot-jitter":"boxplot-jitter.svg","boxplot-notched":"boxplot-notched.svg",boxplot:Tv,bubble:Vv,canvas:Bv,checkbox:Nv,checkmark:Ov,"chevron-down":"chevron-down.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:Av,close:Rv,"cloud-down":"cloud-down.svg","cloud-offline":"cloud-offline.svg","cloud-online":"cloud-online.svg","cloud-up":"cloud-up.svg","code-2":"code-2.svg",code:Dv,color:Iv,columns:Mv,"connected-points":"connected-points.svg",copy:Pv,cpu:Lv,"cross-bars":"cross-bars.svg","dark-mode":"dark-mode.svg","delete-bin":"delete-bin.svg",delete:"delete.svg","dendrogram-X-1":"dendrogram-X-1.svg","dendrogram-X":"dendrogram-X.svg","dendrogram-Y-1":"dendrogram-Y-1.svg","dendrogram-Y":"dendrogram-Y.svg",dna:Fv,"download-files":"download-files.svg",duplicate:$v,edit:zv,"error-bar":"error-bar.svg",error:Zv,"expand-left":"expand-left.svg","expand-right":"expand-right.svg","export-2":"export-2.svg",export:"export.svg","external-link":"external-link.svg","fill-color":"fill-color.svg","filter-on":"filter-on.svg",filter:Uv,"filters-gate":"filters-gate.svg","fire-tips":"fire-tips.svg","folder-parent":"folder-parent.svg","frame-type":"frame-type.svg",generate:jv,graph:Wv,heatmap:Hv,help:qv,hide:Gv,"import-2":"import-2.svg","import-download":"import-download.svg","info-circle-outline":"info-circle-outline.svg",jitter:Kv,layers:Yv,learn:Jv,legend:Xv,"light-mode":"light-mode.svg","line-binned":"line-binned.svg","line-error":"line-error.svg","line-jitter":"line-jitter.svg",line:Qv,linetype:ex,"link-disabled":"link-disabled.svg",link:tx,loading:nx,local:rx,logout:ix,menu:ox,minus:ax,"more-horizontal":"more-horizontal.svg","outlier-shape":"outlier-shape.svg","paper-clip":"paper-clip.svg",pin:sx,position:lx,"progress-2":"progress-2.svg",progress:cx,publications:dx,"radio-btn":"radio-btn.svg",restart:ux,reverse:fx,rotation:px,save:hx,search:mx,"server-2":"server-2.svg","settings-2":"settings-2.svg",show:gx,sina:yx,skatterplot:_x,"social-media":"social-media.svg",sort:wx,"stacked-bar":"stacked-bar.svg",statistics:bx,"strip-plot":"strip-plot.svg","stroke-non":"stroke-non.svg",stroke:kx,success:vx,"table-upload":"table-upload.svg",table:xx,template:Cx,"title-position":"title-position.svg","upload-files":"upload-files.svg",venn:Ex,"violin-binned":"violin-binned.svg","violin-jitter":"violin-jitter.svg",violin:Sx,warning:Tx,wetlab:Vx,"zoom-in":"zoom-in.svg"};function Nx(){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 Ox=["add","arrow-down","arrow-left","arrow-right","arrow-up","cell-type-num","cell-type-txt","checkmark","chevron-down","chevron-first","chevron-last","chevron-left","chevron-right","chevron-up","clear","clipboard-copied","clipboard","close","comp","compare","copy","data-dimentions","delete","drag-dots","edit","error","export","filter-2","filter","help","import","info","link-arrow","link","loading","lock","maximize","minimize","minus","more-horizontal","open","pause","play","required","restart","settings-2","sort","sorter","stop","success","warning","x-axis","y-axis","zip"],Ax=["add-layer","add","annotate","annotation","area","arrow-down","arrow-left","arrow-right","arrow-up","axes","bar-error","bar-trend","bar","bindot","box-dot","boxplot-1","boxplot-binned","boxplot-jitter","boxplot-notched","boxplot","bubble","canvas","checkbox","checkmark","chevron-down","chevron-left","chevron-right","chevron-sort","chevron-up","clipboard-copied","clipboard","close","cloud-down","cloud-offline","cloud-online","cloud-up","code-2","code","color","columns","connected-points","copy","cpu","cross-bars","dark-mode","delete-bin","delete","dendrogram-X-1","dendrogram-X","dendrogram-Y-1","dendrogram-Y","dna","download-files","duplicate","edit","error-bar","error","expand-left","expand-right","export-2","export","external-link","fill-color","filter-on","filter","filters-gate","fire-tips","folder-parent","frame-type","generate","graph","heatmap","help","hide","import-2","import-download","info-circle-outline","jitter","layers","learn","legend","light-mode","line-binned","line-error","line-jitter","line","linetype","link-disabled","link","loading","local","logout","menu","minus","more-horizontal","outlier-shape","paper-clip","pin","position","progress-2","progress","publications","radio-btn","restart","reverse","rotation","save","search","server-2","settings-2","show","sina","skatterplot","social-media","sort","stacked-bar","statistics","strip-plot","stroke-non","stroke","success","table-upload","table","template","title-position","upload-files","venn","violin-binned","violin-jitter","violin","warning","wetlab","zoom-in"],Rx={allCssVariables:Nx(),icons16:wv,icons24:Bx},Dx={class:"block__not-found"},Ix=n.defineComponent({__name:"NotFound",setup(i){const t=Ss().useApp(),a=()=>{t.updateNavigationState(s=>{s.href="/"})};return(s,c)=>(n.openBlock(),n.createElementBlock("div",Dx,[n.createElementVNode("h1",null,"Not found route: "+n.toDisplayString(n.unref(t).snapshot.navigationState.href),1),n.createVNode(n.unref(Hs),{onClick:n.withModifiers(a,["stop"])},{default:n.withCtx(()=>c[0]||(c[0]=[n.createTextVNode("Return to main page")])),_:1})]))}}),ll=(i,e)=>{const t=i.__vccOpts||i;for(const[a,s]of e)t[a]=s;return t},Mx={},Px={class:"block__loader-page"};function Lx(i,e){return n.openBlock(),n.createElementBlock("div",Px,e[0]||(e[0]=[n.createElementVNode("div",{class:"loader-container"},[n.createElementVNode("i",{class:"mask-24 mask-loading loader-icon"})],-1)]))}const Fx=ll(Mx,[["render",Lx]]),$x={class:"block block__layout"},zx={key:0},Zx=n.defineComponent({__name:"BlockLayout",setup(i){const e=Ss(),t=c=>{try{return new URL(c,"http://dummy").pathname}catch{console.error("Invalid href",c);return}},a=n.computed(()=>e.loaded?e.useApp().href:void 0),s=n.computed(()=>{if(e.loaded){const c=e.useApp(),d=t(c.snapshot.navigationState.href);return d?c.getRoute(d):void 0}});return(c,d)=>(n.openBlock(),n.createElementBlock("div",$x,[n.unref(e).error?(n.openBlock(),n.createElementBlock("div",zx,n.toDisplayString(n.unref(e).error),1)):n.unref(e).loaded?s.value?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(s.value),{key:a.value})):(n.openBlock(),n.createBlock(Ix,{key:3})):(n.openBlock(),n.createBlock(Fx,{key:1},{default:n.withCtx(()=>d[0]||(d[0]=[n.createTextVNode("Loading...")])),_:1}))]))}});var ua={exports:{}};/**
22
22
  * @license
23
23
  * Lodash <https://lodash.com/>
24
24
  * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>