Wplace-BlueMarble/dist/index.js
AloeSapling ad4aea7de9 Build
2025-08-20 22:57:47 +02:00

1 line
No EOL
54 KiB
JavaScript

(function (){ return ({ patches: [], load: () => {(()=>{var e=Object.defineProperty,t=(t,s,n)=>((t,s,n)=>s in t?e(t,s,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[s]=n)(t,"symbol"!=typeof s?s+"":s,n);function s(e,t){const s=document.createElement(e);return t&&Object.entries(t).forEach(([e,t])=>{"className"===e?s.setAttribute("class",t):s.setAttribute(e,t)}),s}new Blob;var n,i,r,a={};((t,s)=>{for(var n in s)e(t,n,{get:s[n],enumerable:!0})})(a,{t:()=>Ue,i:()=>N,o:()=>y,u:()=>k,NEVER:()=>Dt,OK:()=>A,h:()=>x,l:()=>M,ZodAny:()=>he,ZodArray:()=>fe,ZodBigInt:()=>re,ZodBoolean:()=>ae,ZodBranded:()=>Le,ZodCatch:()=>je,ZodDate:()=>oe,ZodDefault:()=>Pe,ZodDiscriminatedUnion:()=>be,ZodEffects:()=>De,ZodEnum:()=>Te,m:()=>h,p:()=>qe,ZodFunction:()=>$e,ZodIntersection:()=>ke,v:()=>c,ZodLazy:()=>Ie,ZodLiteral:()=>Ee,ZodMap:()=>_e,ZodNaN:()=>Ce,ZodNativeEnum:()=>Se,ZodNever:()=>me,ZodNull:()=>de,ZodNullable:()=>Oe,ZodNumber:()=>ie,ZodObject:()=>ye,ZodOptional:()=>Be,k:()=>o,ZodPipeline:()=>ze,ZodPromise:()=>Me,ZodReadonly:()=>Ve,ZodRecord:()=>Ae,N:()=>M,ZodSet:()=>Ze,ZodString:()=>se,ZodSymbol:()=>ue,A:()=>De,ZodTuple:()=>Ne,_:()=>M,ZodUndefined:()=>ce,ZodUnion:()=>ge,ZodUnknown:()=>le,ZodVoid:()=>pe,Z:()=>g,any:()=>rt,$:()=>ct,I:()=>Xe,F:()=>et,T:()=>Mt,S:()=>We,M:()=>tt,D:()=>Q,B:()=>l,O:()=>mt,effect:()=>_t,P:()=>kt,j:()=>wt,C:()=>f,U:()=>u,L:()=>Je,intersection:()=>pt,V:()=>_,R:()=>I,W:()=>Z,q:()=>$,K:()=>He,H:()=>bt,J:()=>xt,Y:()=>v,map:()=>yt,G:()=>Qe,X:()=>Nt,ee:()=>ot,null:()=>it,te:()=>$t,number:()=>Ge,object:()=>dt,se:()=>r,ne:()=>St,ie:()=>Tt,re:()=>Zt,ae:()=>Ft,oe:()=>Et,ue:()=>It,promise:()=>At,ce:()=>d,de:()=>vt,set:()=>gt,he:()=>p,le:()=>ht,string:()=>Ye,me:()=>st,pe:()=>_t,fe:()=>ft,undefined:()=>nt,union:()=>lt,ve:()=>at,ye:()=>n,ge:()=>ut}),(i=n||(n={})).we=e=>{},i.be=function(e){},i.xe=function(e){throw new Error},i.ke=e=>{const t={};for(const s of e)t[s]=s;return t},i.Ne=e=>{const t=i.Ae(e).filter(t=>"number"!=typeof e[e[t]]),s={};for(const n of t)s[n]=e[n];return i._e(s)},i._e=e=>i.Ae(e).map(function(t){return e[t]}),i.Ae="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.push(s);return t},i.find=(e,t)=>{for(const s of e)if(t(s))return s},i.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,i.Ze=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},i.$e=(e,t)=>"bigint"==typeof t?t.toString():t,(r||(r={})).Ie=(e,t)=>({...e,...t});var o=n.ke(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),u=e=>{switch(typeof e){case"undefined":return o.undefined;case"string":return o.string;case"number":return Number.isNaN(e)?o.G:o.number;case"boolean":return o.F;case"function":return o.j;case"bigint":return o.I;case"symbol":return o.me;case"object":return Array.isArray(e)?o.$:null===e?o.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?o.promise:"undefined"!=typeof Map&&e instanceof Map?o.map:"undefined"!=typeof Set&&e instanceof Set?o.set:"undefined"!=typeof Date&&e instanceof Date?o.M:o.object;default:return o.ve}},c=n.ke(["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"]),d=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:"),h=class e extends Error{get Ee(){return this.Fe}constructor(e){super(),this.Fe=[],this.Te=e=>{this.Fe=[...this.Fe,e]},this.Se=(e=[])=>{this.Fe=[...this.Fe,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.Fe=e}format(e){const t=e||function(e){return e.message},s={Me:[]},n=e=>{for(const i of e.Fe)if("invalid_union"===i.code)i.De.map(n);else if("invalid_return_type"===i.code)n(i.Be);else if("invalid_arguments"===i.code)n(i.Oe);else if(0===i.path.length)s.Me.push(t(i));else{let e=s,n=0;for(;n<i.path.length;){const s=i.path[n];n===i.path.length-1?(e[s]=e[s]||{Me:[]},e[s].Me.push(t(i))):e[s]=e[s]||{Me:[]},e=e[s],n++}}};return n(this),s}static assert(t){if(!(t instanceof e))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.Fe,n.$e,2)}get Pe(){return 0===this.Fe.length}je(e=e=>e.message){const t={},s=[];for(const n of this.Fe)if(n.path.length>0){const s=n.path[0];t[s]=t[s]||[],t[s].push(e(n))}else s.push(e(n));return{Ce:s,Ue:t}}get Ce(){return this.je()}};h.create=e=>new h(e);var l=(e,t)=>{let s;switch(e.code){case c.Le:s=e.ze===o.undefined?"Required":`Expected ${e.Ve}, received ${e.ze}`;break;case c.Re:s=`Invalid literal value, expected ${JSON.stringify(e.Ve,n.$e)}`;break;case c.We:s=`Unrecognized key(s) in object: ${n.Ze(e.keys,", ")}`;break;case c.qe:s="Invalid input";break;case c.Ke:s=`Invalid discriminator value. Expected ${n.Ze(e.options)}`;break;case c.He:s=`Invalid enum value. Expected ${n.Ze(e.options)}, received '${e.ze}'`;break;case c.Je:s="Invalid function arguments";break;case c.Ye:s="Invalid function return type";break;case c.Ge:s="Invalid date";break;case c.Qe:"object"==typeof e.Xe?"includes"in e.Xe?(s=`Invalid input: must include "${e.Xe.includes}"`,"number"==typeof e.Xe.position&&(s=`${s} at one or more positions greater than or equal to ${e.Xe.position}`)):"startsWith"in e.Xe?s=`Invalid input: must start with "${e.Xe.startsWith}"`:"endsWith"in e.Xe?s=`Invalid input: must end with "${e.Xe.endsWith}"`:n.xe(e.Xe):s="regex"!==e.Xe?`Invalid ${e.Xe}`:"Invalid";break;case c.et:s="array"===e.type?`Array must contain ${e.tt?"exactly":e.st?"at least":"more than"} ${e.nt} element(s)`:"string"===e.type?`String must contain ${e.tt?"exactly":e.st?"at least":"over"} ${e.nt} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.tt?"exactly equal to ":e.st?"greater than or equal to ":"greater than "}${e.nt}`:"date"===e.type?`Date must be ${e.tt?"exactly equal to ":e.st?"greater than or equal to ":"greater than "}${new Date(Number(e.nt))}`:"Invalid input";break;case c.it:s="array"===e.type?`Array must contain ${e.tt?"exactly":e.st?"at most":"less than"} ${e.rt} element(s)`:"string"===e.type?`String must contain ${e.tt?"exactly":e.st?"at most":"under"} ${e.rt} character(s)`:"number"===e.type?`Number must be ${e.tt?"exactly":e.st?"less than or equal to":"less than"} ${e.rt}`:"bigint"===e.type?`BigInt must be ${e.tt?"exactly":e.st?"less than or equal to":"less than"} ${e.rt}`:"date"===e.type?`Date must be ${e.tt?"exactly":e.st?"smaller than or equal to":"smaller than"} ${new Date(Number(e.rt))}`:"Invalid input";break;case c.S:s="Invalid input";break;case c.ot:s="Intersection results could not be merged";break;case c.ut:s=`Number must be a multiple of ${e.ct}`;break;case c.dt:s="Number must be finite";break;default:s=t.ht,n.xe(e)}return{message:s}},m=l;function p(e){m=e}function f(){return m}var v=e=>{const{data:t,path:s,lt:n,ft:i}=e,r=[...s,...i.path||[]],a={...i,path:r};if(void 0!==i.message)return{...i,path:r,message:i.message};let o="";const u=n.filter(e=>!!e).slice().reverse();for(const e of u)o=e(a,{data:t,ht:o}).message;return{...i,path:r,message:o}},y=[];function g(e,t){const s=f(),n=v({ft:t,data:e.data,path:e.path,lt:[e.yt.vt,e.gt,s,s===l?void 0:l].filter(e=>!!e)});e.yt.Fe.push(n)}var w,b,x=class e{constructor(){this.value="valid"}wt(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static bt(e,t){const s=[];for(const n of t){if("aborted"===n.status)return k;"dirty"===n.status&&e.wt(),s.push(n.value)}return{status:e.value,value:s}}static async xt(t,s){const n=[];for(const e of s){const t=await e.key,s=await e.value;n.push({key:t,value:s})}return e.kt(t,n)}static kt(e,t){const s={};for(const n of t){const{key:t,value:i}=n;if("aborted"===t.status)return k;if("aborted"===i.status)return k;"dirty"===t.status&&e.wt(),"dirty"===i.status&&e.wt(),"__proto__"===t.value||void 0===i.value&&!n.Nt||(s[t.value]=i.value)}return{status:e.value,value:s}}},k=Object.freeze({status:"aborted"}),N=e=>({status:"dirty",value:e}),A=e=>({status:"valid",value:e}),_=e=>"aborted"===e.status,Z=e=>"dirty"===e.status,$=e=>"valid"===e.status,I=e=>"undefined"!=typeof Promise&&e instanceof Promise;(b=w||(w={})).At=e=>"string"==typeof e?{message:e}:e||{},b.toString=e=>"string"==typeof e?e:e?.message;var E=class{constructor(e,t,s,n){this._t=[],this.parent=e,this.data=t,this.Zt=s,this.$t=n}get path(){return this._t.length||(Array.isArray(this.$t)?this._t.push(...this.Zt,...this.$t):this._t.push(...this.Zt,this.$t)),this._t}},F=(e,t)=>{if($(t))return{It:!0,data:t.value};if(!e.yt.Fe.length)throw new Error("Validation failed but no issues detected.");return{It:!1,get error(){if(this.Et)return this.Et;const t=new h(e.yt.Fe);return this.Et=t,this.Et}}};function T(e){if(!e)return{};const{Ft:t,Tt:s,St:n,description:i}=e;if(t&&(s||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{Ft:t,description:i}:{Ft:(t,i)=>{const{message:r}=e;return"invalid_enum_value"===t.code?{message:r??i.ht}:void 0===i.data?{message:r??n??i.ht}:"invalid_type"!==t.code?{message:i.ht}:{message:r??s??i.ht}},description:i}}var S,M=class{get description(){return this.Mt.description}Dt(e){return u(e.data)}Bt(e,t){return t||{yt:e.parent.yt,data:e.data,Ot:u(e.data),gt:this.Mt.Ft,path:e.path,parent:e.parent}}Pt(e){return{status:new x,jt:{yt:e.parent.yt,data:e.data,Ot:u(e.data),gt:this.Mt.Ft,path:e.path,parent:e.parent}}}Ct(e){const t=this.Ut(e);if(I(t))throw new Error("Synchronous parse encountered promise.");return t}Lt(e){const t=this.Ut(e);return Promise.resolve(t)}parse(e,t){const s=this.zt(e,t);if(s.It)return s.data;throw s.error}zt(e,t){const s={yt:{Fe:[],async:t?.async??!1,vt:t?.Ft},path:t?.path||[],gt:this.Mt.Ft,parent:null,data:e,Ot:u(e)},n=this.Ct({data:e,path:s.path,parent:s});return F(s,n)}"~validate"(e){const t={yt:{Fe:[],async:!!this["~standard"].async},path:[],gt:this.Mt.Ft,parent:null,data:e,Ot:u(e)};if(!this["~standard"].async)try{const s=this.Ct({data:e,path:[],parent:t});return $(s)?{value:s.value}:{Fe:t.yt.Fe}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.yt={Fe:[],async:!0}}return this.Lt({data:e,path:[],parent:t}).then(e=>$(e)?{value:e.value}:{Fe:t.yt.Fe})}async Vt(e,t){const s=await this.Rt(e,t);if(s.It)return s.data;throw s.error}async Rt(e,t){const s={yt:{Fe:[],vt:t?.Ft,async:!0},path:t?.path||[],gt:this.Mt.Ft,parent:null,data:e,Ot:u(e)},n=this.Ut({data:e,path:s.path,parent:s}),i=await(I(n)?n:Promise.resolve(n));return F(s,i)}Wt(e,t){const s=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this.qt((t,n)=>{const i=e(t),r=()=>n.Te({code:c.S,...s(t)});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(e=>!!e||(r(),!1)):!!i||(r(),!1)})}Kt(e,t){return this.qt((s,n)=>!!e(s)||(n.Te("function"==typeof t?t(s,n):t),!1))}qt(e){return new De({Ht:this,Jt:qe.ZodEffects,effect:{type:"refinement",Kt:e}})}Yt(e){return this.qt(e)}constructor(e){this.Gt=this.Rt,this.Mt=e,this.parse=this.parse.bind(this),this.zt=this.zt.bind(this),this.Vt=this.Vt.bind(this),this.Rt=this.Rt.bind(this),this.Gt=this.Gt.bind(this),this.Wt=this.Wt.bind(this),this.Kt=this.Kt.bind(this),this.Yt=this.Yt.bind(this),this.re=this.re.bind(this),this.te=this.te.bind(this),this.Qt=this.Qt.bind(this),this.$=this.$.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.Xt=this.Xt.bind(this),this.es=this.es.bind(this),this.ts=this.ts.bind(this),this.ss=this.ss.bind(this),this.ns=this.ns.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}re(){return Be.create(this,this.Mt)}te(){return Oe.create(this,this.Mt)}Qt(){return this.te().re()}$(){return fe.create(this)}promise(){return Me.create(this,this.Mt)}or(e){return ge.create([this,e],this.Mt)}and(e){return ke.create(this,e,this.Mt)}transform(e){return new De({...T(this.Mt),Ht:this,Jt:qe.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Pe({...T(this.Mt),rs:this,defaultValue:t,Jt:qe.ZodDefault})}brand(){return new Le({Jt:qe.ZodBranded,type:this,...T(this.Mt)})}catch(e){const t="function"==typeof e?e:()=>e;return new je({...T(this.Mt),rs:this,us:t,Jt:qe.ZodCatch})}Xt(e){return new(0,this.constructor)({...this.Mt,description:e})}es(e){return ze.create(this,e)}ts(){return Ve.create(this)}ns(){return this.zt(void 0).It}ss(){return this.zt(null).It}},D=/^c[^\s-]{8,}$/i,B=/^[0-9a-z]+$/,O=/^[0-9A-HJKMNP-TV-Z]{26}$/i,P=/^[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,j=/^[a-z0-9_-]{21}$/i,C=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,U=/^[-+]?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)?)??$/,L=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,z=/^(?:(?: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])$/,V=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,R=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,W=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,q=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,K=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,H="((\\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])))",J=new RegExp(`^${H}$`);function Y(e){let t="[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`),`([01]\\d|2[0-3]):[0-5]\\d(:${t})${e.precision?"+":"?"}`}function G(e){return new RegExp(`^${Y(e)}$`)}function Q(e){let t=`${H}T${Y(e)}`;const s=[];return s.push(e.cs?"Z?":"Z"),e.offset&&s.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${s.join("|")})`,new RegExp(`^${t}$`)}function X(e,t){return!("v4"!==t&&t||!z.test(e))||!("v6"!==t&&t||!R.test(e))}function ee(e,t){if(!C.test(e))return!1;try{const[s]=e.split(".");if(!s)return!1;const n=s.replace(/-/g,"+").replace(/_/g,"/").padEnd(s.length+(4-s.length%4)%4,"="),i=JSON.parse(atob(n));return!("object"!=typeof i||null===i||"ds"in i&&"JWT"!==i?.ds||!i.hs||t&&i.hs!==t)}catch{return!1}}function te(e,t){return!("v4"!==t&&t||!V.test(e))||!("v6"!==t&&t||!W.test(e))}var se=class e extends M{Ut(e){if(this.Mt.T&&(e.data=String(e.data)),this.Dt(e)!==o.string){const t=this.Bt(e);return g(t,{code:c.Le,Ve:o.string,ze:t.Ot}),k}const t=new x;let s;for(const i of this.Mt.ls)if("min"===i.kind)e.data.length<i.value&&(s=this.Bt(e,s),g(s,{code:c.et,nt:i.value,type:"string",st:!0,tt:!1,message:i.message}),t.wt());else if("max"===i.kind)e.data.length>i.value&&(s=this.Bt(e,s),g(s,{code:c.it,rt:i.value,type:"string",st:!0,tt:!1,message:i.message}),t.wt());else if("length"===i.kind){const n=e.data.length>i.value,r=e.data.length<i.value;(n||r)&&(s=this.Bt(e,s),n?g(s,{code:c.it,rt:i.value,type:"string",st:!0,tt:!0,message:i.message}):r&&g(s,{code:c.et,nt:i.value,type:"string",st:!0,tt:!0,message:i.message}),t.wt())}else if("email"===i.kind)L.test(e.data)||(s=this.Bt(e,s),g(s,{Xe:"email",code:c.Qe,message:i.message}),t.wt());else if("emoji"===i.kind)S||(S=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),S.test(e.data)||(s=this.Bt(e,s),g(s,{Xe:"emoji",code:c.Qe,message:i.message}),t.wt());else if("uuid"===i.kind)P.test(e.data)||(s=this.Bt(e,s),g(s,{Xe:"uuid",code:c.Qe,message:i.message}),t.wt());else if("nanoid"===i.kind)j.test(e.data)||(s=this.Bt(e,s),g(s,{Xe:"nanoid",code:c.Qe,message:i.message}),t.wt());else if("cuid"===i.kind)D.test(e.data)||(s=this.Bt(e,s),g(s,{Xe:"cuid",code:c.Qe,message:i.message}),t.wt());else if("cuid2"===i.kind)B.test(e.data)||(s=this.Bt(e,s),g(s,{Xe:"cuid2",code:c.Qe,message:i.message}),t.wt());else if("ulid"===i.kind)O.test(e.data)||(s=this.Bt(e,s),g(s,{Xe:"ulid",code:c.Qe,message:i.message}),t.wt());else if("url"===i.kind)try{new URL(e.data)}catch{s=this.Bt(e,s),g(s,{Xe:"url",code:c.Qe,message:i.message}),t.wt()}else"regex"===i.kind?(i.ps.lastIndex=0,i.ps.test(e.data)||(s=this.Bt(e,s),g(s,{Xe:"regex",code:c.Qe,message:i.message}),t.wt())):"trim"===i.kind?e.data=e.data.trim():"includes"===i.kind?e.data.includes(i.value,i.position)||(s=this.Bt(e,s),g(s,{code:c.Qe,Xe:{includes:i.value,position:i.position},message:i.message}),t.wt()):"toLowerCase"===i.kind?e.data=e.data.toLowerCase():"toUpperCase"===i.kind?e.data=e.data.toUpperCase():"startsWith"===i.kind?e.data.startsWith(i.value)||(s=this.Bt(e,s),g(s,{code:c.Qe,Xe:{startsWith:i.value},message:i.message}),t.wt()):"endsWith"===i.kind?e.data.endsWith(i.value)||(s=this.Bt(e,s),g(s,{code:c.Qe,Xe:{endsWith:i.value},message:i.message}),t.wt()):"datetime"===i.kind?Q(i).test(e.data)||(s=this.Bt(e,s),g(s,{code:c.Qe,Xe:"datetime",message:i.message}),t.wt()):"date"===i.kind?J.test(e.data)||(s=this.Bt(e,s),g(s,{code:c.Qe,Xe:"date",message:i.message}),t.wt()):"time"===i.kind?G(i).test(e.data)||(s=this.Bt(e,s),g(s,{code:c.Qe,Xe:"time",message:i.message}),t.wt()):"duration"===i.kind?U.test(e.data)||(s=this.Bt(e,s),g(s,{Xe:"duration",code:c.Qe,message:i.message}),t.wt()):"ip"===i.kind?X(e.data,i.version)||(s=this.Bt(e,s),g(s,{Xe:"ip",code:c.Qe,message:i.message}),t.wt()):"jwt"===i.kind?ee(e.data,i.hs)||(s=this.Bt(e,s),g(s,{Xe:"jwt",code:c.Qe,message:i.message}),t.wt()):"cidr"===i.kind?te(e.data,i.version)||(s=this.Bt(e,s),g(s,{Xe:"cidr",code:c.Qe,message:i.message}),t.wt()):"base64"===i.kind?q.test(e.data)||(s=this.Bt(e,s),g(s,{Xe:"base64",code:c.Qe,message:i.message}),t.wt()):"base64url"===i.kind?K.test(e.data)||(s=this.Bt(e,s),g(s,{Xe:"base64url",code:c.Qe,message:i.message}),t.wt()):n.xe(i);return{status:t.value,value:e.data}}fs(e,t,s){return this.Kt(t=>e.test(t),{Xe:t,code:c.Qe,...w.At(s)})}vs(t){return new e({...this.Mt,ls:[...this.Mt.ls,t]})}email(e){return this.vs({kind:"email",...w.At(e)})}url(e){return this.vs({kind:"url",...w.At(e)})}ys(e){return this.vs({kind:"emoji",...w.At(e)})}uuid(e){return this.vs({kind:"uuid",...w.At(e)})}gs(e){return this.vs({kind:"nanoid",...w.At(e)})}ws(e){return this.vs({kind:"cuid",...w.At(e)})}bs(e){return this.vs({kind:"cuid2",...w.At(e)})}xs(e){return this.vs({kind:"ulid",...w.At(e)})}ks(e){return this.vs({kind:"base64",...w.At(e)})}Ns(e){return this.vs({kind:"base64url",...w.At(e)})}As(e){return this.vs({kind:"jwt",...w.At(e)})}_s(e){return this.vs({kind:"ip",...w.At(e)})}Zs(e){return this.vs({kind:"cidr",...w.At(e)})}$s(e){return"string"==typeof e?this.vs({kind:"datetime",precision:null,offset:!1,cs:!1,message:e}):this.vs({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,cs:e?.cs??!1,...w.At(e?.message)})}M(e){return this.vs({kind:"date",message:e})}time(e){return"string"==typeof e?this.vs({kind:"time",precision:null,message:e}):this.vs({kind:"time",precision:void 0===e?.precision?null:e?.precision,...w.At(e?.message)})}duration(e){return this.vs({kind:"duration",...w.At(e)})}ps(e,t){return this.vs({kind:"regex",ps:e,...w.At(t)})}includes(e,t){return this.vs({kind:"includes",value:e,position:t?.position,...w.At(t?.message)})}startsWith(e,t){return this.vs({kind:"startsWith",value:e,...w.At(t)})}endsWith(e,t){return this.vs({kind:"endsWith",value:e,...w.At(t)})}min(e,t){return this.vs({kind:"min",value:e,...w.At(t)})}max(e,t){return this.vs({kind:"max",value:e,...w.At(t)})}length(e,t){return this.vs({kind:"length",value:e,...w.At(t)})}Is(e){return this.min(1,w.At(e))}trim(){return new e({...this.Mt,ls:[...this.Mt.ls,{kind:"trim"}]})}toLowerCase(){return new e({...this.Mt,ls:[...this.Mt.ls,{kind:"toLowerCase"}]})}toUpperCase(){return new e({...this.Mt,ls:[...this.Mt.ls,{kind:"toUpperCase"}]})}get Es(){return!!this.Mt.ls.find(e=>"datetime"===e.kind)}get Fs(){return!!this.Mt.ls.find(e=>"date"===e.kind)}get Ts(){return!!this.Mt.ls.find(e=>"time"===e.kind)}get Ss(){return!!this.Mt.ls.find(e=>"duration"===e.kind)}get Ms(){return!!this.Mt.ls.find(e=>"email"===e.kind)}get Ds(){return!!this.Mt.ls.find(e=>"url"===e.kind)}get Bs(){return!!this.Mt.ls.find(e=>"emoji"===e.kind)}get Os(){return!!this.Mt.ls.find(e=>"uuid"===e.kind)}get Ps(){return!!this.Mt.ls.find(e=>"nanoid"===e.kind)}get js(){return!!this.Mt.ls.find(e=>"cuid"===e.kind)}get Cs(){return!!this.Mt.ls.find(e=>"cuid2"===e.kind)}get Us(){return!!this.Mt.ls.find(e=>"ulid"===e.kind)}get Ls(){return!!this.Mt.ls.find(e=>"ip"===e.kind)}get zs(){return!!this.Mt.ls.find(e=>"cidr"===e.kind)}get Vs(){return!!this.Mt.ls.find(e=>"base64"===e.kind)}get Rs(){return!!this.Mt.ls.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(const t of this.Mt.ls)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this.Mt.ls)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}};function ne(e,t){const s=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=s>n?s:n;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}se.create=e=>new se({ls:[],Jt:qe.ZodString,T:e?.T??!1,...T(e)});var ie=class e extends M{constructor(){super(...arguments),this.min=this.Ws,this.max=this.qs,this.step=this.ct}Ut(e){if(this.Mt.T&&(e.data=Number(e.data)),this.Dt(e)!==o.number){const t=this.Bt(e);return g(t,{code:c.Le,Ve:o.number,ze:t.Ot}),k}let t;const s=new x;for(const i of this.Mt.ls)"int"===i.kind?n.isInteger(e.data)||(t=this.Bt(e,t),g(t,{code:c.Le,Ve:"integer",ze:"float",message:i.message}),s.wt()):"min"===i.kind?(i.st?e.data<i.value:e.data<=i.value)&&(t=this.Bt(e,t),g(t,{code:c.et,nt:i.value,type:"number",st:i.st,tt:!1,message:i.message}),s.wt()):"max"===i.kind?(i.st?e.data>i.value:e.data>=i.value)&&(t=this.Bt(e,t),g(t,{code:c.it,rt:i.value,type:"number",st:i.st,tt:!1,message:i.message}),s.wt()):"multipleOf"===i.kind?0!==ne(e.data,i.value)&&(t=this.Bt(e,t),g(t,{code:c.ut,ct:i.value,message:i.message}),s.wt()):"finite"===i.kind?Number.isFinite(e.data)||(t=this.Bt(e,t),g(t,{code:c.dt,message:i.message}),s.wt()):n.xe(i);return{status:s.value,value:e.data}}Ws(e,t){return this.Ks("min",e,!0,w.toString(t))}Hs(e,t){return this.Ks("min",e,!1,w.toString(t))}qs(e,t){return this.Ks("max",e,!0,w.toString(t))}Js(e,t){return this.Ks("max",e,!1,w.toString(t))}Ks(t,s,n,i){return new e({...this.Mt,ls:[...this.Mt.ls,{kind:t,value:s,st:n,message:w.toString(i)}]})}vs(t){return new e({...this.Mt,ls:[...this.Mt.ls,t]})}Ys(e){return this.vs({kind:"int",message:w.toString(e)})}Gs(e){return this.vs({kind:"min",value:0,st:!1,message:w.toString(e)})}negative(e){return this.vs({kind:"max",value:0,st:!1,message:w.toString(e)})}Qs(e){return this.vs({kind:"max",value:0,st:!0,message:w.toString(e)})}Xs(e){return this.vs({kind:"min",value:0,st:!0,message:w.toString(e)})}ct(e,t){return this.vs({kind:"multipleOf",value:e,message:w.toString(t)})}en(e){return this.vs({kind:"finite",message:w.toString(e)})}tn(e){return this.vs({kind:"min",st:!0,value:Number.MIN_SAFE_INTEGER,message:w.toString(e)}).vs({kind:"max",st:!0,value:Number.MAX_SAFE_INTEGER,message:w.toString(e)})}get minValue(){let e=null;for(const t of this.Mt.ls)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this.Mt.ls)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get sn(){return!!this.Mt.ls.find(e=>"int"===e.kind||"multipleOf"===e.kind&&n.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const s of this.Mt.ls){if("finite"===s.kind||"int"===s.kind||"multipleOf"===s.kind)return!0;"min"===s.kind?(null===t||s.value>t)&&(t=s.value):"max"===s.kind&&(null===e||s.value<e)&&(e=s.value)}return Number.isFinite(t)&&Number.isFinite(e)}};ie.create=e=>new ie({ls:[],Jt:qe.ZodNumber,T:e?.T||!1,...T(e)});var re=class e extends M{constructor(){super(...arguments),this.min=this.Ws,this.max=this.qs}Ut(e){if(this.Mt.T)try{e.data=BigInt(e.data)}catch{return this.nn(e)}if(this.Dt(e)!==o.I)return this.nn(e);let t;const s=new x;for(const i of this.Mt.ls)"min"===i.kind?(i.st?e.data<i.value:e.data<=i.value)&&(t=this.Bt(e,t),g(t,{code:c.et,type:"bigint",nt:i.value,st:i.st,message:i.message}),s.wt()):"max"===i.kind?(i.st?e.data>i.value:e.data>=i.value)&&(t=this.Bt(e,t),g(t,{code:c.it,type:"bigint",rt:i.value,st:i.st,message:i.message}),s.wt()):"multipleOf"===i.kind?e.data%i.value!==BigInt(0)&&(t=this.Bt(e,t),g(t,{code:c.ut,ct:i.value,message:i.message}),s.wt()):n.xe(i);return{status:s.value,value:e.data}}nn(e){const t=this.Bt(e);return g(t,{code:c.Le,Ve:o.I,ze:t.Ot}),k}Ws(e,t){return this.Ks("min",e,!0,w.toString(t))}Hs(e,t){return this.Ks("min",e,!1,w.toString(t))}qs(e,t){return this.Ks("max",e,!0,w.toString(t))}Js(e,t){return this.Ks("max",e,!1,w.toString(t))}Ks(t,s,n,i){return new e({...this.Mt,ls:[...this.Mt.ls,{kind:t,value:s,st:n,message:w.toString(i)}]})}vs(t){return new e({...this.Mt,ls:[...this.Mt.ls,t]})}Gs(e){return this.vs({kind:"min",value:BigInt(0),st:!1,message:w.toString(e)})}negative(e){return this.vs({kind:"max",value:BigInt(0),st:!1,message:w.toString(e)})}Qs(e){return this.vs({kind:"max",value:BigInt(0),st:!0,message:w.toString(e)})}Xs(e){return this.vs({kind:"min",value:BigInt(0),st:!0,message:w.toString(e)})}ct(e,t){return this.vs({kind:"multipleOf",value:e,message:w.toString(t)})}get minValue(){let e=null;for(const t of this.Mt.ls)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this.Mt.ls)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}};re.create=e=>new re({ls:[],Jt:qe.ZodBigInt,T:e?.T??!1,...T(e)});var ae=class extends M{Ut(e){if(this.Mt.T&&(e.data=Boolean(e.data)),this.Dt(e)!==o.F){const t=this.Bt(e);return g(t,{code:c.Le,Ve:o.F,ze:t.Ot}),k}return A(e.data)}};ae.create=e=>new ae({Jt:qe.ZodBoolean,T:e?.T||!1,...T(e)});var oe=class e extends M{Ut(e){if(this.Mt.T&&(e.data=new Date(e.data)),this.Dt(e)!==o.M){const t=this.Bt(e);return g(t,{code:c.Le,Ve:o.M,ze:t.Ot}),k}if(Number.isNaN(e.data.getTime()))return g(this.Bt(e),{code:c.Ge}),k;const t=new x;let s;for(const i of this.Mt.ls)"min"===i.kind?e.data.getTime()<i.value&&(s=this.Bt(e,s),g(s,{code:c.et,message:i.message,st:!0,tt:!1,nt:i.value,type:"date"}),t.wt()):"max"===i.kind?e.data.getTime()>i.value&&(s=this.Bt(e,s),g(s,{code:c.it,message:i.message,st:!0,tt:!1,rt:i.value,type:"date"}),t.wt()):n.xe(i);return{status:t.value,value:new Date(e.data.getTime())}}vs(t){return new e({...this.Mt,ls:[...this.Mt.ls,t]})}min(e,t){return this.vs({kind:"min",value:e.getTime(),message:w.toString(t)})}max(e,t){return this.vs({kind:"max",value:e.getTime(),message:w.toString(t)})}get rn(){let e=null;for(const t of this.Mt.ls)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get an(){let e=null;for(const t of this.Mt.ls)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}};oe.create=e=>new oe({ls:[],T:e?.T||!1,Jt:qe.ZodDate,...T(e)});var ue=class extends M{Ut(e){if(this.Dt(e)!==o.me){const t=this.Bt(e);return g(t,{code:c.Le,Ve:o.me,ze:t.Ot}),k}return A(e.data)}};ue.create=e=>new ue({Jt:qe.ZodSymbol,...T(e)});var ce=class extends M{Ut(e){if(this.Dt(e)!==o.undefined){const t=this.Bt(e);return g(t,{code:c.Le,Ve:o.undefined,ze:t.Ot}),k}return A(e.data)}};ce.create=e=>new ce({Jt:qe.ZodUndefined,...T(e)});var de=class extends M{Ut(e){if(this.Dt(e)!==o.null){const t=this.Bt(e);return g(t,{code:c.Le,Ve:o.null,ze:t.Ot}),k}return A(e.data)}};de.create=e=>new de({Jt:qe.ZodNull,...T(e)});var he=class extends M{constructor(){super(...arguments),this.un=!0}Ut(e){return A(e.data)}};he.create=e=>new he({Jt:qe.ZodAny,...T(e)});var le=class extends M{constructor(){super(...arguments),this.cn=!0}Ut(e){return A(e.data)}};le.create=e=>new le({Jt:qe.ZodUnknown,...T(e)});var me=class extends M{Ut(e){const t=this.Bt(e);return g(t,{code:c.Le,Ve:o.ee,ze:t.Ot}),k}};me.create=e=>new me({Jt:qe.ZodNever,...T(e)});var pe=class extends M{Ut(e){if(this.Dt(e)!==o.undefined){const t=this.Bt(e);return g(t,{code:c.Le,Ve:o.ge,ze:t.Ot}),k}return A(e.data)}};pe.create=e=>new pe({Jt:qe.ZodVoid,...T(e)});var fe=class e extends M{Ut(e){const{jt:t,status:s}=this.Pt(e),n=this.Mt;if(t.Ot!==o.$)return g(t,{code:c.Le,Ve:o.$,ze:t.Ot}),k;if(null!==n.dn){const e=t.data.length>n.dn.value,i=t.data.length<n.dn.value;(e||i)&&(g(t,{code:e?c.it:c.et,nt:i?n.dn.value:void 0,rt:e?n.dn.value:void 0,type:"array",st:!0,tt:!0,message:n.dn.message}),s.wt())}if(null!==n.minLength&&t.data.length<n.minLength.value&&(g(t,{code:c.et,nt:n.minLength.value,type:"array",st:!0,tt:!1,message:n.minLength.message}),s.wt()),null!==n.maxLength&&t.data.length>n.maxLength.value&&(g(t,{code:c.it,rt:n.maxLength.value,type:"array",st:!0,tt:!1,message:n.maxLength.message}),s.wt()),t.yt.async)return Promise.all([...t.data].map((e,s)=>n.type.Lt(new E(t,e,t.path,s)))).then(e=>x.bt(s,e));const i=[...t.data].map((e,s)=>n.type.Ct(new E(t,e,t.path,s)));return x.bt(s,i)}get element(){return this.Mt.type}min(t,s){return new e({...this.Mt,minLength:{value:t,message:w.toString(s)}})}max(t,s){return new e({...this.Mt,maxLength:{value:t,message:w.toString(s)}})}length(t,s){return new e({...this.Mt,dn:{value:t,message:w.toString(s)}})}Is(e){return this.min(1,e)}};function ve(e){if(e instanceof ye){const t={};for(const s in e.shape){const n=e.shape[s];t[s]=Be.create(ve(n))}return new ye({...e.Mt,shape:()=>t})}return e instanceof fe?new fe({...e.Mt,type:ve(e.element)}):e instanceof Be?Be.create(ve(e.hn())):e instanceof Oe?Oe.create(ve(e.hn())):e instanceof Ne?Ne.create(e.items.map(e=>ve(e))):e}fe.create=(e,t)=>new fe({type:e,minLength:null,maxLength:null,dn:null,Jt:qe.ZodArray,...T(t)});var ye=class e extends M{constructor(){super(...arguments),this.ln=null,this.mn=this.pn,this.fn=this.extend}vn(){if(null!==this.ln)return this.ln;const e=this.Mt.shape(),t=n.Ae(e);return this.ln={shape:e,keys:t},this.ln}Ut(e){if(this.Dt(e)!==o.object){const t=this.Bt(e);return g(t,{code:c.Le,Ve:o.object,ze:t.Ot}),k}const{status:t,jt:s}=this.Pt(e),{shape:n,keys:i}=this.vn(),r=[];if(!(this.Mt.yn instanceof me&&"strip"===this.Mt.gn))for(const e in s.data)i.includes(e)||r.push(e);const a=[];for(const e of i){const t=n[e],i=s.data[e];a.push({key:{status:"valid",value:e},value:t.Ut(new E(s,i,s.path,e)),Nt:e in s.data})}if(this.Mt.yn instanceof me){const e=this.Mt.gn;if("passthrough"===e)for(const e of r)a.push({key:{status:"valid",value:e},value:{status:"valid",value:s.data[e]}});else if("strict"===e)r.length>0&&(g(s,{code:c.We,keys:r}),t.wt());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this.Mt.yn;for(const t of r){const n=s.data[t];a.push({key:{status:"valid",value:t},value:e.Ut(new E(s,n,s.path,t)),Nt:t in s.data})}}return s.yt.async?Promise.resolve().then(async()=>{const e=[];for(const t of a){const s=await t.key,n=await t.value;e.push({key:s,value:n,Nt:t.Nt})}return e}).then(e=>x.kt(t,e)):x.kt(t,a)}get shape(){return this.Mt.shape()}wn(t){return w.At,new e({...this.Mt,gn:"strict",...void 0!==t?{Ft:(e,s)=>{const n=this.Mt.Ft?.(e,s).message??s.ht;return"unrecognized_keys"===e.code?{message:w.At(t).message??n}:{message:n}}}:{}})}bn(){return new e({...this.Mt,gn:"strip"})}pn(){return new e({...this.Mt,gn:"passthrough"})}extend(t){return new e({...this.Mt,shape:()=>({...this.Mt.shape(),...t})})}xn(t){return new e({gn:t.Mt.gn,yn:t.Mt.yn,shape:()=>({...this.Mt.shape(),...t.Mt.shape()}),Jt:qe.ZodObject})}kn(e,t){return this.fn({[e]:t})}yn(t){return new e({...this.Mt,yn:t})}Nn(t){const s={};for(const e of n.Ae(t))t[e]&&this.shape[e]&&(s[e]=this.shape[e]);return new e({...this.Mt,shape:()=>s})}An(t){const s={};for(const e of n.Ae(this.shape))t[e]||(s[e]=this.shape[e]);return new e({...this.Mt,shape:()=>s})}_n(){return ve(this)}Zn(t){const s={};for(const e of n.Ae(this.shape)){const n=this.shape[e];t&&!t[e]?s[e]=n:s[e]=n.re()}return new e({...this.Mt,shape:()=>s})}required(t){const s={};for(const e of n.Ae(this.shape))if(t&&!t[e])s[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof Be;)t=t.Mt.rs;s[e]=t}return new e({...this.Mt,shape:()=>s})}$n(){return Fe(n.Ae(this.shape))}};ye.create=(e,t)=>new ye({shape:()=>e,gn:"strip",yn:me.create(),Jt:qe.ZodObject,...T(t)}),ye.In=(e,t)=>new ye({shape:()=>e,gn:"strict",yn:me.create(),Jt:qe.ZodObject,...T(t)}),ye.En=(e,t)=>new ye({shape:e,gn:"strip",yn:me.create(),Jt:qe.ZodObject,...T(t)});var ge=class extends M{Ut(e){const{jt:t}=this.Pt(e),s=this.Mt.options;if(t.yt.async)return Promise.all(s.map(async e=>{const s={...t,yt:{...t.yt,Fe:[]},parent:null};return{result:await e.Lt({data:t.data,path:t.path,parent:s}),jt:s}})).then(function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const s of e)if("dirty"===s.result.status)return t.yt.Fe.push(...s.jt.yt.Fe),s.result;const s=e.map(e=>new h(e.jt.yt.Fe));return g(t,{code:c.qe,De:s}),k});{let e;const n=[];for(const i of s){const s={...t,yt:{...t.yt,Fe:[]},parent:null},r=i.Ct({data:t.data,path:t.path,parent:s});if("valid"===r.status)return r;"dirty"!==r.status||e||(e={result:r,jt:s}),s.yt.Fe.length&&n.push(s.yt.Fe)}if(e)return t.yt.Fe.push(...e.jt.yt.Fe),e.result;const i=n.map(e=>new h(e));return g(t,{code:c.qe,De:i}),k}}get options(){return this.Mt.options}};ge.create=(e,t)=>new ge({options:e,Jt:qe.ZodUnion,...T(t)});var we=e=>e instanceof Ie?we(e.Ht):e instanceof De?we(e.rs()):e instanceof Ee?[e.value]:e instanceof Te?e.options:e instanceof Se?n._e(e.P):e instanceof Pe?we(e.Mt.rs):e instanceof ce?[void 0]:e instanceof de?[null]:e instanceof Be?[void 0,...we(e.hn())]:e instanceof Oe?[null,...we(e.hn())]:e instanceof Le||e instanceof Ve?we(e.hn()):e instanceof je?we(e.Mt.rs):[],be=class e extends M{Ut(e){const{jt:t}=this.Pt(e);if(t.Ot!==o.object)return g(t,{code:c.Le,Ve:o.object,ze:t.Ot}),k;const s=this.Fn,n=t.data[s],i=this.Tn.get(n);return i?t.yt.async?i.Lt({data:t.data,path:t.path,parent:t}):i.Ct({data:t.data,path:t.path,parent:t}):(g(t,{code:c.Ke,options:Array.from(this.Tn.keys()),path:[s]}),k)}get Fn(){return this.Mt.Fn}get options(){return this.Mt.options}get Tn(){return this.Mt.Tn}static create(t,s,n){const i=new Map;for(const e of s){const s=we(e.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const n of s){if(i.has(n))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(n)}`);i.set(n,e)}}return new e({Jt:qe.ZodDiscriminatedUnion,Fn:t,options:s,Tn:i,...T(n)})}};function xe(e,t){const s=u(e),i=u(t);if(e===t)return{valid:!0,data:e};if(s===o.object&&i===o.object){const s=n.Ae(t),i=n.Ae(e).filter(e=>-1!==s.indexOf(e)),r={...e,...t};for(const s of i){const n=xe(e[s],t[s]);if(!n.valid)return{valid:!1};r[s]=n.data}return{valid:!0,data:r}}if(s===o.$&&i===o.$){if(e.length!==t.length)return{valid:!1};const s=[];for(let n=0;n<e.length;n++){const i=xe(e[n],t[n]);if(!i.valid)return{valid:!1};s.push(i.data)}return{valid:!0,data:s}}return s===o.M&&i===o.M&&+e===+t?{valid:!0,data:e}:{valid:!1}}var ke=class extends M{Ut(e){const{status:t,jt:s}=this.Pt(e),n=(e,n)=>{if(_(e)||_(n))return k;const i=xe(e.value,n.value);return i.valid?((Z(e)||Z(n))&&t.wt(),{status:t.value,value:i.data}):(g(s,{code:c.ot}),k)};return s.yt.async?Promise.all([this.Mt.left.Lt({data:s.data,path:s.path,parent:s}),this.Mt.right.Lt({data:s.data,path:s.path,parent:s})]).then(([e,t])=>n(e,t)):n(this.Mt.left.Ct({data:s.data,path:s.path,parent:s}),this.Mt.right.Ct({data:s.data,path:s.path,parent:s}))}};ke.create=(e,t,s)=>new ke({left:e,right:t,Jt:qe.ZodIntersection,...T(s)});var Ne=class e extends M{Ut(e){const{status:t,jt:s}=this.Pt(e);if(s.Ot!==o.$)return g(s,{code:c.Le,Ve:o.$,ze:s.Ot}),k;if(s.data.length<this.Mt.items.length)return g(s,{code:c.et,nt:this.Mt.items.length,st:!0,tt:!1,type:"array"}),k;!this.Mt.Sn&&s.data.length>this.Mt.items.length&&(g(s,{code:c.it,rt:this.Mt.items.length,st:!0,tt:!1,type:"array"}),t.wt());const n=[...s.data].map((e,t)=>{const n=this.Mt.items[t]||this.Mt.Sn;return n?n.Ut(new E(s,e,s.path,t)):null}).filter(e=>!!e);return s.yt.async?Promise.all(n).then(e=>x.bt(t,e)):x.bt(t,n)}get items(){return this.Mt.items}Sn(t){return new e({...this.Mt,Sn:t})}};Ne.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Ne({items:e,Jt:qe.ZodTuple,Sn:null,...T(t)})};var Ae=class e extends M{get Mn(){return this.Mt.Dn}get Bn(){return this.Mt.valueType}Ut(e){const{status:t,jt:s}=this.Pt(e);if(s.Ot!==o.object)return g(s,{code:c.Le,Ve:o.object,ze:s.Ot}),k;const n=[],i=this.Mt.Dn,r=this.Mt.valueType;for(const e in s.data)n.push({key:i.Ut(new E(s,e,s.path,e)),value:r.Ut(new E(s,s.data[e],s.path,e)),Nt:e in s.data});return s.yt.async?x.xt(t,n):x.kt(t,n)}get element(){return this.Mt.valueType}static create(t,s,n){return new e(s instanceof M?{Dn:t,valueType:s,Jt:qe.ZodRecord,...T(n)}:{Dn:se.create(),valueType:t,Jt:qe.ZodRecord,...T(s)})}},_e=class extends M{get Mn(){return this.Mt.Dn}get Bn(){return this.Mt.valueType}Ut(e){const{status:t,jt:s}=this.Pt(e);if(s.Ot!==o.map)return g(s,{code:c.Le,Ve:o.map,ze:s.Ot}),k;const n=this.Mt.Dn,i=this.Mt.valueType,r=[...s.data.entries()].map(([e,t],r)=>({key:n.Ut(new E(s,e,s.path,[r,"key"])),value:i.Ut(new E(s,t,s.path,[r,"value"]))}));if(s.yt.async){const e=new Map;return Promise.resolve().then(async()=>{for(const s of r){const n=await s.key,i=await s.value;if("aborted"===n.status||"aborted"===i.status)return k;"dirty"!==n.status&&"dirty"!==i.status||t.wt(),e.set(n.value,i.value)}return{status:t.value,value:e}})}{const e=new Map;for(const s of r){const n=s.key,i=s.value;if("aborted"===n.status||"aborted"===i.status)return k;"dirty"!==n.status&&"dirty"!==i.status||t.wt(),e.set(n.value,i.value)}return{status:t.value,value:e}}}};_e.create=(e,t,s)=>new _e({valueType:t,Dn:e,Jt:qe.ZodMap,...T(s)});var Ze=class e extends M{Ut(e){const{status:t,jt:s}=this.Pt(e);if(s.Ot!==o.set)return g(s,{code:c.Le,Ve:o.set,ze:s.Ot}),k;const n=this.Mt;null!==n.On&&s.data.size<n.On.value&&(g(s,{code:c.et,nt:n.On.value,type:"set",st:!0,tt:!1,message:n.On.message}),t.wt()),null!==n.Pn&&s.data.size>n.Pn.value&&(g(s,{code:c.it,rt:n.Pn.value,type:"set",st:!0,tt:!1,message:n.Pn.message}),t.wt());const i=this.Mt.valueType;function r(e){const s=new Set;for(const n of e){if("aborted"===n.status)return k;"dirty"===n.status&&t.wt(),s.add(n.value)}return{status:t.value,value:s}}const a=[...s.data.values()].map((e,t)=>i.Ut(new E(s,e,s.path,t)));return s.yt.async?Promise.all(a).then(e=>r(e)):r(a)}min(t,s){return new e({...this.Mt,On:{value:t,message:w.toString(s)}})}max(t,s){return new e({...this.Mt,Pn:{value:t,message:w.toString(s)}})}size(e,t){return this.min(e,t).max(e,t)}Is(e){return this.min(1,e)}};Ze.create=(e,t)=>new Ze({valueType:e,On:null,Pn:null,Jt:qe.ZodSet,...T(t)});var $e=class e extends M{constructor(){super(...arguments),this.validate=this.jn}Ut(e){const{jt:t}=this.Pt(e);if(t.Ot!==o.j)return g(t,{code:c.Le,Ve:o.j,ze:t.Ot}),k;function s(e,s){return v({data:e,path:t.path,lt:[t.yt.vt,t.gt,f(),l].filter(e=>!!e),ft:{code:c.Je,Oe:s}})}function n(e,s){return v({data:e,path:t.path,lt:[t.yt.vt,t.gt,f(),l].filter(e=>!!e),ft:{code:c.Ye,Be:s}})}const i={Ft:t.yt.vt},r=t.data;if(this.Mt.Cn instanceof Me){const e=this;return A(async function(...t){const a=new h([]),o=await e.Mt.Un.Vt(t,i).catch(e=>{throw a.Te(s(t,e)),a}),u=await Reflect.apply(r,this,o);return await e.Mt.Cn.Mt.type.Vt(u,i).catch(e=>{throw a.Te(n(u,e)),a})})}{const e=this;return A(function(...t){const a=e.Mt.Un.zt(t,i);if(!a.It)throw new h([s(t,a.error)]);const o=Reflect.apply(r,this,a.data),u=e.Mt.Cn.zt(o,i);if(!u.It)throw new h([n(o,u.error)]);return u.data})}}parameters(){return this.Mt.Un}Ln(){return this.Mt.Cn}Un(...t){return new e({...this.Mt,Un:Ne.create(t).Sn(le.create())})}Cn(t){return new e({...this.Mt,Cn:t})}jn(e){return this.parse(e)}zn(e){return this.parse(e)}static create(t,s,n){return new e({Un:t||Ne.create([]).Sn(le.create()),Cn:s||le.create(),Jt:qe.ZodFunction,...T(n)})}},Ie=class extends M{get Ht(){return this.Mt.Vn()}Ut(e){const{jt:t}=this.Pt(e);return this.Mt.Vn().Ut({data:t.data,path:t.path,parent:t})}};Ie.create=(e,t)=>new Ie({Vn:e,Jt:qe.ZodLazy,...T(t)});var Ee=class extends M{Ut(e){if(e.data!==this.Mt.value){const t=this.Bt(e);return g(t,{ze:t.data,code:c.Re,Ve:this.Mt.value}),k}return{status:"valid",value:e.data}}get value(){return this.Mt.value}};function Fe(e,t){return new Te({values:e,Jt:qe.ZodEnum,...T(t)})}Ee.create=(e,t)=>new Ee({value:e,Jt:qe.ZodLiteral,...T(t)});var Te=class e extends M{Ut(e){if("string"!=typeof e.data){const t=this.Bt(e),s=this.Mt.values;return g(t,{Ve:n.Ze(s),ze:t.Ot,code:c.Le}),k}if(this.Rn||(this.Rn=new Set(this.Mt.values)),!this.Rn.has(e.data)){const t=this.Bt(e),s=this.Mt.values;return g(t,{ze:t.data,code:c.He,options:s}),k}return A(e.data)}get options(){return this.Mt.values}get P(){const e={};for(const t of this.Mt.values)e[t]=t;return e}get Wn(){const e={};for(const t of this.Mt.values)e[t]=t;return e}get qn(){const e={};for(const t of this.Mt.values)e[t]=t;return e}Kn(t,s=this.Mt){return e.create(t,{...this.Mt,...s})}Hn(t,s=this.Mt){return e.create(this.options.filter(e=>!t.includes(e)),{...this.Mt,...s})}};Te.create=Fe;var Se=class extends M{Ut(e){const t=n.Ne(this.Mt.values),s=this.Bt(e);if(s.Ot!==o.string&&s.Ot!==o.number){const e=n._e(t);return g(s,{Ve:n.Ze(e),ze:s.Ot,code:c.Le}),k}if(this.Rn||(this.Rn=new Set(n.Ne(this.Mt.values))),!this.Rn.has(e.data)){const e=n._e(t);return g(s,{ze:s.data,code:c.He,options:e}),k}return A(e.data)}get P(){return this.Mt.values}};Se.create=(e,t)=>new Se({values:e,Jt:qe.ZodNativeEnum,...T(t)});var Me=class extends M{hn(){return this.Mt.type}Ut(e){const{jt:t}=this.Pt(e);if(t.Ot!==o.promise&&!1===t.yt.async)return g(t,{code:c.Le,Ve:o.promise,ze:t.Ot}),k;const s=t.Ot===o.promise?t.data:Promise.resolve(t.data);return A(s.then(e=>this.Mt.type.Vt(e,{path:t.path,Ft:t.yt.vt})))}};Me.create=(e,t)=>new Me({type:e,Jt:qe.ZodPromise,...T(t)});var De=class extends M{rs(){return this.Mt.Ht}Jn(){return this.Mt.Ht.Mt.Jt===qe.ZodEffects?this.Mt.Ht.Jn():this.Mt.Ht}Ut(e){const{status:t,jt:s}=this.Pt(e),i=this.Mt.effect||null,r={Te:e=>{g(s,e),e.fatal?t.abort():t.wt()},get path(){return s.path}};if(r.Te=r.Te.bind(r),"preprocess"===i.type){const e=i.transform(s.data,r);if(s.yt.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return k;const n=await this.Mt.Ht.Lt({data:e,path:s.path,parent:s});return"aborted"===n.status?k:"dirty"===n.status||"dirty"===t.value?N(n.value):n});{if("aborted"===t.value)return k;const n=this.Mt.Ht.Ct({data:e,path:s.path,parent:s});return"aborted"===n.status?k:"dirty"===n.status||"dirty"===t.value?N(n.value):n}}if("refinement"===i.type){const e=e=>{const t=i.Kt(e,r);if(s.yt.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===s.yt.async){const n=this.Mt.Ht.Ct({data:s.data,path:s.path,parent:s});return"aborted"===n.status?k:("dirty"===n.status&&t.wt(),e(n.value),{status:t.value,value:n.value})}return this.Mt.Ht.Lt({data:s.data,path:s.path,parent:s}).then(s=>"aborted"===s.status?k:("dirty"===s.status&&t.wt(),e(s.value).then(()=>({status:t.value,value:s.value}))))}if("transform"===i.type){if(!1===s.yt.async){const e=this.Mt.Ht.Ct({data:s.data,path:s.path,parent:s});if(!$(e))return k;const n=i.transform(e.value,r);if(n instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:n}}return this.Mt.Ht.Lt({data:s.data,path:s.path,parent:s}).then(e=>$(e)?Promise.resolve(i.transform(e.value,r)).then(e=>({status:t.value,value:e})):k)}n.xe(i)}};De.create=(e,t,s)=>new De({Ht:e,Jt:qe.ZodEffects,effect:t,...T(s)}),De.Yn=(e,t,s)=>new De({Ht:t,effect:{type:"preprocess",transform:e},Jt:qe.ZodEffects,...T(s)});var Be=class extends M{Ut(e){return this.Dt(e)===o.undefined?A(void 0):this.Mt.rs.Ut(e)}hn(){return this.Mt.rs}};Be.create=(e,t)=>new Be({rs:e,Jt:qe.ZodOptional,...T(t)});var Oe=class extends M{Ut(e){return this.Dt(e)===o.null?A(null):this.Mt.rs.Ut(e)}hn(){return this.Mt.rs}};Oe.create=(e,t)=>new Oe({rs:e,Jt:qe.ZodNullable,...T(t)});var Pe=class extends M{Ut(e){const{jt:t}=this.Pt(e);let s=t.data;return t.Ot===o.undefined&&(s=this.Mt.defaultValue()),this.Mt.rs.Ut({data:s,path:t.path,parent:t})}Gn(){return this.Mt.rs}};Pe.create=(e,t)=>new Pe({rs:e,Jt:qe.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...T(t)});var je=class extends M{Ut(e){const{jt:t}=this.Pt(e),s={...t,yt:{...t.yt,Fe:[]}},n=this.Mt.rs.Ut({data:s.data,path:s.path,parent:{...s}});return I(n)?n.then(e=>({status:"valid",value:"valid"===e.status?e.value:this.Mt.us({get error(){return new h(s.yt.Fe)},input:s.data})})):{status:"valid",value:"valid"===n.status?n.value:this.Mt.us({get error(){return new h(s.yt.Fe)},input:s.data})}}Qn(){return this.Mt.rs}};je.create=(e,t)=>new je({rs:e,Jt:qe.ZodCatch,us:"function"==typeof t.catch?t.catch:()=>t.catch,...T(t)});var Ce=class extends M{Ut(e){if(this.Dt(e)!==o.G){const t=this.Bt(e);return g(t,{code:c.Le,Ve:o.G,ze:t.Ot}),k}return{status:"valid",value:e.data}}};Ce.create=e=>new Ce({Jt:qe.ZodNaN,...T(e)});var Ue=Symbol("zod_brand"),Le=class extends M{Ut(e){const{jt:t}=this.Pt(e),s=t.data;return this.Mt.type.Ut({data:s,path:t.path,parent:t})}hn(){return this.Mt.type}},ze=class e extends M{Ut(e){const{status:t,jt:s}=this.Pt(e);if(s.yt.async)return(async()=>{const e=await this.Mt.in.Lt({data:s.data,path:s.path,parent:s});return"aborted"===e.status?k:"dirty"===e.status?(t.wt(),N(e.value)):this.Mt.Xn.Lt({data:e.value,path:s.path,parent:s})})();{const e=this.Mt.in.Ct({data:s.data,path:s.path,parent:s});return"aborted"===e.status?k:"dirty"===e.status?(t.wt(),{status:"dirty",value:e.value}):this.Mt.Xn.Ct({data:e.value,path:s.path,parent:s})}}static create(t,s){return new e({in:t,Xn:s,Jt:qe.ZodPipeline})}},Ve=class extends M{Ut(e){const t=this.Mt.rs.Ut(e),s=e=>($(e)&&(e.value=Object.freeze(e.value)),e);return I(t)?t.then(e=>s(e)):s(t)}hn(){return this.Mt.rs}};function Re(e,t){const s="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof s?{message:s}:s}function We(e,t={},s){return e?he.create().Yt((n,i)=>{const r=e(n);if(r instanceof Promise)return r.then(e=>{if(!e){const e=Re(t,n),r=e.fatal??s??!0;i.Te({code:"custom",...e,fatal:r})}});if(!r){const e=Re(t,n),r=e.fatal??s??!0;i.Te({code:"custom",...e,fatal:r})}}):he.create()}Ve.create=(e,t)=>new Ve({rs:e,Jt:qe.ZodReadonly,...T(t)});var qe,Ke,He={object:ye.En};(Ke=qe||(qe={})).ZodString="ZodString",Ke.ZodNumber="ZodNumber",Ke.ZodNaN="ZodNaN",Ke.ZodBigInt="ZodBigInt",Ke.ZodBoolean="ZodBoolean",Ke.ZodDate="ZodDate",Ke.ZodSymbol="ZodSymbol",Ke.ZodUndefined="ZodUndefined",Ke.ZodNull="ZodNull",Ke.ZodAny="ZodAny",Ke.ZodUnknown="ZodUnknown",Ke.ZodNever="ZodNever",Ke.ZodVoid="ZodVoid",Ke.ZodArray="ZodArray",Ke.ZodObject="ZodObject",Ke.ZodUnion="ZodUnion",Ke.ZodDiscriminatedUnion="ZodDiscriminatedUnion",Ke.ZodIntersection="ZodIntersection",Ke.ZodTuple="ZodTuple",Ke.ZodRecord="ZodRecord",Ke.ZodMap="ZodMap",Ke.ZodSet="ZodSet",Ke.ZodFunction="ZodFunction",Ke.ZodLazy="ZodLazy",Ke.ZodLiteral="ZodLiteral",Ke.ZodEnum="ZodEnum",Ke.ZodEffects="ZodEffects",Ke.ZodNativeEnum="ZodNativeEnum",Ke.ZodOptional="ZodOptional",Ke.ZodNullable="ZodNullable",Ke.ZodDefault="ZodDefault",Ke.ZodCatch="ZodCatch",Ke.ZodPromise="ZodPromise",Ke.ZodBranded="ZodBranded",Ke.ZodPipeline="ZodPipeline",Ke.ZodReadonly="ZodReadonly";var Je=(e,t={message:`Input not instance of ${e.name}`})=>We(t=>t instanceof e,t),Ye=se.create,Ge=ie.create,Qe=Ce.create,Xe=re.create,et=ae.create,tt=oe.create,st=ue.create,nt=ce.create,it=de.create,rt=he.create,at=le.create,ot=me.create,ut=pe.create,ct=fe.create,dt=ye.create,ht=ye.In,lt=ge.create,mt=be.create,pt=ke.create,ft=Ne.create,vt=Ae.create,yt=_e.create,gt=Ze.create,wt=$e.create,bt=Ie.create,xt=Ee.create,kt=Te.create,Nt=Se.create,At=Me.create,_t=De.create,Zt=Be.create,$t=Oe.create,It=De.Yn,Et=ze.create,Ft=()=>Ye().re(),Tt=()=>Ge().re(),St=()=>et().re(),Mt={string:e=>se.create({...e,T:!0}),number:e=>ie.create({...e,T:!0}),F:e=>ae.create({...e,T:!0}),I:e=>re.create({...e,T:!0}),M:e=>oe.create({...e,T:!0})},Dt=k,Bt=a,Ot=Bt.object({ei:Bt.object({ti:Bt.string(),si:Bt.string().Wt(e=>e.match("^0|([1-9]d*)([.](0|([1-9]d*))){2}$")),ni:Bt.string().Wt(e=>e.match("^0|([1-9]d*)([.](0|([1-9]d*))){2}$")).re()}),ii:Bt.object({name:Bt.string(),ri:Bt.string()}).re(),ai:Bt.$(Bt.object({name:Bt.string().re(),enabled:Bt.F(),coords:Bt.object({oi:Bt.number(),ui:Bt.number(),px:Bt.number(),ci:Bt.number()}),sources:Bt.$(Bt.string()),di:Bt.number().re(),animation:Bt.object({hi:Bt.number().re(),li:Bt.number().re(),frameCount:Bt.number().re(),mi:Bt.number().re(),pi:Bt.number().re(),fi:Bt.number().re(),yi:Bt.number().re(),startTime:Bt.number().re(),looping:Bt.F().re()}).re(),uuid:Bt.string()})),gi:Bt.$(Bt.object({name:Bt.string().re(),url:Bt.string()})),wi:Bt.$(Bt.object({name:Bt.string().re(),url:Bt.string()}))}),Pt=Bt.object({name:Bt.string().re(),coords:Bt.$(Bt.number()),bi:Bt.number().re(),enabled:Bt.F(),xi:Bt.string().re(),uuid:Bt.string()}),jt=Bt.object({name:Bt.string().re(),url:Bt.string(),ki:Bt.$(Bt.object({bi:Bt.number().re(),uuid:Bt.string()})).re()}),Ct=Bt.object({ti:Bt.string(),ni:Bt.string().Wt(e=>e.match("^0|([1-9]d*)([.](0|([1-9]d*))){2}$")).re(),si:Bt.string().Wt(e=>e.match("^0|([1-9]d*)([.](0|([1-9]d*))){2}$")),ai:Bt.$(Pt),links:Bt.$(jt).re()}),Ut=document.querySelector("#bm-manage-templates table");Ut&&"TABLE"===Ut.nodeName.toLocaleUpperCase()&&(Ut=Ut.children[0])&&"BM"===Vt.getType()&&Vt.get().ai.forEach((e,t)=>{const n=s("tr",{id:"main-row"}),i=s("td",{textContent:t.toString()}),r=s("td",{textContent:e.name||"unnamed-0"}),a=document.createElement("td"),o=s("button",{id:"enable"});a.appendChild(o);const u=document.createElement("td"),c=s("button",{id:"exportAdd"});u.appendChild(c);const d=document.createElement("td"),h=s("div",{className:"shifts-container"}),l=s("button",{id:"up"}),m=s("button",{id:"down"});h.append(l,m),d.appendChild(h),n.append(i,r,a,u,d)});var Lt={"bm-create-template":"flex","bm-main-overlay":"flex","bm-manage-links":"flex","bm-manage-templates":"flex"},zt=document.createElement("style");zt.textContent="",document.body.appendChild(zt),window.charity.game.map.on("click",e=>{console.log(e)});var Vt=new class{constructor(e){t(this,"object"),t(this,"type"),this.object=e,e&&(Ot.zt(e).It?this.type="CHA":Ct.zt(e).It?this.type="BM":this.type="N/A")}update(e){if(Ct.zt(e).It)this.type="BM";else{if(!Ot.zt(e).It)return;this.type="CHA"}this.object=e}get(){return this.object}getType(){return this.type}Ni(){"N/A"!==this.type&&"CHA"!==this.type&&("BM"===this.type&&(this.object=this.object,this.object={ei:{ti:"Charity",si:"0.1.0",ni:this.object.ni},ai:this.object.ai.map(e=>({name:e.name,enabled:e.enabled||!1,coords:{oi:e.coords[0],ui:e.coords[1],px:e.coords[2],ci:e.coords[3]},sources:[e.xi||""],di:e.bi,uuid:e.uuid})),gi:[],wi:[]}),this.type="CHA")}Ai(){"N/A"!==this.type&&"BM"!==this.type&&("CHA"===this.type&&(this.object=this.object,this.object={ti:"BlueMarble",si:"0.1.0",ni:this.object.ei.ni,ai:this.object.ai.map(e=>({name:e.name,coords:Object.values(e.coords),_i:e.di,enabled:e.enabled,xi:e.sources[0],uuid:e.uuid}))}),this.type="BM")}appendData(e){"BM"===this.type&&(this.object=this.object,Ot.parse(e)?this.object.ai.push(...e.ai.map(e=>({name:e.name,coords:Object.values(e.coords),_i:e.di,enabled:e.enabled,xi:e.sources[0],uuid:e.uuid}))):Ct.parse(e)&&(this.object.ai.push(...e.ai),this.object.links?e.links&&this.object.links.push(...e.links):this.object.links=e.links))}Zi(e){"BM"===this.type&&this.object.ai.push(e)}$i(e){"BM"===this.type&&(this.object=this.object,this.object.links?this.object.links.push(e):this.object.links=[e])}Ii(e,t){if("N/A"===this.type)return null;if(this.object.hasOwnProperty("links")){const s=this.object;return{...s,ai:e?e.map(e=>!!(Number.isInteger(e)&&e>=0&&s.ai.length<e)&&s.ai[e]).filter(Boolean):s.ai,links:t?t.map(e=>!!(Number.isInteger(e)&&e>=0&&s.links.length<e)&&s.links[e]).filter(Boolean):s.links}}const s=this.object;return{...s,ai:e?e.map(e=>!!(Number.isInteger(e)&&e>=0&&s.ai.length<e)&&s.ai[e]).filter(Boolean):s.ai}}}({ti:"BlueMarble",si:"",ai:[{coords:[0,1,2,3],enabled:!1,uuid:"BLAJSIAFBNIUBAWIFIOANWA"},{coords:[0,1,2,3],name:"Test",enabled:!1,bi:54,uuid:"BLAJSIAFBNIUBAWIFIOANWA"}]}),Rt=(new class{constructor(){t(this,"updateFunctions",{"bm-create-template":void 0,"bm-main-overlay":void 0,"bm-manage-links":void 0,"bm-manage-templates":void 0})}close(e){const t=document.querySelector("#"+e);t&&(t.style.display="none")}open(e){const t=document.querySelector("#"+e);t&&(t.style.display=Lt[e],this.Ei[e]&&this.Ei[e]())}},new URLSearchParams(document.location.search));if(Rt.has("bmShare"))try{const e=JSON.parse(Rt.get("bmShare"));Vt.appendData(e)}catch{}!function(){const e=document.querySelector("#bm-create-template button#coords");console.log("coordsBtn: testestsetestseesseetestest ",e),console.log(e?.nodeName),console.log("BUTTON"===e?.nodeName.toLocaleUpperCase()),e&&"BUTTON"===e.nodeName.toLocaleUpperCase()&&e.addEventListener("click",()=>{console.log("test"),console.log("test")})}()})();},});})();