threenative-animation-mcp 0.1.1 → 0.1.3

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/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import {readdir,readFile,mkdir,writeFile,stat}from'fs/promises';import tr from'path';import {fileURLToPath}from'url';import j_ from'process';import {createServer}from'http';var _$=Object.defineProperty;var or=(e,t)=>{for(var n in t)_$(e,n,{get:t[n],enumerable:true});};var v$=Object.create,la=Object.defineProperty,y$=Object.getOwnPropertyDescriptor,S$=Object.getOwnPropertyNames,b$=Object.getPrototypeOf,R$=Object.prototype.hasOwnProperty,G=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),fv=(e,t)=>{let n={};for(var o in e)la(n,o,{get:e[o],enumerable:true});return n},T$=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(var r=S$(t),i=0,s=r.length,a;i<s;i++)a=r[i],!R$.call(e,a)&&a!==n&&la(e,a,{get:(c=>t[c]).bind(null,a),enumerable:!(o=y$(t,a))||o.enumerable});return e},da=(e,t,n)=>(n=e!=null?v$(b$(e)):{},T$(la(n,"default",{value:e,enumerable:true}),e));var $$=new Set(["https://json-schema.org/draft/2020-12/schema","http://json-schema.org/draft/2020-12/schema"]),hv=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]),x$=new Set(["https://json-schema.org/draft-07/schema","http://json-schema.org/draft-07/schema"]),w$=new Set(["https://json-schema.org/draft-06/schema","http://json-schema.org/draft-06/schema"]);function gv(e){return typeof e=="string"&&hv.has(e.replace(/#$/,""))}function _v(e,t){if(!("$schema"in e)||typeof e.$schema!="string")return "2020-12";let n=e.$schema.replace(/#$/,"");if($$.has(n))return "2020-12";if(hv.has(n))return "2019-09";if(x$.has(n)||w$.has(n))return "draft-7";throw new Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}var re={};or(re,{$brand:()=>zd,$input:()=>Xp,$output:()=>Jp,NEVER:()=>Ei,TimePrecision:()=>ef,ZodAny:()=>Lh,ZodArray:()=>Bh,ZodBase64:()=>Dc,ZodBase64URL:()=>Uc,ZodBigInt:()=>No,ZodBigIntFormat:()=>qc,ZodBoolean:()=>ko,ZodCIDRv4:()=>Mc,ZodCIDRv6:()=>jc,ZodCUID:()=>zc,ZodCUID2:()=>Oc,ZodCatch:()=>lg,ZodCodec:()=>ns,ZodCustom:()=>os,ZodCustomStringFormat:()=>zo,ZodDate:()=>Qi,ZodDefault:()=>og,ZodDiscriminatedUnion:()=>Gh,ZodE164:()=>Lc,ZodEmail:()=>xc,ZodEmoji:()=>Ec,ZodEnum:()=>wo,ZodError:()=>nw,ZodExactOptional:()=>tg,ZodFile:()=>Qh,ZodFirstPartyTypeKind:()=>Rg,ZodFunction:()=>yg,ZodGUID:()=>Ji,ZodIPv4:()=>Ac,ZodIPv6:()=>Cc,ZodISODate:()=>yc,ZodISODateTime:()=>vc,ZodISODuration:()=>bc,ZodISOTime:()=>Sc,ZodIntersection:()=>Hh,ZodIssueCode:()=>Tg,ZodJWT:()=>Fc,ZodKSUID:()=>Pc,ZodLazy:()=>_g,ZodLiteral:()=>Yh,ZodMAC:()=>Mh,ZodMap:()=>Xh,ZodNaN:()=>mg,ZodNanoID:()=>Ic,ZodNever:()=>qh,ZodNonOptional:()=>Hc,ZodNull:()=>Uh,ZodNullable:()=>ng,ZodNumber:()=>Oo,ZodNumberFormat:()=>Nn,ZodObject:()=>es,ZodOptional:()=>Gc,ZodPipe:()=>rs,ZodPrefault:()=>sg,ZodPreprocess:()=>pg,ZodPromise:()=>vg,ZodReadonly:()=>fg,ZodRealError:()=>$t,ZodRecord:()=>xo,ZodSet:()=>Wh,ZodString:()=>Eo,ZodStringFormat:()=>Ue,ZodSuccess:()=>ug,ZodSymbol:()=>jh,ZodTemplateLiteral:()=>gg,ZodTransform:()=>eg,ZodTuple:()=>Zh,ZodType:()=>we,ZodULID:()=>kc,ZodURL:()=>Yi,ZodUUID:()=>Xt,ZodUndefined:()=>Dh,ZodUnion:()=>ts,ZodUnknown:()=>Fh,ZodVoid:()=>Vh,ZodXID:()=>Nc,ZodXor:()=>Kh,_ZodString:()=>$c,_default:()=>ig,_function:()=>YS,any:()=>Vc,array:()=>C,base64:()=>_S,base64url:()=>vS,bigint:()=>zS,boolean:()=>ne,catch:()=>dg,check:()=>QS,cidrv4:()=>hS,cidrv6:()=>gS,clone:()=>ft,codec:()=>ZS,coerce:()=>is,config:()=>Ke,core:()=>ar,cuid:()=>aS,cuid2:()=>cS,custom:()=>eb,date:()=>CS,decode:()=>zh,decodeAsync:()=>kh,describe:()=>tb,discriminatedUnion:()=>Nr,e164:()=>yS,email:()=>wc,emoji:()=>iS,encode:()=>Ih,encodeAsync:()=>Oh,endsWith:()=>go,enum:()=>ge,exactOptional:()=>rg,file:()=>BS,flattenError:()=>Ci,float32:()=>xS,float64:()=>wS,formatError:()=>Mi,fromJSONSchema:()=>ab,function:()=>YS,getErrorMap:()=>sw,globalRegistry:()=>st,gt:()=>Zt,gte:()=>gt,guid:()=>Qy,hash:()=>$S,hex:()=>TS,hostname:()=>RS,httpUrl:()=>oS,includes:()=>fo,instanceof:()=>nb,int:()=>Rc,int32:()=>ES,int64:()=>OS,intersection:()=>Ft,invertCodec:()=>JS,ipv4:()=>mS,ipv6:()=>fS,iso:()=>Ot,json:()=>ib,jwt:()=>SS,keyof:()=>MS,ksuid:()=>dS,lazy:()=>Pr,length:()=>On,literal:()=>M,locales:()=>Bi,looseObject:()=>le,looseRecord:()=>LS,lowercase:()=>mo,lt:()=>Ht,lte:()=>zt,mac:()=>pS,map:()=>FS,maxLength:()=>zn,maxSize:()=>Ir,meta:()=>rb,mime:()=>_o,minLength:()=>sr,minSize:()=>Jt,multipleOf:()=>Er,nan:()=>HS,nanoid:()=>sS,nativeEnum:()=>VS,negative:()=>uc,never:()=>Bc,nonnegative:()=>dc,nonoptional:()=>cg,nonpositive:()=>lc,normalize:()=>vo,null:()=>Wt,nullable:()=>Xi,nullish:()=>KS,number:()=>H,object:()=>z,optional:()=>ae,overwrite:()=>Lt,parse:()=>xh,parseAsync:()=>wh,partialRecord:()=>US,pipe:()=>Tc,positive:()=>cc,prefault:()=>ag,preprocess:()=>cr,prettifyError:()=>qd,promise:()=>WS,property:()=>mc,readonly:()=>hg,record:()=>te,refine:()=>Sg,regex:()=>lo,regexes:()=>It,registry:()=>Fa,safeDecode:()=>Ph,safeDecodeAsync:()=>Ch,safeEncode:()=>Nh,safeEncodeAsync:()=>Ah,safeParse:()=>Zi,safeParseAsync:()=>Eh,set:()=>qS,setErrorMap:()=>iw,size:()=>In,slugify:()=>Ro,startsWith:()=>ho,strictObject:()=>jS,string:()=>g,stringFormat:()=>bS,stringbool:()=>ob,success:()=>GS,superRefine:()=>bg,symbol:()=>NS,templateLiteral:()=>XS,toJSONSchema:()=>kn,toLowerCase:()=>So,toUpperCase:()=>bo,transform:()=>Kc,treeifyError:()=>Fd,trim:()=>yo,tuple:()=>Jh,uint32:()=>IS,uint64:()=>kS,ulid:()=>uS,undefined:()=>PS,union:()=>ie,unknown:()=>se,uppercase:()=>po,url:()=>Io,util:()=>X,uuid:()=>eS,uuidv4:()=>tS,uuidv6:()=>rS,uuidv7:()=>nS,void:()=>AS,xid:()=>lS,xor:()=>DS});var ar={};or(ar,{$ZodAny:()=>_p,$ZodArray:()=>Rp,$ZodAsyncError:()=>Ut,$ZodBase64:()=>ap,$ZodBase64URL:()=>cp,$ZodBigInt:()=>Pa,$ZodBigIntFormat:()=>pp,$ZodBoolean:()=>Li,$ZodCIDRv4:()=>op,$ZodCIDRv6:()=>ip,$ZodCUID:()=>Gm,$ZodCUID2:()=>Hm,$ZodCatch:()=>Lp,$ZodCheck:()=>Fe,$ZodCheckBigIntFormat:()=>Rm,$ZodCheckEndsWith:()=>Am,$ZodCheckGreaterThan:()=>Ea,$ZodCheckIncludes:()=>Nm,$ZodCheckLengthEquals:()=>Im,$ZodCheckLessThan:()=>wa,$ZodCheckLowerCase:()=>Om,$ZodCheckMaxLength:()=>wm,$ZodCheckMaxSize:()=>Tm,$ZodCheckMimeType:()=>Mm,$ZodCheckMinLength:()=>Em,$ZodCheckMinSize:()=>$m,$ZodCheckMultipleOf:()=>Sm,$ZodCheckNumberFormat:()=>bm,$ZodCheckOverwrite:()=>jm,$ZodCheckProperty:()=>Cm,$ZodCheckRegex:()=>zm,$ZodCheckSizeEquals:()=>xm,$ZodCheckStartsWith:()=>Pm,$ZodCheckStringFormat:()=>co,$ZodCheckUpperCase:()=>km,$ZodCodec:()=>qi,$ZodCustom:()=>Zp,$ZodCustomStringFormat:()=>dp,$ZodDate:()=>bp,$ZodDefault:()=>Mp,$ZodDiscriminatedUnion:()=>xp,$ZodE164:()=>up,$ZodEmail:()=>qm,$ZodEmoji:()=>Bm,$ZodEncodeError:()=>Rr,$ZodEnum:()=>Op,$ZodError:()=>Ai,$ZodExactOptional:()=>Ap,$ZodFile:()=>Np,$ZodFunction:()=>Kp,$ZodGUID:()=>Lm,$ZodIPv4:()=>tp,$ZodIPv6:()=>rp,$ZodISODate:()=>Ym,$ZodISODateTime:()=>Wm,$ZodISODuration:()=>ep,$ZodISOTime:()=>Qm,$ZodIntersection:()=>wp,$ZodJWT:()=>lp,$ZodKSUID:()=>Xm,$ZodLazy:()=>Hp,$ZodLiteral:()=>kp,$ZodMAC:()=>np,$ZodMap:()=>Ip,$ZodNaN:()=>Fp,$ZodNanoID:()=>Km,$ZodNever:()=>yp,$ZodNonOptional:()=>Dp,$ZodNull:()=>gp,$ZodNullable:()=>Cp,$ZodNumber:()=>Na,$ZodNumberFormat:()=>mp,$ZodObject:()=>Zv,$ZodObjectJIT:()=>Tp,$ZodOptional:()=>Ca,$ZodPipe:()=>Ma,$ZodPrefault:()=>jp,$ZodPreprocess:()=>qp,$ZodPromise:()=>Gp,$ZodReadonly:()=>Vp,$ZodRealError:()=>Tt,$ZodRecord:()=>Ep,$ZodRegistry:()=>La,$ZodSet:()=>zp,$ZodString:()=>En,$ZodStringFormat:()=>De,$ZodSuccess:()=>Up,$ZodSymbol:()=>fp,$ZodTemplateLiteral:()=>Bp,$ZodTransform:()=>Pp,$ZodTuple:()=>Aa,$ZodType:()=>_e,$ZodULID:()=>Zm,$ZodURL:()=>Vm,$ZodUUID:()=>Fm,$ZodUndefined:()=>hp,$ZodUnion:()=>Fi,$ZodUnknown:()=>vp,$ZodVoid:()=>Sp,$ZodXID:()=>Jm,$ZodXor:()=>$p,$brand:()=>zd,$constructor:()=>P,$input:()=>Xp,$output:()=>Jp,Doc:()=>Ui,JSONSchema:()=>Xy,JSONSchemaGenerator:()=>gc,NEVER:()=>Ei,TimePrecision:()=>ef,_any:()=>Rf,_array:()=>zf,_base64:()=>oc,_base64url:()=>ic,_bigint:()=>hf,_boolean:()=>pf,_catch:()=>Jx,_check:()=>Jy,_cidrv4:()=>rc,_cidrv6:()=>nc,_coercedBigint:()=>gf,_coercedBoolean:()=>ff,_coercedDate:()=>Ef,_coercedNumber:()=>af,_coercedString:()=>Yp,_cuid:()=>Ja,_cuid2:()=>Xa,_custom:()=>kf,_date:()=>wf,_decode:()=>_a,_decodeAsync:()=>ya,_default:()=>Gx,_discriminatedUnion:()=>Ax,_e164:()=>sc,_email:()=>qa,_emoji:()=>Ha,_encode:()=>ga,_encodeAsync:()=>va,_endsWith:()=>go,_enum:()=>Lx,_file:()=>Of,_float32:()=>uf,_float64:()=>lf,_gt:()=>Zt,_gte:()=>gt,_guid:()=>Ki,_includes:()=>fo,_int:()=>cf,_int32:()=>df,_int64:()=>_f,_intersection:()=>Cx,_ipv4:()=>ec,_ipv6:()=>tc,_isoDate:()=>rf,_isoDateTime:()=>tf,_isoDuration:()=>of,_isoTime:()=>nf,_jwt:()=>ac,_ksuid:()=>Qa,_lazy:()=>Qx,_length:()=>On,_literal:()=>qx,_lowercase:()=>mo,_lt:()=>Ht,_lte:()=>zt,_mac:()=>Qp,_map:()=>Dx,_max:()=>zt,_maxLength:()=>zn,_maxSize:()=>Ir,_mime:()=>_o,_min:()=>gt,_minLength:()=>sr,_minSize:()=>Jt,_multipleOf:()=>Er,_nan:()=>If,_nanoid:()=>Za,_nativeEnum:()=>Fx,_negative:()=>uc,_never:()=>$f,_nonnegative:()=>dc,_nonoptional:()=>Hx,_nonpositive:()=>lc,_normalize:()=>vo,_null:()=>bf,_nullable:()=>Kx,_number:()=>sf,_optional:()=>Bx,_overwrite:()=>Lt,_parse:()=>oo,_parseAsync:()=>io,_pipe:()=>Xx,_positive:()=>cc,_promise:()=>ew,_property:()=>mc,_readonly:()=>Wx,_record:()=>jx,_refine:()=>Nf,_regex:()=>lo,_safeDecode:()=>ba,_safeDecodeAsync:()=>Ta,_safeEncode:()=>Sa,_safeEncodeAsync:()=>Ra,_safeParse:()=>so,_safeParseAsync:()=>ao,_set:()=>Ux,_size:()=>In,_slugify:()=>Ro,_startsWith:()=>ho,_string:()=>Wp,_stringFormat:()=>To,_stringbool:()=>Mf,_success:()=>Zx,_superRefine:()=>Pf,_symbol:()=>yf,_templateLiteral:()=>Yx,_toLowerCase:()=>So,_toUpperCase:()=>bo,_transform:()=>Vx,_trim:()=>yo,_tuple:()=>Mx,_uint32:()=>mf,_uint64:()=>vf,_ulid:()=>Wa,_undefined:()=>Sf,_union:()=>Nx,_unknown:()=>Tf,_uppercase:()=>po,_url:()=>Gi,_uuid:()=>Va,_uuidv4:()=>Ba,_uuidv6:()=>Ka,_uuidv7:()=>Ga,_void:()=>xf,_xid:()=>Ya,_xor:()=>Px,clone:()=>ft,config:()=>Ke,createStandardJSONSchemaMethod:()=>$o,createToJSONSchemaMethod:()=>jf,decode:()=>e0,decodeAsync:()=>r0,describe:()=>Af,encode:()=>Q$,encodeAsync:()=>t0,extractDefs:()=>Or,finalize:()=>kr,flattenError:()=>Ci,formatError:()=>Mi,globalConfig:()=>$n,globalRegistry:()=>st,initializeContext:()=>zr,isValidBase64:()=>sp,isValidBase64URL:()=>Bv,isValidJWT:()=>Kv,locales:()=>Bi,meta:()=>Cf,parse:()=>fa,parseAsync:()=>ha,prettifyError:()=>qd,process:()=>Ce,regexes:()=>It,registry:()=>Fa,safeDecode:()=>o0,safeDecodeAsync:()=>s0,safeEncode:()=>n0,safeEncodeAsync:()=>i0,safeParse:()=>Vd,safeParseAsync:()=>Bd,toDotPath:()=>Tv,toJSONSchema:()=>kn,treeifyError:()=>Fd,util:()=>X,version:()=>Dm});var vv,Ei=Object.freeze({status:"aborted"});function P(e,t,n){function o(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:false}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let u=s.prototype,l=Object.keys(u);for(let m=0;m<l.length;m++){let h=l[m];h in a||(a[h]=u[h].bind(a));}}let r=n?.Parent??Object;class i extends r{}Object.defineProperty(i,"name",{value:e});function s(a){var c;let u=n?.Parent?new i:this;o(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?true:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var zd=Symbol("zod_brand"),Ut=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");}},Rr=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError";}};(vv=globalThis).__zod_globalConfig??(vv.__zod_globalConfig={});var $n=globalThis.__zod_globalConfig;function Ke(e){return e&&Object.assign($n,e),$n}var X={};or(X,{BIGINT_FORMAT_RANGES:()=>Ud,Class:()=>kd,NUMBER_FORMAT_RANGES:()=>Dd,aborted:()=>wr,allowsEval:()=>Ad,assert:()=>k$,assertEqual:()=>E$,assertIs:()=>z$,assertNever:()=>O$,assertNotEqual:()=>I$,assignProp:()=>$r,base64ToUint8Array:()=>Sv,base64urlToUint8Array:()=>Z$,cached:()=>ro,captureStackTrace:()=>pa,cleanEnum:()=>H$,cleanRegex:()=>Oi,clone:()=>ft,cloneDef:()=>P$,createTransparentProxy:()=>U$,defineLazy:()=>Oe,esc:()=>ma,escapeRegex:()=>At,explicitlyAborted:()=>Ld,extend:()=>q$,finalizeIssue:()=>ht,floatSafeRemainder:()=>Nd,getElementAtPath:()=>A$,getEnumValues:()=>zi,getLengthableOrigin:()=>Pi,getParsedType:()=>D$,getSizableOrigin:()=>Ni,hexToUint8Array:()=>X$,isObject:()=>xn,isPlainObject:()=>xr,issue:()=>no,joinValues:()=>D,jsonStringifyReplacer:()=>to,merge:()=>B$,mergeDefs:()=>ir,normalizeParams:()=>W,nullish:()=>Tr,numKeys:()=>j$,objectClone:()=>N$,omit:()=>F$,optionalKeys:()=>jd,parsedType:()=>J,partial:()=>K$,pick:()=>L$,prefixIssues:()=>Rt,primitiveTypes:()=>Md,promiseAllObject:()=>C$,propertyKeyTypes:()=>ki,randomString:()=>M$,required:()=>G$,safeExtend:()=>V$,shallowClone:()=>Cd,slugify:()=>Pd,stringifyPrimitive:()=>Z,uint8ArrayToBase64:()=>bv,uint8ArrayToBase64url:()=>J$,uint8ArrayToHex:()=>W$,unwrapMessage:()=>Ii});function E$(e){return e}function I$(e){return e}function z$(e){}function O$(e){throw new Error("Unexpected value in exhaustive check")}function k$(e){}function zi(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,r])=>t.indexOf(+o)===-1).map(([o,r])=>r)}function D(e,t="|"){return e.map(n=>Z(n)).join(t)}function to(e,t){return typeof t=="bigint"?t.toString():t}function ro(e){return {get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function Tr(e){return e==null}function Oi(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Nd(e,t){let n=e/t,o=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-o)<r?0:n-o}var yv=Symbol("evaluating");function Oe(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==yv)return o===void 0&&(o=yv,o=n()),o},set(r){Object.defineProperty(e,t,{value:r});},configurable:true});}function N$(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function $r(e,t,n){Object.defineProperty(e,t,{value:n,writable:true,enumerable:true,configurable:true});}function ir(...e){let t={};for(let n of e){let o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o);}return Object.defineProperties({},t)}function P$(e){return ir(e._zod.def)}function A$(e,t){return t?t.reduce((n,o)=>n?.[o],e):e}function C$(e){let t=Object.keys(e),n=t.map(o=>e[o]);return Promise.all(n).then(o=>{let r={};for(let i=0;i<t.length;i++)r[t[i]]=o[i];return r})}function M$(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let o=0;o<e;o++)n+=t[Math.floor(Math.random()*t.length)];return n}function ma(e){return JSON.stringify(e)}function Pd(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var pa="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function xn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Ad=ro(()=>{if($n.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return false;try{let e=Function;return new e(""),!0}catch{return false}});function xr(e){if(xn(e)===false)return false;let t=e.constructor;if(t===void 0||typeof t!="function")return true;let n=t.prototype;return !(xn(n)===false||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===false)}function Cd(e){return xr(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function j$(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var D$=e=>{let t=typeof e;switch(t){case "undefined":return "undefined";case "string":return "string";case "number":return Number.isNaN(e)?"nan":"number";case "boolean":return "boolean";case "function":return "function";case "bigint":return "bigint";case "symbol":return "symbol";case "object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},ki=new Set(["string","number","symbol"]),Md=new Set(["string","number","bigint","boolean","symbol","undefined"]);function At(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ft(e,t,n){let o=new e._zod.constr(t??e._zod.def);return (!t||n?.parent)&&(o._zod.parent=e),o}function W(e){let t=e;if(!t)return {};if(typeof t=="string")return {error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message;}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function U$(e){let t;return new Proxy({},{get(n,o,r){return t??(t=e()),Reflect.get(t,o,r)},set(n,o,r,i){return t??(t=e()),Reflect.set(t,o,r,i)},has(n,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(n,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(n,o,r){return t??(t=e()),Reflect.defineProperty(t,o,r)}})}function Z(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function jd(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var Dd={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Ud={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function L$(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=ir(e._zod.def,{get shape(){let s={};for(let a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=n.shape[a]);}return $r(this,"shape",s),s},checks:[]});return ft(e,i)}function F$(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=ir(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a];}return $r(this,"shape",s),s},checks:[]});return ft(e,i)}function q$(e,t){if(!xr(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=ir(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return $r(this,"shape",i),i}});return ft(e,r)}function V$(e,t){if(!xr(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=ir(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return $r(this,"shape",o),o}});return ft(e,n)}function B$(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=ir(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return $r(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return ft(e,n)}function K$(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=ir(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(n)for(let u in n){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(c[u]=e?new e({type:"optional",innerType:a[u]}):a[u]);}else for(let u in a)c[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return $r(this,"shape",c),c},checks:[]});return ft(t,s)}function G$(e,t,n){let o=ir(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=new e({type:"nonoptional",innerType:r[s]}));}else for(let s in r)i[s]=new e({type:"nonoptional",innerType:r[s]});return $r(this,"shape",i),i}});return ft(t,o)}function wr(e,t=0){if(e.aborted===true)return true;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==true)return true;return false}function Ld(e,t=0){if(e.aborted===true)return true;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===false)return true;return false}function Rt(e,t){return t.map(n=>{var o;return (o=n).path??(o.path=[]),n.path.unshift(e),n})}function Ii(e){return typeof e=="string"?e:e?.message}function ht(e,t,n){let o=e.message?e.message:Ii(e.inst?._zod.def?.error?.(e))??Ii(t?.error?.(e))??Ii(n.customError?.(e))??Ii(n.localeError?.(e))??"Invalid input",{inst:r,continue:i,input:s,...a}=e;return a.path??(a.path=[]),a.message=o,t?.reportInput&&(a.input=s),a}function Ni(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Pi(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function J(e){let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"nan":"number";case "object":{if(e===null)return "null";if(Array.isArray(e))return "array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function no(...e){let[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}function H$(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Sv(e){let t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}function bv(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function Z$(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return Sv(t+n)}function J$(e){return bv(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function X$(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)n[o/2]=Number.parseInt(t.slice(o,o+2),16);return n}function W$(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var kd=class{constructor(...t){}};var Rv=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:false}),Object.defineProperty(e,"issues",{value:t,enumerable:false}),e.message=JSON.stringify(t,to,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:false});},Ai=P("$ZodError",Rv),Tt=P("$ZodError",Rv,{Parent:Error});function Ci(e,t=n=>n.message){let n={},o=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):o.push(t(r));return {formErrors:o,fieldErrors:n}}function Mi(e,t=n=>n.message){let n={_errors:[]},o=(r,i=[])=>{for(let s of r.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>o({issues:a},[...i,...s.path]));else if(s.code==="invalid_key")o({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")o({issues:s.issues},[...i,...s.path]);else {let a=[...i,...s.path];if(a.length===0)n._errors.push(t(s));else {let c=n,u=0;for(;u<a.length;){let l=a[u];u===a.length-1?(c[l]=c[l]||{_errors:[]},c[l]._errors.push(t(s))):c[l]=c[l]||{_errors:[]},c=c[l],u++;}}}};return o(e),n}function Fd(e,t=n=>n.message){let n={errors:[]},o=(r,i=[])=>{var s,a;for(let c of r.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>o({issues:u},[...i,...c.path]));else if(c.code==="invalid_key")o({issues:c.issues},[...i,...c.path]);else if(c.code==="invalid_element")o({issues:c.issues},[...i,...c.path]);else {let u=[...i,...c.path];if(u.length===0){n.errors.push(t(c));continue}let l=n,m=0;for(;m<u.length;){let h=u[m],y=m===u.length-1;typeof h=="string"?(l.properties??(l.properties={}),(s=l.properties)[h]??(s[h]={errors:[]}),l=l.properties[h]):(l.items??(l.items=[]),(a=l.items)[h]??(a[h]={errors:[]}),l=l.items[h]),y&&l.errors.push(t(c)),m++;}}};return o(e),n}function Tv(e){let t=[],n=e.map(o=>typeof o=="object"?o.key:o);for(let o of n)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function qd(e){let t=[],n=[...e.issues].sort((o,r)=>(o.path??[]).length-(r.path??[]).length);for(let o of n)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${Tv(o.path)}`);return t.join(`
3
- `)}var oo=e=>(t,n,o,r)=>{let i=o?{...o,async:false}:{async:false},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new Ut;if(s.issues.length){let a=new(r?.Err??e)(s.issues.map(c=>ht(c,i,Ke())));throw pa(a,r?.callee),a}return s.value},fa=oo(Tt),io=e=>async(t,n,o,r)=>{let i=o?{...o,async:true}:{async:true},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(r?.Err??e)(s.issues.map(c=>ht(c,i,Ke())));throw pa(a,r?.callee),a}return s.value},ha=io(Tt),so=e=>(t,n,o)=>{let r=o?{...o,async:false}:{async:false},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new Ut;return i.issues.length?{success:false,error:new(e??Ai)(i.issues.map(s=>ht(s,r,Ke())))}:{success:true,data:i.value}},Vd=so(Tt),ao=e=>async(t,n,o)=>{let r=o?{...o,async:true}:{async:true},i=t._zod.run({value:n,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length?{success:false,error:new e(i.issues.map(s=>ht(s,r,Ke())))}:{success:true,data:i.value}},Bd=ao(Tt),ga=e=>(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return oo(e)(t,n,r)},Q$=ga(Tt),_a=e=>(t,n,o)=>oo(e)(t,n,o),e0=_a(Tt),va=e=>async(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return io(e)(t,n,r)},t0=va(Tt),ya=e=>async(t,n,o)=>io(e)(t,n,o),r0=ya(Tt),Sa=e=>(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return so(e)(t,n,r)},n0=Sa(Tt),ba=e=>(t,n,o)=>so(e)(t,n,o),o0=ba(Tt),Ra=e=>async(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return ao(e)(t,n,r)},i0=Ra(Tt),Ta=e=>async(t,n,o)=>ao(e)(t,n,o),s0=Ta(Tt);var It={};or(It,{base64:()=>sm,base64url:()=>$a,bigint:()=>pm,boolean:()=>hm,browserEmail:()=>f0,cidrv4:()=>om,cidrv6:()=>im,cuid:()=>Kd,cuid2:()=>Gd,date:()=>um,datetime:()=>dm,domain:()=>_0,duration:()=>Wd,e164:()=>cm,email:()=>Qd,emoji:()=>em,extendedDuration:()=>a0,guid:()=>Yd,hex:()=>v0,hostname:()=>g0,html5Email:()=>d0,httpProtocol:()=>am,idnEmail:()=>p0,integer:()=>fm,ipv4:()=>tm,ipv6:()=>rm,ksuid:()=>Jd,lowercase:()=>vm,mac:()=>nm,md5_base64:()=>S0,md5_base64url:()=>b0,md5_hex:()=>y0,nanoid:()=>Xd,null:()=>gm,number:()=>xa,rfc5322Email:()=>m0,sha1_base64:()=>T0,sha1_base64url:()=>$0,sha1_hex:()=>R0,sha256_base64:()=>w0,sha256_base64url:()=>E0,sha256_hex:()=>x0,sha384_base64:()=>z0,sha384_base64url:()=>O0,sha384_hex:()=>I0,sha512_base64:()=>N0,sha512_base64url:()=>P0,sha512_hex:()=>k0,string:()=>mm,time:()=>lm,ulid:()=>Hd,undefined:()=>_m,unicodeEmail:()=>$v,uppercase:()=>ym,uuid:()=>wn,uuid4:()=>c0,uuid6:()=>u0,uuid7:()=>l0,xid:()=>Zd});var Kd=/^[cC][0-9a-z]{6,}$/,Gd=/^[0-9a-z]+$/,Hd=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Zd=/^[0-9a-vA-V]{20}$/,Jd=/^[A-Za-z0-9]{27}$/,Xd=/^[a-zA-Z0-9_-]{21}$/,Wd=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,a0=/^[-+]?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)?)??$/,Yd=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,wn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,c0=wn(4),u0=wn(6),l0=wn(7),Qd=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,d0=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,m0=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,$v=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,p0=$v,f0=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,h0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function em(){return new RegExp(h0,"u")}var tm=/^(?:(?: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])$/,rm=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,nm=e=>{let t=At(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},om=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,im=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,sm=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,$a=/^[A-Za-z0-9_-]*$/,g0=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,_0=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,am=/^https?$/,cm=/^\+[1-9]\d{6,14}$/,xv="(?:(?:\\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])))",um=new RegExp(`^${xv}$`);function wv(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function lm(e){return new RegExp(`^${wv(e)}$`)}function dm(e){let t=wv({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${n.join("|")})`;return new RegExp(`^${xv}T(?:${o})$`)}var mm=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},pm=/^-?\d+n?$/,fm=/^-?\d+$/,xa=/^-?\d+(?:\.\d+)?$/,hm=/^(?:true|false)$/i,gm=/^null$/i;var _m=/^undefined$/i;var vm=/^[^A-Z]*$/,ym=/^[^a-z]*$/,v0=/^[0-9a-fA-F]*$/;function ji(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Di(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var y0=/^[0-9a-fA-F]{32}$/,S0=ji(22,"=="),b0=Di(22),R0=/^[0-9a-fA-F]{40}$/,T0=ji(27,"="),$0=Di(27),x0=/^[0-9a-fA-F]{64}$/,w0=ji(43,"="),E0=Di(43),I0=/^[0-9a-fA-F]{96}$/,z0=ji(64,""),O0=Di(64),k0=/^[0-9a-fA-F]{128}$/,N0=ji(86,"=="),P0=Di(86);var Fe=P("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[]);}),Iv={number:"number",bigint:"bigint",object:"date"},wa=P("$ZodCheckLessThan",(e,t)=>{Fe.init(e,t);let n=Iv[typeof t.value];e._zod.onattach.push(o=>{let r=o._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value);}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort});};}),Ea=P("$ZodCheckGreaterThan",(e,t)=>{Fe.init(e,t);let n=Iv[typeof t.value];e._zod.onattach.push(o=>{let r=o._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value);}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort});};}),Sm=P("$ZodCheckMultipleOf",(e,t)=>{Fe.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value);}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):Nd(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort});};}),bm=P("$ZodCheckNumberFormat",(e,t)=>{Fe.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),o=n?"int":"number",[r,i]=Dd[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=r,a.maximum=i,n&&(a.pattern=fm);}),e._zod.check=s=>{let a=s.value;if(n){if(!Number.isInteger(a)){s.issues.push({expected:o,format:t.format,code:"invalid_type",continue:false,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:true,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:true,continue:!t.abort});return}}a<r&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:r,inclusive:true,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inclusive:true,inst:e,continue:!t.abort});};}),Rm=P("$ZodCheckBigIntFormat",(e,t)=>{Fe.init(e,t);let[n,o]=Ud[t.format];e._zod.onattach.push(r=>{let i=r._zod.bag;i.format=t.format,i.minimum=n,i.maximum=o;}),e._zod.check=r=>{let i=r.value;i<n&&r.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:true,inst:e,continue:!t.abort}),i>o&&r.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:true,inst:e,continue:!t.abort});};}),Tm=P("$ZodCheckMaxSize",(e,t)=>{var n;Fe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return !Tr(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum);}),e._zod.check=o=>{let r=o.value;r.size<=t.maximum||o.issues.push({origin:Ni(r),code:"too_big",maximum:t.maximum,inclusive:true,input:r,inst:e,continue:!t.abort});};}),$m=P("$ZodCheckMinSize",(e,t)=>{var n;Fe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return !Tr(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum);}),e._zod.check=o=>{let r=o.value;r.size>=t.minimum||o.issues.push({origin:Ni(r),code:"too_small",minimum:t.minimum,inclusive:true,input:r,inst:e,continue:!t.abort});};}),xm=P("$ZodCheckSizeEquals",(e,t)=>{var n;Fe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return !Tr(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size;}),e._zod.check=o=>{let r=o.value,i=r.size;if(i===t.size)return;let s=i>t.size;o.issues.push({origin:Ni(r),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:true,exact:true,input:o.value,inst:e,continue:!t.abort});};}),wm=P("$ZodCheckMaxLength",(e,t)=>{var n;Fe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return !Tr(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum);}),e._zod.check=o=>{let r=o.value;if(r.length<=t.maximum)return;let s=Pi(r);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:true,input:r,inst:e,continue:!t.abort});};}),Em=P("$ZodCheckMinLength",(e,t)=>{var n;Fe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return !Tr(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum);}),e._zod.check=o=>{let r=o.value;if(r.length>=t.minimum)return;let s=Pi(r);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:true,input:r,inst:e,continue:!t.abort});};}),Im=P("$ZodCheckLengthEquals",(e,t)=>{var n;Fe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return !Tr(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length;}),e._zod.check=o=>{let r=o.value,i=r.length;if(i===t.length)return;let s=Pi(r),a=i>t.length;o.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:true,exact:true,input:o.value,inst:e,continue:!t.abort});};}),co=P("$ZodCheckStringFormat",(e,t)=>{var n,o;Fe.init(e,t),e._zod.onattach.push(r=>{let i=r._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern));}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort});}):(o=e._zod).check??(o.check=()=>{});}),zm=P("$ZodCheckRegex",(e,t)=>{co.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort});};}),Om=P("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=vm),co.init(e,t);}),km=P("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ym),co.init(e,t);}),Nm=P("$ZodCheckIncludes",(e,t)=>{Fe.init(e,t);let n=At(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(r=>{let i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o);}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort});};}),Pm=P("$ZodCheckStartsWith",(e,t)=>{Fe.init(e,t);let n=new RegExp(`^${At(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n);}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort});};}),Am=P("$ZodCheckEndsWith",(e,t)=>{Fe.init(e,t);let n=new RegExp(`.*${At(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n);}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort});};});function Ev(e,t,n){e.issues.length&&t.issues.push(...Rt(n,e.issues));}var Cm=P("$ZodCheckProperty",(e,t)=>{Fe.init(e,t),e._zod.check=n=>{let o=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(r=>Ev(r,n,t.property));Ev(o,n,t.property);};}),Mm=P("$ZodCheckMimeType",(e,t)=>{Fe.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime;}),e._zod.check=o=>{n.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort});};}),jm=P("$ZodCheckOverwrite",(e,t)=>{Fe.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value);};});var Ui=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t);}indented(t){this.indent+=1,t(this),this.indent-=1;}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
2
+ import {realpathSync}from'fs';import {readdir,readFile,mkdir,writeFile,stat}from'fs/promises';import pn from'path';import {fileURLToPath}from'url';import M_ from'process';import {createServer}from'http';var v$=Object.defineProperty;var nr=(e,t)=>{for(var n in t)v$(e,n,{get:t[n],enumerable:true});};var y$=Object.create,ua=Object.defineProperty,S$=Object.getOwnPropertyDescriptor,b$=Object.getOwnPropertyNames,R$=Object.getPrototypeOf,T$=Object.prototype.hasOwnProperty,G=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),pv=(e,t)=>{let n={};for(var o in e)ua(n,o,{get:e[o],enumerable:true});return n},$$=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(var r=b$(t),i=0,s=r.length,a;i<s;i++)a=r[i],!T$.call(e,a)&&a!==n&&ua(e,a,{get:(c=>t[c]).bind(null,a),enumerable:!(o=S$(t,a))||o.enumerable});return e},la=(e,t,n)=>(n=e!=null?y$(R$(e)):{},$$(ua(n,"default",{value:e,enumerable:true}),e));var x$=new Set(["https://json-schema.org/draft/2020-12/schema","http://json-schema.org/draft/2020-12/schema"]),fv=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]),w$=new Set(["https://json-schema.org/draft-07/schema","http://json-schema.org/draft-07/schema"]),E$=new Set(["https://json-schema.org/draft-06/schema","http://json-schema.org/draft-06/schema"]);function hv(e){return typeof e=="string"&&fv.has(e.replace(/#$/,""))}function gv(e,t){if(!("$schema"in e)||typeof e.$schema!="string")return "2020-12";let n=e.$schema.replace(/#$/,"");if(x$.has(n))return "2020-12";if(fv.has(n))return "2019-09";if(w$.has(n)||E$.has(n))return "draft-7";throw new Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}var re={};nr(re,{$brand:()=>Id,$input:()=>Jp,$output:()=>Zp,NEVER:()=>Ei,TimePrecision:()=>Qp,ZodAny:()=>Uh,ZodArray:()=>Vh,ZodBase64:()=>jc,ZodBase64URL:()=>Dc,ZodBigInt:()=>No,ZodBigIntFormat:()=>Fc,ZodBoolean:()=>ko,ZodCIDRv4:()=>Cc,ZodCIDRv6:()=>Mc,ZodCUID:()=>Ic,ZodCUID2:()=>zc,ZodCatch:()=>ug,ZodCodec:()=>ns,ZodCustom:()=>os,ZodCustomStringFormat:()=>zo,ZodDate:()=>Qi,ZodDefault:()=>ng,ZodDiscriminatedUnion:()=>Kh,ZodE164:()=>Uc,ZodEmail:()=>$c,ZodEmoji:()=>wc,ZodEnum:()=>wo,ZodError:()=>ow,ZodExactOptional:()=>eg,ZodFile:()=>Yh,ZodFirstPartyTypeKind:()=>bg,ZodFunction:()=>vg,ZodGUID:()=>Ji,ZodIPv4:()=>Pc,ZodIPv6:()=>Ac,ZodISODate:()=>vc,ZodISODateTime:()=>_c,ZodISODuration:()=>Sc,ZodISOTime:()=>yc,ZodIntersection:()=>Gh,ZodIssueCode:()=>Rg,ZodJWT:()=>Lc,ZodKSUID:()=>Nc,ZodLazy:()=>gg,ZodLiteral:()=>Wh,ZodMAC:()=>Ch,ZodMap:()=>Jh,ZodNaN:()=>dg,ZodNanoID:()=>Ec,ZodNever:()=>Fh,ZodNonOptional:()=>Gc,ZodNull:()=>Dh,ZodNullable:()=>rg,ZodNumber:()=>Oo,ZodNumberFormat:()=>Nn,ZodObject:()=>es,ZodOptional:()=>Kc,ZodPipe:()=>rs,ZodPrefault:()=>ig,ZodPreprocess:()=>mg,ZodPromise:()=>_g,ZodReadonly:()=>pg,ZodRealError:()=>$t,ZodRecord:()=>xo,ZodSet:()=>Xh,ZodString:()=>Eo,ZodStringFormat:()=>Ue,ZodSuccess:()=>cg,ZodSymbol:()=>Mh,ZodTemplateLiteral:()=>hg,ZodTransform:()=>Qh,ZodTuple:()=>Hh,ZodType:()=>we,ZodULID:()=>Oc,ZodURL:()=>Yi,ZodUUID:()=>Xt,ZodUndefined:()=>jh,ZodUnion:()=>ts,ZodUnknown:()=>Lh,ZodVoid:()=>qh,ZodXID:()=>kc,ZodXor:()=>Bh,_ZodString:()=>Tc,_default:()=>og,_function:()=>WS,any:()=>qc,array:()=>C,base64:()=>gS,base64url:()=>_S,bigint:()=>IS,boolean:()=>ne,catch:()=>lg,check:()=>YS,cidrv4:()=>fS,cidrv6:()=>hS,clone:()=>ft,codec:()=>HS,coerce:()=>is,config:()=>Ke,core:()=>sr,cuid:()=>sS,cuid2:()=>aS,custom:()=>QS,date:()=>AS,decode:()=>Ih,decodeAsync:()=>Oh,describe:()=>eb,discriminatedUnion:()=>kr,e164:()=>vS,email:()=>xc,emoji:()=>oS,encode:()=>Eh,encodeAsync:()=>zh,endsWith:()=>go,enum:()=>ge,exactOptional:()=>tg,file:()=>VS,flattenError:()=>Ci,float32:()=>$S,float64:()=>xS,formatError:()=>Mi,fromJSONSchema:()=>sb,function:()=>WS,getErrorMap:()=>aw,globalRegistry:()=>st,gt:()=>Zt,gte:()=>gt,guid:()=>Yy,hash:()=>TS,hex:()=>RS,hostname:()=>bS,httpUrl:()=>nS,includes:()=>fo,instanceof:()=>rb,int:()=>bc,int32:()=>wS,int64:()=>zS,intersection:()=>Ft,invertCodec:()=>ZS,ipv4:()=>dS,ipv6:()=>pS,iso:()=>Ot,json:()=>ob,jwt:()=>yS,keyof:()=>CS,ksuid:()=>lS,lazy:()=>Nr,length:()=>On,literal:()=>M,locales:()=>Bi,looseObject:()=>le,looseRecord:()=>US,lowercase:()=>mo,lt:()=>Ht,lte:()=>zt,mac:()=>mS,map:()=>LS,maxLength:()=>zn,maxSize:()=>Er,meta:()=>tb,mime:()=>_o,minLength:()=>ir,minSize:()=>Jt,multipleOf:()=>wr,nan:()=>GS,nanoid:()=>iS,nativeEnum:()=>qS,negative:()=>cc,never:()=>Vc,nonnegative:()=>lc,nonoptional:()=>ag,nonpositive:()=>uc,normalize:()=>vo,null:()=>Wt,nullable:()=>Xi,nullish:()=>BS,number:()=>H,object:()=>z,optional:()=>ae,overwrite:()=>Lt,parse:()=>$h,parseAsync:()=>xh,partialRecord:()=>DS,pipe:()=>Rc,positive:()=>ac,prefault:()=>sg,preprocess:()=>ar,prettifyError:()=>Fd,promise:()=>XS,property:()=>dc,readonly:()=>fg,record:()=>te,refine:()=>yg,regex:()=>lo,regexes:()=>It,registry:()=>La,safeDecode:()=>Nh,safeDecodeAsync:()=>Ah,safeEncode:()=>kh,safeEncodeAsync:()=>Ph,safeParse:()=>Zi,safeParseAsync:()=>wh,set:()=>FS,setErrorMap:()=>sw,size:()=>In,slugify:()=>Ro,startsWith:()=>ho,strictObject:()=>MS,string:()=>g,stringFormat:()=>SS,stringbool:()=>nb,success:()=>KS,superRefine:()=>Sg,symbol:()=>kS,templateLiteral:()=>JS,toJSONSchema:()=>kn,toLowerCase:()=>So,toUpperCase:()=>bo,transform:()=>Bc,treeifyError:()=>Ld,trim:()=>yo,tuple:()=>Zh,uint32:()=>ES,uint64:()=>OS,ulid:()=>cS,undefined:()=>NS,union:()=>ie,unknown:()=>se,uppercase:()=>po,url:()=>Io,util:()=>X,uuid:()=>Qy,uuidv4:()=>eS,uuidv6:()=>tS,uuidv7:()=>rS,void:()=>PS,xid:()=>uS,xor:()=>jS});var sr={};nr(sr,{$ZodAny:()=>gp,$ZodArray:()=>bp,$ZodAsyncError:()=>Ut,$ZodBase64:()=>sp,$ZodBase64URL:()=>ap,$ZodBigInt:()=>Na,$ZodBigIntFormat:()=>mp,$ZodBoolean:()=>Li,$ZodCIDRv4:()=>np,$ZodCIDRv6:()=>op,$ZodCUID:()=>Km,$ZodCUID2:()=>Gm,$ZodCatch:()=>Up,$ZodCheck:()=>Fe,$ZodCheckBigIntFormat:()=>bm,$ZodCheckEndsWith:()=>Pm,$ZodCheckGreaterThan:()=>wa,$ZodCheckIncludes:()=>km,$ZodCheckLengthEquals:()=>Em,$ZodCheckLessThan:()=>xa,$ZodCheckLowerCase:()=>zm,$ZodCheckMaxLength:()=>xm,$ZodCheckMaxSize:()=>Rm,$ZodCheckMimeType:()=>Cm,$ZodCheckMinLength:()=>wm,$ZodCheckMinSize:()=>Tm,$ZodCheckMultipleOf:()=>ym,$ZodCheckNumberFormat:()=>Sm,$ZodCheckOverwrite:()=>Mm,$ZodCheckProperty:()=>Am,$ZodCheckRegex:()=>Im,$ZodCheckSizeEquals:()=>$m,$ZodCheckStartsWith:()=>Nm,$ZodCheckStringFormat:()=>co,$ZodCheckUpperCase:()=>Om,$ZodCodec:()=>qi,$ZodCustom:()=>Hp,$ZodCustomStringFormat:()=>lp,$ZodDate:()=>Sp,$ZodDefault:()=>Cp,$ZodDiscriminatedUnion:()=>$p,$ZodE164:()=>cp,$ZodEmail:()=>Fm,$ZodEmoji:()=>Vm,$ZodEncodeError:()=>br,$ZodEnum:()=>zp,$ZodError:()=>Ai,$ZodExactOptional:()=>Pp,$ZodFile:()=>kp,$ZodFunction:()=>Bp,$ZodGUID:()=>Um,$ZodIPv4:()=>ep,$ZodIPv6:()=>tp,$ZodISODate:()=>Wm,$ZodISODateTime:()=>Xm,$ZodISODuration:()=>Qm,$ZodISOTime:()=>Ym,$ZodIntersection:()=>xp,$ZodJWT:()=>up,$ZodKSUID:()=>Jm,$ZodLazy:()=>Gp,$ZodLiteral:()=>Op,$ZodMAC:()=>rp,$ZodMap:()=>Ep,$ZodNaN:()=>Lp,$ZodNanoID:()=>Bm,$ZodNever:()=>vp,$ZodNonOptional:()=>jp,$ZodNull:()=>hp,$ZodNullable:()=>Ap,$ZodNumber:()=>ka,$ZodNumberFormat:()=>dp,$ZodObject:()=>Hv,$ZodObjectJIT:()=>Rp,$ZodOptional:()=>Aa,$ZodPipe:()=>Ca,$ZodPrefault:()=>Mp,$ZodPreprocess:()=>Fp,$ZodPromise:()=>Kp,$ZodReadonly:()=>qp,$ZodRealError:()=>Tt,$ZodRecord:()=>wp,$ZodRegistry:()=>Ua,$ZodSet:()=>Ip,$ZodString:()=>En,$ZodStringFormat:()=>De,$ZodSuccess:()=>Dp,$ZodSymbol:()=>pp,$ZodTemplateLiteral:()=>Vp,$ZodTransform:()=>Np,$ZodTuple:()=>Pa,$ZodType:()=>_e,$ZodULID:()=>Hm,$ZodURL:()=>qm,$ZodUUID:()=>Lm,$ZodUndefined:()=>fp,$ZodUnion:()=>Fi,$ZodUnknown:()=>_p,$ZodVoid:()=>yp,$ZodXID:()=>Zm,$ZodXor:()=>Tp,$brand:()=>Id,$constructor:()=>P,$input:()=>Jp,$output:()=>Zp,Doc:()=>Ui,JSONSchema:()=>Jy,JSONSchemaGenerator:()=>hc,NEVER:()=>Ei,TimePrecision:()=>Qp,_any:()=>bf,_array:()=>If,_base64:()=>nc,_base64url:()=>oc,_bigint:()=>ff,_boolean:()=>mf,_catch:()=>Xx,_check:()=>Zy,_cidrv4:()=>tc,_cidrv6:()=>rc,_coercedBigint:()=>hf,_coercedBoolean:()=>pf,_coercedDate:()=>wf,_coercedNumber:()=>sf,_coercedString:()=>Wp,_cuid:()=>Za,_cuid2:()=>Ja,_custom:()=>Of,_date:()=>xf,_decode:()=>ga,_decodeAsync:()=>va,_default:()=>Hx,_discriminatedUnion:()=>Cx,_e164:()=>ic,_email:()=>Fa,_emoji:()=>Ga,_encode:()=>ha,_encodeAsync:()=>_a,_endsWith:()=>go,_enum:()=>Fx,_file:()=>zf,_float32:()=>cf,_float64:()=>uf,_gt:()=>Zt,_gte:()=>gt,_guid:()=>Ki,_includes:()=>fo,_int:()=>af,_int32:()=>lf,_int64:()=>gf,_intersection:()=>Mx,_ipv4:()=>Qa,_ipv6:()=>ec,_isoDate:()=>tf,_isoDateTime:()=>ef,_isoDuration:()=>nf,_isoTime:()=>rf,_jwt:()=>sc,_ksuid:()=>Ya,_lazy:()=>ew,_length:()=>On,_literal:()=>Vx,_lowercase:()=>mo,_lt:()=>Ht,_lte:()=>zt,_mac:()=>Yp,_map:()=>Ux,_max:()=>zt,_maxLength:()=>zn,_maxSize:()=>Er,_mime:()=>_o,_min:()=>gt,_minLength:()=>ir,_minSize:()=>Jt,_multipleOf:()=>wr,_nan:()=>Ef,_nanoid:()=>Ha,_nativeEnum:()=>qx,_negative:()=>cc,_never:()=>Tf,_nonnegative:()=>lc,_nonoptional:()=>Zx,_nonpositive:()=>uc,_normalize:()=>vo,_null:()=>Sf,_nullable:()=>Gx,_number:()=>of,_optional:()=>Kx,_overwrite:()=>Lt,_parse:()=>oo,_parseAsync:()=>io,_pipe:()=>Wx,_positive:()=>ac,_promise:()=>tw,_property:()=>dc,_readonly:()=>Yx,_record:()=>Dx,_refine:()=>kf,_regex:()=>lo,_safeDecode:()=>Sa,_safeDecodeAsync:()=>Ra,_safeEncode:()=>ya,_safeEncodeAsync:()=>ba,_safeParse:()=>so,_safeParseAsync:()=>ao,_set:()=>Lx,_size:()=>In,_slugify:()=>Ro,_startsWith:()=>ho,_string:()=>Xp,_stringFormat:()=>To,_stringbool:()=>Cf,_success:()=>Jx,_superRefine:()=>Nf,_symbol:()=>vf,_templateLiteral:()=>Qx,_toLowerCase:()=>So,_toUpperCase:()=>bo,_transform:()=>Bx,_trim:()=>yo,_tuple:()=>jx,_uint32:()=>df,_uint64:()=>_f,_ulid:()=>Xa,_undefined:()=>yf,_union:()=>Px,_unknown:()=>Rf,_uppercase:()=>po,_url:()=>Gi,_uuid:()=>qa,_uuidv4:()=>Va,_uuidv6:()=>Ba,_uuidv7:()=>Ka,_void:()=>$f,_xid:()=>Wa,_xor:()=>Ax,clone:()=>ft,config:()=>Ke,createStandardJSONSchemaMethod:()=>$o,createToJSONSchemaMethod:()=>Mf,decode:()=>t0,decodeAsync:()=>n0,describe:()=>Pf,encode:()=>e0,encodeAsync:()=>r0,extractDefs:()=>zr,finalize:()=>Or,flattenError:()=>Ci,formatError:()=>Mi,globalConfig:()=>$n,globalRegistry:()=>st,initializeContext:()=>Ir,isValidBase64:()=>ip,isValidBase64URL:()=>Vv,isValidJWT:()=>Bv,locales:()=>Bi,meta:()=>Af,parse:()=>pa,parseAsync:()=>fa,prettifyError:()=>Fd,process:()=>Ce,regexes:()=>It,registry:()=>La,safeDecode:()=>i0,safeDecodeAsync:()=>a0,safeEncode:()=>o0,safeEncodeAsync:()=>s0,safeParse:()=>qd,safeParseAsync:()=>Vd,toDotPath:()=>Rv,toJSONSchema:()=>kn,treeifyError:()=>Ld,util:()=>X,version:()=>jm});var _v,Ei=Object.freeze({status:"aborted"});function P(e,t,n){function o(a,c){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:c,constr:s,traits:new Set},enumerable:false}),a._zod.traits.has(e))return;a._zod.traits.add(e),t(a,c);let u=s.prototype,l=Object.keys(u);for(let m=0;m<l.length;m++){let h=l[m];h in a||(a[h]=u[h].bind(a));}}let r=n?.Parent??Object;class i extends r{}Object.defineProperty(i,"name",{value:e});function s(a){var c;let u=n?.Parent?new i:this;o(u,a),(c=u._zod).deferred??(c.deferred=[]);for(let l of u._zod.deferred)l();return u}return Object.defineProperty(s,"init",{value:o}),Object.defineProperty(s,Symbol.hasInstance,{value:a=>n?.Parent&&a instanceof n.Parent?true:a?._zod?.traits?.has(e)}),Object.defineProperty(s,"name",{value:e}),s}var Id=Symbol("zod_brand"),Ut=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");}},br=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError";}};(_v=globalThis).__zod_globalConfig??(_v.__zod_globalConfig={});var $n=globalThis.__zod_globalConfig;function Ke(e){return e&&Object.assign($n,e),$n}var X={};nr(X,{BIGINT_FORMAT_RANGES:()=>Dd,Class:()=>Od,NUMBER_FORMAT_RANGES:()=>jd,aborted:()=>xr,allowsEval:()=>Pd,assert:()=>N$,assertEqual:()=>I$,assertIs:()=>O$,assertNever:()=>k$,assertNotEqual:()=>z$,assignProp:()=>Tr,base64ToUint8Array:()=>yv,base64urlToUint8Array:()=>J$,cached:()=>ro,captureStackTrace:()=>ma,cleanEnum:()=>Z$,cleanRegex:()=>Oi,clone:()=>ft,cloneDef:()=>A$,createTransparentProxy:()=>L$,defineLazy:()=>Oe,esc:()=>da,escapeRegex:()=>At,explicitlyAborted:()=>Ud,extend:()=>V$,finalizeIssue:()=>ht,floatSafeRemainder:()=>kd,getElementAtPath:()=>C$,getEnumValues:()=>zi,getLengthableOrigin:()=>Pi,getParsedType:()=>U$,getSizableOrigin:()=>Ni,hexToUint8Array:()=>W$,isObject:()=>xn,isPlainObject:()=>$r,issue:()=>no,joinValues:()=>D,jsonStringifyReplacer:()=>to,merge:()=>K$,mergeDefs:()=>or,normalizeParams:()=>W,nullish:()=>Rr,numKeys:()=>D$,objectClone:()=>P$,omit:()=>q$,optionalKeys:()=>Md,parsedType:()=>J,partial:()=>G$,pick:()=>F$,prefixIssues:()=>Rt,primitiveTypes:()=>Cd,promiseAllObject:()=>M$,propertyKeyTypes:()=>ki,randomString:()=>j$,required:()=>H$,safeExtend:()=>B$,shallowClone:()=>Ad,slugify:()=>Nd,stringifyPrimitive:()=>Z,uint8ArrayToBase64:()=>Sv,uint8ArrayToBase64url:()=>X$,uint8ArrayToHex:()=>Y$,unwrapMessage:()=>Ii});function I$(e){return e}function z$(e){return e}function O$(e){}function k$(e){throw new Error("Unexpected value in exhaustive check")}function N$(e){}function zi(e){let t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,r])=>t.indexOf(+o)===-1).map(([o,r])=>r)}function D(e,t="|"){return e.map(n=>Z(n)).join(t)}function to(e,t){return typeof t=="bigint"?t.toString():t}function ro(e){return {get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}}}}function Rr(e){return e==null}function Oi(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function kd(e,t){let n=e/t,o=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-o)<r?0:n-o}var vv=Symbol("evaluating");function Oe(e,t,n){let o;Object.defineProperty(e,t,{get(){if(o!==vv)return o===void 0&&(o=vv,o=n()),o},set(r){Object.defineProperty(e,t,{value:r});},configurable:true});}function P$(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Tr(e,t,n){Object.defineProperty(e,t,{value:n,writable:true,enumerable:true,configurable:true});}function or(...e){let t={};for(let n of e){let o=Object.getOwnPropertyDescriptors(n);Object.assign(t,o);}return Object.defineProperties({},t)}function A$(e){return or(e._zod.def)}function C$(e,t){return t?t.reduce((n,o)=>n?.[o],e):e}function M$(e){let t=Object.keys(e),n=t.map(o=>e[o]);return Promise.all(n).then(o=>{let r={};for(let i=0;i<t.length;i++)r[t[i]]=o[i];return r})}function j$(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let o=0;o<e;o++)n+=t[Math.floor(Math.random()*t.length)];return n}function da(e){return JSON.stringify(e)}function Nd(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var ma="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function xn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Pd=ro(()=>{if($n.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return false;try{let e=Function;return new e(""),!0}catch{return false}});function $r(e){if(xn(e)===false)return false;let t=e.constructor;if(t===void 0||typeof t!="function")return true;let n=t.prototype;return !(xn(n)===false||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===false)}function Ad(e){return $r(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function D$(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var U$=e=>{let t=typeof e;switch(t){case "undefined":return "undefined";case "string":return "string";case "number":return Number.isNaN(e)?"nan":"number";case "boolean":return "boolean";case "function":return "function";case "bigint":return "bigint";case "symbol":return "symbol";case "object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},ki=new Set(["string","number","symbol"]),Cd=new Set(["string","number","bigint","boolean","symbol","undefined"]);function At(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ft(e,t,n){let o=new e._zod.constr(t??e._zod.def);return (!t||n?.parent)&&(o._zod.parent=e),o}function W(e){let t=e;if(!t)return {};if(typeof t=="string")return {error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message;}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function L$(e){let t;return new Proxy({},{get(n,o,r){return t??(t=e()),Reflect.get(t,o,r)},set(n,o,r,i){return t??(t=e()),Reflect.set(t,o,r,i)},has(n,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(n,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(n,o,r){return t??(t=e()),Reflect.defineProperty(t,o,r)}})}function Z(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Md(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var jd={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Dd={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function F$(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let i=or(e._zod.def,{get shape(){let s={};for(let a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&(s[a]=n.shape[a]);}return Tr(this,"shape",s),s},checks:[]});return ft(e,i)}function q$(e,t){let n=e._zod.def,o=n.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let i=or(e._zod.def,{get shape(){let s={...e._zod.def.shape};for(let a in t){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);t[a]&&delete s[a];}return Tr(this,"shape",s),s},checks:[]});return ft(e,i)}function V$(e,t){if(!$r(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let i=e._zod.def.shape;for(let s in t)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=or(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return Tr(this,"shape",i),i}});return ft(e,r)}function B$(e,t){if(!$r(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=or(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Tr(this,"shape",o),o}});return ft(e,n)}function K$(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=or(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t._zod.def.shape};return Tr(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return ft(e,n)}function G$(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let s=or(t._zod.def,{get shape(){let a=t._zod.def.shape,c={...a};if(n)for(let u in n){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(c[u]=e?new e({type:"optional",innerType:a[u]}):a[u]);}else for(let u in a)c[u]=e?new e({type:"optional",innerType:a[u]}):a[u];return Tr(this,"shape",c),c},checks:[]});return ft(t,s)}function H$(e,t,n){let o=or(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let s in n){if(!(s in i))throw new Error(`Unrecognized key: "${s}"`);n[s]&&(i[s]=new e({type:"nonoptional",innerType:r[s]}));}else for(let s in r)i[s]=new e({type:"nonoptional",innerType:r[s]});return Tr(this,"shape",i),i}});return ft(t,o)}function xr(e,t=0){if(e.aborted===true)return true;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==true)return true;return false}function Ud(e,t=0){if(e.aborted===true)return true;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===false)return true;return false}function Rt(e,t){return t.map(n=>{var o;return (o=n).path??(o.path=[]),n.path.unshift(e),n})}function Ii(e){return typeof e=="string"?e:e?.message}function ht(e,t,n){let o=e.message?e.message:Ii(e.inst?._zod.def?.error?.(e))??Ii(t?.error?.(e))??Ii(n.customError?.(e))??Ii(n.localeError?.(e))??"Invalid input",{inst:r,continue:i,input:s,...a}=e;return a.path??(a.path=[]),a.message=o,t?.reportInput&&(a.input=s),a}function Ni(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Pi(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function J(e){let t=typeof e;switch(t){case "number":return Number.isNaN(e)?"nan":"number";case "object":{if(e===null)return "null";if(Array.isArray(e))return "array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function no(...e){let[t,n,o]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:o}:{...t}}function Z$(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function yv(e){let t=atob(e),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}function Sv(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function J$(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return yv(t+n)}function X$(e){return Sv(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function W$(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)n[o/2]=Number.parseInt(t.slice(o,o+2),16);return n}function Y$(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Od=class{constructor(...t){}};var bv=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:false}),Object.defineProperty(e,"issues",{value:t,enumerable:false}),e.message=JSON.stringify(t,to,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:false});},Ai=P("$ZodError",bv),Tt=P("$ZodError",bv,{Parent:Error});function Ci(e,t=n=>n.message){let n={},o=[];for(let r of e.issues)r.path.length>0?(n[r.path[0]]=n[r.path[0]]||[],n[r.path[0]].push(t(r))):o.push(t(r));return {formErrors:o,fieldErrors:n}}function Mi(e,t=n=>n.message){let n={_errors:[]},o=(r,i=[])=>{for(let s of r.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(a=>o({issues:a},[...i,...s.path]));else if(s.code==="invalid_key")o({issues:s.issues},[...i,...s.path]);else if(s.code==="invalid_element")o({issues:s.issues},[...i,...s.path]);else {let a=[...i,...s.path];if(a.length===0)n._errors.push(t(s));else {let c=n,u=0;for(;u<a.length;){let l=a[u];u===a.length-1?(c[l]=c[l]||{_errors:[]},c[l]._errors.push(t(s))):c[l]=c[l]||{_errors:[]},c=c[l],u++;}}}};return o(e),n}function Ld(e,t=n=>n.message){let n={errors:[]},o=(r,i=[])=>{var s,a;for(let c of r.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>o({issues:u},[...i,...c.path]));else if(c.code==="invalid_key")o({issues:c.issues},[...i,...c.path]);else if(c.code==="invalid_element")o({issues:c.issues},[...i,...c.path]);else {let u=[...i,...c.path];if(u.length===0){n.errors.push(t(c));continue}let l=n,m=0;for(;m<u.length;){let h=u[m],y=m===u.length-1;typeof h=="string"?(l.properties??(l.properties={}),(s=l.properties)[h]??(s[h]={errors:[]}),l=l.properties[h]):(l.items??(l.items=[]),(a=l.items)[h]??(a[h]={errors:[]}),l=l.items[h]),y&&l.errors.push(t(c)),m++;}}};return o(e),n}function Rv(e){let t=[],n=e.map(o=>typeof o=="object"?o.key:o);for(let o of n)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function Fd(e){let t=[],n=[...e.issues].sort((o,r)=>(o.path??[]).length-(r.path??[]).length);for(let o of n)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${Rv(o.path)}`);return t.join(`
3
+ `)}var oo=e=>(t,n,o,r)=>{let i=o?{...o,async:false}:{async:false},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new Ut;if(s.issues.length){let a=new(r?.Err??e)(s.issues.map(c=>ht(c,i,Ke())));throw ma(a,r?.callee),a}return s.value},pa=oo(Tt),io=e=>async(t,n,o,r)=>{let i=o?{...o,async:true}:{async:true},s=t._zod.run({value:n,issues:[]},i);if(s instanceof Promise&&(s=await s),s.issues.length){let a=new(r?.Err??e)(s.issues.map(c=>ht(c,i,Ke())));throw ma(a,r?.callee),a}return s.value},fa=io(Tt),so=e=>(t,n,o)=>{let r=o?{...o,async:false}:{async:false},i=t._zod.run({value:n,issues:[]},r);if(i instanceof Promise)throw new Ut;return i.issues.length?{success:false,error:new(e??Ai)(i.issues.map(s=>ht(s,r,Ke())))}:{success:true,data:i.value}},qd=so(Tt),ao=e=>async(t,n,o)=>{let r=o?{...o,async:true}:{async:true},i=t._zod.run({value:n,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length?{success:false,error:new e(i.issues.map(s=>ht(s,r,Ke())))}:{success:true,data:i.value}},Vd=ao(Tt),ha=e=>(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return oo(e)(t,n,r)},e0=ha(Tt),ga=e=>(t,n,o)=>oo(e)(t,n,o),t0=ga(Tt),_a=e=>async(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return io(e)(t,n,r)},r0=_a(Tt),va=e=>async(t,n,o)=>io(e)(t,n,o),n0=va(Tt),ya=e=>(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return so(e)(t,n,r)},o0=ya(Tt),Sa=e=>(t,n,o)=>so(e)(t,n,o),i0=Sa(Tt),ba=e=>async(t,n,o)=>{let r=o?{...o,direction:"backward"}:{direction:"backward"};return ao(e)(t,n,r)},s0=ba(Tt),Ra=e=>async(t,n,o)=>ao(e)(t,n,o),a0=Ra(Tt);var It={};nr(It,{base64:()=>im,base64url:()=>Ta,bigint:()=>mm,boolean:()=>fm,browserEmail:()=>h0,cidrv4:()=>nm,cidrv6:()=>om,cuid:()=>Bd,cuid2:()=>Kd,date:()=>cm,datetime:()=>lm,domain:()=>v0,duration:()=>Xd,e164:()=>am,email:()=>Yd,emoji:()=>Qd,extendedDuration:()=>c0,guid:()=>Wd,hex:()=>y0,hostname:()=>_0,html5Email:()=>m0,httpProtocol:()=>sm,idnEmail:()=>f0,integer:()=>pm,ipv4:()=>em,ipv6:()=>tm,ksuid:()=>Zd,lowercase:()=>_m,mac:()=>rm,md5_base64:()=>b0,md5_base64url:()=>R0,md5_hex:()=>S0,nanoid:()=>Jd,null:()=>hm,number:()=>$a,rfc5322Email:()=>p0,sha1_base64:()=>$0,sha1_base64url:()=>x0,sha1_hex:()=>T0,sha256_base64:()=>E0,sha256_base64url:()=>I0,sha256_hex:()=>w0,sha384_base64:()=>O0,sha384_base64url:()=>k0,sha384_hex:()=>z0,sha512_base64:()=>P0,sha512_base64url:()=>A0,sha512_hex:()=>N0,string:()=>dm,time:()=>um,ulid:()=>Gd,undefined:()=>gm,unicodeEmail:()=>Tv,uppercase:()=>vm,uuid:()=>wn,uuid4:()=>u0,uuid6:()=>l0,uuid7:()=>d0,xid:()=>Hd});var Bd=/^[cC][0-9a-z]{6,}$/,Kd=/^[0-9a-z]+$/,Gd=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Hd=/^[0-9a-vA-V]{20}$/,Zd=/^[A-Za-z0-9]{27}$/,Jd=/^[a-zA-Z0-9_-]{21}$/,Xd=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,c0=/^[-+]?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)?)??$/,Wd=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,wn=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,u0=wn(4),l0=wn(6),d0=wn(7),Yd=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,m0=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,p0=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Tv=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,f0=Tv,h0=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,g0="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Qd(){return new RegExp(g0,"u")}var em=/^(?:(?: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])$/,tm=/^(([0-9a-fA-F]{1,4}:){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}|:))$/,rm=e=>{let t=At(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},nm=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,om=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,im=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ta=/^[A-Za-z0-9_-]*$/,_0=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,v0=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,sm=/^https?$/,am=/^\+[1-9]\d{6,14}$/,$v="(?:(?:\\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])))",cm=new RegExp(`^${$v}$`);function xv(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function um(e){return new RegExp(`^${xv(e)}$`)}function lm(e){let t=xv({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${t}(?:${n.join("|")})`;return new RegExp(`^${$v}T(?:${o})$`)}var dm=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},mm=/^-?\d+n?$/,pm=/^-?\d+$/,$a=/^-?\d+(?:\.\d+)?$/,fm=/^(?:true|false)$/i,hm=/^null$/i;var gm=/^undefined$/i;var _m=/^[^A-Z]*$/,vm=/^[^a-z]*$/,y0=/^[0-9a-fA-F]*$/;function ji(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Di(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var S0=/^[0-9a-fA-F]{32}$/,b0=ji(22,"=="),R0=Di(22),T0=/^[0-9a-fA-F]{40}$/,$0=ji(27,"="),x0=Di(27),w0=/^[0-9a-fA-F]{64}$/,E0=ji(43,"="),I0=Di(43),z0=/^[0-9a-fA-F]{96}$/,O0=ji(64,""),k0=Di(64),N0=/^[0-9a-fA-F]{128}$/,P0=ji(86,"=="),A0=Di(86);var Fe=P("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[]);}),Ev={number:"number",bigint:"bigint",object:"date"},xa=P("$ZodCheckLessThan",(e,t)=>{Fe.init(e,t);let n=Ev[typeof t.value];e._zod.onattach.push(o=>{let r=o._zod.bag,i=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value);}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort});};}),wa=P("$ZodCheckGreaterThan",(e,t)=>{Fe.init(e,t);let n=Ev[typeof t.value];e._zod.onattach.push(o=>{let r=o._zod.bag,i=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value);}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort});};}),ym=P("$ZodCheckMultipleOf",(e,t)=>{Fe.init(e,t),e._zod.onattach.push(n=>{var o;(o=n._zod.bag).multipleOf??(o.multipleOf=t.value);}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):kd(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort});};}),Sm=P("$ZodCheckNumberFormat",(e,t)=>{Fe.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),o=n?"int":"number",[r,i]=jd[t.format];e._zod.onattach.push(s=>{let a=s._zod.bag;a.format=t.format,a.minimum=r,a.maximum=i,n&&(a.pattern=pm);}),e._zod.check=s=>{let a=s.value;if(n){if(!Number.isInteger(a)){s.issues.push({expected:o,format:t.format,code:"invalid_type",continue:false,input:a,inst:e});return}if(!Number.isSafeInteger(a)){a>0?s.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:true,continue:!t.abort}):s.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:true,continue:!t.abort});return}}a<r&&s.issues.push({origin:"number",input:a,code:"too_small",minimum:r,inclusive:true,inst:e,continue:!t.abort}),a>i&&s.issues.push({origin:"number",input:a,code:"too_big",maximum:i,inclusive:true,inst:e,continue:!t.abort});};}),bm=P("$ZodCheckBigIntFormat",(e,t)=>{Fe.init(e,t);let[n,o]=Dd[t.format];e._zod.onattach.push(r=>{let i=r._zod.bag;i.format=t.format,i.minimum=n,i.maximum=o;}),e._zod.check=r=>{let i=r.value;i<n&&r.issues.push({origin:"bigint",input:i,code:"too_small",minimum:n,inclusive:true,inst:e,continue:!t.abort}),i>o&&r.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:true,inst:e,continue:!t.abort});};}),Rm=P("$ZodCheckMaxSize",(e,t)=>{var n;Fe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return !Rr(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum);}),e._zod.check=o=>{let r=o.value;r.size<=t.maximum||o.issues.push({origin:Ni(r),code:"too_big",maximum:t.maximum,inclusive:true,input:r,inst:e,continue:!t.abort});};}),Tm=P("$ZodCheckMinSize",(e,t)=>{var n;Fe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return !Rr(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum);}),e._zod.check=o=>{let r=o.value;r.size>=t.minimum||o.issues.push({origin:Ni(r),code:"too_small",minimum:t.minimum,inclusive:true,input:r,inst:e,continue:!t.abort});};}),$m=P("$ZodCheckSizeEquals",(e,t)=>{var n;Fe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return !Rr(r)&&r.size!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size;}),e._zod.check=o=>{let r=o.value,i=r.size;if(i===t.size)return;let s=i>t.size;o.issues.push({origin:Ni(r),...s?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:true,exact:true,input:o.value,inst:e,continue:!t.abort});};}),xm=P("$ZodCheckMaxLength",(e,t)=>{var n;Fe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return !Rr(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(o._zod.bag.maximum=t.maximum);}),e._zod.check=o=>{let r=o.value;if(r.length<=t.maximum)return;let s=Pi(r);o.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:true,input:r,inst:e,continue:!t.abort});};}),wm=P("$ZodCheckMinLength",(e,t)=>{var n;Fe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return !Rr(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(o._zod.bag.minimum=t.minimum);}),e._zod.check=o=>{let r=o.value;if(r.length>=t.minimum)return;let s=Pi(r);o.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:true,input:r,inst:e,continue:!t.abort});};}),Em=P("$ZodCheckLengthEquals",(e,t)=>{var n;Fe.init(e,t),(n=e._zod.def).when??(n.when=o=>{let r=o.value;return !Rr(r)&&r.length!==void 0}),e._zod.onattach.push(o=>{let r=o._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length;}),e._zod.check=o=>{let r=o.value,i=r.length;if(i===t.length)return;let s=Pi(r),a=i>t.length;o.issues.push({origin:s,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:true,exact:true,input:o.value,inst:e,continue:!t.abort});};}),co=P("$ZodCheckStringFormat",(e,t)=>{var n,o;Fe.init(e,t),e._zod.onattach.push(r=>{let i=r._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern));}),t.pattern?(n=e._zod).check??(n.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:t.format,input:r.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort});}):(o=e._zod).check??(o.check=()=>{});}),Im=P("$ZodCheckRegex",(e,t)=>{co.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort});};}),zm=P("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=_m),co.init(e,t);}),Om=P("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=vm),co.init(e,t);}),km=P("$ZodCheckIncludes",(e,t)=>{Fe.init(e,t);let n=At(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(r=>{let i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o);}),e._zod.check=r=>{r.value.includes(t.includes,t.position)||r.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:r.value,inst:e,continue:!t.abort});};}),Nm=P("$ZodCheckStartsWith",(e,t)=>{Fe.init(e,t);let n=new RegExp(`^${At(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n);}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort});};}),Pm=P("$ZodCheckEndsWith",(e,t)=>{Fe.init(e,t);let n=new RegExp(`.*${At(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(o=>{let r=o._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n);}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort});};});function wv(e,t,n){e.issues.length&&t.issues.push(...Rt(n,e.issues));}var Am=P("$ZodCheckProperty",(e,t)=>{Fe.init(e,t),e._zod.check=n=>{let o=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(r=>wv(r,n,t.property));wv(o,n,t.property);};}),Cm=P("$ZodCheckMimeType",(e,t)=>{Fe.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime;}),e._zod.check=o=>{n.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort});};}),Mm=P("$ZodCheckOverwrite",(e,t)=>{Fe.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value);};});var Ui=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t);}indented(t){this.indent+=1,t(this),this.indent-=1;}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let o=t.split(`
4
4
  `).filter(s=>s),r=Math.min(...o.map(s=>s.length-s.trimStart().length)),i=o.map(s=>s.slice(r)).map(s=>" ".repeat(this.indent*2)+s);for(let s of i)this.content.push(s);}compile(){let t=Function,n=this?.args,r=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...n,r.join(`
5
- `))}};var Dm={major:4,minor:4,patch:3};var _e=P("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Dm;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let r of o)for(let i of r._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse;});else {let r=(s,a,c)=>{let u=wr(s),l;for(let m of a){if(m._zod.def.when){if(Ld(s)||!m._zod.def.when(s))continue}else if(u)continue;let h=s.issues.length,y=m._zod.check(s);if(y instanceof Promise&&c?.async===false)throw new Ut;if(l||y instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await y,s.issues.length!==h&&(u||(u=wr(s,h)));});else {if(s.issues.length===h)continue;u||(u=wr(s,h));}}return l?l.then(()=>s):s},i=(s,a,c)=>{if(wr(s))return s.aborted=true,s;let u=r(a,o,c);if(u instanceof Promise){if(c.async===false)throw new Ut;return u.then(l=>e._zod.parse(l,c))}return e._zod.parse(u,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){let u=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:true});return u instanceof Promise?u.then(l=>i(l,s,a)):i(u,s,a)}let c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===false)throw new Ut;return c.then(u=>r(u,o,a))}return r(c,o,a)};}Oe(e,"~standard",()=>({validate:r=>{try{let i=Vd(e,r);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Bd(e,r).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}));}),En=P("$ZodString",(e,t)=>{_e.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??mm(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value);}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n};}),De=P("$ZodStringFormat",(e,t)=>{co.init(e,t),En.init(e,t);}),Lm=P("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Yd),De.init(e,t);}),Fm=P("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=wn(o));}else t.pattern??(t.pattern=wn());De.init(e,t);}),qm=P("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Qd),De.init(e,t);}),Vm=P("$ZodURL",(e,t)=>{De.init(e,t),e._zod.check=n=>{try{let o=n.value.trim();if(!t.normalize&&t.protocol?.source===am.source&&!/^https?:\/\//i.test(o)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}let r=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort});}};}),Bm=P("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=em()),De.init(e,t);}),Km=P("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Xd),De.init(e,t);}),Gm=P("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Kd),De.init(e,t);}),Hm=P("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Gd),De.init(e,t);}),Zm=P("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Hd),De.init(e,t);}),Jm=P("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Zd),De.init(e,t);}),Xm=P("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Jd),De.init(e,t);}),Wm=P("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=dm(t)),De.init(e,t);}),Ym=P("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=um),De.init(e,t);}),Qm=P("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=lm(t)),De.init(e,t);}),ep=P("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Wd),De.init(e,t);}),tp=P("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=tm),De.init(e,t),e._zod.bag.format="ipv4";}),rp=P("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=rm),De.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`);}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort});}};}),np=P("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=nm(t.delimiter)),De.init(e,t),e._zod.bag.format="mac";}),op=P("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=om),De.init(e,t);}),ip=P("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=im),De.init(e,t),e._zod.check=n=>{let o=n.value.split("/");try{if(o.length!==2)throw new Error;let[r,i]=o;if(!i)throw new Error;let s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${r}]`);}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort});}};});function sp(e){if(e==="")return true;if(/\s/.test(e)||e.length%4!==0)return false;try{return atob(e),!0}catch{return false}}var ap=P("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=sm),De.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{sp(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort});};});function Bv(e){if(!$a.test(e))return false;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return sp(n)}var cp=P("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=$a),De.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Bv(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort});};}),up=P("$ZodE164",(e,t)=>{t.pattern??(t.pattern=cm),De.init(e,t);});function Kv(e,t=null){try{let n=e.split(".");if(n.length!==3)return !1;let[o]=n;if(!o)return !1;let r=JSON.parse(atob(o));return !("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return false}}var lp=P("$ZodJWT",(e,t)=>{De.init(e,t),e._zod.check=n=>{Kv(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort});};}),dp=P("$ZodCustomStringFormat",(e,t)=>{De.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort});};}),Na=P("$ZodNumber",(e,t)=>{_e.init(e,t),e._zod.pattern=e._zod.bag.pattern??xa,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value);}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let i=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...i?{received:i}:{}}),n};}),mp=P("$ZodNumberFormat",(e,t)=>{bm.init(e,t),Na.init(e,t);}),Li=P("$ZodBoolean",(e,t)=>{_e.init(e,t),e._zod.pattern=hm,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=!!n.value;}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n};}),Pa=P("$ZodBigInt",(e,t)=>{_e.init(e,t),e._zod.pattern=pm,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=BigInt(n.value);}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n};}),pp=P("$ZodBigIntFormat",(e,t)=>{Rm.init(e,t),Pa.init(e,t);}),fp=P("$ZodSymbol",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n};}),hp=P("$ZodUndefined",(e,t)=>{_e.init(e,t),e._zod.pattern=_m,e._zod.values=new Set([void 0]),e._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n};}),gp=P("$ZodNull",(e,t)=>{_e.init(e,t),e._zod.pattern=gm,e._zod.values=new Set([null]),e._zod.parse=(n,o)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n};}),_p=P("$ZodAny",(e,t)=>{_e.init(e,t),e._zod.parse=n=>n;}),vp=P("$ZodUnknown",(e,t)=>{_e.init(e,t),e._zod.parse=n=>n;}),yp=P("$ZodNever",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n);}),Sp=P("$ZodVoid",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n};}),bp=P("$ZodDate",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=new Date(n.value);}catch{}let r=n.value,i=r instanceof Date;return i&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...i?{received:"Invalid Date"}:{},inst:e}),n};});function Ov(e,t,n){e.issues.length&&t.issues.push(...Rt(n,e.issues)),t.value[n]=e.value;}var Rp=P("$ZodArray",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let i=[];for(let s=0;s<r.length;s++){let a=r[s],c=t.element._zod.run({value:a,issues:[]},o);c instanceof Promise?i.push(c.then(u=>Ov(u,n,s))):Ov(c,n,s);}return i.length?Promise.all(i).then(()=>n):n};});function ka(e,t,n,o,r,i){let s=n in o;if(e.issues.length){if(r&&i&&!s)return;t.issues.push(...Rt(n,e.issues));}if(!s&&!r){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?s&&(t.value[n]=void 0):t.value[n]=e.value;}function Gv(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let n=jd(e.shape);return {...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Hv(e,t,n,o,r,i){let s=[],a=r.keySet,c=r.catchall._zod,u=c.def.type,l=c.optin==="optional",m=c.optout==="optional";for(let h in t){if(h==="__proto__"||a.has(h))continue;if(u==="never"){s.push(h);continue}let y=c.run({value:t[h],issues:[]},o);y instanceof Promise?e.push(y.then(b=>ka(b,n,h,t,l,m))):ka(y,n,h,t,l,m);}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}var Zv=P("$ZodObject",(e,t)=>{if(_e.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...a};return Object.defineProperty(t,"shape",{value:c}),c}});}let o=ro(()=>Gv(t));Oe(e._zod,"propValues",()=>{let a=t.shape,c={};for(let u in a){let l=a[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(let m of l.values)c[u].add(m);}}return c});let r=xn,i=t.catchall,s;e._zod.parse=(a,c)=>{s??(s=o.value);let u=a.value;if(!r(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};let l=[],m=s.shape;for(let h of s.keys){let y=m[h],b=y._zod.optin==="optional",p=y._zod.optout==="optional",S=y._zod.run({value:u[h],issues:[]},c);S instanceof Promise?l.push(S.then(d=>ka(d,a,h,u,b,p))):ka(S,a,h,u,b,p);}return i?Hv(l,u,a,c,o.value,e):l.length?Promise.all(l).then(()=>a):a};}),Tp=P("$ZodObjectJIT",(e,t)=>{Zv.init(e,t);let n=e._zod.parse,o=ro(()=>Gv(t)),r=h=>{let y=new Ui(["shape","payload","ctx"]),b=o.value,p=f=>{let v=ma(f);return `shape[${v}]._zod.run({ value: input[${v}], issues: [] }, ctx)`};y.write("const input = payload.value;");let S=Object.create(null),d=0;for(let f of b.keys)S[f]=`key_${d++}`;y.write("const newResult = {};");for(let f of b.keys){let v=S[f],x=ma(f),T=h[f],R=T?._zod?.optin==="optional",$=T?._zod?.optout==="optional";y.write(`const ${v} = ${p(f)};`),R&&$?y.write(`
5
+ `))}};var jm={major:4,minor:4,patch:3};var _e=P("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=jm;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let r of o)for(let i of r._zod.onattach)i(e);if(o.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse;});else {let r=(s,a,c)=>{let u=xr(s),l;for(let m of a){if(m._zod.def.when){if(Ud(s)||!m._zod.def.when(s))continue}else if(u)continue;let h=s.issues.length,y=m._zod.check(s);if(y instanceof Promise&&c?.async===false)throw new Ut;if(l||y instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await y,s.issues.length!==h&&(u||(u=xr(s,h)));});else {if(s.issues.length===h)continue;u||(u=xr(s,h));}}return l?l.then(()=>s):s},i=(s,a,c)=>{if(xr(s))return s.aborted=true,s;let u=r(a,o,c);if(u instanceof Promise){if(c.async===false)throw new Ut;return u.then(l=>e._zod.parse(l,c))}return e._zod.parse(u,c)};e._zod.run=(s,a)=>{if(a.skipChecks)return e._zod.parse(s,a);if(a.direction==="backward"){let u=e._zod.parse({value:s.value,issues:[]},{...a,skipChecks:true});return u instanceof Promise?u.then(l=>i(l,s,a)):i(u,s,a)}let c=e._zod.parse(s,a);if(c instanceof Promise){if(a.async===false)throw new Ut;return c.then(u=>r(u,o,a))}return r(c,o,a)};}Oe(e,"~standard",()=>({validate:r=>{try{let i=qd(e,r);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Vd(e,r).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},vendor:"zod",version:1}));}),En=P("$ZodString",(e,t)=>{_e.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??dm(e._zod.bag),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value);}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n};}),De=P("$ZodStringFormat",(e,t)=>{co.init(e,t),En.init(e,t);}),Um=P("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Wd),De.init(e,t);}),Lm=P("$ZodUUID",(e,t)=>{if(t.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=wn(o));}else t.pattern??(t.pattern=wn());De.init(e,t);}),Fm=P("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Yd),De.init(e,t);}),qm=P("$ZodURL",(e,t)=>{De.init(e,t),e._zod.check=n=>{try{let o=n.value.trim();if(!t.normalize&&t.protocol?.source===sm.source&&!/^https?:\/\//i.test(o)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}let r=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=r.href:n.value=o;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort});}};}),Vm=P("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Qd()),De.init(e,t);}),Bm=P("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Jd),De.init(e,t);}),Km=P("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Bd),De.init(e,t);}),Gm=P("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Kd),De.init(e,t);}),Hm=P("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Gd),De.init(e,t);}),Zm=P("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Hd),De.init(e,t);}),Jm=P("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Zd),De.init(e,t);}),Xm=P("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=lm(t)),De.init(e,t);}),Wm=P("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=cm),De.init(e,t);}),Ym=P("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=um(t)),De.init(e,t);}),Qm=P("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Xd),De.init(e,t);}),ep=P("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=em),De.init(e,t),e._zod.bag.format="ipv4";}),tp=P("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=tm),De.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`);}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort});}};}),rp=P("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=rm(t.delimiter)),De.init(e,t),e._zod.bag.format="mac";}),np=P("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=nm),De.init(e,t);}),op=P("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=om),De.init(e,t),e._zod.check=n=>{let o=n.value.split("/");try{if(o.length!==2)throw new Error;let[r,i]=o;if(!i)throw new Error;let s=Number(i);if(`${s}`!==i)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${r}]`);}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort});}};});function ip(e){if(e==="")return true;if(/\s/.test(e)||e.length%4!==0)return false;try{return atob(e),!0}catch{return false}}var sp=P("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=im),De.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{ip(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort});};});function Vv(e){if(!Ta.test(e))return false;let t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return ip(n)}var ap=P("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ta),De.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Vv(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort});};}),cp=P("$ZodE164",(e,t)=>{t.pattern??(t.pattern=am),De.init(e,t);});function Bv(e,t=null){try{let n=e.split(".");if(n.length!==3)return !1;let[o]=n;if(!o)return !1;let r=JSON.parse(atob(o));return !("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return false}}var up=P("$ZodJWT",(e,t)=>{De.init(e,t),e._zod.check=n=>{Bv(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort});};}),lp=P("$ZodCustomStringFormat",(e,t)=>{De.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort});};}),ka=P("$ZodNumber",(e,t)=>{_e.init(e,t),e._zod.pattern=e._zod.bag.pattern??$a,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value);}catch{}let r=n.value;if(typeof r=="number"&&!Number.isNaN(r)&&Number.isFinite(r))return n;let i=typeof r=="number"?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...i?{received:i}:{}}),n};}),dp=P("$ZodNumberFormat",(e,t)=>{Sm.init(e,t),ka.init(e,t);}),Li=P("$ZodBoolean",(e,t)=>{_e.init(e,t),e._zod.pattern=fm,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=!!n.value;}catch{}let r=n.value;return typeof r=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),n};}),Na=P("$ZodBigInt",(e,t)=>{_e.init(e,t),e._zod.pattern=mm,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=BigInt(n.value);}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n};}),mp=P("$ZodBigIntFormat",(e,t)=>{bm.init(e,t),Na.init(e,t);}),pp=P("$ZodSymbol",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n};}),fp=P("$ZodUndefined",(e,t)=>{_e.init(e,t),e._zod.pattern=gm,e._zod.values=new Set([void 0]),e._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n};}),hp=P("$ZodNull",(e,t)=>{_e.init(e,t),e._zod.pattern=hm,e._zod.values=new Set([null]),e._zod.parse=(n,o)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n};}),gp=P("$ZodAny",(e,t)=>{_e.init(e,t),e._zod.parse=n=>n;}),_p=P("$ZodUnknown",(e,t)=>{_e.init(e,t),e._zod.parse=n=>n;}),vp=P("$ZodNever",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n);}),yp=P("$ZodVoid",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n};}),Sp=P("$ZodDate",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=new Date(n.value);}catch{}let r=n.value,i=r instanceof Date;return i&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...i?{received:"Invalid Date"}:{},inst:e}),n};});function zv(e,t,n){e.issues.length&&t.issues.push(...Rt(n,e.issues)),t.value[n]=e.value;}var bp=P("$ZodArray",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!Array.isArray(r))return n.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),n;n.value=Array(r.length);let i=[];for(let s=0;s<r.length;s++){let a=r[s],c=t.element._zod.run({value:a,issues:[]},o);c instanceof Promise?i.push(c.then(u=>zv(u,n,s))):zv(c,n,s);}return i.length?Promise.all(i).then(()=>n):n};});function Oa(e,t,n,o,r,i){let s=n in o;if(e.issues.length){if(r&&i&&!s)return;t.issues.push(...Rt(n,e.issues));}if(!s&&!r){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?s&&(t.value[n]=void 0):t.value[n]=e.value;}function Kv(e){let t=Object.keys(e.shape);for(let o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let n=Md(e.shape);return {...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Gv(e,t,n,o,r,i){let s=[],a=r.keySet,c=r.catchall._zod,u=c.def.type,l=c.optin==="optional",m=c.optout==="optional";for(let h in t){if(h==="__proto__"||a.has(h))continue;if(u==="never"){s.push(h);continue}let y=c.run({value:t[h],issues:[]},o);y instanceof Promise?e.push(y.then(b=>Oa(b,n,h,t,l,m))):Oa(y,n,h,t,l,m);}return s.length&&n.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}var Hv=P("$ZodObject",(e,t)=>{if(_e.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let a=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...a};return Object.defineProperty(t,"shape",{value:c}),c}});}let o=ro(()=>Kv(t));Oe(e._zod,"propValues",()=>{let a=t.shape,c={};for(let u in a){let l=a[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(let m of l.values)c[u].add(m);}}return c});let r=xn,i=t.catchall,s;e._zod.parse=(a,c)=>{s??(s=o.value);let u=a.value;if(!r(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),a;a.value={};let l=[],m=s.shape;for(let h of s.keys){let y=m[h],b=y._zod.optin==="optional",p=y._zod.optout==="optional",S=y._zod.run({value:u[h],issues:[]},c);S instanceof Promise?l.push(S.then(d=>Oa(d,a,h,u,b,p))):Oa(S,a,h,u,b,p);}return i?Gv(l,u,a,c,o.value,e):l.length?Promise.all(l).then(()=>a):a};}),Rp=P("$ZodObjectJIT",(e,t)=>{Hv.init(e,t);let n=e._zod.parse,o=ro(()=>Kv(t)),r=h=>{let y=new Ui(["shape","payload","ctx"]),b=o.value,p=f=>{let v=da(f);return `shape[${v}]._zod.run({ value: input[${v}], issues: [] }, ctx)`};y.write("const input = payload.value;");let S=Object.create(null),d=0;for(let f of b.keys)S[f]=`key_${d++}`;y.write("const newResult = {};");for(let f of b.keys){let v=S[f],x=da(f),T=h[f],R=T?._zod?.optin==="optional",$=T?._zod?.optout==="optional";y.write(`const ${v} = ${p(f)};`),R&&$?y.write(`
6
6
  if (${v}.issues.length) {
7
7
  if (${x} in input) {
8
8
  payload.issues = payload.issues.concat(${v}.issues.map(iss => ({
@@ -61,26 +61,24 @@ import {readdir,readFile,mkdir,writeFile,stat}from'fs/promises';import tr from'p
61
61
  }
62
62
  }
63
63
 
64
- `);}y.write("payload.value = newResult;"),y.write("return payload;");let _=y.compile();return (f,v)=>_(h,f,v)},i,s=xn,a=!$n.jitless,u=a&&Ad.value,l=t.catchall,m;e._zod.parse=(h,y)=>{m??(m=o.value);let b=h.value;return s(b)?a&&u&&y?.async===false&&y.jitless!==true?(i||(i=r(t.shape)),h=i(h,y),l?Hv([],b,h,y,m,e):h):n(h,y):(h.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),h)};});function kv(e,t,n,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let r=e.filter(i=>!wr(i));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>ht(s,o,Ke())))}),t)}var Fi=P("$ZodUnion",(e,t)=>{_e.init(e,t),Oe(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Oe(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Oe(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),Oe(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(r=>r._zod.pattern);return new RegExp(`^(${o.map(r=>Oi(r.source)).join("|")})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,r)=>{if(n)return n(o,r);let i=false,s=[];for(let a of t.options){let c=a._zod.run({value:o.value,issues:[]},r);if(c instanceof Promise)s.push(c),i=true;else {if(c.issues.length===0)return c;s.push(c);}}return i?Promise.all(s).then(a=>kv(a,o,e,r)):kv(s,o,e,r)};});function Nv(e,t,n,o){let r=e.filter(i=>i.issues.length===0);return r.length===1?(t.value=r[0].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>ht(s,o,Ke())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:false}),t)}var $p=P("$ZodXor",(e,t)=>{Fi.init(e,t),t.inclusive=false;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,r)=>{if(n)return n(o,r);let i=false,s=[];for(let a of t.options){let c=a._zod.run({value:o.value,issues:[]},r);c instanceof Promise?(s.push(c),i=true):s.push(c);}return i?Promise.all(s).then(a=>Nv(a,o,e,r)):Nv(s,o,e,r)};}),xp=P("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=false,Fi.init(e,t);let n=e._zod.parse;Oe(e._zod,"propValues",()=>{let r={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[a,c]of Object.entries(s)){r[a]||(r[a]=new Set);for(let u of c)r[a].add(u);}}return r});let o=ro(()=>{let r=t.options,i=new Map;for(let s of r){let a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let c of a){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,s);}}return i});e._zod.parse=(r,i)=>{let s=r.value;if(!xn(s))return r.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),r;let a=o.value.get(s?.[t.discriminator]);return a?a._zod.run(r,i):t.unionFallback||i.direction==="backward"?n(r,i):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:s,path:[t.discriminator],inst:e}),r)};}),wp=P("$ZodIntersection",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{let r=n.value,i=t.left._zod.run({value:r,issues:[]},o),s=t.right._zod.run({value:r,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,u])=>Pv(n,c,u)):Pv(n,i,s)};});function Um(e,t){if(e===t)return {valid:true,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return {valid:true,data:e};if(xr(e)&&xr(t)){let n=Object.keys(t),o=Object.keys(e).filter(i=>n.indexOf(i)!==-1),r={...e,...t};for(let i of o){let s=Um(e[i],t[i]);if(!s.valid)return {valid:false,mergeErrorPath:[i,...s.mergeErrorPath]};r[i]=s.data;}return {valid:true,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return {valid:false,mergeErrorPath:[]};let n=[];for(let o=0;o<e.length;o++){let r=e[o],i=t[o],s=Um(r,i);if(!s.valid)return {valid:false,mergeErrorPath:[o,...s.mergeErrorPath]};n.push(s.data);}return {valid:true,data:n}}return {valid:false,mergeErrorPath:[]}}function Pv(e,t,n){let o=new Map,r;for(let a of t.issues)if(a.code==="unrecognized_keys"){r??(r=a);for(let c of a.keys)o.has(c)||o.set(c,{}),o.get(c).l=true;}else e.issues.push(a);for(let a of n.issues)if(a.code==="unrecognized_keys")for(let c of a.keys)o.has(c)||o.set(c,{}),o.get(c).r=true;else e.issues.push(a);let i=[...o].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length&&r&&e.issues.push({...r,keys:i}),wr(e))return e;let s=Um(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var Aa=P("$ZodTuple",(e,t)=>{_e.init(e,t);let n=t.items;e._zod.parse=(o,r)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let s=[],a=Av(n,"optin"),c=Av(n,"optout");if(!t.rest){if(i.length<a)return o.issues.push({code:"too_small",minimum:a,inclusive:true,input:i,inst:e,origin:"array"}),o;i.length>n.length&&o.issues.push({code:"too_big",maximum:n.length,inclusive:true,input:i,inst:e,origin:"array"});}let u=new Array(n.length);for(let l=0;l<n.length;l++){let m=n[l]._zod.run({value:i[l],issues:[]},r);m instanceof Promise?s.push(m.then(h=>{u[l]=h;})):u[l]=m;}if(t.rest){let l=n.length-1,m=i.slice(n.length);for(let h of m){l++;let y=t.rest._zod.run({value:h,issues:[]},r);y instanceof Promise?s.push(y.then(b=>Cv(b,o,l))):Cv(y,o,l);}}return s.length?Promise.all(s).then(()=>Mv(u,o,n,i,c)):Mv(u,o,n,i,c)};});function Av(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function Cv(e,t,n){e.issues.length&&t.issues.push(...Rt(n,e.issues)),t.value[n]=e.value;}function Mv(e,t,n,o,r){for(let i=0;i<n.length;i++){let s=e[i],a=i<o.length;if(s.issues.length){if(!a&&i>=r){t.value.length=i;break}t.issues.push(...Rt(i,s.issues));}t.value[i]=s.value;}for(let i=t.value.length-1;i>=o.length&&(n[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}var Ep=P("$ZodRecord",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!xr(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let i=[],s=t.keyType._zod.values;if(s){n.value={};let a=new Set;for(let u of s)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){a.add(typeof u=="number"?u.toString():u);let l=t.keyType._zod.run({value:u,issues:[]},o);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(l.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(y=>ht(y,o,Ke())),input:u,path:[u],inst:e});continue}let m=l.value,h=t.valueType._zod.run({value:r[u],issues:[]},o);h instanceof Promise?i.push(h.then(y=>{y.issues.length&&n.issues.push(...Rt(u,y.issues)),n.value[m]=y.value;})):(h.issues.length&&n.issues.push(...Rt(u,h.issues)),n.value[m]=h.value);}let c;for(let u in r)a.has(u)||(c=c??[],c.push(u));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:c});}else {n.value={};for(let a of Reflect.ownKeys(r)){if(a==="__proto__"||!Object.prototype.propertyIsEnumerable.call(r,a))continue;let c=t.keyType._zod.run({value:a,issues:[]},o);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&xa.test(a)&&c.issues.length){let m=t.keyType._zod.run({value:Number(a),issues:[]},o);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");m.issues.length===0&&(c=m);}if(c.issues.length){t.mode==="loose"?n.value[a]=r[a]:n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(m=>ht(m,o,Ke())),input:a,path:[a],inst:e});continue}let l=t.valueType._zod.run({value:r[a],issues:[]},o);l instanceof Promise?i.push(l.then(m=>{m.issues.length&&n.issues.push(...Rt(a,m.issues)),n.value[c.value]=m.value;})):(l.issues.length&&n.issues.push(...Rt(a,l.issues)),n.value[c.value]=l.value);}}return i.length?Promise.all(i).then(()=>n):n};}),Ip=P("$ZodMap",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let i=[];n.value=new Map;for(let[s,a]of r){let c=t.keyType._zod.run({value:s,issues:[]},o),u=t.valueType._zod.run({value:a,issues:[]},o);c instanceof Promise||u instanceof Promise?i.push(Promise.all([c,u]).then(([l,m])=>{jv(l,m,n,s,r,e,o);})):jv(c,u,n,s,r,e,o);}return i.length?Promise.all(i).then(()=>n):n};});function jv(e,t,n,o,r,i,s){e.issues.length&&(ki.has(typeof o)?n.issues.push(...Rt(o,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:i,issues:e.issues.map(a=>ht(a,s,Ke()))})),t.issues.length&&(ki.has(typeof o)?n.issues.push(...Rt(o,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:i,key:o,issues:t.issues.map(a=>ht(a,s,Ke()))})),n.value.set(e.value,t.value);}var zp=P("$ZodSet",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let i=[];n.value=new Set;for(let s of r){let a=t.valueType._zod.run({value:s,issues:[]},o);a instanceof Promise?i.push(a.then(c=>Dv(c,n))):Dv(a,n);}return i.length?Promise.all(i).then(()=>n):n};});function Dv(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value);}var Op=P("$ZodEnum",(e,t)=>{_e.init(e,t);let n=zi(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(r=>ki.has(typeof r)).map(r=>typeof r=="string"?At(r):r.toString()).join("|")})$`),e._zod.parse=(r,i)=>{let s=r.value;return o.has(s)||r.issues.push({code:"invalid_value",values:n,input:s,inst:e}),r};}),kp=P("$ZodLiteral",(e,t)=>{if(_e.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?At(o):o?At(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,r)=>{let i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o};}),Np=P("$ZodFile",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n};}),Pp=P("$ZodTransform",(e,t)=>{_e.init(e,t),e._zod.optin="optional",e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Rr(e.constructor.name);let r=t.transform(n.value,n);if(o.async)return (r instanceof Promise?r:Promise.resolve(r)).then(s=>(n.value=s,n.fallback=true,n));if(r instanceof Promise)throw new Ut;return n.value=r,n.fallback=true,n};});function Uv(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Ca=P("$ZodOptional",(e,t)=>{_e.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Oe(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Oi(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){let r=n.value,i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(s=>Uv(s,r)):Uv(i,r)}return n.value===void 0?n:t.innerType._zod.run(n,o)};}),Ap=P("$ZodExactOptional",(e,t)=>{Ca.init(e,t),Oe(e._zod,"values",()=>t.innerType._zod.values),Oe(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o);}),Cp=P("$ZodNullable",(e,t)=>{_e.init(e,t),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),Oe(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Oi(n.source)}|null)$`):void 0}),Oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o);}),Mp=P("$ZodDefault",(e,t)=>{_e.init(e,t),e._zod.optin="optional",Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>Lv(i,t)):Lv(r,t)};});function Lv(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var jp=P("$ZodPrefault",(e,t)=>{_e.init(e,t),e._zod.optin="optional",Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o));}),Dp=P("$ZodNonOptional",(e,t)=>{_e.init(e,t),Oe(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>Fv(i,e)):Fv(r,e)};});function Fv(e,t){return !e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var Up=P("$ZodSuccess",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Rr("ZodSuccess");let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.issues.length===0,n)):(n.value=r.issues.length===0,n)};}),Lp=P("$ZodCatch",(e,t)=>{_e.init(e,t),e._zod.optin="optional",Oe(e._zod,"optout",()=>t.innerType._zod.optout),Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>ht(s,o,Ke()))},input:n.value}),n.issues=[],n.fallback=true),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(i=>ht(i,o,Ke()))},input:n.value}),n.issues=[],n.fallback=true),n)};}),Fp=P("$ZodNaN",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n);}),Ma=P("$ZodPipe",(e,t)=>{_e.init(e,t),Oe(e._zod,"values",()=>t.in._zod.values),Oe(e._zod,"optin",()=>t.in._zod.optin),Oe(e._zod,"optout",()=>t.out._zod.optout),Oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(s=>Ia(s,t.in,o)):Ia(i,t.in,o)}let r=t.in._zod.run(n,o);return r instanceof Promise?r.then(i=>Ia(i,t.out,o)):Ia(r,t.out,o)};});function Ia(e,t,n){return e.issues.length?(e.aborted=true,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var qi=P("$ZodCodec",(e,t)=>{_e.init(e,t),Oe(e._zod,"values",()=>t.in._zod.values),Oe(e._zod,"optin",()=>t.in._zod.optin),Oe(e._zod,"optout",()=>t.out._zod.optout),Oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(n,o);return i instanceof Promise?i.then(s=>za(s,t,o)):za(i,t,o)}else {let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(s=>za(s,t,o)):za(i,t,o)}};});function za(e,t,n){if(e.issues.length)return e.aborted=true,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(i=>Oa(e,i,t.out,n)):Oa(e,r,t.out,n)}else {let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(i=>Oa(e,i,t.in,n)):Oa(e,r,t.in,n)}}function Oa(e,t,n,o){return e.issues.length?(e.aborted=true,e):n._zod.run({value:t,issues:e.issues},o)}var qp=P("$ZodPreprocess",(e,t)=>{Ma.init(e,t);}),Vp=P("$ZodReadonly",(e,t)=>{_e.init(e,t),Oe(e._zod,"propValues",()=>t.innerType._zod.propValues),Oe(e._zod,"values",()=>t.innerType._zod.values),Oe(e._zod,"optin",()=>t.innerType?._zod?.optin),Oe(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(qv):qv(r)};});function qv(e){return e.value=Object.freeze(e.value),e}var Bp=P("$ZodTemplateLiteral",(e,t)=>{_e.init(e,t);let n=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let r=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=r.startsWith("^")?1:0,s=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(i,s));}else if(o===null||Md.has(typeof o))n.push(At(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(o,r)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o);}),Kp=P("$ZodFunction",(e,t)=>(_e.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...o){let r=e._def.input?fa(e._def.input,o):o,i=Reflect.apply(n,this,r);return e._def.output?fa(e._def.output,i):i}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let r=e._def.input?await ha(e._def.input,o):o,i=await Reflect.apply(n,this,r);return e._def.output?await ha(e._def.output,i):i}},e._zod.parse=(n,o)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let o=e.constructor;return Array.isArray(n[0])?new o({type:"function",input:new Aa({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new o({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:n})},e)),Gp=P("$ZodPromise",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},o));}),Hp=P("$ZodLazy",(e,t)=>{_e.init(e,t),Oe(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),Oe(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Oe(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Oe(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Oe(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o);}),Zp=P("$ZodCustom",(e,t)=>{Fe.init(e,t),_e.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{let o=n.value,r=t.fn(o);if(r instanceof Promise)return r.then(i=>Vv(i,n,o,e));Vv(r,n,o,e);};});function Vv(e,t,n,o){if(!e){let r={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(r.params=o._zod.def.params),t.issues.push(no(r));}}var Bi={};or(Bi,{ar:()=>Jv,az:()=>Xv,be:()=>Yv,bg:()=>Qv,ca:()=>ey,cs:()=>ty,da:()=>ry,de:()=>ny,el:()=>oy,en:()=>ja,eo:()=>iy,es:()=>sy,fa:()=>ay,fi:()=>cy,fr:()=>uy,frCA:()=>ly,he:()=>dy,hr:()=>my,hu:()=>py,hy:()=>hy,id:()=>gy,is:()=>_y,it:()=>vy,ja:()=>yy,ka:()=>Sy,kh:()=>by,km:()=>Da,ko:()=>Ry,lt:()=>$y,mk:()=>xy,ms:()=>wy,nl:()=>Ey,no:()=>Iy,ota:()=>zy,pl:()=>ky,ps:()=>Oy,pt:()=>Ny,ro:()=>Py,ru:()=>Cy,sl:()=>My,sv:()=>jy,ta:()=>Dy,th:()=>Uy,tr:()=>Ly,ua:()=>Fy,uk:()=>Ua,ur:()=>qy,uz:()=>Vy,vi:()=>By,yo:()=>Hy,zhCN:()=>Ky,zhTW:()=>Gy});var C0=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},o={nan:"NaN"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`}case "invalid_value":return r.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${Z(r.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${r.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${n[i.format]??r.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case "not_multiple_of":return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${r.divisor}`;case "unrecognized_keys":return `\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${D(r.keys,"\u060C ")}`;case "invalid_key":return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;case "invalid_union":return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case "invalid_element":return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;default:return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function Jv(){return {localeError:C0()}}var M0=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${a}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${a}`}case "invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${Z(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[i.format]??r.format}`}case "not_multiple_of":return `Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case "unrecognized_keys":return `Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${D(r.keys,", ")}`;case "invalid_key":return `${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case "invalid_union":return "Yanl\u0131\u015F d\u0259y\u0259r";case "invalid_element":return `${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return "Yanl\u0131\u015F d\u0259y\u0259r"}}};function Xv(){return {localeError:M0()}}function Wv(e,t,n,o){let r=Math.abs(e),i=r%10,s=r%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?n:o}var j0=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`}case "invalid_value":return r.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${Z(r.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);if(s){let a=Number(r.maximum),c=Wv(a,s.unit.one,s.unit.few,s.unit.many);return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${r.maximum.toString()} ${c}`}return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);if(s){let a=Number(r.minimum),c=Wv(a,s.unit.one,s.unit.few,s.unit.many);return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${r.minimum.toString()} ${c}`}return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[i.format]??r.format}`}case "not_multiple_of":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${D(r.keys,", ")}`;case "invalid_key":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case "invalid_union":return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case "invalid_element":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${r.origin}`;default:return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function Yv(){return {localeError:j0()}}var D0=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`}case "invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${Z(r.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${r.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;if(i.format==="starts_with")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${n[i.format]??r.format}`}case "not_multiple_of":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${r.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${D(r.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case "invalid_union":return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case "invalid_element":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${r.origin}`;default:return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function Qv(){return {localeError:D0()}}var U0=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${a}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${a}`}case "invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${Z(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${D(r.values," o ")}`;case "too_big":{let i=r.inclusive?"com a m\xE0xim":"menys de",s=t(r.origin);return s?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${i} ${r.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${i} ${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(r.origin);return s?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${i} ${r.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${i} ${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${n[i.format]??r.format}`}case "not_multiple_of":return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case "unrecognized_keys":return `Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${D(r.keys,", ")}`;case "invalid_key":return `Clau inv\xE0lida a ${r.origin}`;case "invalid_union":return "Entrada inv\xE0lida";case "invalid_element":return `Element inv\xE0lid a ${r.origin}`;default:return "Entrada inv\xE0lida"}}};function ey(){return {localeError:U0()}}var L0=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(r){return e[r]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${a}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${a}`}case "invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${Z(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${n[i.format]??r.format}`}case "not_multiple_of":return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case "unrecognized_keys":return `Nezn\xE1m\xE9 kl\xED\u010De: ${D(r.keys,", ")}`;case "invalid_key":return `Neplatn\xFD kl\xED\u010D v ${r.origin}`;case "invalid_union":return "Neplatn\xFD vstup";case "invalid_element":return `Neplatn\xE1 hodnota v ${r.origin}`;default:return "Neplatn\xFD vstup"}}};function ty(){return {localeError:L0()}}var F0=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${a}`:`Ugyldigt input: forventede ${i}, fik ${a}`}case "invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${Z(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin),a=o[r.origin]??r.origin;return s?`For stor: forventede ${a??"value"} ${s.verb} ${i} ${r.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${a??"value"} havde ${i} ${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin),a=o[r.origin]??r.origin;return s?`For lille: forventede ${a} ${s.verb} ${i} ${r.minimum.toString()} ${s.unit}`:`For lille: forventede ${a} havde ${i} ${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??r.format}`}case "not_multiple_of":return `Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case "unrecognized_keys":return `${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${D(r.keys,", ")}`;case "invalid_key":return `Ugyldig n\xF8gle i ${r.origin}`;case "invalid_union":return "Ugyldigt input: matcher ingen af de tilladte typer";case "invalid_element":return `Ugyldig v\xE6rdi i ${r.origin}`;default:return "Ugyldigt input"}}};function ry(){return {localeError:F0()}}var q0=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(r){return e[r]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},o={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${a}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${a}`}case "invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${Z(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ist`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ist`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${n[i.format]??r.format}`}case "not_multiple_of":return `Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case "unrecognized_keys":return `${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${D(r.keys,", ")}`;case "invalid_key":return `Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case "invalid_union":return "Ung\xFCltige Eingabe";case "invalid_element":return `Ung\xFCltiger Wert in ${r.origin}`;default:return "Ung\xFCltige Eingabe"}}};function ny(){return {localeError:q0()}}var V0=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(r){return e[r]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},o={nan:"NaN"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return typeof r.expected=="string"&&/^[A-Z]/.test(r.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${r.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${a}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${a}`}case "invalid_value":return r.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${Z(r.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${r.maximum.toString()} ${s.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${r.minimum.toString()} ${s.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${i.prefix}"`:i.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${i.suffix}"`:i.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${i.includes}"`:i.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[i.format]??r.format}`}case "not_multiple_of":return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${r.divisor}`;case "unrecognized_keys":return `\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${r.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${r.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${D(r.keys,", ")}`;case "invalid_key":return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${r.origin}`;case "invalid_union":return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case "invalid_element":return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${r.origin}`;default:return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function oy(){return {localeError:V0()}}var B0=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return `Invalid input: expected ${i}, received ${a}`}case "invalid_value":return r.values.length===1?`Invalid input: expected ${Z(r.values[0])}`:`Invalid option: expected one of ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Too big: expected ${r.origin??"value"} to have ${i}${r.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Too small: expected ${r.origin} to have ${i}${r.minimum.toString()} ${s.unit}`:`Too small: expected ${r.origin} to be ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${n[i.format]??r.format}`}case "not_multiple_of":return `Invalid number: must be a multiple of ${r.divisor}`;case "unrecognized_keys":return `Unrecognized key${r.keys.length>1?"s":""}: ${D(r.keys,", ")}`;case "invalid_key":return `Invalid key in ${r.origin}`;case "invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`Invalid discriminator value. Expected ${r.options.map(s=>`'${s}'`).join(" | ")}`:"Invalid input";case "invalid_element":return `Invalid value in ${r.origin}`;default:return "Invalid input"}}};function ja(){return {localeError:B0()}}var K0=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${a}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${a}`}case "invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${Z(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${i}${r.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${n[i.format]??r.format}`}case "not_multiple_of":return `Nevalida nombro: devas esti oblo de ${r.divisor}`;case "unrecognized_keys":return `Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${D(r.keys,", ")}`;case "invalid_key":return `Nevalida \u015Dlosilo en ${r.origin}`;case "invalid_union":return "Nevalida enigo";case "invalid_element":return `Nevalida valoro en ${r.origin}`;default:return "Nevalida enigo"}}};function iy(){return {localeError:K0()}}var G0=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${a}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${a}`}case "invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${Z(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin),a=o[r.origin]??r.origin;return s?`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${i}${r.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${a??"valor"} fuera ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin),a=o[r.origin]??r.origin;return s?`Demasiado peque\xF1o: se esperaba que ${a} tuviera ${i}${r.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${a} fuera ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${n[i.format]??r.format}`}case "not_multiple_of":return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case "unrecognized_keys":return `Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${D(r.keys,", ")}`;case "invalid_key":return `Llave inv\xE1lida en ${o[r.origin]??r.origin}`;case "invalid_union":return "Entrada inv\xE1lida";case "invalid_element":return `Valor inv\xE1lido en ${o[r.origin]??r.origin}`;default:return "Entrada inv\xE1lida"}}};function sy(){return {localeError:G0()}}var H0=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case "invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${Z(r.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${D(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[i.format]??r.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case "not_multiple_of":return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${r.divisor} \u0628\u0627\u0634\u062F`;case "unrecognized_keys":return `\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${D(r.keys,", ")}`;case "invalid_key":return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.origin}`;case "invalid_union":return "\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case "invalid_element":return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${r.origin}`;default:return "\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function ay(){return {localeError:H0()}}var Z0=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(r){return e[r]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},o={nan:"NaN"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${a}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${a}`}case "invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${Z(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${r.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${r.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${n[i.format]??r.format}`}case "not_multiple_of":return `Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case "unrecognized_keys":return `${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${D(r.keys,", ")}`;case "invalid_key":return "Virheellinen avain tietueessa";case "invalid_union":return "Virheellinen unioni";case "invalid_element":return "Virheellinen arvo joukossa";default:return "Virheellinen sy\xF6te"}}};function cy(){return {localeError:Z0()}}var J0=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${a} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${a} re\xE7u`}case "invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${Z(r.values[0])} attendu`:`Option invalide : une valeur parmi ${D(r.values,"|")} attendue`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Trop grand : ${o[r.origin]??"valeur"} doit ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o[r.origin]??"valeur"} doit \xEAtre ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Trop petit : ${o[r.origin]??"valeur"} doit ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`Trop petit : ${o[r.origin]??"valeur"} doit \xEAtre ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${n[i.format]??r.format} invalide`}case "not_multiple_of":return `Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case "unrecognized_keys":return `Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${D(r.keys,", ")}`;case "invalid_key":return `Cl\xE9 invalide dans ${r.origin}`;case "invalid_union":return "Entr\xE9e invalide";case "invalid_element":return `Valeur invalide dans ${r.origin}`;default:return "Entr\xE9e invalide"}}};function uy(){return {localeError:J0()}}var X0=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${a}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${a}`}case "invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${Z(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"\u2264":"<",s=t(r.origin);return s?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${i}${r.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?"\u2265":">",s=t(r.origin);return s?`Trop petit : attendu que ${r.origin} ait ${i}${r.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${r.origin} soit ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${n[i.format]??r.format} invalide`}case "not_multiple_of":return `Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case "unrecognized_keys":return `Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${D(r.keys,", ")}`;case "invalid_key":return `Cl\xE9 invalide dans ${r.origin}`;case "invalid_union":return "Entr\xE9e invalide";case "invalid_element":return `Valeur invalide dans ${r.origin}`;default:return "Entr\xE9e invalide"}}};function ly(){return {localeError:X0()}}var W0=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=u=>u?e[u]:void 0,o=u=>{let l=n(u);return l?l.label:u??e.unknown.label},r=u=>`\u05D4${o(u)}`,i=u=>(n(u)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=u=>u?t[u]??null:null,a={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},c={nan:"NaN"};return u=>{switch(u.code){case "invalid_type":{let l=u.expected,m=c[l??""]??o(l),h=J(u.input),y=c[h]??e[h]?.label??h;return /^[A-Z]/.test(u.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${u.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${y}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}, \u05D4\u05EA\u05E7\u05D1\u05DC ${y}`}case "invalid_value":{if(u.values.length===1)return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${Z(u.values[0])}`;let l=u.values.map(y=>Z(y));if(u.values.length===2)return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l[0]} \u05D0\u05D5 ${l[1]}`;let m=l[l.length-1];return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l.slice(0,-1).join(", ")} \u05D0\u05D5 ${m}`}case "too_big":{let l=s(u.origin),m=r(u.origin??"value");if(u.origin==="string")return `${l?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.maximum.toString()} ${l?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(u.origin==="number"){let b=u.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${u.maximum}`;return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${b}`}if(u.origin==="array"||u.origin==="set"){let b=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",p=u.inclusive?`${u.maximum} ${l?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${u.maximum} ${l?.unit??""}`;return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} ${b} \u05DC\u05D4\u05DB\u05D9\u05DC ${p}`.trim()}let h=u.inclusive?"<=":"<",y=i(u.origin??"value");return l?.unit?`${l.longLabel} \u05DE\u05D3\u05D9: ${m} ${y} ${h}${u.maximum.toString()} ${l.unit}`:`${l?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${m} ${y} ${h}${u.maximum.toString()}`}case "too_small":{let l=s(u.origin),m=r(u.origin??"value");if(u.origin==="string")return `${l?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.minimum.toString()} ${l?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(u.origin==="number"){let b=u.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${u.minimum}`;return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${b}`}if(u.origin==="array"||u.origin==="set"){let b=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){let S=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${b} \u05DC\u05D4\u05DB\u05D9\u05DC ${S}`}let p=u.inclusive?`${u.minimum} ${l?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${u.minimum} ${l?.unit??""}`;return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${b} \u05DC\u05D4\u05DB\u05D9\u05DC ${p}`.trim()}let h=u.inclusive?">=":">",y=i(u.origin??"value");return l?.unit?`${l.shortLabel} \u05DE\u05D3\u05D9: ${m} ${y} ${h}${u.minimum.toString()} ${l.unit}`:`${l?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${m} ${y} ${h}${u.minimum.toString()}`}case "invalid_format":{let l=u;if(l.format==="starts_with")return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${l.prefix}"`;if(l.format==="ends_with")return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${l.suffix}"`;if(l.format==="includes")return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${l.includes}"`;if(l.format==="regex")return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${l.pattern}`;let m=a[l.format],h=m?.label??l.format,b=(m?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return `${h} \u05DC\u05D0 ${b}`}case "not_multiple_of":return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${u.divisor}`;case "unrecognized_keys":return `\u05DE\u05E4\u05EA\u05D7${u.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${u.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${D(u.keys,", ")}`;case "invalid_key":return "\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case "invalid_union":return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case "invalid_element":return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${r(u.origin??"array")}`;default:return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function dy(){return {localeError:W0()}}var Y0=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(r){return e[r]??null}let n={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},o={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${r.expected}, a primljeno je ${a}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${a}`}case "invalid_value":return r.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${Z(r.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin),a=o[r.origin]??r.origin;return s?`Preveliko: o\u010Dekivano da ${a??"vrijednost"} ima ${i}${r.maximum.toString()} ${s.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${a??"vrijednost"} bude ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin),a=o[r.origin]??r.origin;return s?`Premalo: o\u010Dekivano da ${a} ima ${i}${r.minimum.toString()} ${s.unit}`:`Premalo: o\u010Dekivano da ${a} bude ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${n[i.format]??r.format}`}case "not_multiple_of":return `Neispravan broj: mora biti vi\u0161ekratnik od ${r.divisor}`;case "unrecognized_keys":return `Neprepoznat${r.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${D(r.keys,", ")}`;case "invalid_key":return `Neispravan klju\u010D u ${o[r.origin]??r.origin}`;case "invalid_union":return "Neispravan unos";case "invalid_element":return `Neispravna vrijednost u ${o[r.origin]??r.origin}`;default:return "Neispravan unos"}}};function my(){return {localeError:Y0()}}var Q0=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}let n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${a}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${a}`}case "invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${Z(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${r.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${i}${r.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[i.format]??r.format}`}case "not_multiple_of":return `\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case "unrecognized_keys":return `Ismeretlen kulcs${r.keys.length>1?"s":""}: ${D(r.keys,", ")}`;case "invalid_key":return `\xC9rv\xE9nytelen kulcs ${r.origin}`;case "invalid_union":return "\xC9rv\xE9nytelen bemenet";case "invalid_element":return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return "\xC9rv\xE9nytelen bemenet"}}};function py(){return {localeError:Q0()}}function fy(e,t,n){return Math.abs(e)===1?t:n}function uo(e){if(!e)return "";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}var ex=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(r){return e[r]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`}case "invalid_value":return r.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${Z(r.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);if(s){let a=Number(r.maximum),c=fy(a,s.unit.one,s.unit.many);return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${uo(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${r.maximum.toString()} ${c}`}return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${uo(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);if(s){let a=Number(r.minimum),c=fy(a,s.unit.one,s.unit.many);return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${uo(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${r.minimum.toString()} ${c}`}return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${uo(r.origin)} \u056C\u056B\u0576\u056B ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[i.format]??r.format}`}case "not_multiple_of":return `\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${r.divisor}-\u056B`;case "unrecognized_keys":return `\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${D(r.keys,", ")}`;case "invalid_key":return `\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${uo(r.origin)}-\u0578\u0582\u0574`;case "invalid_union":return "\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case "invalid_element":return `\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${uo(r.origin)}-\u0578\u0582\u0574`;default:return "\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function hy(){return {localeError:ex()}}var tx=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${a}`:`Input tidak valid: diharapkan ${i}, diterima ${a}`}case "invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${Z(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${i}${r.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Terlalu kecil: diharapkan ${r.origin} memiliki ${i}${r.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${n[i.format]??r.format} tidak valid`}case "not_multiple_of":return `Angka tidak valid: harus kelipatan dari ${r.divisor}`;case "unrecognized_keys":return `Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${D(r.keys,", ")}`;case "invalid_key":return `Kunci tidak valid di ${r.origin}`;case "invalid_union":return "Input tidak valid";case "invalid_element":return `Nilai tidak valid di ${r.origin}`;default:return "Input tidak valid"}}};function gy(){return {localeError:tx()}}var rx=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(r){return e[r]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera ${i}`}case "invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${Z(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${i}${r.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${i}${r.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${n[i.format]??r.format}`}case "not_multiple_of":return `R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case "unrecognized_keys":return `\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${D(r.keys,", ")}`;case "invalid_key":return `Rangur lykill \xED ${r.origin}`;case "invalid_union":return "Rangt gildi";case "invalid_element":return `Rangt gildi \xED ${r.origin}`;default:return "Rangt gildi"}}};function _y(){return {localeError:rx()}}var nx=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${a}`:`Input non valido: atteso ${i}, ricevuto ${a}`}case "invalid_value":return r.values.length===1?`Input non valido: atteso ${Z(r.values[0])}`:`Opzione non valida: atteso uno tra ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Troppo grande: ${r.origin??"valore"} deve avere ${i}${r.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Troppo piccolo: ${r.origin} deve avere ${i}${r.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${r.origin} deve essere ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${n[i.format]??r.format}`}case "not_multiple_of":return `Numero non valido: deve essere un multiplo di ${r.divisor}`;case "unrecognized_keys":return `Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${D(r.keys,", ")}`;case "invalid_key":return `Chiave non valida in ${r.origin}`;case "invalid_union":return "Input non valido";case "invalid_element":return `Valore non valido in ${r.origin}`;default:return "Input non valido"}}};function vy(){return {localeError:nx()}}var ox=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(r){return e[r]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case "invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${Z(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${D(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case "too_big":{let i=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(r.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case "too_small":{let i=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(r.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[i.format]??r.format}`}case "not_multiple_of":return `\u7121\u52B9\u306A\u6570\u5024: ${r.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case "unrecognized_keys":return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${r.keys.length>1?"\u7FA4":""}: ${D(r.keys,"\u3001")}`;case "invalid_key":return `${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case "invalid_union":return "\u7121\u52B9\u306A\u5165\u529B";case "invalid_element":return `${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return "\u7121\u52B9\u306A\u5165\u529B"}}};function yy(){return {localeError:ox()}}var ix=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(r){return e[r]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`}case "invalid_value":return r.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${Z(r.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${D(r.values,"|")}-\u10D3\u10D0\u10DC`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[i.format]??r.format}`}case "not_multiple_of":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${r.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case "unrecognized_keys":return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${D(r.keys,", ")}`;case "invalid_key":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.origin}-\u10E8\u10D8`;case "invalid_union":return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case "invalid_element":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${r.origin}-\u10E8\u10D8`;default:return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function Sy(){return {localeError:ix()}}var sx=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(r){return e[r]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},o={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`}case "invalid_value":return r.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${Z(r.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${r.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${i} ${r.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${i} ${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[i.format]??r.format}`}case "not_multiple_of":return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${r.divisor}`;case "unrecognized_keys":return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${D(r.keys,", ")}`;case "invalid_key":return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;case "invalid_union":return "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case "invalid_element":return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;default:return "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function Da(){return {localeError:sx()}}function by(){return Da()}var ax=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},o={nan:"NaN"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`}case "invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${Z(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${D(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case "too_big":{let i=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(r.origin),c=a?.unit??"\uC694\uC18C";return a?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${c} ${i}${s}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${i}${s}`}case "too_small":{let i=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(r.origin),c=a?.unit??"\uC694\uC18C";return a?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${c} ${i}${s}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${i}${s}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[i.format]??r.format}`}case "not_multiple_of":return `\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case "unrecognized_keys":return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${D(r.keys,", ")}`;case "invalid_key":return `\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case "invalid_union":return "\uC798\uBABB\uB41C \uC785\uB825";case "invalid_element":return `\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return "\uC798\uBABB\uB41C \uC785\uB825"}}};function Ry(){return {localeError:ax()}}var Vi=e=>e.charAt(0).toUpperCase()+e.slice(1);function Ty(e){let t=Math.abs(e),n=t%10,o=t%100;return o>=11&&o<=19||n===0?"many":n===1?"one":"few"}var cx=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(r,i,s,a){let c=e[r]??null;return c===null?c:{unit:c.unit[i],verb:c.verb[a][s?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},o={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Gautas tipas ${a}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${a}, o tik\u0117tasi - ${i}`}case "invalid_value":return r.values.length===1?`Privalo b\u016Bti ${Z(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${D(r.values,"|")} pasirinkim\u0173`;case "too_big":{let i=o[r.origin]??r.origin,s=t(r.origin,Ty(Number(r.maximum)),r.inclusive??false,"smaller");if(s?.verb)return `${Vi(i??r.origin??"reik\u0161m\u0117")} ${s.verb} ${r.maximum.toString()} ${s.unit??"element\u0173"}`;let a=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return `${Vi(i??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${r.maximum.toString()} ${s?.unit}`}case "too_small":{let i=o[r.origin]??r.origin,s=t(r.origin,Ty(Number(r.minimum)),r.inclusive??false,"bigger");if(s?.verb)return `${Vi(i??r.origin??"reik\u0161m\u0117")} ${s.verb} ${r.minimum.toString()} ${s.unit??"element\u0173"}`;let a=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return `${Vi(i??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${r.minimum.toString()} ${s?.unit}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${n[i.format]??r.format}`}case "not_multiple_of":return `Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case "unrecognized_keys":return `Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${D(r.keys,", ")}`;case "invalid_key":return "Rastas klaidingas raktas";case "invalid_union":return "Klaidinga \u012Fvestis";case "invalid_element":{let i=o[r.origin]??r.origin;return `${Vi(i??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return "Klaidinga \u012Fvestis"}}};function $y(){return {localeError:cx()}}var ux=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(r){return e[r]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`}case "invalid_value":return r.values.length===1?`Invalid input: expected ${Z(r.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${r.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${n[i.format]??r.format}`}case "not_multiple_of":return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${r.divisor}`;case "unrecognized_keys":return `${r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${D(r.keys,", ")}`;case "invalid_key":return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.origin}`;case "invalid_union":return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case "invalid_element":return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${r.origin}`;default:return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function xy(){return {localeError:ux()}}var lx=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${a}`:`Input tidak sah: dijangka ${i}, diterima ${a}`}case "invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${Z(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Terlalu besar: dijangka ${r.origin??"nilai"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Terlalu kecil: dijangka ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${n[i.format]??r.format} tidak sah`}case "not_multiple_of":return `Nombor tidak sah: perlu gandaan ${r.divisor}`;case "unrecognized_keys":return `Kunci tidak dikenali: ${D(r.keys,", ")}`;case "invalid_key":return `Kunci tidak sah dalam ${r.origin}`;case "invalid_union":return "Input tidak sah";case "invalid_element":return `Nilai tidak sah dalam ${r.origin}`;default:return "Input tidak sah"}}};function wy(){return {localeError:lx()}}var dx=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(r){return e[r]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},o={nan:"NaN",number:"getal"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${a}`:`Ongeldige invoer: verwacht ${i}, ontving ${a}`}case "invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${Z(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin),a=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return s?`Te ${a}: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${a}: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} is`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin),a=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return s?`Te ${a}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${a}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} is`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${n[i.format]??r.format}`}case "not_multiple_of":return `Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case "unrecognized_keys":return `Onbekende key${r.keys.length>1?"s":""}: ${D(r.keys,", ")}`;case "invalid_key":return `Ongeldige key in ${r.origin}`;case "invalid_union":return "Ongeldige invoer";case "invalid_element":return `Ongeldige waarde in ${r.origin}`;default:return "Ongeldige invoer"}}};function Ey(){return {localeError:dx()}}var mx=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${a}`:`Ugyldig input: forventet ${i}, fikk ${a}`}case "invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${Z(r.values[0])}`:`Ugyldig valg: forventet en av ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??r.format}`}case "not_multiple_of":return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case "unrecognized_keys":return `${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${D(r.keys,", ")}`;case "invalid_key":return `Ugyldig n\xF8kkel i ${r.origin}`;case "invalid_union":return "Ugyldig input";case "invalid_element":return `Ugyldig verdi i ${r.origin}`;default:return "Ugyldig input"}}};function Iy(){return {localeError:mx()}}var px=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${a}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${a}`}case "invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${Z(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} olmal\u0131yd\u0131.`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} olmal\u0131yd\u0131.`}case "invalid_format":{let i=r;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[i.format]??r.format}`}case "not_multiple_of":return `F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case "unrecognized_keys":return `Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${D(r.keys,", ")}`;case "invalid_key":return `${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case "invalid_union":return "Giren tan\u0131namad\u0131.";case "invalid_element":return `${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return "K\u0131ymet tan\u0131namad\u0131."}}};function zy(){return {localeError:px()}}var fx=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case "invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${Z(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${D(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} \u0648\u064A`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0648\u064A`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[i.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case "not_multiple_of":return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case "unrecognized_keys":return `\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${D(r.keys,", ")}`;case "invalid_key":return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.origin} \u06A9\u06D0`;case "invalid_union":return "\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case "invalid_element":return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${r.origin} \u06A9\u06D0`;default:return "\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function Oy(){return {localeError:fx()}}var hx=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(r){return e[r]??null}let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},o={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${a}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${a}`}case "invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${Z(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${r.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${r.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[i.format]??r.format}`}case "not_multiple_of":return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case "unrecognized_keys":return `Nierozpoznane klucze${r.keys.length>1?"s":""}: ${D(r.keys,", ")}`;case "invalid_key":return `Nieprawid\u0142owy klucz w ${r.origin}`;case "invalid_union":return "Nieprawid\u0142owe dane wej\u015Bciowe";case "invalid_element":return `Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return "Nieprawid\u0142owe dane wej\u015Bciowe"}}};function ky(){return {localeError:hx()}}var gx=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??null}let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${a}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${a}`}case "invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${Z(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${i}${r.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Muito pequeno: esperado que ${r.origin} tivesse ${i}${r.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${n[i.format]??r.format} inv\xE1lido`}case "not_multiple_of":return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case "unrecognized_keys":return `Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${D(r.keys,", ")}`;case "invalid_key":return `Chave inv\xE1lida em ${r.origin}`;case "invalid_union":return "Entrada inv\xE1lida";case "invalid_element":return `Valor inv\xE1lido em ${r.origin}`;default:return "Campo inv\xE1lido"}}};function Ny(){return {localeError:gx()}}var _x=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(r){return e[r]??null}let n={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},o={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return `Intrare invalid\u0103: a\u0219teptat ${i}, primit ${a}`}case "invalid_value":return r.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${Z(r.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} s\u0103 fie ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Prea mic: a\u0219teptat ca ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`Prea mic: a\u0219teptat ca ${r.origin} s\u0103 fie ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${n[i.format]??r.format}`}case "not_multiple_of":return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${r.divisor}`;case "unrecognized_keys":return `Chei nerecunoscute: ${D(r.keys,", ")}`;case "invalid_key":return `Cheie invalid\u0103 \xEEn ${r.origin}`;case "invalid_union":return "Intrare invalid\u0103";case "invalid_element":return `Valoare invalid\u0103 \xEEn ${r.origin}`;default:return "Intrare invalid\u0103"}}};function Py(){return {localeError:_x()}}function Ay(e,t,n,o){let r=Math.abs(e),i=r%10,s=r%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?n:o}var vx=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`}case "invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${Z(r.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);if(s){let a=Number(r.maximum),c=Ay(a,s.unit.one,s.unit.few,s.unit.many);return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${r.maximum.toString()} ${c}`}return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);if(s){let a=Number(r.minimum),c=Ay(a,s.unit.one,s.unit.few,s.unit.many);return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${r.minimum.toString()} ${c}`}return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[i.format]??r.format}`}case "not_multiple_of":return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${D(r.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case "invalid_union":return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case "invalid_element":return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${r.origin}`;default:return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function Cy(){return {localeError:vx()}}var yx=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}let n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${a}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${a}`}case "invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${Z(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${i}${r.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${i}${r.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${n[i.format]??r.format}`}case "not_multiple_of":return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case "unrecognized_keys":return `Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${D(r.keys,", ")}`;case "invalid_key":return `Neveljaven klju\u010D v ${r.origin}`;case "invalid_union":return "Neveljaven vnos";case "invalid_element":return `Neveljavna vrednost v ${r.origin}`;default:return "Neveljaven vnos"}}};function My(){return {localeError:yx()}}var Sx=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(r){return e[r]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${a}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${a}`}case "invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${Z(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${n[i.format]??r.format}`}case "not_multiple_of":return `Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case "unrecognized_keys":return `${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${D(r.keys,", ")}`;case "invalid_key":return `Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case "invalid_union":return "Ogiltig input";case "invalid_element":return `Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return "Ogiltig input"}}};function jy(){return {localeError:Sx()}}var bx=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(r){return e[r]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`}case "invalid_value":return r.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${Z(r.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${D(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${r.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${i}${r.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${i}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[i.format]??r.format}`}case "not_multiple_of":return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case "unrecognized_keys":return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${D(r.keys,", ")}`;case "invalid_key":return `${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case "invalid_union":return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case "invalid_element":return `${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function Dy(){return {localeError:bx()}}var Rx=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(r){return e[r]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},o={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`}case "invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${Z(r.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(r.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(r.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[i.format]??r.format}`}case "not_multiple_of":return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${r.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case "unrecognized_keys":return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${D(r.keys,", ")}`;case "invalid_key":return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;case "invalid_union":return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case "invalid_element":return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;default:return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function Uy(){return {localeError:Rx()}}var Tx=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(r){return e[r]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},o={nan:"NaN"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${a}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${a}`}case "invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${Z(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${i}${r.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${i}${r.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[i.format]??r.format}`}case "not_multiple_of":return `Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case "unrecognized_keys":return `Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${D(r.keys,", ")}`;case "invalid_key":return `${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case "invalid_union":return "Ge\xE7ersiz de\u011Fer";case "invalid_element":return `${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return "Ge\xE7ersiz de\u011Fer"}}};function Ly(){return {localeError:Tx()}}var $x=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`}case "invalid_value":return r.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${Z(r.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[i.format]??r.format}`}case "not_multiple_of":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${r.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${D(r.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case "invalid_union":return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case "invalid_element":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${r.origin}`;default:return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function Ua(){return {localeError:$x()}}function Fy(){return Ua()}var xx=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(r){return e[r]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case "invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${Z(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${D(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${i}${r.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${i}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[i.format]??r.format}`}case "not_multiple_of":return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case "unrecognized_keys":return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${r.keys.length>1?"\u0632":""}: ${D(r.keys,"\u060C ")}`;case "invalid_key":return `${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case "invalid_union":return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case "invalid_element":return `${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function qy(){return {localeError:xx()}}var wx=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(r){return e[r]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},o={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${a}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${a}`}case "invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${Z(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[i.format]??r.format}`}case "not_multiple_of":return `Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case "unrecognized_keys":return `Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${D(r.keys,", ")}`;case "invalid_key":return `${r.origin} dagi kalit noto\u2018g\u2018ri`;case "invalid_union":return "Noto\u2018g\u2018ri kirish";case "invalid_element":return `${r.origin} da noto\u2018g\u2018ri qiymat`;default:return "Noto\u2018g\u2018ri kirish"}}};function Vy(){return {localeError:wx()}}var Ex=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(r){return e[r]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`}case "invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${Z(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${n[i.format]??r.format} kh\xF4ng h\u1EE3p l\u1EC7`}case "not_multiple_of":return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${r.divisor}`;case "unrecognized_keys":return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${D(r.keys,", ")}`;case "invalid_key":return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;case "invalid_union":return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case "invalid_element":return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;default:return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function By(){return {localeError:Ex()}}var Ix=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(r){return e[r]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`}case "invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${Z(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${n[i.format]??r.format}`}case "not_multiple_of":return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case "unrecognized_keys":return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${D(r.keys,", ")}`;case "invalid_key":return `${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case "invalid_union":return "\u65E0\u6548\u8F93\u5165";case "invalid_element":return `${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return "\u65E0\u6548\u8F93\u5165"}}};function Ky(){return {localeError:Ix()}}var zx=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(r){return e[r]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},o={nan:"NaN"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${a}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${a}`}case "invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${Z(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${n[i.format]??r.format}`}case "not_multiple_of":return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case "unrecognized_keys":return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${D(r.keys,"\u3001")}`;case "invalid_key":return `${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case "invalid_union":return "\u7121\u6548\u7684\u8F38\u5165\u503C";case "invalid_element":return `${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return "\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Gy(){return {localeError:zx()}}var Ox=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(r){return e[r]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${a}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${a}`}case "invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${Z(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${s.verb} ${i}${r.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.maximum}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${s.verb} ${i}${r.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.minimum}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${n[i.format]??r.format}`}case "not_multiple_of":return `N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${r.divisor}`;case "unrecognized_keys":return `B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${D(r.keys,", ")}`;case "invalid_key":return `B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;case "invalid_union":return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case "invalid_element":return `Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;default:return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function Hy(){return {localeError:Ox()}}var Zy,Jp=Symbol("ZodOutput"),Xp=Symbol("ZodInput"),La=class{constructor(){this._map=new WeakMap,this._idmap=new Map;}add(t,...n){let o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let o={...this.get(n)??{}};delete o.id;let r={...o,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Fa(){return new La}(Zy=globalThis).__zod_globalRegistry??(Zy.__zod_globalRegistry=Fa());var st=globalThis.__zod_globalRegistry;function Wp(e,t){return new e({type:"string",...W(t)})}function Yp(e,t){return new e({type:"string",coerce:true,...W(t)})}function qa(e,t){return new e({type:"string",format:"email",check:"string_format",abort:false,...W(t)})}function Ki(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:false,...W(t)})}function Va(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,...W(t)})}function Ba(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v4",...W(t)})}function Ka(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v6",...W(t)})}function Ga(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v7",...W(t)})}function Gi(e,t){return new e({type:"string",format:"url",check:"string_format",abort:false,...W(t)})}function Ha(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:false,...W(t)})}function Za(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:false,...W(t)})}function Ja(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:false,...W(t)})}function Xa(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:false,...W(t)})}function Wa(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:false,...W(t)})}function Ya(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:false,...W(t)})}function Qa(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:false,...W(t)})}function ec(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:false,...W(t)})}function tc(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:false,...W(t)})}function Qp(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:false,...W(t)})}function rc(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:false,...W(t)})}function nc(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:false,...W(t)})}function oc(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:false,...W(t)})}function ic(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:false,...W(t)})}function sc(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:false,...W(t)})}function ac(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:false,...W(t)})}var ef={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function tf(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:false,local:false,precision:null,...W(t)})}function rf(e,t){return new e({type:"string",format:"date",check:"string_format",...W(t)})}function nf(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...W(t)})}function of(e,t){return new e({type:"string",format:"duration",check:"string_format",...W(t)})}function sf(e,t){return new e({type:"number",checks:[],...W(t)})}function af(e,t){return new e({type:"number",coerce:true,checks:[],...W(t)})}function cf(e,t){return new e({type:"number",check:"number_format",abort:false,format:"safeint",...W(t)})}function uf(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float32",...W(t)})}function lf(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float64",...W(t)})}function df(e,t){return new e({type:"number",check:"number_format",abort:false,format:"int32",...W(t)})}function mf(e,t){return new e({type:"number",check:"number_format",abort:false,format:"uint32",...W(t)})}function pf(e,t){return new e({type:"boolean",...W(t)})}function ff(e,t){return new e({type:"boolean",coerce:true,...W(t)})}function hf(e,t){return new e({type:"bigint",...W(t)})}function gf(e,t){return new e({type:"bigint",coerce:true,...W(t)})}function _f(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"int64",...W(t)})}function vf(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"uint64",...W(t)})}function yf(e,t){return new e({type:"symbol",...W(t)})}function Sf(e,t){return new e({type:"undefined",...W(t)})}function bf(e,t){return new e({type:"null",...W(t)})}function Rf(e){return new e({type:"any"})}function Tf(e){return new e({type:"unknown"})}function $f(e,t){return new e({type:"never",...W(t)})}function xf(e,t){return new e({type:"void",...W(t)})}function wf(e,t){return new e({type:"date",...W(t)})}function Ef(e,t){return new e({type:"date",coerce:true,...W(t)})}function If(e,t){return new e({type:"nan",...W(t)})}function Ht(e,t){return new wa({check:"less_than",...W(t),value:e,inclusive:false})}function zt(e,t){return new wa({check:"less_than",...W(t),value:e,inclusive:true})}function Zt(e,t){return new Ea({check:"greater_than",...W(t),value:e,inclusive:false})}function gt(e,t){return new Ea({check:"greater_than",...W(t),value:e,inclusive:true})}function cc(e){return Zt(0,e)}function uc(e){return Ht(0,e)}function lc(e){return zt(0,e)}function dc(e){return gt(0,e)}function Er(e,t){return new Sm({check:"multiple_of",...W(t),value:e})}function Ir(e,t){return new Tm({check:"max_size",...W(t),maximum:e})}function Jt(e,t){return new $m({check:"min_size",...W(t),minimum:e})}function In(e,t){return new xm({check:"size_equals",...W(t),size:e})}function zn(e,t){return new wm({check:"max_length",...W(t),maximum:e})}function sr(e,t){return new Em({check:"min_length",...W(t),minimum:e})}function On(e,t){return new Im({check:"length_equals",...W(t),length:e})}function lo(e,t){return new zm({check:"string_format",format:"regex",...W(t),pattern:e})}function mo(e){return new Om({check:"string_format",format:"lowercase",...W(e)})}function po(e){return new km({check:"string_format",format:"uppercase",...W(e)})}function fo(e,t){return new Nm({check:"string_format",format:"includes",...W(t),includes:e})}function ho(e,t){return new Pm({check:"string_format",format:"starts_with",...W(t),prefix:e})}function go(e,t){return new Am({check:"string_format",format:"ends_with",...W(t),suffix:e})}function mc(e,t,n){return new Cm({check:"property",property:e,schema:t,...W(n)})}function _o(e,t){return new Mm({check:"mime_type",mime:e,...W(t)})}function Lt(e){return new jm({check:"overwrite",tx:e})}function vo(e){return Lt(t=>t.normalize(e))}function yo(){return Lt(e=>e.trim())}function So(){return Lt(e=>e.toLowerCase())}function bo(){return Lt(e=>e.toUpperCase())}function Ro(){return Lt(e=>Pd(e))}function zf(e,t,n){return new e({type:"array",element:t,...W(n)})}function Nx(e,t,n){return new e({type:"union",options:t,...W(n)})}function Px(e,t,n){return new e({type:"union",options:t,inclusive:false,...W(n)})}function Ax(e,t,n,o){return new e({type:"union",options:n,discriminator:t,...W(o)})}function Cx(e,t,n){return new e({type:"intersection",left:t,right:n})}function Mx(e,t,n,o){let r=n instanceof _e,i=r?o:n,s=r?n:null;return new e({type:"tuple",items:t,rest:s,...W(i)})}function jx(e,t,n,o){return new e({type:"record",keyType:t,valueType:n,...W(o)})}function Dx(e,t,n,o){return new e({type:"map",keyType:t,valueType:n,...W(o)})}function Ux(e,t,n){return new e({type:"set",valueType:t,...W(n)})}function Lx(e,t,n){let o=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:o,...W(n)})}function Fx(e,t,n){return new e({type:"enum",entries:t,...W(n)})}function qx(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...W(n)})}function Of(e,t){return new e({type:"file",...W(t)})}function Vx(e,t){return new e({type:"transform",transform:t})}function Bx(e,t){return new e({type:"optional",innerType:t})}function Kx(e,t){return new e({type:"nullable",innerType:t})}function Gx(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Cd(n)}})}function Hx(e,t,n){return new e({type:"nonoptional",innerType:t,...W(n)})}function Zx(e,t){return new e({type:"success",innerType:t})}function Jx(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function Xx(e,t,n){return new e({type:"pipe",in:t,out:n})}function Wx(e,t){return new e({type:"readonly",innerType:t})}function Yx(e,t,n){return new e({type:"template_literal",parts:t,...W(n)})}function Qx(e,t){return new e({type:"lazy",getter:t})}function ew(e,t){return new e({type:"promise",innerType:t})}function kf(e,t,n){let o=W(n);return o.abort??(o.abort=true),new e({type:"custom",check:"custom",fn:t,...o})}function Nf(e,t,n){return new e({type:"custom",check:"custom",fn:t,...W(n)})}function Pf(e,t){let n=Jy(o=>(o.addIssue=r=>{if(typeof r=="string")o.issues.push(no(r,o.value,n._zod.def));else {let i=r;i.fatal&&(i.continue=false),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),o.issues.push(no(i));}},e(o.value,o)),t);return n}function Jy(e,t){let n=new Fe({check:"custom",...W(t)});return n._zod.check=e,n}function Af(e){let t=new Fe({check:"describe"});return t._zod.onattach=[n=>{let o=st.get(n)??{};st.add(n,{...o,description:e});}],t._zod.check=()=>{},t}function Cf(e){let t=new Fe({check:"meta"});return t._zod.onattach=[n=>{let o=st.get(n)??{};st.add(n,{...o,...e});}],t._zod.check=()=>{},t}function Mf(e,t){let n=W(t),o=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(o=o.map(y=>typeof y=="string"?y.toLowerCase():y),r=r.map(y=>typeof y=="string"?y.toLowerCase():y));let i=new Set(o),s=new Set(r),a=e.Codec??qi,c=e.Boolean??Li,u=e.String??En,l=new u({type:"string",error:n.error}),m=new c({type:"boolean",error:n.error}),h=new a({type:"pipe",in:l,out:m,transform:((y,b)=>{let p=y;return n.case!=="sensitive"&&(p=p.toLowerCase()),i.has(p)?true:s.has(p)?false:(b.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:b.value,inst:h,continue:false}),{})}),reverseTransform:((y,b)=>y===true?o[0]||"true":r[0]||"false"),error:n.error});return h}function To(e,t,n,o={}){let r=W(o),i={...W(o),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:a=>n.test(a),...r};return n instanceof RegExp&&(i.pattern=n),new e(i)}function zr(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??st,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ce(e,t,n={path:[],schemaPath:[]}){var o;let r=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;let s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);let a=e._zod.toJSONSchema?.();if(a)s.schema=a;else {let l={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,l);else {let h=s.schema,y=t.processors[r.type];if(!y)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);y(e,t,h,l);}let m=e._zod.parent;m&&(s.ref||(s.ref=m),Ce(m,t,l),t.seen.get(m).isParent=true);}let c=t.metadataRegistry.get(e);return c&&Object.assign(s.schema,c),t.io==="input"&&_t(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((o=s.schema).default??(o.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function Or(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let s of e.seen.entries()){let a=e.metadataRegistry.get(s[0])?.id;if(a){let c=o.get(a);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(a,s[0]);}}let r=s=>{let a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let m=e.external.registry.get(s[0])?.id,h=e.external.uri??(b=>b);if(m)return {ref:h(m)};let y=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=y,{defId:y,ref:`${h("__shared")}#/${a}/${y}`}}if(s[1]===n)return {ref:"#"};let u=`#/${a}/`,l=s[1].schema.id??`__schema${e.counter++}`;return {defId:l,ref:u+l}},i=s=>{if(s[1].schema.$ref)return;let a=s[1],{ref:c,defId:u}=r(s);a.def={...a.schema},u&&(a.defId=u);let l=a.schema;for(let m in l)delete l[m];l.$ref=c;};if(e.cycles==="throw")for(let s of e.seen.entries()){let a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
64
+ `);}y.write("payload.value = newResult;"),y.write("return payload;");let _=y.compile();return (f,v)=>_(h,f,v)},i,s=xn,a=!$n.jitless,u=a&&Pd.value,l=t.catchall,m;e._zod.parse=(h,y)=>{m??(m=o.value);let b=h.value;return s(b)?a&&u&&y?.async===false&&y.jitless!==true?(i||(i=r(t.shape)),h=i(h,y),l?Gv([],b,h,y,m,e):h):n(h,y):(h.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),h)};});function Ov(e,t,n,o){for(let i of e)if(i.issues.length===0)return t.value=i.value,t;let r=e.filter(i=>!xr(i));return r.length===1?(t.value=r[0].value,r[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>ht(s,o,Ke())))}),t)}var Fi=P("$ZodUnion",(e,t)=>{_e.init(e,t),Oe(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Oe(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Oe(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),Oe(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(r=>r._zod.pattern);return new RegExp(`^(${o.map(r=>Oi(r.source)).join("|")})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,r)=>{if(n)return n(o,r);let i=false,s=[];for(let a of t.options){let c=a._zod.run({value:o.value,issues:[]},r);if(c instanceof Promise)s.push(c),i=true;else {if(c.issues.length===0)return c;s.push(c);}}return i?Promise.all(s).then(a=>Ov(a,o,e,r)):Ov(s,o,e,r)};});function kv(e,t,n,o){let r=e.filter(i=>i.issues.length===0);return r.length===1?(t.value=r[0].value,t):(r.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(s=>ht(s,o,Ke())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:false}),t)}var Tp=P("$ZodXor",(e,t)=>{Fi.init(e,t),t.inclusive=false;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,r)=>{if(n)return n(o,r);let i=false,s=[];for(let a of t.options){let c=a._zod.run({value:o.value,issues:[]},r);c instanceof Promise?(s.push(c),i=true):s.push(c);}return i?Promise.all(s).then(a=>kv(a,o,e,r)):kv(s,o,e,r)};}),$p=P("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=false,Fi.init(e,t);let n=e._zod.parse;Oe(e._zod,"propValues",()=>{let r={};for(let i of t.options){let s=i._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(let[a,c]of Object.entries(s)){r[a]||(r[a]=new Set);for(let u of c)r[a].add(u);}}return r});let o=ro(()=>{let r=t.options,i=new Map;for(let s of r){let a=s._zod.propValues?.[t.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let c of a){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,s);}}return i});e._zod.parse=(r,i)=>{let s=r.value;if(!xn(s))return r.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),r;let a=o.value.get(s?.[t.discriminator]);return a?a._zod.run(r,i):t.unionFallback||i.direction==="backward"?n(r,i):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:s,path:[t.discriminator],inst:e}),r)};}),xp=P("$ZodIntersection",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{let r=n.value,i=t.left._zod.run({value:r,issues:[]},o),s=t.right._zod.run({value:r,issues:[]},o);return i instanceof Promise||s instanceof Promise?Promise.all([i,s]).then(([c,u])=>Nv(n,c,u)):Nv(n,i,s)};});function Dm(e,t){if(e===t)return {valid:true,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return {valid:true,data:e};if($r(e)&&$r(t)){let n=Object.keys(t),o=Object.keys(e).filter(i=>n.indexOf(i)!==-1),r={...e,...t};for(let i of o){let s=Dm(e[i],t[i]);if(!s.valid)return {valid:false,mergeErrorPath:[i,...s.mergeErrorPath]};r[i]=s.data;}return {valid:true,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return {valid:false,mergeErrorPath:[]};let n=[];for(let o=0;o<e.length;o++){let r=e[o],i=t[o],s=Dm(r,i);if(!s.valid)return {valid:false,mergeErrorPath:[o,...s.mergeErrorPath]};n.push(s.data);}return {valid:true,data:n}}return {valid:false,mergeErrorPath:[]}}function Nv(e,t,n){let o=new Map,r;for(let a of t.issues)if(a.code==="unrecognized_keys"){r??(r=a);for(let c of a.keys)o.has(c)||o.set(c,{}),o.get(c).l=true;}else e.issues.push(a);for(let a of n.issues)if(a.code==="unrecognized_keys")for(let c of a.keys)o.has(c)||o.set(c,{}),o.get(c).r=true;else e.issues.push(a);let i=[...o].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(i.length&&r&&e.issues.push({...r,keys:i}),xr(e))return e;let s=Dm(t.value,n.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return e.value=s.data,e}var Pa=P("$ZodTuple",(e,t)=>{_e.init(e,t);let n=t.items;e._zod.parse=(o,r)=>{let i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let s=[],a=Pv(n,"optin"),c=Pv(n,"optout");if(!t.rest){if(i.length<a)return o.issues.push({code:"too_small",minimum:a,inclusive:true,input:i,inst:e,origin:"array"}),o;i.length>n.length&&o.issues.push({code:"too_big",maximum:n.length,inclusive:true,input:i,inst:e,origin:"array"});}let u=new Array(n.length);for(let l=0;l<n.length;l++){let m=n[l]._zod.run({value:i[l],issues:[]},r);m instanceof Promise?s.push(m.then(h=>{u[l]=h;})):u[l]=m;}if(t.rest){let l=n.length-1,m=i.slice(n.length);for(let h of m){l++;let y=t.rest._zod.run({value:h,issues:[]},r);y instanceof Promise?s.push(y.then(b=>Av(b,o,l))):Av(y,o,l);}}return s.length?Promise.all(s).then(()=>Cv(u,o,n,i,c)):Cv(u,o,n,i,c)};});function Pv(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function Av(e,t,n){e.issues.length&&t.issues.push(...Rt(n,e.issues)),t.value[n]=e.value;}function Cv(e,t,n,o,r){for(let i=0;i<n.length;i++){let s=e[i],a=i<o.length;if(s.issues.length){if(!a&&i>=r){t.value.length=i;break}t.issues.push(...Rt(i,s.issues));}t.value[i]=s.value;}for(let i=t.value.length-1;i>=o.length&&(n[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}var wp=P("$ZodRecord",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!$r(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let i=[],s=t.keyType._zod.values;if(s){n.value={};let a=new Set;for(let u of s)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){a.add(typeof u=="number"?u.toString():u);let l=t.keyType._zod.run({value:u,issues:[]},o);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(l.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(y=>ht(y,o,Ke())),input:u,path:[u],inst:e});continue}let m=l.value,h=t.valueType._zod.run({value:r[u],issues:[]},o);h instanceof Promise?i.push(h.then(y=>{y.issues.length&&n.issues.push(...Rt(u,y.issues)),n.value[m]=y.value;})):(h.issues.length&&n.issues.push(...Rt(u,h.issues)),n.value[m]=h.value);}let c;for(let u in r)a.has(u)||(c=c??[],c.push(u));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:c});}else {n.value={};for(let a of Reflect.ownKeys(r)){if(a==="__proto__"||!Object.prototype.propertyIsEnumerable.call(r,a))continue;let c=t.keyType._zod.run({value:a,issues:[]},o);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&$a.test(a)&&c.issues.length){let m=t.keyType._zod.run({value:Number(a),issues:[]},o);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");m.issues.length===0&&(c=m);}if(c.issues.length){t.mode==="loose"?n.value[a]=r[a]:n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(m=>ht(m,o,Ke())),input:a,path:[a],inst:e});continue}let l=t.valueType._zod.run({value:r[a],issues:[]},o);l instanceof Promise?i.push(l.then(m=>{m.issues.length&&n.issues.push(...Rt(a,m.issues)),n.value[c.value]=m.value;})):(l.issues.length&&n.issues.push(...Rt(a,l.issues)),n.value[c.value]=l.value);}}return i.length?Promise.all(i).then(()=>n):n};}),Ep=P("$ZodMap",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let i=[];n.value=new Map;for(let[s,a]of r){let c=t.keyType._zod.run({value:s,issues:[]},o),u=t.valueType._zod.run({value:a,issues:[]},o);c instanceof Promise||u instanceof Promise?i.push(Promise.all([c,u]).then(([l,m])=>{Mv(l,m,n,s,r,e,o);})):Mv(c,u,n,s,r,e,o);}return i.length?Promise.all(i).then(()=>n):n};});function Mv(e,t,n,o,r,i,s){e.issues.length&&(ki.has(typeof o)?n.issues.push(...Rt(o,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:i,issues:e.issues.map(a=>ht(a,s,Ke()))})),t.issues.length&&(ki.has(typeof o)?n.issues.push(...Rt(o,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:i,key:o,issues:t.issues.map(a=>ht(a,s,Ke()))})),n.value.set(e.value,t.value);}var Ip=P("$ZodSet",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let i=[];n.value=new Set;for(let s of r){let a=t.valueType._zod.run({value:s,issues:[]},o);a instanceof Promise?i.push(a.then(c=>jv(c,n))):jv(a,n);}return i.length?Promise.all(i).then(()=>n):n};});function jv(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value);}var zp=P("$ZodEnum",(e,t)=>{_e.init(e,t);let n=zi(t.entries),o=new Set(n);e._zod.values=o,e._zod.pattern=new RegExp(`^(${n.filter(r=>ki.has(typeof r)).map(r=>typeof r=="string"?At(r):r.toString()).join("|")})$`),e._zod.parse=(r,i)=>{let s=r.value;return o.has(s)||r.issues.push({code:"invalid_value",values:n,input:s,inst:e}),r};}),Op=P("$ZodLiteral",(e,t)=>{if(_e.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?At(o):o?At(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,r)=>{let i=o.value;return n.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o};}),kp=P("$ZodFile",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n};}),Np=P("$ZodTransform",(e,t)=>{_e.init(e,t),e._zod.optin="optional",e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new br(e.constructor.name);let r=t.transform(n.value,n);if(o.async)return (r instanceof Promise?r:Promise.resolve(r)).then(s=>(n.value=s,n.fallback=true,n));if(r instanceof Promise)throw new Ut;return n.value=r,n.fallback=true,n};});function Dv(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Aa=P("$ZodOptional",(e,t)=>{_e.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Oe(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Oi(n.source)})?$`):void 0}),e._zod.parse=(n,o)=>{if(t.innerType._zod.optin==="optional"){let r=n.value,i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(s=>Dv(s,r)):Dv(i,r)}return n.value===void 0?n:t.innerType._zod.run(n,o)};}),Pp=P("$ZodExactOptional",(e,t)=>{Aa.init(e,t),Oe(e._zod,"values",()=>t.innerType._zod.values),Oe(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,o)=>t.innerType._zod.run(n,o);}),Ap=P("$ZodNullable",(e,t)=>{_e.init(e,t),Oe(e._zod,"optin",()=>t.innerType._zod.optin),Oe(e._zod,"optout",()=>t.innerType._zod.optout),Oe(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Oi(n.source)}|null)$`):void 0}),Oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,o)=>n.value===null?n:t.innerType._zod.run(n,o);}),Cp=P("$ZodDefault",(e,t)=>{_e.init(e,t),e._zod.optin="optional",Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>Uv(i,t)):Uv(r,t)};});function Uv(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Mp=P("$ZodPrefault",(e,t)=>{_e.init(e,t),e._zod.optin="optional",Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>(o.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,o));}),jp=P("$ZodNonOptional",(e,t)=>{_e.init(e,t),Oe(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(o=>o!==void 0)):void 0}),e._zod.parse=(n,o)=>{let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>Lv(i,e)):Lv(r,e)};});function Lv(e,t){return !e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var Dp=P("$ZodSuccess",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new br("ZodSuccess");let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.issues.length===0,n)):(n.value=r.issues.length===0,n)};}),Up=P("$ZodCatch",(e,t)=>{_e.init(e,t),e._zod.optin="optional",Oe(e._zod,"optout",()=>t.innerType._zod.optout),Oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(s=>ht(s,o,Ke()))},input:n.value}),n.issues=[],n.fallback=true),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(i=>ht(i,o,Ke()))},input:n.value}),n.issues=[],n.fallback=true),n)};}),Lp=P("$ZodNaN",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n);}),Ca=P("$ZodPipe",(e,t)=>{_e.init(e,t),Oe(e._zod,"values",()=>t.in._zod.values),Oe(e._zod,"optin",()=>t.in._zod.optin),Oe(e._zod,"optout",()=>t.out._zod.optout),Oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if(o.direction==="backward"){let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(s=>Ea(s,t.in,o)):Ea(i,t.in,o)}let r=t.in._zod.run(n,o);return r instanceof Promise?r.then(i=>Ea(i,t.out,o)):Ea(r,t.out,o)};});function Ea(e,t,n){return e.issues.length?(e.aborted=true,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var qi=P("$ZodCodec",(e,t)=>{_e.init(e,t),Oe(e._zod,"values",()=>t.in._zod.values),Oe(e._zod,"optin",()=>t.in._zod.optin),Oe(e._zod,"optout",()=>t.out._zod.optout),Oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,o)=>{if((o.direction||"forward")==="forward"){let i=t.in._zod.run(n,o);return i instanceof Promise?i.then(s=>Ia(s,t,o)):Ia(i,t,o)}else {let i=t.out._zod.run(n,o);return i instanceof Promise?i.then(s=>Ia(s,t,o)):Ia(i,t,o)}};});function Ia(e,t,n){if(e.issues.length)return e.aborted=true,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(i=>za(e,i,t.out,n)):za(e,r,t.out,n)}else {let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(i=>za(e,i,t.in,n)):za(e,r,t.in,n)}}function za(e,t,n,o){return e.issues.length?(e.aborted=true,e):n._zod.run({value:t,issues:e.issues},o)}var Fp=P("$ZodPreprocess",(e,t)=>{Ca.init(e,t);}),qp=P("$ZodReadonly",(e,t)=>{_e.init(e,t),Oe(e._zod,"propValues",()=>t.innerType._zod.propValues),Oe(e._zod,"values",()=>t.innerType._zod.values),Oe(e._zod,"optin",()=>t.innerType?._zod?.optin),Oe(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,o)=>{if(o.direction==="backward")return t.innerType._zod.run(n,o);let r=t.innerType._zod.run(n,o);return r instanceof Promise?r.then(Fv):Fv(r)};});function Fv(e){return e.value=Object.freeze(e.value),e}var Vp=P("$ZodTemplateLiteral",(e,t)=>{_e.init(e,t);let n=[];for(let o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let r=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let i=r.startsWith("^")?1:0,s=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(i,s));}else if(o===null||Cd.has(typeof o))n.push(At(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(o,r)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o);}),Bp=P("$ZodFunction",(e,t)=>(_e.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...o){let r=e._def.input?pa(e._def.input,o):o,i=Reflect.apply(n,this,r);return e._def.output?pa(e._def.output,i):i}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let r=e._def.input?await fa(e._def.input,o):o,i=await Reflect.apply(n,this,r);return e._def.output?await fa(e._def.output,i):i}},e._zod.parse=(n,o)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let o=e.constructor;return Array.isArray(n[0])?new o({type:"function",input:new Pa({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new o({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:n})},e)),Kp=P("$ZodPromise",(e,t)=>{_e.init(e,t),e._zod.parse=(n,o)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},o));}),Gp=P("$ZodLazy",(e,t)=>{_e.init(e,t),Oe(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),Oe(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Oe(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Oe(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Oe(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,o)=>e._zod.innerType._zod.run(n,o);}),Hp=P("$ZodCustom",(e,t)=>{Fe.init(e,t),_e.init(e,t),e._zod.parse=(n,o)=>n,e._zod.check=n=>{let o=n.value,r=t.fn(o);if(r instanceof Promise)return r.then(i=>qv(i,n,o,e));qv(r,n,o,e);};});function qv(e,t,n,o){if(!e){let r={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(r.params=o._zod.def.params),t.issues.push(no(r));}}var Bi={};nr(Bi,{ar:()=>Zv,az:()=>Jv,be:()=>Wv,bg:()=>Yv,ca:()=>Qv,cs:()=>ey,da:()=>ty,de:()=>ry,el:()=>ny,en:()=>Ma,eo:()=>oy,es:()=>iy,fa:()=>sy,fi:()=>ay,fr:()=>cy,frCA:()=>uy,he:()=>ly,hr:()=>dy,hu:()=>my,hy:()=>fy,id:()=>hy,is:()=>gy,it:()=>_y,ja:()=>vy,ka:()=>yy,kh:()=>Sy,km:()=>ja,ko:()=>by,lt:()=>Ty,mk:()=>$y,ms:()=>xy,nl:()=>wy,no:()=>Ey,ota:()=>Iy,pl:()=>Oy,ps:()=>zy,pt:()=>ky,ro:()=>Ny,ru:()=>Ay,sl:()=>Cy,sv:()=>My,ta:()=>jy,th:()=>Dy,tr:()=>Uy,ua:()=>Ly,uk:()=>Da,ur:()=>Fy,uz:()=>qy,vi:()=>Vy,yo:()=>Gy,zhCN:()=>By,zhTW:()=>Ky});var M0=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},o={nan:"NaN"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${r.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${a}`}case "invalid_value":return r.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${Z(r.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${r.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${r.minimum.toString()} ${s.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${r.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${r.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${n[i.format]??r.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case "not_multiple_of":return `\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${r.divisor}`;case "unrecognized_keys":return `\u0645\u0639\u0631\u0641${r.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${r.keys.length>1?"\u0629":""}: ${D(r.keys,"\u060C ")}`;case "invalid_key":return `\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;case "invalid_union":return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case "invalid_element":return `\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${r.origin}`;default:return "\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function Zv(){return {localeError:M0()}}var j0=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${a}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${a}`}case "invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${Z(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()} ${s.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()} ${s.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[i.format]??r.format}`}case "not_multiple_of":return `Yanl\u0131\u015F \u0259d\u0259d: ${r.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case "unrecognized_keys":return `Tan\u0131nmayan a\xE7ar${r.keys.length>1?"lar":""}: ${D(r.keys,", ")}`;case "invalid_key":return `${r.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case "invalid_union":return "Yanl\u0131\u015F d\u0259y\u0259r";case "invalid_element":return `${r.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return "Yanl\u0131\u015F d\u0259y\u0259r"}}};function Jv(){return {localeError:j0()}}function Xv(e,t,n,o){let r=Math.abs(e),i=r%10,s=r%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?n:o}var D0=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${r.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${a}`}case "invalid_value":return r.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${Z(r.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);if(s){let a=Number(r.maximum),c=Xv(a,s.unit.one,s.unit.few,s.unit.many);return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${r.maximum.toString()} ${c}`}return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);if(s){let a=Number(r.minimum),c=Xv(a,s.unit.one,s.unit.few,s.unit.many);return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${s.verb} ${i}${r.minimum.toString()} ${c}`}return `\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${r.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[i.format]??r.format}`}case "not_multiple_of":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${r.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${D(r.keys,", ")}`;case "invalid_key":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case "invalid_union":return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case "invalid_element":return `\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${r.origin}`;default:return "\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function Wv(){return {localeError:D0()}}var U0=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${a}`}case "invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${Z(r.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${r.minimum.toString()} ${s.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${r.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;if(i.format==="starts_with")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(s="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${s} ${n[i.format]??r.format}`}case "not_multiple_of":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${r.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${r.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u043E\u0432\u0435":""}: ${D(r.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case "invalid_union":return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case "invalid_element":return `\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${r.origin}`;default:return "\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function Yv(){return {localeError:U0()}}var L0=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${a}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${a}`}case "invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${Z(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${D(r.values," o ")}`;case "too_big":{let i=r.inclusive?"com a m\xE0xim":"menys de",s=t(r.origin);return s?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${i} ${r.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${i} ${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?"com a m\xEDnim":"m\xE9s de",s=t(r.origin);return s?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${i} ${r.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${i} ${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${n[i.format]??r.format}`}case "not_multiple_of":return `N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${r.divisor}`;case "unrecognized_keys":return `Clau${r.keys.length>1?"s":""} no reconeguda${r.keys.length>1?"s":""}: ${D(r.keys,", ")}`;case "invalid_key":return `Clau inv\xE0lida a ${r.origin}`;case "invalid_union":return "Entrada inv\xE0lida";case "invalid_element":return `Element inv\xE0lid a ${r.origin}`;default:return "Entrada inv\xE0lida"}}};function Qv(){return {localeError:L0()}}var F0=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(r){return e[r]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${a}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${a}`}case "invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${Z(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.maximum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${i}${r.minimum.toString()} ${s.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${n[i.format]??r.format}`}case "not_multiple_of":return `Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${r.divisor}`;case "unrecognized_keys":return `Nezn\xE1m\xE9 kl\xED\u010De: ${D(r.keys,", ")}`;case "invalid_key":return `Neplatn\xFD kl\xED\u010D v ${r.origin}`;case "invalid_union":return "Neplatn\xFD vstup";case "invalid_element":return `Neplatn\xE1 hodnota v ${r.origin}`;default:return "Neplatn\xFD vstup"}}};function ey(){return {localeError:F0()}}var q0=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${a}`:`Ugyldigt input: forventede ${i}, fik ${a}`}case "invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${Z(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin),a=o[r.origin]??r.origin;return s?`For stor: forventede ${a??"value"} ${s.verb} ${i} ${r.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${a??"value"} havde ${i} ${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin),a=o[r.origin]??r.origin;return s?`For lille: forventede ${a} ${s.verb} ${i} ${r.minimum.toString()} ${s.unit}`:`For lille: forventede ${a} havde ${i} ${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??r.format}`}case "not_multiple_of":return `Ugyldigt tal: skal v\xE6re deleligt med ${r.divisor}`;case "unrecognized_keys":return `${r.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${D(r.keys,", ")}`;case "invalid_key":return `Ugyldig n\xF8gle i ${r.origin}`;case "invalid_union":return "Ugyldigt input: matcher ingen af de tilladte typer";case "invalid_element":return `Ugyldig v\xE6rdi i ${r.origin}`;default:return "Ugyldigt input"}}};function ty(){return {localeError:q0()}}var V0=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(r){return e[r]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},o={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${a}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${a}`}case "invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${Z(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${i}${r.maximum.toString()} ist`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${i}${r.minimum.toString()} ist`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${n[i.format]??r.format}`}case "not_multiple_of":return `Ung\xFCltige Zahl: muss ein Vielfaches von ${r.divisor} sein`;case "unrecognized_keys":return `${r.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${D(r.keys,", ")}`;case "invalid_key":return `Ung\xFCltiger Schl\xFCssel in ${r.origin}`;case "invalid_union":return "Ung\xFCltige Eingabe";case "invalid_element":return `Ung\xFCltiger Wert in ${r.origin}`;default:return "Ung\xFCltige Eingabe"}}};function ry(){return {localeError:V0()}}var B0=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(r){return e[r]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},o={nan:"NaN"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return typeof r.expected=="string"&&/^[A-Z]/.test(r.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${r.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${a}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${a}`}case "invalid_value":return r.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${Z(r.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${r.maximum.toString()} ${s.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${r.minimum.toString()} ${s.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${r.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${i.prefix}"`:i.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${i.suffix}"`:i.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${i.includes}"`:i.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[i.format]??r.format}`}case "not_multiple_of":return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${r.divisor}`;case "unrecognized_keys":return `\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${r.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${r.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${D(r.keys,", ")}`;case "invalid_key":return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${r.origin}`;case "invalid_union":return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case "invalid_element":return `\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${r.origin}`;default:return "\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function ny(){return {localeError:B0()}}var K0=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return `Invalid input: expected ${i}, received ${a}`}case "invalid_value":return r.values.length===1?`Invalid input: expected ${Z(r.values[0])}`:`Invalid option: expected one of ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Too big: expected ${r.origin??"value"} to have ${i}${r.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Too small: expected ${r.origin} to have ${i}${r.minimum.toString()} ${s.unit}`:`Too small: expected ${r.origin} to be ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${n[i.format]??r.format}`}case "not_multiple_of":return `Invalid number: must be a multiple of ${r.divisor}`;case "unrecognized_keys":return `Unrecognized key${r.keys.length>1?"s":""}: ${D(r.keys,", ")}`;case "invalid_key":return `Invalid key in ${r.origin}`;case "invalid_union":return r.options&&Array.isArray(r.options)&&r.options.length>0?`Invalid discriminator value. Expected ${r.options.map(s=>`'${s}'`).join(" | ")}`:"Invalid input";case "invalid_element":return `Invalid value in ${r.origin}`;default:return "Invalid input"}}};function Ma(){return {localeError:K0()}}var G0=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(r){return e[r]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${a}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${a}`}case "invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${Z(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${i}${r.minimum.toString()} ${s.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${n[i.format]??r.format}`}case "not_multiple_of":return `Nevalida nombro: devas esti oblo de ${r.divisor}`;case "unrecognized_keys":return `Nekonata${r.keys.length>1?"j":""} \u015Dlosilo${r.keys.length>1?"j":""}: ${D(r.keys,", ")}`;case "invalid_key":return `Nevalida \u015Dlosilo en ${r.origin}`;case "invalid_union":return "Nevalida enigo";case "invalid_element":return `Nevalida valoro en ${r.origin}`;default:return "Nevalida enigo"}}};function oy(){return {localeError:G0()}}var H0=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(r){return e[r]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${a}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${a}`}case "invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${Z(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin),a=o[r.origin]??r.origin;return s?`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${i}${r.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${a??"valor"} fuera ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin),a=o[r.origin]??r.origin;return s?`Demasiado peque\xF1o: se esperaba que ${a} tuviera ${i}${r.minimum.toString()} ${s.unit}`:`Demasiado peque\xF1o: se esperaba que ${a} fuera ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${n[i.format]??r.format}`}case "not_multiple_of":return `N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${r.divisor}`;case "unrecognized_keys":return `Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${D(r.keys,", ")}`;case "invalid_key":return `Llave inv\xE1lida en ${o[r.origin]??r.origin}`;case "invalid_union":return "Entrada inv\xE1lida";case "invalid_element":return `Valor inv\xE1lido en ${o[r.origin]??r.origin}`;default:return "Entrada inv\xE1lida"}}};function iy(){return {localeError:H0()}}var Z0=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${r.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${a} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case "invalid_value":return r.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${Z(r.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${D(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${s.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[i.format]??r.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case "not_multiple_of":return `\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${r.divisor} \u0628\u0627\u0634\u062F`;case "unrecognized_keys":return `\u06A9\u0644\u06CC\u062F${r.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${D(r.keys,", ")}`;case "invalid_key":return `\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${r.origin}`;case "invalid_union":return "\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case "invalid_element":return `\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${r.origin}`;default:return "\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function sy(){return {localeError:Z0()}}var J0=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(r){return e[r]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},o={nan:"NaN"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${a}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${a}`}case "invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${Z(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Liian suuri: ${s.subject} t\xE4ytyy olla ${i}${r.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Liian pieni: ${s.subject} t\xE4ytyy olla ${i}${r.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${n[i.format]??r.format}`}case "not_multiple_of":return `Virheellinen luku: t\xE4ytyy olla luvun ${r.divisor} monikerta`;case "unrecognized_keys":return `${r.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${D(r.keys,", ")}`;case "invalid_key":return "Virheellinen avain tietueessa";case "invalid_union":return "Virheellinen unioni";case "invalid_element":return "Virheellinen arvo joukossa";default:return "Virheellinen sy\xF6te"}}};function ay(){return {localeError:J0()}}var X0=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${a} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${a} re\xE7u`}case "invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${Z(r.values[0])} attendu`:`Option invalide : une valeur parmi ${D(r.values,"|")} attendue`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Trop grand : ${o[r.origin]??"valeur"} doit ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o[r.origin]??"valeur"} doit \xEAtre ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Trop petit : ${o[r.origin]??"valeur"} doit ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`Trop petit : ${o[r.origin]??"valeur"} doit \xEAtre ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${n[i.format]??r.format} invalide`}case "not_multiple_of":return `Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case "unrecognized_keys":return `Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${D(r.keys,", ")}`;case "invalid_key":return `Cl\xE9 invalide dans ${r.origin}`;case "invalid_union":return "Entr\xE9e invalide";case "invalid_element":return `Valeur invalide dans ${r.origin}`;default:return "Entr\xE9e invalide"}}};function cy(){return {localeError:X0()}}var W0=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(r){return e[r]??null}let n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${a}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${a}`}case "invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${Z(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"\u2264":"<",s=t(r.origin);return s?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${i}${r.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?"\u2265":">",s=t(r.origin);return s?`Trop petit : attendu que ${r.origin} ait ${i}${r.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${r.origin} soit ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${n[i.format]??r.format} invalide`}case "not_multiple_of":return `Nombre invalide : doit \xEAtre un multiple de ${r.divisor}`;case "unrecognized_keys":return `Cl\xE9${r.keys.length>1?"s":""} non reconnue${r.keys.length>1?"s":""} : ${D(r.keys,", ")}`;case "invalid_key":return `Cl\xE9 invalide dans ${r.origin}`;case "invalid_union":return "Entr\xE9e invalide";case "invalid_element":return `Valeur invalide dans ${r.origin}`;default:return "Entr\xE9e invalide"}}};function uy(){return {localeError:W0()}}var Y0=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=u=>u?e[u]:void 0,o=u=>{let l=n(u);return l?l.label:u??e.unknown.label},r=u=>`\u05D4${o(u)}`,i=u=>(n(u)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",s=u=>u?t[u]??null:null,a={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},c={nan:"NaN"};return u=>{switch(u.code){case "invalid_type":{let l=u.expected,m=c[l??""]??o(l),h=J(u.input),y=c[h]??e[h]?.label??h;return /^[A-Z]/.test(u.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${u.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${y}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}, \u05D4\u05EA\u05E7\u05D1\u05DC ${y}`}case "invalid_value":{if(u.values.length===1)return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${Z(u.values[0])}`;let l=u.values.map(y=>Z(y));if(u.values.length===2)return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l[0]} \u05D0\u05D5 ${l[1]}`;let m=l[l.length-1];return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l.slice(0,-1).join(", ")} \u05D0\u05D5 ${m}`}case "too_big":{let l=s(u.origin),m=r(u.origin??"value");if(u.origin==="string")return `${l?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.maximum.toString()} ${l?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(u.origin==="number"){let b=u.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${u.maximum}`;return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${b}`}if(u.origin==="array"||u.origin==="set"){let b=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",p=u.inclusive?`${u.maximum} ${l?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${u.maximum} ${l?.unit??""}`;return `\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} ${b} \u05DC\u05D4\u05DB\u05D9\u05DC ${p}`.trim()}let h=u.inclusive?"<=":"<",y=i(u.origin??"value");return l?.unit?`${l.longLabel} \u05DE\u05D3\u05D9: ${m} ${y} ${h}${u.maximum.toString()} ${l.unit}`:`${l?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${m} ${y} ${h}${u.maximum.toString()}`}case "too_small":{let l=s(u.origin),m=r(u.origin??"value");if(u.origin==="string")return `${l?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.minimum.toString()} ${l?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(u.origin==="number"){let b=u.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${u.minimum}`;return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${b}`}if(u.origin==="array"||u.origin==="set"){let b=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){let S=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${b} \u05DC\u05D4\u05DB\u05D9\u05DC ${S}`}let p=u.inclusive?`${u.minimum} ${l?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${u.minimum} ${l?.unit??""}`;return `\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${b} \u05DC\u05D4\u05DB\u05D9\u05DC ${p}`.trim()}let h=u.inclusive?">=":">",y=i(u.origin??"value");return l?.unit?`${l.shortLabel} \u05DE\u05D3\u05D9: ${m} ${y} ${h}${u.minimum.toString()} ${l.unit}`:`${l?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${m} ${y} ${h}${u.minimum.toString()}`}case "invalid_format":{let l=u;if(l.format==="starts_with")return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${l.prefix}"`;if(l.format==="ends_with")return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${l.suffix}"`;if(l.format==="includes")return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${l.includes}"`;if(l.format==="regex")return `\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${l.pattern}`;let m=a[l.format],h=m?.label??l.format,b=(m?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return `${h} \u05DC\u05D0 ${b}`}case "not_multiple_of":return `\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${u.divisor}`;case "unrecognized_keys":return `\u05DE\u05E4\u05EA\u05D7${u.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${u.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${D(u.keys,", ")}`;case "invalid_key":return "\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case "invalid_union":return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case "invalid_element":return `\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${r(u.origin??"array")}`;default:return "\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function ly(){return {localeError:Y0()}}var Q0=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(r){return e[r]??null}let n={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},o={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${r.expected}, a primljeno je ${a}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${a}`}case "invalid_value":return r.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${Z(r.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin),a=o[r.origin]??r.origin;return s?`Preveliko: o\u010Dekivano da ${a??"vrijednost"} ima ${i}${r.maximum.toString()} ${s.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${a??"vrijednost"} bude ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin),a=o[r.origin]??r.origin;return s?`Premalo: o\u010Dekivano da ${a} ima ${i}${r.minimum.toString()} ${s.unit}`:`Premalo: o\u010Dekivano da ${a} bude ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${n[i.format]??r.format}`}case "not_multiple_of":return `Neispravan broj: mora biti vi\u0161ekratnik od ${r.divisor}`;case "unrecognized_keys":return `Neprepoznat${r.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${D(r.keys,", ")}`;case "invalid_key":return `Neispravan klju\u010D u ${o[r.origin]??r.origin}`;case "invalid_union":return "Neispravan unos";case "invalid_element":return `Neispravna vrijednost u ${o[r.origin]??r.origin}`;default:return "Neispravan unos"}}};function dy(){return {localeError:Q0()}}var ex=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(r){return e[r]??null}let n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${a}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${a}`}case "invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${Z(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${r.maximum.toString()} ${s.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${i}${r.minimum.toString()} ${s.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[i.format]??r.format}`}case "not_multiple_of":return `\xC9rv\xE9nytelen sz\xE1m: ${r.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case "unrecognized_keys":return `Ismeretlen kulcs${r.keys.length>1?"s":""}: ${D(r.keys,", ")}`;case "invalid_key":return `\xC9rv\xE9nytelen kulcs ${r.origin}`;case "invalid_union":return "\xC9rv\xE9nytelen bemenet";case "invalid_element":return `\xC9rv\xE9nytelen \xE9rt\xE9k: ${r.origin}`;default:return "\xC9rv\xE9nytelen bemenet"}}};function my(){return {localeError:ex()}}function py(e,t,n){return Math.abs(e)===1?t:n}function uo(e){if(!e)return "";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}var tx=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(r){return e[r]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${r.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${a}`}case "invalid_value":return r.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${Z(r.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);if(s){let a=Number(r.maximum),c=py(a,s.unit.one,s.unit.many);return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${uo(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${r.maximum.toString()} ${c}`}return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${uo(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);if(s){let a=Number(r.minimum),c=py(a,s.unit.one,s.unit.many);return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${uo(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${r.minimum.toString()} ${c}`}return `\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${uo(r.origin)} \u056C\u056B\u0576\u056B ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[i.format]??r.format}`}case "not_multiple_of":return `\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${r.divisor}-\u056B`;case "unrecognized_keys":return `\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${r.keys.length>1?"\u0576\u0565\u0580":""}. ${D(r.keys,", ")}`;case "invalid_key":return `\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${uo(r.origin)}-\u0578\u0582\u0574`;case "invalid_union":return "\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case "invalid_element":return `\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${uo(r.origin)}-\u0578\u0582\u0574`;default:return "\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function fy(){return {localeError:tx()}}var rx=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${a}`:`Input tidak valid: diharapkan ${i}, diterima ${a}`}case "invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${Z(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${i}${r.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Terlalu kecil: diharapkan ${r.origin} memiliki ${i}${r.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${n[i.format]??r.format} tidak valid`}case "not_multiple_of":return `Angka tidak valid: harus kelipatan dari ${r.divisor}`;case "unrecognized_keys":return `Kunci tidak dikenali ${r.keys.length>1?"s":""}: ${D(r.keys,", ")}`;case "invalid_key":return `Kunci tidak valid di ${r.origin}`;case "invalid_union":return "Input tidak valid";case "invalid_element":return `Nilai tidak valid di ${r.origin}`;default:return "Input tidak valid"}}};function hy(){return {localeError:rx()}}var nx=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(r){return e[r]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${a} \xFEar sem \xE1 a\xF0 vera ${i}`}case "invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${Z(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${i}${r.maximum.toString()} ${s.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${i}${r.minimum.toString()} ${s.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${n[i.format]??r.format}`}case "not_multiple_of":return `R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${r.divisor}`;case "unrecognized_keys":return `\xD3\xFEekkt ${r.keys.length>1?"ir lyklar":"ur lykill"}: ${D(r.keys,", ")}`;case "invalid_key":return `Rangur lykill \xED ${r.origin}`;case "invalid_union":return "Rangt gildi";case "invalid_element":return `Rangt gildi \xED ${r.origin}`;default:return "Rangt gildi"}}};function gy(){return {localeError:nx()}}var ox=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(r){return e[r]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${a}`:`Input non valido: atteso ${i}, ricevuto ${a}`}case "invalid_value":return r.values.length===1?`Input non valido: atteso ${Z(r.values[0])}`:`Opzione non valida: atteso uno tra ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Troppo grande: ${r.origin??"valore"} deve avere ${i}${r.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Troppo piccolo: ${r.origin} deve avere ${i}${r.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${r.origin} deve essere ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${n[i.format]??r.format}`}case "not_multiple_of":return `Numero non valido: deve essere un multiplo di ${r.divisor}`;case "unrecognized_keys":return `Chiav${r.keys.length>1?"i":"e"} non riconosciut${r.keys.length>1?"e":"a"}: ${D(r.keys,", ")}`;case "invalid_key":return `Chiave non valida in ${r.origin}`;case "invalid_union":return "Input non valido";case "invalid_element":return `Valore non valido in ${r.origin}`;default:return "Input non valido"}}};function _y(){return {localeError:ox()}}var ix=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(r){return e[r]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${a}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case "invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${Z(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${D(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case "too_big":{let i=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",s=t(r.origin);return s?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${s.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case "too_small":{let i=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",s=t(r.origin);return s?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${s.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[i.format]??r.format}`}case "not_multiple_of":return `\u7121\u52B9\u306A\u6570\u5024: ${r.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case "unrecognized_keys":return `\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${r.keys.length>1?"\u7FA4":""}: ${D(r.keys,"\u3001")}`;case "invalid_key":return `${r.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case "invalid_union":return "\u7121\u52B9\u306A\u5165\u529B";case "invalid_element":return `${r.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return "\u7121\u52B9\u306A\u5165\u529B"}}};function vy(){return {localeError:ix()}}var sx=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(r){return e[r]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${r.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${a}`}case "invalid_value":return r.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${Z(r.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${D(r.values,"|")}-\u10D3\u10D0\u10DC`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${r.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[i.format]??r.format}`}case "not_multiple_of":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${r.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case "unrecognized_keys":return `\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${r.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${D(r.keys,", ")}`;case "invalid_key":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${r.origin}-\u10E8\u10D8`;case "invalid_union":return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case "invalid_element":return `\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${r.origin}-\u10E8\u10D8`;default:return "\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function yy(){return {localeError:sx()}}var ax=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(r){return e[r]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},o={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${r.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${a}`}case "invalid_value":return r.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${Z(r.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${r.maximum.toString()} ${s.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${i} ${r.minimum.toString()} ${s.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${i} ${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[i.format]??r.format}`}case "not_multiple_of":return `\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${r.divisor}`;case "unrecognized_keys":return `\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${D(r.keys,", ")}`;case "invalid_key":return `\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;case "invalid_union":return "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case "invalid_element":return `\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${r.origin}`;default:return "\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function ja(){return {localeError:ax()}}function Sy(){return ja()}var cx=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(r){return e[r]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},o={nan:"NaN"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${a}\uC785\uB2C8\uB2E4`}case "invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${Z(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${D(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case "too_big":{let i=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",s=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(r.origin),c=a?.unit??"\uC694\uC18C";return a?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${c} ${i}${s}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${i}${s}`}case "too_small":{let i=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",s=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",a=t(r.origin),c=a?.unit??"\uC694\uC18C";return a?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${c} ${i}${s}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${i}${s}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[i.format]??r.format}`}case "not_multiple_of":return `\uC798\uBABB\uB41C \uC22B\uC790: ${r.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case "unrecognized_keys":return `\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${D(r.keys,", ")}`;case "invalid_key":return `\uC798\uBABB\uB41C \uD0A4: ${r.origin}`;case "invalid_union":return "\uC798\uBABB\uB41C \uC785\uB825";case "invalid_element":return `\uC798\uBABB\uB41C \uAC12: ${r.origin}`;default:return "\uC798\uBABB\uB41C \uC785\uB825"}}};function by(){return {localeError:cx()}}var Vi=e=>e.charAt(0).toUpperCase()+e.slice(1);function Ry(e){let t=Math.abs(e),n=t%10,o=t%100;return o>=11&&o<=19||n===0?"many":n===1?"one":"few"}var ux=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(r,i,s,a){let c=e[r]??null;return c===null?c:{unit:c.unit[i],verb:c.verb[a][s?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},o={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Gautas tipas ${a}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${a}, o tik\u0117tasi - ${i}`}case "invalid_value":return r.values.length===1?`Privalo b\u016Bti ${Z(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${D(r.values,"|")} pasirinkim\u0173`;case "too_big":{let i=o[r.origin]??r.origin,s=t(r.origin,Ry(Number(r.maximum)),r.inclusive??false,"smaller");if(s?.verb)return `${Vi(i??r.origin??"reik\u0161m\u0117")} ${s.verb} ${r.maximum.toString()} ${s.unit??"element\u0173"}`;let a=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return `${Vi(i??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${r.maximum.toString()} ${s?.unit}`}case "too_small":{let i=o[r.origin]??r.origin,s=t(r.origin,Ry(Number(r.minimum)),r.inclusive??false,"bigger");if(s?.verb)return `${Vi(i??r.origin??"reik\u0161m\u0117")} ${s.verb} ${r.minimum.toString()} ${s.unit??"element\u0173"}`;let a=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return `${Vi(i??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${a} ${r.minimum.toString()} ${s?.unit}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${n[i.format]??r.format}`}case "not_multiple_of":return `Skai\u010Dius privalo b\u016Bti ${r.divisor} kartotinis.`;case "unrecognized_keys":return `Neatpa\u017Eint${r.keys.length>1?"i":"as"} rakt${r.keys.length>1?"ai":"as"}: ${D(r.keys,", ")}`;case "invalid_key":return "Rastas klaidingas raktas";case "invalid_union":return "Klaidinga \u012Fvestis";case "invalid_element":{let i=o[r.origin]??r.origin;return `${Vi(i??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return "Klaidinga \u012Fvestis"}}};function Ty(){return {localeError:ux()}}var lx=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(r){return e[r]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${r.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${a}`}case "invalid_value":return r.values.length===1?`Invalid input: expected ${Z(r.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${r.minimum.toString()} ${s.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${r.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${n[i.format]??r.format}`}case "not_multiple_of":return `\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${r.divisor}`;case "unrecognized_keys":return `${r.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${D(r.keys,", ")}`;case "invalid_key":return `\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${r.origin}`;case "invalid_union":return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case "invalid_element":return `\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${r.origin}`;default:return "\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function $y(){return {localeError:lx()}}var dx=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(r){return e[r]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${a}`:`Input tidak sah: dijangka ${i}, diterima ${a}`}case "invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${Z(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Terlalu besar: dijangka ${r.origin??"nilai"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Terlalu kecil: dijangka ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${n[i.format]??r.format} tidak sah`}case "not_multiple_of":return `Nombor tidak sah: perlu gandaan ${r.divisor}`;case "unrecognized_keys":return `Kunci tidak dikenali: ${D(r.keys,", ")}`;case "invalid_key":return `Kunci tidak sah dalam ${r.origin}`;case "invalid_union":return "Input tidak sah";case "invalid_element":return `Nilai tidak sah dalam ${r.origin}`;default:return "Input tidak sah"}}};function xy(){return {localeError:dx()}}var mx=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(r){return e[r]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},o={nan:"NaN",number:"getal"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${a}`:`Ongeldige invoer: verwacht ${i}, ontving ${a}`}case "invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${Z(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin),a=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return s?`Te ${a}: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${a}: verwacht dat ${r.origin??"waarde"} ${i}${r.maximum.toString()} is`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin),a=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return s?`Te ${a}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${a}: verwacht dat ${r.origin} ${i}${r.minimum.toString()} is`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${n[i.format]??r.format}`}case "not_multiple_of":return `Ongeldig getal: moet een veelvoud van ${r.divisor} zijn`;case "unrecognized_keys":return `Onbekende key${r.keys.length>1?"s":""}: ${D(r.keys,", ")}`;case "invalid_key":return `Ongeldige key in ${r.origin}`;case "invalid_union":return "Ongeldige invoer";case "invalid_element":return `Ongeldige waarde in ${r.origin}`;default:return "Ongeldige invoer"}}};function wy(){return {localeError:mx()}}var px=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(r){return e[r]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${a}`:`Ugyldig input: forventet ${i}, fikk ${a}`}case "invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${Z(r.values[0])}`:`Ugyldig valg: forventet en av ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${n[i.format]??r.format}`}case "not_multiple_of":return `Ugyldig tall: m\xE5 v\xE6re et multiplum av ${r.divisor}`;case "unrecognized_keys":return `${r.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${D(r.keys,", ")}`;case "invalid_key":return `Ugyldig n\xF8kkel i ${r.origin}`;case "invalid_union":return "Ugyldig input";case "invalid_element":return `Ugyldig verdi i ${r.origin}`;default:return "Ugyldig input"}}};function Ey(){return {localeError:px()}}var fx=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(r){return e[r]??null}let n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${a}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${a}`}case "invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${Z(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} ${s.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${i}${r.maximum.toString()} olmal\u0131yd\u0131.`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} ${s.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${i}${r.minimum.toString()} olmal\u0131yd\u0131.`}case "invalid_format":{let i=r;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[i.format]??r.format}`}case "not_multiple_of":return `F\xE2sit say\u0131: ${r.divisor} kat\u0131 olmal\u0131yd\u0131.`;case "unrecognized_keys":return `Tan\u0131nmayan anahtar ${r.keys.length>1?"s":""}: ${D(r.keys,", ")}`;case "invalid_key":return `${r.origin} i\xE7in tan\u0131nmayan anahtar var.`;case "invalid_union":return "Giren tan\u0131namad\u0131.";case "invalid_element":return `${r.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return "K\u0131ymet tan\u0131namad\u0131."}}};function Iy(){return {localeError:fx()}}var hx=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(r){return e[r]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${r.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${a} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case "invalid_value":return r.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${Z(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${D(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${r.maximum.toString()} \u0648\u064A`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} ${s.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${i}${r.minimum.toString()} \u0648\u064A`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[i.format]??r.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case "not_multiple_of":return `\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${r.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case "unrecognized_keys":return `\u0646\u0627\u0633\u0645 ${r.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${D(r.keys,", ")}`;case "invalid_key":return `\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${r.origin} \u06A9\u06D0`;case "invalid_union":return "\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case "invalid_element":return `\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${r.origin} \u06A9\u06D0`;default:return "\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function zy(){return {localeError:hx()}}var gx=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(r){return e[r]??null}let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},o={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${a}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${a}`}case "invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${Z(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${r.maximum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${r.minimum.toString()} ${s.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[i.format]??r.format}`}case "not_multiple_of":return `Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${r.divisor}`;case "unrecognized_keys":return `Nierozpoznane klucze${r.keys.length>1?"s":""}: ${D(r.keys,", ")}`;case "invalid_key":return `Nieprawid\u0142owy klucz w ${r.origin}`;case "invalid_union":return "Nieprawid\u0142owe dane wej\u015Bciowe";case "invalid_element":return `Nieprawid\u0142owa warto\u015B\u0107 w ${r.origin}`;default:return "Nieprawid\u0142owe dane wej\u015Bciowe"}}};function Oy(){return {localeError:gx()}}var _x=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(r){return e[r]??null}let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${a}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${a}`}case "invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${Z(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${i}${r.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Muito pequeno: esperado que ${r.origin} tivesse ${i}${r.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${n[i.format]??r.format} inv\xE1lido`}case "not_multiple_of":return `N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${r.divisor}`;case "unrecognized_keys":return `Chave${r.keys.length>1?"s":""} desconhecida${r.keys.length>1?"s":""}: ${D(r.keys,", ")}`;case "invalid_key":return `Chave inv\xE1lida em ${r.origin}`;case "invalid_union":return "Entrada inv\xE1lida";case "invalid_element":return `Valor inv\xE1lido em ${r.origin}`;default:return "Campo inv\xE1lido"}}};function ky(){return {localeError:_x()}}var vx=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(r){return e[r]??null}let n={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},o={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return `Intrare invalid\u0103: a\u0219teptat ${i}, primit ${a}`}case "invalid_value":return r.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${Z(r.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} s\u0103 fie ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Prea mic: a\u0219teptat ca ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`Prea mic: a\u0219teptat ca ${r.origin} s\u0103 fie ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${n[i.format]??r.format}`}case "not_multiple_of":return `Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${r.divisor}`;case "unrecognized_keys":return `Chei nerecunoscute: ${D(r.keys,", ")}`;case "invalid_key":return `Cheie invalid\u0103 \xEEn ${r.origin}`;case "invalid_union":return "Intrare invalid\u0103";case "invalid_element":return `Valoare invalid\u0103 \xEEn ${r.origin}`;default:return "Intrare invalid\u0103"}}};function Ny(){return {localeError:vx()}}function Py(e,t,n,o){let r=Math.abs(e),i=r%10,s=r%100;return s>=11&&s<=19?o:i===1?t:i>=2&&i<=4?n:o}var yx=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${r.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${a}`}case "invalid_value":return r.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${Z(r.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);if(s){let a=Number(r.maximum),c=Py(a,s.unit.one,s.unit.few,s.unit.many);return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${r.maximum.toString()} ${c}`}return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);if(s){let a=Number(r.minimum),c=Py(a,s.unit.one,s.unit.few,s.unit.many);return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${r.minimum.toString()} ${c}`}return `\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${r.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[i.format]??r.format}`}case "not_multiple_of":return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${r.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${r.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0438":""}: ${D(r.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${r.origin}`;case "invalid_union":return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case "invalid_element":return `\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${r.origin}`;default:return "\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function Ay(){return {localeError:yx()}}var Sx=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(r){return e[r]??null}let n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${a}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${a}`}case "invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${Z(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${i}${r.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${i}${r.minimum.toString()} ${s.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${n[i.format]??r.format}`}case "not_multiple_of":return `Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${r.divisor}`;case "unrecognized_keys":return `Neprepoznan${r.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${D(r.keys,", ")}`;case "invalid_key":return `Neveljaven klju\u010D v ${r.origin}`;case "invalid_union":return "Neveljaven vnos";case "invalid_element":return `Neveljavna vrednost v ${r.origin}`;default:return "Neveljaven vnos"}}};function Cy(){return {localeError:Sx()}}var bx=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(r){return e[r]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${a}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${a}`}case "invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${Z(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()} ${s.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()} ${s.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${n[i.format]??r.format}`}case "not_multiple_of":return `Ogiltigt tal: m\xE5ste vara en multipel av ${r.divisor}`;case "unrecognized_keys":return `${r.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${D(r.keys,", ")}`;case "invalid_key":return `Ogiltig nyckel i ${r.origin??"v\xE4rdet"}`;case "invalid_union":return "Ogiltig input";case "invalid_element":return `Ogiltigt v\xE4rde i ${r.origin??"v\xE4rdet"}`;default:return "Ogiltig input"}}};function My(){return {localeError:bx()}}var Rx=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(r){return e[r]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${r.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${a}`}case "invalid_value":return r.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${Z(r.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${D(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${r.maximum.toString()} ${s.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${i}${r.minimum.toString()} ${s.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${r.origin} ${i}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[i.format]??r.format}`}case "not_multiple_of":return `\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${r.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case "unrecognized_keys":return `\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${r.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${D(r.keys,", ")}`;case "invalid_key":return `${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case "invalid_union":return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case "invalid_element":return `${r.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return "\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function jy(){return {localeError:Rx()}}var Tx=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(r){return e[r]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},o={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${r.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${a}`}case "invalid_value":return r.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${Z(r.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",s=t(r.origin);return s?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.maximum.toString()} ${s.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",s=t(r.origin);return s?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.minimum.toString()} ${s.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[i.format]??r.format}`}case "not_multiple_of":return `\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${r.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case "unrecognized_keys":return `\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${D(r.keys,", ")}`;case "invalid_key":return `\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;case "invalid_union":return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case "invalid_element":return `\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${r.origin}`;default:return "\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function Dy(){return {localeError:Tx()}}var $x=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(r){return e[r]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},o={nan:"NaN"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${a}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${a}`}case "invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${Z(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${i}${r.maximum.toString()} ${s.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${i}${r.minimum.toString()} ${s.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[i.format]??r.format}`}case "not_multiple_of":return `Ge\xE7ersiz say\u0131: ${r.divisor} ile tam b\xF6l\xFCnebilmeli`;case "unrecognized_keys":return `Tan\u0131nmayan anahtar${r.keys.length>1?"lar":""}: ${D(r.keys,", ")}`;case "invalid_key":return `${r.origin} i\xE7inde ge\xE7ersiz anahtar`;case "invalid_union":return "Ge\xE7ersiz de\u011Fer";case "invalid_element":return `${r.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return "Ge\xE7ersiz de\u011Fer"}}};function Uy(){return {localeError:$x()}}var xx=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(r){return e[r]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${r.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${a}`}case "invalid_value":return r.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${Z(r.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${r.origin} \u0431\u0443\u0434\u0435 ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[i.format]??r.format}`}case "not_multiple_of":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${r.divisor}`;case "unrecognized_keys":return `\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${r.keys.length>1?"\u0456":""}: ${D(r.keys,", ")}`;case "invalid_key":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${r.origin}`;case "invalid_union":return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case "invalid_element":return `\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${r.origin}`;default:return "\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function Da(){return {localeError:xx()}}function Ly(){return Da()}var wx=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(r){return e[r]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${r.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${a} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case "invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${Z(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${D(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${r.maximum.toString()} ${s.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${i}${r.minimum.toString()} ${s.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u0627 ${i}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[i.format]??r.format}`}case "not_multiple_of":return `\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${r.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case "unrecognized_keys":return `\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${r.keys.length>1?"\u0632":""}: ${D(r.keys,"\u060C ")}`;case "invalid_key":return `${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case "invalid_union":return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case "invalid_element":return `${r.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return "\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function Fy(){return {localeError:wx()}}var Ex=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(r){return e[r]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},o={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${a}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${a}`}case "invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${Z(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${r.origin} ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[i.format]??r.format}`}case "not_multiple_of":return `Noto\u2018g\u2018ri raqam: ${r.divisor} ning karralisi bo\u2018lishi kerak`;case "unrecognized_keys":return `Noma\u2019lum kalit${r.keys.length>1?"lar":""}: ${D(r.keys,", ")}`;case "invalid_key":return `${r.origin} dagi kalit noto\u2018g\u2018ri`;case "invalid_union":return "Noto\u2018g\u2018ri kirish";case "invalid_element":return `${r.origin} da noto\u2018g\u2018ri qiymat`;default:return "Noto\u2018g\u2018ri kirish"}}};function qy(){return {localeError:Ex()}}var Ix=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(r){return e[r]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${r.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${a}`}case "invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${Z(r.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${s.verb} ${i}${r.maximum.toString()} ${s.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${s.verb} ${i}${r.minimum.toString()} ${s.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${n[i.format]??r.format} kh\xF4ng h\u1EE3p l\u1EC7`}case "not_multiple_of":return `S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${r.divisor}`;case "unrecognized_keys":return `Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${D(r.keys,", ")}`;case "invalid_key":return `Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;case "invalid_union":return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case "invalid_element":return `Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${r.origin}`;default:return "\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function Vy(){return {localeError:Ix()}}var zx=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(r){return e[r]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${a}`}case "invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${Z(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()} ${s.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()} ${s.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${n[i.format]??r.format}`}case "not_multiple_of":return `\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${r.divisor} \u7684\u500D\u6570`;case "unrecognized_keys":return `\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${D(r.keys,", ")}`;case "invalid_key":return `${r.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case "invalid_union":return "\u65E0\u6548\u8F93\u5165";case "invalid_element":return `${r.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return "\u65E0\u6548\u8F93\u5165"}}};function By(){return {localeError:zx()}}var Ox=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(r){return e[r]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},o={nan:"NaN"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${a}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${a}`}case "invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${Z(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()} ${s.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${i}${r.maximum.toString()}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()} ${s.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${i}${r.minimum.toString()}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${n[i.format]??r.format}`}case "not_multiple_of":return `\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${r.divisor} \u7684\u500D\u6578`;case "unrecognized_keys":return `\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${r.keys.length>1?"\u5011":""}\uFF1A${D(r.keys,"\u3001")}`;case "invalid_key":return `${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case "invalid_union":return "\u7121\u6548\u7684\u8F38\u5165\u503C";case "invalid_element":return `${r.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return "\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Ky(){return {localeError:Ox()}}var kx=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(r){return e[r]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case "invalid_type":{let i=o[r.expected]??r.expected,s=J(r.input),a=o[s]??s;return /^[A-Z]/.test(r.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${r.expected}, \xE0m\u1ECD\u0300 a r\xED ${a}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${a}`}case "invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${Z(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${D(r.values,"|")}`;case "too_big":{let i=r.inclusive?"<=":"<",s=t(r.origin);return s?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${s.verb} ${i}${r.maximum} ${s.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.maximum}`}case "too_small":{let i=r.inclusive?">=":">",s=t(r.origin);return s?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${s.verb} ${i}${r.minimum} ${s.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${r.minimum}`}case "invalid_format":{let i=r;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${n[i.format]??r.format}`}case "not_multiple_of":return `N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${r.divisor}`;case "unrecognized_keys":return `B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${D(r.keys,", ")}`;case "invalid_key":return `B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;case "invalid_union":return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case "invalid_element":return `Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${r.origin}`;default:return "\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function Gy(){return {localeError:kx()}}var Hy,Zp=Symbol("ZodOutput"),Jp=Symbol("ZodInput"),Ua=class{constructor(){this._map=new WeakMap,this._idmap=new Map;}add(t,...n){let o=n[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let o={...this.get(n)??{}};delete o.id;let r={...o,...this._map.get(t)};return Object.keys(r).length?r:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function La(){return new Ua}(Hy=globalThis).__zod_globalRegistry??(Hy.__zod_globalRegistry=La());var st=globalThis.__zod_globalRegistry;function Xp(e,t){return new e({type:"string",...W(t)})}function Wp(e,t){return new e({type:"string",coerce:true,...W(t)})}function Fa(e,t){return new e({type:"string",format:"email",check:"string_format",abort:false,...W(t)})}function Ki(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:false,...W(t)})}function qa(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,...W(t)})}function Va(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v4",...W(t)})}function Ba(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v6",...W(t)})}function Ka(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:false,version:"v7",...W(t)})}function Gi(e,t){return new e({type:"string",format:"url",check:"string_format",abort:false,...W(t)})}function Ga(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:false,...W(t)})}function Ha(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:false,...W(t)})}function Za(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:false,...W(t)})}function Ja(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:false,...W(t)})}function Xa(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:false,...W(t)})}function Wa(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:false,...W(t)})}function Ya(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:false,...W(t)})}function Qa(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:false,...W(t)})}function ec(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:false,...W(t)})}function Yp(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:false,...W(t)})}function tc(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:false,...W(t)})}function rc(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:false,...W(t)})}function nc(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:false,...W(t)})}function oc(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:false,...W(t)})}function ic(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:false,...W(t)})}function sc(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:false,...W(t)})}var Qp={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function ef(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:false,local:false,precision:null,...W(t)})}function tf(e,t){return new e({type:"string",format:"date",check:"string_format",...W(t)})}function rf(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...W(t)})}function nf(e,t){return new e({type:"string",format:"duration",check:"string_format",...W(t)})}function of(e,t){return new e({type:"number",checks:[],...W(t)})}function sf(e,t){return new e({type:"number",coerce:true,checks:[],...W(t)})}function af(e,t){return new e({type:"number",check:"number_format",abort:false,format:"safeint",...W(t)})}function cf(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float32",...W(t)})}function uf(e,t){return new e({type:"number",check:"number_format",abort:false,format:"float64",...W(t)})}function lf(e,t){return new e({type:"number",check:"number_format",abort:false,format:"int32",...W(t)})}function df(e,t){return new e({type:"number",check:"number_format",abort:false,format:"uint32",...W(t)})}function mf(e,t){return new e({type:"boolean",...W(t)})}function pf(e,t){return new e({type:"boolean",coerce:true,...W(t)})}function ff(e,t){return new e({type:"bigint",...W(t)})}function hf(e,t){return new e({type:"bigint",coerce:true,...W(t)})}function gf(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"int64",...W(t)})}function _f(e,t){return new e({type:"bigint",check:"bigint_format",abort:false,format:"uint64",...W(t)})}function vf(e,t){return new e({type:"symbol",...W(t)})}function yf(e,t){return new e({type:"undefined",...W(t)})}function Sf(e,t){return new e({type:"null",...W(t)})}function bf(e){return new e({type:"any"})}function Rf(e){return new e({type:"unknown"})}function Tf(e,t){return new e({type:"never",...W(t)})}function $f(e,t){return new e({type:"void",...W(t)})}function xf(e,t){return new e({type:"date",...W(t)})}function wf(e,t){return new e({type:"date",coerce:true,...W(t)})}function Ef(e,t){return new e({type:"nan",...W(t)})}function Ht(e,t){return new xa({check:"less_than",...W(t),value:e,inclusive:false})}function zt(e,t){return new xa({check:"less_than",...W(t),value:e,inclusive:true})}function Zt(e,t){return new wa({check:"greater_than",...W(t),value:e,inclusive:false})}function gt(e,t){return new wa({check:"greater_than",...W(t),value:e,inclusive:true})}function ac(e){return Zt(0,e)}function cc(e){return Ht(0,e)}function uc(e){return zt(0,e)}function lc(e){return gt(0,e)}function wr(e,t){return new ym({check:"multiple_of",...W(t),value:e})}function Er(e,t){return new Rm({check:"max_size",...W(t),maximum:e})}function Jt(e,t){return new Tm({check:"min_size",...W(t),minimum:e})}function In(e,t){return new $m({check:"size_equals",...W(t),size:e})}function zn(e,t){return new xm({check:"max_length",...W(t),maximum:e})}function ir(e,t){return new wm({check:"min_length",...W(t),minimum:e})}function On(e,t){return new Em({check:"length_equals",...W(t),length:e})}function lo(e,t){return new Im({check:"string_format",format:"regex",...W(t),pattern:e})}function mo(e){return new zm({check:"string_format",format:"lowercase",...W(e)})}function po(e){return new Om({check:"string_format",format:"uppercase",...W(e)})}function fo(e,t){return new km({check:"string_format",format:"includes",...W(t),includes:e})}function ho(e,t){return new Nm({check:"string_format",format:"starts_with",...W(t),prefix:e})}function go(e,t){return new Pm({check:"string_format",format:"ends_with",...W(t),suffix:e})}function dc(e,t,n){return new Am({check:"property",property:e,schema:t,...W(n)})}function _o(e,t){return new Cm({check:"mime_type",mime:e,...W(t)})}function Lt(e){return new Mm({check:"overwrite",tx:e})}function vo(e){return Lt(t=>t.normalize(e))}function yo(){return Lt(e=>e.trim())}function So(){return Lt(e=>e.toLowerCase())}function bo(){return Lt(e=>e.toUpperCase())}function Ro(){return Lt(e=>Nd(e))}function If(e,t,n){return new e({type:"array",element:t,...W(n)})}function Px(e,t,n){return new e({type:"union",options:t,...W(n)})}function Ax(e,t,n){return new e({type:"union",options:t,inclusive:false,...W(n)})}function Cx(e,t,n,o){return new e({type:"union",options:n,discriminator:t,...W(o)})}function Mx(e,t,n){return new e({type:"intersection",left:t,right:n})}function jx(e,t,n,o){let r=n instanceof _e,i=r?o:n,s=r?n:null;return new e({type:"tuple",items:t,rest:s,...W(i)})}function Dx(e,t,n,o){return new e({type:"record",keyType:t,valueType:n,...W(o)})}function Ux(e,t,n,o){return new e({type:"map",keyType:t,valueType:n,...W(o)})}function Lx(e,t,n){return new e({type:"set",valueType:t,...W(n)})}function Fx(e,t,n){let o=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:o,...W(n)})}function qx(e,t,n){return new e({type:"enum",entries:t,...W(n)})}function Vx(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...W(n)})}function zf(e,t){return new e({type:"file",...W(t)})}function Bx(e,t){return new e({type:"transform",transform:t})}function Kx(e,t){return new e({type:"optional",innerType:t})}function Gx(e,t){return new e({type:"nullable",innerType:t})}function Hx(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Ad(n)}})}function Zx(e,t,n){return new e({type:"nonoptional",innerType:t,...W(n)})}function Jx(e,t){return new e({type:"success",innerType:t})}function Xx(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function Wx(e,t,n){return new e({type:"pipe",in:t,out:n})}function Yx(e,t){return new e({type:"readonly",innerType:t})}function Qx(e,t,n){return new e({type:"template_literal",parts:t,...W(n)})}function ew(e,t){return new e({type:"lazy",getter:t})}function tw(e,t){return new e({type:"promise",innerType:t})}function Of(e,t,n){let o=W(n);return o.abort??(o.abort=true),new e({type:"custom",check:"custom",fn:t,...o})}function kf(e,t,n){return new e({type:"custom",check:"custom",fn:t,...W(n)})}function Nf(e,t){let n=Zy(o=>(o.addIssue=r=>{if(typeof r=="string")o.issues.push(no(r,o.value,n._zod.def));else {let i=r;i.fatal&&(i.continue=false),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=n),i.continue??(i.continue=!n._zod.def.abort),o.issues.push(no(i));}},e(o.value,o)),t);return n}function Zy(e,t){let n=new Fe({check:"custom",...W(t)});return n._zod.check=e,n}function Pf(e){let t=new Fe({check:"describe"});return t._zod.onattach=[n=>{let o=st.get(n)??{};st.add(n,{...o,description:e});}],t._zod.check=()=>{},t}function Af(e){let t=new Fe({check:"meta"});return t._zod.onattach=[n=>{let o=st.get(n)??{};st.add(n,{...o,...e});}],t._zod.check=()=>{},t}function Cf(e,t){let n=W(t),o=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(o=o.map(y=>typeof y=="string"?y.toLowerCase():y),r=r.map(y=>typeof y=="string"?y.toLowerCase():y));let i=new Set(o),s=new Set(r),a=e.Codec??qi,c=e.Boolean??Li,u=e.String??En,l=new u({type:"string",error:n.error}),m=new c({type:"boolean",error:n.error}),h=new a({type:"pipe",in:l,out:m,transform:((y,b)=>{let p=y;return n.case!=="sensitive"&&(p=p.toLowerCase()),i.has(p)?true:s.has(p)?false:(b.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...s],input:b.value,inst:h,continue:false}),{})}),reverseTransform:((y,b)=>y===true?o[0]||"true":r[0]||"false"),error:n.error});return h}function To(e,t,n,o={}){let r=W(o),i={...W(o),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:a=>n.test(a),...r};return n instanceof RegExp&&(i.pattern=n),new e(i)}function Ir(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??st,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Ce(e,t,n={path:[],schemaPath:[]}){var o;let r=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;let s={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,s);let a=e._zod.toJSONSchema?.();if(a)s.schema=a;else {let l={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,s.schema,l);else {let h=s.schema,y=t.processors[r.type];if(!y)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);y(e,t,h,l);}let m=e._zod.parent;m&&(s.ref||(s.ref=m),Ce(m,t,l),t.seen.get(m).isParent=true);}let c=t.metadataRegistry.get(e);return c&&Object.assign(s.schema,c),t.io==="input"&&_t(e)&&(delete s.schema.examples,delete s.schema.default),t.io==="input"&&"_prefault"in s.schema&&((o=s.schema).default??(o.default=s.schema._prefault)),delete s.schema._prefault,t.seen.get(e).schema}function zr(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let s of e.seen.entries()){let a=e.metadataRegistry.get(s[0])?.id;if(a){let c=o.get(a);if(c&&c!==s[0])throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(a,s[0]);}}let r=s=>{let a=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let m=e.external.registry.get(s[0])?.id,h=e.external.uri??(b=>b);if(m)return {ref:h(m)};let y=s[1].defId??s[1].schema.id??`schema${e.counter++}`;return s[1].defId=y,{defId:y,ref:`${h("__shared")}#/${a}/${y}`}}if(s[1]===n)return {ref:"#"};let u=`#/${a}/`,l=s[1].schema.id??`__schema${e.counter++}`;return {defId:l,ref:u+l}},i=s=>{if(s[1].schema.$ref)return;let a=s[1],{ref:c,defId:u}=r(s);a.def={...a.schema},u&&(a.defId=u);let l=a.schema;for(let m in l)delete l[m];l.$ref=c;};if(e.cycles==="throw")for(let s of e.seen.entries()){let a=s[1];if(a.cycle)throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
65
65
 
66
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let a=s[1];if(t===s[0]){i(s);continue}if(e.external){let u=e.external.registry.get(s[0])?.id;if(t!==s[0]&&u){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1&&e.reused==="ref"){i(s);continue}}}function kr(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=a=>{let c=e.seen.get(a);if(c.ref===null)return;let u=c.def??c.schema,l={...u},m=c.ref;if(c.ref=null,m){o(m);let y=e.seen.get(m),b=y.schema;if(b.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(b)):Object.assign(u,b),Object.assign(u,l),a._zod.parent===m)for(let S in u)S==="$ref"||S==="allOf"||S in l||delete u[S];if(b.$ref&&y.def)for(let S in u)S==="$ref"||S==="allOf"||S in y.def&&JSON.stringify(u[S])===JSON.stringify(y.def[S])&&delete u[S];}let h=a._zod.parent;if(h&&h!==m){o(h);let y=e.seen.get(h);if(y?.schema.$ref&&(u.$ref=y.schema.$ref,y.def))for(let b in u)b==="$ref"||b==="allOf"||b in y.def&&JSON.stringify(u[b])===JSON.stringify(y.def[b])&&delete u[b];}e.override({zodSchema:a,jsonSchema:u,path:c.path??[]});};for(let a of [...e.seen.entries()].reverse())o(a[0]);let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(a);}Object.assign(r,n.def??n.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&r.id===i&&delete r.id;let s=e.external?.defs??{};for(let a of e.seen.entries()){let c=a[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,s[c.defId]=c.def);}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?r.$defs=s:r.definitions=s);try{let a=JSON.parse(JSON.stringify(r));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:$o(t,"input",e.processors),output:$o(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function _t(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return false;n.seen.add(e);let o=e._zod.def;if(o.type==="transform")return true;if(o.type==="array")return _t(o.element,n);if(o.type==="set")return _t(o.valueType,n);if(o.type==="lazy")return _t(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return _t(o.innerType,n);if(o.type==="intersection")return _t(o.left,n)||_t(o.right,n);if(o.type==="record"||o.type==="map")return _t(o.keyType,n)||_t(o.valueType,n);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?true:_t(o.in,n)||_t(o.out,n);if(o.type==="object"){for(let r in o.shape)if(_t(o.shape[r],n))return true;return false}if(o.type==="union"){for(let r of o.options)if(_t(r,n))return true;return false}if(o.type==="tuple"){for(let r of o.items)if(_t(r,n))return true;return !!(o.rest&&_t(o.rest,n))}return false}var jf=(e,t={})=>n=>{let o=zr({...n,processors:t});return Ce(e,o),Or(o,e),kr(o,e)},$o=(e,t,n={})=>o=>{let{libraryOptions:r,target:i}=o??{},s=zr({...r??{},target:i,io:t,processors:n});return Ce(e,s),Or(s,e),kr(s,e)};var tw={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Df=(e,t,n,o)=>{let r=n;r.type="string";let{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof i=="number"&&(r.minLength=i),typeof s=="number"&&(r.maxLength=s),a&&(r.format=tw[a]??a,r.format===""&&delete r.format,a==="time"&&delete r.format),u&&(r.contentEncoding=u),c&&c.size>0){let l=[...c];l.length===1?r.pattern=l[0].source:l.length>1&&(r.allOf=[...l.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))]);}},Uf=(e,t,n,o)=>{let r=n,{minimum:i,maximum:s,format:a,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=e._zod.bag;typeof a=="string"&&a.includes("int")?r.type="integer":r.type="number";let m=typeof l=="number"&&l>=(i??Number.NEGATIVE_INFINITY),h=typeof u=="number"&&u<=(s??Number.POSITIVE_INFINITY),y=t.target==="draft-04"||t.target==="openapi-3.0";m?y?(r.minimum=l,r.exclusiveMinimum=true):r.exclusiveMinimum=l:typeof i=="number"&&(r.minimum=i),h?y?(r.maximum=u,r.exclusiveMaximum=true):r.exclusiveMaximum=u:typeof s=="number"&&(r.maximum=s),typeof c=="number"&&(r.multipleOf=c);},Lf=(e,t,n,o)=>{n.type="boolean";},Ff=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},qf=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Vf=(e,t,n,o)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=true,n.enum=[null]):n.type="null";},Bf=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Kf=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Gf=(e,t,n,o)=>{n.not={};},Hf=(e,t,n,o)=>{},Zf=(e,t,n,o)=>{},Jf=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Xf=(e,t,n,o)=>{let r=e._zod.def,i=zi(r.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i;},Wf=(e,t,n,o)=>{let r=e._zod.def,i=[];for(let s of r.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s));}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[s]:n.const=s;}else i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),i.every(s=>typeof s=="boolean")&&(n.type="boolean"),i.every(s=>s===null)&&(n.type="null"),n.enum=i;},Yf=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Qf=(e,t,n,o)=>{let r=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=i.source;},eh=(e,t,n,o)=>{let r=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:c}=e._zod.bag;s!==void 0&&(i.minLength=s),a!==void 0&&(i.maxLength=a),c?c.length===1?(i.contentMediaType=c[0],Object.assign(r,i)):(Object.assign(r,i),r.anyOf=c.map(u=>({contentMediaType:u}))):Object.assign(r,i);},th=(e,t,n,o)=>{n.type="boolean";},rh=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},nh=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},oh=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},ih=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},sh=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},ah=(e,t,n,o)=>{let r=n,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(r.minItems=s),typeof a=="number"&&(r.maxItems=a),r.type="array",r.items=Ce(i.element,t,{...o,path:[...o.path,"items"]});},ch=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object",r.properties={};let s=i.shape;for(let u in s)r.properties[u]=Ce(s[u],t,{...o,path:[...o.path,"properties",u]});let a=new Set(Object.keys(s)),c=new Set([...a].filter(u=>{let l=i.shape[u]._zod;return t.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(r.required=Array.from(c)),i.catchall?._zod.def.type==="never"?r.additionalProperties=false:i.catchall?i.catchall&&(r.additionalProperties=Ce(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=false);},fc=(e,t,n,o)=>{let r=e._zod.def,i=r.inclusive===false,s=r.options.map((a,c)=>Ce(a,t,{...o,path:[...o.path,i?"oneOf":"anyOf",c]}));i?n.oneOf=s:n.anyOf=s;},uh=(e,t,n,o)=>{let r=e._zod.def,i=Ce(r.left,t,{...o,path:[...o.path,"allOf",0]}),s=Ce(r.right,t,{...o,path:[...o.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];n.allOf=c;},lh=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",a=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((h,y)=>Ce(h,t,{...o,path:[...o.path,s,y]})),u=i.rest?Ce(i.rest,t,{...o,path:[...o.path,a,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=c,u&&(r.items=u)):t.target==="openapi-3.0"?(r.items={anyOf:c},u&&r.items.anyOf.push(u),r.minItems=c.length,u||(r.maxItems=c.length)):(r.items=c,u&&(r.additionalItems=u));let{minimum:l,maximum:m}=e._zod.bag;typeof l=="number"&&(r.minItems=l),typeof m=="number"&&(r.maxItems=m);},dh=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object";let s=i.keyType,c=s._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){let l=Ce(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});r.patternProperties={};for(let m of c)r.patternProperties[m.source]=l;}else (t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=Ce(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),r.additionalProperties=Ce(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let u=s._zod.values;if(u){let l=[...u].filter(m=>typeof m=="string"||typeof m=="number");l.length>0&&(r.required=l);}},mh=(e,t,n,o)=>{let r=e._zod.def,i=Ce(r.innerType,t,o),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=r.innerType,n.nullable=true):n.anyOf=[i,{type:"null"}];},ph=(e,t,n,o)=>{let r=e._zod.def;Ce(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType;},fh=(e,t,n,o)=>{let r=e._zod.def;Ce(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue));},hh=(e,t,n,o)=>{let r=e._zod.def;Ce(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)));},gh=(e,t,n,o)=>{let r=e._zod.def;Ce(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType;let s;try{s=r.catchValue(void 0);}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s;},_h=(e,t,n,o)=>{let r=e._zod.def,i=r.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?r.out:r.in:r.out;Ce(s,t,o);let a=t.seen.get(e);a.ref=s;},vh=(e,t,n,o)=>{let r=e._zod.def;Ce(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.readOnly=true;},yh=(e,t,n,o)=>{let r=e._zod.def;Ce(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType;},hc=(e,t,n,o)=>{let r=e._zod.def;Ce(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType;},Sh=(e,t,n,o)=>{let r=e._zod.innerType;Ce(r,t,o);let i=t.seen.get(e);i.ref=r;},pc={string:Df,number:Uf,boolean:Lf,bigint:Ff,symbol:qf,null:Vf,undefined:Bf,void:Kf,never:Gf,any:Hf,unknown:Zf,date:Jf,enum:Xf,literal:Wf,nan:Yf,template_literal:Qf,file:eh,success:th,custom:rh,function:nh,transform:oh,map:ih,set:sh,array:ah,object:ch,union:fc,intersection:uh,tuple:lh,record:dh,nullable:mh,nonoptional:ph,default:fh,prefault:hh,catch:gh,pipe:_h,readonly:vh,promise:yh,optional:hc,lazy:Sh};function kn(e,t){if("_idmap"in e){let o=e,r=zr({...t,processors:pc}),i={};for(let c of o._idmap.entries()){let[u,l]=c;Ce(l,r);}let s={},a={registry:o,uri:t?.uri,defs:i};r.external=a;for(let c of o._idmap.entries()){let[u,l]=c;Or(r,l),s[u]=kr(r,l);}if(Object.keys(i).length>0){let c=r.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[c]:i};}return {schemas:s}}let n=zr({...t,processors:pc});return Ce(e,n),Or(n,e),kr(n,e)}var gc=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t;}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=zr({processors:pc,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}});}process(t,n={path:[],schemaPath:[]}){return Ce(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),Or(this.ctx,t);let o=kr(this.ctx,t),{"~standard":r,...i}=o;return i}};var Xy={};var Hi={};or(Hi,{ZodAny:()=>Lh,ZodArray:()=>Bh,ZodBase64:()=>Dc,ZodBase64URL:()=>Uc,ZodBigInt:()=>No,ZodBigIntFormat:()=>qc,ZodBoolean:()=>ko,ZodCIDRv4:()=>Mc,ZodCIDRv6:()=>jc,ZodCUID:()=>zc,ZodCUID2:()=>Oc,ZodCatch:()=>lg,ZodCodec:()=>ns,ZodCustom:()=>os,ZodCustomStringFormat:()=>zo,ZodDate:()=>Qi,ZodDefault:()=>og,ZodDiscriminatedUnion:()=>Gh,ZodE164:()=>Lc,ZodEmail:()=>xc,ZodEmoji:()=>Ec,ZodEnum:()=>wo,ZodExactOptional:()=>tg,ZodFile:()=>Qh,ZodFunction:()=>yg,ZodGUID:()=>Ji,ZodIPv4:()=>Ac,ZodIPv6:()=>Cc,ZodIntersection:()=>Hh,ZodJWT:()=>Fc,ZodKSUID:()=>Pc,ZodLazy:()=>_g,ZodLiteral:()=>Yh,ZodMAC:()=>Mh,ZodMap:()=>Xh,ZodNaN:()=>mg,ZodNanoID:()=>Ic,ZodNever:()=>qh,ZodNonOptional:()=>Hc,ZodNull:()=>Uh,ZodNullable:()=>ng,ZodNumber:()=>Oo,ZodNumberFormat:()=>Nn,ZodObject:()=>es,ZodOptional:()=>Gc,ZodPipe:()=>rs,ZodPrefault:()=>sg,ZodPreprocess:()=>pg,ZodPromise:()=>vg,ZodReadonly:()=>fg,ZodRecord:()=>xo,ZodSet:()=>Wh,ZodString:()=>Eo,ZodStringFormat:()=>Ue,ZodSuccess:()=>ug,ZodSymbol:()=>jh,ZodTemplateLiteral:()=>gg,ZodTransform:()=>eg,ZodTuple:()=>Zh,ZodType:()=>we,ZodULID:()=>kc,ZodURL:()=>Yi,ZodUUID:()=>Xt,ZodUndefined:()=>Dh,ZodUnion:()=>ts,ZodUnknown:()=>Fh,ZodVoid:()=>Vh,ZodXID:()=>Nc,ZodXor:()=>Kh,_ZodString:()=>$c,_default:()=>ig,_function:()=>YS,any:()=>Vc,array:()=>C,base64:()=>_S,base64url:()=>vS,bigint:()=>zS,boolean:()=>ne,catch:()=>dg,check:()=>QS,cidrv4:()=>hS,cidrv6:()=>gS,codec:()=>ZS,cuid:()=>aS,cuid2:()=>cS,custom:()=>eb,date:()=>CS,describe:()=>tb,discriminatedUnion:()=>Nr,e164:()=>yS,email:()=>wc,emoji:()=>iS,enum:()=>ge,exactOptional:()=>rg,file:()=>BS,float32:()=>xS,float64:()=>wS,function:()=>YS,guid:()=>Qy,hash:()=>$S,hex:()=>TS,hostname:()=>RS,httpUrl:()=>oS,instanceof:()=>nb,int:()=>Rc,int32:()=>ES,int64:()=>OS,intersection:()=>Ft,invertCodec:()=>JS,ipv4:()=>mS,ipv6:()=>fS,json:()=>ib,jwt:()=>SS,keyof:()=>MS,ksuid:()=>dS,lazy:()=>Pr,literal:()=>M,looseObject:()=>le,looseRecord:()=>LS,mac:()=>pS,map:()=>FS,meta:()=>rb,nan:()=>HS,nanoid:()=>sS,nativeEnum:()=>VS,never:()=>Bc,nonoptional:()=>cg,null:()=>Wt,nullable:()=>Xi,nullish:()=>KS,number:()=>H,object:()=>z,optional:()=>ae,partialRecord:()=>US,pipe:()=>Tc,prefault:()=>ag,preprocess:()=>cr,promise:()=>WS,readonly:()=>hg,record:()=>te,refine:()=>Sg,set:()=>qS,strictObject:()=>jS,string:()=>g,stringFormat:()=>bS,stringbool:()=>ob,success:()=>GS,superRefine:()=>bg,symbol:()=>NS,templateLiteral:()=>XS,transform:()=>Kc,tuple:()=>Jh,uint32:()=>IS,uint64:()=>kS,ulid:()=>uS,undefined:()=>PS,union:()=>ie,unknown:()=>se,url:()=>Io,uuid:()=>eS,uuidv4:()=>tS,uuidv6:()=>rS,uuidv7:()=>nS,void:()=>AS,xid:()=>lS,xor:()=>DS});var _c={};or(_c,{endsWith:()=>go,gt:()=>Zt,gte:()=>gt,includes:()=>fo,length:()=>On,lowercase:()=>mo,lt:()=>Ht,lte:()=>zt,maxLength:()=>zn,maxSize:()=>Ir,mime:()=>_o,minLength:()=>sr,minSize:()=>Jt,multipleOf:()=>Er,negative:()=>uc,nonnegative:()=>dc,nonpositive:()=>lc,normalize:()=>vo,overwrite:()=>Lt,positive:()=>cc,property:()=>mc,regex:()=>lo,size:()=>In,slugify:()=>Ro,startsWith:()=>ho,toLowerCase:()=>So,toUpperCase:()=>bo,trim:()=>yo,uppercase:()=>po});var Ot={};or(Ot,{ZodISODate:()=>yc,ZodISODateTime:()=>vc,ZodISODuration:()=>bc,ZodISOTime:()=>Sc,date:()=>Rh,datetime:()=>bh,duration:()=>$h,time:()=>Th});var vc=P("ZodISODateTime",(e,t)=>{Wm.init(e,t),Ue.init(e,t);});function bh(e){return tf(vc,e)}var yc=P("ZodISODate",(e,t)=>{Ym.init(e,t),Ue.init(e,t);});function Rh(e){return rf(yc,e)}var Sc=P("ZodISOTime",(e,t)=>{Qm.init(e,t),Ue.init(e,t);});function Th(e){return nf(Sc,e)}var bc=P("ZodISODuration",(e,t)=>{ep.init(e,t),Ue.init(e,t);});function $h(e){return of(bc,e)}var Wy=(e,t)=>{Ai.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Mi(e,n)},flatten:{value:n=>Ci(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,to,2);}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,to,2);}},isEmpty:{get(){return e.issues.length===0}}});},nw=P("ZodError",Wy),$t=P("ZodError",Wy,{Parent:Error});var xh=oo($t),wh=io($t),Zi=so($t),Eh=ao($t),Ih=ga($t),zh=_a($t),Oh=va($t),kh=ya($t),Nh=Sa($t),Ph=ba($t),Ah=Ra($t),Ch=Ta($t);var Yy=new WeakMap;function Wi(e,t,n){let o=Object.getPrototypeOf(e),r=Yy.get(o);if(r||(r=new Set,Yy.set(o,r)),!r.has(t)){r.add(t);for(let i in n){let s=n[i];Object.defineProperty(o,i,{configurable:true,enumerable:false,get(){let a=s.bind(this);return Object.defineProperty(this,i,{configurable:true,writable:true,enumerable:true,value:a}),a},set(a){Object.defineProperty(this,i,{configurable:true,writable:true,enumerable:true,value:a});}});}}}var we=P("ZodType",(e,t)=>(_e.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:$o(e,"input"),output:$o(e,"output")}}),e.toJSONSchema=jf(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,o)=>xh(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>Zi(e,n,o),e.parseAsync=async(n,o)=>wh(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>Eh(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>Ih(e,n,o),e.decode=(n,o)=>zh(e,n,o),e.encodeAsync=async(n,o)=>Oh(e,n,o),e.decodeAsync=async(n,o)=>kh(e,n,o),e.safeEncode=(n,o)=>Nh(e,n,o),e.safeDecode=(n,o)=>Ph(e,n,o),e.safeEncodeAsync=async(n,o)=>Ah(e,n,o),e.safeDecodeAsync=async(n,o)=>Ch(e,n,o),Wi(e,"ZodType",{check(...n){let o=this.def;return this.clone(X.mergeDefs(o,{checks:[...o.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:true})},with(...n){return this.check(...n)},clone(n,o){return ft(this,n,o)},brand(){return this},register(n,o){return n.add(this,o),this},refine(n,o){return this.check(Sg(n,o))},superRefine(n,o){return this.check(bg(n,o))},overwrite(n){return this.check(Lt(n))},optional(){return ae(this)},exactOptional(){return rg(this)},nullable(){return Xi(this)},nullish(){return ae(Xi(this))},nonoptional(n){return cg(this,n)},array(){return C(this)},or(n){return ie([this,n])},and(n){return Ft(this,n)},transform(n){return Tc(this,Kc(n))},default(n){return ig(this,n)},prefault(n){return ag(this,n)},catch(n){return dg(this,n)},pipe(n){return Tc(this,n)},readonly(){return hg(this)},describe(n){let o=this.clone();return st.add(o,{description:n}),o},meta(...n){if(n.length===0)return st.get(this);let o=this.clone();return st.add(o,n[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return st.get(e)?.description},configurable:true}),e)),$c=P("_ZodString",(e,t)=>{En.init(e,t),we.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Df(e,o,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Wi(e,"_ZodString",{regex(...o){return this.check(lo(...o))},includes(...o){return this.check(fo(...o))},startsWith(...o){return this.check(ho(...o))},endsWith(...o){return this.check(go(...o))},min(...o){return this.check(sr(...o))},max(...o){return this.check(zn(...o))},length(...o){return this.check(On(...o))},nonempty(...o){return this.check(sr(1,...o))},lowercase(o){return this.check(mo(o))},uppercase(o){return this.check(po(o))},trim(){return this.check(yo())},normalize(...o){return this.check(vo(...o))},toLowerCase(){return this.check(So())},toUpperCase(){return this.check(bo())},slugify(){return this.check(Ro())}});}),Eo=P("ZodString",(e,t)=>{En.init(e,t),$c.init(e,t),e.email=n=>e.check(qa(xc,n)),e.url=n=>e.check(Gi(Yi,n)),e.jwt=n=>e.check(ac(Fc,n)),e.emoji=n=>e.check(Ha(Ec,n)),e.guid=n=>e.check(Ki(Ji,n)),e.uuid=n=>e.check(Va(Xt,n)),e.uuidv4=n=>e.check(Ba(Xt,n)),e.uuidv6=n=>e.check(Ka(Xt,n)),e.uuidv7=n=>e.check(Ga(Xt,n)),e.nanoid=n=>e.check(Za(Ic,n)),e.guid=n=>e.check(Ki(Ji,n)),e.cuid=n=>e.check(Ja(zc,n)),e.cuid2=n=>e.check(Xa(Oc,n)),e.ulid=n=>e.check(Wa(kc,n)),e.base64=n=>e.check(oc(Dc,n)),e.base64url=n=>e.check(ic(Uc,n)),e.xid=n=>e.check(Ya(Nc,n)),e.ksuid=n=>e.check(Qa(Pc,n)),e.ipv4=n=>e.check(ec(Ac,n)),e.ipv6=n=>e.check(tc(Cc,n)),e.cidrv4=n=>e.check(rc(Mc,n)),e.cidrv6=n=>e.check(nc(jc,n)),e.e164=n=>e.check(sc(Lc,n)),e.datetime=n=>e.check(bh(n)),e.date=n=>e.check(Rh(n)),e.time=n=>e.check(Th(n)),e.duration=n=>e.check($h(n));});function g(e){return Wp(Eo,e)}var Ue=P("ZodStringFormat",(e,t)=>{De.init(e,t),$c.init(e,t);}),xc=P("ZodEmail",(e,t)=>{qm.init(e,t),Ue.init(e,t);});function wc(e){return qa(xc,e)}var Ji=P("ZodGUID",(e,t)=>{Lm.init(e,t),Ue.init(e,t);});function Qy(e){return Ki(Ji,e)}var Xt=P("ZodUUID",(e,t)=>{Fm.init(e,t),Ue.init(e,t);});function eS(e){return Va(Xt,e)}function tS(e){return Ba(Xt,e)}function rS(e){return Ka(Xt,e)}function nS(e){return Ga(Xt,e)}var Yi=P("ZodURL",(e,t)=>{Vm.init(e,t),Ue.init(e,t);});function Io(e){return Gi(Yi,e)}function oS(e){return Gi(Yi,{protocol:It.httpProtocol,hostname:It.domain,...X.normalizeParams(e)})}var Ec=P("ZodEmoji",(e,t)=>{Bm.init(e,t),Ue.init(e,t);});function iS(e){return Ha(Ec,e)}var Ic=P("ZodNanoID",(e,t)=>{Km.init(e,t),Ue.init(e,t);});function sS(e){return Za(Ic,e)}var zc=P("ZodCUID",(e,t)=>{Gm.init(e,t),Ue.init(e,t);});function aS(e){return Ja(zc,e)}var Oc=P("ZodCUID2",(e,t)=>{Hm.init(e,t),Ue.init(e,t);});function cS(e){return Xa(Oc,e)}var kc=P("ZodULID",(e,t)=>{Zm.init(e,t),Ue.init(e,t);});function uS(e){return Wa(kc,e)}var Nc=P("ZodXID",(e,t)=>{Jm.init(e,t),Ue.init(e,t);});function lS(e){return Ya(Nc,e)}var Pc=P("ZodKSUID",(e,t)=>{Xm.init(e,t),Ue.init(e,t);});function dS(e){return Qa(Pc,e)}var Ac=P("ZodIPv4",(e,t)=>{tp.init(e,t),Ue.init(e,t);});function mS(e){return ec(Ac,e)}var Mh=P("ZodMAC",(e,t)=>{np.init(e,t),Ue.init(e,t);});function pS(e){return Qp(Mh,e)}var Cc=P("ZodIPv6",(e,t)=>{rp.init(e,t),Ue.init(e,t);});function fS(e){return tc(Cc,e)}var Mc=P("ZodCIDRv4",(e,t)=>{op.init(e,t),Ue.init(e,t);});function hS(e){return rc(Mc,e)}var jc=P("ZodCIDRv6",(e,t)=>{ip.init(e,t),Ue.init(e,t);});function gS(e){return nc(jc,e)}var Dc=P("ZodBase64",(e,t)=>{ap.init(e,t),Ue.init(e,t);});function _S(e){return oc(Dc,e)}var Uc=P("ZodBase64URL",(e,t)=>{cp.init(e,t),Ue.init(e,t);});function vS(e){return ic(Uc,e)}var Lc=P("ZodE164",(e,t)=>{up.init(e,t),Ue.init(e,t);});function yS(e){return sc(Lc,e)}var Fc=P("ZodJWT",(e,t)=>{lp.init(e,t),Ue.init(e,t);});function SS(e){return ac(Fc,e)}var zo=P("ZodCustomStringFormat",(e,t)=>{dp.init(e,t),Ue.init(e,t);});function bS(e,t,n={}){return To(zo,e,t,n)}function RS(e){return To(zo,"hostname",It.hostname,e)}function TS(e){return To(zo,"hex",It.hex,e)}function $S(e,t){let n=t?.enc??"hex",o=`${e}_${n}`,r=It[o];if(!r)throw new Error(`Unrecognized hash format: ${o}`);return To(zo,o,r,t)}var Oo=P("ZodNumber",(e,t)=>{Na.init(e,t),we.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Uf(e,o,r),Wi(e,"ZodNumber",{gt(o,r){return this.check(Zt(o,r))},gte(o,r){return this.check(gt(o,r))},min(o,r){return this.check(gt(o,r))},lt(o,r){return this.check(Ht(o,r))},lte(o,r){return this.check(zt(o,r))},max(o,r){return this.check(zt(o,r))},int(o){return this.check(Rc(o))},safe(o){return this.check(Rc(o))},positive(o){return this.check(Zt(0,o))},nonnegative(o){return this.check(gt(0,o))},negative(o){return this.check(Ht(0,o))},nonpositive(o){return this.check(zt(0,o))},multipleOf(o,r){return this.check(Er(o,r))},step(o,r){return this.check(Er(o,r))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=true,e.format=n.format??null;});function H(e){return sf(Oo,e)}var Nn=P("ZodNumberFormat",(e,t)=>{mp.init(e,t),Oo.init(e,t);});function Rc(e){return cf(Nn,e)}function xS(e){return uf(Nn,e)}function wS(e){return lf(Nn,e)}function ES(e){return df(Nn,e)}function IS(e){return mf(Nn,e)}var ko=P("ZodBoolean",(e,t)=>{Li.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Lf(e,n,o);});function ne(e){return pf(ko,e)}var No=P("ZodBigInt",(e,t)=>{Pa.init(e,t),we.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Ff(e,o),e.gte=(o,r)=>e.check(gt(o,r)),e.min=(o,r)=>e.check(gt(o,r)),e.gt=(o,r)=>e.check(Zt(o,r)),e.gte=(o,r)=>e.check(gt(o,r)),e.min=(o,r)=>e.check(gt(o,r)),e.lt=(o,r)=>e.check(Ht(o,r)),e.lte=(o,r)=>e.check(zt(o,r)),e.max=(o,r)=>e.check(zt(o,r)),e.positive=o=>e.check(Zt(BigInt(0),o)),e.negative=o=>e.check(Ht(BigInt(0),o)),e.nonpositive=o=>e.check(zt(BigInt(0),o)),e.nonnegative=o=>e.check(gt(BigInt(0),o)),e.multipleOf=(o,r)=>e.check(Er(o,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null;});function zS(e){return hf(No,e)}var qc=P("ZodBigIntFormat",(e,t)=>{pp.init(e,t),No.init(e,t);});function OS(e){return _f(qc,e)}function kS(e){return vf(qc,e)}var jh=P("ZodSymbol",(e,t)=>{fp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>qf(e,n);});function NS(e){return yf(jh,e)}var Dh=P("ZodUndefined",(e,t)=>{hp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Bf(e,n);});function PS(e){return Sf(Dh,e)}var Uh=P("ZodNull",(e,t)=>{gp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Vf(e,n,o);});function Wt(e){return bf(Uh,e)}var Lh=P("ZodAny",(e,t)=>{_p.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Hf();});function Vc(){return Rf(Lh)}var Fh=P("ZodUnknown",(e,t)=>{vp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Zf();});function se(){return Tf(Fh)}var qh=P("ZodNever",(e,t)=>{yp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Gf(e,n,o);});function Bc(e){return $f(qh,e)}var Vh=P("ZodVoid",(e,t)=>{Sp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Kf(e,n);});function AS(e){return xf(Vh,e)}var Qi=P("ZodDate",(e,t)=>{bp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Jf(e,o),e.min=(o,r)=>e.check(gt(o,r)),e.max=(o,r)=>e.check(zt(o,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null;});function CS(e){return wf(Qi,e)}var Bh=P("ZodArray",(e,t)=>{Rp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ah(e,n,o,r),e.element=t.element,Wi(e,"ZodArray",{min(n,o){return this.check(sr(n,o))},nonempty(n){return this.check(sr(1,n))},max(n,o){return this.check(zn(n,o))},length(n,o){return this.check(On(n,o))},unwrap(){return this.element}});});function C(e,t){return zf(Bh,e,t)}function MS(e){let t=e._zod.def.shape;return ge(Object.keys(t))}var es=P("ZodObject",(e,t)=>{Tp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ch(e,n,o,r),X.defineLazy(e,"shape",()=>t.shape),Wi(e,"ZodObject",{keyof(){return ge(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:se()})},loose(){return this.clone({...this._zod.def,catchall:se()})},strict(){return this.clone({...this._zod.def,catchall:Bc()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return X.extend(this,n)},safeExtend(n){return X.safeExtend(this,n)},merge(n){return X.merge(this,n)},pick(n){return X.pick(this,n)},omit(n){return X.omit(this,n)},partial(...n){return X.partial(Gc,this,n[0])},required(...n){return X.required(Hc,this,n[0])}});});function z(e,t){let n={type:"object",shape:e??{},...X.normalizeParams(t)};return new es(n)}function jS(e,t){return new es({type:"object",shape:e,catchall:Bc(),...X.normalizeParams(t)})}function le(e,t){return new es({type:"object",shape:e,catchall:se(),...X.normalizeParams(t)})}var ts=P("ZodUnion",(e,t)=>{Fi.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>fc(e,n,o,r),e.options=t.options;});function ie(e,t){return new ts({type:"union",options:e,...X.normalizeParams(t)})}var Kh=P("ZodXor",(e,t)=>{ts.init(e,t),$p.init(e,t),e._zod.processJSONSchema=(n,o,r)=>fc(e,n,o,r),e.options=t.options;});function DS(e,t){return new Kh({type:"union",options:e,inclusive:false,...X.normalizeParams(t)})}var Gh=P("ZodDiscriminatedUnion",(e,t)=>{ts.init(e,t),xp.init(e,t);});function Nr(e,t,n){return new Gh({type:"union",options:t,discriminator:e,...X.normalizeParams(n)})}var Hh=P("ZodIntersection",(e,t)=>{wp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>uh(e,n,o,r);});function Ft(e,t){return new Hh({type:"intersection",left:e,right:t})}var Zh=P("ZodTuple",(e,t)=>{Aa.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>lh(e,n,o,r),e.rest=n=>e.clone({...e._zod.def,rest:n});});function Jh(e,t,n){let o=t instanceof _e,r=o?n:t,i=o?t:null;return new Zh({type:"tuple",items:e,rest:i,...X.normalizeParams(r)})}var xo=P("ZodRecord",(e,t)=>{Ep.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>dh(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType;});function te(e,t,n){return !t||!t._zod?new xo({type:"record",keyType:g(),valueType:e,...X.normalizeParams(t)}):new xo({type:"record",keyType:e,valueType:t,...X.normalizeParams(n)})}function US(e,t,n){let o=ft(e);return o._zod.values=void 0,new xo({type:"record",keyType:o,valueType:t,...X.normalizeParams(n)})}function LS(e,t,n){return new xo({type:"record",keyType:e,valueType:t,mode:"loose",...X.normalizeParams(n)})}var Xh=P("ZodMap",(e,t)=>{Ip.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ih(e,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Jt(...n)),e.nonempty=n=>e.check(Jt(1,n)),e.max=(...n)=>e.check(Ir(...n)),e.size=(...n)=>e.check(In(...n));});function FS(e,t,n){return new Xh({type:"map",keyType:e,valueType:t,...X.normalizeParams(n)})}var Wh=P("ZodSet",(e,t)=>{zp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>sh(e,n),e.min=(...n)=>e.check(Jt(...n)),e.nonempty=n=>e.check(Jt(1,n)),e.max=(...n)=>e.check(Ir(...n)),e.size=(...n)=>e.check(In(...n));});function qS(e,t){return new Wh({type:"set",valueType:e,...X.normalizeParams(t)})}var wo=P("ZodEnum",(e,t)=>{Op.init(e,t),we.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Xf(e,o,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(o,r)=>{let i={};for(let s of o)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new wo({...t,checks:[],...X.normalizeParams(r),entries:i})},e.exclude=(o,r)=>{let i={...t.entries};for(let s of o)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new wo({...t,checks:[],...X.normalizeParams(r),entries:i})};});function ge(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new wo({type:"enum",entries:n,...X.normalizeParams(t)})}function VS(e,t){return new wo({type:"enum",entries:e,...X.normalizeParams(t)})}var Yh=P("ZodLiteral",(e,t)=>{kp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Wf(e,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}});});function M(e,t){return new Yh({type:"literal",values:Array.isArray(e)?e:[e],...X.normalizeParams(t)})}var Qh=P("ZodFile",(e,t)=>{Np.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>eh(e,n,o),e.min=(n,o)=>e.check(Jt(n,o)),e.max=(n,o)=>e.check(Ir(n,o)),e.mime=(n,o)=>e.check(_o(Array.isArray(n)?n:[n],o));});function BS(e){return Of(Qh,e)}var eg=P("ZodTransform",(e,t)=>{Pp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>oh(e,n),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new Rr(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(X.issue(i,n.value,t));else {let s=i;s.fatal&&(s.continue=false),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(X.issue(s));}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(i=>(n.value=i,n.fallback=true,n)):(n.value=r,n.fallback=true,n)};});function Kc(e){return new eg({type:"transform",transform:e})}var Gc=P("ZodOptional",(e,t)=>{Ca.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hc(e,n,o,r),e.unwrap=()=>e._zod.def.innerType;});function ae(e){return new Gc({type:"optional",innerType:e})}var tg=P("ZodExactOptional",(e,t)=>{Ap.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hc(e,n,o,r),e.unwrap=()=>e._zod.def.innerType;});function rg(e){return new tg({type:"optional",innerType:e})}var ng=P("ZodNullable",(e,t)=>{Cp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>mh(e,n,o,r),e.unwrap=()=>e._zod.def.innerType;});function Xi(e){return new ng({type:"nullable",innerType:e})}function KS(e){return ae(Xi(e))}var og=P("ZodDefault",(e,t)=>{Mp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>fh(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap;});function ig(e,t){return new og({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():X.shallowClone(t)}})}var sg=P("ZodPrefault",(e,t)=>{jp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hh(e,n,o,r),e.unwrap=()=>e._zod.def.innerType;});function ag(e,t){return new sg({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():X.shallowClone(t)}})}var Hc=P("ZodNonOptional",(e,t)=>{Dp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ph(e,n,o,r),e.unwrap=()=>e._zod.def.innerType;});function cg(e,t){return new Hc({type:"nonoptional",innerType:e,...X.normalizeParams(t)})}var ug=P("ZodSuccess",(e,t)=>{Up.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>th(e,n,o),e.unwrap=()=>e._zod.def.innerType;});function GS(e){return new ug({type:"success",innerType:e})}var lg=P("ZodCatch",(e,t)=>{Lp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>gh(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap;});function dg(e,t){return new lg({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var mg=P("ZodNaN",(e,t)=>{Fp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Yf(e,n);});function HS(e){return If(mg,e)}var rs=P("ZodPipe",(e,t)=>{Ma.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>_h(e,n,o,r),e.in=t.in,e.out=t.out;});function Tc(e,t){return new rs({type:"pipe",in:e,out:t})}var ns=P("ZodCodec",(e,t)=>{rs.init(e,t),qi.init(e,t);});function ZS(e,t,n){return new ns({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function JS(e){let t=e._zod.def;return new ns({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var pg=P("ZodPreprocess",(e,t)=>{rs.init(e,t),qp.init(e,t);}),fg=P("ZodReadonly",(e,t)=>{Vp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>vh(e,n,o,r),e.unwrap=()=>e._zod.def.innerType;});function hg(e){return new fg({type:"readonly",innerType:e})}var gg=P("ZodTemplateLiteral",(e,t)=>{Bp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Qf(e,n,o);});function XS(e,t){return new gg({type:"template_literal",parts:e,...X.normalizeParams(t)})}var _g=P("ZodLazy",(e,t)=>{Hp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Sh(e,n,o,r),e.unwrap=()=>e._zod.def.getter();});function Pr(e){return new _g({type:"lazy",getter:e})}var vg=P("ZodPromise",(e,t)=>{Gp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>yh(e,n,o,r),e.unwrap=()=>e._zod.def.innerType;});function WS(e){return new vg({type:"promise",innerType:e})}var yg=P("ZodFunction",(e,t)=>{Kp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>nh(e,n);});function YS(e){return new yg({type:"function",input:Array.isArray(e?.input)?Jh(e?.input):e?.input??C(se()),output:e?.output??se()})}var os=P("ZodCustom",(e,t)=>{Zp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>rh(e,n);});function QS(e){let t=new Fe({check:"custom"});return t._zod.check=e,t}function eb(e,t){return kf(os,e??(()=>true),t)}function Sg(e,t={}){return Nf(os,e,t)}function bg(e,t){return Pf(e,t)}var tb=Af,rb=Cf;function nb(e,t={}){let n=new os({type:"custom",check:"custom",fn:o=>o instanceof e,abort:true,...X.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:n,path:[...n._zod.def.path??[]]});},n}var ob=(...e)=>Mf({Codec:ns,Boolean:ko,String:Eo},...e);function ib(e){let t=Pr(()=>ie([g(e),H(),ne(),Wt(),C(t),te(g(),t)]));return t}function cr(e,t){return new pg({type:"pipe",in:Kc(e),out:t})}var Tg={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function iw(e){Ke({customError:e});}function sw(){return Ke().customError}var Rg;Rg||(Rg={});var oe={...Hi,..._c,iso:Ot},aw=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function cw(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function uw(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===o){let r=n[1];if(!r||!t.defs[r])throw new Error(`Reference not found: ${e}`);return t.defs[r]}throw new Error(`Reference not found: ${e}`)}function sb(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return oe.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return oe.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let i=uw(r,t),s=dt(i,t);return t.refs.set(r,s),t.processing.delete(r),s}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===true&&r.length===1&&r[0]===null)return oe.null();if(r.length===0)return oe.never();if(r.length===1)return oe.literal(r[0]);if(r.every(s=>typeof s=="string"))return oe.enum(r);let i=r.map(s=>oe.literal(s));return i.length<2?i[0]:oe.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return oe.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(i=>{let s={...e,type:i};return sb(s,t)});return r.length===0?oe.never():r.length===1?r[0]:oe.union(r)}if(!n)return oe.any();let o;switch(n){case "string":{let r=oe.string();if(e.format){let i=e.format;i==="email"?r=r.check(oe.email()):i==="uri"||i==="uri-reference"?r=r.check(oe.url()):i==="uuid"||i==="guid"?r=r.check(oe.uuid()):i==="date-time"?r=r.check(oe.iso.datetime()):i==="date"?r=r.check(oe.iso.date()):i==="time"?r=r.check(oe.iso.time()):i==="duration"?r=r.check(oe.iso.duration()):i==="ipv4"?r=r.check(oe.ipv4()):i==="ipv6"?r=r.check(oe.ipv6()):i==="mac"?r=r.check(oe.mac()):i==="cidr"?r=r.check(oe.cidrv4()):i==="cidr-v6"?r=r.check(oe.cidrv6()):i==="base64"?r=r.check(oe.base64()):i==="base64url"?r=r.check(oe.base64url()):i==="e164"?r=r.check(oe.e164()):i==="jwt"?r=r.check(oe.jwt()):i==="emoji"?r=r.check(oe.emoji()):i==="nanoid"?r=r.check(oe.nanoid()):i==="cuid"?r=r.check(oe.cuid()):i==="cuid2"?r=r.check(oe.cuid2()):i==="ulid"?r=r.check(oe.ulid()):i==="xid"?r=r.check(oe.xid()):i==="ksuid"&&(r=r.check(oe.ksuid()));}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),o=r;break}case "number":case "integer":{let r=n==="integer"?oe.number().int():oe.number();typeof e.minimum=="number"&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===true&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===true&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),o=r;break}case "boolean":{o=oe.boolean();break}case "null":{o=oe.null();break}case "object":{let r={},i=e.properties||{},s=new Set(e.required||[]);for(let[c,u]of Object.entries(i)){let l=dt(u,t);r[c]=s.has(c)?l:l.optional();}if(e.propertyNames){let c=dt(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?dt(e.additionalProperties,t):oe.any();if(Object.keys(r).length===0){o=oe.record(c,u);break}let l=oe.object(r).passthrough(),m=oe.looseRecord(c,u);o=oe.intersection(l,m);break}if(e.patternProperties){let c=e.patternProperties,u=Object.keys(c),l=[];for(let h of u){let y=dt(c[h],t),b=oe.string().regex(new RegExp(h));l.push(oe.looseRecord(b,y));}let m=[];if(Object.keys(r).length>0&&m.push(oe.object(r).passthrough()),m.push(...l),m.length===0)o=oe.object({}).passthrough();else if(m.length===1)o=m[0];else {let h=oe.intersection(m[0],m[1]);for(let y=2;y<m.length;y++)h=oe.intersection(h,m[y]);o=h;}break}let a=oe.object(r);e.additionalProperties===false?o=a.strict():typeof e.additionalProperties=="object"?o=a.catchall(dt(e.additionalProperties,t)):o=a.passthrough();break}case "array":{let r=e.prefixItems,i=e.items;if(r&&Array.isArray(r)){let s=r.map(c=>dt(c,t)),a=i&&typeof i=="object"&&!Array.isArray(i)?dt(i,t):void 0;a?o=oe.tuple(s).rest(a):o=oe.tuple(s),typeof e.minItems=="number"&&(o=o.check(oe.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(oe.maxLength(e.maxItems)));}else if(Array.isArray(i)){let s=i.map(c=>dt(c,t)),a=e.additionalItems&&typeof e.additionalItems=="object"?dt(e.additionalItems,t):void 0;a?o=oe.tuple(s).rest(a):o=oe.tuple(s),typeof e.minItems=="number"&&(o=o.check(oe.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(oe.maxLength(e.maxItems)));}else if(i!==void 0){let s=dt(i,t),a=oe.array(s);typeof e.minItems=="number"&&(a=a.min(e.minItems)),typeof e.maxItems=="number"&&(a=a.max(e.maxItems)),o=a;}else o=oe.array(oe.any());break}default:throw new Error(`Unsupported type: ${n}`)}return o}function dt(e,t){if(typeof e=="boolean")return e?oe.any():oe.never();let n=sb(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let a=e.anyOf.map(u=>dt(u,t)),c=oe.union(a);n=o?oe.intersection(n,c):c;}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map(u=>dt(u,t)),c=oe.xor(a);n=o?oe.intersection(n,c):c;}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=o?n:oe.any();else {let a=o?n:dt(e.allOf[0],t),c=o?0:1;for(let u=c;u<e.allOf.length;u++)a=oe.intersection(a,dt(e.allOf[u],t));n=a;}e.nullable===true&&t.version==="openapi-3.0"&&(n=oe.nullable(n)),e.readOnly===true&&(n=oe.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let r={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of i)a in e&&(r[a]=e[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in e&&(r[a]=e[a]);for(let a of Object.keys(e))aw.has(a)||(r[a]=e[a]);return Object.keys(r).length>0&&t.registry.add(n,r),e.description&&(n=n.describe(e.description)),n}function ab(e,t){if(typeof e=="boolean")return e?oe.any():oe.never();let n;try{n=JSON.parse(JSON.stringify(e));}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let o=cw(n,t?.defaultTarget),r=n.$defs||n.definitions||{},i={version:o,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??st};return dt(n,i)}var is={};or(is,{bigint:()=>pw,boolean:()=>mw,date:()=>fw,number:()=>dw,string:()=>lw});function lw(e){return Yp(Eo,e)}function dw(e){return af(Oo,e)}function mw(e){return ff(ko,e)}function pw(e){return gf(No,e)}function fw(e){return Ef(Qi,e)}Ke(ja());var An="2025-11-25";var Zc=[An,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Jc="io.modelcontextprotocol/related-task",lr="io.modelcontextprotocol/protocolVersion",Po="io.modelcontextprotocol/clientInfo",Yt="io.modelcontextprotocol/serverInfo",dr="io.modelcontextprotocol/clientCapabilities",Cn="io.modelcontextprotocol/subscriptionId",Cr="io.modelcontextprotocol/logLevel";var Mn="2.0";var Ar=Pr(()=>ie([g(),H(),ne(),Wt(),te(g(),Ar),C(Ar)])),Ge=te(g(),Ar),xg=C(Ar),ss=ie([g(),H().int()]),as=g(),Xc=z({ttl:H().optional()}),Wc=z({taskId:g()}),cs=le({progressToken:ss.optional(),[Jc]:Wc.optional()}),it=z({_meta:cs.optional()}),jn=it.extend({task:Xc.optional()}),He=z({method:g(),params:it.loose().optional()}),mt=z({_meta:cs.optional()}),pt=z({method:g(),params:mt.loose().optional()}),us=le({get[Yt](){return Mo.optional().catch(void 0)}}),Ze=le({_meta:us.optional()}),Mr=ie([g(),H().int()]),ls=z({jsonrpc:M(Mn),id:Mr,...He.shape}).strict(),ds=z({jsonrpc:M(Mn),...pt.shape}).strict(),Ao=z({jsonrpc:M(Mn),id:Mr,result:Ze}).strict(),Co=z({jsonrpc:M(Mn),id:Mr.optional(),error:z({code:H().int(),message:g(),data:se().optional()})}).strict(),ms=ie([ls,ds,Ao,Co]),wg=ie([Ao,Co]),ps=Ze.strict(),Yc=mt.extend({requestId:Mr.optional(),reason:g().optional()}),fs=pt.extend({method:M("notifications/cancelled"),params:Yc}),Qc=z({src:g(),mimeType:g().optional(),sizes:C(g()).optional(),theme:ge(["light","dark"]).optional()}),jr=z({icons:C(Qc).optional()}),ur=z({name:g(),title:g().optional()}),Mo=ur.extend({...ur.shape,...jr.shape,version:g(),websiteUrl:g().optional(),description:g().optional()}),gw=Ft(z({applyDefaults:ne().optional()}),Ge),_w=cr(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Ft(z({form:gw.optional(),url:Ge.optional()}),Ge.optional())),eu=le({list:Ge.optional(),cancel:Ge.optional(),requests:le({sampling:le({createMessage:Ge.optional()}).optional(),elicitation:le({create:Ge.optional()}).optional()}).optional()}),tu=le({list:Ge.optional(),cancel:Ge.optional(),requests:le({tools:le({call:Ge.optional()}).optional()}).optional()}),ru=z({experimental:te(g(),Ge).optional(),sampling:z({context:Ge.optional(),tools:Ge.optional()}).optional(),elicitation:_w.optional(),roots:z({listChanged:ne().optional()}).optional(),tasks:eu.optional(),extensions:te(g(),Ge).optional()}),nu=it.extend({protocolVersion:g(),capabilities:ru,clientInfo:Mo}),ou=He.extend({method:M("initialize"),params:nu}),hs=z({experimental:te(g(),Ge).optional(),logging:Ge.optional(),completions:Ge.optional(),prompts:z({listChanged:ne().optional()}).optional(),resources:z({subscribe:ne().optional(),listChanged:ne().optional()}).optional(),tools:z({listChanged:ne().optional()}).optional(),tasks:tu.optional(),extensions:te(g(),Ge).optional()}),iu=Ze.extend({protocolVersion:g(),capabilities:hs,serverInfo:Mo,instructions:g().optional()}),su=pt.extend({method:M("notifications/initialized"),params:mt.optional()}),au=He.extend({method:M("server/discover"),params:it.optional()}),cu=Ze.extend({supportedVersions:C(g()),capabilities:hs,instructions:g().optional()}),gs=He.extend({method:M("ping"),params:it.optional()}),uu=z({progress:H(),total:ae(H()),message:ae(g())}),lu=z({...mt.shape,...uu.shape,progressToken:ss}),_s=pt.extend({method:M("notifications/progress"),params:lu}),du=it.extend({cursor:as.optional()}),Dr=He.extend({params:du.optional()}),Ur=Ze.extend({nextCursor:as.optional()}),vs=z({uri:g(),mimeType:ae(g()),_meta:te(g(),se()).optional()}),ys=vs.extend({text:g()}),Eg=g().refine(e=>{try{return atob(e),!0}catch{return false}},{message:"Invalid Base64 string"}),Ss=vs.extend({blob:Eg}),Lr=ge(["user","assistant"]),mr=z({audience:C(Lr).optional(),priority:H().min(0).max(1).optional(),lastModified:Ot.datetime({offset:true}).optional()}),bs=z({...ur.shape,...jr.shape,uri:g(),description:ae(g()),mimeType:ae(g()),size:ae(H()),annotations:mr.optional(),_meta:ae(le({}))}),mu=z({...ur.shape,...jr.shape,uriTemplate:g(),description:ae(g()),mimeType:ae(g()),annotations:mr.optional(),_meta:ae(le({}))}),pu=Dr.extend({method:M("resources/list")}),fu=Ur.extend({resources:C(bs)}),hu=Dr.extend({method:M("resources/templates/list")}),gu=Ur.extend({resourceTemplates:C(mu)}),jo=it.extend({uri:g()}),_u=jo,vu=He.extend({method:M("resources/read"),params:_u}),yu=Ze.extend({contents:C(ie([ys,Ss]))}),Su=pt.extend({method:M("notifications/resources/list_changed"),params:mt.optional()}),bu=jo,Ru=He.extend({method:M("resources/subscribe"),params:bu}),Tu=jo,$u=He.extend({method:M("resources/unsubscribe"),params:Tu}),Rs=z({toolsListChanged:ne().optional(),promptsListChanged:ne().optional(),resourcesListChanged:ne().optional(),resourceSubscriptions:C(g()).optional()}),xu=it.extend({notifications:Rs}),wu=He.extend({method:M("subscriptions/listen"),params:xu}),Eu=mt.extend({notifications:Rs}),Iu=pt.extend({method:M("notifications/subscriptions/acknowledged"),params:Eu}),zu=us.extend({[Cn]:Mr}),Ou=Ze.extend({_meta:zu}),ku=mt.extend({uri:g()}),Nu=pt.extend({method:M("notifications/resources/updated"),params:ku}),Pu=z({name:g(),description:ae(g()),required:ae(ne())}),Au=z({...ur.shape,...jr.shape,description:ae(g()),arguments:ae(C(Pu)),_meta:ae(le({}))}),Cu=Dr.extend({method:M("prompts/list")}),Mu=Ur.extend({prompts:C(Au)}),ju=it.extend({name:g(),arguments:te(g(),g()).optional()}),Du=He.extend({method:M("prompts/get"),params:ju}),Do=z({type:M("text"),text:g(),annotations:mr.optional(),_meta:te(g(),se()).optional()}),Uo=z({type:M("image"),data:Eg,mimeType:g(),annotations:mr.optional(),_meta:te(g(),se()).optional()}),Lo=z({type:M("audio"),data:Eg,mimeType:g(),annotations:mr.optional(),_meta:te(g(),se()).optional()}),Uu=z({type:M("tool_use"),name:g(),id:g(),input:te(g(),se()),_meta:te(g(),se()).optional()}),Lu=z({type:M("resource"),resource:ie([ys,Ss]),annotations:mr.optional(),_meta:te(g(),se()).optional()}),Fu=bs.extend({type:M("resource_link")}),Fo=ie([Do,Uo,Lo,Fu,Lu]),qu=z({role:Lr,content:Fo}),Vu=Ze.extend({description:g().optional(),messages:C(qu)}),Bu=pt.extend({method:M("notifications/prompts/list_changed"),params:mt.optional()}),Ku=z({title:g().optional(),readOnlyHint:ne().optional(),destructiveHint:ne().optional(),idempotentHint:ne().optional(),openWorldHint:ne().optional()}),Gu=z({taskSupport:ge(["required","optional","forbidden"]).optional()}),Ts=z({...ur.shape,...jr.shape,description:g().optional(),inputSchema:z({type:M("object"),properties:te(g(),Ar).optional(),required:C(g()).optional()}).catchall(se()),outputSchema:le({$schema:g().optional()}).optional(),annotations:Ku.optional(),execution:Gu.optional(),_meta:te(g(),se()).optional()}),Hu=Dr.extend({method:M("tools/list")}),Zu=Ur.extend({tools:C(Ts)}),$s=Ze.extend({content:C(Fo).default([]),structuredContent:se().optional(),isError:ne().optional()}),Ig=$s.or(Ze.extend({toolResult:se()})),Ju=jn.extend({name:g(),arguments:te(g(),se()).optional()}),Xu=He.extend({method:M("tools/call"),params:Ju}),Wu=pt.extend({method:M("notifications/tools/list_changed"),params:mt.optional()}),zg=z({autoRefresh:ne().default(true),debounceMs:H().int().nonnegative().default(300)}),Fr=ge(["debug","info","notice","warning","error","critical","alert","emergency"]),Yu=it.extend({level:Fr}),Qu=He.extend({method:M("logging/setLevel"),params:Yu}),el=mt.extend({level:Fr,logger:g().optional(),data:se()}),tl=pt.extend({method:M("notifications/message"),params:el}),rl=z({name:g().optional()}),nl=z({hints:C(rl).optional(),costPriority:H().min(0).max(1).optional(),speedPriority:H().min(0).max(1).optional(),intelligencePriority:H().min(0).max(1).optional()}),ol=z({mode:ge(["auto","required","none"]).optional()}),il=z({type:M("tool_result"),toolUseId:g().describe("The unique identifier for the corresponding tool call."),content:C(Fo),structuredContent:se().optional(),isError:ne().optional(),_meta:te(g(),se()).optional()}),sl=Nr("type",[Do,Uo,Lo]),Pn=Nr("type",[Do,Uo,Lo,Uu,il]),al=z({role:Lr,content:ie([Pn,C(Pn)]),_meta:te(g(),se()).optional()}),cl=jn.extend({messages:C(al),modelPreferences:nl.optional(),systemPrompt:g().optional(),includeContext:ge(["none","thisServer","allServers"]).optional(),temperature:H().optional(),maxTokens:H().int(),stopSequences:C(g()).optional(),metadata:Ge.optional(),tools:C(Ts).optional(),toolChoice:ol.optional()}),ul=He.extend({method:M("sampling/createMessage"),params:cl}),ll=Ze.extend({model:g(),stopReason:ae(ge(["endTurn","stopSequence","maxTokens"]).or(g())),role:Lr,content:sl}),dl=Ze.extend({model:g(),stopReason:ae(ge(["endTurn","stopSequence","maxTokens","toolUse"]).or(g())),role:Lr,content:ie([Pn,C(Pn)])}),xs=z({type:M("boolean"),title:g().optional(),description:g().optional(),default:ne().optional()}),qo=z({type:M("string"),title:g().optional(),description:g().optional(),minLength:H().optional(),maxLength:H().optional(),format:ge(["email","uri","date","date-time"]).optional(),default:g().optional()}),Vo=z({type:ge(["number","integer"]),title:g().optional(),description:g().optional(),minimum:H().optional(),maximum:H().optional(),default:H().optional()}),ws=z({type:M("string"),title:g().optional(),description:g().optional(),enum:C(g()),default:g().optional()}),Es=z({type:M("string"),title:g().optional(),description:g().optional(),oneOf:C(z({const:g(),title:g()})),default:g().optional()}),Is=z({type:M("string"),title:g().optional(),description:g().optional(),enum:C(g()),enumNames:C(g()).optional(),default:g().optional()}),ml=ie([ws,Es]),zs=z({type:M("array"),title:g().optional(),description:g().optional(),minItems:H().optional(),maxItems:H().optional(),items:z({type:M("string"),enum:C(g())}),default:C(g()).optional()}),Os=z({type:M("array"),title:g().optional(),description:g().optional(),minItems:H().optional(),maxItems:H().optional(),items:z({anyOf:C(z({const:g(),title:g()}))}),default:C(g()).optional()}),pl=ie([zs,Os]),fl=ie([Is,ml,pl]),ks=ie([fl,xs,qo,Vo]),Bo=jn.extend({mode:M("form").optional(),message:g(),requestedSchema:z({type:M("object"),properties:te(g(),ks),required:C(g()).optional()}).catchall(se())}),hl=jn.extend({mode:M("url"),message:g(),elicitationId:g(),url:g().url()}),gl=ie([Bo,hl]),_l=He.extend({method:M("elicitation/create"),params:gl}),vl=mt.extend({elicitationId:g()}),yl=pt.extend({method:M("notifications/elicitation/complete"),params:vl}),Sl=Ze.extend({action:ge(["accept","decline","cancel"]),content:cr(e=>e===null?void 0:e,te(g(),ie([g(),H(),ne(),C(g())])).optional())}),bl=z({type:M("ref/resource"),uri:g()}),Rl=z({type:M("ref/prompt"),name:g()}),Tl=it.extend({ref:ie([Rl,bl]),argument:z({name:g(),value:g()}),context:z({arguments:te(g(),g()).optional()}).optional()}),$l=He.extend({method:M("completion/complete"),params:Tl}),xl=Ze.extend({completion:le({values:C(g()).max(100),total:ae(H().int()),hasMore:ae(ne())})}),wl=z({uri:g().startsWith("file://"),name:g().optional(),_meta:te(g(),se()).optional()}),El=He.extend({method:M("roots/list"),params:it.optional()}),Il=Ze.extend({roots:C(wl)}),zl=pt.extend({method:M("notifications/roots/list_changed"),params:mt.optional()}),Og=le({ttl:H().optional(),pollInterval:H().optional()}),Ol=ge(["working","input_required","completed","failed","cancelled"]),qr=z({taskId:g(),status:Ol,ttl:ie([H(),Wt()]),createdAt:g(),lastUpdatedAt:g(),pollInterval:ae(H()),statusMessage:ae(g())}),kg=Ze.extend({task:qr}),kl=mt.merge(qr),Ng=pt.extend({method:M("notifications/tasks/status"),params:kl}),Pg=He.extend({method:M("tasks/get"),params:it.extend({taskId:g()})}),Ag=Ze.merge(qr),Cg=He.extend({method:M("tasks/result"),params:it.extend({taskId:g()})}),Mg=Ze.loose(),jg=Dr.extend({method:M("tasks/list")}),Dg=Ur.extend({tasks:C(qr)}),Ug=He.extend({method:M("tasks/cancel"),params:it.extend({taskId:g()})}),Lg=Ze.merge(qr),Fg=ie([gs,ou,au,$l,Qu,Du,Cu,pu,hu,vu,Ru,$u,wu,Xu,Hu]),qg=ie([fs,_s,su,zl]),Vg=ie([ps,ll,dl,Sl,Il]),Bg=ie([gs,ul,_l,El]),Kg=ie([fs,_s,tl,Nu,Su,Wu,Bu,Iu,yl]),Gg=ie([ps,iu,cu,xl,Vu,Mu,fu,gu,yu,$s,Zu,Ou]),ot=Io().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Tg.custom,message:"URL must be parseable",fatal:true}),Ei}).refine(e=>{let t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),Hg=le({resource:g().url(),authorization_servers:C(ot).optional(),jwks_uri:g().url().optional(),scopes_supported:C(g()).optional(),bearer_methods_supported:C(g()).optional(),resource_signing_alg_values_supported:C(g()).optional(),resource_name:g().optional(),resource_documentation:g().optional(),resource_policy_uri:g().url().optional(),resource_tos_uri:g().url().optional(),tls_client_certificate_bound_access_tokens:ne().optional(),authorization_details_types_supported:C(g()).optional(),dpop_signing_alg_values_supported:C(g()).optional(),dpop_bound_access_tokens_required:ne().optional()}),Nl=le({issuer:g(),authorization_endpoint:ot,token_endpoint:ot,registration_endpoint:ot.optional(),scopes_supported:C(g()).optional(),response_types_supported:C(g()),response_modes_supported:C(g()).optional(),grant_types_supported:C(g()).optional(),token_endpoint_auth_methods_supported:C(g()).optional(),token_endpoint_auth_signing_alg_values_supported:C(g()).optional(),service_documentation:ot.optional(),revocation_endpoint:ot.optional(),revocation_endpoint_auth_methods_supported:C(g()).optional(),revocation_endpoint_auth_signing_alg_values_supported:C(g()).optional(),introspection_endpoint:g().optional(),introspection_endpoint_auth_methods_supported:C(g()).optional(),introspection_endpoint_auth_signing_alg_values_supported:C(g()).optional(),code_challenge_methods_supported:C(g()).optional(),client_id_metadata_document_supported:ne().optional(),authorization_response_iss_parameter_supported:ne().optional().catch(void 0)}),Pl=le({issuer:g(),authorization_endpoint:ot,token_endpoint:ot,userinfo_endpoint:ot.optional(),jwks_uri:ot,registration_endpoint:ot.optional(),scopes_supported:C(g()).optional(),response_types_supported:C(g()),response_modes_supported:C(g()).optional(),grant_types_supported:C(g()).optional(),acr_values_supported:C(g()).optional(),subject_types_supported:C(g()),id_token_signing_alg_values_supported:C(g()),id_token_encryption_alg_values_supported:C(g()).optional(),id_token_encryption_enc_values_supported:C(g()).optional(),userinfo_signing_alg_values_supported:C(g()).optional(),userinfo_encryption_alg_values_supported:C(g()).optional(),userinfo_encryption_enc_values_supported:C(g()).optional(),request_object_signing_alg_values_supported:C(g()).optional(),request_object_encryption_alg_values_supported:C(g()).optional(),request_object_encryption_enc_values_supported:C(g()).optional(),token_endpoint_auth_methods_supported:C(g()).optional(),token_endpoint_auth_signing_alg_values_supported:C(g()).optional(),display_values_supported:C(g()).optional(),claim_types_supported:C(g()).optional(),claims_supported:C(g()).optional(),service_documentation:g().optional(),claims_locales_supported:C(g()).optional(),ui_locales_supported:C(g()).optional(),claims_parameter_supported:ne().optional(),request_parameter_supported:ne().optional(),request_uri_parameter_supported:ne().optional(),require_request_uri_registration:ne().optional(),op_policy_uri:ot.optional(),op_tos_uri:ot.optional(),client_id_metadata_document_supported:ne().optional(),authorization_response_iss_parameter_supported:ne().optional().catch(void 0)}),Zg=z({...Pl.shape,...Nl.pick({code_challenge_methods_supported:true}).shape}),Jg=z({access_token:g(),id_token:g().optional(),token_type:g(),expires_in:is.number().optional(),scope:g().optional(),refresh_token:g().optional()}).strip(),Xg=z({issued_token_type:M("urn:ietf:params:oauth:token-type:id-jag"),access_token:g(),token_type:g().optional(),expires_in:H().optional(),scope:g().optional()}).strip(),Wg=z({error:g(),error_description:g().optional(),error_uri:g().optional()}),$g=ot.optional().or(M("").transform(()=>{})),Al=z({redirect_uris:C(ot),token_endpoint_auth_method:g().optional(),grant_types:C(g()).optional(),response_types:C(g()).optional(),application_type:g().optional(),client_name:g().optional(),client_uri:ot.optional(),logo_uri:$g,scope:g().optional(),contacts:C(g()).optional(),tos_uri:$g,policy_uri:g().optional(),jwks_uri:ot.optional(),jwks:Vc().optional(),software_id:g().optional(),software_version:g().optional(),software_statement:g().optional()}).strip(),Cl=z({client_id:g(),client_secret:g().optional(),client_id_issued_at:H().optional(),client_secret_expires_at:H().optional()}).strip(),Yg=Al.merge(Cl),Qg=z({error:g(),error_description:g().optional()}).strip(),e_=z({token:g(),token_type_hint:g().optional()}).strip();var o_=Symbol.for("mcp.sdk.errorBrands");function c_(e,t){let n=new Set,o=t;for(;typeof o=="function";){let r=o.mcpBrand;Object.prototype.hasOwnProperty.call(o,"mcpBrand")&&typeof r=="string"&&n.add(r),o=Object.getPrototypeOf(o);}n.size!==0&&Object.defineProperty(e,o_,{value:n,enumerable:false,configurable:true});}function Go(e,t){try{if(typeof t=="object"&&t!==null&&Object.prototype.hasOwnProperty.call(e,"mcpBrand")&&typeof e.mcpBrand=="string"&&Object.prototype.hasOwnProperty.call(t,o_)){let n=t[o_];if(n&&typeof n.has=="function"&&n.has(e.mcpBrand))return !0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}var Ie=(function(e){return e.NotConnected="NOT_CONNECTED",e.AlreadyConnected="ALREADY_CONNECTED",e.NotInitialized="NOT_INITIALIZED",e.CapabilityNotSupported="CAPABILITY_NOT_SUPPORTED",e.RequestTimeout="REQUEST_TIMEOUT",e.ConnectionClosed="CONNECTION_CLOSED",e.SendFailed="SEND_FAILED",e.InvalidResult="INVALID_RESULT",e.UnsupportedResultType="UNSUPPORTED_RESULT_TYPE",e.InputRequiredRoundsExceeded="INPUT_REQUIRED_ROUNDS_EXCEEDED",e.ListPaginationExceeded="LIST_PAGINATION_EXCEEDED",e.MethodNotSupportedByProtocolVersion="METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION",e.EraNegotiationFailed="ERA_NEGOTIATION_FAILED",e.ClientHttpNotImplemented="CLIENT_HTTP_NOT_IMPLEMENTED",e.ClientHttpAuthentication="CLIENT_HTTP_AUTHENTICATION",e.ClientHttpForbidden="CLIENT_HTTP_FORBIDDEN",e.ClientHttpUnexpectedContent="CLIENT_HTTP_UNEXPECTED_CONTENT",e.ClientHttpFailedToOpenStream="CLIENT_HTTP_FAILED_TO_OPEN_STREAM",e.ClientHttpFailedToTerminateSession="CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION",e})({}),ye=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkError"});}static[Symbol.hasInstance](e){return Go(this,e)}static isInstance(e){if(typeof this!="function")throw new TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Go(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name="SdkError",c_(this,new.target);}};function _b(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Sw(e,t,n){return e==="elicitation"&&t==="form"&&n.form===void 0&&n.url===void 0}function Ob(e){switch(e.method){case "elicitation/create":return e.params?.mode==="url"?{elicitation:{url:{}}}:{elicitation:{form:{}}};case "sampling/createMessage":{let t=e.params;return t!==void 0&&(t.tools!==void 0||t.toolChoice!==void 0)?{sampling:{tools:{}}}:{sampling:{}}}case "roots/list":return {roots:{}};default:return}}function Vl(e,t){let n={};for(let[o,r]of Object.entries(e)){if(r===void 0)continue;let i=t===void 0?void 0:t[o];if(i===void 0){n[o]=r;continue}if(_b(r)&&_b(i)){let s={};for(let[a,c]of Object.entries(r))c!==void 0&&i[a]===void 0&&!Sw(o,a,i)&&(s[a]=c);Object.keys(s).length>0&&(n[o]=s);}}return Object.keys(n).length>0?n:void 0}var kb="2026-07-28",Br=[kb];function Zo(e){return e>=kb}function Nb(e){return e.filter(t=>!Zo(t))}function u_(e){return e.filter(t=>Zo(t))}function Pb(e){let t=e.structuredContent;return t===void 0||!(typeof t!="object"||t===null||Array.isArray(t))||(e.content?.some(n=>n.type==="text")??false)?e:{...e,content:[...e.content??[],{type:"text",text:JSON.stringify(t)}]}}var Ab=["task","inputRequests","requestState"];function l_(e){return e===null||typeof e!="object"||Array.isArray(e)||e.content!==void 0||Ab.some(t=>t in e)?e:{...e,content:[]}}function bw(){let e=Pr(()=>ie([g(),H(),ne(),Wt(),te(g(),e),C(e)])),t=te(g(),e),n=ie([g(),H().int()]),o=g(),r=z({ttl:H().optional()}),i=z({taskId:g()}),s=le({progressToken:n.optional(),"io.modelcontextprotocol/related-task":i.optional()}),a=z({_meta:s.optional()}),c=a.extend({task:r.optional()}),u=z({method:g(),params:a.loose().optional()}),l=z({_meta:s.optional()}),m=z({method:g(),params:l.loose().optional()}),h=le({_meta:s.optional()}),y=ie([g(),H().int()]),b=h.strict(),p=l.extend({requestId:y.optional(),reason:g().optional()}),S=m.extend({method:M("notifications/cancelled"),params:p}),d=z({src:g(),mimeType:g().optional(),sizes:C(g()).optional(),theme:ge(["light","dark"]).optional()}),_=z({icons:C(d).optional()}),f=z({name:g(),title:g().optional()}),v=f.extend({...f.shape,..._.shape,version:g(),websiteUrl:g().optional(),description:g().optional()}),x=Ft(z({applyDefaults:ne().optional()}),t),T=cr(lt=>lt&&typeof lt=="object"&&!Array.isArray(lt)&&Object.keys(lt).length===0?{form:{}}:lt,Ft(z({form:x.optional(),url:t.optional()}),t.optional())),R=le({list:t.optional(),cancel:t.optional(),requests:le({sampling:le({createMessage:t.optional()}).optional(),elicitation:le({create:t.optional()}).optional()}).optional()}),$=le({list:t.optional(),cancel:t.optional(),requests:le({tools:le({call:t.optional()}).optional()}).optional()}),E=z({experimental:te(g(),t).optional(),sampling:z({context:t.optional(),tools:t.optional()}).optional(),elicitation:T.optional(),roots:z({listChanged:ne().optional()}).optional(),tasks:R.optional(),extensions:te(g(),t).optional()}),A=a.extend({protocolVersion:g(),capabilities:E,clientInfo:v}),N=u.extend({method:M("initialize"),params:A}),F=z({experimental:te(g(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:z({listChanged:ne().optional()}).optional(),resources:z({subscribe:ne().optional(),listChanged:ne().optional()}).optional(),tools:z({listChanged:ne().optional()}).optional(),tasks:$.optional(),extensions:te(g(),t).optional()}),V=h.extend({protocolVersion:g(),capabilities:F,serverInfo:v,instructions:g().optional()}),K=m.extend({method:M("notifications/initialized"),params:l.optional()}),ue=u.extend({method:M("ping"),params:a.optional()}),ke=z({progress:H(),total:ae(H()),message:ae(g())}),xe=z({...l.shape,...ke.shape,progressToken:n}),Ve=m.extend({method:M("notifications/progress"),params:xe}),be=a.extend({cursor:o.optional()}),k=u.extend({params:be.optional()}),U=h.extend({nextCursor:o.optional()}),B=z({uri:g(),mimeType:ae(g()),_meta:te(g(),se()).optional()}),w=B.extend({text:g()}),O=g().refine(lt=>{try{return atob(lt),!0}catch{return false}},{message:"Invalid Base64 string"}),j=B.extend({blob:O}),Y=ge(["user","assistant"]),ce=z({audience:C(Y).optional(),priority:H().min(0).max(1).optional(),lastModified:Ot.datetime({offset:true}).optional()}),Re=z({...f.shape,..._.shape,uri:g(),description:ae(g()),mimeType:ae(g()),size:ae(H()),annotations:ce.optional(),_meta:ae(le({}))}),pe=z({...f.shape,..._.shape,uriTemplate:g(),description:ae(g()),mimeType:ae(g()),annotations:ce.optional(),_meta:ae(le({}))}),Ee=k.extend({method:M("resources/list")}),je=U.extend({resources:C(Re)}),I=k.extend({method:M("resources/templates/list")}),L=U.extend({resourceTemplates:C(pe)}),q=a.extend({uri:g()}),fe=q,he=u.extend({method:M("resources/read"),params:fe}),Te=h.extend({contents:C(ie([w,j]))}),Xe=m.extend({method:M("notifications/resources/list_changed"),params:l.optional()}),tt=q,ct=u.extend({method:M("resources/subscribe"),params:tt}),Ye=q,Be=u.extend({method:M("resources/unsubscribe"),params:Ye}),Nt=l.extend({uri:g()}),nt=m.extend({method:M("notifications/resources/updated"),params:Nt}),rr=z({name:g(),description:ae(g()),required:ae(ne())}),jt=z({...f.shape,..._.shape,description:ae(g()),arguments:ae(C(rr)),_meta:ae(le({}))}),nr=k.extend({method:M("prompts/list")}),_r=U.extend({prompts:C(jt)}),vr=a.extend({name:g(),arguments:te(g(),g()).optional()}),fn=u.extend({method:M("prompts/get"),params:vr}),hn=z({type:M("text"),text:g(),annotations:ce.optional(),_meta:te(g(),se()).optional()}),gn=z({type:M("image"),data:O,mimeType:g(),annotations:ce.optional(),_meta:te(g(),se()).optional()}),_n=z({type:M("audio"),data:O,mimeType:g(),annotations:ce.optional(),_meta:te(g(),se()).optional()}),ei=z({type:M("tool_use"),name:g(),id:g(),input:te(g(),se()),_meta:te(g(),se()).optional()}),yr=z({type:M("resource"),resource:ie([w,j]),annotations:ce.optional(),_meta:te(g(),se()).optional()}),ti=Re.extend({type:M("resource_link")}),Pt=ie([hn,gn,_n,ti,yr]),Bn=z({role:Y,content:Pt}),Kn=h.extend({description:g().optional(),messages:C(Bn)}),vn=m.extend({method:M("notifications/prompts/list_changed"),params:l.optional()}),ri=z({title:g().optional(),readOnlyHint:ne().optional(),destructiveHint:ne().optional(),idempotentHint:ne().optional(),openWorldHint:ne().optional()}),Gn=z({taskSupport:ge(["required","optional","forbidden"]).optional()}),yn=z({...f.shape,..._.shape,description:g().optional(),inputSchema:z({type:M("object"),properties:te(g(),e).optional(),required:C(g()).optional()}).catchall(se()),outputSchema:z({type:M("object"),properties:te(g(),e).optional(),required:C(g()).optional()}).catchall(se()).optional(),annotations:ri.optional(),execution:Gn.optional(),_meta:te(g(),se()).optional()}),Hn=k.extend({method:M("tools/list")}),Zn=U.extend({tools:C(yn)}),Jn=h.extend({content:C(Pt),structuredContent:te(g(),se()).optional(),isError:ne().optional()}),ut=c.extend({name:g(),arguments:te(g(),se()).optional()}),ni=u.extend({method:M("tools/call"),params:ut}),Hs=m.extend({method:M("notifications/tools/list_changed"),params:l.optional()}),Xn=ge(["debug","info","notice","warning","error","critical","alert","emergency"]),oi=a.extend({level:Xn}),ii=u.extend({method:M("logging/setLevel"),params:oi}),si=l.extend({level:Xn,logger:g().optional(),data:se()}),ai=m.extend({method:M("notifications/message"),params:si}),ci=z({name:g().optional()}),ui=z({hints:C(ci).optional(),costPriority:H().min(0).max(1).optional(),speedPriority:H().min(0).max(1).optional(),intelligencePriority:H().min(0).max(1).optional()}),li=z({mode:ge(["auto","required","none"]).optional()}),Zs=z({type:M("tool_result"),toolUseId:g().describe("The unique identifier for the corresponding tool call."),content:C(Pt),structuredContent:z({}).loose().optional(),isError:ne().optional(),_meta:te(g(),se()).optional()}),di=Nr("type",[hn,gn,_n]),Sr=Nr("type",[hn,gn,_n,ei,Zs]),mi=z({role:Y,content:ie([Sr,C(Sr)]),_meta:te(g(),se()).optional()}),pi=c.extend({messages:C(mi),modelPreferences:ui.optional(),systemPrompt:g().optional(),includeContext:ge(["none","thisServer","allServers"]).optional(),temperature:H().optional(),maxTokens:H().int(),stopSequences:C(g()).optional(),metadata:t.optional(),tools:C(yn).optional(),toolChoice:li.optional()}),fi=u.extend({method:M("sampling/createMessage"),params:pi}),hi=h.extend({model:g(),stopReason:ae(ge(["endTurn","stopSequence","maxTokens"]).or(g())),role:Y,content:di}),gi=h.extend({model:g(),stopReason:ae(ge(["endTurn","stopSequence","maxTokens","toolUse"]).or(g())),role:Y,content:ie([Sr,C(Sr)])}),_i=z({type:M("boolean"),title:g().optional(),description:g().optional(),default:ne().optional()}),vi=z({type:M("string"),title:g().optional(),description:g().optional(),minLength:H().optional(),maxLength:H().optional(),format:ge(["email","uri","date","date-time"]).optional(),default:g().optional()}),yi=z({type:ge(["number","integer"]),title:g().optional(),description:g().optional(),minimum:H().optional(),maximum:H().optional(),default:H().optional()}),Si=z({type:M("string"),title:g().optional(),description:g().optional(),enum:C(g()),default:g().optional()}),bi=z({type:M("string"),title:g().optional(),description:g().optional(),oneOf:C(z({const:g(),title:g()})),default:g().optional()}),Ri=z({type:M("string"),title:g().optional(),description:g().optional(),enum:C(g()),enumNames:C(g()).optional(),default:g().optional()}),Ti=ie([Si,bi]),Sn=z({type:M("array"),title:g().optional(),description:g().optional(),minItems:H().optional(),maxItems:H().optional(),items:z({type:M("string"),enum:C(g())}),default:C(g()).optional()}),bn=z({type:M("array"),title:g().optional(),description:g().optional(),minItems:H().optional(),maxItems:H().optional(),items:z({anyOf:C(z({const:g(),title:g()}))}),default:C(g()).optional()}),Js=ie([Sn,bn]),Xs=ie([Ri,Ti,Js]),wt=ie([Xs,_i,vi,yi]),Et=c.extend({mode:M("form").optional(),message:g(),requestedSchema:z({type:M("object"),properties:te(g(),wt),required:C(g()).optional()}).catchall(se())}),$i=c.extend({mode:M("url"),message:g(),elicitationId:g(),url:g().url()}),Dt=ie([Et,$i]),Ws=u.extend({method:M("elicitation/create"),params:Dt}),Ys=l.extend({elicitationId:g()}),Qs=m.extend({method:M("notifications/elicitation/complete"),params:Ys}),ea=h.extend({action:ge(["accept","decline","cancel"]),content:cr(lt=>lt===null?void 0:lt,te(g(),ie([g(),H(),ne(),C(g())])).optional())}),ta=z({type:M("ref/resource"),uri:g()}),ra=z({type:M("ref/prompt"),name:g()}),na=a.extend({ref:ie([ra,ta]),argument:z({name:g(),value:g()}),context:z({arguments:te(g(),g()).optional()}).optional()}),xi=u.extend({method:M("completion/complete"),params:na}),oa=h.extend({completion:le({values:C(g()).max(100),total:ae(H().int()),hasMore:ae(ne())})}),ia=z({uri:g().startsWith("file://"),name:g().optional(),_meta:te(g(),se()).optional()}),Wn=u.extend({method:M("roots/list"),params:a.optional()}),wi=h.extend({roots:C(ia)}),sa=m.extend({method:M("notifications/roots/list_changed"),params:l.optional()}),aa=le({ttl:H().optional(),pollInterval:H().optional()}),ca=ge(["working","input_required","completed","failed","cancelled"]),br=z({taskId:g(),status:ca,ttl:ie([H(),Wt()]),createdAt:g(),lastUpdatedAt:g(),pollInterval:ae(H()),statusMessage:ae(g())}),St=h.extend({task:br}),ua=l.merge(br),Rn=m.extend({method:M("notifications/tasks/status"),params:ua}),Yn=u.extend({method:M("tasks/get"),params:a.extend({taskId:g()})}),Qn=h.merge(br),eo=u.extend({method:M("tasks/result"),params:a.extend({taskId:g()})}),Id=h.loose(),bt=k.extend({method:M("tasks/list")}),We=U.extend({tasks:C(br)}),Tn=u.extend({method:M("tasks/cancel"),params:a.extend({taskId:g()})});return {JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:o,TaskMetadataSchema:r,RelatedTaskMetadataSchema:i,RequestMetaSchema:s,BaseRequestParamsSchema:a,TaskAugmentedRequestParamsSchema:c,RequestSchema:u,NotificationsParamsSchema:l,NotificationSchema:m,ResultSchema:h,RequestIdSchema:y,EmptyResultSchema:b,CancelledNotificationParamsSchema:p,CancelledNotificationSchema:S,IconSchema:d,IconsSchema:_,BaseMetadataSchema:f,ImplementationSchema:v,ClientTasksCapabilitySchema:R,ServerTasksCapabilitySchema:$,ClientCapabilitiesSchema:E,InitializeRequestParamsSchema:A,InitializeRequestSchema:N,ServerCapabilitiesSchema:F,InitializeResultSchema:V,InitializedNotificationSchema:K,PingRequestSchema:ue,ProgressSchema:ke,ProgressNotificationParamsSchema:xe,ProgressNotificationSchema:Ve,PaginatedRequestParamsSchema:be,PaginatedRequestSchema:k,PaginatedResultSchema:U,ResourceContentsSchema:B,TextResourceContentsSchema:w,BlobResourceContentsSchema:j,RoleSchema:Y,AnnotationsSchema:ce,ResourceSchema:Re,ResourceTemplateSchema:pe,ListResourcesRequestSchema:Ee,ListResourcesResultSchema:je,ListResourceTemplatesRequestSchema:I,ListResourceTemplatesResultSchema:L,ResourceRequestParamsSchema:q,ReadResourceRequestParamsSchema:fe,ReadResourceRequestSchema:he,ReadResourceResultSchema:Te,ResourceListChangedNotificationSchema:Xe,SubscribeRequestParamsSchema:tt,SubscribeRequestSchema:ct,UnsubscribeRequestParamsSchema:Ye,UnsubscribeRequestSchema:Be,ResourceUpdatedNotificationParamsSchema:Nt,ResourceUpdatedNotificationSchema:nt,PromptArgumentSchema:rr,PromptSchema:jt,ListPromptsRequestSchema:nr,ListPromptsResultSchema:_r,GetPromptRequestParamsSchema:vr,GetPromptRequestSchema:fn,TextContentSchema:hn,ImageContentSchema:gn,AudioContentSchema:_n,ToolUseContentSchema:ei,EmbeddedResourceSchema:yr,ResourceLinkSchema:ti,ContentBlockSchema:Pt,PromptMessageSchema:Bn,GetPromptResultSchema:Kn,PromptListChangedNotificationSchema:vn,ToolAnnotationsSchema:ri,ToolExecutionSchema:Gn,ToolSchema:yn,ListToolsRequestSchema:Hn,ListToolsResultSchema:Zn,CallToolResultSchema:Jn,CallToolRequestParamsSchema:ut,CallToolRequestSchema:ni,ToolListChangedNotificationSchema:Hs,LoggingLevelSchema:Xn,SetLevelRequestParamsSchema:oi,SetLevelRequestSchema:ii,LoggingMessageNotificationParamsSchema:si,LoggingMessageNotificationSchema:ai,ModelHintSchema:ci,ModelPreferencesSchema:ui,ToolChoiceSchema:li,ToolResultContentSchema:Zs,SamplingContentSchema:di,SamplingMessageContentBlockSchema:Sr,SamplingMessageSchema:mi,CreateMessageRequestParamsSchema:pi,CreateMessageRequestSchema:fi,CreateMessageResultSchema:hi,CreateMessageResultWithToolsSchema:gi,BooleanSchemaSchema:_i,StringSchemaSchema:vi,NumberSchemaSchema:yi,UntitledSingleSelectEnumSchemaSchema:Si,TitledSingleSelectEnumSchemaSchema:bi,LegacyTitledEnumSchemaSchema:Ri,SingleSelectEnumSchemaSchema:Ti,UntitledMultiSelectEnumSchemaSchema:Sn,TitledMultiSelectEnumSchemaSchema:bn,MultiSelectEnumSchemaSchema:Js,EnumSchemaSchema:Xs,PrimitiveSchemaDefinitionSchema:wt,ElicitRequestFormParamsSchema:Et,ElicitRequestURLParamsSchema:$i,ElicitRequestParamsSchema:Dt,ElicitRequestSchema:Ws,ElicitationCompleteNotificationParamsSchema:Ys,ElicitationCompleteNotificationSchema:Qs,ElicitResultSchema:ea,ResourceTemplateReferenceSchema:ta,PromptReferenceSchema:ra,CompleteRequestParamsSchema:na,CompleteRequestSchema:xi,CompleteResultSchema:oa,RootSchema:ia,ListRootsRequestSchema:Wn,ListRootsResultSchema:wi,RootsListChangedNotificationSchema:sa,TaskCreationParamsSchema:aa,TaskStatusSchema:ca,TaskSchema:br,CreateTaskResultSchema:St,TaskStatusNotificationParamsSchema:ua,TaskStatusNotificationSchema:Rn,GetTaskRequestSchema:Yn,GetTaskResultSchema:Qn,GetTaskPayloadRequestSchema:eo,GetTaskPayloadResultSchema:Id,ListTasksRequestSchema:bt,ListTasksResultSchema:We,CancelTaskRequestSchema:Tn,CancelTaskResultSchema:h.merge(br),ClientRequestSchema:ie([ue,N,xi,ii,fn,nr,Ee,I,he,ct,Be,ni,Hn,Yn,eo,bt,Tn]),ClientNotificationSchema:ie([S,Ve,K,sa,Rn]),ClientResultSchema:ie([b,hi,gi,ea,wi,Qn,We,St]),ServerRequestSchema:ie([ue,fi,Ws,Wn,Yn,eo,bt,Tn]),ServerNotificationSchema:ie([S,Ve,ai,nt,Xe,Hs,vn,Rn,Qs]),ServerResultSchema:ie([b,V,oa,Kn,_r,je,L,Te,Jn,Zn,Qn,We,St]),CallToolResultWireSchema:se().superRefine((lt,g$)=>{if(!(typeof lt!="object"||lt===null||Array.isArray(lt)||lt.content!==void 0)){for(let pv of Ab)if(pv in lt){g$.addIssue({code:"custom",message:`content is required when the body carries '${pv}' \u2014 another result family cannot default into an empty tools/call success`});return}}}).transform(l_).pipe(Jn)}}var Rw;function Cb(){return Rw??=bw()}function Mb(e){return e.type!=="object"}var Tw=new Set(["const","enum","default","examples"]),$w=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas","dependencies"]);function vb(e){return e!==void 0&&!(typeof e=="string"&&e.startsWith("#"))}function xw(e){let t=typeof e.$schema=="string"?e.$schema:void 0;if(vb(e.$id))return {...t!==void 0&&{$schema:t},type:"object",properties:{result:e},required:["result"]};let n=gv(e.$schema)&&e.$recursiveAnchor!==true,o=(r,i)=>{if(Array.isArray(r))return r.map(c=>o(c,false));if(r===null||typeof r!="object"||!i&&vb(r.$id))return r;let s={},a=false;for(let[c,u]of Object.entries(r))i?s[c]=o(u,false):(c==="$ref"||c==="$dynamicRef")&&typeof u=="string"?s[c]=u==="#"?"#/properties/result":u.startsWith("#/")?`#/properties/result${u.slice(1)}`:u:c==="$recursiveRef"&&u==="#"&&n?a=true:Tw.has(c)?s[c]=u:$w.has(c)?s[c]=o(u,true):s[c]=o(u,false);return a&&("$ref"in s?s.allOf=[...Array.isArray(s.allOf)?s.allOf:[],{$ref:"#/properties/result"}]:s.$ref="#/properties/result"),s};return {...t!==void 0&&{$schema:t},type:"object",properties:{result:o(e,false)},required:["result"]}}var jb={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Db={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},ww={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Ml;function d_(){if(Ml)return Ml;let e=Cb();return Ml={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},Ml}function Ub(e){return Object.prototype.hasOwnProperty.call(jb,e)}function Lb(e){return Object.prototype.hasOwnProperty.call(Db,e)}function Ew(e){return Object.prototype.hasOwnProperty.call(ww,e)}function Iw(e){return Ew(e)?d_().resultSchemas[e]:void 0}function zw(e){return Ub(e)?d_().requestSchemas[e]:void 0}function Ow(e){return Lb(e)?d_().notificationSchemas[e]:void 0}function i_(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function jl(e,t){if(e===void 0)return {ok:false,reason:"not-in-era"};let n=e.safeParse(t);return n.success?{ok:true,value:n.data}:{ok:false,reason:"invalid",message:String(n.error)}}var yb={ok:false,reason:"not-in-era"};function Sb(e){return i_(e)&&i_(e.outputSchema)&&Mb(e.outputSchema)}var m_={era:"2025-11-25",hasRequestMethod:Ub,hasNotificationMethod:Lb,validateRequest:(e,t)=>jl(zw(e),t),validateResult:(e,t)=>jl(Iw(e),t),validateNotification:(e,t)=>jl(Ow(e),t),hasInputRequestMethod:()=>false,validateInputRequest:()=>yb,validateInputResponse:()=>yb,samplingResultVariant:((e,t)=>{let n=Cb();return jl(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>{},validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=Pb(e),o=n.structuredContent;if(o===void 0)return n;let r=typeof o!="object"||o===null||Array.isArray(o),i=t!==void 0&&Mb(t);return !r&&!i?n:{...n,structuredContent:{result:o}}},decodeResult(e,t){if(i_(t)&&"resultType"in t){let n={...t};return delete n.resultType,{kind:"complete",result:n}}return {kind:"complete",result:t}},encodeResult(e,t){if(e!=="tools/list")return t;let n=t.tools;return !Array.isArray(n)||!n.some(o=>Sb(o))?t:{...t,tools:n.map(o=>Sb(o)?{...o,outputSchema:xw(o.outputSchema)}:o)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>{}};function kw(){let e=Pr(()=>ie([g(),H(),ne(),Wt(),te(g(),e),C(e)])),t=te(g(),e),n=ie([g(),H().int()]),o=g(),r=ie([g(),H().int()]),i=ge(["user","assistant"]),s=ge(["debug","info","notice","warning","error","critical","alert","emergency"]),a=g().refine(We=>{try{return atob(We),!0}catch{return false}},{message:"Invalid Base64 string"}),c=z({ttl:H().optional()}),u=z({taskId:g()}),l=le({progressToken:n.optional(),"io.modelcontextprotocol/related-task":u.optional()}),m=z({_meta:l.optional()}),h=m.extend({task:c.optional()}),y=z({_meta:l.optional()}),b=z({method:g(),params:y.loose().optional()}),p=z({src:g(),mimeType:g().optional(),sizes:C(g()).optional(),theme:ge(["light","dark"]).optional()}),S=z({icons:C(p).optional()}),d=z({name:g(),title:g().optional()}),_=d.extend({...d.shape,...S.shape,version:g(),websiteUrl:g().optional(),description:g().optional()}),f=Ft(z({applyDefaults:ne().optional()}),t),v=cr(We=>We&&typeof We=="object"&&!Array.isArray(We)&&Object.keys(We).length===0?{form:{}}:We,Ft(z({form:f.optional(),url:t.optional()}),t.optional())),x=le({list:t.optional(),cancel:t.optional(),requests:le({sampling:le({createMessage:t.optional()}).optional(),elicitation:le({create:t.optional()}).optional()}).optional()}),T=le({list:t.optional(),cancel:t.optional(),requests:le({tools:le({call:t.optional()}).optional()}).optional()}),R=z({experimental:te(g(),t).optional(),sampling:z({context:t.optional(),tools:t.optional()}).optional(),elicitation:v.optional(),roots:z({listChanged:ne().optional()}).optional(),tasks:x.optional(),extensions:te(g(),t).optional()}),$=z({experimental:te(g(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:z({listChanged:ne().optional()}).optional(),resources:z({subscribe:ne().optional(),listChanged:ne().optional()}).optional(),tools:z({listChanged:ne().optional()}).optional(),tasks:T.optional(),extensions:te(g(),t).optional()}),E=z({progress:H(),total:ae(H()),message:ae(g())}),A=z({...y.shape,...E.shape,progressToken:n}),N=b.extend({method:M("notifications/progress"),params:A}),F=y.extend({level:s,logger:g().optional(),data:se()}),V=b.extend({method:M("notifications/message"),params:F}),K=z({uri:g(),mimeType:ae(g()),_meta:te(g(),se()).optional()}),ue=K.extend({text:g()}),ke=K.extend({blob:a}),xe=z({audience:C(i).optional(),priority:H().min(0).max(1).optional(),lastModified:Ot.datetime({offset:true}).optional()}),Ve=z({...d.shape,...S.shape,uri:g(),description:ae(g()),mimeType:ae(g()),size:ae(H()),annotations:xe.optional(),_meta:ae(le({}))}),be=z({...d.shape,...S.shape,uriTemplate:g(),description:ae(g()),mimeType:ae(g()),annotations:xe.optional(),_meta:ae(le({}))}),k=b.extend({method:M("notifications/resources/list_changed"),params:y.optional()}),U=y.extend({uri:g()}),B=b.extend({method:M("notifications/resources/updated"),params:U}),w=z({name:g(),description:ae(g()),required:ae(ne())}),O=z({...d.shape,...S.shape,description:ae(g()),arguments:ae(C(w)),_meta:ae(le({}))}),j=b.extend({method:M("notifications/prompts/list_changed"),params:y.optional()}),Y=z({type:M("text"),text:g(),annotations:xe.optional(),_meta:te(g(),se()).optional()}),ce=z({type:M("image"),data:a,mimeType:g(),annotations:xe.optional(),_meta:te(g(),se()).optional()}),Re=z({type:M("audio"),data:a,mimeType:g(),annotations:xe.optional(),_meta:te(g(),se()).optional()}),pe=z({type:M("tool_use"),name:g(),id:g(),input:te(g(),se()),_meta:te(g(),se()).optional()}),Ee=z({type:M("resource"),resource:ie([ue,ke]),annotations:xe.optional(),_meta:te(g(),se()).optional()}),je=Ve.extend({type:M("resource_link")}),I=ie([Y,ce,Re,je,Ee]),L=z({role:i,content:I}),q=z({title:g().optional(),readOnlyHint:ne().optional(),destructiveHint:ne().optional(),idempotentHint:ne().optional(),openWorldHint:ne().optional()}),fe=b.extend({method:M("notifications/tools/list_changed"),params:y.optional()}),he=z({name:g().optional()}),Te=z({hints:C(he).optional(),costPriority:H().min(0).max(1).optional(),speedPriority:H().min(0).max(1).optional(),intelligencePriority:H().min(0).max(1).optional()}),Xe=z({mode:ge(["auto","required","none"]).optional()}),tt=z({type:M("boolean"),title:g().optional(),description:g().optional(),default:ne().optional()}),ct=z({type:M("string"),title:g().optional(),description:g().optional(),minLength:H().optional(),maxLength:H().optional(),format:ge(["email","uri","date","date-time"]).optional(),default:g().optional()}),Ye=z({type:ge(["number","integer"]),title:g().optional(),description:g().optional(),minimum:H().optional(),maximum:H().optional(),default:H().optional()}),Be=z({type:M("string"),title:g().optional(),description:g().optional(),enum:C(g()),default:g().optional()}),Nt=z({type:M("string"),title:g().optional(),description:g().optional(),oneOf:C(z({const:g(),title:g()})),default:g().optional()}),nt=z({type:M("string"),title:g().optional(),description:g().optional(),enum:C(g()),enumNames:C(g()).optional(),default:g().optional()}),rr=ie([Be,Nt]),jt=z({type:M("array"),title:g().optional(),description:g().optional(),minItems:H().optional(),maxItems:H().optional(),items:z({type:M("string"),enum:C(g())}),default:C(g()).optional()}),nr=z({type:M("array"),title:g().optional(),description:g().optional(),minItems:H().optional(),maxItems:H().optional(),items:z({anyOf:C(z({const:g(),title:g()}))}),default:C(g()).optional()}),_r=ie([jt,nr]),vr=ie([nt,rr,_r]),fn=ie([vr,tt,ct,Ye]),hn=h.extend({mode:M("form").optional(),message:g(),requestedSchema:z({type:M("object"),properties:te(g(),fn),required:C(g()).optional()}).catchall(se())}),gn=z({type:M("ref/resource"),uri:g()}),_n=z({type:M("ref/prompt"),name:g()}),ei=z({uri:g().startsWith("file://"),name:g().optional(),_meta:te(g(),se()).optional()}),yr=R.shape,ti=z({experimental:yr.experimental,sampling:yr.sampling,elicitation:yr.elicitation,roots:yr.roots,extensions:yr.extensions}),Pt=$.shape,Bn=z({experimental:Pt.experimental,logging:Pt.logging,completions:Pt.completions,prompts:Pt.prompts,resources:Pt.resources,tools:Pt.tools,extensions:Pt.extensions}),Kn=le({progressToken:n.optional(),[lr]:g(),[Po]:_.optional(),[dr]:ti,[Cr]:s.optional()}),vn=z({...d.shape,...S.shape,description:g().optional(),inputSchema:le({$schema:g().optional(),type:M("object")}),outputSchema:le({$schema:g().optional()}).optional(),annotations:q.optional(),_meta:te(g(),se()).optional()}),ri=z({type:M("tool_result"),toolUseId:g(),content:C(I),structuredContent:se().optional(),isError:ne().optional(),_meta:te(g(),se()).optional()}),Gn=ie([Y,ce,Re,pe,ri]),yn=z({role:i,content:ie([Gn,C(Gn)]),_meta:te(g(),se()).optional()}),Hn=g(),Zn=le({[Yt]:_.optional().catch(void 0)}),Jn=Zn.optional();function ut(We){return le({_meta:Jn,resultType:Hn.default("complete"),...We})}let ni=ut({}),Hs=ut({nextCursor:o.optional()}),Xn=ut({content:C(I),structuredContent:se().optional(),isError:ne().optional()}),oi=ut({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),tools:C(vn),nextCursor:o.optional()}),ii=ut({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),prompts:C(O),nextCursor:o.optional()}),si=ut({description:g().optional(),messages:C(L)}),ai=ut({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),resources:C(Ve),nextCursor:o.optional()}),ci=ut({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),resourceTemplates:C(be),nextCursor:o.optional()}),ui=ut({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),contents:C(ie([ue,ke]))}),li=ut({completion:z({values:C(g()).max(100),total:H().int().optional(),hasMore:ne().optional()}).loose()}),Zs=ut({ttlMs:H().int().min(0),cacheScope:ge(["public","private"])}),di=ut({ttlMs:H().int().min(0).catch(0),cacheScope:ge(["public","private"]).catch("private"),supportedVersions:C(g()),capabilities:Bn,instructions:g().optional()}),Sr=z({messages:C(yn),modelPreferences:Te.optional(),systemPrompt:g().optional(),includeContext:ge(["none","thisServer","allServers"]).optional(),temperature:H().optional(),maxTokens:H().int(),stopSequences:C(g()).optional(),metadata:t.optional(),tools:C(vn).optional(),toolChoice:Xe.optional()}),mi=z({method:M("sampling/createMessage"),params:Sr}),pi=z({method:M("roots/list"),params:z({_meta:te(g(),se()).optional()}).optional()}),fi=z({...yn.shape,model:g(),stopReason:g().optional()}),hi=z({roots:C(ei)}),gi=z({action:ge(["accept","decline","cancel"]),content:te(g(),ie([g(),H(),ne(),C(g())])).optional()}),_i=z({mode:M("url"),message:g(),url:g().url()}),vi=ie([hn,_i]),yi=z({method:M("elicitation/create"),params:vi}),Si=ie([mi,pi,yi]),bi=ie([fi,hi,gi]),Ri=te(g(),Si),Ti=te(g(),bi),Sn=ut({inputRequests:Ri.optional(),requestState:g().optional()}),bn={inputResponses:Ti.optional(),requestState:g().optional()},Js=z({_meta:Kn,...bn}),Xs=le({progressToken:n.optional()});function wt(We,Tn){return z({method:M(We),params:z({_meta:Kn,...Tn})})}function Et(We,Tn){return z({method:M(We),params:z({_meta:Xs.optional(),...Tn}).optional()})}let $i={name:g(),arguments:te(g(),se()).optional(),...bn},Dt={cursor:o.optional()},Ws=wt("tools/call",$i),Ys=wt("tools/list",Dt),Qs=wt("prompts/list",Dt),ea=wt("prompts/get",{name:g(),arguments:te(g(),g()).optional(),...bn}),ta=wt("resources/list",Dt),ra=wt("resources/templates/list",Dt),na=wt("resources/read",{uri:g(),...bn}),xi={ref:ie([_n,gn]),argument:z({name:g(),value:g()}),context:z({arguments:te(g(),g()).optional()}).optional()},oa=wt("completion/complete",xi),ia=wt("server/discover",{}),Wn=z({toolsListChanged:ne().optional(),promptsListChanged:ne().optional(),resourcesListChanged:ne().optional(),resourceSubscriptions:C(g()).optional()}),wi={notifications:Wn},sa=wt("subscriptions/listen",wi),aa=Zn.extend({"io.modelcontextprotocol/subscriptionId":r}),ca=le({_meta:aa,resultType:Hn.default("complete")}),br={"tools/call":Et("tools/call",$i),"tools/list":Et("tools/list",Dt),"prompts/get":Et("prompts/get",{name:g(),arguments:te(g(),g()).optional()}),"prompts/list":Et("prompts/list",Dt),"resources/list":Et("resources/list",Dt),"resources/templates/list":Et("resources/templates/list",Dt),"resources/read":Et("resources/read",{uri:g()}),"completion/complete":Et("completion/complete",xi),"server/discover":Et("server/discover",{}),"subscriptions/listen":Et("subscriptions/listen",wi)};function St(We){return le({_meta:Jn,...We})}let ua={"tools/call":St({content:C(I),structuredContent:se().optional(),isError:ne().optional()}),"tools/list":St({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),tools:C(vn),nextCursor:o.optional()}),"prompts/get":St({description:g().optional(),messages:C(L)}),"prompts/list":St({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),prompts:C(O),nextCursor:o.optional()}),"resources/list":St({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),resources:C(Ve),nextCursor:o.optional()}),"resources/templates/list":St({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),resourceTemplates:C(be),nextCursor:o.optional()}),"resources/read":St({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),contents:C(ie([ue,ke]))}),"completion/complete":St({completion:z({values:C(g()).max(100),total:H().int().optional(),hasMore:ne().optional()}).loose()}),"server/discover":St({ttlMs:H().int().min(0).catch(0),cacheScope:ge(["public","private"]).catch("private"),supportedVersions:C(g()),capabilities:Bn,instructions:g().optional()}),"subscriptions/listen":St({})},Rn=le({"io.modelcontextprotocol/subscriptionId":r.optional()}),Yn=z({method:M("notifications/subscriptions/acknowledged"),params:z({_meta:Rn.optional(),notifications:Wn})}),Qn=z({_meta:Rn.optional(),requestId:r,reason:g().optional()}),eo=z({method:M("notifications/cancelled"),params:Qn}),Id={"notifications/cancelled":eo,"notifications/progress":N,"notifications/message":V,"notifications/resources/updated":B,"notifications/resources/list_changed":k,"notifications/tools/list_changed":fe,"notifications/prompts/list_changed":j,"notifications/subscriptions/acknowledged":Yn},bt=We=>z({jsonrpc:M("2.0"),id:ie([g(),H().int()]),result:We}).strict();return {JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:o,RequestIdSchema:r,RoleSchema:i,LoggingLevelSchema:s,TaskMetadataSchema:c,RelatedTaskMetadataSchema:u,RequestMetaSchema:l,BaseRequestParamsSchema:m,TaskAugmentedRequestParamsSchema:h,NotificationsParamsSchema:y,NotificationSchema:b,IconSchema:p,IconsSchema:S,BaseMetadataSchema:d,ImplementationSchema:_,ClientTasksCapabilitySchema:x,ServerTasksCapabilitySchema:T,ClientCapabilitiesSchema:R,ServerCapabilitiesSchema:$,ProgressSchema:E,ProgressNotificationParamsSchema:A,ProgressNotificationSchema:N,LoggingMessageNotificationParamsSchema:F,LoggingMessageNotificationSchema:V,ResourceContentsSchema:K,TextResourceContentsSchema:ue,BlobResourceContentsSchema:ke,AnnotationsSchema:xe,ResourceSchema:Ve,ResourceTemplateSchema:be,ResourceListChangedNotificationSchema:k,ResourceUpdatedNotificationParamsSchema:U,ResourceUpdatedNotificationSchema:B,PromptArgumentSchema:w,PromptSchema:O,PromptListChangedNotificationSchema:j,TextContentSchema:Y,ImageContentSchema:ce,AudioContentSchema:Re,ToolUseContentSchema:pe,EmbeddedResourceSchema:Ee,ResourceLinkSchema:je,ContentBlockSchema:I,PromptMessageSchema:L,ToolAnnotationsSchema:q,ToolListChangedNotificationSchema:fe,ModelHintSchema:he,ModelPreferencesSchema:Te,ToolChoiceSchema:Xe,BooleanSchemaSchema:tt,StringSchemaSchema:ct,NumberSchemaSchema:Ye,UntitledSingleSelectEnumSchemaSchema:Be,TitledSingleSelectEnumSchemaSchema:Nt,LegacyTitledEnumSchemaSchema:nt,SingleSelectEnumSchemaSchema:rr,UntitledMultiSelectEnumSchemaSchema:jt,TitledMultiSelectEnumSchemaSchema:nr,MultiSelectEnumSchemaSchema:_r,EnumSchemaSchema:vr,PrimitiveSchemaDefinitionSchema:fn,ElicitRequestFormParamsSchema:hn,ResourceTemplateReferenceSchema:gn,PromptReferenceSchema:_n,RootSchema:ei,ClientCapabilities2026Schema:ti,ServerCapabilities2026Schema:Bn,RequestMetaEnvelopeSchema:Kn,ToolSchema:vn,ToolResultContentSchema:ri,SamplingMessageContentBlockSchema:Gn,SamplingMessageSchema:yn,ResultTypeSchema:Hn,ResultMetaSchema:Zn,ResultSchema:ni,PaginatedResultSchema:Hs,CallToolResultSchema:Xn,ListToolsResultSchema:oi,ListPromptsResultSchema:ii,GetPromptResultSchema:si,ListResourcesResultSchema:ai,ListResourceTemplatesResultSchema:ci,ReadResourceResultSchema:ui,CompleteResultSchema:li,CacheableResultSchema:Zs,DiscoverResultSchema:di,CreateMessageRequestParamsSchema:Sr,CreateMessageRequestSchema:mi,ListRootsRequestSchema:pi,CreateMessageResultSchema:fi,ListRootsResultSchema:hi,ElicitResultSchema:gi,ElicitRequestURLParamsSchema:_i,ElicitRequestParamsSchema:vi,ElicitRequestSchema:yi,InputRequestSchema:Si,InputResponseSchema:bi,InputRequestsSchema:Ri,InputResponsesSchema:Ti,InputRequiredResultSchema:Sn,InputResponseRequestParamsSchema:Js,CallToolRequestSchema:Ws,ListToolsRequestSchema:Ys,ListPromptsRequestSchema:Qs,GetPromptRequestSchema:ea,ListResourcesRequestSchema:ta,ListResourceTemplatesRequestSchema:ra,ReadResourceRequestSchema:na,CompleteRequestSchema:oa,DiscoverRequestSchema:ia,SubscriptionFilterSchema:Wn,SubscriptionsListenRequestSchema:sa,SubscriptionsListenResultMetaSchema:aa,SubscriptionsListenResultSchema:ca,dispatchRequestSchemas:br,dispatchResultSchemas:ua,NotificationMetaSchema:Rn,SubscriptionsAcknowledgedNotificationSchema:Yn,CancelledNotificationParamsSchema:Qn,CancelledNotificationSchema:eo,notificationSchemas2026:Id,JSONRPCResultResponseSchema:bt(ni),CallToolResultResponseSchema:bt(ie([Xn,Sn])),ListToolsResultResponseSchema:bt(oi),ListPromptsResultResponseSchema:bt(ii),GetPromptResultResponseSchema:bt(ie([si,Sn])),ListResourcesResultResponseSchema:bt(ai),ListResourceTemplatesResultResponseSchema:bt(ci),ReadResourceResultResponseSchema:bt(ie([ui,Sn])),CompleteResultResponseSchema:bt(li),DiscoverResultResponseSchema:bt(di)}}var Nw;function Un(){return Nw??=kw()}var Pw=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"];function Aw(e){return Pw.includes(e)}var Ko=Symbol("modelcontextprotocol.resultCacheHintFallback");function Bl(e,t){if(t===void 0)return e;let n=e[Ko];if(n===void 0)return {...e,[Ko]:t};let o={},r=n.ttlMs??t.ttlMs;r!==void 0&&(o.ttlMs=r);let i=n.cacheScope??t.cacheScope;return i!==void 0&&(o.cacheScope=i),{...e,[Ko]:o}}function Cw(e){return e[Ko]}function p_(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0}function f_(e){return e==="public"||e==="private"}function h_(e,t){if(e.ttlMs!==void 0&&!p_(e.ttlMs))throw new RangeError(`Invalid cache hint for ${t}: ttlMs must be a non-negative safe integer (got ${String(e.ttlMs)})`);if(e.cacheScope!==void 0&&!f_(e.cacheScope))throw new RangeError(`Invalid cache hint for ${t}: cacheScope must be 'public' or 'private' (got ${String(e.cacheScope)})`)}var Q=(function(e){return e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.ResourceNotFound=-32002]="ResourceNotFound",e[e.MissingRequiredClientCapability=-32021]="MissingRequiredClientCapability",e[e.UnsupportedProtocolVersion=-32022]="UnsupportedProtocolVersion",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired",e})({}),de=class Fb extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ProtocolError"});}static[Symbol.hasInstance](t){return Go(this,t)}static isInstance(t){if(typeof this!="function")throw new TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Go(this,t)}constructor(t,n,o){super(n),this.code=t,this.data=o,this.name="ProtocolError",c_(this,new.target);}static fromError(t,n,o){if(t===Q.UrlElicitationRequired&&o){let r=o;if(r.elicitations)return new qb(r.elicitations,n)}if(t===Q.UnsupportedProtocolVersion&&o){let r=o;if(Array.isArray(r.supported)&&typeof r.requested=="string")return new Jo({supported:r.supported,requested:r.requested},n)}if(t===Q.InvalidParams||t===Q.ResourceNotFound){let r=o;if(typeof r?.uri=="string"&&(t===Q.ResourceNotFound||Object.keys(r).length===1))return new Kl(r.uri,n)}if(t===Q.MissingRequiredClientCapability&&o){let r=o;if(r.requiredCapabilities!==null&&typeof r.requiredCapabilities=="object"&&!Array.isArray(r.requiredCapabilities))return new Gl({requiredCapabilities:r.requiredCapabilities},n)}return new Fb(t,n,o)}},Kl=class extends de{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ResourceNotFoundError"});}constructor(e,t=`Resource not found: ${e}`){super(Q.InvalidParams,t,{uri:e});}get uri(){return this.data.uri}},qb=class extends de{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UrlElicitationRequiredError"});}constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(Q.UrlElicitationRequired,t,{elicitations:e});}get elicitations(){return this.data?.elicitations??[]}},Jo=class extends de{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnsupportedProtocolVersionError"});}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(Q.UnsupportedProtocolVersion,t,e);}get supported(){return this.data.supported}get requested(){return this.data.requested}},Gl=class extends de{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.MissingRequiredClientCapabilityError"});}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(", ")}`){super(Q.MissingRequiredClientCapability,t,e);}get requiredCapabilities(){return this.data.requiredCapabilities}},Mw=0,jw="private",Dw=["tools/call","prompts/get","resources/read"];function Uw(e,t){let n=t.resultType;if(n===void 0)return {...t,resultType:"complete"};if(n==="complete"||Dw.includes(e))return t;throw new de(Q.InternalError,`Handler for ${e} returned resultType '${String(n)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function Lw(e,t){let n=Cw(t);if(t.resultType!=="complete"||!Aw(e))return n===void 0?t:Kw(t);let o=t,r=p_(o.ttlMs)?o.ttlMs:Vw(n),i=f_(o.cacheScope)?o.cacheScope:Bw(n),s={...o,ttlMs:r,cacheScope:i};return delete s[Ko],s}function Fw(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function qw(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[Yt]:t}}:!Fw(n)||n[Yt]!==void 0?e:{...e,_meta:{...n,[Yt]:t}}}function Vw(e){return e!==void 0&&p_(e.ttlMs)?e.ttlMs:Mw}function Bw(e){return e!==void 0&&f_(e.cacheScope)?e.cacheScope:jw}function Kw(e){let t={...e};return delete t[Ko],t}var Gw=["elicitation/create","sampling/createMessage","roots/list"],Dl;function Vb(){if(Dl)return Dl;let e=Un();return Dl={request:{"elicitation/create":z({method:M("elicitation/create"),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":z({method:M("sampling/createMessage"),params:e.CreateMessageRequestParamsSchema}),"roots/list":z({method:M("roots/list"),params:le({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},Dl}function Bb(e){return Gw.includes(e)}function t_(e){return Bb(e)?Vb().request[e]:void 0}function Hw(e){return Bb(e)?Vb().response[e]:void 0}var g_={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},Kb={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function Gb(e){return Object.prototype.hasOwnProperty.call(g_,e)}function Hb(e){return Object.prototype.hasOwnProperty.call(Kb,e)}function Zw(e){return Object.prototype.hasOwnProperty.call(g_,e)}function Jw(e){return Gb(e)?Un().dispatchRequestSchemas[e]:void 0}function Xw(e){return Zw(e)?Un().dispatchResultSchemas[e]:void 0}function Ww(e){return Hb(e)?Un().notificationSchemas2026[e]:void 0}function As(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Ns(e,t){if(e===void 0)return {ok:false,reason:"not-in-era"};let n=e.safeParse(t);return n.success?{ok:true,value:n.data}:{ok:false,reason:"invalid",message:String(n.error)}}var Yw={ok:false,reason:"not-in-era"},Qw=[lr,dr];function eE(e,t){let n=t,o=false,r=()=>(o||(n={...n},o=true),n),i=t.tools;e==="tools/list"&&Array.isArray(i)&&i.some(a=>As(a)&&"execution"in a)&&(r().tools=i.map(a=>{if(!As(a)||!("execution"in a))return a;let c={...a};return delete c.execution,c}));let s=t.capabilities;if(As(s)&&"tasks"in s){let a={...s};delete a.tasks,r().capabilities=a;}return n}var __={era:"2026-07-28",hasRequestMethod:Gb,hasNotificationMethod:Hb,hasInputRequestMethod:e=>t_(e)!==void 0,validateRequest:(e,t)=>Ns(Jw(e),t),validateResult:(e,t)=>Ns(Xw(e),t),validateNotification:(e,t)=>Ns(Ww(e),t),validateInputRequest:(e,t)=>Ns(t_(e),t),validateInputResponse:(e,t)=>Ns(Hw(e),t),samplingResultVariant:()=>Yw,outboundEnvelope(e){return {[lr]:e.protocolVersion,[Po]:e.clientInfo,[dr]:e.clientCapabilities,...e.logLevel!==void 0&&{[Cr]:e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let o of Qw)o in e||t.push({key:o,problem:"missing"});let n=Un().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let o of n.error.issues){let r=o.path.map(String),i=r.length>0?r.join("."):"_meta";r.length===1&&t.some(s=>s.key===i&&s.problem==="missing")||t.push({key:i,problem:o.message});}return t},projectCallToolResult:e=>Pb(e),inputRequestSchema:t_,decodeResult(e,t){if(!As(t))return {kind:"invalid",error:new ye(Ie.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return {kind:"invalid",error:new ye(Ie.InvalidResult,`Invalid result for ${e}: missing required resultType \u2014 servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:"missing-resultType"})};if(typeof n!="string")return {kind:"invalid",error:new ye(Ie.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n==="input_required"){let s=t.inputRequests,a=As(s)?s:{},c=t.requestState;return Object.keys(a).length===0&&typeof c!="string"?{kind:"invalid",error:new ye(Ie.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:"input-required-missing-both"})}:{kind:"input_required",inputRequests:a,...typeof c=="string"&&{requestState:c}}}if(n!=="complete")return {kind:"invalid",error:new ye(Ie.UnsupportedResultType,`Unsupported result type '${n}' for ${e}`,{resultType:n,method:e})};let o=tE(),r=Object.hasOwn(o,e)?o[e]:void 0;if(r!==void 0){let s=r.safeParse(t);if(!s.success)return {kind:"invalid",error:new ye(Ie.InvalidResult,`Invalid result for ${e}: ${s.error}`,{method:e})}}let i={...t};return delete i.resultType,{kind:"complete",result:i}},encodeResult(e,t,n){return qw(Lw(e,Uw(e,eE(e,t))),n)},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return "Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)";let t=Un().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return `Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(n=>n.message).join("; ")}`}},Ul;function tE(){if(Ul)return Ul;let e=Un();return Ul={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},Ul}var Ds="2026-07-28";function Vr(e){return e!==void 0&&Zo(e)?__:m_}function bb(e){return e.revision!==void 0?Vr(e.revision).era:e.era==="modern"?__.era:m_.era}function r_(e){return Zb.some(t=>t.hasRequestMethod(e))}function n_(e){return Zb.some(t=>t.hasNotificationMethod(e))}var Zb=[m_,__];function Rb(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Ln(e){if(!Rb(e))return;let t=e._meta;return Rb(t)?t:void 0}function Hl(e){let t=Ln(e);return t!==void 0&&lr in t}function Zl(e){let t=Ln(e)?.[lr];return typeof t=="string"?t:void 0}function Jl(e){return Vr(Ds).validateEnvelopeMeta(e)}var rE=fv({AnnotationsSchema:()=>mr,AudioContentSchema:()=>Lo,BaseMetadataSchema:()=>ur,BaseRequestParamsSchema:()=>it,BlobResourceContentsSchema:()=>Ss,BooleanSchemaSchema:()=>xs,CallToolRequestParamsSchema:()=>Ju,CallToolRequestSchema:()=>Xu,CallToolResultSchema:()=>$s,CancelTaskRequestSchema:()=>Ug,CancelTaskResultSchema:()=>Lg,CancelledNotificationParamsSchema:()=>Yc,CancelledNotificationSchema:()=>fs,ClientCapabilitiesSchema:()=>ru,ClientNotificationSchema:()=>qg,ClientRequestSchema:()=>Fg,ClientResultSchema:()=>Vg,ClientTasksCapabilitySchema:()=>eu,CompatibilityCallToolResultSchema:()=>Ig,CompleteRequestParamsSchema:()=>Tl,CompleteRequestSchema:()=>$l,CompleteResultSchema:()=>xl,ContentBlockSchema:()=>Fo,CreateMessageRequestParamsSchema:()=>cl,CreateMessageRequestSchema:()=>ul,CreateMessageResultSchema:()=>ll,CreateMessageResultWithToolsSchema:()=>dl,CreateTaskResultSchema:()=>kg,CursorSchema:()=>as,DiscoverRequestSchema:()=>au,DiscoverResultSchema:()=>cu,ElicitRequestFormParamsSchema:()=>Bo,ElicitRequestParamsSchema:()=>gl,ElicitRequestSchema:()=>_l,ElicitRequestURLParamsSchema:()=>hl,ElicitResultSchema:()=>Sl,ElicitationCompleteNotificationParamsSchema:()=>vl,ElicitationCompleteNotificationSchema:()=>yl,EmbeddedResourceSchema:()=>Lu,EmptyResultSchema:()=>ps,EnumSchemaSchema:()=>fl,GetPromptRequestParamsSchema:()=>ju,GetPromptRequestSchema:()=>Du,GetPromptResultSchema:()=>Vu,GetTaskPayloadRequestSchema:()=>Cg,GetTaskPayloadResultSchema:()=>Mg,GetTaskRequestSchema:()=>Pg,GetTaskResultSchema:()=>Ag,IconSchema:()=>Qc,IconsSchema:()=>jr,ImageContentSchema:()=>Uo,ImplementationSchema:()=>Mo,InitializeRequestParamsSchema:()=>nu,InitializeRequestSchema:()=>ou,InitializeResultSchema:()=>iu,InitializedNotificationSchema:()=>su,JSONArraySchema:()=>xg,JSONObjectSchema:()=>Ge,JSONRPCErrorResponseSchema:()=>Co,JSONRPCMessageSchema:()=>ms,JSONRPCNotificationSchema:()=>ds,JSONRPCRequestSchema:()=>ls,JSONRPCResponseSchema:()=>wg,JSONRPCResultResponseSchema:()=>Ao,JSONValueSchema:()=>Ar,LegacyTitledEnumSchemaSchema:()=>Is,ListChangedOptionsBaseSchema:()=>zg,ListPromptsRequestSchema:()=>Cu,ListPromptsResultSchema:()=>Mu,ListResourceTemplatesRequestSchema:()=>hu,ListResourceTemplatesResultSchema:()=>gu,ListResourcesRequestSchema:()=>pu,ListResourcesResultSchema:()=>fu,ListRootsRequestSchema:()=>El,ListRootsResultSchema:()=>Il,ListTasksRequestSchema:()=>jg,ListTasksResultSchema:()=>Dg,ListToolsRequestSchema:()=>Hu,ListToolsResultSchema:()=>Zu,LoggingLevelSchema:()=>Fr,LoggingMessageNotificationParamsSchema:()=>el,LoggingMessageNotificationSchema:()=>tl,ModelHintSchema:()=>rl,ModelPreferencesSchema:()=>nl,MultiSelectEnumSchemaSchema:()=>pl,NotificationSchema:()=>pt,NotificationsParamsSchema:()=>mt,NumberSchemaSchema:()=>Vo,PaginatedRequestParamsSchema:()=>du,PaginatedRequestSchema:()=>Dr,PaginatedResultSchema:()=>Ur,PingRequestSchema:()=>gs,PrimitiveSchemaDefinitionSchema:()=>ks,ProgressNotificationParamsSchema:()=>lu,ProgressNotificationSchema:()=>_s,ProgressSchema:()=>uu,ProgressTokenSchema:()=>ss,PromptArgumentSchema:()=>Pu,PromptListChangedNotificationSchema:()=>Bu,PromptMessageSchema:()=>qu,PromptReferenceSchema:()=>Rl,PromptSchema:()=>Au,ReadResourceRequestParamsSchema:()=>_u,ReadResourceRequestSchema:()=>vu,ReadResourceResultSchema:()=>yu,RelatedTaskMetadataSchema:()=>Wc,RequestIdSchema:()=>Mr,RequestMetaSchema:()=>cs,RequestSchema:()=>He,ResourceContentsSchema:()=>vs,ResourceLinkSchema:()=>Fu,ResourceListChangedNotificationSchema:()=>Su,ResourceRequestParamsSchema:()=>jo,ResourceSchema:()=>bs,ResourceTemplateReferenceSchema:()=>bl,ResourceTemplateSchema:()=>mu,ResourceUpdatedNotificationParamsSchema:()=>ku,ResourceUpdatedNotificationSchema:()=>Nu,ResultMetaObjectSchema:()=>us,ResultSchema:()=>Ze,RoleSchema:()=>Lr,RootSchema:()=>wl,RootsListChangedNotificationSchema:()=>zl,SamplingContentSchema:()=>sl,SamplingMessageContentBlockSchema:()=>Pn,SamplingMessageSchema:()=>al,ServerCapabilitiesSchema:()=>hs,ServerNotificationSchema:()=>Kg,ServerRequestSchema:()=>Bg,ServerResultSchema:()=>Gg,ServerTasksCapabilitySchema:()=>tu,SetLevelRequestParamsSchema:()=>Yu,SetLevelRequestSchema:()=>Qu,SingleSelectEnumSchemaSchema:()=>ml,StringSchemaSchema:()=>qo,SubscribeRequestParamsSchema:()=>bu,SubscribeRequestSchema:()=>Ru,SubscriptionFilterSchema:()=>Rs,SubscriptionsAcknowledgedNotificationParamsSchema:()=>Eu,SubscriptionsAcknowledgedNotificationSchema:()=>Iu,SubscriptionsListenRequestParamsSchema:()=>xu,SubscriptionsListenRequestSchema:()=>wu,SubscriptionsListenResultMetaSchema:()=>zu,SubscriptionsListenResultSchema:()=>Ou,TaskAugmentedRequestParamsSchema:()=>jn,TaskCreationParamsSchema:()=>Og,TaskMetadataSchema:()=>Xc,TaskSchema:()=>qr,TaskStatusNotificationParamsSchema:()=>kl,TaskStatusNotificationSchema:()=>Ng,TaskStatusSchema:()=>Ol,TextContentSchema:()=>Do,TextResourceContentsSchema:()=>ys,TitledMultiSelectEnumSchemaSchema:()=>Os,TitledSingleSelectEnumSchemaSchema:()=>Es,ToolAnnotationsSchema:()=>Ku,ToolChoiceSchema:()=>ol,ToolExecutionSchema:()=>Gu,ToolListChangedNotificationSchema:()=>Wu,ToolResultContentSchema:()=>il,ToolSchema:()=>Ts,ToolUseContentSchema:()=>Uu,UnsubscribeRequestParamsSchema:()=>Tu,UnsubscribeRequestSchema:()=>$u,UntitledMultiSelectEnumSchemaSchema:()=>zs,UntitledSingleSelectEnumSchemaSchema:()=>ws});var Ct=e=>ls.safeParse(e).success,Kr=e=>ds.safeParse(e).success,Ms=e=>Ao.safeParse(e).success,Xl=e=>Co.safeParse(e).success;var pr=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)&&e.resultType==="input_required";function v_(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function y_(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var Tb="x-mcp-header",nE=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,oE=new Set(["string","integer","boolean","number"]);function S_(e){let t=[],n=new Map,o=(i,s,a)=>{if(i===null||typeof i!="object")return;let c=i;if(Tb in c){if(!a||s.length===0)return `${Ll(s)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let l=c[Tb];if(typeof l!="string"||l.length===0)return `${Ll(s)}: x-mcp-header MUST be a non-empty string`;if(!nE.test(l))return `${Ll(s)}: x-mcp-header '${l}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let m=typeof c.type=="string"?c.type:void 0;if(m===void 0||!oE.has(m))return `${Ll(s)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${m??"<none>"}`;let h=l.toLowerCase(),y=n.get(h);if(y!==void 0)return `x-mcp-header '${l}' is not case-insensitively unique (also declared as '${y}')`;n.set(h,l),t.push({path:s,headerName:l,type:m});}let u=c.properties;if(u!==null&&typeof u=="object")for(let[l,m]of Object.entries(u)){let h=o(m,[...s,l],a);if(h!==void 0)return h}for(let l of iE){let m=c[l];if(m===void 0)continue;let h=Array.isArray(m)?m:m!==null&&typeof m=="object"&&sE.has(l)?Object.values(m):[m];for(let y of h){let b=o(y,[...s,`<${l}>`],false);if(b!==void 0)return b}}},r=o(e,[],true);return r===void 0?{valid:true,declarations:t}:{valid:false,reason:r}}var iE=["items","prefixItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","patternProperties","dependentSchemas","oneOf","anyOf","allOf","not","if","then","else","$defs","definitions"],sE=new Set(["patternProperties","dependentSchemas","$defs","definitions"]);function Ll(e){return e.length===0?"<root>":e.join(".")}var ql=-32020;[{rung:"http-method",order:1,evaluatedAt:"edge",codes:[-32e3],conformance:[],rationale:"The modern era is POST-only; GET/DELETE are body-less 2025-era session operations and are method-routed to legacy serving (405 when legacy serving is not configured), before any body is read."},{rung:"jsonrpc-shape",order:2,evaluatedAt:"edge",codes:[Q.InvalidRequest],conformance:["server-stateless"],rationale:"The body must be a JSON-RPC request or notification: posted responses and batch arrays containing a modern or invalid element are rejected before classification (element-wise batch rule); all-legacy arrays stay legacy traffic."},{rung:"era-classification",order:3,evaluatedAt:"edge",codes:[ql,Q.UnsupportedProtocolVersion],conformance:["server-stateless","http-header-validation","http-custom-header-server-validation"],rationale:"Body-primary era classification with the protocol-version header as a cross-check; a header/body disagreement is rejected with -32020 (HeaderMismatch), and an envelope-less request on a modern-only endpoint is answered with the unsupported-protocol-version error naming the supported revisions."},{rung:"envelope",order:4,evaluatedAt:"edge",codes:[Q.InvalidParams],conformance:["server-stateless"],rationale:"A present envelope claim with a malformed envelope \u2014 and a missing envelope on a request whose protocol-version header names a modern revision \u2014 is an invalid-params rejection naming the offending or missing key(s); never a silent fall back to legacy handling. This is the only place an invalid-params rejection maps to HTTP 400."},{rung:"method-registry",order:5,evaluatedAt:"dispatch",codes:[Q.MethodNotFound],conformance:["server-stateless"],rationale:"Method existence outranks parameter validity: a method absent from the negotiated revision\u2019s registry (or with no handler installed) answers method-not-found before params or capabilities are looked at."},{rung:"request-params",order:6,evaluatedAt:"dispatch",codes:[Q.InvalidParams],conformance:[],rationale:"Per-method params validation; emitted in-band by the dispatch layer (HTTP 200), never via the ladder status table."},{rung:"standard-header-validation",order:7,evaluatedAt:"pre-dispatch",codes:[ql],conformance:["http-header-validation"],rationale:"SEP-2243 standard `Mcp-Method` / `Mcp-Name` headers \u2014 presence, sentinel decoding, and `Mcp-Name` \u2194 body cross-check \u2014 are validated by the HTTP entry on a modern-classified request after the supported-revision gate and before dispatch. The classifier\u2019s own header-mismatch cells (protocol-version, `Mcp-Method` mismatch) stay on the edge `era-classification` rung; this rung carries the entry-layer presence/`Mcp-Name` half. Evaluated before the capability gate, the factory call, and the `Mcp-Param-*` rung so a request that fails several rungs is answered by the standard-header rung first. The documented order (after method-registry 5 and request-params 6) is NOT the observed precedence: serveModern evaluates this rung immediately after the supported-revision gate, so a request that also fails a dispatch rung is answered here before the dispatch rungs (5\u20136) are consulted."},{rung:"client-capabilities",order:8,evaluatedAt:"pre-dispatch",codes:[Q.MissingRequiredClientCapability],conformance:["server-stateless"],rationale:"The capability requirement is checked by the HTTP entry, pre-dispatch, against the validated envelope the classifier produced \u2014 pinning the spec-mandated HTTP 400 independently of how dispatch- and handler-produced errors are mapped. The documented order (after method resolution and params validation) is preserved observably only while the requirement table is empty: once a served method gains a requirement entry, a request that is missing the capability and would also fail a dispatch rung is answered by this gate first, so the entry must consult the method registry before the gate if the documented precedence is to stay observable."},{rung:"param-header-validation",order:9,evaluatedAt:"pre-dispatch",codes:[ql],conformance:["http-custom-header-server-validation"],rationale:"SEP-2243 `Mcp-Param-*` headers are validated against the named tool\u2019s `x-mcp-header` declarations and the body `arguments` after the tool registry is known and before dispatch reaches the handler; a missing/disagreeing/malformed header is rejected 400 / -32020 with the same shape as the standard-header cross-checks. The documented order (after method resolution and params validation) is preserved observably only when the body `arguments` would otherwise validate: the check runs pre-dispatch, so a `tools/call` that fails BOTH this rung and a dispatch-time rung (e.g. order-6 `request-params`, -32602) is answered by this gate first with 400 / -32020, not by the earlier-ordered rung."}];({[Q.ParseError]:400,[Q.InvalidRequest]:400,[Q.MethodNotFound]:404,[Q.UnsupportedProtocolVersion]:400,[Q.MissingRequiredClientCapability]:400});function Fl(e,t,n,o,r){return {kind:"reject",rung:e,cell:t,httpStatus:n,code:o.code,message:o.message,...o.data!==void 0&&{data:o.data},settled:r}}function b_(e){if(!Hl(e))return false;let t=Zl(e);if(t===void 0||!Zo(t))return false;let n=Ln(e);return n!==void 0&&Jl(n).length===0}function R_(e,t){switch(e.reason){case "http-method":return Fl("http-method","modern-only-method-not-allowed",405,new de(-32e3,"Method not allowed."),true);case "batch":return Fl("jsonrpc-shape","modern-only-batch-not-supported",400,new de(Q.InvalidRequest,"Bad Request: JSON-RPC batches are not supported by this endpoint"),true);case "response":return Fl("jsonrpc-shape","modern-only-response-post",400,new de(Q.InvalidRequest,"Bad Request: JSON-RPC responses cannot be posted to this endpoint"),true);case "notification":return;case "initialize":case "no-claim":{let n=e.requestedVersion;return Fl("era-classification","modern-only-missing-envelope",400,n===void 0?new de(Q.UnsupportedProtocolVersion,"Unsupported protocol version: the request did not name a protocol version",{supported:[...t]}):new Jo({supported:[...t],requested:n}),true)}}}function Wl(e,t){return Zi(e,t)}function Ps(e){return new Set(e.flatMap(t=>Object.keys(t.shape)))}function Ho(e){if(e==null)return false;let t=typeof e;return t!=="object"&&t!=="function"||!("~standard"in e)?false:typeof e["~standard"]?.validate=="function"}var $b=false,s_="draft-2020-12";function Gr(e,t="input"){let n=e["~standard"],o;if(n.jsonSchema)o=n.jsonSchema[t]({target:s_});else if(n.vendor==="zod"){if(!("_zod"in e))throw new Error("Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().");$b||($b=true,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),o=kn(e,{target:s_,io:t});}else throw new Error(`Schema library "${n.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t==="output")return o.type!==void 0?o:Jb(o)?{type:"object",...o}:o;if(o.type!==void 0&&o.type!=="object")throw new Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(o.type)}). Wrap your schema in z.object({...}) or equivalent.`);return {type:"object",...o}}function Jb(e){if("properties"in e||"patternProperties"in e||"additionalProperties"in e||"required"in e)return true;for(let t of ["oneOf","anyOf","allOf"]){let n=e[t];if(Array.isArray(n)&&n.length>0)return n.every(o=>o!==null&&typeof o=="object"&&(o.type==="object"||Jb(o)))}return false}function cE(e){return e.path?.length?`${e.path.map(t=>String(typeof t=="object"?t.key:t)).join(".")}: ${e.message}`:e.message}async function Dn(e,t){let n=await e["~standard"].validate(t);return n.issues&&n.issues.length>0?{success:false,error:n.issues.map(o=>cE(o)).join(", ")}:{success:true,data:n.value}}function uE(e){let t=kn(e,{target:s_,io:"input"});return typeof t.pattern=="string"?t.pattern:void 0}var lE=/\\\.\\d\{(\d+)\}/;function dE(e){let t=lE.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[false,true].flatMap(o=>[false,true].flatMap(r=>n.map(i=>Ot.datetime({local:o,offset:r,precision:i}))))}function mE(e,t){let n;switch(e){case "email":n=[wc()];break;case "uri":n=[Io()];break;case "date":n=[Ot.date()];break;case "date-time":n=dE(t);break}return new Set(n.map(o=>uE(o)).filter(o=>o!==void 0))}function pE(e,t,n){return n!=="zod"?true:mE(e,t).has(t)}function Xb(e){let t=Gr(e,"input"),n=t.properties||{},o=t.required||[];return Object.entries(n).map(([r,i])=>({name:r,description:i?.description,required:o.includes(r)}))}function js(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function fE(e){try{return Gr(e,"input")}catch(t){let n=t instanceof Error?t.message:String(t);throw new de(Q.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${n}`)}}var hE=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);function T_(e){return hE.has(e)||e.startsWith("x-")}var gE=new Set(["$schema",...Object.keys(Bo.shape.requestedSchema.shape)]),xb={string:Ps([qo,ws,Es,Is]),number:Ps([Vo]),integer:Ps([Vo]),boolean:Ps([xs]),array:Ps([zs,Os])},_E=new Set(qo.shape.format.unwrap().options);function vE(e,t,n,o){if(!js(e))return e;let r=typeof e.type=="string"&&Object.hasOwn(xb,e.type)?xb[e.type]:void 0;if(r===void 0)return e;let i={};for(let[s,a]of Object.entries(e))r.has(s)||T_(s)?i[s]=a:s==="pattern"&&e.type==="string"&&typeof e.format=="string"?_E.has(e.format)?(typeof a!="string"||!pE(e.format,a,n))&&o.push(`${t}.${s}`):i[s]=a:o.push(`${t}.${s}`);return i}function yE(e,t){let n={},o=[];for(let[r,i]of Object.entries(e))r==="properties"&&js(i)?n[r]=Object.fromEntries(Object.entries(i).map(([s,a])=>[s,vE(a,`properties.${s}`,t,o)])):gE.has(r)?n[r]=i:T_(r)||o.push(r);if(o.length>0)throw new de(Q.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${o.join(", ")}`);return n}function SE(e,t){if(!js(e.properties))return t;let n=Object.entries(e.properties).filter(([,o])=>!Wl(ks,o).success).map(([o])=>`properties.${o}`);return n.length>0?n.join(", "):t}function a_(e,t,n=""){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((o,r)=>a_(o,t[r],`${n}[${r}]`)):!js(e)||!js(t)?[]:Object.entries(e).flatMap(([o,r])=>{let i=n?`${n}.${o}`:o;return Object.prototype.hasOwnProperty.call(t,o)?a_(r,t[o],i):T_(o)?[]:[i]})}function bE(e){if(!Ho(e.requestedSchema))return {...e,mode:"form",requestedSchema:e.requestedSchema};let t=e.requestedSchema["~standard"].vendor,n=yE(fE(e.requestedSchema),t),o=Wl(Bo.shape.requestedSchema,n);if(!o.success)throw new de(Q.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${SE(n,o.error.message)}`);let r=a_(n,o.data);if(r.length>0)throw new de(Q.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(", ")}`);let i=(o.data.required??[]).filter(s=>!Object.prototype.hasOwnProperty.call(o.data.properties,s));if(i.length>0)throw new de(Q.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${i.join(", ")}`);return {...e,mode:"form",requestedSchema:o.data}}function RE(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState=="string";if(!t&&!n)throw new TypeError("inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)");return {resultType:"input_required",...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}Object.assign(RE,{elicit(e){try{return {method:"elicitation/create",params:bE(e)}}catch(t){throw t instanceof de?new TypeError(t.message,{cause:t}):t}},elicitUrl(e){return {method:"elicitation/create",params:{...e,mode:"url"}}},createMessage(e){return {method:"sampling/createMessage",params:e}},listRoots(){return {method:"roots/list"}}});var Wb=250;function Yb(e,t){return `Multi-round-trip request '${e}' still required input after ${t} rounds (inputRequired.maxRounds)`}function Qb(e,t){return new Promise((n,o)=>{if(t?.aborted){o(t.reason instanceof ye?t.reason:new ye(Ie.RequestTimeout,String(t.reason)));return}let r=setTimeout(()=>{t?.removeEventListener("abort",i),n();},e),i=()=>{clearTimeout(r),o(t?.reason instanceof ye?t.reason:new ye(Ie.RequestTimeout,String(t?.reason)));};t?.addEventListener("abort",i,{once:true});})}function eR(e){let t=new AbortController,n=()=>t.abort(e?.reason);return e?.addEventListener("abort",n,{once:true}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:o=>t.abort(o),dispose:()=>e?.removeEventListener("abort",n)}}var $E=["AnnotationsSchema","AudioContentSchema","BaseMetadataSchema","BlobResourceContentsSchema","BooleanSchemaSchema","CallToolRequestSchema","CallToolRequestParamsSchema","CallToolResultSchema","CancelledNotificationSchema","CancelledNotificationParamsSchema","CancelTaskRequestSchema","CancelTaskResultSchema","ClientCapabilitiesSchema","ClientNotificationSchema","ClientRequestSchema","ClientResultSchema","CompatibilityCallToolResultSchema","CompleteRequestSchema","CompleteRequestParamsSchema","CompleteResultSchema","ContentBlockSchema","CreateMessageRequestSchema","CreateMessageRequestParamsSchema","CreateMessageResultSchema","CreateMessageResultWithToolsSchema","CreateTaskResultSchema","CursorSchema","DiscoverRequestSchema","DiscoverResultSchema","ElicitationCompleteNotificationSchema","ElicitationCompleteNotificationParamsSchema","ElicitRequestSchema","ElicitRequestFormParamsSchema","ElicitRequestParamsSchema","ElicitRequestURLParamsSchema","ElicitResultSchema","EmbeddedResourceSchema","EmptyResultSchema","EnumSchemaSchema","GetPromptRequestSchema","GetPromptRequestParamsSchema","GetPromptResultSchema","GetTaskPayloadRequestSchema","GetTaskPayloadResultSchema","GetTaskRequestSchema","GetTaskResultSchema","IconSchema","IconsSchema","ImageContentSchema","ImplementationSchema","InitializedNotificationSchema","InitializeRequestSchema","InitializeRequestParamsSchema","InitializeResultSchema","JSONArraySchema","JSONObjectSchema","JSONRPCErrorResponseSchema","JSONRPCMessageSchema","JSONRPCNotificationSchema","JSONRPCRequestSchema","JSONRPCResponseSchema","JSONRPCResultResponseSchema","JSONValueSchema","LegacyTitledEnumSchemaSchema","ListPromptsRequestSchema","ListPromptsResultSchema","ListResourcesRequestSchema","ListResourcesResultSchema","ListResourceTemplatesRequestSchema","ListResourceTemplatesResultSchema","ListRootsRequestSchema","ListRootsResultSchema","ListTasksRequestSchema","ListTasksResultSchema","ListToolsRequestSchema","ListToolsResultSchema","LoggingLevelSchema","LoggingMessageNotificationSchema","LoggingMessageNotificationParamsSchema","ModelHintSchema","ModelPreferencesSchema","MultiSelectEnumSchemaSchema","NotificationSchema","NumberSchemaSchema","PaginatedRequestSchema","PaginatedRequestParamsSchema","PaginatedResultSchema","PingRequestSchema","PrimitiveSchemaDefinitionSchema","ProgressSchema","ProgressNotificationSchema","ProgressNotificationParamsSchema","ProgressTokenSchema","PromptSchema","PromptArgumentSchema","PromptListChangedNotificationSchema","PromptMessageSchema","PromptReferenceSchema","ReadResourceRequestSchema","ReadResourceRequestParamsSchema","ReadResourceResultSchema","RelatedTaskMetadataSchema","RequestSchema","RequestIdSchema","RequestMetaSchema","ResourceSchema","ResourceContentsSchema","ResourceLinkSchema","ResourceListChangedNotificationSchema","ResourceRequestParamsSchema","ResourceTemplateSchema","ResourceTemplateReferenceSchema","ResourceUpdatedNotificationSchema","ResourceUpdatedNotificationParamsSchema","ResultMetaObjectSchema","ResultSchema","RoleSchema","RootSchema","RootsListChangedNotificationSchema","SamplingContentSchema","SamplingMessageSchema","SamplingMessageContentBlockSchema","ServerCapabilitiesSchema","ServerNotificationSchema","ServerRequestSchema","ServerResultSchema","SetLevelRequestSchema","SetLevelRequestParamsSchema","SingleSelectEnumSchemaSchema","StringSchemaSchema","SubscribeRequestSchema","SubscribeRequestParamsSchema","SubscriptionFilterSchema","SubscriptionsAcknowledgedNotificationSchema","SubscriptionsAcknowledgedNotificationParamsSchema","SubscriptionsListenRequestSchema","SubscriptionsListenRequestParamsSchema","SubscriptionsListenResultSchema","SubscriptionsListenResultMetaSchema","TaskAugmentedRequestParamsSchema","TaskCreationParamsSchema","TaskMetadataSchema","TaskSchema","TaskStatusSchema","TaskStatusNotificationSchema","TaskStatusNotificationParamsSchema","TextContentSchema","TextResourceContentsSchema","TitledMultiSelectEnumSchemaSchema","TitledSingleSelectEnumSchemaSchema","ToolSchema","ToolAnnotationsSchema","ToolChoiceSchema","ToolExecutionSchema","ToolListChangedNotificationSchema","ToolResultContentSchema","ToolUseContentSchema","UnsubscribeRequestSchema","UnsubscribeRequestParamsSchema","UntitledMultiSelectEnumSchemaSchema","UntitledSingleSelectEnumSchemaSchema"],xE={IdJagTokenExchangeResponseSchema:Xg,OAuthClientInformationFullSchema:Yg,OAuthClientInformationSchema:Cl,OAuthClientMetadataSchema:Al,OAuthClientRegistrationErrorSchema:Qg,OAuthErrorResponseSchema:Wg,OAuthMetadataSchema:Nl,OAuthProtectedResourceMetadataSchema:Hg,OAuthTokenRevocationRequestSchema:e_,OAuthTokensSchema:Jg,OpenIdProviderDiscoveryMetadataSchema:Zg,OpenIdProviderMetadataSchema:Pl},tR={},rR={};function nR(e,t){let n=e.slice(0,-6);tR[n]=t,rR[n]=o=>t.safeParse(o).success;}for(let e of $E)nR(e,rE[e]);for(let[e,t]of Object.entries(xE))nR(e,t);Object.freeze(tR);Object.freeze(rR);function IE(e){switch(e){case "initialize":case "notifications/initialized":return Vr(void 0);case "server/discover":return Vr(Ds);default:return}}var oR=6e4,zE=[lr,Po,dr,Cr],OE=["inputResponses","requestState"];function wb(e,t){let n=e.params;if(!Cs(n))return {message:e,lifted:{}};let o=n._meta,r=Cs(o)?zE.filter(c=>c in o):[],i=t==="request"?OE.filter(c=>c in n):[];if(r.length===0&&i.length===0)return {message:e,lifted:{}};let s={},a={...n};if(r.length>0&&Cs(o)){let c={},u={...o};for(let l of r)c[l]=o[l],delete u[l];s.envelope=c,Object.keys(u).length>0?a._meta=u:delete a._meta;}for(let c of i)c==="inputResponses"&&(s.inputResponses=a[c]),c==="requestState"&&(s.requestState=a[c]),delete a[c];return {message:{...e,params:a},lifted:s}}function Eb(e,t){let n=e.validateResult(t,void 0);if(!(!n.ok&&n.reason==="not-in-era"))return {"~standard":{version:1,vendor:"mcp-wire-codec",validate(o){let r=e.validateResult(t,o);return r.ok?{value:r.value}:{issues:[{message:r.reason==="invalid"?r.message:`not-in-era: ${t}`}]}}}}}function Us(e){return ()=>e}var kE=Us(void 0);function $_(e,t){return {...e,mcpReq:{...e.mcpReq,requestState:Us(t)}}}var iR;function x_(e,t){iR(e,t);}var w_=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;static{iR=(e,t)=>{e._negotiatedProtocolVersion=t;};}_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??Zc,this.setNotificationHandler("notifications/cancelled",t=>{this._oncancel(t);}),this.setNotificationHandler("notifications/progress",t=>{this._onprogress(t);}),this.setRequestHandler("ping",t=>({}));}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let n=e.params??{};return {...e,params:{...n,_meta:{...t,...n._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new ye(Ie.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason);}_setupTimeout(e,t,n,o,r=false){this._timeoutInfo.set(e,{timeoutId:setTimeout(o,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:r,onTimeout:o});}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return false;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new ye(Ie.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),true}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e));}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.();}finally{this._onclose();}};let n=this.transport?.onerror;this._transport.onerror=r=>{n?.(r),this._onerror(r);};let o=this._transport?.onmessage;this._transport.onmessage=(r,i)=>{o?.(r,i),Ms(r)||Xl(r)?this._onresponse(r):Ct(r)?this._onrequest(r,i):Kr(r)?this._onnotification(r,i):this._onerror(new Error(`Unknown message type: ${JSON.stringify(r)}`));},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start();}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let o of this._timeoutInfo.values())clearTimeout(o.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new ye(Ie.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.();}finally{for(let o of e.values())o(n);for(let o of t.values())o.abort(n);}}_onerror(e){this.onerror?.(e);}_onnotification(e,t){let{message:n}=wb(e,"notification"),o=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)==="drop")return;if(t?.classification!==void 0){let s=bb(t.classification);if(s!==o.era){this._onerror(new Error(`Era mismatch on inbound notification '${n.method}': classified as ${s} but this instance serves ${o.era}`));return}}if(n_(n.method)&&!o.hasNotificationMethod(n.method))return;let r=this._notificationHandlers.get(n.method),i=this.fallbackNotificationHandler;r===void 0&&i===void 0||Promise.resolve().then(()=>r===void 0?i(n):r(n,o)).catch(s=>this._onerror(new Error(`Uncaught error in notification handler: ${s}`)));}_onrequest(e,t){let{message:n,lifted:o}=wb(e,"request"),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)==="drop"){this._onerror(new Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));return}let i=this._transport,s=(p,S,d)=>{let _={jsonrpc:"2.0",id:n.id,error:{code:p,message:S,...d!==void 0&&{data:d}}};i?.send(_).catch(f=>this._onerror(new Error(`Failed to send an error response: ${f}`)));};if(t?.classification!==void 0){let p=bb(t.classification);if(p!==r.era){this._onerror(new Error(`Era mismatch on inbound request '${n.method}': classified as ${p} but this instance serves ${r.era}`));let S=t.classification.revision??p;s(Q.UnsupportedProtocolVersion,`Unsupported protocol version: ${S}`,{supported:this._supportedProtocolVersions,requested:S});return}}if(r_(n.method)&&!r.hasRequestMethod(n.method)){s(Q.MethodNotFound,"Method not found");return}let a=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(a===void 0){s(Q.MethodNotFound,"Method not found");return}let c=r.checkInboundEnvelope(o);if(c!==void 0){s(Q.InvalidParams,c);return}let u=(p,S)=>this._notificationViaCodec(this._resolveOutboundCodec(p.method),p,{...S,relatedRequestId:n.id}),l=(p,S,d)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(p.method),p,S,{...d,relatedRequestId:n.id}),m=new AbortController;this._requestHandlerAbortControllers.set(n.id,m);let h=o.inputResponses===void 0?void 0:NE(o.inputResponses),y={sessionId:i?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...o.envelope!==void 0&&{envelope:o.envelope},...h!==void 0&&{inputResponses:h.accepted},...h!==void 0&&h.droppedKeys.length>0&&{droppedInputResponseKeys:h.droppedKeys},requestState:o.requestState===void 0?kE:Us(o.requestState),signal:m.signal,send:((p,S,d)=>{let _=this._resolveOutboundCodec(p.method);if(this._assertOutboundRequestInEra(_,p.method),Ho(S))return l(p,S,d);let f=Eb(_,p.method);if(f===void 0)throw new TypeError(`'${p.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return l(p,f,S)}),notify:u},http:t?.authInfo?{authInfo:t.authInfo}:void 0},b=this.buildContext(y,t);Promise.resolve().then(()=>a(n,b)).then(async p=>{if(m.signal.aborted)return;let S;try{S=r.encodeResult(n.method,p,this._outboundServerInfo());}catch(_){this._onerror(new Error(`Failed to encode result for ${n.method}: ${_}`)),s(Q.InternalError,"Internal error");return}let d={result:S,jsonrpc:"2.0",id:n.id};await i?.send(d);},async p=>{if(m.signal.aborted)return;let S=Number.isSafeInteger(p.code)?p.code:Q.InternalError,d={jsonrpc:"2.0",id:n.id,error:{code:r.encodeErrorCode(S),message:p.message??"Internal error",...p.data!==void 0&&{data:p.data}}};await i?.send(d);}).catch(p=>this._onerror(new Error(`Failed to send response: ${p}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===m&&this._requestHandlerAbortControllers.delete(n.id);});}_onprogress(e){let{progressToken:t,...n}=e.params,o=Number(t),r=this._progressHandlers.get(o);if(!r){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let i=this._responseHandlers.get(o),s=this._timeoutInfo.get(o);if(s&&i&&s.resetTimeoutOnProgress)try{this._resetTimeout(o);}catch(a){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),i(a);return}r(n);}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);if(n===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),Ms(e)?n(e):n(de.fromError(e.error.code,e.error.message,e.error.data));}get transport(){return this._transport}async close(){await this._transport?.close();}request(e,t,n){let o=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(o,e.method),Ho(t))return this._requestWithSchemaViaCodec(o,e,t,n);let r=Eb(o,e.method);if(r===void 0)throw new TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(o,e,r,t)}_negotiatedWireCodec(){return Vr(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=IE(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(r_(t)&&!e.hasRequestMethod(t))throw new ye(Ie.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,n){let o=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(o,e.method),this._requestWithSchemaViaCodec(o,e,t,n)}_requestWithSchemaViaCodec(e,t,n,o){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:s,headers:a}=o??{},c=Date.now(),u,l;return new Promise((m,h)=>{let y=T=>{h(T);};if(!this._transport){y(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===true)try{this.assertCapabilityForMethod(t.method);}catch(T){y(T);return}if(o?.signal?.aborted){let T=o.signal.reason;throw T instanceof ye?T:new ye(Ie.RequestTimeout,String(T))}let b=e.era===Ds&&this._transport.hasPerRequestStream===true?new AbortController:void 0,p=this._requestMessageId++;l=p;let S={...t,jsonrpc:"2.0",id:p};o?.onprogress&&(this._progressHandlers.set(p,o.onprogress),S.params={...t.params,_meta:{...t.params?._meta,progressToken:p}});let d=this._envelopeOutbound(S),_=false,f=T=>{_||(this._progressHandlers.delete(p),b===void 0?this._transport?.send(this._envelopeOutbound({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:p,reason:String(T)}}),{relatedRequestId:r,resumptionToken:i,onresumptiontoken:s}).catch(R=>this._onerror(new Error(`Failed to send cancellation: ${R}`))):b.abort(),h(T instanceof ye?T:new ye(Ie.RequestTimeout,String(T))));};this._responseHandlers.set(p,T=>{if(o?.signal?.aborted)return;if(_=true,T instanceof Error)return h(T);let R;try{R=e.decodeResult(t.method,T.result);}catch(E){return h(E instanceof Error?E:new Error(String(E)))}if(R.kind==="invalid")return h(R.error);if(R.kind==="input_required"){if(o?.allowInputRequired===true)return m(PE(R));let E={codec:e,request:t,resultSchema:n,options:o,flowStartedAt:c,retry:(A,N)=>this._requestWithSchemaViaCodec(e,A===void 0?{method:t.method}:{method:t.method,params:A},n,N)};return m(this._resolveNonCompleteResult(R,E))}let $=R.result;Dn(n,$).then(E=>{E.success?m(E.data):h(new ye(Ie.InvalidResult,`Invalid result for ${t.method}: ${E.error}`));},h);}),u=()=>f(o?.signal?.reason),o?.signal?.addEventListener("abort",u,{once:true});let v=o?.timeout??oR,x=()=>f(new ye(Ie.RequestTimeout,"Request timed out",{timeout:v}));this._setupTimeout(p,v,o?.maxTotalTimeout,x,o?.resetTimeoutOnProgress??false),this._transport.send(d,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:s,headers:a,requestSignal:b?.signal}).catch(T=>{this._progressHandlers.delete(p),h(T);});}).finally(()=>{u&&o?.signal?.removeEventListener("abort",u),l!==void 0&&(this._responseHandlers.delete(l),this._cleanupTimeout(l));})}async notification(e,t){return this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new ye(Ie.NotConnected,"Not connected");if(n_(t.method)&&!e.hasNotificationMethod(t.method))throw new ye(Ie.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let o=this._envelopeOutbound({jsonrpc:"2.0",...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(o,n).catch(r=>this._onerror(r));});return}await this._transport.send(o,n);}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let o;if(typeof t=="function"){if(!r_(e))throw new TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);o=(r,i)=>{let s=this._negotiatedWireCodec(),a=s.validateRequest(e,r);if(!a.ok&&a.reason==="not-in-era"&&(a=s.validateInputRequest(e,r)),!a.ok)throw a.reason==="not-in-era"?new de(Q.InternalError,`No wire schema for ${e} in the resolved era`):new Error(a.message);return Promise.resolve(t(a.value,i))};}else if(n)o=async(r,i)=>{let s=await Dn(t.params,{...r.params});if(!s.success)throw new de(Q.InvalidParams,`Invalid params for ${e}: ${s.error}`);return n(s.data,i)};else throw new TypeError("setRequestHandler: handler is required");this._requestHandlers.set(e,this._wrapHandler(e,o));}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e);}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t=="function"){if(!n_(e))throw new TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(o,r)=>{let i=r.validateNotification(e,o);if(!i.ok)throw i.reason==="not-in-era"?new de(Q.InternalError,`No wire schema for ${e} in the resolved era`):new Error(i.message);return Promise.resolve(t(i.value))});return}if(!n)throw new TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set(e,async o=>{let r=await Dn(t.params,{...o.params});if(!r.success)throw new de(Q.InvalidParams,`Invalid params for notification ${e}: ${r.error}`);await n(r.data,o);});}removeNotificationHandler(e){this._notificationHandlers.delete(e);}};function Cs(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function E_(e,t){let n={...e};for(let o in t){let r=o,i=t[r];if(i===void 0)continue;let s=n[r];n[r]=Cs(s)&&Cs(i)?{...s,...i}:i;}return n}function Ib(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function NE(e){let t={},n=[];if(!Ib(e))return {accepted:t,droppedKeys:n};for(let[o,r]of Object.entries(e)){if(!Ib(r)||"method"in r||"result"in r){n.push(o);continue}t[o]=r;}return {accepted:t,droppedKeys:n}}function PE(e){return {resultType:"input_required",inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState}}}var AE=G((e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\([\u000b\u0020-\u00ff])/g,o=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=r;function r(a){if(!a)throw new TypeError("argument string is required");var c=typeof a=="object"?i(a):a;if(typeof c!="string")throw new TypeError("argument string is required to be a string");var u=c.indexOf(";"),l=u!==-1?c.slice(0,u).trim():c.trim();if(!o.test(l))throw new TypeError("invalid media type");var m=new s(l.toLowerCase());if(u!==-1){var h,y,b;for(t.lastIndex=u;y=t.exec(c);){if(y.index!==u)throw new TypeError("invalid parameter format");u+=y[0].length,h=y[1].toLowerCase(),b=y[2],b.charCodeAt(0)===34&&(b=b.slice(1,-1),b.indexOf("\\")!==-1&&(b=b.replace(n,"$1"))),m.parameters[h]=b;}if(u!==c.length)throw new TypeError("invalid parameter format")}return m}function i(a){var c;if(typeof a.getHeader=="function"?c=a.getHeader("content-type"):typeof a.headers=="object"&&(c=a.headers&&a.headers["content-type"]),typeof c!="string")throw new TypeError("content-type header is missing from object");return c}function s(a){this.parameters=Object.create(null),this.type=a;}}));da(AE());var sR=10*1024*1024,I_=class{_buffer;_maxBufferSize;constructor(e){this._maxBufferSize=e?.maxBufferSize??sR;}append(e){if((this._buffer?.length??0)+e.length>this._maxBufferSize)throw this.clear(),new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e;}readMessage(){for(;this._buffer;){let e=this._buffer.indexOf(`
67
- `);if(e===-1)return null;let t=this._buffer.toString("utf8",0,e).replace(/\r$/,"");this._buffer=this._buffer.subarray(e+1);try{return aR(t)}catch(n){if(n instanceof SyntaxError)continue;throw n}}return null}clear(){this._buffer=void 0;}};function aR(e){return ms.parse(JSON.parse(e))}function z_(e){return JSON.stringify(e)+`
68
- `}var CE=/^[A-Za-z0-9._-]{1,128}$/;function ME(e){let t=[];if(e.length===0)return {isValid:false,warnings:["Tool name cannot be empty"]};if(e.length>128)return {isValid:false,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${e.length})`]};if(e.includes(" ")&&t.push("Tool name contains spaces, which may cause parsing issues"),e.includes(",")&&t.push("Tool name contains commas, which may cause parsing issues"),(e.startsWith("-")||e.endsWith("-"))&&t.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(e.startsWith(".")||e.endsWith("."))&&t.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!CE.test(e)){let n=[...e].filter(o=>!/[A-Za-z0-9._-]/.test(o)).filter((o,r,i)=>i.indexOf(o)===r);return t.push(`Tool name contains invalid characters: ${n.map(o=>`"${o}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:false,warnings:t}}return {isValid:true,warnings:t}}function jE(e,t){if(t.length>0){console.warn(`Tool name validation warning for "${e}":`);for(let n of t)console.warn(` - ${n}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.");}}function O_(e){let t=ME(e);return jE(e,t.warnings),t.isValid}function DE(e){return typeof e=="object"&&e!==null&&"_zod"in e}function UE(e){return typeof e=="object"&&e!==null&&!("_zod"in e)&&"_def"in e&&typeof e._def?.typeName=="string"}function LE(e){if(typeof e!="object"||e===null||Ho(e))return false;let t=Object.getPrototypeOf(e);return t!==Object.prototype&&t!==null?false:Object.values(e).every(n=>DE(n))}function Yl(e){if(e!==void 0){if(LE(e))return z(e);if(typeof e=="object"&&e!==null&&!Ho(e)&&Object.values(e).some(t=>UE(t)))throw new TypeError("Raw-shape inputSchema/outputSchema/argsSchema fields must be Zod v4 schemas. Got a Zod v3 field schema. Import from `zod/v4` (or upgrade your zod import), or wrap with `z.object({...})` yourself.");if(!Ho(e))throw new TypeError("inputSchema/outputSchema/argsSchema must be a Standard Schema (e.g. z.object({...})) or a raw Zod shape ({ field: z.string() }).");return e}}var ed=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(d){if(super(),!e.IDENTIFIER.test(d))throw new Error("CodeGen: name must be a valid identifier");this.str=d;}toString(){return this.str}emptyStr(){return false}get names(){return {[this.str]:1}}};e.Name=n;var o=class extends t{constructor(d){super(),this._items=typeof d=="string"?[d]:d;}toString(){return this.str}emptyStr(){if(this._items.length>1)return false;let d=this._items[0];return d===""||d==='""'}get str(){var d;return (d=this._str)!==null&&d!==void 0?d:this._str=this._items.reduce((_,f)=>`${_}${f}`,"")}get names(){var d;return (d=this._names)!==null&&d!==void 0?d:this._names=this._items.reduce((_,f)=>(f instanceof n&&(_[f.str]=(_[f.str]||0)+1),_),{})}};e._Code=o,e.nil=new o("");function r(d,..._){let f=[d[0]],v=0;for(;v<_.length;)a(f,_[v]),f.push(d[++v]);return new o(f)}e._=r;let i=new o("+");function s(d,..._){let f=[y(d[0])],v=0;for(;v<_.length;)f.push(i),a(f,_[v]),f.push(i,y(d[++v]));return c(f),new o(f)}e.str=s;function a(d,_){_ instanceof o?d.push(..._._items):_ instanceof n?d.push(_):d.push(m(_));}e.addCodeArg=a;function c(d){let _=1;for(;_<d.length-1;){if(d[_]===i){let f=u(d[_-1],d[_+1]);if(f!==void 0){d.splice(_-1,3,f);continue}d[_++]="+";}_++;}}function u(d,_){if(_==='""')return d;if(d==='""')return _;if(typeof d=="string")return _ instanceof n||d[d.length-1]!=='"'?void 0:typeof _!="string"?`${d.slice(0,-1)}${_}"`:_[0]==='"'?d.slice(0,-1)+_.slice(1):void 0;if(typeof _=="string"&&_[0]==='"'&&!(d instanceof n))return `"${d}${_.slice(1)}`}function l(d,_){return _.emptyStr()?d:d.emptyStr()?_:s`${d}${_}`}e.strConcat=l;function m(d){return typeof d=="number"||typeof d=="boolean"||d===null?d:y(Array.isArray(d)?d.join(","):d)}function h(d){return new o(y(d))}e.stringify=h;function y(d){return JSON.stringify(d).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=y;function b(d){return typeof d=="string"&&e.IDENTIFIER.test(d)?new o(`.${d}`):r`[${d}]`}e.getProperty=b;function p(d){if(typeof d=="string"&&e.IDENTIFIER.test(d))return new o(`${d}`);throw new Error(`CodeGen: invalid export name: ${d}, use explicit $id name mapping`)}e.getEsmExportName=p;function S(d){return new o(d.toString())}e.regexpCode=S;})),cR=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;let t=ed();var n=class extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value;}},o;((function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed";}))(o||(e.UsedValueState=o={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};var r=class{constructor({prefixes:c,parent:u}={}){this._names={},this._prefixes=c,this._parent=u;}toName(c){return c instanceof t.Name?c:this.name(c)}name(c){return new t.Name(this._newName(c))}_newName(c){let u=this._names[c]||this._nameGroup(c);return `${c}${u.index++}`}_nameGroup(c){var u,l;if(!((l=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||l===void 0)&&l.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}};e.Scope=r;var i=class extends t.Name{constructor(c,u){super(u),this.prefix=c;}setValue(c,{property:u,itemIndex:l}){this.value=c,this.scopePath=(0, t._)`.${new t.Name(u)}[${l}]`;}};e.ValueScopeName=i;let s=(0, t._)`\n`;var a=class extends r{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?s:t.nil};}get(){return this._scope}name(c){return new i(c,this._newName(c))}value(c,u){var l;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let m=this.toName(c),{prefix:h}=m,y=(l=u.key)!==null&&l!==void 0?l:u.ref,b=this._values[h];if(b){let d=b.get(y);if(d)return d}else b=this._values[h]=new Map;b.set(y,m);let p=this._scope[h]||(this._scope[h]=[]),S=p.length;return p[S]=u.ref,m.setValue(u,{property:h,itemIndex:S}),m}getValue(c,u){let l=this._values[c];if(l)return l.get(u)}scopeRefs(c,u=this._values){return this._reduceValues(u,l=>{if(l.scopePath===void 0)throw new Error(`CodeGen: name "${l}" has no value`);return (0, t._)`${c}${l.scopePath}`})}scopeCode(c=this._values,u,l){return this._reduceValues(c,m=>{if(m.value===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return m.value.code},u,l)}_reduceValues(c,u,l={},m){let h=t.nil;for(let y in c){let b=c[y];if(!b)continue;let p=l[y]=l[y]||new Map;b.forEach(S=>{if(p.has(S))return;p.set(S,o.Started);let d=u(S);if(d){let _=this.opts.es5?e.varKinds.var:e.varKinds.const;h=(0, t._)`${h}${_} ${S} = ${d};${this.opts._n}`;}else if(d=m?.(S))h=(0, t._)`${h}${d}${this.opts._n}`;else throw new n(S);p.set(S,o.Completed);});}return h}};e.ValueScope=a;})),Se=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;let t=ed(),n=cR();var o=ed();Object.defineProperty(e,"_",{enumerable:true,get:function(){return o._}}),Object.defineProperty(e,"str",{enumerable:true,get:function(){return o.str}}),Object.defineProperty(e,"strConcat",{enumerable:true,get:function(){return o.strConcat}}),Object.defineProperty(e,"nil",{enumerable:true,get:function(){return o.nil}}),Object.defineProperty(e,"getProperty",{enumerable:true,get:function(){return o.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:true,get:function(){return o.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:true,get:function(){return o.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:true,get:function(){return o.Name}});var r=cR();Object.defineProperty(e,"Scope",{enumerable:true,get:function(){return r.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:true,get:function(){return r.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:true,get:function(){return r.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:true,get:function(){return r.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};var i=class{optimizeNodes(){return this}optimizeNames(w,O){return this}},s=class extends i{constructor(w,O,j){super(),this.varKind=w,this.name=O,this.rhs=j;}render({es5:w,_n:O}){let j=w?n.varKinds.var:this.varKind,Y=this.rhs===void 0?"":` = ${this.rhs}`;return `${j} ${this.name}${Y};`+O}optimizeNames(w,O){if(w[this.name.str])return this.rhs&&(this.rhs=K(this.rhs,w,O)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},a=class extends i{constructor(w,O,j){super(),this.lhs=w,this.rhs=O,this.sideEffects=j;}render({_n:w}){return `${this.lhs} = ${this.rhs};`+w}optimizeNames(w,O){if(!(this.lhs instanceof t.Name&&!w[this.lhs.str]&&!this.sideEffects))return this.rhs=K(this.rhs,w,O),this}get names(){return V(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends a{constructor(w,O,j,Y){super(w,j,Y),this.op=O;}render({_n:w}){return `${this.lhs} ${this.op}= ${this.rhs};`+w}},u=class extends i{constructor(w){super(),this.label=w,this.names={};}render({_n:w}){return `${this.label}:`+w}},l=class extends i{constructor(w){super(),this.label=w,this.names={};}render({_n:w}){return `break${this.label?` ${this.label}`:""};`+w}},m=class extends i{constructor(w){super(),this.error=w;}render({_n:w}){return `throw ${this.error};`+w}get names(){return this.error.names}},h=class extends i{constructor(w){super(),this.code=w;}render({_n:w}){return `${this.code};`+w}optimizeNodes(){return `${this.code}`?this:void 0}optimizeNames(w,O){return this.code=K(this.code,w,O),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},y=class extends i{constructor(w=[]){super(),this.nodes=w;}render(w){return this.nodes.reduce((O,j)=>O+j.render(w),"")}optimizeNodes(){let{nodes:w}=this,O=w.length;for(;O--;){let j=w[O].optimizeNodes();Array.isArray(j)?w.splice(O,1,...j):j?w[O]=j:w.splice(O,1);}return w.length>0?this:void 0}optimizeNames(w,O){let{nodes:j}=this,Y=j.length;for(;Y--;){let ce=j[Y];ce.optimizeNames(w,O)||(ue(w,ce.names),j.splice(Y,1));}return j.length>0?this:void 0}get names(){return this.nodes.reduce((w,O)=>F(w,O.names),{})}},b=class extends y{render(w){return "{"+w._n+super.render(w)+"}"+w._n}},p=class extends y{},S=class extends b{};S.kind="else";var d=class Ql extends b{constructor(O,j){super(j),this.condition=O;}render(O){let j=`if(${this.condition})`+super.render(O);return this.else&&(j+="else "+this.else.render(O)),j}optimizeNodes(){super.optimizeNodes();let O=this.condition;if(O===true)return this.nodes;let j=this.else;if(j){let Y=j.optimizeNodes();j=this.else=Array.isArray(Y)?new S(Y):Y;}if(j)return O===false?j instanceof Ql?j:j.nodes:this.nodes.length?this:new Ql(ke(O),j instanceof Ql?[j]:j.nodes);if(!(O===false||!this.nodes.length))return this}optimizeNames(O,j){var Y;if(this.else=(Y=this.else)===null||Y===void 0?void 0:Y.optimizeNames(O,j),!!(super.optimizeNames(O,j)||this.else))return this.condition=K(this.condition,O,j),this}get names(){let O=super.names;return V(O,this.condition),this.else&&F(O,this.else.names),O}};d.kind="if";var _=class extends b{};_.kind="for";var f=class extends _{constructor(w){super(),this.iteration=w;}render(w){return `for(${this.iteration})`+super.render(w)}optimizeNames(w,O){if(super.optimizeNames(w,O))return this.iteration=K(this.iteration,w,O),this}get names(){return F(super.names,this.iteration.names)}},v=class extends _{constructor(w,O,j,Y){super(),this.varKind=w,this.name=O,this.from=j,this.to=Y;}render(w){let O=w.es5?n.varKinds.var:this.varKind,{name:j,from:Y,to:ce}=this;return `for(${O} ${j}=${Y}; ${j}<${ce}; ${j}++)`+super.render(w)}get names(){return V(V(super.names,this.from),this.to)}},x=class extends _{constructor(w,O,j,Y){super(),this.loop=w,this.varKind=O,this.name=j,this.iterable=Y;}render(w){return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(w)}optimizeNames(w,O){if(super.optimizeNames(w,O))return this.iterable=K(this.iterable,w,O),this}get names(){return F(super.names,this.iterable.names)}},T=class extends b{constructor(w,O,j){super(),this.name=w,this.args=O,this.async=j;}render(w){return `${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(w)}};T.kind="func";var R=class extends y{render(w){return "return "+super.render(w)}};R.kind="return";var $=class extends b{render(w){let O="try"+super.render(w);return this.catch&&(O+=this.catch.render(w)),this.finally&&(O+=this.finally.render(w)),O}optimizeNodes(){var w,O;return super.optimizeNodes(),(w=this.catch)===null||w===void 0||w.optimizeNodes(),(O=this.finally)===null||O===void 0||O.optimizeNodes(),this}optimizeNames(w,O){var j,Y;return super.optimizeNames(w,O),(j=this.catch)===null||j===void 0||j.optimizeNames(w,O),(Y=this.finally)===null||Y===void 0||Y.optimizeNames(w,O),this}get names(){let w=super.names;return this.catch&&F(w,this.catch.names),this.finally&&F(w,this.finally.names),w}},E=class extends b{constructor(w){super(),this.error=w;}render(w){return `catch(${this.error})`+super.render(w)}};E.kind="catch";var A=class extends b{render(w){return "finally"+super.render(w)}};A.kind="finally";var N=class{constructor(w,O={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...O,_n:O.lines?`
69
- `:""},this._extScope=w,this._scope=new n.Scope({parent:w}),this._nodes=[new p];}toString(){return this._root.render(this.opts)}name(w){return this._scope.name(w)}scopeName(w){return this._extScope.name(w)}scopeValue(w,O){let j=this._extScope.value(w,O);return (this._values[j.prefix]||(this._values[j.prefix]=new Set)).add(j),j}getScopeValue(w,O){return this._extScope.getValue(w,O)}scopeRefs(w){return this._extScope.scopeRefs(w,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(w,O,j,Y){let ce=this._scope.toName(O);return j!==void 0&&Y&&(this._constants[ce.str]=j),this._leafNode(new s(w,ce,j)),ce}const(w,O,j){return this._def(n.varKinds.const,w,O,j)}let(w,O,j){return this._def(n.varKinds.let,w,O,j)}var(w,O,j){return this._def(n.varKinds.var,w,O,j)}assign(w,O,j){return this._leafNode(new a(w,O,j))}add(w,O){return this._leafNode(new c(w,e.operators.ADD,O))}code(w){return typeof w=="function"?w():w!==t.nil&&this._leafNode(new h(w)),this}object(...w){let O=["{"];for(let[j,Y]of w)O.length>1&&O.push(","),O.push(j),(j!==Y||this.opts.es5)&&(O.push(":"),(0, t.addCodeArg)(O,Y));return O.push("}"),new t._Code(O)}if(w,O,j){if(this._blockNode(new d(w)),O&&j)this.code(O).else().code(j).endIf();else if(O)this.code(O).endIf();else if(j)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(w){return this._elseNode(new d(w))}else(){return this._elseNode(new S)}endIf(){return this._endBlockNode(d,S)}_for(w,O){return this._blockNode(w),O&&this.code(O).endFor(),this}for(w,O){return this._for(new f(w),O)}forRange(w,O,j,Y,ce=this.opts.es5?n.varKinds.var:n.varKinds.let){let Re=this._scope.toName(w);return this._for(new v(ce,Re,O,j),()=>Y(Re))}forOf(w,O,j,Y=n.varKinds.const){let ce=this._scope.toName(w);if(this.opts.es5){let Re=O instanceof t.Name?O:this.var("_arr",O);return this.forRange("_i",0,(0, t._)`${Re}.length`,pe=>{this.var(ce,(0, t._)`${Re}[${pe}]`),j(ce);})}return this._for(new x("of",Y,ce,O),()=>j(ce))}forIn(w,O,j,Y=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(w,(0, t._)`Object.keys(${O})`,j);let ce=this._scope.toName(w);return this._for(new x("in",Y,ce,O),()=>j(ce))}endFor(){return this._endBlockNode(_)}label(w){return this._leafNode(new u(w))}break(w){return this._leafNode(new l(w))}return(w){let O=new R;if(this._blockNode(O),this.code(w),O.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(R)}try(w,O,j){if(!O&&!j)throw new Error('CodeGen: "try" without "catch" and "finally"');let Y=new $;if(this._blockNode(Y),this.code(w),O){let ce=this.name("e");this._currNode=Y.catch=new E(ce),O(ce);}return j&&(this._currNode=Y.finally=new A,this.code(j)),this._endBlockNode(E,A)}throw(w){return this._leafNode(new m(w))}block(w,O){return this._blockStarts.push(this._nodes.length),w&&this.code(w).endBlock(O),this}endBlock(w){let O=this._blockStarts.pop();if(O===void 0)throw new Error("CodeGen: not in self-balancing block");let j=this._nodes.length-O;if(j<0||w!==void 0&&j!==w)throw new Error(`CodeGen: wrong number of nodes: ${j} vs ${w} expected`);return this._nodes.length=O,this}func(w,O=t.nil,j,Y){return this._blockNode(new T(w,O,j)),Y&&this.code(Y).endFunc(),this}endFunc(){return this._endBlockNode(T)}optimize(w=1){for(;w-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants);}_leafNode(w){return this._currNode.nodes.push(w),this}_blockNode(w){this._currNode.nodes.push(w),this._nodes.push(w);}_endBlockNode(w,O){let j=this._currNode;if(j instanceof w||O&&j instanceof O)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${O?`${w.kind}/${O.kind}`:w.kind}"`)}_elseNode(w){let O=this._currNode;if(!(O instanceof d))throw new Error('CodeGen: "else" without "if"');return this._currNode=O.else=w,this}get _root(){return this._nodes[0]}get _currNode(){let w=this._nodes;return w[w.length-1]}set _currNode(w){let O=this._nodes;O[O.length-1]=w;}};e.CodeGen=N;function F(w,O){for(let j in O)w[j]=(w[j]||0)+(O[j]||0);return w}function V(w,O){return O instanceof t._CodeOrName?F(w,O.names):w}function K(w,O,j){if(w instanceof t.Name)return Y(w);if(!ce(w))return w;return new t._Code(w._items.reduce((Re,pe)=>(pe instanceof t.Name&&(pe=Y(pe)),pe instanceof t._Code?Re.push(...pe._items):Re.push(pe),Re),[]));function Y(Re){let pe=j[Re.str];return pe===void 0||O[Re.str]!==1?Re:(delete O[Re.str],pe)}function ce(Re){return Re instanceof t._Code&&Re._items.some(pe=>pe instanceof t.Name&&O[pe.str]===1&&j[pe.str]!==void 0)}}function ue(w,O){for(let j in O)w[j]=(w[j]||0)-(O[j]||0);}function ke(w){return typeof w=="boolean"||typeof w=="number"||w===null?!w:(0, t._)`!${B(w)}`}e.not=ke;let xe=U(e.operators.AND);function Ve(...w){return w.reduce(xe)}e.and=Ve;let be=U(e.operators.OR);function k(...w){return w.reduce(be)}e.or=k;function U(w){return (O,j)=>O===t.nil?j:j===t.nil?O:(0, t._)`${B(O)} ${w} ${B(j)}`}function B(w){return w instanceof t.Name?w:(0, t._)`(${w})`}})),Ne=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;let t=Se(),n=ed();function o(T){let R={};for(let $ of T)R[$]=true;return R}e.toHash=o;function r(T,R){return typeof R=="boolean"?R:Object.keys(R).length===0?true:(i(T,R),!s(R,T.self.RULES.all))}e.alwaysValidSchema=r;function i(T,R=T.schema){let{opts:$,self:E}=T;if(!$.strictSchema||typeof R=="boolean")return;let A=E.RULES.keywords;for(let N in R)A[N]||x(T,`unknown keyword: "${N}"`);}e.checkUnknownRules=i;function s(T,R){if(typeof T=="boolean")return !T;for(let $ in T)if(R[$])return true;return false}e.schemaHasRules=s;function a(T,R){if(typeof T=="boolean")return !T;for(let $ in T)if($!=="$ref"&&R.all[$])return true;return false}e.schemaHasRulesButRef=a;function c({topSchemaRef:T,schemaPath:R},$,E,A){if(!A){if(typeof $=="number"||typeof $=="boolean")return $;if(typeof $=="string")return (0, t._)`${$}`}return (0, t._)`${T}${R}${(0, t.getProperty)(E)}`}e.schemaRefOrVal=c;function u(T){return h(decodeURIComponent(T))}e.unescapeFragment=u;function l(T){return encodeURIComponent(m(T))}e.escapeFragment=l;function m(T){return typeof T=="number"?`${T}`:T.replace(/~/g,"~0").replace(/\//g,"~1")}e.escapeJsonPointer=m;function h(T){return T.replace(/~1/g,"/").replace(/~0/g,"~")}e.unescapeJsonPointer=h;function y(T,R){if(Array.isArray(T))for(let $ of T)R($);else R(T);}e.eachItem=y;function b({mergeNames:T,mergeToName:R,mergeValues:$,resultToName:E}){return (A,N,F,V)=>{let K=F===void 0?N:F instanceof t.Name?(N instanceof t.Name?T(A,N,F):R(A,N,F),F):N instanceof t.Name?(R(A,F,N),N):$(N,F);return V===t.Name&&!(K instanceof t.Name)?E(A,K):K}}e.mergeEvaluated={props:b({mergeNames:(T,R,$)=>T.if((0, t._)`${$} !== true && ${R} !== undefined`,()=>{T.if((0, t._)`${R} === true`,()=>T.assign($,true),()=>T.assign($,(0, t._)`${$} || {}`).code((0, t._)`Object.assign(${$}, ${R})`));}),mergeToName:(T,R,$)=>T.if((0, t._)`${$} !== true`,()=>{R===true?T.assign($,true):(T.assign($,(0, t._)`${$} || {}`),S(T,$,R));}),mergeValues:(T,R)=>T===true?true:{...T,...R},resultToName:p}),items:b({mergeNames:(T,R,$)=>T.if((0, t._)`${$} !== true && ${R} !== undefined`,()=>T.assign($,(0, t._)`${R} === true ? true : ${$} > ${R} ? ${$} : ${R}`)),mergeToName:(T,R,$)=>T.if((0, t._)`${$} !== true`,()=>T.assign($,R===true?true:(0, t._)`${$} > ${R} ? ${$} : ${R}`)),mergeValues:(T,R)=>T===true?true:Math.max(T,R),resultToName:(T,R)=>T.var("items",R)})};function p(T,R){if(R===true)return T.var("props",true);let $=T.var("props",(0, t._)`{}`);return R!==void 0&&S(T,$,R),$}e.evaluatedPropsToName=p;function S(T,R,$){Object.keys($).forEach(E=>T.assign((0, t._)`${R}${(0, t.getProperty)(E)}`,true));}e.setEvaluated=S;let d={};function _(T,R){return T.scopeValue("func",{ref:R,code:d[R.code]||(d[R.code]=new n._Code(R.code))})}e.useFunc=_;var f;(function(T){T[T.Num=0]="Num",T[T.Str=1]="Str";})(f||(e.Type=f={}));function v(T,R,$){if(T instanceof t.Name){let E=R===f.Num;return $?E?(0, t._)`"[" + ${T} + "]"`:(0, t._)`"['" + ${T} + "']"`:E?(0, t._)`"/" + ${T}`:(0, t._)`"/" + ${T}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return $?(0, t.getProperty)(T).toString():"/"+m(T)}e.getErrorPath=v;function x(T,R,$=T.opts.strictSchema){if($){if(R=`strict mode: ${R}`,$===true)throw new Error(R);T.self.logger.warn(R);}}e.checkStrictMode=x;})),qt=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};e.default=n;})),rd=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;let t=Se(),n=Ne(),o=qt();e.keywordError={message:({keyword:S})=>(0, t.str)`must pass "${S}" keyword validation`},e.keyword$DataError={message:({keyword:S,schemaType:d})=>d?(0, t.str)`"${S}" keyword must be ${d} ($data)`:(0, t.str)`"${S}" keyword is invalid ($data)`};function r(S,d=e.keywordError,_,f){let{it:v}=S,{gen:x,compositeRule:T,allErrors:R}=v,$=m(S,d,_);f??(T||R)?c(x,$):u(v,(0, t._)`[${$}]`);}e.reportError=r;function i(S,d=e.keywordError,_){let{it:f}=S,{gen:v,compositeRule:x,allErrors:T}=f;c(v,m(S,d,_)),x||T||u(f,o.default.vErrors);}e.reportExtraError=i;function s(S,d){S.assign(o.default.errors,d),S.if((0, t._)`${o.default.vErrors} !== null`,()=>S.if(d,()=>S.assign((0, t._)`${o.default.vErrors}.length`,d),()=>S.assign(o.default.vErrors,null)));}e.resetErrorsCount=s;function a({gen:S,keyword:d,schemaValue:_,data:f,errsCount:v,it:x}){if(v===void 0)throw new Error("ajv implementation error");let T=S.name("err");S.forRange("i",v,o.default.errors,R=>{S.const(T,(0, t._)`${o.default.vErrors}[${R}]`),S.if((0, t._)`${T}.instancePath === undefined`,()=>S.assign((0, t._)`${T}.instancePath`,(0, t.strConcat)(o.default.instancePath,x.errorPath))),S.assign((0, t._)`${T}.schemaPath`,(0, t.str)`${x.errSchemaPath}/${d}`),x.opts.verbose&&(S.assign((0, t._)`${T}.schema`,_),S.assign((0, t._)`${T}.data`,f));});}e.extendErrors=a;function c(S,d){let _=S.const("err",d);S.if((0, t._)`${o.default.vErrors} === null`,()=>S.assign(o.default.vErrors,(0, t._)`[${_}]`),(0, t._)`${o.default.vErrors}.push(${_})`),S.code((0, t._)`${o.default.errors}++`);}function u(S,d){let{gen:_,validateName:f,schemaEnv:v}=S;v.$async?_.throw((0, t._)`new ${S.ValidationError}(${d})`):(_.assign((0, t._)`${f}.errors`,d),_.return(false));}let l={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function m(S,d,_){let{createErrors:f}=S.it;return f===false?(0, t._)`{}`:h(S,d,_)}function h(S,d,_={}){let{gen:f,it:v}=S,x=[y(v,_),b(S,_)];return p(S,d,x),f.object(...x)}function y({errorPath:S},{instancePath:d}){let _=d?(0, t.str)`${S}${(0, n.getErrorPath)(d,n.Type.Str)}`:S;return [o.default.instancePath,(0, t.strConcat)(o.default.instancePath,_)]}function b({keyword:S,it:{errSchemaPath:d}},{schemaPath:_,parentSchema:f}){let v=f?d:(0, t.str)`${d}/${S}`;return _&&(v=(0, t.str)`${v}${(0, n.getErrorPath)(_,n.Type.Str)}`),[l.schemaPath,v]}function p(S,{params:d,message:_},f){let{keyword:v,data:x,schemaValue:T,it:R}=S,{opts:$,propertyName:E,topSchemaRef:A,schemaPath:N}=R;f.push([l.keyword,v],[l.params,typeof d=="function"?d(S):d||(0, t._)`{}`]),$.messages&&f.push([l.message,typeof _=="function"?_(S):_]),$.verbose&&f.push([l.schema,T],[l.parentSchema,(0, t._)`${A}${N}`],[o.default.data,x]),E&&f.push([l.propertyName,E]);}})),FE=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;let t=rd(),n=Se(),o=qt(),r={message:"boolean schema is false"};function i(c){let{gen:u,schema:l,validateName:m}=c;l===false?a(c,false):typeof l=="object"&&l.$async===true?u.return(o.default.data):(u.assign((0, n._)`${m}.errors`,null),u.return(true));}e.topBoolOrEmptySchema=i;function s(c,u){let{gen:l,schema:m}=c;m===false?(l.var(u,false),a(c)):l.var(u,true);}e.boolOrEmptySchema=s;function a(c,u){let{gen:l,data:m}=c,h={gen:l,keyword:"false schema",data:m,schema:false,schemaCode:false,schemaValue:false,params:{},it:c};(0, t.reportError)(h,r,void 0,u);}})),uR=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.getRules=e.isJSONType=void 0;let t=new Set(["string","number","integer","boolean","null","object","array"]);function n(r){return typeof r=="string"&&t.has(r)}e.isJSONType=n;function o(){let r={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return {types:{...r,integer:true,boolean:true,null:true},rules:[{rules:[]},r.number,r.string,r.array,r.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=o;})),lR=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:r,self:i},s){let a=i.RULES.types[s];return a&&a!==true&&n(r,a)}e.schemaHasRulesForType=t;function n(r,i){return i.rules.some(s=>o(r,s))}e.shouldUseGroup=n;function o(r,i){var s;return r[i.keyword]!==void 0||((s=i.definition.implements)===null||s===void 0?void 0:s.some(a=>r[a]!==void 0))}e.shouldUseRule=o;})),td=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;let t=uR(),n=lR(),o=rd(),r=Se(),i=Ne();var s;(function(f){f[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong";})(s||(e.DataType=s={}));function a(f){let v=c(f.type);if(v.includes("null")){if(f.nullable===false)throw new Error("type: null contradicts nullable: false")}else {if(!v.length&&f.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');f.nullable===true&&v.push("null");}return v}e.getSchemaTypes=a;function c(f){let v=Array.isArray(f)?f:f?[f]:[];if(v.every(t.isJSONType))return v;throw new Error("type must be JSONType or JSONType[]: "+v.join(","))}e.getJSONTypes=c;function u(f,v){let{gen:x,data:T,opts:R}=f,$=m(v,R.coerceTypes),E=v.length>0&&!($.length===0&&v.length===1&&(0, n.schemaHasRulesForType)(f,v[0]));if(E){let A=p(v,T,R.strictNumbers,s.Wrong);x.if(A,()=>{$.length?h(f,v,$):d(f);});}return E}e.coerceAndCheckDataType=u;let l=new Set(["string","number","integer","boolean","null"]);function m(f,v){return v?f.filter(x=>l.has(x)||v==="array"&&x==="array"):[]}function h(f,v,x){let{gen:T,data:R,opts:$}=f,E=T.let("dataType",(0, r._)`typeof ${R}`),A=T.let("coerced",(0, r._)`undefined`);$.coerceTypes==="array"&&T.if((0, r._)`${E} == 'object' && Array.isArray(${R}) && ${R}.length == 1`,()=>T.assign(R,(0, r._)`${R}[0]`).assign(E,(0, r._)`typeof ${R}`).if(p(v,R,$.strictNumbers),()=>T.assign(A,R))),T.if((0, r._)`${A} !== undefined`);for(let F of x)(l.has(F)||F==="array"&&$.coerceTypes==="array")&&N(F);T.else(),d(f),T.endIf(),T.if((0, r._)`${A} !== undefined`,()=>{T.assign(R,A),y(f,A);});function N(F){switch(F){case "string":T.elseIf((0, r._)`${E} == "number" || ${E} == "boolean"`).assign(A,(0, r._)`"" + ${R}`).elseIf((0, r._)`${R} === null`).assign(A,(0, r._)`""`);return;case "number":T.elseIf((0, r._)`${E} == "boolean" || ${R} === null
66
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let s of e.seen.entries()){let a=s[1];if(t===s[0]){i(s);continue}if(e.external){let u=e.external.registry.get(s[0])?.id;if(t!==s[0]&&u){i(s);continue}}if(e.metadataRegistry.get(s[0])?.id){i(s);continue}if(a.cycle){i(s);continue}if(a.count>1&&e.reused==="ref"){i(s);continue}}}function Or(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=a=>{let c=e.seen.get(a);if(c.ref===null)return;let u=c.def??c.schema,l={...u},m=c.ref;if(c.ref=null,m){o(m);let y=e.seen.get(m),b=y.schema;if(b.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(b)):Object.assign(u,b),Object.assign(u,l),a._zod.parent===m)for(let S in u)S==="$ref"||S==="allOf"||S in l||delete u[S];if(b.$ref&&y.def)for(let S in u)S==="$ref"||S==="allOf"||S in y.def&&JSON.stringify(u[S])===JSON.stringify(y.def[S])&&delete u[S];}let h=a._zod.parent;if(h&&h!==m){o(h);let y=e.seen.get(h);if(y?.schema.$ref&&(u.$ref=y.schema.$ref,y.def))for(let b in u)b==="$ref"||b==="allOf"||b in y.def&&JSON.stringify(u[b])===JSON.stringify(y.def[b])&&delete u[b];}e.override({zodSchema:a,jsonSchema:u,path:c.path??[]});};for(let a of [...e.seen.entries()].reverse())o(a[0]);let r={};if(e.target==="draft-2020-12"?r.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?r.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?r.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let a=e.external.registry.get(t)?.id;if(!a)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(a);}Object.assign(r,n.def??n.schema);let i=e.metadataRegistry.get(t)?.id;i!==void 0&&r.id===i&&delete r.id;let s=e.external?.defs??{};for(let a of e.seen.entries()){let c=a[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,s[c.defId]=c.def);}e.external||Object.keys(s).length>0&&(e.target==="draft-2020-12"?r.$defs=s:r.definitions=s);try{let a=JSON.parse(JSON.stringify(r));return Object.defineProperty(a,"~standard",{value:{...t["~standard"],jsonSchema:{input:$o(t,"input",e.processors),output:$o(t,"output",e.processors)}},enumerable:!1,writable:!1}),a}catch{throw new Error("Error converting schema to JSON.")}}function _t(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return false;n.seen.add(e);let o=e._zod.def;if(o.type==="transform")return true;if(o.type==="array")return _t(o.element,n);if(o.type==="set")return _t(o.valueType,n);if(o.type==="lazy")return _t(o.getter(),n);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return _t(o.innerType,n);if(o.type==="intersection")return _t(o.left,n)||_t(o.right,n);if(o.type==="record"||o.type==="map")return _t(o.keyType,n)||_t(o.valueType,n);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?true:_t(o.in,n)||_t(o.out,n);if(o.type==="object"){for(let r in o.shape)if(_t(o.shape[r],n))return true;return false}if(o.type==="union"){for(let r of o.options)if(_t(r,n))return true;return false}if(o.type==="tuple"){for(let r of o.items)if(_t(r,n))return true;return !!(o.rest&&_t(o.rest,n))}return false}var Mf=(e,t={})=>n=>{let o=Ir({...n,processors:t});return Ce(e,o),zr(o,e),Or(o,e)},$o=(e,t,n={})=>o=>{let{libraryOptions:r,target:i}=o??{},s=Ir({...r??{},target:i,io:t,processors:n});return Ce(e,s),zr(s,e),Or(s,e)};var rw={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},jf=(e,t,n,o)=>{let r=n;r.type="string";let{minimum:i,maximum:s,format:a,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof i=="number"&&(r.minLength=i),typeof s=="number"&&(r.maxLength=s),a&&(r.format=rw[a]??a,r.format===""&&delete r.format,a==="time"&&delete r.format),u&&(r.contentEncoding=u),c&&c.size>0){let l=[...c];l.length===1?r.pattern=l[0].source:l.length>1&&(r.allOf=[...l.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))]);}},Df=(e,t,n,o)=>{let r=n,{minimum:i,maximum:s,format:a,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=e._zod.bag;typeof a=="string"&&a.includes("int")?r.type="integer":r.type="number";let m=typeof l=="number"&&l>=(i??Number.NEGATIVE_INFINITY),h=typeof u=="number"&&u<=(s??Number.POSITIVE_INFINITY),y=t.target==="draft-04"||t.target==="openapi-3.0";m?y?(r.minimum=l,r.exclusiveMinimum=true):r.exclusiveMinimum=l:typeof i=="number"&&(r.minimum=i),h?y?(r.maximum=u,r.exclusiveMaximum=true):r.exclusiveMaximum=u:typeof s=="number"&&(r.maximum=s),typeof c=="number"&&(r.multipleOf=c);},Uf=(e,t,n,o)=>{n.type="boolean";},Lf=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Ff=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},qf=(e,t,n,o)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=true,n.enum=[null]):n.type="null";},Vf=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Bf=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Kf=(e,t,n,o)=>{n.not={};},Gf=(e,t,n,o)=>{},Hf=(e,t,n,o)=>{},Zf=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Jf=(e,t,n,o)=>{let r=e._zod.def,i=zi(r.entries);i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),n.enum=i;},Xf=(e,t,n,o)=>{let r=e._zod.def,i=[];for(let s of r.values)if(s===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(s));}else i.push(s);if(i.length!==0)if(i.length===1){let s=i[0];n.type=s===null?"null":typeof s,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[s]:n.const=s;}else i.every(s=>typeof s=="number")&&(n.type="number"),i.every(s=>typeof s=="string")&&(n.type="string"),i.every(s=>typeof s=="boolean")&&(n.type="boolean"),i.every(s=>s===null)&&(n.type="null"),n.enum=i;},Wf=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Yf=(e,t,n,o)=>{let r=n,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=i.source;},Qf=(e,t,n,o)=>{let r=n,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:a,mime:c}=e._zod.bag;s!==void 0&&(i.minLength=s),a!==void 0&&(i.maxLength=a),c?c.length===1?(i.contentMediaType=c[0],Object.assign(r,i)):(Object.assign(r,i),r.anyOf=c.map(u=>({contentMediaType:u}))):Object.assign(r,i);},eh=(e,t,n,o)=>{n.type="boolean";},th=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},rh=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},nh=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},oh=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},ih=(e,t,n,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},sh=(e,t,n,o)=>{let r=n,i=e._zod.def,{minimum:s,maximum:a}=e._zod.bag;typeof s=="number"&&(r.minItems=s),typeof a=="number"&&(r.maxItems=a),r.type="array",r.items=Ce(i.element,t,{...o,path:[...o.path,"items"]});},ah=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object",r.properties={};let s=i.shape;for(let u in s)r.properties[u]=Ce(s[u],t,{...o,path:[...o.path,"properties",u]});let a=new Set(Object.keys(s)),c=new Set([...a].filter(u=>{let l=i.shape[u]._zod;return t.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(r.required=Array.from(c)),i.catchall?._zod.def.type==="never"?r.additionalProperties=false:i.catchall?i.catchall&&(r.additionalProperties=Ce(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=false);},pc=(e,t,n,o)=>{let r=e._zod.def,i=r.inclusive===false,s=r.options.map((a,c)=>Ce(a,t,{...o,path:[...o.path,i?"oneOf":"anyOf",c]}));i?n.oneOf=s:n.anyOf=s;},ch=(e,t,n,o)=>{let r=e._zod.def,i=Ce(r.left,t,{...o,path:[...o.path,"allOf",0]}),s=Ce(r.right,t,{...o,path:[...o.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,c=[...a(i)?i.allOf:[i],...a(s)?s.allOf:[s]];n.allOf=c;},uh=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="array";let s=t.target==="draft-2020-12"?"prefixItems":"items",a=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((h,y)=>Ce(h,t,{...o,path:[...o.path,s,y]})),u=i.rest?Ce(i.rest,t,{...o,path:[...o.path,a,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=c,u&&(r.items=u)):t.target==="openapi-3.0"?(r.items={anyOf:c},u&&r.items.anyOf.push(u),r.minItems=c.length,u||(r.maxItems=c.length)):(r.items=c,u&&(r.additionalItems=u));let{minimum:l,maximum:m}=e._zod.bag;typeof l=="number"&&(r.minItems=l),typeof m=="number"&&(r.maxItems=m);},lh=(e,t,n,o)=>{let r=n,i=e._zod.def;r.type="object";let s=i.keyType,c=s._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){let l=Ce(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});r.patternProperties={};for(let m of c)r.patternProperties[m.source]=l;}else (t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=Ce(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),r.additionalProperties=Ce(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});let u=s._zod.values;if(u){let l=[...u].filter(m=>typeof m=="string"||typeof m=="number");l.length>0&&(r.required=l);}},dh=(e,t,n,o)=>{let r=e._zod.def,i=Ce(r.innerType,t,o),s=t.seen.get(e);t.target==="openapi-3.0"?(s.ref=r.innerType,n.nullable=true):n.anyOf=[i,{type:"null"}];},mh=(e,t,n,o)=>{let r=e._zod.def;Ce(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType;},ph=(e,t,n,o)=>{let r=e._zod.def;Ce(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue));},fh=(e,t,n,o)=>{let r=e._zod.def;Ce(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)));},hh=(e,t,n,o)=>{let r=e._zod.def;Ce(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType;let s;try{s=r.catchValue(void 0);}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=s;},gh=(e,t,n,o)=>{let r=e._zod.def,i=r.in._zod.traits.has("$ZodTransform"),s=t.io==="input"?i?r.out:r.in:r.out;Ce(s,t,o);let a=t.seen.get(e);a.ref=s;},_h=(e,t,n,o)=>{let r=e._zod.def;Ce(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType,n.readOnly=true;},vh=(e,t,n,o)=>{let r=e._zod.def;Ce(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType;},fc=(e,t,n,o)=>{let r=e._zod.def;Ce(r.innerType,t,o);let i=t.seen.get(e);i.ref=r.innerType;},yh=(e,t,n,o)=>{let r=e._zod.innerType;Ce(r,t,o);let i=t.seen.get(e);i.ref=r;},mc={string:jf,number:Df,boolean:Uf,bigint:Lf,symbol:Ff,null:qf,undefined:Vf,void:Bf,never:Kf,any:Gf,unknown:Hf,date:Zf,enum:Jf,literal:Xf,nan:Wf,template_literal:Yf,file:Qf,success:eh,custom:th,function:rh,transform:nh,map:oh,set:ih,array:sh,object:ah,union:pc,intersection:ch,tuple:uh,record:lh,nullable:dh,nonoptional:mh,default:ph,prefault:fh,catch:hh,pipe:gh,readonly:_h,promise:vh,optional:fc,lazy:yh};function kn(e,t){if("_idmap"in e){let o=e,r=Ir({...t,processors:mc}),i={};for(let c of o._idmap.entries()){let[u,l]=c;Ce(l,r);}let s={},a={registry:o,uri:t?.uri,defs:i};r.external=a;for(let c of o._idmap.entries()){let[u,l]=c;zr(r,l),s[u]=Or(r,l);}if(Object.keys(i).length>0){let c=r.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[c]:i};}return {schemas:s}}let n=Ir({...t,processors:mc});return Ce(e,n),zr(n,e),Or(n,e)}var hc=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t;}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=Ir({processors:mc,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}});}process(t,n={path:[],schemaPath:[]}){return Ce(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),zr(this.ctx,t);let o=Or(this.ctx,t),{"~standard":r,...i}=o;return i}};var Jy={};var Hi={};nr(Hi,{ZodAny:()=>Uh,ZodArray:()=>Vh,ZodBase64:()=>jc,ZodBase64URL:()=>Dc,ZodBigInt:()=>No,ZodBigIntFormat:()=>Fc,ZodBoolean:()=>ko,ZodCIDRv4:()=>Cc,ZodCIDRv6:()=>Mc,ZodCUID:()=>Ic,ZodCUID2:()=>zc,ZodCatch:()=>ug,ZodCodec:()=>ns,ZodCustom:()=>os,ZodCustomStringFormat:()=>zo,ZodDate:()=>Qi,ZodDefault:()=>ng,ZodDiscriminatedUnion:()=>Kh,ZodE164:()=>Uc,ZodEmail:()=>$c,ZodEmoji:()=>wc,ZodEnum:()=>wo,ZodExactOptional:()=>eg,ZodFile:()=>Yh,ZodFunction:()=>vg,ZodGUID:()=>Ji,ZodIPv4:()=>Pc,ZodIPv6:()=>Ac,ZodIntersection:()=>Gh,ZodJWT:()=>Lc,ZodKSUID:()=>Nc,ZodLazy:()=>gg,ZodLiteral:()=>Wh,ZodMAC:()=>Ch,ZodMap:()=>Jh,ZodNaN:()=>dg,ZodNanoID:()=>Ec,ZodNever:()=>Fh,ZodNonOptional:()=>Gc,ZodNull:()=>Dh,ZodNullable:()=>rg,ZodNumber:()=>Oo,ZodNumberFormat:()=>Nn,ZodObject:()=>es,ZodOptional:()=>Kc,ZodPipe:()=>rs,ZodPrefault:()=>ig,ZodPreprocess:()=>mg,ZodPromise:()=>_g,ZodReadonly:()=>pg,ZodRecord:()=>xo,ZodSet:()=>Xh,ZodString:()=>Eo,ZodStringFormat:()=>Ue,ZodSuccess:()=>cg,ZodSymbol:()=>Mh,ZodTemplateLiteral:()=>hg,ZodTransform:()=>Qh,ZodTuple:()=>Hh,ZodType:()=>we,ZodULID:()=>Oc,ZodURL:()=>Yi,ZodUUID:()=>Xt,ZodUndefined:()=>jh,ZodUnion:()=>ts,ZodUnknown:()=>Lh,ZodVoid:()=>qh,ZodXID:()=>kc,ZodXor:()=>Bh,_ZodString:()=>Tc,_default:()=>og,_function:()=>WS,any:()=>qc,array:()=>C,base64:()=>gS,base64url:()=>_S,bigint:()=>IS,boolean:()=>ne,catch:()=>lg,check:()=>YS,cidrv4:()=>fS,cidrv6:()=>hS,codec:()=>HS,cuid:()=>sS,cuid2:()=>aS,custom:()=>QS,date:()=>AS,describe:()=>eb,discriminatedUnion:()=>kr,e164:()=>vS,email:()=>xc,emoji:()=>oS,enum:()=>ge,exactOptional:()=>tg,file:()=>VS,float32:()=>$S,float64:()=>xS,function:()=>WS,guid:()=>Yy,hash:()=>TS,hex:()=>RS,hostname:()=>bS,httpUrl:()=>nS,instanceof:()=>rb,int:()=>bc,int32:()=>wS,int64:()=>zS,intersection:()=>Ft,invertCodec:()=>ZS,ipv4:()=>dS,ipv6:()=>pS,json:()=>ob,jwt:()=>yS,keyof:()=>CS,ksuid:()=>lS,lazy:()=>Nr,literal:()=>M,looseObject:()=>le,looseRecord:()=>US,mac:()=>mS,map:()=>LS,meta:()=>tb,nan:()=>GS,nanoid:()=>iS,nativeEnum:()=>qS,never:()=>Vc,nonoptional:()=>ag,null:()=>Wt,nullable:()=>Xi,nullish:()=>BS,number:()=>H,object:()=>z,optional:()=>ae,partialRecord:()=>DS,pipe:()=>Rc,prefault:()=>sg,preprocess:()=>ar,promise:()=>XS,readonly:()=>fg,record:()=>te,refine:()=>yg,set:()=>FS,strictObject:()=>MS,string:()=>g,stringFormat:()=>SS,stringbool:()=>nb,success:()=>KS,superRefine:()=>Sg,symbol:()=>kS,templateLiteral:()=>JS,transform:()=>Bc,tuple:()=>Zh,uint32:()=>ES,uint64:()=>OS,ulid:()=>cS,undefined:()=>NS,union:()=>ie,unknown:()=>se,url:()=>Io,uuid:()=>Qy,uuidv4:()=>eS,uuidv6:()=>tS,uuidv7:()=>rS,void:()=>PS,xid:()=>uS,xor:()=>jS});var gc={};nr(gc,{endsWith:()=>go,gt:()=>Zt,gte:()=>gt,includes:()=>fo,length:()=>On,lowercase:()=>mo,lt:()=>Ht,lte:()=>zt,maxLength:()=>zn,maxSize:()=>Er,mime:()=>_o,minLength:()=>ir,minSize:()=>Jt,multipleOf:()=>wr,negative:()=>cc,nonnegative:()=>lc,nonpositive:()=>uc,normalize:()=>vo,overwrite:()=>Lt,positive:()=>ac,property:()=>dc,regex:()=>lo,size:()=>In,slugify:()=>Ro,startsWith:()=>ho,toLowerCase:()=>So,toUpperCase:()=>bo,trim:()=>yo,uppercase:()=>po});var Ot={};nr(Ot,{ZodISODate:()=>vc,ZodISODateTime:()=>_c,ZodISODuration:()=>Sc,ZodISOTime:()=>yc,date:()=>bh,datetime:()=>Sh,duration:()=>Th,time:()=>Rh});var _c=P("ZodISODateTime",(e,t)=>{Xm.init(e,t),Ue.init(e,t);});function Sh(e){return ef(_c,e)}var vc=P("ZodISODate",(e,t)=>{Wm.init(e,t),Ue.init(e,t);});function bh(e){return tf(vc,e)}var yc=P("ZodISOTime",(e,t)=>{Ym.init(e,t),Ue.init(e,t);});function Rh(e){return rf(yc,e)}var Sc=P("ZodISODuration",(e,t)=>{Qm.init(e,t),Ue.init(e,t);});function Th(e){return nf(Sc,e)}var Xy=(e,t)=>{Ai.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>Mi(e,n)},flatten:{value:n=>Ci(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,to,2);}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,to,2);}},isEmpty:{get(){return e.issues.length===0}}});},ow=P("ZodError",Xy),$t=P("ZodError",Xy,{Parent:Error});var $h=oo($t),xh=io($t),Zi=so($t),wh=ao($t),Eh=ha($t),Ih=ga($t),zh=_a($t),Oh=va($t),kh=ya($t),Nh=Sa($t),Ph=ba($t),Ah=Ra($t);var Wy=new WeakMap;function Wi(e,t,n){let o=Object.getPrototypeOf(e),r=Wy.get(o);if(r||(r=new Set,Wy.set(o,r)),!r.has(t)){r.add(t);for(let i in n){let s=n[i];Object.defineProperty(o,i,{configurable:true,enumerable:false,get(){let a=s.bind(this);return Object.defineProperty(this,i,{configurable:true,writable:true,enumerable:true,value:a}),a},set(a){Object.defineProperty(this,i,{configurable:true,writable:true,enumerable:true,value:a});}});}}}var we=P("ZodType",(e,t)=>(_e.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:$o(e,"input"),output:$o(e,"output")}}),e.toJSONSchema=Mf(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,o)=>$h(e,n,o,{callee:e.parse}),e.safeParse=(n,o)=>Zi(e,n,o),e.parseAsync=async(n,o)=>xh(e,n,o,{callee:e.parseAsync}),e.safeParseAsync=async(n,o)=>wh(e,n,o),e.spa=e.safeParseAsync,e.encode=(n,o)=>Eh(e,n,o),e.decode=(n,o)=>Ih(e,n,o),e.encodeAsync=async(n,o)=>zh(e,n,o),e.decodeAsync=async(n,o)=>Oh(e,n,o),e.safeEncode=(n,o)=>kh(e,n,o),e.safeDecode=(n,o)=>Nh(e,n,o),e.safeEncodeAsync=async(n,o)=>Ph(e,n,o),e.safeDecodeAsync=async(n,o)=>Ah(e,n,o),Wi(e,"ZodType",{check(...n){let o=this.def;return this.clone(X.mergeDefs(o,{checks:[...o.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:true})},with(...n){return this.check(...n)},clone(n,o){return ft(this,n,o)},brand(){return this},register(n,o){return n.add(this,o),this},refine(n,o){return this.check(yg(n,o))},superRefine(n,o){return this.check(Sg(n,o))},overwrite(n){return this.check(Lt(n))},optional(){return ae(this)},exactOptional(){return tg(this)},nullable(){return Xi(this)},nullish(){return ae(Xi(this))},nonoptional(n){return ag(this,n)},array(){return C(this)},or(n){return ie([this,n])},and(n){return Ft(this,n)},transform(n){return Rc(this,Bc(n))},default(n){return og(this,n)},prefault(n){return sg(this,n)},catch(n){return lg(this,n)},pipe(n){return Rc(this,n)},readonly(){return fg(this)},describe(n){let o=this.clone();return st.add(o,{description:n}),o},meta(...n){if(n.length===0)return st.get(this);let o=this.clone();return st.add(o,n[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return st.get(e)?.description},configurable:true}),e)),Tc=P("_ZodString",(e,t)=>{En.init(e,t),we.init(e,t),e._zod.processJSONSchema=(o,r,i)=>jf(e,o,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Wi(e,"_ZodString",{regex(...o){return this.check(lo(...o))},includes(...o){return this.check(fo(...o))},startsWith(...o){return this.check(ho(...o))},endsWith(...o){return this.check(go(...o))},min(...o){return this.check(ir(...o))},max(...o){return this.check(zn(...o))},length(...o){return this.check(On(...o))},nonempty(...o){return this.check(ir(1,...o))},lowercase(o){return this.check(mo(o))},uppercase(o){return this.check(po(o))},trim(){return this.check(yo())},normalize(...o){return this.check(vo(...o))},toLowerCase(){return this.check(So())},toUpperCase(){return this.check(bo())},slugify(){return this.check(Ro())}});}),Eo=P("ZodString",(e,t)=>{En.init(e,t),Tc.init(e,t),e.email=n=>e.check(Fa($c,n)),e.url=n=>e.check(Gi(Yi,n)),e.jwt=n=>e.check(sc(Lc,n)),e.emoji=n=>e.check(Ga(wc,n)),e.guid=n=>e.check(Ki(Ji,n)),e.uuid=n=>e.check(qa(Xt,n)),e.uuidv4=n=>e.check(Va(Xt,n)),e.uuidv6=n=>e.check(Ba(Xt,n)),e.uuidv7=n=>e.check(Ka(Xt,n)),e.nanoid=n=>e.check(Ha(Ec,n)),e.guid=n=>e.check(Ki(Ji,n)),e.cuid=n=>e.check(Za(Ic,n)),e.cuid2=n=>e.check(Ja(zc,n)),e.ulid=n=>e.check(Xa(Oc,n)),e.base64=n=>e.check(nc(jc,n)),e.base64url=n=>e.check(oc(Dc,n)),e.xid=n=>e.check(Wa(kc,n)),e.ksuid=n=>e.check(Ya(Nc,n)),e.ipv4=n=>e.check(Qa(Pc,n)),e.ipv6=n=>e.check(ec(Ac,n)),e.cidrv4=n=>e.check(tc(Cc,n)),e.cidrv6=n=>e.check(rc(Mc,n)),e.e164=n=>e.check(ic(Uc,n)),e.datetime=n=>e.check(Sh(n)),e.date=n=>e.check(bh(n)),e.time=n=>e.check(Rh(n)),e.duration=n=>e.check(Th(n));});function g(e){return Xp(Eo,e)}var Ue=P("ZodStringFormat",(e,t)=>{De.init(e,t),Tc.init(e,t);}),$c=P("ZodEmail",(e,t)=>{Fm.init(e,t),Ue.init(e,t);});function xc(e){return Fa($c,e)}var Ji=P("ZodGUID",(e,t)=>{Um.init(e,t),Ue.init(e,t);});function Yy(e){return Ki(Ji,e)}var Xt=P("ZodUUID",(e,t)=>{Lm.init(e,t),Ue.init(e,t);});function Qy(e){return qa(Xt,e)}function eS(e){return Va(Xt,e)}function tS(e){return Ba(Xt,e)}function rS(e){return Ka(Xt,e)}var Yi=P("ZodURL",(e,t)=>{qm.init(e,t),Ue.init(e,t);});function Io(e){return Gi(Yi,e)}function nS(e){return Gi(Yi,{protocol:It.httpProtocol,hostname:It.domain,...X.normalizeParams(e)})}var wc=P("ZodEmoji",(e,t)=>{Vm.init(e,t),Ue.init(e,t);});function oS(e){return Ga(wc,e)}var Ec=P("ZodNanoID",(e,t)=>{Bm.init(e,t),Ue.init(e,t);});function iS(e){return Ha(Ec,e)}var Ic=P("ZodCUID",(e,t)=>{Km.init(e,t),Ue.init(e,t);});function sS(e){return Za(Ic,e)}var zc=P("ZodCUID2",(e,t)=>{Gm.init(e,t),Ue.init(e,t);});function aS(e){return Ja(zc,e)}var Oc=P("ZodULID",(e,t)=>{Hm.init(e,t),Ue.init(e,t);});function cS(e){return Xa(Oc,e)}var kc=P("ZodXID",(e,t)=>{Zm.init(e,t),Ue.init(e,t);});function uS(e){return Wa(kc,e)}var Nc=P("ZodKSUID",(e,t)=>{Jm.init(e,t),Ue.init(e,t);});function lS(e){return Ya(Nc,e)}var Pc=P("ZodIPv4",(e,t)=>{ep.init(e,t),Ue.init(e,t);});function dS(e){return Qa(Pc,e)}var Ch=P("ZodMAC",(e,t)=>{rp.init(e,t),Ue.init(e,t);});function mS(e){return Yp(Ch,e)}var Ac=P("ZodIPv6",(e,t)=>{tp.init(e,t),Ue.init(e,t);});function pS(e){return ec(Ac,e)}var Cc=P("ZodCIDRv4",(e,t)=>{np.init(e,t),Ue.init(e,t);});function fS(e){return tc(Cc,e)}var Mc=P("ZodCIDRv6",(e,t)=>{op.init(e,t),Ue.init(e,t);});function hS(e){return rc(Mc,e)}var jc=P("ZodBase64",(e,t)=>{sp.init(e,t),Ue.init(e,t);});function gS(e){return nc(jc,e)}var Dc=P("ZodBase64URL",(e,t)=>{ap.init(e,t),Ue.init(e,t);});function _S(e){return oc(Dc,e)}var Uc=P("ZodE164",(e,t)=>{cp.init(e,t),Ue.init(e,t);});function vS(e){return ic(Uc,e)}var Lc=P("ZodJWT",(e,t)=>{up.init(e,t),Ue.init(e,t);});function yS(e){return sc(Lc,e)}var zo=P("ZodCustomStringFormat",(e,t)=>{lp.init(e,t),Ue.init(e,t);});function SS(e,t,n={}){return To(zo,e,t,n)}function bS(e){return To(zo,"hostname",It.hostname,e)}function RS(e){return To(zo,"hex",It.hex,e)}function TS(e,t){let n=t?.enc??"hex",o=`${e}_${n}`,r=It[o];if(!r)throw new Error(`Unrecognized hash format: ${o}`);return To(zo,o,r,t)}var Oo=P("ZodNumber",(e,t)=>{ka.init(e,t),we.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Df(e,o,r),Wi(e,"ZodNumber",{gt(o,r){return this.check(Zt(o,r))},gte(o,r){return this.check(gt(o,r))},min(o,r){return this.check(gt(o,r))},lt(o,r){return this.check(Ht(o,r))},lte(o,r){return this.check(zt(o,r))},max(o,r){return this.check(zt(o,r))},int(o){return this.check(bc(o))},safe(o){return this.check(bc(o))},positive(o){return this.check(Zt(0,o))},nonnegative(o){return this.check(gt(0,o))},negative(o){return this.check(Ht(0,o))},nonpositive(o){return this.check(zt(0,o))},multipleOf(o,r){return this.check(wr(o,r))},step(o,r){return this.check(wr(o,r))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=true,e.format=n.format??null;});function H(e){return of(Oo,e)}var Nn=P("ZodNumberFormat",(e,t)=>{dp.init(e,t),Oo.init(e,t);});function bc(e){return af(Nn,e)}function $S(e){return cf(Nn,e)}function xS(e){return uf(Nn,e)}function wS(e){return lf(Nn,e)}function ES(e){return df(Nn,e)}var ko=P("ZodBoolean",(e,t)=>{Li.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Uf(e,n,o);});function ne(e){return mf(ko,e)}var No=P("ZodBigInt",(e,t)=>{Na.init(e,t),we.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Lf(e,o),e.gte=(o,r)=>e.check(gt(o,r)),e.min=(o,r)=>e.check(gt(o,r)),e.gt=(o,r)=>e.check(Zt(o,r)),e.gte=(o,r)=>e.check(gt(o,r)),e.min=(o,r)=>e.check(gt(o,r)),e.lt=(o,r)=>e.check(Ht(o,r)),e.lte=(o,r)=>e.check(zt(o,r)),e.max=(o,r)=>e.check(zt(o,r)),e.positive=o=>e.check(Zt(BigInt(0),o)),e.negative=o=>e.check(Ht(BigInt(0),o)),e.nonpositive=o=>e.check(zt(BigInt(0),o)),e.nonnegative=o=>e.check(gt(BigInt(0),o)),e.multipleOf=(o,r)=>e.check(wr(o,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null;});function IS(e){return ff(No,e)}var Fc=P("ZodBigIntFormat",(e,t)=>{mp.init(e,t),No.init(e,t);});function zS(e){return gf(Fc,e)}function OS(e){return _f(Fc,e)}var Mh=P("ZodSymbol",(e,t)=>{pp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Ff(e,n);});function kS(e){return vf(Mh,e)}var jh=P("ZodUndefined",(e,t)=>{fp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Vf(e,n);});function NS(e){return yf(jh,e)}var Dh=P("ZodNull",(e,t)=>{hp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>qf(e,n,o);});function Wt(e){return Sf(Dh,e)}var Uh=P("ZodAny",(e,t)=>{gp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Gf();});function qc(){return bf(Uh)}var Lh=P("ZodUnknown",(e,t)=>{_p.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Hf();});function se(){return Rf(Lh)}var Fh=P("ZodNever",(e,t)=>{vp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Kf(e,n,o);});function Vc(e){return Tf(Fh,e)}var qh=P("ZodVoid",(e,t)=>{yp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Bf(e,n);});function PS(e){return $f(qh,e)}var Qi=P("ZodDate",(e,t)=>{Sp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Zf(e,o),e.min=(o,r)=>e.check(gt(o,r)),e.max=(o,r)=>e.check(zt(o,r));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null;});function AS(e){return xf(Qi,e)}var Vh=P("ZodArray",(e,t)=>{bp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>sh(e,n,o,r),e.element=t.element,Wi(e,"ZodArray",{min(n,o){return this.check(ir(n,o))},nonempty(n){return this.check(ir(1,n))},max(n,o){return this.check(zn(n,o))},length(n,o){return this.check(On(n,o))},unwrap(){return this.element}});});function C(e,t){return If(Vh,e,t)}function CS(e){let t=e._zod.def.shape;return ge(Object.keys(t))}var es=P("ZodObject",(e,t)=>{Rp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ah(e,n,o,r),X.defineLazy(e,"shape",()=>t.shape),Wi(e,"ZodObject",{keyof(){return ge(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:se()})},loose(){return this.clone({...this._zod.def,catchall:se()})},strict(){return this.clone({...this._zod.def,catchall:Vc()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return X.extend(this,n)},safeExtend(n){return X.safeExtend(this,n)},merge(n){return X.merge(this,n)},pick(n){return X.pick(this,n)},omit(n){return X.omit(this,n)},partial(...n){return X.partial(Kc,this,n[0])},required(...n){return X.required(Gc,this,n[0])}});});function z(e,t){let n={type:"object",shape:e??{},...X.normalizeParams(t)};return new es(n)}function MS(e,t){return new es({type:"object",shape:e,catchall:Vc(),...X.normalizeParams(t)})}function le(e,t){return new es({type:"object",shape:e,catchall:se(),...X.normalizeParams(t)})}var ts=P("ZodUnion",(e,t)=>{Fi.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>pc(e,n,o,r),e.options=t.options;});function ie(e,t){return new ts({type:"union",options:e,...X.normalizeParams(t)})}var Bh=P("ZodXor",(e,t)=>{ts.init(e,t),Tp.init(e,t),e._zod.processJSONSchema=(n,o,r)=>pc(e,n,o,r),e.options=t.options;});function jS(e,t){return new Bh({type:"union",options:e,inclusive:false,...X.normalizeParams(t)})}var Kh=P("ZodDiscriminatedUnion",(e,t)=>{ts.init(e,t),$p.init(e,t);});function kr(e,t,n){return new Kh({type:"union",options:t,discriminator:e,...X.normalizeParams(n)})}var Gh=P("ZodIntersection",(e,t)=>{xp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ch(e,n,o,r);});function Ft(e,t){return new Gh({type:"intersection",left:e,right:t})}var Hh=P("ZodTuple",(e,t)=>{Pa.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>uh(e,n,o,r),e.rest=n=>e.clone({...e._zod.def,rest:n});});function Zh(e,t,n){let o=t instanceof _e,r=o?n:t,i=o?t:null;return new Hh({type:"tuple",items:e,rest:i,...X.normalizeParams(r)})}var xo=P("ZodRecord",(e,t)=>{wp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>lh(e,n,o,r),e.keyType=t.keyType,e.valueType=t.valueType;});function te(e,t,n){return !t||!t._zod?new xo({type:"record",keyType:g(),valueType:e,...X.normalizeParams(t)}):new xo({type:"record",keyType:e,valueType:t,...X.normalizeParams(n)})}function DS(e,t,n){let o=ft(e);return o._zod.values=void 0,new xo({type:"record",keyType:o,valueType:t,...X.normalizeParams(n)})}function US(e,t,n){return new xo({type:"record",keyType:e,valueType:t,mode:"loose",...X.normalizeParams(n)})}var Jh=P("ZodMap",(e,t)=>{Ep.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>oh(e,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Jt(...n)),e.nonempty=n=>e.check(Jt(1,n)),e.max=(...n)=>e.check(Er(...n)),e.size=(...n)=>e.check(In(...n));});function LS(e,t,n){return new Jh({type:"map",keyType:e,valueType:t,...X.normalizeParams(n)})}var Xh=P("ZodSet",(e,t)=>{Ip.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ih(e,n),e.min=(...n)=>e.check(Jt(...n)),e.nonempty=n=>e.check(Jt(1,n)),e.max=(...n)=>e.check(Er(...n)),e.size=(...n)=>e.check(In(...n));});function FS(e,t){return new Xh({type:"set",valueType:e,...X.normalizeParams(t)})}var wo=P("ZodEnum",(e,t)=>{zp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(o,r,i)=>Jf(e,o,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(o,r)=>{let i={};for(let s of o)if(n.has(s))i[s]=t.entries[s];else throw new Error(`Key ${s} not found in enum`);return new wo({...t,checks:[],...X.normalizeParams(r),entries:i})},e.exclude=(o,r)=>{let i={...t.entries};for(let s of o)if(n.has(s))delete i[s];else throw new Error(`Key ${s} not found in enum`);return new wo({...t,checks:[],...X.normalizeParams(r),entries:i})};});function ge(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new wo({type:"enum",entries:n,...X.normalizeParams(t)})}function qS(e,t){return new wo({type:"enum",entries:e,...X.normalizeParams(t)})}var Wh=P("ZodLiteral",(e,t)=>{Op.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Xf(e,n,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}});});function M(e,t){return new Wh({type:"literal",values:Array.isArray(e)?e:[e],...X.normalizeParams(t)})}var Yh=P("ZodFile",(e,t)=>{kp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Qf(e,n,o),e.min=(n,o)=>e.check(Jt(n,o)),e.max=(n,o)=>e.check(Er(n,o)),e.mime=(n,o)=>e.check(_o(Array.isArray(n)?n:[n],o));});function VS(e){return zf(Yh,e)}var Qh=P("ZodTransform",(e,t)=>{Np.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>nh(e,n),e._zod.parse=(n,o)=>{if(o.direction==="backward")throw new br(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(X.issue(i,n.value,t));else {let s=i;s.fatal&&(s.continue=false),s.code??(s.code="custom"),s.input??(s.input=n.value),s.inst??(s.inst=e),n.issues.push(X.issue(s));}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(i=>(n.value=i,n.fallback=true,n)):(n.value=r,n.fallback=true,n)};});function Bc(e){return new Qh({type:"transform",transform:e})}var Kc=P("ZodOptional",(e,t)=>{Aa.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>fc(e,n,o,r),e.unwrap=()=>e._zod.def.innerType;});function ae(e){return new Kc({type:"optional",innerType:e})}var eg=P("ZodExactOptional",(e,t)=>{Pp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>fc(e,n,o,r),e.unwrap=()=>e._zod.def.innerType;});function tg(e){return new eg({type:"optional",innerType:e})}var rg=P("ZodNullable",(e,t)=>{Ap.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>dh(e,n,o,r),e.unwrap=()=>e._zod.def.innerType;});function Xi(e){return new rg({type:"nullable",innerType:e})}function BS(e){return ae(Xi(e))}var ng=P("ZodDefault",(e,t)=>{Cp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>ph(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap;});function og(e,t){return new ng({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():X.shallowClone(t)}})}var ig=P("ZodPrefault",(e,t)=>{Mp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>fh(e,n,o,r),e.unwrap=()=>e._zod.def.innerType;});function sg(e,t){return new ig({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():X.shallowClone(t)}})}var Gc=P("ZodNonOptional",(e,t)=>{jp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>mh(e,n,o,r),e.unwrap=()=>e._zod.def.innerType;});function ag(e,t){return new Gc({type:"nonoptional",innerType:e,...X.normalizeParams(t)})}var cg=P("ZodSuccess",(e,t)=>{Dp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>eh(e,n,o),e.unwrap=()=>e._zod.def.innerType;});function KS(e){return new cg({type:"success",innerType:e})}var ug=P("ZodCatch",(e,t)=>{Up.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>hh(e,n,o,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap;});function lg(e,t){return new ug({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var dg=P("ZodNaN",(e,t)=>{Lp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Wf(e,n);});function GS(e){return Ef(dg,e)}var rs=P("ZodPipe",(e,t)=>{Ca.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>gh(e,n,o,r),e.in=t.in,e.out=t.out;});function Rc(e,t){return new rs({type:"pipe",in:e,out:t})}var ns=P("ZodCodec",(e,t)=>{rs.init(e,t),qi.init(e,t);});function HS(e,t,n){return new ns({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function ZS(e){let t=e._zod.def;return new ns({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var mg=P("ZodPreprocess",(e,t)=>{rs.init(e,t),Fp.init(e,t);}),pg=P("ZodReadonly",(e,t)=>{qp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>_h(e,n,o,r),e.unwrap=()=>e._zod.def.innerType;});function fg(e){return new pg({type:"readonly",innerType:e})}var hg=P("ZodTemplateLiteral",(e,t)=>{Vp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>Yf(e,n,o);});function JS(e,t){return new hg({type:"template_literal",parts:e,...X.normalizeParams(t)})}var gg=P("ZodLazy",(e,t)=>{Gp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>yh(e,n,o,r),e.unwrap=()=>e._zod.def.getter();});function Nr(e){return new gg({type:"lazy",getter:e})}var _g=P("ZodPromise",(e,t)=>{Kp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>vh(e,n,o,r),e.unwrap=()=>e._zod.def.innerType;});function XS(e){return new _g({type:"promise",innerType:e})}var vg=P("ZodFunction",(e,t)=>{Bp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>rh(e,n);});function WS(e){return new vg({type:"function",input:Array.isArray(e?.input)?Zh(e?.input):e?.input??C(se()),output:e?.output??se()})}var os=P("ZodCustom",(e,t)=>{Hp.init(e,t),we.init(e,t),e._zod.processJSONSchema=(n,o,r)=>th(e,n);});function YS(e){let t=new Fe({check:"custom"});return t._zod.check=e,t}function QS(e,t){return Of(os,e??(()=>true),t)}function yg(e,t={}){return kf(os,e,t)}function Sg(e,t){return Nf(e,t)}var eb=Pf,tb=Af;function rb(e,t={}){let n=new os({type:"custom",check:"custom",fn:o=>o instanceof e,abort:true,...X.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:n,path:[...n._zod.def.path??[]]});},n}var nb=(...e)=>Cf({Codec:ns,Boolean:ko,String:Eo},...e);function ob(e){let t=Nr(()=>ie([g(e),H(),ne(),Wt(),C(t),te(g(),t)]));return t}function ar(e,t){return new mg({type:"pipe",in:Bc(e),out:t})}var Rg={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function sw(e){Ke({customError:e});}function aw(){return Ke().customError}var bg;bg||(bg={});var oe={...Hi,...gc,iso:Ot},cw=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function uw(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function lw(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let o=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===o){let r=n[1];if(!r||!t.defs[r])throw new Error(`Reference not found: ${e}`);return t.defs[r]}throw new Error(`Reference not found: ${e}`)}function ib(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return oe.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let r=e.$ref;if(t.refs.has(r))return t.refs.get(r);if(t.processing.has(r))return oe.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let i=lw(r,t),s=dt(i,t);return t.refs.set(r,s),t.processing.delete(r),s}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===true&&r.length===1&&r[0]===null)return oe.null();if(r.length===0)return oe.never();if(r.length===1)return oe.literal(r[0]);if(r.every(s=>typeof s=="string"))return oe.enum(r);let i=r.map(s=>oe.literal(s));return i.length<2?i[0]:oe.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return oe.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(i=>{let s={...e,type:i};return ib(s,t)});return r.length===0?oe.never():r.length===1?r[0]:oe.union(r)}if(!n)return oe.any();let o;switch(n){case "string":{let r=oe.string();if(e.format){let i=e.format;i==="email"?r=r.check(oe.email()):i==="uri"||i==="uri-reference"?r=r.check(oe.url()):i==="uuid"||i==="guid"?r=r.check(oe.uuid()):i==="date-time"?r=r.check(oe.iso.datetime()):i==="date"?r=r.check(oe.iso.date()):i==="time"?r=r.check(oe.iso.time()):i==="duration"?r=r.check(oe.iso.duration()):i==="ipv4"?r=r.check(oe.ipv4()):i==="ipv6"?r=r.check(oe.ipv6()):i==="mac"?r=r.check(oe.mac()):i==="cidr"?r=r.check(oe.cidrv4()):i==="cidr-v6"?r=r.check(oe.cidrv6()):i==="base64"?r=r.check(oe.base64()):i==="base64url"?r=r.check(oe.base64url()):i==="e164"?r=r.check(oe.e164()):i==="jwt"?r=r.check(oe.jwt()):i==="emoji"?r=r.check(oe.emoji()):i==="nanoid"?r=r.check(oe.nanoid()):i==="cuid"?r=r.check(oe.cuid()):i==="cuid2"?r=r.check(oe.cuid2()):i==="ulid"?r=r.check(oe.ulid()):i==="xid"?r=r.check(oe.xid()):i==="ksuid"&&(r=r.check(oe.ksuid()));}typeof e.minLength=="number"&&(r=r.min(e.minLength)),typeof e.maxLength=="number"&&(r=r.max(e.maxLength)),e.pattern&&(r=r.regex(new RegExp(e.pattern))),o=r;break}case "number":case "integer":{let r=n==="integer"?oe.number().int():oe.number();typeof e.minimum=="number"&&(r=r.min(e.minimum)),typeof e.maximum=="number"&&(r=r.max(e.maximum)),typeof e.exclusiveMinimum=="number"?r=r.gt(e.exclusiveMinimum):e.exclusiveMinimum===true&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===true&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),o=r;break}case "boolean":{o=oe.boolean();break}case "null":{o=oe.null();break}case "object":{let r={},i=e.properties||{},s=new Set(e.required||[]);for(let[c,u]of Object.entries(i)){let l=dt(u,t);r[c]=s.has(c)?l:l.optional();}if(e.propertyNames){let c=dt(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?dt(e.additionalProperties,t):oe.any();if(Object.keys(r).length===0){o=oe.record(c,u);break}let l=oe.object(r).passthrough(),m=oe.looseRecord(c,u);o=oe.intersection(l,m);break}if(e.patternProperties){let c=e.patternProperties,u=Object.keys(c),l=[];for(let h of u){let y=dt(c[h],t),b=oe.string().regex(new RegExp(h));l.push(oe.looseRecord(b,y));}let m=[];if(Object.keys(r).length>0&&m.push(oe.object(r).passthrough()),m.push(...l),m.length===0)o=oe.object({}).passthrough();else if(m.length===1)o=m[0];else {let h=oe.intersection(m[0],m[1]);for(let y=2;y<m.length;y++)h=oe.intersection(h,m[y]);o=h;}break}let a=oe.object(r);e.additionalProperties===false?o=a.strict():typeof e.additionalProperties=="object"?o=a.catchall(dt(e.additionalProperties,t)):o=a.passthrough();break}case "array":{let r=e.prefixItems,i=e.items;if(r&&Array.isArray(r)){let s=r.map(c=>dt(c,t)),a=i&&typeof i=="object"&&!Array.isArray(i)?dt(i,t):void 0;a?o=oe.tuple(s).rest(a):o=oe.tuple(s),typeof e.minItems=="number"&&(o=o.check(oe.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(oe.maxLength(e.maxItems)));}else if(Array.isArray(i)){let s=i.map(c=>dt(c,t)),a=e.additionalItems&&typeof e.additionalItems=="object"?dt(e.additionalItems,t):void 0;a?o=oe.tuple(s).rest(a):o=oe.tuple(s),typeof e.minItems=="number"&&(o=o.check(oe.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(oe.maxLength(e.maxItems)));}else if(i!==void 0){let s=dt(i,t),a=oe.array(s);typeof e.minItems=="number"&&(a=a.min(e.minItems)),typeof e.maxItems=="number"&&(a=a.max(e.maxItems)),o=a;}else o=oe.array(oe.any());break}default:throw new Error(`Unsupported type: ${n}`)}return o}function dt(e,t){if(typeof e=="boolean")return e?oe.any():oe.never();let n=ib(e,t),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let a=e.anyOf.map(u=>dt(u,t)),c=oe.union(a);n=o?oe.intersection(n,c):c;}if(e.oneOf&&Array.isArray(e.oneOf)){let a=e.oneOf.map(u=>dt(u,t)),c=oe.xor(a);n=o?oe.intersection(n,c):c;}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=o?n:oe.any();else {let a=o?n:dt(e.allOf[0],t),c=o?0:1;for(let u=c;u<e.allOf.length;u++)a=oe.intersection(a,dt(e.allOf[u],t));n=a;}e.nullable===true&&t.version==="openapi-3.0"&&(n=oe.nullable(n)),e.readOnly===true&&(n=oe.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let r={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of i)a in e&&(r[a]=e[a]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let a of s)a in e&&(r[a]=e[a]);for(let a of Object.keys(e))cw.has(a)||(r[a]=e[a]);return Object.keys(r).length>0&&t.registry.add(n,r),e.description&&(n=n.describe(e.description)),n}function sb(e,t){if(typeof e=="boolean")return e?oe.any():oe.never();let n;try{n=JSON.parse(JSON.stringify(e));}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let o=uw(n,t?.defaultTarget),r=n.$defs||n.definitions||{},i={version:o,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??st};return dt(n,i)}var is={};nr(is,{bigint:()=>fw,boolean:()=>pw,date:()=>hw,number:()=>mw,string:()=>dw});function dw(e){return Wp(Eo,e)}function mw(e){return sf(Oo,e)}function pw(e){return pf(ko,e)}function fw(e){return hf(No,e)}function hw(e){return wf(Qi,e)}Ke(Ma());var An="2025-11-25";var Hc=[An,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Zc="io.modelcontextprotocol/related-task",ur="io.modelcontextprotocol/protocolVersion",Po="io.modelcontextprotocol/clientInfo",Yt="io.modelcontextprotocol/serverInfo",lr="io.modelcontextprotocol/clientCapabilities",Cn="io.modelcontextprotocol/subscriptionId",Ar="io.modelcontextprotocol/logLevel";var Mn="2.0";var Pr=Nr(()=>ie([g(),H(),ne(),Wt(),te(g(),Pr),C(Pr)])),Ge=te(g(),Pr),$g=C(Pr),ss=ie([g(),H().int()]),as=g(),Jc=z({ttl:H().optional()}),Xc=z({taskId:g()}),cs=le({progressToken:ss.optional(),[Zc]:Xc.optional()}),it=z({_meta:cs.optional()}),jn=it.extend({task:Jc.optional()}),He=z({method:g(),params:it.loose().optional()}),mt=z({_meta:cs.optional()}),pt=z({method:g(),params:mt.loose().optional()}),us=le({get[Yt](){return Mo.optional().catch(void 0)}}),Ze=le({_meta:us.optional()}),Cr=ie([g(),H().int()]),ls=z({jsonrpc:M(Mn),id:Cr,...He.shape}).strict(),ds=z({jsonrpc:M(Mn),...pt.shape}).strict(),Ao=z({jsonrpc:M(Mn),id:Cr,result:Ze}).strict(),Co=z({jsonrpc:M(Mn),id:Cr.optional(),error:z({code:H().int(),message:g(),data:se().optional()})}).strict(),ms=ie([ls,ds,Ao,Co]),xg=ie([Ao,Co]),ps=Ze.strict(),Wc=mt.extend({requestId:Cr.optional(),reason:g().optional()}),fs=pt.extend({method:M("notifications/cancelled"),params:Wc}),Yc=z({src:g(),mimeType:g().optional(),sizes:C(g()).optional(),theme:ge(["light","dark"]).optional()}),Mr=z({icons:C(Yc).optional()}),cr=z({name:g(),title:g().optional()}),Mo=cr.extend({...cr.shape,...Mr.shape,version:g(),websiteUrl:g().optional(),description:g().optional()}),_w=Ft(z({applyDefaults:ne().optional()}),Ge),vw=ar(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Ft(z({form:_w.optional(),url:Ge.optional()}),Ge.optional())),Qc=le({list:Ge.optional(),cancel:Ge.optional(),requests:le({sampling:le({createMessage:Ge.optional()}).optional(),elicitation:le({create:Ge.optional()}).optional()}).optional()}),eu=le({list:Ge.optional(),cancel:Ge.optional(),requests:le({tools:le({call:Ge.optional()}).optional()}).optional()}),tu=z({experimental:te(g(),Ge).optional(),sampling:z({context:Ge.optional(),tools:Ge.optional()}).optional(),elicitation:vw.optional(),roots:z({listChanged:ne().optional()}).optional(),tasks:Qc.optional(),extensions:te(g(),Ge).optional()}),ru=it.extend({protocolVersion:g(),capabilities:tu,clientInfo:Mo}),nu=He.extend({method:M("initialize"),params:ru}),hs=z({experimental:te(g(),Ge).optional(),logging:Ge.optional(),completions:Ge.optional(),prompts:z({listChanged:ne().optional()}).optional(),resources:z({subscribe:ne().optional(),listChanged:ne().optional()}).optional(),tools:z({listChanged:ne().optional()}).optional(),tasks:eu.optional(),extensions:te(g(),Ge).optional()}),ou=Ze.extend({protocolVersion:g(),capabilities:hs,serverInfo:Mo,instructions:g().optional()}),iu=pt.extend({method:M("notifications/initialized"),params:mt.optional()}),su=He.extend({method:M("server/discover"),params:it.optional()}),au=Ze.extend({supportedVersions:C(g()),capabilities:hs,instructions:g().optional()}),gs=He.extend({method:M("ping"),params:it.optional()}),cu=z({progress:H(),total:ae(H()),message:ae(g())}),uu=z({...mt.shape,...cu.shape,progressToken:ss}),_s=pt.extend({method:M("notifications/progress"),params:uu}),lu=it.extend({cursor:as.optional()}),jr=He.extend({params:lu.optional()}),Dr=Ze.extend({nextCursor:as.optional()}),vs=z({uri:g(),mimeType:ae(g()),_meta:te(g(),se()).optional()}),ys=vs.extend({text:g()}),wg=g().refine(e=>{try{return atob(e),!0}catch{return false}},{message:"Invalid Base64 string"}),Ss=vs.extend({blob:wg}),Ur=ge(["user","assistant"]),dr=z({audience:C(Ur).optional(),priority:H().min(0).max(1).optional(),lastModified:Ot.datetime({offset:true}).optional()}),bs=z({...cr.shape,...Mr.shape,uri:g(),description:ae(g()),mimeType:ae(g()),size:ae(H()),annotations:dr.optional(),_meta:ae(le({}))}),du=z({...cr.shape,...Mr.shape,uriTemplate:g(),description:ae(g()),mimeType:ae(g()),annotations:dr.optional(),_meta:ae(le({}))}),mu=jr.extend({method:M("resources/list")}),pu=Dr.extend({resources:C(bs)}),fu=jr.extend({method:M("resources/templates/list")}),hu=Dr.extend({resourceTemplates:C(du)}),jo=it.extend({uri:g()}),gu=jo,_u=He.extend({method:M("resources/read"),params:gu}),vu=Ze.extend({contents:C(ie([ys,Ss]))}),yu=pt.extend({method:M("notifications/resources/list_changed"),params:mt.optional()}),Su=jo,bu=He.extend({method:M("resources/subscribe"),params:Su}),Ru=jo,Tu=He.extend({method:M("resources/unsubscribe"),params:Ru}),Rs=z({toolsListChanged:ne().optional(),promptsListChanged:ne().optional(),resourcesListChanged:ne().optional(),resourceSubscriptions:C(g()).optional()}),$u=it.extend({notifications:Rs}),xu=He.extend({method:M("subscriptions/listen"),params:$u}),wu=mt.extend({notifications:Rs}),Eu=pt.extend({method:M("notifications/subscriptions/acknowledged"),params:wu}),Iu=us.extend({[Cn]:Cr}),zu=Ze.extend({_meta:Iu}),Ou=mt.extend({uri:g()}),ku=pt.extend({method:M("notifications/resources/updated"),params:Ou}),Nu=z({name:g(),description:ae(g()),required:ae(ne())}),Pu=z({...cr.shape,...Mr.shape,description:ae(g()),arguments:ae(C(Nu)),_meta:ae(le({}))}),Au=jr.extend({method:M("prompts/list")}),Cu=Dr.extend({prompts:C(Pu)}),Mu=it.extend({name:g(),arguments:te(g(),g()).optional()}),ju=He.extend({method:M("prompts/get"),params:Mu}),Do=z({type:M("text"),text:g(),annotations:dr.optional(),_meta:te(g(),se()).optional()}),Uo=z({type:M("image"),data:wg,mimeType:g(),annotations:dr.optional(),_meta:te(g(),se()).optional()}),Lo=z({type:M("audio"),data:wg,mimeType:g(),annotations:dr.optional(),_meta:te(g(),se()).optional()}),Du=z({type:M("tool_use"),name:g(),id:g(),input:te(g(),se()),_meta:te(g(),se()).optional()}),Uu=z({type:M("resource"),resource:ie([ys,Ss]),annotations:dr.optional(),_meta:te(g(),se()).optional()}),Lu=bs.extend({type:M("resource_link")}),Fo=ie([Do,Uo,Lo,Lu,Uu]),Fu=z({role:Ur,content:Fo}),qu=Ze.extend({description:g().optional(),messages:C(Fu)}),Vu=pt.extend({method:M("notifications/prompts/list_changed"),params:mt.optional()}),Bu=z({title:g().optional(),readOnlyHint:ne().optional(),destructiveHint:ne().optional(),idempotentHint:ne().optional(),openWorldHint:ne().optional()}),Ku=z({taskSupport:ge(["required","optional","forbidden"]).optional()}),Ts=z({...cr.shape,...Mr.shape,description:g().optional(),inputSchema:z({type:M("object"),properties:te(g(),Pr).optional(),required:C(g()).optional()}).catchall(se()),outputSchema:le({$schema:g().optional()}).optional(),annotations:Bu.optional(),execution:Ku.optional(),_meta:te(g(),se()).optional()}),Gu=jr.extend({method:M("tools/list")}),Hu=Dr.extend({tools:C(Ts)}),$s=Ze.extend({content:C(Fo).default([]),structuredContent:se().optional(),isError:ne().optional()}),Eg=$s.or(Ze.extend({toolResult:se()})),Zu=jn.extend({name:g(),arguments:te(g(),se()).optional()}),Ju=He.extend({method:M("tools/call"),params:Zu}),Xu=pt.extend({method:M("notifications/tools/list_changed"),params:mt.optional()}),Ig=z({autoRefresh:ne().default(true),debounceMs:H().int().nonnegative().default(300)}),Lr=ge(["debug","info","notice","warning","error","critical","alert","emergency"]),Wu=it.extend({level:Lr}),Yu=He.extend({method:M("logging/setLevel"),params:Wu}),Qu=mt.extend({level:Lr,logger:g().optional(),data:se()}),el=pt.extend({method:M("notifications/message"),params:Qu}),tl=z({name:g().optional()}),rl=z({hints:C(tl).optional(),costPriority:H().min(0).max(1).optional(),speedPriority:H().min(0).max(1).optional(),intelligencePriority:H().min(0).max(1).optional()}),nl=z({mode:ge(["auto","required","none"]).optional()}),ol=z({type:M("tool_result"),toolUseId:g().describe("The unique identifier for the corresponding tool call."),content:C(Fo),structuredContent:se().optional(),isError:ne().optional(),_meta:te(g(),se()).optional()}),il=kr("type",[Do,Uo,Lo]),Pn=kr("type",[Do,Uo,Lo,Du,ol]),sl=z({role:Ur,content:ie([Pn,C(Pn)]),_meta:te(g(),se()).optional()}),al=jn.extend({messages:C(sl),modelPreferences:rl.optional(),systemPrompt:g().optional(),includeContext:ge(["none","thisServer","allServers"]).optional(),temperature:H().optional(),maxTokens:H().int(),stopSequences:C(g()).optional(),metadata:Ge.optional(),tools:C(Ts).optional(),toolChoice:nl.optional()}),cl=He.extend({method:M("sampling/createMessage"),params:al}),ul=Ze.extend({model:g(),stopReason:ae(ge(["endTurn","stopSequence","maxTokens"]).or(g())),role:Ur,content:il}),ll=Ze.extend({model:g(),stopReason:ae(ge(["endTurn","stopSequence","maxTokens","toolUse"]).or(g())),role:Ur,content:ie([Pn,C(Pn)])}),xs=z({type:M("boolean"),title:g().optional(),description:g().optional(),default:ne().optional()}),qo=z({type:M("string"),title:g().optional(),description:g().optional(),minLength:H().optional(),maxLength:H().optional(),format:ge(["email","uri","date","date-time"]).optional(),default:g().optional()}),Vo=z({type:ge(["number","integer"]),title:g().optional(),description:g().optional(),minimum:H().optional(),maximum:H().optional(),default:H().optional()}),ws=z({type:M("string"),title:g().optional(),description:g().optional(),enum:C(g()),default:g().optional()}),Es=z({type:M("string"),title:g().optional(),description:g().optional(),oneOf:C(z({const:g(),title:g()})),default:g().optional()}),Is=z({type:M("string"),title:g().optional(),description:g().optional(),enum:C(g()),enumNames:C(g()).optional(),default:g().optional()}),dl=ie([ws,Es]),zs=z({type:M("array"),title:g().optional(),description:g().optional(),minItems:H().optional(),maxItems:H().optional(),items:z({type:M("string"),enum:C(g())}),default:C(g()).optional()}),Os=z({type:M("array"),title:g().optional(),description:g().optional(),minItems:H().optional(),maxItems:H().optional(),items:z({anyOf:C(z({const:g(),title:g()}))}),default:C(g()).optional()}),ml=ie([zs,Os]),pl=ie([Is,dl,ml]),ks=ie([pl,xs,qo,Vo]),Bo=jn.extend({mode:M("form").optional(),message:g(),requestedSchema:z({type:M("object"),properties:te(g(),ks),required:C(g()).optional()}).catchall(se())}),fl=jn.extend({mode:M("url"),message:g(),elicitationId:g(),url:g().url()}),hl=ie([Bo,fl]),gl=He.extend({method:M("elicitation/create"),params:hl}),_l=mt.extend({elicitationId:g()}),vl=pt.extend({method:M("notifications/elicitation/complete"),params:_l}),yl=Ze.extend({action:ge(["accept","decline","cancel"]),content:ar(e=>e===null?void 0:e,te(g(),ie([g(),H(),ne(),C(g())])).optional())}),Sl=z({type:M("ref/resource"),uri:g()}),bl=z({type:M("ref/prompt"),name:g()}),Rl=it.extend({ref:ie([bl,Sl]),argument:z({name:g(),value:g()}),context:z({arguments:te(g(),g()).optional()}).optional()}),Tl=He.extend({method:M("completion/complete"),params:Rl}),$l=Ze.extend({completion:le({values:C(g()).max(100),total:ae(H().int()),hasMore:ae(ne())})}),xl=z({uri:g().startsWith("file://"),name:g().optional(),_meta:te(g(),se()).optional()}),wl=He.extend({method:M("roots/list"),params:it.optional()}),El=Ze.extend({roots:C(xl)}),Il=pt.extend({method:M("notifications/roots/list_changed"),params:mt.optional()}),zg=le({ttl:H().optional(),pollInterval:H().optional()}),zl=ge(["working","input_required","completed","failed","cancelled"]),Fr=z({taskId:g(),status:zl,ttl:ie([H(),Wt()]),createdAt:g(),lastUpdatedAt:g(),pollInterval:ae(H()),statusMessage:ae(g())}),Og=Ze.extend({task:Fr}),Ol=mt.merge(Fr),kg=pt.extend({method:M("notifications/tasks/status"),params:Ol}),Ng=He.extend({method:M("tasks/get"),params:it.extend({taskId:g()})}),Pg=Ze.merge(Fr),Ag=He.extend({method:M("tasks/result"),params:it.extend({taskId:g()})}),Cg=Ze.loose(),Mg=jr.extend({method:M("tasks/list")}),jg=Dr.extend({tasks:C(Fr)}),Dg=He.extend({method:M("tasks/cancel"),params:it.extend({taskId:g()})}),Ug=Ze.merge(Fr),Lg=ie([gs,nu,su,Tl,Yu,ju,Au,mu,fu,_u,bu,Tu,xu,Ju,Gu]),Fg=ie([fs,_s,iu,Il]),qg=ie([ps,ul,ll,yl,El]),Vg=ie([gs,cl,gl,wl]),Bg=ie([fs,_s,el,ku,yu,Xu,Vu,Eu,vl]),Kg=ie([ps,ou,au,$l,qu,Cu,pu,hu,vu,$s,Hu,zu]),ot=Io().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Rg.custom,message:"URL must be parseable",fatal:true}),Ei}).refine(e=>{let t=new URL(e);return t.protocol!=="javascript:"&&t.protocol!=="data:"&&t.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),Gg=le({resource:g().url(),authorization_servers:C(ot).optional(),jwks_uri:g().url().optional(),scopes_supported:C(g()).optional(),bearer_methods_supported:C(g()).optional(),resource_signing_alg_values_supported:C(g()).optional(),resource_name:g().optional(),resource_documentation:g().optional(),resource_policy_uri:g().url().optional(),resource_tos_uri:g().url().optional(),tls_client_certificate_bound_access_tokens:ne().optional(),authorization_details_types_supported:C(g()).optional(),dpop_signing_alg_values_supported:C(g()).optional(),dpop_bound_access_tokens_required:ne().optional()}),kl=le({issuer:g(),authorization_endpoint:ot,token_endpoint:ot,registration_endpoint:ot.optional(),scopes_supported:C(g()).optional(),response_types_supported:C(g()),response_modes_supported:C(g()).optional(),grant_types_supported:C(g()).optional(),token_endpoint_auth_methods_supported:C(g()).optional(),token_endpoint_auth_signing_alg_values_supported:C(g()).optional(),service_documentation:ot.optional(),revocation_endpoint:ot.optional(),revocation_endpoint_auth_methods_supported:C(g()).optional(),revocation_endpoint_auth_signing_alg_values_supported:C(g()).optional(),introspection_endpoint:g().optional(),introspection_endpoint_auth_methods_supported:C(g()).optional(),introspection_endpoint_auth_signing_alg_values_supported:C(g()).optional(),code_challenge_methods_supported:C(g()).optional(),client_id_metadata_document_supported:ne().optional(),authorization_response_iss_parameter_supported:ne().optional().catch(void 0)}),Nl=le({issuer:g(),authorization_endpoint:ot,token_endpoint:ot,userinfo_endpoint:ot.optional(),jwks_uri:ot,registration_endpoint:ot.optional(),scopes_supported:C(g()).optional(),response_types_supported:C(g()),response_modes_supported:C(g()).optional(),grant_types_supported:C(g()).optional(),acr_values_supported:C(g()).optional(),subject_types_supported:C(g()),id_token_signing_alg_values_supported:C(g()),id_token_encryption_alg_values_supported:C(g()).optional(),id_token_encryption_enc_values_supported:C(g()).optional(),userinfo_signing_alg_values_supported:C(g()).optional(),userinfo_encryption_alg_values_supported:C(g()).optional(),userinfo_encryption_enc_values_supported:C(g()).optional(),request_object_signing_alg_values_supported:C(g()).optional(),request_object_encryption_alg_values_supported:C(g()).optional(),request_object_encryption_enc_values_supported:C(g()).optional(),token_endpoint_auth_methods_supported:C(g()).optional(),token_endpoint_auth_signing_alg_values_supported:C(g()).optional(),display_values_supported:C(g()).optional(),claim_types_supported:C(g()).optional(),claims_supported:C(g()).optional(),service_documentation:g().optional(),claims_locales_supported:C(g()).optional(),ui_locales_supported:C(g()).optional(),claims_parameter_supported:ne().optional(),request_parameter_supported:ne().optional(),request_uri_parameter_supported:ne().optional(),require_request_uri_registration:ne().optional(),op_policy_uri:ot.optional(),op_tos_uri:ot.optional(),client_id_metadata_document_supported:ne().optional(),authorization_response_iss_parameter_supported:ne().optional().catch(void 0)}),Hg=z({...Nl.shape,...kl.pick({code_challenge_methods_supported:true}).shape}),Zg=z({access_token:g(),id_token:g().optional(),token_type:g(),expires_in:is.number().optional(),scope:g().optional(),refresh_token:g().optional()}).strip(),Jg=z({issued_token_type:M("urn:ietf:params:oauth:token-type:id-jag"),access_token:g(),token_type:g().optional(),expires_in:H().optional(),scope:g().optional()}).strip(),Xg=z({error:g(),error_description:g().optional(),error_uri:g().optional()}),Tg=ot.optional().or(M("").transform(()=>{})),Pl=z({redirect_uris:C(ot),token_endpoint_auth_method:g().optional(),grant_types:C(g()).optional(),response_types:C(g()).optional(),application_type:g().optional(),client_name:g().optional(),client_uri:ot.optional(),logo_uri:Tg,scope:g().optional(),contacts:C(g()).optional(),tos_uri:Tg,policy_uri:g().optional(),jwks_uri:ot.optional(),jwks:qc().optional(),software_id:g().optional(),software_version:g().optional(),software_statement:g().optional()}).strip(),Al=z({client_id:g(),client_secret:g().optional(),client_id_issued_at:H().optional(),client_secret_expires_at:H().optional()}).strip(),Wg=Pl.merge(Al),Yg=z({error:g(),error_description:g().optional()}).strip(),Qg=z({token:g(),token_type_hint:g().optional()}).strip();var n_=Symbol.for("mcp.sdk.errorBrands");function a_(e,t){let n=new Set,o=t;for(;typeof o=="function";){let r=o.mcpBrand;Object.prototype.hasOwnProperty.call(o,"mcpBrand")&&typeof r=="string"&&n.add(r),o=Object.getPrototypeOf(o);}n.size!==0&&Object.defineProperty(e,n_,{value:n,enumerable:false,configurable:true});}function Go(e,t){try{if(typeof t=="object"&&t!==null&&Object.prototype.hasOwnProperty.call(e,"mcpBrand")&&typeof e.mcpBrand=="string"&&Object.prototype.hasOwnProperty.call(t,n_)){let n=t[n_];if(n&&typeof n.has=="function"&&n.has(e.mcpBrand))return !0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}var Ie=(function(e){return e.NotConnected="NOT_CONNECTED",e.AlreadyConnected="ALREADY_CONNECTED",e.NotInitialized="NOT_INITIALIZED",e.CapabilityNotSupported="CAPABILITY_NOT_SUPPORTED",e.RequestTimeout="REQUEST_TIMEOUT",e.ConnectionClosed="CONNECTION_CLOSED",e.SendFailed="SEND_FAILED",e.InvalidResult="INVALID_RESULT",e.UnsupportedResultType="UNSUPPORTED_RESULT_TYPE",e.InputRequiredRoundsExceeded="INPUT_REQUIRED_ROUNDS_EXCEEDED",e.ListPaginationExceeded="LIST_PAGINATION_EXCEEDED",e.MethodNotSupportedByProtocolVersion="METHOD_NOT_SUPPORTED_BY_PROTOCOL_VERSION",e.EraNegotiationFailed="ERA_NEGOTIATION_FAILED",e.ClientHttpNotImplemented="CLIENT_HTTP_NOT_IMPLEMENTED",e.ClientHttpAuthentication="CLIENT_HTTP_AUTHENTICATION",e.ClientHttpForbidden="CLIENT_HTTP_FORBIDDEN",e.ClientHttpUnexpectedContent="CLIENT_HTTP_UNEXPECTED_CONTENT",e.ClientHttpFailedToOpenStream="CLIENT_HTTP_FAILED_TO_OPEN_STREAM",e.ClientHttpFailedToTerminateSession="CLIENT_HTTP_FAILED_TO_TERMINATE_SESSION",e})({}),ye=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkError"});}static[Symbol.hasInstance](e){return Go(this,e)}static isInstance(e){if(typeof this!="function")throw new TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Go(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name="SdkError",a_(this,new.target);}};function gb(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function bw(e,t,n){return e==="elicitation"&&t==="form"&&n.form===void 0&&n.url===void 0}function zb(e){switch(e.method){case "elicitation/create":return e.params?.mode==="url"?{elicitation:{url:{}}}:{elicitation:{form:{}}};case "sampling/createMessage":{let t=e.params;return t!==void 0&&(t.tools!==void 0||t.toolChoice!==void 0)?{sampling:{tools:{}}}:{sampling:{}}}case "roots/list":return {roots:{}};default:return}}function ql(e,t){let n={};for(let[o,r]of Object.entries(e)){if(r===void 0)continue;let i=t===void 0?void 0:t[o];if(i===void 0){n[o]=r;continue}if(gb(r)&&gb(i)){let s={};for(let[a,c]of Object.entries(r))c!==void 0&&i[a]===void 0&&!bw(o,a,i)&&(s[a]=c);Object.keys(s).length>0&&(n[o]=s);}}return Object.keys(n).length>0?n:void 0}var Ob="2026-07-28",Vr=[Ob];function Zo(e){return e>=Ob}function kb(e){return e.filter(t=>!Zo(t))}function c_(e){return e.filter(t=>Zo(t))}function Nb(e){let t=e.structuredContent;return t===void 0||!(typeof t!="object"||t===null||Array.isArray(t))||(e.content?.some(n=>n.type==="text")??false)?e:{...e,content:[...e.content??[],{type:"text",text:JSON.stringify(t)}]}}var Pb=["task","inputRequests","requestState"];function u_(e){return e===null||typeof e!="object"||Array.isArray(e)||e.content!==void 0||Pb.some(t=>t in e)?e:{...e,content:[]}}function Rw(){let e=Nr(()=>ie([g(),H(),ne(),Wt(),te(g(),e),C(e)])),t=te(g(),e),n=ie([g(),H().int()]),o=g(),r=z({ttl:H().optional()}),i=z({taskId:g()}),s=le({progressToken:n.optional(),"io.modelcontextprotocol/related-task":i.optional()}),a=z({_meta:s.optional()}),c=a.extend({task:r.optional()}),u=z({method:g(),params:a.loose().optional()}),l=z({_meta:s.optional()}),m=z({method:g(),params:l.loose().optional()}),h=le({_meta:s.optional()}),y=ie([g(),H().int()]),b=h.strict(),p=l.extend({requestId:y.optional(),reason:g().optional()}),S=m.extend({method:M("notifications/cancelled"),params:p}),d=z({src:g(),mimeType:g().optional(),sizes:C(g()).optional(),theme:ge(["light","dark"]).optional()}),_=z({icons:C(d).optional()}),f=z({name:g(),title:g().optional()}),v=f.extend({...f.shape,..._.shape,version:g(),websiteUrl:g().optional(),description:g().optional()}),x=Ft(z({applyDefaults:ne().optional()}),t),T=ar(lt=>lt&&typeof lt=="object"&&!Array.isArray(lt)&&Object.keys(lt).length===0?{form:{}}:lt,Ft(z({form:x.optional(),url:t.optional()}),t.optional())),R=le({list:t.optional(),cancel:t.optional(),requests:le({sampling:le({createMessage:t.optional()}).optional(),elicitation:le({create:t.optional()}).optional()}).optional()}),$=le({list:t.optional(),cancel:t.optional(),requests:le({tools:le({call:t.optional()}).optional()}).optional()}),E=z({experimental:te(g(),t).optional(),sampling:z({context:t.optional(),tools:t.optional()}).optional(),elicitation:T.optional(),roots:z({listChanged:ne().optional()}).optional(),tasks:R.optional(),extensions:te(g(),t).optional()}),A=a.extend({protocolVersion:g(),capabilities:E,clientInfo:v}),N=u.extend({method:M("initialize"),params:A}),F=z({experimental:te(g(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:z({listChanged:ne().optional()}).optional(),resources:z({subscribe:ne().optional(),listChanged:ne().optional()}).optional(),tools:z({listChanged:ne().optional()}).optional(),tasks:$.optional(),extensions:te(g(),t).optional()}),V=h.extend({protocolVersion:g(),capabilities:F,serverInfo:v,instructions:g().optional()}),K=m.extend({method:M("notifications/initialized"),params:l.optional()}),ue=u.extend({method:M("ping"),params:a.optional()}),ke=z({progress:H(),total:ae(H()),message:ae(g())}),xe=z({...l.shape,...ke.shape,progressToken:n}),Ve=m.extend({method:M("notifications/progress"),params:xe}),be=a.extend({cursor:o.optional()}),k=u.extend({params:be.optional()}),U=h.extend({nextCursor:o.optional()}),B=z({uri:g(),mimeType:ae(g()),_meta:te(g(),se()).optional()}),w=B.extend({text:g()}),O=g().refine(lt=>{try{return atob(lt),!0}catch{return false}},{message:"Invalid Base64 string"}),j=B.extend({blob:O}),Y=ge(["user","assistant"]),ce=z({audience:C(Y).optional(),priority:H().min(0).max(1).optional(),lastModified:Ot.datetime({offset:true}).optional()}),Re=z({...f.shape,..._.shape,uri:g(),description:ae(g()),mimeType:ae(g()),size:ae(H()),annotations:ce.optional(),_meta:ae(le({}))}),pe=z({...f.shape,..._.shape,uriTemplate:g(),description:ae(g()),mimeType:ae(g()),annotations:ce.optional(),_meta:ae(le({}))}),Ee=k.extend({method:M("resources/list")}),je=U.extend({resources:C(Re)}),I=k.extend({method:M("resources/templates/list")}),L=U.extend({resourceTemplates:C(pe)}),q=a.extend({uri:g()}),fe=q,he=u.extend({method:M("resources/read"),params:fe}),Te=h.extend({contents:C(ie([w,j]))}),Xe=m.extend({method:M("notifications/resources/list_changed"),params:l.optional()}),tt=q,ct=u.extend({method:M("resources/subscribe"),params:tt}),Ye=q,Be=u.extend({method:M("resources/unsubscribe"),params:Ye}),Nt=l.extend({uri:g()}),nt=m.extend({method:M("notifications/resources/updated"),params:Nt}),tr=z({name:g(),description:ae(g()),required:ae(ne())}),jt=z({...f.shape,..._.shape,description:ae(g()),arguments:ae(C(tr)),_meta:ae(le({}))}),rr=k.extend({method:M("prompts/list")}),gr=U.extend({prompts:C(jt)}),_r=a.extend({name:g(),arguments:te(g(),g()).optional()}),fn=u.extend({method:M("prompts/get"),params:_r}),hn=z({type:M("text"),text:g(),annotations:ce.optional(),_meta:te(g(),se()).optional()}),gn=z({type:M("image"),data:O,mimeType:g(),annotations:ce.optional(),_meta:te(g(),se()).optional()}),_n=z({type:M("audio"),data:O,mimeType:g(),annotations:ce.optional(),_meta:te(g(),se()).optional()}),ei=z({type:M("tool_use"),name:g(),id:g(),input:te(g(),se()),_meta:te(g(),se()).optional()}),vr=z({type:M("resource"),resource:ie([w,j]),annotations:ce.optional(),_meta:te(g(),se()).optional()}),ti=Re.extend({type:M("resource_link")}),Pt=ie([hn,gn,_n,ti,vr]),Bn=z({role:Y,content:Pt}),Kn=h.extend({description:g().optional(),messages:C(Bn)}),vn=m.extend({method:M("notifications/prompts/list_changed"),params:l.optional()}),ri=z({title:g().optional(),readOnlyHint:ne().optional(),destructiveHint:ne().optional(),idempotentHint:ne().optional(),openWorldHint:ne().optional()}),Gn=z({taskSupport:ge(["required","optional","forbidden"]).optional()}),yn=z({...f.shape,..._.shape,description:g().optional(),inputSchema:z({type:M("object"),properties:te(g(),e).optional(),required:C(g()).optional()}).catchall(se()),outputSchema:z({type:M("object"),properties:te(g(),e).optional(),required:C(g()).optional()}).catchall(se()).optional(),annotations:ri.optional(),execution:Gn.optional(),_meta:te(g(),se()).optional()}),Hn=k.extend({method:M("tools/list")}),Zn=U.extend({tools:C(yn)}),Jn=h.extend({content:C(Pt),structuredContent:te(g(),se()).optional(),isError:ne().optional()}),ut=c.extend({name:g(),arguments:te(g(),se()).optional()}),ni=u.extend({method:M("tools/call"),params:ut}),Gs=m.extend({method:M("notifications/tools/list_changed"),params:l.optional()}),Xn=ge(["debug","info","notice","warning","error","critical","alert","emergency"]),oi=a.extend({level:Xn}),ii=u.extend({method:M("logging/setLevel"),params:oi}),si=l.extend({level:Xn,logger:g().optional(),data:se()}),ai=m.extend({method:M("notifications/message"),params:si}),ci=z({name:g().optional()}),ui=z({hints:C(ci).optional(),costPriority:H().min(0).max(1).optional(),speedPriority:H().min(0).max(1).optional(),intelligencePriority:H().min(0).max(1).optional()}),li=z({mode:ge(["auto","required","none"]).optional()}),Hs=z({type:M("tool_result"),toolUseId:g().describe("The unique identifier for the corresponding tool call."),content:C(Pt),structuredContent:z({}).loose().optional(),isError:ne().optional(),_meta:te(g(),se()).optional()}),di=kr("type",[hn,gn,_n]),yr=kr("type",[hn,gn,_n,ei,Hs]),mi=z({role:Y,content:ie([yr,C(yr)]),_meta:te(g(),se()).optional()}),pi=c.extend({messages:C(mi),modelPreferences:ui.optional(),systemPrompt:g().optional(),includeContext:ge(["none","thisServer","allServers"]).optional(),temperature:H().optional(),maxTokens:H().int(),stopSequences:C(g()).optional(),metadata:t.optional(),tools:C(yn).optional(),toolChoice:li.optional()}),fi=u.extend({method:M("sampling/createMessage"),params:pi}),hi=h.extend({model:g(),stopReason:ae(ge(["endTurn","stopSequence","maxTokens"]).or(g())),role:Y,content:di}),gi=h.extend({model:g(),stopReason:ae(ge(["endTurn","stopSequence","maxTokens","toolUse"]).or(g())),role:Y,content:ie([yr,C(yr)])}),_i=z({type:M("boolean"),title:g().optional(),description:g().optional(),default:ne().optional()}),vi=z({type:M("string"),title:g().optional(),description:g().optional(),minLength:H().optional(),maxLength:H().optional(),format:ge(["email","uri","date","date-time"]).optional(),default:g().optional()}),yi=z({type:ge(["number","integer"]),title:g().optional(),description:g().optional(),minimum:H().optional(),maximum:H().optional(),default:H().optional()}),Si=z({type:M("string"),title:g().optional(),description:g().optional(),enum:C(g()),default:g().optional()}),bi=z({type:M("string"),title:g().optional(),description:g().optional(),oneOf:C(z({const:g(),title:g()})),default:g().optional()}),Ri=z({type:M("string"),title:g().optional(),description:g().optional(),enum:C(g()),enumNames:C(g()).optional(),default:g().optional()}),Ti=ie([Si,bi]),Sn=z({type:M("array"),title:g().optional(),description:g().optional(),minItems:H().optional(),maxItems:H().optional(),items:z({type:M("string"),enum:C(g())}),default:C(g()).optional()}),bn=z({type:M("array"),title:g().optional(),description:g().optional(),minItems:H().optional(),maxItems:H().optional(),items:z({anyOf:C(z({const:g(),title:g()}))}),default:C(g()).optional()}),Zs=ie([Sn,bn]),Js=ie([Ri,Ti,Zs]),wt=ie([Js,_i,vi,yi]),Et=c.extend({mode:M("form").optional(),message:g(),requestedSchema:z({type:M("object"),properties:te(g(),wt),required:C(g()).optional()}).catchall(se())}),$i=c.extend({mode:M("url"),message:g(),elicitationId:g(),url:g().url()}),Dt=ie([Et,$i]),Xs=u.extend({method:M("elicitation/create"),params:Dt}),Ws=l.extend({elicitationId:g()}),Ys=m.extend({method:M("notifications/elicitation/complete"),params:Ws}),Qs=h.extend({action:ge(["accept","decline","cancel"]),content:ar(lt=>lt===null?void 0:lt,te(g(),ie([g(),H(),ne(),C(g())])).optional())}),ea=z({type:M("ref/resource"),uri:g()}),ta=z({type:M("ref/prompt"),name:g()}),ra=a.extend({ref:ie([ta,ea]),argument:z({name:g(),value:g()}),context:z({arguments:te(g(),g()).optional()}).optional()}),xi=u.extend({method:M("completion/complete"),params:ra}),na=h.extend({completion:le({values:C(g()).max(100),total:ae(H().int()),hasMore:ae(ne())})}),oa=z({uri:g().startsWith("file://"),name:g().optional(),_meta:te(g(),se()).optional()}),Wn=u.extend({method:M("roots/list"),params:a.optional()}),wi=h.extend({roots:C(oa)}),ia=m.extend({method:M("notifications/roots/list_changed"),params:l.optional()}),sa=le({ttl:H().optional(),pollInterval:H().optional()}),aa=ge(["working","input_required","completed","failed","cancelled"]),Sr=z({taskId:g(),status:aa,ttl:ie([H(),Wt()]),createdAt:g(),lastUpdatedAt:g(),pollInterval:ae(H()),statusMessage:ae(g())}),St=h.extend({task:Sr}),ca=l.merge(Sr),Rn=m.extend({method:M("notifications/tasks/status"),params:ca}),Yn=u.extend({method:M("tasks/get"),params:a.extend({taskId:g()})}),Qn=h.merge(Sr),eo=u.extend({method:M("tasks/result"),params:a.extend({taskId:g()})}),Ed=h.loose(),bt=k.extend({method:M("tasks/list")}),We=U.extend({tasks:C(Sr)}),Tn=u.extend({method:M("tasks/cancel"),params:a.extend({taskId:g()})});return {JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:o,TaskMetadataSchema:r,RelatedTaskMetadataSchema:i,RequestMetaSchema:s,BaseRequestParamsSchema:a,TaskAugmentedRequestParamsSchema:c,RequestSchema:u,NotificationsParamsSchema:l,NotificationSchema:m,ResultSchema:h,RequestIdSchema:y,EmptyResultSchema:b,CancelledNotificationParamsSchema:p,CancelledNotificationSchema:S,IconSchema:d,IconsSchema:_,BaseMetadataSchema:f,ImplementationSchema:v,ClientTasksCapabilitySchema:R,ServerTasksCapabilitySchema:$,ClientCapabilitiesSchema:E,InitializeRequestParamsSchema:A,InitializeRequestSchema:N,ServerCapabilitiesSchema:F,InitializeResultSchema:V,InitializedNotificationSchema:K,PingRequestSchema:ue,ProgressSchema:ke,ProgressNotificationParamsSchema:xe,ProgressNotificationSchema:Ve,PaginatedRequestParamsSchema:be,PaginatedRequestSchema:k,PaginatedResultSchema:U,ResourceContentsSchema:B,TextResourceContentsSchema:w,BlobResourceContentsSchema:j,RoleSchema:Y,AnnotationsSchema:ce,ResourceSchema:Re,ResourceTemplateSchema:pe,ListResourcesRequestSchema:Ee,ListResourcesResultSchema:je,ListResourceTemplatesRequestSchema:I,ListResourceTemplatesResultSchema:L,ResourceRequestParamsSchema:q,ReadResourceRequestParamsSchema:fe,ReadResourceRequestSchema:he,ReadResourceResultSchema:Te,ResourceListChangedNotificationSchema:Xe,SubscribeRequestParamsSchema:tt,SubscribeRequestSchema:ct,UnsubscribeRequestParamsSchema:Ye,UnsubscribeRequestSchema:Be,ResourceUpdatedNotificationParamsSchema:Nt,ResourceUpdatedNotificationSchema:nt,PromptArgumentSchema:tr,PromptSchema:jt,ListPromptsRequestSchema:rr,ListPromptsResultSchema:gr,GetPromptRequestParamsSchema:_r,GetPromptRequestSchema:fn,TextContentSchema:hn,ImageContentSchema:gn,AudioContentSchema:_n,ToolUseContentSchema:ei,EmbeddedResourceSchema:vr,ResourceLinkSchema:ti,ContentBlockSchema:Pt,PromptMessageSchema:Bn,GetPromptResultSchema:Kn,PromptListChangedNotificationSchema:vn,ToolAnnotationsSchema:ri,ToolExecutionSchema:Gn,ToolSchema:yn,ListToolsRequestSchema:Hn,ListToolsResultSchema:Zn,CallToolResultSchema:Jn,CallToolRequestParamsSchema:ut,CallToolRequestSchema:ni,ToolListChangedNotificationSchema:Gs,LoggingLevelSchema:Xn,SetLevelRequestParamsSchema:oi,SetLevelRequestSchema:ii,LoggingMessageNotificationParamsSchema:si,LoggingMessageNotificationSchema:ai,ModelHintSchema:ci,ModelPreferencesSchema:ui,ToolChoiceSchema:li,ToolResultContentSchema:Hs,SamplingContentSchema:di,SamplingMessageContentBlockSchema:yr,SamplingMessageSchema:mi,CreateMessageRequestParamsSchema:pi,CreateMessageRequestSchema:fi,CreateMessageResultSchema:hi,CreateMessageResultWithToolsSchema:gi,BooleanSchemaSchema:_i,StringSchemaSchema:vi,NumberSchemaSchema:yi,UntitledSingleSelectEnumSchemaSchema:Si,TitledSingleSelectEnumSchemaSchema:bi,LegacyTitledEnumSchemaSchema:Ri,SingleSelectEnumSchemaSchema:Ti,UntitledMultiSelectEnumSchemaSchema:Sn,TitledMultiSelectEnumSchemaSchema:bn,MultiSelectEnumSchemaSchema:Zs,EnumSchemaSchema:Js,PrimitiveSchemaDefinitionSchema:wt,ElicitRequestFormParamsSchema:Et,ElicitRequestURLParamsSchema:$i,ElicitRequestParamsSchema:Dt,ElicitRequestSchema:Xs,ElicitationCompleteNotificationParamsSchema:Ws,ElicitationCompleteNotificationSchema:Ys,ElicitResultSchema:Qs,ResourceTemplateReferenceSchema:ea,PromptReferenceSchema:ta,CompleteRequestParamsSchema:ra,CompleteRequestSchema:xi,CompleteResultSchema:na,RootSchema:oa,ListRootsRequestSchema:Wn,ListRootsResultSchema:wi,RootsListChangedNotificationSchema:ia,TaskCreationParamsSchema:sa,TaskStatusSchema:aa,TaskSchema:Sr,CreateTaskResultSchema:St,TaskStatusNotificationParamsSchema:ca,TaskStatusNotificationSchema:Rn,GetTaskRequestSchema:Yn,GetTaskResultSchema:Qn,GetTaskPayloadRequestSchema:eo,GetTaskPayloadResultSchema:Ed,ListTasksRequestSchema:bt,ListTasksResultSchema:We,CancelTaskRequestSchema:Tn,CancelTaskResultSchema:h.merge(Sr),ClientRequestSchema:ie([ue,N,xi,ii,fn,rr,Ee,I,he,ct,Be,ni,Hn,Yn,eo,bt,Tn]),ClientNotificationSchema:ie([S,Ve,K,ia,Rn]),ClientResultSchema:ie([b,hi,gi,Qs,wi,Qn,We,St]),ServerRequestSchema:ie([ue,fi,Xs,Wn,Yn,eo,bt,Tn]),ServerNotificationSchema:ie([S,Ve,ai,nt,Xe,Gs,vn,Rn,Ys]),ServerResultSchema:ie([b,V,na,Kn,gr,je,L,Te,Jn,Zn,Qn,We,St]),CallToolResultWireSchema:se().superRefine((lt,_$)=>{if(!(typeof lt!="object"||lt===null||Array.isArray(lt)||lt.content!==void 0)){for(let mv of Pb)if(mv in lt){_$.addIssue({code:"custom",message:`content is required when the body carries '${mv}' \u2014 another result family cannot default into an empty tools/call success`});return}}}).transform(u_).pipe(Jn)}}var Tw;function Ab(){return Tw??=Rw()}function Cb(e){return e.type!=="object"}var $w=new Set(["const","enum","default","examples"]),xw=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas","dependencies"]);function _b(e){return e!==void 0&&!(typeof e=="string"&&e.startsWith("#"))}function ww(e){let t=typeof e.$schema=="string"?e.$schema:void 0;if(_b(e.$id))return {...t!==void 0&&{$schema:t},type:"object",properties:{result:e},required:["result"]};let n=hv(e.$schema)&&e.$recursiveAnchor!==true,o=(r,i)=>{if(Array.isArray(r))return r.map(c=>o(c,false));if(r===null||typeof r!="object"||!i&&_b(r.$id))return r;let s={},a=false;for(let[c,u]of Object.entries(r))i?s[c]=o(u,false):(c==="$ref"||c==="$dynamicRef")&&typeof u=="string"?s[c]=u==="#"?"#/properties/result":u.startsWith("#/")?`#/properties/result${u.slice(1)}`:u:c==="$recursiveRef"&&u==="#"&&n?a=true:$w.has(c)?s[c]=u:xw.has(c)?s[c]=o(u,true):s[c]=o(u,false);return a&&("$ref"in s?s.allOf=[...Array.isArray(s.allOf)?s.allOf:[],{$ref:"#/properties/result"}]:s.$ref="#/properties/result"),s};return {...t!==void 0&&{$schema:t},type:"object",properties:{result:o(e,false)},required:["result"]}}var Mb={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"tasks/get":null,"tasks/result":null,"tasks/list":null,"tasks/cancel":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},jb={"notifications/cancelled":null,"notifications/progress":null,"notifications/initialized":null,"notifications/roots/list_changed":null,"notifications/tasks/status":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/elicitation/complete":null},Ew={ping:null,initialize:null,"completion/complete":null,"logging/setLevel":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"resources/subscribe":null,"resources/unsubscribe":null,"tools/call":null,"tools/list":null,"sampling/createMessage":null,"elicitation/create":null,"roots/list":null},Cl;function l_(){if(Cl)return Cl;let e=Ab();return Cl={requestSchemas:{ping:e.PingRequestSchema,initialize:e.InitializeRequestSchema,"completion/complete":e.CompleteRequestSchema,"logging/setLevel":e.SetLevelRequestSchema,"prompts/get":e.GetPromptRequestSchema,"prompts/list":e.ListPromptsRequestSchema,"resources/list":e.ListResourcesRequestSchema,"resources/templates/list":e.ListResourceTemplatesRequestSchema,"resources/read":e.ReadResourceRequestSchema,"resources/subscribe":e.SubscribeRequestSchema,"resources/unsubscribe":e.UnsubscribeRequestSchema,"tools/call":e.CallToolRequestSchema,"tools/list":e.ListToolsRequestSchema,"tasks/get":e.GetTaskRequestSchema,"tasks/result":e.GetTaskPayloadRequestSchema,"tasks/list":e.ListTasksRequestSchema,"tasks/cancel":e.CancelTaskRequestSchema,"sampling/createMessage":e.CreateMessageRequestSchema,"elicitation/create":e.ElicitRequestSchema,"roots/list":e.ListRootsRequestSchema},notificationSchemas:{"notifications/cancelled":e.CancelledNotificationSchema,"notifications/progress":e.ProgressNotificationSchema,"notifications/initialized":e.InitializedNotificationSchema,"notifications/roots/list_changed":e.RootsListChangedNotificationSchema,"notifications/tasks/status":e.TaskStatusNotificationSchema,"notifications/message":e.LoggingMessageNotificationSchema,"notifications/resources/updated":e.ResourceUpdatedNotificationSchema,"notifications/resources/list_changed":e.ResourceListChangedNotificationSchema,"notifications/tools/list_changed":e.ToolListChangedNotificationSchema,"notifications/prompts/list_changed":e.PromptListChangedNotificationSchema,"notifications/elicitation/complete":e.ElicitationCompleteNotificationSchema},resultSchemas:{ping:e.EmptyResultSchema,initialize:e.InitializeResultSchema,"completion/complete":e.CompleteResultSchema,"logging/setLevel":e.EmptyResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"resources/subscribe":e.EmptyResultSchema,"resources/unsubscribe":e.EmptyResultSchema,"tools/call":e.CallToolResultWireSchema,"tools/list":e.ListToolsResultSchema,"sampling/createMessage":e.CreateMessageResultWithToolsSchema,"elicitation/create":e.ElicitResultSchema,"roots/list":e.ListRootsResultSchema}},Cl}function Db(e){return Object.prototype.hasOwnProperty.call(Mb,e)}function Ub(e){return Object.prototype.hasOwnProperty.call(jb,e)}function Iw(e){return Object.prototype.hasOwnProperty.call(Ew,e)}function zw(e){return Iw(e)?l_().resultSchemas[e]:void 0}function Ow(e){return Db(e)?l_().requestSchemas[e]:void 0}function kw(e){return Ub(e)?l_().notificationSchemas[e]:void 0}function o_(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Ml(e,t){if(e===void 0)return {ok:false,reason:"not-in-era"};let n=e.safeParse(t);return n.success?{ok:true,value:n.data}:{ok:false,reason:"invalid",message:String(n.error)}}var vb={ok:false,reason:"not-in-era"};function yb(e){return o_(e)&&o_(e.outputSchema)&&Cb(e.outputSchema)}var d_={era:"2025-11-25",hasRequestMethod:Db,hasNotificationMethod:Ub,validateRequest:(e,t)=>Ml(Ow(e),t),validateResult:(e,t)=>Ml(zw(e),t),validateNotification:(e,t)=>Ml(kw(e),t),hasInputRequestMethod:()=>false,validateInputRequest:()=>vb,validateInputResponse:()=>vb,samplingResultVariant:((e,t)=>{let n=Ab();return Ml(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>{},validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=Nb(e),o=n.structuredContent;if(o===void 0)return n;let r=typeof o!="object"||o===null||Array.isArray(o),i=t!==void 0&&Cb(t);return !r&&!i?n:{...n,structuredContent:{result:o}}},decodeResult(e,t){if(o_(t)&&"resultType"in t){let n={...t};return delete n.resultType,{kind:"complete",result:n}}return {kind:"complete",result:t}},encodeResult(e,t){if(e!=="tools/list")return t;let n=t.tools;return !Array.isArray(n)||!n.some(o=>yb(o))?t:{...t,tools:n.map(o=>yb(o)?{...o,outputSchema:ww(o.outputSchema)}:o)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>{}};function Nw(){let e=Nr(()=>ie([g(),H(),ne(),Wt(),te(g(),e),C(e)])),t=te(g(),e),n=ie([g(),H().int()]),o=g(),r=ie([g(),H().int()]),i=ge(["user","assistant"]),s=ge(["debug","info","notice","warning","error","critical","alert","emergency"]),a=g().refine(We=>{try{return atob(We),!0}catch{return false}},{message:"Invalid Base64 string"}),c=z({ttl:H().optional()}),u=z({taskId:g()}),l=le({progressToken:n.optional(),"io.modelcontextprotocol/related-task":u.optional()}),m=z({_meta:l.optional()}),h=m.extend({task:c.optional()}),y=z({_meta:l.optional()}),b=z({method:g(),params:y.loose().optional()}),p=z({src:g(),mimeType:g().optional(),sizes:C(g()).optional(),theme:ge(["light","dark"]).optional()}),S=z({icons:C(p).optional()}),d=z({name:g(),title:g().optional()}),_=d.extend({...d.shape,...S.shape,version:g(),websiteUrl:g().optional(),description:g().optional()}),f=Ft(z({applyDefaults:ne().optional()}),t),v=ar(We=>We&&typeof We=="object"&&!Array.isArray(We)&&Object.keys(We).length===0?{form:{}}:We,Ft(z({form:f.optional(),url:t.optional()}),t.optional())),x=le({list:t.optional(),cancel:t.optional(),requests:le({sampling:le({createMessage:t.optional()}).optional(),elicitation:le({create:t.optional()}).optional()}).optional()}),T=le({list:t.optional(),cancel:t.optional(),requests:le({tools:le({call:t.optional()}).optional()}).optional()}),R=z({experimental:te(g(),t).optional(),sampling:z({context:t.optional(),tools:t.optional()}).optional(),elicitation:v.optional(),roots:z({listChanged:ne().optional()}).optional(),tasks:x.optional(),extensions:te(g(),t).optional()}),$=z({experimental:te(g(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:z({listChanged:ne().optional()}).optional(),resources:z({subscribe:ne().optional(),listChanged:ne().optional()}).optional(),tools:z({listChanged:ne().optional()}).optional(),tasks:T.optional(),extensions:te(g(),t).optional()}),E=z({progress:H(),total:ae(H()),message:ae(g())}),A=z({...y.shape,...E.shape,progressToken:n}),N=b.extend({method:M("notifications/progress"),params:A}),F=y.extend({level:s,logger:g().optional(),data:se()}),V=b.extend({method:M("notifications/message"),params:F}),K=z({uri:g(),mimeType:ae(g()),_meta:te(g(),se()).optional()}),ue=K.extend({text:g()}),ke=K.extend({blob:a}),xe=z({audience:C(i).optional(),priority:H().min(0).max(1).optional(),lastModified:Ot.datetime({offset:true}).optional()}),Ve=z({...d.shape,...S.shape,uri:g(),description:ae(g()),mimeType:ae(g()),size:ae(H()),annotations:xe.optional(),_meta:ae(le({}))}),be=z({...d.shape,...S.shape,uriTemplate:g(),description:ae(g()),mimeType:ae(g()),annotations:xe.optional(),_meta:ae(le({}))}),k=b.extend({method:M("notifications/resources/list_changed"),params:y.optional()}),U=y.extend({uri:g()}),B=b.extend({method:M("notifications/resources/updated"),params:U}),w=z({name:g(),description:ae(g()),required:ae(ne())}),O=z({...d.shape,...S.shape,description:ae(g()),arguments:ae(C(w)),_meta:ae(le({}))}),j=b.extend({method:M("notifications/prompts/list_changed"),params:y.optional()}),Y=z({type:M("text"),text:g(),annotations:xe.optional(),_meta:te(g(),se()).optional()}),ce=z({type:M("image"),data:a,mimeType:g(),annotations:xe.optional(),_meta:te(g(),se()).optional()}),Re=z({type:M("audio"),data:a,mimeType:g(),annotations:xe.optional(),_meta:te(g(),se()).optional()}),pe=z({type:M("tool_use"),name:g(),id:g(),input:te(g(),se()),_meta:te(g(),se()).optional()}),Ee=z({type:M("resource"),resource:ie([ue,ke]),annotations:xe.optional(),_meta:te(g(),se()).optional()}),je=Ve.extend({type:M("resource_link")}),I=ie([Y,ce,Re,je,Ee]),L=z({role:i,content:I}),q=z({title:g().optional(),readOnlyHint:ne().optional(),destructiveHint:ne().optional(),idempotentHint:ne().optional(),openWorldHint:ne().optional()}),fe=b.extend({method:M("notifications/tools/list_changed"),params:y.optional()}),he=z({name:g().optional()}),Te=z({hints:C(he).optional(),costPriority:H().min(0).max(1).optional(),speedPriority:H().min(0).max(1).optional(),intelligencePriority:H().min(0).max(1).optional()}),Xe=z({mode:ge(["auto","required","none"]).optional()}),tt=z({type:M("boolean"),title:g().optional(),description:g().optional(),default:ne().optional()}),ct=z({type:M("string"),title:g().optional(),description:g().optional(),minLength:H().optional(),maxLength:H().optional(),format:ge(["email","uri","date","date-time"]).optional(),default:g().optional()}),Ye=z({type:ge(["number","integer"]),title:g().optional(),description:g().optional(),minimum:H().optional(),maximum:H().optional(),default:H().optional()}),Be=z({type:M("string"),title:g().optional(),description:g().optional(),enum:C(g()),default:g().optional()}),Nt=z({type:M("string"),title:g().optional(),description:g().optional(),oneOf:C(z({const:g(),title:g()})),default:g().optional()}),nt=z({type:M("string"),title:g().optional(),description:g().optional(),enum:C(g()),enumNames:C(g()).optional(),default:g().optional()}),tr=ie([Be,Nt]),jt=z({type:M("array"),title:g().optional(),description:g().optional(),minItems:H().optional(),maxItems:H().optional(),items:z({type:M("string"),enum:C(g())}),default:C(g()).optional()}),rr=z({type:M("array"),title:g().optional(),description:g().optional(),minItems:H().optional(),maxItems:H().optional(),items:z({anyOf:C(z({const:g(),title:g()}))}),default:C(g()).optional()}),gr=ie([jt,rr]),_r=ie([nt,tr,gr]),fn=ie([_r,tt,ct,Ye]),hn=h.extend({mode:M("form").optional(),message:g(),requestedSchema:z({type:M("object"),properties:te(g(),fn),required:C(g()).optional()}).catchall(se())}),gn=z({type:M("ref/resource"),uri:g()}),_n=z({type:M("ref/prompt"),name:g()}),ei=z({uri:g().startsWith("file://"),name:g().optional(),_meta:te(g(),se()).optional()}),vr=R.shape,ti=z({experimental:vr.experimental,sampling:vr.sampling,elicitation:vr.elicitation,roots:vr.roots,extensions:vr.extensions}),Pt=$.shape,Bn=z({experimental:Pt.experimental,logging:Pt.logging,completions:Pt.completions,prompts:Pt.prompts,resources:Pt.resources,tools:Pt.tools,extensions:Pt.extensions}),Kn=le({progressToken:n.optional(),[ur]:g(),[Po]:_.optional(),[lr]:ti,[Ar]:s.optional()}),vn=z({...d.shape,...S.shape,description:g().optional(),inputSchema:le({$schema:g().optional(),type:M("object")}),outputSchema:le({$schema:g().optional()}).optional(),annotations:q.optional(),_meta:te(g(),se()).optional()}),ri=z({type:M("tool_result"),toolUseId:g(),content:C(I),structuredContent:se().optional(),isError:ne().optional(),_meta:te(g(),se()).optional()}),Gn=ie([Y,ce,Re,pe,ri]),yn=z({role:i,content:ie([Gn,C(Gn)]),_meta:te(g(),se()).optional()}),Hn=g(),Zn=le({[Yt]:_.optional().catch(void 0)}),Jn=Zn.optional();function ut(We){return le({_meta:Jn,resultType:Hn.default("complete"),...We})}let ni=ut({}),Gs=ut({nextCursor:o.optional()}),Xn=ut({content:C(I),structuredContent:se().optional(),isError:ne().optional()}),oi=ut({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),tools:C(vn),nextCursor:o.optional()}),ii=ut({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),prompts:C(O),nextCursor:o.optional()}),si=ut({description:g().optional(),messages:C(L)}),ai=ut({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),resources:C(Ve),nextCursor:o.optional()}),ci=ut({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),resourceTemplates:C(be),nextCursor:o.optional()}),ui=ut({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),contents:C(ie([ue,ke]))}),li=ut({completion:z({values:C(g()).max(100),total:H().int().optional(),hasMore:ne().optional()}).loose()}),Hs=ut({ttlMs:H().int().min(0),cacheScope:ge(["public","private"])}),di=ut({ttlMs:H().int().min(0).catch(0),cacheScope:ge(["public","private"]).catch("private"),supportedVersions:C(g()),capabilities:Bn,instructions:g().optional()}),yr=z({messages:C(yn),modelPreferences:Te.optional(),systemPrompt:g().optional(),includeContext:ge(["none","thisServer","allServers"]).optional(),temperature:H().optional(),maxTokens:H().int(),stopSequences:C(g()).optional(),metadata:t.optional(),tools:C(vn).optional(),toolChoice:Xe.optional()}),mi=z({method:M("sampling/createMessage"),params:yr}),pi=z({method:M("roots/list"),params:z({_meta:te(g(),se()).optional()}).optional()}),fi=z({...yn.shape,model:g(),stopReason:g().optional()}),hi=z({roots:C(ei)}),gi=z({action:ge(["accept","decline","cancel"]),content:te(g(),ie([g(),H(),ne(),C(g())])).optional()}),_i=z({mode:M("url"),message:g(),url:g().url()}),vi=ie([hn,_i]),yi=z({method:M("elicitation/create"),params:vi}),Si=ie([mi,pi,yi]),bi=ie([fi,hi,gi]),Ri=te(g(),Si),Ti=te(g(),bi),Sn=ut({inputRequests:Ri.optional(),requestState:g().optional()}),bn={inputResponses:Ti.optional(),requestState:g().optional()},Zs=z({_meta:Kn,...bn}),Js=le({progressToken:n.optional()});function wt(We,Tn){return z({method:M(We),params:z({_meta:Kn,...Tn})})}function Et(We,Tn){return z({method:M(We),params:z({_meta:Js.optional(),...Tn}).optional()})}let $i={name:g(),arguments:te(g(),se()).optional(),...bn},Dt={cursor:o.optional()},Xs=wt("tools/call",$i),Ws=wt("tools/list",Dt),Ys=wt("prompts/list",Dt),Qs=wt("prompts/get",{name:g(),arguments:te(g(),g()).optional(),...bn}),ea=wt("resources/list",Dt),ta=wt("resources/templates/list",Dt),ra=wt("resources/read",{uri:g(),...bn}),xi={ref:ie([_n,gn]),argument:z({name:g(),value:g()}),context:z({arguments:te(g(),g()).optional()}).optional()},na=wt("completion/complete",xi),oa=wt("server/discover",{}),Wn=z({toolsListChanged:ne().optional(),promptsListChanged:ne().optional(),resourcesListChanged:ne().optional(),resourceSubscriptions:C(g()).optional()}),wi={notifications:Wn},ia=wt("subscriptions/listen",wi),sa=Zn.extend({"io.modelcontextprotocol/subscriptionId":r}),aa=le({_meta:sa,resultType:Hn.default("complete")}),Sr={"tools/call":Et("tools/call",$i),"tools/list":Et("tools/list",Dt),"prompts/get":Et("prompts/get",{name:g(),arguments:te(g(),g()).optional()}),"prompts/list":Et("prompts/list",Dt),"resources/list":Et("resources/list",Dt),"resources/templates/list":Et("resources/templates/list",Dt),"resources/read":Et("resources/read",{uri:g()}),"completion/complete":Et("completion/complete",xi),"server/discover":Et("server/discover",{}),"subscriptions/listen":Et("subscriptions/listen",wi)};function St(We){return le({_meta:Jn,...We})}let ca={"tools/call":St({content:C(I),structuredContent:se().optional(),isError:ne().optional()}),"tools/list":St({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),tools:C(vn),nextCursor:o.optional()}),"prompts/get":St({description:g().optional(),messages:C(L)}),"prompts/list":St({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),prompts:C(O),nextCursor:o.optional()}),"resources/list":St({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),resources:C(Ve),nextCursor:o.optional()}),"resources/templates/list":St({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),resourceTemplates:C(be),nextCursor:o.optional()}),"resources/read":St({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),contents:C(ie([ue,ke]))}),"completion/complete":St({completion:z({values:C(g()).max(100),total:H().int().optional(),hasMore:ne().optional()}).loose()}),"server/discover":St({ttlMs:H().int().min(0).catch(0),cacheScope:ge(["public","private"]).catch("private"),supportedVersions:C(g()),capabilities:Bn,instructions:g().optional()}),"subscriptions/listen":St({})},Rn=le({"io.modelcontextprotocol/subscriptionId":r.optional()}),Yn=z({method:M("notifications/subscriptions/acknowledged"),params:z({_meta:Rn.optional(),notifications:Wn})}),Qn=z({_meta:Rn.optional(),requestId:r,reason:g().optional()}),eo=z({method:M("notifications/cancelled"),params:Qn}),Ed={"notifications/cancelled":eo,"notifications/progress":N,"notifications/message":V,"notifications/resources/updated":B,"notifications/resources/list_changed":k,"notifications/tools/list_changed":fe,"notifications/prompts/list_changed":j,"notifications/subscriptions/acknowledged":Yn},bt=We=>z({jsonrpc:M("2.0"),id:ie([g(),H().int()]),result:We}).strict();return {JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:o,RequestIdSchema:r,RoleSchema:i,LoggingLevelSchema:s,TaskMetadataSchema:c,RelatedTaskMetadataSchema:u,RequestMetaSchema:l,BaseRequestParamsSchema:m,TaskAugmentedRequestParamsSchema:h,NotificationsParamsSchema:y,NotificationSchema:b,IconSchema:p,IconsSchema:S,BaseMetadataSchema:d,ImplementationSchema:_,ClientTasksCapabilitySchema:x,ServerTasksCapabilitySchema:T,ClientCapabilitiesSchema:R,ServerCapabilitiesSchema:$,ProgressSchema:E,ProgressNotificationParamsSchema:A,ProgressNotificationSchema:N,LoggingMessageNotificationParamsSchema:F,LoggingMessageNotificationSchema:V,ResourceContentsSchema:K,TextResourceContentsSchema:ue,BlobResourceContentsSchema:ke,AnnotationsSchema:xe,ResourceSchema:Ve,ResourceTemplateSchema:be,ResourceListChangedNotificationSchema:k,ResourceUpdatedNotificationParamsSchema:U,ResourceUpdatedNotificationSchema:B,PromptArgumentSchema:w,PromptSchema:O,PromptListChangedNotificationSchema:j,TextContentSchema:Y,ImageContentSchema:ce,AudioContentSchema:Re,ToolUseContentSchema:pe,EmbeddedResourceSchema:Ee,ResourceLinkSchema:je,ContentBlockSchema:I,PromptMessageSchema:L,ToolAnnotationsSchema:q,ToolListChangedNotificationSchema:fe,ModelHintSchema:he,ModelPreferencesSchema:Te,ToolChoiceSchema:Xe,BooleanSchemaSchema:tt,StringSchemaSchema:ct,NumberSchemaSchema:Ye,UntitledSingleSelectEnumSchemaSchema:Be,TitledSingleSelectEnumSchemaSchema:Nt,LegacyTitledEnumSchemaSchema:nt,SingleSelectEnumSchemaSchema:tr,UntitledMultiSelectEnumSchemaSchema:jt,TitledMultiSelectEnumSchemaSchema:rr,MultiSelectEnumSchemaSchema:gr,EnumSchemaSchema:_r,PrimitiveSchemaDefinitionSchema:fn,ElicitRequestFormParamsSchema:hn,ResourceTemplateReferenceSchema:gn,PromptReferenceSchema:_n,RootSchema:ei,ClientCapabilities2026Schema:ti,ServerCapabilities2026Schema:Bn,RequestMetaEnvelopeSchema:Kn,ToolSchema:vn,ToolResultContentSchema:ri,SamplingMessageContentBlockSchema:Gn,SamplingMessageSchema:yn,ResultTypeSchema:Hn,ResultMetaSchema:Zn,ResultSchema:ni,PaginatedResultSchema:Gs,CallToolResultSchema:Xn,ListToolsResultSchema:oi,ListPromptsResultSchema:ii,GetPromptResultSchema:si,ListResourcesResultSchema:ai,ListResourceTemplatesResultSchema:ci,ReadResourceResultSchema:ui,CompleteResultSchema:li,CacheableResultSchema:Hs,DiscoverResultSchema:di,CreateMessageRequestParamsSchema:yr,CreateMessageRequestSchema:mi,ListRootsRequestSchema:pi,CreateMessageResultSchema:fi,ListRootsResultSchema:hi,ElicitResultSchema:gi,ElicitRequestURLParamsSchema:_i,ElicitRequestParamsSchema:vi,ElicitRequestSchema:yi,InputRequestSchema:Si,InputResponseSchema:bi,InputRequestsSchema:Ri,InputResponsesSchema:Ti,InputRequiredResultSchema:Sn,InputResponseRequestParamsSchema:Zs,CallToolRequestSchema:Xs,ListToolsRequestSchema:Ws,ListPromptsRequestSchema:Ys,GetPromptRequestSchema:Qs,ListResourcesRequestSchema:ea,ListResourceTemplatesRequestSchema:ta,ReadResourceRequestSchema:ra,CompleteRequestSchema:na,DiscoverRequestSchema:oa,SubscriptionFilterSchema:Wn,SubscriptionsListenRequestSchema:ia,SubscriptionsListenResultMetaSchema:sa,SubscriptionsListenResultSchema:aa,dispatchRequestSchemas:Sr,dispatchResultSchemas:ca,NotificationMetaSchema:Rn,SubscriptionsAcknowledgedNotificationSchema:Yn,CancelledNotificationParamsSchema:Qn,CancelledNotificationSchema:eo,notificationSchemas2026:Ed,JSONRPCResultResponseSchema:bt(ni),CallToolResultResponseSchema:bt(ie([Xn,Sn])),ListToolsResultResponseSchema:bt(oi),ListPromptsResultResponseSchema:bt(ii),GetPromptResultResponseSchema:bt(ie([si,Sn])),ListResourcesResultResponseSchema:bt(ai),ListResourceTemplatesResultResponseSchema:bt(ci),ReadResourceResultResponseSchema:bt(ie([ui,Sn])),CompleteResultResponseSchema:bt(li),DiscoverResultResponseSchema:bt(di)}}var Pw;function Un(){return Pw??=Nw()}var Aw=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"];function Cw(e){return Aw.includes(e)}var Ko=Symbol("modelcontextprotocol.resultCacheHintFallback");function Vl(e,t){if(t===void 0)return e;let n=e[Ko];if(n===void 0)return {...e,[Ko]:t};let o={},r=n.ttlMs??t.ttlMs;r!==void 0&&(o.ttlMs=r);let i=n.cacheScope??t.cacheScope;return i!==void 0&&(o.cacheScope=i),{...e,[Ko]:o}}function Mw(e){return e[Ko]}function m_(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0}function p_(e){return e==="public"||e==="private"}function f_(e,t){if(e.ttlMs!==void 0&&!m_(e.ttlMs))throw new RangeError(`Invalid cache hint for ${t}: ttlMs must be a non-negative safe integer (got ${String(e.ttlMs)})`);if(e.cacheScope!==void 0&&!p_(e.cacheScope))throw new RangeError(`Invalid cache hint for ${t}: cacheScope must be 'public' or 'private' (got ${String(e.cacheScope)})`)}var Q=(function(e){return e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.ResourceNotFound=-32002]="ResourceNotFound",e[e.MissingRequiredClientCapability=-32021]="MissingRequiredClientCapability",e[e.UnsupportedProtocolVersion=-32022]="UnsupportedProtocolVersion",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired",e})({}),de=class Lb extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ProtocolError"});}static[Symbol.hasInstance](t){return Go(this,t)}static isInstance(t){if(typeof this!="function")throw new TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Go(this,t)}constructor(t,n,o){super(n),this.code=t,this.data=o,this.name="ProtocolError",a_(this,new.target);}static fromError(t,n,o){if(t===Q.UrlElicitationRequired&&o){let r=o;if(r.elicitations)return new Fb(r.elicitations,n)}if(t===Q.UnsupportedProtocolVersion&&o){let r=o;if(Array.isArray(r.supported)&&typeof r.requested=="string")return new Jo({supported:r.supported,requested:r.requested},n)}if(t===Q.InvalidParams||t===Q.ResourceNotFound){let r=o;if(typeof r?.uri=="string"&&(t===Q.ResourceNotFound||Object.keys(r).length===1))return new Bl(r.uri,n)}if(t===Q.MissingRequiredClientCapability&&o){let r=o;if(r.requiredCapabilities!==null&&typeof r.requiredCapabilities=="object"&&!Array.isArray(r.requiredCapabilities))return new Kl({requiredCapabilities:r.requiredCapabilities},n)}return new Lb(t,n,o)}},Bl=class extends de{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ResourceNotFoundError"});}constructor(e,t=`Resource not found: ${e}`){super(Q.InvalidParams,t,{uri:e});}get uri(){return this.data.uri}},Fb=class extends de{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UrlElicitationRequiredError"});}constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(Q.UrlElicitationRequired,t,{elicitations:e});}get elicitations(){return this.data?.elicitations??[]}},Jo=class extends de{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnsupportedProtocolVersionError"});}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(Q.UnsupportedProtocolVersion,t,e);}get supported(){return this.data.supported}get requested(){return this.data.requested}},Kl=class extends de{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.MissingRequiredClientCapabilityError"});}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(", ")}`){super(Q.MissingRequiredClientCapability,t,e);}get requiredCapabilities(){return this.data.requiredCapabilities}},jw=0,Dw="private",Uw=["tools/call","prompts/get","resources/read"];function Lw(e,t){let n=t.resultType;if(n===void 0)return {...t,resultType:"complete"};if(n==="complete"||Uw.includes(e))return t;throw new de(Q.InternalError,`Handler for ${e} returned resultType '${String(n)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function Fw(e,t){let n=Mw(t);if(t.resultType!=="complete"||!Cw(e))return n===void 0?t:Gw(t);let o=t,r=m_(o.ttlMs)?o.ttlMs:Bw(n),i=p_(o.cacheScope)?o.cacheScope:Kw(n),s={...o,ttlMs:r,cacheScope:i};return delete s[Ko],s}function qw(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Vw(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[Yt]:t}}:!qw(n)||n[Yt]!==void 0?e:{...e,_meta:{...n,[Yt]:t}}}function Bw(e){return e!==void 0&&m_(e.ttlMs)?e.ttlMs:jw}function Kw(e){return e!==void 0&&p_(e.cacheScope)?e.cacheScope:Dw}function Gw(e){let t={...e};return delete t[Ko],t}var Hw=["elicitation/create","sampling/createMessage","roots/list"],jl;function qb(){if(jl)return jl;let e=Un();return jl={request:{"elicitation/create":z({method:M("elicitation/create"),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":z({method:M("sampling/createMessage"),params:e.CreateMessageRequestParamsSchema}),"roots/list":z({method:M("roots/list"),params:le({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},jl}function Vb(e){return Hw.includes(e)}function e_(e){return Vb(e)?qb().request[e]:void 0}function Zw(e){return Vb(e)?qb().response[e]:void 0}var h_={"tools/call":null,"tools/list":null,"prompts/get":null,"prompts/list":null,"resources/list":null,"resources/templates/list":null,"resources/read":null,"completion/complete":null,"server/discover":null,"subscriptions/listen":null},Bb={"notifications/cancelled":null,"notifications/progress":null,"notifications/message":null,"notifications/resources/updated":null,"notifications/resources/list_changed":null,"notifications/tools/list_changed":null,"notifications/prompts/list_changed":null,"notifications/subscriptions/acknowledged":null};function Kb(e){return Object.prototype.hasOwnProperty.call(h_,e)}function Gb(e){return Object.prototype.hasOwnProperty.call(Bb,e)}function Jw(e){return Object.prototype.hasOwnProperty.call(h_,e)}function Xw(e){return Kb(e)?Un().dispatchRequestSchemas[e]:void 0}function Ww(e){return Jw(e)?Un().dispatchResultSchemas[e]:void 0}function Yw(e){return Gb(e)?Un().notificationSchemas2026[e]:void 0}function As(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Ns(e,t){if(e===void 0)return {ok:false,reason:"not-in-era"};let n=e.safeParse(t);return n.success?{ok:true,value:n.data}:{ok:false,reason:"invalid",message:String(n.error)}}var Qw={ok:false,reason:"not-in-era"},eE=[ur,lr];function tE(e,t){let n=t,o=false,r=()=>(o||(n={...n},o=true),n),i=t.tools;e==="tools/list"&&Array.isArray(i)&&i.some(a=>As(a)&&"execution"in a)&&(r().tools=i.map(a=>{if(!As(a)||!("execution"in a))return a;let c={...a};return delete c.execution,c}));let s=t.capabilities;if(As(s)&&"tasks"in s){let a={...s};delete a.tasks,r().capabilities=a;}return n}var g_={era:"2026-07-28",hasRequestMethod:Kb,hasNotificationMethod:Gb,hasInputRequestMethod:e=>e_(e)!==void 0,validateRequest:(e,t)=>Ns(Xw(e),t),validateResult:(e,t)=>Ns(Ww(e),t),validateNotification:(e,t)=>Ns(Yw(e),t),validateInputRequest:(e,t)=>Ns(e_(e),t),validateInputResponse:(e,t)=>Ns(Zw(e),t),samplingResultVariant:()=>Qw,outboundEnvelope(e){return {[ur]:e.protocolVersion,[Po]:e.clientInfo,[lr]:e.clientCapabilities,...e.logLevel!==void 0&&{[Ar]:e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let o of eE)o in e||t.push({key:o,problem:"missing"});let n=Un().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let o of n.error.issues){let r=o.path.map(String),i=r.length>0?r.join("."):"_meta";r.length===1&&t.some(s=>s.key===i&&s.problem==="missing")||t.push({key:i,problem:o.message});}return t},projectCallToolResult:e=>Nb(e),inputRequestSchema:e_,decodeResult(e,t){if(!As(t))return {kind:"invalid",error:new ye(Ie.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return {kind:"invalid",error:new ye(Ie.InvalidResult,`Invalid result for ${e}: missing required resultType \u2014 servers implementing protocol revision 2026-07-28 MUST include it (the absent-means-complete bridge applies only to earlier-revision servers)`,{method:e,violation:"missing-resultType"})};if(typeof n!="string")return {kind:"invalid",error:new ye(Ie.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n==="input_required"){let s=t.inputRequests,a=As(s)?s:{},c=t.requestState;return Object.keys(a).length===0&&typeof c!="string"?{kind:"invalid",error:new ye(Ie.InvalidResult,`Invalid result for ${e}: input_required carries neither inputRequests nor requestState (every input_required result must include at least one of the two)`,{method:e,violation:"input-required-missing-both"})}:{kind:"input_required",inputRequests:a,...typeof c=="string"&&{requestState:c}}}if(n!=="complete")return {kind:"invalid",error:new ye(Ie.UnsupportedResultType,`Unsupported result type '${n}' for ${e}`,{resultType:n,method:e})};let o=rE(),r=Object.hasOwn(o,e)?o[e]:void 0;if(r!==void 0){let s=r.safeParse(t);if(!s.success)return {kind:"invalid",error:new ye(Ie.InvalidResult,`Invalid result for ${e}: ${s.error}`,{method:e})}}let i={...t};return delete i.resultType,{kind:"complete",result:i}},encodeResult(e,t,n){return Vw(Fw(e,Lw(e,tE(e,t))),n)},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope(e){if(e.envelope===void 0)return "Request is missing the required _meta envelope for protocol revision 2026-07-28 (io.modelcontextprotocol/protocolVersion, io.modelcontextprotocol/clientCapabilities)";let t=Un().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return `Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(n=>n.message).join("; ")}`}},Dl;function rE(){if(Dl)return Dl;let e=Un();return Dl={"tools/call":e.CallToolResultSchema,"tools/list":e.ListToolsResultSchema,"prompts/get":e.GetPromptResultSchema,"prompts/list":e.ListPromptsResultSchema,"resources/list":e.ListResourcesResultSchema,"resources/templates/list":e.ListResourceTemplatesResultSchema,"resources/read":e.ReadResourceResultSchema,"completion/complete":e.CompleteResultSchema,"server/discover":e.DiscoverResultSchema},Dl}var Ds="2026-07-28";function qr(e){return e!==void 0&&Zo(e)?g_:d_}function Sb(e){return e.revision!==void 0?qr(e.revision).era:e.era==="modern"?g_.era:d_.era}function t_(e){return Hb.some(t=>t.hasRequestMethod(e))}function r_(e){return Hb.some(t=>t.hasNotificationMethod(e))}var Hb=[d_,g_];function bb(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Ln(e){if(!bb(e))return;let t=e._meta;return bb(t)?t:void 0}function Gl(e){let t=Ln(e);return t!==void 0&&ur in t}function Hl(e){let t=Ln(e)?.[ur];return typeof t=="string"?t:void 0}function Zl(e){return qr(Ds).validateEnvelopeMeta(e)}var nE=pv({AnnotationsSchema:()=>dr,AudioContentSchema:()=>Lo,BaseMetadataSchema:()=>cr,BaseRequestParamsSchema:()=>it,BlobResourceContentsSchema:()=>Ss,BooleanSchemaSchema:()=>xs,CallToolRequestParamsSchema:()=>Zu,CallToolRequestSchema:()=>Ju,CallToolResultSchema:()=>$s,CancelTaskRequestSchema:()=>Dg,CancelTaskResultSchema:()=>Ug,CancelledNotificationParamsSchema:()=>Wc,CancelledNotificationSchema:()=>fs,ClientCapabilitiesSchema:()=>tu,ClientNotificationSchema:()=>Fg,ClientRequestSchema:()=>Lg,ClientResultSchema:()=>qg,ClientTasksCapabilitySchema:()=>Qc,CompatibilityCallToolResultSchema:()=>Eg,CompleteRequestParamsSchema:()=>Rl,CompleteRequestSchema:()=>Tl,CompleteResultSchema:()=>$l,ContentBlockSchema:()=>Fo,CreateMessageRequestParamsSchema:()=>al,CreateMessageRequestSchema:()=>cl,CreateMessageResultSchema:()=>ul,CreateMessageResultWithToolsSchema:()=>ll,CreateTaskResultSchema:()=>Og,CursorSchema:()=>as,DiscoverRequestSchema:()=>su,DiscoverResultSchema:()=>au,ElicitRequestFormParamsSchema:()=>Bo,ElicitRequestParamsSchema:()=>hl,ElicitRequestSchema:()=>gl,ElicitRequestURLParamsSchema:()=>fl,ElicitResultSchema:()=>yl,ElicitationCompleteNotificationParamsSchema:()=>_l,ElicitationCompleteNotificationSchema:()=>vl,EmbeddedResourceSchema:()=>Uu,EmptyResultSchema:()=>ps,EnumSchemaSchema:()=>pl,GetPromptRequestParamsSchema:()=>Mu,GetPromptRequestSchema:()=>ju,GetPromptResultSchema:()=>qu,GetTaskPayloadRequestSchema:()=>Ag,GetTaskPayloadResultSchema:()=>Cg,GetTaskRequestSchema:()=>Ng,GetTaskResultSchema:()=>Pg,IconSchema:()=>Yc,IconsSchema:()=>Mr,ImageContentSchema:()=>Uo,ImplementationSchema:()=>Mo,InitializeRequestParamsSchema:()=>ru,InitializeRequestSchema:()=>nu,InitializeResultSchema:()=>ou,InitializedNotificationSchema:()=>iu,JSONArraySchema:()=>$g,JSONObjectSchema:()=>Ge,JSONRPCErrorResponseSchema:()=>Co,JSONRPCMessageSchema:()=>ms,JSONRPCNotificationSchema:()=>ds,JSONRPCRequestSchema:()=>ls,JSONRPCResponseSchema:()=>xg,JSONRPCResultResponseSchema:()=>Ao,JSONValueSchema:()=>Pr,LegacyTitledEnumSchemaSchema:()=>Is,ListChangedOptionsBaseSchema:()=>Ig,ListPromptsRequestSchema:()=>Au,ListPromptsResultSchema:()=>Cu,ListResourceTemplatesRequestSchema:()=>fu,ListResourceTemplatesResultSchema:()=>hu,ListResourcesRequestSchema:()=>mu,ListResourcesResultSchema:()=>pu,ListRootsRequestSchema:()=>wl,ListRootsResultSchema:()=>El,ListTasksRequestSchema:()=>Mg,ListTasksResultSchema:()=>jg,ListToolsRequestSchema:()=>Gu,ListToolsResultSchema:()=>Hu,LoggingLevelSchema:()=>Lr,LoggingMessageNotificationParamsSchema:()=>Qu,LoggingMessageNotificationSchema:()=>el,ModelHintSchema:()=>tl,ModelPreferencesSchema:()=>rl,MultiSelectEnumSchemaSchema:()=>ml,NotificationSchema:()=>pt,NotificationsParamsSchema:()=>mt,NumberSchemaSchema:()=>Vo,PaginatedRequestParamsSchema:()=>lu,PaginatedRequestSchema:()=>jr,PaginatedResultSchema:()=>Dr,PingRequestSchema:()=>gs,PrimitiveSchemaDefinitionSchema:()=>ks,ProgressNotificationParamsSchema:()=>uu,ProgressNotificationSchema:()=>_s,ProgressSchema:()=>cu,ProgressTokenSchema:()=>ss,PromptArgumentSchema:()=>Nu,PromptListChangedNotificationSchema:()=>Vu,PromptMessageSchema:()=>Fu,PromptReferenceSchema:()=>bl,PromptSchema:()=>Pu,ReadResourceRequestParamsSchema:()=>gu,ReadResourceRequestSchema:()=>_u,ReadResourceResultSchema:()=>vu,RelatedTaskMetadataSchema:()=>Xc,RequestIdSchema:()=>Cr,RequestMetaSchema:()=>cs,RequestSchema:()=>He,ResourceContentsSchema:()=>vs,ResourceLinkSchema:()=>Lu,ResourceListChangedNotificationSchema:()=>yu,ResourceRequestParamsSchema:()=>jo,ResourceSchema:()=>bs,ResourceTemplateReferenceSchema:()=>Sl,ResourceTemplateSchema:()=>du,ResourceUpdatedNotificationParamsSchema:()=>Ou,ResourceUpdatedNotificationSchema:()=>ku,ResultMetaObjectSchema:()=>us,ResultSchema:()=>Ze,RoleSchema:()=>Ur,RootSchema:()=>xl,RootsListChangedNotificationSchema:()=>Il,SamplingContentSchema:()=>il,SamplingMessageContentBlockSchema:()=>Pn,SamplingMessageSchema:()=>sl,ServerCapabilitiesSchema:()=>hs,ServerNotificationSchema:()=>Bg,ServerRequestSchema:()=>Vg,ServerResultSchema:()=>Kg,ServerTasksCapabilitySchema:()=>eu,SetLevelRequestParamsSchema:()=>Wu,SetLevelRequestSchema:()=>Yu,SingleSelectEnumSchemaSchema:()=>dl,StringSchemaSchema:()=>qo,SubscribeRequestParamsSchema:()=>Su,SubscribeRequestSchema:()=>bu,SubscriptionFilterSchema:()=>Rs,SubscriptionsAcknowledgedNotificationParamsSchema:()=>wu,SubscriptionsAcknowledgedNotificationSchema:()=>Eu,SubscriptionsListenRequestParamsSchema:()=>$u,SubscriptionsListenRequestSchema:()=>xu,SubscriptionsListenResultMetaSchema:()=>Iu,SubscriptionsListenResultSchema:()=>zu,TaskAugmentedRequestParamsSchema:()=>jn,TaskCreationParamsSchema:()=>zg,TaskMetadataSchema:()=>Jc,TaskSchema:()=>Fr,TaskStatusNotificationParamsSchema:()=>Ol,TaskStatusNotificationSchema:()=>kg,TaskStatusSchema:()=>zl,TextContentSchema:()=>Do,TextResourceContentsSchema:()=>ys,TitledMultiSelectEnumSchemaSchema:()=>Os,TitledSingleSelectEnumSchemaSchema:()=>Es,ToolAnnotationsSchema:()=>Bu,ToolChoiceSchema:()=>nl,ToolExecutionSchema:()=>Ku,ToolListChangedNotificationSchema:()=>Xu,ToolResultContentSchema:()=>ol,ToolSchema:()=>Ts,ToolUseContentSchema:()=>Du,UnsubscribeRequestParamsSchema:()=>Ru,UnsubscribeRequestSchema:()=>Tu,UntitledMultiSelectEnumSchemaSchema:()=>zs,UntitledSingleSelectEnumSchemaSchema:()=>ws});var Ct=e=>ls.safeParse(e).success,Br=e=>ds.safeParse(e).success,Ms=e=>Ao.safeParse(e).success,Jl=e=>Co.safeParse(e).success;var mr=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)&&e.resultType==="input_required";function __(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function v_(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var Rb="x-mcp-header",oE=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,iE=new Set(["string","integer","boolean","number"]);function y_(e){let t=[],n=new Map,o=(i,s,a)=>{if(i===null||typeof i!="object")return;let c=i;if(Rb in c){if(!a||s.length===0)return `${Ul(s)}: x-mcp-header is only permitted on properties statically reachable via a chain of 'properties' keys (not under items, additionalProperties, oneOf/anyOf/allOf/not, if/then/else, or $ref)`;let l=c[Rb];if(typeof l!="string"||l.length===0)return `${Ul(s)}: x-mcp-header MUST be a non-empty string`;if(!oE.test(l))return `${Ul(s)}: x-mcp-header '${l}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let m=typeof c.type=="string"?c.type:void 0;if(m===void 0||!iE.has(m))return `${Ul(s)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${m??"<none>"}`;let h=l.toLowerCase(),y=n.get(h);if(y!==void 0)return `x-mcp-header '${l}' is not case-insensitively unique (also declared as '${y}')`;n.set(h,l),t.push({path:s,headerName:l,type:m});}let u=c.properties;if(u!==null&&typeof u=="object")for(let[l,m]of Object.entries(u)){let h=o(m,[...s,l],a);if(h!==void 0)return h}for(let l of sE){let m=c[l];if(m===void 0)continue;let h=Array.isArray(m)?m:m!==null&&typeof m=="object"&&aE.has(l)?Object.values(m):[m];for(let y of h){let b=o(y,[...s,`<${l}>`],false);if(b!==void 0)return b}}},r=o(e,[],true);return r===void 0?{valid:true,declarations:t}:{valid:false,reason:r}}var sE=["items","prefixItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","patternProperties","dependentSchemas","oneOf","anyOf","allOf","not","if","then","else","$defs","definitions"],aE=new Set(["patternProperties","dependentSchemas","$defs","definitions"]);function Ul(e){return e.length===0?"<root>":e.join(".")}var Fl=-32020;[{rung:"http-method",order:1,evaluatedAt:"edge",codes:[-32e3],conformance:[],rationale:"The modern era is POST-only; GET/DELETE are body-less 2025-era session operations and are method-routed to legacy serving (405 when legacy serving is not configured), before any body is read."},{rung:"jsonrpc-shape",order:2,evaluatedAt:"edge",codes:[Q.InvalidRequest],conformance:["server-stateless"],rationale:"The body must be a JSON-RPC request or notification: posted responses and batch arrays containing a modern or invalid element are rejected before classification (element-wise batch rule); all-legacy arrays stay legacy traffic."},{rung:"era-classification",order:3,evaluatedAt:"edge",codes:[Fl,Q.UnsupportedProtocolVersion],conformance:["server-stateless","http-header-validation","http-custom-header-server-validation"],rationale:"Body-primary era classification with the protocol-version header as a cross-check; a header/body disagreement is rejected with -32020 (HeaderMismatch), and an envelope-less request on a modern-only endpoint is answered with the unsupported-protocol-version error naming the supported revisions."},{rung:"envelope",order:4,evaluatedAt:"edge",codes:[Q.InvalidParams],conformance:["server-stateless"],rationale:"A present envelope claim with a malformed envelope \u2014 and a missing envelope on a request whose protocol-version header names a modern revision \u2014 is an invalid-params rejection naming the offending or missing key(s); never a silent fall back to legacy handling. This is the only place an invalid-params rejection maps to HTTP 400."},{rung:"method-registry",order:5,evaluatedAt:"dispatch",codes:[Q.MethodNotFound],conformance:["server-stateless"],rationale:"Method existence outranks parameter validity: a method absent from the negotiated revision\u2019s registry (or with no handler installed) answers method-not-found before params or capabilities are looked at."},{rung:"request-params",order:6,evaluatedAt:"dispatch",codes:[Q.InvalidParams],conformance:[],rationale:"Per-method params validation; emitted in-band by the dispatch layer (HTTP 200), never via the ladder status table."},{rung:"standard-header-validation",order:7,evaluatedAt:"pre-dispatch",codes:[Fl],conformance:["http-header-validation"],rationale:"SEP-2243 standard `Mcp-Method` / `Mcp-Name` headers \u2014 presence, sentinel decoding, and `Mcp-Name` \u2194 body cross-check \u2014 are validated by the HTTP entry on a modern-classified request after the supported-revision gate and before dispatch. The classifier\u2019s own header-mismatch cells (protocol-version, `Mcp-Method` mismatch) stay on the edge `era-classification` rung; this rung carries the entry-layer presence/`Mcp-Name` half. Evaluated before the capability gate, the factory call, and the `Mcp-Param-*` rung so a request that fails several rungs is answered by the standard-header rung first. The documented order (after method-registry 5 and request-params 6) is NOT the observed precedence: serveModern evaluates this rung immediately after the supported-revision gate, so a request that also fails a dispatch rung is answered here before the dispatch rungs (5\u20136) are consulted."},{rung:"client-capabilities",order:8,evaluatedAt:"pre-dispatch",codes:[Q.MissingRequiredClientCapability],conformance:["server-stateless"],rationale:"The capability requirement is checked by the HTTP entry, pre-dispatch, against the validated envelope the classifier produced \u2014 pinning the spec-mandated HTTP 400 independently of how dispatch- and handler-produced errors are mapped. The documented order (after method resolution and params validation) is preserved observably only while the requirement table is empty: once a served method gains a requirement entry, a request that is missing the capability and would also fail a dispatch rung is answered by this gate first, so the entry must consult the method registry before the gate if the documented precedence is to stay observable."},{rung:"param-header-validation",order:9,evaluatedAt:"pre-dispatch",codes:[Fl],conformance:["http-custom-header-server-validation"],rationale:"SEP-2243 `Mcp-Param-*` headers are validated against the named tool\u2019s `x-mcp-header` declarations and the body `arguments` after the tool registry is known and before dispatch reaches the handler; a missing/disagreeing/malformed header is rejected 400 / -32020 with the same shape as the standard-header cross-checks. The documented order (after method resolution and params validation) is preserved observably only when the body `arguments` would otherwise validate: the check runs pre-dispatch, so a `tools/call` that fails BOTH this rung and a dispatch-time rung (e.g. order-6 `request-params`, -32602) is answered by this gate first with 400 / -32020, not by the earlier-ordered rung."}];({[Q.ParseError]:400,[Q.InvalidRequest]:400,[Q.MethodNotFound]:404,[Q.UnsupportedProtocolVersion]:400,[Q.MissingRequiredClientCapability]:400});function Ll(e,t,n,o,r){return {kind:"reject",rung:e,cell:t,httpStatus:n,code:o.code,message:o.message,...o.data!==void 0&&{data:o.data},settled:r}}function S_(e){if(!Gl(e))return false;let t=Hl(e);if(t===void 0||!Zo(t))return false;let n=Ln(e);return n!==void 0&&Zl(n).length===0}function b_(e,t){switch(e.reason){case "http-method":return Ll("http-method","modern-only-method-not-allowed",405,new de(-32e3,"Method not allowed."),true);case "batch":return Ll("jsonrpc-shape","modern-only-batch-not-supported",400,new de(Q.InvalidRequest,"Bad Request: JSON-RPC batches are not supported by this endpoint"),true);case "response":return Ll("jsonrpc-shape","modern-only-response-post",400,new de(Q.InvalidRequest,"Bad Request: JSON-RPC responses cannot be posted to this endpoint"),true);case "notification":return;case "initialize":case "no-claim":{let n=e.requestedVersion;return Ll("era-classification","modern-only-missing-envelope",400,n===void 0?new de(Q.UnsupportedProtocolVersion,"Unsupported protocol version: the request did not name a protocol version",{supported:[...t]}):new Jo({supported:[...t],requested:n}),true)}}}function Xl(e,t){return Zi(e,t)}function Ps(e){return new Set(e.flatMap(t=>Object.keys(t.shape)))}function Ho(e){if(e==null)return false;let t=typeof e;return t!=="object"&&t!=="function"||!("~standard"in e)?false:typeof e["~standard"]?.validate=="function"}var Tb=false,i_="draft-2020-12";function Kr(e,t="input"){let n=e["~standard"],o;if(n.jsonSchema)o=n.jsonSchema[t]({target:i_});else if(n.vendor==="zod"){if(!("_zod"in e))throw new Error("Schema appears to be from zod 3, which the SDK cannot convert to JSON Schema. Upgrade to zod >=4.2.0, or wrap your JSON Schema with fromJsonSchema().");Tb||(Tb=true,console.warn("[mcp-sdk] Your zod version does not implement `~standard.jsonSchema` (added in zod 4.2.0). Falling back to z.toJSONSchema(). Upgrade to zod >=4.2.0 to silence this warning.")),o=kn(e,{target:i_,io:t});}else throw new Error(`Schema library "${n.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t==="output")return o.type!==void 0?o:Zb(o)?{type:"object",...o}:o;if(o.type!==void 0&&o.type!=="object")throw new Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(o.type)}). Wrap your schema in z.object({...}) or equivalent.`);return {type:"object",...o}}function Zb(e){if("properties"in e||"patternProperties"in e||"additionalProperties"in e||"required"in e)return true;for(let t of ["oneOf","anyOf","allOf"]){let n=e[t];if(Array.isArray(n)&&n.length>0)return n.every(o=>o!==null&&typeof o=="object"&&(o.type==="object"||Zb(o)))}return false}function uE(e){return e.path?.length?`${e.path.map(t=>String(typeof t=="object"?t.key:t)).join(".")}: ${e.message}`:e.message}async function Dn(e,t){let n=await e["~standard"].validate(t);return n.issues&&n.issues.length>0?{success:false,error:n.issues.map(o=>uE(o)).join(", ")}:{success:true,data:n.value}}function lE(e){let t=kn(e,{target:i_,io:"input"});return typeof t.pattern=="string"?t.pattern:void 0}var dE=/\\\.\\d\{(\d+)\}/;function mE(e){let t=dE.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[false,true].flatMap(o=>[false,true].flatMap(r=>n.map(i=>Ot.datetime({local:o,offset:r,precision:i}))))}function pE(e,t){let n;switch(e){case "email":n=[xc()];break;case "uri":n=[Io()];break;case "date":n=[Ot.date()];break;case "date-time":n=mE(t);break}return new Set(n.map(o=>lE(o)).filter(o=>o!==void 0))}function fE(e,t,n){return n!=="zod"?true:pE(e,t).has(t)}function Jb(e){let t=Kr(e,"input"),n=t.properties||{},o=t.required||[];return Object.entries(n).map(([r,i])=>({name:r,description:i?.description,required:o.includes(r)}))}function js(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function hE(e){try{return Kr(e,"input")}catch(t){let n=t instanceof Error?t.message:String(t);throw new de(Q.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${n}`)}}var gE=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);function R_(e){return gE.has(e)||e.startsWith("x-")}var _E=new Set(["$schema",...Object.keys(Bo.shape.requestedSchema.shape)]),$b={string:Ps([qo,ws,Es,Is]),number:Ps([Vo]),integer:Ps([Vo]),boolean:Ps([xs]),array:Ps([zs,Os])},vE=new Set(qo.shape.format.unwrap().options);function yE(e,t,n,o){if(!js(e))return e;let r=typeof e.type=="string"&&Object.hasOwn($b,e.type)?$b[e.type]:void 0;if(r===void 0)return e;let i={};for(let[s,a]of Object.entries(e))r.has(s)||R_(s)?i[s]=a:s==="pattern"&&e.type==="string"&&typeof e.format=="string"?vE.has(e.format)?(typeof a!="string"||!fE(e.format,a,n))&&o.push(`${t}.${s}`):i[s]=a:o.push(`${t}.${s}`);return i}function SE(e,t){let n={},o=[];for(let[r,i]of Object.entries(e))r==="properties"&&js(i)?n[r]=Object.fromEntries(Object.entries(i).map(([s,a])=>[s,yE(a,`properties.${s}`,t,o)])):_E.has(r)?n[r]=i:R_(r)||o.push(r);if(o.length>0)throw new de(Q.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${o.join(", ")}`);return n}function bE(e,t){if(!js(e.properties))return t;let n=Object.entries(e.properties).filter(([,o])=>!Xl(ks,o).success).map(([o])=>`properties.${o}`);return n.length>0?n.join(", "):t}function s_(e,t,n=""){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((o,r)=>s_(o,t[r],`${n}[${r}]`)):!js(e)||!js(t)?[]:Object.entries(e).flatMap(([o,r])=>{let i=n?`${n}.${o}`:o;return Object.prototype.hasOwnProperty.call(t,o)?s_(r,t[o],i):R_(o)?[]:[i]})}function RE(e){if(!Ho(e.requestedSchema))return {...e,mode:"form",requestedSchema:e.requestedSchema};let t=e.requestedSchema["~standard"].vendor,n=SE(hE(e.requestedSchema),t),o=Xl(Bo.shape.requestedSchema,n);if(!o.success)throw new de(Q.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${bE(n,o.error.message)}`);let r=s_(n,o.data);if(r.length>0)throw new de(Q.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(", ")}`);let i=(o.data.required??[]).filter(s=>!Object.prototype.hasOwnProperty.call(o.data.properties,s));if(i.length>0)throw new de(Q.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${i.join(", ")}`);return {...e,mode:"form",requestedSchema:o.data}}function TE(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState=="string";if(!t&&!n)throw new TypeError("inputRequired() requires at least one of inputRequests (with at least one entry) or requestState (spec: every InputRequiredResult MUST include at least one of the two)");return {resultType:"input_required",...e.inputRequests!==void 0&&{inputRequests:e.inputRequests},...e.requestState!==void 0&&{requestState:e.requestState}}}Object.assign(TE,{elicit(e){try{return {method:"elicitation/create",params:RE(e)}}catch(t){throw t instanceof de?new TypeError(t.message,{cause:t}):t}},elicitUrl(e){return {method:"elicitation/create",params:{...e,mode:"url"}}},createMessage(e){return {method:"sampling/createMessage",params:e}},listRoots(){return {method:"roots/list"}}});var Xb=250;function Wb(e,t){return `Multi-round-trip request '${e}' still required input after ${t} rounds (inputRequired.maxRounds)`}function Yb(e,t){return new Promise((n,o)=>{if(t?.aborted){o(t.reason instanceof ye?t.reason:new ye(Ie.RequestTimeout,String(t.reason)));return}let r=setTimeout(()=>{t?.removeEventListener("abort",i),n();},e),i=()=>{clearTimeout(r),o(t?.reason instanceof ye?t.reason:new ye(Ie.RequestTimeout,String(t?.reason)));};t?.addEventListener("abort",i,{once:true});})}function Qb(e){let t=new AbortController,n=()=>t.abort(e?.reason);return e?.addEventListener("abort",n,{once:true}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:o=>t.abort(o),dispose:()=>e?.removeEventListener("abort",n)}}var xE=["AnnotationsSchema","AudioContentSchema","BaseMetadataSchema","BlobResourceContentsSchema","BooleanSchemaSchema","CallToolRequestSchema","CallToolRequestParamsSchema","CallToolResultSchema","CancelledNotificationSchema","CancelledNotificationParamsSchema","CancelTaskRequestSchema","CancelTaskResultSchema","ClientCapabilitiesSchema","ClientNotificationSchema","ClientRequestSchema","ClientResultSchema","CompatibilityCallToolResultSchema","CompleteRequestSchema","CompleteRequestParamsSchema","CompleteResultSchema","ContentBlockSchema","CreateMessageRequestSchema","CreateMessageRequestParamsSchema","CreateMessageResultSchema","CreateMessageResultWithToolsSchema","CreateTaskResultSchema","CursorSchema","DiscoverRequestSchema","DiscoverResultSchema","ElicitationCompleteNotificationSchema","ElicitationCompleteNotificationParamsSchema","ElicitRequestSchema","ElicitRequestFormParamsSchema","ElicitRequestParamsSchema","ElicitRequestURLParamsSchema","ElicitResultSchema","EmbeddedResourceSchema","EmptyResultSchema","EnumSchemaSchema","GetPromptRequestSchema","GetPromptRequestParamsSchema","GetPromptResultSchema","GetTaskPayloadRequestSchema","GetTaskPayloadResultSchema","GetTaskRequestSchema","GetTaskResultSchema","IconSchema","IconsSchema","ImageContentSchema","ImplementationSchema","InitializedNotificationSchema","InitializeRequestSchema","InitializeRequestParamsSchema","InitializeResultSchema","JSONArraySchema","JSONObjectSchema","JSONRPCErrorResponseSchema","JSONRPCMessageSchema","JSONRPCNotificationSchema","JSONRPCRequestSchema","JSONRPCResponseSchema","JSONRPCResultResponseSchema","JSONValueSchema","LegacyTitledEnumSchemaSchema","ListPromptsRequestSchema","ListPromptsResultSchema","ListResourcesRequestSchema","ListResourcesResultSchema","ListResourceTemplatesRequestSchema","ListResourceTemplatesResultSchema","ListRootsRequestSchema","ListRootsResultSchema","ListTasksRequestSchema","ListTasksResultSchema","ListToolsRequestSchema","ListToolsResultSchema","LoggingLevelSchema","LoggingMessageNotificationSchema","LoggingMessageNotificationParamsSchema","ModelHintSchema","ModelPreferencesSchema","MultiSelectEnumSchemaSchema","NotificationSchema","NumberSchemaSchema","PaginatedRequestSchema","PaginatedRequestParamsSchema","PaginatedResultSchema","PingRequestSchema","PrimitiveSchemaDefinitionSchema","ProgressSchema","ProgressNotificationSchema","ProgressNotificationParamsSchema","ProgressTokenSchema","PromptSchema","PromptArgumentSchema","PromptListChangedNotificationSchema","PromptMessageSchema","PromptReferenceSchema","ReadResourceRequestSchema","ReadResourceRequestParamsSchema","ReadResourceResultSchema","RelatedTaskMetadataSchema","RequestSchema","RequestIdSchema","RequestMetaSchema","ResourceSchema","ResourceContentsSchema","ResourceLinkSchema","ResourceListChangedNotificationSchema","ResourceRequestParamsSchema","ResourceTemplateSchema","ResourceTemplateReferenceSchema","ResourceUpdatedNotificationSchema","ResourceUpdatedNotificationParamsSchema","ResultMetaObjectSchema","ResultSchema","RoleSchema","RootSchema","RootsListChangedNotificationSchema","SamplingContentSchema","SamplingMessageSchema","SamplingMessageContentBlockSchema","ServerCapabilitiesSchema","ServerNotificationSchema","ServerRequestSchema","ServerResultSchema","SetLevelRequestSchema","SetLevelRequestParamsSchema","SingleSelectEnumSchemaSchema","StringSchemaSchema","SubscribeRequestSchema","SubscribeRequestParamsSchema","SubscriptionFilterSchema","SubscriptionsAcknowledgedNotificationSchema","SubscriptionsAcknowledgedNotificationParamsSchema","SubscriptionsListenRequestSchema","SubscriptionsListenRequestParamsSchema","SubscriptionsListenResultSchema","SubscriptionsListenResultMetaSchema","TaskAugmentedRequestParamsSchema","TaskCreationParamsSchema","TaskMetadataSchema","TaskSchema","TaskStatusSchema","TaskStatusNotificationSchema","TaskStatusNotificationParamsSchema","TextContentSchema","TextResourceContentsSchema","TitledMultiSelectEnumSchemaSchema","TitledSingleSelectEnumSchemaSchema","ToolSchema","ToolAnnotationsSchema","ToolChoiceSchema","ToolExecutionSchema","ToolListChangedNotificationSchema","ToolResultContentSchema","ToolUseContentSchema","UnsubscribeRequestSchema","UnsubscribeRequestParamsSchema","UntitledMultiSelectEnumSchemaSchema","UntitledSingleSelectEnumSchemaSchema"],wE={IdJagTokenExchangeResponseSchema:Jg,OAuthClientInformationFullSchema:Wg,OAuthClientInformationSchema:Al,OAuthClientMetadataSchema:Pl,OAuthClientRegistrationErrorSchema:Yg,OAuthErrorResponseSchema:Xg,OAuthMetadataSchema:kl,OAuthProtectedResourceMetadataSchema:Gg,OAuthTokenRevocationRequestSchema:Qg,OAuthTokensSchema:Zg,OpenIdProviderDiscoveryMetadataSchema:Hg,OpenIdProviderMetadataSchema:Nl},eR={},tR={};function rR(e,t){let n=e.slice(0,-6);eR[n]=t,tR[n]=o=>t.safeParse(o).success;}for(let e of xE)rR(e,nE[e]);for(let[e,t]of Object.entries(wE))rR(e,t);Object.freeze(eR);Object.freeze(tR);function zE(e){switch(e){case "initialize":case "notifications/initialized":return qr(void 0);case "server/discover":return qr(Ds);default:return}}var nR=6e4,OE=[ur,Po,lr,Ar],kE=["inputResponses","requestState"];function xb(e,t){let n=e.params;if(!Cs(n))return {message:e,lifted:{}};let o=n._meta,r=Cs(o)?OE.filter(c=>c in o):[],i=t==="request"?kE.filter(c=>c in n):[];if(r.length===0&&i.length===0)return {message:e,lifted:{}};let s={},a={...n};if(r.length>0&&Cs(o)){let c={},u={...o};for(let l of r)c[l]=o[l],delete u[l];s.envelope=c,Object.keys(u).length>0?a._meta=u:delete a._meta;}for(let c of i)c==="inputResponses"&&(s.inputResponses=a[c]),c==="requestState"&&(s.requestState=a[c]),delete a[c];return {message:{...e,params:a},lifted:s}}function wb(e,t){let n=e.validateResult(t,void 0);if(!(!n.ok&&n.reason==="not-in-era"))return {"~standard":{version:1,vendor:"mcp-wire-codec",validate(o){let r=e.validateResult(t,o);return r.ok?{value:r.value}:{issues:[{message:r.reason==="invalid"?r.message:`not-in-era: ${t}`}]}}}}}function Us(e){return ()=>e}var NE=Us(void 0);function T_(e,t){return {...e,mcpReq:{...e.mcpReq,requestState:Us(t)}}}var oR;function $_(e,t){oR(e,t);}var x_=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;static{oR=(e,t)=>{e._negotiatedProtocolVersion=t;};}_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??Hc,this.setNotificationHandler("notifications/cancelled",t=>{this._oncancel(t);}),this.setNotificationHandler("notifications/progress",t=>{this._onprogress(t);}),this.setRequestHandler("ping",t=>({}));}_shouldDropInbound(e){}_outboundMetaEnvelope(){}_envelopeOutbound(e){let t=this._outboundMetaEnvelope();if(t===void 0)return e;let n=e.params??{};return {...e,params:{...n,_meta:{...t,...n._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new ye(Ie.UnsupportedResultType,`Unsupported result type '${e.kind}' for ${t.request.method}`,{resultType:e.kind,method:t.request.method}))}_getRequestHandler(e){return this._requestHandlers.get(e)}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason);}_setupTimeout(e,t,n,o,r=false){this._timeoutInfo.set(e,{timeoutId:setTimeout(o,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:r,onTimeout:o});}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return false;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new ye(Ie.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),true}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e));}async connect(e){this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{try{t?.();}finally{this._onclose();}};let n=this.transport?.onerror;this._transport.onerror=r=>{n?.(r),this._onerror(r);};let o=this._transport?.onmessage;this._transport.onmessage=(r,i)=>{o?.(r,i),Ms(r)||Jl(r)?this._onresponse(r):Ct(r)?this._onrequest(r,i):Br(r)?this._onnotification(r,i):this._onerror(new Error(`Unknown message type: ${JSON.stringify(r)}`));},e.setSupportedProtocolVersions?.(this._supportedProtocolVersions),await this._transport.start();}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._pendingDebouncedNotifications.clear();for(let o of this._timeoutInfo.values())clearTimeout(o.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new ye(Ie.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.();}finally{for(let o of e.values())o(n);for(let o of t.values())o.abort(n);}}_onerror(e){this.onerror?.(e);}_onnotification(e,t){let{message:n}=xb(e,"notification"),o=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)==="drop")return;if(t?.classification!==void 0){let s=Sb(t.classification);if(s!==o.era){this._onerror(new Error(`Era mismatch on inbound notification '${n.method}': classified as ${s} but this instance serves ${o.era}`));return}}if(r_(n.method)&&!o.hasNotificationMethod(n.method))return;let r=this._notificationHandlers.get(n.method),i=this.fallbackNotificationHandler;r===void 0&&i===void 0||Promise.resolve().then(()=>r===void 0?i(n):r(n,o)).catch(s=>this._onerror(new Error(`Uncaught error in notification handler: ${s}`)));}_onrequest(e,t){let{message:n,lifted:o}=xb(e,"request"),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)==="drop"){this._onerror(new Error(`Dropped inbound request '${e.method}': not servable on this connection's protocol era`));return}let i=this._transport,s=(p,S,d)=>{let _={jsonrpc:"2.0",id:n.id,error:{code:p,message:S,...d!==void 0&&{data:d}}};i?.send(_).catch(f=>this._onerror(new Error(`Failed to send an error response: ${f}`)));};if(t?.classification!==void 0){let p=Sb(t.classification);if(p!==r.era){this._onerror(new Error(`Era mismatch on inbound request '${n.method}': classified as ${p} but this instance serves ${r.era}`));let S=t.classification.revision??p;s(Q.UnsupportedProtocolVersion,`Unsupported protocol version: ${S}`,{supported:this._supportedProtocolVersions,requested:S});return}}if(t_(n.method)&&!r.hasRequestMethod(n.method)){s(Q.MethodNotFound,"Method not found");return}let a=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(a===void 0){s(Q.MethodNotFound,"Method not found");return}let c=r.checkInboundEnvelope(o);if(c!==void 0){s(Q.InvalidParams,c);return}let u=(p,S)=>this._notificationViaCodec(this._resolveOutboundCodec(p.method),p,{...S,relatedRequestId:n.id}),l=(p,S,d)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(p.method),p,S,{...d,relatedRequestId:n.id}),m=new AbortController;this._requestHandlerAbortControllers.set(n.id,m);let h=o.inputResponses===void 0?void 0:PE(o.inputResponses),y={sessionId:i?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...o.envelope!==void 0&&{envelope:o.envelope},...h!==void 0&&{inputResponses:h.accepted},...h!==void 0&&h.droppedKeys.length>0&&{droppedInputResponseKeys:h.droppedKeys},requestState:o.requestState===void 0?NE:Us(o.requestState),signal:m.signal,send:((p,S,d)=>{let _=this._resolveOutboundCodec(p.method);if(this._assertOutboundRequestInEra(_,p.method),Ho(S))return l(p,S,d);let f=wb(_,p.method);if(f===void 0)throw new TypeError(`'${p.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return l(p,f,S)}),notify:u},http:t?.authInfo?{authInfo:t.authInfo}:void 0},b=this.buildContext(y,t);Promise.resolve().then(()=>a(n,b)).then(async p=>{if(m.signal.aborted)return;let S;try{S=r.encodeResult(n.method,p,this._outboundServerInfo());}catch(_){this._onerror(new Error(`Failed to encode result for ${n.method}: ${_}`)),s(Q.InternalError,"Internal error");return}let d={result:S,jsonrpc:"2.0",id:n.id};await i?.send(d);},async p=>{if(m.signal.aborted)return;let S=Number.isSafeInteger(p.code)?p.code:Q.InternalError,d={jsonrpc:"2.0",id:n.id,error:{code:r.encodeErrorCode(S),message:p.message??"Internal error",...p.data!==void 0&&{data:p.data}}};await i?.send(d);}).catch(p=>this._onerror(new Error(`Failed to send response: ${p}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===m&&this._requestHandlerAbortControllers.delete(n.id);});}_onprogress(e){let{progressToken:t,...n}=e.params,o=Number(t),r=this._progressHandlers.get(o);if(!r){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let i=this._responseHandlers.get(o),s=this._timeoutInfo.get(o);if(s&&i&&s.resetTimeoutOnProgress)try{this._resetTimeout(o);}catch(a){this._responseHandlers.delete(o),this._progressHandlers.delete(o),this._cleanupTimeout(o),i(a);return}r(n);}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);if(n===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),Ms(e)?n(e):n(de.fromError(e.error.code,e.error.message,e.error.data));}get transport(){return this._transport}async close(){await this._transport?.close();}request(e,t,n){let o=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(o,e.method),Ho(t))return this._requestWithSchemaViaCodec(o,e,t,n);let r=wb(o,e.method);if(r===void 0)throw new TypeError(`'${e.method}' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(o,e,r,t)}_negotiatedWireCodec(){return qr(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=zE(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(t_(t)&&!e.hasRequestMethod(t))throw new ye(Ie.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,n){let o=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(o,e.method),this._requestWithSchemaViaCodec(o,e,t,n)}_requestWithSchemaViaCodec(e,t,n,o){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:s,headers:a}=o??{},c=Date.now(),u,l;return new Promise((m,h)=>{let y=T=>{h(T);};if(!this._transport){y(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===true)try{this.assertCapabilityForMethod(t.method);}catch(T){y(T);return}if(o?.signal?.aborted){let T=o.signal.reason;throw T instanceof ye?T:new ye(Ie.RequestTimeout,String(T))}let b=e.era===Ds&&this._transport.hasPerRequestStream===true?new AbortController:void 0,p=this._requestMessageId++;l=p;let S={...t,jsonrpc:"2.0",id:p};o?.onprogress&&(this._progressHandlers.set(p,o.onprogress),S.params={...t.params,_meta:{...t.params?._meta,progressToken:p}});let d=this._envelopeOutbound(S),_=false,f=T=>{_||(this._progressHandlers.delete(p),b===void 0?this._transport?.send(this._envelopeOutbound({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:p,reason:String(T)}}),{relatedRequestId:r,resumptionToken:i,onresumptiontoken:s}).catch(R=>this._onerror(new Error(`Failed to send cancellation: ${R}`))):b.abort(),h(T instanceof ye?T:new ye(Ie.RequestTimeout,String(T))));};this._responseHandlers.set(p,T=>{if(o?.signal?.aborted)return;if(_=true,T instanceof Error)return h(T);let R;try{R=e.decodeResult(t.method,T.result);}catch(E){return h(E instanceof Error?E:new Error(String(E)))}if(R.kind==="invalid")return h(R.error);if(R.kind==="input_required"){if(o?.allowInputRequired===true)return m(AE(R));let E={codec:e,request:t,resultSchema:n,options:o,flowStartedAt:c,retry:(A,N)=>this._requestWithSchemaViaCodec(e,A===void 0?{method:t.method}:{method:t.method,params:A},n,N)};return m(this._resolveNonCompleteResult(R,E))}let $=R.result;Dn(n,$).then(E=>{E.success?m(E.data):h(new ye(Ie.InvalidResult,`Invalid result for ${t.method}: ${E.error}`));},h);}),u=()=>f(o?.signal?.reason),o?.signal?.addEventListener("abort",u,{once:true});let v=o?.timeout??nR,x=()=>f(new ye(Ie.RequestTimeout,"Request timed out",{timeout:v}));this._setupTimeout(p,v,o?.maxTotalTimeout,x,o?.resetTimeoutOnProgress??false),this._transport.send(d,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:s,headers:a,requestSignal:b?.signal}).catch(T=>{this._progressHandlers.delete(p),h(T);});}).finally(()=>{u&&o?.signal?.removeEventListener("abort",u),l!==void 0&&(this._responseHandlers.delete(l),this._cleanupTimeout(l));})}async notification(e,t){return this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new ye(Ie.NotConnected,"Not connected");if(r_(t.method)&&!e.hasNotificationMethod(t.method))throw new ye(Ie.MethodNotSupportedByProtocolVersion,`Notification '${t.method}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t.method,era:e.era});this.assertNotificationCapability(t.method);let o=this._envelopeOutbound({jsonrpc:"2.0",...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!n?.relatedRequestId){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{this._pendingDebouncedNotifications.delete(t.method),this._transport&&this._transport?.send(o,n).catch(r=>this._onerror(r));});return}await this._transport.send(o,n);}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let o;if(typeof t=="function"){if(!t_(e))throw new TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);o=(r,i)=>{let s=this._negotiatedWireCodec(),a=s.validateRequest(e,r);if(!a.ok&&a.reason==="not-in-era"&&(a=s.validateInputRequest(e,r)),!a.ok)throw a.reason==="not-in-era"?new de(Q.InternalError,`No wire schema for ${e} in the resolved era`):new Error(a.message);return Promise.resolve(t(a.value,i))};}else if(n)o=async(r,i)=>{let s=await Dn(t.params,{...r.params});if(!s.success)throw new de(Q.InvalidParams,`Invalid params for ${e}: ${s.error}`);return n(s.data,i)};else throw new TypeError("setRequestHandler: handler is required");this._requestHandlers.set(e,this._wrapHandler(e,o));}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e);}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t=="function"){if(!r_(e))throw new TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(o,r)=>{let i=r.validateNotification(e,o);if(!i.ok)throw i.reason==="not-in-era"?new de(Q.InternalError,`No wire schema for ${e} in the resolved era`):new Error(i.message);return Promise.resolve(t(i.value))});return}if(!n)throw new TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set(e,async o=>{let r=await Dn(t.params,{...o.params});if(!r.success)throw new de(Q.InvalidParams,`Invalid params for notification ${e}: ${r.error}`);await n(r.data,o);});}removeNotificationHandler(e){this._notificationHandlers.delete(e);}};function Cs(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function w_(e,t){let n={...e};for(let o in t){let r=o,i=t[r];if(i===void 0)continue;let s=n[r];n[r]=Cs(s)&&Cs(i)?{...s,...i}:i;}return n}function Eb(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function PE(e){let t={},n=[];if(!Eb(e))return {accepted:t,droppedKeys:n};for(let[o,r]of Object.entries(e)){if(!Eb(r)||"method"in r||"result"in r){n.push(o);continue}t[o]=r;}return {accepted:t,droppedKeys:n}}function AE(e){return {resultType:"input_required",inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState}}}var CE=G((e=>{var t=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,n=/\\([\u000b\u0020-\u00ff])/g,o=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=r;function r(a){if(!a)throw new TypeError("argument string is required");var c=typeof a=="object"?i(a):a;if(typeof c!="string")throw new TypeError("argument string is required to be a string");var u=c.indexOf(";"),l=u!==-1?c.slice(0,u).trim():c.trim();if(!o.test(l))throw new TypeError("invalid media type");var m=new s(l.toLowerCase());if(u!==-1){var h,y,b;for(t.lastIndex=u;y=t.exec(c);){if(y.index!==u)throw new TypeError("invalid parameter format");u+=y[0].length,h=y[1].toLowerCase(),b=y[2],b.charCodeAt(0)===34&&(b=b.slice(1,-1),b.indexOf("\\")!==-1&&(b=b.replace(n,"$1"))),m.parameters[h]=b;}if(u!==c.length)throw new TypeError("invalid parameter format")}return m}function i(a){var c;if(typeof a.getHeader=="function"?c=a.getHeader("content-type"):typeof a.headers=="object"&&(c=a.headers&&a.headers["content-type"]),typeof c!="string")throw new TypeError("content-type header is missing from object");return c}function s(a){this.parameters=Object.create(null),this.type=a;}}));la(CE());var iR=10*1024*1024,E_=class{_buffer;_maxBufferSize;constructor(e){this._maxBufferSize=e?.maxBufferSize??iR;}append(e){if((this._buffer?.length??0)+e.length>this._maxBufferSize)throw this.clear(),new Error(`ReadBuffer exceeded maximum size of ${this._maxBufferSize} bytes`);this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e;}readMessage(){for(;this._buffer;){let e=this._buffer.indexOf(`
67
+ `);if(e===-1)return null;let t=this._buffer.toString("utf8",0,e).replace(/\r$/,"");this._buffer=this._buffer.subarray(e+1);try{return sR(t)}catch(n){if(n instanceof SyntaxError)continue;throw n}}return null}clear(){this._buffer=void 0;}};function sR(e){return ms.parse(JSON.parse(e))}function I_(e){return JSON.stringify(e)+`
68
+ `}var ME=/^[A-Za-z0-9._-]{1,128}$/;function jE(e){let t=[];if(e.length===0)return {isValid:false,warnings:["Tool name cannot be empty"]};if(e.length>128)return {isValid:false,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${e.length})`]};if(e.includes(" ")&&t.push("Tool name contains spaces, which may cause parsing issues"),e.includes(",")&&t.push("Tool name contains commas, which may cause parsing issues"),(e.startsWith("-")||e.endsWith("-"))&&t.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(e.startsWith(".")||e.endsWith("."))&&t.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!ME.test(e)){let n=[...e].filter(o=>!/[A-Za-z0-9._-]/.test(o)).filter((o,r,i)=>i.indexOf(o)===r);return t.push(`Tool name contains invalid characters: ${n.map(o=>`"${o}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:false,warnings:t}}return {isValid:true,warnings:t}}function DE(e,t){if(t.length>0){console.warn(`Tool name validation warning for "${e}":`);for(let n of t)console.warn(` - ${n}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.");}}function z_(e){let t=jE(e);return DE(e,t.warnings),t.isValid}function UE(e){return typeof e=="object"&&e!==null&&"_zod"in e}function LE(e){return typeof e=="object"&&e!==null&&!("_zod"in e)&&"_def"in e&&typeof e._def?.typeName=="string"}function FE(e){if(typeof e!="object"||e===null||Ho(e))return false;let t=Object.getPrototypeOf(e);return t!==Object.prototype&&t!==null?false:Object.values(e).every(n=>UE(n))}function Wl(e){if(e!==void 0){if(FE(e))return z(e);if(typeof e=="object"&&e!==null&&!Ho(e)&&Object.values(e).some(t=>LE(t)))throw new TypeError("Raw-shape inputSchema/outputSchema/argsSchema fields must be Zod v4 schemas. Got a Zod v3 field schema. Import from `zod/v4` (or upgrade your zod import), or wrap with `z.object({...})` yourself.");if(!Ho(e))throw new TypeError("inputSchema/outputSchema/argsSchema must be a Standard Schema (e.g. z.object({...})) or a raw Zod shape ({ field: z.string() }).");return e}}var Ql=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;var t=class{};e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var n=class extends t{constructor(d){if(super(),!e.IDENTIFIER.test(d))throw new Error("CodeGen: name must be a valid identifier");this.str=d;}toString(){return this.str}emptyStr(){return false}get names(){return {[this.str]:1}}};e.Name=n;var o=class extends t{constructor(d){super(),this._items=typeof d=="string"?[d]:d;}toString(){return this.str}emptyStr(){if(this._items.length>1)return false;let d=this._items[0];return d===""||d==='""'}get str(){var d;return (d=this._str)!==null&&d!==void 0?d:this._str=this._items.reduce((_,f)=>`${_}${f}`,"")}get names(){var d;return (d=this._names)!==null&&d!==void 0?d:this._names=this._items.reduce((_,f)=>(f instanceof n&&(_[f.str]=(_[f.str]||0)+1),_),{})}};e._Code=o,e.nil=new o("");function r(d,..._){let f=[d[0]],v=0;for(;v<_.length;)a(f,_[v]),f.push(d[++v]);return new o(f)}e._=r;let i=new o("+");function s(d,..._){let f=[y(d[0])],v=0;for(;v<_.length;)f.push(i),a(f,_[v]),f.push(i,y(d[++v]));return c(f),new o(f)}e.str=s;function a(d,_){_ instanceof o?d.push(..._._items):_ instanceof n?d.push(_):d.push(m(_));}e.addCodeArg=a;function c(d){let _=1;for(;_<d.length-1;){if(d[_]===i){let f=u(d[_-1],d[_+1]);if(f!==void 0){d.splice(_-1,3,f);continue}d[_++]="+";}_++;}}function u(d,_){if(_==='""')return d;if(d==='""')return _;if(typeof d=="string")return _ instanceof n||d[d.length-1]!=='"'?void 0:typeof _!="string"?`${d.slice(0,-1)}${_}"`:_[0]==='"'?d.slice(0,-1)+_.slice(1):void 0;if(typeof _=="string"&&_[0]==='"'&&!(d instanceof n))return `"${d}${_.slice(1)}`}function l(d,_){return _.emptyStr()?d:d.emptyStr()?_:s`${d}${_}`}e.strConcat=l;function m(d){return typeof d=="number"||typeof d=="boolean"||d===null?d:y(Array.isArray(d)?d.join(","):d)}function h(d){return new o(y(d))}e.stringify=h;function y(d){return JSON.stringify(d).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=y;function b(d){return typeof d=="string"&&e.IDENTIFIER.test(d)?new o(`.${d}`):r`[${d}]`}e.getProperty=b;function p(d){if(typeof d=="string"&&e.IDENTIFIER.test(d))return new o(`${d}`);throw new Error(`CodeGen: invalid export name: ${d}, use explicit $id name mapping`)}e.getEsmExportName=p;function S(d){return new o(d.toString())}e.regexpCode=S;})),aR=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;let t=Ql();var n=class extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value;}},o;((function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed";}))(o||(e.UsedValueState=o={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};var r=class{constructor({prefixes:c,parent:u}={}){this._names={},this._prefixes=c,this._parent=u;}toName(c){return c instanceof t.Name?c:this.name(c)}name(c){return new t.Name(this._newName(c))}_newName(c){let u=this._names[c]||this._nameGroup(c);return `${c}${u.index++}`}_nameGroup(c){var u,l;if(!((l=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||l===void 0)&&l.has(c)||this._prefixes&&!this._prefixes.has(c))throw new Error(`CodeGen: prefix "${c}" is not allowed in this scope`);return this._names[c]={prefix:c,index:0}}};e.Scope=r;var i=class extends t.Name{constructor(c,u){super(u),this.prefix=c;}setValue(c,{property:u,itemIndex:l}){this.value=c,this.scopePath=(0, t._)`.${new t.Name(u)}[${l}]`;}};e.ValueScopeName=i;let s=(0, t._)`\n`;var a=class extends r{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?s:t.nil};}get(){return this._scope}name(c){return new i(c,this._newName(c))}value(c,u){var l;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let m=this.toName(c),{prefix:h}=m,y=(l=u.key)!==null&&l!==void 0?l:u.ref,b=this._values[h];if(b){let d=b.get(y);if(d)return d}else b=this._values[h]=new Map;b.set(y,m);let p=this._scope[h]||(this._scope[h]=[]),S=p.length;return p[S]=u.ref,m.setValue(u,{property:h,itemIndex:S}),m}getValue(c,u){let l=this._values[c];if(l)return l.get(u)}scopeRefs(c,u=this._values){return this._reduceValues(u,l=>{if(l.scopePath===void 0)throw new Error(`CodeGen: name "${l}" has no value`);return (0, t._)`${c}${l.scopePath}`})}scopeCode(c=this._values,u,l){return this._reduceValues(c,m=>{if(m.value===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return m.value.code},u,l)}_reduceValues(c,u,l={},m){let h=t.nil;for(let y in c){let b=c[y];if(!b)continue;let p=l[y]=l[y]||new Map;b.forEach(S=>{if(p.has(S))return;p.set(S,o.Started);let d=u(S);if(d){let _=this.opts.es5?e.varKinds.var:e.varKinds.const;h=(0, t._)`${h}${_} ${S} = ${d};${this.opts._n}`;}else if(d=m?.(S))h=(0, t._)`${h}${d}${this.opts._n}`;else throw new n(S);p.set(S,o.Completed);});}return h}};e.ValueScope=a;})),Se=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;let t=Ql(),n=aR();var o=Ql();Object.defineProperty(e,"_",{enumerable:true,get:function(){return o._}}),Object.defineProperty(e,"str",{enumerable:true,get:function(){return o.str}}),Object.defineProperty(e,"strConcat",{enumerable:true,get:function(){return o.strConcat}}),Object.defineProperty(e,"nil",{enumerable:true,get:function(){return o.nil}}),Object.defineProperty(e,"getProperty",{enumerable:true,get:function(){return o.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:true,get:function(){return o.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:true,get:function(){return o.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:true,get:function(){return o.Name}});var r=aR();Object.defineProperty(e,"Scope",{enumerable:true,get:function(){return r.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:true,get:function(){return r.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:true,get:function(){return r.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:true,get:function(){return r.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};var i=class{optimizeNodes(){return this}optimizeNames(w,O){return this}},s=class extends i{constructor(w,O,j){super(),this.varKind=w,this.name=O,this.rhs=j;}render({es5:w,_n:O}){let j=w?n.varKinds.var:this.varKind,Y=this.rhs===void 0?"":` = ${this.rhs}`;return `${j} ${this.name}${Y};`+O}optimizeNames(w,O){if(w[this.name.str])return this.rhs&&(this.rhs=K(this.rhs,w,O)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},a=class extends i{constructor(w,O,j){super(),this.lhs=w,this.rhs=O,this.sideEffects=j;}render({_n:w}){return `${this.lhs} = ${this.rhs};`+w}optimizeNames(w,O){if(!(this.lhs instanceof t.Name&&!w[this.lhs.str]&&!this.sideEffects))return this.rhs=K(this.rhs,w,O),this}get names(){return V(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends a{constructor(w,O,j,Y){super(w,j,Y),this.op=O;}render({_n:w}){return `${this.lhs} ${this.op}= ${this.rhs};`+w}},u=class extends i{constructor(w){super(),this.label=w,this.names={};}render({_n:w}){return `${this.label}:`+w}},l=class extends i{constructor(w){super(),this.label=w,this.names={};}render({_n:w}){return `break${this.label?` ${this.label}`:""};`+w}},m=class extends i{constructor(w){super(),this.error=w;}render({_n:w}){return `throw ${this.error};`+w}get names(){return this.error.names}},h=class extends i{constructor(w){super(),this.code=w;}render({_n:w}){return `${this.code};`+w}optimizeNodes(){return `${this.code}`?this:void 0}optimizeNames(w,O){return this.code=K(this.code,w,O),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},y=class extends i{constructor(w=[]){super(),this.nodes=w;}render(w){return this.nodes.reduce((O,j)=>O+j.render(w),"")}optimizeNodes(){let{nodes:w}=this,O=w.length;for(;O--;){let j=w[O].optimizeNodes();Array.isArray(j)?w.splice(O,1,...j):j?w[O]=j:w.splice(O,1);}return w.length>0?this:void 0}optimizeNames(w,O){let{nodes:j}=this,Y=j.length;for(;Y--;){let ce=j[Y];ce.optimizeNames(w,O)||(ue(w,ce.names),j.splice(Y,1));}return j.length>0?this:void 0}get names(){return this.nodes.reduce((w,O)=>F(w,O.names),{})}},b=class extends y{render(w){return "{"+w._n+super.render(w)+"}"+w._n}},p=class extends y{},S=class extends b{};S.kind="else";var d=class Yl extends b{constructor(O,j){super(j),this.condition=O;}render(O){let j=`if(${this.condition})`+super.render(O);return this.else&&(j+="else "+this.else.render(O)),j}optimizeNodes(){super.optimizeNodes();let O=this.condition;if(O===true)return this.nodes;let j=this.else;if(j){let Y=j.optimizeNodes();j=this.else=Array.isArray(Y)?new S(Y):Y;}if(j)return O===false?j instanceof Yl?j:j.nodes:this.nodes.length?this:new Yl(ke(O),j instanceof Yl?[j]:j.nodes);if(!(O===false||!this.nodes.length))return this}optimizeNames(O,j){var Y;if(this.else=(Y=this.else)===null||Y===void 0?void 0:Y.optimizeNames(O,j),!!(super.optimizeNames(O,j)||this.else))return this.condition=K(this.condition,O,j),this}get names(){let O=super.names;return V(O,this.condition),this.else&&F(O,this.else.names),O}};d.kind="if";var _=class extends b{};_.kind="for";var f=class extends _{constructor(w){super(),this.iteration=w;}render(w){return `for(${this.iteration})`+super.render(w)}optimizeNames(w,O){if(super.optimizeNames(w,O))return this.iteration=K(this.iteration,w,O),this}get names(){return F(super.names,this.iteration.names)}},v=class extends _{constructor(w,O,j,Y){super(),this.varKind=w,this.name=O,this.from=j,this.to=Y;}render(w){let O=w.es5?n.varKinds.var:this.varKind,{name:j,from:Y,to:ce}=this;return `for(${O} ${j}=${Y}; ${j}<${ce}; ${j}++)`+super.render(w)}get names(){return V(V(super.names,this.from),this.to)}},x=class extends _{constructor(w,O,j,Y){super(),this.loop=w,this.varKind=O,this.name=j,this.iterable=Y;}render(w){return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(w)}optimizeNames(w,O){if(super.optimizeNames(w,O))return this.iterable=K(this.iterable,w,O),this}get names(){return F(super.names,this.iterable.names)}},T=class extends b{constructor(w,O,j){super(),this.name=w,this.args=O,this.async=j;}render(w){return `${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(w)}};T.kind="func";var R=class extends y{render(w){return "return "+super.render(w)}};R.kind="return";var $=class extends b{render(w){let O="try"+super.render(w);return this.catch&&(O+=this.catch.render(w)),this.finally&&(O+=this.finally.render(w)),O}optimizeNodes(){var w,O;return super.optimizeNodes(),(w=this.catch)===null||w===void 0||w.optimizeNodes(),(O=this.finally)===null||O===void 0||O.optimizeNodes(),this}optimizeNames(w,O){var j,Y;return super.optimizeNames(w,O),(j=this.catch)===null||j===void 0||j.optimizeNames(w,O),(Y=this.finally)===null||Y===void 0||Y.optimizeNames(w,O),this}get names(){let w=super.names;return this.catch&&F(w,this.catch.names),this.finally&&F(w,this.finally.names),w}},E=class extends b{constructor(w){super(),this.error=w;}render(w){return `catch(${this.error})`+super.render(w)}};E.kind="catch";var A=class extends b{render(w){return "finally"+super.render(w)}};A.kind="finally";var N=class{constructor(w,O={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...O,_n:O.lines?`
69
+ `:""},this._extScope=w,this._scope=new n.Scope({parent:w}),this._nodes=[new p];}toString(){return this._root.render(this.opts)}name(w){return this._scope.name(w)}scopeName(w){return this._extScope.name(w)}scopeValue(w,O){let j=this._extScope.value(w,O);return (this._values[j.prefix]||(this._values[j.prefix]=new Set)).add(j),j}getScopeValue(w,O){return this._extScope.getValue(w,O)}scopeRefs(w){return this._extScope.scopeRefs(w,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(w,O,j,Y){let ce=this._scope.toName(O);return j!==void 0&&Y&&(this._constants[ce.str]=j),this._leafNode(new s(w,ce,j)),ce}const(w,O,j){return this._def(n.varKinds.const,w,O,j)}let(w,O,j){return this._def(n.varKinds.let,w,O,j)}var(w,O,j){return this._def(n.varKinds.var,w,O,j)}assign(w,O,j){return this._leafNode(new a(w,O,j))}add(w,O){return this._leafNode(new c(w,e.operators.ADD,O))}code(w){return typeof w=="function"?w():w!==t.nil&&this._leafNode(new h(w)),this}object(...w){let O=["{"];for(let[j,Y]of w)O.length>1&&O.push(","),O.push(j),(j!==Y||this.opts.es5)&&(O.push(":"),(0, t.addCodeArg)(O,Y));return O.push("}"),new t._Code(O)}if(w,O,j){if(this._blockNode(new d(w)),O&&j)this.code(O).else().code(j).endIf();else if(O)this.code(O).endIf();else if(j)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(w){return this._elseNode(new d(w))}else(){return this._elseNode(new S)}endIf(){return this._endBlockNode(d,S)}_for(w,O){return this._blockNode(w),O&&this.code(O).endFor(),this}for(w,O){return this._for(new f(w),O)}forRange(w,O,j,Y,ce=this.opts.es5?n.varKinds.var:n.varKinds.let){let Re=this._scope.toName(w);return this._for(new v(ce,Re,O,j),()=>Y(Re))}forOf(w,O,j,Y=n.varKinds.const){let ce=this._scope.toName(w);if(this.opts.es5){let Re=O instanceof t.Name?O:this.var("_arr",O);return this.forRange("_i",0,(0, t._)`${Re}.length`,pe=>{this.var(ce,(0, t._)`${Re}[${pe}]`),j(ce);})}return this._for(new x("of",Y,ce,O),()=>j(ce))}forIn(w,O,j,Y=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(w,(0, t._)`Object.keys(${O})`,j);let ce=this._scope.toName(w);return this._for(new x("in",Y,ce,O),()=>j(ce))}endFor(){return this._endBlockNode(_)}label(w){return this._leafNode(new u(w))}break(w){return this._leafNode(new l(w))}return(w){let O=new R;if(this._blockNode(O),this.code(w),O.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(R)}try(w,O,j){if(!O&&!j)throw new Error('CodeGen: "try" without "catch" and "finally"');let Y=new $;if(this._blockNode(Y),this.code(w),O){let ce=this.name("e");this._currNode=Y.catch=new E(ce),O(ce);}return j&&(this._currNode=Y.finally=new A,this.code(j)),this._endBlockNode(E,A)}throw(w){return this._leafNode(new m(w))}block(w,O){return this._blockStarts.push(this._nodes.length),w&&this.code(w).endBlock(O),this}endBlock(w){let O=this._blockStarts.pop();if(O===void 0)throw new Error("CodeGen: not in self-balancing block");let j=this._nodes.length-O;if(j<0||w!==void 0&&j!==w)throw new Error(`CodeGen: wrong number of nodes: ${j} vs ${w} expected`);return this._nodes.length=O,this}func(w,O=t.nil,j,Y){return this._blockNode(new T(w,O,j)),Y&&this.code(Y).endFunc(),this}endFunc(){return this._endBlockNode(T)}optimize(w=1){for(;w-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants);}_leafNode(w){return this._currNode.nodes.push(w),this}_blockNode(w){this._currNode.nodes.push(w),this._nodes.push(w);}_endBlockNode(w,O){let j=this._currNode;if(j instanceof w||O&&j instanceof O)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${O?`${w.kind}/${O.kind}`:w.kind}"`)}_elseNode(w){let O=this._currNode;if(!(O instanceof d))throw new Error('CodeGen: "else" without "if"');return this._currNode=O.else=w,this}get _root(){return this._nodes[0]}get _currNode(){let w=this._nodes;return w[w.length-1]}set _currNode(w){let O=this._nodes;O[O.length-1]=w;}};e.CodeGen=N;function F(w,O){for(let j in O)w[j]=(w[j]||0)+(O[j]||0);return w}function V(w,O){return O instanceof t._CodeOrName?F(w,O.names):w}function K(w,O,j){if(w instanceof t.Name)return Y(w);if(!ce(w))return w;return new t._Code(w._items.reduce((Re,pe)=>(pe instanceof t.Name&&(pe=Y(pe)),pe instanceof t._Code?Re.push(...pe._items):Re.push(pe),Re),[]));function Y(Re){let pe=j[Re.str];return pe===void 0||O[Re.str]!==1?Re:(delete O[Re.str],pe)}function ce(Re){return Re instanceof t._Code&&Re._items.some(pe=>pe instanceof t.Name&&O[pe.str]===1&&j[pe.str]!==void 0)}}function ue(w,O){for(let j in O)w[j]=(w[j]||0)-(O[j]||0);}function ke(w){return typeof w=="boolean"||typeof w=="number"||w===null?!w:(0, t._)`!${B(w)}`}e.not=ke;let xe=U(e.operators.AND);function Ve(...w){return w.reduce(xe)}e.and=Ve;let be=U(e.operators.OR);function k(...w){return w.reduce(be)}e.or=k;function U(w){return (O,j)=>O===t.nil?j:j===t.nil?O:(0, t._)`${B(O)} ${w} ${B(j)}`}function B(w){return w instanceof t.Name?w:(0, t._)`(${w})`}})),Ne=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;let t=Se(),n=Ql();function o(T){let R={};for(let $ of T)R[$]=true;return R}e.toHash=o;function r(T,R){return typeof R=="boolean"?R:Object.keys(R).length===0?true:(i(T,R),!s(R,T.self.RULES.all))}e.alwaysValidSchema=r;function i(T,R=T.schema){let{opts:$,self:E}=T;if(!$.strictSchema||typeof R=="boolean")return;let A=E.RULES.keywords;for(let N in R)A[N]||x(T,`unknown keyword: "${N}"`);}e.checkUnknownRules=i;function s(T,R){if(typeof T=="boolean")return !T;for(let $ in T)if(R[$])return true;return false}e.schemaHasRules=s;function a(T,R){if(typeof T=="boolean")return !T;for(let $ in T)if($!=="$ref"&&R.all[$])return true;return false}e.schemaHasRulesButRef=a;function c({topSchemaRef:T,schemaPath:R},$,E,A){if(!A){if(typeof $=="number"||typeof $=="boolean")return $;if(typeof $=="string")return (0, t._)`${$}`}return (0, t._)`${T}${R}${(0, t.getProperty)(E)}`}e.schemaRefOrVal=c;function u(T){return h(decodeURIComponent(T))}e.unescapeFragment=u;function l(T){return encodeURIComponent(m(T))}e.escapeFragment=l;function m(T){return typeof T=="number"?`${T}`:T.replace(/~/g,"~0").replace(/\//g,"~1")}e.escapeJsonPointer=m;function h(T){return T.replace(/~1/g,"/").replace(/~0/g,"~")}e.unescapeJsonPointer=h;function y(T,R){if(Array.isArray(T))for(let $ of T)R($);else R(T);}e.eachItem=y;function b({mergeNames:T,mergeToName:R,mergeValues:$,resultToName:E}){return (A,N,F,V)=>{let K=F===void 0?N:F instanceof t.Name?(N instanceof t.Name?T(A,N,F):R(A,N,F),F):N instanceof t.Name?(R(A,F,N),N):$(N,F);return V===t.Name&&!(K instanceof t.Name)?E(A,K):K}}e.mergeEvaluated={props:b({mergeNames:(T,R,$)=>T.if((0, t._)`${$} !== true && ${R} !== undefined`,()=>{T.if((0, t._)`${R} === true`,()=>T.assign($,true),()=>T.assign($,(0, t._)`${$} || {}`).code((0, t._)`Object.assign(${$}, ${R})`));}),mergeToName:(T,R,$)=>T.if((0, t._)`${$} !== true`,()=>{R===true?T.assign($,true):(T.assign($,(0, t._)`${$} || {}`),S(T,$,R));}),mergeValues:(T,R)=>T===true?true:{...T,...R},resultToName:p}),items:b({mergeNames:(T,R,$)=>T.if((0, t._)`${$} !== true && ${R} !== undefined`,()=>T.assign($,(0, t._)`${R} === true ? true : ${$} > ${R} ? ${$} : ${R}`)),mergeToName:(T,R,$)=>T.if((0, t._)`${$} !== true`,()=>T.assign($,R===true?true:(0, t._)`${$} > ${R} ? ${$} : ${R}`)),mergeValues:(T,R)=>T===true?true:Math.max(T,R),resultToName:(T,R)=>T.var("items",R)})};function p(T,R){if(R===true)return T.var("props",true);let $=T.var("props",(0, t._)`{}`);return R!==void 0&&S(T,$,R),$}e.evaluatedPropsToName=p;function S(T,R,$){Object.keys($).forEach(E=>T.assign((0, t._)`${R}${(0, t.getProperty)(E)}`,true));}e.setEvaluated=S;let d={};function _(T,R){return T.scopeValue("func",{ref:R,code:d[R.code]||(d[R.code]=new n._Code(R.code))})}e.useFunc=_;var f;(function(T){T[T.Num=0]="Num",T[T.Str=1]="Str";})(f||(e.Type=f={}));function v(T,R,$){if(T instanceof t.Name){let E=R===f.Num;return $?E?(0, t._)`"[" + ${T} + "]"`:(0, t._)`"['" + ${T} + "']"`:E?(0, t._)`"/" + ${T}`:(0, t._)`"/" + ${T}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return $?(0, t.getProperty)(T).toString():"/"+m(T)}e.getErrorPath=v;function x(T,R,$=T.opts.strictSchema){if($){if(R=`strict mode: ${R}`,$===true)throw new Error(R);T.self.logger.warn(R);}}e.checkStrictMode=x;})),qt=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n={data:new t.Name("data"),valCxt:new t.Name("valCxt"),instancePath:new t.Name("instancePath"),parentData:new t.Name("parentData"),parentDataProperty:new t.Name("parentDataProperty"),rootData:new t.Name("rootData"),dynamicAnchors:new t.Name("dynamicAnchors"),vErrors:new t.Name("vErrors"),errors:new t.Name("errors"),this:new t.Name("this"),self:new t.Name("self"),scope:new t.Name("scope"),json:new t.Name("json"),jsonPos:new t.Name("jsonPos"),jsonLen:new t.Name("jsonLen"),jsonPart:new t.Name("jsonPart")};e.default=n;})),td=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;let t=Se(),n=Ne(),o=qt();e.keywordError={message:({keyword:S})=>(0, t.str)`must pass "${S}" keyword validation`},e.keyword$DataError={message:({keyword:S,schemaType:d})=>d?(0, t.str)`"${S}" keyword must be ${d} ($data)`:(0, t.str)`"${S}" keyword is invalid ($data)`};function r(S,d=e.keywordError,_,f){let{it:v}=S,{gen:x,compositeRule:T,allErrors:R}=v,$=m(S,d,_);f??(T||R)?c(x,$):u(v,(0, t._)`[${$}]`);}e.reportError=r;function i(S,d=e.keywordError,_){let{it:f}=S,{gen:v,compositeRule:x,allErrors:T}=f;c(v,m(S,d,_)),x||T||u(f,o.default.vErrors);}e.reportExtraError=i;function s(S,d){S.assign(o.default.errors,d),S.if((0, t._)`${o.default.vErrors} !== null`,()=>S.if(d,()=>S.assign((0, t._)`${o.default.vErrors}.length`,d),()=>S.assign(o.default.vErrors,null)));}e.resetErrorsCount=s;function a({gen:S,keyword:d,schemaValue:_,data:f,errsCount:v,it:x}){if(v===void 0)throw new Error("ajv implementation error");let T=S.name("err");S.forRange("i",v,o.default.errors,R=>{S.const(T,(0, t._)`${o.default.vErrors}[${R}]`),S.if((0, t._)`${T}.instancePath === undefined`,()=>S.assign((0, t._)`${T}.instancePath`,(0, t.strConcat)(o.default.instancePath,x.errorPath))),S.assign((0, t._)`${T}.schemaPath`,(0, t.str)`${x.errSchemaPath}/${d}`),x.opts.verbose&&(S.assign((0, t._)`${T}.schema`,_),S.assign((0, t._)`${T}.data`,f));});}e.extendErrors=a;function c(S,d){let _=S.const("err",d);S.if((0, t._)`${o.default.vErrors} === null`,()=>S.assign(o.default.vErrors,(0, t._)`[${_}]`),(0, t._)`${o.default.vErrors}.push(${_})`),S.code((0, t._)`${o.default.errors}++`);}function u(S,d){let{gen:_,validateName:f,schemaEnv:v}=S;v.$async?_.throw((0, t._)`new ${S.ValidationError}(${d})`):(_.assign((0, t._)`${f}.errors`,d),_.return(false));}let l={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function m(S,d,_){let{createErrors:f}=S.it;return f===false?(0, t._)`{}`:h(S,d,_)}function h(S,d,_={}){let{gen:f,it:v}=S,x=[y(v,_),b(S,_)];return p(S,d,x),f.object(...x)}function y({errorPath:S},{instancePath:d}){let _=d?(0, t.str)`${S}${(0, n.getErrorPath)(d,n.Type.Str)}`:S;return [o.default.instancePath,(0, t.strConcat)(o.default.instancePath,_)]}function b({keyword:S,it:{errSchemaPath:d}},{schemaPath:_,parentSchema:f}){let v=f?d:(0, t.str)`${d}/${S}`;return _&&(v=(0, t.str)`${v}${(0, n.getErrorPath)(_,n.Type.Str)}`),[l.schemaPath,v]}function p(S,{params:d,message:_},f){let{keyword:v,data:x,schemaValue:T,it:R}=S,{opts:$,propertyName:E,topSchemaRef:A,schemaPath:N}=R;f.push([l.keyword,v],[l.params,typeof d=="function"?d(S):d||(0, t._)`{}`]),$.messages&&f.push([l.message,typeof _=="function"?_(S):_]),$.verbose&&f.push([l.schema,T],[l.parentSchema,(0, t._)`${A}${N}`],[o.default.data,x]),E&&f.push([l.propertyName,E]);}})),qE=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;let t=td(),n=Se(),o=qt(),r={message:"boolean schema is false"};function i(c){let{gen:u,schema:l,validateName:m}=c;l===false?a(c,false):typeof l=="object"&&l.$async===true?u.return(o.default.data):(u.assign((0, n._)`${m}.errors`,null),u.return(true));}e.topBoolOrEmptySchema=i;function s(c,u){let{gen:l,schema:m}=c;m===false?(l.var(u,false),a(c)):l.var(u,true);}e.boolOrEmptySchema=s;function a(c,u){let{gen:l,data:m}=c,h={gen:l,keyword:"false schema",data:m,schema:false,schemaCode:false,schemaValue:false,params:{},it:c};(0, t.reportError)(h,r,void 0,u);}})),cR=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.getRules=e.isJSONType=void 0;let t=new Set(["string","number","integer","boolean","null","object","array"]);function n(r){return typeof r=="string"&&t.has(r)}e.isJSONType=n;function o(){let r={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return {types:{...r,integer:true,boolean:true,null:true},rules:[{rules:[]},r.number,r.string,r.array,r.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=o;})),uR=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:r,self:i},s){let a=i.RULES.types[s];return a&&a!==true&&n(r,a)}e.schemaHasRulesForType=t;function n(r,i){return i.rules.some(s=>o(r,s))}e.shouldUseGroup=n;function o(r,i){var s;return r[i.keyword]!==void 0||((s=i.definition.implements)===null||s===void 0?void 0:s.some(a=>r[a]!==void 0))}e.shouldUseRule=o;})),ed=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;let t=cR(),n=uR(),o=td(),r=Se(),i=Ne();var s;(function(f){f[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong";})(s||(e.DataType=s={}));function a(f){let v=c(f.type);if(v.includes("null")){if(f.nullable===false)throw new Error("type: null contradicts nullable: false")}else {if(!v.length&&f.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');f.nullable===true&&v.push("null");}return v}e.getSchemaTypes=a;function c(f){let v=Array.isArray(f)?f:f?[f]:[];if(v.every(t.isJSONType))return v;throw new Error("type must be JSONType or JSONType[]: "+v.join(","))}e.getJSONTypes=c;function u(f,v){let{gen:x,data:T,opts:R}=f,$=m(v,R.coerceTypes),E=v.length>0&&!($.length===0&&v.length===1&&(0, n.schemaHasRulesForType)(f,v[0]));if(E){let A=p(v,T,R.strictNumbers,s.Wrong);x.if(A,()=>{$.length?h(f,v,$):d(f);});}return E}e.coerceAndCheckDataType=u;let l=new Set(["string","number","integer","boolean","null"]);function m(f,v){return v?f.filter(x=>l.has(x)||v==="array"&&x==="array"):[]}function h(f,v,x){let{gen:T,data:R,opts:$}=f,E=T.let("dataType",(0, r._)`typeof ${R}`),A=T.let("coerced",(0, r._)`undefined`);$.coerceTypes==="array"&&T.if((0, r._)`${E} == 'object' && Array.isArray(${R}) && ${R}.length == 1`,()=>T.assign(R,(0, r._)`${R}[0]`).assign(E,(0, r._)`typeof ${R}`).if(p(v,R,$.strictNumbers),()=>T.assign(A,R))),T.if((0, r._)`${A} !== undefined`);for(let F of x)(l.has(F)||F==="array"&&$.coerceTypes==="array")&&N(F);T.else(),d(f),T.endIf(),T.if((0, r._)`${A} !== undefined`,()=>{T.assign(R,A),y(f,A);});function N(F){switch(F){case "string":T.elseIf((0, r._)`${E} == "number" || ${E} == "boolean"`).assign(A,(0, r._)`"" + ${R}`).elseIf((0, r._)`${R} === null`).assign(A,(0, r._)`""`);return;case "number":T.elseIf((0, r._)`${E} == "boolean" || ${R} === null
70
70
  || (${E} == "string" && ${R} && ${R} == +${R})`).assign(A,(0, r._)`+${R}`);return;case "integer":T.elseIf((0, r._)`${E} === "boolean" || ${R} === null
71
71
  || (${E} === "string" && ${R} && ${R} == +${R} && !(${R} % 1))`).assign(A,(0, r._)`+${R}`);return;case "boolean":T.elseIf((0, r._)`${R} === "false" || ${R} === 0 || ${R} === null`).assign(A,false).elseIf((0, r._)`${R} === "true" || ${R} === 1`).assign(A,true);return;case "null":T.elseIf((0, r._)`${R} === "" || ${R} === 0 || ${R} === false`),T.assign(A,null);return;case "array":T.elseIf((0, r._)`${E} === "string" || ${E} === "number"
72
- || ${E} === "boolean" || ${R} === null`).assign(A,(0, r._)`[${R}]`);}}}function y({gen:f,parentData:v,parentDataProperty:x},T){f.if((0, r._)`${v} !== undefined`,()=>f.assign((0, r._)`${v}[${x}]`,T));}function b(f,v,x,T=s.Correct){let R=T===s.Correct?r.operators.EQ:r.operators.NEQ,$;switch(f){case "null":return (0, r._)`${v} ${R} null`;case "array":$=(0, r._)`Array.isArray(${v})`;break;case "object":$=(0, r._)`${v} && typeof ${v} == "object" && !Array.isArray(${v})`;break;case "integer":$=E((0, r._)`!(${v} % 1) && !isNaN(${v})`);break;case "number":$=E();break;default:return (0, r._)`typeof ${v} ${R} ${f}`}return T===s.Correct?$:(0, r.not)($);function E(A=r.nil){return (0, r.and)((0, r._)`typeof ${v} == "number"`,A,x?(0, r._)`isFinite(${v})`:r.nil)}}e.checkDataType=b;function p(f,v,x,T){if(f.length===1)return b(f[0],v,x,T);let R,$=(0, i.toHash)(f);if($.array&&$.object){let E=(0, r._)`typeof ${v} != "object"`;R=$.null?E:(0, r._)`!${v} || ${E}`,delete $.null,delete $.array,delete $.object;}else R=r.nil;$.number&&delete $.integer;for(let E in $)R=(0, r.and)(R,b(E,v,x,T));return R}e.checkDataTypes=p;let S={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:v})=>typeof f=="string"?(0, r._)`{type: ${f}}`:(0, r._)`{type: ${v}}`};function d(f){let v=_(f);(0, o.reportError)(v,S);}e.reportTypeError=d;function _(f){let{gen:v,data:x,schema:T}=f,R=(0, i.schemaRefOrVal)(f,T,"type");return {gen:v,keyword:"type",data:x,schema:T.type,schemaCode:R,schemaValue:R,parentSchema:T,params:{},it:f}}})),qE=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.assignDefaults=void 0;let t=Se(),n=Ne();function o(i,s){let{properties:a,items:c}=i.schema;if(s==="object"&&a)for(let u in a)r(i,u,a[u].default);else s==="array"&&Array.isArray(c)&&c.forEach((u,l)=>r(i,l,u.default));}e.assignDefaults=o;function r(i,s,a){let{gen:c,compositeRule:u,data:l,opts:m}=i;if(a===void 0)return;let h=(0, t._)`${l}${(0, t.getProperty)(s)}`;if(u){(0, n.checkStrictMode)(i,`default is ignored for: ${h}`);return}let y=(0, t._)`${h} === undefined`;m.useDefaults==="empty"&&(y=(0, t._)`${y} || ${h} === null || ${h} === ""`),c.if(y,(0, t._)`${h} = ${(0, t.stringify)(a)}`);}})),Vt=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;let t=Se(),n=Ne(),o=qt(),r=Ne();function i(f,v){let{gen:x,data:T,it:R}=f;x.if(m(x,T,v,R.opts.ownProperties),()=>{f.setParams({missingProperty:(0, t._)`${v}`},true),f.error();});}e.checkReportMissingProp=i;function s({gen:f,data:v,it:{opts:x}},T,R){return (0, t.or)(...T.map($=>(0, t.and)(m(f,v,$,x.ownProperties),(0, t._)`${R} = ${$}`)))}e.checkMissingProp=s;function a(f,v){f.setParams({missingProperty:v},true),f.error();}e.reportMissingProp=a;function c(f){return f.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0, t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=c;function u(f,v,x){return (0, t._)`${c(f)}.call(${v}, ${x})`}e.isOwnProperty=u;function l(f,v,x,T){let R=(0, t._)`${v}${(0, t.getProperty)(x)} !== undefined`;return T?(0, t._)`${R} && ${u(f,v,x)}`:R}e.propertyInData=l;function m(f,v,x,T){let R=(0, t._)`${v}${(0, t.getProperty)(x)} === undefined`;return T?(0, t.or)(R,(0, t.not)(u(f,v,x))):R}e.noPropertyInData=m;function h(f){return f?Object.keys(f).filter(v=>v!=="__proto__"):[]}e.allSchemaProperties=h;function y(f,v){return h(v).filter(x=>!(0, n.alwaysValidSchema)(f,v[x]))}e.schemaProperties=y;function b({schemaCode:f,data:v,it:{gen:x,topSchemaRef:T,schemaPath:R,errorPath:$},it:E},A,N,F){let V=F?(0, t._)`${f}, ${v}, ${T}${R}`:v,K=[[o.default.instancePath,(0, t.strConcat)(o.default.instancePath,$)],[o.default.parentData,E.parentData],[o.default.parentDataProperty,E.parentDataProperty],[o.default.rootData,o.default.rootData]];E.opts.dynamicRef&&K.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);let ue=(0, t._)`${V}, ${x.object(...K)}`;return N!==t.nil?(0, t._)`${A}.call(${N}, ${ue})`:(0, t._)`${A}(${ue})`}e.callValidateCode=b;let p=(0, t._)`new RegExp`;function S({gen:f,it:{opts:v}},x){let T=v.unicodeRegExp?"u":"",{regExp:R}=v.code,$=R(x,T);return f.scopeValue("pattern",{key:$.toString(),ref:$,code:(0, t._)`${R.code==="new RegExp"?p:(0, r.useFunc)(f,R)}(${x}, ${T})`})}e.usePattern=S;function d(f){let{gen:v,data:x,keyword:T,it:R}=f,$=v.name("valid");if(R.allErrors){let A=v.let("valid",true);return E(()=>v.assign(A,false)),A}return v.var($,true),E(()=>v.break()),$;function E(A){let N=v.const("len",(0, t._)`${x}.length`);v.forRange("i",0,N,F=>{f.subschema({keyword:T,dataProp:F,dataPropType:n.Type.Num},$),v.if((0, t.not)($),A);});}}e.validateArray=d;function _(f){let{gen:v,schema:x,keyword:T,it:R}=f;if(!Array.isArray(x))throw new Error("ajv implementation error");if(x.some(A=>(0, n.alwaysValidSchema)(R,A))&&!R.opts.unevaluated)return;let $=v.let("valid",false),E=v.name("_valid");v.block(()=>x.forEach((A,N)=>{let F=f.subschema({keyword:T,schemaProp:N,compositeRule:true},E);v.assign($,(0, t._)`${$} || ${E}`),f.mergeValidEvaluated(F,E)||v.if((0, t.not)($));})),f.result($,()=>f.reset(),()=>f.error(true));}e.validateUnion=_;})),VE=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;let t=Se(),n=qt(),o=Vt(),r=rd();function i(y,b){let{gen:p,keyword:S,schema:d,parentSchema:_,it:f}=y,v=b.macro.call(f.self,d,_,f),x=l(p,S,v);f.opts.validateSchema!==false&&f.self.validateSchema(v,true);let T=p.name("valid");y.subschema({schema:v,schemaPath:t.nil,errSchemaPath:`${f.errSchemaPath}/${S}`,topSchemaRef:x,compositeRule:true},T),y.pass(T,()=>y.error(true));}e.macroKeywordCode=i;function s(y,b){var p;let{gen:S,keyword:d,schema:_,parentSchema:f,$data:v,it:x}=y;u(x,b);let T=l(S,d,!v&&b.compile?b.compile.call(x.self,_,f,x):b.validate),R=S.let("valid");y.block$data(R,$),y.ok((p=b.valid)!==null&&p!==void 0?p:R);function $(){if(b.errors===false)N(),b.modifying&&a(y),F(()=>y.error());else {let V=b.async?E():A();b.modifying&&a(y),F(()=>c(y,V));}}function E(){let V=S.let("ruleErrs",null);return S.try(()=>N((0, t._)`await `),K=>S.assign(R,false).if((0, t._)`${K} instanceof ${x.ValidationError}`,()=>S.assign(V,(0, t._)`${K}.errors`),()=>S.throw(K))),V}function A(){let V=(0, t._)`${T}.errors`;return S.assign(V,null),N(t.nil),V}function N(V=b.async?(0, t._)`await `:t.nil){let K=x.opts.passContext?n.default.this:n.default.self,ue=!("compile"in b&&!v||b.schema===false);S.assign(R,(0, t._)`${V}${(0, o.callValidateCode)(y,T,K,ue)}`,b.modifying);}function F(V){var K;S.if((0, t.not)((K=b.valid)!==null&&K!==void 0?K:R),V);}}e.funcKeywordCode=s;function a(y){let{gen:b,data:p,it:S}=y;b.if(S.parentData,()=>b.assign(p,(0, t._)`${S.parentData}[${S.parentDataProperty}]`));}function c(y,b){let{gen:p}=y;p.if((0, t._)`Array.isArray(${b})`,()=>{p.assign(n.default.vErrors,(0, t._)`${n.default.vErrors} === null ? ${b} : ${n.default.vErrors}.concat(${b})`).assign(n.default.errors,(0, t._)`${n.default.vErrors}.length`),(0, r.extendErrors)(y);},()=>y.error());}function u({schemaEnv:y},b){if(b.async&&!y.$async)throw new Error("async keyword in sync schema")}function l(y,b,p){if(p===void 0)throw new Error(`keyword "${b}" failed to compile`);return y.scopeValue("keyword",typeof p=="function"?{ref:p}:{ref:p,code:(0, t.stringify)(p)})}function m(y,b,p=false){return !b.length||b.some(S=>S==="array"?Array.isArray(y):S==="object"?y&&typeof y=="object"&&!Array.isArray(y):typeof y==S||p&&typeof y>"u")}e.validSchemaType=m;function h({schema:y,opts:b,self:p,errSchemaPath:S},d,_){if(Array.isArray(d.keyword)?!d.keyword.includes(_):d.keyword!==_)throw new Error("ajv implementation error");let f=d.dependencies;if(f?.some(v=>!Object.prototype.hasOwnProperty.call(y,v)))throw new Error(`parent schema must have dependencies of ${_}: ${f.join(",")}`);if(d.validateSchema&&!d.validateSchema(y[_])){let v=`keyword "${_}" value is invalid at path "${S}": `+p.errorsText(d.validateSchema.errors);if(b.validateSchema==="log")p.logger.error(v);else throw new Error(v)}}e.validateKeywordUsage=h;})),BE=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;let t=Se(),n=Ne();function o(s,{keyword:a,schemaProp:c,schema:u,schemaPath:l,errSchemaPath:m,topSchemaRef:h}){if(a!==void 0&&u!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){let y=s.schema[a];return c===void 0?{schema:y,schemaPath:(0, t._)`${s.schemaPath}${(0, t.getProperty)(a)}`,errSchemaPath:`${s.errSchemaPath}/${a}`}:{schema:y[c],schemaPath:(0, t._)`${s.schemaPath}${(0, t.getProperty)(a)}${(0, t.getProperty)(c)}`,errSchemaPath:`${s.errSchemaPath}/${a}/${(0, n.escapeFragment)(c)}`}}if(u!==void 0){if(l===void 0||m===void 0||h===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return {schema:u,schemaPath:l,topSchemaRef:h,errSchemaPath:m}}throw new Error('either "keyword" or "schema" must be passed')}e.getSubschema=o;function r(s,a,{dataProp:c,dataPropType:u,data:l,dataTypes:m,propertyName:h}){if(l!==void 0&&c!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:y}=a;if(c!==void 0){let{errorPath:p,dataPathArr:S,opts:d}=a;b(y.let("data",(0, t._)`${a.data}${(0, t.getProperty)(c)}`,true)),s.errorPath=(0, t.str)`${p}${(0, n.getErrorPath)(c,u,d.jsPropertySyntax)}`,s.parentDataProperty=(0, t._)`${c}`,s.dataPathArr=[...S,s.parentDataProperty];}l!==void 0&&(b(l instanceof t.Name?l:y.let("data",l,true)),h!==void 0&&(s.propertyName=h)),m&&(s.dataTypes=m);function b(p){s.data=p,s.dataLevel=a.dataLevel+1,s.dataTypes=[],a.definedProperties=new Set,s.parentData=a.data,s.dataNames=[...a.dataNames,p];}}e.extendSubschemaData=r;function i(s,{jtdDiscriminator:a,jtdMetadata:c,compositeRule:u,createErrors:l,allErrors:m}){u!==void 0&&(s.compositeRule=u),l!==void 0&&(s.createErrors=l),m!==void 0&&(s.allErrors=m),s.jtdDiscriminator=a,s.jtdMetadata=c;}e.extendSubschemaMode=i;})),dR=G(((e,t)=>{t.exports=function n(o,r){if(o===r)return true;if(o&&r&&typeof o=="object"&&typeof r=="object"){if(o.constructor!==r.constructor)return false;var i,s,a;if(Array.isArray(o)){if(i=o.length,i!=r.length)return false;for(s=i;s--!==0;)if(!n(o[s],r[s]))return false;return true}if(o.constructor===RegExp)return o.source===r.source&&o.flags===r.flags;if(o.valueOf!==Object.prototype.valueOf)return o.valueOf()===r.valueOf();if(o.toString!==Object.prototype.toString)return o.toString()===r.toString();if(a=Object.keys(o),i=a.length,i!==Object.keys(r).length)return false;for(s=i;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[s]))return false;for(s=i;s--!==0;){var c=a[s];if(!n(o[c],r[c]))return false}return true}return o!==o&&r!==r};})),KE=G(((e,t)=>{var n=t.exports=function(i,s,a){typeof s=="function"&&(a=s,s={}),a=s.cb||a;var c=typeof a=="function"?a:a.pre||function(){},u=a.post||function(){};o(s,c,u,i,"",i);};n.keywords={additionalItems:true,items:true,contains:true,additionalProperties:true,propertyNames:true,not:true,if:true,then:true,else:true},n.arrayKeywords={items:true,allOf:true,anyOf:true,oneOf:true},n.propsKeywords={$defs:true,definitions:true,properties:true,patternProperties:true,dependencies:true},n.skipKeywords={default:true,enum:true,const:true,required:true,maximum:true,minimum:true,exclusiveMaximum:true,exclusiveMinimum:true,multipleOf:true,maxLength:true,minLength:true,pattern:true,format:true,maxItems:true,minItems:true,uniqueItems:true,maxProperties:true,minProperties:true};function o(i,s,a,c,u,l,m,h,y,b){if(c&&typeof c=="object"&&!Array.isArray(c)){s(c,u,l,m,h,y,b);for(var p in c){var S=c[p];if(Array.isArray(S)){if(p in n.arrayKeywords)for(var d=0;d<S.length;d++)o(i,s,a,S[d],u+"/"+p+"/"+d,l,u,p,c,d);}else if(p in n.propsKeywords){if(S&&typeof S=="object")for(var _ in S)o(i,s,a,S[_],u+"/"+p+"/"+r(_),l,u,p,c,_);}else (p in n.keywords||i.allKeys&&!(p in n.skipKeywords))&&o(i,s,a,S,u+"/"+p,l,u,p,c);}a(c,u,l,m,h,y,b);}}function r(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}})),nd=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;let t=Ne(),n=dR(),o=KE(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(S,d=true){return typeof S=="boolean"?true:d===true?!a(S):d?c(S)<=d:false}e.inlineRef=i;let s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(S){for(let d in S){if(s.has(d))return true;let _=S[d];if(Array.isArray(_)&&_.some(a)||typeof _=="object"&&a(_))return true}return false}function c(S){let d=0;for(let _ in S){if(_==="$ref")return 1/0;if(d++,!r.has(_)&&(typeof S[_]=="object"&&(0, t.eachItem)(S[_],f=>d+=c(f)),d===1/0))return 1/0}return d}function u(S,d="",_){return _!==false&&(d=h(d)),l(S,S.parse(d))}e.getFullPath=u;function l(S,d){return S.serialize(d).split("#")[0]+"#"}e._getFullPath=l;let m=/#\/?$/;function h(S){return S?S.replace(m,""):""}e.normalizeId=h;function y(S,d,_){return _=h(_),S.resolve(d,_)}e.resolveUrl=y;let b=/^[a-z_][-a-z0-9._]*$/i;function p(S,d){if(typeof S=="boolean")return {};let{schemaId:_,uriResolver:f}=this.opts,v=h(S[_]||d),x={"":v},T=u(f,v,false),R={},$=new Set;return o(S,{allKeys:true},(N,F,V,K)=>{if(K===void 0)return;let ue=T+F,ke=x[K];typeof N[_]=="string"&&(ke=xe.call(this,N[_])),Ve.call(this,N.$anchor),Ve.call(this,N.$dynamicAnchor),x[F]=ke;function xe(be){let k=this.opts.uriResolver.resolve;if(be=h(ke?k(ke,be):be),$.has(be))throw A(be);$.add(be);let U=this.refs[be];return typeof U=="string"&&(U=this.refs[U]),typeof U=="object"?E(N,U.schema,be):be!==h(ue)&&(be[0]==="#"?(E(N,R[be],be),R[be]=N):this.refs[be]=ue),be}function Ve(be){if(typeof be=="string"){if(!b.test(be))throw new Error(`invalid anchor "${be}"`);xe.call(this,`#${be}`);}}}),R;function E(N,F,V){if(F!==void 0&&!n(N,F))throw A(V)}function A(N){return new Error(`reference "${N}" resolves to more than one schema`)}}e.getSchemaRefs=p;})),Xo=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;let t=FE(),n=td(),o=lR(),r=td(),i=qE(),s=VE(),a=BE(),c=Se(),u=qt(),l=nd(),m=Ne(),h=rd();function y(I){if(T(I)&&($(I),x(I))){d(I);return}b(I,()=>(0, t.topBoolOrEmptySchema)(I));}e.validateFunctionCode=y;function b({gen:I,validateName:L,schema:q,schemaEnv:fe,opts:he},Te){he.code.es5?I.func(L,(0, c._)`${u.default.data}, ${u.default.valCxt}`,fe.$async,()=>{I.code((0, c._)`"use strict"; ${f(q,he)}`),S(I,he),I.code(Te);}):I.func(L,(0, c._)`${u.default.data}, ${p(he)}`,fe.$async,()=>I.code(f(q,he)).code(Te));}function p(I){return (0, c._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${I.dynamicRef?(0, c._)`, ${u.default.dynamicAnchors}={}`:c.nil}}={}`}function S(I,L){I.if(u.default.valCxt,()=>{I.var(u.default.instancePath,(0, c._)`${u.default.valCxt}.${u.default.instancePath}`),I.var(u.default.parentData,(0, c._)`${u.default.valCxt}.${u.default.parentData}`),I.var(u.default.parentDataProperty,(0, c._)`${u.default.valCxt}.${u.default.parentDataProperty}`),I.var(u.default.rootData,(0, c._)`${u.default.valCxt}.${u.default.rootData}`),L.dynamicRef&&I.var(u.default.dynamicAnchors,(0, c._)`${u.default.valCxt}.${u.default.dynamicAnchors}`);},()=>{I.var(u.default.instancePath,(0, c._)`""`),I.var(u.default.parentData,(0, c._)`undefined`),I.var(u.default.parentDataProperty,(0, c._)`undefined`),I.var(u.default.rootData,u.default.data),L.dynamicRef&&I.var(u.default.dynamicAnchors,(0, c._)`{}`);});}function d(I){let{schema:L,opts:q,gen:fe}=I;b(I,()=>{q.$comment&&L.$comment&&K(I),N(I),fe.let(u.default.vErrors,null),fe.let(u.default.errors,0),q.unevaluated&&_(I),E(I),ue(I);});}function _(I){let{gen:L,validateName:q}=I;I.evaluated=L.const("evaluated",(0, c._)`${q}.evaluated`),L.if((0, c._)`${I.evaluated}.dynamicProps`,()=>L.assign((0, c._)`${I.evaluated}.props`,(0, c._)`undefined`)),L.if((0, c._)`${I.evaluated}.dynamicItems`,()=>L.assign((0, c._)`${I.evaluated}.items`,(0, c._)`undefined`));}function f(I,L){let q=typeof I=="object"&&I[L.schemaId];return q&&(L.code.source||L.code.process)?(0, c._)`/*# sourceURL=${q} */`:c.nil}function v(I,L){if(T(I)&&($(I),x(I))){R(I,L);return}(0, t.boolOrEmptySchema)(I,L);}function x({schema:I,self:L}){if(typeof I=="boolean")return !I;for(let q in I)if(L.RULES.all[q])return true;return false}function T(I){return typeof I.schema!="boolean"}function R(I,L){let{schema:q,gen:fe,opts:he}=I;he.$comment&&q.$comment&&K(I),F(I),V(I);let Te=fe.const("_errs",u.default.errors);E(I,Te),fe.var(L,(0, c._)`${Te} === ${u.default.errors}`);}function $(I){(0, m.checkUnknownRules)(I),A(I);}function E(I,L){if(I.opts.jtd)return xe(I,[],false,L);let q=(0, n.getSchemaTypes)(I.schema);xe(I,q,!(0, n.coerceAndCheckDataType)(I,q),L);}function A(I){let{schema:L,errSchemaPath:q,opts:fe,self:he}=I;L.$ref&&fe.ignoreKeywordsWithRef&&(0, m.schemaHasRulesButRef)(L,he.RULES)&&he.logger.warn(`$ref: keywords ignored in schema at path "${q}"`);}function N(I){let{schema:L,opts:q}=I;L.default!==void 0&&q.useDefaults&&q.strictSchema&&(0, m.checkStrictMode)(I,"default is ignored in the schema root");}function F(I){let L=I.schema[I.opts.schemaId];L&&(I.baseId=(0, l.resolveUrl)(I.opts.uriResolver,I.baseId,L));}function V(I){if(I.schema.$async&&!I.schemaEnv.$async)throw new Error("async schema in sync schema")}function K({gen:I,schemaEnv:L,schema:q,errSchemaPath:fe,opts:he}){let Te=q.$comment;if(he.$comment===true)I.code((0, c._)`${u.default.self}.logger.log(${Te})`);else if(typeof he.$comment=="function"){let Xe=(0, c.str)`${fe}/$comment`,tt=I.scopeValue("root",{ref:L.root});I.code((0, c._)`${u.default.self}.opts.$comment(${Te}, ${Xe}, ${tt}.schema)`);}}function ue(I){let{gen:L,schemaEnv:q,validateName:fe,ValidationError:he,opts:Te}=I;q.$async?L.if((0, c._)`${u.default.errors} === 0`,()=>L.return(u.default.data),()=>L.throw((0, c._)`new ${he}(${u.default.vErrors})`)):(L.assign((0, c._)`${fe}.errors`,u.default.vErrors),Te.unevaluated&&ke(I),L.return((0, c._)`${u.default.errors} === 0`));}function ke({gen:I,evaluated:L,props:q,items:fe}){q instanceof c.Name&&I.assign((0, c._)`${L}.props`,q),fe instanceof c.Name&&I.assign((0, c._)`${L}.items`,fe);}function xe(I,L,q,fe){let{gen:he,schema:Te,data:Xe,allErrors:tt,opts:ct,self:Ye}=I,{RULES:Be}=Ye;if(Te.$ref&&(ct.ignoreKeywordsWithRef||!(0, m.schemaHasRulesButRef)(Te,Be))){he.block(()=>Re(I,"$ref",Be.all.$ref.definition));return}ct.jtd||be(I,L),he.block(()=>{for(let nt of Be.rules)Nt(nt);Nt(Be.post);});function Nt(nt){(0, o.shouldUseGroup)(Te,nt)&&(nt.type?(he.if((0, r.checkDataType)(nt.type,Xe,ct.strictNumbers)),Ve(I,nt),L.length===1&&L[0]===nt.type&&q&&(he.else(),(0, r.reportTypeError)(I)),he.endIf()):Ve(I,nt),tt||he.if((0, c._)`${u.default.errors} === ${fe||0}`));}}function Ve(I,L){let{gen:q,schema:fe,opts:{useDefaults:he}}=I;he&&(0, i.assignDefaults)(I,L.type),q.block(()=>{for(let Te of L.rules)(0, o.shouldUseRule)(fe,Te)&&Re(I,Te.keyword,Te.definition,L.type);});}function be(I,L){I.schemaEnv.meta||!I.opts.strictTypes||(k(I,L),I.opts.allowUnionTypes||U(I,L),B(I,I.dataTypes));}function k(I,L){if(L.length){if(!I.dataTypes.length){I.dataTypes=L;return}L.forEach(q=>{O(I.dataTypes,q)||Y(I,`type "${q}" not allowed by context "${I.dataTypes.join(",")}"`);}),j(I,L);}}function U(I,L){L.length>1&&!(L.length===2&&L.includes("null"))&&Y(I,"use allowUnionTypes to allow union type keyword");}function B(I,L){let q=I.self.RULES.all;for(let fe in q){let he=q[fe];if(typeof he=="object"&&(0, o.shouldUseRule)(I.schema,he)){let{type:Te}=he.definition;Te.length&&!Te.some(Xe=>w(L,Xe))&&Y(I,`missing type "${Te.join(",")}" for keyword "${fe}"`);}}}function w(I,L){return I.includes(L)||L==="number"&&I.includes("integer")}function O(I,L){return I.includes(L)||L==="integer"&&I.includes("number")}function j(I,L){let q=[];for(let fe of I.dataTypes)O(L,fe)?q.push(fe):L.includes("integer")&&fe==="number"&&q.push("integer");I.dataTypes=q;}function Y(I,L){let q=I.schemaEnv.baseId+I.errSchemaPath;L+=` at "${q}" (strictTypes)`,(0, m.checkStrictMode)(I,L,I.opts.strictTypes);}var ce=class{constructor(I,L,q){if((0, s.validateKeywordUsage)(I,L,q),this.gen=I.gen,this.allErrors=I.allErrors,this.keyword=q,this.data=I.data,this.schema=I.schema[q],this.$data=L.$data&&I.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0, m.schemaRefOrVal)(I,this.schema,q,this.$data),this.schemaType=L.schemaType,this.parentSchema=I.schema,this.params={},this.it=I,this.def=L,this.$data)this.schemaCode=I.gen.const("vSchema",je(this.$data,I));else if(this.schemaCode=this.schemaValue,!(0, s.validSchemaType)(this.schema,L.schemaType,L.allowUndefined))throw new Error(`${q} value must be ${JSON.stringify(L.schemaType)}`);("code"in L?L.trackErrors:L.errors!==false)&&(this.errsCount=I.gen.const("_errs",u.default.errors));}result(I,L,q){this.failResult((0, c.not)(I),L,q);}failResult(I,L,q){this.gen.if(I),q?q():this.error(),L?(this.gen.else(),L(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else();}pass(I,L){this.failResult((0, c.not)(I),void 0,L);}fail(I){if(I===void 0){this.error(),this.allErrors||this.gen.if(false);return}this.gen.if(I),this.error(),this.allErrors?this.gen.endIf():this.gen.else();}fail$data(I){if(!this.$data)return this.fail(I);let{schemaCode:L}=this;this.fail((0, c._)`${L} !== undefined && (${(0, c.or)(this.invalid$data(),I)})`);}error(I,L,q){if(L){this.setParams(L),this._error(I,q),this.setParams({});return}this._error(I,q);}_error(I,L){(I?h.reportExtraError:h.reportError)(this,this.def.error,L);}$dataError(){(0, h.reportError)(this,this.def.$dataError||h.keyword$DataError);}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0, h.resetErrorsCount)(this.gen,this.errsCount);}ok(I){this.allErrors||this.gen.if(I);}setParams(I,L){L?Object.assign(this.params,I):this.params=I;}block$data(I,L,q=c.nil){this.gen.block(()=>{this.check$data(I,q),L();});}check$data(I=c.nil,L=c.nil){if(!this.$data)return;let{gen:q,schemaCode:fe,schemaType:he,def:Te}=this;q.if((0, c.or)((0, c._)`${fe} === undefined`,L)),I!==c.nil&&q.assign(I,true),(he.length||Te.validateSchema)&&(q.elseIf(this.invalid$data()),this.$dataError(),I!==c.nil&&q.assign(I,false)),q.else();}invalid$data(){let{gen:I,schemaCode:L,schemaType:q,def:fe,it:he}=this;return (0, c.or)(Te(),Xe());function Te(){if(q.length){if(!(L instanceof c.Name))throw new Error("ajv implementation error");let tt=Array.isArray(q)?q:[q];return (0, c._)`${(0, r.checkDataTypes)(tt,L,he.opts.strictNumbers,r.DataType.Wrong)}`}return c.nil}function Xe(){if(fe.validateSchema){let tt=I.scopeValue("validate$data",{ref:fe.validateSchema});return (0, c._)`!${tt}(${L})`}return c.nil}}subschema(I,L){let q=(0, a.getSubschema)(this.it,I);(0, a.extendSubschemaData)(q,this.it,I),(0, a.extendSubschemaMode)(q,I);let fe={...this.it,...q,items:void 0,props:void 0};return v(fe,L),fe}mergeEvaluated(I,L){let{it:q,gen:fe}=this;q.opts.unevaluated&&(q.props!==true&&I.props!==void 0&&(q.props=m.mergeEvaluated.props(fe,I.props,q.props,L)),q.items!==true&&I.items!==void 0&&(q.items=m.mergeEvaluated.items(fe,I.items,q.items,L)));}mergeValidEvaluated(I,L){let{it:q,gen:fe}=this;if(q.opts.unevaluated&&(q.props!==true||q.items!==true))return fe.if(L,()=>this.mergeEvaluated(I,c.Name)),true}};e.KeywordCxt=ce;function Re(I,L,q,fe){let he=new ce(I,q,L);"code"in q?q.code(he,fe):he.$data&&q.validate?(0, s.funcKeywordCode)(he,q):"macro"in q?(0, s.macroKeywordCode)(he,q):(q.compile||q.validate)&&(0, s.funcKeywordCode)(he,q);}let pe=/^\/(?:[^~]|~0|~1)*$/,Ee=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function je(I,{dataLevel:L,dataNames:q,dataPathArr:fe}){let he,Te;if(I==="")return u.default.rootData;if(I[0]==="/"){if(!pe.test(I))throw new Error(`Invalid JSON-pointer: ${I}`);he=I,Te=u.default.rootData;}else {let Ye=Ee.exec(I);if(!Ye)throw new Error(`Invalid JSON-pointer: ${I}`);let Be=+Ye[1];if(he=Ye[2],he==="#"){if(Be>=L)throw new Error(ct("property/index",Be));return fe[L-Be]}if(Be>L)throw new Error(ct("data",Be));if(Te=q[L-Be],!he)return Te}let Xe=Te,tt=he.split("/");for(let Ye of tt)Ye&&(Te=(0, c._)`${Te}${(0, c.getProperty)((0, m.unescapeJsonPointer)(Ye))}`,Xe=(0, c._)`${Xe} && ${Te}`);return Xe;function ct(Ye,Be){return `Cannot access ${Ye} ${Be} levels up, current level is ${L}`}}e.getData=je;})),Ls=G((e=>{Object.defineProperty(e,"__esModule",{value:true});var t=class extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=true;}};e.default=t;})),Wo=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=nd();var n=class extends Error{constructor(o,r,i,s){super(s||`can't resolve reference ${i} from id ${r}`),this.missingRef=(0, t.resolveUrl)(o,r,i),this.missingSchema=(0, t.normalizeId)((0, t.getFullPath)(o,this.missingRef));}};e.default=n;})),od=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;let t=Se(),n=Ls(),o=qt(),r=nd(),i=Ne(),s=Xo();var a=class{constructor(d){var _;this.refs={},this.dynamicAnchors={};let f;typeof d.schema=="object"&&(f=d.schema),this.schema=d.schema,this.schemaId=d.schemaId,this.root=d.root||this,this.baseId=(_=d.baseId)!==null&&_!==void 0?_:(0, r.normalizeId)(f?.[d.schemaId||"$id"]),this.schemaPath=d.schemaPath,this.localRefs=d.localRefs,this.meta=d.meta,this.$async=f?.$async,this.refs={};}};e.SchemaEnv=a;function c(d){let _=m.call(this,d);if(_)return _;let f=(0, r.getFullPath)(this.opts.uriResolver,d.root.baseId),{es5:v,lines:x}=this.opts.code,{ownProperties:T}=this.opts,R=new t.CodeGen(this.scope,{es5:v,lines:x,ownProperties:T}),$;d.$async&&($=R.scopeValue("Error",{ref:n.default,code:(0, t._)`require("ajv/dist/runtime/validation_error").default`}));let E=R.scopeName("validate");d.validateName=E;let A={gen:R,allErrors:this.opts.allErrors,data:o.default.data,parentData:o.default.parentData,parentDataProperty:o.default.parentDataProperty,dataNames:[o.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:R.scopeValue("schema",this.opts.code.source===true?{ref:d.schema,code:(0, t.stringify)(d.schema)}:{ref:d.schema}),validateName:E,ValidationError:$,schema:d.schema,schemaEnv:d,rootId:f,baseId:d.baseId||f,schemaPath:t.nil,errSchemaPath:d.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0, t._)`""`,opts:this.opts,self:this},N;try{this._compilations.add(d),(0,s.validateFunctionCode)(A),R.optimize(this.opts.code.optimize);let F=R.toString();N=`${R.scopeRefs(o.default.scope)}return ${F}`,this.opts.code.process&&(N=this.opts.code.process(N,d));let V=new Function(`${o.default.self}`,`${o.default.scope}`,N)(this,this.scope.get());if(this.scope.value(E,{ref:V}),V.errors=null,V.schema=d.schema,V.schemaEnv=d,d.$async&&(V.$async=!0),this.opts.code.source===!0&&(V.source={validateName:E,validateCode:F,scopeValues:R._values}),this.opts.unevaluated){let{props:K,items:ue}=A;V.evaluated={props:K instanceof t.Name?void 0:K,items:ue instanceof t.Name?void 0:ue,dynamicProps:K instanceof t.Name,dynamicItems:ue instanceof t.Name},V.source&&(V.source.evaluated=(0,t.stringify)(V.evaluated));}return d.validate=V,d}catch(F){throw delete d.validate,delete d.validateName,N&&this.logger.error("Error compiling schema, function code:",N),F}finally{this._compilations.delete(d);}}e.compileSchema=c;function u(d,_,f){var v;f=(0, r.resolveUrl)(this.opts.uriResolver,_,f);let x=d.refs[f];if(x)return x;let T=y.call(this,d,f);if(T===void 0){let R=(v=d.localRefs)===null||v===void 0?void 0:v[f],{schemaId:$}=this.opts;R&&(T=new a({schema:R,schemaId:$,root:d,baseId:_}));}if(T!==void 0)return d.refs[f]=l.call(this,T)}e.resolveRef=u;function l(d){return (0, r.inlineRef)(d.schema,this.opts.inlineRefs)?d.schema:d.validate?d:c.call(this,d)}function m(d){for(let _ of this._compilations)if(h(_,d))return _}e.getCompilingSchema=m;function h(d,_){return d.schema===_.schema&&d.root===_.root&&d.baseId===_.baseId}function y(d,_){let f;for(;typeof(f=this.refs[_])=="string";)_=f;return f||this.schemas[_]||b.call(this,d,_)}function b(d,_){let f=this.opts.uriResolver.parse(_),v=(0, r._getFullPath)(this.opts.uriResolver,f),x=(0, r.getFullPath)(this.opts.uriResolver,d.baseId,void 0);if(Object.keys(d.schema).length>0&&v===x)return S.call(this,f,d);let T=(0, r.normalizeId)(v),R=this.refs[T]||this.schemas[T];if(typeof R=="string"){let $=b.call(this,d,R);return typeof $?.schema!="object"?void 0:S.call(this,f,$)}if(typeof R?.schema=="object"){if(R.validate||c.call(this,R),T===(0, r.normalizeId)(_)){let{schema:$}=R,{schemaId:E}=this.opts,A=$[E];return A&&(x=(0, r.resolveUrl)(this.opts.uriResolver,x,A)),new a({schema:$,schemaId:E,root:d,baseId:x})}return S.call(this,f,R)}}e.resolveSchema=b;let p=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function S(d,{baseId:_,schema:f,root:v}){var x;if(((x=d.fragment)===null||x===void 0?void 0:x[0])!=="/")return;for(let $ of d.fragment.slice(1).split("/")){if(typeof f=="boolean")return;let E=f[(0, i.unescapeFragment)($)];if(E===void 0)return;f=E;let A=typeof f=="object"&&f[this.opts.schemaId];!p.has($)&&A&&(_=(0, r.resolveUrl)(this.opts.uriResolver,_,A));}let T;if(typeof f!="boolean"&&f.$ref&&!(0, i.schemaHasRulesButRef)(f,this.RULES)){let $=(0, r.resolveUrl)(this.opts.uriResolver,_,f.$ref);T=b.call(this,v,$);}let{schemaId:R}=this.opts;if(T=T||new a({schema:f,schemaId:R,root:v,baseId:_}),T.schema!==T.root.schema)return T}})),GE=G(((e,t)=>{t.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:false};})),mR=G(((e,t)=>{let n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),o=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(b){let p="",S=0,d=0;for(d=0;d<b.length;d++)if(S=b[d].charCodeAt(0),S!==48){if(!(S>=48&&S<=57||S>=65&&S<=70||S>=97&&S<=102))return "";p+=b[d];break}for(d+=1;d<b.length;d++){if(S=b[d].charCodeAt(0),!(S>=48&&S<=57||S>=65&&S<=70||S>=97&&S<=102))return "";p+=b[d];}return p}let i=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function s(b){return b.length=0,true}function a(b,p,S){if(b.length){let d=r(b);if(d!=="")p.push(d);else return S.error=true,false;b.length=0;}return true}function c(b){let p=0,S={error:false,address:"",zone:""},d=[],_=[],f=false,v=false,x=a;for(let T=0;T<b.length;T++){let R=b[T];if(!(R==="["||R==="]"))if(R===":"){if(f===true&&(v=true),!x(_,d,S))break;if(++p>7){S.error=true;break}T>0&&b[T-1]===":"&&(f=true),d.push(":");continue}else if(R==="%"){if(!x(_,d,S))break;x=s;}else {_.push(R);continue}}return _.length&&(x===s?S.zone=_.join(""):v?d.push(_.join("")):d.push(r(_))),S.address=d.join(""),S}function u(b){if(l(b,":")<2)return {host:b,isIPV6:false};let p=c(b);if(p.error)return {host:b,isIPV6:false};{let S=p.address,d=p.address;return p.zone&&(S+="%"+p.zone,d+="%25"+p.zone),{host:S,isIPV6:true,escapedHost:d}}}function l(b,p){let S=0;for(let d=0;d<b.length;d++)b[d]===p&&S++;return S}function m(b){let p=b,S=[],d=-1,_=0;for(;_=p.length;){if(_===1){if(p===".")break;if(p==="/"){S.push("/");break}else {S.push(p);break}}else if(_===2){if(p[0]==="."){if(p[1]===".")break;if(p[1]==="/"){p=p.slice(2);continue}}else if(p[0]==="/"&&(p[1]==="."||p[1]==="/")){S.push("/");break}}else if(_===3&&p==="/.."){S.length!==0&&S.pop(),S.push("/");break}if(p[0]==="."){if(p[1]==="."){if(p[2]==="/"){p=p.slice(3);continue}}else if(p[1]==="/"){p=p.slice(2);continue}}else if(p[0]==="/"&&p[1]==="."){if(p[2]==="/"){p=p.slice(2);continue}else if(p[2]==="."&&p[3]==="/"){p=p.slice(3),S.length!==0&&S.pop();continue}}if((d=p.indexOf("/",1))===-1){S.push(p);break}else S.push(p.slice(0,d)),p=p.slice(d);}return S.join("")}function h(b,p){let S=p!==true?escape:unescape;return b.scheme!==void 0&&(b.scheme=S(b.scheme)),b.userinfo!==void 0&&(b.userinfo=S(b.userinfo)),b.host!==void 0&&(b.host=S(b.host)),b.path!==void 0&&(b.path=S(b.path)),b.query!==void 0&&(b.query=S(b.query)),b.fragment!==void 0&&(b.fragment=S(b.fragment)),b}function y(b){let p=[];if(b.userinfo!==void 0&&(p.push(b.userinfo),p.push("@")),b.host!==void 0){let S=unescape(b.host);if(!o(S)){let d=u(S);d.isIPV6===true?S=`[${d.escapedHost}]`:S=b.host;}p.push(S);}return (typeof b.port=="number"||typeof b.port=="string")&&(p.push(":"),p.push(String(b.port))),p.length?p.join(""):void 0}t.exports={nonSimpleDomain:i,recomposeAuthority:y,normalizeComponentEncoding:h,removeDotSegments:m,isIPv4:o,isUUID:n,normalizeIPv6:u,stringArrayToHexStripped:r};})),HE=G(((e,t)=>{let{isUUID:n}=mR(),o=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function i(R){return r.indexOf(R)!==-1}function s(R){return R.secure===true?true:R.secure===false?false:R.scheme?R.scheme.length===3&&(R.scheme[0]==="w"||R.scheme[0]==="W")&&(R.scheme[1]==="s"||R.scheme[1]==="S")&&(R.scheme[2]==="s"||R.scheme[2]==="S"):false}function a(R){return R.host||(R.error=R.error||"HTTP URIs must have a host."),R}function c(R){let $=String(R.scheme).toLowerCase()==="https";return (R.port===($?443:80)||R.port==="")&&(R.port=void 0),R.path||(R.path="/"),R}function u(R){return R.secure=s(R),R.resourceName=(R.path||"/")+(R.query?"?"+R.query:""),R.path=void 0,R.query=void 0,R}function l(R){if((R.port===(s(R)?443:80)||R.port==="")&&(R.port=void 0),typeof R.secure=="boolean"&&(R.scheme=R.secure?"wss":"ws",R.secure=void 0),R.resourceName){let[$,E]=R.resourceName.split("?");R.path=$&&$!=="/"?$:void 0,R.query=E,R.resourceName=void 0;}return R.fragment=void 0,R}function m(R,$){if(!R.path)return R.error="URN can not be parsed",R;let E=R.path.match(o);if(E){let A=$.scheme||R.scheme||"urn";R.nid=E[1].toLowerCase(),R.nss=E[2];let N=T(`${A}:${$.nid||R.nid}`);R.path=void 0,N&&(R=N.parse(R,$));}else R.error=R.error||"URN can not be parsed.";return R}function h(R,$){if(R.nid===void 0)throw new Error("URN without nid cannot be serialized");let E=$.scheme||R.scheme||"urn",A=R.nid.toLowerCase(),N=T(`${E}:${$.nid||A}`);N&&(R=N.serialize(R,$));let F=R,V=R.nss;return F.path=`${A||$.nid}:${V}`,$.skipEscape=true,F}function y(R,$){let E=R;return E.uuid=E.nss,E.nss=void 0,!$.tolerant&&(!E.uuid||!n(E.uuid))&&(E.error=E.error||"UUID is not valid."),E}function b(R){let $=R;return $.nss=(R.uuid||"").toLowerCase(),$}let p={scheme:"http",domainHost:true,parse:a,serialize:c},S={scheme:"https",domainHost:p.domainHost,parse:a,serialize:c},d={scheme:"ws",domainHost:true,parse:u,serialize:l},_={scheme:"wss",domainHost:d.domainHost,parse:d.parse,serialize:d.serialize},x={http:p,https:S,ws:d,wss:_,urn:{scheme:"urn",parse:m,serialize:h,skipNormalize:true},"urn:uuid":{scheme:"urn:uuid",parse:y,serialize:b,skipNormalize:true}};Object.setPrototypeOf(x,null);function T(R){return R&&(x[R]||x[R.toLowerCase()])||void 0}t.exports={wsIsSecure:s,SCHEMES:x,isValidSchemeName:i,getSchemeHandler:T};})),ZE=G(((e,t)=>{let{normalizeIPv6:n,removeDotSegments:o,recomposeAuthority:r,normalizeComponentEncoding:i,isIPv4:s,nonSimpleDomain:a}=mR(),{SCHEMES:c,getSchemeHandler:u}=HE();function l(_,f){return typeof _=="string"?_=b(S(_,f),f):typeof _=="object"&&(_=S(b(_,f),f)),_}function m(_,f,v){let x=v?Object.assign({scheme:"null"},v):{scheme:"null"},T=h(S(_,x),S(f,x),x,true);return x.skipEscape=true,b(T,x)}function h(_,f,v,x){let T={};return x||(_=S(b(_,v),v),f=S(b(f,v),v)),v=v||{},!v.tolerant&&f.scheme?(T.scheme=f.scheme,T.userinfo=f.userinfo,T.host=f.host,T.port=f.port,T.path=o(f.path||""),T.query=f.query):(f.userinfo!==void 0||f.host!==void 0||f.port!==void 0?(T.userinfo=f.userinfo,T.host=f.host,T.port=f.port,T.path=o(f.path||""),T.query=f.query):(f.path?(f.path[0]==="/"?T.path=o(f.path):((_.userinfo!==void 0||_.host!==void 0||_.port!==void 0)&&!_.path?T.path="/"+f.path:_.path?T.path=_.path.slice(0,_.path.lastIndexOf("/")+1)+f.path:T.path=f.path,T.path=o(T.path)),T.query=f.query):(T.path=_.path,f.query!==void 0?T.query=f.query:T.query=_.query),T.userinfo=_.userinfo,T.host=_.host,T.port=_.port),T.scheme=_.scheme),T.fragment=f.fragment,T}function y(_,f,v){return typeof _=="string"?(_=unescape(_),_=b(i(S(_,v),true),{...v,skipEscape:true})):typeof _=="object"&&(_=b(i(_,true),{...v,skipEscape:true})),typeof f=="string"?(f=unescape(f),f=b(i(S(f,v),true),{...v,skipEscape:true})):typeof f=="object"&&(f=b(i(f,true),{...v,skipEscape:true})),_.toLowerCase()===f.toLowerCase()}function b(_,f){let v={host:_.host,scheme:_.scheme,userinfo:_.userinfo,port:_.port,path:_.path,query:_.query,nid:_.nid,nss:_.nss,uuid:_.uuid,fragment:_.fragment,reference:_.reference,resourceName:_.resourceName,secure:_.secure,error:""},x=Object.assign({},f),T=[],R=u(x.scheme||v.scheme);R&&R.serialize&&R.serialize(v,x),v.path!==void 0&&(x.skipEscape?v.path=unescape(v.path):(v.path=escape(v.path),v.scheme!==void 0&&(v.path=v.path.split("%3A").join(":")))),x.reference!=="suffix"&&v.scheme&&T.push(v.scheme,":");let $=r(v);if($!==void 0&&(x.reference!=="suffix"&&T.push("//"),T.push($),v.path&&v.path[0]!=="/"&&T.push("/")),v.path!==void 0){let E=v.path;!x.absolutePath&&(!R||!R.absolutePath)&&(E=o(E)),$===void 0&&E[0]==="/"&&E[1]==="/"&&(E="/%2F"+E.slice(2)),T.push(E);}return v.query!==void 0&&T.push("?",v.query),v.fragment!==void 0&&T.push("#",v.fragment),T.join("")}let p=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function S(_,f){let v=Object.assign({},f),x={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},T=false;v.reference==="suffix"&&(v.scheme?_=v.scheme+":"+_:_="//"+_);let R=_.match(p);if(R){if(x.scheme=R[1],x.userinfo=R[3],x.host=R[4],x.port=parseInt(R[5],10),x.path=R[6]||"",x.query=R[7],x.fragment=R[8],isNaN(x.port)&&(x.port=R[5]),x.host)if(s(x.host)===false){let E=n(x.host);x.host=E.host.toLowerCase(),T=E.isIPV6;}else T=true;x.scheme===void 0&&x.userinfo===void 0&&x.host===void 0&&x.port===void 0&&x.query===void 0&&!x.path?x.reference="same-document":x.scheme===void 0?x.reference="relative":x.fragment===void 0?x.reference="absolute":x.reference="uri",v.reference&&v.reference!=="suffix"&&v.reference!==x.reference&&(x.error=x.error||"URI is not a "+v.reference+" reference.");let $=u(v.scheme||x.scheme);if(!v.unicodeSupport&&(!$||!$.unicodeSupport)&&x.host&&(v.domainHost||$&&$.domainHost)&&T===false&&a(x.host))try{x.host=URL.domainToASCII(x.host.toLowerCase());}catch(E){x.error=x.error||"Host's domain name can not be converted to ASCII: "+E;}(!$||$&&!$.skipNormalize)&&(_.indexOf("%")!==-1&&(x.scheme!==void 0&&(x.scheme=unescape(x.scheme)),x.host!==void 0&&(x.host=unescape(x.host))),x.path&&(x.path=escape(unescape(x.path))),x.fragment&&(x.fragment=encodeURI(decodeURIComponent(x.fragment)))),$&&$.parse&&$.parse(x,v);}else x.error=x.error||"URI can not be parsed.";return x}let d={SCHEMES:c,normalize:l,resolve:m,resolveComponent:h,equal:y,serialize:b,parse:S};t.exports=d,t.exports.default=d,t.exports.fastUri=d;})),JE=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=ZE();t.code='require("ajv/dist/runtime/uri").default',e.default=t;})),N_=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Xo();Object.defineProperty(e,"KeywordCxt",{enumerable:true,get:function(){return t.KeywordCxt}});var n=Se();Object.defineProperty(e,"_",{enumerable:true,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:true,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:true,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:true,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:true,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:true,get:function(){return n.CodeGen}});let o=Ls(),r=Wo(),i=uR(),s=od(),a=Se(),c=nd(),u=td(),l=Ne(),m=GE(),h=JE(),y=(k,U)=>new RegExp(k,U);y.code="new RegExp";let b=["removeAdditional","useDefaults","coerceTypes"],p=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),S={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},d={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},_=200;function f(k){var U,B,w,O,j,Y,ce,Re,pe,Ee,je,I,L,q,fe,he,Te,Xe,tt,ct,Ye,Be,Nt,nt,rr;let jt=k.strict,nr=(U=k.code)===null||U===void 0?void 0:U.optimize,_r=nr===true||nr===void 0?1:nr||0,vr=(w=(B=k.code)===null||B===void 0?void 0:B.regExp)!==null&&w!==void 0?w:y,fn=(O=k.uriResolver)!==null&&O!==void 0?O:h.default;return {strictSchema:(Y=(j=k.strictSchema)!==null&&j!==void 0?j:jt)!==null&&Y!==void 0?Y:true,strictNumbers:(Re=(ce=k.strictNumbers)!==null&&ce!==void 0?ce:jt)!==null&&Re!==void 0?Re:true,strictTypes:(Ee=(pe=k.strictTypes)!==null&&pe!==void 0?pe:jt)!==null&&Ee!==void 0?Ee:"log",strictTuples:(I=(je=k.strictTuples)!==null&&je!==void 0?je:jt)!==null&&I!==void 0?I:"log",strictRequired:(q=(L=k.strictRequired)!==null&&L!==void 0?L:jt)!==null&&q!==void 0?q:false,code:k.code?{...k.code,optimize:_r,regExp:vr}:{optimize:_r,regExp:vr},loopRequired:(fe=k.loopRequired)!==null&&fe!==void 0?fe:_,loopEnum:(he=k.loopEnum)!==null&&he!==void 0?he:_,meta:(Te=k.meta)!==null&&Te!==void 0?Te:true,messages:(Xe=k.messages)!==null&&Xe!==void 0?Xe:true,inlineRefs:(tt=k.inlineRefs)!==null&&tt!==void 0?tt:true,schemaId:(ct=k.schemaId)!==null&&ct!==void 0?ct:"$id",addUsedSchema:(Ye=k.addUsedSchema)!==null&&Ye!==void 0?Ye:true,validateSchema:(Be=k.validateSchema)!==null&&Be!==void 0?Be:true,validateFormats:(Nt=k.validateFormats)!==null&&Nt!==void 0?Nt:true,unicodeRegExp:(nt=k.unicodeRegExp)!==null&&nt!==void 0?nt:true,int32range:(rr=k.int32range)!==null&&rr!==void 0?rr:true,uriResolver:fn}}var v=class{constructor(k={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,k=this.opts={...k,...f(k)};let{es5:U,lines:B}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:p,es5:U,lines:B}),this.logger=F(k.logger);let w=k.validateFormats;k.validateFormats=false,this.RULES=(0, i.getRules)(),x.call(this,S,k,"NOT SUPPORTED"),x.call(this,d,k,"DEPRECATED","warn"),this._metaOpts=A.call(this),k.formats&&$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),k.keywords&&E.call(this,k.keywords),typeof k.meta=="object"&&this.addMetaSchema(k.meta),R.call(this),k.validateFormats=w;}_addVocabularies(){this.addKeyword("$async");}_addDefaultMetaSchema(){let{$data:k,meta:U,schemaId:B}=this.opts,w=m;B==="id"&&(w={...m},w.id=w.$id,delete w.$id),U&&k&&this.addMetaSchema(w,w[B],false);}defaultMeta(){let{meta:k,schemaId:U}=this.opts;return this.opts.defaultMeta=typeof k=="object"?k[U]||k:void 0}validate(k,U){let B;if(typeof k=="string"){if(B=this.getSchema(k),!B)throw new Error(`no schema with key or ref "${k}"`)}else B=this.compile(k);let w=B(U);return "$async"in B||(this.errors=B.errors),w}compile(k,U){let B=this._addSchema(k,U);return B.validate||this._compileSchemaEnv(B)}compileAsync(k,U){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:B}=this.opts;return w.call(this,k,U);async function w(pe,Ee){await O.call(this,pe.$schema);let je=this._addSchema(pe,Ee);return je.validate||j.call(this,je)}async function O(pe){pe&&!this.getSchema(pe)&&await w.call(this,{$ref:pe},true);}async function j(pe){try{return this._compileSchemaEnv(pe)}catch(Ee){if(!(Ee instanceof r.default))throw Ee;return Y.call(this,Ee),await ce.call(this,Ee.missingSchema),j.call(this,pe)}}function Y({missingSchema:pe,missingRef:Ee}){if(this.refs[pe])throw new Error(`AnySchema ${pe} is loaded but ${Ee} cannot be resolved`)}async function ce(pe){let Ee=await Re.call(this,pe);this.refs[pe]||await O.call(this,Ee.$schema),this.refs[pe]||this.addSchema(Ee,pe,U);}async function Re(pe){let Ee=this._loading[pe];if(Ee)return Ee;try{return await(this._loading[pe]=B(pe))}finally{delete this._loading[pe];}}}addSchema(k,U,B,w=this.opts.validateSchema){if(Array.isArray(k)){for(let j of k)this.addSchema(j,void 0,B,w);return this}let O;if(typeof k=="object"){let{schemaId:j}=this.opts;if(O=k[j],O!==void 0&&typeof O!="string")throw new Error(`schema ${j} must be string`)}return U=(0, c.normalizeId)(U||O),this._checkUnique(U),this.schemas[U]=this._addSchema(k,B,U,w,true),this}addMetaSchema(k,U,B=this.opts.validateSchema){return this.addSchema(k,U,true,B),this}validateSchema(k,U){if(typeof k=="boolean")return true;let B;if(B=k.$schema,B!==void 0&&typeof B!="string")throw new Error("$schema must be a string");if(B=B||this.opts.defaultMeta||this.defaultMeta(),!B)return this.logger.warn("meta-schema not available"),this.errors=null,true;let w=this.validate(B,k);if(!w&&U){let O="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(O);else throw new Error(O)}return w}getSchema(k){let U;for(;typeof(U=T.call(this,k))=="string";)k=U;if(U===void 0){let{schemaId:B}=this.opts,w=new s.SchemaEnv({schema:{},schemaId:B});if(U=s.resolveSchema.call(this,w,k),!U)return;this.refs[k]=U;}return U.validate||this._compileSchemaEnv(U)}removeSchema(k){if(k instanceof RegExp)return this._removeAllSchemas(this.schemas,k),this._removeAllSchemas(this.refs,k),this;switch(typeof k){case "undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case "string":{let U=T.call(this,k);return typeof U=="object"&&this._cache.delete(U.schema),delete this.schemas[k],delete this.refs[k],this}case "object":{let U=k;this._cache.delete(U);let B=k[this.opts.schemaId];return B&&(B=(0, c.normalizeId)(B),delete this.schemas[B],delete this.refs[B]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(k){for(let U of k)this.addKeyword(U);return this}addKeyword(k,U){let B;if(typeof k=="string")B=k,typeof U=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),U.keyword=B);else if(typeof k=="object"&&U===void 0){if(U=k,B=U.keyword,Array.isArray(B)&&!B.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(K.call(this,B,U),!U)return (0, l.eachItem)(B,O=>ue.call(this,O)),this;xe.call(this,U);let w={...U,type:(0, u.getJSONTypes)(U.type),schemaType:(0, u.getJSONTypes)(U.schemaType)};return (0, l.eachItem)(B,w.type.length===0?O=>ue.call(this,O,w):O=>w.type.forEach(j=>ue.call(this,O,w,j))),this}getKeyword(k){let U=this.RULES.all[k];return typeof U=="object"?U.definition:!!U}removeKeyword(k){let{RULES:U}=this;delete U.keywords[k],delete U.all[k];for(let B of U.rules){let w=B.rules.findIndex(O=>O.keyword===k);w>=0&&B.rules.splice(w,1);}return this}addFormat(k,U){return typeof U=="string"&&(U=new RegExp(U)),this.formats[k]=U,this}errorsText(k=this.errors,{separator:U=", ",dataVar:B="data"}={}){return !k||k.length===0?"No errors":k.map(w=>`${B}${w.instancePath} ${w.message}`).reduce((w,O)=>w+U+O)}$dataMetaSchema(k,U){let B=this.RULES.all;k=JSON.parse(JSON.stringify(k));for(let w of U){let O=w.split("/").slice(1),j=k;for(let Y of O)j=j[Y];for(let Y in B){let ce=B[Y];if(typeof ce!="object")continue;let{$data:Re}=ce.definition,pe=j[Y];Re&&pe&&(j[Y]=be(pe));}}return k}_removeAllSchemas(k,U){for(let B in k){let w=k[B];(!U||U.test(B))&&(typeof w=="string"?delete k[B]:w&&!w.meta&&(this._cache.delete(w.schema),delete k[B]));}}_addSchema(k,U,B,w=this.opts.validateSchema,O=this.opts.addUsedSchema){let j,{schemaId:Y}=this.opts;if(typeof k=="object")j=k[Y];else {if(this.opts.jtd)throw new Error("schema must be object");if(typeof k!="boolean")throw new Error("schema must be object or boolean")}let ce=this._cache.get(k);if(ce!==void 0)return ce;B=(0, c.normalizeId)(j||B);let Re=c.getSchemaRefs.call(this,k,B);return ce=new s.SchemaEnv({schema:k,schemaId:Y,meta:U,baseId:B,localRefs:Re}),this._cache.set(ce.schema,ce),O&&!B.startsWith("#")&&(B&&this._checkUnique(B),this.refs[B]=ce),w&&this.validateSchema(k,true),ce}_checkUnique(k){if(this.schemas[k]||this.refs[k])throw new Error(`schema with key or id "${k}" already exists`)}_compileSchemaEnv(k){if(k.meta?this._compileMetaSchema(k):s.compileSchema.call(this,k),!k.validate)throw new Error("ajv implementation error");return k.validate}_compileMetaSchema(k){let U=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,k);}finally{this.opts=U;}}};v.ValidationError=o.default,v.MissingRefError=r.default,e.default=v;function x(k,U,B,w="error"){for(let O in k){let j=O;j in U&&this.logger[w](`${B}: option ${O}. ${k[j]}`);}}function T(k){return k=(0, c.normalizeId)(k),this.schemas[k]||this.refs[k]}function R(){let k=this.opts.schemas;if(k)if(Array.isArray(k))this.addSchema(k);else for(let U in k)this.addSchema(k[U],U);}function $(){for(let k in this.opts.formats){let U=this.opts.formats[k];U&&this.addFormat(k,U);}}function E(k){if(Array.isArray(k)){this.addVocabulary(k);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let U in k){let B=k[U];B.keyword||(B.keyword=U),this.addKeyword(B);}}function A(){let k={...this.opts};for(let U of b)delete k[U];return k}let N={log(){},warn(){},error(){}};function F(k){if(k===false)return N;if(k===void 0)return console;if(k.log&&k.warn&&k.error)return k;throw new Error("logger must implement log, warn and error methods")}let V=/^[a-z_$][a-z0-9_$:-]*$/i;function K(k,U){let{RULES:B}=this;if((0, l.eachItem)(k,w=>{if(B.keywords[w])throw new Error(`Keyword ${w} is already defined`);if(!V.test(w))throw new Error(`Keyword ${w} has invalid name`)}),!!U&&U.$data&&!("code"in U||"validate"in U))throw new Error('$data keyword must have "code" or "validate" function')}function ue(k,U,B){var w;let O=U?.post;if(B&&O)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:j}=this,Y=O?j.post:j.rules.find(({type:Re})=>Re===B);if(Y||(Y={type:B,rules:[]},j.rules.push(Y)),j.keywords[k]=true,!U)return;let ce={keyword:k,definition:{...U,type:(0, u.getJSONTypes)(U.type),schemaType:(0, u.getJSONTypes)(U.schemaType)}};U.before?ke.call(this,Y,ce,U.before):Y.rules.push(ce),j.all[k]=ce,(w=U.implements)===null||w===void 0||w.forEach(Re=>this.addKeyword(Re));}function ke(k,U,B){let w=k.rules.findIndex(O=>O.keyword===B);w>=0?k.rules.splice(w,0,U):(k.rules.push(U),this.logger.warn(`rule ${B} is not defined`));}function xe(k){let{metaSchema:U}=k;U!==void 0&&(k.$data&&this.opts.$data&&(U=be(U)),k.validateSchema=this.compile(U,true));}let Ve={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function be(k){return {anyOf:[k,Ve]}}})),XE=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};e.default=t;})),P_=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.callRef=e.getValidate=void 0;let t=Wo(),n=Vt(),o=Se(),r=qt(),i=od(),s=Ne(),a={keyword:"$ref",schemaType:"string",code(l){let{gen:m,schema:h,it:y}=l,{baseId:b,schemaEnv:p,validateName:S,opts:d,self:_}=y,{root:f}=p;if((h==="#"||h==="#/")&&b===f.baseId)return x();let v=i.resolveRef.call(_,f,b,h);if(v===void 0)throw new t.default(y.opts.uriResolver,b,h);if(v instanceof i.SchemaEnv)return T(v);return R(v);function x(){if(p===f)return u(l,S,p,p.$async);let $=m.scopeValue("root",{ref:f});return u(l,(0, o._)`${$}.validate`,f,f.$async)}function T($){u(l,c(l,$),$,$.$async);}function R($){let E=m.scopeValue("schema",d.code.source===true?{ref:$,code:(0, o.stringify)($)}:{ref:$}),A=m.name("valid"),N=l.subschema({schema:$,dataTypes:[],schemaPath:o.nil,topSchemaRef:E,errSchemaPath:h},A);l.mergeEvaluated(N),l.ok(A);}}};function c(l,m){let{gen:h}=l;return m.validate?h.scopeValue("validate",{ref:m.validate}):(0, o._)`${h.scopeValue("wrapper",{ref:m})}.validate`}e.getValidate=c;function u(l,m,h,y){let{gen:b,it:p}=l,{allErrors:S,schemaEnv:d,opts:_}=p,f=_.passContext?r.default.this:o.nil;y?v():x();function v(){if(!d.$async)throw new Error("async schema referenced by sync schema");let $=b.let("valid");b.try(()=>{b.code((0, o._)`await ${(0, n.callValidateCode)(l,m,f)}`),R(m),S||b.assign($,true);},E=>{b.if((0, o._)`!(${E} instanceof ${p.ValidationError})`,()=>b.throw(E)),T(E),S||b.assign($,false);}),l.ok($);}function x(){l.result((0, n.callValidateCode)(l,m,f),()=>R(m),()=>T(m));}function T($){let E=(0, o._)`${$}.errors`;b.assign(r.default.vErrors,(0, o._)`${r.default.vErrors} === null ? ${E} : ${r.default.vErrors}.concat(${E})`),b.assign(r.default.errors,(0, o._)`${r.default.vErrors}.length`);}function R($){var E;if(!p.opts.unevaluated)return;let A=(E=h?.validate)===null||E===void 0?void 0:E.evaluated;if(p.props!==true)if(A&&!A.dynamicProps)A.props!==void 0&&(p.props=s.mergeEvaluated.props(b,A.props,p.props));else {let N=b.var("props",(0, o._)`${$}.evaluated.props`);p.props=s.mergeEvaluated.props(b,N,p.props,o.Name);}if(p.items!==true)if(A&&!A.dynamicItems)A.items!==void 0&&(p.items=s.mergeEvaluated.items(b,A.items,p.items));else {let N=b.var("items",(0, o._)`${$}.evaluated.items`);p.items=s.mergeEvaluated.items(b,N,p.items,o.Name);}}}e.callRef=u,e.default=a;})),pR=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=XE(),n=P_(),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,n.default];e.default=o;})),WE=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=t.operators,o={maximum:{okStr:"<=",ok:n.LTE,fail:n.GT},minimum:{okStr:">=",ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},r={keyword:Object.keys(o),type:"number",schemaType:"number",$data:true,error:{message:({keyword:i,schemaCode:s})=>(0, t.str)`must be ${o[i].okStr} ${s}`,params:({keyword:i,schemaCode:s})=>(0, t._)`{comparison: ${o[i].okStr}, limit: ${s}}`},code(i){let{keyword:s,data:a,schemaCode:c}=i;i.fail$data((0, t._)`${a} ${o[s].fail} ${c} || isNaN(${a})`);}};e.default=r;})),YE=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:true,error:{message:({schemaCode:o})=>(0, t.str)`must be multiple of ${o}`,params:({schemaCode:o})=>(0, t._)`{multipleOf: ${o}}`},code(o){let{gen:r,data:i,schemaCode:s,it:a}=o,c=a.opts.multipleOfPrecision,u=r.let("res"),l=c?(0, t._)`Math.abs(Math.round(${u}) - ${u}) > 1e-${c}`:(0, t._)`${u} !== parseInt(${u})`;o.fail$data((0, t._)`(${s} === 0 || (${u} = ${i}/${s}, ${l}))`);}};e.default=n;})),QE=G((e=>{Object.defineProperty(e,"__esModule",{value:true});function t(n){let o=n.length,r=0,i=0,s;for(;i<o;)r++,s=n.charCodeAt(i++),s>=55296&&s<=56319&&i<o&&(s=n.charCodeAt(i),(s&64512)===56320&&i++);return r}e.default=t,t.code='require("ajv/dist/runtime/ucs2length").default';})),eI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=Ne(),o=QE(),r={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:true,error:{message({keyword:i,schemaCode:s}){let a=i==="maxLength"?"more":"fewer";return (0, t.str)`must NOT have ${a} than ${s} characters`},params:({schemaCode:i})=>(0, t._)`{limit: ${i}}`},code(i){let{keyword:s,data:a,schemaCode:c,it:u}=i,l=s==="maxLength"?t.operators.GT:t.operators.LT,m=u.opts.unicode===false?(0, t._)`${a}.length`:(0, t._)`${(0, n.useFunc)(i.gen,o.default)}(${a})`;i.fail$data((0, t._)`${m} ${l} ${c}`);}};e.default=r;})),tI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Vt(),n=Ne(),o=Se(),r={keyword:"pattern",type:"string",schemaType:"string",$data:true,error:{message:({schemaCode:i})=>(0, o.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0, o._)`{pattern: ${i}}`},code(i){let{gen:s,data:a,$data:c,schema:u,schemaCode:l,it:m}=i,h=m.opts.unicodeRegExp?"u":"";if(c){let{regExp:y}=m.opts.code,b=y.code==="new RegExp"?(0, o._)`new RegExp`:(0, n.useFunc)(s,y),p=s.let("valid");s.try(()=>s.assign(p,(0, o._)`${b}(${l}, ${h}).test(${a})`),()=>s.assign(p,false)),i.fail$data((0, o._)`!${p}`);}else {let y=(0, t.usePattern)(i,u);i.fail$data((0, o._)`!${y}.test(${a})`);}}};e.default=r;})),rI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:true,error:{message({keyword:o,schemaCode:r}){let i=o==="maxProperties"?"more":"fewer";return (0, t.str)`must NOT have ${i} than ${r} properties`},params:({schemaCode:o})=>(0, t._)`{limit: ${o}}`},code(o){let{keyword:r,data:i,schemaCode:s}=o,a=r==="maxProperties"?t.operators.GT:t.operators.LT;o.fail$data((0, t._)`Object.keys(${i}).length ${a} ${s}`);}};e.default=n;})),nI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Vt(),n=Se(),o=Ne(),r={keyword:"required",type:"object",schemaType:"array",$data:true,error:{message:({params:{missingProperty:i}})=>(0, n.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0, n._)`{missingProperty: ${i}}`},code(i){let{gen:s,schema:a,schemaCode:c,data:u,$data:l,it:m}=i,{opts:h}=m;if(!l&&a.length===0)return;let y=a.length>=h.loopRequired;if(m.allErrors?b():p(),h.strictRequired){let _=i.parentSchema.properties,{definedProperties:f}=i.it;for(let v of a)if(_?.[v]===void 0&&!f.has(v)){let x=`required property "${v}" is not defined at "${m.schemaEnv.baseId+m.errSchemaPath}" (strictRequired)`;(0, o.checkStrictMode)(m,x,m.opts.strictRequired);}}function b(){if(y||l)i.block$data(n.nil,S);else for(let _ of a)(0, t.checkReportMissingProp)(i,_);}function p(){let _=s.let("missing");if(y||l){let f=s.let("valid",true);i.block$data(f,()=>d(_,f)),i.ok(f);}else s.if((0, t.checkMissingProp)(i,a,_)),(0, t.reportMissingProp)(i,_),s.else();}function S(){s.forOf("prop",c,_=>{i.setParams({missingProperty:_}),s.if((0, t.noPropertyInData)(s,u,_,h.ownProperties),()=>i.error());});}function d(_,f){i.setParams({missingProperty:_}),s.forOf(_,c,()=>{s.assign(f,(0, t.propertyInData)(s,u,_,h.ownProperties)),s.if((0, n.not)(f),()=>{i.error(),s.break();});},n.nil);}}};e.default=r;})),oI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:true,error:{message({keyword:o,schemaCode:r}){let i=o==="maxItems"?"more":"fewer";return (0, t.str)`must NOT have ${i} than ${r} items`},params:({schemaCode:o})=>(0, t._)`{limit: ${o}}`},code(o){let{keyword:r,data:i,schemaCode:s}=o,a=r==="maxItems"?t.operators.GT:t.operators.LT;o.fail$data((0, t._)`${i}.length ${a} ${s}`);}};e.default=n;})),A_=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=dR();t.code='require("ajv/dist/runtime/equal").default',e.default=t;})),iI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=td(),n=Se(),o=Ne(),r=A_(),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:true,error:{message:({params:{i:s,j:a}})=>(0, n.str)`must NOT have duplicate items (items ## ${a} and ${s} are identical)`,params:({params:{i:s,j:a}})=>(0, n._)`{i: ${s}, j: ${a}}`},code(s){let{gen:a,data:c,$data:u,schema:l,parentSchema:m,schemaCode:h,it:y}=s;if(!u&&!l)return;let b=a.let("valid"),p=m.items?(0, t.getSchemaTypes)(m.items):[];s.block$data(b,S,(0, n._)`${h} === false`),s.ok(b);function S(){let v=a.let("i",(0, n._)`${c}.length`),x=a.let("j");s.setParams({i:v,j:x}),a.assign(b,true),a.if((0, n._)`${v} > 1`,()=>(d()?_:f)(v,x));}function d(){return p.length>0&&!p.some(v=>v==="object"||v==="array")}function _(v,x){let T=a.name("item"),R=(0, t.checkDataTypes)(p,T,y.opts.strictNumbers,t.DataType.Wrong),$=a.const("indices",(0, n._)`{}`);a.for((0, n._)`;${v}--;`,()=>{a.let(T,(0, n._)`${c}[${v}]`),a.if(R,(0, n._)`continue`),p.length>1&&a.if((0, n._)`typeof ${T} == "string"`,(0, n._)`${T} += "_"`),a.if((0, n._)`typeof ${$}[${T}] == "number"`,()=>{a.assign(x,(0, n._)`${$}[${T}]`),s.error(),a.assign(b,false).break();}).code((0, n._)`${$}[${T}] = ${v}`);});}function f(v,x){let T=(0, o.useFunc)(a,r.default),R=a.name("outer");a.label(R).for((0, n._)`;${v}--;`,()=>a.for((0, n._)`${x} = ${v}; ${x}--;`,()=>a.if((0, n._)`${T}(${c}[${v}], ${c}[${x}])`,()=>{s.error(),a.assign(b,false).break(R);})));}}};e.default=i;})),sI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=Ne(),o=A_(),r={keyword:"const",$data:true,error:{message:"must be equal to constant",params:({schemaCode:i})=>(0, t._)`{allowedValue: ${i}}`},code(i){let{gen:s,data:a,$data:c,schemaCode:u,schema:l}=i;c||l&&typeof l=="object"?i.fail$data((0, t._)`!${(0, n.useFunc)(s,o.default)}(${a}, ${u})`):i.fail((0, t._)`${l} !== ${a}`);}};e.default=r;})),aI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=Ne(),o=A_(),r={keyword:"enum",schemaType:"array",$data:true,error:{message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0, t._)`{allowedValues: ${i}}`},code(i){let{gen:s,data:a,$data:c,schema:u,schemaCode:l,it:m}=i;if(!c&&u.length===0)throw new Error("enum must have non-empty array");let h=u.length>=m.opts.loopEnum,y,b=()=>y??(y=(0, n.useFunc)(s,o.default)),p;if(h||c)p=s.let("valid"),i.block$data(p,S);else {if(!Array.isArray(u))throw new Error("ajv implementation error");let _=s.const("vSchema",l);p=(0, t.or)(...u.map((f,v)=>d(_,v)));}i.pass(p);function S(){s.assign(p,false),s.forOf("v",l,_=>s.if((0, t._)`${b()}(${a}, ${_})`,()=>s.assign(p,true).break()));}function d(_,f){let v=u[f];return typeof v=="object"&&v!==null?(0, t._)`${b()}(${a}, ${_}[${f}])`:(0, t._)`${a} === ${v}`}}};e.default=r;})),fR=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=WE(),n=YE(),o=eI(),r=tI(),i=rI(),s=nI(),a=oI(),c=iI(),u=sI(),l=aI(),m=[t.default,n.default,o.default,r.default,i.default,s.default,a.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,l.default];e.default=m;})),hR=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.validateAdditionalItems=void 0;let t=Se(),n=Ne(),o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:i}})=>(0, t.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0, t._)`{limit: ${i}}`},code(i){let{parentSchema:s,it:a}=i,{items:c}=s;if(!Array.isArray(c)){(0, n.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}r(i,c);}};function r(i,s){let{gen:a,schema:c,data:u,keyword:l,it:m}=i;m.items=true;let h=a.const("len",(0, t._)`${u}.length`);if(c===false)i.setParams({len:s.length}),i.pass((0, t._)`${h} <= ${s.length}`);else if(typeof c=="object"&&!(0, n.alwaysValidSchema)(m,c)){let b=a.var("valid",(0, t._)`${h} <= ${s.length}`);a.if((0, t.not)(b),()=>y(b)),i.ok(b);}function y(b){a.forRange("i",s.length,h,p=>{i.subschema({keyword:l,dataProp:p,dataPropType:n.Type.Num},b),m.allErrors||a.if((0, t.not)(b),()=>a.break());});}}e.validateAdditionalItems=r,e.default=o;})),gR=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.validateTuple=void 0;let t=Se(),n=Ne(),o=Vt(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){let{schema:a,it:c}=s;if(Array.isArray(a))return i(s,"additionalItems",a);c.items=true,!(0, n.alwaysValidSchema)(c,a)&&s.ok((0, o.validateArray)(s));}};function i(s,a,c=s.schema){let{gen:u,parentSchema:l,data:m,keyword:h,it:y}=s;S(l),y.opts.unevaluated&&c.length&&y.items!==true&&(y.items=n.mergeEvaluated.items(u,c.length,y.items));let b=u.name("valid"),p=u.const("len",(0, t._)`${m}.length`);c.forEach((d,_)=>{(0, n.alwaysValidSchema)(y,d)||(u.if((0, t._)`${p} > ${_}`,()=>s.subschema({keyword:h,schemaProp:_,dataProp:_},b)),s.ok(b));});function S(d){let{opts:_,errSchemaPath:f}=y,v=c.length,x=v===d.minItems&&(v===d.maxItems||d[a]===false);if(_.strictTuples&&!x){let T=`"${h}" is ${v}-tuple, but minItems or maxItems/${a} are not specified or different at path "${f}"`;(0, n.checkStrictMode)(y,T,_.strictTuples);}}}e.validateTuple=i,e.default=r;})),cI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=gR(),n={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:o=>(0, t.validateTuple)(o,"items")};e.default=n;})),uI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=Ne(),o=Vt(),r=hR(),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0, t.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0, t._)`{limit: ${s}}`},code(s){let{schema:a,parentSchema:c,it:u}=s,{prefixItems:l}=c;u.items=true,!(0, n.alwaysValidSchema)(u,a)&&(l?(0, r.validateAdditionalItems)(s,l):s.ok((0, o.validateArray)(s)));}};e.default=i;})),lI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=Ne(),o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:true,error:{message:({params:{min:r,max:i}})=>i===void 0?(0, t.str)`must contain at least ${r} valid item(s)`:(0, t.str)`must contain at least ${r} and no more than ${i} valid item(s)`,params:({params:{min:r,max:i}})=>i===void 0?(0, t._)`{minContains: ${r}}`:(0, t._)`{minContains: ${r}, maxContains: ${i}}`},code(r){let{gen:i,schema:s,parentSchema:a,data:c,it:u}=r,l,m,{minContains:h,maxContains:y}=a;u.opts.next?(l=h===void 0?1:h,m=y):l=1;let b=i.const("len",(0, t._)`${c}.length`);if(r.setParams({min:l,max:m}),m===void 0&&l===0){(0, n.checkStrictMode)(u,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(m!==void 0&&l>m){(0, n.checkStrictMode)(u,'"minContains" > "maxContains" is always invalid'),r.fail();return}if((0, n.alwaysValidSchema)(u,s)){let f=(0, t._)`${b} >= ${l}`;m!==void 0&&(f=(0, t._)`${f} && ${b} <= ${m}`),r.pass(f);return}u.items=true;let p=i.name("valid");m===void 0&&l===1?d(p,()=>i.if(p,()=>i.break())):l===0?(i.let(p,true),m!==void 0&&i.if((0, t._)`${c}.length > 0`,S)):(i.let(p,false),S()),r.result(p,()=>r.reset());function S(){let f=i.name("_valid"),v=i.let("count",0);d(f,()=>i.if(f,()=>_(v)));}function d(f,v){i.forRange("i",0,b,x=>{r.subschema({keyword:"contains",dataProp:x,dataPropType:n.Type.Num,compositeRule:true},f),v();});}function _(f){i.code((0, t._)`${f}++`),m===void 0?i.if((0, t._)`${f} >= ${l}`,()=>i.assign(p,true).break()):(i.if((0, t._)`${f} > ${m}`,()=>i.assign(p,false).break()),l===1?i.assign(p,true):i.if((0, t._)`${f} >= ${l}`,()=>i.assign(p,true)));}}};e.default=o;})),C_=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;let t=Se(),n=Ne(),o=Vt();e.error={message:({params:{property:c,depsCount:u,deps:l}})=>{let m=u===1?"property":"properties";return (0, t.str)`must have ${m} ${l} when property ${c} is present`},params:({params:{property:c,depsCount:u,deps:l,missingProperty:m}})=>(0, t._)`{property: ${c},
72
+ || ${E} === "boolean" || ${R} === null`).assign(A,(0, r._)`[${R}]`);}}}function y({gen:f,parentData:v,parentDataProperty:x},T){f.if((0, r._)`${v} !== undefined`,()=>f.assign((0, r._)`${v}[${x}]`,T));}function b(f,v,x,T=s.Correct){let R=T===s.Correct?r.operators.EQ:r.operators.NEQ,$;switch(f){case "null":return (0, r._)`${v} ${R} null`;case "array":$=(0, r._)`Array.isArray(${v})`;break;case "object":$=(0, r._)`${v} && typeof ${v} == "object" && !Array.isArray(${v})`;break;case "integer":$=E((0, r._)`!(${v} % 1) && !isNaN(${v})`);break;case "number":$=E();break;default:return (0, r._)`typeof ${v} ${R} ${f}`}return T===s.Correct?$:(0, r.not)($);function E(A=r.nil){return (0, r.and)((0, r._)`typeof ${v} == "number"`,A,x?(0, r._)`isFinite(${v})`:r.nil)}}e.checkDataType=b;function p(f,v,x,T){if(f.length===1)return b(f[0],v,x,T);let R,$=(0, i.toHash)(f);if($.array&&$.object){let E=(0, r._)`typeof ${v} != "object"`;R=$.null?E:(0, r._)`!${v} || ${E}`,delete $.null,delete $.array,delete $.object;}else R=r.nil;$.number&&delete $.integer;for(let E in $)R=(0, r.and)(R,b(E,v,x,T));return R}e.checkDataTypes=p;let S={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:v})=>typeof f=="string"?(0, r._)`{type: ${f}}`:(0, r._)`{type: ${v}}`};function d(f){let v=_(f);(0, o.reportError)(v,S);}e.reportTypeError=d;function _(f){let{gen:v,data:x,schema:T}=f,R=(0, i.schemaRefOrVal)(f,T,"type");return {gen:v,keyword:"type",data:x,schema:T.type,schemaCode:R,schemaValue:R,parentSchema:T,params:{},it:f}}})),VE=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.assignDefaults=void 0;let t=Se(),n=Ne();function o(i,s){let{properties:a,items:c}=i.schema;if(s==="object"&&a)for(let u in a)r(i,u,a[u].default);else s==="array"&&Array.isArray(c)&&c.forEach((u,l)=>r(i,l,u.default));}e.assignDefaults=o;function r(i,s,a){let{gen:c,compositeRule:u,data:l,opts:m}=i;if(a===void 0)return;let h=(0, t._)`${l}${(0, t.getProperty)(s)}`;if(u){(0, n.checkStrictMode)(i,`default is ignored for: ${h}`);return}let y=(0, t._)`${h} === undefined`;m.useDefaults==="empty"&&(y=(0, t._)`${y} || ${h} === null || ${h} === ""`),c.if(y,(0, t._)`${h} = ${(0, t.stringify)(a)}`);}})),Vt=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.validateUnion=e.validateArray=e.usePattern=e.callValidateCode=e.schemaProperties=e.allSchemaProperties=e.noPropertyInData=e.propertyInData=e.isOwnProperty=e.hasPropFunc=e.reportMissingProp=e.checkMissingProp=e.checkReportMissingProp=void 0;let t=Se(),n=Ne(),o=qt(),r=Ne();function i(f,v){let{gen:x,data:T,it:R}=f;x.if(m(x,T,v,R.opts.ownProperties),()=>{f.setParams({missingProperty:(0, t._)`${v}`},true),f.error();});}e.checkReportMissingProp=i;function s({gen:f,data:v,it:{opts:x}},T,R){return (0, t.or)(...T.map($=>(0, t.and)(m(f,v,$,x.ownProperties),(0, t._)`${R} = ${$}`)))}e.checkMissingProp=s;function a(f,v){f.setParams({missingProperty:v},true),f.error();}e.reportMissingProp=a;function c(f){return f.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0, t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=c;function u(f,v,x){return (0, t._)`${c(f)}.call(${v}, ${x})`}e.isOwnProperty=u;function l(f,v,x,T){let R=(0, t._)`${v}${(0, t.getProperty)(x)} !== undefined`;return T?(0, t._)`${R} && ${u(f,v,x)}`:R}e.propertyInData=l;function m(f,v,x,T){let R=(0, t._)`${v}${(0, t.getProperty)(x)} === undefined`;return T?(0, t.or)(R,(0, t.not)(u(f,v,x))):R}e.noPropertyInData=m;function h(f){return f?Object.keys(f).filter(v=>v!=="__proto__"):[]}e.allSchemaProperties=h;function y(f,v){return h(v).filter(x=>!(0, n.alwaysValidSchema)(f,v[x]))}e.schemaProperties=y;function b({schemaCode:f,data:v,it:{gen:x,topSchemaRef:T,schemaPath:R,errorPath:$},it:E},A,N,F){let V=F?(0, t._)`${f}, ${v}, ${T}${R}`:v,K=[[o.default.instancePath,(0, t.strConcat)(o.default.instancePath,$)],[o.default.parentData,E.parentData],[o.default.parentDataProperty,E.parentDataProperty],[o.default.rootData,o.default.rootData]];E.opts.dynamicRef&&K.push([o.default.dynamicAnchors,o.default.dynamicAnchors]);let ue=(0, t._)`${V}, ${x.object(...K)}`;return N!==t.nil?(0, t._)`${A}.call(${N}, ${ue})`:(0, t._)`${A}(${ue})`}e.callValidateCode=b;let p=(0, t._)`new RegExp`;function S({gen:f,it:{opts:v}},x){let T=v.unicodeRegExp?"u":"",{regExp:R}=v.code,$=R(x,T);return f.scopeValue("pattern",{key:$.toString(),ref:$,code:(0, t._)`${R.code==="new RegExp"?p:(0, r.useFunc)(f,R)}(${x}, ${T})`})}e.usePattern=S;function d(f){let{gen:v,data:x,keyword:T,it:R}=f,$=v.name("valid");if(R.allErrors){let A=v.let("valid",true);return E(()=>v.assign(A,false)),A}return v.var($,true),E(()=>v.break()),$;function E(A){let N=v.const("len",(0, t._)`${x}.length`);v.forRange("i",0,N,F=>{f.subschema({keyword:T,dataProp:F,dataPropType:n.Type.Num},$),v.if((0, t.not)($),A);});}}e.validateArray=d;function _(f){let{gen:v,schema:x,keyword:T,it:R}=f;if(!Array.isArray(x))throw new Error("ajv implementation error");if(x.some(A=>(0, n.alwaysValidSchema)(R,A))&&!R.opts.unevaluated)return;let $=v.let("valid",false),E=v.name("_valid");v.block(()=>x.forEach((A,N)=>{let F=f.subschema({keyword:T,schemaProp:N,compositeRule:true},E);v.assign($,(0, t._)`${$} || ${E}`),f.mergeValidEvaluated(F,E)||v.if((0, t.not)($));})),f.result($,()=>f.reset(),()=>f.error(true));}e.validateUnion=_;})),BE=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;let t=Se(),n=qt(),o=Vt(),r=td();function i(y,b){let{gen:p,keyword:S,schema:d,parentSchema:_,it:f}=y,v=b.macro.call(f.self,d,_,f),x=l(p,S,v);f.opts.validateSchema!==false&&f.self.validateSchema(v,true);let T=p.name("valid");y.subschema({schema:v,schemaPath:t.nil,errSchemaPath:`${f.errSchemaPath}/${S}`,topSchemaRef:x,compositeRule:true},T),y.pass(T,()=>y.error(true));}e.macroKeywordCode=i;function s(y,b){var p;let{gen:S,keyword:d,schema:_,parentSchema:f,$data:v,it:x}=y;u(x,b);let T=l(S,d,!v&&b.compile?b.compile.call(x.self,_,f,x):b.validate),R=S.let("valid");y.block$data(R,$),y.ok((p=b.valid)!==null&&p!==void 0?p:R);function $(){if(b.errors===false)N(),b.modifying&&a(y),F(()=>y.error());else {let V=b.async?E():A();b.modifying&&a(y),F(()=>c(y,V));}}function E(){let V=S.let("ruleErrs",null);return S.try(()=>N((0, t._)`await `),K=>S.assign(R,false).if((0, t._)`${K} instanceof ${x.ValidationError}`,()=>S.assign(V,(0, t._)`${K}.errors`),()=>S.throw(K))),V}function A(){let V=(0, t._)`${T}.errors`;return S.assign(V,null),N(t.nil),V}function N(V=b.async?(0, t._)`await `:t.nil){let K=x.opts.passContext?n.default.this:n.default.self,ue=!("compile"in b&&!v||b.schema===false);S.assign(R,(0, t._)`${V}${(0, o.callValidateCode)(y,T,K,ue)}`,b.modifying);}function F(V){var K;S.if((0, t.not)((K=b.valid)!==null&&K!==void 0?K:R),V);}}e.funcKeywordCode=s;function a(y){let{gen:b,data:p,it:S}=y;b.if(S.parentData,()=>b.assign(p,(0, t._)`${S.parentData}[${S.parentDataProperty}]`));}function c(y,b){let{gen:p}=y;p.if((0, t._)`Array.isArray(${b})`,()=>{p.assign(n.default.vErrors,(0, t._)`${n.default.vErrors} === null ? ${b} : ${n.default.vErrors}.concat(${b})`).assign(n.default.errors,(0, t._)`${n.default.vErrors}.length`),(0, r.extendErrors)(y);},()=>y.error());}function u({schemaEnv:y},b){if(b.async&&!y.$async)throw new Error("async keyword in sync schema")}function l(y,b,p){if(p===void 0)throw new Error(`keyword "${b}" failed to compile`);return y.scopeValue("keyword",typeof p=="function"?{ref:p}:{ref:p,code:(0, t.stringify)(p)})}function m(y,b,p=false){return !b.length||b.some(S=>S==="array"?Array.isArray(y):S==="object"?y&&typeof y=="object"&&!Array.isArray(y):typeof y==S||p&&typeof y>"u")}e.validSchemaType=m;function h({schema:y,opts:b,self:p,errSchemaPath:S},d,_){if(Array.isArray(d.keyword)?!d.keyword.includes(_):d.keyword!==_)throw new Error("ajv implementation error");let f=d.dependencies;if(f?.some(v=>!Object.prototype.hasOwnProperty.call(y,v)))throw new Error(`parent schema must have dependencies of ${_}: ${f.join(",")}`);if(d.validateSchema&&!d.validateSchema(y[_])){let v=`keyword "${_}" value is invalid at path "${S}": `+p.errorsText(d.validateSchema.errors);if(b.validateSchema==="log")p.logger.error(v);else throw new Error(v)}}e.validateKeywordUsage=h;})),KE=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;let t=Se(),n=Ne();function o(s,{keyword:a,schemaProp:c,schema:u,schemaPath:l,errSchemaPath:m,topSchemaRef:h}){if(a!==void 0&&u!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){let y=s.schema[a];return c===void 0?{schema:y,schemaPath:(0, t._)`${s.schemaPath}${(0, t.getProperty)(a)}`,errSchemaPath:`${s.errSchemaPath}/${a}`}:{schema:y[c],schemaPath:(0, t._)`${s.schemaPath}${(0, t.getProperty)(a)}${(0, t.getProperty)(c)}`,errSchemaPath:`${s.errSchemaPath}/${a}/${(0, n.escapeFragment)(c)}`}}if(u!==void 0){if(l===void 0||m===void 0||h===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return {schema:u,schemaPath:l,topSchemaRef:h,errSchemaPath:m}}throw new Error('either "keyword" or "schema" must be passed')}e.getSubschema=o;function r(s,a,{dataProp:c,dataPropType:u,data:l,dataTypes:m,propertyName:h}){if(l!==void 0&&c!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:y}=a;if(c!==void 0){let{errorPath:p,dataPathArr:S,opts:d}=a;b(y.let("data",(0, t._)`${a.data}${(0, t.getProperty)(c)}`,true)),s.errorPath=(0, t.str)`${p}${(0, n.getErrorPath)(c,u,d.jsPropertySyntax)}`,s.parentDataProperty=(0, t._)`${c}`,s.dataPathArr=[...S,s.parentDataProperty];}l!==void 0&&(b(l instanceof t.Name?l:y.let("data",l,true)),h!==void 0&&(s.propertyName=h)),m&&(s.dataTypes=m);function b(p){s.data=p,s.dataLevel=a.dataLevel+1,s.dataTypes=[],a.definedProperties=new Set,s.parentData=a.data,s.dataNames=[...a.dataNames,p];}}e.extendSubschemaData=r;function i(s,{jtdDiscriminator:a,jtdMetadata:c,compositeRule:u,createErrors:l,allErrors:m}){u!==void 0&&(s.compositeRule=u),l!==void 0&&(s.createErrors=l),m!==void 0&&(s.allErrors=m),s.jtdDiscriminator=a,s.jtdMetadata=c;}e.extendSubschemaMode=i;})),lR=G(((e,t)=>{t.exports=function n(o,r){if(o===r)return true;if(o&&r&&typeof o=="object"&&typeof r=="object"){if(o.constructor!==r.constructor)return false;var i,s,a;if(Array.isArray(o)){if(i=o.length,i!=r.length)return false;for(s=i;s--!==0;)if(!n(o[s],r[s]))return false;return true}if(o.constructor===RegExp)return o.source===r.source&&o.flags===r.flags;if(o.valueOf!==Object.prototype.valueOf)return o.valueOf()===r.valueOf();if(o.toString!==Object.prototype.toString)return o.toString()===r.toString();if(a=Object.keys(o),i=a.length,i!==Object.keys(r).length)return false;for(s=i;s--!==0;)if(!Object.prototype.hasOwnProperty.call(r,a[s]))return false;for(s=i;s--!==0;){var c=a[s];if(!n(o[c],r[c]))return false}return true}return o!==o&&r!==r};})),GE=G(((e,t)=>{var n=t.exports=function(i,s,a){typeof s=="function"&&(a=s,s={}),a=s.cb||a;var c=typeof a=="function"?a:a.pre||function(){},u=a.post||function(){};o(s,c,u,i,"",i);};n.keywords={additionalItems:true,items:true,contains:true,additionalProperties:true,propertyNames:true,not:true,if:true,then:true,else:true},n.arrayKeywords={items:true,allOf:true,anyOf:true,oneOf:true},n.propsKeywords={$defs:true,definitions:true,properties:true,patternProperties:true,dependencies:true},n.skipKeywords={default:true,enum:true,const:true,required:true,maximum:true,minimum:true,exclusiveMaximum:true,exclusiveMinimum:true,multipleOf:true,maxLength:true,minLength:true,pattern:true,format:true,maxItems:true,minItems:true,uniqueItems:true,maxProperties:true,minProperties:true};function o(i,s,a,c,u,l,m,h,y,b){if(c&&typeof c=="object"&&!Array.isArray(c)){s(c,u,l,m,h,y,b);for(var p in c){var S=c[p];if(Array.isArray(S)){if(p in n.arrayKeywords)for(var d=0;d<S.length;d++)o(i,s,a,S[d],u+"/"+p+"/"+d,l,u,p,c,d);}else if(p in n.propsKeywords){if(S&&typeof S=="object")for(var _ in S)o(i,s,a,S[_],u+"/"+p+"/"+r(_),l,u,p,c,_);}else (p in n.keywords||i.allKeys&&!(p in n.skipKeywords))&&o(i,s,a,S,u+"/"+p,l,u,p,c);}a(c,u,l,m,h,y,b);}}function r(i){return i.replace(/~/g,"~0").replace(/\//g,"~1")}})),rd=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;let t=Ne(),n=lR(),o=GE(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(S,d=true){return typeof S=="boolean"?true:d===true?!a(S):d?c(S)<=d:false}e.inlineRef=i;let s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(S){for(let d in S){if(s.has(d))return true;let _=S[d];if(Array.isArray(_)&&_.some(a)||typeof _=="object"&&a(_))return true}return false}function c(S){let d=0;for(let _ in S){if(_==="$ref")return 1/0;if(d++,!r.has(_)&&(typeof S[_]=="object"&&(0, t.eachItem)(S[_],f=>d+=c(f)),d===1/0))return 1/0}return d}function u(S,d="",_){return _!==false&&(d=h(d)),l(S,S.parse(d))}e.getFullPath=u;function l(S,d){return S.serialize(d).split("#")[0]+"#"}e._getFullPath=l;let m=/#\/?$/;function h(S){return S?S.replace(m,""):""}e.normalizeId=h;function y(S,d,_){return _=h(_),S.resolve(d,_)}e.resolveUrl=y;let b=/^[a-z_][-a-z0-9._]*$/i;function p(S,d){if(typeof S=="boolean")return {};let{schemaId:_,uriResolver:f}=this.opts,v=h(S[_]||d),x={"":v},T=u(f,v,false),R={},$=new Set;return o(S,{allKeys:true},(N,F,V,K)=>{if(K===void 0)return;let ue=T+F,ke=x[K];typeof N[_]=="string"&&(ke=xe.call(this,N[_])),Ve.call(this,N.$anchor),Ve.call(this,N.$dynamicAnchor),x[F]=ke;function xe(be){let k=this.opts.uriResolver.resolve;if(be=h(ke?k(ke,be):be),$.has(be))throw A(be);$.add(be);let U=this.refs[be];return typeof U=="string"&&(U=this.refs[U]),typeof U=="object"?E(N,U.schema,be):be!==h(ue)&&(be[0]==="#"?(E(N,R[be],be),R[be]=N):this.refs[be]=ue),be}function Ve(be){if(typeof be=="string"){if(!b.test(be))throw new Error(`invalid anchor "${be}"`);xe.call(this,`#${be}`);}}}),R;function E(N,F,V){if(F!==void 0&&!n(N,F))throw A(V)}function A(N){return new Error(`reference "${N}" resolves to more than one schema`)}}e.getSchemaRefs=p;})),Xo=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;let t=qE(),n=ed(),o=uR(),r=ed(),i=VE(),s=BE(),a=KE(),c=Se(),u=qt(),l=rd(),m=Ne(),h=td();function y(I){if(T(I)&&($(I),x(I))){d(I);return}b(I,()=>(0, t.topBoolOrEmptySchema)(I));}e.validateFunctionCode=y;function b({gen:I,validateName:L,schema:q,schemaEnv:fe,opts:he},Te){he.code.es5?I.func(L,(0, c._)`${u.default.data}, ${u.default.valCxt}`,fe.$async,()=>{I.code((0, c._)`"use strict"; ${f(q,he)}`),S(I,he),I.code(Te);}):I.func(L,(0, c._)`${u.default.data}, ${p(he)}`,fe.$async,()=>I.code(f(q,he)).code(Te));}function p(I){return (0, c._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${I.dynamicRef?(0, c._)`, ${u.default.dynamicAnchors}={}`:c.nil}}={}`}function S(I,L){I.if(u.default.valCxt,()=>{I.var(u.default.instancePath,(0, c._)`${u.default.valCxt}.${u.default.instancePath}`),I.var(u.default.parentData,(0, c._)`${u.default.valCxt}.${u.default.parentData}`),I.var(u.default.parentDataProperty,(0, c._)`${u.default.valCxt}.${u.default.parentDataProperty}`),I.var(u.default.rootData,(0, c._)`${u.default.valCxt}.${u.default.rootData}`),L.dynamicRef&&I.var(u.default.dynamicAnchors,(0, c._)`${u.default.valCxt}.${u.default.dynamicAnchors}`);},()=>{I.var(u.default.instancePath,(0, c._)`""`),I.var(u.default.parentData,(0, c._)`undefined`),I.var(u.default.parentDataProperty,(0, c._)`undefined`),I.var(u.default.rootData,u.default.data),L.dynamicRef&&I.var(u.default.dynamicAnchors,(0, c._)`{}`);});}function d(I){let{schema:L,opts:q,gen:fe}=I;b(I,()=>{q.$comment&&L.$comment&&K(I),N(I),fe.let(u.default.vErrors,null),fe.let(u.default.errors,0),q.unevaluated&&_(I),E(I),ue(I);});}function _(I){let{gen:L,validateName:q}=I;I.evaluated=L.const("evaluated",(0, c._)`${q}.evaluated`),L.if((0, c._)`${I.evaluated}.dynamicProps`,()=>L.assign((0, c._)`${I.evaluated}.props`,(0, c._)`undefined`)),L.if((0, c._)`${I.evaluated}.dynamicItems`,()=>L.assign((0, c._)`${I.evaluated}.items`,(0, c._)`undefined`));}function f(I,L){let q=typeof I=="object"&&I[L.schemaId];return q&&(L.code.source||L.code.process)?(0, c._)`/*# sourceURL=${q} */`:c.nil}function v(I,L){if(T(I)&&($(I),x(I))){R(I,L);return}(0, t.boolOrEmptySchema)(I,L);}function x({schema:I,self:L}){if(typeof I=="boolean")return !I;for(let q in I)if(L.RULES.all[q])return true;return false}function T(I){return typeof I.schema!="boolean"}function R(I,L){let{schema:q,gen:fe,opts:he}=I;he.$comment&&q.$comment&&K(I),F(I),V(I);let Te=fe.const("_errs",u.default.errors);E(I,Te),fe.var(L,(0, c._)`${Te} === ${u.default.errors}`);}function $(I){(0, m.checkUnknownRules)(I),A(I);}function E(I,L){if(I.opts.jtd)return xe(I,[],false,L);let q=(0, n.getSchemaTypes)(I.schema);xe(I,q,!(0, n.coerceAndCheckDataType)(I,q),L);}function A(I){let{schema:L,errSchemaPath:q,opts:fe,self:he}=I;L.$ref&&fe.ignoreKeywordsWithRef&&(0, m.schemaHasRulesButRef)(L,he.RULES)&&he.logger.warn(`$ref: keywords ignored in schema at path "${q}"`);}function N(I){let{schema:L,opts:q}=I;L.default!==void 0&&q.useDefaults&&q.strictSchema&&(0, m.checkStrictMode)(I,"default is ignored in the schema root");}function F(I){let L=I.schema[I.opts.schemaId];L&&(I.baseId=(0, l.resolveUrl)(I.opts.uriResolver,I.baseId,L));}function V(I){if(I.schema.$async&&!I.schemaEnv.$async)throw new Error("async schema in sync schema")}function K({gen:I,schemaEnv:L,schema:q,errSchemaPath:fe,opts:he}){let Te=q.$comment;if(he.$comment===true)I.code((0, c._)`${u.default.self}.logger.log(${Te})`);else if(typeof he.$comment=="function"){let Xe=(0, c.str)`${fe}/$comment`,tt=I.scopeValue("root",{ref:L.root});I.code((0, c._)`${u.default.self}.opts.$comment(${Te}, ${Xe}, ${tt}.schema)`);}}function ue(I){let{gen:L,schemaEnv:q,validateName:fe,ValidationError:he,opts:Te}=I;q.$async?L.if((0, c._)`${u.default.errors} === 0`,()=>L.return(u.default.data),()=>L.throw((0, c._)`new ${he}(${u.default.vErrors})`)):(L.assign((0, c._)`${fe}.errors`,u.default.vErrors),Te.unevaluated&&ke(I),L.return((0, c._)`${u.default.errors} === 0`));}function ke({gen:I,evaluated:L,props:q,items:fe}){q instanceof c.Name&&I.assign((0, c._)`${L}.props`,q),fe instanceof c.Name&&I.assign((0, c._)`${L}.items`,fe);}function xe(I,L,q,fe){let{gen:he,schema:Te,data:Xe,allErrors:tt,opts:ct,self:Ye}=I,{RULES:Be}=Ye;if(Te.$ref&&(ct.ignoreKeywordsWithRef||!(0, m.schemaHasRulesButRef)(Te,Be))){he.block(()=>Re(I,"$ref",Be.all.$ref.definition));return}ct.jtd||be(I,L),he.block(()=>{for(let nt of Be.rules)Nt(nt);Nt(Be.post);});function Nt(nt){(0, o.shouldUseGroup)(Te,nt)&&(nt.type?(he.if((0, r.checkDataType)(nt.type,Xe,ct.strictNumbers)),Ve(I,nt),L.length===1&&L[0]===nt.type&&q&&(he.else(),(0, r.reportTypeError)(I)),he.endIf()):Ve(I,nt),tt||he.if((0, c._)`${u.default.errors} === ${fe||0}`));}}function Ve(I,L){let{gen:q,schema:fe,opts:{useDefaults:he}}=I;he&&(0, i.assignDefaults)(I,L.type),q.block(()=>{for(let Te of L.rules)(0, o.shouldUseRule)(fe,Te)&&Re(I,Te.keyword,Te.definition,L.type);});}function be(I,L){I.schemaEnv.meta||!I.opts.strictTypes||(k(I,L),I.opts.allowUnionTypes||U(I,L),B(I,I.dataTypes));}function k(I,L){if(L.length){if(!I.dataTypes.length){I.dataTypes=L;return}L.forEach(q=>{O(I.dataTypes,q)||Y(I,`type "${q}" not allowed by context "${I.dataTypes.join(",")}"`);}),j(I,L);}}function U(I,L){L.length>1&&!(L.length===2&&L.includes("null"))&&Y(I,"use allowUnionTypes to allow union type keyword");}function B(I,L){let q=I.self.RULES.all;for(let fe in q){let he=q[fe];if(typeof he=="object"&&(0, o.shouldUseRule)(I.schema,he)){let{type:Te}=he.definition;Te.length&&!Te.some(Xe=>w(L,Xe))&&Y(I,`missing type "${Te.join(",")}" for keyword "${fe}"`);}}}function w(I,L){return I.includes(L)||L==="number"&&I.includes("integer")}function O(I,L){return I.includes(L)||L==="integer"&&I.includes("number")}function j(I,L){let q=[];for(let fe of I.dataTypes)O(L,fe)?q.push(fe):L.includes("integer")&&fe==="number"&&q.push("integer");I.dataTypes=q;}function Y(I,L){let q=I.schemaEnv.baseId+I.errSchemaPath;L+=` at "${q}" (strictTypes)`,(0, m.checkStrictMode)(I,L,I.opts.strictTypes);}var ce=class{constructor(I,L,q){if((0, s.validateKeywordUsage)(I,L,q),this.gen=I.gen,this.allErrors=I.allErrors,this.keyword=q,this.data=I.data,this.schema=I.schema[q],this.$data=L.$data&&I.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0, m.schemaRefOrVal)(I,this.schema,q,this.$data),this.schemaType=L.schemaType,this.parentSchema=I.schema,this.params={},this.it=I,this.def=L,this.$data)this.schemaCode=I.gen.const("vSchema",je(this.$data,I));else if(this.schemaCode=this.schemaValue,!(0, s.validSchemaType)(this.schema,L.schemaType,L.allowUndefined))throw new Error(`${q} value must be ${JSON.stringify(L.schemaType)}`);("code"in L?L.trackErrors:L.errors!==false)&&(this.errsCount=I.gen.const("_errs",u.default.errors));}result(I,L,q){this.failResult((0, c.not)(I),L,q);}failResult(I,L,q){this.gen.if(I),q?q():this.error(),L?(this.gen.else(),L(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else();}pass(I,L){this.failResult((0, c.not)(I),void 0,L);}fail(I){if(I===void 0){this.error(),this.allErrors||this.gen.if(false);return}this.gen.if(I),this.error(),this.allErrors?this.gen.endIf():this.gen.else();}fail$data(I){if(!this.$data)return this.fail(I);let{schemaCode:L}=this;this.fail((0, c._)`${L} !== undefined && (${(0, c.or)(this.invalid$data(),I)})`);}error(I,L,q){if(L){this.setParams(L),this._error(I,q),this.setParams({});return}this._error(I,q);}_error(I,L){(I?h.reportExtraError:h.reportError)(this,this.def.error,L);}$dataError(){(0, h.reportError)(this,this.def.$dataError||h.keyword$DataError);}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0, h.resetErrorsCount)(this.gen,this.errsCount);}ok(I){this.allErrors||this.gen.if(I);}setParams(I,L){L?Object.assign(this.params,I):this.params=I;}block$data(I,L,q=c.nil){this.gen.block(()=>{this.check$data(I,q),L();});}check$data(I=c.nil,L=c.nil){if(!this.$data)return;let{gen:q,schemaCode:fe,schemaType:he,def:Te}=this;q.if((0, c.or)((0, c._)`${fe} === undefined`,L)),I!==c.nil&&q.assign(I,true),(he.length||Te.validateSchema)&&(q.elseIf(this.invalid$data()),this.$dataError(),I!==c.nil&&q.assign(I,false)),q.else();}invalid$data(){let{gen:I,schemaCode:L,schemaType:q,def:fe,it:he}=this;return (0, c.or)(Te(),Xe());function Te(){if(q.length){if(!(L instanceof c.Name))throw new Error("ajv implementation error");let tt=Array.isArray(q)?q:[q];return (0, c._)`${(0, r.checkDataTypes)(tt,L,he.opts.strictNumbers,r.DataType.Wrong)}`}return c.nil}function Xe(){if(fe.validateSchema){let tt=I.scopeValue("validate$data",{ref:fe.validateSchema});return (0, c._)`!${tt}(${L})`}return c.nil}}subschema(I,L){let q=(0, a.getSubschema)(this.it,I);(0, a.extendSubschemaData)(q,this.it,I),(0, a.extendSubschemaMode)(q,I);let fe={...this.it,...q,items:void 0,props:void 0};return v(fe,L),fe}mergeEvaluated(I,L){let{it:q,gen:fe}=this;q.opts.unevaluated&&(q.props!==true&&I.props!==void 0&&(q.props=m.mergeEvaluated.props(fe,I.props,q.props,L)),q.items!==true&&I.items!==void 0&&(q.items=m.mergeEvaluated.items(fe,I.items,q.items,L)));}mergeValidEvaluated(I,L){let{it:q,gen:fe}=this;if(q.opts.unevaluated&&(q.props!==true||q.items!==true))return fe.if(L,()=>this.mergeEvaluated(I,c.Name)),true}};e.KeywordCxt=ce;function Re(I,L,q,fe){let he=new ce(I,q,L);"code"in q?q.code(he,fe):he.$data&&q.validate?(0, s.funcKeywordCode)(he,q):"macro"in q?(0, s.macroKeywordCode)(he,q):(q.compile||q.validate)&&(0, s.funcKeywordCode)(he,q);}let pe=/^\/(?:[^~]|~0|~1)*$/,Ee=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function je(I,{dataLevel:L,dataNames:q,dataPathArr:fe}){let he,Te;if(I==="")return u.default.rootData;if(I[0]==="/"){if(!pe.test(I))throw new Error(`Invalid JSON-pointer: ${I}`);he=I,Te=u.default.rootData;}else {let Ye=Ee.exec(I);if(!Ye)throw new Error(`Invalid JSON-pointer: ${I}`);let Be=+Ye[1];if(he=Ye[2],he==="#"){if(Be>=L)throw new Error(ct("property/index",Be));return fe[L-Be]}if(Be>L)throw new Error(ct("data",Be));if(Te=q[L-Be],!he)return Te}let Xe=Te,tt=he.split("/");for(let Ye of tt)Ye&&(Te=(0, c._)`${Te}${(0, c.getProperty)((0, m.unescapeJsonPointer)(Ye))}`,Xe=(0, c._)`${Xe} && ${Te}`);return Xe;function ct(Ye,Be){return `Cannot access ${Ye} ${Be} levels up, current level is ${L}`}}e.getData=je;})),Ls=G((e=>{Object.defineProperty(e,"__esModule",{value:true});var t=class extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=true;}};e.default=t;})),Wo=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=rd();var n=class extends Error{constructor(o,r,i,s){super(s||`can't resolve reference ${i} from id ${r}`),this.missingRef=(0, t.resolveUrl)(o,r,i),this.missingSchema=(0, t.normalizeId)((0, t.getFullPath)(o,this.missingRef));}};e.default=n;})),nd=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;let t=Se(),n=Ls(),o=qt(),r=rd(),i=Ne(),s=Xo();var a=class{constructor(d){var _;this.refs={},this.dynamicAnchors={};let f;typeof d.schema=="object"&&(f=d.schema),this.schema=d.schema,this.schemaId=d.schemaId,this.root=d.root||this,this.baseId=(_=d.baseId)!==null&&_!==void 0?_:(0, r.normalizeId)(f?.[d.schemaId||"$id"]),this.schemaPath=d.schemaPath,this.localRefs=d.localRefs,this.meta=d.meta,this.$async=f?.$async,this.refs={};}};e.SchemaEnv=a;function c(d){let _=m.call(this,d);if(_)return _;let f=(0, r.getFullPath)(this.opts.uriResolver,d.root.baseId),{es5:v,lines:x}=this.opts.code,{ownProperties:T}=this.opts,R=new t.CodeGen(this.scope,{es5:v,lines:x,ownProperties:T}),$;d.$async&&($=R.scopeValue("Error",{ref:n.default,code:(0, t._)`require("ajv/dist/runtime/validation_error").default`}));let E=R.scopeName("validate");d.validateName=E;let A={gen:R,allErrors:this.opts.allErrors,data:o.default.data,parentData:o.default.parentData,parentDataProperty:o.default.parentDataProperty,dataNames:[o.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:R.scopeValue("schema",this.opts.code.source===true?{ref:d.schema,code:(0, t.stringify)(d.schema)}:{ref:d.schema}),validateName:E,ValidationError:$,schema:d.schema,schemaEnv:d,rootId:f,baseId:d.baseId||f,schemaPath:t.nil,errSchemaPath:d.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0, t._)`""`,opts:this.opts,self:this},N;try{this._compilations.add(d),(0,s.validateFunctionCode)(A),R.optimize(this.opts.code.optimize);let F=R.toString();N=`${R.scopeRefs(o.default.scope)}return ${F}`,this.opts.code.process&&(N=this.opts.code.process(N,d));let V=new Function(`${o.default.self}`,`${o.default.scope}`,N)(this,this.scope.get());if(this.scope.value(E,{ref:V}),V.errors=null,V.schema=d.schema,V.schemaEnv=d,d.$async&&(V.$async=!0),this.opts.code.source===!0&&(V.source={validateName:E,validateCode:F,scopeValues:R._values}),this.opts.unevaluated){let{props:K,items:ue}=A;V.evaluated={props:K instanceof t.Name?void 0:K,items:ue instanceof t.Name?void 0:ue,dynamicProps:K instanceof t.Name,dynamicItems:ue instanceof t.Name},V.source&&(V.source.evaluated=(0,t.stringify)(V.evaluated));}return d.validate=V,d}catch(F){throw delete d.validate,delete d.validateName,N&&this.logger.error("Error compiling schema, function code:",N),F}finally{this._compilations.delete(d);}}e.compileSchema=c;function u(d,_,f){var v;f=(0, r.resolveUrl)(this.opts.uriResolver,_,f);let x=d.refs[f];if(x)return x;let T=y.call(this,d,f);if(T===void 0){let R=(v=d.localRefs)===null||v===void 0?void 0:v[f],{schemaId:$}=this.opts;R&&(T=new a({schema:R,schemaId:$,root:d,baseId:_}));}if(T!==void 0)return d.refs[f]=l.call(this,T)}e.resolveRef=u;function l(d){return (0, r.inlineRef)(d.schema,this.opts.inlineRefs)?d.schema:d.validate?d:c.call(this,d)}function m(d){for(let _ of this._compilations)if(h(_,d))return _}e.getCompilingSchema=m;function h(d,_){return d.schema===_.schema&&d.root===_.root&&d.baseId===_.baseId}function y(d,_){let f;for(;typeof(f=this.refs[_])=="string";)_=f;return f||this.schemas[_]||b.call(this,d,_)}function b(d,_){let f=this.opts.uriResolver.parse(_),v=(0, r._getFullPath)(this.opts.uriResolver,f),x=(0, r.getFullPath)(this.opts.uriResolver,d.baseId,void 0);if(Object.keys(d.schema).length>0&&v===x)return S.call(this,f,d);let T=(0, r.normalizeId)(v),R=this.refs[T]||this.schemas[T];if(typeof R=="string"){let $=b.call(this,d,R);return typeof $?.schema!="object"?void 0:S.call(this,f,$)}if(typeof R?.schema=="object"){if(R.validate||c.call(this,R),T===(0, r.normalizeId)(_)){let{schema:$}=R,{schemaId:E}=this.opts,A=$[E];return A&&(x=(0, r.resolveUrl)(this.opts.uriResolver,x,A)),new a({schema:$,schemaId:E,root:d,baseId:x})}return S.call(this,f,R)}}e.resolveSchema=b;let p=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function S(d,{baseId:_,schema:f,root:v}){var x;if(((x=d.fragment)===null||x===void 0?void 0:x[0])!=="/")return;for(let $ of d.fragment.slice(1).split("/")){if(typeof f=="boolean")return;let E=f[(0, i.unescapeFragment)($)];if(E===void 0)return;f=E;let A=typeof f=="object"&&f[this.opts.schemaId];!p.has($)&&A&&(_=(0, r.resolveUrl)(this.opts.uriResolver,_,A));}let T;if(typeof f!="boolean"&&f.$ref&&!(0, i.schemaHasRulesButRef)(f,this.RULES)){let $=(0, r.resolveUrl)(this.opts.uriResolver,_,f.$ref);T=b.call(this,v,$);}let{schemaId:R}=this.opts;if(T=T||new a({schema:f,schemaId:R,root:v,baseId:_}),T.schema!==T.root.schema)return T}})),HE=G(((e,t)=>{t.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:false};})),dR=G(((e,t)=>{let n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),o=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(b){let p="",S=0,d=0;for(d=0;d<b.length;d++)if(S=b[d].charCodeAt(0),S!==48){if(!(S>=48&&S<=57||S>=65&&S<=70||S>=97&&S<=102))return "";p+=b[d];break}for(d+=1;d<b.length;d++){if(S=b[d].charCodeAt(0),!(S>=48&&S<=57||S>=65&&S<=70||S>=97&&S<=102))return "";p+=b[d];}return p}let i=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function s(b){return b.length=0,true}function a(b,p,S){if(b.length){let d=r(b);if(d!=="")p.push(d);else return S.error=true,false;b.length=0;}return true}function c(b){let p=0,S={error:false,address:"",zone:""},d=[],_=[],f=false,v=false,x=a;for(let T=0;T<b.length;T++){let R=b[T];if(!(R==="["||R==="]"))if(R===":"){if(f===true&&(v=true),!x(_,d,S))break;if(++p>7){S.error=true;break}T>0&&b[T-1]===":"&&(f=true),d.push(":");continue}else if(R==="%"){if(!x(_,d,S))break;x=s;}else {_.push(R);continue}}return _.length&&(x===s?S.zone=_.join(""):v?d.push(_.join("")):d.push(r(_))),S.address=d.join(""),S}function u(b){if(l(b,":")<2)return {host:b,isIPV6:false};let p=c(b);if(p.error)return {host:b,isIPV6:false};{let S=p.address,d=p.address;return p.zone&&(S+="%"+p.zone,d+="%25"+p.zone),{host:S,isIPV6:true,escapedHost:d}}}function l(b,p){let S=0;for(let d=0;d<b.length;d++)b[d]===p&&S++;return S}function m(b){let p=b,S=[],d=-1,_=0;for(;_=p.length;){if(_===1){if(p===".")break;if(p==="/"){S.push("/");break}else {S.push(p);break}}else if(_===2){if(p[0]==="."){if(p[1]===".")break;if(p[1]==="/"){p=p.slice(2);continue}}else if(p[0]==="/"&&(p[1]==="."||p[1]==="/")){S.push("/");break}}else if(_===3&&p==="/.."){S.length!==0&&S.pop(),S.push("/");break}if(p[0]==="."){if(p[1]==="."){if(p[2]==="/"){p=p.slice(3);continue}}else if(p[1]==="/"){p=p.slice(2);continue}}else if(p[0]==="/"&&p[1]==="."){if(p[2]==="/"){p=p.slice(2);continue}else if(p[2]==="."&&p[3]==="/"){p=p.slice(3),S.length!==0&&S.pop();continue}}if((d=p.indexOf("/",1))===-1){S.push(p);break}else S.push(p.slice(0,d)),p=p.slice(d);}return S.join("")}function h(b,p){let S=p!==true?escape:unescape;return b.scheme!==void 0&&(b.scheme=S(b.scheme)),b.userinfo!==void 0&&(b.userinfo=S(b.userinfo)),b.host!==void 0&&(b.host=S(b.host)),b.path!==void 0&&(b.path=S(b.path)),b.query!==void 0&&(b.query=S(b.query)),b.fragment!==void 0&&(b.fragment=S(b.fragment)),b}function y(b){let p=[];if(b.userinfo!==void 0&&(p.push(b.userinfo),p.push("@")),b.host!==void 0){let S=unescape(b.host);if(!o(S)){let d=u(S);d.isIPV6===true?S=`[${d.escapedHost}]`:S=b.host;}p.push(S);}return (typeof b.port=="number"||typeof b.port=="string")&&(p.push(":"),p.push(String(b.port))),p.length?p.join(""):void 0}t.exports={nonSimpleDomain:i,recomposeAuthority:y,normalizeComponentEncoding:h,removeDotSegments:m,isIPv4:o,isUUID:n,normalizeIPv6:u,stringArrayToHexStripped:r};})),ZE=G(((e,t)=>{let{isUUID:n}=dR(),o=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function i(R){return r.indexOf(R)!==-1}function s(R){return R.secure===true?true:R.secure===false?false:R.scheme?R.scheme.length===3&&(R.scheme[0]==="w"||R.scheme[0]==="W")&&(R.scheme[1]==="s"||R.scheme[1]==="S")&&(R.scheme[2]==="s"||R.scheme[2]==="S"):false}function a(R){return R.host||(R.error=R.error||"HTTP URIs must have a host."),R}function c(R){let $=String(R.scheme).toLowerCase()==="https";return (R.port===($?443:80)||R.port==="")&&(R.port=void 0),R.path||(R.path="/"),R}function u(R){return R.secure=s(R),R.resourceName=(R.path||"/")+(R.query?"?"+R.query:""),R.path=void 0,R.query=void 0,R}function l(R){if((R.port===(s(R)?443:80)||R.port==="")&&(R.port=void 0),typeof R.secure=="boolean"&&(R.scheme=R.secure?"wss":"ws",R.secure=void 0),R.resourceName){let[$,E]=R.resourceName.split("?");R.path=$&&$!=="/"?$:void 0,R.query=E,R.resourceName=void 0;}return R.fragment=void 0,R}function m(R,$){if(!R.path)return R.error="URN can not be parsed",R;let E=R.path.match(o);if(E){let A=$.scheme||R.scheme||"urn";R.nid=E[1].toLowerCase(),R.nss=E[2];let N=T(`${A}:${$.nid||R.nid}`);R.path=void 0,N&&(R=N.parse(R,$));}else R.error=R.error||"URN can not be parsed.";return R}function h(R,$){if(R.nid===void 0)throw new Error("URN without nid cannot be serialized");let E=$.scheme||R.scheme||"urn",A=R.nid.toLowerCase(),N=T(`${E}:${$.nid||A}`);N&&(R=N.serialize(R,$));let F=R,V=R.nss;return F.path=`${A||$.nid}:${V}`,$.skipEscape=true,F}function y(R,$){let E=R;return E.uuid=E.nss,E.nss=void 0,!$.tolerant&&(!E.uuid||!n(E.uuid))&&(E.error=E.error||"UUID is not valid."),E}function b(R){let $=R;return $.nss=(R.uuid||"").toLowerCase(),$}let p={scheme:"http",domainHost:true,parse:a,serialize:c},S={scheme:"https",domainHost:p.domainHost,parse:a,serialize:c},d={scheme:"ws",domainHost:true,parse:u,serialize:l},_={scheme:"wss",domainHost:d.domainHost,parse:d.parse,serialize:d.serialize},x={http:p,https:S,ws:d,wss:_,urn:{scheme:"urn",parse:m,serialize:h,skipNormalize:true},"urn:uuid":{scheme:"urn:uuid",parse:y,serialize:b,skipNormalize:true}};Object.setPrototypeOf(x,null);function T(R){return R&&(x[R]||x[R.toLowerCase()])||void 0}t.exports={wsIsSecure:s,SCHEMES:x,isValidSchemeName:i,getSchemeHandler:T};})),JE=G(((e,t)=>{let{normalizeIPv6:n,removeDotSegments:o,recomposeAuthority:r,normalizeComponentEncoding:i,isIPv4:s,nonSimpleDomain:a}=dR(),{SCHEMES:c,getSchemeHandler:u}=ZE();function l(_,f){return typeof _=="string"?_=b(S(_,f),f):typeof _=="object"&&(_=S(b(_,f),f)),_}function m(_,f,v){let x=v?Object.assign({scheme:"null"},v):{scheme:"null"},T=h(S(_,x),S(f,x),x,true);return x.skipEscape=true,b(T,x)}function h(_,f,v,x){let T={};return x||(_=S(b(_,v),v),f=S(b(f,v),v)),v=v||{},!v.tolerant&&f.scheme?(T.scheme=f.scheme,T.userinfo=f.userinfo,T.host=f.host,T.port=f.port,T.path=o(f.path||""),T.query=f.query):(f.userinfo!==void 0||f.host!==void 0||f.port!==void 0?(T.userinfo=f.userinfo,T.host=f.host,T.port=f.port,T.path=o(f.path||""),T.query=f.query):(f.path?(f.path[0]==="/"?T.path=o(f.path):((_.userinfo!==void 0||_.host!==void 0||_.port!==void 0)&&!_.path?T.path="/"+f.path:_.path?T.path=_.path.slice(0,_.path.lastIndexOf("/")+1)+f.path:T.path=f.path,T.path=o(T.path)),T.query=f.query):(T.path=_.path,f.query!==void 0?T.query=f.query:T.query=_.query),T.userinfo=_.userinfo,T.host=_.host,T.port=_.port),T.scheme=_.scheme),T.fragment=f.fragment,T}function y(_,f,v){return typeof _=="string"?(_=unescape(_),_=b(i(S(_,v),true),{...v,skipEscape:true})):typeof _=="object"&&(_=b(i(_,true),{...v,skipEscape:true})),typeof f=="string"?(f=unescape(f),f=b(i(S(f,v),true),{...v,skipEscape:true})):typeof f=="object"&&(f=b(i(f,true),{...v,skipEscape:true})),_.toLowerCase()===f.toLowerCase()}function b(_,f){let v={host:_.host,scheme:_.scheme,userinfo:_.userinfo,port:_.port,path:_.path,query:_.query,nid:_.nid,nss:_.nss,uuid:_.uuid,fragment:_.fragment,reference:_.reference,resourceName:_.resourceName,secure:_.secure,error:""},x=Object.assign({},f),T=[],R=u(x.scheme||v.scheme);R&&R.serialize&&R.serialize(v,x),v.path!==void 0&&(x.skipEscape?v.path=unescape(v.path):(v.path=escape(v.path),v.scheme!==void 0&&(v.path=v.path.split("%3A").join(":")))),x.reference!=="suffix"&&v.scheme&&T.push(v.scheme,":");let $=r(v);if($!==void 0&&(x.reference!=="suffix"&&T.push("//"),T.push($),v.path&&v.path[0]!=="/"&&T.push("/")),v.path!==void 0){let E=v.path;!x.absolutePath&&(!R||!R.absolutePath)&&(E=o(E)),$===void 0&&E[0]==="/"&&E[1]==="/"&&(E="/%2F"+E.slice(2)),T.push(E);}return v.query!==void 0&&T.push("?",v.query),v.fragment!==void 0&&T.push("#",v.fragment),T.join("")}let p=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function S(_,f){let v=Object.assign({},f),x={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},T=false;v.reference==="suffix"&&(v.scheme?_=v.scheme+":"+_:_="//"+_);let R=_.match(p);if(R){if(x.scheme=R[1],x.userinfo=R[3],x.host=R[4],x.port=parseInt(R[5],10),x.path=R[6]||"",x.query=R[7],x.fragment=R[8],isNaN(x.port)&&(x.port=R[5]),x.host)if(s(x.host)===false){let E=n(x.host);x.host=E.host.toLowerCase(),T=E.isIPV6;}else T=true;x.scheme===void 0&&x.userinfo===void 0&&x.host===void 0&&x.port===void 0&&x.query===void 0&&!x.path?x.reference="same-document":x.scheme===void 0?x.reference="relative":x.fragment===void 0?x.reference="absolute":x.reference="uri",v.reference&&v.reference!=="suffix"&&v.reference!==x.reference&&(x.error=x.error||"URI is not a "+v.reference+" reference.");let $=u(v.scheme||x.scheme);if(!v.unicodeSupport&&(!$||!$.unicodeSupport)&&x.host&&(v.domainHost||$&&$.domainHost)&&T===false&&a(x.host))try{x.host=URL.domainToASCII(x.host.toLowerCase());}catch(E){x.error=x.error||"Host's domain name can not be converted to ASCII: "+E;}(!$||$&&!$.skipNormalize)&&(_.indexOf("%")!==-1&&(x.scheme!==void 0&&(x.scheme=unescape(x.scheme)),x.host!==void 0&&(x.host=unescape(x.host))),x.path&&(x.path=escape(unescape(x.path))),x.fragment&&(x.fragment=encodeURI(decodeURIComponent(x.fragment)))),$&&$.parse&&$.parse(x,v);}else x.error=x.error||"URI can not be parsed.";return x}let d={SCHEMES:c,normalize:l,resolve:m,resolveComponent:h,equal:y,serialize:b,parse:S};t.exports=d,t.exports.default=d,t.exports.fastUri=d;})),XE=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=JE();t.code='require("ajv/dist/runtime/uri").default',e.default=t;})),k_=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Xo();Object.defineProperty(e,"KeywordCxt",{enumerable:true,get:function(){return t.KeywordCxt}});var n=Se();Object.defineProperty(e,"_",{enumerable:true,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:true,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:true,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:true,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:true,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:true,get:function(){return n.CodeGen}});let o=Ls(),r=Wo(),i=cR(),s=nd(),a=Se(),c=rd(),u=ed(),l=Ne(),m=HE(),h=XE(),y=(k,U)=>new RegExp(k,U);y.code="new RegExp";let b=["removeAdditional","useDefaults","coerceTypes"],p=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),S={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},d={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},_=200;function f(k){var U,B,w,O,j,Y,ce,Re,pe,Ee,je,I,L,q,fe,he,Te,Xe,tt,ct,Ye,Be,Nt,nt,tr;let jt=k.strict,rr=(U=k.code)===null||U===void 0?void 0:U.optimize,gr=rr===true||rr===void 0?1:rr||0,_r=(w=(B=k.code)===null||B===void 0?void 0:B.regExp)!==null&&w!==void 0?w:y,fn=(O=k.uriResolver)!==null&&O!==void 0?O:h.default;return {strictSchema:(Y=(j=k.strictSchema)!==null&&j!==void 0?j:jt)!==null&&Y!==void 0?Y:true,strictNumbers:(Re=(ce=k.strictNumbers)!==null&&ce!==void 0?ce:jt)!==null&&Re!==void 0?Re:true,strictTypes:(Ee=(pe=k.strictTypes)!==null&&pe!==void 0?pe:jt)!==null&&Ee!==void 0?Ee:"log",strictTuples:(I=(je=k.strictTuples)!==null&&je!==void 0?je:jt)!==null&&I!==void 0?I:"log",strictRequired:(q=(L=k.strictRequired)!==null&&L!==void 0?L:jt)!==null&&q!==void 0?q:false,code:k.code?{...k.code,optimize:gr,regExp:_r}:{optimize:gr,regExp:_r},loopRequired:(fe=k.loopRequired)!==null&&fe!==void 0?fe:_,loopEnum:(he=k.loopEnum)!==null&&he!==void 0?he:_,meta:(Te=k.meta)!==null&&Te!==void 0?Te:true,messages:(Xe=k.messages)!==null&&Xe!==void 0?Xe:true,inlineRefs:(tt=k.inlineRefs)!==null&&tt!==void 0?tt:true,schemaId:(ct=k.schemaId)!==null&&ct!==void 0?ct:"$id",addUsedSchema:(Ye=k.addUsedSchema)!==null&&Ye!==void 0?Ye:true,validateSchema:(Be=k.validateSchema)!==null&&Be!==void 0?Be:true,validateFormats:(Nt=k.validateFormats)!==null&&Nt!==void 0?Nt:true,unicodeRegExp:(nt=k.unicodeRegExp)!==null&&nt!==void 0?nt:true,int32range:(tr=k.int32range)!==null&&tr!==void 0?tr:true,uriResolver:fn}}var v=class{constructor(k={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,k=this.opts={...k,...f(k)};let{es5:U,lines:B}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:p,es5:U,lines:B}),this.logger=F(k.logger);let w=k.validateFormats;k.validateFormats=false,this.RULES=(0, i.getRules)(),x.call(this,S,k,"NOT SUPPORTED"),x.call(this,d,k,"DEPRECATED","warn"),this._metaOpts=A.call(this),k.formats&&$.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),k.keywords&&E.call(this,k.keywords),typeof k.meta=="object"&&this.addMetaSchema(k.meta),R.call(this),k.validateFormats=w;}_addVocabularies(){this.addKeyword("$async");}_addDefaultMetaSchema(){let{$data:k,meta:U,schemaId:B}=this.opts,w=m;B==="id"&&(w={...m},w.id=w.$id,delete w.$id),U&&k&&this.addMetaSchema(w,w[B],false);}defaultMeta(){let{meta:k,schemaId:U}=this.opts;return this.opts.defaultMeta=typeof k=="object"?k[U]||k:void 0}validate(k,U){let B;if(typeof k=="string"){if(B=this.getSchema(k),!B)throw new Error(`no schema with key or ref "${k}"`)}else B=this.compile(k);let w=B(U);return "$async"in B||(this.errors=B.errors),w}compile(k,U){let B=this._addSchema(k,U);return B.validate||this._compileSchemaEnv(B)}compileAsync(k,U){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:B}=this.opts;return w.call(this,k,U);async function w(pe,Ee){await O.call(this,pe.$schema);let je=this._addSchema(pe,Ee);return je.validate||j.call(this,je)}async function O(pe){pe&&!this.getSchema(pe)&&await w.call(this,{$ref:pe},true);}async function j(pe){try{return this._compileSchemaEnv(pe)}catch(Ee){if(!(Ee instanceof r.default))throw Ee;return Y.call(this,Ee),await ce.call(this,Ee.missingSchema),j.call(this,pe)}}function Y({missingSchema:pe,missingRef:Ee}){if(this.refs[pe])throw new Error(`AnySchema ${pe} is loaded but ${Ee} cannot be resolved`)}async function ce(pe){let Ee=await Re.call(this,pe);this.refs[pe]||await O.call(this,Ee.$schema),this.refs[pe]||this.addSchema(Ee,pe,U);}async function Re(pe){let Ee=this._loading[pe];if(Ee)return Ee;try{return await(this._loading[pe]=B(pe))}finally{delete this._loading[pe];}}}addSchema(k,U,B,w=this.opts.validateSchema){if(Array.isArray(k)){for(let j of k)this.addSchema(j,void 0,B,w);return this}let O;if(typeof k=="object"){let{schemaId:j}=this.opts;if(O=k[j],O!==void 0&&typeof O!="string")throw new Error(`schema ${j} must be string`)}return U=(0, c.normalizeId)(U||O),this._checkUnique(U),this.schemas[U]=this._addSchema(k,B,U,w,true),this}addMetaSchema(k,U,B=this.opts.validateSchema){return this.addSchema(k,U,true,B),this}validateSchema(k,U){if(typeof k=="boolean")return true;let B;if(B=k.$schema,B!==void 0&&typeof B!="string")throw new Error("$schema must be a string");if(B=B||this.opts.defaultMeta||this.defaultMeta(),!B)return this.logger.warn("meta-schema not available"),this.errors=null,true;let w=this.validate(B,k);if(!w&&U){let O="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(O);else throw new Error(O)}return w}getSchema(k){let U;for(;typeof(U=T.call(this,k))=="string";)k=U;if(U===void 0){let{schemaId:B}=this.opts,w=new s.SchemaEnv({schema:{},schemaId:B});if(U=s.resolveSchema.call(this,w,k),!U)return;this.refs[k]=U;}return U.validate||this._compileSchemaEnv(U)}removeSchema(k){if(k instanceof RegExp)return this._removeAllSchemas(this.schemas,k),this._removeAllSchemas(this.refs,k),this;switch(typeof k){case "undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case "string":{let U=T.call(this,k);return typeof U=="object"&&this._cache.delete(U.schema),delete this.schemas[k],delete this.refs[k],this}case "object":{let U=k;this._cache.delete(U);let B=k[this.opts.schemaId];return B&&(B=(0, c.normalizeId)(B),delete this.schemas[B],delete this.refs[B]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(k){for(let U of k)this.addKeyword(U);return this}addKeyword(k,U){let B;if(typeof k=="string")B=k,typeof U=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),U.keyword=B);else if(typeof k=="object"&&U===void 0){if(U=k,B=U.keyword,Array.isArray(B)&&!B.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(K.call(this,B,U),!U)return (0, l.eachItem)(B,O=>ue.call(this,O)),this;xe.call(this,U);let w={...U,type:(0, u.getJSONTypes)(U.type),schemaType:(0, u.getJSONTypes)(U.schemaType)};return (0, l.eachItem)(B,w.type.length===0?O=>ue.call(this,O,w):O=>w.type.forEach(j=>ue.call(this,O,w,j))),this}getKeyword(k){let U=this.RULES.all[k];return typeof U=="object"?U.definition:!!U}removeKeyword(k){let{RULES:U}=this;delete U.keywords[k],delete U.all[k];for(let B of U.rules){let w=B.rules.findIndex(O=>O.keyword===k);w>=0&&B.rules.splice(w,1);}return this}addFormat(k,U){return typeof U=="string"&&(U=new RegExp(U)),this.formats[k]=U,this}errorsText(k=this.errors,{separator:U=", ",dataVar:B="data"}={}){return !k||k.length===0?"No errors":k.map(w=>`${B}${w.instancePath} ${w.message}`).reduce((w,O)=>w+U+O)}$dataMetaSchema(k,U){let B=this.RULES.all;k=JSON.parse(JSON.stringify(k));for(let w of U){let O=w.split("/").slice(1),j=k;for(let Y of O)j=j[Y];for(let Y in B){let ce=B[Y];if(typeof ce!="object")continue;let{$data:Re}=ce.definition,pe=j[Y];Re&&pe&&(j[Y]=be(pe));}}return k}_removeAllSchemas(k,U){for(let B in k){let w=k[B];(!U||U.test(B))&&(typeof w=="string"?delete k[B]:w&&!w.meta&&(this._cache.delete(w.schema),delete k[B]));}}_addSchema(k,U,B,w=this.opts.validateSchema,O=this.opts.addUsedSchema){let j,{schemaId:Y}=this.opts;if(typeof k=="object")j=k[Y];else {if(this.opts.jtd)throw new Error("schema must be object");if(typeof k!="boolean")throw new Error("schema must be object or boolean")}let ce=this._cache.get(k);if(ce!==void 0)return ce;B=(0, c.normalizeId)(j||B);let Re=c.getSchemaRefs.call(this,k,B);return ce=new s.SchemaEnv({schema:k,schemaId:Y,meta:U,baseId:B,localRefs:Re}),this._cache.set(ce.schema,ce),O&&!B.startsWith("#")&&(B&&this._checkUnique(B),this.refs[B]=ce),w&&this.validateSchema(k,true),ce}_checkUnique(k){if(this.schemas[k]||this.refs[k])throw new Error(`schema with key or id "${k}" already exists`)}_compileSchemaEnv(k){if(k.meta?this._compileMetaSchema(k):s.compileSchema.call(this,k),!k.validate)throw new Error("ajv implementation error");return k.validate}_compileMetaSchema(k){let U=this.opts;this.opts=this._metaOpts;try{s.compileSchema.call(this,k);}finally{this.opts=U;}}};v.ValidationError=o.default,v.MissingRefError=r.default,e.default=v;function x(k,U,B,w="error"){for(let O in k){let j=O;j in U&&this.logger[w](`${B}: option ${O}. ${k[j]}`);}}function T(k){return k=(0, c.normalizeId)(k),this.schemas[k]||this.refs[k]}function R(){let k=this.opts.schemas;if(k)if(Array.isArray(k))this.addSchema(k);else for(let U in k)this.addSchema(k[U],U);}function $(){for(let k in this.opts.formats){let U=this.opts.formats[k];U&&this.addFormat(k,U);}}function E(k){if(Array.isArray(k)){this.addVocabulary(k);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let U in k){let B=k[U];B.keyword||(B.keyword=U),this.addKeyword(B);}}function A(){let k={...this.opts};for(let U of b)delete k[U];return k}let N={log(){},warn(){},error(){}};function F(k){if(k===false)return N;if(k===void 0)return console;if(k.log&&k.warn&&k.error)return k;throw new Error("logger must implement log, warn and error methods")}let V=/^[a-z_$][a-z0-9_$:-]*$/i;function K(k,U){let{RULES:B}=this;if((0, l.eachItem)(k,w=>{if(B.keywords[w])throw new Error(`Keyword ${w} is already defined`);if(!V.test(w))throw new Error(`Keyword ${w} has invalid name`)}),!!U&&U.$data&&!("code"in U||"validate"in U))throw new Error('$data keyword must have "code" or "validate" function')}function ue(k,U,B){var w;let O=U?.post;if(B&&O)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:j}=this,Y=O?j.post:j.rules.find(({type:Re})=>Re===B);if(Y||(Y={type:B,rules:[]},j.rules.push(Y)),j.keywords[k]=true,!U)return;let ce={keyword:k,definition:{...U,type:(0, u.getJSONTypes)(U.type),schemaType:(0, u.getJSONTypes)(U.schemaType)}};U.before?ke.call(this,Y,ce,U.before):Y.rules.push(ce),j.all[k]=ce,(w=U.implements)===null||w===void 0||w.forEach(Re=>this.addKeyword(Re));}function ke(k,U,B){let w=k.rules.findIndex(O=>O.keyword===B);w>=0?k.rules.splice(w,0,U):(k.rules.push(U),this.logger.warn(`rule ${B} is not defined`));}function xe(k){let{metaSchema:U}=k;U!==void 0&&(k.$data&&this.opts.$data&&(U=be(U)),k.validateSchema=this.compile(U,true));}let Ve={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function be(k){return {anyOf:[k,Ve]}}})),WE=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};e.default=t;})),N_=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.callRef=e.getValidate=void 0;let t=Wo(),n=Vt(),o=Se(),r=qt(),i=nd(),s=Ne(),a={keyword:"$ref",schemaType:"string",code(l){let{gen:m,schema:h,it:y}=l,{baseId:b,schemaEnv:p,validateName:S,opts:d,self:_}=y,{root:f}=p;if((h==="#"||h==="#/")&&b===f.baseId)return x();let v=i.resolveRef.call(_,f,b,h);if(v===void 0)throw new t.default(y.opts.uriResolver,b,h);if(v instanceof i.SchemaEnv)return T(v);return R(v);function x(){if(p===f)return u(l,S,p,p.$async);let $=m.scopeValue("root",{ref:f});return u(l,(0, o._)`${$}.validate`,f,f.$async)}function T($){u(l,c(l,$),$,$.$async);}function R($){let E=m.scopeValue("schema",d.code.source===true?{ref:$,code:(0, o.stringify)($)}:{ref:$}),A=m.name("valid"),N=l.subschema({schema:$,dataTypes:[],schemaPath:o.nil,topSchemaRef:E,errSchemaPath:h},A);l.mergeEvaluated(N),l.ok(A);}}};function c(l,m){let{gen:h}=l;return m.validate?h.scopeValue("validate",{ref:m.validate}):(0, o._)`${h.scopeValue("wrapper",{ref:m})}.validate`}e.getValidate=c;function u(l,m,h,y){let{gen:b,it:p}=l,{allErrors:S,schemaEnv:d,opts:_}=p,f=_.passContext?r.default.this:o.nil;y?v():x();function v(){if(!d.$async)throw new Error("async schema referenced by sync schema");let $=b.let("valid");b.try(()=>{b.code((0, o._)`await ${(0, n.callValidateCode)(l,m,f)}`),R(m),S||b.assign($,true);},E=>{b.if((0, o._)`!(${E} instanceof ${p.ValidationError})`,()=>b.throw(E)),T(E),S||b.assign($,false);}),l.ok($);}function x(){l.result((0, n.callValidateCode)(l,m,f),()=>R(m),()=>T(m));}function T($){let E=(0, o._)`${$}.errors`;b.assign(r.default.vErrors,(0, o._)`${r.default.vErrors} === null ? ${E} : ${r.default.vErrors}.concat(${E})`),b.assign(r.default.errors,(0, o._)`${r.default.vErrors}.length`);}function R($){var E;if(!p.opts.unevaluated)return;let A=(E=h?.validate)===null||E===void 0?void 0:E.evaluated;if(p.props!==true)if(A&&!A.dynamicProps)A.props!==void 0&&(p.props=s.mergeEvaluated.props(b,A.props,p.props));else {let N=b.var("props",(0, o._)`${$}.evaluated.props`);p.props=s.mergeEvaluated.props(b,N,p.props,o.Name);}if(p.items!==true)if(A&&!A.dynamicItems)A.items!==void 0&&(p.items=s.mergeEvaluated.items(b,A.items,p.items));else {let N=b.var("items",(0, o._)`${$}.evaluated.items`);p.items=s.mergeEvaluated.items(b,N,p.items,o.Name);}}}e.callRef=u,e.default=a;})),mR=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=WE(),n=N_(),o=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,n.default];e.default=o;})),YE=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=t.operators,o={maximum:{okStr:"<=",ok:n.LTE,fail:n.GT},minimum:{okStr:">=",ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},r={keyword:Object.keys(o),type:"number",schemaType:"number",$data:true,error:{message:({keyword:i,schemaCode:s})=>(0, t.str)`must be ${o[i].okStr} ${s}`,params:({keyword:i,schemaCode:s})=>(0, t._)`{comparison: ${o[i].okStr}, limit: ${s}}`},code(i){let{keyword:s,data:a,schemaCode:c}=i;i.fail$data((0, t._)`${a} ${o[s].fail} ${c} || isNaN(${a})`);}};e.default=r;})),QE=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:true,error:{message:({schemaCode:o})=>(0, t.str)`must be multiple of ${o}`,params:({schemaCode:o})=>(0, t._)`{multipleOf: ${o}}`},code(o){let{gen:r,data:i,schemaCode:s,it:a}=o,c=a.opts.multipleOfPrecision,u=r.let("res"),l=c?(0, t._)`Math.abs(Math.round(${u}) - ${u}) > 1e-${c}`:(0, t._)`${u} !== parseInt(${u})`;o.fail$data((0, t._)`(${s} === 0 || (${u} = ${i}/${s}, ${l}))`);}};e.default=n;})),eI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});function t(n){let o=n.length,r=0,i=0,s;for(;i<o;)r++,s=n.charCodeAt(i++),s>=55296&&s<=56319&&i<o&&(s=n.charCodeAt(i),(s&64512)===56320&&i++);return r}e.default=t,t.code='require("ajv/dist/runtime/ucs2length").default';})),tI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=Ne(),o=eI(),r={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:true,error:{message({keyword:i,schemaCode:s}){let a=i==="maxLength"?"more":"fewer";return (0, t.str)`must NOT have ${a} than ${s} characters`},params:({schemaCode:i})=>(0, t._)`{limit: ${i}}`},code(i){let{keyword:s,data:a,schemaCode:c,it:u}=i,l=s==="maxLength"?t.operators.GT:t.operators.LT,m=u.opts.unicode===false?(0, t._)`${a}.length`:(0, t._)`${(0, n.useFunc)(i.gen,o.default)}(${a})`;i.fail$data((0, t._)`${m} ${l} ${c}`);}};e.default=r;})),rI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Vt(),n=Ne(),o=Se(),r={keyword:"pattern",type:"string",schemaType:"string",$data:true,error:{message:({schemaCode:i})=>(0, o.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0, o._)`{pattern: ${i}}`},code(i){let{gen:s,data:a,$data:c,schema:u,schemaCode:l,it:m}=i,h=m.opts.unicodeRegExp?"u":"";if(c){let{regExp:y}=m.opts.code,b=y.code==="new RegExp"?(0, o._)`new RegExp`:(0, n.useFunc)(s,y),p=s.let("valid");s.try(()=>s.assign(p,(0, o._)`${b}(${l}, ${h}).test(${a})`),()=>s.assign(p,false)),i.fail$data((0, o._)`!${p}`);}else {let y=(0, t.usePattern)(i,u);i.fail$data((0, o._)`!${y}.test(${a})`);}}};e.default=r;})),nI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:true,error:{message({keyword:o,schemaCode:r}){let i=o==="maxProperties"?"more":"fewer";return (0, t.str)`must NOT have ${i} than ${r} properties`},params:({schemaCode:o})=>(0, t._)`{limit: ${o}}`},code(o){let{keyword:r,data:i,schemaCode:s}=o,a=r==="maxProperties"?t.operators.GT:t.operators.LT;o.fail$data((0, t._)`Object.keys(${i}).length ${a} ${s}`);}};e.default=n;})),oI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Vt(),n=Se(),o=Ne(),r={keyword:"required",type:"object",schemaType:"array",$data:true,error:{message:({params:{missingProperty:i}})=>(0, n.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0, n._)`{missingProperty: ${i}}`},code(i){let{gen:s,schema:a,schemaCode:c,data:u,$data:l,it:m}=i,{opts:h}=m;if(!l&&a.length===0)return;let y=a.length>=h.loopRequired;if(m.allErrors?b():p(),h.strictRequired){let _=i.parentSchema.properties,{definedProperties:f}=i.it;for(let v of a)if(_?.[v]===void 0&&!f.has(v)){let x=`required property "${v}" is not defined at "${m.schemaEnv.baseId+m.errSchemaPath}" (strictRequired)`;(0, o.checkStrictMode)(m,x,m.opts.strictRequired);}}function b(){if(y||l)i.block$data(n.nil,S);else for(let _ of a)(0, t.checkReportMissingProp)(i,_);}function p(){let _=s.let("missing");if(y||l){let f=s.let("valid",true);i.block$data(f,()=>d(_,f)),i.ok(f);}else s.if((0, t.checkMissingProp)(i,a,_)),(0, t.reportMissingProp)(i,_),s.else();}function S(){s.forOf("prop",c,_=>{i.setParams({missingProperty:_}),s.if((0, t.noPropertyInData)(s,u,_,h.ownProperties),()=>i.error());});}function d(_,f){i.setParams({missingProperty:_}),s.forOf(_,c,()=>{s.assign(f,(0, t.propertyInData)(s,u,_,h.ownProperties)),s.if((0, n.not)(f),()=>{i.error(),s.break();});},n.nil);}}};e.default=r;})),iI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:true,error:{message({keyword:o,schemaCode:r}){let i=o==="maxItems"?"more":"fewer";return (0, t.str)`must NOT have ${i} than ${r} items`},params:({schemaCode:o})=>(0, t._)`{limit: ${o}}`},code(o){let{keyword:r,data:i,schemaCode:s}=o,a=r==="maxItems"?t.operators.GT:t.operators.LT;o.fail$data((0, t._)`${i}.length ${a} ${s}`);}};e.default=n;})),P_=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=lR();t.code='require("ajv/dist/runtime/equal").default',e.default=t;})),sI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=ed(),n=Se(),o=Ne(),r=P_(),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:true,error:{message:({params:{i:s,j:a}})=>(0, n.str)`must NOT have duplicate items (items ## ${a} and ${s} are identical)`,params:({params:{i:s,j:a}})=>(0, n._)`{i: ${s}, j: ${a}}`},code(s){let{gen:a,data:c,$data:u,schema:l,parentSchema:m,schemaCode:h,it:y}=s;if(!u&&!l)return;let b=a.let("valid"),p=m.items?(0, t.getSchemaTypes)(m.items):[];s.block$data(b,S,(0, n._)`${h} === false`),s.ok(b);function S(){let v=a.let("i",(0, n._)`${c}.length`),x=a.let("j");s.setParams({i:v,j:x}),a.assign(b,true),a.if((0, n._)`${v} > 1`,()=>(d()?_:f)(v,x));}function d(){return p.length>0&&!p.some(v=>v==="object"||v==="array")}function _(v,x){let T=a.name("item"),R=(0, t.checkDataTypes)(p,T,y.opts.strictNumbers,t.DataType.Wrong),$=a.const("indices",(0, n._)`{}`);a.for((0, n._)`;${v}--;`,()=>{a.let(T,(0, n._)`${c}[${v}]`),a.if(R,(0, n._)`continue`),p.length>1&&a.if((0, n._)`typeof ${T} == "string"`,(0, n._)`${T} += "_"`),a.if((0, n._)`typeof ${$}[${T}] == "number"`,()=>{a.assign(x,(0, n._)`${$}[${T}]`),s.error(),a.assign(b,false).break();}).code((0, n._)`${$}[${T}] = ${v}`);});}function f(v,x){let T=(0, o.useFunc)(a,r.default),R=a.name("outer");a.label(R).for((0, n._)`;${v}--;`,()=>a.for((0, n._)`${x} = ${v}; ${x}--;`,()=>a.if((0, n._)`${T}(${c}[${v}], ${c}[${x}])`,()=>{s.error(),a.assign(b,false).break(R);})));}}};e.default=i;})),aI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=Ne(),o=P_(),r={keyword:"const",$data:true,error:{message:"must be equal to constant",params:({schemaCode:i})=>(0, t._)`{allowedValue: ${i}}`},code(i){let{gen:s,data:a,$data:c,schemaCode:u,schema:l}=i;c||l&&typeof l=="object"?i.fail$data((0, t._)`!${(0, n.useFunc)(s,o.default)}(${a}, ${u})`):i.fail((0, t._)`${l} !== ${a}`);}};e.default=r;})),cI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=Ne(),o=P_(),r={keyword:"enum",schemaType:"array",$data:true,error:{message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0, t._)`{allowedValues: ${i}}`},code(i){let{gen:s,data:a,$data:c,schema:u,schemaCode:l,it:m}=i;if(!c&&u.length===0)throw new Error("enum must have non-empty array");let h=u.length>=m.opts.loopEnum,y,b=()=>y??(y=(0, n.useFunc)(s,o.default)),p;if(h||c)p=s.let("valid"),i.block$data(p,S);else {if(!Array.isArray(u))throw new Error("ajv implementation error");let _=s.const("vSchema",l);p=(0, t.or)(...u.map((f,v)=>d(_,v)));}i.pass(p);function S(){s.assign(p,false),s.forOf("v",l,_=>s.if((0, t._)`${b()}(${a}, ${_})`,()=>s.assign(p,true).break()));}function d(_,f){let v=u[f];return typeof v=="object"&&v!==null?(0, t._)`${b()}(${a}, ${_}[${f}])`:(0, t._)`${a} === ${v}`}}};e.default=r;})),pR=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=YE(),n=QE(),o=tI(),r=rI(),i=nI(),s=oI(),a=iI(),c=sI(),u=aI(),l=cI(),m=[t.default,n.default,o.default,r.default,i.default,s.default,a.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,l.default];e.default=m;})),fR=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.validateAdditionalItems=void 0;let t=Se(),n=Ne(),o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:i}})=>(0, t.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0, t._)`{limit: ${i}}`},code(i){let{parentSchema:s,it:a}=i,{items:c}=s;if(!Array.isArray(c)){(0, n.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}r(i,c);}};function r(i,s){let{gen:a,schema:c,data:u,keyword:l,it:m}=i;m.items=true;let h=a.const("len",(0, t._)`${u}.length`);if(c===false)i.setParams({len:s.length}),i.pass((0, t._)`${h} <= ${s.length}`);else if(typeof c=="object"&&!(0, n.alwaysValidSchema)(m,c)){let b=a.var("valid",(0, t._)`${h} <= ${s.length}`);a.if((0, t.not)(b),()=>y(b)),i.ok(b);}function y(b){a.forRange("i",s.length,h,p=>{i.subschema({keyword:l,dataProp:p,dataPropType:n.Type.Num},b),m.allErrors||a.if((0, t.not)(b),()=>a.break());});}}e.validateAdditionalItems=r,e.default=o;})),hR=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.validateTuple=void 0;let t=Se(),n=Ne(),o=Vt(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){let{schema:a,it:c}=s;if(Array.isArray(a))return i(s,"additionalItems",a);c.items=true,!(0, n.alwaysValidSchema)(c,a)&&s.ok((0, o.validateArray)(s));}};function i(s,a,c=s.schema){let{gen:u,parentSchema:l,data:m,keyword:h,it:y}=s;S(l),y.opts.unevaluated&&c.length&&y.items!==true&&(y.items=n.mergeEvaluated.items(u,c.length,y.items));let b=u.name("valid"),p=u.const("len",(0, t._)`${m}.length`);c.forEach((d,_)=>{(0, n.alwaysValidSchema)(y,d)||(u.if((0, t._)`${p} > ${_}`,()=>s.subschema({keyword:h,schemaProp:_,dataProp:_},b)),s.ok(b));});function S(d){let{opts:_,errSchemaPath:f}=y,v=c.length,x=v===d.minItems&&(v===d.maxItems||d[a]===false);if(_.strictTuples&&!x){let T=`"${h}" is ${v}-tuple, but minItems or maxItems/${a} are not specified or different at path "${f}"`;(0, n.checkStrictMode)(y,T,_.strictTuples);}}}e.validateTuple=i,e.default=r;})),uI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=hR(),n={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:o=>(0, t.validateTuple)(o,"items")};e.default=n;})),lI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=Ne(),o=Vt(),r=fR(),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0, t.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0, t._)`{limit: ${s}}`},code(s){let{schema:a,parentSchema:c,it:u}=s,{prefixItems:l}=c;u.items=true,!(0, n.alwaysValidSchema)(u,a)&&(l?(0, r.validateAdditionalItems)(s,l):s.ok((0, o.validateArray)(s)));}};e.default=i;})),dI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=Ne(),o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:true,error:{message:({params:{min:r,max:i}})=>i===void 0?(0, t.str)`must contain at least ${r} valid item(s)`:(0, t.str)`must contain at least ${r} and no more than ${i} valid item(s)`,params:({params:{min:r,max:i}})=>i===void 0?(0, t._)`{minContains: ${r}}`:(0, t._)`{minContains: ${r}, maxContains: ${i}}`},code(r){let{gen:i,schema:s,parentSchema:a,data:c,it:u}=r,l,m,{minContains:h,maxContains:y}=a;u.opts.next?(l=h===void 0?1:h,m=y):l=1;let b=i.const("len",(0, t._)`${c}.length`);if(r.setParams({min:l,max:m}),m===void 0&&l===0){(0, n.checkStrictMode)(u,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(m!==void 0&&l>m){(0, n.checkStrictMode)(u,'"minContains" > "maxContains" is always invalid'),r.fail();return}if((0, n.alwaysValidSchema)(u,s)){let f=(0, t._)`${b} >= ${l}`;m!==void 0&&(f=(0, t._)`${f} && ${b} <= ${m}`),r.pass(f);return}u.items=true;let p=i.name("valid");m===void 0&&l===1?d(p,()=>i.if(p,()=>i.break())):l===0?(i.let(p,true),m!==void 0&&i.if((0, t._)`${c}.length > 0`,S)):(i.let(p,false),S()),r.result(p,()=>r.reset());function S(){let f=i.name("_valid"),v=i.let("count",0);d(f,()=>i.if(f,()=>_(v)));}function d(f,v){i.forRange("i",0,b,x=>{r.subschema({keyword:"contains",dataProp:x,dataPropType:n.Type.Num,compositeRule:true},f),v();});}function _(f){i.code((0, t._)`${f}++`),m===void 0?i.if((0, t._)`${f} >= ${l}`,()=>i.assign(p,true).break()):(i.if((0, t._)`${f} > ${m}`,()=>i.assign(p,false).break()),l===1?i.assign(p,true):i.if((0, t._)`${f} >= ${l}`,()=>i.assign(p,true)));}}};e.default=o;})),A_=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;let t=Se(),n=Ne(),o=Vt();e.error={message:({params:{property:c,depsCount:u,deps:l}})=>{let m=u===1?"property":"properties";return (0, t.str)`must have ${m} ${l} when property ${c} is present`},params:({params:{property:c,depsCount:u,deps:l,missingProperty:m}})=>(0, t._)`{property: ${c},
73
73
  missingProperty: ${m},
74
74
  depsCount: ${u},
75
- deps: ${l}}`};let r={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){let[u,l]=i(c);s(c,u),a(c,l);}};function i({schema:c}){let u={},l={};for(let m in c){if(m==="__proto__")continue;let h=Array.isArray(c[m])?u:l;h[m]=c[m];}return [u,l]}function s(c,u=c.schema){let{gen:l,data:m,it:h}=c;if(Object.keys(u).length===0)return;let y=l.let("missing");for(let b in u){let p=u[b];if(p.length===0)continue;let S=(0, o.propertyInData)(l,m,b,h.opts.ownProperties);c.setParams({property:b,depsCount:p.length,deps:p.join(", ")}),h.allErrors?l.if(S,()=>{for(let d of p)(0, o.checkReportMissingProp)(c,d);}):(l.if((0, t._)`${S} && (${(0, o.checkMissingProp)(c,p,y)})`),(0, o.reportMissingProp)(c,y),l.else());}}e.validatePropertyDeps=s;function a(c,u=c.schema){let{gen:l,data:m,keyword:h,it:y}=c,b=l.name("valid");for(let p in u)(0, n.alwaysValidSchema)(y,u[p])||(l.if((0, o.propertyInData)(l,m,p,y.opts.ownProperties),()=>{let S=c.subschema({keyword:h,schemaProp:p},b);c.mergeValidEvaluated(S,b);},()=>l.var(b,true)),c.ok(b));}e.validateSchemaDeps=a,e.default=r;})),dI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=Ne(),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:r})=>(0, t._)`{propertyName: ${r.propertyName}}`},code(r){let{gen:i,schema:s,data:a,it:c}=r;if((0, n.alwaysValidSchema)(c,s))return;let u=i.name("valid");i.forIn("key",a,l=>{r.setParams({propertyName:l}),r.subschema({keyword:"propertyNames",data:l,dataTypes:["string"],propertyName:l,compositeRule:true},u),i.if((0, t.not)(u),()=>{r.error(true),c.allErrors||i.break();});}),r.ok(u);}};e.default=o;})),_R=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Vt(),n=Se(),o=qt(),r=Ne(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:true,trackErrors:true,error:{message:"must NOT have additional properties",params:({params:s})=>(0, n._)`{additionalProperty: ${s.additionalProperty}}`},code(s){let{gen:a,schema:c,parentSchema:u,data:l,errsCount:m,it:h}=s;if(!m)throw new Error("ajv implementation error");let{allErrors:y,opts:b}=h;if(h.props=true,b.removeAdditional!=="all"&&(0, r.alwaysValidSchema)(h,c))return;let p=(0, t.allSchemaProperties)(u.properties),S=(0, t.allSchemaProperties)(u.patternProperties);d(),s.ok((0, n._)`${m} === ${o.default.errors}`);function d(){a.forIn("key",l,T=>{!p.length&&!S.length?v(T):a.if(_(T),()=>v(T));});}function _(T){let R;if(p.length>8){let $=(0, r.schemaRefOrVal)(h,u.properties,"properties");R=(0, t.isOwnProperty)(a,$,T);}else p.length?R=(0, n.or)(...p.map($=>(0, n._)`${T} === ${$}`)):R=n.nil;return S.length&&(R=(0, n.or)(R,...S.map($=>(0, n._)`${(0, t.usePattern)(s,$)}.test(${T})`))),(0, n.not)(R)}function f(T){a.code((0, n._)`delete ${l}[${T}]`);}function v(T){if(b.removeAdditional==="all"||b.removeAdditional&&c===false){f(T);return}if(c===false){s.setParams({additionalProperty:T}),s.error(),y||a.break();return}if(typeof c=="object"&&!(0, r.alwaysValidSchema)(h,c)){let R=a.name("valid");b.removeAdditional==="failing"?(x(T,R,false),a.if((0, n.not)(R),()=>{s.reset(),f(T);})):(x(T,R),y||a.if((0, n.not)(R),()=>a.break()));}}function x(T,R,$){let E={keyword:"additionalProperties",dataProp:T,dataPropType:r.Type.Str};$===false&&Object.assign(E,{compositeRule:true,createErrors:false,allErrors:false}),s.subschema(E,R);}}};e.default=i;})),mI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Xo(),n=Vt(),o=Ne(),r=_R(),i={keyword:"properties",type:"object",schemaType:"object",code(s){let{gen:a,schema:c,parentSchema:u,data:l,it:m}=s;m.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&r.default.code(new t.KeywordCxt(m,r.default,"additionalProperties"));let h=(0, n.allSchemaProperties)(c);for(let d of h)m.definedProperties.add(d);m.opts.unevaluated&&h.length&&m.props!==true&&(m.props=o.mergeEvaluated.props(a,(0, o.toHash)(h),m.props));let y=h.filter(d=>!(0, o.alwaysValidSchema)(m,c[d]));if(y.length===0)return;let b=a.name("valid");for(let d of y)p(d)?S(d):(a.if((0, n.propertyInData)(a,l,d,m.opts.ownProperties)),S(d),m.allErrors||a.else().var(b,true),a.endIf()),s.it.definedProperties.add(d),s.ok(b);function p(d){return m.opts.useDefaults&&!m.compositeRule&&c[d].default!==void 0}function S(d){s.subschema({keyword:"properties",schemaProp:d,dataProp:d},b);}}};e.default=i;})),pI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Vt(),n=Se(),o=Ne(),r=Ne(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(s){let{gen:a,schema:c,data:u,parentSchema:l,it:m}=s,{opts:h}=m,y=(0, t.allSchemaProperties)(c),b=y.filter(x=>(0, o.alwaysValidSchema)(m,c[x]));if(y.length===0||b.length===y.length&&(!m.opts.unevaluated||m.props===true))return;let p=h.strictSchema&&!h.allowMatchingProperties&&l.properties,S=a.name("valid");m.props!==true&&!(m.props instanceof n.Name)&&(m.props=(0, r.evaluatedPropsToName)(a,m.props));let{props:d}=m;_();function _(){for(let x of y)p&&f(x),m.allErrors?v(x):(a.var(S,true),v(x),a.if(S));}function f(x){for(let T in p)new RegExp(x).test(T)&&(0, o.checkStrictMode)(m,`property ${T} matches pattern ${x} (use allowMatchingProperties)`);}function v(x){a.forIn("key",u,T=>{a.if((0, n._)`${(0, t.usePattern)(s,x)}.test(${T})`,()=>{let R=b.includes(x);R||s.subschema({keyword:"patternProperties",schemaProp:x,dataProp:T,dataPropType:r.Type.Str},S),m.opts.unevaluated&&d!==true?a.assign((0, n._)`${d}[${T}]`,true):!R&&!m.allErrors&&a.if((0, n.not)(S),()=>a.break());});});}}};e.default=i;})),fI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Ne(),n={keyword:"not",schemaType:["object","boolean"],trackErrors:true,code(o){let{gen:r,schema:i,it:s}=o;if((0, t.alwaysValidSchema)(s,i)){o.fail();return}let a=r.name("valid");o.subschema({keyword:"not",compositeRule:true,createErrors:false,allErrors:false},a),o.failResult(a,()=>o.reset(),()=>o.error());},error:{message:"must NOT be valid"}};e.default=n;})),hI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t={keyword:"anyOf",schemaType:"array",trackErrors:true,code:Vt().validateUnion,error:{message:"must match a schema in anyOf"}};e.default=t;})),gI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=Ne(),o={keyword:"oneOf",schemaType:"array",trackErrors:true,error:{message:"must match exactly one schema in oneOf",params:({params:r})=>(0, t._)`{passingSchemas: ${r.passing}}`},code(r){let{gen:i,schema:s,parentSchema:a,it:c}=r;if(!Array.isArray(s))throw new Error("ajv implementation error");if(c.opts.discriminator&&a.discriminator)return;let u=s,l=i.let("valid",false),m=i.let("passing",null),h=i.name("_valid");r.setParams({passing:m}),i.block(y),r.result(l,()=>r.reset(),()=>r.error(true));function y(){u.forEach((b,p)=>{let S;(0, n.alwaysValidSchema)(c,b)?i.var(h,true):S=r.subschema({keyword:"oneOf",schemaProp:p,compositeRule:true},h),p>0&&i.if((0, t._)`${h} && ${l}`).assign(l,false).assign(m,(0, t._)`[${m}, ${p}]`).else(),i.if(h,()=>{i.assign(l,true),i.assign(m,p),S&&r.mergeEvaluated(S,t.Name);});});}}};e.default=o;})),_I=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Ne(),n={keyword:"allOf",schemaType:"array",code(o){let{gen:r,schema:i,it:s}=o;if(!Array.isArray(i))throw new Error("ajv implementation error");let a=r.name("valid");i.forEach((c,u)=>{if((0, t.alwaysValidSchema)(s,c))return;let l=o.subschema({keyword:"allOf",schemaProp:u},a);o.ok(a),o.mergeEvaluated(l);});}};e.default=n;})),vI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=Ne(),o={keyword:"if",schemaType:["object","boolean"],trackErrors:true,error:{message:({params:i})=>(0, t.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0, t._)`{failingKeyword: ${i.ifClause}}`},code(i){let{gen:s,parentSchema:a,it:c}=i;a.then===void 0&&a.else===void 0&&(0, n.checkStrictMode)(c,'"if" without "then" and "else" is ignored');let u=r(c,"then"),l=r(c,"else");if(!u&&!l)return;let m=s.let("valid",true),h=s.name("_valid");if(y(),i.reset(),u&&l){let p=s.let("ifClause");i.setParams({ifClause:p}),s.if(h,b("then",p),b("else",p));}else u?s.if(h,b("then")):s.if((0, t.not)(h),b("else"));i.pass(m,()=>i.error(true));function y(){let p=i.subschema({keyword:"if",compositeRule:true,createErrors:false,allErrors:false},h);i.mergeEvaluated(p);}function b(p,S){return ()=>{let d=i.subschema({keyword:p},h);s.assign(m,h),i.mergeValidEvaluated(d,m),S?s.assign(S,(0, t._)`${p}`):i.setParams({ifClause:p});}}}};function r(i,s){let a=i.schema[s];return a!==void 0&&!(0, n.alwaysValidSchema)(i,a)}e.default=o;})),yI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Ne(),n={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:o,parentSchema:r,it:i}){r.if===void 0&&(0, t.checkStrictMode)(i,`"${o}" without "if" is ignored`);}};e.default=n;})),vR=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=hR(),n=cI(),o=gR(),r=uI(),i=lI(),s=C_(),a=dI(),c=_R(),u=mI(),l=pI(),m=fI(),h=hI(),y=gI(),b=_I(),p=vI(),S=yI();function d(_=false){let f=[m.default,h.default,y.default,b.default,p.default,S.default,a.default,c.default,s.default,u.default,l.default];return _?f.push(n.default,r.default):f.push(t.default,o.default),f.push(i.default),f}e.default=d;})),SI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n={keyword:"format",type:["number","string"],schemaType:"string",$data:true,error:{message:({schemaCode:o})=>(0, t.str)`must match format "${o}"`,params:({schemaCode:o})=>(0, t._)`{format: ${o}}`},code(o,r){let{gen:i,data:s,$data:a,schema:c,schemaCode:u,it:l}=o,{opts:m,errSchemaPath:h,schemaEnv:y,self:b}=l;if(!m.validateFormats)return;a?p():S();function p(){let d=i.scopeValue("formats",{ref:b.formats,code:m.code.formats}),_=i.const("fDef",(0, t._)`${d}[${u}]`),f=i.let("fType"),v=i.let("format");i.if((0, t._)`typeof ${_} == "object" && !(${_} instanceof RegExp)`,()=>i.assign(f,(0, t._)`${_}.type || "string"`).assign(v,(0, t._)`${_}.validate`),()=>i.assign(f,(0, t._)`"string"`).assign(v,_)),o.fail$data((0, t.or)(x(),T()));function x(){return m.strictSchema===false?t.nil:(0, t._)`${u} && !${v}`}function T(){let R=y.$async?(0, t._)`(${_}.async ? await ${v}(${s}) : ${v}(${s}))`:(0, t._)`${v}(${s})`,$=(0, t._)`(typeof ${v} == "function" ? ${R} : ${v}.test(${s}))`;return (0, t._)`${v} && ${v} !== true && ${f} === ${r} && !${$}`}}function S(){let d=b.formats[c];if(!d){x();return}if(d===true)return;let[_,f,v]=T(d);_===r&&o.pass(R());function x(){if(m.strictSchema===false){b.logger.warn($());return}throw new Error($());function $(){return `unknown format "${c}" ignored in schema at path "${h}"`}}function T($){let E=$ instanceof RegExp?(0, t.regexpCode)($):m.code.formats?(0, t._)`${m.code.formats}${(0, t.getProperty)(c)}`:void 0,A=i.scopeValue("formats",{key:c,ref:$,code:E});return typeof $=="object"&&!($ instanceof RegExp)?[$.type||"string",$.validate,(0, t._)`${A}.validate`]:["string",$,A]}function R(){if(typeof d=="object"&&!(d instanceof RegExp)&&d.async){if(!y.$async)throw new Error("async format in sync schema");return (0, t._)`await ${v}(${s})`}return typeof f=="function"?(0, t._)`${v}(${s})`:(0, t._)`${v}.test(${s})`}}}};e.default=n;})),yR=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=[SI().default];e.default=t;})),SR=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],e.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];})),bR=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=pR(),n=fR(),o=vR(),r=yR(),i=SR(),s=[t.default,n.default,(0, o.default)(),r.default,i.metadataVocabulary,i.contentVocabulary];e.default=s;})),bI=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.DiscrError=void 0;var t;(function(n){n.Tag="tag",n.Mapping="mapping";})(t||(e.DiscrError=t={}));})),M_=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=bI(),o=od(),r=Wo(),i=Ne(),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:a,tagName:c}})=>a===n.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:a,tag:c,tagName:u}})=>(0, t._)`{error: ${a}, tag: ${u}, tagValue: ${c}}`},code(a){let{gen:c,data:u,schema:l,parentSchema:m,it:h}=a,{oneOf:y}=m;if(!h.opts.discriminator)throw new Error("discriminator: requires discriminator option");let b=l.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(l.mapping)throw new Error("discriminator: mapping is not supported");if(!y)throw new Error("discriminator: requires oneOf keyword");let p=c.let("valid",false),S=c.const("tag",(0, t._)`${u}${(0, t.getProperty)(b)}`);c.if((0, t._)`typeof ${S} == "string"`,()=>d(),()=>a.error(false,{discrError:n.DiscrError.Tag,tag:S,tagName:b})),a.ok(p);function d(){let v=f();c.if(false);for(let x in v)c.elseIf((0, t._)`${S} === ${x}`),c.assign(p,_(v[x]));c.else(),a.error(false,{discrError:n.DiscrError.Mapping,tag:S,tagName:b}),c.endIf();}function _(v){let x=c.name("valid"),T=a.subschema({keyword:"oneOf",schemaProp:v},x);return a.mergeEvaluated(T,t.Name),x}function f(){var v;let x={},T=$(m),R=true;for(let N=0;N<y.length;N++){let F=y[N];if(F?.$ref&&!(0, i.schemaHasRulesButRef)(F,h.self.RULES)){let K=F.$ref;if(F=o.resolveRef.call(h.self,h.schemaEnv.root,h.baseId,K),F instanceof o.SchemaEnv&&(F=F.schema),F===void 0)throw new r.default(h.opts.uriResolver,h.baseId,K)}let V=(v=F?.properties)===null||v===void 0?void 0:v[b];if(typeof V!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);R=R&&(T||$(F)),E(V,N);}if(!R)throw new Error(`discriminator: "${b}" must be required`);return x;function $({required:N}){return Array.isArray(N)&&N.includes(b)}function E(N,F){if(N.const)A(N.const,F);else if(N.enum)for(let V of N.enum)A(V,F);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function A(N,F){if(typeof N!="string"||N in x)throw new Error(`discriminator: "${b}" values must be unique strings`);x[N]=F;}}}};e.default=s;})),RI=G(((e,t)=>{t.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:true,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:true,readOnly:{type:"boolean",default:false},examples:{type:"array",items:true},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:true},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:false},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:true,enum:{type:"array",items:true,minItems:1,uniqueItems:true},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:true}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:true};})),RR=G(((e,t)=>{Object.defineProperty(e,"__esModule",{value:true}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;let n=N_(),o=bR(),r=M_(),i=RI(),s=["/properties"],a="http://json-schema.org/draft-07/schema";var c=class extends n.default{_addVocabularies(){super._addVocabularies(),o.default.forEach(y=>this.addVocabulary(y)),this.opts.discriminator&&this.addKeyword(r.default);}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let y=this.opts.$data?this.$dataMetaSchema(i,s):i;this.addMetaSchema(y,a,false),this.refs["http://json-schema.org/schema"]=a;}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}};e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:true}),e.default=c;var u=Xo();Object.defineProperty(e,"KeywordCxt",{enumerable:true,get:function(){return u.KeywordCxt}});var l=Se();Object.defineProperty(e,"_",{enumerable:true,get:function(){return l._}}),Object.defineProperty(e,"str",{enumerable:true,get:function(){return l.str}}),Object.defineProperty(e,"stringify",{enumerable:true,get:function(){return l.stringify}}),Object.defineProperty(e,"nil",{enumerable:true,get:function(){return l.nil}}),Object.defineProperty(e,"Name",{enumerable:true,get:function(){return l.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:true,get:function(){return l.CodeGen}});var m=Ls();Object.defineProperty(e,"ValidationError",{enumerable:true,get:function(){return m.default}});var h=Wo();Object.defineProperty(e,"MissingRefError",{enumerable:true,get:function(){return h.default}});})),TR=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.dynamicAnchor=void 0;let t=Se(),n=qt(),o=od(),r=P_(),i={keyword:"$dynamicAnchor",schemaType:"string",code:c=>s(c,c.schema)};function s(c,u){let{gen:l,it:m}=c;m.schemaEnv.root.dynamicAnchors[u]=true;let h=(0, t._)`${n.default.dynamicAnchors}${(0, t.getProperty)(u)}`,y=m.errSchemaPath==="#"?m.validateName:a(c);l.if((0, t._)`!${h}`,()=>l.assign(h,y));}e.dynamicAnchor=s;function a(c){let{schemaEnv:u,schema:l,self:m}=c.it,{root:h,baseId:y,localRefs:b,meta:p}=u.root,{schemaId:S}=m.opts,d=new o.SchemaEnv({schema:l,schemaId:S,root:h,baseId:y,localRefs:b,meta:p});return o.compileSchema.call(m,d),(0, r.getValidate)(c,d)}e.default=i;})),$R=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.dynamicRef=void 0;let t=Se(),n=qt(),o=P_(),r={keyword:"$dynamicRef",schemaType:"string",code:s=>i(s,s.schema)};function i(s,a){let{gen:c,keyword:u,it:l}=s;if(a[0]!=="#")throw new Error(`"${u}" only supports hash fragment reference`);let m=a.slice(1);if(l.allErrors)h();else {let b=c.let("valid",false);h(b),s.ok(b);}function h(b){if(l.schemaEnv.root.dynamicAnchors[m]){let p=c.let("_v",(0, t._)`${n.default.dynamicAnchors}${(0, t.getProperty)(m)}`);c.if(p,y(p,b),y(l.validateName,b));}else y(l.validateName,b)();}function y(b,p){return p?()=>c.block(()=>{(0, o.callRef)(s,b),c.let(p,true);}):()=>(0, o.callRef)(s,b)}}e.dynamicRef=i,e.default=r;})),TI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=TR(),n=Ne(),o={keyword:"$recursiveAnchor",schemaType:"boolean",code(r){r.schema?(0, t.dynamicAnchor)(r,""):(0, n.checkStrictMode)(r.it,"$recursiveAnchor: false is ignored");}};e.default=o;})),$I=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=$R(),n={keyword:"$recursiveRef",schemaType:"string",code:o=>(0, t.dynamicRef)(o,o.schema)};e.default=n;})),xR=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=TR(),n=$R(),o=TI(),r=$I(),i=[t.default,n.default,o.default,r.default];e.default=i;})),xI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=C_(),n={keyword:"dependentRequired",type:"object",schemaType:"object",error:t.error,code:o=>(0, t.validatePropertyDeps)(o)};e.default=n;})),wI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=C_(),n={keyword:"dependentSchemas",type:"object",schemaType:"object",code:o=>(0, t.validateSchemaDeps)(o)};e.default=n;})),EI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Ne(),n={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:o,parentSchema:r,it:i}){r.contains===void 0&&(0, t.checkStrictMode)(i,`"${o}" without "contains" is ignored`);}};e.default=n;})),wR=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=xI(),n=wI(),o=EI(),r=[t.default,n.default,o.default];e.default=r;})),II=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=Ne(),o=qt(),r={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:true,error:{message:"must NOT have unevaluated properties",params:({params:i})=>(0, t._)`{unevaluatedProperty: ${i.unevaluatedProperty}}`},code(i){let{gen:s,schema:a,data:c,errsCount:u,it:l}=i;if(!u)throw new Error("ajv implementation error");let{allErrors:m,props:h}=l;h instanceof t.Name?s.if((0, t._)`${h} !== true`,()=>s.forIn("key",c,S=>s.if(b(h,S),()=>y(S)))):h!==true&&s.forIn("key",c,S=>h===void 0?y(S):s.if(p(h,S),()=>y(S))),l.props=true,i.ok((0, t._)`${u} === ${o.default.errors}`);function y(S){if(a===false){i.setParams({unevaluatedProperty:S}),i.error(),m||s.break();return}if(!(0, n.alwaysValidSchema)(l,a)){let d=s.name("valid");i.subschema({keyword:"unevaluatedProperties",dataProp:S,dataPropType:n.Type.Str},d),m||s.if((0, t.not)(d),()=>s.break());}}function b(S,d){return (0, t._)`!${S} || !${S}[${d}]`}function p(S,d){let _=[];for(let f in S)S[f]===true&&_.push((0, t._)`${d} !== ${f}`);return (0, t.and)(..._)}}};e.default=r;})),zI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=Ne(),o={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:r}})=>(0, t.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0, t._)`{limit: ${r}}`},code(r){let{gen:i,schema:s,data:a,it:c}=r,u=c.items||0;if(u===true)return;let l=i.const("len",(0, t._)`${a}.length`);if(s===false)r.setParams({len:u}),r.fail((0, t._)`${l} > ${u}`);else if(typeof s=="object"&&!(0, n.alwaysValidSchema)(c,s)){let h=i.var("valid",(0, t._)`${l} <= ${u}`);i.if((0, t.not)(h),()=>m(h,u)),r.ok(h);}c.items=true;function m(h,y){i.forRange("i",y,l,b=>{r.subschema({keyword:"unevaluatedItems",dataProp:b,dataPropType:n.Type.Num},h),c.allErrors||i.if((0, t.not)(h),()=>i.break());});}}};e.default=o;})),ER=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=II(),n=zI(),o=[t.default,n.default];e.default=o;})),OI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/schema",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":true,"https://json-schema.org/draft/2019-09/vocab/applicator":true,"https://json-schema.org/draft/2019-09/vocab/validation":true,"https://json-schema.org/draft/2019-09/vocab/meta-data":true,"https://json-schema.org/draft/2019-09/vocab/format":false,"https://json-schema.org/draft/2019-09/vocab/content":true},$recursiveAnchor:true,title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format"},{$ref:"meta/content"}],type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$recursiveRef:"#"},{$ref:"meta/validation#/$defs/stringArray"}]}}}};})),kI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/applicator":true},$recursiveAnchor:true,title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{additionalItems:{$recursiveRef:"#"},unevaluatedItems:{$recursiveRef:"#"},items:{anyOf:[{$recursiveRef:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$recursiveRef:"#"},additionalProperties:{$recursiveRef:"#"},unevaluatedProperties:{$recursiveRef:"#"},properties:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$recursiveRef:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$recursiveRef:"#"}},propertyNames:{$recursiveRef:"#"},if:{$recursiveRef:"#"},then:{$recursiveRef:"#"},else:{$recursiveRef:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$recursiveRef:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$recursiveRef:"#"}}}};})),NI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/content",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/content":true},$recursiveAnchor:true,title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$recursiveRef:"#"}}};})),PI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/core",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":true},$recursiveAnchor:true,title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveRef:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:false},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}}}};})),AI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/format",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/format":true},$recursiveAnchor:true,title:"Format vocabulary meta-schema",type:["object","boolean"],properties:{format:{type:"string"}}};})),CI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/meta-data":true},$recursiveAnchor:true,title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:true,deprecated:{type:"boolean",default:false},readOnly:{type:"boolean",default:false},writeOnly:{type:"boolean",default:false},examples:{type:"array",items:true}}};})),MI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/validation",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/validation":true},$recursiveAnchor:true,title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:false},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:true,enum:{type:"array",items:true},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:true}]}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:true,default:[]}}};})),jI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=OI(),n=kI(),o=NI(),r=PI(),i=AI(),s=CI(),a=MI(),c=["/properties"];function u(l){return [t,n,o,r,m(this,i),s,m(this,a)].forEach(h=>this.addMetaSchema(h,void 0,false)),this;function m(h,y){return l?h.$dataMetaSchema(y,c):y}}e.default=u;})),DI=G(((e,t)=>{Object.defineProperty(e,"__esModule",{value:true}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2019=void 0;let n=N_(),o=bR(),r=xR(),i=wR(),s=ER(),a=M_(),c=jI(),u="https://json-schema.org/draft/2019-09/schema";var l=class extends n.default{constructor(p={}){super({...p,dynamicRef:true,next:true,unevaluated:true});}_addVocabularies(){super._addVocabularies(),this.addVocabulary(r.default),o.default.forEach(p=>this.addVocabulary(p)),this.addVocabulary(i.default),this.addVocabulary(s.default),this.opts.discriminator&&this.addKeyword(a.default);}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:p,meta:S}=this.opts;S&&(c.default.call(this,p),this.refs["http://json-schema.org/schema"]=u);}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}};e.Ajv2019=l,t.exports=e=l,t.exports.Ajv2019=l,Object.defineProperty(e,"__esModule",{value:true}),e.default=l;var m=Xo();Object.defineProperty(e,"KeywordCxt",{enumerable:true,get:function(){return m.KeywordCxt}});var h=Se();Object.defineProperty(e,"_",{enumerable:true,get:function(){return h._}}),Object.defineProperty(e,"str",{enumerable:true,get:function(){return h.str}}),Object.defineProperty(e,"stringify",{enumerable:true,get:function(){return h.stringify}}),Object.defineProperty(e,"nil",{enumerable:true,get:function(){return h.nil}}),Object.defineProperty(e,"Name",{enumerable:true,get:function(){return h.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:true,get:function(){return h.CodeGen}});var y=Ls();Object.defineProperty(e,"ValidationError",{enumerable:true,get:function(){return y.default}});var b=Wo();Object.defineProperty(e,"MissingRefError",{enumerable:true,get:function(){return b.default}});})),UI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=pR(),n=fR(),o=vR(),r=xR(),i=wR(),s=ER(),a=yR(),c=SR(),u=[r.default,t.default,n.default,(0, o.default)(true),a.default,c.metadataVocabulary,c.contentVocabulary,i.default,s.default];e.default=u;})),LI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":true,"https://json-schema.org/draft/2020-12/vocab/applicator":true,"https://json-schema.org/draft/2020-12/vocab/unevaluated":true,"https://json-schema.org/draft/2020-12/vocab/validation":true,"https://json-schema.org/draft/2020-12/vocab/meta-data":true,"https://json-schema.org/draft/2020-12/vocab/format-annotation":true,"https://json-schema.org/draft/2020-12/vocab/content":true},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:true,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:true,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:true},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:true}}};})),FI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":true},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}};})),qI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":true},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}};})),VI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":true},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}};})),BI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":true},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}};})),KI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":true},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}};})),GI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":true},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:true,deprecated:{type:"boolean",default:false},readOnly:{type:"boolean",default:false},writeOnly:{type:"boolean",default:false},examples:{type:"array",items:true}}};})),HI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":true},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:true}]},const:true,enum:{type:"array",items:true},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:false},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:true,default:[]}}};})),ZI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=LI(),n=FI(),o=qI(),r=VI(),i=BI(),s=KI(),a=GI(),c=HI(),u=["/properties"];function l(m){return [t,n,o,r,i,h(this,s),a,h(this,c)].forEach(y=>this.addMetaSchema(y,void 0,false)),this;function h(y,b){return m?y.$dataMetaSchema(b,u):b}}e.default=l;})),JI=G(((e,t)=>{Object.defineProperty(e,"__esModule",{value:true}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;let n=N_(),o=UI(),r=M_(),i=ZI(),s="https://json-schema.org/draft/2020-12/schema";var a=class extends n.default{constructor(h={}){super({...h,dynamicRef:true,next:true,unevaluated:true});}_addVocabularies(){super._addVocabularies(),o.default.forEach(h=>this.addVocabulary(h)),this.opts.discriminator&&this.addKeyword(r.default);}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:h,meta:y}=this.opts;y&&(i.default.call(this,h),this.refs["http://json-schema.org/schema"]=s);}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv2020=a,t.exports=e=a,t.exports.Ajv2020=a,Object.defineProperty(e,"__esModule",{value:true}),e.default=a;var c=Xo();Object.defineProperty(e,"KeywordCxt",{enumerable:true,get:function(){return c.KeywordCxt}});var u=Se();Object.defineProperty(e,"_",{enumerable:true,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:true,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:true,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:true,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:true,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:true,get:function(){return u.CodeGen}});var l=Ls();Object.defineProperty(e,"ValidationError",{enumerable:true,get:function(){return l.default}});var m=Wo();Object.defineProperty(e,"MissingRefError",{enumerable:true,get:function(){return m.default}});})),XI=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(N,F){return {validate:N,compare:F}}e.fullFormats={date:t(i,s),time:t(c(true),u),"date-time":t(h(true),y),"iso-time":t(c(),l),"iso-date-time":t(h(),b),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:d,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:A,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:f,int32:{type:"number",validate:T},int64:{type:"number",validate:R},float:{type:"number",validate:$},double:{type:"number",validate:$},password:true,binary:true},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,s),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,u),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,y),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,l),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,b),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function n(N){return N%4===0&&(N%100!==0||N%400===0)}let o=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31];function i(N){let F=o.exec(N);if(!F)return false;let V=+F[1],K=+F[2],ue=+F[3];return K>=1&&K<=12&&ue>=1&&ue<=(K===2&&n(V)?29:r[K])}function s(N,F){if(N&&F)return N>F?1:N<F?-1:0}let a=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(N){return function(V){let K=a.exec(V);if(!K)return false;let ue=+K[1],ke=+K[2],xe=+K[3],Ve=K[4],be=K[5]==="-"?-1:1,k=+(K[6]||0),U=+(K[7]||0);if(k>23||U>59||N&&!Ve)return false;if(ue<=23&&ke<=59&&xe<60)return true;let B=ke-U*be,w=ue-k*be-(B<0?1:0);return (w===23||w===-1)&&(B===59||B===-1)&&xe<61}}function u(N,F){if(!(N&&F))return;let V=new Date("2020-01-01T"+N).valueOf(),K=new Date("2020-01-01T"+F).valueOf();if(V&&K)return V-K}function l(N,F){if(!(N&&F))return;let V=a.exec(N),K=a.exec(F);if(V&&K)return N=V[1]+V[2]+V[3],F=K[1]+K[2]+K[3],N>F?1:N<F?-1:0}let m=/t|\s/i;function h(N){let F=c(N);return function(K){let ue=K.split(m);return ue.length===2&&i(ue[0])&&F(ue[1])}}function y(N,F){if(!(N&&F))return;let V=new Date(N).valueOf(),K=new Date(F).valueOf();if(V&&K)return V-K}function b(N,F){if(!(N&&F))return;let[V,K]=N.split(m),[ue,ke]=F.split(m),xe=s(V,ue);if(xe!==void 0)return xe||u(K,ke)}let p=/\/|:/,S=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function d(N){return p.test(N)&&S.test(N)}let _=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function f(N){return _.lastIndex=0,_.test(N)}let v=-2147483648,x=2**31-1;function T(N){return Number.isInteger(N)&&N<=x&&N>=v}function R(N){return Number.isInteger(N)}function $(){return true}let E=/[^\\]\\Z/;function A(N){if(E.test(N))return false;try{return new RegExp(N),!0}catch{return false}}})),WI=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.formatLimitDefinition=void 0;let t=RR(),n=Se(),o=n.operators,r={formatMaximum:{okStr:"<=",ok:o.LTE,fail:o.GT},formatMinimum:{okStr:">=",ok:o.GTE,fail:o.LT},formatExclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},formatExclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},i={message:({keyword:a,schemaCode:c})=>(0, n.str)`should be ${r[a].okStr} ${c}`,params:({keyword:a,schemaCode:c})=>(0, n._)`{comparison: ${r[a].okStr}, limit: ${c}}`};e.formatLimitDefinition={keyword:Object.keys(r),type:"string",schemaType:"string",$data:true,error:i,code(a){let{gen:c,data:u,schemaCode:l,keyword:m,it:h}=a,{opts:y,self:b}=h;if(!y.validateFormats)return;let p=new t.KeywordCxt(h,b.RULES.all.format.definition,"format");p.$data?S():d();function S(){let f=c.scopeValue("formats",{ref:b.formats,code:y.code.formats}),v=c.const("fmt",(0, n._)`${f}[${p.schemaCode}]`);a.fail$data((0, n.or)((0, n._)`typeof ${v} != "object"`,(0, n._)`${v} instanceof RegExp`,(0, n._)`typeof ${v}.compare != "function"`,_(v)));}function d(){let f=p.schema,v=b.formats[f];if(!v||v===true)return;if(typeof v!="object"||v instanceof RegExp||typeof v.compare!="function")throw new Error(`"${m}": format "${f}" does not define "compare" function`);let x=c.scopeValue("formats",{key:f,ref:v,code:y.code.formats?(0, n._)`${y.code.formats}${(0, n.getProperty)(f)}`:void 0});a.fail$data(_(x));}function _(f){return (0, n._)`${f}.compare(${u}, ${l}) ${r[m].fail} 0`}},dependencies:["format"]};let s=a=>(a.addKeyword(e.formatLimitDefinition),a);e.default=s;})),YI=G(((e,t)=>{Object.defineProperty(e,"__esModule",{value:true});let n=XI(),o=WI(),r=Se(),i=new r.Name("fullFormats"),s=new r.Name("fastFormats"),a=(u,l={keywords:true})=>{if(Array.isArray(l))return c(u,l,n.fullFormats,i),u;let[m,h]=l.mode==="fast"?[n.fastFormats,s]:[n.fullFormats,i];return c(u,l.formats||n.formatNames,m,h),l.keywords&&(0, o.default)(u),u};a.get=(u,l="full")=>{let m=(l==="fast"?n.fastFormats:n.fullFormats)[u];if(!m)throw new Error(`Unknown format "${u}"`);return m};function c(u,l,m,h){var y,b;(y=(b=u.opts.code).formats)!==null&&y!==void 0||(b.formats=(0, r._)`require("ajv-formats/dist/formats").${h}`);for(let p of l)u.addFormat(p,m[p]);}t.exports=e=a,Object.defineProperty(e,"__esModule",{value:true}),e.default=a;})),IR=RR(),QI=DI(),ez=JI(),tz=da(YI()),rz=tz.default;function k_(e){let t=new e({strict:false,validateFormats:true,validateSchema:false,allErrors:true});return rz(t),t}var id=class{_ajv;_ajvDraft7;_ajv2019;_userAjv;constructor(e){this._userAjv=e!==void 0,this._ajv=e;}get ajv(){return this._ajv??=k_(ez.Ajv2020)}_engineFor(e){if(this._userAjv)return this.ajv;let t=_v(e,"pass a pre-configured Ajv instance to AjvJsonSchemaValidator(ajv) to validate other dialects.");return t==="2020-12"?this.ajv:t==="2019-09"?this._ajv2019??=k_(QI.Ajv2019):this._ajvDraft7??=k_(IR.Ajv)}getValidator(e){let t=this._engineFor(e),n="$id"in e&&typeof e.$id=="string"?t.getSchema(e.$id)??t.compile(e):t.compile(e);return o=>n(o)?{valid:true,data:o,errorMessage:void 0}:{valid:false,data:void 0,errorMessage:t.errorsText(n.errors)}}};IR.Ajv;var jR=Symbol.for("mcp.completable");function U_(e){return !!e&&typeof e=="object"&&jR in e}function oz(e){return e[jR]?.complete}function iz(e,t){switch(t.kind){case "tools_list_changed":return e.toolsListChanged===true;case "prompts_list_changed":return e.promptsListChanged===true;case "resources_list_changed":return e.resourcesListChanged===true;case "resource_updated":return e.resourceSubscriptions!==void 0&&e.resourceSubscriptions.includes(t.uri)}}function sz(e,t){let n={},o=r=>t===void 0||r===true;return e.toolsListChanged===true&&o(t?.tools?.listChanged)&&(n.toolsListChanged=true),e.promptsListChanged===true&&o(t?.prompts?.listChanged)&&(n.promptsListChanged=true),e.resourcesListChanged===true&&o(t?.resources?.listChanged)&&(n.resourcesListChanged=true),e.resourceSubscriptions!==void 0&&e.resourceSubscriptions.length>0&&o(t?.resources?.subscribe)&&(n.resourceSubscriptions=[...e.resourceSubscriptions]),n}var sd=1024;function zR(e,t){return {method:e.method,params:{...e.params,_meta:{...e.params?._meta,[Cn]:t}}}}function az(e){let t=Vr(Ds).validateRequest("subscriptions/listen",e);return t.ok?t.value.params?.notifications:void 0}var cz=new Set(["notifications/tools/list_changed","notifications/prompts/list_changed","notifications/resources/list_changed","notifications/resources/updated"]),DR=class{_subs=new Map;_serverCapabilities;_serverInfo;constructor(e=sd,t,n){this._maxSubscriptions=e,this._serverCapabilities=t,this._serverInfo=n;}setServerCapabilities(e,t){this._serverCapabilities=e,t!==void 0&&(this._serverInfo=t);}has(e){return this._subs.has(e)}serve(e){if(this._serverCapabilities===void 0)throw new Error("StdioListenRouter.serve() called before setServerCapabilities(); refusing to honor a filter without capabilities");if(this._subs.size>=this._maxSubscriptions)return {jsonrpc:"2.0",id:e.id,error:{code:-32603,message:"Subscription limit reached"}};let t=az(e);if(t===void 0)return {jsonrpc:"2.0",id:e.id,error:{code:-32602,message:"Invalid params: 'notifications' is required and must be a valid SubscriptionFilter"}};let n=sz(t,this._serverCapabilities);return this._subs.set(e.id,n),zR({method:"notifications/subscriptions/acknowledged",params:{notifications:n}},e.id)}cancel(e){return this._subs.delete(e)}routeOutbound(e){if(!cz.has(e.method))return "passthrough";let t=e.params?.uri,n=typeof t=="string"?t:void 0,o=uz(e.method,n),r=[];for(let[i,s]of this._subs)iz(s,o)&&r.push(zR({method:e.method,params:e.params??{}},i));return r}teardownAll(){let e=[];for(let t of this._subs.keys())e.push({jsonrpc:"2.0",id:t,result:{resultType:"complete",_meta:{[Cn]:t,...this._serverInfo!==void 0&&{[Yt]:this._serverInfo}}}});return this._subs.clear(),e}};function uz(e,t){switch(e){case "notifications/tools/list_changed":return {kind:"tools_list_changed"};case "notifications/prompts/list_changed":return {kind:"prompts_list_changed"};case "notifications/resources/list_changed":return {kind:"resources_list_changed"};default:return {kind:"resource_updated",uri:t??""}}}var lz=8,dz=6e5;function mz(e){if(e?.maxRounds!==void 0&&(!Number.isInteger(e.maxRounds)||e.maxRounds<1))throw new RangeError(`inputRequired.maxRounds must be a positive integer (got ${e.maxRounds})`);if(e?.roundTimeoutMs!==void 0&&(!Number.isFinite(e.roundTimeoutMs)||e.roundTimeoutMs<=0))throw new RangeError(`inputRequired.roundTimeoutMs must be a positive number (got ${e.roundTimeoutMs})`);return {maxRounds:e?.maxRounds??lz,roundTimeoutMs:e?.roundTimeoutMs??dz,legacyShim:e?.legacyShim??true}}function UR(e,t,n){if(n===null||typeof n!="object"||typeof n.method!="string")throw new de(Q.InternalError,`Handler for ${e} returned an invalid input request '${t}': each inputRequests entry must be an embedded elicitation/create, sampling/createMessage, or roots/list request`);let o=n,r=Ob(o);if(r===void 0)throw new de(Q.InternalError,`Handler for ${e} returned an input request '${t}' of kind '${o.method}', which is not an embedded request the 2026-07-28 revision defines`);return {embedded:o,required:r}}function pz(){let e=globalThis.crypto;if(e?.randomUUID!==void 0)return e.randomUUID();let t=new Uint8Array(16);e.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=[...t].map(o=>o.toString(16).padStart(2,"0")).join("");return `${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}function D_(e,t){if(e==="tools/call")return {content:[{type:"text",text:t}],isError:true};throw new de(Q.InternalError,t)}var fz=class{constructor(e){this._host=e;}async fulfill(e,t,n,o,r){let{maxRounds:i,roundTimeoutMs:s}=this._host,a=o.mcpReq.signal,c=r,u=0;for(;;){if(u+=1,u>i)return D_(e,Yb(e,i));let l=c.inputRequests,m=l!=null&&Object.keys(l).length>0,h=typeof c.requestState=="string"?c.requestState:void 0;if(!m&&h===void 0)throw new de(Q.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);let y;if(m){let S=this._host.resolvedClientCapabilities(o),d=[];for(let[f,v]of Object.entries(l)){let{embedded:x,required:T}=UR(e,f,v);if(x.method!=="roots/list"&&x.params===void 0)throw new de(Q.InternalError,`Handler for ${e} returned an input request '${f}' of kind '${x.method}' without params`);if(Vl(T,S)!==void 0)return D_(e,`Cannot request input '${f}' (${x.method}): the client on this 2025-era connection did not declare the required capability${S===void 0?" (no client capabilities are available on this connection \u2014 per-request legacy serving cannot receive server-to-client requests)":""}`);d.push([f,x]);}let _=eR(a);try{let f={relatedRequestId:o.mcpReq.id,timeout:s,resetTimeoutOnProgress:!0,onprogress:()=>{},signal:_.signal},v=await Promise.all(d.map(async([x,T])=>{try{return [x,await this._dispatchLeg(T,f)]}catch(R){throw _.abort(R),R}}));y=Object.fromEntries(v);}catch(f){if(a.aborted)throw f;return D_(e,`Fulfilling input required by '${e}' failed: ${f instanceof Error?f.message:String(f)}`)}finally{_.dispose();}}else await Qb(Wb,a);let b={...o,mcpReq:{...o.mcpReq,inputResponses:y,droppedInputResponseKeys:void 0,requestState:Us(h)}};if(h!==void 0){let S=await this._host.verifyRequestState(h,b,e);S!==void 0&&(b=$_(b,S));}let p=await t(n,b);if(!pr(p))return p;c=p;}}async _dispatchLeg(e,t){switch(e.method){case "elicitation/create":{let n=e.params;return n.mode==="url"&&n.elicitationId===void 0&&(n={...n,elicitationId:pz()}),await this._host.sendElicitation(n,t)}case "sampling/createMessage":return await this._host.sendSampling(e.params,t);case "roots/list":return await this._host.listRoots(e.params,t)}}},hz=new Set(["tools/call","prompts/get","resources/read"]),LR,FR;function L_(e,t){LR(e,t);}function F_(e){return FR(e)}var qR=class extends w_{_clientCapabilities;_clientVersion;static{LR=(e,t)=>{let n=t.filter(o=>!e._supportedProtocolVersions.includes(o));n.length>0&&(e._supportedProtocolVersions=[...e._supportedProtocolVersions,...n]),e.setRequestHandler("server/discover",()=>e._ondiscover());},FR=e=>e._serverInfo;}_capabilities;_instructions;_jsonSchemaValidator;_cacheHints;_requestStateVerify;_inputRequiredServing;_legacyShim;_legacyInputRequiredShim(){return this._legacyShim??=new fz({maxRounds:this._inputRequiredServing.maxRounds,roundTimeoutMs:this._inputRequiredServing.roundTimeoutMs,resolvedClientCapabilities:e=>this._inputRequestCapabilityView(e),verifyRequestState:(e,t,n)=>this._verifyRequestState(e,t,n),sendElicitation:(e,t)=>this._sendElicitationLeg(e,t,{validateAcceptedContent:false}),sendSampling:(e,t)=>this.createMessage(e,t),listRoots:(e,t)=>this.listRoots(e,t)})}oninitialized;constructor(e,t){if(super(t),this._serverInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._instructions=t?.instructions,this._jsonSchemaValidator=t?.jsonSchemaValidator??new id,this._requestStateVerify=t?.requestState?.verify,this._inputRequiredServing=mz(t?.inputRequired),t?.cacheHints!==void 0){for(let[n,o]of Object.entries(t.cacheHints))o!==void 0&&h_(o,`cacheHints['${n}']`);this._cacheHints=t.cacheHints;}this.setRequestHandler("initialize",n=>this._oninitialize(n)),this.setNotificationHandler("notifications/initialized",()=>this.oninitialized?.()),u_(this._supportedProtocolVersions).length>0&&this.setRequestHandler("server/discover",()=>this._ondiscover()),this._capabilities.logging&&this._registerLoggingHandler();}_registerLoggingHandler(){this.setRequestHandler("logging/setLevel",async(e,t)=>{let n=t.sessionId||t.http?.req?.headers.get("mcp-session-id")||void 0,{level:o}=e.params,r=Wl(Fr,o);return r.success&&this._loggingLevels.set(n,r.data),{}});}buildContext(e,t){let n=e.http||t?.request||t?.closeSSEStream||t?.closeStandaloneSSEStream;return {...e,mcpReq:{...e.mcpReq,log:(o,r,i)=>{if(!this._capabilities.logging)return Promise.resolve();let s;if(this._servedModernEra()){if(s=e.mcpReq.envelope?.[Cr],s===void 0)return Promise.resolve()}else s=this._loggingLevels.get(e.sessionId)??this._loggingLevels.get(void 0);return s!==void 0&&this.LOG_LEVEL_SEVERITY.get(o)<this.LOG_LEVEL_SEVERITY.get(s)?Promise.resolve():e.mcpReq.notify({method:"notifications/message",params:{level:o,data:r,logger:i}})},elicitInput:(o,r)=>this.elicitInput(o,r),requestSampling:(o,r)=>this.createMessage(o,r)},http:n?{...e.http,req:t?.request,closeSSE:t?.closeSSEStream,closeStandaloneSSE:t?.closeStandaloneSSEStream}:void 0}}_loggingLevels=new Map;LOG_LEVEL_SEVERITY=new Map(Fr.options.map((e,t)=>[e,t]));isMessageIgnored=(e,t)=>{let n=this._loggingLevels.get(t);return n?this.LOG_LEVEL_SEVERITY.get(e)<this.LOG_LEVEL_SEVERITY.get(n):false};registerCapabilities(e){if(this.transport)throw new ye(Ie.AlreadyConnected,"Cannot register capabilities after connecting to transport");let t=!!this._capabilities.logging;this._capabilities=E_(this._capabilities,e),!t&&this._capabilities.logging&&this._registerLoggingHandler();}_wrapHandler(e,t){if(e!=="tools/call"){let n=this._cacheHints?.[e],o=hz.has(e);return n===void 0&&!o?async(r,i)=>{let s=await t(r,i);if(pr(s))throw new de(Q.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return s}:async(r,i)=>{let s=o?await this._invokeInputRequiredCapableHandler(e,t,r,i):await t(r,i);if(pr(s)){if(!o)throw new de(Q.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return s}return n===void 0?s:Bl(s,n)}}return async(n,o)=>{let r=Vr(this._negotiatedProtocolVersion),i=r.validateRequest("tools/call",n);if(!i.ok)throw new de(i.reason==="not-in-era"?Q.InternalError:Q.InvalidParams,i.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call request: ${i.message}`);let s=await this._invokeInputRequiredCapableHandler("tools/call",t,n,o);if(pr(s))return s;let a=l_(s),c=r.validateResult("tools/call",a);if(!c.ok)throw new de(c.reason==="not-in-era"?Q.InternalError:Q.InvalidParams,c.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call result: ${c.message}`);return c.value}}_servedModernEra(){return this._negotiatedProtocolVersion!==void 0&&Zo(this._negotiatedProtocolVersion)}async _invokeInputRequiredCapableHandler(e,t,n,o){let r=this._servedModernEra(),i=o.mcpReq.requestState();if(i!==void 0&&typeof i!="string")throw new de(Q.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"});let s=o;if(typeof i=="string"){let m=await this._verifyRequestState(i,o,e);m!==void 0&&(s=$_(o,m));}let a;try{a=await t(n,s);}catch(m){throw m instanceof de&&m.code===Q.UrlElicitationRequired&&r?new de(Q.InternalError,`URL elicitation cannot be signalled by throwing UrlElicitationRequiredError on protocol revision ${this._negotiatedProtocolVersion}: return inputRequired({ inputRequests: { \u2026: inputRequired.elicitUrl(...) } }) from the handler instead. The urlElicitationRequired error (-32042) of earlier revisions is not available on this revision.`):m}if(!pr(a))return a;if(!r){if(!this._inputRequiredServing.legacyShim)throw new de(Q.InternalError,`Handler for ${e} returned an input-required result, but this request is served on protocol revision ${this._negotiatedProtocolVersion??An}, which has no input_required vocabulary`);return await this._legacyInputRequiredShim().fulfill(e,t,n,s,a)}let c=a.inputRequests,u=c!=null&&Object.keys(c).length>0,l=typeof a.requestState=="string";if(!u&&!l)throw new de(Q.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(u){let m=this._inputRequestCapabilityView(o);for(let[h,y]of Object.entries(c)){let{embedded:b,required:p}=UR(e,h,y),S=Vl(p,m);if(S!==void 0)throw new Gl({requiredCapabilities:S},`Cannot request input '${h}' (${b.method}): the request's client capabilities do not declare the required capability`)}}return a}async _verifyRequestState(e,t,n){if(this._requestStateVerify!==void 0)try{return await this._requestStateVerify(e,t)}catch(o){throw this.onerror?.(new Error(`requestState verification rejected ${n}: ${o instanceof Error?o.message:String(o)}`)),new de(Q.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"})}}_inputRequestCapabilityView(e){return this._servedModernEra()?e.mcpReq.envelope?.[dr]:this._clientCapabilities}_assertPushApiInServedEra(e){if(this._servedModernEra())throw new ye(Ie.MethodNotSupportedByProtocolVersion,`Server-to-client requests are not available on protocol revision ${this._negotiatedProtocolVersion}: '${e}' cannot be sent while serving a request on that revision. Return inputRequired({ ... }) from the handler instead \u2014 the client fulfils the embedded requests and retries the original request (multi round-trip requests).`,{method:e,era:"2026-07-28"})}assertCapabilityForMethod(e){switch(e){case "sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new ye(Ie.CapabilityNotSupported,`Client does not support sampling (required for ${e})`);break;case "elicitation/create":if(!this._clientCapabilities?.elicitation)throw new ye(Ie.CapabilityNotSupported,`Client does not support elicitation (required for ${e})`);break;case "roots/list":if(!this._clientCapabilities?.roots)throw new ye(Ie.CapabilityNotSupported,`Client does not support listing roots (required for ${e})`);break;}}assertNotificationCapability(e){switch(e){case "notifications/message":if(!this._capabilities.logging)throw new ye(Ie.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case "notifications/resources/updated":case "notifications/resources/list_changed":if(!this._capabilities.resources)throw new ye(Ie.CapabilityNotSupported,`Server does not support notifying about resources (required for ${e})`);break;case "notifications/tools/list_changed":if(!this._capabilities.tools)throw new ye(Ie.CapabilityNotSupported,`Server does not support notifying of tool list changes (required for ${e})`);break;case "notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new ye(Ie.CapabilityNotSupported,`Server does not support notifying of prompt list changes (required for ${e})`);break;case "notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new ye(Ie.CapabilityNotSupported,`Client does not support URL elicitation (required for ${e})`);break;}}assertRequestHandlerCapability(e){switch(e){case "completion/complete":if(!this._capabilities.completions)throw new ye(Ie.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case "logging/setLevel":if(!this._capabilities.logging)throw new ye(Ie.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case "prompts/get":case "prompts/list":if(!this._capabilities.prompts)throw new ye(Ie.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case "resources/list":case "resources/templates/list":case "resources/read":if(!this._capabilities.resources)throw new ye(Ie.CapabilityNotSupported,`Server does not support resources (required for ${e})`);break;case "tools/call":case "tools/list":if(!this._capabilities.tools)throw new ye(Ie.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;}}async _oninitialize(e){let t=e.params.protocolVersion;this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo;let n=Nb(this._supportedProtocolVersions),o=n.includes(t)?t:n[0]??An;return this._negotiatedProtocolVersion=o,this.transport?.setProtocolVersion?.(o),{protocolVersion:o,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}_ondiscover(){return {supportedVersions:u_(this._supportedProtocolVersions),capabilities:_z(this.getCapabilities()),...this._instructions&&{instructions:this._instructions}}}_outboundServerInfo(){return this._serverInfo}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}projectCallToolResult(e,t){return this._wireCodec().projectCallToolResult(e,t)}getCapabilities(){return this._capabilities}async ping(){return this._assertPushApiInServedEra("ping"),this.request({method:"ping"})}async createMessage(e,t){if(this._assertPushApiInServedEra("sampling/createMessage"),(e.tools||e.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new ye(Ie.CapabilityNotSupported,"Client does not support sampling tools capability.");if(e.messages.length>0){let i=e.messages.at(-1),s=Array.isArray(i.content)?i.content:[i.content],a=s.some(m=>m.type==="tool_result"),c=e.messages.length>1?e.messages.at(-2):void 0,u=c?Array.isArray(c.content)?c.content:[c.content]:[],l=u.some(m=>m.type==="tool_use");if(a){if(s.some(m=>m.type!=="tool_result"))throw new de(Q.InvalidParams,"The last message must contain only tool_result content if any is present");if(!l)throw new de(Q.InvalidParams,"tool_result blocks are not matching any tool_use from the previous message")}if(l){let m=new Set(u.filter(y=>y.type==="tool_use").map(y=>y.id)),h=new Set(s.filter(y=>y.type==="tool_result").map(y=>y.toolUseId));if(m.size!==h.size||![...m].every(y=>h.has(y)))throw new de(Q.InvalidParams,"ids of tool_result blocks and tool_use blocks from previous message do not match")}}let n=!!(e.tools||e.toolChoice),o=await this.request({method:"sampling/createMessage",params:e},t),r=this._wireCodec().samplingResultVariant(n,o);if(!r.ok)throw new ye(Ie.InvalidResult,`Invalid sampling/createMessage result: ${r.reason==="invalid"?r.message:r.reason}`);return r.value}async elicitInput(e,t){switch(this._assertPushApiInServedEra("elicitation/create"),e.mode??"form"){case "url":if(!this._clientCapabilities?.elicitation?.url)throw new ye(Ie.CapabilityNotSupported,"Client does not support url elicitation.");break;case "form":if(!this._clientCapabilities?.elicitation?.form)throw new ye(Ie.CapabilityNotSupported,"Client does not support form elicitation.");break}return this._sendElicitationLeg(e,t)}async _sendElicitationLeg(e,t,n){let o=e.mode??"form",r=n?.validateAcceptedContent??true;switch(o){case "url":{let i=e;return this.request({method:"elicitation/create",params:i},t)}case "form":{let i=e.mode==="form"?e:{...e,mode:"form"},s=await this.request({method:"elicitation/create",params:i},t);if(r&&s.action==="accept"&&s.content&&i.requestedSchema)try{let a=this._jsonSchemaValidator.getValidator(i.requestedSchema)(s.content);if(!a.valid)throw new de(Q.InvalidParams,`Elicitation response content does not match requested schema: ${a.errorMessage}`)}catch(a){throw a instanceof de?a:new de(Q.InternalError,`Error validating elicitation response: ${a instanceof Error?a.message:String(a)}`)}return s}}}createElicitationCompletionNotifier(e,t){if(!this._clientCapabilities?.elicitation?.url)throw new ye(Ie.CapabilityNotSupported,"Client does not support URL elicitation (required for notifications/elicitation/complete)");return ()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},t)}async listRoots(e,t){return this._assertPushApiInServedEra("roots/list"),this.request({method:"roots/list",params:e},t)}async sendLoggingMessage(e,t){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,t))return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}};function _z(e){return {...e}}var qs=class{server;_registeredResources={};_registeredResourceTemplates={};_registeredTools={};_registeredPrompts={};_toolInputSchemaJson={};toolInputSchemaJson(e){let t=this._registeredTools[e];if(!(t===void 0||!t.enabled)){if(Object.hasOwn(this._toolInputSchemaJson,e))return this._toolInputSchemaJson[e];if(t.inputSchema===void 0)return kR;try{let n=Gr(t.inputSchema,"input");return this._toolInputSchemaJson[e]=n,n}catch{return}}}constructor(e,t){this.server=new qR(e,t),t?.capabilities?.tools&&this.setToolRequestHandlers(),t?.capabilities?.resources&&this.setResourceRequestHandlers(),t?.capabilities?.prompts&&this.setPromptRequestHandlers();}async connect(e){return await this.server.connect(e)}async close(){await this.server.close();}_toolHandlersInitialized=false;setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler("tools/list"),this.server.assertCanSetRequestHandler("tools/call"),this.server.registerCapabilities({tools:{listChanged:this.server.getCapabilities().tools?.listChanged??true}}),this.server.setRequestHandler("tools/list",()=>({tools:Object.entries(this._registeredTools).filter(([,e])=>e.enabled).map(([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?Gr(t.inputSchema,"input"):kR,annotations:t.annotations,icons:t.icons,execution:t.execution,_meta:t._meta};return t.outputSchema&&(n.outputSchema=Gr(t.outputSchema,"output")),n})})),this.server.setRequestHandler("tools/call",async(e,t)=>{let n=this._registeredTools[e.params.name];if(!n)throw new de(Q.InvalidParams,`Tool ${e.params.name} not found`);if(!n.enabled)throw new de(Q.InvalidParams,`Tool ${e.params.name} disabled`);try{let o=await this.validateToolInput(n,e.params.arguments,e.params.name),r=await this.executeToolHandler(n,o,t);return await this.validateToolOutput(n,r,e.params.name),pr(r)?r:this.server.projectCallToolResult(r,n.outputSchemaJson)}catch(o){if(o instanceof de&&o.code===Q.UrlElicitationRequired)throw o;return this.createToolError(o instanceof Error?o.message:String(o))}}),this._toolHandlersInitialized=true);}createToolError(e){return {content:[{type:"text",text:e}],isError:true}}async validateToolInput(e,t,n){if(!e.inputSchema)return;let o=await Dn(e.inputSchema,t??{});if(!o.success)throw new de(Q.InvalidParams,`Input validation error: Invalid arguments for tool ${n}: ${o.error}`);return o.data}async validateToolOutput(e,t,n){if(!e.outputSchema||pr(t)||t.isError)return;if(t.structuredContent===void 0)throw new de(Q.InvalidParams,`Output validation error: Tool ${n} has an output schema but no structured content was provided`);let o=await Dn(e.outputSchema,t.structuredContent);if(!o.success)throw new de(Q.InvalidParams,`Output validation error: Invalid structured content for tool ${n}: ${o.error}`)}async executeToolHandler(e,t,n){return e.executor(t,n)}_completionHandlerInitialized=false;setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler("completion/complete"),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler("completion/complete",async e=>{switch(e.params.ref.type){case "ref/prompt":return v_(e),this.handlePromptCompletion(e,e.params.ref);case "ref/resource":return y_(e),this.handleResourceCompletion(e,e.params.ref);default:throw new de(Q.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=true);}async handlePromptCompletion(e,t){let n=this._registeredPrompts[t.name];if(!n)throw new de(Q.InvalidParams,`Prompt ${t.name} not found`);if(!n.enabled)throw new de(Q.InvalidParams,`Prompt ${t.name} disabled`);if(!n.argsSchema)return Fs;let o=MR(CR(n.argsSchema)?.[e.params.argument.name]);if(!U_(o))return Fs;let r=oz(o);return r?AR(await r(e.params.argument.value,e.params.context)):Fs}async handleResourceCompletion(e,t){let n=Object.values(this._registeredResourceTemplates).find(r=>r.resourceTemplate.uriTemplate.toString()===t.uri);if(!n){if(this._registeredResources[t.uri])return Fs;throw new de(Q.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let o=n.resourceTemplate.completeCallback(e.params.argument.name);return o?AR(await o(e.params.argument.value,e.params.context)):Fs}_resourceHandlersInitialized=false;setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler("resources/list"),this.server.assertCanSetRequestHandler("resources/templates/list"),this.server.assertCanSetRequestHandler("resources/read"),this.server.registerCapabilities({resources:{listChanged:this.server.getCapabilities().resources?.listChanged??true}}),this.server.setRequestHandler("resources/list",async(e,t)=>{let n=Object.entries(this._registeredResources).filter(([r,i])=>i.enabled).map(([r,i])=>({uri:r,name:i.name,...i.metadata})),o=[];for(let r of Object.values(this._registeredResourceTemplates)){if(!r.resourceTemplate.listCallback)continue;let i=await r.resourceTemplate.listCallback(t);for(let s of i.resources)o.push({...r.metadata,...s});}return {resources:[...n,...o]}}),this.server.setRequestHandler("resources/templates/list",async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([e,t])=>({name:e,uriTemplate:t.resourceTemplate.uriTemplate.toString(),...t.metadata}))})),this.server.setRequestHandler("resources/read",async(e,t)=>{let n;try{n=new URL(e.params.uri);}catch{throw new de(Q.InvalidParams,`Resource URI ${e.params.uri} is invalid`,{uri:e.params.uri,reason:"invalid_uri"})}let o=this._registeredResources[n.toString()];if(o){if(!o.enabled)throw new de(Q.InvalidParams,`Resource ${n} disabled`);return Bl(await o.readCallback(n,t),o.cacheHint)}for(let r of Object.values(this._registeredResourceTemplates)){let i=r.resourceTemplate.uriTemplate.match(n.toString());if(i)return Bl(await r.readCallback(n,i,t),r.cacheHint)}throw new Kl(e.params.uri)}),this._resourceHandlersInitialized=true);}_promptHandlersInitialized=false;setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler("prompts/list"),this.server.assertCanSetRequestHandler("prompts/get"),this.server.registerCapabilities({prompts:{listChanged:this.server.getCapabilities().prompts?.listChanged??true}}),this.server.setRequestHandler("prompts/list",()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,t])=>({name:e,title:t.title,description:t.description,arguments:t.argsSchema?Xb(t.argsSchema):void 0,icons:t.icons,_meta:t._meta}))})),this.server.setRequestHandler("prompts/get",async(e,t)=>{let n=this._registeredPrompts[e.params.name];if(!n)throw new de(Q.InvalidParams,`Prompt ${e.params.name} not found`);if(!n.enabled)throw new de(Q.InvalidParams,`Prompt ${e.params.name} disabled`);return n.handler(e.params.arguments,t)}),this._promptHandlersInitialized=true);}registerResource(e,t,n,o){let r=n.cacheHint,i=n;if(r!==void 0){h_(r,`resource ${e}`);let s={...n};delete s.cacheHint,i=s;}if(typeof t=="string"){if(this._registeredResources[t])throw new Error(`Resource ${t} is already registered`);let s=this._createRegisteredResource(e,n.title,t,i,o);return r!==void 0&&(s.cacheHint=r),this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}else {if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);let s=this._createRegisteredResourceTemplate(e,n.title,t,i,o);return r!==void 0&&(s.cacheHint=r),this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}}_createRegisteredResource(e,t,n,o,r){let i={name:e,title:t,metadata:o,readCallback:r,enabled:true,disable:()=>i.update({enabled:false}),enable:()=>i.update({enabled:true}),remove:()=>i.update({uri:null}),update:s=>{s.uri!==void 0&&s.uri!==n&&(delete this._registeredResources[n],s.uri&&(this._registeredResources[s.uri]=i)),s.name!==void 0&&(i.name=s.name),s.title!==void 0&&(i.title=s.title),s.metadata!==void 0&&(i.metadata=s.metadata),s.callback!==void 0&&(i.readCallback=s.callback),s.enabled!==void 0&&(i.enabled=s.enabled),this.sendResourceListChanged();}};return this._registeredResources[n]=i,i}_createRegisteredResourceTemplate(e,t,n,o,r){let i={resourceTemplate:n,title:t,metadata:o,readCallback:r,enabled:true,disable:()=>i.update({enabled:false}),enable:()=>i.update({enabled:true}),remove:()=>i.update({name:null}),update:a=>{a.name!==void 0&&a.name!==e&&(delete this._registeredResourceTemplates[e],a.name&&(this._registeredResourceTemplates[a.name]=i)),a.title!==void 0&&(i.title=a.title),a.template!==void 0&&(i.resourceTemplate=a.template),a.metadata!==void 0&&(i.metadata=a.metadata),a.callback!==void 0&&(i.readCallback=a.callback),a.enabled!==void 0&&(i.enabled=a.enabled),this.sendResourceListChanged();}};this._registeredResourceTemplates[e]=i;let s=n.uriTemplate.variableNames;return Array.isArray(s)&&s.some(a=>!!n.completeCallback(a))&&this.setCompletionRequestHandler(),i}_createRegisteredPrompt(e,t,n,o,r,i,s){let a=o,c=r,u={title:t,description:n,argsSchema:o,icons:i,_meta:s,handler:PR(e,o,r),enabled:true,disable:()=>u.update({enabled:false}),enable:()=>u.update({enabled:true}),remove:()=>u.update({name:null}),update:l=>{l.name!==void 0&&l.name!==e&&(delete this._registeredPrompts[e],l.name&&(this._registeredPrompts[l.name]=u)),l.title!==void 0&&(u.title=l.title),l.description!==void 0&&(u.description=l.description),l.icons!==void 0&&(u.icons=l.icons),l._meta!==void 0&&(u._meta=l._meta);let m=false;l.argsSchema!==void 0&&(u.argsSchema=l.argsSchema,a=l.argsSchema,m=true),l.callback!==void 0&&(c=l.callback,m=true),m&&(u.handler=PR(e,a,c)),l.enabled!==void 0&&(u.enabled=l.enabled),this.sendPromptListChanged();}};if(this._registeredPrompts[e]=u,o){let l=CR(o);l&&Object.values(l).some(m=>U_(MR(m)))&&this.setCompletionRequestHandler();}return u}_createRegisteredTool(e,t,n,o,r,i,s,a,c,u){if(O_(e),o!==void 0)try{let h=Gr(o,"input");this._toolInputSchemaJson[e]=h;let y=S_(h);y.valid||console.warn(`[mcp-sdk] tool '${e}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${y.reason}`);}catch{}let l=u,m={title:t,description:n,inputSchema:o,outputSchema:r,outputSchemaJson:NR(r),annotations:i,icons:s,execution:a,_meta:c,handler:u,executor:OR(o,u),enabled:true,disable:()=>m.update({enabled:false}),enable:()=>m.update({enabled:true}),remove:()=>m.update({name:null}),update:h=>{h.name!==void 0&&h.name!==e&&(typeof h.name=="string"&&O_(h.name),delete this._registeredTools[e],delete this._toolInputSchemaJson[e],h.name&&(delete this._toolInputSchemaJson[h.name],this._registeredTools[h.name]=m,e=h.name)),h.title!==void 0&&(m.title=h.title),h.description!==void 0&&(m.description=h.description);let y=false;h.paramsSchema!==void 0&&(m.inputSchema=h.paramsSchema,delete this._toolInputSchemaJson[e],y=true),h.callback!==void 0&&(m.handler=h.callback,l=h.callback,y=true),y&&(m.executor=OR(m.inputSchema,l)),h.outputSchema!==void 0&&(m.outputSchema=h.outputSchema,m.outputSchemaJson=NR(h.outputSchema)),h.annotations!==void 0&&(m.annotations=h.annotations),h.icons!==void 0&&(m.icons=h.icons),h._meta!==void 0&&(m._meta=h._meta),h.enabled!==void 0&&(m.enabled=h.enabled),this.sendToolListChanged();}};return this._registeredTools[e]=m,this.setToolRequestHandlers(),this.sendToolListChanged(),m}registerTool(e,t,n){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let{title:o,description:r,inputSchema:i,outputSchema:s,annotations:a,icons:c,_meta:u}=t;return this._createRegisteredTool(e,o,r,Yl(i),Yl(s),a,c,void 0,u,n)}registerPrompt(e,t,n){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let{title:o,description:r,argsSchema:i,icons:s,_meta:a}=t,c=this._createRegisteredPrompt(e,o,r,Yl(i),n,s,a);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),c}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(e,t){return this.server.sendLoggingMessage(e,t)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged();}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged();}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged();}};function OR(e,t){if(e){let o=t;return async(r,i)=>o(r,i)}let n=t;return async(o,r)=>n(r)}var kR={type:"object",properties:{}};function NR(e){if(e!==void 0)try{return Gr(e,"output")}catch{return}}function PR(e,t,n){if(t){let o=n;return async(r,i)=>{let s=await Dn(t,r);if(!s.success)throw new de(Q.InvalidParams,`Invalid arguments for prompt ${e}: ${s.error}`);return o(s.data,i)}}else {let o=n;return async(r,i)=>o(i)}}function AR(e){return {completion:{values:e.map(String).slice(0,100),total:e.length,hasMore:e.length>100}}}var Fs={completion:{values:[],hasMore:false}};function CR(e){let t=e;if(t.shape&&typeof t.shape=="object")return t.shape}function vz(e){return e?.type==="optional"}function MR(e){return vz(e)?e.def?.innerType??e:e}var yz=class{_readBuffer;_started=false;_closed=false;constructor(e=j_.stdin,t=j_.stdout,n){this._stdin=e,this._stdout=t,this._readBuffer=new I_({maxBufferSize:n?.maxBufferSize});}onclose;onerror;onmessage;_ondata=e=>{try{this._readBuffer.append(e),this.processReadBuffer();}catch(t){this.onerror?.(t),this.close().catch(()=>{});}};_onerror=e=>{this.onerror?.(e);};_onstdouterror=e=>{this.onerror?.(e),this.close().catch(()=>{});};async start(){if(this._started)throw new Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=true,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror),this._stdout.on("error",this._onstdouterror);}processReadBuffer(){for(;;)try{let e=this._readBuffer.readMessage();if(e===null)break;this.onmessage?.(e);}catch(e){this.onerror?.(e);}}async close(){this._closed||(this._closed=true,this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdout.off("error",this._onstdouterror),this._stdin.listenerCount("data")===0&&this._stdin.pause(),this._readBuffer.clear(),this.onclose?.());}send(e){return this._closed?Promise.reject(new Error("StdioServerTransport is closed")):new Promise((t,n)=>{let o=z_(e),r=false,i=a=>{r||(r=true,this._stdout.off("error",i),this._stdout.off("drain",s),n(a));},s=()=>{r||(r=true,this._stdout.off("error",i),this._stdout.off("drain",s),t());};if(this._stdout.once("error",i),this._stdout.write(o)){if(r)return;r=true,this._stdout.off("error",i),t();}else r||this._stdout.once("drain",s);})}},VR=3e3,Sz=class{onclose;onerror;onmessage;_closed=false;_pendingRequests=new Set;_drainWaiters=[];constructor(e,t,n){this._wire=e,this._onInstanceClose=t,this._outboundIntercept=n;}async start(){}async send(e,t){if(Ms(e)||Xl(e)){let{id:n}=e;n!==void 0&&this._settle(n);}if(!this._closed&&this._outboundIntercept?.(e)!=="handled")return this._wire.send(e,t)}setProtocolVersion=e=>{this._wire.setProtocolVersion?.(e);};deliver(e,t){if(!this._closed){if(Ct(e))this._pendingRequests.add(e.id);else if(Kr(e)&&e.method==="notifications/cancelled"){let n=e.params?.requestId;n!==void 0&&this._settle(n);}this.onmessage?.(e,t);}}async whenRequestsAnswered(e){return this._closed||this._pendingRequests.size===0?true:await new Promise(t=>{let n=()=>{clearTimeout(o),t(true);},o=setTimeout(()=>{this._drainWaiters=this._drainWaiters.filter(r=>r!==n),t(false);},e);this._drainWaiters.push(n);})}async close(){if(!this._closed){this._closed=true,this._pendingRequests.clear(),this._releaseDrainWaiters();try{this._onInstanceClose();}finally{this.onclose?.();}}}_settle(e){this._pendingRequests.delete(e),this._pendingRequests.size===0&&this._releaseDrainWaiters();}_releaseDrainWaiters(){let e=this._drainWaiters;this._drainWaiters=[];for(let t of e)t();}};function bz(e){let t=e.params;if(e.method==="initialize"&&!b_(t)){let i=t!==null&&typeof t=="object"&&typeof t.protocolVersion=="string"?t.protocolVersion:void 0;return {kind:"legacy",reason:"initialize",...i!==void 0&&{requestedVersion:i}}}if(!Hl(t))return {kind:"legacy",reason:"no-claim"};let n=Ln(t),o=(n===void 0?[]:Jl(n))[0];if(o!==void 0)return {kind:"invalid-envelope",issue:o};let r=Zl(t);return r===void 0||!Br.includes(r)?{kind:"unsupported-revision",requested:r??"unknown"}:{kind:"modern",revision:r,classification:{era:"modern",revision:r}}}function BR(e,t={}){let n=t.legacy??"serve",o=t.transport??new yz,r={phase:"opening"},i,s=false,a=()=>s||r.phase==="closed",c=$=>{try{t.onerror?.($);}catch{}},u=($,E,A,N)=>o.send({jsonrpc:"2.0",id:$,error:{code:E,message:A,...N!==void 0&&{data:N}}}).catch(F=>c(Bt(F))),l=new DR(t.maxSubscriptions??sd),m=$=>{if(!Kr($))return;let E=l.routeOutbound($);if(E!=="passthrough"){for(let A of E)o.send({jsonrpc:"2.0",...A}).catch(N=>c(Bt(N)));return "handled"}},h=async $=>{if(Ct($)&&$.method==="subscriptions/listen"){let E=Ln($.params),A=Hl($.params)?(E===void 0?[]:Jl(E))[0]:{key:"_meta",problem:"the per-request envelope is required on protocol revision 2026-07-28"},N=Zl($.params),F;if(A!==void 0)F={jsonrpc:"2.0",id:$.id,error:{code:-32602,message:`Invalid _meta envelope: ${A.key}: ${A.problem}`}};else if(N===void 0||!Br.includes(N)){let V=new Jo({supported:[...Br],requested:N??"unknown"});F={jsonrpc:"2.0",id:$.id,error:{code:V.code,message:V.message,data:V.data}};}else F=l.serve($);return await o.send("error"in F?F:{jsonrpc:"2.0",method:F.method,params:F.params}).catch(V=>c(Bt(V))),true}if(Kr($)&&$.method==="notifications/cancelled"){let E=$.params?.requestId;if(E!==void 0&&l.cancel(E))return true}return false},y=($,E,A)=>{let N=R_({reason:E,...A!==void 0&&{requestedVersion:A}},Br);return N===void 0?Promise.resolve():(c(new Error(`Rejected 2025-era request on a modern-only stdio connection (${N.cell}): ${N.message}`)),u($.id,N.code,N.message,N.data))},b=$=>{s||$===i||T();},p=async($,E)=>{let A=await e({era:$}),N=A instanceof qs?A.server:A;$==="modern"&&(x_(N,E),L_(N,Br),l.setServerCapabilities(N.getCapabilities(),F_(N)));let F=new Sz(o,()=>b(F),$==="modern"?m:void 0);return await A.connect(F),{product:A,channel:F}},S=$=>$.product.close().catch(E=>c(Bt(E))),d=async $=>{i=$.channel;try{await $.channel.whenRequestsAnswered(VR)||c(new Error(`Discarded the probe instance with requests still unanswered after ${VR}ms; continuing with the fallback`)),await $.product.close();}catch(E){c(Bt(E));}finally{i=void 0;}},_=async $=>{if(r.phase==="closed")return;if(r.phase==="pinned"){if(r.era==="modern"&&Ct($)&&$.method==="initialize"&&!b_($.params)){await y($,"initialize",$.params!==null&&typeof $.params=="object"&&typeof $.params.protocolVersion=="string"?$.params.protocolVersion:void 0);return}if(r.era==="modern"&&await h($))return;r.instance.channel.deliver($);return}if(!Ct($)&&!Kr($)){c(new Error("Discarded a JSON-RPC response received before the connection negotiated an era"));return}let E=bz($);switch(E.kind){case "invalid-envelope":{let A=`Invalid _meta envelope for protocol revision 2026-07-28: ${E.issue.key}: ${E.issue.problem}`;Ct($)?await u($.id,Q.InvalidParams,A,{envelope:E.issue}):c(new Error(`Discarded a notification with a malformed envelope: ${A}`));return}case "unsupported-revision":if(Ct($)){let A=new Jo({supported:[...Br],requested:E.requested});c(A),await u($.id,A.code,A.message,A.data);}else c(new Error(`Discarded a notification claiming unsupported protocol revision ${E.requested}`));return;case "modern":if(Ct($)&&$.method==="server/discover"){if(r.phase==="probe"){r.instance.channel.deliver($,{classification:E.classification});return}let A=await p("modern",E.revision);if(a()){await S(A);return}r={phase:"probe",instance:A},A.channel.deliver($,{classification:E.classification});return}if(r.phase==="probe"){if(Kr($)){r.instance.channel.deliver($,{classification:E.classification});return}r={phase:"pinned",era:"modern",instance:r.instance};}else {let A=await p("modern",E.revision);if(a()){await S(A);return}r={phase:"pinned",era:"modern",instance:A};}if(await h($))return;r.instance.channel.deliver($,{classification:E.classification});return;case "legacy":{if(n==="reject"){Ct($)&&await y($,E.reason,E.requestedVersion);return}if(r.phase==="probe"){if(await d(r.instance),a())return;r={phase:"opening"};}let A=await p("legacy");if(a()){await S(A);return}r={phase:"pinned",era:"legacy",instance:A},r.instance.channel.deliver($);return}}},f=[],v=false,x=async()=>{if(!v){v=true;try{for(;f.length>0;){let $=f.shift();try{await _($);}catch(E){Ct($)&&await u($.id,Q.InternalError,"Internal server error"),c(Bt(E));}}}finally{v=false;}}},T=async()=>{if(s||r.phase==="closed")return;s=true;let $=r;r={phase:"closed"};for(let E of l.teardownAll())await o.send(E).catch(A=>c(Bt(A)));($.phase==="probe"||$.phase==="pinned")&&await $.instance.product.close().catch(E=>c(Bt(E))),await o.close().catch(E=>c(Bt(E)));};o.onmessage=$=>{f.push($),x();},o.onerror=$=>{c($),(r.phase==="probe"||r.phase==="pinned")&&r.instance.channel.onerror?.($);},o.onclose=()=>{if(s||r.phase==="closed")return;s=true;let $=r;r={phase:"closed"},($.phase==="probe"||$.phase==="pinned")&&$.instance.product.close().catch(E=>c(Bt(E)));};let R=o.start().catch($=>{throw c(Bt($)),$});return R.catch(()=>{}),{close:async()=>{await R.catch(()=>{}),await T();}}}function Bt(e){return e instanceof Error?e:new Error(String(e))}var KR=class{_listeners={};addEventListener(e,t){let n=this._listeners;return n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t),this}removeEventListener(e,t){let n=this._listeners[e];if(n!==void 0){let o=n.indexOf(t);o!==-1&&n.splice(o,1);}return this}dispatchEvent(e){let t=this._listeners[e.type];if(t!==void 0){let n=t.slice(0);for(let o=0,r=n.length;o<r;o++)n[o].call(this,e);}return this}dispose(){for(let e in this._listeners)delete this._listeners[e];}},Zr=class{_disposed=false;_name;_parent;_child;_attributes;constructor(e,t,n,o={}){if(this._name=e,this._parent=t,this._child=n,this._attributes=o,!t.isOnGraph(n))throw new Error("Cannot connect disconnected graphs.")}getName(){return this._name}getParent(){return this._parent}getChild(){return this._child}setChild(e){return this._child=e,this}getAttributes(){return this._attributes}dispose(){this._disposed||(this._parent._destroyRef(this),this._disposed=true);}isDisposed(){return this._disposed}},q_=class extends KR{_emptySet=new Set;_edges=new Set;_parentEdges=new Map;_childEdges=new Map;listEdges(){return Array.from(this._edges)}listParentEdges(e){return Array.from(this._childEdges.get(e)||this._emptySet)}listParents(e){let t=new Set;for(let n of this.listParentEdges(e))t.add(n.getParent());return Array.from(t)}listChildEdges(e){return Array.from(this._parentEdges.get(e)||this._emptySet)}listChildren(e){let t=new Set;for(let n of this.listChildEdges(e))t.add(n.getChild());return Array.from(t)}disconnectParents(e,t){for(let n of this.listParentEdges(e))(!t||t(n.getParent()))&&n.dispose();return this}_createEdge(e,t,n,o){let r=new Zr(e,t,n,o);this._edges.add(r);let i=r.getParent();this._parentEdges.has(i)||this._parentEdges.set(i,new Set),this._parentEdges.get(i).add(r);let s=r.getChild();return this._childEdges.has(s)||this._childEdges.set(s,new Set),this._childEdges.get(s).add(r),r}_destroyEdge(e){return this._edges.delete(e),this._parentEdges.get(e.getParent()).delete(e),this._childEdges.get(e.getChild()).delete(e),this}},at=class{list=[];constructor(e){if(e)for(let t of e)this.list.push(t);}add(e){this.list.push(e);}remove(e){let t=this.list.indexOf(e);t>=0&&this.list.splice(t,1);}removeChild(e){let t=[];for(let n of this.list)n.getChild()===e&&t.push(n);for(let n of t)this.remove(n);return t}listRefsByChild(e){let t=[];for(let n of this.list)n.getChild()===e&&t.push(n);return t}values(){return this.list}},Me=class{set=new Set;map=new Map;constructor(e){if(e)for(let t of e)this.add(t);}add(e){let t=e.getChild();this.removeChild(t),this.set.add(e),this.map.set(t,e);}remove(e){this.set.delete(e),this.map.delete(e.getChild());}removeChild(e){let t=this.map.get(e)||null;return t&&this.remove(t),t}getRefByChild(e){return this.map.get(e)||null}values(){return Array.from(this.set)}},Qe=class{map={};constructor(e){e&&Object.assign(this.map,e);}set(e,t){this.map[e]=t;}delete(e){delete this.map[e];}get(e){return this.map[e]||null}keys(){return Object.keys(this.map)}values(){return Object.values(this.map)}},Pe=Symbol("attributes"),Hr=Symbol("immutableKeys"),GR=class HR extends KR{_disposed=false;graph;[Pe];[Hr];constructor(t){super(),this.graph=t,this[Hr]=new Set,this[Pe]=this._createAttributes();}getDefaults(){return {}}_createAttributes(){let t=this.getDefaults(),n={};for(let o in t){let r=t[o];if(r instanceof HR){let i=this.graph._createEdge(o,this,r);this[Hr].add(o),n[o]=i;}else n[o]=r;}return n}isOnGraph(t){return this.graph===t.graph}isDisposed(){return this._disposed}dispose(){this._disposed||(this.graph.listChildEdges(this).forEach(t=>t.dispose()),this.graph.disconnectParents(this),this._disposed=true,this.dispatchEvent({type:"dispose"}));}detach(){return this.graph.disconnectParents(this),this}swap(t,n){for(let o in this[Pe]){let r=this[Pe][o];if(r instanceof Zr){let i=r;i.getChild()===t&&this.setRef(o,n,i.getAttributes());}else if(r instanceof at)for(let i of r.listRefsByChild(t)){let s=i.getAttributes();this.removeRef(o,t),this.addRef(o,n,s);}else if(r instanceof Me){let i=r.getRefByChild(t);if(i){let s=i.getAttributes();this.removeRef(o,t),this.addRef(o,n,s);}}else if(r instanceof Qe)for(let i of r.keys()){let s=r.get(i);s.getChild()===t&&this.setRefMap(o,i,n,s.getAttributes());}}return this}get(t){return this[Pe][t]}set(t,n){return this[Pe][t]=n,this.dispatchEvent({type:"change",attribute:t})}getRef(t){let n=this[Pe][t];return n?n.getChild():null}setRef(t,n,o){if(this[Hr].has(t))throw new Error(`Cannot overwrite immutable attribute, "${t}".`);let r=this[Pe][t];if(r&&r.dispose(),!n)return this;let i=this.graph._createEdge(t,this,n,o);return this[Pe][t]=i,this.dispatchEvent({type:"change",attribute:t})}listRefs(t){return this.assertRefList(t).values().map(n=>n.getChild())}addRef(t,n,o){let r=this.graph._createEdge(t,this,n,o);return this.assertRefList(t).add(r),this.dispatchEvent({type:"change",attribute:t})}removeRef(t,n){let o=this.assertRefList(t);if(o instanceof at)for(let r of o.listRefsByChild(n))r.dispose();else {let r=o.getRefByChild(n);r&&r.dispose();}return this}assertRefList(t){let n=this[Pe][t];if(n instanceof at||n instanceof Me)return n;throw new Error(`Expected RefList or RefSet for attribute "${t}"`)}listRefMapKeys(t){return this.assertRefMap(t).keys()}listRefMapValues(t){return this.assertRefMap(t).values().map(n=>n.getChild())}getRefMap(t,n){let o=this.assertRefMap(t).get(n);return o?o.getChild():null}setRefMap(t,n,o,r){let i=this.assertRefMap(t),s=i.get(n);if(s&&s.dispose(),!o)return this;r=Object.assign(r||{},{key:n});let a=this.graph._createEdge(t,this,o,{...r,key:n});return i.set(n,a),this.dispatchEvent({type:"change",attribute:t,key:n})}assertRefMap(t){let n=this[Pe][t];if(n instanceof Qe)return n;throw new Error(`Expected RefMap for attribute "${t}"`)}dispatchEvent(t){return super.dispatchEvent({...t,target:this}),this.graph.dispatchEvent({...t,target:this,type:`node:${t.type}`}),this}_destroyRef(t){let n=t.getName();if(this[Pe][n]===t)this[Pe][n]=null,this[Hr].has(n)&&t.getChild().dispose();else if(this[Pe][n]instanceof at)this[Pe][n].remove(t);else if(this[Pe][n]instanceof Me)this[Pe][n].remove(t);else if(this[Pe][n]instanceof Qe){let o=this[Pe][n];for(let r of o.keys())o.get(r)===t&&o.delete(r);}else return;this.graph._destroyEdge(t),this.dispatchEvent({type:"change",attribute:n});}};var eT="v4.4.2",Xr="@glb.bin",ee=(function(e){return e.ACCESSOR="Accessor",e.ANIMATION="Animation",e.ANIMATION_CHANNEL="AnimationChannel",e.ANIMATION_SAMPLER="AnimationSampler",e.BUFFER="Buffer",e.CAMERA="Camera",e.MATERIAL="Material",e.MESH="Mesh",e.PRIMITIVE="Primitive",e.PRIMITIVE_TARGET="PrimitiveTarget",e.NODE="Node",e.ROOT="Root",e.SCENE="Scene",e.SKIN="Skin",e.TEXTURE="Texture",e.TEXTURE_INFO="TextureInfo",e})({});var Rz=(function(e){return e.ARRAY_BUFFER="ARRAY_BUFFER",e.ELEMENT_ARRAY_BUFFER="ELEMENT_ARRAY_BUFFER",e.INVERSE_BIND_MATRICES="INVERSE_BIND_MATRICES",e.OTHER="OTHER",e.SPARSE="SPARSE",e})({}),Kt=(function(e){return e[e.R=4096]="R",e[e.G=256]="G",e[e.B=16]="B",e[e.A=1]="A",e})({});var Tz=class extends Float32Array{constructor(){throw super(),new Error("Unsupported typed array instantiation.")}},fd={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5131:typeof Float16Array<"u"?Float16Array:Tz,5126:Float32Array,5130:Float64Array},$e=class{static createBufferFromDataURI(e){if(typeof Buffer>"u"){let t=atob(e.split(",")[1]),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}else {let t=e.split(",")[1],n=e.indexOf("base64")>=0;return Buffer.from(t,n?"base64":"utf8")}}static encodeText(e){return new TextEncoder().encode(e)}static decodeText(e){return new TextDecoder().decode(e)}static concat(e){let t=0;for(let r of e)t+=r.byteLength;let n=new Uint8Array(t),o=0;for(let r of e)n.set(r,o),o+=r.byteLength;return n}static pad(e,t=0){let n=this.padNumber(e.byteLength);if(n===e.byteLength)return e;let o=new Uint8Array(n);if(o.set(e),t!==0)for(let r=e.byteLength;r<n;r++)o[r]=t;return o}static padNumber(e){return Math.ceil(e/4)*4}static equals(e,t){if(e===t)return true;if(e.byteLength!==t.byteLength)return false;let n=e.byteLength;for(;n--;)if(e[n]!==t[n])return false;return true}static toView(e,t=0,n=1/0){return new Uint8Array(e.buffer,e.byteOffset+t,Math.min(e.byteLength,n))}static assertView(e){if(e&&!ArrayBuffer.isView(e))throw new Error(`Method requires Uint8Array parameter; received "${typeof e}".`);return e}};var $z=class{match(e){return e.length>=3&&e[0]===255&&e[1]===216&&e[2]===255}getSize(e){let t=new DataView(e.buffer,e.byteOffset+4),n,o;for(;t.byteLength;){if(n=t.getUint16(0,false),wz(t,n),o=t.getUint8(n+1),o===192||o===193||o===194)return [t.getUint16(n+7,false),t.getUint16(n+5,false)];t=new DataView(e.buffer,t.byteOffset+n+2);}throw new TypeError("Invalid JPG, no size found")}getChannels(e){return 3}},xz=class tT{static PNG_FRIED_CHUNK_NAME="CgBI";match(t){return t.length>=8&&t[0]===137&&t[1]===80&&t[2]===78&&t[3]===71&&t[4]===13&&t[5]===10&&t[6]===26&&t[7]===10}getSize(t){let n=new DataView(t.buffer,t.byteOffset);return $e.decodeText(t.slice(12,16))===tT.PNG_FRIED_CHUNK_NAME?[n.getUint32(32,false),n.getUint32(36,false)]:[n.getUint32(16,false),n.getUint32(20,false)]}getChannels(t){return 4}},Qt=class{static impls={"image/jpeg":new $z,"image/png":new xz};static registerFormat(e,t){this.impls[e]=t;}static getMimeType(e){for(let t in this.impls)if(this.impls[t].match(e))return t;return null}static getSize(e,t){return this.impls[t]?this.impls[t].getSize(e):null}static getChannels(e,t){return this.impls[t]?this.impls[t].getChannels(e):null}static getVRAMByteLength(e,t){if(!this.impls[t])return null;if(this.impls[t].getVRAMByteLength)return this.impls[t].getVRAMByteLength(e);let n=0,o=4,r=this.getSize(e,t);if(!r)return null;for(;r[0]>1||r[1]>1;)n+=r[0]*r[1]*o,r[0]=Math.max(Math.floor(r[0]/2),1),r[1]=Math.max(Math.floor(r[1]/2),1);return n+=1*o,n}static mimeTypeToExtension(e){return e==="image/jpeg"?"jpg":e.split("/").pop()}static extensionToMimeType(e){return e==="jpg"?"image/jpeg":e?`image/${e}`:""}};function wz(e,t){if(t>e.byteLength)throw new TypeError("Corrupt JPG, exceeded buffer limits");if(e.getUint8(t)!==255)throw new TypeError("Invalid JPG, marker table corrupted");return e}var qn=class{static basename(e){let t=e.split(/[\\/]/).pop();return t.substring(0,t.lastIndexOf("."))}static extension(e){if(e.startsWith("data:image/")){let t=e.match(/data:(image\/\w+)/)[1];return Qt.mimeTypeToExtension(t)}else {if(e.startsWith("data:model/gltf+json"))return "gltf";if(e.startsWith("data:model/gltf-binary"))return "glb";if(e.startsWith("data:application/"))return "bin"}return e.split(/[\\/]/).pop().split(/[.]/).pop()}},B_=typeof Float32Array<"u"?Float32Array:Array;function Ez(){var e=new B_(3);return B_!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function V_(e){var t=e[0],n=e[1],o=e[2];return Math.sqrt(t*t+n*n+o*o)}function Iz(e,t,n){var o=t[0],r=t[1],i=t[2],s=n[3]*o+n[7]*r+n[11]*i+n[15];return s=s||1,e[0]=(n[0]*o+n[4]*r+n[8]*i+n[12])/s,e[1]=(n[1]*o+n[5]*r+n[9]*i+n[13])/s,e[2]=(n[2]*o+n[6]*r+n[10]*i+n[14])/s,e}(function(){var e=Ez();return function(t,n,o,r,i,s){var a,c;for(n||(n=3),o||(o=0),r?c=Math.min(r*n+o,t.length):c=t.length,a=o;a<c;a+=n)e[0]=t[a],e[1]=t[a+1],e[2]=t[a+2],i(e,e,s),t[a]=e[0],t[a+1]=e[1],t[a+2]=e[2];return t}})();function rT(e){let t=nT(),n=e.propertyType==="Node"?[e]:e.listChildren();for(let o of n)o.traverse(r=>{let i=r.getMesh();if(!i)return;let s=zz(i,r.getWorldMatrix());s.min.every(isFinite)&&s.max.every(isFinite)&&(K_(s.min,t),K_(s.max,t));});return t}function zz(e,t){let n=nT();for(let o of e.listPrimitives()){let r=o.getAttribute("POSITION"),i=o.getIndices();if(!r)continue;let s=[0,0,0],a=[0,0,0];for(let c=0,u=i?i.getCount():r.getCount();c<u;c++){let l=i?i.getScalar(c):c;s=r.getElement(l,s),a=Iz(a,s,t),K_(a,n);}}return n}function K_(e,t){for(let n=0;n<3;n++)t.min[n]=Math.min(e[n],t.min[n]),t.max[n]=Math.max(e[n],t.max[n]);}function nT(){return {min:[1/0,1/0,1/0],max:[-1/0,-1/0,-1/0]}}var ZR="https://null.example",fr=class{static DEFAULT_INIT={};static PROTOCOL_REGEXP=/^[a-zA-Z]+:\/\//;static dirname(e){let t=e.lastIndexOf("/");return t===-1?"./":e.substring(0,t+1)}static basename(e){return qn.basename(new URL(e,ZR).pathname)}static extension(e){return qn.extension(new URL(e,ZR).pathname)}static resolve(e,t){if(!this.isRelativePath(t))return t;let n=e.split("/"),o=t.split("/");n.pop();for(let r=0;r<o.length;r++)o[r]!=="."&&(o[r]===".."?n.pop():n.push(o[r]));return n.join("/")}static isAbsoluteURL(e){return this.PROTOCOL_REGEXP.test(e)}static isRelativePath(e){return !/^(?:[a-zA-Z]+:)?\//.test(e)}};function JR(e){return Object.prototype.toString.call(e)==="[object Object]"}function Fn(e){if(JR(e)===false)return false;let t=e.constructor;if(t===void 0)return true;let n=t.prototype;return !(JR(n)===false||Object.hasOwn(n,"isPrototypeOf")===false)}var Oz=(function(e){return e[e.SILENT=4]="SILENT",e[e.ERROR=3]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=1]="INFO",e[e.DEBUG=0]="DEBUG",e})({}),hd=class oT{verbosity;static Verbosity=Oz;static DEFAULT_INSTANCE=new oT(1);constructor(t){this.verbosity=t;}debug(t){this.verbosity<=0&&console.debug(t);}info(t){this.verbosity<=1&&console.info(t);}warn(t){this.verbosity<=2&&console.warn(t);}error(t){this.verbosity<=3&&console.error(t);}};function kz(e){var t=e[0],n=e[1],o=e[2],r=e[3],i=e[4],s=e[5],a=e[6],c=e[7],u=e[8],l=e[9],m=e[10],h=e[11],y=e[12],b=e[13],p=e[14],S=e[15],d=t*s-n*i,_=t*a-o*i,f=n*a-o*s,v=u*b-l*y,x=u*p-m*y,T=l*p-m*b,R=t*T-n*x+o*v,$=i*T-s*x+a*v,E=u*f-l*_+m*d,A=y*f-b*_+p*d;return c*R-r*$+S*E-h*A}function Nz(e,t,n){var o=t[0],r=t[1],i=t[2],s=t[3],a=t[4],c=t[5],u=t[6],l=t[7],m=t[8],h=t[9],y=t[10],b=t[11],p=t[12],S=t[13],d=t[14],_=t[15],f=n[0],v=n[1],x=n[2],T=n[3];return e[0]=f*o+v*a+x*m+T*p,e[1]=f*r+v*c+x*h+T*S,e[2]=f*i+v*u+x*y+T*d,e[3]=f*s+v*l+x*b+T*_,f=n[4],v=n[5],x=n[6],T=n[7],e[4]=f*o+v*a+x*m+T*p,e[5]=f*r+v*c+x*h+T*S,e[6]=f*i+v*u+x*y+T*d,e[7]=f*s+v*l+x*b+T*_,f=n[8],v=n[9],x=n[10],T=n[11],e[8]=f*o+v*a+x*m+T*p,e[9]=f*r+v*c+x*h+T*S,e[10]=f*i+v*u+x*y+T*d,e[11]=f*s+v*l+x*b+T*_,f=n[12],v=n[13],x=n[14],T=n[15],e[12]=f*o+v*a+x*m+T*p,e[13]=f*r+v*c+x*h+T*S,e[14]=f*i+v*u+x*y+T*d,e[15]=f*s+v*l+x*b+T*_,e}function Pz(e,t){var n=t[0],o=t[1],r=t[2],i=t[4],s=t[5],a=t[6],c=t[8],u=t[9],l=t[10];return e[0]=Math.sqrt(n*n+o*o+r*r),e[1]=Math.sqrt(i*i+s*s+a*a),e[2]=Math.sqrt(c*c+u*u+l*l),e}function Az(e,t){var n=new B_(3);Pz(n,t);var o=1/n[0],r=1/n[1],i=1/n[2],s=t[0]*o,a=t[1]*r,c=t[2]*i,u=t[4]*o,l=t[5]*r,m=t[6]*i,h=t[8]*o,y=t[9]*r,b=t[10]*i,p=s+l+b,S=0;return p>0?(S=Math.sqrt(p+1)*2,e[3]=.25*S,e[0]=(m-y)/S,e[1]=(h-c)/S,e[2]=(a-u)/S):s>l&&s>b?(S=Math.sqrt(1+s-l-b)*2,e[3]=(m-y)/S,e[0]=.25*S,e[1]=(a+u)/S,e[2]=(h+c)/S):l>b?(S=Math.sqrt(1+l-s-b)*2,e[3]=(h-c)/S,e[0]=(a+u)/S,e[1]=.25*S,e[2]=(m+y)/S):(S=Math.sqrt(1+b-s-l)*2,e[3]=(a-u)/S,e[0]=(h+c)/S,e[1]=(m+y)/S,e[2]=.25*S),e}var qe=class Vs{static identity(t){return t}static eq(t,n,o=1e-5){if(t.length!==n.length)return false;for(let r=0;r<t.length;r++)if(Math.abs(t[r]-n[r])>o)return false;return true}static clamp(t,n,o){return t<n?n:t>o?o:t}static decodeNormalizedInt(t,n){switch(n){case 5126:return t;case 5123:return t/65535;case 5121:return t/255;case 5122:return Math.max(t/32767,-1);case 5120:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}static encodeNormalizedInt(t,n){switch(n){case 5126:return t;case 5123:return Math.round(Vs.clamp(t,0,1)*65535);case 5121:return Math.round(Vs.clamp(t,0,1)*255);case 5122:return Math.round(Vs.clamp(t,-1,1)*32767);case 5120:return Math.round(Vs.clamp(t,-1,1)*127);default:throw new Error("Invalid component type.")}}static decompose(t,n,o,r){let i=V_([t[0],t[1],t[2]]),s=V_([t[4],t[5],t[6]]),a=V_([t[8],t[9],t[10]]);kz(t)<0&&(i=-i),n[0]=t[12],n[1]=t[13],n[2]=t[14];let c=t.slice(),u=1/i,l=1/s,m=1/a;c[0]*=u,c[1]*=u,c[2]*=u,c[4]*=l,c[5]*=l,c[6]*=l,c[8]*=m,c[9]*=m,c[10]*=m,Az(o,c),r[0]=i,r[1]=s,r[2]=a;}static compose(t,n,o,r){let i=r,s=n[0],a=n[1],c=n[2],u=n[3],l=s+s,m=a+a,h=c+c,y=s*l,b=s*m,p=s*h,S=a*m,d=a*h,_=c*h,f=u*l,v=u*m,x=u*h,T=o[0],R=o[1],$=o[2];return i[0]=(1-(S+_))*T,i[1]=(b+x)*T,i[2]=(p-v)*T,i[3]=0,i[4]=(b-x)*R,i[5]=(1-(y+_))*R,i[6]=(d+f)*R,i[7]=0,i[8]=(p+v)*$,i[9]=(d-f)*$,i[10]=(1-(y+S))*$,i[11]=0,i[12]=t[0],i[13]=t[1],i[14]=t[2],i[15]=1,i}};function Cz(e,t){if(!!e!=!!t)return false;let n=e.getChild(),o=t.getChild();return n===o||n.equals(o)}function Mz(e,t){if(!!e!=!!t)return false;let n=e.values(),o=t.values();if(n.length!==o.length)return false;for(let r=0;r<n.length;r++){let i=n[r],s=o[r];if(i.getChild()!==s.getChild()&&!i.getChild().equals(s.getChild()))return false}return true}function jz(e,t){if(!!e!=!!t)return false;let n=e.keys(),o=t.keys();if(n.length!==o.length)return false;for(let r of n){let i=e.get(r),s=t.get(r);if(!!i!=!!s)return false;let a=i.getChild(),c=s.getChild();if(a!==c&&!a.equals(c))return false}return true}function iT(e,t){if(e===t)return true;if(!!e!=!!t||!e||!t||e.length!==t.length)return false;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return false;return true}function sT(e,t){if(e===t)return true;if(!!e!=!!t)return false;if(!Fn(e)||!Fn(t))return e===t;let n=e,o=t,r=0,i=0,s;for(s in n)r++;for(s in o)i++;if(r!==i)return false;for(s in n){let a=n[s],c=o[s];if(md(a)&&md(c)){if(!iT(a,c))return false}else if(Fn(a)&&Fn(c)){if(!sT(a,c))return false}else if(a!==c)return false}return true}function md(e){return Array.isArray(e)||ArrayBuffer.isView(e)}var Dz="23456789abdegjkmnpqrvwxyzABDEGJKMNPQRVWXYZ",Uz=999,Lz=6,XR=new Set,Fz=function(){let e="";for(let t=0;t<Lz;t++)e+=Dz.charAt(Math.floor(Math.random()*42));return e},qz=function(){for(let e=0;e<Uz;e++){let t=Fz();if(!XR.has(t))return XR.add(t),t}return ""},Wr=e=>e,Vz=new Set,Z_=class extends GR{constructor(e,t=""){super(e),this[Pe].name=t,this.init(),this.dispatchEvent({type:"create"});}getGraph(){return this.graph}getDefaults(){return Object.assign(super.getDefaults(),{name:"",extras:{}})}set(e,t){return Array.isArray(t)&&(t=t.slice()),super.set(e,t)}getName(){return this.get("name")}setName(e){return this.set("name",e)}getExtras(){return this.get("extras")}setExtras(e){return this.set("extras",e)}clone(){let e=this.constructor;return new e(this.graph).copy(this,Wr)}copy(e,t=Wr){for(let n in this[Pe]){let o=this[Pe][n];if(o instanceof Zr)this[Hr].has(n)||o.dispose();else if(o instanceof at||o instanceof Me)for(let r of o.values())r.dispose();else if(o instanceof Qe)for(let r of o.values())r.dispose();}for(let n in e[Pe]){let o=this[Pe][n],r=e[Pe][n];if(r instanceof Zr)this[Hr].has(n)?o.getChild().copy(t(r.getChild()),t):this.setRef(n,t(r.getChild()),r.getAttributes());else if(r instanceof Me||r instanceof at)for(let i of r.values())this.addRef(n,t(i.getChild()),i.getAttributes());else if(r instanceof Qe)for(let i of r.keys()){let s=r.get(i);this.setRefMap(n,i,t(s.getChild()),s.getAttributes());}else Fn(r)?this[Pe][n]=JSON.parse(JSON.stringify(r)):Array.isArray(r)||r instanceof ArrayBuffer||ArrayBuffer.isView(r)?this[Pe][n]=r.slice():this[Pe][n]=r;}return this}equals(e,t=Vz){if(this===e)return true;if(this.propertyType!==e.propertyType)return false;for(let n in this[Pe]){if(t.has(n))continue;let o=this[Pe][n],r=e[Pe][n];if(o instanceof Zr||r instanceof Zr){if(!Cz(o,r))return false}else if(o instanceof Me||r instanceof Me||o instanceof at||r instanceof at){if(!Mz(o,r))return false}else if(o instanceof Qe||r instanceof Qe){if(!jz(o,r))return false}else if(Fn(o)||Fn(r)){if(!sT(o,r))return false}else if(md(o)||md(r)){if(!iT(o,r))return false}else if(o!==r)return false}return true}detach(){return this.graph.disconnectParents(this,e=>e.propertyType!=="Root"),this}listParents(){return this.graph.listParents(this)}},vt=class extends Z_{getDefaults(){return Object.assign(super.getDefaults(),{extensions:new Qe})}getExtension(e){return this.getRefMap("extensions",e)}setExtension(e,t){return t&&t._validateParent(this),this.setRefMap("extensions",e,t)}listExtensions(){return this.listRefMapValues("extensions")}},me=class et extends vt{static Type={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4"};static ComponentType={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,UNSIGNED_INT:5125,FLOAT:5126,FLOAT16:5131,FLOAT64:5130};init(){this.propertyType="Accessor";}getDefaults(){return Object.assign(super.getDefaults(),{array:null,type:et.Type.SCALAR,componentType:et.ComponentType.FLOAT,normalized:false,sparse:false,buffer:null})}static getElementSize(t){switch(t){case et.Type.SCALAR:return 1;case et.Type.VEC2:return 2;case et.Type.VEC3:return 3;case et.Type.VEC4:return 4;case et.Type.MAT2:return 4;case et.Type.MAT3:return 9;case et.Type.MAT4:return 16;default:throw new Error("Unexpected type: "+t)}}static getComponentSize(t){switch(t){case et.ComponentType.BYTE:case et.ComponentType.UNSIGNED_BYTE:return 1;case et.ComponentType.SHORT:case et.ComponentType.UNSIGNED_SHORT:return 2;case et.ComponentType.UNSIGNED_INT:case et.ComponentType.FLOAT:return 4;case et.ComponentType.FLOAT16:return 2;case et.ComponentType.FLOAT64:return 8;default:throw new Error("Unexpected component type: "+t)}}getMinNormalized(t){let n=this.getNormalized(),o=this.getElementSize(),r=this.getComponentType();if(this.getMin(t),n)for(let i=0;i<o;i++)t[i]=qe.decodeNormalizedInt(t[i],r);return t}getMin(t){let n=this.getArray(),o=this.getCount(),r=this.getElementSize();for(let i=0;i<r;i++)t[i]=1/0;for(let i=0;i<o*r;i+=r)for(let s=0;s<r;s++){let a=n[i+s];Number.isFinite(a)&&(t[s]=Math.min(t[s],a));}return t}getMaxNormalized(t){let n=this.getNormalized(),o=this.getElementSize(),r=this.getComponentType();if(this.getMax(t),n)for(let i=0;i<o;i++)t[i]=qe.decodeNormalizedInt(t[i],r);return t}getMax(t){let n=this.get("array"),o=this.getCount(),r=this.getElementSize();for(let i=0;i<r;i++)t[i]=-1/0;for(let i=0;i<o*r;i+=r)for(let s=0;s<r;s++){let a=n[i+s];Number.isFinite(a)&&(t[s]=Math.max(t[s],a));}return t}getCount(){let t=this.get("array");return t?t.length/this.getElementSize():0}getType(){return this.get("type")}setType(t){return this.set("type",t)}getElementSize(){return et.getElementSize(this.get("type"))}getComponentSize(){return this.get("array").BYTES_PER_ELEMENT}getComponentType(){return this.get("componentType")}getNormalized(){return this.get("normalized")}setNormalized(t){return this.set("normalized",t)}getScalar(t){let n=this.getElementSize(),o=this.getComponentType(),r=this.getArray();return this.getNormalized()?qe.decodeNormalizedInt(r[t*n],o):r[t*n]}setScalar(t,n){let o=this.getElementSize(),r=this.getComponentType(),i=this.getArray();return this.getNormalized()?i[t*o]=qe.encodeNormalizedInt(n,r):i[t*o]=n,this}getElement(t,n){let o=this.getNormalized(),r=this.getElementSize(),i=this.getComponentType(),s=this.getArray();for(let a=0;a<r;a++)o?n[a]=qe.decodeNormalizedInt(s[t*r+a],i):n[a]=s[t*r+a];return n}setElement(t,n){let o=this.getNormalized(),r=this.getElementSize(),i=this.getComponentType(),s=this.getArray();for(let a=0;a<r;a++)o?s[t*r+a]=qe.encodeNormalizedInt(n[a],i):s[t*r+a]=n[a];return this}getSparse(){return this.get("sparse")}setSparse(t){return this.set("sparse",t)}getBuffer(){return this.getRef("buffer")}setBuffer(t){return this.setRef("buffer",t)}getArray(){return this.get("array")}setArray(t){return this.set("componentType",t?Bz(t):et.ComponentType.FLOAT),this.set("array",t),this}getByteLength(){let t=this.get("array");return t?t.byteLength:0}};function Bz(e){switch(e.constructor){case Float32Array:return me.ComponentType.FLOAT;case Uint32Array:return me.ComponentType.UNSIGNED_INT;case Uint16Array:return me.ComponentType.UNSIGNED_SHORT;case Uint8Array:return me.ComponentType.UNSIGNED_BYTE;case Int16Array:return me.ComponentType.SHORT;case Int8Array:return me.ComponentType.BYTE;case Float64Array:return me.ComponentType.FLOAT64}if(typeof Float16Array<"u"&&e.constructor===Float16Array)return me.ComponentType.FLOAT16;throw new Error("Unknown accessor componentType.")}var aT=class extends vt{init(){this.propertyType="Animation";}getDefaults(){return Object.assign(super.getDefaults(),{channels:new Me,samplers:new Me})}addChannel(e){return this.addRef("channels",e)}removeChannel(e){return this.removeRef("channels",e)}listChannels(){return this.listRefs("channels")}addSampler(e){return this.addRef("samplers",e)}removeSampler(e){return this.removeRef("samplers",e)}listSamplers(){return this.listRefs("samplers")}},J_=class extends vt{static TargetPath={TRANSLATION:"translation",ROTATION:"rotation",SCALE:"scale",WEIGHTS:"weights"};init(){this.propertyType="AnimationChannel";}getDefaults(){return Object.assign(super.getDefaults(),{targetPath:null,targetNode:null,sampler:null})}getTargetPath(){return this.get("targetPath")}setTargetPath(e){return this.set("targetPath",e)}getTargetNode(){return this.getRef("targetNode")}setTargetNode(e){return this.setRef("targetNode",e)}getSampler(){return this.getRef("sampler")}setSampler(e){return this.setRef("sampler",e)}},gd=class cT extends vt{static Interpolation={LINEAR:"LINEAR",STEP:"STEP",CUBICSPLINE:"CUBICSPLINE"};init(){this.propertyType="AnimationSampler";}getDefaultAttributes(){return Object.assign(super.getDefaults(),{interpolation:cT.Interpolation.LINEAR,input:null,output:null})}getInterpolation(){return this.get("interpolation")}setInterpolation(t){return this.set("interpolation",t)}getInput(){return this.getRef("input")}setInput(t){return this.setRef("input",t,{usage:"OTHER"})}getOutput(){return this.getRef("output")}setOutput(t){return this.setRef("output",t,{usage:"OTHER"})}},uT=class extends vt{init(){this.propertyType="Buffer";}getDefaults(){return Object.assign(super.getDefaults(),{uri:""})}getURI(){return this.get("uri")}setURI(e){return this.set("uri",e)}},_d=class lT extends vt{static Type={PERSPECTIVE:"perspective",ORTHOGRAPHIC:"orthographic"};init(){this.propertyType="Camera";}getDefaults(){return Object.assign(super.getDefaults(),{type:lT.Type.PERSPECTIVE,znear:.1,zfar:100,aspectRatio:null,yfov:Math.PI*2*50/360,xmag:1,ymag:1})}getType(){return this.get("type")}setType(t){return this.set("type",t)}getZNear(){return this.get("znear")}setZNear(t){return this.set("znear",t)}getZFar(){return this.get("zfar")}setZFar(t){return this.set("zfar",t)}getAspectRatio(){return this.get("aspectRatio")}setAspectRatio(t){return this.set("aspectRatio",t)}getYFov(){return this.get("yfov")}setYFov(t){return this.set("yfov",t)}getXMag(){return this.get("xmag")}setXMag(t){return this.set("xmag",t)}getYMag(){return this.get("ymag")}setYMag(t){return this.set("ymag",t)}},ze=class extends Z_{static EXTENSION_NAME;_validateParent(e){if(!this.parentTypes.includes(e.propertyType))throw new Error(`Parent "${e.propertyType}" invalid for child "${this.propertyType}".`)}},Le=class G_ extends vt{static WrapMode={CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,REPEAT:10497};static MagFilter={NEAREST:9728,LINEAR:9729};static MinFilter={NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987};init(){this.propertyType="TextureInfo";}getDefaults(){return Object.assign(super.getDefaults(),{texCoord:0,magFilter:null,minFilter:null,wrapS:G_.WrapMode.REPEAT,wrapT:G_.WrapMode.REPEAT})}getTexCoord(){return this.get("texCoord")}setTexCoord(t){return this.set("texCoord",t)}getMagFilter(){return this.get("magFilter")}setMagFilter(t){return this.set("magFilter",t)}getMinFilter(){return this.get("minFilter")}setMinFilter(t){return this.set("minFilter",t)}getWrapS(){return this.get("wrapS")}setWrapS(t){return this.set("wrapS",t)}getWrapT(){return this.get("wrapT")}setWrapT(t){return this.set("wrapT",t)}},{R:ad,G:cd,B:ud,A:Kz}=Kt,pd=class dT extends vt{static AlphaMode={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};init(){this.propertyType="Material";}getDefaults(){return Object.assign(super.getDefaults(),{alphaMode:dT.AlphaMode.OPAQUE,alphaCutoff:.5,doubleSided:false,baseColorFactor:[1,1,1,1],baseColorTexture:null,baseColorTextureInfo:new Le(this.graph,"baseColorTextureInfo"),emissiveFactor:[0,0,0],emissiveTexture:null,emissiveTextureInfo:new Le(this.graph,"emissiveTextureInfo"),normalScale:1,normalTexture:null,normalTextureInfo:new Le(this.graph,"normalTextureInfo"),occlusionStrength:1,occlusionTexture:null,occlusionTextureInfo:new Le(this.graph,"occlusionTextureInfo"),roughnessFactor:1,metallicFactor:1,metallicRoughnessTexture:null,metallicRoughnessTextureInfo:new Le(this.graph,"metallicRoughnessTextureInfo")})}getDoubleSided(){return this.get("doubleSided")}setDoubleSided(t){return this.set("doubleSided",t)}getAlpha(){return this.get("baseColorFactor")[3]}setAlpha(t){let n=this.get("baseColorFactor").slice();return n[3]=t,this.set("baseColorFactor",n)}getAlphaMode(){return this.get("alphaMode")}setAlphaMode(t){return this.set("alphaMode",t)}getAlphaCutoff(){return this.get("alphaCutoff")}setAlphaCutoff(t){return this.set("alphaCutoff",t)}getBaseColorFactor(){return this.get("baseColorFactor")}setBaseColorFactor(t){return this.set("baseColorFactor",t)}getBaseColorTexture(){return this.getRef("baseColorTexture")}getBaseColorTextureInfo(){return this.getRef("baseColorTexture")?this.getRef("baseColorTextureInfo"):null}setBaseColorTexture(t){return this.setRef("baseColorTexture",t,{channels:ad|cd|ud|Kz,isColor:true})}getEmissiveFactor(){return this.get("emissiveFactor")}setEmissiveFactor(t){return this.set("emissiveFactor",t)}getEmissiveTexture(){return this.getRef("emissiveTexture")}getEmissiveTextureInfo(){return this.getRef("emissiveTexture")?this.getRef("emissiveTextureInfo"):null}setEmissiveTexture(t){return this.setRef("emissiveTexture",t,{channels:ad|cd|ud,isColor:true})}getNormalScale(){return this.get("normalScale")}setNormalScale(t){return this.set("normalScale",t)}getNormalTexture(){return this.getRef("normalTexture")}getNormalTextureInfo(){return this.getRef("normalTexture")?this.getRef("normalTextureInfo"):null}setNormalTexture(t){return this.setRef("normalTexture",t,{channels:ad|cd|ud})}getOcclusionStrength(){return this.get("occlusionStrength")}setOcclusionStrength(t){return this.set("occlusionStrength",t)}getOcclusionTexture(){return this.getRef("occlusionTexture")}getOcclusionTextureInfo(){return this.getRef("occlusionTexture")?this.getRef("occlusionTextureInfo"):null}setOcclusionTexture(t){return this.setRef("occlusionTexture",t,{channels:ad})}getRoughnessFactor(){return this.get("roughnessFactor")}setRoughnessFactor(t){return this.set("roughnessFactor",t)}getMetallicFactor(){return this.get("metallicFactor")}setMetallicFactor(t){return this.set("metallicFactor",t)}getMetallicRoughnessTexture(){return this.getRef("metallicRoughnessTexture")}getMetallicRoughnessTextureInfo(){return this.getRef("metallicRoughnessTexture")?this.getRef("metallicRoughnessTextureInfo"):null}setMetallicRoughnessTexture(t){return this.setRef("metallicRoughnessTexture",t,{channels:cd|ud})}},mT=class extends vt{init(){this.propertyType="Mesh";}getDefaults(){return Object.assign(super.getDefaults(),{weights:[],primitives:new Me})}addPrimitive(e){return this.addRef("primitives",e)}removePrimitive(e){return this.removeRef("primitives",e)}listPrimitives(){return this.listRefs("primitives")}getWeights(){return this.get("weights")}setWeights(e){return this.set("weights",e)}},pT=class extends vt{init(){this.propertyType="Node";}getDefaults(){return Object.assign(super.getDefaults(),{translation:[0,0,0],rotation:[0,0,0,1],scale:[1,1,1],weights:[],camera:null,mesh:null,skin:null,children:new Me})}copy(e,t=Wr){if(t===Wr)throw new Error("Node cannot be copied.");return super.copy(e,t)}getTranslation(){return this.get("translation")}getRotation(){return this.get("rotation")}getScale(){return this.get("scale")}setTranslation(e){return this.set("translation",e)}setRotation(e){return this.set("rotation",e)}setScale(e){return this.set("scale",e)}getMatrix(){return qe.compose(this.get("translation"),this.get("rotation"),this.get("scale"),[])}setMatrix(e){let t=this.get("translation").slice(),n=this.get("rotation").slice(),o=this.get("scale").slice();return qe.decompose(e,t,n,o),this.set("translation",t).set("rotation",n).set("scale",o)}getWorldTranslation(){let e=[0,0,0];return qe.decompose(this.getWorldMatrix(),e,[0,0,0,1],[1,1,1]),e}getWorldRotation(){let e=[0,0,0,1];return qe.decompose(this.getWorldMatrix(),[0,0,0],e,[1,1,1]),e}getWorldScale(){let e=[1,1,1];return qe.decompose(this.getWorldMatrix(),[0,0,0],[0,0,0,1],e),e}getWorldMatrix(){let e=[];for(let o=this;o!=null;o=o.getParentNode())e.push(o);let t,n=e.pop().getMatrix();for(;t=e.pop();)Nz(n,n,t.getMatrix());return n}addChild(e){let t=e.getParentNode();t&&t.removeChild(e);for(let n of e.listParents())n.propertyType==="Scene"&&n.removeChild(e);return this.addRef("children",e)}removeChild(e){return this.removeRef("children",e)}listChildren(){return this.listRefs("children")}getParentNode(){for(let e of this.listParents())if(e.propertyType==="Node")return e;return null}getMesh(){return this.getRef("mesh")}setMesh(e){return this.setRef("mesh",e)}getCamera(){return this.getRef("camera")}setCamera(e){return this.setRef("camera",e)}getSkin(){return this.getRef("skin")}setSkin(e){return this.setRef("skin",e)}getWeights(){return this.get("weights")}setWeights(e){return this.set("weights",e)}traverse(e){e(this);for(let t of this.listChildren())t.traverse(e);return this}},Bs=class fT extends vt{static Mode={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6};init(){this.propertyType="Primitive";}getDefaults(){return Object.assign(super.getDefaults(),{mode:fT.Mode.TRIANGLES,material:null,indices:null,attributes:new Qe,targets:new Me})}getIndices(){return this.getRef("indices")}setIndices(t){return this.setRef("indices",t,{usage:"ELEMENT_ARRAY_BUFFER"})}getAttribute(t){return this.getRefMap("attributes",t)}setAttribute(t,n){return this.setRefMap("attributes",t,n,{usage:"ARRAY_BUFFER"})}listAttributes(){return this.listRefMapValues("attributes")}listSemantics(){return this.listRefMapKeys("attributes")}getMaterial(){return this.getRef("material")}setMaterial(t){return this.setRef("material",t)}getMode(){return this.get("mode")}setMode(t){return this.set("mode",t)}listTargets(){return this.listRefs("targets")}addTarget(t){return this.addRef("targets",t)}removeTarget(t){return this.removeRef("targets",t)}},Gz=class extends Z_{init(){this.propertyType="PrimitiveTarget";}getDefaults(){return Object.assign(super.getDefaults(),{attributes:new Qe})}getAttribute(e){return this.getRefMap("attributes",e)}setAttribute(e,t){return this.setRefMap("attributes",e,t,{usage:"ARRAY_BUFFER"})}listAttributes(){return this.listRefMapValues("attributes")}listSemantics(){return this.listRefMapKeys("attributes")}},hT=class extends vt{init(){this.propertyType="Scene";}getDefaults(){return Object.assign(super.getDefaults(),{children:new Me})}copy(e,t=Wr){if(t===Wr)throw new Error("Scene cannot be copied.");return super.copy(e,t)}addChild(e){let t=e.getParentNode();return t&&t.removeChild(e),this.addRef("children",e)}removeChild(e){return this.removeRef("children",e)}listChildren(){return this.listRefs("children")}traverse(e){for(let t of this.listChildren())t.traverse(e);return this}},gT=class extends vt{init(){this.propertyType="Skin";}getDefaults(){return Object.assign(super.getDefaults(),{skeleton:null,inverseBindMatrices:null,joints:new Me})}getSkeleton(){return this.getRef("skeleton")}setSkeleton(e){return this.setRef("skeleton",e)}getInverseBindMatrices(){return this.getRef("inverseBindMatrices")}setInverseBindMatrices(e){return this.setRef("inverseBindMatrices",e,{usage:"INVERSE_BIND_MATRICES"})}addJoint(e){return this.addRef("joints",e)}removeJoint(e){return this.removeRef("joints",e)}listJoints(){return this.listRefs("joints")}},_T=class extends vt{init(){this.propertyType="Texture";}getDefaults(){return Object.assign(super.getDefaults(),{image:null,mimeType:"",uri:""})}getMimeType(){return this.get("mimeType")||Qt.extensionToMimeType(qn.extension(this.get("uri")))}setMimeType(e){return this.set("mimeType",e)}getURI(){return this.get("uri")}setURI(e){this.set("uri",e);let t=Qt.extensionToMimeType(qn.extension(e));return t&&this.set("mimeType",t),this}getImage(){return this.get("image")}setImage(e){return this.set("image",$e.assertView(e))}getSize(){let e=this.get("image");return e?Qt.getSize(e,this.getMimeType()):null}},X_=class extends vt{_extensions=new Set;init(){this.propertyType="Root";}getDefaults(){return Object.assign(super.getDefaults(),{asset:{generator:`glTF-Transform ${eT}`,version:"2.0"},defaultScene:null,accessors:new Me,animations:new Me,buffers:new Me,cameras:new Me,materials:new Me,meshes:new Me,nodes:new Me,scenes:new Me,skins:new Me,textures:new Me})}constructor(e){super(e),e.addEventListener("node:create",t=>{this._addChildOfRoot(t.target);});}clone(){throw new Error("Root cannot be cloned.")}copy(e,t=Wr){if(t===Wr)throw new Error("Root cannot be copied.");this.set("asset",{...e.get("asset")}),this.setName(e.getName()),this.setExtras({...e.getExtras()}),this.setDefaultScene(e.getDefaultScene()?t(e.getDefaultScene()):null);for(let n of e.listRefMapKeys("extensions")){let o=e.getExtension(n);this.setExtension(n,t(o));}return this}_addChildOfRoot(e){return e instanceof hT?this.addRef("scenes",e):e instanceof pT?this.addRef("nodes",e):e instanceof _d?this.addRef("cameras",e):e instanceof gT?this.addRef("skins",e):e instanceof mT?this.addRef("meshes",e):e instanceof pd?this.addRef("materials",e):e instanceof _T?this.addRef("textures",e):e instanceof aT?this.addRef("animations",e):e instanceof me?this.addRef("accessors",e):e instanceof uT&&this.addRef("buffers",e),this}getAsset(){return this.get("asset")}listExtensionsUsed(){return Array.from(this._extensions)}listExtensionsRequired(){return this.listExtensionsUsed().filter(e=>e.isRequired())}_enableExtension(e){return this._extensions.add(e),this}_disableExtension(e){return this._extensions.delete(e),this}listScenes(){return this.listRefs("scenes")}setDefaultScene(e){return this.setRef("defaultScene",e)}getDefaultScene(){return this.getRef("defaultScene")}listNodes(){return this.listRefs("nodes")}listCameras(){return this.listRefs("cameras")}listSkins(){return this.listRefs("skins")}listMeshes(){return this.listRefs("meshes")}listMaterials(){return this.listRefs("materials")}listTextures(){return this.listRefs("textures")}listAnimations(){return this.listRefs("animations")}listAccessors(){return this.listRefs("accessors")}listBuffers(){return this.listRefs("buffers")}},Hz=class H_{_graph=new q_;_root=new X_(this._graph);_logger=hd.DEFAULT_INSTANCE;static _GRAPH_DOCUMENTS=new WeakMap;static fromGraph(t){return H_._GRAPH_DOCUMENTS.get(t)||null}constructor(){H_._GRAPH_DOCUMENTS.set(this._graph,this);}getRoot(){return this._root}getGraph(){return this._graph}getLogger(){return this._logger}setLogger(t){return this._logger=t,this}clone(){throw new Error("Use 'cloneDocument(source)' from '@gltf-transform/functions'.")}merge(t){throw new Error("Use 'mergeDocuments(target, source)' from '@gltf-transform/functions'.")}async transform(...t){let n=t.map(o=>o.name);for(let o of t)await o(this,{stack:n});return this}hasExtension(t){return this.getRoot().listExtensionsUsed().some(n=>n.extensionName===t)}createExtension(t){let n=t.EXTENSION_NAME;return this.getRoot().listExtensionsUsed().find(o=>o.extensionName===n)||new t(this)}disposeExtension(t){let n=this.getRoot().listExtensionsUsed().find(o=>o.extensionName===t);n&&n.dispose();}createScene(t=""){return new hT(this._graph,t)}createNode(t=""){return new pT(this._graph,t)}createCamera(t=""){return new _d(this._graph,t)}createSkin(t=""){return new gT(this._graph,t)}createMesh(t=""){return new mT(this._graph,t)}createPrimitive(){return new Bs(this._graph)}createPrimitiveTarget(t=""){return new Gz(this._graph,t)}createMaterial(t=""){return new pd(this._graph,t)}createTexture(t=""){return new _T(this._graph,t)}createAnimation(t=""){return new aT(this._graph,t)}createAnimationChannel(t=""){return new J_(this._graph,t)}createAnimationSampler(t=""){return new gd(this._graph,t)}createAccessor(t="",n=null){return n||(n=this.getRoot().listBuffers()[0]),new me(this._graph,t).setBuffer(n)}createBuffer(t=""){return new uT(this._graph,t)}},Ae=class{static EXTENSION_NAME;extensionName="";prereadTypes=[];prewriteTypes=[];readDependencies=[];writeDependencies=[];document;required=false;properties=new Set;_listener;constructor(e){this.document=e,e.getRoot()._enableExtension(this),this._listener=n=>{let o=n,r=o.target;r instanceof ze&&r.extensionName===this.extensionName&&(o.type==="node:create"&&this._addExtensionProperty(r),o.type==="node:dispose"&&this._removeExtensionProperty(r));};let t=e.getGraph();t.addEventListener("node:create",this._listener),t.addEventListener("node:dispose",this._listener);}dispose(){this.document.getRoot()._disableExtension(this);let e=this.document.getGraph();e.removeEventListener("node:create",this._listener),e.removeEventListener("node:dispose",this._listener);for(let t of this.properties)t.dispose();}static register(){}isRequired(){return this.required}setRequired(e){return this.required=e,this}listProperties(){return Array.from(this.properties)}_addExtensionProperty(e){return this.properties.add(e),this}_removeExtensionProperty(e){return this.properties.delete(e),this}install(e,t){return this}preread(e,t){return this}prewrite(e,t){return this}},Zz=class{jsonDoc;buffers=[];bufferViews=[];bufferViewBuffers=[];accessors=[];textures=[];textureInfos=new Map;materials=[];meshes=[];cameras=[];nodes=[];skins=[];animations=[];scenes=[];constructor(e){this.jsonDoc=e;}setTextureInfo(e,t){this.textureInfos.set(e,t),t.texCoord!==void 0&&e.setTexCoord(t.texCoord),t.extras!==void 0&&e.setExtras(t.extras);let n=this.jsonDoc.json.textures[t.index];if(n.sampler===void 0)return;let o=this.jsonDoc.json.samplers[n.sampler];o.magFilter!==void 0&&e.setMagFilter(o.magFilter),o.minFilter!==void 0&&e.setMinFilter(o.minFilter),o.wrapS!==void 0&&e.setWrapS(o.wrapS),o.wrapT!==void 0&&e.setWrapT(o.wrapT);}},WR={logger:hd.DEFAULT_INSTANCE,extensions:[],dependencies:{}},Jz=new Set(["Buffer","Texture","Material","Mesh","Primitive","Node","Scene"]),Xz=class{static read(e,t=WR){let n={...WR,...t},{json:o}=e,r=new Hz().setLogger(n.logger);this.validate(e,n);let i=new Zz(e),s=o.asset,a=r.getRoot().getAsset();s.copyright&&(a.copyright=s.copyright),s.extras&&(a.extras=s.extras),o.extras!==void 0&&r.getRoot().setExtras({...o.extras});let c=o.extensionsUsed||[],u=o.extensionsRequired||[];n.extensions.sort((d,_)=>d.EXTENSION_NAME>_.EXTENSION_NAME?1:-1);for(let d of n.extensions)if(c.includes(d.EXTENSION_NAME)){let _=r.createExtension(d).setRequired(u.includes(d.EXTENSION_NAME)),f=_.prereadTypes.filter(v=>!Jz.has(v));f.length&&n.logger.warn(`Preread hooks for some types (${f.join()}), requested by extension ${_.extensionName}, are unsupported. Please file an issue or a PR.`);for(let v of _.readDependencies)_.install(v,n.dependencies[v]);}let l=o.buffers||[];r.getRoot().listExtensionsUsed().filter(d=>d.prereadTypes.includes("Buffer")).forEach(d=>d.preread(i,"Buffer")),i.buffers=l.map(d=>{let _=r.createBuffer(d.name);return d.extras&&_.setExtras(d.extras),d.uri&&d.uri.indexOf("__")!==0&&_.setURI(d.uri),_}),i.bufferViewBuffers=(o.bufferViews||[]).map((d,_)=>{if(!i.bufferViews[_]){let f=e.json.buffers[d.buffer],v=f.uri?e.resources[f.uri]:e.resources[Xr],x=d.byteOffset||0;i.bufferViews[_]=$e.toView(v,x,d.byteLength);}return i.buffers[d.buffer]});let m=o.accessors||[];i.accessors=m.map(d=>{let _=i.bufferViewBuffers[d.bufferView],f=r.createAccessor(d.name,_).setType(d.type);return d.extras&&f.setExtras(d.extras),d.normalized!==void 0&&f.setNormalized(d.normalized),d.bufferView===void 0||f.setArray(dd(d,i)),f});let h=o.images||[],y=o.textures||[];r.getRoot().listExtensionsUsed().filter(d=>d.prereadTypes.includes("Texture")).forEach(d=>d.preread(i,"Texture")),i.textures=h.map(d=>{let _=r.createTexture(d.name);if(d.extras&&_.setExtras(d.extras),d.bufferView!==void 0){let f=o.bufferViews[d.bufferView],v=e.json.buffers[f.buffer],x=v.uri?e.resources[v.uri]:e.resources[Xr],T=f.byteOffset||0,R=f.byteLength,$=x.slice(T,T+R);_.setImage($);}else d.uri!==void 0&&(_.setImage(e.resources[d.uri]),d.uri.indexOf("__")!==0&&_.setURI(d.uri));if(d.mimeType!==void 0)_.setMimeType(d.mimeType);else if(d.uri){let f=qn.extension(d.uri);_.setMimeType(Qt.extensionToMimeType(f));}return _}),r.getRoot().listExtensionsUsed().filter(d=>d.prereadTypes.includes("Material")).forEach(d=>d.preread(i,"Material")),i.materials=(o.materials||[]).map(d=>{let _=r.createMaterial(d.name);d.extras&&_.setExtras(d.extras),d.alphaMode!==void 0&&_.setAlphaMode(d.alphaMode),d.alphaCutoff!==void 0&&_.setAlphaCutoff(d.alphaCutoff),d.doubleSided!==void 0&&_.setDoubleSided(d.doubleSided);let f=d.pbrMetallicRoughness||{};if(f.baseColorFactor!==void 0&&_.setBaseColorFactor(f.baseColorFactor),d.emissiveFactor!==void 0&&_.setEmissiveFactor(d.emissiveFactor),f.metallicFactor!==void 0&&_.setMetallicFactor(f.metallicFactor),f.roughnessFactor!==void 0&&_.setRoughnessFactor(f.roughnessFactor),f.baseColorTexture!==void 0){let v=f.baseColorTexture,x=i.textures[y[v.index].source];_.setBaseColorTexture(x),i.setTextureInfo(_.getBaseColorTextureInfo(),v);}if(d.emissiveTexture!==void 0){let v=d.emissiveTexture,x=i.textures[y[v.index].source];_.setEmissiveTexture(x),i.setTextureInfo(_.getEmissiveTextureInfo(),v);}if(d.normalTexture!==void 0){let v=d.normalTexture,x=i.textures[y[v.index].source];_.setNormalTexture(x),i.setTextureInfo(_.getNormalTextureInfo(),v),d.normalTexture.scale!==void 0&&_.setNormalScale(d.normalTexture.scale);}if(d.occlusionTexture!==void 0){let v=d.occlusionTexture,x=i.textures[y[v.index].source];_.setOcclusionTexture(x),i.setTextureInfo(_.getOcclusionTextureInfo(),v),d.occlusionTexture.strength!==void 0&&_.setOcclusionStrength(d.occlusionTexture.strength);}if(f.metallicRoughnessTexture!==void 0){let v=f.metallicRoughnessTexture,x=i.textures[y[v.index].source];_.setMetallicRoughnessTexture(x),i.setTextureInfo(_.getMetallicRoughnessTextureInfo(),v);}return _}),r.getRoot().listExtensionsUsed().filter(d=>d.prereadTypes.includes("Mesh")).forEach(d=>d.preread(i,"Mesh"));let b=o.meshes||[];r.getRoot().listExtensionsUsed().filter(d=>d.prereadTypes.includes("Primitive")).forEach(d=>d.preread(i,"Primitive")),i.meshes=b.map(d=>{let _=r.createMesh(d.name);return d.extras&&_.setExtras(d.extras),d.weights!==void 0&&_.setWeights(d.weights),(d.primitives||[]).forEach(f=>{let v=r.createPrimitive();f.extras&&v.setExtras(f.extras),f.material!==void 0&&v.setMaterial(i.materials[f.material]),f.mode!==void 0&&v.setMode(f.mode);for(let[T,R]of Object.entries(f.attributes||{}))v.setAttribute(T,i.accessors[R]);f.indices!==void 0&&v.setIndices(i.accessors[f.indices]);let x=d.extras&&d.extras.targetNames||[];(f.targets||[]).forEach((T,R)=>{let $=x[R]||R.toString(),E=r.createPrimitiveTarget($);for(let[A,N]of Object.entries(T))E.setAttribute(A,i.accessors[N]);v.addTarget(E);}),_.addPrimitive(v);}),_}),i.cameras=(o.cameras||[]).map(d=>{let _=r.createCamera(d.name).setType(d.type);if(d.extras&&_.setExtras(d.extras),d.type===_d.Type.PERSPECTIVE){let f=d.perspective;_.setYFov(f.yfov),_.setZNear(f.znear),f.zfar!==void 0&&_.setZFar(f.zfar),f.aspectRatio!==void 0&&_.setAspectRatio(f.aspectRatio);}else {let f=d.orthographic;_.setZNear(f.znear).setZFar(f.zfar).setXMag(f.xmag).setYMag(f.ymag);}return _});let p=o.nodes||[];r.getRoot().listExtensionsUsed().filter(d=>d.prereadTypes.includes("Node")).forEach(d=>d.preread(i,"Node")),i.nodes=p.map(d=>{let _=r.createNode(d.name);if(d.extras&&_.setExtras(d.extras),d.translation!==void 0&&_.setTranslation(d.translation),d.rotation!==void 0&&_.setRotation(d.rotation),d.scale!==void 0&&_.setScale(d.scale),d.matrix!==void 0){let f=[0,0,0],v=[0,0,0,1],x=[1,1,1];qe.decompose(d.matrix,f,v,x),_.setTranslation(f),_.setRotation(v),_.setScale(x);}return d.weights!==void 0&&_.setWeights(d.weights),_}),i.skins=(o.skins||[]).map(d=>{let _=r.createSkin(d.name);d.extras&&_.setExtras(d.extras),d.inverseBindMatrices!==void 0&&_.setInverseBindMatrices(i.accessors[d.inverseBindMatrices]),d.skeleton!==void 0&&_.setSkeleton(i.nodes[d.skeleton]);for(let f of d.joints)_.addJoint(i.nodes[f]);return _}),p.map((d,_)=>{let f=i.nodes[_];(d.children||[]).forEach(v=>f.addChild(i.nodes[v])),d.mesh!==void 0&&f.setMesh(i.meshes[d.mesh]),d.camera!==void 0&&f.setCamera(i.cameras[d.camera]),d.skin!==void 0&&f.setSkin(i.skins[d.skin]);}),i.animations=(o.animations||[]).map(d=>{let _=r.createAnimation(d.name);d.extras&&_.setExtras(d.extras);let f=(d.samplers||[]).map(v=>{let x=r.createAnimationSampler().setInput(i.accessors[v.input]).setOutput(i.accessors[v.output]).setInterpolation(v.interpolation||gd.Interpolation.LINEAR);return v.extras&&x.setExtras(v.extras),_.addSampler(x),x});return (d.channels||[]).forEach(v=>{let x=r.createAnimationChannel().setSampler(f[v.sampler]).setTargetPath(v.target.path);v.target.node!==void 0&&x.setTargetNode(i.nodes[v.target.node]),v.extras&&x.setExtras(v.extras),_.addChannel(x);}),_});let S=o.scenes||[];return r.getRoot().listExtensionsUsed().filter(d=>d.prereadTypes.includes("Scene")).forEach(d=>d.preread(i,"Scene")),i.scenes=S.map(d=>{let _=r.createScene(d.name);return d.extras&&_.setExtras(d.extras),(d.nodes||[]).map(f=>i.nodes[f]).forEach(f=>_.addChild(f)),_}),o.scene!==void 0&&r.getRoot().setDefaultScene(i.scenes[o.scene]),r.getRoot().listExtensionsUsed().forEach(d=>d.read(i)),m.forEach((d,_)=>{let f=i.accessors[_],v=!!d.sparse,x=!d.bufferView&&!f.getArray();(v||x)&&f.setSparse(true).setArray(Yz(d,i));}),r}static validate(e,t){let n=e.json;if(n.asset.version!=="2.0")throw new Error(`Unsupported glTF version, "${n.asset.version}".`);if(n.extensionsRequired){for(let o of n.extensionsRequired)if(!t.extensions.find(r=>r.EXTENSION_NAME===o))throw new Error(`Missing required extension, "${o}".`)}if(n.extensionsUsed)for(let o of n.extensionsUsed)t.extensions.find(r=>r.EXTENSION_NAME===o)||t.logger.warn(`Missing optional extension, "${o}".`);}};function Wz(e,t){let n=t.jsonDoc,o=t.bufferViews[e.bufferView],r=n.json.bufferViews[e.bufferView],i=fd[e.componentType],s=me.getElementSize(e.type),a=i.BYTES_PER_ELEMENT,c=e.byteOffset||0,u=new i(e.count*s),l=new DataView(o.buffer,o.byteOffset,o.byteLength),m=r.byteStride;for(let h=0;h<e.count;h++)for(let y=0;y<s;y++){let b=c+h*m+y*a,p;switch(e.componentType){case me.ComponentType.FLOAT:p=l.getFloat32(b,true);break;case me.ComponentType.UNSIGNED_INT:p=l.getUint32(b,true);break;case me.ComponentType.UNSIGNED_SHORT:p=l.getUint16(b,true);break;case me.ComponentType.UNSIGNED_BYTE:p=l.getUint8(b);break;case me.ComponentType.SHORT:p=l.getInt16(b,true);break;case me.ComponentType.BYTE:p=l.getInt8(b);break;case me.ComponentType.FLOAT16:p=l.getFloat16(b,true);break;case me.ComponentType.FLOAT64:p=l.getFloat64(b,true);break;default:throw new Error(`Unexpected componentType "${e.componentType}".`)}u[h*s+y]=p;}return u}function dd(e,t){let n=t.jsonDoc,o=t.bufferViews[e.bufferView],r=n.json.bufferViews[e.bufferView],i=fd[e.componentType],s=me.getElementSize(e.type),a=i.BYTES_PER_ELEMENT,c=s*a;if(r.byteStride!==void 0&&r.byteStride!==c)return Wz(e,t);let u=o.byteOffset+(e.byteOffset||0),l=e.count*s*a;return new i(o.buffer.slice(u,u+l))}function Yz(e,t){let n=fd[e.componentType],o=me.getElementSize(e.type),r;e.bufferView!==void 0?r=dd(e,t):r=new n(e.count*o);let i=e.sparse;if(!i)return r;let s=i.count,a={...e,...i.indices,count:s,type:"SCALAR"},c={...e,...i.values,count:s},u=dd(a,t),l=dd(c,t);for(let m=0;m<a.count;m++)for(let h=0;h<o;h++)r[u[m]*o+h]=l[m*o+h];return r}var vT=(function(e){return e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e})(vT||{}),Jr=class{_doc;jsonDoc;options;static BufferViewTarget=vT;static BufferViewUsage=Rz;static USAGE_TO_TARGET={ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963};accessorIndexMap=new Map;animationIndexMap=new Map;bufferIndexMap=new Map;cameraIndexMap=new Map;skinIndexMap=new Map;materialIndexMap=new Map;meshIndexMap=new Map;nodeIndexMap=new Map;imageIndexMap=new Map;textureDefIndexMap=new Map;textureInfoDefMap=new Map;samplerDefIndexMap=new Map;sceneIndexMap=new Map;imageBufferViews=[];otherBufferViews=new Map;otherBufferViewsIndexMap=new Map;extensionData={};bufferURIGenerator;imageURIGenerator;logger;_accessorUsageMap=new Map;accessorUsageGroupedByParent=new Set(["ARRAY_BUFFER"]);accessorParents=new Map;constructor(e,t,n){this._doc=e,this.jsonDoc=t,this.options=n;let o=e.getRoot(),r=o.listBuffers().length,i=o.listTextures().length;this.bufferURIGenerator=new YR(r>1,()=>n.basename||"buffer"),this.imageURIGenerator=new YR(i>1,s=>Qz(e,s)||n.basename||"texture"),this.logger=e.getLogger();}createTextureInfoDef(e,t){let n={magFilter:t.getMagFilter()||void 0,minFilter:t.getMinFilter()||void 0,wrapS:t.getWrapS(),wrapT:t.getWrapT()},o=JSON.stringify(n);this.samplerDefIndexMap.has(o)||(this.samplerDefIndexMap.set(o,this.jsonDoc.json.samplers.length),this.jsonDoc.json.samplers.push(n));let r={source:this.imageIndexMap.get(e),sampler:this.samplerDefIndexMap.get(o)},i=JSON.stringify(r);this.textureDefIndexMap.has(i)||(this.textureDefIndexMap.set(i,this.jsonDoc.json.textures.length),this.jsonDoc.json.textures.push(r));let s={index:this.textureDefIndexMap.get(i)};return t.getTexCoord()!==0&&(s.texCoord=t.getTexCoord()),Object.keys(t.getExtras()).length>0&&(s.extras=t.getExtras()),this.textureInfoDefMap.set(t,s),s}createPropertyDef(e){let t={};return e.getName()&&(t.name=e.getName()),Object.keys(e.getExtras()).length>0&&(t.extras=e.getExtras()),t}createAccessorDef(e){let t=this.createPropertyDef(e);return t.type=e.getType(),t.componentType=e.getComponentType(),t.count=e.getCount(),this._doc.getGraph().listParentEdges(e).some(n=>n.getName()==="attributes"&&n.getAttributes().key==="POSITION"||n.getName()==="input")&&(t.max=e.getMax([]).map(Math.fround),t.min=e.getMin([]).map(Math.fround)),e.getNormalized()&&(t.normalized=e.getNormalized()),t}createImageData(e,t,n){if(this.options.format==="GLB")this.imageBufferViews.push(t),e.bufferView=this.jsonDoc.json.bufferViews.length,this.jsonDoc.json.bufferViews.push({buffer:0,byteOffset:-1,byteLength:t.byteLength});else {let o=Qt.mimeTypeToExtension(n.getMimeType());e.uri=this.imageURIGenerator.createURI(n,o),this.assignResourceURI(e.uri,t,false);}}assignResourceURI(e,t,n){let o=this.jsonDoc.resources;if(!(e in o)){o[e]=t;return}if(t===o[e]){this.logger.warn(`Duplicate resource URI, "${e}".`);return}let r=`Resource URI "${e}" already assigned to different data.`;if(!n){this.logger.warn(r);return}throw new Error(r)}getAccessorUsage(e){let t=this._accessorUsageMap.get(e);if(t)return t;if(e.getSparse())return "SPARSE";for(let n of this._doc.getGraph().listParentEdges(e)){let{usage:o}=n.getAttributes();if(o)return o;n.getParent().propertyType!=="Root"&&this.logger.warn(`Missing attribute ".usage" on edge, "${n.getName()}".`);}return "OTHER"}addAccessorToUsageGroup(e,t){let n=this._accessorUsageMap.get(e);if(n&&n!==t)throw new Error(`Accessor with usage "${n}" cannot be reused as "${t}".`);return this._accessorUsageMap.set(e,t),this}},YR=class{multiple;basename;counter={};constructor(e,t){this.multiple=e,this.basename=t;}createURI(e,t){if(e.getURI())return e.getURI();if(this.multiple){let n=this.basename(e);return this.counter[n]=this.counter[n]||1,`${n}_${this.counter[n]++}.${t}`}else return `${this.basename(e)}.${t}`}};function Qz(e,t){let n=e.getGraph().listParentEdges(t).find(o=>o.getParent()!==e.getRoot());return n?n.getName().replace(/texture$/i,""):""}var{BufferViewUsage:ld}=Jr,{UNSIGNED_INT:eO,UNSIGNED_SHORT:tO,UNSIGNED_BYTE:rO}=me.ComponentType,nO=new Set(["Accessor","Buffer","Material","Mesh"]),oO=class{static write(e,t){let n=e.getGraph(),o=e.getRoot(),r={asset:{generator:`glTF-Transform ${eT}`,...o.getAsset()},extras:{...o.getExtras()}},i={json:r,resources:{}},s=new Jr(e,i,t),a=t.logger||hd.DEFAULT_INSTANCE,c=new Set(t.extensions.map(p=>p.EXTENSION_NAME)),u=e.getRoot().listExtensionsUsed().filter(p=>c.has(p.extensionName)).sort((p,S)=>p.extensionName>S.extensionName?1:-1),l=e.getRoot().listExtensionsRequired().filter(p=>c.has(p.extensionName)).sort((p,S)=>p.extensionName>S.extensionName?1:-1);u.length<e.getRoot().listExtensionsUsed().length&&a.warn("Some extensions were not registered for I/O, and will not be written.");for(let p of u){let S=p.prewriteTypes.filter(d=>!nO.has(d));S.length&&a.warn(`Prewrite hooks for some types (${S.join()}), requested by extension ${p.extensionName}, are unsupported. Please file an issue or a PR.`);for(let d of p.writeDependencies)p.install(d,t.dependencies[d]);}function m(p,S,d,_){let f=[],v=0;for(let T of p){let R=s.createAccessorDef(T);R.bufferView=r.bufferViews.length;let $=T.getArray(),E=$e.pad($e.toView($));R.byteOffset=v,v+=E.byteLength,f.push(E),s.accessorIndexMap.set(T,r.accessors.length),r.accessors.push(R);}let x={buffer:S,byteOffset:d,byteLength:$e.concat(f).byteLength};return _&&(x.target=_),r.bufferViews.push(x),{buffers:f,byteLength:v}}function h(p,S,d){let _=p[0].getCount(),f=0;for(let $ of p){let E=s.createAccessorDef($);E.bufferView=r.bufferViews.length,E.byteOffset=f;let A=$.getElementSize(),N=$.getComponentSize();f+=$e.padNumber(A*N),s.accessorIndexMap.set($,r.accessors.length),r.accessors.push(E);}let v=_*f,x=new ArrayBuffer(v),T=new DataView(x);for(let $=0;$<_;$++){let E=0;for(let A of p){let N=A.getElementSize(),F=A.getComponentSize(),V=A.getComponentType(),K=A.getArray();for(let ue=0;ue<N;ue++){let ke=$*f+E+ue*F,xe=K[$*N+ue];switch(V){case me.ComponentType.FLOAT:T.setFloat32(ke,xe,true);break;case me.ComponentType.BYTE:T.setInt8(ke,xe);break;case me.ComponentType.SHORT:T.setInt16(ke,xe,true);break;case me.ComponentType.UNSIGNED_BYTE:T.setUint8(ke,xe);break;case me.ComponentType.UNSIGNED_SHORT:T.setUint16(ke,xe,true);break;case me.ComponentType.UNSIGNED_INT:T.setUint32(ke,xe,true);break;case me.ComponentType.FLOAT16:T.setFloat16(ke,xe,true);break;case me.ComponentType.FLOAT64:T.setFloat64(ke,xe,true);break;default:throw new Error("Unexpected component type: "+V)}}E+=$e.padNumber(N*F);}}let R={buffer:S,byteOffset:d,byteLength:v,byteStride:f,target:Jr.BufferViewTarget.ARRAY_BUFFER};return r.bufferViews.push(R),{byteLength:v,buffers:[new Uint8Array(x)]}}function y(p,S,d){let _=[],f=0,v=new Map,x=-1/0,T=false;for(let V of p){let K=s.createAccessorDef(V);r.accessors.push(K),s.accessorIndexMap.set(V,r.accessors.length-1);let ue=[],ke=[],xe=[],Ve=new Array(V.getElementSize()).fill(0);for(let B=0,w=V.getCount();B<w;B++)if(V.getElement(B,xe),!qe.eq(xe,Ve,0)){x=Math.max(B,x),ue.push(B);for(let O=0;O<xe.length;O++)ke.push(xe[O]);}let be=ue.length,k={accessorDef:K,count:be};if(v.set(V,k),be===0)continue;be>V.getCount()/2&&(T=true);let U=fd[V.getComponentType()];k.indices=ue,k.values=new U(ke);}if(!Number.isFinite(x))return {buffers:_,byteLength:f};T&&a.warn("Some sparse accessors have >50% non-zero elements, which may increase file size.");let R=x<255?Uint8Array:x<65535?Uint16Array:Uint32Array,$=x<255?rO:x<65535?tO:eO,E={buffer:S,byteOffset:d+f,byteLength:0};for(let V of p){let K=v.get(V);if(K.count===0)continue;K.indicesByteOffset=E.byteLength;let ue=$e.pad($e.toView(new R(K.indices)));_.push(ue),f+=ue.byteLength,E.byteLength+=ue.byteLength;}r.bufferViews.push(E);let A=r.bufferViews.length-1,N={buffer:S,byteOffset:d+f,byteLength:0};for(let V of p){let K=v.get(V);if(K.count===0)continue;K.valuesByteOffset=N.byteLength;let ue=$e.pad($e.toView(K.values));_.push(ue),f+=ue.byteLength,N.byteLength+=ue.byteLength;}r.bufferViews.push(N);let F=r.bufferViews.length-1;for(let V of p){let K=v.get(V);K.count!==0&&(K.accessorDef.sparse={count:K.count,indices:{bufferView:A,byteOffset:K.indicesByteOffset,componentType:$},values:{bufferView:F,byteOffset:K.valuesByteOffset}});}return {buffers:_,byteLength:f}}if(r.accessors=[],r.bufferViews=[],r.samplers=[],r.textures=[],r.images=o.listTextures().map((p,S)=>{let d=s.createPropertyDef(p);p.getMimeType()&&(d.mimeType=p.getMimeType());let _=p.getImage();return _&&s.createImageData(d,_,p),s.imageIndexMap.set(p,S),d}),u.filter(p=>p.prewriteTypes.includes("Accessor")).forEach(p=>p.prewrite(s,"Accessor")),o.listAccessors().forEach(p=>{let S=s.accessorUsageGroupedByParent,d=s.accessorParents;if(s.accessorIndexMap.has(p))return;let _=s.getAccessorUsage(p);if(s.addAccessorToUsageGroup(p,_),S.has(_)){let f=n.listParents(p).find(v=>v.propertyType!=="Root");d.set(p,f);}}),u.filter(p=>p.prewriteTypes.includes("Buffer")).forEach(p=>p.prewrite(s,"Buffer")),(o.listAccessors().length>0||s.otherBufferViews.size>0||o.listTextures().length>0&&t.format==="GLB")&&o.listBuffers().length===0)throw new Error("Buffer required for Document resources, but none was found.");r.buffers=[],o.listBuffers().forEach((p,S)=>{let d=s.createPropertyDef(p),_=s.accessorUsageGroupedByParent,f=p.listParents().filter(A=>A instanceof me),v=new Set(f.map(A=>s.accessorParents.get(A))),x=new Map(Array.from(v).map((A,N)=>[A,N])),T={};for(let A of f){if(s.accessorIndexMap.has(A))continue;let N=s.getAccessorUsage(A),F=N;if(_.has(N)){let V=s.accessorParents.get(A);F+=`:${x.get(V)}`;}T[F]||={usage:N,accessors:[]},T[F].accessors.push(A);}let R=[],$=r.buffers.length,E=0;for(let{usage:A,accessors:N}of Object.values(T))if(A===ld.ARRAY_BUFFER&&t.vertexLayout==="interleaved"){let F=h(N,$,E);E+=F.byteLength;for(let V of F.buffers)R.push(V);}else if(A===ld.ARRAY_BUFFER)for(let F of N){let V=h([F],$,E);E+=V.byteLength;for(let K of V.buffers)R.push(K);}else if(A===ld.SPARSE){let F=y(N,$,E);E+=F.byteLength;for(let V of F.buffers)R.push(V);}else if(A===ld.ELEMENT_ARRAY_BUFFER){let F=Jr.BufferViewTarget.ELEMENT_ARRAY_BUFFER,V=m(N,$,E,F);E+=V.byteLength;for(let K of V.buffers)R.push(K);}else {let F=m(N,$,E);E+=F.byteLength;for(let V of F.buffers)R.push(V);}if(s.imageBufferViews.length&&S===0){for(let A=0;A<s.imageBufferViews.length;A++)if(r.bufferViews[r.images[A].bufferView].byteOffset=E,E+=s.imageBufferViews[A].byteLength,R.push(s.imageBufferViews[A]),E%8){let N=8-E%8;E+=N,R.push(new Uint8Array(N));}}if(s.otherBufferViews.has(p))for(let A of s.otherBufferViews.get(p))r.bufferViews.push({buffer:$,byteOffset:E,byteLength:A.byteLength}),s.otherBufferViewsIndexMap.set(A,r.bufferViews.length-1),E+=A.byteLength,R.push(A);if(E){let A;t.format==="GLB"?A=Xr:(A=s.bufferURIGenerator.createURI(p,"bin"),d.uri=A),d.byteLength=E,s.assignResourceURI(A,$e.concat(R),true);}r.buffers.push(d),s.bufferIndexMap.set(p,S);}),o.listAccessors().find(p=>!p.getBuffer())&&a.warn("Skipped writing one or more Accessors: no Buffer assigned."),u.filter(p=>p.prewriteTypes.includes("Material")).forEach(p=>p.prewrite(s,"Material")),r.materials=o.listMaterials().map((p,S)=>{let d=s.createPropertyDef(p);if(p.getAlphaMode()!==pd.AlphaMode.OPAQUE&&(d.alphaMode=p.getAlphaMode()),p.getAlphaMode()===pd.AlphaMode.MASK&&(d.alphaCutoff=p.getAlphaCutoff()),p.getDoubleSided()&&(d.doubleSided=true),d.pbrMetallicRoughness={},qe.eq(p.getBaseColorFactor(),[1,1,1,1])||(d.pbrMetallicRoughness.baseColorFactor=p.getBaseColorFactor()),qe.eq(p.getEmissiveFactor(),[0,0,0])||(d.emissiveFactor=p.getEmissiveFactor()),p.getRoughnessFactor()!==1&&(d.pbrMetallicRoughness.roughnessFactor=p.getRoughnessFactor()),p.getMetallicFactor()!==1&&(d.pbrMetallicRoughness.metallicFactor=p.getMetallicFactor()),p.getBaseColorTexture()){let _=p.getBaseColorTexture(),f=p.getBaseColorTextureInfo();d.pbrMetallicRoughness.baseColorTexture=s.createTextureInfoDef(_,f);}if(p.getEmissiveTexture()){let _=p.getEmissiveTexture(),f=p.getEmissiveTextureInfo();d.emissiveTexture=s.createTextureInfoDef(_,f);}if(p.getNormalTexture()){let _=p.getNormalTexture(),f=p.getNormalTextureInfo(),v=s.createTextureInfoDef(_,f);p.getNormalScale()!==1&&(v.scale=p.getNormalScale()),d.normalTexture=v;}if(p.getOcclusionTexture()){let _=p.getOcclusionTexture(),f=p.getOcclusionTextureInfo(),v=s.createTextureInfoDef(_,f);p.getOcclusionStrength()!==1&&(v.strength=p.getOcclusionStrength()),d.occlusionTexture=v;}if(p.getMetallicRoughnessTexture()){let _=p.getMetallicRoughnessTexture(),f=p.getMetallicRoughnessTextureInfo();d.pbrMetallicRoughness.metallicRoughnessTexture=s.createTextureInfoDef(_,f);}return s.materialIndexMap.set(p,S),d}),u.filter(p=>p.prewriteTypes.includes("Mesh")).forEach(p=>p.prewrite(s,"Mesh")),r.meshes=o.listMeshes().map((p,S)=>{let d=s.createPropertyDef(p),_=null;return d.primitives=p.listPrimitives().map(f=>{let v={attributes:{}};v.mode=f.getMode();let x=f.getMaterial();x&&(v.material=s.materialIndexMap.get(x)),Object.keys(f.getExtras()).length&&(v.extras=f.getExtras());let T=f.getIndices();T&&(v.indices=s.accessorIndexMap.get(T));for(let R of f.listSemantics())v.attributes[R]=s.accessorIndexMap.get(f.getAttribute(R));for(let R of f.listTargets()){let $={};for(let E of R.listSemantics())$[E]=s.accessorIndexMap.get(R.getAttribute(E));v.targets=v.targets||[],v.targets.push($);}return f.listTargets().length&&!_&&(_=f.listTargets().map(R=>R.getName())),v}),p.getWeights().length&&(d.weights=p.getWeights()),_&&(d.extras=d.extras||{},d.extras.targetNames=_),s.meshIndexMap.set(p,S),d}),r.cameras=o.listCameras().map((p,S)=>{let d=s.createPropertyDef(p);if(d.type=p.getType(),d.type===_d.Type.PERSPECTIVE){d.perspective={znear:p.getZNear(),zfar:p.getZFar(),yfov:p.getYFov()};let _=p.getAspectRatio();_!==null&&(d.perspective.aspectRatio=_);}else d.orthographic={znear:p.getZNear(),zfar:p.getZFar(),xmag:p.getXMag(),ymag:p.getYMag()};return s.cameraIndexMap.set(p,S),d}),r.nodes=o.listNodes().map((p,S)=>{let d=s.createPropertyDef(p);return qe.eq(p.getTranslation(),[0,0,0])||(d.translation=p.getTranslation()),qe.eq(p.getRotation(),[0,0,0,1])||(d.rotation=p.getRotation()),qe.eq(p.getScale(),[1,1,1])||(d.scale=p.getScale()),p.getWeights().length&&(d.weights=p.getWeights()),s.nodeIndexMap.set(p,S),d}),r.skins=o.listSkins().map((p,S)=>{let d=s.createPropertyDef(p),_=p.getInverseBindMatrices();_&&(d.inverseBindMatrices=s.accessorIndexMap.get(_));let f=p.getSkeleton();return f&&(d.skeleton=s.nodeIndexMap.get(f)),d.joints=p.listJoints().map(v=>s.nodeIndexMap.get(v)),s.skinIndexMap.set(p,S),d}),o.listNodes().forEach((p,S)=>{let d=r.nodes[S],_=p.getMesh();_&&(d.mesh=s.meshIndexMap.get(_));let f=p.getCamera();f&&(d.camera=s.cameraIndexMap.get(f));let v=p.getSkin();v&&(d.skin=s.skinIndexMap.get(v)),p.listChildren().length>0&&(d.children=p.listChildren().map(x=>s.nodeIndexMap.get(x)));}),r.animations=o.listAnimations().map((p,S)=>{let d=s.createPropertyDef(p),_=new Map;return d.samplers=p.listSamplers().map((f,v)=>{let x=s.createPropertyDef(f);return x.input=s.accessorIndexMap.get(f.getInput()),x.output=s.accessorIndexMap.get(f.getOutput()),x.interpolation=f.getInterpolation(),_.set(f,v),x}),d.channels=p.listChannels().map(f=>{let v=s.createPropertyDef(f);return v.sampler=_.get(f.getSampler()),v.target={node:s.nodeIndexMap.get(f.getTargetNode()),path:f.getTargetPath()},v}),s.animationIndexMap.set(p,S),d}),r.scenes=o.listScenes().map((p,S)=>{let d=s.createPropertyDef(p);return d.nodes=p.listChildren().map(_=>s.nodeIndexMap.get(_)),s.sceneIndexMap.set(p,S),d});let b=o.getDefaultScene();return b&&(r.scene=o.listScenes().indexOf(b)),r.extensionsUsed=u.map(p=>p.extensionName),r.extensionsRequired=l.map(p=>p.extensionName),u.forEach(p=>p.write(s)),iO(r),i}};function iO(e){let t=[];for(let n in e){let o=e[n];(Array.isArray(o)&&o.length===0||o===null||o===""||o&&typeof o=="object"&&Object.keys(o).length===0)&&t.push(n);}for(let n of t)delete e[n];}var sO=class{_logger=hd.DEFAULT_INSTANCE;_extensions=new Set;_dependencies={};_vertexLayout="interleaved";_strictResources=true;lastReadBytes=0;lastWriteBytes=0;setLogger(e){return this._logger=e,this}registerExtensions(e){for(let t of e)this._extensions.add(t),t.register();return this}registerDependencies(e){return Object.assign(this._dependencies,e),this}setVertexLayout(e){return this._vertexLayout=e,this}setStrictResources(e){return this._strictResources=e,this}async read(e){return await this.readJSON(await this.readAsJSON(e))}async readAsJSON(e){let t=await this.readURI(e,"view");this.lastReadBytes=t.byteLength;let n=QR(t)?this._binaryToJSON(t):{json:JSON.parse($e.decodeText(t)),resources:{}};return await this._readResourcesExternal(n,this.dirname(e)),this._readResourcesInternal(n),n}async readJSON(e){return e=this._copyJSON(e),this._readResourcesInternal(e),Xz.read(e,{extensions:Array.from(this._extensions),dependencies:this._dependencies,logger:this._logger})}async binaryToJSON(e){let t=this._binaryToJSON($e.assertView(e));this._readResourcesInternal(t);let n=t.json;if(n.buffers&&n.buffers.some(o=>aO(t,o)))throw new Error("Cannot resolve external buffers with binaryToJSON().");if(n.images&&n.images.some(o=>cO(t,o)))throw new Error("Cannot resolve external images with binaryToJSON().");return t}async readBinary(e){return this.readJSON(await this.binaryToJSON($e.assertView(e)))}async writeJSON(e,t={}){if(t.format==="GLB"&&e.getRoot().listBuffers().length>1)throw new Error("GLB must have 0\u20131 buffers.");return oO.write(e,{format:t.format||"GLTF",basename:t.basename||"",logger:this._logger,vertexLayout:this._vertexLayout,dependencies:{...this._dependencies},extensions:Array.from(this._extensions)})}async writeBinary(e){let{json:t,resources:n}=await this.writeJSON(e,{format:"GLB"}),o=new Uint32Array([1179937895,2,12]),r=JSON.stringify(t),i=$e.pad($e.encodeText(r),32),s=$e.toView(new Uint32Array([i.byteLength,1313821514])),a=$e.concat([s,i]);o[o.length-1]+=a.byteLength;let c=Object.values(n)[0];if(!c||!c.byteLength)return $e.concat([$e.toView(o),a]);let u=$e.pad(c,0),l=$e.toView(new Uint32Array([u.byteLength,5130562])),m=$e.concat([l,u]);return o[o.length-1]+=m.byteLength,$e.concat([$e.toView(o),a,m])}async _readResourcesExternal(e,t){let n=e.json.images||[],o=e.json.buffers||[],r=[...n,...o].map(async i=>{let s=i.uri;if(!s||s.match(/data:/))return Promise.resolve();try{e.resources[s]=await this.readURI(this.resolve(t,s),"view"),this.lastReadBytes+=e.resources[s].byteLength;}catch(a){if(!this._strictResources&&n.includes(i))this._logger.warn(`Failed to load image URI, "${s}". ${a}`),e.resources[s]=null;else throw a}});await Promise.all(r);}_readResourcesInternal(e){function t(n){if(n.uri){if(n.uri in e.resources){$e.assertView(e.resources[n.uri]);return}if(n.uri.match(/data:/)){let o=`__${qz()}.${qn.extension(n.uri)}`;e.resources[o]=$e.createBufferFromDataURI(n.uri),n.uri=o;}}}(e.json.images||[]).forEach(n=>{if(n.bufferView===void 0&&n.uri===void 0)throw new Error("Missing resource URI or buffer view.");t(n);}),(e.json.buffers||[]).forEach(t);}_copyJSON(e){let{images:t,buffers:n}=e.json;return e={json:{...e.json},resources:{...e.resources}},t&&(e.json.images=t.map(o=>({...o}))),n&&(e.json.buffers=n.map(o=>({...o}))),e}_binaryToJSON(e){if(!QR(e))throw new Error("Invalid glTF 2.0 binary.");let t=new Uint32Array(e.buffer,e.byteOffset+12,2);if(t[1]!==1313821514)throw new Error("Missing required GLB JSON chunk.");let n=20,o=t[0],r=$e.decodeText($e.toView(e,n,o)),i=JSON.parse(r),s=n+o;if(e.byteLength<=s)return {json:i,resources:{}};let a=new Uint32Array(e.buffer,e.byteOffset+s,2);if(a[1]!==5130562)return {json:i,resources:{}};let c=a[0],u=$e.toView(e,s+8,c);return {json:i,resources:{[Xr]:u}}}};function aO(e,t){return t.uri!==void 0&&!(t.uri in e.resources)}function cO(e,t){return t.uri!==void 0&&!(t.uri in e.resources)&&t.bufferView===void 0}function QR(e){if(e.byteLength<3*Uint32Array.BYTES_PER_ELEMENT)return false;let t=new Uint32Array(e.buffer,e.byteOffset,3);return t[0]===1179937895&&t[1]===2}var vd=class extends sO{_fetch;_fetchConfig;_init;_fetchEnabled=false;constructor(e=null,t=fr.DEFAULT_INIT){super(),this._fetch=e,this._fetchConfig=t,this._init=this.init();}async init(){return this._init?this._init:Promise.all([import('fs'),import('path')]).then(([e,t])=>{this._fs=e.promises,this._path=t;})}setAllowNetwork(e){if(e&&!this._fetch)throw new Error("NodeIO requires a Fetch API implementation for HTTP requests.");return this._fetchEnabled=e,this}async readURI(e,t){if(await this.init(),fr.isAbsoluteURL(e)){if(!this._fetchEnabled||!this._fetch)throw new Error("Network request blocked. Allow HTTP requests explicitly, if needed.");let n=await this._fetch(e,this._fetchConfig);switch(t){case "view":return new Uint8Array(await n.arrayBuffer());case "text":return n.text()}}else switch(t){case "view":return this._fs.readFile(e);case "text":return this._fs.readFile(e,"utf8")}}resolve(e,t){return fr.isAbsoluteURL(e)||fr.isAbsoluteURL(t)?fr.resolve(e,t):this._path.resolve(e,decodeURIComponent(t))}dirname(e){return fr.isAbsoluteURL(e)?fr.dirname(e):this._path.dirname(e)}async write(e,t){await this.init(),await(e.match(/\.glb$/)?this._writeGLB(e,t):this._writeGLTF(e,t));}async _writeGLTF(e,t){this.lastWriteBytes=0;let{json:n,resources:o}=await this.writeJSON(t,{format:"GLTF",basename:qn.basename(e)}),{_fs:r,_path:i}=this,s=i.dirname(e),a=JSON.stringify(n,null,2);await r.writeFile(e,a),this.lastWriteBytes+=a.length;for(let c of uO(Object.keys(o),10))await Promise.all(c.map(async u=>{if(fr.isAbsoluteURL(u)){if(fr.extension(u)==="bin")throw new Error(`Cannot write buffer to path "${u}".`);return}let l=i.join(s,decodeURIComponent(u));await r.mkdir(i.dirname(l),{recursive:true}),await r.writeFile(l,o[u]),this.lastWriteBytes+=o[u].byteLength;}));}async _writeGLB(e,t){let n=await this.writeBinary(t);await this._fs.writeFile(e,n),this.lastWriteBytes=n.byteLength;}};function uO(e,t){let n=[];for(let o=0,r=e.length;o<r;o+=t){let i=[];for(let s=0;s<t&&o+s<r;s++)i.push(e[o+s]);n.push(i);}return n}function lO(){return {vkFormat:0,typeSize:1,pixelWidth:0,pixelHeight:0,pixelDepth:0,layerCount:0,faceCount:1,levelCount:0,supercompressionScheme:0,levels:[],dataFormatDescriptor:[{vendorId:0,descriptorType:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],keyValue:{},globalData:null}}var Vn=class{constructor(t,n,o,r){this._dataView=void 0,this._littleEndian=void 0,this._offset=void 0,this._dataView=new DataView(t.buffer,t.byteOffset+n,o),this._littleEndian=r,this._offset=0;}_nextUint8(){let t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){let t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){let t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){let t=this._dataView.getUint32(this._offset,this._littleEndian),n=this._dataView.getUint32(this._offset+4,this._littleEndian),o=t+2**32*n;return this._offset+=8,o}_nextInt32(){let t=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint8Array(t){let n=new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+this._offset,t);return this._offset+=t,n}_skip(t){return this._offset+=t,this}_scan(t,n=0){let o=this._offset,r=0;for(;this._dataView.getUint8(this._offset)!==n&&r<t;)r++,this._offset++;return r<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+o,r)}};var yt=[171,75,84,88,32,50,48,187,13,10,26,10];function yT(e){return new TextDecoder().decode(e)}function yd(e){let t=new Uint8Array(e.buffer,e.byteOffset,yt.length);if(t[0]!==yt[0]||t[1]!==yt[1]||t[2]!==yt[2]||t[3]!==yt[3]||t[4]!==yt[4]||t[5]!==yt[5]||t[6]!==yt[6]||t[7]!==yt[7]||t[8]!==yt[8]||t[9]!==yt[9]||t[10]!==yt[10]||t[11]!==yt[11])throw new Error("Missing KTX 2.0 identifier.");let n=lO(),o=17*Uint32Array.BYTES_PER_ELEMENT,r=new Vn(e,yt.length,o,true);n.vkFormat=r._nextUint32(),n.typeSize=r._nextUint32(),n.pixelWidth=r._nextUint32(),n.pixelHeight=r._nextUint32(),n.pixelDepth=r._nextUint32(),n.layerCount=r._nextUint32(),n.faceCount=r._nextUint32(),n.levelCount=r._nextUint32(),n.supercompressionScheme=r._nextUint32();let i=r._nextUint32(),s=r._nextUint32(),a=r._nextUint32(),c=r._nextUint32(),u=r._nextUint64(),l=r._nextUint64(),m=Math.max(n.levelCount,1)*3*8,h=new Vn(e,yt.length+o,m,true);for(let Ee=0,je=Math.max(n.levelCount,1);Ee<je;Ee++)n.levels.push({levelData:new Uint8Array(e.buffer,e.byteOffset+h._nextUint64(),h._nextUint64()),uncompressedByteLength:h._nextUint64()});let y=new Vn(e,i,s,true);y._skip(4);let b=y._nextUint16(),p=y._nextUint16(),S=y._nextUint16(),d=y._nextUint16(),_=y._nextUint8(),f=y._nextUint8(),v=y._nextUint8(),x=y._nextUint8(),T=[y._nextUint8(),y._nextUint8(),y._nextUint8(),y._nextUint8()],R=[y._nextUint8(),y._nextUint8(),y._nextUint8(),y._nextUint8(),y._nextUint8(),y._nextUint8(),y._nextUint8(),y._nextUint8()],E={vendorId:b,descriptorType:p,versionNumber:S,colorModel:_,colorPrimaries:f,transferFunction:v,flags:x,texelBlockDimension:T,bytesPlane:R,samples:[]},F=(d/4-6)/4;for(let Ee=0;Ee<F;Ee++){let je={bitOffset:y._nextUint16(),bitLength:y._nextUint8(),channelType:y._nextUint8(),samplePosition:[y._nextUint8(),y._nextUint8(),y._nextUint8(),y._nextUint8()],sampleLower:Number.NEGATIVE_INFINITY,sampleUpper:Number.POSITIVE_INFINITY};je.channelType&64?(je.sampleLower=y._nextInt32(),je.sampleUpper=y._nextInt32()):(je.sampleLower=y._nextUint32(),je.sampleUpper=y._nextUint32()),E.samples[Ee]=je;}n.dataFormatDescriptor.length=0,n.dataFormatDescriptor.push(E);let V=new Vn(e,a,c,true);for(;V._offset<c;){let Ee=V._nextUint32(),je=V._scan(Ee),I=yT(je);if(n.keyValue[I]=V._nextUint8Array(Ee-je.byteLength-1),I.match(/^ktx/i)){let q=yT(n.keyValue[I]);n.keyValue[I]=q.substring(0,q.lastIndexOf("\0"));}let L=Ee%4?4-Ee%4:0;V._skip(L);}if(l<=0)return n;let K=new Vn(e,u,l,true),ue=K._nextUint16(),ke=K._nextUint16(),xe=K._nextUint32(),Ve=K._nextUint32(),be=K._nextUint32(),k=K._nextUint32(),U=[];for(let Ee=0,je=Math.max(n.levelCount,1);Ee<je;Ee++)U.push({imageFlags:K._nextUint32(),rgbSliceByteOffset:K._nextUint32(),rgbSliceByteLength:K._nextUint32(),alphaSliceByteOffset:K._nextUint32(),alphaSliceByteLength:K._nextUint32()});let B=u+K._offset,w=B+xe,O=w+Ve,j=O+be,Y=new Uint8Array(e.buffer,e.byteOffset+B,xe),ce=new Uint8Array(e.buffer,e.byteOffset+w,Ve),Re=new Uint8Array(e.buffer,e.byteOffset+O,be),pe=new Uint8Array(e.buffer,e.byteOffset+j,k);return n.globalData={endpointCount:ue,selectorCount:ke,imageDescs:U,endpointsData:Y,selectorsData:ce,tablesData:Re,extendedData:pe},n}var Yr="EXT_mesh_gpu_instancing",gr="EXT_mesh_features",xt="EXT_meshopt_compression",ve="EXT_structural_metadata",Sd="EXT_texture_webp",bd="EXT_texture_avif",gO="KHR_accessor_float16",_O="KHR_accessor_float64",Je="KHR_draco_mesh_compression",hr="KHR_lights_punctual",Qr="KHR_materials_anisotropy",en="KHR_materials_clearcoat",tn="KHR_materials_diffuse_transmission",rn="KHR_materials_dispersion",nn="KHR_materials_emissive_strength",on="KHR_materials_ior",sn="KHR_materials_iridescence",an="KHR_materials_pbrSpecularGlossiness",cn="KHR_materials_sheen",un="KHR_materials_specular",ln="KHR_materials_transmission",Yo="KHR_materials_unlit",dn="KHR_materials_volume",kt="KHR_materials_variants",ST="KHR_mesh_primitive_restart",bT="KHR_mesh_quantization",mn="KHR_node_visibility",Rd="KHR_texture_basisu",pn="KHR_texture_transform",Gt="KHR_xmp_json_ld",vO=class extends ze{static EXTENSION_NAME=gr;init(){this.extensionName=gr,this.propertyType="FeatureID",this.parentTypes=["Features"];}getDefaults(){return Object.assign(super.getDefaults(),{nullFeatureId:null,label:"",attribute:null,texture:null,propertyTable:null})}getFeatureCount(){return this.get("featureCount")}setFeatureCount(e){return this.set("featureCount",e)}getNullFeatureID(){return this.get("nullFeatureId")}setNullFeatureID(e){return this.set("nullFeatureId",e)}getLabel(){return this.get("label")}setLabel(e){return this.set("label",e)}getAttribute(){return this.get("attribute")}setAttribute(e){return this.set("attribute",e)}getTexture(){return this.getRef("texture")}setTexture(e){return this.setRef("texture",e)}getPropertyTable(){return this.getRef("propertyTable")}setPropertyTable(e){return this.setRef("propertyTable",e)}},yO=class extends ze{static EXTENSION_NAME=gr;init(){this.extensionName=gr,this.propertyType="FeatureIDTexture",this.parentTypes=["FeatureID"];}getDefaults(){let e=new Le(this.graph,"textureInfo");return e.setMinFilter(Le.MagFilter.NEAREST),e.setMagFilter(Le.MagFilter.NEAREST),Object.assign(super.getDefaults(),{channels:[0],texture:null,textureInfo:e})}getChannels(){return this.get("channels")}setChannels(e){return this.set("channels",e)}getTexture(){return this.getRef("texture")}setTexture(e){return this.setRef("texture",e)}getTextureInfo(){return this.getRef("texture")?this.getRef("textureInfo"):null}},SO=class extends ze{static EXTENSION_NAME=gr;init(){this.extensionName=gr,this.propertyType="Features",this.parentTypes=[ee.PRIMITIVE];}getDefaults(){return Object.assign(super.getDefaults(),{featureIds:new Me([])})}listFeatureIDs(){return this.listRefs("featureIds")}addFeatureID(e){return this.addRef("featureIds",e)}removeFeatureID(e){return this.removeRef("featureIds",e)}},Ks=gr,bO=class extends Ae{extensionName=gr;static EXTENSION_NAME=gr;createFeatures(){return new SO(this.document.getGraph())}createFeatureID(){return new vO(this.document.getGraph())}createFeatureIDTexture(){return new yO(this.document.getGraph())}read(e){return (e.jsonDoc.json.meshes||[]).forEach((t,n)=>{(t.primitives||[]).forEach((o,r)=>{this._readPrimitive(e,n,o,r);});}),this}_readPrimitive(e,t,n,o){if(!n.extensions||!n.extensions[Ks])return;let r=this.createFeatures(),i=n.extensions[Ks];for(let s of i.featureIds){let a=RO(this.document,this,e,s);r.addFeatureID(a);}e.meshes[t].listPrimitives()[o].setExtension(Ks,r);}write(e){let t=e.jsonDoc.json.meshes;if(!t)return this;for(let n of this.document.getRoot().listMeshes()){let o=t[e.meshIndexMap.get(n)];n.listPrimitives().forEach((r,i)=>{let s=o.primitives[i];this._writePrimitive(e,r,s);});}return this}_writePrimitive(e,t,n){let o=t.getExtension(Ks);if(!o)return;let r={featureIds:[]};o.listFeatureIDs().forEach(i=>{r.featureIds.push($O(this.document,e,i));}),n.extensions=n.extensions||{},n.extensions[Ks]=r;}};function RO(e,t,n,o){let r=t.createFeatureID().setFeatureCount(o.featureCount);o.nullFeatureId!==void 0&&r.setNullFeatureID(o.nullFeatureId),o.label!==void 0&&r.setLabel(o.label),o.attribute!==void 0&&r.setAttribute(o.attribute);let i=o.texture;if(i!==void 0){let s=TO(t,n,i);r.setTexture(s);}if(o.propertyTable!==void 0){let s=e.getRoot().getExtension(ve).listPropertyTables();r.setPropertyTable(s[o.propertyTable]);}return r}function TO(e,t,n){let o=e.createFeatureIDTexture(),{json:r}=t.jsonDoc;if(n.channels&&o.setChannels(n.channels),n.index!==void 0){let i=r.textures[n.index].source;o.setTexture(t.textures[i]),t.setTextureInfo(o.getTextureInfo(),n);}return o}function $O(e,t,n){let o=e.getRoot(),r={featureCount:n.getFeatureCount()};if(n.getNullFeatureID()!=null&&(r.nullFeatureId=n.getNullFeatureID()),n.getLabel()&&(r.label=n.getLabel()),n.getAttribute()!=null&&(r.attribute=n.getAttribute()),n.getTexture()){let i=n.getTexture(),s=i.getTexture(),a=i.getTextureInfo();r.texture=t.createTextureInfoDef(s,a);let c=i.getChannels();qe.eq(c,[0])||(r.texture.channels=c);}if(n.getPropertyTable()){let i=o.getExtension(ve),s=n.getPropertyTable();r.propertyTable=i.listPropertyTables().indexOf(s);}return r}var Q_="INSTANCE_ATTRIBUTE",xO=class extends ze{static EXTENSION_NAME=Yr;init(){this.extensionName=Yr,this.propertyType="InstancedMesh",this.parentTypes=[ee.NODE];}getDefaults(){return Object.assign(super.getDefaults(),{attributes:new Qe})}getAttribute(e){return this.getRefMap("attributes",e)}setAttribute(e,t){return this.setRefMap("attributes",e,t,{usage:Q_})}listAttributes(){return this.listRefMapValues("attributes")}listSemantics(){return this.listRefMapKeys("attributes")}},wO=class extends Ae{static EXTENSION_NAME=Yr;extensionName=Yr;prewriteTypes=[ee.ACCESSOR];createInstancedMesh(){return new xO(this.document.getGraph())}read(e){return (e.jsonDoc.json.nodes||[]).forEach((t,n)=>{if(!t.extensions||!t.extensions.EXT_mesh_gpu_instancing)return;let o=t.extensions[Yr],r=this.createInstancedMesh();for(let i in o.attributes)r.setAttribute(i,e.accessors[o.attributes[i]]);e.nodes[n].setExtension(Yr,r);}),this}prewrite(e){e.accessorUsageGroupedByParent.add(Q_);for(let t of this.properties)for(let n of t.listAttributes())e.addAccessorToUsageGroup(n,Q_);return this}write(e){let t=e.jsonDoc;return this.document.getRoot().listNodes().forEach(n=>{let o=n.getExtension(Yr);if(o){let r=e.nodeIndexMap.get(n),i=t.json.nodes[r],s={attributes:{}};o.listSemantics().forEach(a=>{let c=o.getAttribute(a);s.attributes[a]=e.accessorIndexMap.get(c);}),i.extensions=i.extensions||{},i.extensions[Yr]=s;}}),this}},EO=(function(e){return e.QUANTIZE="quantize",e.FILTER="filter",e})({});function IO(e){return !e.extensions||!e.extensions.EXT_meshopt_compression?false:!!e.extensions[xt].fallback}var{BYTE:zO,SHORT:RT,FLOAT:OO}=me.ComponentType,{encodeNormalizedInt:TT,decodeNormalizedInt:ev}=qe;function kO(e,t,n,o){let{filter:r,bits:i}=o,s={array:e.getArray(),byteStride:e.getElementSize()*e.getComponentSize(),componentType:e.getComponentType(),normalized:e.getNormalized()};if(n!=="ATTRIBUTES")return s;if(r!=="NONE"){let a=e.getNormalized()?NO(e):new Float32Array(s.array);switch(r){case "EXPONENTIAL":s.byteStride=e.getElementSize()*4,s.componentType=OO,s.normalized=false,s.array=t.encodeFilterExp(a,e.getCount(),s.byteStride,i);break;case "OCTAHEDRAL":s.byteStride=i>8?8:4,s.componentType=i>8?RT:zO,s.normalized=true,a=e.getElementSize()===3?AO(a):a,s.array=t.encodeFilterOct(a,e.getCount(),s.byteStride,i);break;case "QUATERNION":s.byteStride=8,s.componentType=RT,s.normalized=true,s.array=t.encodeFilterQuat(a,e.getCount(),s.byteStride,i);break;default:throw new Error("Invalid filter.")}s.min=e.getMin([]),s.max=e.getMax([]),e.getNormalized()&&(s.min=s.min.map(c=>ev(c,e.getComponentType())),s.max=s.max.map(c=>ev(c,e.getComponentType()))),s.normalized&&(s.min=s.min.map(c=>TT(c,s.componentType)),s.max=s.max.map(c=>TT(c,s.componentType)));}else s.byteStride%4&&(s.array=PO(s.array,e.getElementSize()),s.byteStride=s.array.byteLength/e.getCount());return s}function NO(e){let t=e.getComponentType(),n=e.getArray(),o=new Float32Array(n.length);for(let r=0;r<n.length;r++)o[r]=ev(n[r],t);return o}function PO(e,t){let n=$e.padNumber(e.BYTES_PER_ELEMENT*t)/e.BYTES_PER_ELEMENT,o=e.length/t,r=new e.constructor(o*n);for(let i=0;i*t<e.length;i++)for(let s=0;s<t;s++)r[i*n+s]=e[i*t+s];return r}function AO(e){let t=new Float32Array(e.length*4/3);for(let n=0,o=e.length/3;n<o;n++)t[n*4]=e[n*3],t[n*4+1]=e[n*3+1],t[n*4+2]=e[n*3+2];return t}function CO(e,t){return t===Jr.BufferViewUsage.ELEMENT_ARRAY_BUFFER?e.listParents().some(n=>n instanceof Bs&&n.getMode()===Bs.Mode.TRIANGLES)?"TRIANGLES":"INDICES":"ATTRIBUTES"}function MO(e,t){let n=t.getGraph().listParentEdges(e).filter(o=>!(o.getParent()instanceof X_));for(let o of n){let r=o.getName(),i=o.getAttributes().key||"",s=o.getParent().propertyType===ee.PRIMITIVE_TARGET;if(r==="indices")return {filter:"NONE"};if(r==="attributes"){if(i==="POSITION")return {filter:"NONE"};if(i==="TEXCOORD_0")return {filter:"NONE"};if(i.startsWith("JOINTS_"))return {filter:"NONE"};if(i.startsWith("WEIGHTS_"))return {filter:"NONE"};if(i==="NORMAL"||i==="TANGENT")return s?{filter:"NONE"}:{filter:"OCTAHEDRAL",bits:8}}if(r==="output"){let a=LT(e);return a==="rotation"?{filter:"QUATERNION",bits:16}:a==="translation"?{filter:"EXPONENTIAL",bits:12}:a==="scale"?{filter:"EXPONENTIAL",bits:12}:{filter:"NONE"}}if(r==="input")return {filter:"NONE"};if(r==="inverseBindMatrices")return {filter:"NONE"}}return {filter:"NONE"}}function LT(e){for(let t of e.listParents())if(t instanceof gd){for(let n of t.listParents())if(n instanceof J_)return n.getTargetPath()}return null}var $T={method:"quantize"},jO=class extends Ae{extensionName=xt;prereadTypes=[ee.BUFFER,ee.PRIMITIVE];prewriteTypes=[ee.BUFFER,ee.ACCESSOR];readDependencies=["meshopt.decoder"];writeDependencies=["meshopt.encoder"];static EXTENSION_NAME=xt;static EncoderMethod=EO;_decoder=null;_decoderFallbackBufferMap=new Map;_encoder=null;_encoderOptions=$T;_encoderFallbackBuffer=null;_encoderBufferViews={};_encoderBufferViewData={};_encoderBufferViewAccessors={};install(e,t){return e==="meshopt.decoder"&&(this._decoder=t),e==="meshopt.encoder"&&(this._encoder=t),this}setEncoderOptions(e){return this._encoderOptions={...$T,...e},this}preread(e,t){if(!this._decoder){if(!this.isRequired())return this;throw new Error(`[${xt}] Please install extension dependency, "meshopt.decoder".`)}if(!this._decoder.supported){if(!this.isRequired())return this;throw new Error(`[${xt}]: Missing WASM support.`)}return t===ee.BUFFER?this._prereadBuffers(e):t===ee.PRIMITIVE&&this._prereadPrimitives(e),this}_prereadBuffers(e){let t=e.jsonDoc;(t.json.bufferViews||[]).forEach((n,o)=>{if(!n.extensions||!n.extensions.EXT_meshopt_compression)return;let r=n.extensions[xt],i=r.byteOffset||0,s=r.byteLength||0,a=r.count,c=r.byteStride,u=new Uint8Array(a*c),l=t.json.buffers[r.buffer],m=l.uri?t.resources[l.uri]:t.resources[Xr],h=$e.toView(m,i,s);this._decoder.decodeGltfBuffer(u,a,c,h,r.mode,r.filter),e.bufferViews[o]=u;});}_prereadPrimitives(e){let t=e.jsonDoc;(t.json.bufferViews||[]).forEach(n=>{if(!n.extensions||!n.extensions.EXT_meshopt_compression)return;let o=n.extensions[xt],r=e.buffers[o.buffer],i=e.buffers[n.buffer],s=t.json.buffers[n.buffer];IO(s)&&this._decoderFallbackBufferMap.set(i,r);});}read(e){if(!this.isRequired())return this;for(let[t,n]of this._decoderFallbackBufferMap){for(let o of t.listParents())o instanceof me&&o.swap(t,n);t.dispose();}return this}prewrite(e,t){return t===ee.ACCESSOR?this._prewriteAccessors(e):t===ee.BUFFER&&this._prewriteBuffers(e),this}_prewriteAccessors(e){let t=e.jsonDoc.json,n=this._encoder,o=this._encoderOptions,r=this.document.getGraph(),i=this.document.createBuffer(),s=this.document.getRoot().listBuffers().indexOf(i),a=1,c=new Map,u=l=>{for(let m of r.listParents(l)){if(m.propertyType===ee.ROOT)continue;let h=c.get(l);return h===void 0&&c.set(l,h=a++),h}return -1};this._encoderFallbackBuffer=i,this._encoderBufferViews={},this._encoderBufferViewData={},this._encoderBufferViewAccessors={};for(let l of this.document.getRoot().listAccessors()){if(LT(l)==="weights"||l.getSparse())continue;let m=e.getAccessorUsage(l),h=e.accessorUsageGroupedByParent.has(m)?u(l):null,y=CO(l,m),b=o.method==="filter"?MO(l,this.document):{filter:"NONE"},p=kO(l,n,y,b),{array:S,byteStride:d}=p,_=l.getBuffer();if(!_)throw new Error(`${xt}: Missing buffer for accessor.`);let f=this.document.getRoot().listBuffers().indexOf(_),v=[m,h,y,b.filter,d,f].join(":"),x=this._encoderBufferViews[v],T=this._encoderBufferViewData[v],R=this._encoderBufferViewAccessors[v];(!x||!T)&&(R=this._encoderBufferViewAccessors[v]=[],T=this._encoderBufferViewData[v]=[],x=this._encoderBufferViews[v]={buffer:s,target:Jr.USAGE_TO_TARGET[m],byteOffset:0,byteLength:0,byteStride:m===Jr.BufferViewUsage.ARRAY_BUFFER?d:void 0,extensions:{[xt]:{buffer:f,byteOffset:0,byteLength:0,mode:y,filter:b.filter!=="NONE"?b.filter:void 0,byteStride:d,count:0}}});let $=e.createAccessorDef(l);$.componentType=p.componentType,$.normalized=p.normalized,$.byteOffset=x.byteLength,$.min&&p.min&&($.min=p.min),$.max&&p.max&&($.max=p.max),e.accessorIndexMap.set(l,t.accessors.length),t.accessors.push($),R.push($),T.push(new Uint8Array(S.buffer,S.byteOffset,S.byteLength)),x.byteLength+=S.byteLength,x.extensions.EXT_meshopt_compression.count+=l.getCount();}}_prewriteBuffers(e){let t=this._encoder;for(let n in this._encoderBufferViews){let o=this._encoderBufferViews[n],r=this._encoderBufferViewData[n],i=this.document.getRoot().listBuffers()[o.extensions[xt].buffer],s=e.otherBufferViews.get(i)||[],{count:a,byteStride:c,mode:u}=o.extensions[xt],l=$e.concat(r),m=t.encodeGltfBuffer(l,a,c,u),h=$e.pad(m);o.extensions[xt].byteLength=m.byteLength,r.length=0,r.push(h),s.push(h),e.otherBufferViews.set(i,s);}}write(e){let t=0;for(let i in this._encoderBufferViews){let s=this._encoderBufferViews[i],a=this._encoderBufferViewData[i][0],c=e.otherBufferViewsIndexMap.get(a),u=this._encoderBufferViewAccessors[i];for(let y of u)y.bufferView=c;let l=e.jsonDoc.json.bufferViews[c],m=l.byteOffset||0;Object.assign(l,s),l.byteOffset=t;let h=l.extensions[xt];h.byteOffset=m,t+=$e.padNumber(s.byteLength);}let n=this._encoderFallbackBuffer,o=e.bufferIndexMap.get(n),r=e.jsonDoc.json.buffers[o];return r.byteLength=t,r.extensions={[xt]:{fallback:true}},n.dispose(),this}},DO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="StructuralMetadata",this.parentTypes=[ee.ROOT];}getDefaults(){return Object.assign(super.getDefaults(),{schema:null,schemaUri:"",propertyTables:new at,propertyTextures:new at,propertyAttributes:new at})}getSchema(){return this.getRef("schema")}setSchema(e){return this.setRef("schema",e)}getSchemaUri(){return this.get("schemaUri")}setSchemaUri(e){return this.set("schemaUri",e)}listPropertyTables(){return this.listRefs("propertyTables")}addPropertyTable(e){return this.addRef("propertyTables",e)}removePropertyTable(e){return this.removeRef("propertyTables",e)}listPropertyTextures(){return this.listRefs("propertyTextures")}addPropertyTexture(e){return this.addRef("propertyTextures",e)}removePropertyTexture(e){return this.removeRef("propertyTextures",e)}listPropertyAttributes(){return this.listRefs("propertyAttributes")}addPropertyAttribute(e){return this.addRef("propertyAttributes",e)}removePropertyAttribute(e){return this.removeRef("propertyAttributes",e)}},UO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="Schema",this.parentTypes=["StructuralMetadata"];}getDefaults(){return Object.assign(super.getDefaults(),{description:"",version:"",classes:new Qe,enums:new Qe})}getId(){return this.get("id")}setId(e){return this.set("id",e)}getDescription(){return this.get("description")}setDescription(e){return this.set("description",e)}getVersion(){return this.get("version")}setVersion(e){return this.set("version",e)}setClass(e,t){return this.setRefMap("classes",e,t)}getClass(e){return this.getRefMap("classes",e)}listClassKeys(){return this.listRefMapKeys("classes")}listClassValues(){return this.listRefMapValues("classes")}setEnum(e,t){return this.setRefMap("enums",e,t)}getEnum(e){return this.getRefMap("enums",e)}listEnumKeys(){return this.listRefMapKeys("enums")}listEnumValues(){return this.listRefMapValues("enums")}},LO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="Class",this.parentTypes=["Schema"];}getDefaults(){return Object.assign(super.getDefaults(),{description:"",properties:new Qe})}getDescription(){return this.get("description")}setDescription(e){return this.set("description",e)}setProperty(e,t){return this.setRefMap("properties",e,t)}getProperty(e){return this.getRefMap("properties",e)}listPropertyKeys(){return this.listRefMapKeys("properties")}listPropertyValues(){return this.listRefMapValues("properties")}},FO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="ClassProperty",this.parentTypes=["Class"];}getDefaults(){return Object.assign(super.getDefaults(),{description:"",componentType:null,enumType:null,array:null,count:null,normalized:null,offset:null,scale:null,max:null,min:null,required:null,noData:null,default:null})}getDescription(){return this.get("description")}setDescription(e){return this.set("description",e)}getType(){return this.get("type")}setType(e){return this.set("type",e)}getComponentType(){return this.get("componentType")}setComponentType(e){return this.set("componentType",e)}getEnumType(){return this.get("enumType")}setEnumType(e){return this.set("enumType",e)}getArray(){return this.get("array")}setArray(e){return this.set("array",e)}getCount(){return this.get("count")}setCount(e){return this.set("count",e)}getNormalized(){return this.get("normalized")}setNormalized(e){return this.set("normalized",e)}getOffset(){return this.get("offset")}setOffset(e){return this.set("offset",e)}getScale(){return this.get("scale")}setScale(e){return this.set("scale",e)}getMax(){return this.get("max")}setMax(e){return this.set("max",e)}getMin(){return this.get("min")}setMin(e){return this.set("min",e)}getRequired(){return this.get("required")}setRequired(e){return this.set("required",e)}getNoData(){return this.get("noData")}setNoData(e){return this.set("noData",e)}getDefault(){return this.get("default")}setDefault(e){return this.set("default",e)}},qO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="Enum",this.parentTypes=["Schema"];}getDefaults(){return Object.assign(super.getDefaults(),{description:"",valueType:"UINT16",values:new at})}getDescription(){return this.get("description")}setDescription(e){return this.set("description",e)}getValueType(){return this.get("valueType")}setValueType(e){return this.set("valueType",e)}listValues(){return this.listRefs("values")}addEnumValue(e){return this.addRef("values",e)}removeEnumValue(e){return this.removeRef("values",e)}},VO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="EnumValue",this.parentTypes=["Enum"];}getDefaults(){return Object.assign(super.getDefaults(),{description:null})}getDescription(){return this.get("description")}setDescription(e){return this.set("description",e)}getValue(){return this.get("value")}setValue(e){return this.set("value",e)}},BO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="PropertyTable",this.parentTypes=["StructuralMetadata"];}getDefaults(){return Object.assign(super.getDefaults(),{properties:new Qe})}getClass(){return this.get("class")}setClass(e){return this.set("class",e)}getCount(){return this.get("count")}setCount(e){return this.set("count",e)}setProperty(e,t){return this.setRefMap("properties",e,t)}getProperty(e){return this.getRefMap("properties",e)}listPropertyKeys(){return this.listRefMapKeys("properties")}listPropertyValues(){return this.listRefMapValues("properties")}},KO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="PropertyTableProperty",this.parentTypes=["PropertyTable"];}getDefaults(){return Object.assign(super.getDefaults(),{arrayOffsets:null,stringOffsets:null,arrayOffsetType:null,stringOffsetType:null,offset:null,scale:null,max:null,min:null})}getValues(){return this.get("values")}setValues(e){return this.set("values",e)}getArrayOffsets(){return this.get("arrayOffsets")}setArrayOffsets(e){return this.set("arrayOffsets",e)}getStringOffsets(){return this.get("stringOffsets")}setStringOffsets(e){return this.set("stringOffsets",e)}getArrayOffsetType(){return this.get("arrayOffsetType")}setArrayOffsetType(e){return this.set("arrayOffsetType",e)}getStringOffsetType(){return this.get("stringOffsetType")}setStringOffsetType(e){return this.set("stringOffsetType",e)}getOffset(){return this.get("offset")}setOffset(e){return this.set("offset",e)}getScale(){return this.get("scale")}setScale(e){return this.set("scale",e)}getMax(){return this.get("max")}setMax(e){return this.set("max",e)}getMin(){return this.get("min")}setMin(e){return this.set("min",e)}},GO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="PropertyTexture",this.parentTypes=["StructuralMetadata"];}getDefaults(){return Object.assign(super.getDefaults(),{properties:new Qe})}getClass(){return this.get("class")}setClass(e){return this.set("class",e)}setProperty(e,t){return this.setRefMap("properties",e,t)}getProperty(e){return this.getRefMap("properties",e)}listPropertyKeys(){return this.listRefMapKeys("properties")}listPropertyValues(){return this.listRefMapValues("properties")}},HO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="PropertyTextureProperty",this.parentTypes=["PropertyTexture"];}getDefaults(){let e=new Le(this.graph,"textureInfo");return e.setMinFilter(Le.MagFilter.NEAREST),e.setMagFilter(Le.MagFilter.NEAREST),Object.assign(super.getDefaults(),{channels:[0],texture:null,textureInfo:e,offset:null,scale:null,max:null,min:null})}getChannels(){return this.get("channels")}setChannels(e){return this.set("channels",e)}getTexture(){return this.getRef("texture")}setTexture(e){return this.setRef("texture",e)}getTextureInfo(){return this.getRef("texture")?this.getRef("textureInfo"):null}getOffset(){return this.get("offset")}setOffset(e){return this.set("offset",e)}getScale(){return this.get("scale")}setScale(e){return this.set("scale",e)}getMax(){return this.get("max")}setMax(e){return this.set("max",e)}getMin(){return this.get("min")}setMin(e){return this.set("min",e)}},ZO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="PropertyAttribute",this.parentTypes=["StructuralMetadata"];}getDefaults(){return Object.assign(super.getDefaults(),{properties:new Qe})}getClass(){return this.get("class")}setClass(e){return this.set("class",e)}setProperty(e,t){return this.setRefMap("properties",e,t)}getProperty(e){return this.getRefMap("properties",e)}listPropertyKeys(){return this.listRefMapKeys("properties")}listPropertyValues(){return this.listRefMapValues("properties")}},JO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="PropertyAttributeProperty",this.parentTypes=["PropertyAttribute"];}getDefaults(){return Object.assign(super.getDefaults(),{offset:null,scale:null,max:null,min:null})}getAttribute(){return this.get("attribute")}setAttribute(e){return this.set("attribute",e)}getOffset(){return this.get("offset")}setOffset(e){return this.set("offset",e)}getScale(){return this.get("scale")}setScale(e){return this.set("scale",e)}getMax(){return this.get("max")}setMax(e){return this.set("max",e)}getMin(){return this.get("min")}setMin(e){return this.set("min",e)}},XO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="NodeStructuralMetadata",this.parentTypes=[ee.NODE];}getDefaults(){return Object.assign(super.getDefaults(),{class:"",properties:{}})}getClass(){return this.get("class")}setClass(e){return this.set("class",e)}getProperties(){return this.get("properties")}setProperties(e){return this.set("properties",e)}},WO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="MeshPrimitiveStructuralMetadata",this.parentTypes=[ee.PRIMITIVE];}getDefaults(){return Object.assign(super.getDefaults(),{propertyTextures:new at,propertyAttributes:new at})}listPropertyTextures(){return this.listRefs("propertyTextures")}addPropertyTexture(e){return this.addRef("propertyTextures",e)}removePropertyTexture(e){return this.removeRef("propertyTextures",e)}listPropertyAttributes(){return this.listRefs("propertyAttributes")}addPropertyAttribute(e){return this.addRef("propertyAttributes",e)}removePropertyAttribute(e){return this.removeRef("propertyAttributes",e)}},YO=class extends Ae{extensionName=ve;static EXTENSION_NAME=ve;prewriteTypes=[ee.BUFFER];prereadTypes=[ee.SCENE];createStructuralMetadata(){return new DO(this.document.getGraph())}createSchema(){return new UO(this.document.getGraph())}createClass(){return new LO(this.document.getGraph())}createClassProperty(){return new FO(this.document.getGraph())}createEnum(){return new qO(this.document.getGraph())}createEnumValue(){return new VO(this.document.getGraph())}createPropertyTable(){return new BO(this.document.getGraph())}createPropertyTableProperty(){return new KO(this.document.getGraph())}createPropertyTexture(){return new GO(this.document.getGraph())}createPropertyTextureProperty(){return new HO(this.document.getGraph())}createPropertyAttribute(){return new ZO(this.document.getGraph())}createPropertyAttributeProperty(){return new JO(this.document.getGraph())}createNodeStructuralMetadata(){return new XO(this.document.getGraph())}createMeshPrimitiveStructuralMetadata(){return new WO(this.document.getGraph())}read(e){return this}preread(e){let t=this.document.getRoot(),{json:n}=e.jsonDoc,o=n.extensions[ve],r=QO(this,e,o);return t.setExtension(ve,r),(n.meshes||[]).forEach((i,s)=>{let a=e.meshes[s].listPrimitives();(i.primitives||[]).forEach((c,u)=>{let l=a[u];this._readPrimitive(r,l,c);});}),(n.nodes||[]).forEach((i,s)=>{this._readNode(e.nodes[s],i);}),this}_readPrimitive(e,t,n){if(!n.extensions||!n.extensions.EXT_structural_metadata)return;let o=this.createMeshPrimitiveStructuralMetadata(),r=n.extensions[ve],i=e.listPropertyTextures(),s=r.propertyTextures||[];for(let u of s){let l=i[u];o.addPropertyTexture(l);}let a=e.listPropertyAttributes(),c=r.propertyAttributes||[];for(let u of c){let l=a[u];o.addPropertyAttribute(l);}t.setExtension(ve,o);}_readNode(e,t){if(!t.extensions||!t.extensions.EXT_structural_metadata)return;let n=t.extensions[ve],o=this.createNodeStructuralMetadata().setClass(n.class).setProperties(n.properties);e.setExtension(ve,o);}write(e){let t=this.document.getRoot(),n=t.getExtension(ve);if(!n)return this;let o=e.jsonDoc.json,r=dk(e,n);o.extensions=o.extensions||{},o.extensions[ve]=r;let i=t.listMeshes(),s=o.meshes;if(s)for(let u of i){let l=s[e.meshIndexMap.get(u)];u.listPrimitives().forEach((m,h)=>{let y=l.primitives[h];this._writePrimitive(n,m,y);});}let a=t.listNodes(),c=o.nodes;if(c)for(let u of a){let l=e.nodeIndexMap.get(u);this._writeNode(u,c[l]);}return this}_writePrimitive(e,t,n){let o=t.getExtension(ve);if(!o)return;let r=e.listPropertyTextures(),i=e.listPropertyAttributes(),s,a,c=o.listPropertyTextures();if(c.length>0){s=[];for(let m of c){let h=r.indexOf(m);if(h>=0)s.push(h);else throw new Error(`${ve}: Invalid property texture in mesh primitive`)}}let u=o.listPropertyAttributes();if(u.length>0){a=[];for(let m of u){let h=i.indexOf(m);if(h>=0)a.push(h);else throw new Error(`${ve}: Invalid property attribute in mesh primitive`)}}let l={propertyTextures:s,propertyAttributes:a};n.extensions=n.extensions||{},n.extensions[ve]=l;}_writeNode(e,t){let n=e.getExtension("EXT_structural_metadata");n&&(t.extensions=t.extensions||{},t.extensions[ve]={class:n.getClass(),properties:n.getProperties()});}prewrite(e,t){return t===ee.BUFFER&&this._prewriteBuffers(e),this}_prewriteBuffers(e){let t=this.document,n=t.getRoot().getExtension(ve);e.jsonDoc.json.bufferViews||=[];for(let o of n.listPropertyTables())for(let r of o.listPropertyValues()){let i=Tk(t,e);i.push(r.getValues());let s=r.getArrayOffsets();s&&i.push(s);let a=r.getStringOffsets();a&&i.push(a);}}};function QO(e,t,n){let o=e.createStructuralMetadata();if(n.schema!==void 0){let a=ek(e,n.schema);o.setSchema(a);}else if(n.schemaUri){let a=n.schemaUri;o.setSchemaUri(a);}let r=n.propertyTextures||[];for(let a of r){let c=ik(e,t,a);o.addPropertyTexture(c);}let i=n.propertyTables||[];for(let a of i){let c=ak(e,t,a);o.addPropertyTable(c);}let s=n.propertyAttributes||[];for(let a of s){let c=uk(e,a);o.addPropertyAttribute(c);}return o}function ek(e,t){let n=e.createSchema().setId(t.id);t.name!==void 0&&n.setName(t.name),t.description!==void 0&&n.setDescription(t.description),t.version!==void 0&&n.setVersion(t.version);let o=t.classes||{};for(let i of Object.keys(o)){let s=o[i];n.setClass(i,tk(e,s));}let r=t.enums||{};for(let i of Object.keys(r))n.setEnum(i,nk(e,r[i]));return n}function tk(e,t){let n=e.createClass();t.name!==void 0&&n.setName(t.name),t.description!==void 0&&n.setDescription(t.description);let o=t.properties||{};for(let r of Object.keys(o)){let i=rk(e,o[r]);n.setProperty(r,i);}return n}function rk(e,t){let n=e.createClassProperty().setType(t.type);return t.name!==void 0&&n.setName(t.name),t.description!==void 0&&n.setDescription(t.description),t.componentType!==void 0&&n.setComponentType(t.componentType),t.enumType!==void 0&&n.setEnumType(t.enumType),t.array!==void 0&&n.setArray(t.array),t.count!==void 0&&n.setCount(t.count),t.normalized!==void 0&&n.setNormalized(t.normalized),t.offset!==void 0&&n.setOffset(t.offset),t.scale!==void 0&&n.setScale(t.scale),t.max!==void 0&&n.setMax(t.max),t.min!==void 0&&n.setMin(t.min),t.required!==void 0&&n.setRequired(t.required),t.noData!==void 0&&n.setNoData(t.noData),t.default!==void 0&&n.setDefault(t.default),n}function nk(e,t){let n=e.createEnum();t.name!==void 0&&n.setName(t.name),t.description!==void 0&&n.setDescription(t.description),t.valueType!==void 0&&n.setValueType(t.valueType);let o=t.values||{};for(let r of o)n.addEnumValue(ok(e,r));return n}function ok(e,t){let n=e.createEnumValue();return t.name!==void 0&&n.setName(t.name),t.description!==void 0&&n.setDescription(t.description),t.value!==void 0&&n.setValue(t.value),n}function ik(e,t,n){let o=e.createPropertyTexture();o.setClass(n.class),n.name!==void 0&&o.setName(n.name);let r=n.properties||{};for(let i of Object.keys(r)){let s=sk(e,t,r[i]);o.setProperty(i,s);}return o}function sk(e,t,n){let o=e.createPropertyTextureProperty(),r=t.jsonDoc.json.textures||[];n.channels&&o.setChannels(n.channels);let i=r[n.index].source;if(i!==void 0){let s=t.textures[i];o.setTexture(s);let a=o.getTextureInfo();a&&t.setTextureInfo(a,n);}return n.offset!==void 0&&o.setOffset(n.offset),n.scale!==void 0&&o.setScale(n.scale),n.max!==void 0&&o.setMax(n.max),n.min!==void 0&&o.setMin(n.min),o}function ak(e,t,n){let o=e.createPropertyTable().setClass(n.class).setCount(n.count);n.name!==void 0&&o.setName(n.name);let r=n.properties||{};for(let i of Object.keys(r)){let s=ck(e,t,r[i]);o.setProperty(i,s);}return o}function ck(e,t,n){let o=e.createPropertyTableProperty(),r=W_(t,n.values);if(o.setValues(r),n.arrayOffsets!==void 0){let i=W_(t,n.arrayOffsets);o.setArrayOffsets(i);}if(n.stringOffsets!==void 0){let i=W_(t,n.stringOffsets);o.setStringOffsets(i);}return n.arrayOffsetType!==void 0&&o.setArrayOffsetType(n.arrayOffsetType),n.stringOffsetType!==void 0&&o.setStringOffsetType(n.stringOffsetType),n.offset!==void 0&&o.setOffset(n.offset),n.scale!==void 0&&o.setScale(n.scale),n.max!==void 0&&o.setMax(n.max),n.min!==void 0&&o.setMin(n.min),o}function uk(e,t){let n=e.createPropertyAttribute();n.setClass(t.class),t.name!==void 0&&n.setName(t.name);let o=t.properties||{};for(let r of Object.keys(o)){let i=lk(e,o[r]);n.setProperty(r,i);}return n}function lk(e,t){let n=e.createPropertyAttributeProperty();return n.setAttribute(t.attribute),t.offset!==void 0&&n.setOffset(t.offset),t.scale!==void 0&&n.setScale(t.scale),t.max!==void 0&&n.setMax(t.max),t.min!==void 0&&n.setMin(t.min),n}function dk(e,t){let n={},o=t.getSchema();o&&(n.schema=mk(o));let r=t.getSchemaUri();r&&(n.schemaUri=r);let i=t.listPropertyTables();if(i.length>0){let c=[];for(let u of i){let l=_k(e,u);c.push(l);}n.propertyTables=c;}let s=t.listPropertyTextures();if(s.length>0){let c=[];for(let u of s){let l=bk(e,u);c.push(l);}n.propertyTextures=c;}let a=t.listPropertyAttributes();if(a.length>0){let c=[];for(let u of a){let l=yk(u);c.push(l);}n.propertyAttributes=c;}return n}function mk(e){let t={id:e.getId()},n=e.listClassKeys();if(n.length>0){t.classes={};for(let r of n){let i=pk(e.getClass(r));t.classes[r]=i;}}let o=e.listEnumKeys();if(o.length>0){t.enums={};for(let r of o){let i=hk(e.getEnum(r));t.enums[r]=i;}}return e.getName()&&(t.name=e.getName()),e.getDescription()&&(t.description=e.getDescription()),e.getVersion()&&(t.version=e.getVersion()),t}function pk(e){let t={},n=e.listPropertyKeys();if(n.length>0){t.properties={};for(let o of n){let r=e.getProperty(o);t.properties[o]=fk(r);}}return e.getName()&&(t.name=e.getName()),e.getDescription()&&(t.description=e.getDescription()),t}function fk(e){let t={type:e.getType()};return e.getArray()&&(t.array=e.getArray()),e.getNormalized()&&(t.normalized=e.getNormalized()),e.getRequired()&&(t.required=e.getRequired()),e.getName()&&(t.name=e.getName()),e.getDescription()&&(t.description=e.getDescription()),e.getComponentType()!=null&&(t.componentType=e.getComponentType()),e.getEnumType()!=null&&(t.enumType=e.getEnumType()),e.getCount()!=null&&(t.count=e.getCount()),e.getOffset()!=null&&(t.offset=e.getOffset()),e.getScale()!=null&&(t.scale=e.getScale()),e.getMax()!=null&&(t.max=e.getMax()),e.getMin()!=null&&(t.min=e.getMin()),e.getNoData()!=null&&(t.noData=e.getNoData()),e.getDefault()!=null&&(t.default=e.getDefault()),t}function hk(e){let t={values:e.listValues().map(gk)};return e.getName()&&(t.name=e.getName()),e.getDescription()&&(t.description=e.getDescription()),e.getValueType()!=="UINT16"&&(t.valueType=e.getValueType()),t}function gk(e){let t={name:e.getName(),value:e.getValue()};return e.getDescription()&&(t.description=e.getDescription()),t}function _k(e,t){let n={class:t.getClass(),count:t.getCount()};t.getName()&&(n.name=t.getName());let o=t.listPropertyKeys();if(o.length>0){n.properties={};for(let r of o){let i=vk(e,t.getProperty(r));n.properties[r]=i;}}return n}function vk(e,t){let n=t.getValues(),o={values:e.otherBufferViewsIndexMap.get(n)};if(t.getArrayOffsets()){let r=t.getArrayOffsets();o.arrayOffsets=e.otherBufferViewsIndexMap.get(r);}if(t.getStringOffsets()){let r=t.getStringOffsets();o.stringOffsets=e.otherBufferViewsIndexMap.get(r);}return t.getArrayOffsetType()!=null&&(o.arrayOffsetType=t.getArrayOffsetType()),t.getStringOffsetType()!=null&&(o.stringOffsetType=t.getStringOffsetType()),t.getOffset()!=null&&(o.offset=t.getOffset()),t.getScale()!=null&&(o.scale=t.getScale()),t.getMax()!=null&&(o.max=t.getMax()),t.getMin()!=null&&(o.min=t.getMin()),o}function yk(e){let t={class:e.getClass()};e.getName()&&(t.name=e.getName());let n=e.listPropertyKeys();if(n.length>0){t.properties={};for(let o of n){let r=Sk(e.getProperty(o));t.properties[o]=r;}}return t}function Sk(e){let t={attribute:e.getAttribute()};return e.getOffset()!=null&&(t.offset=e.getOffset()),e.getScale()!=null&&(t.scale=e.getScale()),e.getMax()!=null&&(t.max=e.getMax()),e.getMin()!=null&&(t.min=e.getMin()),t}function bk(e,t){let n={class:t.getClass()};t.getName()&&(n.name=t.getName());let o=t.listPropertyKeys();if(o.length>0){n.properties={};for(let r of o){let i=Rk(e,t.getProperty(r));n.properties[r]=i;}}return n}function Rk(e,t){let n=t.getTexture(),o=t.getTextureInfo(),r=t.getChannels(),i=e.createTextureInfoDef(n,o);return qe.eq(r,[0])||(i.channels=r),t.getOffset()!=null&&(i.offset=t.getOffset()),t.getScale()!=null&&(i.scale=t.getScale()),t.getMax()!=null&&(i.max=t.getMax()),t.getMin()!=null&&(i.min=t.getMin()),i}function W_(e,t){let n=e.jsonDoc,o=n.json.buffers||[],r=(n.json.bufferViews||[])[t],i=o[r.buffer],s=i.uri?n.resources[i.uri]:n.resources[Xr],a=r.byteOffset||0,c=r.byteLength;return s.slice(a,a+c)}function Tk(e,t){let n=e.getRoot().listBuffers()[0],o=t.otherBufferViews.get(n);return o||(o=[],t.otherBufferViews.set(n,o)),o}var $k=class{match(e){return e.length>=12&&$e.decodeText(e.slice(4,12))==="ftypavif"}getSize(e){if(!this.match(e))return null;let t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=xT(t,0);if(!n)return null;let o=n.end;for(;n=xT(t,o);)if(n.type==="meta")o=n.start+4;else if(n.type==="iprp"||n.type==="ipco")o=n.start;else {if(n.type==="ispe")return [t.getUint32(n.start+4),t.getUint32(n.start+8)];if(n.type==="mdat")break;o=n.end;}return null}getChannels(e){return 4}},xk=class extends Ae{extensionName=bd;prereadTypes=[ee.TEXTURE];static EXTENSION_NAME=bd;static register(){Qt.registerFormat("image/avif",new $k);}preread(e){return (e.jsonDoc.json.textures||[]).forEach(t=>{t.extensions&&t.extensions.EXT_texture_avif&&(t.source=t.extensions[bd].source);}),this}read(e){return this}write(e){let t=e.jsonDoc;return this.document.getRoot().listTextures().forEach(n=>{if(n.getMimeType()==="image/avif"){let o=e.imageIndexMap.get(n);(t.json.textures||[]).forEach(r=>{r.source===o&&(r.extensions=r.extensions||{},r.extensions[bd]={source:r.source},delete r.source);});}}),this}};function xT(e,t){if(e.byteLength<4+t)return null;let n=e.getUint32(t);return e.byteLength<n+t||n<8?null:{type:$e.decodeText(new Uint8Array(e.buffer,e.byteOffset+t+4,4)),start:t+8,end:t+n}}var wk=class{match(e){return e.length>=12&&e[8]===87&&e[9]===69&&e[10]===66&&e[11]===80}getSize(e){let t=$e.decodeText(e.slice(0,4)),n=$e.decodeText(e.slice(8,12));if(t!=="RIFF"||n!=="WEBP")return null;let o=new DataView(e.buffer,e.byteOffset),r=12;for(;r<o.byteLength;){let i=$e.decodeText(new Uint8Array([o.getUint8(r),o.getUint8(r+1),o.getUint8(r+2),o.getUint8(r+3)])),s=o.getUint32(r+4,true);if(i==="VP8 ")return [o.getInt16(r+14,true)&16383,o.getInt16(r+16,true)&16383];if(i==="VP8L"){let a=o.getUint8(r+9),c=o.getUint8(r+10),u=o.getUint8(r+11),l=o.getUint8(r+12);return [1+((c&63)<<8|a),1+((l&15)<<10|u<<2|(c&192)>>6)]}r+=8+s+s%2;}return null}getChannels(e){return 4}},Ek=class extends Ae{extensionName=Sd;prereadTypes=[ee.TEXTURE];static EXTENSION_NAME=Sd;static register(){Qt.registerFormat("image/webp",new wk);}preread(e){return (e.jsonDoc.json.textures||[]).forEach(t=>{t.extensions&&t.extensions.EXT_texture_webp&&(t.source=t.extensions[Sd].source);}),this}read(e){return this}write(e){let t=e.jsonDoc;return this.document.getRoot().listTextures().forEach(n=>{if(n.getMimeType()==="image/webp"){let o=e.imageIndexMap.get(n);(t.json.textures||[]).forEach(r=>{r.source===o&&(r.extensions=r.extensions||{},r.extensions[Sd]={source:r.source},delete r.source);});}}),this}},wT=gO,Ik=class extends Ae{extensionName=wT;static EXTENSION_NAME=wT;read(e){return this}write(e){return this}},ET=_O,zk=class extends Ae{extensionName=ET;static EXTENSION_NAME=ET;read(e){return this}write(e){return this}},rt,FT,qT;function Ok(e,t){let n=new rt.DecoderBuffer;try{if(n.Init(t,t.length),e.GetEncodedGeometryType(n)!==rt.TRIANGULAR_MESH)throw new Error(`[${Je}] Unknown geometry type.`);let o=new rt.Mesh;if(!e.DecodeBufferToMesh(n,o).ok()||o.ptr===0)throw new Error(`[${Je}] Decoding failure.`);return o}finally{rt.destroy(n);}}function kk(e,t){let n=t.num_faces()*3,o,r;if(t.num_points()<=65534){let i=n*Uint16Array.BYTES_PER_ELEMENT;o=rt._malloc(i),e.GetTrianglesUInt16Array(t,i,o),r=new Uint16Array(rt.HEAPU16.buffer,o,n).slice();}else {let i=n*Uint32Array.BYTES_PER_ELEMENT;o=rt._malloc(i),e.GetTrianglesUInt32Array(t,i,o),r=new Uint32Array(rt.HEAPU32.buffer,o,n).slice();}return rt._free(o),r}function Nk(e,t,n,o){let r=qT[o.componentType],i=FT[o.componentType],s=n.num_components(),a=t.num_points()*s,c=a*i.BYTES_PER_ELEMENT,u=rt._malloc(c);e.GetAttributeDataArrayForAllPoints(t,n,r,c,u);let l=new i(rt.HEAPF32.buffer,u,a).slice();return rt._free(u),l}function Pk(e){rt=e,FT={[me.ComponentType.FLOAT]:Float32Array,[me.ComponentType.UNSIGNED_INT]:Uint32Array,[me.ComponentType.UNSIGNED_SHORT]:Uint16Array,[me.ComponentType.UNSIGNED_BYTE]:Uint8Array,[me.ComponentType.SHORT]:Int16Array,[me.ComponentType.BYTE]:Int8Array},qT={[me.ComponentType.FLOAT]:rt.DT_FLOAT32,[me.ComponentType.UNSIGNED_INT]:rt.DT_UINT32,[me.ComponentType.UNSIGNED_SHORT]:rt.DT_UINT16,[me.ComponentType.UNSIGNED_BYTE]:rt.DT_UINT8,[me.ComponentType.SHORT]:rt.DT_INT16,[me.ComponentType.BYTE]:rt.DT_INT8};}var Mt,Ak=(function(e){return e[e.EDGEBREAKER=1]="EDGEBREAKER",e[e.SEQUENTIAL=0]="SEQUENTIAL",e})({}),VT={POSITION:14,NORMAL:10,COLOR:8,TEX_COORD:12,GENERIC:12},IT={decodeSpeed:5,encodeSpeed:5,method:1,quantizationBits:VT,quantizationVolume:"mesh"};function Ck(e){Mt=e;}function Mk(e,t=IT){let n={...IT,...t};n.quantizationBits={...VT,...t.quantizationBits};let o=new Mt.MeshBuilder,r=new Mt.Mesh,i=new Mt.ExpertEncoder(r),s={},a=new Mt.DracoInt8Array,c=e.listTargets().length>0,u=false;for(let p of e.listSemantics()){let S=e.getAttribute(p);if(S.getSparse()){u=true;continue}let d=jk(p),_=Dk(o,S.getComponentType(),r,Mt[d],S.getCount(),S.getElementSize(),S.getArray());if(_===-1)throw new Error(`Error compressing "${p}" attribute.`);if(s[p]=_,n.quantizationVolume==="mesh"||p!=="POSITION")i.SetAttributeQuantization(_,n.quantizationBits[d]);else if(typeof n.quantizationVolume=="object"){let{quantizationVolume:f}=n,v=Math.max(f.max[0]-f.min[0],f.max[1]-f.min[1],f.max[2]-f.min[2]);i.SetAttributeExplicitQuantization(_,n.quantizationBits[d],S.getElementSize(),f.min,v);}else throw new Error("Invalid quantization volume state.")}let l=e.getIndices();if(!l)throw new tv("Primitive must have indices.");o.AddFacesToMesh(r,l.getCount()/3,l.getArray()),i.SetSpeedOptions(n.encodeSpeed,n.decodeSpeed),i.SetTrackEncodedProperties(true),n.method===0||c||u?i.SetEncodingMethod(Mt.MESH_SEQUENTIAL_ENCODING):i.SetEncodingMethod(Mt.MESH_EDGEBREAKER_ENCODING);let m=i.EncodeToDracoBuffer(!(c||u),a);if(m<=0)throw new tv("Error applying Draco compression.");let h=new Uint8Array(m);for(let p=0;p<m;++p)h[p]=a.GetValue(p);let y=i.GetNumberOfEncodedPoints(),b=i.GetNumberOfEncodedFaces()*3;return Mt.destroy(a),Mt.destroy(r),Mt.destroy(o),Mt.destroy(i),{numVertices:y,numIndices:b,data:h,attributeIDs:s}}function jk(e){return e==="POSITION"?"POSITION":e==="NORMAL"?"NORMAL":e.startsWith("COLOR_")?"COLOR":e.startsWith("TEXCOORD_")?"TEX_COORD":"GENERIC"}function Dk(e,t,n,o,r,i,s){switch(t){case me.ComponentType.UNSIGNED_BYTE:return e.AddUInt8Attribute(n,o,r,i,s);case me.ComponentType.BYTE:return e.AddInt8Attribute(n,o,r,i,s);case me.ComponentType.UNSIGNED_SHORT:return e.AddUInt16Attribute(n,o,r,i,s);case me.ComponentType.SHORT:return e.AddInt16Attribute(n,o,r,i,s);case me.ComponentType.UNSIGNED_INT:return e.AddUInt32Attribute(n,o,r,i,s);case me.ComponentType.FLOAT:return e.AddFloatAttribute(n,o,r,i,s);default:throw new Error(`Unexpected component type, "${t}".`)}}var tv=class extends Error{},Uk=class extends Ae{extensionName=Je;prereadTypes=[ee.PRIMITIVE];prewriteTypes=[ee.ACCESSOR];readDependencies=["draco3d.decoder"];writeDependencies=["draco3d.encoder"];static EXTENSION_NAME=Je;static EncoderMethod=Ak;_decoderModule=null;_encoderModule=null;_encoderOptions={};install(e,t){return e==="draco3d.decoder"&&(this._decoderModule=t,Pk(this._decoderModule)),e==="draco3d.encoder"&&(this._encoderModule=t,Ck(this._encoderModule)),this}setEncoderOptions(e){return this._encoderOptions=e,this}preread(e){if(!this._decoderModule)throw new Error(`[${Je}] Please install extension dependency, "draco3d.decoder".`);let t=this.document.getLogger(),n=e.jsonDoc,o=new Map;try{let r=n.json.meshes||[];for(let i of r)for(let s of i.primitives){if(!s.extensions||!s.extensions.KHR_draco_mesh_compression)continue;let a=s.extensions[Je],[c,u]=o.get(a.bufferView)||[];if(!u||!c){let l=n.json.bufferViews[a.bufferView],m=n.json.buffers[l.buffer],h=m.uri?n.resources[m.uri]:n.resources[Xr],y=l.byteOffset||0,b=l.byteLength,p=$e.toView(h,y,b);c=new this._decoderModule.Decoder,u=Ok(c,p),o.set(a.bufferView,[c,u]),t.debug(`[${Je}] Decompressed ${p.byteLength} bytes.`);}for(let l in a.attributes){let m=e.jsonDoc.json.accessors[s.attributes[l]],h=c.GetAttributeByUniqueId(u,a.attributes[l]),y=Nk(c,u,h,m);e.accessors[s.attributes[l]].setArray(y);}s.indices!==void 0&&e.accessors[s.indices].setArray(kk(c,u));}}finally{for(let[r,i]of Array.from(o.values()))this._decoderModule.destroy(r),this._decoderModule.destroy(i);}return this}read(e){return this}prewrite(e,t){if(!this._encoderModule)throw new Error(`[${Je}] Please install extension dependency, "draco3d.encoder".`);let n=this.document.getLogger();n.debug(`[${Je}] Compression options: ${JSON.stringify(this._encoderOptions)}`);let o=Lk(this.document),r=new Map,i="mesh";this._encoderOptions.quantizationVolume==="scene"&&(this.document.getRoot().listScenes().length!==1?n.warn(`[${Je}]: quantizationVolume=scene requires exactly 1 scene.`):i=rT(this.document.getRoot().listScenes().pop()));for(let s of Array.from(o.keys())){let a=o.get(s);if(!a)throw new Error("Unexpected primitive.");if(r.has(a)){r.set(a,r.get(a));continue}let c=s.getIndices(),u=e.jsonDoc.json.accessors,l;try{l=Mk(s,{...this._encoderOptions,quantizationVolume:i});}catch(y){if(y instanceof tv){n.warn(`[${Je}]: ${y.message} Skipping primitive compression.`);continue}throw y}r.set(a,l);let m=e.createAccessorDef(c);m.count=l.numIndices,e.accessorIndexMap.set(c,u.length),u.push(m),l.numVertices>65534&&me.getComponentSize(m.componentType)<=2?m.componentType=me.ComponentType.UNSIGNED_INT:l.numVertices>254&&me.getComponentSize(m.componentType)<=1&&(m.componentType=me.ComponentType.UNSIGNED_SHORT);for(let y of s.listSemantics()){let b=s.getAttribute(y);if(l.attributeIDs[y]===void 0)continue;let p=e.createAccessorDef(b);p.count=l.numVertices,e.accessorIndexMap.set(b,u.length),u.push(p);}let h=s.getAttribute("POSITION").getBuffer()||this.document.getRoot().listBuffers()[0];e.otherBufferViews.has(h)||e.otherBufferViews.set(h,[]),e.otherBufferViews.get(h).push(l.data);}return n.debug(`[${Je}] Compressed ${o.size} primitives.`),e.extensionData[Je]={primitiveHashMap:o,primitiveEncodingMap:r},this}write(e){let t=e.extensionData[Je];for(let n of this.document.getRoot().listMeshes()){let o=e.jsonDoc.json.meshes[e.meshIndexMap.get(n)];for(let r=0;r<n.listPrimitives().length;r++){let i=n.listPrimitives()[r],s=o.primitives[r],a=t.primitiveHashMap.get(i);if(!a)continue;let c=t.primitiveEncodingMap.get(a);c&&(s.extensions=s.extensions||{},s.extensions[Je]={bufferView:e.otherBufferViewsIndexMap.get(c.data),attributes:c.attributeIDs});}}if(!t.primitiveHashMap.size){let n=e.jsonDoc.json;n.extensionsUsed=(n.extensionsUsed||[]).filter(o=>o!==Je),n.extensionsRequired=(n.extensionsRequired||[]).filter(o=>o!==Je);}return this}};function Lk(e){let t=e.getLogger(),n=new Set,o=new Set,r=0,i=0;for(let m of e.getRoot().listMeshes())for(let h of m.listPrimitives())h.getIndices()?h.getMode()!==Bs.Mode.TRIANGLES?(o.add(h),i++):n.add(h):(o.add(h),r++);r>0&&t.warn(`[${Je}] Skipping Draco compression of ${r} non-indexed primitives.`),i>0&&t.warn(`[${Je}] Skipping Draco compression of ${i} non-TRIANGLES primitives.`);let s=e.getRoot().listAccessors(),a=new Map;for(let m=0;m<s.length;m++)a.set(s[m],m);let c=new Map,u=new Set,l=new Map;for(let m of Array.from(n)){let h=zT(m,a);if(u.has(h)){l.set(m,h);continue}if(c.has(m.getIndices())){let y=m.getIndices(),b=y.clone();a.set(b,e.getRoot().listAccessors().length-1),m.swap(y,b);}for(let y of m.listAttributes())if(c.has(y)){let b=y.clone();a.set(b,e.getRoot().listAccessors().length-1),m.swap(y,b);}h=zT(m,a),u.add(h),l.set(m,h),c.set(m.getIndices(),h);for(let y of m.listAttributes())c.set(y,h);}for(let m of Array.from(c.keys())){let h=new Set(m.listParents().map(y=>y.propertyType));if(h.size!==2||!h.has(ee.PRIMITIVE)||!h.has(ee.ROOT))throw new Error(`[${Je}] Compressed accessors must only be used as indices or vertex attributes.`)}for(let m of Array.from(n)){let h=l.get(m),y=m.getIndices();if(c.get(y)!==h||m.listAttributes().some(b=>c.get(b)!==h))throw new Error(`[${Je}] Draco primitives must share all, or no, accessors.`)}for(let m of Array.from(o)){let h=m.getIndices();if(c.has(h)||m.listAttributes().some(y=>c.has(y)))throw new Error(`[${Je}] Accessor cannot be shared by compressed and uncompressed primitives.`)}return l}function zT(e,t){let n=[],o=e.getIndices();n.push(t.get(o));for(let r of e.listAttributes())n.push(t.get(r));return n.sort().join("|")}var OT=class BT extends ze{static EXTENSION_NAME=hr;static Type={POINT:"point",SPOT:"spot",DIRECTIONAL:"directional"};init(){this.extensionName=hr,this.propertyType="Light",this.parentTypes=[ee.NODE];}getDefaults(){return Object.assign(super.getDefaults(),{color:[1,1,1],intensity:1,type:BT.Type.POINT,range:null,innerConeAngle:0,outerConeAngle:Math.PI/4})}getColor(){return this.get("color")}setColor(t){return this.set("color",t)}getIntensity(){return this.get("intensity")}setIntensity(t){return this.set("intensity",t)}getType(){return this.get("type")}setType(t){return this.set("type",t)}getRange(){return this.get("range")}setRange(t){return this.set("range",t)}getInnerConeAngle(){return this.get("innerConeAngle")}setInnerConeAngle(t){return this.set("innerConeAngle",t)}getOuterConeAngle(){return this.get("outerConeAngle")}setOuterConeAngle(t){return this.set("outerConeAngle",t)}},Fk=class extends Ae{extensionName=hr;static EXTENSION_NAME=hr;createLight(e=""){return new OT(this.document.getGraph(),e)}read(e){let t=e.jsonDoc;if(!t.json.extensions||!t.json.extensions.KHR_lights_punctual)return this;let n=(t.json.extensions.KHR_lights_punctual.lights||[]).map(o=>{let r=this.createLight().setName(o.name||"").setType(o.type);return o.extras&&r.setExtras(o.extras),o.color!==void 0&&r.setColor(o.color),o.intensity!==void 0&&r.setIntensity(o.intensity),o.range!==void 0&&r.setRange(o.range),o.spot?.innerConeAngle!==void 0&&r.setInnerConeAngle(o.spot.innerConeAngle),o.spot?.outerConeAngle!==void 0&&r.setOuterConeAngle(o.spot.outerConeAngle),r});return t.json.nodes.forEach((o,r)=>{if(!o.extensions||!o.extensions.KHR_lights_punctual)return;let i=o.extensions[hr];e.nodes[r].setExtension(hr,n[i.light]);}),this}write(e){let t=e.jsonDoc;if(this.properties.size===0)return this;let n=[],o=new Map;for(let r of this.properties){let i=r,s=e.createPropertyDef(r);s.type=i.getType(),qe.eq(i.getColor(),[1,1,1])||(s.color=i.getColor()),i.getIntensity()!==1&&(s.intensity=i.getIntensity()),i.getRange()!=null&&(s.range=i.getRange()),i.getName()&&(s.name=i.getName()),i.getType()===OT.Type.SPOT&&(s.spot={innerConeAngle:i.getInnerConeAngle(),outerConeAngle:i.getOuterConeAngle()}),n.push(s),o.set(i,n.length-1);}return this.document.getRoot().listNodes().forEach(r=>{let i=r.getExtension(hr);if(i){let s=e.nodeIndexMap.get(r),a=t.json.nodes[s];a.extensions=a.extensions||{},a.extensions[hr]={light:o.get(i)};}}),t.json.extensions=t.json.extensions||{},t.json.extensions[hr]={lights:n},this}},{R:qk,G:Vk,B:Bk}=Kt,Kk=class extends ze{static EXTENSION_NAME=Qr;init(){this.extensionName=Qr,this.propertyType="Anisotropy",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{anisotropyStrength:0,anisotropyRotation:0,anisotropyTexture:null,anisotropyTextureInfo:new Le(this.graph,"anisotropyTextureInfo")})}getAnisotropyStrength(){return this.get("anisotropyStrength")}setAnisotropyStrength(e){return this.set("anisotropyStrength",e)}getAnisotropyRotation(){return this.get("anisotropyRotation")}setAnisotropyRotation(e){return this.set("anisotropyRotation",e)}getAnisotropyTexture(){return this.getRef("anisotropyTexture")}getAnisotropyTextureInfo(){return this.getRef("anisotropyTexture")?this.getRef("anisotropyTextureInfo"):null}setAnisotropyTexture(e){return this.setRef("anisotropyTexture",e,{channels:qk|Vk|Bk})}},Gk=class extends Ae{static EXTENSION_NAME=Qr;extensionName=Qr;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createAnisotropy(){return new Kk(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){let t=e.jsonDoc,n=t.json.materials||[],o=t.json.textures||[];return n.forEach((r,i)=>{if(r.extensions&&r.extensions.KHR_materials_anisotropy){let s=this.createAnisotropy();e.materials[i].setExtension(Qr,s);let a=r.extensions[Qr];if(a.extras&&s.setExtras(a.extras),a.anisotropyStrength!==void 0&&s.setAnisotropyStrength(a.anisotropyStrength),a.anisotropyRotation!==void 0&&s.setAnisotropyRotation(a.anisotropyRotation),a.anisotropyTexture!==void 0){let c=a.anisotropyTexture,u=e.textures[o[c.index].source];s.setAnisotropyTexture(u),e.setTextureInfo(s.getAnisotropyTextureInfo(),c);}}}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{let o=n.getExtension(Qr);if(o){let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);if(i.extensions=i.extensions||{},i.extensions[Qr]=s,o.getAnisotropyStrength()>0&&(s.anisotropyStrength=o.getAnisotropyStrength()),o.getAnisotropyRotation()!==0&&(s.anisotropyRotation=o.getAnisotropyRotation()),o.getAnisotropyTexture()){let a=o.getAnisotropyTexture(),c=o.getAnisotropyTextureInfo();s.anisotropyTexture=e.createTextureInfoDef(a,c);}}}),this}},{R:kT,G:NT,B:Hk}=Kt,Zk=class extends ze{static EXTENSION_NAME=en;init(){this.extensionName=en,this.propertyType="Clearcoat",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{clearcoatFactor:0,clearcoatTexture:null,clearcoatTextureInfo:new Le(this.graph,"clearcoatTextureInfo"),clearcoatRoughnessFactor:0,clearcoatRoughnessTexture:null,clearcoatRoughnessTextureInfo:new Le(this.graph,"clearcoatRoughnessTextureInfo"),clearcoatNormalScale:1,clearcoatNormalTexture:null,clearcoatNormalTextureInfo:new Le(this.graph,"clearcoatNormalTextureInfo")})}getClearcoatFactor(){return this.get("clearcoatFactor")}setClearcoatFactor(e){return this.set("clearcoatFactor",e)}getClearcoatTexture(){return this.getRef("clearcoatTexture")}getClearcoatTextureInfo(){return this.getRef("clearcoatTexture")?this.getRef("clearcoatTextureInfo"):null}setClearcoatTexture(e){return this.setRef("clearcoatTexture",e,{channels:kT})}getClearcoatRoughnessFactor(){return this.get("clearcoatRoughnessFactor")}setClearcoatRoughnessFactor(e){return this.set("clearcoatRoughnessFactor",e)}getClearcoatRoughnessTexture(){return this.getRef("clearcoatRoughnessTexture")}getClearcoatRoughnessTextureInfo(){return this.getRef("clearcoatRoughnessTexture")?this.getRef("clearcoatRoughnessTextureInfo"):null}setClearcoatRoughnessTexture(e){return this.setRef("clearcoatRoughnessTexture",e,{channels:NT})}getClearcoatNormalScale(){return this.get("clearcoatNormalScale")}setClearcoatNormalScale(e){return this.set("clearcoatNormalScale",e)}getClearcoatNormalTexture(){return this.getRef("clearcoatNormalTexture")}getClearcoatNormalTextureInfo(){return this.getRef("clearcoatNormalTexture")?this.getRef("clearcoatNormalTextureInfo"):null}setClearcoatNormalTexture(e){return this.setRef("clearcoatNormalTexture",e,{channels:kT|NT|Hk})}},Jk=class extends Ae{static EXTENSION_NAME=en;extensionName=en;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createClearcoat(){return new Zk(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){let t=e.jsonDoc,n=t.json.materials||[],o=t.json.textures||[];return n.forEach((r,i)=>{if(r.extensions&&r.extensions.KHR_materials_clearcoat){let s=this.createClearcoat();e.materials[i].setExtension(en,s);let a=r.extensions[en];if(a.extras&&s.setExtras(a.extras),a.clearcoatFactor!==void 0&&s.setClearcoatFactor(a.clearcoatFactor),a.clearcoatRoughnessFactor!==void 0&&s.setClearcoatRoughnessFactor(a.clearcoatRoughnessFactor),a.clearcoatTexture!==void 0){let c=a.clearcoatTexture,u=e.textures[o[c.index].source];s.setClearcoatTexture(u),e.setTextureInfo(s.getClearcoatTextureInfo(),c);}if(a.clearcoatRoughnessTexture!==void 0){let c=a.clearcoatRoughnessTexture,u=e.textures[o[c.index].source];s.setClearcoatRoughnessTexture(u),e.setTextureInfo(s.getClearcoatRoughnessTextureInfo(),c);}if(a.clearcoatNormalTexture!==void 0){let c=a.clearcoatNormalTexture,u=e.textures[o[c.index].source];s.setClearcoatNormalTexture(u),e.setTextureInfo(s.getClearcoatNormalTextureInfo(),c),c.scale!==void 0&&s.setClearcoatNormalScale(c.scale);}}}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{let o=n.getExtension(en);if(o){let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);if(i.extensions=i.extensions||{},i.extensions[en]=s,s.clearcoatFactor=o.getClearcoatFactor(),s.clearcoatRoughnessFactor=o.getClearcoatRoughnessFactor(),o.getClearcoatTexture()){let a=o.getClearcoatTexture(),c=o.getClearcoatTextureInfo();s.clearcoatTexture=e.createTextureInfoDef(a,c);}if(o.getClearcoatRoughnessTexture()){let a=o.getClearcoatRoughnessTexture(),c=o.getClearcoatRoughnessTextureInfo();s.clearcoatRoughnessTexture=e.createTextureInfoDef(a,c);}if(o.getClearcoatNormalTexture()){let a=o.getClearcoatNormalTexture(),c=o.getClearcoatNormalTextureInfo();s.clearcoatNormalTexture=e.createTextureInfoDef(a,c),o.getClearcoatNormalScale()!==1&&(s.clearcoatNormalTexture.scale=o.getClearcoatNormalScale());}}}),this}},{R:Xk,G:Wk,B:Yk,A:Qk}=Kt,eN=class extends ze{static EXTENSION_NAME=tn;init(){this.extensionName=tn,this.propertyType="DiffuseTransmission",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{diffuseTransmissionFactor:0,diffuseTransmissionTexture:null,diffuseTransmissionTextureInfo:new Le(this.graph,"diffuseTransmissionTextureInfo"),diffuseTransmissionColorFactor:[1,1,1],diffuseTransmissionColorTexture:null,diffuseTransmissionColorTextureInfo:new Le(this.graph,"diffuseTransmissionColorTextureInfo")})}getDiffuseTransmissionFactor(){return this.get("diffuseTransmissionFactor")}setDiffuseTransmissionFactor(e){return this.set("diffuseTransmissionFactor",e)}getDiffuseTransmissionTexture(){return this.getRef("diffuseTransmissionTexture")}getDiffuseTransmissionTextureInfo(){return this.getRef("diffuseTransmissionTexture")?this.getRef("diffuseTransmissionTextureInfo"):null}setDiffuseTransmissionTexture(e){return this.setRef("diffuseTransmissionTexture",e,{channels:Qk})}getDiffuseTransmissionColorFactor(){return this.get("diffuseTransmissionColorFactor")}setDiffuseTransmissionColorFactor(e){return this.set("diffuseTransmissionColorFactor",e)}getDiffuseTransmissionColorTexture(){return this.getRef("diffuseTransmissionColorTexture")}getDiffuseTransmissionColorTextureInfo(){return this.getRef("diffuseTransmissionColorTexture")?this.getRef("diffuseTransmissionColorTextureInfo"):null}setDiffuseTransmissionColorTexture(e){return this.setRef("diffuseTransmissionColorTexture",e,{channels:Xk|Wk|Yk})}},tN=class extends Ae{extensionName=tn;static EXTENSION_NAME=tn;createDiffuseTransmission(){return new eN(this.document.getGraph())}read(e){let t=e.jsonDoc,n=t.json.materials||[],o=t.json.textures||[];return n.forEach((r,i)=>{if(r.extensions&&r.extensions.KHR_materials_diffuse_transmission){let s=this.createDiffuseTransmission();e.materials[i].setExtension(tn,s);let a=r.extensions[tn];if(a.extras&&s.setExtras(a.extras),a.diffuseTransmissionFactor!==void 0&&s.setDiffuseTransmissionFactor(a.diffuseTransmissionFactor),a.diffuseTransmissionColorFactor!==void 0&&s.setDiffuseTransmissionColorFactor(a.diffuseTransmissionColorFactor),a.diffuseTransmissionTexture!==void 0){let c=a.diffuseTransmissionTexture,u=e.textures[o[c.index].source];s.setDiffuseTransmissionTexture(u),e.setTextureInfo(s.getDiffuseTransmissionTextureInfo(),c);}if(a.diffuseTransmissionColorTexture!==void 0){let c=a.diffuseTransmissionColorTexture,u=e.textures[o[c.index].source];s.setDiffuseTransmissionColorTexture(u),e.setTextureInfo(s.getDiffuseTransmissionColorTextureInfo(),c);}}}),this}write(e){let t=e.jsonDoc;for(let n of this.document.getRoot().listMaterials()){let o=n.getExtension(tn);if(!o)continue;let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);if(i.extensions=i.extensions||{},i.extensions[tn]=s,s.diffuseTransmissionFactor=o.getDiffuseTransmissionFactor(),s.diffuseTransmissionColorFactor=o.getDiffuseTransmissionColorFactor(),o.getDiffuseTransmissionTexture()){let a=o.getDiffuseTransmissionTexture(),c=o.getDiffuseTransmissionTextureInfo();s.diffuseTransmissionTexture=e.createTextureInfoDef(a,c);}if(o.getDiffuseTransmissionColorTexture()){let a=o.getDiffuseTransmissionColorTexture(),c=o.getDiffuseTransmissionColorTextureInfo();s.diffuseTransmissionColorTexture=e.createTextureInfoDef(a,c);}}return this}},rN=class extends ze{static EXTENSION_NAME=rn;init(){this.extensionName=rn,this.propertyType="Dispersion",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{dispersion:0})}getDispersion(){return this.get("dispersion")}setDispersion(e){return this.set("dispersion",e)}},nN=class extends Ae{static EXTENSION_NAME=rn;extensionName=rn;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createDispersion(){return new rN(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){return (e.jsonDoc.json.materials||[]).forEach((t,n)=>{if(t.extensions&&t.extensions.KHR_materials_dispersion){let o=this.createDispersion();e.materials[n].setExtension(rn,o);let r=t.extensions[rn];r.extras&&o.setExtras(r.extras),r.dispersion!==void 0&&o.setDispersion(r.dispersion);}}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{let o=n.getExtension(rn);if(o){let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);i.extensions=i.extensions||{},i.extensions[rn]=s,s.dispersion=o.getDispersion();}}),this}},oN=class extends ze{static EXTENSION_NAME=nn;init(){this.extensionName=nn,this.propertyType="EmissiveStrength",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{emissiveStrength:1})}getEmissiveStrength(){return this.get("emissiveStrength")}setEmissiveStrength(e){return this.set("emissiveStrength",e)}},iN=class extends Ae{static EXTENSION_NAME=nn;extensionName=nn;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createEmissiveStrength(){return new oN(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){return (e.jsonDoc.json.materials||[]).forEach((t,n)=>{if(t.extensions&&t.extensions.KHR_materials_emissive_strength){let o=this.createEmissiveStrength();e.materials[n].setExtension(nn,o);let r=t.extensions[nn];r.extras&&o.setExtras(r.extras),r.emissiveStrength!==void 0&&o.setEmissiveStrength(r.emissiveStrength);}}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{let o=n.getExtension(nn);if(o){let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);i.extensions=i.extensions||{},i.extensions[nn]=s,s.emissiveStrength=o.getEmissiveStrength();}}),this}},sN=class extends ze{static EXTENSION_NAME=on;init(){this.extensionName=on,this.propertyType="IOR",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{ior:1.5})}getIOR(){return this.get("ior")}setIOR(e){return this.set("ior",e)}},aN=class extends Ae{static EXTENSION_NAME=on;extensionName=on;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createIOR(){return new sN(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){return (e.jsonDoc.json.materials||[]).forEach((t,n)=>{if(t.extensions&&t.extensions.KHR_materials_ior){let o=this.createIOR();e.materials[n].setExtension(on,o);let r=t.extensions[on];r.extras&&o.setExtras(r.extras),r.ior!==void 0&&o.setIOR(r.ior);}}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{let o=n.getExtension(on);if(o){let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);i.extensions=i.extensions||{},i.extensions[on]=s,s.ior=o.getIOR();}}),this}},{R:cN,G:uN}=Kt,lN=class extends ze{static EXTENSION_NAME=sn;init(){this.extensionName=sn,this.propertyType="Iridescence",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{iridescenceFactor:0,iridescenceTexture:null,iridescenceTextureInfo:new Le(this.graph,"iridescenceTextureInfo"),iridescenceIOR:1.3,iridescenceThicknessMinimum:100,iridescenceThicknessMaximum:400,iridescenceThicknessTexture:null,iridescenceThicknessTextureInfo:new Le(this.graph,"iridescenceThicknessTextureInfo")})}getIridescenceFactor(){return this.get("iridescenceFactor")}setIridescenceFactor(e){return this.set("iridescenceFactor",e)}getIridescenceTexture(){return this.getRef("iridescenceTexture")}getIridescenceTextureInfo(){return this.getRef("iridescenceTexture")?this.getRef("iridescenceTextureInfo"):null}setIridescenceTexture(e){return this.setRef("iridescenceTexture",e,{channels:cN})}getIridescenceIOR(){return this.get("iridescenceIOR")}setIridescenceIOR(e){return this.set("iridescenceIOR",e)}getIridescenceThicknessMinimum(){return this.get("iridescenceThicknessMinimum")}setIridescenceThicknessMinimum(e){return this.set("iridescenceThicknessMinimum",e)}getIridescenceThicknessMaximum(){return this.get("iridescenceThicknessMaximum")}setIridescenceThicknessMaximum(e){return this.set("iridescenceThicknessMaximum",e)}getIridescenceThicknessTexture(){return this.getRef("iridescenceThicknessTexture")}getIridescenceThicknessTextureInfo(){return this.getRef("iridescenceThicknessTexture")?this.getRef("iridescenceThicknessTextureInfo"):null}setIridescenceThicknessTexture(e){return this.setRef("iridescenceThicknessTexture",e,{channels:uN})}},dN=class extends Ae{static EXTENSION_NAME=sn;extensionName=sn;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createIridescence(){return new lN(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){let t=e.jsonDoc,n=t.json.materials||[],o=t.json.textures||[];return n.forEach((r,i)=>{if(r.extensions&&r.extensions.KHR_materials_iridescence){let s=this.createIridescence();e.materials[i].setExtension(sn,s);let a=r.extensions[sn];if(a.extras&&s.setExtras(a.extras),a.iridescenceFactor!==void 0&&s.setIridescenceFactor(a.iridescenceFactor),a.iridescenceIor!==void 0&&s.setIridescenceIOR(a.iridescenceIor),a.iridescenceThicknessMinimum!==void 0&&s.setIridescenceThicknessMinimum(a.iridescenceThicknessMinimum),a.iridescenceThicknessMaximum!==void 0&&s.setIridescenceThicknessMaximum(a.iridescenceThicknessMaximum),a.iridescenceTexture!==void 0){let c=a.iridescenceTexture,u=e.textures[o[c.index].source];s.setIridescenceTexture(u),e.setTextureInfo(s.getIridescenceTextureInfo(),c);}if(a.iridescenceThicknessTexture!==void 0){let c=a.iridescenceThicknessTexture,u=e.textures[o[c.index].source];s.setIridescenceThicknessTexture(u),e.setTextureInfo(s.getIridescenceThicknessTextureInfo(),c);}}}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{let o=n.getExtension(sn);if(o){let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);if(i.extensions=i.extensions||{},i.extensions[sn]=s,o.getIridescenceFactor()>0&&(s.iridescenceFactor=o.getIridescenceFactor()),o.getIridescenceIOR()!==1.3&&(s.iridescenceIor=o.getIridescenceIOR()),o.getIridescenceThicknessMinimum()!==100&&(s.iridescenceThicknessMinimum=o.getIridescenceThicknessMinimum()),o.getIridescenceThicknessMaximum()!==400&&(s.iridescenceThicknessMaximum=o.getIridescenceThicknessMaximum()),o.getIridescenceTexture()){let a=o.getIridescenceTexture(),c=o.getIridescenceTextureInfo();s.iridescenceTexture=e.createTextureInfoDef(a,c);}if(o.getIridescenceThicknessTexture()){let a=o.getIridescenceThicknessTexture(),c=o.getIridescenceThicknessTextureInfo();s.iridescenceThicknessTexture=e.createTextureInfoDef(a,c);}}}),this}},{R:PT,G:AT,B:CT,A:MT}=Kt,mN=class extends ze{static EXTENSION_NAME=an;init(){this.extensionName=an,this.propertyType="PBRSpecularGlossiness",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{diffuseFactor:[1,1,1,1],diffuseTexture:null,diffuseTextureInfo:new Le(this.graph,"diffuseTextureInfo"),specularFactor:[1,1,1],glossinessFactor:1,specularGlossinessTexture:null,specularGlossinessTextureInfo:new Le(this.graph,"specularGlossinessTextureInfo")})}getDiffuseFactor(){return this.get("diffuseFactor")}setDiffuseFactor(e){return this.set("diffuseFactor",e)}getDiffuseTexture(){return this.getRef("diffuseTexture")}getDiffuseTextureInfo(){return this.getRef("diffuseTexture")?this.getRef("diffuseTextureInfo"):null}setDiffuseTexture(e){return this.setRef("diffuseTexture",e,{channels:PT|AT|CT|MT,isColor:true})}getSpecularFactor(){return this.get("specularFactor")}setSpecularFactor(e){return this.set("specularFactor",e)}getGlossinessFactor(){return this.get("glossinessFactor")}setGlossinessFactor(e){return this.set("glossinessFactor",e)}getSpecularGlossinessTexture(){return this.getRef("specularGlossinessTexture")}getSpecularGlossinessTextureInfo(){return this.getRef("specularGlossinessTexture")?this.getRef("specularGlossinessTextureInfo"):null}setSpecularGlossinessTexture(e){return this.setRef("specularGlossinessTexture",e,{channels:PT|AT|CT|MT})}},pN=class extends Ae{static EXTENSION_NAME=an;extensionName=an;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createPBRSpecularGlossiness(){return new mN(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){let t=e.jsonDoc,n=t.json.materials||[],o=t.json.textures||[];return n.forEach((r,i)=>{if(r.extensions&&r.extensions.KHR_materials_pbrSpecularGlossiness){let s=this.createPBRSpecularGlossiness();e.materials[i].setExtension(an,s);let a=r.extensions[an];if(a.extras&&s.setExtras(a.extras),a.diffuseFactor!==void 0&&s.setDiffuseFactor(a.diffuseFactor),a.specularFactor!==void 0&&s.setSpecularFactor(a.specularFactor),a.glossinessFactor!==void 0&&s.setGlossinessFactor(a.glossinessFactor),a.diffuseTexture!==void 0){let c=a.diffuseTexture,u=e.textures[o[c.index].source];s.setDiffuseTexture(u),e.setTextureInfo(s.getDiffuseTextureInfo(),c);}if(a.specularGlossinessTexture!==void 0){let c=a.specularGlossinessTexture,u=e.textures[o[c.index].source];s.setSpecularGlossinessTexture(u),e.setTextureInfo(s.getSpecularGlossinessTextureInfo(),c);}}}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{let o=n.getExtension(an);if(o){let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);if(i.extensions=i.extensions||{},i.extensions[an]=s,s.diffuseFactor=o.getDiffuseFactor(),s.specularFactor=o.getSpecularFactor(),s.glossinessFactor=o.getGlossinessFactor(),o.getDiffuseTexture()){let a=o.getDiffuseTexture(),c=o.getDiffuseTextureInfo();s.diffuseTexture=e.createTextureInfoDef(a,c);}if(o.getSpecularGlossinessTexture()){let a=o.getSpecularGlossinessTexture(),c=o.getSpecularGlossinessTextureInfo();s.specularGlossinessTexture=e.createTextureInfoDef(a,c);}}}),this}},{R:fN,G:hN,B:gN,A:_N}=Kt,vN=class extends ze{static EXTENSION_NAME=cn;init(){this.extensionName=cn,this.propertyType="Sheen",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{sheenColorFactor:[0,0,0],sheenColorTexture:null,sheenColorTextureInfo:new Le(this.graph,"sheenColorTextureInfo"),sheenRoughnessFactor:0,sheenRoughnessTexture:null,sheenRoughnessTextureInfo:new Le(this.graph,"sheenRoughnessTextureInfo")})}getSheenColorFactor(){return this.get("sheenColorFactor")}setSheenColorFactor(e){return this.set("sheenColorFactor",e)}getSheenColorTexture(){return this.getRef("sheenColorTexture")}getSheenColorTextureInfo(){return this.getRef("sheenColorTexture")?this.getRef("sheenColorTextureInfo"):null}setSheenColorTexture(e){return this.setRef("sheenColorTexture",e,{channels:fN|hN|gN,isColor:true})}getSheenRoughnessFactor(){return this.get("sheenRoughnessFactor")}setSheenRoughnessFactor(e){return this.set("sheenRoughnessFactor",e)}getSheenRoughnessTexture(){return this.getRef("sheenRoughnessTexture")}getSheenRoughnessTextureInfo(){return this.getRef("sheenRoughnessTexture")?this.getRef("sheenRoughnessTextureInfo"):null}setSheenRoughnessTexture(e){return this.setRef("sheenRoughnessTexture",e,{channels:_N})}},yN=class extends Ae{static EXTENSION_NAME=cn;extensionName=cn;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createSheen(){return new vN(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){let t=e.jsonDoc,n=t.json.materials||[],o=t.json.textures||[];return n.forEach((r,i)=>{if(r.extensions&&r.extensions.KHR_materials_sheen){let s=this.createSheen();e.materials[i].setExtension(cn,s);let a=r.extensions[cn];if(a.extras&&s.setExtras(a.extras),a.sheenColorFactor!==void 0&&s.setSheenColorFactor(a.sheenColorFactor),a.sheenRoughnessFactor!==void 0&&s.setSheenRoughnessFactor(a.sheenRoughnessFactor),a.sheenColorTexture!==void 0){let c=a.sheenColorTexture,u=e.textures[o[c.index].source];s.setSheenColorTexture(u),e.setTextureInfo(s.getSheenColorTextureInfo(),c);}if(a.sheenRoughnessTexture!==void 0){let c=a.sheenRoughnessTexture,u=e.textures[o[c.index].source];s.setSheenRoughnessTexture(u),e.setTextureInfo(s.getSheenRoughnessTextureInfo(),c);}}}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{let o=n.getExtension(cn);if(o){let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);if(i.extensions=i.extensions||{},i.extensions[cn]=s,s.sheenColorFactor=o.getSheenColorFactor(),s.sheenRoughnessFactor=o.getSheenRoughnessFactor(),o.getSheenColorTexture()){let a=o.getSheenColorTexture(),c=o.getSheenColorTextureInfo();s.sheenColorTexture=e.createTextureInfoDef(a,c);}if(o.getSheenRoughnessTexture()){let a=o.getSheenRoughnessTexture(),c=o.getSheenRoughnessTextureInfo();s.sheenRoughnessTexture=e.createTextureInfoDef(a,c);}}}),this}},{R:SN,G:bN,B:RN,A:TN}=Kt,$N=class extends ze{static EXTENSION_NAME=un;init(){this.extensionName=un,this.propertyType="Specular",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{specularFactor:1,specularTexture:null,specularTextureInfo:new Le(this.graph,"specularTextureInfo"),specularColorFactor:[1,1,1],specularColorTexture:null,specularColorTextureInfo:new Le(this.graph,"specularColorTextureInfo")})}getSpecularFactor(){return this.get("specularFactor")}setSpecularFactor(e){return this.set("specularFactor",e)}getSpecularColorFactor(){return this.get("specularColorFactor")}setSpecularColorFactor(e){return this.set("specularColorFactor",e)}getSpecularTexture(){return this.getRef("specularTexture")}getSpecularTextureInfo(){return this.getRef("specularTexture")?this.getRef("specularTextureInfo"):null}setSpecularTexture(e){return this.setRef("specularTexture",e,{channels:TN})}getSpecularColorTexture(){return this.getRef("specularColorTexture")}getSpecularColorTextureInfo(){return this.getRef("specularColorTexture")?this.getRef("specularColorTextureInfo"):null}setSpecularColorTexture(e){return this.setRef("specularColorTexture",e,{channels:SN|bN|RN,isColor:true})}},xN=class extends Ae{static EXTENSION_NAME=un;extensionName=un;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createSpecular(){return new $N(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){let t=e.jsonDoc,n=t.json.materials||[],o=t.json.textures||[];return n.forEach((r,i)=>{if(r.extensions&&r.extensions.KHR_materials_specular){let s=this.createSpecular();e.materials[i].setExtension(un,s);let a=r.extensions[un];if(a.extras&&s.setExtras(a.extras),a.specularFactor!==void 0&&s.setSpecularFactor(a.specularFactor),a.specularColorFactor!==void 0&&s.setSpecularColorFactor(a.specularColorFactor),a.specularTexture!==void 0){let c=a.specularTexture,u=e.textures[o[c.index].source];s.setSpecularTexture(u),e.setTextureInfo(s.getSpecularTextureInfo(),c);}if(a.specularColorTexture!==void 0){let c=a.specularColorTexture,u=e.textures[o[c.index].source];s.setSpecularColorTexture(u),e.setTextureInfo(s.getSpecularColorTextureInfo(),c);}}}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{let o=n.getExtension(un);if(o){let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);if(i.extensions=i.extensions||{},i.extensions[un]=s,o.getSpecularFactor()!==1&&(s.specularFactor=o.getSpecularFactor()),qe.eq(o.getSpecularColorFactor(),[1,1,1])||(s.specularColorFactor=o.getSpecularColorFactor()),o.getSpecularTexture()){let a=o.getSpecularTexture(),c=o.getSpecularTextureInfo();s.specularTexture=e.createTextureInfoDef(a,c);}if(o.getSpecularColorTexture()){let a=o.getSpecularColorTexture(),c=o.getSpecularColorTextureInfo();s.specularColorTexture=e.createTextureInfoDef(a,c);}}}),this}},{R:wN}=Kt,EN=class extends ze{static EXTENSION_NAME=ln;init(){this.extensionName=ln,this.propertyType="Transmission",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{transmissionFactor:0,transmissionTexture:null,transmissionTextureInfo:new Le(this.graph,"transmissionTextureInfo")})}getTransmissionFactor(){return this.get("transmissionFactor")}setTransmissionFactor(e){return this.set("transmissionFactor",e)}getTransmissionTexture(){return this.getRef("transmissionTexture")}getTransmissionTextureInfo(){return this.getRef("transmissionTexture")?this.getRef("transmissionTextureInfo"):null}setTransmissionTexture(e){return this.setRef("transmissionTexture",e,{channels:wN})}},IN=class extends Ae{static EXTENSION_NAME=ln;extensionName=ln;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createTransmission(){return new EN(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){let t=e.jsonDoc,n=t.json.materials||[],o=t.json.textures||[];return n.forEach((r,i)=>{if(r.extensions&&r.extensions.KHR_materials_transmission){let s=this.createTransmission();e.materials[i].setExtension(ln,s);let a=r.extensions[ln];if(a.extras&&s.setExtras(a.extras),a.transmissionFactor!==void 0&&s.setTransmissionFactor(a.transmissionFactor),a.transmissionTexture!==void 0){let c=a.transmissionTexture,u=e.textures[o[c.index].source];s.setTransmissionTexture(u),e.setTextureInfo(s.getTransmissionTextureInfo(),c);}}}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{let o=n.getExtension(ln);if(o){let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);if(i.extensions=i.extensions||{},i.extensions[ln]=s,s.transmissionFactor=o.getTransmissionFactor(),o.getTransmissionTexture()){let a=o.getTransmissionTexture(),c=o.getTransmissionTextureInfo();s.transmissionTexture=e.createTextureInfoDef(a,c);}}}),this}},zN=class extends ze{static EXTENSION_NAME=Yo;init(){this.extensionName=Yo,this.propertyType="Unlit",this.parentTypes=[ee.MATERIAL];}},ON=class extends Ae{static EXTENSION_NAME=Yo;extensionName=Yo;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createUnlit(){return new zN(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){return (e.jsonDoc.json.materials||[]).forEach((t,n)=>{t.extensions&&t.extensions.KHR_materials_unlit&&e.materials[n].setExtension(Yo,this.createUnlit());}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{if(n.getExtension("KHR_materials_unlit")){let o=e.materialIndexMap.get(n),r=t.json.materials[o];r.extensions=r.extensions||{},r.extensions[Yo]={};}}),this}},kN=class extends ze{static EXTENSION_NAME=kt;init(){this.extensionName=kt,this.propertyType="Mapping",this.parentTypes=["MappingList"];}getDefaults(){return Object.assign(super.getDefaults(),{material:null,variants:new Me})}getMaterial(){return this.getRef("material")}setMaterial(e){return this.setRef("material",e)}addVariant(e){return this.addRef("variants",e)}removeVariant(e){return this.removeRef("variants",e)}listVariants(){return this.listRefs("variants")}},NN=class extends ze{static EXTENSION_NAME=kt;init(){this.extensionName=kt,this.propertyType="MappingList",this.parentTypes=[ee.PRIMITIVE];}getDefaults(){return Object.assign(super.getDefaults(),{mappings:new Me})}addMapping(e){return this.addRef("mappings",e)}removeMapping(e){return this.removeRef("mappings",e)}listMappings(){return this.listRefs("mappings")}},jT=class extends ze{static EXTENSION_NAME=kt;init(){this.extensionName=kt,this.propertyType="Variant",this.parentTypes=["MappingList"];}},PN=class extends Ae{extensionName=kt;static EXTENSION_NAME=kt;createMappingList(){return new NN(this.document.getGraph())}createVariant(e=""){return new jT(this.document.getGraph(),e)}createMapping(){return new kN(this.document.getGraph())}listVariants(){return Array.from(this.properties).filter(e=>e instanceof jT)}read(e){let t=e.jsonDoc;if(!t.json.extensions||!t.json.extensions.KHR_materials_variants)return this;let n=(t.json.extensions.KHR_materials_variants.variants||[]).map(o=>this.createVariant().setName(o.name||""));return (t.json.meshes||[]).forEach((o,r)=>{let i=e.meshes[r];(o.primitives||[]).forEach((s,a)=>{if(!s.extensions||!s.extensions.KHR_materials_variants)return;let c=this.createMappingList(),u=s.extensions[kt];for(let l of u.mappings){let m=this.createMapping();l.material!==void 0&&m.setMaterial(e.materials[l.material]);for(let h of l.variants||[])m.addVariant(n[h]);c.addMapping(m);}i.listPrimitives()[a].setExtension(kt,c);});}),this}write(e){let t=e.jsonDoc,n=this.listVariants();if(!n.length)return this;let o=[],r=new Map;for(let i of n)r.set(i,o.length),o.push(e.createPropertyDef(i));for(let i of this.document.getRoot().listMeshes()){let s=e.meshIndexMap.get(i);i.listPrimitives().forEach((a,c)=>{let u=a.getExtension(kt);if(!u)return;let l=e.jsonDoc.json.meshes[s].primitives[c],m=u.listMappings().map(h=>{let y=e.createPropertyDef(h),b=h.getMaterial();return b&&(y.material=e.materialIndexMap.get(b)),y.variants=h.listVariants().map(p=>r.get(p)),y});l.extensions=l.extensions||{},l.extensions[kt]={mappings:m};});}return t.json.extensions=t.json.extensions||{},t.json.extensions[kt]={variants:o},this}},{G:AN}=Kt,CN=class extends ze{static EXTENSION_NAME=dn;init(){this.extensionName=dn,this.propertyType="Volume",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{thicknessFactor:0,thicknessTexture:null,thicknessTextureInfo:new Le(this.graph,"thicknessTexture"),attenuationDistance:1/0,attenuationColor:[1,1,1]})}getThicknessFactor(){return this.get("thicknessFactor")}setThicknessFactor(e){return this.set("thicknessFactor",e)}getThicknessTexture(){return this.getRef("thicknessTexture")}getThicknessTextureInfo(){return this.getRef("thicknessTexture")?this.getRef("thicknessTextureInfo"):null}setThicknessTexture(e){return this.setRef("thicknessTexture",e,{channels:AN})}getAttenuationDistance(){return this.get("attenuationDistance")}setAttenuationDistance(e){return this.set("attenuationDistance",e)}getAttenuationColor(){return this.get("attenuationColor")}setAttenuationColor(e){return this.set("attenuationColor",e)}},MN=class extends Ae{static EXTENSION_NAME=dn;extensionName=dn;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createVolume(){return new CN(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){let t=e.jsonDoc,n=t.json.materials||[],o=t.json.textures||[];return n.forEach((r,i)=>{if(r.extensions&&r.extensions.KHR_materials_volume){let s=this.createVolume();e.materials[i].setExtension(dn,s);let a=r.extensions[dn];if(a.extras&&s.setExtras(a.extras),a.thicknessFactor!==void 0&&s.setThicknessFactor(a.thicknessFactor),a.attenuationDistance!==void 0&&s.setAttenuationDistance(a.attenuationDistance),a.attenuationColor!==void 0&&s.setAttenuationColor(a.attenuationColor),a.thicknessTexture!==void 0){let c=a.thicknessTexture,u=e.textures[o[c.index].source];s.setThicknessTexture(u),e.setTextureInfo(s.getThicknessTextureInfo(),c);}}}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{let o=n.getExtension(dn);if(o){let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);if(i.extensions=i.extensions||{},i.extensions[dn]=s,o.getThicknessFactor()>0&&(s.thicknessFactor=o.getThicknessFactor()),Number.isFinite(o.getAttenuationDistance())&&(s.attenuationDistance=o.getAttenuationDistance()),qe.eq(o.getAttenuationColor(),[1,1,1])||(s.attenuationColor=o.getAttenuationColor()),o.getThicknessTexture()){let a=o.getThicknessTexture(),c=o.getThicknessTextureInfo();s.thicknessTexture=e.createTextureInfoDef(a,c);}}}),this}},jN=class extends Ae{extensionName=ST;static EXTENSION_NAME=ST;read(e){return this}write(e){return this}},DN=class extends Ae{extensionName=bT;static EXTENSION_NAME=bT;read(e){return this}write(e){return this}},UN=class extends ze{static EXTENSION_NAME=mn;init(){this.extensionName=mn,this.propertyType="Visibility",this.parentTypes=[ee.NODE];}getDefaults(){return Object.assign(super.getDefaults(),{visible:true})}getVisible(){return this.get("visible")}setVisible(e){return this.set("visible",e)}},LN=class extends Ae{static EXTENSION_NAME=mn;extensionName=mn;createVisibility(){return new UN(this.document.getGraph())}read(e){return (e.jsonDoc.json.nodes||[]).forEach((t,n)=>{if(t.extensions&&t.extensions.KHR_node_visibility){let o=this.createVisibility();e.nodes[n].setExtension(mn,o);let r=t.extensions[mn];r.visible!==void 0&&o.setVisible(r.visible);}}),this}write(e){let t=e.jsonDoc;for(let n of this.document.getRoot().listNodes()){let o=n.getExtension(mn);if(!o)continue;let r=e.nodeIndexMap.get(n),i=t.json.nodes[r];i.extensions=i.extensions||{},i.extensions[mn]={visible:o.getVisible()};}return this}};function FN(e){return e.vkFormat>0&&e.vkFormat<=123}function DT(e){let t=e.vkFormat===1000066e3&&e.dataFormatDescriptor[0].colorModel===167;return e.vkFormat===0||t}var qN=class{match(e){return e[0]===171&&e[1]===75&&e[2]===84&&e[3]===88&&e[4]===32&&e[5]===50&&e[6]===48&&e[7]===187&&e[8]===13&&e[9]===10&&e[10]===26&&e[11]===10}getSize(e){let t=yd(e);return [t.pixelWidth,t.pixelHeight]}getChannels(e){let t=yd(e),n=t.dataFormatDescriptor[0];if(FN(t))return n.samples.length;if(DT(t))switch(n.colorModel){case 163:return n.samples.length===2&&(n.samples[1].channelType&15)===15?4:3;case 166:return (n.samples[0].channelType&15)===3?4:3;default:throw new Error(`Unexpected KTX2 colorModel, "${n.colorModel}".`)}throw new Error(`Unexpected KTX2 vkFormat, "${t.vkFormat}".`)}getVRAMByteLength(e){let t=yd(e),n=0;if(DT(t)){let o=this.getChannels(e)>3;for(let r=0;r<t.levels.length;r++){let i=t.levels[r];if(i.uncompressedByteLength)n+=i.uncompressedByteLength;else {let s=Math.max(1,Math.floor(t.pixelWidth/Math.pow(2,r))),a=Math.max(1,Math.floor(t.pixelHeight/Math.pow(2,r))),c=o?16:8;n+=s/4*(a/4)*c;}}}else for(let o of t.levels)t.supercompressionScheme===0?n+=o.levelData.byteLength:n+=o.uncompressedByteLength;return n}},VN=class extends Ae{static EXTENSION_NAME=Rd;extensionName=Rd;prereadTypes=[ee.TEXTURE];static register(){Qt.registerFormat("image/ktx2",new qN);}preread(e){return e.jsonDoc.json.textures&&e.jsonDoc.json.textures.forEach(t=>{t.extensions&&t.extensions.KHR_texture_basisu&&(t.source=t.extensions[Rd].source);}),this}read(e){return this}write(e){let t=e.jsonDoc;return this.document.getRoot().listTextures().forEach(n=>{if(n.getMimeType()==="image/ktx2"){let o=e.imageIndexMap.get(n);t.json.textures.forEach(r=>{r.source===o&&(r.extensions=r.extensions||{},r.extensions[Rd]={source:r.source},delete r.source);});}}),this}},BN=class extends ze{static EXTENSION_NAME=pn;init(){this.extensionName=pn,this.propertyType="Transform",this.parentTypes=[ee.TEXTURE_INFO];}getDefaults(){return Object.assign(super.getDefaults(),{offset:[0,0],rotation:0,scale:[1,1],texCoord:null})}getOffset(){return this.get("offset")}setOffset(e){return this.set("offset",e)}getRotation(){return this.get("rotation")}setRotation(e){return this.set("rotation",e)}getScale(){return this.get("scale")}setScale(e){return this.set("scale",e)}getTexCoord(){return this.get("texCoord")}setTexCoord(e){return this.set("texCoord",e)}},KN=class extends Ae{extensionName=pn;static EXTENSION_NAME=pn;createTransform(){return new BN(this.document.getGraph())}read(e){for(let[t,n]of Array.from(e.textureInfos.entries())){if(!n.extensions||!n.extensions.KHR_texture_transform)continue;let o=this.createTransform(),r=n.extensions[pn];r.offset!==void 0&&o.setOffset(r.offset),r.rotation!==void 0&&o.setRotation(r.rotation),r.scale!==void 0&&o.setScale(r.scale),r.texCoord!==void 0&&o.setTexCoord(r.texCoord),t.setExtension(pn,o);}return this}write(e){let t=Array.from(e.textureInfoDefMap.entries());for(let[n,o]of t){let r=n.getExtension(pn);if(!r)continue;o.extensions=o.extensions||{};let i={},s=qe.eq;s(r.getOffset(),[0,0])||(i.offset=r.getOffset()),r.getRotation()!==0&&(i.rotation=r.getRotation()),s(r.getScale(),[1,1])||(i.scale=r.getScale()),r.getTexCoord()!=null&&(i.texCoord=r.getTexCoord()),o.extensions[pn]=i;}return this}},GN=[ee.ROOT,ee.SCENE,ee.NODE,ee.MESH,ee.MATERIAL,ee.TEXTURE,ee.ANIMATION],HN=class extends ze{static EXTENSION_NAME=Gt;init(){this.extensionName=Gt,this.propertyType="Packet",this.parentTypes=GN;}getDefaults(){return Object.assign(super.getDefaults(),{context:{},properties:{}})}getContext(){return this.get("context")}setContext(e){return this.set("context",{...e})}listProperties(){return Object.keys(this.get("properties"))}getProperty(e){let t=this.get("properties");return e in t?t[e]:null}setProperty(e,t){this._assertContext(e);let n={...this.get("properties")};return t?n[e]=t:delete n[e],this.set("properties",n)}toJSONLD(){return {"@context":Y_(this.get("context")),...Y_(this.get("properties"))}}fromJSONLD(e){e=Y_(e);let t=e["@context"];return t&&this.set("context",t),delete e["@context"],this.set("properties",e)}_assertContext(e){if(!(e.split(":")[0]in this.get("context")))throw new Error(`${Gt}: Missing context for term, "${e}".`)}};function Y_(e){return JSON.parse(JSON.stringify(e))}var ZN=class extends Ae{extensionName=Gt;static EXTENSION_NAME=Gt;createPacket(){return new HN(this.document.getGraph())}listPackets(){return Array.from(this.properties)}read(e){let t=e.jsonDoc.json.extensions?.[Gt];if(!t||!t.packets)return this;let n=e.jsonDoc.json,o=this.document.getRoot(),r=t.packets.map(a=>this.createPacket().fromJSONLD(a)),i=[[n.asset],n.scenes,n.nodes,n.meshes,n.materials,n.images,n.animations],s=[[o],o.listScenes(),o.listNodes(),o.listMeshes(),o.listMaterials(),o.listTextures(),o.listAnimations()];for(let a=0;a<i.length;a++){let c=i[a]||[];for(let u=0;u<c.length;u++){let l=c[u];if(l.extensions&&l.extensions.KHR_xmp_json_ld){let m=l.extensions[Gt];s[a][u].setExtension(Gt,r[m.packet]);}}}return this}write(e){let{json:t}=e.jsonDoc,n=[];for(let o of this.properties){n.push(o.toJSONLD());for(let r of o.listParents()){let i;switch(r.propertyType){case ee.ROOT:i=t.asset;break;case ee.SCENE:i=t.scenes[e.sceneIndexMap.get(r)];break;case ee.NODE:i=t.nodes[e.nodeIndexMap.get(r)];break;case ee.MESH:i=t.meshes[e.meshIndexMap.get(r)];break;case ee.MATERIAL:i=t.materials[e.materialIndexMap.get(r)];break;case ee.TEXTURE:i=t.images[e.imageIndexMap.get(r)];break;case ee.ANIMATION:i=t.animations[e.animationIndexMap.get(r)];break;default:i=null,this.document.getLogger().warn(`[${Gt}]: Unsupported parent property, "${r.propertyType}"`);break}i&&(i.extensions=i.extensions||{},i.extensions[Gt]={packet:n.length-1});}}return n.length>0&&(t.extensions=t.extensions||{},t.extensions[Gt]={packets:n}),this}},JN=[Ik,zk,Uk,Fk,Gk,Jk,tN,nN,iN,aN,dN,pN,xN,yN,IN,ON,PN,MN,jN,DN,LN,VN,KN,ZN],Td=[wO,bO,jO,YO,xk,Ek,...JN];function KT(e,t,n){if(n.getRoot().listSkins().length>0)throw new Error("The attached GLB is rigged; attach a prop, or bake it into the host first.");if(n.getRoot().listAnimations().length>0)throw new Error("The attached GLB has its own clips; a prop is posed by its bone, not by clips.");if(n.getRoot().listCameras().length>0)throw new Error("The attached GLB carries a camera; attach a prop, not a scene.");let o=e.createNode(t),i=n.getRoot().listScenes()[0]?.listChildren()??n.getRoot().listNodes();for(let s of i)o.addChild(GT(e,s));return o}function XN(e){return e.getRoot().listBuffers()[0]??e.createBuffer()}function WN(e){let t=e.getElementSize(),o=e.getArray()?.constructor??Float32Array,r=new o(e.getCount()*t),i=[];for(let s=0;s<e.getCount();s+=1)e.getElement(s,i),r.set(i,s*t);return r}function rv(e,t){if(t.getArray()===null&&!t.getSparse())throw new Error(`Accessor '${t.getName()}' carries no data.`);return e.createAccessor(t.getName()).setType(t.getType()).setArray(WN(t)).setNormalized(t.getNormalized()).setBuffer(XN(e))}function YN(e,t){let n=e.createTexture(t.getName()).setMimeType(t.getMimeType()),o=t.getImage();return o!==null&&n.setImage(new Uint8Array(o)),n}function QN(e,t,n,o,r){let i=t===null?null:YN(e,t);r(i),!(n===null||o===null)&&o.setMagFilter(n.getMagFilter()).setMinFilter(n.getMinFilter()).setWrapS(n.getWrapS()).setWrapT(n.getWrapT());}function eP(e,t){let n=e.createMaterial(t.getName()).setAlpha(t.getAlpha()).setAlphaCutoff(t.getAlphaCutoff()).setAlphaMode(t.getAlphaMode()).setBaseColorFactor([...t.getBaseColorFactor()]).setDoubleSided(t.getDoubleSided()).setEmissiveFactor([...t.getEmissiveFactor()]).setMetallicFactor(t.getMetallicFactor()).setNormalScale(t.getNormalScale()).setOcclusionStrength(t.getOcclusionStrength()).setRoughnessFactor(t.getRoughnessFactor()),o=[[t.getBaseColorTexture(),t.getBaseColorTextureInfo(),()=>n.getBaseColorTextureInfo(),r=>n.setBaseColorTexture(r)],[t.getEmissiveTexture(),t.getEmissiveTextureInfo(),()=>n.getEmissiveTextureInfo(),r=>n.setEmissiveTexture(r)],[t.getMetallicRoughnessTexture(),t.getMetallicRoughnessTextureInfo(),()=>n.getMetallicRoughnessTextureInfo(),r=>n.setMetallicRoughnessTexture(r)],[t.getNormalTexture(),t.getNormalTextureInfo(),()=>n.getNormalTextureInfo(),r=>n.setNormalTexture(r)],[t.getOcclusionTexture(),t.getOcclusionTextureInfo(),()=>n.getOcclusionTextureInfo(),r=>n.setOcclusionTexture(r)]];for(let[r,i,s,a]of o)QN(e,r,i,s(),a);return n}function tP(e,t){let n=e.createPrimitive().setMode(t.getMode());for(let i of t.listSemantics()){let s=t.getAttribute(i);s!==null&&n.setAttribute(i,rv(e,s));}let o=t.getIndices();o!==null&&n.setIndices(rv(e,o));let r=t.getMaterial();r!==null&&n.setMaterial(eP(e,r));for(let i of t.listTargets()){let s=e.createPrimitiveTarget();for(let a of i.listSemantics()){let c=i.getAttribute(a);c!==null&&s.setAttribute(a,rv(e,c));}n.addTarget(s);}return n}function rP(e,t){let n=e.createMesh(t.getName());for(let o of t.listPrimitives())n.addPrimitive(tP(e,o));return n}function GT(e,t){let n=e.createNode(t.getName()).setTranslation([...t.getTranslation()]).setRotation([...t.getRotation()]).setScale([...t.getScale()]),o=t.getMesh();o!==null&&n.setMesh(rP(e,o));for(let r of t.listChildren())n.addChild(GT(e,r));return n}var HT=e=>({attachment:"attached",keyframes:[e]});function ZT(e){if(e.version===3)return e;if(e.version===2)return {anchor:e.anchor,animations:Object.fromEntries(Object.entries(e.animations).map(([t,n])=>[t,HT(n)])),attached:e.attached,...e.default===void 0?{}:{default:HT(e.default)},host:e.host,version:3}}function JT(e,t){let n=[...e?.keyframes??[]].filter(o=>Math.abs(o.time-t.time)>5e-4);return n.push(t),n.sort((o,r)=>o.time-r.time),{attachment:e?.attachment??"attached",keyframes:n}}var iv="$default",$d=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function ov(e,t,n){if(!Array.isArray(e)||e.length!==t||!e.every(o=>Number.isFinite(o)))throw new Error(`${n} must be ${t} finite numbers.`);return e}function oP(e){if(!$d(e))throw new Error("A key op needs a transform object.");return {position:ov(e.position,3,"transform.position"),rotation:ov(e.rotation,3,"transform.rotation"),scale:ov(e.scale,3,"transform.scale")}}function iP(e){if(!$d(e))throw new Error("An attach op needs an anchor object.");let{id:t,label:n,node:o,source:r}=e;if(typeof t!="string"||typeof n!="string"||typeof o!="string")throw new Error("An anchor needs a string id, label and node.");if(r!=="detected"&&r!=="estimated")throw new Error("An anchor source is 'detected' or 'estimated'.");return {id:t,label:n,node:o,source:r}}function sP(e){if(e!==void 0){if(e!=="attached"&&e!=="detached")throw new Error("A key op attachment is 'attached' or 'detached'.");return e}}function aP(e){if(!$d(e))throw new Error("Every op must be an object.");if(e.op==="attach"){if(typeof e.attached!="string"||e.attached.length===0)throw new Error("An attach op names the attached GLB.");return {anchor:iP(e.anchor),attached:e.attached,op:"attach"}}if(e.op==="key"){if(typeof e.clip!="string"||e.clip.length===0)throw new Error("A key op names its clip.");if(typeof e.time!="number"||!Number.isFinite(e.time)||e.time<0)throw new Error("A key op needs a finite time of zero or more.");let t=sP(e.attachment);return {clip:e.clip,op:"key",time:e.time,transform:oP(e.transform),...t===void 0?{}:{attachment:t}}}throw new Error(`Unknown animation op '${String(e.op)}'.`)}function cP(e){if(e===void 0)throw new Error("Unsupported animation recipe version.");let t=[{anchor:e.anchor,attached:e.attached,op:"attach"}],n=[];e.default!==void 0&&n.push([iv,e.default]);for(let o of Object.keys(e.animations).sort((r,i)=>r.localeCompare(i)))n.push([o,e.animations[o]]);for(let[o,r]of n)for(let i of [...r.keyframes].sort((s,a)=>s.time-a.time))t.push({attachment:r.attachment,clip:o,op:"key",time:i.time,transform:i.transform});return {host:e.host,ops:t,version:4}}function XT(e){if(!$d(e))throw new Error("An animation log must be a JSON object.");if(typeof e.host!="string"||e.host.length===0)throw new Error("An animation log names its host GLB.");if(e.version===4){if(!Array.isArray(e.ops)||e.ops.length===0)throw new Error("An animation log needs at least one op.");return {host:e.host,ops:e.ops.map(t=>aP(t)),version:4}}if(e.version===3||e.version===2)return cP(ZT(e));throw new Error(`Unsupported animation log version '${String(e.version)}'.`)}function WT(e){let t,n,o={};for(let r of e.ops){if(r.op==="attach"){t=r.anchor,n=r.attached;continue}let i=JT(o[r.clip],{time:r.time,transform:r.transform});o[r.clip]=r.attachment===void 0?i:{attachment:r.attachment,keyframes:i.keyframes};}if(t===void 0||n===void 0)throw new Error("An animation log starts with an attach op naming the prop and its bone.");return {anchor:t,attached:n,host:e.host,poses:o}}function YT(e,t){return {host:e.host,ops:[...e.ops,t],version:4}}function QT(e){let t=tr.parse(tr.resolve(e));return tr.join(t.dir,`${t.name}.anim.json`)}async function e$(e,t){await writeFile(e,`${JSON.stringify(t,null,2)}
76
- `,"utf8");}var sv=e=>e*Math.PI/180;function lP(e){let[t,n,o]=[sv(e[0]),sv(e[1]),sv(e[2])],[r,i,s]=[Math.cos(t/2),Math.cos(n/2),Math.cos(o/2)],[a,c,u]=[Math.sin(t/2),Math.sin(n/2),Math.sin(o/2)];return [a*i*s+r*c*u,r*c*s-a*i*u,r*i*u+a*c*s,r*i*s-a*c*u]}function dP(e){return e.getRoot().listBuffers()[0]??e.createBuffer()}function t$(e,t,n,o){return e.createAccessor(t).setArray(n).setType(o).setBuffer(dP(e))}function r$(e){return {rotation:lP(e.rotation),scale:e.scale,translation:e.position}}function mP(e,t,n,o,r,i){let s=t$(e,`${t.getName()}.${o}.time`,new Float32Array(r),"SCALAR"),a=t$(e,`${t.getName()}.${o}`,i,o==="rotation"?"VEC4":"VEC3"),c=e.createAnimationSampler().setInput(s).setOutput(a).setInterpolation("LINEAR");t.addSampler(c),t.addChannel(e.createAnimationChannel().setTargetNode(n).setTargetPath(o).setSampler(c));}function pP(e,t,n,o){let r=[...o.keyframes].sort((c,u)=>c.time-u.time),i=r.map(c=>c.time),s=r.map(c=>r$(c.transform)),a=[["rotation",4],["scale",3],["translation",3]];for(let[c,u]of a){let l=new Float32Array(s.length*u);s.forEach((m,h)=>l.set(m[c],h*u)),mP(e,t,n,c,i,l);}}async function n$(e,t){let n=WT(e),o=()=>new vd().registerExtensions(Td),r=await o().read(e.host),i=await o().read(n.attached),s=r.getRoot().listNodes().find(y=>y.getName()===n.anchor.node);if(s===void 0)throw new Error(`The host has no bone named '${n.anchor.node}' to attach to.`);let a=tr.parse(n.attached).name,c=KT(r,`attach-${a}`,i);s.addChild(c);let l=[...n.poses[iv]?.keyframes??[]].sort((y,b)=>y.time-b.time)[0];if(l!==void 0){let y=r$(l.transform);c.setTranslation(y.translation).setRotation(y.rotation).setScale(y.scale);}let m=[],h=[];for(let y of r.getRoot().listAnimations()){let b=y.getName(),p=n.poses[b];if(!(p===void 0||p.keyframes.length===0)){if(p.attachment==="detached"){h.push(b);continue}m.push(b),pP(r,y,c,p);}}return await mkdir(tr.dirname(tr.resolve(t)),{recursive:true}),await o().write(t,r),{anchor:s.getName(),attached:n.attached,clips:m,detached:h,file:tr.resolve(t),node:c.getName()}}var wd=[{id:"right-hand",label:"Right hand",patterns:[/righthand/u,/handright/u,/rhand/u]},{id:"left-hand",label:"Left hand",patterns:[/lefthand/u,/handleft/u,/lhand/u]},{id:"head",label:"Head",patterns:[/head/u]},{id:"hips",label:"Hips / root",patterns:[/hips/u,/pelvis/u,/^root$/u]},{id:"right-foot",label:"Right foot",patterns:[/rightfoot/u,/footright/u,/rfoot/u]},{id:"left-foot",label:"Left foot",patterns:[/leftfoot/u,/footleft/u,/lfoot/u]}];function av(e){return e.toLowerCase().replaceAll(/[^a-z0-9]/gu,"")}function fP(e,t){return t.filter(n=>e.patterns.some(o=>o.test(av(n)))).sort((n,o)=>av(n).length-av(o).length)[0]}function o$(e){return wd.flatMap(t=>{let n=fP(t,e);return n===void 0?[]:[{id:t.id,label:t.label,node:n,source:"detected"}]})}var gP=.01,_P=()=>new vd().registerExtensions(Td);function vP(e){let n=e.getRoot().listSkins().flatMap(r=>r.listJoints())[0];return n!==void 0?n.getName():e.getRoot().listNodes().find(r=>/hips|pelvis|root/iu.test(r.getName()))?.getName()??null}function yP(e){let t=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;for(let o of e)o<t&&(t=o),o>n&&(n=o);return {max:n,min:t}}function SP(e,t){let n=new Map;if(t===null)return n;for(let o of e.getRoot().listAnimations()){let r=0;for(let i of o.listChannels()){if(i.getTargetNode()?.getName()!==t||i.getTargetPath()!=="translation")continue;let s=i.getSampler()?.getOutput()?.getArray();if(s==null||s.length<6)continue;let a=[s[0]??0,s[2]??0];for(let c=0;c+2<s.length;c+=3){let u=(s[c]??0)-a[0],l=(s[c+2]??0)-(a[1]??0);r=Math.max(r,Math.hypot(u,l));}}n.set(o.getName(),r);}return n}async function cv(e){let t=(await stat(e)).size,n=await _P().read(e),o=n.getRoot(),r=[],i=o.listSkins(),s=i.flatMap(h=>h.listJoints().map(y=>y.getName())),a=o.listNodes().map(h=>h.getName()),c=s.length>0?s:a.filter(h=>h.length>0);i.length===0&&r.push("No skin: the model is not rigged."),o.listAnimations().length===0&&r.push("No animation clip: nothing to verify.");let u=vP(n),l=SP(n,u),m=o.listAnimations().map(h=>{let y=0;for(let p of h.listSamplers()){let S=p.getInput()?.getArray();S!==void 0&&(y=Math.max(y,yP(S).max));}let b=Math.round((l.get(h.getName())??0)*1e4)/1e4;return {channels:h.listChannels().length,duration:Math.round(y*1e4)/1e4,horizontalTravel:b,inPlace:b<=gP,name:h.getName()}}).sort((h,y)=>h.name.localeCompare(y.name));return {bones:c,bytes:t,clips:m,extensionsUsed:[...o.listExtensionsUsed().map(h=>h.extensionName)].sort((h,y)=>h.localeCompare(y)),file:e,generator:o.getAsset().generator??"",inPlace:m.every(h=>h.inPlace),landmarks:o$(c),meshes:o.listMeshes().length,rootBone:u,skins:i.length,warnings:r}}var bP=String.raw`
75
+ deps: ${l}}`};let r={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){let[u,l]=i(c);s(c,u),a(c,l);}};function i({schema:c}){let u={},l={};for(let m in c){if(m==="__proto__")continue;let h=Array.isArray(c[m])?u:l;h[m]=c[m];}return [u,l]}function s(c,u=c.schema){let{gen:l,data:m,it:h}=c;if(Object.keys(u).length===0)return;let y=l.let("missing");for(let b in u){let p=u[b];if(p.length===0)continue;let S=(0, o.propertyInData)(l,m,b,h.opts.ownProperties);c.setParams({property:b,depsCount:p.length,deps:p.join(", ")}),h.allErrors?l.if(S,()=>{for(let d of p)(0, o.checkReportMissingProp)(c,d);}):(l.if((0, t._)`${S} && (${(0, o.checkMissingProp)(c,p,y)})`),(0, o.reportMissingProp)(c,y),l.else());}}e.validatePropertyDeps=s;function a(c,u=c.schema){let{gen:l,data:m,keyword:h,it:y}=c,b=l.name("valid");for(let p in u)(0, n.alwaysValidSchema)(y,u[p])||(l.if((0, o.propertyInData)(l,m,p,y.opts.ownProperties),()=>{let S=c.subschema({keyword:h,schemaProp:p},b);c.mergeValidEvaluated(S,b);},()=>l.var(b,true)),c.ok(b));}e.validateSchemaDeps=a,e.default=r;})),mI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=Ne(),o={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:r})=>(0, t._)`{propertyName: ${r.propertyName}}`},code(r){let{gen:i,schema:s,data:a,it:c}=r;if((0, n.alwaysValidSchema)(c,s))return;let u=i.name("valid");i.forIn("key",a,l=>{r.setParams({propertyName:l}),r.subschema({keyword:"propertyNames",data:l,dataTypes:["string"],propertyName:l,compositeRule:true},u),i.if((0, t.not)(u),()=>{r.error(true),c.allErrors||i.break();});}),r.ok(u);}};e.default=o;})),gR=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Vt(),n=Se(),o=qt(),r=Ne(),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:true,trackErrors:true,error:{message:"must NOT have additional properties",params:({params:s})=>(0, n._)`{additionalProperty: ${s.additionalProperty}}`},code(s){let{gen:a,schema:c,parentSchema:u,data:l,errsCount:m,it:h}=s;if(!m)throw new Error("ajv implementation error");let{allErrors:y,opts:b}=h;if(h.props=true,b.removeAdditional!=="all"&&(0, r.alwaysValidSchema)(h,c))return;let p=(0, t.allSchemaProperties)(u.properties),S=(0, t.allSchemaProperties)(u.patternProperties);d(),s.ok((0, n._)`${m} === ${o.default.errors}`);function d(){a.forIn("key",l,T=>{!p.length&&!S.length?v(T):a.if(_(T),()=>v(T));});}function _(T){let R;if(p.length>8){let $=(0, r.schemaRefOrVal)(h,u.properties,"properties");R=(0, t.isOwnProperty)(a,$,T);}else p.length?R=(0, n.or)(...p.map($=>(0, n._)`${T} === ${$}`)):R=n.nil;return S.length&&(R=(0, n.or)(R,...S.map($=>(0, n._)`${(0, t.usePattern)(s,$)}.test(${T})`))),(0, n.not)(R)}function f(T){a.code((0, n._)`delete ${l}[${T}]`);}function v(T){if(b.removeAdditional==="all"||b.removeAdditional&&c===false){f(T);return}if(c===false){s.setParams({additionalProperty:T}),s.error(),y||a.break();return}if(typeof c=="object"&&!(0, r.alwaysValidSchema)(h,c)){let R=a.name("valid");b.removeAdditional==="failing"?(x(T,R,false),a.if((0, n.not)(R),()=>{s.reset(),f(T);})):(x(T,R),y||a.if((0, n.not)(R),()=>a.break()));}}function x(T,R,$){let E={keyword:"additionalProperties",dataProp:T,dataPropType:r.Type.Str};$===false&&Object.assign(E,{compositeRule:true,createErrors:false,allErrors:false}),s.subschema(E,R);}}};e.default=i;})),pI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Xo(),n=Vt(),o=Ne(),r=gR(),i={keyword:"properties",type:"object",schemaType:"object",code(s){let{gen:a,schema:c,parentSchema:u,data:l,it:m}=s;m.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&r.default.code(new t.KeywordCxt(m,r.default,"additionalProperties"));let h=(0, n.allSchemaProperties)(c);for(let d of h)m.definedProperties.add(d);m.opts.unevaluated&&h.length&&m.props!==true&&(m.props=o.mergeEvaluated.props(a,(0, o.toHash)(h),m.props));let y=h.filter(d=>!(0, o.alwaysValidSchema)(m,c[d]));if(y.length===0)return;let b=a.name("valid");for(let d of y)p(d)?S(d):(a.if((0, n.propertyInData)(a,l,d,m.opts.ownProperties)),S(d),m.allErrors||a.else().var(b,true),a.endIf()),s.it.definedProperties.add(d),s.ok(b);function p(d){return m.opts.useDefaults&&!m.compositeRule&&c[d].default!==void 0}function S(d){s.subschema({keyword:"properties",schemaProp:d,dataProp:d},b);}}};e.default=i;})),fI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Vt(),n=Se(),o=Ne(),r=Ne(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(s){let{gen:a,schema:c,data:u,parentSchema:l,it:m}=s,{opts:h}=m,y=(0, t.allSchemaProperties)(c),b=y.filter(x=>(0, o.alwaysValidSchema)(m,c[x]));if(y.length===0||b.length===y.length&&(!m.opts.unevaluated||m.props===true))return;let p=h.strictSchema&&!h.allowMatchingProperties&&l.properties,S=a.name("valid");m.props!==true&&!(m.props instanceof n.Name)&&(m.props=(0, r.evaluatedPropsToName)(a,m.props));let{props:d}=m;_();function _(){for(let x of y)p&&f(x),m.allErrors?v(x):(a.var(S,true),v(x),a.if(S));}function f(x){for(let T in p)new RegExp(x).test(T)&&(0, o.checkStrictMode)(m,`property ${T} matches pattern ${x} (use allowMatchingProperties)`);}function v(x){a.forIn("key",u,T=>{a.if((0, n._)`${(0, t.usePattern)(s,x)}.test(${T})`,()=>{let R=b.includes(x);R||s.subschema({keyword:"patternProperties",schemaProp:x,dataProp:T,dataPropType:r.Type.Str},S),m.opts.unevaluated&&d!==true?a.assign((0, n._)`${d}[${T}]`,true):!R&&!m.allErrors&&a.if((0, n.not)(S),()=>a.break());});});}}};e.default=i;})),hI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Ne(),n={keyword:"not",schemaType:["object","boolean"],trackErrors:true,code(o){let{gen:r,schema:i,it:s}=o;if((0, t.alwaysValidSchema)(s,i)){o.fail();return}let a=r.name("valid");o.subschema({keyword:"not",compositeRule:true,createErrors:false,allErrors:false},a),o.failResult(a,()=>o.reset(),()=>o.error());},error:{message:"must NOT be valid"}};e.default=n;})),gI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t={keyword:"anyOf",schemaType:"array",trackErrors:true,code:Vt().validateUnion,error:{message:"must match a schema in anyOf"}};e.default=t;})),_I=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=Ne(),o={keyword:"oneOf",schemaType:"array",trackErrors:true,error:{message:"must match exactly one schema in oneOf",params:({params:r})=>(0, t._)`{passingSchemas: ${r.passing}}`},code(r){let{gen:i,schema:s,parentSchema:a,it:c}=r;if(!Array.isArray(s))throw new Error("ajv implementation error");if(c.opts.discriminator&&a.discriminator)return;let u=s,l=i.let("valid",false),m=i.let("passing",null),h=i.name("_valid");r.setParams({passing:m}),i.block(y),r.result(l,()=>r.reset(),()=>r.error(true));function y(){u.forEach((b,p)=>{let S;(0, n.alwaysValidSchema)(c,b)?i.var(h,true):S=r.subschema({keyword:"oneOf",schemaProp:p,compositeRule:true},h),p>0&&i.if((0, t._)`${h} && ${l}`).assign(l,false).assign(m,(0, t._)`[${m}, ${p}]`).else(),i.if(h,()=>{i.assign(l,true),i.assign(m,p),S&&r.mergeEvaluated(S,t.Name);});});}}};e.default=o;})),vI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Ne(),n={keyword:"allOf",schemaType:"array",code(o){let{gen:r,schema:i,it:s}=o;if(!Array.isArray(i))throw new Error("ajv implementation error");let a=r.name("valid");i.forEach((c,u)=>{if((0, t.alwaysValidSchema)(s,c))return;let l=o.subschema({keyword:"allOf",schemaProp:u},a);o.ok(a),o.mergeEvaluated(l);});}};e.default=n;})),yI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=Ne(),o={keyword:"if",schemaType:["object","boolean"],trackErrors:true,error:{message:({params:i})=>(0, t.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0, t._)`{failingKeyword: ${i.ifClause}}`},code(i){let{gen:s,parentSchema:a,it:c}=i;a.then===void 0&&a.else===void 0&&(0, n.checkStrictMode)(c,'"if" without "then" and "else" is ignored');let u=r(c,"then"),l=r(c,"else");if(!u&&!l)return;let m=s.let("valid",true),h=s.name("_valid");if(y(),i.reset(),u&&l){let p=s.let("ifClause");i.setParams({ifClause:p}),s.if(h,b("then",p),b("else",p));}else u?s.if(h,b("then")):s.if((0, t.not)(h),b("else"));i.pass(m,()=>i.error(true));function y(){let p=i.subschema({keyword:"if",compositeRule:true,createErrors:false,allErrors:false},h);i.mergeEvaluated(p);}function b(p,S){return ()=>{let d=i.subschema({keyword:p},h);s.assign(m,h),i.mergeValidEvaluated(d,m),S?s.assign(S,(0, t._)`${p}`):i.setParams({ifClause:p});}}}};function r(i,s){let a=i.schema[s];return a!==void 0&&!(0, n.alwaysValidSchema)(i,a)}e.default=o;})),SI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Ne(),n={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:o,parentSchema:r,it:i}){r.if===void 0&&(0, t.checkStrictMode)(i,`"${o}" without "if" is ignored`);}};e.default=n;})),_R=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=fR(),n=uI(),o=hR(),r=lI(),i=dI(),s=A_(),a=mI(),c=gR(),u=pI(),l=fI(),m=hI(),h=gI(),y=_I(),b=vI(),p=yI(),S=SI();function d(_=false){let f=[m.default,h.default,y.default,b.default,p.default,S.default,a.default,c.default,s.default,u.default,l.default];return _?f.push(n.default,r.default):f.push(t.default,o.default),f.push(i.default),f}e.default=d;})),bI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n={keyword:"format",type:["number","string"],schemaType:"string",$data:true,error:{message:({schemaCode:o})=>(0, t.str)`must match format "${o}"`,params:({schemaCode:o})=>(0, t._)`{format: ${o}}`},code(o,r){let{gen:i,data:s,$data:a,schema:c,schemaCode:u,it:l}=o,{opts:m,errSchemaPath:h,schemaEnv:y,self:b}=l;if(!m.validateFormats)return;a?p():S();function p(){let d=i.scopeValue("formats",{ref:b.formats,code:m.code.formats}),_=i.const("fDef",(0, t._)`${d}[${u}]`),f=i.let("fType"),v=i.let("format");i.if((0, t._)`typeof ${_} == "object" && !(${_} instanceof RegExp)`,()=>i.assign(f,(0, t._)`${_}.type || "string"`).assign(v,(0, t._)`${_}.validate`),()=>i.assign(f,(0, t._)`"string"`).assign(v,_)),o.fail$data((0, t.or)(x(),T()));function x(){return m.strictSchema===false?t.nil:(0, t._)`${u} && !${v}`}function T(){let R=y.$async?(0, t._)`(${_}.async ? await ${v}(${s}) : ${v}(${s}))`:(0, t._)`${v}(${s})`,$=(0, t._)`(typeof ${v} == "function" ? ${R} : ${v}.test(${s}))`;return (0, t._)`${v} && ${v} !== true && ${f} === ${r} && !${$}`}}function S(){let d=b.formats[c];if(!d){x();return}if(d===true)return;let[_,f,v]=T(d);_===r&&o.pass(R());function x(){if(m.strictSchema===false){b.logger.warn($());return}throw new Error($());function $(){return `unknown format "${c}" ignored in schema at path "${h}"`}}function T($){let E=$ instanceof RegExp?(0, t.regexpCode)($):m.code.formats?(0, t._)`${m.code.formats}${(0, t.getProperty)(c)}`:void 0,A=i.scopeValue("formats",{key:c,ref:$,code:E});return typeof $=="object"&&!($ instanceof RegExp)?[$.type||"string",$.validate,(0, t._)`${A}.validate`]:["string",$,A]}function R(){if(typeof d=="object"&&!(d instanceof RegExp)&&d.async){if(!y.$async)throw new Error("async format in sync schema");return (0, t._)`await ${v}(${s})`}return typeof f=="function"?(0, t._)`${v}(${s})`:(0, t._)`${v}.test(${s})`}}}};e.default=n;})),vR=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=[bI().default];e.default=t;})),yR=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],e.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];})),SR=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=mR(),n=pR(),o=_R(),r=vR(),i=yR(),s=[t.default,n.default,(0, o.default)(),r.default,i.metadataVocabulary,i.contentVocabulary];e.default=s;})),RI=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.DiscrError=void 0;var t;(function(n){n.Tag="tag",n.Mapping="mapping";})(t||(e.DiscrError=t={}));})),C_=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=RI(),o=nd(),r=Wo(),i=Ne(),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:a,tagName:c}})=>a===n.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:a,tag:c,tagName:u}})=>(0, t._)`{error: ${a}, tag: ${u}, tagValue: ${c}}`},code(a){let{gen:c,data:u,schema:l,parentSchema:m,it:h}=a,{oneOf:y}=m;if(!h.opts.discriminator)throw new Error("discriminator: requires discriminator option");let b=l.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(l.mapping)throw new Error("discriminator: mapping is not supported");if(!y)throw new Error("discriminator: requires oneOf keyword");let p=c.let("valid",false),S=c.const("tag",(0, t._)`${u}${(0, t.getProperty)(b)}`);c.if((0, t._)`typeof ${S} == "string"`,()=>d(),()=>a.error(false,{discrError:n.DiscrError.Tag,tag:S,tagName:b})),a.ok(p);function d(){let v=f();c.if(false);for(let x in v)c.elseIf((0, t._)`${S} === ${x}`),c.assign(p,_(v[x]));c.else(),a.error(false,{discrError:n.DiscrError.Mapping,tag:S,tagName:b}),c.endIf();}function _(v){let x=c.name("valid"),T=a.subschema({keyword:"oneOf",schemaProp:v},x);return a.mergeEvaluated(T,t.Name),x}function f(){var v;let x={},T=$(m),R=true;for(let N=0;N<y.length;N++){let F=y[N];if(F?.$ref&&!(0, i.schemaHasRulesButRef)(F,h.self.RULES)){let K=F.$ref;if(F=o.resolveRef.call(h.self,h.schemaEnv.root,h.baseId,K),F instanceof o.SchemaEnv&&(F=F.schema),F===void 0)throw new r.default(h.opts.uriResolver,h.baseId,K)}let V=(v=F?.properties)===null||v===void 0?void 0:v[b];if(typeof V!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);R=R&&(T||$(F)),E(V,N);}if(!R)throw new Error(`discriminator: "${b}" must be required`);return x;function $({required:N}){return Array.isArray(N)&&N.includes(b)}function E(N,F){if(N.const)A(N.const,F);else if(N.enum)for(let V of N.enum)A(V,F);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function A(N,F){if(typeof N!="string"||N in x)throw new Error(`discriminator: "${b}" values must be unique strings`);x[N]=F;}}}};e.default=s;})),TI=G(((e,t)=>{t.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:true,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:true,readOnly:{type:"boolean",default:false},examples:{type:"array",items:true},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:true},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:false},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:true,enum:{type:"array",items:true,minItems:1,uniqueItems:true},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:true}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:true};})),bR=G(((e,t)=>{Object.defineProperty(e,"__esModule",{value:true}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;let n=k_(),o=SR(),r=C_(),i=TI(),s=["/properties"],a="http://json-schema.org/draft-07/schema";var c=class extends n.default{_addVocabularies(){super._addVocabularies(),o.default.forEach(y=>this.addVocabulary(y)),this.opts.discriminator&&this.addKeyword(r.default);}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let y=this.opts.$data?this.$dataMetaSchema(i,s):i;this.addMetaSchema(y,a,false),this.refs["http://json-schema.org/schema"]=a;}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}};e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:true}),e.default=c;var u=Xo();Object.defineProperty(e,"KeywordCxt",{enumerable:true,get:function(){return u.KeywordCxt}});var l=Se();Object.defineProperty(e,"_",{enumerable:true,get:function(){return l._}}),Object.defineProperty(e,"str",{enumerable:true,get:function(){return l.str}}),Object.defineProperty(e,"stringify",{enumerable:true,get:function(){return l.stringify}}),Object.defineProperty(e,"nil",{enumerable:true,get:function(){return l.nil}}),Object.defineProperty(e,"Name",{enumerable:true,get:function(){return l.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:true,get:function(){return l.CodeGen}});var m=Ls();Object.defineProperty(e,"ValidationError",{enumerable:true,get:function(){return m.default}});var h=Wo();Object.defineProperty(e,"MissingRefError",{enumerable:true,get:function(){return h.default}});})),RR=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.dynamicAnchor=void 0;let t=Se(),n=qt(),o=nd(),r=N_(),i={keyword:"$dynamicAnchor",schemaType:"string",code:c=>s(c,c.schema)};function s(c,u){let{gen:l,it:m}=c;m.schemaEnv.root.dynamicAnchors[u]=true;let h=(0, t._)`${n.default.dynamicAnchors}${(0, t.getProperty)(u)}`,y=m.errSchemaPath==="#"?m.validateName:a(c);l.if((0, t._)`!${h}`,()=>l.assign(h,y));}e.dynamicAnchor=s;function a(c){let{schemaEnv:u,schema:l,self:m}=c.it,{root:h,baseId:y,localRefs:b,meta:p}=u.root,{schemaId:S}=m.opts,d=new o.SchemaEnv({schema:l,schemaId:S,root:h,baseId:y,localRefs:b,meta:p});return o.compileSchema.call(m,d),(0, r.getValidate)(c,d)}e.default=i;})),TR=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.dynamicRef=void 0;let t=Se(),n=qt(),o=N_(),r={keyword:"$dynamicRef",schemaType:"string",code:s=>i(s,s.schema)};function i(s,a){let{gen:c,keyword:u,it:l}=s;if(a[0]!=="#")throw new Error(`"${u}" only supports hash fragment reference`);let m=a.slice(1);if(l.allErrors)h();else {let b=c.let("valid",false);h(b),s.ok(b);}function h(b){if(l.schemaEnv.root.dynamicAnchors[m]){let p=c.let("_v",(0, t._)`${n.default.dynamicAnchors}${(0, t.getProperty)(m)}`);c.if(p,y(p,b),y(l.validateName,b));}else y(l.validateName,b)();}function y(b,p){return p?()=>c.block(()=>{(0, o.callRef)(s,b),c.let(p,true);}):()=>(0, o.callRef)(s,b)}}e.dynamicRef=i,e.default=r;})),$I=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=RR(),n=Ne(),o={keyword:"$recursiveAnchor",schemaType:"boolean",code(r){r.schema?(0, t.dynamicAnchor)(r,""):(0, n.checkStrictMode)(r.it,"$recursiveAnchor: false is ignored");}};e.default=o;})),xI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=TR(),n={keyword:"$recursiveRef",schemaType:"string",code:o=>(0, t.dynamicRef)(o,o.schema)};e.default=n;})),$R=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=RR(),n=TR(),o=$I(),r=xI(),i=[t.default,n.default,o.default,r.default];e.default=i;})),wI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=A_(),n={keyword:"dependentRequired",type:"object",schemaType:"object",error:t.error,code:o=>(0, t.validatePropertyDeps)(o)};e.default=n;})),EI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=A_(),n={keyword:"dependentSchemas",type:"object",schemaType:"object",code:o=>(0, t.validateSchemaDeps)(o)};e.default=n;})),II=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Ne(),n={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:o,parentSchema:r,it:i}){r.contains===void 0&&(0, t.checkStrictMode)(i,`"${o}" without "contains" is ignored`);}};e.default=n;})),xR=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=wI(),n=EI(),o=II(),r=[t.default,n.default,o.default];e.default=r;})),zI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=Ne(),o=qt(),r={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:true,error:{message:"must NOT have unevaluated properties",params:({params:i})=>(0, t._)`{unevaluatedProperty: ${i.unevaluatedProperty}}`},code(i){let{gen:s,schema:a,data:c,errsCount:u,it:l}=i;if(!u)throw new Error("ajv implementation error");let{allErrors:m,props:h}=l;h instanceof t.Name?s.if((0, t._)`${h} !== true`,()=>s.forIn("key",c,S=>s.if(b(h,S),()=>y(S)))):h!==true&&s.forIn("key",c,S=>h===void 0?y(S):s.if(p(h,S),()=>y(S))),l.props=true,i.ok((0, t._)`${u} === ${o.default.errors}`);function y(S){if(a===false){i.setParams({unevaluatedProperty:S}),i.error(),m||s.break();return}if(!(0, n.alwaysValidSchema)(l,a)){let d=s.name("valid");i.subschema({keyword:"unevaluatedProperties",dataProp:S,dataPropType:n.Type.Str},d),m||s.if((0, t.not)(d),()=>s.break());}}function b(S,d){return (0, t._)`!${S} || !${S}[${d}]`}function p(S,d){let _=[];for(let f in S)S[f]===true&&_.push((0, t._)`${d} !== ${f}`);return (0, t.and)(..._)}}};e.default=r;})),OI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=Se(),n=Ne(),o={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:r}})=>(0, t.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0, t._)`{limit: ${r}}`},code(r){let{gen:i,schema:s,data:a,it:c}=r,u=c.items||0;if(u===true)return;let l=i.const("len",(0, t._)`${a}.length`);if(s===false)r.setParams({len:u}),r.fail((0, t._)`${l} > ${u}`);else if(typeof s=="object"&&!(0, n.alwaysValidSchema)(c,s)){let h=i.var("valid",(0, t._)`${l} <= ${u}`);i.if((0, t.not)(h),()=>m(h,u)),r.ok(h);}c.items=true;function m(h,y){i.forRange("i",y,l,b=>{r.subschema({keyword:"unevaluatedItems",dataProp:b,dataPropType:n.Type.Num},h),c.allErrors||i.if((0, t.not)(h),()=>i.break());});}}};e.default=o;})),wR=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=zI(),n=OI(),o=[t.default,n.default];e.default=o;})),kI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/schema",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":true,"https://json-schema.org/draft/2019-09/vocab/applicator":true,"https://json-schema.org/draft/2019-09/vocab/validation":true,"https://json-schema.org/draft/2019-09/vocab/meta-data":true,"https://json-schema.org/draft/2019-09/vocab/format":false,"https://json-schema.org/draft/2019-09/vocab/content":true},$recursiveAnchor:true,title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format"},{$ref:"meta/content"}],type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$recursiveRef:"#"},{$ref:"meta/validation#/$defs/stringArray"}]}}}};})),NI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/applicator":true},$recursiveAnchor:true,title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{additionalItems:{$recursiveRef:"#"},unevaluatedItems:{$recursiveRef:"#"},items:{anyOf:[{$recursiveRef:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$recursiveRef:"#"},additionalProperties:{$recursiveRef:"#"},unevaluatedProperties:{$recursiveRef:"#"},properties:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$recursiveRef:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$recursiveRef:"#"}},propertyNames:{$recursiveRef:"#"},if:{$recursiveRef:"#"},then:{$recursiveRef:"#"},else:{$recursiveRef:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$recursiveRef:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$recursiveRef:"#"}}}};})),PI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/content",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/content":true},$recursiveAnchor:true,title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$recursiveRef:"#"}}};})),AI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/core",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":true},$recursiveAnchor:true,title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveRef:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:false},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}}}};})),CI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/format",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/format":true},$recursiveAnchor:true,title:"Format vocabulary meta-schema",type:["object","boolean"],properties:{format:{type:"string"}}};})),MI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/meta-data":true},$recursiveAnchor:true,title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:true,deprecated:{type:"boolean",default:false},readOnly:{type:"boolean",default:false},writeOnly:{type:"boolean",default:false},examples:{type:"array",items:true}}};})),jI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/validation",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/validation":true},$recursiveAnchor:true,title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:false},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}},const:true,enum:{type:"array",items:true},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:true}]}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:true,default:[]}}};})),DI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=kI(),n=NI(),o=PI(),r=AI(),i=CI(),s=MI(),a=jI(),c=["/properties"];function u(l){return [t,n,o,r,m(this,i),s,m(this,a)].forEach(h=>this.addMetaSchema(h,void 0,false)),this;function m(h,y){return l?h.$dataMetaSchema(y,c):y}}e.default=u;})),UI=G(((e,t)=>{Object.defineProperty(e,"__esModule",{value:true}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2019=void 0;let n=k_(),o=SR(),r=$R(),i=xR(),s=wR(),a=C_(),c=DI(),u="https://json-schema.org/draft/2019-09/schema";var l=class extends n.default{constructor(p={}){super({...p,dynamicRef:true,next:true,unevaluated:true});}_addVocabularies(){super._addVocabularies(),this.addVocabulary(r.default),o.default.forEach(p=>this.addVocabulary(p)),this.addVocabulary(i.default),this.addVocabulary(s.default),this.opts.discriminator&&this.addKeyword(a.default);}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:p,meta:S}=this.opts;S&&(c.default.call(this,p),this.refs["http://json-schema.org/schema"]=u);}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}};e.Ajv2019=l,t.exports=e=l,t.exports.Ajv2019=l,Object.defineProperty(e,"__esModule",{value:true}),e.default=l;var m=Xo();Object.defineProperty(e,"KeywordCxt",{enumerable:true,get:function(){return m.KeywordCxt}});var h=Se();Object.defineProperty(e,"_",{enumerable:true,get:function(){return h._}}),Object.defineProperty(e,"str",{enumerable:true,get:function(){return h.str}}),Object.defineProperty(e,"stringify",{enumerable:true,get:function(){return h.stringify}}),Object.defineProperty(e,"nil",{enumerable:true,get:function(){return h.nil}}),Object.defineProperty(e,"Name",{enumerable:true,get:function(){return h.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:true,get:function(){return h.CodeGen}});var y=Ls();Object.defineProperty(e,"ValidationError",{enumerable:true,get:function(){return y.default}});var b=Wo();Object.defineProperty(e,"MissingRefError",{enumerable:true,get:function(){return b.default}});})),LI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=mR(),n=pR(),o=_R(),r=$R(),i=xR(),s=wR(),a=vR(),c=yR(),u=[r.default,t.default,n.default,(0, o.default)(true),a.default,c.metadataVocabulary,c.contentVocabulary,i.default,s.default];e.default=u;})),FI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/schema",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":true,"https://json-schema.org/draft/2020-12/vocab/applicator":true,"https://json-schema.org/draft/2020-12/vocab/unevaluated":true,"https://json-schema.org/draft/2020-12/vocab/validation":true,"https://json-schema.org/draft/2020-12/vocab/meta-data":true,"https://json-schema.org/draft/2020-12/vocab/format-annotation":true,"https://json-schema.org/draft/2020-12/vocab/content":true},$dynamicAnchor:"meta",title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/unevaluated"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format-annotation"},{$ref:"meta/content"}],type:["object","boolean"],$comment:"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.",properties:{definitions:{$comment:'"definitions" has been replaced by "$defs".',type:"object",additionalProperties:{$dynamicRef:"#meta"},deprecated:true,default:{}},dependencies:{$comment:'"dependencies" has been split and replaced by "dependentSchemas" and "dependentRequired" in order to serve their differing semantics.',type:"object",additionalProperties:{anyOf:[{$dynamicRef:"#meta"},{$ref:"meta/validation#/$defs/stringArray"}]},deprecated:true,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:true},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:true}}};})),qI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/applicator":true},$dynamicAnchor:"meta",title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{prefixItems:{$ref:"#/$defs/schemaArray"},items:{$dynamicRef:"#meta"},contains:{$dynamicRef:"#meta"},additionalProperties:{$dynamicRef:"#meta"},properties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},patternProperties:{type:"object",additionalProperties:{$dynamicRef:"#meta"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$dynamicRef:"#meta"},default:{}},propertyNames:{$dynamicRef:"#meta"},if:{$dynamicRef:"#meta"},then:{$dynamicRef:"#meta"},else:{$dynamicRef:"#meta"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$dynamicRef:"#meta"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$dynamicRef:"#meta"}}}};})),VI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/unevaluated",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/unevaluated":true},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}};})),BI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/content",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/content":true},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}};})),KI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/core",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/core":true},$dynamicAnchor:"meta",title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{$ref:"#/$defs/uriReferenceString",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{$ref:"#/$defs/uriString"},$ref:{$ref:"#/$defs/uriReferenceString"},$anchor:{$ref:"#/$defs/anchorString"},$dynamicRef:{$ref:"#/$defs/uriReferenceString"},$dynamicAnchor:{$ref:"#/$defs/anchorString"},$vocabulary:{type:"object",propertyNames:{$ref:"#/$defs/uriString"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$dynamicRef:"#meta"}}},$defs:{anchorString:{type:"string",pattern:"^[A-Za-z_][-A-Za-z0-9._]*$"},uriString:{type:"string",format:"uri"},uriReferenceString:{type:"string",format:"uri-reference"}}};})),GI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/format-annotation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/format-annotation":true},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}};})),HI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/meta-data":true},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:true,deprecated:{type:"boolean",default:false},readOnly:{type:"boolean",default:false},writeOnly:{type:"boolean",default:false},examples:{type:"array",items:true}}};})),ZI=G(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://json-schema.org/draft/2020-12/meta/validation",$vocabulary:{"https://json-schema.org/draft/2020-12/vocab/validation":true},$dynamicAnchor:"meta",title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:true}]},const:true,enum:{type:"array",items:true},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/$defs/nonNegativeInteger"},minLength:{$ref:"#/$defs/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},maxItems:{$ref:"#/$defs/nonNegativeInteger"},minItems:{$ref:"#/$defs/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:false},maxContains:{$ref:"#/$defs/nonNegativeInteger"},minContains:{$ref:"#/$defs/nonNegativeInteger",default:1},maxProperties:{$ref:"#/$defs/nonNegativeInteger"},minProperties:{$ref:"#/$defs/nonNegativeIntegerDefault0"},required:{$ref:"#/$defs/stringArray"},dependentRequired:{type:"object",additionalProperties:{$ref:"#/$defs/stringArray"}}},$defs:{nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{$ref:"#/$defs/nonNegativeInteger",default:0},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:true,default:[]}}};})),JI=G((e=>{Object.defineProperty(e,"__esModule",{value:true});let t=FI(),n=qI(),o=VI(),r=BI(),i=KI(),s=GI(),a=HI(),c=ZI(),u=["/properties"];function l(m){return [t,n,o,r,i,h(this,s),a,h(this,c)].forEach(y=>this.addMetaSchema(y,void 0,false)),this;function h(y,b){return m?y.$dataMetaSchema(b,u):b}}e.default=l;})),XI=G(((e,t)=>{Object.defineProperty(e,"__esModule",{value:true}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;let n=k_(),o=LI(),r=C_(),i=JI(),s="https://json-schema.org/draft/2020-12/schema";var a=class extends n.default{constructor(h={}){super({...h,dynamicRef:true,next:true,unevaluated:true});}_addVocabularies(){super._addVocabularies(),o.default.forEach(h=>this.addVocabulary(h)),this.opts.discriminator&&this.addKeyword(r.default);}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:h,meta:y}=this.opts;y&&(i.default.call(this,h),this.refs["http://json-schema.org/schema"]=s);}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv2020=a,t.exports=e=a,t.exports.Ajv2020=a,Object.defineProperty(e,"__esModule",{value:true}),e.default=a;var c=Xo();Object.defineProperty(e,"KeywordCxt",{enumerable:true,get:function(){return c.KeywordCxt}});var u=Se();Object.defineProperty(e,"_",{enumerable:true,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:true,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:true,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:true,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:true,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:true,get:function(){return u.CodeGen}});var l=Ls();Object.defineProperty(e,"ValidationError",{enumerable:true,get:function(){return l.default}});var m=Wo();Object.defineProperty(e,"MissingRefError",{enumerable:true,get:function(){return m.default}});})),WI=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(N,F){return {validate:N,compare:F}}e.fullFormats={date:t(i,s),time:t(c(true),u),"date-time":t(h(true),y),"iso-time":t(c(),l),"iso-date-time":t(h(),b),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:d,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:A,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:f,int32:{type:"number",validate:T},int64:{type:"number",validate:R},float:{type:"number",validate:$},double:{type:"number",validate:$},password:true,binary:true},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,s),time:t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,u),"date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,y),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,l),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,b),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function n(N){return N%4===0&&(N%100!==0||N%400===0)}let o=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31];function i(N){let F=o.exec(N);if(!F)return false;let V=+F[1],K=+F[2],ue=+F[3];return K>=1&&K<=12&&ue>=1&&ue<=(K===2&&n(V)?29:r[K])}function s(N,F){if(N&&F)return N>F?1:N<F?-1:0}let a=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(N){return function(V){let K=a.exec(V);if(!K)return false;let ue=+K[1],ke=+K[2],xe=+K[3],Ve=K[4],be=K[5]==="-"?-1:1,k=+(K[6]||0),U=+(K[7]||0);if(k>23||U>59||N&&!Ve)return false;if(ue<=23&&ke<=59&&xe<60)return true;let B=ke-U*be,w=ue-k*be-(B<0?1:0);return (w===23||w===-1)&&(B===59||B===-1)&&xe<61}}function u(N,F){if(!(N&&F))return;let V=new Date("2020-01-01T"+N).valueOf(),K=new Date("2020-01-01T"+F).valueOf();if(V&&K)return V-K}function l(N,F){if(!(N&&F))return;let V=a.exec(N),K=a.exec(F);if(V&&K)return N=V[1]+V[2]+V[3],F=K[1]+K[2]+K[3],N>F?1:N<F?-1:0}let m=/t|\s/i;function h(N){let F=c(N);return function(K){let ue=K.split(m);return ue.length===2&&i(ue[0])&&F(ue[1])}}function y(N,F){if(!(N&&F))return;let V=new Date(N).valueOf(),K=new Date(F).valueOf();if(V&&K)return V-K}function b(N,F){if(!(N&&F))return;let[V,K]=N.split(m),[ue,ke]=F.split(m),xe=s(V,ue);if(xe!==void 0)return xe||u(K,ke)}let p=/\/|:/,S=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function d(N){return p.test(N)&&S.test(N)}let _=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function f(N){return _.lastIndex=0,_.test(N)}let v=-2147483648,x=2**31-1;function T(N){return Number.isInteger(N)&&N<=x&&N>=v}function R(N){return Number.isInteger(N)}function $(){return true}let E=/[^\\]\\Z/;function A(N){if(E.test(N))return false;try{return new RegExp(N),!0}catch{return false}}})),YI=G((e=>{Object.defineProperty(e,"__esModule",{value:true}),e.formatLimitDefinition=void 0;let t=bR(),n=Se(),o=n.operators,r={formatMaximum:{okStr:"<=",ok:o.LTE,fail:o.GT},formatMinimum:{okStr:">=",ok:o.GTE,fail:o.LT},formatExclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},formatExclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},i={message:({keyword:a,schemaCode:c})=>(0, n.str)`should be ${r[a].okStr} ${c}`,params:({keyword:a,schemaCode:c})=>(0, n._)`{comparison: ${r[a].okStr}, limit: ${c}}`};e.formatLimitDefinition={keyword:Object.keys(r),type:"string",schemaType:"string",$data:true,error:i,code(a){let{gen:c,data:u,schemaCode:l,keyword:m,it:h}=a,{opts:y,self:b}=h;if(!y.validateFormats)return;let p=new t.KeywordCxt(h,b.RULES.all.format.definition,"format");p.$data?S():d();function S(){let f=c.scopeValue("formats",{ref:b.formats,code:y.code.formats}),v=c.const("fmt",(0, n._)`${f}[${p.schemaCode}]`);a.fail$data((0, n.or)((0, n._)`typeof ${v} != "object"`,(0, n._)`${v} instanceof RegExp`,(0, n._)`typeof ${v}.compare != "function"`,_(v)));}function d(){let f=p.schema,v=b.formats[f];if(!v||v===true)return;if(typeof v!="object"||v instanceof RegExp||typeof v.compare!="function")throw new Error(`"${m}": format "${f}" does not define "compare" function`);let x=c.scopeValue("formats",{key:f,ref:v,code:y.code.formats?(0, n._)`${y.code.formats}${(0, n.getProperty)(f)}`:void 0});a.fail$data(_(x));}function _(f){return (0, n._)`${f}.compare(${u}, ${l}) ${r[m].fail} 0`}},dependencies:["format"]};let s=a=>(a.addKeyword(e.formatLimitDefinition),a);e.default=s;})),QI=G(((e,t)=>{Object.defineProperty(e,"__esModule",{value:true});let n=WI(),o=YI(),r=Se(),i=new r.Name("fullFormats"),s=new r.Name("fastFormats"),a=(u,l={keywords:true})=>{if(Array.isArray(l))return c(u,l,n.fullFormats,i),u;let[m,h]=l.mode==="fast"?[n.fastFormats,s]:[n.fullFormats,i];return c(u,l.formats||n.formatNames,m,h),l.keywords&&(0, o.default)(u),u};a.get=(u,l="full")=>{let m=(l==="fast"?n.fastFormats:n.fullFormats)[u];if(!m)throw new Error(`Unknown format "${u}"`);return m};function c(u,l,m,h){var y,b;(y=(b=u.opts.code).formats)!==null&&y!==void 0||(b.formats=(0, r._)`require("ajv-formats/dist/formats").${h}`);for(let p of l)u.addFormat(p,m[p]);}t.exports=e=a,Object.defineProperty(e,"__esModule",{value:true}),e.default=a;})),ER=bR(),ez=UI(),tz=XI(),rz=la(QI()),nz=rz.default;function O_(e){let t=new e({strict:false,validateFormats:true,validateSchema:false,allErrors:true});return nz(t),t}var od=class{_ajv;_ajvDraft7;_ajv2019;_userAjv;constructor(e){this._userAjv=e!==void 0,this._ajv=e;}get ajv(){return this._ajv??=O_(tz.Ajv2020)}_engineFor(e){if(this._userAjv)return this.ajv;let t=gv(e,"pass a pre-configured Ajv instance to AjvJsonSchemaValidator(ajv) to validate other dialects.");return t==="2020-12"?this.ajv:t==="2019-09"?this._ajv2019??=O_(ez.Ajv2019):this._ajvDraft7??=O_(ER.Ajv)}getValidator(e){let t=this._engineFor(e),n="$id"in e&&typeof e.$id=="string"?t.getSchema(e.$id)??t.compile(e):t.compile(e);return o=>n(o)?{valid:true,data:o,errorMessage:void 0}:{valid:false,data:void 0,errorMessage:t.errorsText(n.errors)}}};ER.Ajv;var MR=Symbol.for("mcp.completable");function D_(e){return !!e&&typeof e=="object"&&MR in e}function iz(e){return e[MR]?.complete}function sz(e,t){switch(t.kind){case "tools_list_changed":return e.toolsListChanged===true;case "prompts_list_changed":return e.promptsListChanged===true;case "resources_list_changed":return e.resourcesListChanged===true;case "resource_updated":return e.resourceSubscriptions!==void 0&&e.resourceSubscriptions.includes(t.uri)}}function az(e,t){let n={},o=r=>t===void 0||r===true;return e.toolsListChanged===true&&o(t?.tools?.listChanged)&&(n.toolsListChanged=true),e.promptsListChanged===true&&o(t?.prompts?.listChanged)&&(n.promptsListChanged=true),e.resourcesListChanged===true&&o(t?.resources?.listChanged)&&(n.resourcesListChanged=true),e.resourceSubscriptions!==void 0&&e.resourceSubscriptions.length>0&&o(t?.resources?.subscribe)&&(n.resourceSubscriptions=[...e.resourceSubscriptions]),n}var id=1024;function IR(e,t){return {method:e.method,params:{...e.params,_meta:{...e.params?._meta,[Cn]:t}}}}function cz(e){let t=qr(Ds).validateRequest("subscriptions/listen",e);return t.ok?t.value.params?.notifications:void 0}var uz=new Set(["notifications/tools/list_changed","notifications/prompts/list_changed","notifications/resources/list_changed","notifications/resources/updated"]),jR=class{_subs=new Map;_serverCapabilities;_serverInfo;constructor(e=id,t,n){this._maxSubscriptions=e,this._serverCapabilities=t,this._serverInfo=n;}setServerCapabilities(e,t){this._serverCapabilities=e,t!==void 0&&(this._serverInfo=t);}has(e){return this._subs.has(e)}serve(e){if(this._serverCapabilities===void 0)throw new Error("StdioListenRouter.serve() called before setServerCapabilities(); refusing to honor a filter without capabilities");if(this._subs.size>=this._maxSubscriptions)return {jsonrpc:"2.0",id:e.id,error:{code:-32603,message:"Subscription limit reached"}};let t=cz(e);if(t===void 0)return {jsonrpc:"2.0",id:e.id,error:{code:-32602,message:"Invalid params: 'notifications' is required and must be a valid SubscriptionFilter"}};let n=az(t,this._serverCapabilities);return this._subs.set(e.id,n),IR({method:"notifications/subscriptions/acknowledged",params:{notifications:n}},e.id)}cancel(e){return this._subs.delete(e)}routeOutbound(e){if(!uz.has(e.method))return "passthrough";let t=e.params?.uri,n=typeof t=="string"?t:void 0,o=lz(e.method,n),r=[];for(let[i,s]of this._subs)sz(s,o)&&r.push(IR({method:e.method,params:e.params??{}},i));return r}teardownAll(){let e=[];for(let t of this._subs.keys())e.push({jsonrpc:"2.0",id:t,result:{resultType:"complete",_meta:{[Cn]:t,...this._serverInfo!==void 0&&{[Yt]:this._serverInfo}}}});return this._subs.clear(),e}};function lz(e,t){switch(e){case "notifications/tools/list_changed":return {kind:"tools_list_changed"};case "notifications/prompts/list_changed":return {kind:"prompts_list_changed"};case "notifications/resources/list_changed":return {kind:"resources_list_changed"};default:return {kind:"resource_updated",uri:t??""}}}var dz=8,mz=6e5;function pz(e){if(e?.maxRounds!==void 0&&(!Number.isInteger(e.maxRounds)||e.maxRounds<1))throw new RangeError(`inputRequired.maxRounds must be a positive integer (got ${e.maxRounds})`);if(e?.roundTimeoutMs!==void 0&&(!Number.isFinite(e.roundTimeoutMs)||e.roundTimeoutMs<=0))throw new RangeError(`inputRequired.roundTimeoutMs must be a positive number (got ${e.roundTimeoutMs})`);return {maxRounds:e?.maxRounds??dz,roundTimeoutMs:e?.roundTimeoutMs??mz,legacyShim:e?.legacyShim??true}}function DR(e,t,n){if(n===null||typeof n!="object"||typeof n.method!="string")throw new de(Q.InternalError,`Handler for ${e} returned an invalid input request '${t}': each inputRequests entry must be an embedded elicitation/create, sampling/createMessage, or roots/list request`);let o=n,r=zb(o);if(r===void 0)throw new de(Q.InternalError,`Handler for ${e} returned an input request '${t}' of kind '${o.method}', which is not an embedded request the 2026-07-28 revision defines`);return {embedded:o,required:r}}function fz(){let e=globalThis.crypto;if(e?.randomUUID!==void 0)return e.randomUUID();let t=new Uint8Array(16);e.getRandomValues(t),t[6]=t[6]&15|64,t[8]=t[8]&63|128;let n=[...t].map(o=>o.toString(16).padStart(2,"0")).join("");return `${n.slice(0,8)}-${n.slice(8,12)}-${n.slice(12,16)}-${n.slice(16,20)}-${n.slice(20)}`}function j_(e,t){if(e==="tools/call")return {content:[{type:"text",text:t}],isError:true};throw new de(Q.InternalError,t)}var hz=class{constructor(e){this._host=e;}async fulfill(e,t,n,o,r){let{maxRounds:i,roundTimeoutMs:s}=this._host,a=o.mcpReq.signal,c=r,u=0;for(;;){if(u+=1,u>i)return j_(e,Wb(e,i));let l=c.inputRequests,m=l!=null&&Object.keys(l).length>0,h=typeof c.requestState=="string"?c.requestState:void 0;if(!m&&h===void 0)throw new de(Q.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);let y;if(m){let S=this._host.resolvedClientCapabilities(o),d=[];for(let[f,v]of Object.entries(l)){let{embedded:x,required:T}=DR(e,f,v);if(x.method!=="roots/list"&&x.params===void 0)throw new de(Q.InternalError,`Handler for ${e} returned an input request '${f}' of kind '${x.method}' without params`);if(ql(T,S)!==void 0)return j_(e,`Cannot request input '${f}' (${x.method}): the client on this 2025-era connection did not declare the required capability${S===void 0?" (no client capabilities are available on this connection \u2014 per-request legacy serving cannot receive server-to-client requests)":""}`);d.push([f,x]);}let _=Qb(a);try{let f={relatedRequestId:o.mcpReq.id,timeout:s,resetTimeoutOnProgress:!0,onprogress:()=>{},signal:_.signal},v=await Promise.all(d.map(async([x,T])=>{try{return [x,await this._dispatchLeg(T,f)]}catch(R){throw _.abort(R),R}}));y=Object.fromEntries(v);}catch(f){if(a.aborted)throw f;return j_(e,`Fulfilling input required by '${e}' failed: ${f instanceof Error?f.message:String(f)}`)}finally{_.dispose();}}else await Yb(Xb,a);let b={...o,mcpReq:{...o.mcpReq,inputResponses:y,droppedInputResponseKeys:void 0,requestState:Us(h)}};if(h!==void 0){let S=await this._host.verifyRequestState(h,b,e);S!==void 0&&(b=T_(b,S));}let p=await t(n,b);if(!mr(p))return p;c=p;}}async _dispatchLeg(e,t){switch(e.method){case "elicitation/create":{let n=e.params;return n.mode==="url"&&n.elicitationId===void 0&&(n={...n,elicitationId:fz()}),await this._host.sendElicitation(n,t)}case "sampling/createMessage":return await this._host.sendSampling(e.params,t);case "roots/list":return await this._host.listRoots(e.params,t)}}},gz=new Set(["tools/call","prompts/get","resources/read"]),UR,LR;function U_(e,t){UR(e,t);}function L_(e){return LR(e)}var FR=class extends x_{_clientCapabilities;_clientVersion;static{UR=(e,t)=>{let n=t.filter(o=>!e._supportedProtocolVersions.includes(o));n.length>0&&(e._supportedProtocolVersions=[...e._supportedProtocolVersions,...n]),e.setRequestHandler("server/discover",()=>e._ondiscover());},LR=e=>e._serverInfo;}_capabilities;_instructions;_jsonSchemaValidator;_cacheHints;_requestStateVerify;_inputRequiredServing;_legacyShim;_legacyInputRequiredShim(){return this._legacyShim??=new hz({maxRounds:this._inputRequiredServing.maxRounds,roundTimeoutMs:this._inputRequiredServing.roundTimeoutMs,resolvedClientCapabilities:e=>this._inputRequestCapabilityView(e),verifyRequestState:(e,t,n)=>this._verifyRequestState(e,t,n),sendElicitation:(e,t)=>this._sendElicitationLeg(e,t,{validateAcceptedContent:false}),sendSampling:(e,t)=>this.createMessage(e,t),listRoots:(e,t)=>this.listRoots(e,t)})}oninitialized;constructor(e,t){if(super(t),this._serverInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._instructions=t?.instructions,this._jsonSchemaValidator=t?.jsonSchemaValidator??new od,this._requestStateVerify=t?.requestState?.verify,this._inputRequiredServing=pz(t?.inputRequired),t?.cacheHints!==void 0){for(let[n,o]of Object.entries(t.cacheHints))o!==void 0&&f_(o,`cacheHints['${n}']`);this._cacheHints=t.cacheHints;}this.setRequestHandler("initialize",n=>this._oninitialize(n)),this.setNotificationHandler("notifications/initialized",()=>this.oninitialized?.()),c_(this._supportedProtocolVersions).length>0&&this.setRequestHandler("server/discover",()=>this._ondiscover()),this._capabilities.logging&&this._registerLoggingHandler();}_registerLoggingHandler(){this.setRequestHandler("logging/setLevel",async(e,t)=>{let n=t.sessionId||t.http?.req?.headers.get("mcp-session-id")||void 0,{level:o}=e.params,r=Xl(Lr,o);return r.success&&this._loggingLevels.set(n,r.data),{}});}buildContext(e,t){let n=e.http||t?.request||t?.closeSSEStream||t?.closeStandaloneSSEStream;return {...e,mcpReq:{...e.mcpReq,log:(o,r,i)=>{if(!this._capabilities.logging)return Promise.resolve();let s;if(this._servedModernEra()){if(s=e.mcpReq.envelope?.[Ar],s===void 0)return Promise.resolve()}else s=this._loggingLevels.get(e.sessionId)??this._loggingLevels.get(void 0);return s!==void 0&&this.LOG_LEVEL_SEVERITY.get(o)<this.LOG_LEVEL_SEVERITY.get(s)?Promise.resolve():e.mcpReq.notify({method:"notifications/message",params:{level:o,data:r,logger:i}})},elicitInput:(o,r)=>this.elicitInput(o,r),requestSampling:(o,r)=>this.createMessage(o,r)},http:n?{...e.http,req:t?.request,closeSSE:t?.closeSSEStream,closeStandaloneSSE:t?.closeStandaloneSSEStream}:void 0}}_loggingLevels=new Map;LOG_LEVEL_SEVERITY=new Map(Lr.options.map((e,t)=>[e,t]));isMessageIgnored=(e,t)=>{let n=this._loggingLevels.get(t);return n?this.LOG_LEVEL_SEVERITY.get(e)<this.LOG_LEVEL_SEVERITY.get(n):false};registerCapabilities(e){if(this.transport)throw new ye(Ie.AlreadyConnected,"Cannot register capabilities after connecting to transport");let t=!!this._capabilities.logging;this._capabilities=w_(this._capabilities,e),!t&&this._capabilities.logging&&this._registerLoggingHandler();}_wrapHandler(e,t){if(e!=="tools/call"){let n=this._cacheHints?.[e],o=gz.has(e);return n===void 0&&!o?async(r,i)=>{let s=await t(r,i);if(mr(s))throw new de(Q.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return s}:async(r,i)=>{let s=o?await this._invokeInputRequiredCapableHandler(e,t,r,i):await t(r,i);if(mr(s)){if(!o)throw new de(Q.InternalError,`Handler for ${e} returned an input-required result, but only tools/call, prompts/get and resources/read support input_required (protocol revision 2026-07-28)`);return s}return n===void 0?s:Vl(s,n)}}return async(n,o)=>{let r=qr(this._negotiatedProtocolVersion),i=r.validateRequest("tools/call",n);if(!i.ok)throw new de(i.reason==="not-in-era"?Q.InternalError:Q.InvalidParams,i.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call request: ${i.message}`);let s=await this._invokeInputRequiredCapableHandler("tools/call",t,n,o);if(mr(s))return s;let a=u_(s),c=r.validateResult("tools/call",a);if(!c.ok)throw new de(c.reason==="not-in-era"?Q.InternalError:Q.InvalidParams,c.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call result: ${c.message}`);return c.value}}_servedModernEra(){return this._negotiatedProtocolVersion!==void 0&&Zo(this._negotiatedProtocolVersion)}async _invokeInputRequiredCapableHandler(e,t,n,o){let r=this._servedModernEra(),i=o.mcpReq.requestState();if(i!==void 0&&typeof i!="string")throw new de(Q.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"});let s=o;if(typeof i=="string"){let m=await this._verifyRequestState(i,o,e);m!==void 0&&(s=T_(o,m));}let a;try{a=await t(n,s);}catch(m){throw m instanceof de&&m.code===Q.UrlElicitationRequired&&r?new de(Q.InternalError,`URL elicitation cannot be signalled by throwing UrlElicitationRequiredError on protocol revision ${this._negotiatedProtocolVersion}: return inputRequired({ inputRequests: { \u2026: inputRequired.elicitUrl(...) } }) from the handler instead. The urlElicitationRequired error (-32042) of earlier revisions is not available on this revision.`):m}if(!mr(a))return a;if(!r){if(!this._inputRequiredServing.legacyShim)throw new de(Q.InternalError,`Handler for ${e} returned an input-required result, but this request is served on protocol revision ${this._negotiatedProtocolVersion??An}, which has no input_required vocabulary`);return await this._legacyInputRequiredShim().fulfill(e,t,n,s,a)}let c=a.inputRequests,u=c!=null&&Object.keys(c).length>0,l=typeof a.requestState=="string";if(!u&&!l)throw new de(Q.InternalError,`Handler for ${e} returned an input-required result with neither inputRequests nor requestState (every InputRequiredResult must include at least one of the two)`);if(u){let m=this._inputRequestCapabilityView(o);for(let[h,y]of Object.entries(c)){let{embedded:b,required:p}=DR(e,h,y),S=ql(p,m);if(S!==void 0)throw new Kl({requiredCapabilities:S},`Cannot request input '${h}' (${b.method}): the request's client capabilities do not declare the required capability`)}}return a}async _verifyRequestState(e,t,n){if(this._requestStateVerify!==void 0)try{return await this._requestStateVerify(e,t)}catch(o){throw this.onerror?.(new Error(`requestState verification rejected ${n}: ${o instanceof Error?o.message:String(o)}`)),new de(Q.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"})}}_inputRequestCapabilityView(e){return this._servedModernEra()?e.mcpReq.envelope?.[lr]:this._clientCapabilities}_assertPushApiInServedEra(e){if(this._servedModernEra())throw new ye(Ie.MethodNotSupportedByProtocolVersion,`Server-to-client requests are not available on protocol revision ${this._negotiatedProtocolVersion}: '${e}' cannot be sent while serving a request on that revision. Return inputRequired({ ... }) from the handler instead \u2014 the client fulfils the embedded requests and retries the original request (multi round-trip requests).`,{method:e,era:"2026-07-28"})}assertCapabilityForMethod(e){switch(e){case "sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new ye(Ie.CapabilityNotSupported,`Client does not support sampling (required for ${e})`);break;case "elicitation/create":if(!this._clientCapabilities?.elicitation)throw new ye(Ie.CapabilityNotSupported,`Client does not support elicitation (required for ${e})`);break;case "roots/list":if(!this._clientCapabilities?.roots)throw new ye(Ie.CapabilityNotSupported,`Client does not support listing roots (required for ${e})`);break;}}assertNotificationCapability(e){switch(e){case "notifications/message":if(!this._capabilities.logging)throw new ye(Ie.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case "notifications/resources/updated":case "notifications/resources/list_changed":if(!this._capabilities.resources)throw new ye(Ie.CapabilityNotSupported,`Server does not support notifying about resources (required for ${e})`);break;case "notifications/tools/list_changed":if(!this._capabilities.tools)throw new ye(Ie.CapabilityNotSupported,`Server does not support notifying of tool list changes (required for ${e})`);break;case "notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new ye(Ie.CapabilityNotSupported,`Server does not support notifying of prompt list changes (required for ${e})`);break;case "notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new ye(Ie.CapabilityNotSupported,`Client does not support URL elicitation (required for ${e})`);break;}}assertRequestHandlerCapability(e){switch(e){case "completion/complete":if(!this._capabilities.completions)throw new ye(Ie.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case "logging/setLevel":if(!this._capabilities.logging)throw new ye(Ie.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case "prompts/get":case "prompts/list":if(!this._capabilities.prompts)throw new ye(Ie.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case "resources/list":case "resources/templates/list":case "resources/read":if(!this._capabilities.resources)throw new ye(Ie.CapabilityNotSupported,`Server does not support resources (required for ${e})`);break;case "tools/call":case "tools/list":if(!this._capabilities.tools)throw new ye(Ie.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;}}async _oninitialize(e){let t=e.params.protocolVersion;this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo;let n=kb(this._supportedProtocolVersions),o=n.includes(t)?t:n[0]??An;return this._negotiatedProtocolVersion=o,this.transport?.setProtocolVersion?.(o),{protocolVersion:o,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}_ondiscover(){return {supportedVersions:c_(this._supportedProtocolVersions),capabilities:vz(this.getCapabilities()),...this._instructions&&{instructions:this._instructions}}}_outboundServerInfo(){return this._serverInfo}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}projectCallToolResult(e,t){return this._wireCodec().projectCallToolResult(e,t)}getCapabilities(){return this._capabilities}async ping(){return this._assertPushApiInServedEra("ping"),this.request({method:"ping"})}async createMessage(e,t){if(this._assertPushApiInServedEra("sampling/createMessage"),(e.tools||e.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new ye(Ie.CapabilityNotSupported,"Client does not support sampling tools capability.");if(e.messages.length>0){let i=e.messages.at(-1),s=Array.isArray(i.content)?i.content:[i.content],a=s.some(m=>m.type==="tool_result"),c=e.messages.length>1?e.messages.at(-2):void 0,u=c?Array.isArray(c.content)?c.content:[c.content]:[],l=u.some(m=>m.type==="tool_use");if(a){if(s.some(m=>m.type!=="tool_result"))throw new de(Q.InvalidParams,"The last message must contain only tool_result content if any is present");if(!l)throw new de(Q.InvalidParams,"tool_result blocks are not matching any tool_use from the previous message")}if(l){let m=new Set(u.filter(y=>y.type==="tool_use").map(y=>y.id)),h=new Set(s.filter(y=>y.type==="tool_result").map(y=>y.toolUseId));if(m.size!==h.size||![...m].every(y=>h.has(y)))throw new de(Q.InvalidParams,"ids of tool_result blocks and tool_use blocks from previous message do not match")}}let n=!!(e.tools||e.toolChoice),o=await this.request({method:"sampling/createMessage",params:e},t),r=this._wireCodec().samplingResultVariant(n,o);if(!r.ok)throw new ye(Ie.InvalidResult,`Invalid sampling/createMessage result: ${r.reason==="invalid"?r.message:r.reason}`);return r.value}async elicitInput(e,t){switch(this._assertPushApiInServedEra("elicitation/create"),e.mode??"form"){case "url":if(!this._clientCapabilities?.elicitation?.url)throw new ye(Ie.CapabilityNotSupported,"Client does not support url elicitation.");break;case "form":if(!this._clientCapabilities?.elicitation?.form)throw new ye(Ie.CapabilityNotSupported,"Client does not support form elicitation.");break}return this._sendElicitationLeg(e,t)}async _sendElicitationLeg(e,t,n){let o=e.mode??"form",r=n?.validateAcceptedContent??true;switch(o){case "url":{let i=e;return this.request({method:"elicitation/create",params:i},t)}case "form":{let i=e.mode==="form"?e:{...e,mode:"form"},s=await this.request({method:"elicitation/create",params:i},t);if(r&&s.action==="accept"&&s.content&&i.requestedSchema)try{let a=this._jsonSchemaValidator.getValidator(i.requestedSchema)(s.content);if(!a.valid)throw new de(Q.InvalidParams,`Elicitation response content does not match requested schema: ${a.errorMessage}`)}catch(a){throw a instanceof de?a:new de(Q.InternalError,`Error validating elicitation response: ${a instanceof Error?a.message:String(a)}`)}return s}}}createElicitationCompletionNotifier(e,t){if(!this._clientCapabilities?.elicitation?.url)throw new ye(Ie.CapabilityNotSupported,"Client does not support URL elicitation (required for notifications/elicitation/complete)");return ()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},t)}async listRoots(e,t){return this._assertPushApiInServedEra("roots/list"),this.request({method:"roots/list",params:e},t)}async sendLoggingMessage(e,t){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,t))return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}};function vz(e){return {...e}}var qs=class{server;_registeredResources={};_registeredResourceTemplates={};_registeredTools={};_registeredPrompts={};_toolInputSchemaJson={};toolInputSchemaJson(e){let t=this._registeredTools[e];if(!(t===void 0||!t.enabled)){if(Object.hasOwn(this._toolInputSchemaJson,e))return this._toolInputSchemaJson[e];if(t.inputSchema===void 0)return OR;try{let n=Kr(t.inputSchema,"input");return this._toolInputSchemaJson[e]=n,n}catch{return}}}constructor(e,t){this.server=new FR(e,t),t?.capabilities?.tools&&this.setToolRequestHandlers(),t?.capabilities?.resources&&this.setResourceRequestHandlers(),t?.capabilities?.prompts&&this.setPromptRequestHandlers();}async connect(e){return await this.server.connect(e)}async close(){await this.server.close();}_toolHandlersInitialized=false;setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler("tools/list"),this.server.assertCanSetRequestHandler("tools/call"),this.server.registerCapabilities({tools:{listChanged:this.server.getCapabilities().tools?.listChanged??true}}),this.server.setRequestHandler("tools/list",()=>({tools:Object.entries(this._registeredTools).filter(([,e])=>e.enabled).map(([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?Kr(t.inputSchema,"input"):OR,annotations:t.annotations,icons:t.icons,execution:t.execution,_meta:t._meta};return t.outputSchema&&(n.outputSchema=Kr(t.outputSchema,"output")),n})})),this.server.setRequestHandler("tools/call",async(e,t)=>{let n=this._registeredTools[e.params.name];if(!n)throw new de(Q.InvalidParams,`Tool ${e.params.name} not found`);if(!n.enabled)throw new de(Q.InvalidParams,`Tool ${e.params.name} disabled`);try{let o=await this.validateToolInput(n,e.params.arguments,e.params.name),r=await this.executeToolHandler(n,o,t);return await this.validateToolOutput(n,r,e.params.name),mr(r)?r:this.server.projectCallToolResult(r,n.outputSchemaJson)}catch(o){if(o instanceof de&&o.code===Q.UrlElicitationRequired)throw o;return this.createToolError(o instanceof Error?o.message:String(o))}}),this._toolHandlersInitialized=true);}createToolError(e){return {content:[{type:"text",text:e}],isError:true}}async validateToolInput(e,t,n){if(!e.inputSchema)return;let o=await Dn(e.inputSchema,t??{});if(!o.success)throw new de(Q.InvalidParams,`Input validation error: Invalid arguments for tool ${n}: ${o.error}`);return o.data}async validateToolOutput(e,t,n){if(!e.outputSchema||mr(t)||t.isError)return;if(t.structuredContent===void 0)throw new de(Q.InvalidParams,`Output validation error: Tool ${n} has an output schema but no structured content was provided`);let o=await Dn(e.outputSchema,t.structuredContent);if(!o.success)throw new de(Q.InvalidParams,`Output validation error: Invalid structured content for tool ${n}: ${o.error}`)}async executeToolHandler(e,t,n){return e.executor(t,n)}_completionHandlerInitialized=false;setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler("completion/complete"),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler("completion/complete",async e=>{switch(e.params.ref.type){case "ref/prompt":return __(e),this.handlePromptCompletion(e,e.params.ref);case "ref/resource":return v_(e),this.handleResourceCompletion(e,e.params.ref);default:throw new de(Q.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=true);}async handlePromptCompletion(e,t){let n=this._registeredPrompts[t.name];if(!n)throw new de(Q.InvalidParams,`Prompt ${t.name} not found`);if(!n.enabled)throw new de(Q.InvalidParams,`Prompt ${t.name} disabled`);if(!n.argsSchema)return Fs;let o=CR(AR(n.argsSchema)?.[e.params.argument.name]);if(!D_(o))return Fs;let r=iz(o);return r?PR(await r(e.params.argument.value,e.params.context)):Fs}async handleResourceCompletion(e,t){let n=Object.values(this._registeredResourceTemplates).find(r=>r.resourceTemplate.uriTemplate.toString()===t.uri);if(!n){if(this._registeredResources[t.uri])return Fs;throw new de(Q.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let o=n.resourceTemplate.completeCallback(e.params.argument.name);return o?PR(await o(e.params.argument.value,e.params.context)):Fs}_resourceHandlersInitialized=false;setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler("resources/list"),this.server.assertCanSetRequestHandler("resources/templates/list"),this.server.assertCanSetRequestHandler("resources/read"),this.server.registerCapabilities({resources:{listChanged:this.server.getCapabilities().resources?.listChanged??true}}),this.server.setRequestHandler("resources/list",async(e,t)=>{let n=Object.entries(this._registeredResources).filter(([r,i])=>i.enabled).map(([r,i])=>({uri:r,name:i.name,...i.metadata})),o=[];for(let r of Object.values(this._registeredResourceTemplates)){if(!r.resourceTemplate.listCallback)continue;let i=await r.resourceTemplate.listCallback(t);for(let s of i.resources)o.push({...r.metadata,...s});}return {resources:[...n,...o]}}),this.server.setRequestHandler("resources/templates/list",async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([e,t])=>({name:e,uriTemplate:t.resourceTemplate.uriTemplate.toString(),...t.metadata}))})),this.server.setRequestHandler("resources/read",async(e,t)=>{let n;try{n=new URL(e.params.uri);}catch{throw new de(Q.InvalidParams,`Resource URI ${e.params.uri} is invalid`,{uri:e.params.uri,reason:"invalid_uri"})}let o=this._registeredResources[n.toString()];if(o){if(!o.enabled)throw new de(Q.InvalidParams,`Resource ${n} disabled`);return Vl(await o.readCallback(n,t),o.cacheHint)}for(let r of Object.values(this._registeredResourceTemplates)){let i=r.resourceTemplate.uriTemplate.match(n.toString());if(i)return Vl(await r.readCallback(n,i,t),r.cacheHint)}throw new Bl(e.params.uri)}),this._resourceHandlersInitialized=true);}_promptHandlersInitialized=false;setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler("prompts/list"),this.server.assertCanSetRequestHandler("prompts/get"),this.server.registerCapabilities({prompts:{listChanged:this.server.getCapabilities().prompts?.listChanged??true}}),this.server.setRequestHandler("prompts/list",()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,t])=>({name:e,title:t.title,description:t.description,arguments:t.argsSchema?Jb(t.argsSchema):void 0,icons:t.icons,_meta:t._meta}))})),this.server.setRequestHandler("prompts/get",async(e,t)=>{let n=this._registeredPrompts[e.params.name];if(!n)throw new de(Q.InvalidParams,`Prompt ${e.params.name} not found`);if(!n.enabled)throw new de(Q.InvalidParams,`Prompt ${e.params.name} disabled`);return n.handler(e.params.arguments,t)}),this._promptHandlersInitialized=true);}registerResource(e,t,n,o){let r=n.cacheHint,i=n;if(r!==void 0){f_(r,`resource ${e}`);let s={...n};delete s.cacheHint,i=s;}if(typeof t=="string"){if(this._registeredResources[t])throw new Error(`Resource ${t} is already registered`);let s=this._createRegisteredResource(e,n.title,t,i,o);return r!==void 0&&(s.cacheHint=r),this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}else {if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);let s=this._createRegisteredResourceTemplate(e,n.title,t,i,o);return r!==void 0&&(s.cacheHint=r),this.setResourceRequestHandlers(),this.sendResourceListChanged(),s}}_createRegisteredResource(e,t,n,o,r){let i={name:e,title:t,metadata:o,readCallback:r,enabled:true,disable:()=>i.update({enabled:false}),enable:()=>i.update({enabled:true}),remove:()=>i.update({uri:null}),update:s=>{s.uri!==void 0&&s.uri!==n&&(delete this._registeredResources[n],s.uri&&(this._registeredResources[s.uri]=i)),s.name!==void 0&&(i.name=s.name),s.title!==void 0&&(i.title=s.title),s.metadata!==void 0&&(i.metadata=s.metadata),s.callback!==void 0&&(i.readCallback=s.callback),s.enabled!==void 0&&(i.enabled=s.enabled),this.sendResourceListChanged();}};return this._registeredResources[n]=i,i}_createRegisteredResourceTemplate(e,t,n,o,r){let i={resourceTemplate:n,title:t,metadata:o,readCallback:r,enabled:true,disable:()=>i.update({enabled:false}),enable:()=>i.update({enabled:true}),remove:()=>i.update({name:null}),update:a=>{a.name!==void 0&&a.name!==e&&(delete this._registeredResourceTemplates[e],a.name&&(this._registeredResourceTemplates[a.name]=i)),a.title!==void 0&&(i.title=a.title),a.template!==void 0&&(i.resourceTemplate=a.template),a.metadata!==void 0&&(i.metadata=a.metadata),a.callback!==void 0&&(i.readCallback=a.callback),a.enabled!==void 0&&(i.enabled=a.enabled),this.sendResourceListChanged();}};this._registeredResourceTemplates[e]=i;let s=n.uriTemplate.variableNames;return Array.isArray(s)&&s.some(a=>!!n.completeCallback(a))&&this.setCompletionRequestHandler(),i}_createRegisteredPrompt(e,t,n,o,r,i,s){let a=o,c=r,u={title:t,description:n,argsSchema:o,icons:i,_meta:s,handler:NR(e,o,r),enabled:true,disable:()=>u.update({enabled:false}),enable:()=>u.update({enabled:true}),remove:()=>u.update({name:null}),update:l=>{l.name!==void 0&&l.name!==e&&(delete this._registeredPrompts[e],l.name&&(this._registeredPrompts[l.name]=u)),l.title!==void 0&&(u.title=l.title),l.description!==void 0&&(u.description=l.description),l.icons!==void 0&&(u.icons=l.icons),l._meta!==void 0&&(u._meta=l._meta);let m=false;l.argsSchema!==void 0&&(u.argsSchema=l.argsSchema,a=l.argsSchema,m=true),l.callback!==void 0&&(c=l.callback,m=true),m&&(u.handler=NR(e,a,c)),l.enabled!==void 0&&(u.enabled=l.enabled),this.sendPromptListChanged();}};if(this._registeredPrompts[e]=u,o){let l=AR(o);l&&Object.values(l).some(m=>D_(CR(m)))&&this.setCompletionRequestHandler();}return u}_createRegisteredTool(e,t,n,o,r,i,s,a,c,u){if(z_(e),o!==void 0)try{let h=Kr(o,"input");this._toolInputSchemaJson[e]=h;let y=y_(h);y.valid||console.warn(`[mcp-sdk] tool '${e}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${y.reason}`);}catch{}let l=u,m={title:t,description:n,inputSchema:o,outputSchema:r,outputSchemaJson:kR(r),annotations:i,icons:s,execution:a,_meta:c,handler:u,executor:zR(o,u),enabled:true,disable:()=>m.update({enabled:false}),enable:()=>m.update({enabled:true}),remove:()=>m.update({name:null}),update:h=>{h.name!==void 0&&h.name!==e&&(typeof h.name=="string"&&z_(h.name),delete this._registeredTools[e],delete this._toolInputSchemaJson[e],h.name&&(delete this._toolInputSchemaJson[h.name],this._registeredTools[h.name]=m,e=h.name)),h.title!==void 0&&(m.title=h.title),h.description!==void 0&&(m.description=h.description);let y=false;h.paramsSchema!==void 0&&(m.inputSchema=h.paramsSchema,delete this._toolInputSchemaJson[e],y=true),h.callback!==void 0&&(m.handler=h.callback,l=h.callback,y=true),y&&(m.executor=zR(m.inputSchema,l)),h.outputSchema!==void 0&&(m.outputSchema=h.outputSchema,m.outputSchemaJson=kR(h.outputSchema)),h.annotations!==void 0&&(m.annotations=h.annotations),h.icons!==void 0&&(m.icons=h.icons),h._meta!==void 0&&(m._meta=h._meta),h.enabled!==void 0&&(m.enabled=h.enabled),this.sendToolListChanged();}};return this._registeredTools[e]=m,this.setToolRequestHandlers(),this.sendToolListChanged(),m}registerTool(e,t,n){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let{title:o,description:r,inputSchema:i,outputSchema:s,annotations:a,icons:c,_meta:u}=t;return this._createRegisteredTool(e,o,r,Wl(i),Wl(s),a,c,void 0,u,n)}registerPrompt(e,t,n){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let{title:o,description:r,argsSchema:i,icons:s,_meta:a}=t,c=this._createRegisteredPrompt(e,o,r,Wl(i),n,s,a);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),c}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(e,t){return this.server.sendLoggingMessage(e,t)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged();}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged();}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged();}};function zR(e,t){if(e){let o=t;return async(r,i)=>o(r,i)}let n=t;return async(o,r)=>n(r)}var OR={type:"object",properties:{}};function kR(e){if(e!==void 0)try{return Kr(e,"output")}catch{return}}function NR(e,t,n){if(t){let o=n;return async(r,i)=>{let s=await Dn(t,r);if(!s.success)throw new de(Q.InvalidParams,`Invalid arguments for prompt ${e}: ${s.error}`);return o(s.data,i)}}else {let o=n;return async(r,i)=>o(i)}}function PR(e){return {completion:{values:e.map(String).slice(0,100),total:e.length,hasMore:e.length>100}}}var Fs={completion:{values:[],hasMore:false}};function AR(e){let t=e;if(t.shape&&typeof t.shape=="object")return t.shape}function yz(e){return e?.type==="optional"}function CR(e){return yz(e)?e.def?.innerType??e:e}var Sz=class{_readBuffer;_started=false;_closed=false;constructor(e=M_.stdin,t=M_.stdout,n){this._stdin=e,this._stdout=t,this._readBuffer=new E_({maxBufferSize:n?.maxBufferSize});}onclose;onerror;onmessage;_ondata=e=>{try{this._readBuffer.append(e),this.processReadBuffer();}catch(t){this.onerror?.(t),this.close().catch(()=>{});}};_onerror=e=>{this.onerror?.(e);};_onstdouterror=e=>{this.onerror?.(e),this.close().catch(()=>{});};async start(){if(this._started)throw new Error("StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.");this._started=true,this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror),this._stdout.on("error",this._onstdouterror);}processReadBuffer(){for(;;)try{let e=this._readBuffer.readMessage();if(e===null)break;this.onmessage?.(e);}catch(e){this.onerror?.(e);}}async close(){this._closed||(this._closed=true,this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdout.off("error",this._onstdouterror),this._stdin.listenerCount("data")===0&&this._stdin.pause(),this._readBuffer.clear(),this.onclose?.());}send(e){return this._closed?Promise.reject(new Error("StdioServerTransport is closed")):new Promise((t,n)=>{let o=I_(e),r=false,i=a=>{r||(r=true,this._stdout.off("error",i),this._stdout.off("drain",s),n(a));},s=()=>{r||(r=true,this._stdout.off("error",i),this._stdout.off("drain",s),t());};if(this._stdout.once("error",i),this._stdout.write(o)){if(r)return;r=true,this._stdout.off("error",i),t();}else r||this._stdout.once("drain",s);})}},qR=3e3,bz=class{onclose;onerror;onmessage;_closed=false;_pendingRequests=new Set;_drainWaiters=[];constructor(e,t,n){this._wire=e,this._onInstanceClose=t,this._outboundIntercept=n;}async start(){}async send(e,t){if(Ms(e)||Jl(e)){let{id:n}=e;n!==void 0&&this._settle(n);}if(!this._closed&&this._outboundIntercept?.(e)!=="handled")return this._wire.send(e,t)}setProtocolVersion=e=>{this._wire.setProtocolVersion?.(e);};deliver(e,t){if(!this._closed){if(Ct(e))this._pendingRequests.add(e.id);else if(Br(e)&&e.method==="notifications/cancelled"){let n=e.params?.requestId;n!==void 0&&this._settle(n);}this.onmessage?.(e,t);}}async whenRequestsAnswered(e){return this._closed||this._pendingRequests.size===0?true:await new Promise(t=>{let n=()=>{clearTimeout(o),t(true);},o=setTimeout(()=>{this._drainWaiters=this._drainWaiters.filter(r=>r!==n),t(false);},e);this._drainWaiters.push(n);})}async close(){if(!this._closed){this._closed=true,this._pendingRequests.clear(),this._releaseDrainWaiters();try{this._onInstanceClose();}finally{this.onclose?.();}}}_settle(e){this._pendingRequests.delete(e),this._pendingRequests.size===0&&this._releaseDrainWaiters();}_releaseDrainWaiters(){let e=this._drainWaiters;this._drainWaiters=[];for(let t of e)t();}};function Rz(e){let t=e.params;if(e.method==="initialize"&&!S_(t)){let i=t!==null&&typeof t=="object"&&typeof t.protocolVersion=="string"?t.protocolVersion:void 0;return {kind:"legacy",reason:"initialize",...i!==void 0&&{requestedVersion:i}}}if(!Gl(t))return {kind:"legacy",reason:"no-claim"};let n=Ln(t),o=(n===void 0?[]:Zl(n))[0];if(o!==void 0)return {kind:"invalid-envelope",issue:o};let r=Hl(t);return r===void 0||!Vr.includes(r)?{kind:"unsupported-revision",requested:r??"unknown"}:{kind:"modern",revision:r,classification:{era:"modern",revision:r}}}function VR(e,t={}){let n=t.legacy??"serve",o=t.transport??new Sz,r={phase:"opening"},i,s=false,a=()=>s||r.phase==="closed",c=$=>{try{t.onerror?.($);}catch{}},u=($,E,A,N)=>o.send({jsonrpc:"2.0",id:$,error:{code:E,message:A,...N!==void 0&&{data:N}}}).catch(F=>c(Bt(F))),l=new jR(t.maxSubscriptions??id),m=$=>{if(!Br($))return;let E=l.routeOutbound($);if(E!=="passthrough"){for(let A of E)o.send({jsonrpc:"2.0",...A}).catch(N=>c(Bt(N)));return "handled"}},h=async $=>{if(Ct($)&&$.method==="subscriptions/listen"){let E=Ln($.params),A=Gl($.params)?(E===void 0?[]:Zl(E))[0]:{key:"_meta",problem:"the per-request envelope is required on protocol revision 2026-07-28"},N=Hl($.params),F;if(A!==void 0)F={jsonrpc:"2.0",id:$.id,error:{code:-32602,message:`Invalid _meta envelope: ${A.key}: ${A.problem}`}};else if(N===void 0||!Vr.includes(N)){let V=new Jo({supported:[...Vr],requested:N??"unknown"});F={jsonrpc:"2.0",id:$.id,error:{code:V.code,message:V.message,data:V.data}};}else F=l.serve($);return await o.send("error"in F?F:{jsonrpc:"2.0",method:F.method,params:F.params}).catch(V=>c(Bt(V))),true}if(Br($)&&$.method==="notifications/cancelled"){let E=$.params?.requestId;if(E!==void 0&&l.cancel(E))return true}return false},y=($,E,A)=>{let N=b_({reason:E,...A!==void 0&&{requestedVersion:A}},Vr);return N===void 0?Promise.resolve():(c(new Error(`Rejected 2025-era request on a modern-only stdio connection (${N.cell}): ${N.message}`)),u($.id,N.code,N.message,N.data))},b=$=>{s||$===i||T();},p=async($,E)=>{let A=await e({era:$}),N=A instanceof qs?A.server:A;$==="modern"&&($_(N,E),U_(N,Vr),l.setServerCapabilities(N.getCapabilities(),L_(N)));let F=new bz(o,()=>b(F),$==="modern"?m:void 0);return await A.connect(F),{product:A,channel:F}},S=$=>$.product.close().catch(E=>c(Bt(E))),d=async $=>{i=$.channel;try{await $.channel.whenRequestsAnswered(qR)||c(new Error(`Discarded the probe instance with requests still unanswered after ${qR}ms; continuing with the fallback`)),await $.product.close();}catch(E){c(Bt(E));}finally{i=void 0;}},_=async $=>{if(r.phase==="closed")return;if(r.phase==="pinned"){if(r.era==="modern"&&Ct($)&&$.method==="initialize"&&!S_($.params)){await y($,"initialize",$.params!==null&&typeof $.params=="object"&&typeof $.params.protocolVersion=="string"?$.params.protocolVersion:void 0);return}if(r.era==="modern"&&await h($))return;r.instance.channel.deliver($);return}if(!Ct($)&&!Br($)){c(new Error("Discarded a JSON-RPC response received before the connection negotiated an era"));return}let E=Rz($);switch(E.kind){case "invalid-envelope":{let A=`Invalid _meta envelope for protocol revision 2026-07-28: ${E.issue.key}: ${E.issue.problem}`;Ct($)?await u($.id,Q.InvalidParams,A,{envelope:E.issue}):c(new Error(`Discarded a notification with a malformed envelope: ${A}`));return}case "unsupported-revision":if(Ct($)){let A=new Jo({supported:[...Vr],requested:E.requested});c(A),await u($.id,A.code,A.message,A.data);}else c(new Error(`Discarded a notification claiming unsupported protocol revision ${E.requested}`));return;case "modern":if(Ct($)&&$.method==="server/discover"){if(r.phase==="probe"){r.instance.channel.deliver($,{classification:E.classification});return}let A=await p("modern",E.revision);if(a()){await S(A);return}r={phase:"probe",instance:A},A.channel.deliver($,{classification:E.classification});return}if(r.phase==="probe"){if(Br($)){r.instance.channel.deliver($,{classification:E.classification});return}r={phase:"pinned",era:"modern",instance:r.instance};}else {let A=await p("modern",E.revision);if(a()){await S(A);return}r={phase:"pinned",era:"modern",instance:A};}if(await h($))return;r.instance.channel.deliver($,{classification:E.classification});return;case "legacy":{if(n==="reject"){Ct($)&&await y($,E.reason,E.requestedVersion);return}if(r.phase==="probe"){if(await d(r.instance),a())return;r={phase:"opening"};}let A=await p("legacy");if(a()){await S(A);return}r={phase:"pinned",era:"legacy",instance:A},r.instance.channel.deliver($);return}}},f=[],v=false,x=async()=>{if(!v){v=true;try{for(;f.length>0;){let $=f.shift();try{await _($);}catch(E){Ct($)&&await u($.id,Q.InternalError,"Internal server error"),c(Bt(E));}}}finally{v=false;}}},T=async()=>{if(s||r.phase==="closed")return;s=true;let $=r;r={phase:"closed"};for(let E of l.teardownAll())await o.send(E).catch(A=>c(Bt(A)));($.phase==="probe"||$.phase==="pinned")&&await $.instance.product.close().catch(E=>c(Bt(E))),await o.close().catch(E=>c(Bt(E)));};o.onmessage=$=>{f.push($),x();},o.onerror=$=>{c($),(r.phase==="probe"||r.phase==="pinned")&&r.instance.channel.onerror?.($);},o.onclose=()=>{if(s||r.phase==="closed")return;s=true;let $=r;r={phase:"closed"},($.phase==="probe"||$.phase==="pinned")&&$.instance.product.close().catch(E=>c(Bt(E)));};let R=o.start().catch($=>{throw c(Bt($)),$});return R.catch(()=>{}),{close:async()=>{await R.catch(()=>{}),await T();}}}function Bt(e){return e instanceof Error?e:new Error(String(e))}var BR=class{_listeners={};addEventListener(e,t){let n=this._listeners;return n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t),this}removeEventListener(e,t){let n=this._listeners[e];if(n!==void 0){let o=n.indexOf(t);o!==-1&&n.splice(o,1);}return this}dispatchEvent(e){let t=this._listeners[e.type];if(t!==void 0){let n=t.slice(0);for(let o=0,r=n.length;o<r;o++)n[o].call(this,e);}return this}dispose(){for(let e in this._listeners)delete this._listeners[e];}},Hr=class{_disposed=false;_name;_parent;_child;_attributes;constructor(e,t,n,o={}){if(this._name=e,this._parent=t,this._child=n,this._attributes=o,!t.isOnGraph(n))throw new Error("Cannot connect disconnected graphs.")}getName(){return this._name}getParent(){return this._parent}getChild(){return this._child}setChild(e){return this._child=e,this}getAttributes(){return this._attributes}dispose(){this._disposed||(this._parent._destroyRef(this),this._disposed=true);}isDisposed(){return this._disposed}},F_=class extends BR{_emptySet=new Set;_edges=new Set;_parentEdges=new Map;_childEdges=new Map;listEdges(){return Array.from(this._edges)}listParentEdges(e){return Array.from(this._childEdges.get(e)||this._emptySet)}listParents(e){let t=new Set;for(let n of this.listParentEdges(e))t.add(n.getParent());return Array.from(t)}listChildEdges(e){return Array.from(this._parentEdges.get(e)||this._emptySet)}listChildren(e){let t=new Set;for(let n of this.listChildEdges(e))t.add(n.getChild());return Array.from(t)}disconnectParents(e,t){for(let n of this.listParentEdges(e))(!t||t(n.getParent()))&&n.dispose();return this}_createEdge(e,t,n,o){let r=new Hr(e,t,n,o);this._edges.add(r);let i=r.getParent();this._parentEdges.has(i)||this._parentEdges.set(i,new Set),this._parentEdges.get(i).add(r);let s=r.getChild();return this._childEdges.has(s)||this._childEdges.set(s,new Set),this._childEdges.get(s).add(r),r}_destroyEdge(e){return this._edges.delete(e),this._parentEdges.get(e.getParent()).delete(e),this._childEdges.get(e.getChild()).delete(e),this}},at=class{list=[];constructor(e){if(e)for(let t of e)this.list.push(t);}add(e){this.list.push(e);}remove(e){let t=this.list.indexOf(e);t>=0&&this.list.splice(t,1);}removeChild(e){let t=[];for(let n of this.list)n.getChild()===e&&t.push(n);for(let n of t)this.remove(n);return t}listRefsByChild(e){let t=[];for(let n of this.list)n.getChild()===e&&t.push(n);return t}values(){return this.list}},Me=class{set=new Set;map=new Map;constructor(e){if(e)for(let t of e)this.add(t);}add(e){let t=e.getChild();this.removeChild(t),this.set.add(e),this.map.set(t,e);}remove(e){this.set.delete(e),this.map.delete(e.getChild());}removeChild(e){let t=this.map.get(e)||null;return t&&this.remove(t),t}getRefByChild(e){return this.map.get(e)||null}values(){return Array.from(this.set)}},Qe=class{map={};constructor(e){e&&Object.assign(this.map,e);}set(e,t){this.map[e]=t;}delete(e){delete this.map[e];}get(e){return this.map[e]||null}keys(){return Object.keys(this.map)}values(){return Object.values(this.map)}},Pe=Symbol("attributes"),Gr=Symbol("immutableKeys"),KR=class GR extends BR{_disposed=false;graph;[Pe];[Gr];constructor(t){super(),this.graph=t,this[Gr]=new Set,this[Pe]=this._createAttributes();}getDefaults(){return {}}_createAttributes(){let t=this.getDefaults(),n={};for(let o in t){let r=t[o];if(r instanceof GR){let i=this.graph._createEdge(o,this,r);this[Gr].add(o),n[o]=i;}else n[o]=r;}return n}isOnGraph(t){return this.graph===t.graph}isDisposed(){return this._disposed}dispose(){this._disposed||(this.graph.listChildEdges(this).forEach(t=>t.dispose()),this.graph.disconnectParents(this),this._disposed=true,this.dispatchEvent({type:"dispose"}));}detach(){return this.graph.disconnectParents(this),this}swap(t,n){for(let o in this[Pe]){let r=this[Pe][o];if(r instanceof Hr){let i=r;i.getChild()===t&&this.setRef(o,n,i.getAttributes());}else if(r instanceof at)for(let i of r.listRefsByChild(t)){let s=i.getAttributes();this.removeRef(o,t),this.addRef(o,n,s);}else if(r instanceof Me){let i=r.getRefByChild(t);if(i){let s=i.getAttributes();this.removeRef(o,t),this.addRef(o,n,s);}}else if(r instanceof Qe)for(let i of r.keys()){let s=r.get(i);s.getChild()===t&&this.setRefMap(o,i,n,s.getAttributes());}}return this}get(t){return this[Pe][t]}set(t,n){return this[Pe][t]=n,this.dispatchEvent({type:"change",attribute:t})}getRef(t){let n=this[Pe][t];return n?n.getChild():null}setRef(t,n,o){if(this[Gr].has(t))throw new Error(`Cannot overwrite immutable attribute, "${t}".`);let r=this[Pe][t];if(r&&r.dispose(),!n)return this;let i=this.graph._createEdge(t,this,n,o);return this[Pe][t]=i,this.dispatchEvent({type:"change",attribute:t})}listRefs(t){return this.assertRefList(t).values().map(n=>n.getChild())}addRef(t,n,o){let r=this.graph._createEdge(t,this,n,o);return this.assertRefList(t).add(r),this.dispatchEvent({type:"change",attribute:t})}removeRef(t,n){let o=this.assertRefList(t);if(o instanceof at)for(let r of o.listRefsByChild(n))r.dispose();else {let r=o.getRefByChild(n);r&&r.dispose();}return this}assertRefList(t){let n=this[Pe][t];if(n instanceof at||n instanceof Me)return n;throw new Error(`Expected RefList or RefSet for attribute "${t}"`)}listRefMapKeys(t){return this.assertRefMap(t).keys()}listRefMapValues(t){return this.assertRefMap(t).values().map(n=>n.getChild())}getRefMap(t,n){let o=this.assertRefMap(t).get(n);return o?o.getChild():null}setRefMap(t,n,o,r){let i=this.assertRefMap(t),s=i.get(n);if(s&&s.dispose(),!o)return this;r=Object.assign(r||{},{key:n});let a=this.graph._createEdge(t,this,o,{...r,key:n});return i.set(n,a),this.dispatchEvent({type:"change",attribute:t,key:n})}assertRefMap(t){let n=this[Pe][t];if(n instanceof Qe)return n;throw new Error(`Expected RefMap for attribute "${t}"`)}dispatchEvent(t){return super.dispatchEvent({...t,target:this}),this.graph.dispatchEvent({...t,target:this,type:`node:${t.type}`}),this}_destroyRef(t){let n=t.getName();if(this[Pe][n]===t)this[Pe][n]=null,this[Gr].has(n)&&t.getChild().dispose();else if(this[Pe][n]instanceof at)this[Pe][n].remove(t);else if(this[Pe][n]instanceof Me)this[Pe][n].remove(t);else if(this[Pe][n]instanceof Qe){let o=this[Pe][n];for(let r of o.keys())o.get(r)===t&&o.delete(r);}else return;this.graph._destroyEdge(t),this.dispatchEvent({type:"change",attribute:n});}};var QR="v4.4.2",Jr="@glb.bin",ee=(function(e){return e.ACCESSOR="Accessor",e.ANIMATION="Animation",e.ANIMATION_CHANNEL="AnimationChannel",e.ANIMATION_SAMPLER="AnimationSampler",e.BUFFER="Buffer",e.CAMERA="Camera",e.MATERIAL="Material",e.MESH="Mesh",e.PRIMITIVE="Primitive",e.PRIMITIVE_TARGET="PrimitiveTarget",e.NODE="Node",e.ROOT="Root",e.SCENE="Scene",e.SKIN="Skin",e.TEXTURE="Texture",e.TEXTURE_INFO="TextureInfo",e})({});var Tz=(function(e){return e.ARRAY_BUFFER="ARRAY_BUFFER",e.ELEMENT_ARRAY_BUFFER="ELEMENT_ARRAY_BUFFER",e.INVERSE_BIND_MATRICES="INVERSE_BIND_MATRICES",e.OTHER="OTHER",e.SPARSE="SPARSE",e})({}),Kt=(function(e){return e[e.R=4096]="R",e[e.G=256]="G",e[e.B=16]="B",e[e.A=1]="A",e})({});var $z=class extends Float32Array{constructor(){throw super(),new Error("Unsupported typed array instantiation.")}},pd={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5131:typeof Float16Array<"u"?Float16Array:$z,5126:Float32Array,5130:Float64Array},$e=class{static createBufferFromDataURI(e){if(typeof Buffer>"u"){let t=atob(e.split(",")[1]),n=new Uint8Array(t.length);for(let o=0;o<t.length;o++)n[o]=t.charCodeAt(o);return n}else {let t=e.split(",")[1],n=e.indexOf("base64")>=0;return Buffer.from(t,n?"base64":"utf8")}}static encodeText(e){return new TextEncoder().encode(e)}static decodeText(e){return new TextDecoder().decode(e)}static concat(e){let t=0;for(let r of e)t+=r.byteLength;let n=new Uint8Array(t),o=0;for(let r of e)n.set(r,o),o+=r.byteLength;return n}static pad(e,t=0){let n=this.padNumber(e.byteLength);if(n===e.byteLength)return e;let o=new Uint8Array(n);if(o.set(e),t!==0)for(let r=e.byteLength;r<n;r++)o[r]=t;return o}static padNumber(e){return Math.ceil(e/4)*4}static equals(e,t){if(e===t)return true;if(e.byteLength!==t.byteLength)return false;let n=e.byteLength;for(;n--;)if(e[n]!==t[n])return false;return true}static toView(e,t=0,n=1/0){return new Uint8Array(e.buffer,e.byteOffset+t,Math.min(e.byteLength,n))}static assertView(e){if(e&&!ArrayBuffer.isView(e))throw new Error(`Method requires Uint8Array parameter; received "${typeof e}".`);return e}};var xz=class{match(e){return e.length>=3&&e[0]===255&&e[1]===216&&e[2]===255}getSize(e){let t=new DataView(e.buffer,e.byteOffset+4),n,o;for(;t.byteLength;){if(n=t.getUint16(0,false),Ez(t,n),o=t.getUint8(n+1),o===192||o===193||o===194)return [t.getUint16(n+7,false),t.getUint16(n+5,false)];t=new DataView(e.buffer,t.byteOffset+n+2);}throw new TypeError("Invalid JPG, no size found")}getChannels(e){return 3}},wz=class eT{static PNG_FRIED_CHUNK_NAME="CgBI";match(t){return t.length>=8&&t[0]===137&&t[1]===80&&t[2]===78&&t[3]===71&&t[4]===13&&t[5]===10&&t[6]===26&&t[7]===10}getSize(t){let n=new DataView(t.buffer,t.byteOffset);return $e.decodeText(t.slice(12,16))===eT.PNG_FRIED_CHUNK_NAME?[n.getUint32(32,false),n.getUint32(36,false)]:[n.getUint32(16,false),n.getUint32(20,false)]}getChannels(t){return 4}},Qt=class{static impls={"image/jpeg":new xz,"image/png":new wz};static registerFormat(e,t){this.impls[e]=t;}static getMimeType(e){for(let t in this.impls)if(this.impls[t].match(e))return t;return null}static getSize(e,t){return this.impls[t]?this.impls[t].getSize(e):null}static getChannels(e,t){return this.impls[t]?this.impls[t].getChannels(e):null}static getVRAMByteLength(e,t){if(!this.impls[t])return null;if(this.impls[t].getVRAMByteLength)return this.impls[t].getVRAMByteLength(e);let n=0,o=4,r=this.getSize(e,t);if(!r)return null;for(;r[0]>1||r[1]>1;)n+=r[0]*r[1]*o,r[0]=Math.max(Math.floor(r[0]/2),1),r[1]=Math.max(Math.floor(r[1]/2),1);return n+=1*o,n}static mimeTypeToExtension(e){return e==="image/jpeg"?"jpg":e.split("/").pop()}static extensionToMimeType(e){return e==="jpg"?"image/jpeg":e?`image/${e}`:""}};function Ez(e,t){if(t>e.byteLength)throw new TypeError("Corrupt JPG, exceeded buffer limits");if(e.getUint8(t)!==255)throw new TypeError("Invalid JPG, marker table corrupted");return e}var qn=class{static basename(e){let t=e.split(/[\\/]/).pop();return t.substring(0,t.lastIndexOf("."))}static extension(e){if(e.startsWith("data:image/")){let t=e.match(/data:(image\/\w+)/)[1];return Qt.mimeTypeToExtension(t)}else {if(e.startsWith("data:model/gltf+json"))return "gltf";if(e.startsWith("data:model/gltf-binary"))return "glb";if(e.startsWith("data:application/"))return "bin"}return e.split(/[\\/]/).pop().split(/[.]/).pop()}},V_=typeof Float32Array<"u"?Float32Array:Array;function Iz(){var e=new V_(3);return V_!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function q_(e){var t=e[0],n=e[1],o=e[2];return Math.sqrt(t*t+n*n+o*o)}function zz(e,t,n){var o=t[0],r=t[1],i=t[2],s=n[3]*o+n[7]*r+n[11]*i+n[15];return s=s||1,e[0]=(n[0]*o+n[4]*r+n[8]*i+n[12])/s,e[1]=(n[1]*o+n[5]*r+n[9]*i+n[13])/s,e[2]=(n[2]*o+n[6]*r+n[10]*i+n[14])/s,e}(function(){var e=Iz();return function(t,n,o,r,i,s){var a,c;for(n||(n=3),o||(o=0),r?c=Math.min(r*n+o,t.length):c=t.length,a=o;a<c;a+=n)e[0]=t[a],e[1]=t[a+1],e[2]=t[a+2],i(e,e,s),t[a]=e[0],t[a+1]=e[1],t[a+2]=e[2];return t}})();function tT(e){let t=rT(),n=e.propertyType==="Node"?[e]:e.listChildren();for(let o of n)o.traverse(r=>{let i=r.getMesh();if(!i)return;let s=Oz(i,r.getWorldMatrix());s.min.every(isFinite)&&s.max.every(isFinite)&&(B_(s.min,t),B_(s.max,t));});return t}function Oz(e,t){let n=rT();for(let o of e.listPrimitives()){let r=o.getAttribute("POSITION"),i=o.getIndices();if(!r)continue;let s=[0,0,0],a=[0,0,0];for(let c=0,u=i?i.getCount():r.getCount();c<u;c++){let l=i?i.getScalar(c):c;s=r.getElement(l,s),a=zz(a,s,t),B_(a,n);}}return n}function B_(e,t){for(let n=0;n<3;n++)t.min[n]=Math.min(e[n],t.min[n]),t.max[n]=Math.max(e[n],t.max[n]);}function rT(){return {min:[1/0,1/0,1/0],max:[-1/0,-1/0,-1/0]}}var HR="https://null.example",pr=class{static DEFAULT_INIT={};static PROTOCOL_REGEXP=/^[a-zA-Z]+:\/\//;static dirname(e){let t=e.lastIndexOf("/");return t===-1?"./":e.substring(0,t+1)}static basename(e){return qn.basename(new URL(e,HR).pathname)}static extension(e){return qn.extension(new URL(e,HR).pathname)}static resolve(e,t){if(!this.isRelativePath(t))return t;let n=e.split("/"),o=t.split("/");n.pop();for(let r=0;r<o.length;r++)o[r]!=="."&&(o[r]===".."?n.pop():n.push(o[r]));return n.join("/")}static isAbsoluteURL(e){return this.PROTOCOL_REGEXP.test(e)}static isRelativePath(e){return !/^(?:[a-zA-Z]+:)?\//.test(e)}};function ZR(e){return Object.prototype.toString.call(e)==="[object Object]"}function Fn(e){if(ZR(e)===false)return false;let t=e.constructor;if(t===void 0)return true;let n=t.prototype;return !(ZR(n)===false||Object.hasOwn(n,"isPrototypeOf")===false)}var kz=(function(e){return e[e.SILENT=4]="SILENT",e[e.ERROR=3]="ERROR",e[e.WARN=2]="WARN",e[e.INFO=1]="INFO",e[e.DEBUG=0]="DEBUG",e})({}),fd=class nT{verbosity;static Verbosity=kz;static DEFAULT_INSTANCE=new nT(1);constructor(t){this.verbosity=t;}debug(t){this.verbosity<=0&&console.debug(t);}info(t){this.verbosity<=1&&console.info(t);}warn(t){this.verbosity<=2&&console.warn(t);}error(t){this.verbosity<=3&&console.error(t);}};function Nz(e){var t=e[0],n=e[1],o=e[2],r=e[3],i=e[4],s=e[5],a=e[6],c=e[7],u=e[8],l=e[9],m=e[10],h=e[11],y=e[12],b=e[13],p=e[14],S=e[15],d=t*s-n*i,_=t*a-o*i,f=n*a-o*s,v=u*b-l*y,x=u*p-m*y,T=l*p-m*b,R=t*T-n*x+o*v,$=i*T-s*x+a*v,E=u*f-l*_+m*d,A=y*f-b*_+p*d;return c*R-r*$+S*E-h*A}function Pz(e,t,n){var o=t[0],r=t[1],i=t[2],s=t[3],a=t[4],c=t[5],u=t[6],l=t[7],m=t[8],h=t[9],y=t[10],b=t[11],p=t[12],S=t[13],d=t[14],_=t[15],f=n[0],v=n[1],x=n[2],T=n[3];return e[0]=f*o+v*a+x*m+T*p,e[1]=f*r+v*c+x*h+T*S,e[2]=f*i+v*u+x*y+T*d,e[3]=f*s+v*l+x*b+T*_,f=n[4],v=n[5],x=n[6],T=n[7],e[4]=f*o+v*a+x*m+T*p,e[5]=f*r+v*c+x*h+T*S,e[6]=f*i+v*u+x*y+T*d,e[7]=f*s+v*l+x*b+T*_,f=n[8],v=n[9],x=n[10],T=n[11],e[8]=f*o+v*a+x*m+T*p,e[9]=f*r+v*c+x*h+T*S,e[10]=f*i+v*u+x*y+T*d,e[11]=f*s+v*l+x*b+T*_,f=n[12],v=n[13],x=n[14],T=n[15],e[12]=f*o+v*a+x*m+T*p,e[13]=f*r+v*c+x*h+T*S,e[14]=f*i+v*u+x*y+T*d,e[15]=f*s+v*l+x*b+T*_,e}function Az(e,t){var n=t[0],o=t[1],r=t[2],i=t[4],s=t[5],a=t[6],c=t[8],u=t[9],l=t[10];return e[0]=Math.sqrt(n*n+o*o+r*r),e[1]=Math.sqrt(i*i+s*s+a*a),e[2]=Math.sqrt(c*c+u*u+l*l),e}function Cz(e,t){var n=new V_(3);Az(n,t);var o=1/n[0],r=1/n[1],i=1/n[2],s=t[0]*o,a=t[1]*r,c=t[2]*i,u=t[4]*o,l=t[5]*r,m=t[6]*i,h=t[8]*o,y=t[9]*r,b=t[10]*i,p=s+l+b,S=0;return p>0?(S=Math.sqrt(p+1)*2,e[3]=.25*S,e[0]=(m-y)/S,e[1]=(h-c)/S,e[2]=(a-u)/S):s>l&&s>b?(S=Math.sqrt(1+s-l-b)*2,e[3]=(m-y)/S,e[0]=.25*S,e[1]=(a+u)/S,e[2]=(h+c)/S):l>b?(S=Math.sqrt(1+l-s-b)*2,e[3]=(h-c)/S,e[0]=(a+u)/S,e[1]=.25*S,e[2]=(m+y)/S):(S=Math.sqrt(1+b-s-l)*2,e[3]=(a-u)/S,e[0]=(h+c)/S,e[1]=(m+y)/S,e[2]=.25*S),e}var qe=class Vs{static identity(t){return t}static eq(t,n,o=1e-5){if(t.length!==n.length)return false;for(let r=0;r<t.length;r++)if(Math.abs(t[r]-n[r])>o)return false;return true}static clamp(t,n,o){return t<n?n:t>o?o:t}static decodeNormalizedInt(t,n){switch(n){case 5126:return t;case 5123:return t/65535;case 5121:return t/255;case 5122:return Math.max(t/32767,-1);case 5120:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}static encodeNormalizedInt(t,n){switch(n){case 5126:return t;case 5123:return Math.round(Vs.clamp(t,0,1)*65535);case 5121:return Math.round(Vs.clamp(t,0,1)*255);case 5122:return Math.round(Vs.clamp(t,-1,1)*32767);case 5120:return Math.round(Vs.clamp(t,-1,1)*127);default:throw new Error("Invalid component type.")}}static decompose(t,n,o,r){let i=q_([t[0],t[1],t[2]]),s=q_([t[4],t[5],t[6]]),a=q_([t[8],t[9],t[10]]);Nz(t)<0&&(i=-i),n[0]=t[12],n[1]=t[13],n[2]=t[14];let c=t.slice(),u=1/i,l=1/s,m=1/a;c[0]*=u,c[1]*=u,c[2]*=u,c[4]*=l,c[5]*=l,c[6]*=l,c[8]*=m,c[9]*=m,c[10]*=m,Cz(o,c),r[0]=i,r[1]=s,r[2]=a;}static compose(t,n,o,r){let i=r,s=n[0],a=n[1],c=n[2],u=n[3],l=s+s,m=a+a,h=c+c,y=s*l,b=s*m,p=s*h,S=a*m,d=a*h,_=c*h,f=u*l,v=u*m,x=u*h,T=o[0],R=o[1],$=o[2];return i[0]=(1-(S+_))*T,i[1]=(b+x)*T,i[2]=(p-v)*T,i[3]=0,i[4]=(b-x)*R,i[5]=(1-(y+_))*R,i[6]=(d+f)*R,i[7]=0,i[8]=(p+v)*$,i[9]=(d-f)*$,i[10]=(1-(y+S))*$,i[11]=0,i[12]=t[0],i[13]=t[1],i[14]=t[2],i[15]=1,i}};function Mz(e,t){if(!!e!=!!t)return false;let n=e.getChild(),o=t.getChild();return n===o||n.equals(o)}function jz(e,t){if(!!e!=!!t)return false;let n=e.values(),o=t.values();if(n.length!==o.length)return false;for(let r=0;r<n.length;r++){let i=n[r],s=o[r];if(i.getChild()!==s.getChild()&&!i.getChild().equals(s.getChild()))return false}return true}function Dz(e,t){if(!!e!=!!t)return false;let n=e.keys(),o=t.keys();if(n.length!==o.length)return false;for(let r of n){let i=e.get(r),s=t.get(r);if(!!i!=!!s)return false;let a=i.getChild(),c=s.getChild();if(a!==c&&!a.equals(c))return false}return true}function oT(e,t){if(e===t)return true;if(!!e!=!!t||!e||!t||e.length!==t.length)return false;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return false;return true}function iT(e,t){if(e===t)return true;if(!!e!=!!t)return false;if(!Fn(e)||!Fn(t))return e===t;let n=e,o=t,r=0,i=0,s;for(s in n)r++;for(s in o)i++;if(r!==i)return false;for(s in n){let a=n[s],c=o[s];if(dd(a)&&dd(c)){if(!oT(a,c))return false}else if(Fn(a)&&Fn(c)){if(!iT(a,c))return false}else if(a!==c)return false}return true}function dd(e){return Array.isArray(e)||ArrayBuffer.isView(e)}var Uz="23456789abdegjkmnpqrvwxyzABDEGJKMNPQRVWXYZ",Lz=999,Fz=6,JR=new Set,qz=function(){let e="";for(let t=0;t<Fz;t++)e+=Uz.charAt(Math.floor(Math.random()*42));return e},Vz=function(){for(let e=0;e<Lz;e++){let t=qz();if(!JR.has(t))return JR.add(t),t}return ""},Xr=e=>e,Bz=new Set,H_=class extends KR{constructor(e,t=""){super(e),this[Pe].name=t,this.init(),this.dispatchEvent({type:"create"});}getGraph(){return this.graph}getDefaults(){return Object.assign(super.getDefaults(),{name:"",extras:{}})}set(e,t){return Array.isArray(t)&&(t=t.slice()),super.set(e,t)}getName(){return this.get("name")}setName(e){return this.set("name",e)}getExtras(){return this.get("extras")}setExtras(e){return this.set("extras",e)}clone(){let e=this.constructor;return new e(this.graph).copy(this,Xr)}copy(e,t=Xr){for(let n in this[Pe]){let o=this[Pe][n];if(o instanceof Hr)this[Gr].has(n)||o.dispose();else if(o instanceof at||o instanceof Me)for(let r of o.values())r.dispose();else if(o instanceof Qe)for(let r of o.values())r.dispose();}for(let n in e[Pe]){let o=this[Pe][n],r=e[Pe][n];if(r instanceof Hr)this[Gr].has(n)?o.getChild().copy(t(r.getChild()),t):this.setRef(n,t(r.getChild()),r.getAttributes());else if(r instanceof Me||r instanceof at)for(let i of r.values())this.addRef(n,t(i.getChild()),i.getAttributes());else if(r instanceof Qe)for(let i of r.keys()){let s=r.get(i);this.setRefMap(n,i,t(s.getChild()),s.getAttributes());}else Fn(r)?this[Pe][n]=JSON.parse(JSON.stringify(r)):Array.isArray(r)||r instanceof ArrayBuffer||ArrayBuffer.isView(r)?this[Pe][n]=r.slice():this[Pe][n]=r;}return this}equals(e,t=Bz){if(this===e)return true;if(this.propertyType!==e.propertyType)return false;for(let n in this[Pe]){if(t.has(n))continue;let o=this[Pe][n],r=e[Pe][n];if(o instanceof Hr||r instanceof Hr){if(!Mz(o,r))return false}else if(o instanceof Me||r instanceof Me||o instanceof at||r instanceof at){if(!jz(o,r))return false}else if(o instanceof Qe||r instanceof Qe){if(!Dz(o,r))return false}else if(Fn(o)||Fn(r)){if(!iT(o,r))return false}else if(dd(o)||dd(r)){if(!oT(o,r))return false}else if(o!==r)return false}return true}detach(){return this.graph.disconnectParents(this,e=>e.propertyType!=="Root"),this}listParents(){return this.graph.listParents(this)}},vt=class extends H_{getDefaults(){return Object.assign(super.getDefaults(),{extensions:new Qe})}getExtension(e){return this.getRefMap("extensions",e)}setExtension(e,t){return t&&t._validateParent(this),this.setRefMap("extensions",e,t)}listExtensions(){return this.listRefMapValues("extensions")}},me=class et extends vt{static Type={SCALAR:"SCALAR",VEC2:"VEC2",VEC3:"VEC3",VEC4:"VEC4",MAT2:"MAT2",MAT3:"MAT3",MAT4:"MAT4"};static ComponentType={BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,UNSIGNED_INT:5125,FLOAT:5126,FLOAT16:5131,FLOAT64:5130};init(){this.propertyType="Accessor";}getDefaults(){return Object.assign(super.getDefaults(),{array:null,type:et.Type.SCALAR,componentType:et.ComponentType.FLOAT,normalized:false,sparse:false,buffer:null})}static getElementSize(t){switch(t){case et.Type.SCALAR:return 1;case et.Type.VEC2:return 2;case et.Type.VEC3:return 3;case et.Type.VEC4:return 4;case et.Type.MAT2:return 4;case et.Type.MAT3:return 9;case et.Type.MAT4:return 16;default:throw new Error("Unexpected type: "+t)}}static getComponentSize(t){switch(t){case et.ComponentType.BYTE:case et.ComponentType.UNSIGNED_BYTE:return 1;case et.ComponentType.SHORT:case et.ComponentType.UNSIGNED_SHORT:return 2;case et.ComponentType.UNSIGNED_INT:case et.ComponentType.FLOAT:return 4;case et.ComponentType.FLOAT16:return 2;case et.ComponentType.FLOAT64:return 8;default:throw new Error("Unexpected component type: "+t)}}getMinNormalized(t){let n=this.getNormalized(),o=this.getElementSize(),r=this.getComponentType();if(this.getMin(t),n)for(let i=0;i<o;i++)t[i]=qe.decodeNormalizedInt(t[i],r);return t}getMin(t){let n=this.getArray(),o=this.getCount(),r=this.getElementSize();for(let i=0;i<r;i++)t[i]=1/0;for(let i=0;i<o*r;i+=r)for(let s=0;s<r;s++){let a=n[i+s];Number.isFinite(a)&&(t[s]=Math.min(t[s],a));}return t}getMaxNormalized(t){let n=this.getNormalized(),o=this.getElementSize(),r=this.getComponentType();if(this.getMax(t),n)for(let i=0;i<o;i++)t[i]=qe.decodeNormalizedInt(t[i],r);return t}getMax(t){let n=this.get("array"),o=this.getCount(),r=this.getElementSize();for(let i=0;i<r;i++)t[i]=-1/0;for(let i=0;i<o*r;i+=r)for(let s=0;s<r;s++){let a=n[i+s];Number.isFinite(a)&&(t[s]=Math.max(t[s],a));}return t}getCount(){let t=this.get("array");return t?t.length/this.getElementSize():0}getType(){return this.get("type")}setType(t){return this.set("type",t)}getElementSize(){return et.getElementSize(this.get("type"))}getComponentSize(){return this.get("array").BYTES_PER_ELEMENT}getComponentType(){return this.get("componentType")}getNormalized(){return this.get("normalized")}setNormalized(t){return this.set("normalized",t)}getScalar(t){let n=this.getElementSize(),o=this.getComponentType(),r=this.getArray();return this.getNormalized()?qe.decodeNormalizedInt(r[t*n],o):r[t*n]}setScalar(t,n){let o=this.getElementSize(),r=this.getComponentType(),i=this.getArray();return this.getNormalized()?i[t*o]=qe.encodeNormalizedInt(n,r):i[t*o]=n,this}getElement(t,n){let o=this.getNormalized(),r=this.getElementSize(),i=this.getComponentType(),s=this.getArray();for(let a=0;a<r;a++)o?n[a]=qe.decodeNormalizedInt(s[t*r+a],i):n[a]=s[t*r+a];return n}setElement(t,n){let o=this.getNormalized(),r=this.getElementSize(),i=this.getComponentType(),s=this.getArray();for(let a=0;a<r;a++)o?s[t*r+a]=qe.encodeNormalizedInt(n[a],i):s[t*r+a]=n[a];return this}getSparse(){return this.get("sparse")}setSparse(t){return this.set("sparse",t)}getBuffer(){return this.getRef("buffer")}setBuffer(t){return this.setRef("buffer",t)}getArray(){return this.get("array")}setArray(t){return this.set("componentType",t?Kz(t):et.ComponentType.FLOAT),this.set("array",t),this}getByteLength(){let t=this.get("array");return t?t.byteLength:0}};function Kz(e){switch(e.constructor){case Float32Array:return me.ComponentType.FLOAT;case Uint32Array:return me.ComponentType.UNSIGNED_INT;case Uint16Array:return me.ComponentType.UNSIGNED_SHORT;case Uint8Array:return me.ComponentType.UNSIGNED_BYTE;case Int16Array:return me.ComponentType.SHORT;case Int8Array:return me.ComponentType.BYTE;case Float64Array:return me.ComponentType.FLOAT64}if(typeof Float16Array<"u"&&e.constructor===Float16Array)return me.ComponentType.FLOAT16;throw new Error("Unknown accessor componentType.")}var sT=class extends vt{init(){this.propertyType="Animation";}getDefaults(){return Object.assign(super.getDefaults(),{channels:new Me,samplers:new Me})}addChannel(e){return this.addRef("channels",e)}removeChannel(e){return this.removeRef("channels",e)}listChannels(){return this.listRefs("channels")}addSampler(e){return this.addRef("samplers",e)}removeSampler(e){return this.removeRef("samplers",e)}listSamplers(){return this.listRefs("samplers")}},Z_=class extends vt{static TargetPath={TRANSLATION:"translation",ROTATION:"rotation",SCALE:"scale",WEIGHTS:"weights"};init(){this.propertyType="AnimationChannel";}getDefaults(){return Object.assign(super.getDefaults(),{targetPath:null,targetNode:null,sampler:null})}getTargetPath(){return this.get("targetPath")}setTargetPath(e){return this.set("targetPath",e)}getTargetNode(){return this.getRef("targetNode")}setTargetNode(e){return this.setRef("targetNode",e)}getSampler(){return this.getRef("sampler")}setSampler(e){return this.setRef("sampler",e)}},hd=class aT extends vt{static Interpolation={LINEAR:"LINEAR",STEP:"STEP",CUBICSPLINE:"CUBICSPLINE"};init(){this.propertyType="AnimationSampler";}getDefaultAttributes(){return Object.assign(super.getDefaults(),{interpolation:aT.Interpolation.LINEAR,input:null,output:null})}getInterpolation(){return this.get("interpolation")}setInterpolation(t){return this.set("interpolation",t)}getInput(){return this.getRef("input")}setInput(t){return this.setRef("input",t,{usage:"OTHER"})}getOutput(){return this.getRef("output")}setOutput(t){return this.setRef("output",t,{usage:"OTHER"})}},cT=class extends vt{init(){this.propertyType="Buffer";}getDefaults(){return Object.assign(super.getDefaults(),{uri:""})}getURI(){return this.get("uri")}setURI(e){return this.set("uri",e)}},gd=class uT extends vt{static Type={PERSPECTIVE:"perspective",ORTHOGRAPHIC:"orthographic"};init(){this.propertyType="Camera";}getDefaults(){return Object.assign(super.getDefaults(),{type:uT.Type.PERSPECTIVE,znear:.1,zfar:100,aspectRatio:null,yfov:Math.PI*2*50/360,xmag:1,ymag:1})}getType(){return this.get("type")}setType(t){return this.set("type",t)}getZNear(){return this.get("znear")}setZNear(t){return this.set("znear",t)}getZFar(){return this.get("zfar")}setZFar(t){return this.set("zfar",t)}getAspectRatio(){return this.get("aspectRatio")}setAspectRatio(t){return this.set("aspectRatio",t)}getYFov(){return this.get("yfov")}setYFov(t){return this.set("yfov",t)}getXMag(){return this.get("xmag")}setXMag(t){return this.set("xmag",t)}getYMag(){return this.get("ymag")}setYMag(t){return this.set("ymag",t)}},ze=class extends H_{static EXTENSION_NAME;_validateParent(e){if(!this.parentTypes.includes(e.propertyType))throw new Error(`Parent "${e.propertyType}" invalid for child "${this.propertyType}".`)}},Le=class K_ extends vt{static WrapMode={CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,REPEAT:10497};static MagFilter={NEAREST:9728,LINEAR:9729};static MinFilter={NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987};init(){this.propertyType="TextureInfo";}getDefaults(){return Object.assign(super.getDefaults(),{texCoord:0,magFilter:null,minFilter:null,wrapS:K_.WrapMode.REPEAT,wrapT:K_.WrapMode.REPEAT})}getTexCoord(){return this.get("texCoord")}setTexCoord(t){return this.set("texCoord",t)}getMagFilter(){return this.get("magFilter")}setMagFilter(t){return this.set("magFilter",t)}getMinFilter(){return this.get("minFilter")}setMinFilter(t){return this.set("minFilter",t)}getWrapS(){return this.get("wrapS")}setWrapS(t){return this.set("wrapS",t)}getWrapT(){return this.get("wrapT")}setWrapT(t){return this.set("wrapT",t)}},{R:sd,G:ad,B:cd,A:Gz}=Kt,md=class lT extends vt{static AlphaMode={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};init(){this.propertyType="Material";}getDefaults(){return Object.assign(super.getDefaults(),{alphaMode:lT.AlphaMode.OPAQUE,alphaCutoff:.5,doubleSided:false,baseColorFactor:[1,1,1,1],baseColorTexture:null,baseColorTextureInfo:new Le(this.graph,"baseColorTextureInfo"),emissiveFactor:[0,0,0],emissiveTexture:null,emissiveTextureInfo:new Le(this.graph,"emissiveTextureInfo"),normalScale:1,normalTexture:null,normalTextureInfo:new Le(this.graph,"normalTextureInfo"),occlusionStrength:1,occlusionTexture:null,occlusionTextureInfo:new Le(this.graph,"occlusionTextureInfo"),roughnessFactor:1,metallicFactor:1,metallicRoughnessTexture:null,metallicRoughnessTextureInfo:new Le(this.graph,"metallicRoughnessTextureInfo")})}getDoubleSided(){return this.get("doubleSided")}setDoubleSided(t){return this.set("doubleSided",t)}getAlpha(){return this.get("baseColorFactor")[3]}setAlpha(t){let n=this.get("baseColorFactor").slice();return n[3]=t,this.set("baseColorFactor",n)}getAlphaMode(){return this.get("alphaMode")}setAlphaMode(t){return this.set("alphaMode",t)}getAlphaCutoff(){return this.get("alphaCutoff")}setAlphaCutoff(t){return this.set("alphaCutoff",t)}getBaseColorFactor(){return this.get("baseColorFactor")}setBaseColorFactor(t){return this.set("baseColorFactor",t)}getBaseColorTexture(){return this.getRef("baseColorTexture")}getBaseColorTextureInfo(){return this.getRef("baseColorTexture")?this.getRef("baseColorTextureInfo"):null}setBaseColorTexture(t){return this.setRef("baseColorTexture",t,{channels:sd|ad|cd|Gz,isColor:true})}getEmissiveFactor(){return this.get("emissiveFactor")}setEmissiveFactor(t){return this.set("emissiveFactor",t)}getEmissiveTexture(){return this.getRef("emissiveTexture")}getEmissiveTextureInfo(){return this.getRef("emissiveTexture")?this.getRef("emissiveTextureInfo"):null}setEmissiveTexture(t){return this.setRef("emissiveTexture",t,{channels:sd|ad|cd,isColor:true})}getNormalScale(){return this.get("normalScale")}setNormalScale(t){return this.set("normalScale",t)}getNormalTexture(){return this.getRef("normalTexture")}getNormalTextureInfo(){return this.getRef("normalTexture")?this.getRef("normalTextureInfo"):null}setNormalTexture(t){return this.setRef("normalTexture",t,{channels:sd|ad|cd})}getOcclusionStrength(){return this.get("occlusionStrength")}setOcclusionStrength(t){return this.set("occlusionStrength",t)}getOcclusionTexture(){return this.getRef("occlusionTexture")}getOcclusionTextureInfo(){return this.getRef("occlusionTexture")?this.getRef("occlusionTextureInfo"):null}setOcclusionTexture(t){return this.setRef("occlusionTexture",t,{channels:sd})}getRoughnessFactor(){return this.get("roughnessFactor")}setRoughnessFactor(t){return this.set("roughnessFactor",t)}getMetallicFactor(){return this.get("metallicFactor")}setMetallicFactor(t){return this.set("metallicFactor",t)}getMetallicRoughnessTexture(){return this.getRef("metallicRoughnessTexture")}getMetallicRoughnessTextureInfo(){return this.getRef("metallicRoughnessTexture")?this.getRef("metallicRoughnessTextureInfo"):null}setMetallicRoughnessTexture(t){return this.setRef("metallicRoughnessTexture",t,{channels:ad|cd})}},dT=class extends vt{init(){this.propertyType="Mesh";}getDefaults(){return Object.assign(super.getDefaults(),{weights:[],primitives:new Me})}addPrimitive(e){return this.addRef("primitives",e)}removePrimitive(e){return this.removeRef("primitives",e)}listPrimitives(){return this.listRefs("primitives")}getWeights(){return this.get("weights")}setWeights(e){return this.set("weights",e)}},mT=class extends vt{init(){this.propertyType="Node";}getDefaults(){return Object.assign(super.getDefaults(),{translation:[0,0,0],rotation:[0,0,0,1],scale:[1,1,1],weights:[],camera:null,mesh:null,skin:null,children:new Me})}copy(e,t=Xr){if(t===Xr)throw new Error("Node cannot be copied.");return super.copy(e,t)}getTranslation(){return this.get("translation")}getRotation(){return this.get("rotation")}getScale(){return this.get("scale")}setTranslation(e){return this.set("translation",e)}setRotation(e){return this.set("rotation",e)}setScale(e){return this.set("scale",e)}getMatrix(){return qe.compose(this.get("translation"),this.get("rotation"),this.get("scale"),[])}setMatrix(e){let t=this.get("translation").slice(),n=this.get("rotation").slice(),o=this.get("scale").slice();return qe.decompose(e,t,n,o),this.set("translation",t).set("rotation",n).set("scale",o)}getWorldTranslation(){let e=[0,0,0];return qe.decompose(this.getWorldMatrix(),e,[0,0,0,1],[1,1,1]),e}getWorldRotation(){let e=[0,0,0,1];return qe.decompose(this.getWorldMatrix(),[0,0,0],e,[1,1,1]),e}getWorldScale(){let e=[1,1,1];return qe.decompose(this.getWorldMatrix(),[0,0,0],[0,0,0,1],e),e}getWorldMatrix(){let e=[];for(let o=this;o!=null;o=o.getParentNode())e.push(o);let t,n=e.pop().getMatrix();for(;t=e.pop();)Pz(n,n,t.getMatrix());return n}addChild(e){let t=e.getParentNode();t&&t.removeChild(e);for(let n of e.listParents())n.propertyType==="Scene"&&n.removeChild(e);return this.addRef("children",e)}removeChild(e){return this.removeRef("children",e)}listChildren(){return this.listRefs("children")}getParentNode(){for(let e of this.listParents())if(e.propertyType==="Node")return e;return null}getMesh(){return this.getRef("mesh")}setMesh(e){return this.setRef("mesh",e)}getCamera(){return this.getRef("camera")}setCamera(e){return this.setRef("camera",e)}getSkin(){return this.getRef("skin")}setSkin(e){return this.setRef("skin",e)}getWeights(){return this.get("weights")}setWeights(e){return this.set("weights",e)}traverse(e){e(this);for(let t of this.listChildren())t.traverse(e);return this}},Bs=class pT extends vt{static Mode={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6};init(){this.propertyType="Primitive";}getDefaults(){return Object.assign(super.getDefaults(),{mode:pT.Mode.TRIANGLES,material:null,indices:null,attributes:new Qe,targets:new Me})}getIndices(){return this.getRef("indices")}setIndices(t){return this.setRef("indices",t,{usage:"ELEMENT_ARRAY_BUFFER"})}getAttribute(t){return this.getRefMap("attributes",t)}setAttribute(t,n){return this.setRefMap("attributes",t,n,{usage:"ARRAY_BUFFER"})}listAttributes(){return this.listRefMapValues("attributes")}listSemantics(){return this.listRefMapKeys("attributes")}getMaterial(){return this.getRef("material")}setMaterial(t){return this.setRef("material",t)}getMode(){return this.get("mode")}setMode(t){return this.set("mode",t)}listTargets(){return this.listRefs("targets")}addTarget(t){return this.addRef("targets",t)}removeTarget(t){return this.removeRef("targets",t)}},Hz=class extends H_{init(){this.propertyType="PrimitiveTarget";}getDefaults(){return Object.assign(super.getDefaults(),{attributes:new Qe})}getAttribute(e){return this.getRefMap("attributes",e)}setAttribute(e,t){return this.setRefMap("attributes",e,t,{usage:"ARRAY_BUFFER"})}listAttributes(){return this.listRefMapValues("attributes")}listSemantics(){return this.listRefMapKeys("attributes")}},fT=class extends vt{init(){this.propertyType="Scene";}getDefaults(){return Object.assign(super.getDefaults(),{children:new Me})}copy(e,t=Xr){if(t===Xr)throw new Error("Scene cannot be copied.");return super.copy(e,t)}addChild(e){let t=e.getParentNode();return t&&t.removeChild(e),this.addRef("children",e)}removeChild(e){return this.removeRef("children",e)}listChildren(){return this.listRefs("children")}traverse(e){for(let t of this.listChildren())t.traverse(e);return this}},hT=class extends vt{init(){this.propertyType="Skin";}getDefaults(){return Object.assign(super.getDefaults(),{skeleton:null,inverseBindMatrices:null,joints:new Me})}getSkeleton(){return this.getRef("skeleton")}setSkeleton(e){return this.setRef("skeleton",e)}getInverseBindMatrices(){return this.getRef("inverseBindMatrices")}setInverseBindMatrices(e){return this.setRef("inverseBindMatrices",e,{usage:"INVERSE_BIND_MATRICES"})}addJoint(e){return this.addRef("joints",e)}removeJoint(e){return this.removeRef("joints",e)}listJoints(){return this.listRefs("joints")}},gT=class extends vt{init(){this.propertyType="Texture";}getDefaults(){return Object.assign(super.getDefaults(),{image:null,mimeType:"",uri:""})}getMimeType(){return this.get("mimeType")||Qt.extensionToMimeType(qn.extension(this.get("uri")))}setMimeType(e){return this.set("mimeType",e)}getURI(){return this.get("uri")}setURI(e){this.set("uri",e);let t=Qt.extensionToMimeType(qn.extension(e));return t&&this.set("mimeType",t),this}getImage(){return this.get("image")}setImage(e){return this.set("image",$e.assertView(e))}getSize(){let e=this.get("image");return e?Qt.getSize(e,this.getMimeType()):null}},J_=class extends vt{_extensions=new Set;init(){this.propertyType="Root";}getDefaults(){return Object.assign(super.getDefaults(),{asset:{generator:`glTF-Transform ${QR}`,version:"2.0"},defaultScene:null,accessors:new Me,animations:new Me,buffers:new Me,cameras:new Me,materials:new Me,meshes:new Me,nodes:new Me,scenes:new Me,skins:new Me,textures:new Me})}constructor(e){super(e),e.addEventListener("node:create",t=>{this._addChildOfRoot(t.target);});}clone(){throw new Error("Root cannot be cloned.")}copy(e,t=Xr){if(t===Xr)throw new Error("Root cannot be copied.");this.set("asset",{...e.get("asset")}),this.setName(e.getName()),this.setExtras({...e.getExtras()}),this.setDefaultScene(e.getDefaultScene()?t(e.getDefaultScene()):null);for(let n of e.listRefMapKeys("extensions")){let o=e.getExtension(n);this.setExtension(n,t(o));}return this}_addChildOfRoot(e){return e instanceof fT?this.addRef("scenes",e):e instanceof mT?this.addRef("nodes",e):e instanceof gd?this.addRef("cameras",e):e instanceof hT?this.addRef("skins",e):e instanceof dT?this.addRef("meshes",e):e instanceof md?this.addRef("materials",e):e instanceof gT?this.addRef("textures",e):e instanceof sT?this.addRef("animations",e):e instanceof me?this.addRef("accessors",e):e instanceof cT&&this.addRef("buffers",e),this}getAsset(){return this.get("asset")}listExtensionsUsed(){return Array.from(this._extensions)}listExtensionsRequired(){return this.listExtensionsUsed().filter(e=>e.isRequired())}_enableExtension(e){return this._extensions.add(e),this}_disableExtension(e){return this._extensions.delete(e),this}listScenes(){return this.listRefs("scenes")}setDefaultScene(e){return this.setRef("defaultScene",e)}getDefaultScene(){return this.getRef("defaultScene")}listNodes(){return this.listRefs("nodes")}listCameras(){return this.listRefs("cameras")}listSkins(){return this.listRefs("skins")}listMeshes(){return this.listRefs("meshes")}listMaterials(){return this.listRefs("materials")}listTextures(){return this.listRefs("textures")}listAnimations(){return this.listRefs("animations")}listAccessors(){return this.listRefs("accessors")}listBuffers(){return this.listRefs("buffers")}},Zz=class G_{_graph=new F_;_root=new J_(this._graph);_logger=fd.DEFAULT_INSTANCE;static _GRAPH_DOCUMENTS=new WeakMap;static fromGraph(t){return G_._GRAPH_DOCUMENTS.get(t)||null}constructor(){G_._GRAPH_DOCUMENTS.set(this._graph,this);}getRoot(){return this._root}getGraph(){return this._graph}getLogger(){return this._logger}setLogger(t){return this._logger=t,this}clone(){throw new Error("Use 'cloneDocument(source)' from '@gltf-transform/functions'.")}merge(t){throw new Error("Use 'mergeDocuments(target, source)' from '@gltf-transform/functions'.")}async transform(...t){let n=t.map(o=>o.name);for(let o of t)await o(this,{stack:n});return this}hasExtension(t){return this.getRoot().listExtensionsUsed().some(n=>n.extensionName===t)}createExtension(t){let n=t.EXTENSION_NAME;return this.getRoot().listExtensionsUsed().find(o=>o.extensionName===n)||new t(this)}disposeExtension(t){let n=this.getRoot().listExtensionsUsed().find(o=>o.extensionName===t);n&&n.dispose();}createScene(t=""){return new fT(this._graph,t)}createNode(t=""){return new mT(this._graph,t)}createCamera(t=""){return new gd(this._graph,t)}createSkin(t=""){return new hT(this._graph,t)}createMesh(t=""){return new dT(this._graph,t)}createPrimitive(){return new Bs(this._graph)}createPrimitiveTarget(t=""){return new Hz(this._graph,t)}createMaterial(t=""){return new md(this._graph,t)}createTexture(t=""){return new gT(this._graph,t)}createAnimation(t=""){return new sT(this._graph,t)}createAnimationChannel(t=""){return new Z_(this._graph,t)}createAnimationSampler(t=""){return new hd(this._graph,t)}createAccessor(t="",n=null){return n||(n=this.getRoot().listBuffers()[0]),new me(this._graph,t).setBuffer(n)}createBuffer(t=""){return new cT(this._graph,t)}},Ae=class{static EXTENSION_NAME;extensionName="";prereadTypes=[];prewriteTypes=[];readDependencies=[];writeDependencies=[];document;required=false;properties=new Set;_listener;constructor(e){this.document=e,e.getRoot()._enableExtension(this),this._listener=n=>{let o=n,r=o.target;r instanceof ze&&r.extensionName===this.extensionName&&(o.type==="node:create"&&this._addExtensionProperty(r),o.type==="node:dispose"&&this._removeExtensionProperty(r));};let t=e.getGraph();t.addEventListener("node:create",this._listener),t.addEventListener("node:dispose",this._listener);}dispose(){this.document.getRoot()._disableExtension(this);let e=this.document.getGraph();e.removeEventListener("node:create",this._listener),e.removeEventListener("node:dispose",this._listener);for(let t of this.properties)t.dispose();}static register(){}isRequired(){return this.required}setRequired(e){return this.required=e,this}listProperties(){return Array.from(this.properties)}_addExtensionProperty(e){return this.properties.add(e),this}_removeExtensionProperty(e){return this.properties.delete(e),this}install(e,t){return this}preread(e,t){return this}prewrite(e,t){return this}},Jz=class{jsonDoc;buffers=[];bufferViews=[];bufferViewBuffers=[];accessors=[];textures=[];textureInfos=new Map;materials=[];meshes=[];cameras=[];nodes=[];skins=[];animations=[];scenes=[];constructor(e){this.jsonDoc=e;}setTextureInfo(e,t){this.textureInfos.set(e,t),t.texCoord!==void 0&&e.setTexCoord(t.texCoord),t.extras!==void 0&&e.setExtras(t.extras);let n=this.jsonDoc.json.textures[t.index];if(n.sampler===void 0)return;let o=this.jsonDoc.json.samplers[n.sampler];o.magFilter!==void 0&&e.setMagFilter(o.magFilter),o.minFilter!==void 0&&e.setMinFilter(o.minFilter),o.wrapS!==void 0&&e.setWrapS(o.wrapS),o.wrapT!==void 0&&e.setWrapT(o.wrapT);}},XR={logger:fd.DEFAULT_INSTANCE,extensions:[],dependencies:{}},Xz=new Set(["Buffer","Texture","Material","Mesh","Primitive","Node","Scene"]),Wz=class{static read(e,t=XR){let n={...XR,...t},{json:o}=e,r=new Zz().setLogger(n.logger);this.validate(e,n);let i=new Jz(e),s=o.asset,a=r.getRoot().getAsset();s.copyright&&(a.copyright=s.copyright),s.extras&&(a.extras=s.extras),o.extras!==void 0&&r.getRoot().setExtras({...o.extras});let c=o.extensionsUsed||[],u=o.extensionsRequired||[];n.extensions.sort((d,_)=>d.EXTENSION_NAME>_.EXTENSION_NAME?1:-1);for(let d of n.extensions)if(c.includes(d.EXTENSION_NAME)){let _=r.createExtension(d).setRequired(u.includes(d.EXTENSION_NAME)),f=_.prereadTypes.filter(v=>!Xz.has(v));f.length&&n.logger.warn(`Preread hooks for some types (${f.join()}), requested by extension ${_.extensionName}, are unsupported. Please file an issue or a PR.`);for(let v of _.readDependencies)_.install(v,n.dependencies[v]);}let l=o.buffers||[];r.getRoot().listExtensionsUsed().filter(d=>d.prereadTypes.includes("Buffer")).forEach(d=>d.preread(i,"Buffer")),i.buffers=l.map(d=>{let _=r.createBuffer(d.name);return d.extras&&_.setExtras(d.extras),d.uri&&d.uri.indexOf("__")!==0&&_.setURI(d.uri),_}),i.bufferViewBuffers=(o.bufferViews||[]).map((d,_)=>{if(!i.bufferViews[_]){let f=e.json.buffers[d.buffer],v=f.uri?e.resources[f.uri]:e.resources[Jr],x=d.byteOffset||0;i.bufferViews[_]=$e.toView(v,x,d.byteLength);}return i.buffers[d.buffer]});let m=o.accessors||[];i.accessors=m.map(d=>{let _=i.bufferViewBuffers[d.bufferView],f=r.createAccessor(d.name,_).setType(d.type);return d.extras&&f.setExtras(d.extras),d.normalized!==void 0&&f.setNormalized(d.normalized),d.bufferView===void 0||f.setArray(ld(d,i)),f});let h=o.images||[],y=o.textures||[];r.getRoot().listExtensionsUsed().filter(d=>d.prereadTypes.includes("Texture")).forEach(d=>d.preread(i,"Texture")),i.textures=h.map(d=>{let _=r.createTexture(d.name);if(d.extras&&_.setExtras(d.extras),d.bufferView!==void 0){let f=o.bufferViews[d.bufferView],v=e.json.buffers[f.buffer],x=v.uri?e.resources[v.uri]:e.resources[Jr],T=f.byteOffset||0,R=f.byteLength,$=x.slice(T,T+R);_.setImage($);}else d.uri!==void 0&&(_.setImage(e.resources[d.uri]),d.uri.indexOf("__")!==0&&_.setURI(d.uri));if(d.mimeType!==void 0)_.setMimeType(d.mimeType);else if(d.uri){let f=qn.extension(d.uri);_.setMimeType(Qt.extensionToMimeType(f));}return _}),r.getRoot().listExtensionsUsed().filter(d=>d.prereadTypes.includes("Material")).forEach(d=>d.preread(i,"Material")),i.materials=(o.materials||[]).map(d=>{let _=r.createMaterial(d.name);d.extras&&_.setExtras(d.extras),d.alphaMode!==void 0&&_.setAlphaMode(d.alphaMode),d.alphaCutoff!==void 0&&_.setAlphaCutoff(d.alphaCutoff),d.doubleSided!==void 0&&_.setDoubleSided(d.doubleSided);let f=d.pbrMetallicRoughness||{};if(f.baseColorFactor!==void 0&&_.setBaseColorFactor(f.baseColorFactor),d.emissiveFactor!==void 0&&_.setEmissiveFactor(d.emissiveFactor),f.metallicFactor!==void 0&&_.setMetallicFactor(f.metallicFactor),f.roughnessFactor!==void 0&&_.setRoughnessFactor(f.roughnessFactor),f.baseColorTexture!==void 0){let v=f.baseColorTexture,x=i.textures[y[v.index].source];_.setBaseColorTexture(x),i.setTextureInfo(_.getBaseColorTextureInfo(),v);}if(d.emissiveTexture!==void 0){let v=d.emissiveTexture,x=i.textures[y[v.index].source];_.setEmissiveTexture(x),i.setTextureInfo(_.getEmissiveTextureInfo(),v);}if(d.normalTexture!==void 0){let v=d.normalTexture,x=i.textures[y[v.index].source];_.setNormalTexture(x),i.setTextureInfo(_.getNormalTextureInfo(),v),d.normalTexture.scale!==void 0&&_.setNormalScale(d.normalTexture.scale);}if(d.occlusionTexture!==void 0){let v=d.occlusionTexture,x=i.textures[y[v.index].source];_.setOcclusionTexture(x),i.setTextureInfo(_.getOcclusionTextureInfo(),v),d.occlusionTexture.strength!==void 0&&_.setOcclusionStrength(d.occlusionTexture.strength);}if(f.metallicRoughnessTexture!==void 0){let v=f.metallicRoughnessTexture,x=i.textures[y[v.index].source];_.setMetallicRoughnessTexture(x),i.setTextureInfo(_.getMetallicRoughnessTextureInfo(),v);}return _}),r.getRoot().listExtensionsUsed().filter(d=>d.prereadTypes.includes("Mesh")).forEach(d=>d.preread(i,"Mesh"));let b=o.meshes||[];r.getRoot().listExtensionsUsed().filter(d=>d.prereadTypes.includes("Primitive")).forEach(d=>d.preread(i,"Primitive")),i.meshes=b.map(d=>{let _=r.createMesh(d.name);return d.extras&&_.setExtras(d.extras),d.weights!==void 0&&_.setWeights(d.weights),(d.primitives||[]).forEach(f=>{let v=r.createPrimitive();f.extras&&v.setExtras(f.extras),f.material!==void 0&&v.setMaterial(i.materials[f.material]),f.mode!==void 0&&v.setMode(f.mode);for(let[T,R]of Object.entries(f.attributes||{}))v.setAttribute(T,i.accessors[R]);f.indices!==void 0&&v.setIndices(i.accessors[f.indices]);let x=d.extras&&d.extras.targetNames||[];(f.targets||[]).forEach((T,R)=>{let $=x[R]||R.toString(),E=r.createPrimitiveTarget($);for(let[A,N]of Object.entries(T))E.setAttribute(A,i.accessors[N]);v.addTarget(E);}),_.addPrimitive(v);}),_}),i.cameras=(o.cameras||[]).map(d=>{let _=r.createCamera(d.name).setType(d.type);if(d.extras&&_.setExtras(d.extras),d.type===gd.Type.PERSPECTIVE){let f=d.perspective;_.setYFov(f.yfov),_.setZNear(f.znear),f.zfar!==void 0&&_.setZFar(f.zfar),f.aspectRatio!==void 0&&_.setAspectRatio(f.aspectRatio);}else {let f=d.orthographic;_.setZNear(f.znear).setZFar(f.zfar).setXMag(f.xmag).setYMag(f.ymag);}return _});let p=o.nodes||[];r.getRoot().listExtensionsUsed().filter(d=>d.prereadTypes.includes("Node")).forEach(d=>d.preread(i,"Node")),i.nodes=p.map(d=>{let _=r.createNode(d.name);if(d.extras&&_.setExtras(d.extras),d.translation!==void 0&&_.setTranslation(d.translation),d.rotation!==void 0&&_.setRotation(d.rotation),d.scale!==void 0&&_.setScale(d.scale),d.matrix!==void 0){let f=[0,0,0],v=[0,0,0,1],x=[1,1,1];qe.decompose(d.matrix,f,v,x),_.setTranslation(f),_.setRotation(v),_.setScale(x);}return d.weights!==void 0&&_.setWeights(d.weights),_}),i.skins=(o.skins||[]).map(d=>{let _=r.createSkin(d.name);d.extras&&_.setExtras(d.extras),d.inverseBindMatrices!==void 0&&_.setInverseBindMatrices(i.accessors[d.inverseBindMatrices]),d.skeleton!==void 0&&_.setSkeleton(i.nodes[d.skeleton]);for(let f of d.joints)_.addJoint(i.nodes[f]);return _}),p.map((d,_)=>{let f=i.nodes[_];(d.children||[]).forEach(v=>f.addChild(i.nodes[v])),d.mesh!==void 0&&f.setMesh(i.meshes[d.mesh]),d.camera!==void 0&&f.setCamera(i.cameras[d.camera]),d.skin!==void 0&&f.setSkin(i.skins[d.skin]);}),i.animations=(o.animations||[]).map(d=>{let _=r.createAnimation(d.name);d.extras&&_.setExtras(d.extras);let f=(d.samplers||[]).map(v=>{let x=r.createAnimationSampler().setInput(i.accessors[v.input]).setOutput(i.accessors[v.output]).setInterpolation(v.interpolation||hd.Interpolation.LINEAR);return v.extras&&x.setExtras(v.extras),_.addSampler(x),x});return (d.channels||[]).forEach(v=>{let x=r.createAnimationChannel().setSampler(f[v.sampler]).setTargetPath(v.target.path);v.target.node!==void 0&&x.setTargetNode(i.nodes[v.target.node]),v.extras&&x.setExtras(v.extras),_.addChannel(x);}),_});let S=o.scenes||[];return r.getRoot().listExtensionsUsed().filter(d=>d.prereadTypes.includes("Scene")).forEach(d=>d.preread(i,"Scene")),i.scenes=S.map(d=>{let _=r.createScene(d.name);return d.extras&&_.setExtras(d.extras),(d.nodes||[]).map(f=>i.nodes[f]).forEach(f=>_.addChild(f)),_}),o.scene!==void 0&&r.getRoot().setDefaultScene(i.scenes[o.scene]),r.getRoot().listExtensionsUsed().forEach(d=>d.read(i)),m.forEach((d,_)=>{let f=i.accessors[_],v=!!d.sparse,x=!d.bufferView&&!f.getArray();(v||x)&&f.setSparse(true).setArray(Qz(d,i));}),r}static validate(e,t){let n=e.json;if(n.asset.version!=="2.0")throw new Error(`Unsupported glTF version, "${n.asset.version}".`);if(n.extensionsRequired){for(let o of n.extensionsRequired)if(!t.extensions.find(r=>r.EXTENSION_NAME===o))throw new Error(`Missing required extension, "${o}".`)}if(n.extensionsUsed)for(let o of n.extensionsUsed)t.extensions.find(r=>r.EXTENSION_NAME===o)||t.logger.warn(`Missing optional extension, "${o}".`);}};function Yz(e,t){let n=t.jsonDoc,o=t.bufferViews[e.bufferView],r=n.json.bufferViews[e.bufferView],i=pd[e.componentType],s=me.getElementSize(e.type),a=i.BYTES_PER_ELEMENT,c=e.byteOffset||0,u=new i(e.count*s),l=new DataView(o.buffer,o.byteOffset,o.byteLength),m=r.byteStride;for(let h=0;h<e.count;h++)for(let y=0;y<s;y++){let b=c+h*m+y*a,p;switch(e.componentType){case me.ComponentType.FLOAT:p=l.getFloat32(b,true);break;case me.ComponentType.UNSIGNED_INT:p=l.getUint32(b,true);break;case me.ComponentType.UNSIGNED_SHORT:p=l.getUint16(b,true);break;case me.ComponentType.UNSIGNED_BYTE:p=l.getUint8(b);break;case me.ComponentType.SHORT:p=l.getInt16(b,true);break;case me.ComponentType.BYTE:p=l.getInt8(b);break;case me.ComponentType.FLOAT16:p=l.getFloat16(b,true);break;case me.ComponentType.FLOAT64:p=l.getFloat64(b,true);break;default:throw new Error(`Unexpected componentType "${e.componentType}".`)}u[h*s+y]=p;}return u}function ld(e,t){let n=t.jsonDoc,o=t.bufferViews[e.bufferView],r=n.json.bufferViews[e.bufferView],i=pd[e.componentType],s=me.getElementSize(e.type),a=i.BYTES_PER_ELEMENT,c=s*a;if(r.byteStride!==void 0&&r.byteStride!==c)return Yz(e,t);let u=o.byteOffset+(e.byteOffset||0),l=e.count*s*a;return new i(o.buffer.slice(u,u+l))}function Qz(e,t){let n=pd[e.componentType],o=me.getElementSize(e.type),r;e.bufferView!==void 0?r=ld(e,t):r=new n(e.count*o);let i=e.sparse;if(!i)return r;let s=i.count,a={...e,...i.indices,count:s,type:"SCALAR"},c={...e,...i.values,count:s},u=ld(a,t),l=ld(c,t);for(let m=0;m<a.count;m++)for(let h=0;h<o;h++)r[u[m]*o+h]=l[m*o+h];return r}var _T=(function(e){return e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",e})(_T||{}),Zr=class{_doc;jsonDoc;options;static BufferViewTarget=_T;static BufferViewUsage=Tz;static USAGE_TO_TARGET={ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963};accessorIndexMap=new Map;animationIndexMap=new Map;bufferIndexMap=new Map;cameraIndexMap=new Map;skinIndexMap=new Map;materialIndexMap=new Map;meshIndexMap=new Map;nodeIndexMap=new Map;imageIndexMap=new Map;textureDefIndexMap=new Map;textureInfoDefMap=new Map;samplerDefIndexMap=new Map;sceneIndexMap=new Map;imageBufferViews=[];otherBufferViews=new Map;otherBufferViewsIndexMap=new Map;extensionData={};bufferURIGenerator;imageURIGenerator;logger;_accessorUsageMap=new Map;accessorUsageGroupedByParent=new Set(["ARRAY_BUFFER"]);accessorParents=new Map;constructor(e,t,n){this._doc=e,this.jsonDoc=t,this.options=n;let o=e.getRoot(),r=o.listBuffers().length,i=o.listTextures().length;this.bufferURIGenerator=new WR(r>1,()=>n.basename||"buffer"),this.imageURIGenerator=new WR(i>1,s=>eO(e,s)||n.basename||"texture"),this.logger=e.getLogger();}createTextureInfoDef(e,t){let n={magFilter:t.getMagFilter()||void 0,minFilter:t.getMinFilter()||void 0,wrapS:t.getWrapS(),wrapT:t.getWrapT()},o=JSON.stringify(n);this.samplerDefIndexMap.has(o)||(this.samplerDefIndexMap.set(o,this.jsonDoc.json.samplers.length),this.jsonDoc.json.samplers.push(n));let r={source:this.imageIndexMap.get(e),sampler:this.samplerDefIndexMap.get(o)},i=JSON.stringify(r);this.textureDefIndexMap.has(i)||(this.textureDefIndexMap.set(i,this.jsonDoc.json.textures.length),this.jsonDoc.json.textures.push(r));let s={index:this.textureDefIndexMap.get(i)};return t.getTexCoord()!==0&&(s.texCoord=t.getTexCoord()),Object.keys(t.getExtras()).length>0&&(s.extras=t.getExtras()),this.textureInfoDefMap.set(t,s),s}createPropertyDef(e){let t={};return e.getName()&&(t.name=e.getName()),Object.keys(e.getExtras()).length>0&&(t.extras=e.getExtras()),t}createAccessorDef(e){let t=this.createPropertyDef(e);return t.type=e.getType(),t.componentType=e.getComponentType(),t.count=e.getCount(),this._doc.getGraph().listParentEdges(e).some(n=>n.getName()==="attributes"&&n.getAttributes().key==="POSITION"||n.getName()==="input")&&(t.max=e.getMax([]).map(Math.fround),t.min=e.getMin([]).map(Math.fround)),e.getNormalized()&&(t.normalized=e.getNormalized()),t}createImageData(e,t,n){if(this.options.format==="GLB")this.imageBufferViews.push(t),e.bufferView=this.jsonDoc.json.bufferViews.length,this.jsonDoc.json.bufferViews.push({buffer:0,byteOffset:-1,byteLength:t.byteLength});else {let o=Qt.mimeTypeToExtension(n.getMimeType());e.uri=this.imageURIGenerator.createURI(n,o),this.assignResourceURI(e.uri,t,false);}}assignResourceURI(e,t,n){let o=this.jsonDoc.resources;if(!(e in o)){o[e]=t;return}if(t===o[e]){this.logger.warn(`Duplicate resource URI, "${e}".`);return}let r=`Resource URI "${e}" already assigned to different data.`;if(!n){this.logger.warn(r);return}throw new Error(r)}getAccessorUsage(e){let t=this._accessorUsageMap.get(e);if(t)return t;if(e.getSparse())return "SPARSE";for(let n of this._doc.getGraph().listParentEdges(e)){let{usage:o}=n.getAttributes();if(o)return o;n.getParent().propertyType!=="Root"&&this.logger.warn(`Missing attribute ".usage" on edge, "${n.getName()}".`);}return "OTHER"}addAccessorToUsageGroup(e,t){let n=this._accessorUsageMap.get(e);if(n&&n!==t)throw new Error(`Accessor with usage "${n}" cannot be reused as "${t}".`);return this._accessorUsageMap.set(e,t),this}},WR=class{multiple;basename;counter={};constructor(e,t){this.multiple=e,this.basename=t;}createURI(e,t){if(e.getURI())return e.getURI();if(this.multiple){let n=this.basename(e);return this.counter[n]=this.counter[n]||1,`${n}_${this.counter[n]++}.${t}`}else return `${this.basename(e)}.${t}`}};function eO(e,t){let n=e.getGraph().listParentEdges(t).find(o=>o.getParent()!==e.getRoot());return n?n.getName().replace(/texture$/i,""):""}var{BufferViewUsage:ud}=Zr,{UNSIGNED_INT:tO,UNSIGNED_SHORT:rO,UNSIGNED_BYTE:nO}=me.ComponentType,oO=new Set(["Accessor","Buffer","Material","Mesh"]),iO=class{static write(e,t){let n=e.getGraph(),o=e.getRoot(),r={asset:{generator:`glTF-Transform ${QR}`,...o.getAsset()},extras:{...o.getExtras()}},i={json:r,resources:{}},s=new Zr(e,i,t),a=t.logger||fd.DEFAULT_INSTANCE,c=new Set(t.extensions.map(p=>p.EXTENSION_NAME)),u=e.getRoot().listExtensionsUsed().filter(p=>c.has(p.extensionName)).sort((p,S)=>p.extensionName>S.extensionName?1:-1),l=e.getRoot().listExtensionsRequired().filter(p=>c.has(p.extensionName)).sort((p,S)=>p.extensionName>S.extensionName?1:-1);u.length<e.getRoot().listExtensionsUsed().length&&a.warn("Some extensions were not registered for I/O, and will not be written.");for(let p of u){let S=p.prewriteTypes.filter(d=>!oO.has(d));S.length&&a.warn(`Prewrite hooks for some types (${S.join()}), requested by extension ${p.extensionName}, are unsupported. Please file an issue or a PR.`);for(let d of p.writeDependencies)p.install(d,t.dependencies[d]);}function m(p,S,d,_){let f=[],v=0;for(let T of p){let R=s.createAccessorDef(T);R.bufferView=r.bufferViews.length;let $=T.getArray(),E=$e.pad($e.toView($));R.byteOffset=v,v+=E.byteLength,f.push(E),s.accessorIndexMap.set(T,r.accessors.length),r.accessors.push(R);}let x={buffer:S,byteOffset:d,byteLength:$e.concat(f).byteLength};return _&&(x.target=_),r.bufferViews.push(x),{buffers:f,byteLength:v}}function h(p,S,d){let _=p[0].getCount(),f=0;for(let $ of p){let E=s.createAccessorDef($);E.bufferView=r.bufferViews.length,E.byteOffset=f;let A=$.getElementSize(),N=$.getComponentSize();f+=$e.padNumber(A*N),s.accessorIndexMap.set($,r.accessors.length),r.accessors.push(E);}let v=_*f,x=new ArrayBuffer(v),T=new DataView(x);for(let $=0;$<_;$++){let E=0;for(let A of p){let N=A.getElementSize(),F=A.getComponentSize(),V=A.getComponentType(),K=A.getArray();for(let ue=0;ue<N;ue++){let ke=$*f+E+ue*F,xe=K[$*N+ue];switch(V){case me.ComponentType.FLOAT:T.setFloat32(ke,xe,true);break;case me.ComponentType.BYTE:T.setInt8(ke,xe);break;case me.ComponentType.SHORT:T.setInt16(ke,xe,true);break;case me.ComponentType.UNSIGNED_BYTE:T.setUint8(ke,xe);break;case me.ComponentType.UNSIGNED_SHORT:T.setUint16(ke,xe,true);break;case me.ComponentType.UNSIGNED_INT:T.setUint32(ke,xe,true);break;case me.ComponentType.FLOAT16:T.setFloat16(ke,xe,true);break;case me.ComponentType.FLOAT64:T.setFloat64(ke,xe,true);break;default:throw new Error("Unexpected component type: "+V)}}E+=$e.padNumber(N*F);}}let R={buffer:S,byteOffset:d,byteLength:v,byteStride:f,target:Zr.BufferViewTarget.ARRAY_BUFFER};return r.bufferViews.push(R),{byteLength:v,buffers:[new Uint8Array(x)]}}function y(p,S,d){let _=[],f=0,v=new Map,x=-1/0,T=false;for(let V of p){let K=s.createAccessorDef(V);r.accessors.push(K),s.accessorIndexMap.set(V,r.accessors.length-1);let ue=[],ke=[],xe=[],Ve=new Array(V.getElementSize()).fill(0);for(let B=0,w=V.getCount();B<w;B++)if(V.getElement(B,xe),!qe.eq(xe,Ve,0)){x=Math.max(B,x),ue.push(B);for(let O=0;O<xe.length;O++)ke.push(xe[O]);}let be=ue.length,k={accessorDef:K,count:be};if(v.set(V,k),be===0)continue;be>V.getCount()/2&&(T=true);let U=pd[V.getComponentType()];k.indices=ue,k.values=new U(ke);}if(!Number.isFinite(x))return {buffers:_,byteLength:f};T&&a.warn("Some sparse accessors have >50% non-zero elements, which may increase file size.");let R=x<255?Uint8Array:x<65535?Uint16Array:Uint32Array,$=x<255?nO:x<65535?rO:tO,E={buffer:S,byteOffset:d+f,byteLength:0};for(let V of p){let K=v.get(V);if(K.count===0)continue;K.indicesByteOffset=E.byteLength;let ue=$e.pad($e.toView(new R(K.indices)));_.push(ue),f+=ue.byteLength,E.byteLength+=ue.byteLength;}r.bufferViews.push(E);let A=r.bufferViews.length-1,N={buffer:S,byteOffset:d+f,byteLength:0};for(let V of p){let K=v.get(V);if(K.count===0)continue;K.valuesByteOffset=N.byteLength;let ue=$e.pad($e.toView(K.values));_.push(ue),f+=ue.byteLength,N.byteLength+=ue.byteLength;}r.bufferViews.push(N);let F=r.bufferViews.length-1;for(let V of p){let K=v.get(V);K.count!==0&&(K.accessorDef.sparse={count:K.count,indices:{bufferView:A,byteOffset:K.indicesByteOffset,componentType:$},values:{bufferView:F,byteOffset:K.valuesByteOffset}});}return {buffers:_,byteLength:f}}if(r.accessors=[],r.bufferViews=[],r.samplers=[],r.textures=[],r.images=o.listTextures().map((p,S)=>{let d=s.createPropertyDef(p);p.getMimeType()&&(d.mimeType=p.getMimeType());let _=p.getImage();return _&&s.createImageData(d,_,p),s.imageIndexMap.set(p,S),d}),u.filter(p=>p.prewriteTypes.includes("Accessor")).forEach(p=>p.prewrite(s,"Accessor")),o.listAccessors().forEach(p=>{let S=s.accessorUsageGroupedByParent,d=s.accessorParents;if(s.accessorIndexMap.has(p))return;let _=s.getAccessorUsage(p);if(s.addAccessorToUsageGroup(p,_),S.has(_)){let f=n.listParents(p).find(v=>v.propertyType!=="Root");d.set(p,f);}}),u.filter(p=>p.prewriteTypes.includes("Buffer")).forEach(p=>p.prewrite(s,"Buffer")),(o.listAccessors().length>0||s.otherBufferViews.size>0||o.listTextures().length>0&&t.format==="GLB")&&o.listBuffers().length===0)throw new Error("Buffer required for Document resources, but none was found.");r.buffers=[],o.listBuffers().forEach((p,S)=>{let d=s.createPropertyDef(p),_=s.accessorUsageGroupedByParent,f=p.listParents().filter(A=>A instanceof me),v=new Set(f.map(A=>s.accessorParents.get(A))),x=new Map(Array.from(v).map((A,N)=>[A,N])),T={};for(let A of f){if(s.accessorIndexMap.has(A))continue;let N=s.getAccessorUsage(A),F=N;if(_.has(N)){let V=s.accessorParents.get(A);F+=`:${x.get(V)}`;}T[F]||={usage:N,accessors:[]},T[F].accessors.push(A);}let R=[],$=r.buffers.length,E=0;for(let{usage:A,accessors:N}of Object.values(T))if(A===ud.ARRAY_BUFFER&&t.vertexLayout==="interleaved"){let F=h(N,$,E);E+=F.byteLength;for(let V of F.buffers)R.push(V);}else if(A===ud.ARRAY_BUFFER)for(let F of N){let V=h([F],$,E);E+=V.byteLength;for(let K of V.buffers)R.push(K);}else if(A===ud.SPARSE){let F=y(N,$,E);E+=F.byteLength;for(let V of F.buffers)R.push(V);}else if(A===ud.ELEMENT_ARRAY_BUFFER){let F=Zr.BufferViewTarget.ELEMENT_ARRAY_BUFFER,V=m(N,$,E,F);E+=V.byteLength;for(let K of V.buffers)R.push(K);}else {let F=m(N,$,E);E+=F.byteLength;for(let V of F.buffers)R.push(V);}if(s.imageBufferViews.length&&S===0){for(let A=0;A<s.imageBufferViews.length;A++)if(r.bufferViews[r.images[A].bufferView].byteOffset=E,E+=s.imageBufferViews[A].byteLength,R.push(s.imageBufferViews[A]),E%8){let N=8-E%8;E+=N,R.push(new Uint8Array(N));}}if(s.otherBufferViews.has(p))for(let A of s.otherBufferViews.get(p))r.bufferViews.push({buffer:$,byteOffset:E,byteLength:A.byteLength}),s.otherBufferViewsIndexMap.set(A,r.bufferViews.length-1),E+=A.byteLength,R.push(A);if(E){let A;t.format==="GLB"?A=Jr:(A=s.bufferURIGenerator.createURI(p,"bin"),d.uri=A),d.byteLength=E,s.assignResourceURI(A,$e.concat(R),true);}r.buffers.push(d),s.bufferIndexMap.set(p,S);}),o.listAccessors().find(p=>!p.getBuffer())&&a.warn("Skipped writing one or more Accessors: no Buffer assigned."),u.filter(p=>p.prewriteTypes.includes("Material")).forEach(p=>p.prewrite(s,"Material")),r.materials=o.listMaterials().map((p,S)=>{let d=s.createPropertyDef(p);if(p.getAlphaMode()!==md.AlphaMode.OPAQUE&&(d.alphaMode=p.getAlphaMode()),p.getAlphaMode()===md.AlphaMode.MASK&&(d.alphaCutoff=p.getAlphaCutoff()),p.getDoubleSided()&&(d.doubleSided=true),d.pbrMetallicRoughness={},qe.eq(p.getBaseColorFactor(),[1,1,1,1])||(d.pbrMetallicRoughness.baseColorFactor=p.getBaseColorFactor()),qe.eq(p.getEmissiveFactor(),[0,0,0])||(d.emissiveFactor=p.getEmissiveFactor()),p.getRoughnessFactor()!==1&&(d.pbrMetallicRoughness.roughnessFactor=p.getRoughnessFactor()),p.getMetallicFactor()!==1&&(d.pbrMetallicRoughness.metallicFactor=p.getMetallicFactor()),p.getBaseColorTexture()){let _=p.getBaseColorTexture(),f=p.getBaseColorTextureInfo();d.pbrMetallicRoughness.baseColorTexture=s.createTextureInfoDef(_,f);}if(p.getEmissiveTexture()){let _=p.getEmissiveTexture(),f=p.getEmissiveTextureInfo();d.emissiveTexture=s.createTextureInfoDef(_,f);}if(p.getNormalTexture()){let _=p.getNormalTexture(),f=p.getNormalTextureInfo(),v=s.createTextureInfoDef(_,f);p.getNormalScale()!==1&&(v.scale=p.getNormalScale()),d.normalTexture=v;}if(p.getOcclusionTexture()){let _=p.getOcclusionTexture(),f=p.getOcclusionTextureInfo(),v=s.createTextureInfoDef(_,f);p.getOcclusionStrength()!==1&&(v.strength=p.getOcclusionStrength()),d.occlusionTexture=v;}if(p.getMetallicRoughnessTexture()){let _=p.getMetallicRoughnessTexture(),f=p.getMetallicRoughnessTextureInfo();d.pbrMetallicRoughness.metallicRoughnessTexture=s.createTextureInfoDef(_,f);}return s.materialIndexMap.set(p,S),d}),u.filter(p=>p.prewriteTypes.includes("Mesh")).forEach(p=>p.prewrite(s,"Mesh")),r.meshes=o.listMeshes().map((p,S)=>{let d=s.createPropertyDef(p),_=null;return d.primitives=p.listPrimitives().map(f=>{let v={attributes:{}};v.mode=f.getMode();let x=f.getMaterial();x&&(v.material=s.materialIndexMap.get(x)),Object.keys(f.getExtras()).length&&(v.extras=f.getExtras());let T=f.getIndices();T&&(v.indices=s.accessorIndexMap.get(T));for(let R of f.listSemantics())v.attributes[R]=s.accessorIndexMap.get(f.getAttribute(R));for(let R of f.listTargets()){let $={};for(let E of R.listSemantics())$[E]=s.accessorIndexMap.get(R.getAttribute(E));v.targets=v.targets||[],v.targets.push($);}return f.listTargets().length&&!_&&(_=f.listTargets().map(R=>R.getName())),v}),p.getWeights().length&&(d.weights=p.getWeights()),_&&(d.extras=d.extras||{},d.extras.targetNames=_),s.meshIndexMap.set(p,S),d}),r.cameras=o.listCameras().map((p,S)=>{let d=s.createPropertyDef(p);if(d.type=p.getType(),d.type===gd.Type.PERSPECTIVE){d.perspective={znear:p.getZNear(),zfar:p.getZFar(),yfov:p.getYFov()};let _=p.getAspectRatio();_!==null&&(d.perspective.aspectRatio=_);}else d.orthographic={znear:p.getZNear(),zfar:p.getZFar(),xmag:p.getXMag(),ymag:p.getYMag()};return s.cameraIndexMap.set(p,S),d}),r.nodes=o.listNodes().map((p,S)=>{let d=s.createPropertyDef(p);return qe.eq(p.getTranslation(),[0,0,0])||(d.translation=p.getTranslation()),qe.eq(p.getRotation(),[0,0,0,1])||(d.rotation=p.getRotation()),qe.eq(p.getScale(),[1,1,1])||(d.scale=p.getScale()),p.getWeights().length&&(d.weights=p.getWeights()),s.nodeIndexMap.set(p,S),d}),r.skins=o.listSkins().map((p,S)=>{let d=s.createPropertyDef(p),_=p.getInverseBindMatrices();_&&(d.inverseBindMatrices=s.accessorIndexMap.get(_));let f=p.getSkeleton();return f&&(d.skeleton=s.nodeIndexMap.get(f)),d.joints=p.listJoints().map(v=>s.nodeIndexMap.get(v)),s.skinIndexMap.set(p,S),d}),o.listNodes().forEach((p,S)=>{let d=r.nodes[S],_=p.getMesh();_&&(d.mesh=s.meshIndexMap.get(_));let f=p.getCamera();f&&(d.camera=s.cameraIndexMap.get(f));let v=p.getSkin();v&&(d.skin=s.skinIndexMap.get(v)),p.listChildren().length>0&&(d.children=p.listChildren().map(x=>s.nodeIndexMap.get(x)));}),r.animations=o.listAnimations().map((p,S)=>{let d=s.createPropertyDef(p),_=new Map;return d.samplers=p.listSamplers().map((f,v)=>{let x=s.createPropertyDef(f);return x.input=s.accessorIndexMap.get(f.getInput()),x.output=s.accessorIndexMap.get(f.getOutput()),x.interpolation=f.getInterpolation(),_.set(f,v),x}),d.channels=p.listChannels().map(f=>{let v=s.createPropertyDef(f);return v.sampler=_.get(f.getSampler()),v.target={node:s.nodeIndexMap.get(f.getTargetNode()),path:f.getTargetPath()},v}),s.animationIndexMap.set(p,S),d}),r.scenes=o.listScenes().map((p,S)=>{let d=s.createPropertyDef(p);return d.nodes=p.listChildren().map(_=>s.nodeIndexMap.get(_)),s.sceneIndexMap.set(p,S),d});let b=o.getDefaultScene();return b&&(r.scene=o.listScenes().indexOf(b)),r.extensionsUsed=u.map(p=>p.extensionName),r.extensionsRequired=l.map(p=>p.extensionName),u.forEach(p=>p.write(s)),sO(r),i}};function sO(e){let t=[];for(let n in e){let o=e[n];(Array.isArray(o)&&o.length===0||o===null||o===""||o&&typeof o=="object"&&Object.keys(o).length===0)&&t.push(n);}for(let n of t)delete e[n];}var aO=class{_logger=fd.DEFAULT_INSTANCE;_extensions=new Set;_dependencies={};_vertexLayout="interleaved";_strictResources=true;lastReadBytes=0;lastWriteBytes=0;setLogger(e){return this._logger=e,this}registerExtensions(e){for(let t of e)this._extensions.add(t),t.register();return this}registerDependencies(e){return Object.assign(this._dependencies,e),this}setVertexLayout(e){return this._vertexLayout=e,this}setStrictResources(e){return this._strictResources=e,this}async read(e){return await this.readJSON(await this.readAsJSON(e))}async readAsJSON(e){let t=await this.readURI(e,"view");this.lastReadBytes=t.byteLength;let n=YR(t)?this._binaryToJSON(t):{json:JSON.parse($e.decodeText(t)),resources:{}};return await this._readResourcesExternal(n,this.dirname(e)),this._readResourcesInternal(n),n}async readJSON(e){return e=this._copyJSON(e),this._readResourcesInternal(e),Wz.read(e,{extensions:Array.from(this._extensions),dependencies:this._dependencies,logger:this._logger})}async binaryToJSON(e){let t=this._binaryToJSON($e.assertView(e));this._readResourcesInternal(t);let n=t.json;if(n.buffers&&n.buffers.some(o=>cO(t,o)))throw new Error("Cannot resolve external buffers with binaryToJSON().");if(n.images&&n.images.some(o=>uO(t,o)))throw new Error("Cannot resolve external images with binaryToJSON().");return t}async readBinary(e){return this.readJSON(await this.binaryToJSON($e.assertView(e)))}async writeJSON(e,t={}){if(t.format==="GLB"&&e.getRoot().listBuffers().length>1)throw new Error("GLB must have 0\u20131 buffers.");return iO.write(e,{format:t.format||"GLTF",basename:t.basename||"",logger:this._logger,vertexLayout:this._vertexLayout,dependencies:{...this._dependencies},extensions:Array.from(this._extensions)})}async writeBinary(e){let{json:t,resources:n}=await this.writeJSON(e,{format:"GLB"}),o=new Uint32Array([1179937895,2,12]),r=JSON.stringify(t),i=$e.pad($e.encodeText(r),32),s=$e.toView(new Uint32Array([i.byteLength,1313821514])),a=$e.concat([s,i]);o[o.length-1]+=a.byteLength;let c=Object.values(n)[0];if(!c||!c.byteLength)return $e.concat([$e.toView(o),a]);let u=$e.pad(c,0),l=$e.toView(new Uint32Array([u.byteLength,5130562])),m=$e.concat([l,u]);return o[o.length-1]+=m.byteLength,$e.concat([$e.toView(o),a,m])}async _readResourcesExternal(e,t){let n=e.json.images||[],o=e.json.buffers||[],r=[...n,...o].map(async i=>{let s=i.uri;if(!s||s.match(/data:/))return Promise.resolve();try{e.resources[s]=await this.readURI(this.resolve(t,s),"view"),this.lastReadBytes+=e.resources[s].byteLength;}catch(a){if(!this._strictResources&&n.includes(i))this._logger.warn(`Failed to load image URI, "${s}". ${a}`),e.resources[s]=null;else throw a}});await Promise.all(r);}_readResourcesInternal(e){function t(n){if(n.uri){if(n.uri in e.resources){$e.assertView(e.resources[n.uri]);return}if(n.uri.match(/data:/)){let o=`__${Vz()}.${qn.extension(n.uri)}`;e.resources[o]=$e.createBufferFromDataURI(n.uri),n.uri=o;}}}(e.json.images||[]).forEach(n=>{if(n.bufferView===void 0&&n.uri===void 0)throw new Error("Missing resource URI or buffer view.");t(n);}),(e.json.buffers||[]).forEach(t);}_copyJSON(e){let{images:t,buffers:n}=e.json;return e={json:{...e.json},resources:{...e.resources}},t&&(e.json.images=t.map(o=>({...o}))),n&&(e.json.buffers=n.map(o=>({...o}))),e}_binaryToJSON(e){if(!YR(e))throw new Error("Invalid glTF 2.0 binary.");let t=new Uint32Array(e.buffer,e.byteOffset+12,2);if(t[1]!==1313821514)throw new Error("Missing required GLB JSON chunk.");let n=20,o=t[0],r=$e.decodeText($e.toView(e,n,o)),i=JSON.parse(r),s=n+o;if(e.byteLength<=s)return {json:i,resources:{}};let a=new Uint32Array(e.buffer,e.byteOffset+s,2);if(a[1]!==5130562)return {json:i,resources:{}};let c=a[0],u=$e.toView(e,s+8,c);return {json:i,resources:{[Jr]:u}}}};function cO(e,t){return t.uri!==void 0&&!(t.uri in e.resources)}function uO(e,t){return t.uri!==void 0&&!(t.uri in e.resources)&&t.bufferView===void 0}function YR(e){if(e.byteLength<3*Uint32Array.BYTES_PER_ELEMENT)return false;let t=new Uint32Array(e.buffer,e.byteOffset,3);return t[0]===1179937895&&t[1]===2}var _d=class extends aO{_fetch;_fetchConfig;_init;_fetchEnabled=false;constructor(e=null,t=pr.DEFAULT_INIT){super(),this._fetch=e,this._fetchConfig=t,this._init=this.init();}async init(){return this._init?this._init:Promise.all([import('fs'),import('path')]).then(([e,t])=>{this._fs=e.promises,this._path=t;})}setAllowNetwork(e){if(e&&!this._fetch)throw new Error("NodeIO requires a Fetch API implementation for HTTP requests.");return this._fetchEnabled=e,this}async readURI(e,t){if(await this.init(),pr.isAbsoluteURL(e)){if(!this._fetchEnabled||!this._fetch)throw new Error("Network request blocked. Allow HTTP requests explicitly, if needed.");let n=await this._fetch(e,this._fetchConfig);switch(t){case "view":return new Uint8Array(await n.arrayBuffer());case "text":return n.text()}}else switch(t){case "view":return this._fs.readFile(e);case "text":return this._fs.readFile(e,"utf8")}}resolve(e,t){return pr.isAbsoluteURL(e)||pr.isAbsoluteURL(t)?pr.resolve(e,t):this._path.resolve(e,decodeURIComponent(t))}dirname(e){return pr.isAbsoluteURL(e)?pr.dirname(e):this._path.dirname(e)}async write(e,t){await this.init(),await(e.match(/\.glb$/)?this._writeGLB(e,t):this._writeGLTF(e,t));}async _writeGLTF(e,t){this.lastWriteBytes=0;let{json:n,resources:o}=await this.writeJSON(t,{format:"GLTF",basename:qn.basename(e)}),{_fs:r,_path:i}=this,s=i.dirname(e),a=JSON.stringify(n,null,2);await r.writeFile(e,a),this.lastWriteBytes+=a.length;for(let c of lO(Object.keys(o),10))await Promise.all(c.map(async u=>{if(pr.isAbsoluteURL(u)){if(pr.extension(u)==="bin")throw new Error(`Cannot write buffer to path "${u}".`);return}let l=i.join(s,decodeURIComponent(u));await r.mkdir(i.dirname(l),{recursive:true}),await r.writeFile(l,o[u]),this.lastWriteBytes+=o[u].byteLength;}));}async _writeGLB(e,t){let n=await this.writeBinary(t);await this._fs.writeFile(e,n),this.lastWriteBytes=n.byteLength;}};function lO(e,t){let n=[];for(let o=0,r=e.length;o<r;o+=t){let i=[];for(let s=0;s<t&&o+s<r;s++)i.push(e[o+s]);n.push(i);}return n}function dO(){return {vkFormat:0,typeSize:1,pixelWidth:0,pixelHeight:0,pixelDepth:0,layerCount:0,faceCount:1,levelCount:0,supercompressionScheme:0,levels:[],dataFormatDescriptor:[{vendorId:0,descriptorType:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],keyValue:{},globalData:null}}var Vn=class{constructor(t,n,o,r){this._dataView=void 0,this._littleEndian=void 0,this._offset=void 0,this._dataView=new DataView(t.buffer,t.byteOffset+n,o),this._littleEndian=r,this._offset=0;}_nextUint8(){let t=this._dataView.getUint8(this._offset);return this._offset+=1,t}_nextUint16(){let t=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,t}_nextUint32(){let t=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint64(){let t=this._dataView.getUint32(this._offset,this._littleEndian),n=this._dataView.getUint32(this._offset+4,this._littleEndian),o=t+2**32*n;return this._offset+=8,o}_nextInt32(){let t=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,t}_nextUint8Array(t){let n=new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+this._offset,t);return this._offset+=t,n}_skip(t){return this._offset+=t,this}_scan(t,n=0){let o=this._offset,r=0;for(;this._dataView.getUint8(this._offset)!==n&&r<t;)r++,this._offset++;return r<t&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+o,r)}};var yt=[171,75,84,88,32,50,48,187,13,10,26,10];function vT(e){return new TextDecoder().decode(e)}function vd(e){let t=new Uint8Array(e.buffer,e.byteOffset,yt.length);if(t[0]!==yt[0]||t[1]!==yt[1]||t[2]!==yt[2]||t[3]!==yt[3]||t[4]!==yt[4]||t[5]!==yt[5]||t[6]!==yt[6]||t[7]!==yt[7]||t[8]!==yt[8]||t[9]!==yt[9]||t[10]!==yt[10]||t[11]!==yt[11])throw new Error("Missing KTX 2.0 identifier.");let n=dO(),o=17*Uint32Array.BYTES_PER_ELEMENT,r=new Vn(e,yt.length,o,true);n.vkFormat=r._nextUint32(),n.typeSize=r._nextUint32(),n.pixelWidth=r._nextUint32(),n.pixelHeight=r._nextUint32(),n.pixelDepth=r._nextUint32(),n.layerCount=r._nextUint32(),n.faceCount=r._nextUint32(),n.levelCount=r._nextUint32(),n.supercompressionScheme=r._nextUint32();let i=r._nextUint32(),s=r._nextUint32(),a=r._nextUint32(),c=r._nextUint32(),u=r._nextUint64(),l=r._nextUint64(),m=Math.max(n.levelCount,1)*3*8,h=new Vn(e,yt.length+o,m,true);for(let Ee=0,je=Math.max(n.levelCount,1);Ee<je;Ee++)n.levels.push({levelData:new Uint8Array(e.buffer,e.byteOffset+h._nextUint64(),h._nextUint64()),uncompressedByteLength:h._nextUint64()});let y=new Vn(e,i,s,true);y._skip(4);let b=y._nextUint16(),p=y._nextUint16(),S=y._nextUint16(),d=y._nextUint16(),_=y._nextUint8(),f=y._nextUint8(),v=y._nextUint8(),x=y._nextUint8(),T=[y._nextUint8(),y._nextUint8(),y._nextUint8(),y._nextUint8()],R=[y._nextUint8(),y._nextUint8(),y._nextUint8(),y._nextUint8(),y._nextUint8(),y._nextUint8(),y._nextUint8(),y._nextUint8()],E={vendorId:b,descriptorType:p,versionNumber:S,colorModel:_,colorPrimaries:f,transferFunction:v,flags:x,texelBlockDimension:T,bytesPlane:R,samples:[]},F=(d/4-6)/4;for(let Ee=0;Ee<F;Ee++){let je={bitOffset:y._nextUint16(),bitLength:y._nextUint8(),channelType:y._nextUint8(),samplePosition:[y._nextUint8(),y._nextUint8(),y._nextUint8(),y._nextUint8()],sampleLower:Number.NEGATIVE_INFINITY,sampleUpper:Number.POSITIVE_INFINITY};je.channelType&64?(je.sampleLower=y._nextInt32(),je.sampleUpper=y._nextInt32()):(je.sampleLower=y._nextUint32(),je.sampleUpper=y._nextUint32()),E.samples[Ee]=je;}n.dataFormatDescriptor.length=0,n.dataFormatDescriptor.push(E);let V=new Vn(e,a,c,true);for(;V._offset<c;){let Ee=V._nextUint32(),je=V._scan(Ee),I=vT(je);if(n.keyValue[I]=V._nextUint8Array(Ee-je.byteLength-1),I.match(/^ktx/i)){let q=vT(n.keyValue[I]);n.keyValue[I]=q.substring(0,q.lastIndexOf("\0"));}let L=Ee%4?4-Ee%4:0;V._skip(L);}if(l<=0)return n;let K=new Vn(e,u,l,true),ue=K._nextUint16(),ke=K._nextUint16(),xe=K._nextUint32(),Ve=K._nextUint32(),be=K._nextUint32(),k=K._nextUint32(),U=[];for(let Ee=0,je=Math.max(n.levelCount,1);Ee<je;Ee++)U.push({imageFlags:K._nextUint32(),rgbSliceByteOffset:K._nextUint32(),rgbSliceByteLength:K._nextUint32(),alphaSliceByteOffset:K._nextUint32(),alphaSliceByteLength:K._nextUint32()});let B=u+K._offset,w=B+xe,O=w+Ve,j=O+be,Y=new Uint8Array(e.buffer,e.byteOffset+B,xe),ce=new Uint8Array(e.buffer,e.byteOffset+w,Ve),Re=new Uint8Array(e.buffer,e.byteOffset+O,be),pe=new Uint8Array(e.buffer,e.byteOffset+j,k);return n.globalData={endpointCount:ue,selectorCount:ke,imageDescs:U,endpointsData:Y,selectorsData:ce,tablesData:Re,extendedData:pe},n}var Wr="EXT_mesh_gpu_instancing",hr="EXT_mesh_features",xt="EXT_meshopt_compression",ve="EXT_structural_metadata",yd="EXT_texture_webp",Sd="EXT_texture_avif",_O="KHR_accessor_float16",vO="KHR_accessor_float64",Je="KHR_draco_mesh_compression",fr="KHR_lights_punctual",Yr="KHR_materials_anisotropy",Qr="KHR_materials_clearcoat",en="KHR_materials_diffuse_transmission",tn="KHR_materials_dispersion",rn="KHR_materials_emissive_strength",nn="KHR_materials_ior",on="KHR_materials_iridescence",sn="KHR_materials_pbrSpecularGlossiness",an="KHR_materials_sheen",cn="KHR_materials_specular",un="KHR_materials_transmission",Yo="KHR_materials_unlit",ln="KHR_materials_volume",kt="KHR_materials_variants",yT="KHR_mesh_primitive_restart",ST="KHR_mesh_quantization",dn="KHR_node_visibility",bd="KHR_texture_basisu",mn="KHR_texture_transform",Gt="KHR_xmp_json_ld",yO=class extends ze{static EXTENSION_NAME=hr;init(){this.extensionName=hr,this.propertyType="FeatureID",this.parentTypes=["Features"];}getDefaults(){return Object.assign(super.getDefaults(),{nullFeatureId:null,label:"",attribute:null,texture:null,propertyTable:null})}getFeatureCount(){return this.get("featureCount")}setFeatureCount(e){return this.set("featureCount",e)}getNullFeatureID(){return this.get("nullFeatureId")}setNullFeatureID(e){return this.set("nullFeatureId",e)}getLabel(){return this.get("label")}setLabel(e){return this.set("label",e)}getAttribute(){return this.get("attribute")}setAttribute(e){return this.set("attribute",e)}getTexture(){return this.getRef("texture")}setTexture(e){return this.setRef("texture",e)}getPropertyTable(){return this.getRef("propertyTable")}setPropertyTable(e){return this.setRef("propertyTable",e)}},SO=class extends ze{static EXTENSION_NAME=hr;init(){this.extensionName=hr,this.propertyType="FeatureIDTexture",this.parentTypes=["FeatureID"];}getDefaults(){let e=new Le(this.graph,"textureInfo");return e.setMinFilter(Le.MagFilter.NEAREST),e.setMagFilter(Le.MagFilter.NEAREST),Object.assign(super.getDefaults(),{channels:[0],texture:null,textureInfo:e})}getChannels(){return this.get("channels")}setChannels(e){return this.set("channels",e)}getTexture(){return this.getRef("texture")}setTexture(e){return this.setRef("texture",e)}getTextureInfo(){return this.getRef("texture")?this.getRef("textureInfo"):null}},bO=class extends ze{static EXTENSION_NAME=hr;init(){this.extensionName=hr,this.propertyType="Features",this.parentTypes=[ee.PRIMITIVE];}getDefaults(){return Object.assign(super.getDefaults(),{featureIds:new Me([])})}listFeatureIDs(){return this.listRefs("featureIds")}addFeatureID(e){return this.addRef("featureIds",e)}removeFeatureID(e){return this.removeRef("featureIds",e)}},Ks=hr,RO=class extends Ae{extensionName=hr;static EXTENSION_NAME=hr;createFeatures(){return new bO(this.document.getGraph())}createFeatureID(){return new yO(this.document.getGraph())}createFeatureIDTexture(){return new SO(this.document.getGraph())}read(e){return (e.jsonDoc.json.meshes||[]).forEach((t,n)=>{(t.primitives||[]).forEach((o,r)=>{this._readPrimitive(e,n,o,r);});}),this}_readPrimitive(e,t,n,o){if(!n.extensions||!n.extensions[Ks])return;let r=this.createFeatures(),i=n.extensions[Ks];for(let s of i.featureIds){let a=TO(this.document,this,e,s);r.addFeatureID(a);}e.meshes[t].listPrimitives()[o].setExtension(Ks,r);}write(e){let t=e.jsonDoc.json.meshes;if(!t)return this;for(let n of this.document.getRoot().listMeshes()){let o=t[e.meshIndexMap.get(n)];n.listPrimitives().forEach((r,i)=>{let s=o.primitives[i];this._writePrimitive(e,r,s);});}return this}_writePrimitive(e,t,n){let o=t.getExtension(Ks);if(!o)return;let r={featureIds:[]};o.listFeatureIDs().forEach(i=>{r.featureIds.push(xO(this.document,e,i));}),n.extensions=n.extensions||{},n.extensions[Ks]=r;}};function TO(e,t,n,o){let r=t.createFeatureID().setFeatureCount(o.featureCount);o.nullFeatureId!==void 0&&r.setNullFeatureID(o.nullFeatureId),o.label!==void 0&&r.setLabel(o.label),o.attribute!==void 0&&r.setAttribute(o.attribute);let i=o.texture;if(i!==void 0){let s=$O(t,n,i);r.setTexture(s);}if(o.propertyTable!==void 0){let s=e.getRoot().getExtension(ve).listPropertyTables();r.setPropertyTable(s[o.propertyTable]);}return r}function $O(e,t,n){let o=e.createFeatureIDTexture(),{json:r}=t.jsonDoc;if(n.channels&&o.setChannels(n.channels),n.index!==void 0){let i=r.textures[n.index].source;o.setTexture(t.textures[i]),t.setTextureInfo(o.getTextureInfo(),n);}return o}function xO(e,t,n){let o=e.getRoot(),r={featureCount:n.getFeatureCount()};if(n.getNullFeatureID()!=null&&(r.nullFeatureId=n.getNullFeatureID()),n.getLabel()&&(r.label=n.getLabel()),n.getAttribute()!=null&&(r.attribute=n.getAttribute()),n.getTexture()){let i=n.getTexture(),s=i.getTexture(),a=i.getTextureInfo();r.texture=t.createTextureInfoDef(s,a);let c=i.getChannels();qe.eq(c,[0])||(r.texture.channels=c);}if(n.getPropertyTable()){let i=o.getExtension(ve),s=n.getPropertyTable();r.propertyTable=i.listPropertyTables().indexOf(s);}return r}var Y_="INSTANCE_ATTRIBUTE",wO=class extends ze{static EXTENSION_NAME=Wr;init(){this.extensionName=Wr,this.propertyType="InstancedMesh",this.parentTypes=[ee.NODE];}getDefaults(){return Object.assign(super.getDefaults(),{attributes:new Qe})}getAttribute(e){return this.getRefMap("attributes",e)}setAttribute(e,t){return this.setRefMap("attributes",e,t,{usage:Y_})}listAttributes(){return this.listRefMapValues("attributes")}listSemantics(){return this.listRefMapKeys("attributes")}},EO=class extends Ae{static EXTENSION_NAME=Wr;extensionName=Wr;prewriteTypes=[ee.ACCESSOR];createInstancedMesh(){return new wO(this.document.getGraph())}read(e){return (e.jsonDoc.json.nodes||[]).forEach((t,n)=>{if(!t.extensions||!t.extensions.EXT_mesh_gpu_instancing)return;let o=t.extensions[Wr],r=this.createInstancedMesh();for(let i in o.attributes)r.setAttribute(i,e.accessors[o.attributes[i]]);e.nodes[n].setExtension(Wr,r);}),this}prewrite(e){e.accessorUsageGroupedByParent.add(Y_);for(let t of this.properties)for(let n of t.listAttributes())e.addAccessorToUsageGroup(n,Y_);return this}write(e){let t=e.jsonDoc;return this.document.getRoot().listNodes().forEach(n=>{let o=n.getExtension(Wr);if(o){let r=e.nodeIndexMap.get(n),i=t.json.nodes[r],s={attributes:{}};o.listSemantics().forEach(a=>{let c=o.getAttribute(a);s.attributes[a]=e.accessorIndexMap.get(c);}),i.extensions=i.extensions||{},i.extensions[Wr]=s;}}),this}},IO=(function(e){return e.QUANTIZE="quantize",e.FILTER="filter",e})({});function zO(e){return !e.extensions||!e.extensions.EXT_meshopt_compression?false:!!e.extensions[xt].fallback}var{BYTE:OO,SHORT:bT,FLOAT:kO}=me.ComponentType,{encodeNormalizedInt:RT,decodeNormalizedInt:Q_}=qe;function NO(e,t,n,o){let{filter:r,bits:i}=o,s={array:e.getArray(),byteStride:e.getElementSize()*e.getComponentSize(),componentType:e.getComponentType(),normalized:e.getNormalized()};if(n!=="ATTRIBUTES")return s;if(r!=="NONE"){let a=e.getNormalized()?PO(e):new Float32Array(s.array);switch(r){case "EXPONENTIAL":s.byteStride=e.getElementSize()*4,s.componentType=kO,s.normalized=false,s.array=t.encodeFilterExp(a,e.getCount(),s.byteStride,i);break;case "OCTAHEDRAL":s.byteStride=i>8?8:4,s.componentType=i>8?bT:OO,s.normalized=true,a=e.getElementSize()===3?CO(a):a,s.array=t.encodeFilterOct(a,e.getCount(),s.byteStride,i);break;case "QUATERNION":s.byteStride=8,s.componentType=bT,s.normalized=true,s.array=t.encodeFilterQuat(a,e.getCount(),s.byteStride,i);break;default:throw new Error("Invalid filter.")}s.min=e.getMin([]),s.max=e.getMax([]),e.getNormalized()&&(s.min=s.min.map(c=>Q_(c,e.getComponentType())),s.max=s.max.map(c=>Q_(c,e.getComponentType()))),s.normalized&&(s.min=s.min.map(c=>RT(c,s.componentType)),s.max=s.max.map(c=>RT(c,s.componentType)));}else s.byteStride%4&&(s.array=AO(s.array,e.getElementSize()),s.byteStride=s.array.byteLength/e.getCount());return s}function PO(e){let t=e.getComponentType(),n=e.getArray(),o=new Float32Array(n.length);for(let r=0;r<n.length;r++)o[r]=Q_(n[r],t);return o}function AO(e,t){let n=$e.padNumber(e.BYTES_PER_ELEMENT*t)/e.BYTES_PER_ELEMENT,o=e.length/t,r=new e.constructor(o*n);for(let i=0;i*t<e.length;i++)for(let s=0;s<t;s++)r[i*n+s]=e[i*t+s];return r}function CO(e){let t=new Float32Array(e.length*4/3);for(let n=0,o=e.length/3;n<o;n++)t[n*4]=e[n*3],t[n*4+1]=e[n*3+1],t[n*4+2]=e[n*3+2];return t}function MO(e,t){return t===Zr.BufferViewUsage.ELEMENT_ARRAY_BUFFER?e.listParents().some(n=>n instanceof Bs&&n.getMode()===Bs.Mode.TRIANGLES)?"TRIANGLES":"INDICES":"ATTRIBUTES"}function jO(e,t){let n=t.getGraph().listParentEdges(e).filter(o=>!(o.getParent()instanceof J_));for(let o of n){let r=o.getName(),i=o.getAttributes().key||"",s=o.getParent().propertyType===ee.PRIMITIVE_TARGET;if(r==="indices")return {filter:"NONE"};if(r==="attributes"){if(i==="POSITION")return {filter:"NONE"};if(i==="TEXCOORD_0")return {filter:"NONE"};if(i.startsWith("JOINTS_"))return {filter:"NONE"};if(i.startsWith("WEIGHTS_"))return {filter:"NONE"};if(i==="NORMAL"||i==="TANGENT")return s?{filter:"NONE"}:{filter:"OCTAHEDRAL",bits:8}}if(r==="output"){let a=UT(e);return a==="rotation"?{filter:"QUATERNION",bits:16}:a==="translation"?{filter:"EXPONENTIAL",bits:12}:a==="scale"?{filter:"EXPONENTIAL",bits:12}:{filter:"NONE"}}if(r==="input")return {filter:"NONE"};if(r==="inverseBindMatrices")return {filter:"NONE"}}return {filter:"NONE"}}function UT(e){for(let t of e.listParents())if(t instanceof hd){for(let n of t.listParents())if(n instanceof Z_)return n.getTargetPath()}return null}var TT={method:"quantize"},DO=class extends Ae{extensionName=xt;prereadTypes=[ee.BUFFER,ee.PRIMITIVE];prewriteTypes=[ee.BUFFER,ee.ACCESSOR];readDependencies=["meshopt.decoder"];writeDependencies=["meshopt.encoder"];static EXTENSION_NAME=xt;static EncoderMethod=IO;_decoder=null;_decoderFallbackBufferMap=new Map;_encoder=null;_encoderOptions=TT;_encoderFallbackBuffer=null;_encoderBufferViews={};_encoderBufferViewData={};_encoderBufferViewAccessors={};install(e,t){return e==="meshopt.decoder"&&(this._decoder=t),e==="meshopt.encoder"&&(this._encoder=t),this}setEncoderOptions(e){return this._encoderOptions={...TT,...e},this}preread(e,t){if(!this._decoder){if(!this.isRequired())return this;throw new Error(`[${xt}] Please install extension dependency, "meshopt.decoder".`)}if(!this._decoder.supported){if(!this.isRequired())return this;throw new Error(`[${xt}]: Missing WASM support.`)}return t===ee.BUFFER?this._prereadBuffers(e):t===ee.PRIMITIVE&&this._prereadPrimitives(e),this}_prereadBuffers(e){let t=e.jsonDoc;(t.json.bufferViews||[]).forEach((n,o)=>{if(!n.extensions||!n.extensions.EXT_meshopt_compression)return;let r=n.extensions[xt],i=r.byteOffset||0,s=r.byteLength||0,a=r.count,c=r.byteStride,u=new Uint8Array(a*c),l=t.json.buffers[r.buffer],m=l.uri?t.resources[l.uri]:t.resources[Jr],h=$e.toView(m,i,s);this._decoder.decodeGltfBuffer(u,a,c,h,r.mode,r.filter),e.bufferViews[o]=u;});}_prereadPrimitives(e){let t=e.jsonDoc;(t.json.bufferViews||[]).forEach(n=>{if(!n.extensions||!n.extensions.EXT_meshopt_compression)return;let o=n.extensions[xt],r=e.buffers[o.buffer],i=e.buffers[n.buffer],s=t.json.buffers[n.buffer];zO(s)&&this._decoderFallbackBufferMap.set(i,r);});}read(e){if(!this.isRequired())return this;for(let[t,n]of this._decoderFallbackBufferMap){for(let o of t.listParents())o instanceof me&&o.swap(t,n);t.dispose();}return this}prewrite(e,t){return t===ee.ACCESSOR?this._prewriteAccessors(e):t===ee.BUFFER&&this._prewriteBuffers(e),this}_prewriteAccessors(e){let t=e.jsonDoc.json,n=this._encoder,o=this._encoderOptions,r=this.document.getGraph(),i=this.document.createBuffer(),s=this.document.getRoot().listBuffers().indexOf(i),a=1,c=new Map,u=l=>{for(let m of r.listParents(l)){if(m.propertyType===ee.ROOT)continue;let h=c.get(l);return h===void 0&&c.set(l,h=a++),h}return -1};this._encoderFallbackBuffer=i,this._encoderBufferViews={},this._encoderBufferViewData={},this._encoderBufferViewAccessors={};for(let l of this.document.getRoot().listAccessors()){if(UT(l)==="weights"||l.getSparse())continue;let m=e.getAccessorUsage(l),h=e.accessorUsageGroupedByParent.has(m)?u(l):null,y=MO(l,m),b=o.method==="filter"?jO(l,this.document):{filter:"NONE"},p=NO(l,n,y,b),{array:S,byteStride:d}=p,_=l.getBuffer();if(!_)throw new Error(`${xt}: Missing buffer for accessor.`);let f=this.document.getRoot().listBuffers().indexOf(_),v=[m,h,y,b.filter,d,f].join(":"),x=this._encoderBufferViews[v],T=this._encoderBufferViewData[v],R=this._encoderBufferViewAccessors[v];(!x||!T)&&(R=this._encoderBufferViewAccessors[v]=[],T=this._encoderBufferViewData[v]=[],x=this._encoderBufferViews[v]={buffer:s,target:Zr.USAGE_TO_TARGET[m],byteOffset:0,byteLength:0,byteStride:m===Zr.BufferViewUsage.ARRAY_BUFFER?d:void 0,extensions:{[xt]:{buffer:f,byteOffset:0,byteLength:0,mode:y,filter:b.filter!=="NONE"?b.filter:void 0,byteStride:d,count:0}}});let $=e.createAccessorDef(l);$.componentType=p.componentType,$.normalized=p.normalized,$.byteOffset=x.byteLength,$.min&&p.min&&($.min=p.min),$.max&&p.max&&($.max=p.max),e.accessorIndexMap.set(l,t.accessors.length),t.accessors.push($),R.push($),T.push(new Uint8Array(S.buffer,S.byteOffset,S.byteLength)),x.byteLength+=S.byteLength,x.extensions.EXT_meshopt_compression.count+=l.getCount();}}_prewriteBuffers(e){let t=this._encoder;for(let n in this._encoderBufferViews){let o=this._encoderBufferViews[n],r=this._encoderBufferViewData[n],i=this.document.getRoot().listBuffers()[o.extensions[xt].buffer],s=e.otherBufferViews.get(i)||[],{count:a,byteStride:c,mode:u}=o.extensions[xt],l=$e.concat(r),m=t.encodeGltfBuffer(l,a,c,u),h=$e.pad(m);o.extensions[xt].byteLength=m.byteLength,r.length=0,r.push(h),s.push(h),e.otherBufferViews.set(i,s);}}write(e){let t=0;for(let i in this._encoderBufferViews){let s=this._encoderBufferViews[i],a=this._encoderBufferViewData[i][0],c=e.otherBufferViewsIndexMap.get(a),u=this._encoderBufferViewAccessors[i];for(let y of u)y.bufferView=c;let l=e.jsonDoc.json.bufferViews[c],m=l.byteOffset||0;Object.assign(l,s),l.byteOffset=t;let h=l.extensions[xt];h.byteOffset=m,t+=$e.padNumber(s.byteLength);}let n=this._encoderFallbackBuffer,o=e.bufferIndexMap.get(n),r=e.jsonDoc.json.buffers[o];return r.byteLength=t,r.extensions={[xt]:{fallback:true}},n.dispose(),this}},UO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="StructuralMetadata",this.parentTypes=[ee.ROOT];}getDefaults(){return Object.assign(super.getDefaults(),{schema:null,schemaUri:"",propertyTables:new at,propertyTextures:new at,propertyAttributes:new at})}getSchema(){return this.getRef("schema")}setSchema(e){return this.setRef("schema",e)}getSchemaUri(){return this.get("schemaUri")}setSchemaUri(e){return this.set("schemaUri",e)}listPropertyTables(){return this.listRefs("propertyTables")}addPropertyTable(e){return this.addRef("propertyTables",e)}removePropertyTable(e){return this.removeRef("propertyTables",e)}listPropertyTextures(){return this.listRefs("propertyTextures")}addPropertyTexture(e){return this.addRef("propertyTextures",e)}removePropertyTexture(e){return this.removeRef("propertyTextures",e)}listPropertyAttributes(){return this.listRefs("propertyAttributes")}addPropertyAttribute(e){return this.addRef("propertyAttributes",e)}removePropertyAttribute(e){return this.removeRef("propertyAttributes",e)}},LO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="Schema",this.parentTypes=["StructuralMetadata"];}getDefaults(){return Object.assign(super.getDefaults(),{description:"",version:"",classes:new Qe,enums:new Qe})}getId(){return this.get("id")}setId(e){return this.set("id",e)}getDescription(){return this.get("description")}setDescription(e){return this.set("description",e)}getVersion(){return this.get("version")}setVersion(e){return this.set("version",e)}setClass(e,t){return this.setRefMap("classes",e,t)}getClass(e){return this.getRefMap("classes",e)}listClassKeys(){return this.listRefMapKeys("classes")}listClassValues(){return this.listRefMapValues("classes")}setEnum(e,t){return this.setRefMap("enums",e,t)}getEnum(e){return this.getRefMap("enums",e)}listEnumKeys(){return this.listRefMapKeys("enums")}listEnumValues(){return this.listRefMapValues("enums")}},FO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="Class",this.parentTypes=["Schema"];}getDefaults(){return Object.assign(super.getDefaults(),{description:"",properties:new Qe})}getDescription(){return this.get("description")}setDescription(e){return this.set("description",e)}setProperty(e,t){return this.setRefMap("properties",e,t)}getProperty(e){return this.getRefMap("properties",e)}listPropertyKeys(){return this.listRefMapKeys("properties")}listPropertyValues(){return this.listRefMapValues("properties")}},qO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="ClassProperty",this.parentTypes=["Class"];}getDefaults(){return Object.assign(super.getDefaults(),{description:"",componentType:null,enumType:null,array:null,count:null,normalized:null,offset:null,scale:null,max:null,min:null,required:null,noData:null,default:null})}getDescription(){return this.get("description")}setDescription(e){return this.set("description",e)}getType(){return this.get("type")}setType(e){return this.set("type",e)}getComponentType(){return this.get("componentType")}setComponentType(e){return this.set("componentType",e)}getEnumType(){return this.get("enumType")}setEnumType(e){return this.set("enumType",e)}getArray(){return this.get("array")}setArray(e){return this.set("array",e)}getCount(){return this.get("count")}setCount(e){return this.set("count",e)}getNormalized(){return this.get("normalized")}setNormalized(e){return this.set("normalized",e)}getOffset(){return this.get("offset")}setOffset(e){return this.set("offset",e)}getScale(){return this.get("scale")}setScale(e){return this.set("scale",e)}getMax(){return this.get("max")}setMax(e){return this.set("max",e)}getMin(){return this.get("min")}setMin(e){return this.set("min",e)}getRequired(){return this.get("required")}setRequired(e){return this.set("required",e)}getNoData(){return this.get("noData")}setNoData(e){return this.set("noData",e)}getDefault(){return this.get("default")}setDefault(e){return this.set("default",e)}},VO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="Enum",this.parentTypes=["Schema"];}getDefaults(){return Object.assign(super.getDefaults(),{description:"",valueType:"UINT16",values:new at})}getDescription(){return this.get("description")}setDescription(e){return this.set("description",e)}getValueType(){return this.get("valueType")}setValueType(e){return this.set("valueType",e)}listValues(){return this.listRefs("values")}addEnumValue(e){return this.addRef("values",e)}removeEnumValue(e){return this.removeRef("values",e)}},BO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="EnumValue",this.parentTypes=["Enum"];}getDefaults(){return Object.assign(super.getDefaults(),{description:null})}getDescription(){return this.get("description")}setDescription(e){return this.set("description",e)}getValue(){return this.get("value")}setValue(e){return this.set("value",e)}},KO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="PropertyTable",this.parentTypes=["StructuralMetadata"];}getDefaults(){return Object.assign(super.getDefaults(),{properties:new Qe})}getClass(){return this.get("class")}setClass(e){return this.set("class",e)}getCount(){return this.get("count")}setCount(e){return this.set("count",e)}setProperty(e,t){return this.setRefMap("properties",e,t)}getProperty(e){return this.getRefMap("properties",e)}listPropertyKeys(){return this.listRefMapKeys("properties")}listPropertyValues(){return this.listRefMapValues("properties")}},GO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="PropertyTableProperty",this.parentTypes=["PropertyTable"];}getDefaults(){return Object.assign(super.getDefaults(),{arrayOffsets:null,stringOffsets:null,arrayOffsetType:null,stringOffsetType:null,offset:null,scale:null,max:null,min:null})}getValues(){return this.get("values")}setValues(e){return this.set("values",e)}getArrayOffsets(){return this.get("arrayOffsets")}setArrayOffsets(e){return this.set("arrayOffsets",e)}getStringOffsets(){return this.get("stringOffsets")}setStringOffsets(e){return this.set("stringOffsets",e)}getArrayOffsetType(){return this.get("arrayOffsetType")}setArrayOffsetType(e){return this.set("arrayOffsetType",e)}getStringOffsetType(){return this.get("stringOffsetType")}setStringOffsetType(e){return this.set("stringOffsetType",e)}getOffset(){return this.get("offset")}setOffset(e){return this.set("offset",e)}getScale(){return this.get("scale")}setScale(e){return this.set("scale",e)}getMax(){return this.get("max")}setMax(e){return this.set("max",e)}getMin(){return this.get("min")}setMin(e){return this.set("min",e)}},HO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="PropertyTexture",this.parentTypes=["StructuralMetadata"];}getDefaults(){return Object.assign(super.getDefaults(),{properties:new Qe})}getClass(){return this.get("class")}setClass(e){return this.set("class",e)}setProperty(e,t){return this.setRefMap("properties",e,t)}getProperty(e){return this.getRefMap("properties",e)}listPropertyKeys(){return this.listRefMapKeys("properties")}listPropertyValues(){return this.listRefMapValues("properties")}},ZO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="PropertyTextureProperty",this.parentTypes=["PropertyTexture"];}getDefaults(){let e=new Le(this.graph,"textureInfo");return e.setMinFilter(Le.MagFilter.NEAREST),e.setMagFilter(Le.MagFilter.NEAREST),Object.assign(super.getDefaults(),{channels:[0],texture:null,textureInfo:e,offset:null,scale:null,max:null,min:null})}getChannels(){return this.get("channels")}setChannels(e){return this.set("channels",e)}getTexture(){return this.getRef("texture")}setTexture(e){return this.setRef("texture",e)}getTextureInfo(){return this.getRef("texture")?this.getRef("textureInfo"):null}getOffset(){return this.get("offset")}setOffset(e){return this.set("offset",e)}getScale(){return this.get("scale")}setScale(e){return this.set("scale",e)}getMax(){return this.get("max")}setMax(e){return this.set("max",e)}getMin(){return this.get("min")}setMin(e){return this.set("min",e)}},JO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="PropertyAttribute",this.parentTypes=["StructuralMetadata"];}getDefaults(){return Object.assign(super.getDefaults(),{properties:new Qe})}getClass(){return this.get("class")}setClass(e){return this.set("class",e)}setProperty(e,t){return this.setRefMap("properties",e,t)}getProperty(e){return this.getRefMap("properties",e)}listPropertyKeys(){return this.listRefMapKeys("properties")}listPropertyValues(){return this.listRefMapValues("properties")}},XO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="PropertyAttributeProperty",this.parentTypes=["PropertyAttribute"];}getDefaults(){return Object.assign(super.getDefaults(),{offset:null,scale:null,max:null,min:null})}getAttribute(){return this.get("attribute")}setAttribute(e){return this.set("attribute",e)}getOffset(){return this.get("offset")}setOffset(e){return this.set("offset",e)}getScale(){return this.get("scale")}setScale(e){return this.set("scale",e)}getMax(){return this.get("max")}setMax(e){return this.set("max",e)}getMin(){return this.get("min")}setMin(e){return this.set("min",e)}},WO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="NodeStructuralMetadata",this.parentTypes=[ee.NODE];}getDefaults(){return Object.assign(super.getDefaults(),{class:"",properties:{}})}getClass(){return this.get("class")}setClass(e){return this.set("class",e)}getProperties(){return this.get("properties")}setProperties(e){return this.set("properties",e)}},YO=class extends ze{static EXTENSION_NAME=ve;init(){this.extensionName=ve,this.propertyType="MeshPrimitiveStructuralMetadata",this.parentTypes=[ee.PRIMITIVE];}getDefaults(){return Object.assign(super.getDefaults(),{propertyTextures:new at,propertyAttributes:new at})}listPropertyTextures(){return this.listRefs("propertyTextures")}addPropertyTexture(e){return this.addRef("propertyTextures",e)}removePropertyTexture(e){return this.removeRef("propertyTextures",e)}listPropertyAttributes(){return this.listRefs("propertyAttributes")}addPropertyAttribute(e){return this.addRef("propertyAttributes",e)}removePropertyAttribute(e){return this.removeRef("propertyAttributes",e)}},QO=class extends Ae{extensionName=ve;static EXTENSION_NAME=ve;prewriteTypes=[ee.BUFFER];prereadTypes=[ee.SCENE];createStructuralMetadata(){return new UO(this.document.getGraph())}createSchema(){return new LO(this.document.getGraph())}createClass(){return new FO(this.document.getGraph())}createClassProperty(){return new qO(this.document.getGraph())}createEnum(){return new VO(this.document.getGraph())}createEnumValue(){return new BO(this.document.getGraph())}createPropertyTable(){return new KO(this.document.getGraph())}createPropertyTableProperty(){return new GO(this.document.getGraph())}createPropertyTexture(){return new HO(this.document.getGraph())}createPropertyTextureProperty(){return new ZO(this.document.getGraph())}createPropertyAttribute(){return new JO(this.document.getGraph())}createPropertyAttributeProperty(){return new XO(this.document.getGraph())}createNodeStructuralMetadata(){return new WO(this.document.getGraph())}createMeshPrimitiveStructuralMetadata(){return new YO(this.document.getGraph())}read(e){return this}preread(e){let t=this.document.getRoot(),{json:n}=e.jsonDoc,o=n.extensions[ve],r=ek(this,e,o);return t.setExtension(ve,r),(n.meshes||[]).forEach((i,s)=>{let a=e.meshes[s].listPrimitives();(i.primitives||[]).forEach((c,u)=>{let l=a[u];this._readPrimitive(r,l,c);});}),(n.nodes||[]).forEach((i,s)=>{this._readNode(e.nodes[s],i);}),this}_readPrimitive(e,t,n){if(!n.extensions||!n.extensions.EXT_structural_metadata)return;let o=this.createMeshPrimitiveStructuralMetadata(),r=n.extensions[ve],i=e.listPropertyTextures(),s=r.propertyTextures||[];for(let u of s){let l=i[u];o.addPropertyTexture(l);}let a=e.listPropertyAttributes(),c=r.propertyAttributes||[];for(let u of c){let l=a[u];o.addPropertyAttribute(l);}t.setExtension(ve,o);}_readNode(e,t){if(!t.extensions||!t.extensions.EXT_structural_metadata)return;let n=t.extensions[ve],o=this.createNodeStructuralMetadata().setClass(n.class).setProperties(n.properties);e.setExtension(ve,o);}write(e){let t=this.document.getRoot(),n=t.getExtension(ve);if(!n)return this;let o=e.jsonDoc.json,r=mk(e,n);o.extensions=o.extensions||{},o.extensions[ve]=r;let i=t.listMeshes(),s=o.meshes;if(s)for(let u of i){let l=s[e.meshIndexMap.get(u)];u.listPrimitives().forEach((m,h)=>{let y=l.primitives[h];this._writePrimitive(n,m,y);});}let a=t.listNodes(),c=o.nodes;if(c)for(let u of a){let l=e.nodeIndexMap.get(u);this._writeNode(u,c[l]);}return this}_writePrimitive(e,t,n){let o=t.getExtension(ve);if(!o)return;let r=e.listPropertyTextures(),i=e.listPropertyAttributes(),s,a,c=o.listPropertyTextures();if(c.length>0){s=[];for(let m of c){let h=r.indexOf(m);if(h>=0)s.push(h);else throw new Error(`${ve}: Invalid property texture in mesh primitive`)}}let u=o.listPropertyAttributes();if(u.length>0){a=[];for(let m of u){let h=i.indexOf(m);if(h>=0)a.push(h);else throw new Error(`${ve}: Invalid property attribute in mesh primitive`)}}let l={propertyTextures:s,propertyAttributes:a};n.extensions=n.extensions||{},n.extensions[ve]=l;}_writeNode(e,t){let n=e.getExtension("EXT_structural_metadata");n&&(t.extensions=t.extensions||{},t.extensions[ve]={class:n.getClass(),properties:n.getProperties()});}prewrite(e,t){return t===ee.BUFFER&&this._prewriteBuffers(e),this}_prewriteBuffers(e){let t=this.document,n=t.getRoot().getExtension(ve);e.jsonDoc.json.bufferViews||=[];for(let o of n.listPropertyTables())for(let r of o.listPropertyValues()){let i=$k(t,e);i.push(r.getValues());let s=r.getArrayOffsets();s&&i.push(s);let a=r.getStringOffsets();a&&i.push(a);}}};function ek(e,t,n){let o=e.createStructuralMetadata();if(n.schema!==void 0){let a=tk(e,n.schema);o.setSchema(a);}else if(n.schemaUri){let a=n.schemaUri;o.setSchemaUri(a);}let r=n.propertyTextures||[];for(let a of r){let c=sk(e,t,a);o.addPropertyTexture(c);}let i=n.propertyTables||[];for(let a of i){let c=ck(e,t,a);o.addPropertyTable(c);}let s=n.propertyAttributes||[];for(let a of s){let c=lk(e,a);o.addPropertyAttribute(c);}return o}function tk(e,t){let n=e.createSchema().setId(t.id);t.name!==void 0&&n.setName(t.name),t.description!==void 0&&n.setDescription(t.description),t.version!==void 0&&n.setVersion(t.version);let o=t.classes||{};for(let i of Object.keys(o)){let s=o[i];n.setClass(i,rk(e,s));}let r=t.enums||{};for(let i of Object.keys(r))n.setEnum(i,ok(e,r[i]));return n}function rk(e,t){let n=e.createClass();t.name!==void 0&&n.setName(t.name),t.description!==void 0&&n.setDescription(t.description);let o=t.properties||{};for(let r of Object.keys(o)){let i=nk(e,o[r]);n.setProperty(r,i);}return n}function nk(e,t){let n=e.createClassProperty().setType(t.type);return t.name!==void 0&&n.setName(t.name),t.description!==void 0&&n.setDescription(t.description),t.componentType!==void 0&&n.setComponentType(t.componentType),t.enumType!==void 0&&n.setEnumType(t.enumType),t.array!==void 0&&n.setArray(t.array),t.count!==void 0&&n.setCount(t.count),t.normalized!==void 0&&n.setNormalized(t.normalized),t.offset!==void 0&&n.setOffset(t.offset),t.scale!==void 0&&n.setScale(t.scale),t.max!==void 0&&n.setMax(t.max),t.min!==void 0&&n.setMin(t.min),t.required!==void 0&&n.setRequired(t.required),t.noData!==void 0&&n.setNoData(t.noData),t.default!==void 0&&n.setDefault(t.default),n}function ok(e,t){let n=e.createEnum();t.name!==void 0&&n.setName(t.name),t.description!==void 0&&n.setDescription(t.description),t.valueType!==void 0&&n.setValueType(t.valueType);let o=t.values||{};for(let r of o)n.addEnumValue(ik(e,r));return n}function ik(e,t){let n=e.createEnumValue();return t.name!==void 0&&n.setName(t.name),t.description!==void 0&&n.setDescription(t.description),t.value!==void 0&&n.setValue(t.value),n}function sk(e,t,n){let o=e.createPropertyTexture();o.setClass(n.class),n.name!==void 0&&o.setName(n.name);let r=n.properties||{};for(let i of Object.keys(r)){let s=ak(e,t,r[i]);o.setProperty(i,s);}return o}function ak(e,t,n){let o=e.createPropertyTextureProperty(),r=t.jsonDoc.json.textures||[];n.channels&&o.setChannels(n.channels);let i=r[n.index].source;if(i!==void 0){let s=t.textures[i];o.setTexture(s);let a=o.getTextureInfo();a&&t.setTextureInfo(a,n);}return n.offset!==void 0&&o.setOffset(n.offset),n.scale!==void 0&&o.setScale(n.scale),n.max!==void 0&&o.setMax(n.max),n.min!==void 0&&o.setMin(n.min),o}function ck(e,t,n){let o=e.createPropertyTable().setClass(n.class).setCount(n.count);n.name!==void 0&&o.setName(n.name);let r=n.properties||{};for(let i of Object.keys(r)){let s=uk(e,t,r[i]);o.setProperty(i,s);}return o}function uk(e,t,n){let o=e.createPropertyTableProperty(),r=X_(t,n.values);if(o.setValues(r),n.arrayOffsets!==void 0){let i=X_(t,n.arrayOffsets);o.setArrayOffsets(i);}if(n.stringOffsets!==void 0){let i=X_(t,n.stringOffsets);o.setStringOffsets(i);}return n.arrayOffsetType!==void 0&&o.setArrayOffsetType(n.arrayOffsetType),n.stringOffsetType!==void 0&&o.setStringOffsetType(n.stringOffsetType),n.offset!==void 0&&o.setOffset(n.offset),n.scale!==void 0&&o.setScale(n.scale),n.max!==void 0&&o.setMax(n.max),n.min!==void 0&&o.setMin(n.min),o}function lk(e,t){let n=e.createPropertyAttribute();n.setClass(t.class),t.name!==void 0&&n.setName(t.name);let o=t.properties||{};for(let r of Object.keys(o)){let i=dk(e,o[r]);n.setProperty(r,i);}return n}function dk(e,t){let n=e.createPropertyAttributeProperty();return n.setAttribute(t.attribute),t.offset!==void 0&&n.setOffset(t.offset),t.scale!==void 0&&n.setScale(t.scale),t.max!==void 0&&n.setMax(t.max),t.min!==void 0&&n.setMin(t.min),n}function mk(e,t){let n={},o=t.getSchema();o&&(n.schema=pk(o));let r=t.getSchemaUri();r&&(n.schemaUri=r);let i=t.listPropertyTables();if(i.length>0){let c=[];for(let u of i){let l=vk(e,u);c.push(l);}n.propertyTables=c;}let s=t.listPropertyTextures();if(s.length>0){let c=[];for(let u of s){let l=Rk(e,u);c.push(l);}n.propertyTextures=c;}let a=t.listPropertyAttributes();if(a.length>0){let c=[];for(let u of a){let l=Sk(u);c.push(l);}n.propertyAttributes=c;}return n}function pk(e){let t={id:e.getId()},n=e.listClassKeys();if(n.length>0){t.classes={};for(let r of n){let i=fk(e.getClass(r));t.classes[r]=i;}}let o=e.listEnumKeys();if(o.length>0){t.enums={};for(let r of o){let i=gk(e.getEnum(r));t.enums[r]=i;}}return e.getName()&&(t.name=e.getName()),e.getDescription()&&(t.description=e.getDescription()),e.getVersion()&&(t.version=e.getVersion()),t}function fk(e){let t={},n=e.listPropertyKeys();if(n.length>0){t.properties={};for(let o of n){let r=e.getProperty(o);t.properties[o]=hk(r);}}return e.getName()&&(t.name=e.getName()),e.getDescription()&&(t.description=e.getDescription()),t}function hk(e){let t={type:e.getType()};return e.getArray()&&(t.array=e.getArray()),e.getNormalized()&&(t.normalized=e.getNormalized()),e.getRequired()&&(t.required=e.getRequired()),e.getName()&&(t.name=e.getName()),e.getDescription()&&(t.description=e.getDescription()),e.getComponentType()!=null&&(t.componentType=e.getComponentType()),e.getEnumType()!=null&&(t.enumType=e.getEnumType()),e.getCount()!=null&&(t.count=e.getCount()),e.getOffset()!=null&&(t.offset=e.getOffset()),e.getScale()!=null&&(t.scale=e.getScale()),e.getMax()!=null&&(t.max=e.getMax()),e.getMin()!=null&&(t.min=e.getMin()),e.getNoData()!=null&&(t.noData=e.getNoData()),e.getDefault()!=null&&(t.default=e.getDefault()),t}function gk(e){let t={values:e.listValues().map(_k)};return e.getName()&&(t.name=e.getName()),e.getDescription()&&(t.description=e.getDescription()),e.getValueType()!=="UINT16"&&(t.valueType=e.getValueType()),t}function _k(e){let t={name:e.getName(),value:e.getValue()};return e.getDescription()&&(t.description=e.getDescription()),t}function vk(e,t){let n={class:t.getClass(),count:t.getCount()};t.getName()&&(n.name=t.getName());let o=t.listPropertyKeys();if(o.length>0){n.properties={};for(let r of o){let i=yk(e,t.getProperty(r));n.properties[r]=i;}}return n}function yk(e,t){let n=t.getValues(),o={values:e.otherBufferViewsIndexMap.get(n)};if(t.getArrayOffsets()){let r=t.getArrayOffsets();o.arrayOffsets=e.otherBufferViewsIndexMap.get(r);}if(t.getStringOffsets()){let r=t.getStringOffsets();o.stringOffsets=e.otherBufferViewsIndexMap.get(r);}return t.getArrayOffsetType()!=null&&(o.arrayOffsetType=t.getArrayOffsetType()),t.getStringOffsetType()!=null&&(o.stringOffsetType=t.getStringOffsetType()),t.getOffset()!=null&&(o.offset=t.getOffset()),t.getScale()!=null&&(o.scale=t.getScale()),t.getMax()!=null&&(o.max=t.getMax()),t.getMin()!=null&&(o.min=t.getMin()),o}function Sk(e){let t={class:e.getClass()};e.getName()&&(t.name=e.getName());let n=e.listPropertyKeys();if(n.length>0){t.properties={};for(let o of n){let r=bk(e.getProperty(o));t.properties[o]=r;}}return t}function bk(e){let t={attribute:e.getAttribute()};return e.getOffset()!=null&&(t.offset=e.getOffset()),e.getScale()!=null&&(t.scale=e.getScale()),e.getMax()!=null&&(t.max=e.getMax()),e.getMin()!=null&&(t.min=e.getMin()),t}function Rk(e,t){let n={class:t.getClass()};t.getName()&&(n.name=t.getName());let o=t.listPropertyKeys();if(o.length>0){n.properties={};for(let r of o){let i=Tk(e,t.getProperty(r));n.properties[r]=i;}}return n}function Tk(e,t){let n=t.getTexture(),o=t.getTextureInfo(),r=t.getChannels(),i=e.createTextureInfoDef(n,o);return qe.eq(r,[0])||(i.channels=r),t.getOffset()!=null&&(i.offset=t.getOffset()),t.getScale()!=null&&(i.scale=t.getScale()),t.getMax()!=null&&(i.max=t.getMax()),t.getMin()!=null&&(i.min=t.getMin()),i}function X_(e,t){let n=e.jsonDoc,o=n.json.buffers||[],r=(n.json.bufferViews||[])[t],i=o[r.buffer],s=i.uri?n.resources[i.uri]:n.resources[Jr],a=r.byteOffset||0,c=r.byteLength;return s.slice(a,a+c)}function $k(e,t){let n=e.getRoot().listBuffers()[0],o=t.otherBufferViews.get(n);return o||(o=[],t.otherBufferViews.set(n,o)),o}var xk=class{match(e){return e.length>=12&&$e.decodeText(e.slice(4,12))==="ftypavif"}getSize(e){if(!this.match(e))return null;let t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=$T(t,0);if(!n)return null;let o=n.end;for(;n=$T(t,o);)if(n.type==="meta")o=n.start+4;else if(n.type==="iprp"||n.type==="ipco")o=n.start;else {if(n.type==="ispe")return [t.getUint32(n.start+4),t.getUint32(n.start+8)];if(n.type==="mdat")break;o=n.end;}return null}getChannels(e){return 4}},wk=class extends Ae{extensionName=Sd;prereadTypes=[ee.TEXTURE];static EXTENSION_NAME=Sd;static register(){Qt.registerFormat("image/avif",new xk);}preread(e){return (e.jsonDoc.json.textures||[]).forEach(t=>{t.extensions&&t.extensions.EXT_texture_avif&&(t.source=t.extensions[Sd].source);}),this}read(e){return this}write(e){let t=e.jsonDoc;return this.document.getRoot().listTextures().forEach(n=>{if(n.getMimeType()==="image/avif"){let o=e.imageIndexMap.get(n);(t.json.textures||[]).forEach(r=>{r.source===o&&(r.extensions=r.extensions||{},r.extensions[Sd]={source:r.source},delete r.source);});}}),this}};function $T(e,t){if(e.byteLength<4+t)return null;let n=e.getUint32(t);return e.byteLength<n+t||n<8?null:{type:$e.decodeText(new Uint8Array(e.buffer,e.byteOffset+t+4,4)),start:t+8,end:t+n}}var Ek=class{match(e){return e.length>=12&&e[8]===87&&e[9]===69&&e[10]===66&&e[11]===80}getSize(e){let t=$e.decodeText(e.slice(0,4)),n=$e.decodeText(e.slice(8,12));if(t!=="RIFF"||n!=="WEBP")return null;let o=new DataView(e.buffer,e.byteOffset),r=12;for(;r<o.byteLength;){let i=$e.decodeText(new Uint8Array([o.getUint8(r),o.getUint8(r+1),o.getUint8(r+2),o.getUint8(r+3)])),s=o.getUint32(r+4,true);if(i==="VP8 ")return [o.getInt16(r+14,true)&16383,o.getInt16(r+16,true)&16383];if(i==="VP8L"){let a=o.getUint8(r+9),c=o.getUint8(r+10),u=o.getUint8(r+11),l=o.getUint8(r+12);return [1+((c&63)<<8|a),1+((l&15)<<10|u<<2|(c&192)>>6)]}r+=8+s+s%2;}return null}getChannels(e){return 4}},Ik=class extends Ae{extensionName=yd;prereadTypes=[ee.TEXTURE];static EXTENSION_NAME=yd;static register(){Qt.registerFormat("image/webp",new Ek);}preread(e){return (e.jsonDoc.json.textures||[]).forEach(t=>{t.extensions&&t.extensions.EXT_texture_webp&&(t.source=t.extensions[yd].source);}),this}read(e){return this}write(e){let t=e.jsonDoc;return this.document.getRoot().listTextures().forEach(n=>{if(n.getMimeType()==="image/webp"){let o=e.imageIndexMap.get(n);(t.json.textures||[]).forEach(r=>{r.source===o&&(r.extensions=r.extensions||{},r.extensions[yd]={source:r.source},delete r.source);});}}),this}},xT=_O,zk=class extends Ae{extensionName=xT;static EXTENSION_NAME=xT;read(e){return this}write(e){return this}},wT=vO,Ok=class extends Ae{extensionName=wT;static EXTENSION_NAME=wT;read(e){return this}write(e){return this}},rt,LT,FT;function kk(e,t){let n=new rt.DecoderBuffer;try{if(n.Init(t,t.length),e.GetEncodedGeometryType(n)!==rt.TRIANGULAR_MESH)throw new Error(`[${Je}] Unknown geometry type.`);let o=new rt.Mesh;if(!e.DecodeBufferToMesh(n,o).ok()||o.ptr===0)throw new Error(`[${Je}] Decoding failure.`);return o}finally{rt.destroy(n);}}function Nk(e,t){let n=t.num_faces()*3,o,r;if(t.num_points()<=65534){let i=n*Uint16Array.BYTES_PER_ELEMENT;o=rt._malloc(i),e.GetTrianglesUInt16Array(t,i,o),r=new Uint16Array(rt.HEAPU16.buffer,o,n).slice();}else {let i=n*Uint32Array.BYTES_PER_ELEMENT;o=rt._malloc(i),e.GetTrianglesUInt32Array(t,i,o),r=new Uint32Array(rt.HEAPU32.buffer,o,n).slice();}return rt._free(o),r}function Pk(e,t,n,o){let r=FT[o.componentType],i=LT[o.componentType],s=n.num_components(),a=t.num_points()*s,c=a*i.BYTES_PER_ELEMENT,u=rt._malloc(c);e.GetAttributeDataArrayForAllPoints(t,n,r,c,u);let l=new i(rt.HEAPF32.buffer,u,a).slice();return rt._free(u),l}function Ak(e){rt=e,LT={[me.ComponentType.FLOAT]:Float32Array,[me.ComponentType.UNSIGNED_INT]:Uint32Array,[me.ComponentType.UNSIGNED_SHORT]:Uint16Array,[me.ComponentType.UNSIGNED_BYTE]:Uint8Array,[me.ComponentType.SHORT]:Int16Array,[me.ComponentType.BYTE]:Int8Array},FT={[me.ComponentType.FLOAT]:rt.DT_FLOAT32,[me.ComponentType.UNSIGNED_INT]:rt.DT_UINT32,[me.ComponentType.UNSIGNED_SHORT]:rt.DT_UINT16,[me.ComponentType.UNSIGNED_BYTE]:rt.DT_UINT8,[me.ComponentType.SHORT]:rt.DT_INT16,[me.ComponentType.BYTE]:rt.DT_INT8};}var Mt,Ck=(function(e){return e[e.EDGEBREAKER=1]="EDGEBREAKER",e[e.SEQUENTIAL=0]="SEQUENTIAL",e})({}),qT={POSITION:14,NORMAL:10,COLOR:8,TEX_COORD:12,GENERIC:12},ET={decodeSpeed:5,encodeSpeed:5,method:1,quantizationBits:qT,quantizationVolume:"mesh"};function Mk(e){Mt=e;}function jk(e,t=ET){let n={...ET,...t};n.quantizationBits={...qT,...t.quantizationBits};let o=new Mt.MeshBuilder,r=new Mt.Mesh,i=new Mt.ExpertEncoder(r),s={},a=new Mt.DracoInt8Array,c=e.listTargets().length>0,u=false;for(let p of e.listSemantics()){let S=e.getAttribute(p);if(S.getSparse()){u=true;continue}let d=Dk(p),_=Uk(o,S.getComponentType(),r,Mt[d],S.getCount(),S.getElementSize(),S.getArray());if(_===-1)throw new Error(`Error compressing "${p}" attribute.`);if(s[p]=_,n.quantizationVolume==="mesh"||p!=="POSITION")i.SetAttributeQuantization(_,n.quantizationBits[d]);else if(typeof n.quantizationVolume=="object"){let{quantizationVolume:f}=n,v=Math.max(f.max[0]-f.min[0],f.max[1]-f.min[1],f.max[2]-f.min[2]);i.SetAttributeExplicitQuantization(_,n.quantizationBits[d],S.getElementSize(),f.min,v);}else throw new Error("Invalid quantization volume state.")}let l=e.getIndices();if(!l)throw new ev("Primitive must have indices.");o.AddFacesToMesh(r,l.getCount()/3,l.getArray()),i.SetSpeedOptions(n.encodeSpeed,n.decodeSpeed),i.SetTrackEncodedProperties(true),n.method===0||c||u?i.SetEncodingMethod(Mt.MESH_SEQUENTIAL_ENCODING):i.SetEncodingMethod(Mt.MESH_EDGEBREAKER_ENCODING);let m=i.EncodeToDracoBuffer(!(c||u),a);if(m<=0)throw new ev("Error applying Draco compression.");let h=new Uint8Array(m);for(let p=0;p<m;++p)h[p]=a.GetValue(p);let y=i.GetNumberOfEncodedPoints(),b=i.GetNumberOfEncodedFaces()*3;return Mt.destroy(a),Mt.destroy(r),Mt.destroy(o),Mt.destroy(i),{numVertices:y,numIndices:b,data:h,attributeIDs:s}}function Dk(e){return e==="POSITION"?"POSITION":e==="NORMAL"?"NORMAL":e.startsWith("COLOR_")?"COLOR":e.startsWith("TEXCOORD_")?"TEX_COORD":"GENERIC"}function Uk(e,t,n,o,r,i,s){switch(t){case me.ComponentType.UNSIGNED_BYTE:return e.AddUInt8Attribute(n,o,r,i,s);case me.ComponentType.BYTE:return e.AddInt8Attribute(n,o,r,i,s);case me.ComponentType.UNSIGNED_SHORT:return e.AddUInt16Attribute(n,o,r,i,s);case me.ComponentType.SHORT:return e.AddInt16Attribute(n,o,r,i,s);case me.ComponentType.UNSIGNED_INT:return e.AddUInt32Attribute(n,o,r,i,s);case me.ComponentType.FLOAT:return e.AddFloatAttribute(n,o,r,i,s);default:throw new Error(`Unexpected component type, "${t}".`)}}var ev=class extends Error{},Lk=class extends Ae{extensionName=Je;prereadTypes=[ee.PRIMITIVE];prewriteTypes=[ee.ACCESSOR];readDependencies=["draco3d.decoder"];writeDependencies=["draco3d.encoder"];static EXTENSION_NAME=Je;static EncoderMethod=Ck;_decoderModule=null;_encoderModule=null;_encoderOptions={};install(e,t){return e==="draco3d.decoder"&&(this._decoderModule=t,Ak(this._decoderModule)),e==="draco3d.encoder"&&(this._encoderModule=t,Mk(this._encoderModule)),this}setEncoderOptions(e){return this._encoderOptions=e,this}preread(e){if(!this._decoderModule)throw new Error(`[${Je}] Please install extension dependency, "draco3d.decoder".`);let t=this.document.getLogger(),n=e.jsonDoc,o=new Map;try{let r=n.json.meshes||[];for(let i of r)for(let s of i.primitives){if(!s.extensions||!s.extensions.KHR_draco_mesh_compression)continue;let a=s.extensions[Je],[c,u]=o.get(a.bufferView)||[];if(!u||!c){let l=n.json.bufferViews[a.bufferView],m=n.json.buffers[l.buffer],h=m.uri?n.resources[m.uri]:n.resources[Jr],y=l.byteOffset||0,b=l.byteLength,p=$e.toView(h,y,b);c=new this._decoderModule.Decoder,u=kk(c,p),o.set(a.bufferView,[c,u]),t.debug(`[${Je}] Decompressed ${p.byteLength} bytes.`);}for(let l in a.attributes){let m=e.jsonDoc.json.accessors[s.attributes[l]],h=c.GetAttributeByUniqueId(u,a.attributes[l]),y=Pk(c,u,h,m);e.accessors[s.attributes[l]].setArray(y);}s.indices!==void 0&&e.accessors[s.indices].setArray(Nk(c,u));}}finally{for(let[r,i]of Array.from(o.values()))this._decoderModule.destroy(r),this._decoderModule.destroy(i);}return this}read(e){return this}prewrite(e,t){if(!this._encoderModule)throw new Error(`[${Je}] Please install extension dependency, "draco3d.encoder".`);let n=this.document.getLogger();n.debug(`[${Je}] Compression options: ${JSON.stringify(this._encoderOptions)}`);let o=Fk(this.document),r=new Map,i="mesh";this._encoderOptions.quantizationVolume==="scene"&&(this.document.getRoot().listScenes().length!==1?n.warn(`[${Je}]: quantizationVolume=scene requires exactly 1 scene.`):i=tT(this.document.getRoot().listScenes().pop()));for(let s of Array.from(o.keys())){let a=o.get(s);if(!a)throw new Error("Unexpected primitive.");if(r.has(a)){r.set(a,r.get(a));continue}let c=s.getIndices(),u=e.jsonDoc.json.accessors,l;try{l=jk(s,{...this._encoderOptions,quantizationVolume:i});}catch(y){if(y instanceof ev){n.warn(`[${Je}]: ${y.message} Skipping primitive compression.`);continue}throw y}r.set(a,l);let m=e.createAccessorDef(c);m.count=l.numIndices,e.accessorIndexMap.set(c,u.length),u.push(m),l.numVertices>65534&&me.getComponentSize(m.componentType)<=2?m.componentType=me.ComponentType.UNSIGNED_INT:l.numVertices>254&&me.getComponentSize(m.componentType)<=1&&(m.componentType=me.ComponentType.UNSIGNED_SHORT);for(let y of s.listSemantics()){let b=s.getAttribute(y);if(l.attributeIDs[y]===void 0)continue;let p=e.createAccessorDef(b);p.count=l.numVertices,e.accessorIndexMap.set(b,u.length),u.push(p);}let h=s.getAttribute("POSITION").getBuffer()||this.document.getRoot().listBuffers()[0];e.otherBufferViews.has(h)||e.otherBufferViews.set(h,[]),e.otherBufferViews.get(h).push(l.data);}return n.debug(`[${Je}] Compressed ${o.size} primitives.`),e.extensionData[Je]={primitiveHashMap:o,primitiveEncodingMap:r},this}write(e){let t=e.extensionData[Je];for(let n of this.document.getRoot().listMeshes()){let o=e.jsonDoc.json.meshes[e.meshIndexMap.get(n)];for(let r=0;r<n.listPrimitives().length;r++){let i=n.listPrimitives()[r],s=o.primitives[r],a=t.primitiveHashMap.get(i);if(!a)continue;let c=t.primitiveEncodingMap.get(a);c&&(s.extensions=s.extensions||{},s.extensions[Je]={bufferView:e.otherBufferViewsIndexMap.get(c.data),attributes:c.attributeIDs});}}if(!t.primitiveHashMap.size){let n=e.jsonDoc.json;n.extensionsUsed=(n.extensionsUsed||[]).filter(o=>o!==Je),n.extensionsRequired=(n.extensionsRequired||[]).filter(o=>o!==Je);}return this}};function Fk(e){let t=e.getLogger(),n=new Set,o=new Set,r=0,i=0;for(let m of e.getRoot().listMeshes())for(let h of m.listPrimitives())h.getIndices()?h.getMode()!==Bs.Mode.TRIANGLES?(o.add(h),i++):n.add(h):(o.add(h),r++);r>0&&t.warn(`[${Je}] Skipping Draco compression of ${r} non-indexed primitives.`),i>0&&t.warn(`[${Je}] Skipping Draco compression of ${i} non-TRIANGLES primitives.`);let s=e.getRoot().listAccessors(),a=new Map;for(let m=0;m<s.length;m++)a.set(s[m],m);let c=new Map,u=new Set,l=new Map;for(let m of Array.from(n)){let h=IT(m,a);if(u.has(h)){l.set(m,h);continue}if(c.has(m.getIndices())){let y=m.getIndices(),b=y.clone();a.set(b,e.getRoot().listAccessors().length-1),m.swap(y,b);}for(let y of m.listAttributes())if(c.has(y)){let b=y.clone();a.set(b,e.getRoot().listAccessors().length-1),m.swap(y,b);}h=IT(m,a),u.add(h),l.set(m,h),c.set(m.getIndices(),h);for(let y of m.listAttributes())c.set(y,h);}for(let m of Array.from(c.keys())){let h=new Set(m.listParents().map(y=>y.propertyType));if(h.size!==2||!h.has(ee.PRIMITIVE)||!h.has(ee.ROOT))throw new Error(`[${Je}] Compressed accessors must only be used as indices or vertex attributes.`)}for(let m of Array.from(n)){let h=l.get(m),y=m.getIndices();if(c.get(y)!==h||m.listAttributes().some(b=>c.get(b)!==h))throw new Error(`[${Je}] Draco primitives must share all, or no, accessors.`)}for(let m of Array.from(o)){let h=m.getIndices();if(c.has(h)||m.listAttributes().some(y=>c.has(y)))throw new Error(`[${Je}] Accessor cannot be shared by compressed and uncompressed primitives.`)}return l}function IT(e,t){let n=[],o=e.getIndices();n.push(t.get(o));for(let r of e.listAttributes())n.push(t.get(r));return n.sort().join("|")}var zT=class VT extends ze{static EXTENSION_NAME=fr;static Type={POINT:"point",SPOT:"spot",DIRECTIONAL:"directional"};init(){this.extensionName=fr,this.propertyType="Light",this.parentTypes=[ee.NODE];}getDefaults(){return Object.assign(super.getDefaults(),{color:[1,1,1],intensity:1,type:VT.Type.POINT,range:null,innerConeAngle:0,outerConeAngle:Math.PI/4})}getColor(){return this.get("color")}setColor(t){return this.set("color",t)}getIntensity(){return this.get("intensity")}setIntensity(t){return this.set("intensity",t)}getType(){return this.get("type")}setType(t){return this.set("type",t)}getRange(){return this.get("range")}setRange(t){return this.set("range",t)}getInnerConeAngle(){return this.get("innerConeAngle")}setInnerConeAngle(t){return this.set("innerConeAngle",t)}getOuterConeAngle(){return this.get("outerConeAngle")}setOuterConeAngle(t){return this.set("outerConeAngle",t)}},qk=class extends Ae{extensionName=fr;static EXTENSION_NAME=fr;createLight(e=""){return new zT(this.document.getGraph(),e)}read(e){let t=e.jsonDoc;if(!t.json.extensions||!t.json.extensions.KHR_lights_punctual)return this;let n=(t.json.extensions.KHR_lights_punctual.lights||[]).map(o=>{let r=this.createLight().setName(o.name||"").setType(o.type);return o.extras&&r.setExtras(o.extras),o.color!==void 0&&r.setColor(o.color),o.intensity!==void 0&&r.setIntensity(o.intensity),o.range!==void 0&&r.setRange(o.range),o.spot?.innerConeAngle!==void 0&&r.setInnerConeAngle(o.spot.innerConeAngle),o.spot?.outerConeAngle!==void 0&&r.setOuterConeAngle(o.spot.outerConeAngle),r});return t.json.nodes.forEach((o,r)=>{if(!o.extensions||!o.extensions.KHR_lights_punctual)return;let i=o.extensions[fr];e.nodes[r].setExtension(fr,n[i.light]);}),this}write(e){let t=e.jsonDoc;if(this.properties.size===0)return this;let n=[],o=new Map;for(let r of this.properties){let i=r,s=e.createPropertyDef(r);s.type=i.getType(),qe.eq(i.getColor(),[1,1,1])||(s.color=i.getColor()),i.getIntensity()!==1&&(s.intensity=i.getIntensity()),i.getRange()!=null&&(s.range=i.getRange()),i.getName()&&(s.name=i.getName()),i.getType()===zT.Type.SPOT&&(s.spot={innerConeAngle:i.getInnerConeAngle(),outerConeAngle:i.getOuterConeAngle()}),n.push(s),o.set(i,n.length-1);}return this.document.getRoot().listNodes().forEach(r=>{let i=r.getExtension(fr);if(i){let s=e.nodeIndexMap.get(r),a=t.json.nodes[s];a.extensions=a.extensions||{},a.extensions[fr]={light:o.get(i)};}}),t.json.extensions=t.json.extensions||{},t.json.extensions[fr]={lights:n},this}},{R:Vk,G:Bk,B:Kk}=Kt,Gk=class extends ze{static EXTENSION_NAME=Yr;init(){this.extensionName=Yr,this.propertyType="Anisotropy",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{anisotropyStrength:0,anisotropyRotation:0,anisotropyTexture:null,anisotropyTextureInfo:new Le(this.graph,"anisotropyTextureInfo")})}getAnisotropyStrength(){return this.get("anisotropyStrength")}setAnisotropyStrength(e){return this.set("anisotropyStrength",e)}getAnisotropyRotation(){return this.get("anisotropyRotation")}setAnisotropyRotation(e){return this.set("anisotropyRotation",e)}getAnisotropyTexture(){return this.getRef("anisotropyTexture")}getAnisotropyTextureInfo(){return this.getRef("anisotropyTexture")?this.getRef("anisotropyTextureInfo"):null}setAnisotropyTexture(e){return this.setRef("anisotropyTexture",e,{channels:Vk|Bk|Kk})}},Hk=class extends Ae{static EXTENSION_NAME=Yr;extensionName=Yr;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createAnisotropy(){return new Gk(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){let t=e.jsonDoc,n=t.json.materials||[],o=t.json.textures||[];return n.forEach((r,i)=>{if(r.extensions&&r.extensions.KHR_materials_anisotropy){let s=this.createAnisotropy();e.materials[i].setExtension(Yr,s);let a=r.extensions[Yr];if(a.extras&&s.setExtras(a.extras),a.anisotropyStrength!==void 0&&s.setAnisotropyStrength(a.anisotropyStrength),a.anisotropyRotation!==void 0&&s.setAnisotropyRotation(a.anisotropyRotation),a.anisotropyTexture!==void 0){let c=a.anisotropyTexture,u=e.textures[o[c.index].source];s.setAnisotropyTexture(u),e.setTextureInfo(s.getAnisotropyTextureInfo(),c);}}}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{let o=n.getExtension(Yr);if(o){let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);if(i.extensions=i.extensions||{},i.extensions[Yr]=s,o.getAnisotropyStrength()>0&&(s.anisotropyStrength=o.getAnisotropyStrength()),o.getAnisotropyRotation()!==0&&(s.anisotropyRotation=o.getAnisotropyRotation()),o.getAnisotropyTexture()){let a=o.getAnisotropyTexture(),c=o.getAnisotropyTextureInfo();s.anisotropyTexture=e.createTextureInfoDef(a,c);}}}),this}},{R:OT,G:kT,B:Zk}=Kt,Jk=class extends ze{static EXTENSION_NAME=Qr;init(){this.extensionName=Qr,this.propertyType="Clearcoat",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{clearcoatFactor:0,clearcoatTexture:null,clearcoatTextureInfo:new Le(this.graph,"clearcoatTextureInfo"),clearcoatRoughnessFactor:0,clearcoatRoughnessTexture:null,clearcoatRoughnessTextureInfo:new Le(this.graph,"clearcoatRoughnessTextureInfo"),clearcoatNormalScale:1,clearcoatNormalTexture:null,clearcoatNormalTextureInfo:new Le(this.graph,"clearcoatNormalTextureInfo")})}getClearcoatFactor(){return this.get("clearcoatFactor")}setClearcoatFactor(e){return this.set("clearcoatFactor",e)}getClearcoatTexture(){return this.getRef("clearcoatTexture")}getClearcoatTextureInfo(){return this.getRef("clearcoatTexture")?this.getRef("clearcoatTextureInfo"):null}setClearcoatTexture(e){return this.setRef("clearcoatTexture",e,{channels:OT})}getClearcoatRoughnessFactor(){return this.get("clearcoatRoughnessFactor")}setClearcoatRoughnessFactor(e){return this.set("clearcoatRoughnessFactor",e)}getClearcoatRoughnessTexture(){return this.getRef("clearcoatRoughnessTexture")}getClearcoatRoughnessTextureInfo(){return this.getRef("clearcoatRoughnessTexture")?this.getRef("clearcoatRoughnessTextureInfo"):null}setClearcoatRoughnessTexture(e){return this.setRef("clearcoatRoughnessTexture",e,{channels:kT})}getClearcoatNormalScale(){return this.get("clearcoatNormalScale")}setClearcoatNormalScale(e){return this.set("clearcoatNormalScale",e)}getClearcoatNormalTexture(){return this.getRef("clearcoatNormalTexture")}getClearcoatNormalTextureInfo(){return this.getRef("clearcoatNormalTexture")?this.getRef("clearcoatNormalTextureInfo"):null}setClearcoatNormalTexture(e){return this.setRef("clearcoatNormalTexture",e,{channels:OT|kT|Zk})}},Xk=class extends Ae{static EXTENSION_NAME=Qr;extensionName=Qr;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createClearcoat(){return new Jk(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){let t=e.jsonDoc,n=t.json.materials||[],o=t.json.textures||[];return n.forEach((r,i)=>{if(r.extensions&&r.extensions.KHR_materials_clearcoat){let s=this.createClearcoat();e.materials[i].setExtension(Qr,s);let a=r.extensions[Qr];if(a.extras&&s.setExtras(a.extras),a.clearcoatFactor!==void 0&&s.setClearcoatFactor(a.clearcoatFactor),a.clearcoatRoughnessFactor!==void 0&&s.setClearcoatRoughnessFactor(a.clearcoatRoughnessFactor),a.clearcoatTexture!==void 0){let c=a.clearcoatTexture,u=e.textures[o[c.index].source];s.setClearcoatTexture(u),e.setTextureInfo(s.getClearcoatTextureInfo(),c);}if(a.clearcoatRoughnessTexture!==void 0){let c=a.clearcoatRoughnessTexture,u=e.textures[o[c.index].source];s.setClearcoatRoughnessTexture(u),e.setTextureInfo(s.getClearcoatRoughnessTextureInfo(),c);}if(a.clearcoatNormalTexture!==void 0){let c=a.clearcoatNormalTexture,u=e.textures[o[c.index].source];s.setClearcoatNormalTexture(u),e.setTextureInfo(s.getClearcoatNormalTextureInfo(),c),c.scale!==void 0&&s.setClearcoatNormalScale(c.scale);}}}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{let o=n.getExtension(Qr);if(o){let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);if(i.extensions=i.extensions||{},i.extensions[Qr]=s,s.clearcoatFactor=o.getClearcoatFactor(),s.clearcoatRoughnessFactor=o.getClearcoatRoughnessFactor(),o.getClearcoatTexture()){let a=o.getClearcoatTexture(),c=o.getClearcoatTextureInfo();s.clearcoatTexture=e.createTextureInfoDef(a,c);}if(o.getClearcoatRoughnessTexture()){let a=o.getClearcoatRoughnessTexture(),c=o.getClearcoatRoughnessTextureInfo();s.clearcoatRoughnessTexture=e.createTextureInfoDef(a,c);}if(o.getClearcoatNormalTexture()){let a=o.getClearcoatNormalTexture(),c=o.getClearcoatNormalTextureInfo();s.clearcoatNormalTexture=e.createTextureInfoDef(a,c),o.getClearcoatNormalScale()!==1&&(s.clearcoatNormalTexture.scale=o.getClearcoatNormalScale());}}}),this}},{R:Wk,G:Yk,B:Qk,A:eN}=Kt,tN=class extends ze{static EXTENSION_NAME=en;init(){this.extensionName=en,this.propertyType="DiffuseTransmission",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{diffuseTransmissionFactor:0,diffuseTransmissionTexture:null,diffuseTransmissionTextureInfo:new Le(this.graph,"diffuseTransmissionTextureInfo"),diffuseTransmissionColorFactor:[1,1,1],diffuseTransmissionColorTexture:null,diffuseTransmissionColorTextureInfo:new Le(this.graph,"diffuseTransmissionColorTextureInfo")})}getDiffuseTransmissionFactor(){return this.get("diffuseTransmissionFactor")}setDiffuseTransmissionFactor(e){return this.set("diffuseTransmissionFactor",e)}getDiffuseTransmissionTexture(){return this.getRef("diffuseTransmissionTexture")}getDiffuseTransmissionTextureInfo(){return this.getRef("diffuseTransmissionTexture")?this.getRef("diffuseTransmissionTextureInfo"):null}setDiffuseTransmissionTexture(e){return this.setRef("diffuseTransmissionTexture",e,{channels:eN})}getDiffuseTransmissionColorFactor(){return this.get("diffuseTransmissionColorFactor")}setDiffuseTransmissionColorFactor(e){return this.set("diffuseTransmissionColorFactor",e)}getDiffuseTransmissionColorTexture(){return this.getRef("diffuseTransmissionColorTexture")}getDiffuseTransmissionColorTextureInfo(){return this.getRef("diffuseTransmissionColorTexture")?this.getRef("diffuseTransmissionColorTextureInfo"):null}setDiffuseTransmissionColorTexture(e){return this.setRef("diffuseTransmissionColorTexture",e,{channels:Wk|Yk|Qk})}},rN=class extends Ae{extensionName=en;static EXTENSION_NAME=en;createDiffuseTransmission(){return new tN(this.document.getGraph())}read(e){let t=e.jsonDoc,n=t.json.materials||[],o=t.json.textures||[];return n.forEach((r,i)=>{if(r.extensions&&r.extensions.KHR_materials_diffuse_transmission){let s=this.createDiffuseTransmission();e.materials[i].setExtension(en,s);let a=r.extensions[en];if(a.extras&&s.setExtras(a.extras),a.diffuseTransmissionFactor!==void 0&&s.setDiffuseTransmissionFactor(a.diffuseTransmissionFactor),a.diffuseTransmissionColorFactor!==void 0&&s.setDiffuseTransmissionColorFactor(a.diffuseTransmissionColorFactor),a.diffuseTransmissionTexture!==void 0){let c=a.diffuseTransmissionTexture,u=e.textures[o[c.index].source];s.setDiffuseTransmissionTexture(u),e.setTextureInfo(s.getDiffuseTransmissionTextureInfo(),c);}if(a.diffuseTransmissionColorTexture!==void 0){let c=a.diffuseTransmissionColorTexture,u=e.textures[o[c.index].source];s.setDiffuseTransmissionColorTexture(u),e.setTextureInfo(s.getDiffuseTransmissionColorTextureInfo(),c);}}}),this}write(e){let t=e.jsonDoc;for(let n of this.document.getRoot().listMaterials()){let o=n.getExtension(en);if(!o)continue;let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);if(i.extensions=i.extensions||{},i.extensions[en]=s,s.diffuseTransmissionFactor=o.getDiffuseTransmissionFactor(),s.diffuseTransmissionColorFactor=o.getDiffuseTransmissionColorFactor(),o.getDiffuseTransmissionTexture()){let a=o.getDiffuseTransmissionTexture(),c=o.getDiffuseTransmissionTextureInfo();s.diffuseTransmissionTexture=e.createTextureInfoDef(a,c);}if(o.getDiffuseTransmissionColorTexture()){let a=o.getDiffuseTransmissionColorTexture(),c=o.getDiffuseTransmissionColorTextureInfo();s.diffuseTransmissionColorTexture=e.createTextureInfoDef(a,c);}}return this}},nN=class extends ze{static EXTENSION_NAME=tn;init(){this.extensionName=tn,this.propertyType="Dispersion",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{dispersion:0})}getDispersion(){return this.get("dispersion")}setDispersion(e){return this.set("dispersion",e)}},oN=class extends Ae{static EXTENSION_NAME=tn;extensionName=tn;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createDispersion(){return new nN(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){return (e.jsonDoc.json.materials||[]).forEach((t,n)=>{if(t.extensions&&t.extensions.KHR_materials_dispersion){let o=this.createDispersion();e.materials[n].setExtension(tn,o);let r=t.extensions[tn];r.extras&&o.setExtras(r.extras),r.dispersion!==void 0&&o.setDispersion(r.dispersion);}}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{let o=n.getExtension(tn);if(o){let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);i.extensions=i.extensions||{},i.extensions[tn]=s,s.dispersion=o.getDispersion();}}),this}},iN=class extends ze{static EXTENSION_NAME=rn;init(){this.extensionName=rn,this.propertyType="EmissiveStrength",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{emissiveStrength:1})}getEmissiveStrength(){return this.get("emissiveStrength")}setEmissiveStrength(e){return this.set("emissiveStrength",e)}},sN=class extends Ae{static EXTENSION_NAME=rn;extensionName=rn;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createEmissiveStrength(){return new iN(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){return (e.jsonDoc.json.materials||[]).forEach((t,n)=>{if(t.extensions&&t.extensions.KHR_materials_emissive_strength){let o=this.createEmissiveStrength();e.materials[n].setExtension(rn,o);let r=t.extensions[rn];r.extras&&o.setExtras(r.extras),r.emissiveStrength!==void 0&&o.setEmissiveStrength(r.emissiveStrength);}}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{let o=n.getExtension(rn);if(o){let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);i.extensions=i.extensions||{},i.extensions[rn]=s,s.emissiveStrength=o.getEmissiveStrength();}}),this}},aN=class extends ze{static EXTENSION_NAME=nn;init(){this.extensionName=nn,this.propertyType="IOR",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{ior:1.5})}getIOR(){return this.get("ior")}setIOR(e){return this.set("ior",e)}},cN=class extends Ae{static EXTENSION_NAME=nn;extensionName=nn;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createIOR(){return new aN(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){return (e.jsonDoc.json.materials||[]).forEach((t,n)=>{if(t.extensions&&t.extensions.KHR_materials_ior){let o=this.createIOR();e.materials[n].setExtension(nn,o);let r=t.extensions[nn];r.extras&&o.setExtras(r.extras),r.ior!==void 0&&o.setIOR(r.ior);}}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{let o=n.getExtension(nn);if(o){let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);i.extensions=i.extensions||{},i.extensions[nn]=s,s.ior=o.getIOR();}}),this}},{R:uN,G:lN}=Kt,dN=class extends ze{static EXTENSION_NAME=on;init(){this.extensionName=on,this.propertyType="Iridescence",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{iridescenceFactor:0,iridescenceTexture:null,iridescenceTextureInfo:new Le(this.graph,"iridescenceTextureInfo"),iridescenceIOR:1.3,iridescenceThicknessMinimum:100,iridescenceThicknessMaximum:400,iridescenceThicknessTexture:null,iridescenceThicknessTextureInfo:new Le(this.graph,"iridescenceThicknessTextureInfo")})}getIridescenceFactor(){return this.get("iridescenceFactor")}setIridescenceFactor(e){return this.set("iridescenceFactor",e)}getIridescenceTexture(){return this.getRef("iridescenceTexture")}getIridescenceTextureInfo(){return this.getRef("iridescenceTexture")?this.getRef("iridescenceTextureInfo"):null}setIridescenceTexture(e){return this.setRef("iridescenceTexture",e,{channels:uN})}getIridescenceIOR(){return this.get("iridescenceIOR")}setIridescenceIOR(e){return this.set("iridescenceIOR",e)}getIridescenceThicknessMinimum(){return this.get("iridescenceThicknessMinimum")}setIridescenceThicknessMinimum(e){return this.set("iridescenceThicknessMinimum",e)}getIridescenceThicknessMaximum(){return this.get("iridescenceThicknessMaximum")}setIridescenceThicknessMaximum(e){return this.set("iridescenceThicknessMaximum",e)}getIridescenceThicknessTexture(){return this.getRef("iridescenceThicknessTexture")}getIridescenceThicknessTextureInfo(){return this.getRef("iridescenceThicknessTexture")?this.getRef("iridescenceThicknessTextureInfo"):null}setIridescenceThicknessTexture(e){return this.setRef("iridescenceThicknessTexture",e,{channels:lN})}},mN=class extends Ae{static EXTENSION_NAME=on;extensionName=on;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createIridescence(){return new dN(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){let t=e.jsonDoc,n=t.json.materials||[],o=t.json.textures||[];return n.forEach((r,i)=>{if(r.extensions&&r.extensions.KHR_materials_iridescence){let s=this.createIridescence();e.materials[i].setExtension(on,s);let a=r.extensions[on];if(a.extras&&s.setExtras(a.extras),a.iridescenceFactor!==void 0&&s.setIridescenceFactor(a.iridescenceFactor),a.iridescenceIor!==void 0&&s.setIridescenceIOR(a.iridescenceIor),a.iridescenceThicknessMinimum!==void 0&&s.setIridescenceThicknessMinimum(a.iridescenceThicknessMinimum),a.iridescenceThicknessMaximum!==void 0&&s.setIridescenceThicknessMaximum(a.iridescenceThicknessMaximum),a.iridescenceTexture!==void 0){let c=a.iridescenceTexture,u=e.textures[o[c.index].source];s.setIridescenceTexture(u),e.setTextureInfo(s.getIridescenceTextureInfo(),c);}if(a.iridescenceThicknessTexture!==void 0){let c=a.iridescenceThicknessTexture,u=e.textures[o[c.index].source];s.setIridescenceThicknessTexture(u),e.setTextureInfo(s.getIridescenceThicknessTextureInfo(),c);}}}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{let o=n.getExtension(on);if(o){let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);if(i.extensions=i.extensions||{},i.extensions[on]=s,o.getIridescenceFactor()>0&&(s.iridescenceFactor=o.getIridescenceFactor()),o.getIridescenceIOR()!==1.3&&(s.iridescenceIor=o.getIridescenceIOR()),o.getIridescenceThicknessMinimum()!==100&&(s.iridescenceThicknessMinimum=o.getIridescenceThicknessMinimum()),o.getIridescenceThicknessMaximum()!==400&&(s.iridescenceThicknessMaximum=o.getIridescenceThicknessMaximum()),o.getIridescenceTexture()){let a=o.getIridescenceTexture(),c=o.getIridescenceTextureInfo();s.iridescenceTexture=e.createTextureInfoDef(a,c);}if(o.getIridescenceThicknessTexture()){let a=o.getIridescenceThicknessTexture(),c=o.getIridescenceThicknessTextureInfo();s.iridescenceThicknessTexture=e.createTextureInfoDef(a,c);}}}),this}},{R:NT,G:PT,B:AT,A:CT}=Kt,pN=class extends ze{static EXTENSION_NAME=sn;init(){this.extensionName=sn,this.propertyType="PBRSpecularGlossiness",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{diffuseFactor:[1,1,1,1],diffuseTexture:null,diffuseTextureInfo:new Le(this.graph,"diffuseTextureInfo"),specularFactor:[1,1,1],glossinessFactor:1,specularGlossinessTexture:null,specularGlossinessTextureInfo:new Le(this.graph,"specularGlossinessTextureInfo")})}getDiffuseFactor(){return this.get("diffuseFactor")}setDiffuseFactor(e){return this.set("diffuseFactor",e)}getDiffuseTexture(){return this.getRef("diffuseTexture")}getDiffuseTextureInfo(){return this.getRef("diffuseTexture")?this.getRef("diffuseTextureInfo"):null}setDiffuseTexture(e){return this.setRef("diffuseTexture",e,{channels:NT|PT|AT|CT,isColor:true})}getSpecularFactor(){return this.get("specularFactor")}setSpecularFactor(e){return this.set("specularFactor",e)}getGlossinessFactor(){return this.get("glossinessFactor")}setGlossinessFactor(e){return this.set("glossinessFactor",e)}getSpecularGlossinessTexture(){return this.getRef("specularGlossinessTexture")}getSpecularGlossinessTextureInfo(){return this.getRef("specularGlossinessTexture")?this.getRef("specularGlossinessTextureInfo"):null}setSpecularGlossinessTexture(e){return this.setRef("specularGlossinessTexture",e,{channels:NT|PT|AT|CT})}},fN=class extends Ae{static EXTENSION_NAME=sn;extensionName=sn;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createPBRSpecularGlossiness(){return new pN(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){let t=e.jsonDoc,n=t.json.materials||[],o=t.json.textures||[];return n.forEach((r,i)=>{if(r.extensions&&r.extensions.KHR_materials_pbrSpecularGlossiness){let s=this.createPBRSpecularGlossiness();e.materials[i].setExtension(sn,s);let a=r.extensions[sn];if(a.extras&&s.setExtras(a.extras),a.diffuseFactor!==void 0&&s.setDiffuseFactor(a.diffuseFactor),a.specularFactor!==void 0&&s.setSpecularFactor(a.specularFactor),a.glossinessFactor!==void 0&&s.setGlossinessFactor(a.glossinessFactor),a.diffuseTexture!==void 0){let c=a.diffuseTexture,u=e.textures[o[c.index].source];s.setDiffuseTexture(u),e.setTextureInfo(s.getDiffuseTextureInfo(),c);}if(a.specularGlossinessTexture!==void 0){let c=a.specularGlossinessTexture,u=e.textures[o[c.index].source];s.setSpecularGlossinessTexture(u),e.setTextureInfo(s.getSpecularGlossinessTextureInfo(),c);}}}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{let o=n.getExtension(sn);if(o){let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);if(i.extensions=i.extensions||{},i.extensions[sn]=s,s.diffuseFactor=o.getDiffuseFactor(),s.specularFactor=o.getSpecularFactor(),s.glossinessFactor=o.getGlossinessFactor(),o.getDiffuseTexture()){let a=o.getDiffuseTexture(),c=o.getDiffuseTextureInfo();s.diffuseTexture=e.createTextureInfoDef(a,c);}if(o.getSpecularGlossinessTexture()){let a=o.getSpecularGlossinessTexture(),c=o.getSpecularGlossinessTextureInfo();s.specularGlossinessTexture=e.createTextureInfoDef(a,c);}}}),this}},{R:hN,G:gN,B:_N,A:vN}=Kt,yN=class extends ze{static EXTENSION_NAME=an;init(){this.extensionName=an,this.propertyType="Sheen",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{sheenColorFactor:[0,0,0],sheenColorTexture:null,sheenColorTextureInfo:new Le(this.graph,"sheenColorTextureInfo"),sheenRoughnessFactor:0,sheenRoughnessTexture:null,sheenRoughnessTextureInfo:new Le(this.graph,"sheenRoughnessTextureInfo")})}getSheenColorFactor(){return this.get("sheenColorFactor")}setSheenColorFactor(e){return this.set("sheenColorFactor",e)}getSheenColorTexture(){return this.getRef("sheenColorTexture")}getSheenColorTextureInfo(){return this.getRef("sheenColorTexture")?this.getRef("sheenColorTextureInfo"):null}setSheenColorTexture(e){return this.setRef("sheenColorTexture",e,{channels:hN|gN|_N,isColor:true})}getSheenRoughnessFactor(){return this.get("sheenRoughnessFactor")}setSheenRoughnessFactor(e){return this.set("sheenRoughnessFactor",e)}getSheenRoughnessTexture(){return this.getRef("sheenRoughnessTexture")}getSheenRoughnessTextureInfo(){return this.getRef("sheenRoughnessTexture")?this.getRef("sheenRoughnessTextureInfo"):null}setSheenRoughnessTexture(e){return this.setRef("sheenRoughnessTexture",e,{channels:vN})}},SN=class extends Ae{static EXTENSION_NAME=an;extensionName=an;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createSheen(){return new yN(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){let t=e.jsonDoc,n=t.json.materials||[],o=t.json.textures||[];return n.forEach((r,i)=>{if(r.extensions&&r.extensions.KHR_materials_sheen){let s=this.createSheen();e.materials[i].setExtension(an,s);let a=r.extensions[an];if(a.extras&&s.setExtras(a.extras),a.sheenColorFactor!==void 0&&s.setSheenColorFactor(a.sheenColorFactor),a.sheenRoughnessFactor!==void 0&&s.setSheenRoughnessFactor(a.sheenRoughnessFactor),a.sheenColorTexture!==void 0){let c=a.sheenColorTexture,u=e.textures[o[c.index].source];s.setSheenColorTexture(u),e.setTextureInfo(s.getSheenColorTextureInfo(),c);}if(a.sheenRoughnessTexture!==void 0){let c=a.sheenRoughnessTexture,u=e.textures[o[c.index].source];s.setSheenRoughnessTexture(u),e.setTextureInfo(s.getSheenRoughnessTextureInfo(),c);}}}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{let o=n.getExtension(an);if(o){let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);if(i.extensions=i.extensions||{},i.extensions[an]=s,s.sheenColorFactor=o.getSheenColorFactor(),s.sheenRoughnessFactor=o.getSheenRoughnessFactor(),o.getSheenColorTexture()){let a=o.getSheenColorTexture(),c=o.getSheenColorTextureInfo();s.sheenColorTexture=e.createTextureInfoDef(a,c);}if(o.getSheenRoughnessTexture()){let a=o.getSheenRoughnessTexture(),c=o.getSheenRoughnessTextureInfo();s.sheenRoughnessTexture=e.createTextureInfoDef(a,c);}}}),this}},{R:bN,G:RN,B:TN,A:$N}=Kt,xN=class extends ze{static EXTENSION_NAME=cn;init(){this.extensionName=cn,this.propertyType="Specular",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{specularFactor:1,specularTexture:null,specularTextureInfo:new Le(this.graph,"specularTextureInfo"),specularColorFactor:[1,1,1],specularColorTexture:null,specularColorTextureInfo:new Le(this.graph,"specularColorTextureInfo")})}getSpecularFactor(){return this.get("specularFactor")}setSpecularFactor(e){return this.set("specularFactor",e)}getSpecularColorFactor(){return this.get("specularColorFactor")}setSpecularColorFactor(e){return this.set("specularColorFactor",e)}getSpecularTexture(){return this.getRef("specularTexture")}getSpecularTextureInfo(){return this.getRef("specularTexture")?this.getRef("specularTextureInfo"):null}setSpecularTexture(e){return this.setRef("specularTexture",e,{channels:$N})}getSpecularColorTexture(){return this.getRef("specularColorTexture")}getSpecularColorTextureInfo(){return this.getRef("specularColorTexture")?this.getRef("specularColorTextureInfo"):null}setSpecularColorTexture(e){return this.setRef("specularColorTexture",e,{channels:bN|RN|TN,isColor:true})}},wN=class extends Ae{static EXTENSION_NAME=cn;extensionName=cn;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createSpecular(){return new xN(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){let t=e.jsonDoc,n=t.json.materials||[],o=t.json.textures||[];return n.forEach((r,i)=>{if(r.extensions&&r.extensions.KHR_materials_specular){let s=this.createSpecular();e.materials[i].setExtension(cn,s);let a=r.extensions[cn];if(a.extras&&s.setExtras(a.extras),a.specularFactor!==void 0&&s.setSpecularFactor(a.specularFactor),a.specularColorFactor!==void 0&&s.setSpecularColorFactor(a.specularColorFactor),a.specularTexture!==void 0){let c=a.specularTexture,u=e.textures[o[c.index].source];s.setSpecularTexture(u),e.setTextureInfo(s.getSpecularTextureInfo(),c);}if(a.specularColorTexture!==void 0){let c=a.specularColorTexture,u=e.textures[o[c.index].source];s.setSpecularColorTexture(u),e.setTextureInfo(s.getSpecularColorTextureInfo(),c);}}}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{let o=n.getExtension(cn);if(o){let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);if(i.extensions=i.extensions||{},i.extensions[cn]=s,o.getSpecularFactor()!==1&&(s.specularFactor=o.getSpecularFactor()),qe.eq(o.getSpecularColorFactor(),[1,1,1])||(s.specularColorFactor=o.getSpecularColorFactor()),o.getSpecularTexture()){let a=o.getSpecularTexture(),c=o.getSpecularTextureInfo();s.specularTexture=e.createTextureInfoDef(a,c);}if(o.getSpecularColorTexture()){let a=o.getSpecularColorTexture(),c=o.getSpecularColorTextureInfo();s.specularColorTexture=e.createTextureInfoDef(a,c);}}}),this}},{R:EN}=Kt,IN=class extends ze{static EXTENSION_NAME=un;init(){this.extensionName=un,this.propertyType="Transmission",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{transmissionFactor:0,transmissionTexture:null,transmissionTextureInfo:new Le(this.graph,"transmissionTextureInfo")})}getTransmissionFactor(){return this.get("transmissionFactor")}setTransmissionFactor(e){return this.set("transmissionFactor",e)}getTransmissionTexture(){return this.getRef("transmissionTexture")}getTransmissionTextureInfo(){return this.getRef("transmissionTexture")?this.getRef("transmissionTextureInfo"):null}setTransmissionTexture(e){return this.setRef("transmissionTexture",e,{channels:EN})}},zN=class extends Ae{static EXTENSION_NAME=un;extensionName=un;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createTransmission(){return new IN(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){let t=e.jsonDoc,n=t.json.materials||[],o=t.json.textures||[];return n.forEach((r,i)=>{if(r.extensions&&r.extensions.KHR_materials_transmission){let s=this.createTransmission();e.materials[i].setExtension(un,s);let a=r.extensions[un];if(a.extras&&s.setExtras(a.extras),a.transmissionFactor!==void 0&&s.setTransmissionFactor(a.transmissionFactor),a.transmissionTexture!==void 0){let c=a.transmissionTexture,u=e.textures[o[c.index].source];s.setTransmissionTexture(u),e.setTextureInfo(s.getTransmissionTextureInfo(),c);}}}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{let o=n.getExtension(un);if(o){let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);if(i.extensions=i.extensions||{},i.extensions[un]=s,s.transmissionFactor=o.getTransmissionFactor(),o.getTransmissionTexture()){let a=o.getTransmissionTexture(),c=o.getTransmissionTextureInfo();s.transmissionTexture=e.createTextureInfoDef(a,c);}}}),this}},ON=class extends ze{static EXTENSION_NAME=Yo;init(){this.extensionName=Yo,this.propertyType="Unlit",this.parentTypes=[ee.MATERIAL];}},kN=class extends Ae{static EXTENSION_NAME=Yo;extensionName=Yo;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createUnlit(){return new ON(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){return (e.jsonDoc.json.materials||[]).forEach((t,n)=>{t.extensions&&t.extensions.KHR_materials_unlit&&e.materials[n].setExtension(Yo,this.createUnlit());}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{if(n.getExtension("KHR_materials_unlit")){let o=e.materialIndexMap.get(n),r=t.json.materials[o];r.extensions=r.extensions||{},r.extensions[Yo]={};}}),this}},NN=class extends ze{static EXTENSION_NAME=kt;init(){this.extensionName=kt,this.propertyType="Mapping",this.parentTypes=["MappingList"];}getDefaults(){return Object.assign(super.getDefaults(),{material:null,variants:new Me})}getMaterial(){return this.getRef("material")}setMaterial(e){return this.setRef("material",e)}addVariant(e){return this.addRef("variants",e)}removeVariant(e){return this.removeRef("variants",e)}listVariants(){return this.listRefs("variants")}},PN=class extends ze{static EXTENSION_NAME=kt;init(){this.extensionName=kt,this.propertyType="MappingList",this.parentTypes=[ee.PRIMITIVE];}getDefaults(){return Object.assign(super.getDefaults(),{mappings:new Me})}addMapping(e){return this.addRef("mappings",e)}removeMapping(e){return this.removeRef("mappings",e)}listMappings(){return this.listRefs("mappings")}},MT=class extends ze{static EXTENSION_NAME=kt;init(){this.extensionName=kt,this.propertyType="Variant",this.parentTypes=["MappingList"];}},AN=class extends Ae{extensionName=kt;static EXTENSION_NAME=kt;createMappingList(){return new PN(this.document.getGraph())}createVariant(e=""){return new MT(this.document.getGraph(),e)}createMapping(){return new NN(this.document.getGraph())}listVariants(){return Array.from(this.properties).filter(e=>e instanceof MT)}read(e){let t=e.jsonDoc;if(!t.json.extensions||!t.json.extensions.KHR_materials_variants)return this;let n=(t.json.extensions.KHR_materials_variants.variants||[]).map(o=>this.createVariant().setName(o.name||""));return (t.json.meshes||[]).forEach((o,r)=>{let i=e.meshes[r];(o.primitives||[]).forEach((s,a)=>{if(!s.extensions||!s.extensions.KHR_materials_variants)return;let c=this.createMappingList(),u=s.extensions[kt];for(let l of u.mappings){let m=this.createMapping();l.material!==void 0&&m.setMaterial(e.materials[l.material]);for(let h of l.variants||[])m.addVariant(n[h]);c.addMapping(m);}i.listPrimitives()[a].setExtension(kt,c);});}),this}write(e){let t=e.jsonDoc,n=this.listVariants();if(!n.length)return this;let o=[],r=new Map;for(let i of n)r.set(i,o.length),o.push(e.createPropertyDef(i));for(let i of this.document.getRoot().listMeshes()){let s=e.meshIndexMap.get(i);i.listPrimitives().forEach((a,c)=>{let u=a.getExtension(kt);if(!u)return;let l=e.jsonDoc.json.meshes[s].primitives[c],m=u.listMappings().map(h=>{let y=e.createPropertyDef(h),b=h.getMaterial();return b&&(y.material=e.materialIndexMap.get(b)),y.variants=h.listVariants().map(p=>r.get(p)),y});l.extensions=l.extensions||{},l.extensions[kt]={mappings:m};});}return t.json.extensions=t.json.extensions||{},t.json.extensions[kt]={variants:o},this}},{G:CN}=Kt,MN=class extends ze{static EXTENSION_NAME=ln;init(){this.extensionName=ln,this.propertyType="Volume",this.parentTypes=[ee.MATERIAL];}getDefaults(){return Object.assign(super.getDefaults(),{thicknessFactor:0,thicknessTexture:null,thicknessTextureInfo:new Le(this.graph,"thicknessTexture"),attenuationDistance:1/0,attenuationColor:[1,1,1]})}getThicknessFactor(){return this.get("thicknessFactor")}setThicknessFactor(e){return this.set("thicknessFactor",e)}getThicknessTexture(){return this.getRef("thicknessTexture")}getThicknessTextureInfo(){return this.getRef("thicknessTexture")?this.getRef("thicknessTextureInfo"):null}setThicknessTexture(e){return this.setRef("thicknessTexture",e,{channels:CN})}getAttenuationDistance(){return this.get("attenuationDistance")}setAttenuationDistance(e){return this.set("attenuationDistance",e)}getAttenuationColor(){return this.get("attenuationColor")}setAttenuationColor(e){return this.set("attenuationColor",e)}},jN=class extends Ae{static EXTENSION_NAME=ln;extensionName=ln;prereadTypes=[ee.MESH];prewriteTypes=[ee.MESH];createVolume(){return new MN(this.document.getGraph())}read(e){return this}write(e){return this}preread(e){let t=e.jsonDoc,n=t.json.materials||[],o=t.json.textures||[];return n.forEach((r,i)=>{if(r.extensions&&r.extensions.KHR_materials_volume){let s=this.createVolume();e.materials[i].setExtension(ln,s);let a=r.extensions[ln];if(a.extras&&s.setExtras(a.extras),a.thicknessFactor!==void 0&&s.setThicknessFactor(a.thicknessFactor),a.attenuationDistance!==void 0&&s.setAttenuationDistance(a.attenuationDistance),a.attenuationColor!==void 0&&s.setAttenuationColor(a.attenuationColor),a.thicknessTexture!==void 0){let c=a.thicknessTexture,u=e.textures[o[c.index].source];s.setThicknessTexture(u),e.setTextureInfo(s.getThicknessTextureInfo(),c);}}}),this}prewrite(e){let t=e.jsonDoc;return this.document.getRoot().listMaterials().forEach(n=>{let o=n.getExtension(ln);if(o){let r=e.materialIndexMap.get(n),i=t.json.materials[r],s=e.createPropertyDef(o);if(i.extensions=i.extensions||{},i.extensions[ln]=s,o.getThicknessFactor()>0&&(s.thicknessFactor=o.getThicknessFactor()),Number.isFinite(o.getAttenuationDistance())&&(s.attenuationDistance=o.getAttenuationDistance()),qe.eq(o.getAttenuationColor(),[1,1,1])||(s.attenuationColor=o.getAttenuationColor()),o.getThicknessTexture()){let a=o.getThicknessTexture(),c=o.getThicknessTextureInfo();s.thicknessTexture=e.createTextureInfoDef(a,c);}}}),this}},DN=class extends Ae{extensionName=yT;static EXTENSION_NAME=yT;read(e){return this}write(e){return this}},UN=class extends Ae{extensionName=ST;static EXTENSION_NAME=ST;read(e){return this}write(e){return this}},LN=class extends ze{static EXTENSION_NAME=dn;init(){this.extensionName=dn,this.propertyType="Visibility",this.parentTypes=[ee.NODE];}getDefaults(){return Object.assign(super.getDefaults(),{visible:true})}getVisible(){return this.get("visible")}setVisible(e){return this.set("visible",e)}},FN=class extends Ae{static EXTENSION_NAME=dn;extensionName=dn;createVisibility(){return new LN(this.document.getGraph())}read(e){return (e.jsonDoc.json.nodes||[]).forEach((t,n)=>{if(t.extensions&&t.extensions.KHR_node_visibility){let o=this.createVisibility();e.nodes[n].setExtension(dn,o);let r=t.extensions[dn];r.visible!==void 0&&o.setVisible(r.visible);}}),this}write(e){let t=e.jsonDoc;for(let n of this.document.getRoot().listNodes()){let o=n.getExtension(dn);if(!o)continue;let r=e.nodeIndexMap.get(n),i=t.json.nodes[r];i.extensions=i.extensions||{},i.extensions[dn]={visible:o.getVisible()};}return this}};function qN(e){return e.vkFormat>0&&e.vkFormat<=123}function jT(e){let t=e.vkFormat===1000066e3&&e.dataFormatDescriptor[0].colorModel===167;return e.vkFormat===0||t}var VN=class{match(e){return e[0]===171&&e[1]===75&&e[2]===84&&e[3]===88&&e[4]===32&&e[5]===50&&e[6]===48&&e[7]===187&&e[8]===13&&e[9]===10&&e[10]===26&&e[11]===10}getSize(e){let t=vd(e);return [t.pixelWidth,t.pixelHeight]}getChannels(e){let t=vd(e),n=t.dataFormatDescriptor[0];if(qN(t))return n.samples.length;if(jT(t))switch(n.colorModel){case 163:return n.samples.length===2&&(n.samples[1].channelType&15)===15?4:3;case 166:return (n.samples[0].channelType&15)===3?4:3;default:throw new Error(`Unexpected KTX2 colorModel, "${n.colorModel}".`)}throw new Error(`Unexpected KTX2 vkFormat, "${t.vkFormat}".`)}getVRAMByteLength(e){let t=vd(e),n=0;if(jT(t)){let o=this.getChannels(e)>3;for(let r=0;r<t.levels.length;r++){let i=t.levels[r];if(i.uncompressedByteLength)n+=i.uncompressedByteLength;else {let s=Math.max(1,Math.floor(t.pixelWidth/Math.pow(2,r))),a=Math.max(1,Math.floor(t.pixelHeight/Math.pow(2,r))),c=o?16:8;n+=s/4*(a/4)*c;}}}else for(let o of t.levels)t.supercompressionScheme===0?n+=o.levelData.byteLength:n+=o.uncompressedByteLength;return n}},BN=class extends Ae{static EXTENSION_NAME=bd;extensionName=bd;prereadTypes=[ee.TEXTURE];static register(){Qt.registerFormat("image/ktx2",new VN);}preread(e){return e.jsonDoc.json.textures&&e.jsonDoc.json.textures.forEach(t=>{t.extensions&&t.extensions.KHR_texture_basisu&&(t.source=t.extensions[bd].source);}),this}read(e){return this}write(e){let t=e.jsonDoc;return this.document.getRoot().listTextures().forEach(n=>{if(n.getMimeType()==="image/ktx2"){let o=e.imageIndexMap.get(n);t.json.textures.forEach(r=>{r.source===o&&(r.extensions=r.extensions||{},r.extensions[bd]={source:r.source},delete r.source);});}}),this}},KN=class extends ze{static EXTENSION_NAME=mn;init(){this.extensionName=mn,this.propertyType="Transform",this.parentTypes=[ee.TEXTURE_INFO];}getDefaults(){return Object.assign(super.getDefaults(),{offset:[0,0],rotation:0,scale:[1,1],texCoord:null})}getOffset(){return this.get("offset")}setOffset(e){return this.set("offset",e)}getRotation(){return this.get("rotation")}setRotation(e){return this.set("rotation",e)}getScale(){return this.get("scale")}setScale(e){return this.set("scale",e)}getTexCoord(){return this.get("texCoord")}setTexCoord(e){return this.set("texCoord",e)}},GN=class extends Ae{extensionName=mn;static EXTENSION_NAME=mn;createTransform(){return new KN(this.document.getGraph())}read(e){for(let[t,n]of Array.from(e.textureInfos.entries())){if(!n.extensions||!n.extensions.KHR_texture_transform)continue;let o=this.createTransform(),r=n.extensions[mn];r.offset!==void 0&&o.setOffset(r.offset),r.rotation!==void 0&&o.setRotation(r.rotation),r.scale!==void 0&&o.setScale(r.scale),r.texCoord!==void 0&&o.setTexCoord(r.texCoord),t.setExtension(mn,o);}return this}write(e){let t=Array.from(e.textureInfoDefMap.entries());for(let[n,o]of t){let r=n.getExtension(mn);if(!r)continue;o.extensions=o.extensions||{};let i={},s=qe.eq;s(r.getOffset(),[0,0])||(i.offset=r.getOffset()),r.getRotation()!==0&&(i.rotation=r.getRotation()),s(r.getScale(),[1,1])||(i.scale=r.getScale()),r.getTexCoord()!=null&&(i.texCoord=r.getTexCoord()),o.extensions[mn]=i;}return this}},HN=[ee.ROOT,ee.SCENE,ee.NODE,ee.MESH,ee.MATERIAL,ee.TEXTURE,ee.ANIMATION],ZN=class extends ze{static EXTENSION_NAME=Gt;init(){this.extensionName=Gt,this.propertyType="Packet",this.parentTypes=HN;}getDefaults(){return Object.assign(super.getDefaults(),{context:{},properties:{}})}getContext(){return this.get("context")}setContext(e){return this.set("context",{...e})}listProperties(){return Object.keys(this.get("properties"))}getProperty(e){let t=this.get("properties");return e in t?t[e]:null}setProperty(e,t){this._assertContext(e);let n={...this.get("properties")};return t?n[e]=t:delete n[e],this.set("properties",n)}toJSONLD(){return {"@context":W_(this.get("context")),...W_(this.get("properties"))}}fromJSONLD(e){e=W_(e);let t=e["@context"];return t&&this.set("context",t),delete e["@context"],this.set("properties",e)}_assertContext(e){if(!(e.split(":")[0]in this.get("context")))throw new Error(`${Gt}: Missing context for term, "${e}".`)}};function W_(e){return JSON.parse(JSON.stringify(e))}var JN=class extends Ae{extensionName=Gt;static EXTENSION_NAME=Gt;createPacket(){return new ZN(this.document.getGraph())}listPackets(){return Array.from(this.properties)}read(e){let t=e.jsonDoc.json.extensions?.[Gt];if(!t||!t.packets)return this;let n=e.jsonDoc.json,o=this.document.getRoot(),r=t.packets.map(a=>this.createPacket().fromJSONLD(a)),i=[[n.asset],n.scenes,n.nodes,n.meshes,n.materials,n.images,n.animations],s=[[o],o.listScenes(),o.listNodes(),o.listMeshes(),o.listMaterials(),o.listTextures(),o.listAnimations()];for(let a=0;a<i.length;a++){let c=i[a]||[];for(let u=0;u<c.length;u++){let l=c[u];if(l.extensions&&l.extensions.KHR_xmp_json_ld){let m=l.extensions[Gt];s[a][u].setExtension(Gt,r[m.packet]);}}}return this}write(e){let{json:t}=e.jsonDoc,n=[];for(let o of this.properties){n.push(o.toJSONLD());for(let r of o.listParents()){let i;switch(r.propertyType){case ee.ROOT:i=t.asset;break;case ee.SCENE:i=t.scenes[e.sceneIndexMap.get(r)];break;case ee.NODE:i=t.nodes[e.nodeIndexMap.get(r)];break;case ee.MESH:i=t.meshes[e.meshIndexMap.get(r)];break;case ee.MATERIAL:i=t.materials[e.materialIndexMap.get(r)];break;case ee.TEXTURE:i=t.images[e.imageIndexMap.get(r)];break;case ee.ANIMATION:i=t.animations[e.animationIndexMap.get(r)];break;default:i=null,this.document.getLogger().warn(`[${Gt}]: Unsupported parent property, "${r.propertyType}"`);break}i&&(i.extensions=i.extensions||{},i.extensions[Gt]={packet:n.length-1});}}return n.length>0&&(t.extensions=t.extensions||{},t.extensions[Gt]={packets:n}),this}},XN=[zk,Ok,Lk,qk,Hk,Xk,rN,oN,sN,cN,mN,fN,wN,SN,zN,kN,AN,jN,DN,UN,FN,BN,GN,JN],Rd=[EO,RO,DO,QO,wk,Ik,...XN];function BT(e,t,n){if(n.getRoot().listSkins().length>0)throw new Error("The attached GLB is rigged; attach a prop, or bake it into the host first.");if(n.getRoot().listAnimations().length>0)throw new Error("The attached GLB has its own clips; a prop is posed by its bone, not by clips.");if(n.getRoot().listCameras().length>0)throw new Error("The attached GLB carries a camera; attach a prop, not a scene.");let o=e.createNode(t),i=n.getRoot().listScenes()[0]?.listChildren()??n.getRoot().listNodes();for(let s of i)o.addChild(KT(e,s));return o}function WN(e){return e.getRoot().listBuffers()[0]??e.createBuffer()}function YN(e){let t=e.getElementSize(),o=e.getArray()?.constructor??Float32Array,r=new o(e.getCount()*t),i=[];for(let s=0;s<e.getCount();s+=1)e.getElement(s,i),r.set(i,s*t);return r}function tv(e,t){if(t.getArray()===null&&!t.getSparse())throw new Error(`Accessor '${t.getName()}' carries no data.`);return e.createAccessor(t.getName()).setType(t.getType()).setArray(YN(t)).setNormalized(t.getNormalized()).setBuffer(WN(e))}function QN(e,t){let n=e.createTexture(t.getName()).setMimeType(t.getMimeType()),o=t.getImage();return o!==null&&n.setImage(new Uint8Array(o)),n}function eP(e,t,n,o,r){let i=t===null?null:QN(e,t);r(i),!(n===null||o===null)&&o.setMagFilter(n.getMagFilter()).setMinFilter(n.getMinFilter()).setWrapS(n.getWrapS()).setWrapT(n.getWrapT());}function tP(e,t){let n=e.createMaterial(t.getName()).setAlpha(t.getAlpha()).setAlphaCutoff(t.getAlphaCutoff()).setAlphaMode(t.getAlphaMode()).setBaseColorFactor([...t.getBaseColorFactor()]).setDoubleSided(t.getDoubleSided()).setEmissiveFactor([...t.getEmissiveFactor()]).setMetallicFactor(t.getMetallicFactor()).setNormalScale(t.getNormalScale()).setOcclusionStrength(t.getOcclusionStrength()).setRoughnessFactor(t.getRoughnessFactor()),o=[[t.getBaseColorTexture(),t.getBaseColorTextureInfo(),()=>n.getBaseColorTextureInfo(),r=>n.setBaseColorTexture(r)],[t.getEmissiveTexture(),t.getEmissiveTextureInfo(),()=>n.getEmissiveTextureInfo(),r=>n.setEmissiveTexture(r)],[t.getMetallicRoughnessTexture(),t.getMetallicRoughnessTextureInfo(),()=>n.getMetallicRoughnessTextureInfo(),r=>n.setMetallicRoughnessTexture(r)],[t.getNormalTexture(),t.getNormalTextureInfo(),()=>n.getNormalTextureInfo(),r=>n.setNormalTexture(r)],[t.getOcclusionTexture(),t.getOcclusionTextureInfo(),()=>n.getOcclusionTextureInfo(),r=>n.setOcclusionTexture(r)]];for(let[r,i,s,a]of o)eP(e,r,i,s(),a);return n}function rP(e,t){let n=e.createPrimitive().setMode(t.getMode());for(let i of t.listSemantics()){let s=t.getAttribute(i);s!==null&&n.setAttribute(i,tv(e,s));}let o=t.getIndices();o!==null&&n.setIndices(tv(e,o));let r=t.getMaterial();r!==null&&n.setMaterial(tP(e,r));for(let i of t.listTargets()){let s=e.createPrimitiveTarget();for(let a of i.listSemantics()){let c=i.getAttribute(a);c!==null&&s.setAttribute(a,tv(e,c));}n.addTarget(s);}return n}function nP(e,t){let n=e.createMesh(t.getName());for(let o of t.listPrimitives())n.addPrimitive(rP(e,o));return n}function KT(e,t){let n=e.createNode(t.getName()).setTranslation([...t.getTranslation()]).setRotation([...t.getRotation()]).setScale([...t.getScale()]),o=t.getMesh();o!==null&&n.setMesh(nP(e,o));for(let r of t.listChildren())n.addChild(KT(e,r));return n}var GT=e=>({attachment:"attached",keyframes:[e]});function HT(e){if(e.version===3)return e;if(e.version===2)return {anchor:e.anchor,animations:Object.fromEntries(Object.entries(e.animations).map(([t,n])=>[t,GT(n)])),attached:e.attached,...e.default===void 0?{}:{default:GT(e.default)},host:e.host,version:3}}function ZT(e,t){let n=[...e?.keyframes??[]].filter(o=>Math.abs(o.time-t.time)>5e-4);return n.push(t),n.sort((o,r)=>o.time-r.time),{attachment:e?.attachment??"attached",keyframes:n}}var ov="$default",Td=e=>typeof e=="object"&&e!==null&&!Array.isArray(e);function nv(e,t,n){if(!Array.isArray(e)||e.length!==t||!e.every(o=>Number.isFinite(o)))throw new Error(`${n} must be ${t} finite numbers.`);return e}function iP(e){if(!Td(e))throw new Error("A key op needs a transform object.");return {position:nv(e.position,3,"transform.position"),rotation:nv(e.rotation,3,"transform.rotation"),scale:nv(e.scale,3,"transform.scale")}}function sP(e){if(!Td(e))throw new Error("An attach op needs an anchor object.");let{id:t,label:n,node:o,source:r}=e;if(typeof t!="string"||typeof n!="string"||typeof o!="string")throw new Error("An anchor needs a string id, label and node.");if(r!=="detected"&&r!=="estimated")throw new Error("An anchor source is 'detected' or 'estimated'.");return {id:t,label:n,node:o,source:r}}function aP(e){if(e!==void 0){if(e!=="attached"&&e!=="detached")throw new Error("A key op attachment is 'attached' or 'detached'.");return e}}function cP(e){if(!Td(e))throw new Error("Every op must be an object.");if(e.op==="attach"){if(typeof e.attached!="string"||e.attached.length===0)throw new Error("An attach op names the attached GLB.");return {anchor:sP(e.anchor),attached:e.attached,op:"attach"}}if(e.op==="key"){if(typeof e.clip!="string"||e.clip.length===0)throw new Error("A key op names its clip.");if(typeof e.time!="number"||!Number.isFinite(e.time)||e.time<0)throw new Error("A key op needs a finite time of zero or more.");let t=aP(e.attachment);return {clip:e.clip,op:"key",time:e.time,transform:iP(e.transform),...t===void 0?{}:{attachment:t}}}throw new Error(`Unknown animation op '${String(e.op)}'.`)}function uP(e){if(e===void 0)throw new Error("Unsupported animation recipe version.");let t=[{anchor:e.anchor,attached:e.attached,op:"attach"}],n=[];e.default!==void 0&&n.push([ov,e.default]);for(let o of Object.keys(e.animations).sort((r,i)=>r.localeCompare(i)))n.push([o,e.animations[o]]);for(let[o,r]of n)for(let i of [...r.keyframes].sort((s,a)=>s.time-a.time))t.push({attachment:r.attachment,clip:o,op:"key",time:i.time,transform:i.transform});return {host:e.host,ops:t,version:4}}function JT(e){if(!Td(e))throw new Error("An animation log must be a JSON object.");if(typeof e.host!="string"||e.host.length===0)throw new Error("An animation log names its host GLB.");if(e.version===4){if(!Array.isArray(e.ops)||e.ops.length===0)throw new Error("An animation log needs at least one op.");return {host:e.host,ops:e.ops.map(t=>cP(t)),version:4}}if(e.version===3||e.version===2)return uP(HT(e));throw new Error(`Unsupported animation log version '${String(e.version)}'.`)}function XT(e){let t,n,o={};for(let r of e.ops){if(r.op==="attach"){t=r.anchor,n=r.attached;continue}let i=ZT(o[r.clip],{time:r.time,transform:r.transform});o[r.clip]=r.attachment===void 0?i:{attachment:r.attachment,keyframes:i.keyframes};}if(t===void 0||n===void 0)throw new Error("An animation log starts with an attach op naming the prop and its bone.");return {anchor:t,attached:n,host:e.host,poses:o}}function WT(e,t){return {host:e.host,ops:[...e.ops,t],version:4}}function YT(e){let t=pn.parse(pn.resolve(e));return pn.join(t.dir,`${t.name}.anim.json`)}async function QT(e,t){await writeFile(e,`${JSON.stringify(t,null,2)}
76
+ `,"utf8");}var iv=e=>e*Math.PI/180;function dP(e){let[t,n,o]=[iv(e[0]),iv(e[1]),iv(e[2])],[r,i,s]=[Math.cos(t/2),Math.cos(n/2),Math.cos(o/2)],[a,c,u]=[Math.sin(t/2),Math.sin(n/2),Math.sin(o/2)];return [a*i*s+r*c*u,r*c*s-a*i*u,r*i*u+a*c*s,r*i*s-a*c*u]}function mP(e){return e.getRoot().listBuffers()[0]??e.createBuffer()}function e$(e,t,n,o){return e.createAccessor(t).setArray(n).setType(o).setBuffer(mP(e))}function t$(e){return {rotation:dP(e.rotation),scale:e.scale,translation:e.position}}function pP(e,t,n,o,r,i){let s=e$(e,`${t.getName()}.${o}.time`,new Float32Array(r),"SCALAR"),a=e$(e,`${t.getName()}.${o}`,i,o==="rotation"?"VEC4":"VEC3"),c=e.createAnimationSampler().setInput(s).setOutput(a).setInterpolation("LINEAR");t.addSampler(c),t.addChannel(e.createAnimationChannel().setTargetNode(n).setTargetPath(o).setSampler(c));}function fP(e,t,n,o){let r=[...o.keyframes].sort((c,u)=>c.time-u.time),i=r.map(c=>c.time),s=r.map(c=>t$(c.transform)),a=[["rotation",4],["scale",3],["translation",3]];for(let[c,u]of a){let l=new Float32Array(s.length*u);s.forEach((m,h)=>l.set(m[c],h*u)),pP(e,t,n,c,i,l);}}async function r$(e,t){let n=XT(e),o=()=>new _d().registerExtensions(Rd),r=await o().read(e.host),i=await o().read(n.attached),s=r.getRoot().listNodes().find(y=>y.getName()===n.anchor.node);if(s===void 0)throw new Error(`The host has no bone named '${n.anchor.node}' to attach to.`);let a=pn.parse(n.attached).name,c=BT(r,`attach-${a}`,i);s.addChild(c);let l=[...n.poses[ov]?.keyframes??[]].sort((y,b)=>y.time-b.time)[0];if(l!==void 0){let y=t$(l.transform);c.setTranslation(y.translation).setRotation(y.rotation).setScale(y.scale);}let m=[],h=[];for(let y of r.getRoot().listAnimations()){let b=y.getName(),p=n.poses[b];if(!(p===void 0||p.keyframes.length===0)){if(p.attachment==="detached"){h.push(b);continue}m.push(b),fP(r,y,c,p);}}return await mkdir(pn.dirname(pn.resolve(t)),{recursive:true}),await o().write(t,r),{anchor:s.getName(),attached:n.attached,clips:m,detached:h,file:pn.resolve(t),node:c.getName()}}var xd=[{id:"right-hand",label:"Right hand",patterns:[/righthand/u,/handright/u,/rhand/u]},{id:"left-hand",label:"Left hand",patterns:[/lefthand/u,/handleft/u,/lhand/u]},{id:"head",label:"Head",patterns:[/head/u]},{id:"hips",label:"Hips / root",patterns:[/hips/u,/pelvis/u,/^root$/u]},{id:"right-foot",label:"Right foot",patterns:[/rightfoot/u,/footright/u,/rfoot/u]},{id:"left-foot",label:"Left foot",patterns:[/leftfoot/u,/footleft/u,/lfoot/u]}];function sv(e){return e.toLowerCase().replaceAll(/[^a-z0-9]/gu,"")}function hP(e,t){return t.filter(n=>e.patterns.some(o=>o.test(sv(n)))).sort((n,o)=>sv(n).length-sv(o).length)[0]}function n$(e){return xd.flatMap(t=>{let n=hP(t,e);return n===void 0?[]:[{id:t.id,label:t.label,node:n,source:"detected"}]})}var _P=.01,vP=()=>new _d().registerExtensions(Rd);function yP(e){let n=e.getRoot().listSkins().flatMap(r=>r.listJoints())[0];return n!==void 0?n.getName():e.getRoot().listNodes().find(r=>/hips|pelvis|root/iu.test(r.getName()))?.getName()??null}function SP(e){let t=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;for(let o of e)o<t&&(t=o),o>n&&(n=o);return {max:n,min:t}}function bP(e,t){let n=new Map;if(t===null)return n;for(let o of e.getRoot().listAnimations()){let r=0;for(let i of o.listChannels()){if(i.getTargetNode()?.getName()!==t||i.getTargetPath()!=="translation")continue;let s=i.getSampler()?.getOutput()?.getArray();if(s==null||s.length<6)continue;let a=[s[0]??0,s[2]??0];for(let c=0;c+2<s.length;c+=3){let u=(s[c]??0)-a[0],l=(s[c+2]??0)-(a[1]??0);r=Math.max(r,Math.hypot(u,l));}}n.set(o.getName(),r);}return n}async function av(e){let t=(await stat(e)).size,n=await vP().read(e),o=n.getRoot(),r=[],i=o.listSkins(),s=i.flatMap(h=>h.listJoints().map(y=>y.getName())),a=o.listNodes().map(h=>h.getName()),c=s.length>0?s:a.filter(h=>h.length>0);i.length===0&&r.push("No skin: the model is not rigged."),o.listAnimations().length===0&&r.push("No animation clip: nothing to verify.");let u=yP(n),l=bP(n,u),m=o.listAnimations().map(h=>{let y=0;for(let p of h.listSamplers()){let S=p.getInput()?.getArray();S!==void 0&&(y=Math.max(y,SP(S).max));}let b=Math.round((l.get(h.getName())??0)*1e4)/1e4;return {channels:h.listChannels().length,duration:Math.round(y*1e4)/1e4,horizontalTravel:b,inPlace:b<=_P,name:h.getName()}}).sort((h,y)=>h.name.localeCompare(y.name));return {bones:c,bytes:t,clips:m,extensionsUsed:[...o.listExtensionsUsed().map(h=>h.extensionName)].sort((h,y)=>h.localeCompare(y)),file:e,generator:o.getAsset().generator??"",inPlace:m.every(h=>h.inPlace),landmarks:n$(c),meshes:o.listMeshes().length,rootBone:u,skins:i.length,warnings:r}}var RP=String.raw`
77
77
  :root{color-scheme:dark;font-family:"IBM Plex Mono","Azeret Mono",ui-monospace,monospace;background:#080b0a;color:#dce4de;--line:#27302c;--line2:#38433e;--panel:#111613;--panel2:#171d1a;--acid:#b7f34a;--cyan:#68d9d0;--muted:#77837c;--red:#ff705d}*{box-sizing:border-box}body{margin:0;overflow:hidden;background:#080b0a}button{cursor:pointer}.lab{height:100vh;display:grid;grid-template-rows:50px 1fr 26px}.bar{display:flex;align-items:center;gap:14px;padding:0 14px;border-bottom:1px solid var(--line);background:#0d120f}.brand{font:800 13px sans-serif;letter-spacing:.18em}.brand b{display:inline-grid;place-items:center;width:24px;height:24px;margin-right:9px;background:var(--acid);color:#101808}.bar small,.status{color:var(--muted)}.grow{flex:1}.bar button{border:1px solid #789e3f;border-radius:2px;background:var(--acid);color:#111908;padding:8px 14px;font:800 10px inherit}.body{min-height:0;display:grid;grid-template-columns:230px minmax(0,1fr) 285px}.side{overflow:auto;background:var(--panel)}.left{border-right:1px solid var(--line)}.right{border-left:1px solid var(--line)}.section{padding:13px;border-bottom:1px solid var(--line)}h2{margin:0 0 10px;color:var(--muted);font-size:9px;letter-spacing:.16em;text-transform:uppercase}label{display:grid;gap:5px;margin-bottom:10px;color:#91a097;font-size:9px;text-transform:uppercase}select,input{width:100%;border:1px solid var(--line);border-radius:2px;background:#090d0b;color:#dce4de;padding:8px;font:10px inherit;outline:none}select:focus,input:focus{border-color:var(--acid)}input:disabled{opacity:.38}.workspace{min-width:0;min-height:0;display:grid;grid-template-rows:minmax(280px,1fr) 224px;background:#090d0b}.viewport{position:relative;min-width:0;min-height:0}.viewport canvas{display:block;width:100%;height:100%}.title{position:absolute;top:18px;left:18px;pointer-events:none;font:800 23px sans-serif}.title small{display:block;margin-top:6px;color:var(--acid);font:9px ui-monospace;letter-spacing:.14em}.tools{position:absolute;bottom:16px;left:50%;display:flex;transform:translateX(-50%);border:1px solid var(--line2);background:#090d0be8}.tools button,.preset button{border:0;background:none;color:var(--muted);padding:9px 15px;font:9px inherit;text-transform:uppercase}.tools button.on{background:#263328;color:var(--acid)}.tools button:disabled{opacity:.28;cursor:not-allowed}.release-note{position:absolute;top:18px;right:18px;padding:7px 10px;border:1px solid #8b493d;background:#2b1713d9;color:#ff9b86;font-size:9px;letter-spacing:.13em}.landmarks{display:grid;gap:5px}.landmark{display:grid;grid-template-columns:8px 1fr auto;gap:8px;align-items:center;width:100%;padding:8px;border:1px solid transparent;border-radius:2px;background:#0c110f;color:var(--muted);font:10px inherit;text-align:left}.landmark.on{border-color:#668c34;color:#dce4de}.landmark i{width:6px;height:6px;border-radius:50%;background:#71b9ff}.landmark.detected i{background:var(--acid)}.landmark small{font-size:8px;color:#69756f}.axis{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.axis label{margin:0}.preset{display:grid;grid-template-columns:repeat(4,1fr);margin-top:8px}.preset button{padding:7px 2px;border:1px solid var(--line)}.wide,.editor-bar button,.segmented button{border:1px solid var(--line2);border-radius:2px;background:#1a211d;color:#dce4de;padding:8px;font:10px inherit}.wide{width:100%}.secondary{color:var(--muted)!important;background:#0d1210!important}.segmented{display:grid;grid-template-columns:1fr 1fr;gap:3px}.segmented button.on{border-color:var(--acid);color:var(--acid);background:#243021}.segmented button.danger.on{border-color:var(--red);color:#ff9b86;background:#321a16}.hint{margin:8px 0 0;color:var(--muted);font-size:9px;line-height:1.5}.status{display:flex;justify-content:space-between;align-items:center;padding:0 12px;border-top:1px solid var(--line);font-size:9px}.status b{color:var(--acid)}.error{position:absolute;top:18px;right:18px;max-width:360px;padding:10px;border:1px solid #81452f;background:#321a12;color:#ffb08a;font-size:10px}.saved{color:var(--acid);font-size:9px}.dope-editor{min-width:0;border-top:1px solid #46504b;background:#101512;box-shadow:0 -12px 30px #0008}.editor-bar{height:44px;display:flex;align-items:center;gap:7px;padding:6px 9px;border-bottom:1px solid var(--line2);background:#171c19}.editor-bar select{width:180px;padding:7px}.editor-bar button{white-space:nowrap;padding:7px 10px}.editor-bar button:disabled{opacity:.3;cursor:not-allowed}.editor-bar .transport{width:34px;border-color:#738d47;color:var(--acid);font-size:13px}.timecode{min-width:90px;color:#e1e7e3;font-size:11px;letter-spacing:.08em}.timecode i{color:var(--muted);font-style:normal}.compact{display:flex}.sheet{position:relative;height:179px;display:grid;grid-template-columns:132px 1fr;grid-template-rows:27px repeat(4,38px);overflow:hidden;background:repeating-linear-gradient(90deg,transparent 0,transparent calc(10% - 1px),#252d29 calc(10% - 1px),#252d29 10%)}.ruler-label{grid-column:1;grid-row:1}.ruler{position:relative;grid-column:2;grid-row:1;border-bottom:1px solid var(--line2);background:#0c100e}.ruler span{position:absolute;bottom:5px;transform:translateX(-50%);color:#68736d;font-size:8px}.lane-row{display:contents}.lane-label{z-index:3;display:flex;align-items:center;gap:8px;padding-left:13px;border-right:1px solid var(--line2);border-bottom:1px solid #222a26;background:#151a17;color:#87938c;font-size:9px;letter-spacing:.1em}.lane-label i{width:6px;height:6px;border:1px solid var(--cyan);transform:rotate(45deg)}.lane-track{position:relative;border-bottom:1px solid #222a26;background:#0d120f66}.key-diamond{position:absolute;z-index:4;top:14px;width:10px;height:10px;padding:0;transform:translate(-50%,-50%) rotate(45deg);border:1px solid #e2ffae;background:var(--acid);box-shadow:0 0 0 2px #0a0e0c}.attachment-lane .lane-label{grid-column:1;grid-row:5}.event-clip{align-self:center;grid-column:2;grid-row:5;height:23px;margin:0 8px;padding:6px 10px;border-left:3px solid var(--cyan);background:#17312d;color:#8ce7df;font-size:9px;letter-spacing:.08em}.event-clip.released{border-left-color:var(--red);background:#321a16;color:#ff9b86}.playhead{position:absolute;z-index:6;top:0;bottom:0;width:1px;background:#f3f7f4;pointer-events:none}.playhead b{position:absolute;top:0;left:-4px;width:9px;height:9px;background:#f3f7f4;clip-path:polygon(0 0,100% 0,50% 100%)}.scrubber{position:absolute;z-index:7;top:0;right:0;bottom:0;left:132px;width:calc(100% - 132px);height:100%;margin:0;padding:0;opacity:0;cursor:ew-resize}.ruler{grid-column:2;grid-row:1}.lane-row:nth-of-type(1) .lane-label,.lane-row:nth-of-type(1) .lane-track{grid-row:2}.lane-row:nth-of-type(2) .lane-label,.lane-row:nth-of-type(2) .lane-track{grid-row:3}.lane-row:nth-of-type(3) .lane-label,.lane-row:nth-of-type(3) .lane-track{grid-row:4}.lane-row .lane-label{grid-column:1}.lane-row .lane-track{grid-column:2}@media(max-width:980px){.body{grid-template-columns:210px 1fr}.right{display:none}.workspace{grid-template-rows:minmax(260px,1fr) 224px}.compact{display:none}}
78
- `;function i$(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll('"',"&quot;")}function s$(e){return `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Pose Lab \u2014 ${i$(e)}</title><style>${bP}</style></head><body><div id="root" data-project="${i$(e)}"></div><script type="module" src="/app.js"></script></body></html>`}var wP=new URL("./client/app.js",import.meta.url),EP=256e3;function IP(e){let t=new Map;for(let r=0;r<e.length;r+=1){let i=e[r];if(i!=="--port"&&i!=="--project")throw new Error(`Unknown option: ${i}`);let s=e[r+1];if(s===void 0)throw new Error(`${i} requires a value.`);t.set(i,s),r+=1;}let n=t.get("--port"),o=n===void 0?void 0:Number(n);if(o!==void 0&&(!Number.isInteger(o)||o<1||o>65535))throw new Error("--port must be an integer from 1 to 65535.");return {...o===void 0?{}:{port:o},...t.get("--project")===void 0?{}:{project:t.get("--project")}}}function a$(e,t){if(t.length===0||tr.isAbsolute(t)||t.split(/[\\/]/u).some(r=>r.length===0||r.startsWith(".")))return;let n=tr.resolve(e),o=tr.resolve(n,t);return o.startsWith(`${n}${tr.sep}`)?o:void 0}async function zP(e){let t=[],n=new Set([".git","build","dist","node_modules"]),o=async(r,i,s)=>{if(s>6||t.length>=2e3)return;let a=await readdir(r,{withFileTypes:true}).catch(()=>[]);for(let c of a){if(c.name.startsWith(".")||n.has(c.name))continue;let u=i.length===0?c.name:`${i}/${c.name}`;c.isDirectory()?await o(tr.join(r,c.name),u,s+1):c.name.toLowerCase().endsWith(".glb")&&t.push(u);}};return await o(e,"",0),t.sort((r,i)=>r.localeCompare(i))}async function OP(e){let t=[],n=0;for await(let o of e){let r=Buffer.from(o);if(n+=r.length,n>EP)throw new Error("Request exceeds 256 KB.");t.push(r);}return JSON.parse(Buffer.concat(t).toString("utf8"))}function Ed(e,t,n,o){e.writeHead(t,{"cache-control":"no-store","content-type":o,"x-content-type-options":"nosniff"}),e.end(n);}function er(e,t,n){Ed(e,t,JSON.stringify(n),"application/json; charset=utf-8");}async function lv(e={}){let t=tr.resolve(e.project??process.cwd()),n=e.port??4192;await readdir(t).catch(()=>{throw new Error(`Project directory does not exist: ${t}`)});let o=createServer(async(i,s)=>{try{let a=new URL(i.url??"/","http://pose-lab");if(i.method==="GET"&&(a.pathname==="/"||a.pathname==="/pose"))return Ed(s,200,s$(tr.basename(t)),"text/html; charset=utf-8");if(i.method==="GET"&&a.pathname==="/app.js")return Ed(s,200,await readFile(wP),"text/javascript; charset=utf-8");if(i.method==="GET"&&a.pathname==="/favicon.ico")return s.writeHead(204),s.end();if(i.method==="GET"&&a.pathname==="/api/models")return er(s,200,{models:await zP(t)});if(i.method==="GET"&&a.pathname==="/api/model"){let c=a.searchParams.get("path")??"",u=c.endsWith(".glb")?a$(t,c):void 0;if(u===void 0)return er(s,404,{error:"GLB not found."});let l=await readFile(u).catch(()=>{});return l===void 0?er(s,404,{error:"GLB not found."}):Ed(s,200,l,"model/gltf-binary")}if(a.pathname==="/api/recipe"){let c=a.searchParams.get("path")??"",u=c.endsWith(".json")?a$(t,c):void 0;if(u===void 0)return er(s,404,{error:"Recipe not found."});if(i.method==="GET"){let l=await readFile(u,"utf8").catch(()=>{});return l===void 0?er(s,404,{error:"Recipe not found."}):er(s,200,{recipe:JSON.parse(l),path:c})}if(i.method==="PUT"){let l=await OP(i);return typeof l.recipe!="object"||l.recipe===null?er(s,400,{error:"Body must contain a recipe object."}):(await mkdir(tr.dirname(u),{recursive:!0}),await writeFile(u,`${JSON.stringify(l.recipe,null,2)}
79
- `,"utf8"),er(s,200,{path:c,saved:!0}))}}return er(s,404,{error:"Not found."})}catch(a){return er(s,500,{error:a instanceof Error?a.message:String(a)})}});await new Promise((i,s)=>{o.once("error",s),o.listen(n,"127.0.0.1",i);});let r=o.address();return {port:typeof r=="object"&&r!==null?r.port:n,close:()=>new Promise((i,s)=>o.close(a=>a?s(a):i()))}}function kP(){let e=process.argv[1];return e!==void 0&&tr.resolve(e)===tr.resolve(fileURLToPath(import.meta.url))}kP()&&lv(IP(process.argv.slice(2))).then(({port:e})=>process.stdout.write(`Pose Lab: http://127.0.0.1:${e}/pose
80
- `)).catch(e=>{process.stderr.write(`${e instanceof Error?e.message:String(e)}
81
- `),process.exitCode=1;});var AP=re.object({position:re.tuple([re.number(),re.number(),re.number()]),rotation:re.tuple([re.number(),re.number(),re.number()]),scale:re.tuple([re.number(),re.number(),re.number()])}),f$=re.enum(wd.map(e=>e.id)),CP=re.object({attachment:re.enum(["attached","detached"]).optional(),clip:re.string().min(1).max(200),time:re.number().min(0).max(600),transform:AP}),MP=re.object({file:re.string().min(1)}),u$=re.object({bones:re.array(re.string()),bytes:re.number(),clips:re.array(re.object({channels:re.number(),duration:re.number(),horizontalTravel:re.number(),inPlace:re.boolean(),name:re.string()})),extensionsUsed:re.array(re.string()),file:re.string(),generator:re.string(),inPlace:re.boolean(),landmarks:re.array(re.object({id:re.string(),label:re.string(),node:re.string(),source:re.enum(["detected","estimated"])})),meshes:re.number(),rootBone:re.string().nullable(),skins:re.number(),warnings:re.array(re.string())}),l$=re.object({anchor:f$.default("right-hand"),attached:re.string().min(1).optional(),bone:re.string().min(1).optional(),host:re.string().min(1).optional(),keys:re.array(CP).max(2e3).optional(),log:re.string().min(1).optional(),output:re.string().min(1).optional(),recipe:re.string().min(1).optional()}),d$=re.object({anchor:re.string(),attached:re.string(),clips:re.array(re.string()),detached:re.array(re.string()),file:re.string(),log:re.string(),node:re.string()}),mv=re.object({anchor:f$.default("right-hand"),attach:re.string().min(1).optional(),host:re.string().min(1).optional(),output:re.string().min(1).optional(),port:re.number().int().min(0).max(65535).optional(),project:re.string().min(1).optional()}),m$=re.object({port:re.number(),url:re.string()}),dv=e=>({destructiveHint:false,idempotentHint:true,openWorldHint:false,readOnlyHint:e}),Qo=e=>[{type:"text",text:JSON.stringify(e)}];function jP(e,t,n){if(n!==void 0){let i=wd.find(s=>s.id===t);if(i===void 0)throw new Error(`Unknown anchor '${t}'.`);return {id:t,label:i.label,node:n,source:"detected"}}let o=e.find(i=>i.id===t);if(o!==void 0)return o;let r=e.map(i=>`${i.id} \u2192 ${i.node}`);throw new Error(`The host names no '${t}' landmark. It answers to: ${r.length===0?"none":r.join(", ")}. Pass 'bone' to name one directly.`)}function DP(e){return {position:e.position,rotation:e.rotation,scale:e.scale}}function UP(e){let t=tr.parse(e);return tr.join(t.dir,`${t.name}.anim.glb`)}async function LP(e){let t=(e.keys??[]).map(i=>({attachment:i.attachment,clip:i.clip,op:"key",time:i.time,transform:DP(i.transform)})),n;if(e.recipe!==void 0){n=XT(JSON.parse(await readFile(e.recipe,"utf8")));for(let i of t)n=YT(n,i);}else {if(e.host===void 0||e.attached===void 0)throw new Error("Pass 'host' and 'attached', or a 'recipe' that names both.");let i=await cv(e.host);n={host:e.host,ops:[{anchor:jP(i.landmarks,e.anchor,e.bone),attached:e.attached,op:"attach"},...t],version:4};}let o=e.log??QT(n.host);return await e$(o,n),{...await n$(n,e.output??UP(n.host)),log:tr.resolve(o)}}var p$;function h$(e){return p$??=(async()=>{let t=await lv({...e.port===void 0?{}:{port:e.port},...e.project===void 0?{}:{project:e.project}}),n=new URLSearchParams;return e.host!==void 0&&n.set("host",e.host),e.attach!==void 0&&n.set("attach",e.attach),e.output!==void 0&&n.set("output",e.output),n.set("anchor",e.anchor),{port:t.port,url:`http://127.0.0.1:${t.port}/pose?${n.toString()}`}})(),p$}function FP(){let e=new qs({name:"threenative-animation",version:"0.1.1"});return e.registerTool("animation_inspect",{annotations:dv(true),description:"Inspect a local rigged GLB: bones, skeleton landmarks, clips with durations, root-motion travel and in-place detection, meshes, skins and extensions. Reads one local file and writes nothing.",inputSchema:MP,outputSchema:u$,title:"Inspect a rig and its clips"},async t=>{try{let n=u$.parse(await cv(t.file));return {content:Qo(n),structuredContent:n}}catch(n){return {content:Qo({message:n instanceof Error?n.message:String(n)}),isError:true}}}),e.registerTool("animation_attach",{annotations:dv(false),description:"Attach a prop GLB to a bone, with per-clip keyed offsets, and bake it into an ordinary GLB beside the source. Writes the v4 op log (<model>.anim.json) next to the source GLB and the baked GLB; a version 3 pose recipe loads as the same ops and still bakes.",inputSchema:l$,outputSchema:d$,title:"Attach a prop to a bone and bake it"},async t=>{try{let n=d$.parse(await LP(l$.parse(t)));return {content:Qo(n),structuredContent:n}}catch(n){return {content:Qo({message:n instanceof Error?n.message:String(n)}),isError:true}}}),e.registerTool("animation_open_view",{annotations:dv(false),description:"Start the animation calibrator page on 127.0.0.1 and return its URL. A human drags the prop into place there; the same operations an agent calls are what the page records.",inputSchema:mv,outputSchema:m$,title:"Open the animation calibrator"},async t=>{try{let n=m$.parse(await h$(mv.parse(t)));return {content:Qo(n),structuredContent:n}}catch(n){return {content:Qo({message:n instanceof Error?n.message:String(n)}),isError:true}}}),e}function qP(){BR(()=>FP());}function VP(){let e=process.argv[1];return e!==void 0&&tr.resolve(e)===tr.resolve(fileURLToPath(import.meta.url))}VP()&&(process.argv[2]==="--view"?h$(mv.parse({project:process.cwd()})).then(({url:e})=>process.stdout.write(`Animation view: ${e}
78
+ `;function o$(e){return e.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll('"',"&quot;")}function i$(e){return `<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Pose Lab \u2014 ${o$(e)}</title><style>${RP}</style></head><body><div id="root" data-project="${o$(e)}"></div><script type="module" src="/app.js"></script></body></html>`}var wP=new URL("./client/app.js",import.meta.url),EP=256e3;function s$(e,t){if(t.length===0||pn.isAbsolute(t)||t.split(/[\\/]/u).some(r=>r.length===0||r.startsWith(".")))return;let n=pn.resolve(e),o=pn.resolve(n,t);return o.startsWith(`${n}${pn.sep}`)?o:void 0}async function IP(e){let t=[],n=new Set([".git","build","dist","node_modules"]),o=async(r,i,s)=>{if(s>6||t.length>=2e3)return;let a=await readdir(r,{withFileTypes:true}).catch(()=>[]);for(let c of a){if(c.name.startsWith(".")||n.has(c.name))continue;let u=i.length===0?c.name:`${i}/${c.name}`;c.isDirectory()?await o(pn.join(r,c.name),u,s+1):c.name.toLowerCase().endsWith(".glb")&&t.push(u);}};return await o(e,"",0),t.sort((r,i)=>r.localeCompare(i))}async function zP(e){let t=[],n=0;for await(let o of e){let r=Buffer.from(o);if(n+=r.length,n>EP)throw new Error("Request exceeds 256 KB.");t.push(r);}return JSON.parse(Buffer.concat(t).toString("utf8"))}function wd(e,t,n,o){e.writeHead(t,{"cache-control":"no-store","content-type":o,"x-content-type-options":"nosniff"}),e.end(n);}function er(e,t,n){wd(e,t,JSON.stringify(n),"application/json; charset=utf-8");}async function c$(e={}){let t=pn.resolve(e.project??process.cwd()),n=e.port??4192;await readdir(t).catch(()=>{throw new Error(`Project directory does not exist: ${t}`)});let o=createServer(async(i,s)=>{try{let a=new URL(i.url??"/","http://pose-lab");if(i.method==="GET"&&(a.pathname==="/"||a.pathname==="/pose"))return wd(s,200,i$(pn.basename(t)),"text/html; charset=utf-8");if(i.method==="GET"&&a.pathname==="/app.js")return wd(s,200,await readFile(wP),"text/javascript; charset=utf-8");if(i.method==="GET"&&a.pathname==="/favicon.ico")return s.writeHead(204),s.end();if(i.method==="GET"&&a.pathname==="/api/models")return er(s,200,{models:await IP(t)});if(i.method==="GET"&&a.pathname==="/api/model"){let c=a.searchParams.get("path")??"",u=c.endsWith(".glb")?s$(t,c):void 0;if(u===void 0)return er(s,404,{error:"GLB not found."});let l=await readFile(u).catch(()=>{});return l===void 0?er(s,404,{error:"GLB not found."}):wd(s,200,l,"model/gltf-binary")}if(a.pathname==="/api/recipe"){let c=a.searchParams.get("path")??"",u=c.endsWith(".json")?s$(t,c):void 0;if(u===void 0)return er(s,404,{error:"Recipe not found."});if(i.method==="GET"){let l=await readFile(u,"utf8").catch(()=>{});return l===void 0?er(s,404,{error:"Recipe not found."}):er(s,200,{recipe:JSON.parse(l),path:c})}if(i.method==="PUT"){let l=await zP(i);return typeof l.recipe!="object"||l.recipe===null?er(s,400,{error:"Body must contain a recipe object."}):(await mkdir(pn.dirname(u),{recursive:!0}),await writeFile(u,`${JSON.stringify(l.recipe,null,2)}
79
+ `,"utf8"),er(s,200,{path:c,saved:!0}))}}return er(s,404,{error:"Not found."})}catch(a){return er(s,500,{error:a instanceof Error?a.message:String(a)})}});await new Promise((i,s)=>{o.once("error",s),o.listen(n,"127.0.0.1",i);});let r=o.address();return {port:typeof r=="object"&&r!==null?r.port:n,close:()=>new Promise((i,s)=>o.close(a=>a?s(a):i()))}}var NP=re.object({position:re.tuple([re.number(),re.number(),re.number()]),rotation:re.tuple([re.number(),re.number(),re.number()]),scale:re.tuple([re.number(),re.number(),re.number()])}),h$=re.enum(xd.map(e=>e.id)),PP=re.object({attachment:re.enum(["attached","detached"]).optional(),clip:re.string().min(1).max(200),time:re.number().min(0).max(600),transform:NP}),AP=re.object({file:re.string().min(1)}),l$=re.object({bones:re.array(re.string()),bytes:re.number(),clips:re.array(re.object({channels:re.number(),duration:re.number(),horizontalTravel:re.number(),inPlace:re.boolean(),name:re.string()})),extensionsUsed:re.array(re.string()),file:re.string(),generator:re.string(),inPlace:re.boolean(),landmarks:re.array(re.object({id:re.string(),label:re.string(),node:re.string(),source:re.enum(["detected","estimated"])})),meshes:re.number(),rootBone:re.string().nullable(),skins:re.number(),warnings:re.array(re.string())}),d$=re.object({anchor:h$.default("right-hand"),attached:re.string().min(1).optional(),bone:re.string().min(1).optional(),host:re.string().min(1).optional(),keys:re.array(PP).max(2e3).optional(),log:re.string().min(1).optional(),output:re.string().min(1).optional(),recipe:re.string().min(1).optional()}),m$=re.object({anchor:re.string(),attached:re.string(),clips:re.array(re.string()),detached:re.array(re.string()),file:re.string(),log:re.string(),node:re.string()}),dv=re.object({anchor:h$.default("right-hand"),attach:re.string().min(1).optional(),host:re.string().min(1).optional(),output:re.string().min(1).optional(),port:re.number().int().min(0).max(65535).optional(),project:re.string().min(1).optional()}),p$=re.object({port:re.number(),url:re.string()}),uv=e=>({destructiveHint:false,idempotentHint:true,openWorldHint:false,readOnlyHint:e}),Qo=e=>[{type:"text",text:JSON.stringify(e)}];function CP(e,t,n){if(n!==void 0){let i=xd.find(s=>s.id===t);if(i===void 0)throw new Error(`Unknown anchor '${t}'.`);return {id:t,label:i.label,node:n,source:"detected"}}let o=e.find(i=>i.id===t);if(o!==void 0)return o;let r=e.map(i=>`${i.id} \u2192 ${i.node}`);throw new Error(`The host names no '${t}' landmark. It answers to: ${r.length===0?"none":r.join(", ")}. Pass 'bone' to name one directly.`)}function MP(e){return {position:e.position,rotation:e.rotation,scale:e.scale}}function jP(e){let t=pn.parse(e);return pn.join(t.dir,`${t.name}.anim.glb`)}async function DP(e){let t=(e.keys??[]).map(i=>({attachment:i.attachment,clip:i.clip,op:"key",time:i.time,transform:MP(i.transform)})),n;if(e.recipe!==void 0){n=JT(JSON.parse(await readFile(e.recipe,"utf8")));for(let i of t)n=WT(n,i);}else {if(e.host===void 0||e.attached===void 0)throw new Error("Pass 'host' and 'attached', or a 'recipe' that names both.");let i=await av(e.host);n={host:e.host,ops:[{anchor:CP(i.landmarks,e.anchor,e.bone),attached:e.attached,op:"attach"},...t],version:4};}let o=e.log??YT(n.host);return await QT(o,n),{...await r$(n,e.output??jP(n.host)),log:pn.resolve(o)}}var f$;function g$(e){return f$??=(async()=>{let t=await c$({...e.port===void 0?{}:{port:e.port},...e.project===void 0?{}:{project:e.project}}),n=new URLSearchParams;return e.host!==void 0&&n.set("host",e.host),e.attach!==void 0&&n.set("attach",e.attach),e.output!==void 0&&n.set("output",e.output),n.set("anchor",e.anchor),{port:t.port,url:`http://127.0.0.1:${t.port}/pose?${n.toString()}`}})(),f$}function UP(){let e=new qs({name:"threenative-animation",version:"0.1.3"});return e.registerTool("animation_inspect",{annotations:uv(true),description:"Inspect a local rigged GLB: bones, skeleton landmarks, clips with durations, root-motion travel and in-place detection, meshes, skins and extensions. Reads one local file and writes nothing.",inputSchema:AP,outputSchema:l$,title:"Inspect a rig and its clips"},async t=>{try{let n=l$.parse(await av(t.file));return {content:Qo(n),structuredContent:n}}catch(n){return {content:Qo({message:n instanceof Error?n.message:String(n)}),isError:true}}}),e.registerTool("animation_attach",{annotations:uv(false),description:"Attach a prop GLB to a bone, with per-clip keyed offsets, and bake it into an ordinary GLB beside the source. Writes the v4 op log (<model>.anim.json) next to the source GLB and the baked GLB; a version 3 pose recipe loads as the same ops and still bakes.",inputSchema:d$,outputSchema:m$,title:"Attach a prop to a bone and bake it"},async t=>{try{let n=m$.parse(await DP(d$.parse(t)));return {content:Qo(n),structuredContent:n}}catch(n){return {content:Qo({message:n instanceof Error?n.message:String(n)}),isError:true}}}),e.registerTool("animation_open_view",{annotations:uv(false),description:"Start the animation calibrator page on 127.0.0.1 and return its URL. A human drags the prop into place there; the same operations an agent calls are what the page records.",inputSchema:dv,outputSchema:p$,title:"Open the animation calibrator"},async t=>{try{let n=p$.parse(await g$(dv.parse(t)));return {content:Qo(n),structuredContent:n}}catch(n){return {content:Qo({message:n instanceof Error?n.message:String(n)}),isError:true}}}),e}function LP(){VR(()=>UP());}function FP(){let e=process.argv[1];if(e===void 0)return false;try{return realpathSync(e)===realpathSync(fileURLToPath(import.meta.url))}catch{return false}}FP()&&(process.argv[2]==="--view"?g$(dv.parse({project:process.cwd()})).then(({url:e})=>process.stdout.write(`Animation view: ${e}
82
80
  `),e=>{process.stderr.write(`${e instanceof Error?e.message:String(e)}
83
- `),process.exitCode=1;}):qP());/*! Bundled license information:
81
+ `),process.exitCode=1;}):LP());/*! Bundled license information:
84
82
 
85
83
  @modelcontextprotocol/server/dist/src-CX2iR2pK.mjs:
86
84
  (*!
@@ -88,4 +86,4 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
88
86
  * Copyright(c) 2015 Douglas Christopher Wilson
89
87
  * MIT Licensed
90
88
  *)
91
- */export{FP as createAnimationServer,qP as runServer};
89
+ */export{UP as createAnimationServer,LP as runServer};