anilist-mcp-server 0.6.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +37 -0
- package/PRIVACY.md +70 -78
- package/README.md +28 -28
- package/SECURITY.md +50 -54
- package/dist/index.js +95 -95
- package/package.json +2 -5
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var Dw=Object.defineProperty;var Vt=(e,t)=>{for(var n in t)Dw(e,n,{get:t[n],enumerable:!0})};var Uw=Object.create,Oa=Object.defineProperty,Fw=Object.getOwnPropertyDescriptor,Vw=Object.getOwnPropertyNames,Zw=Object.getPrototypeOf,Hw=Object.prototype.hasOwnProperty,Z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),yv=(e,t)=>{let n={};for(var i in e)Oa(n,i,{get:e[i],enumerable:!0});return t&&Oa(n,Symbol.toStringTag,{value:"Module"}),n},Jw=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(var r=Vw(t),o=0,a=r.length,s;o<a;o++)s=r[o],!Hw.call(e,s)&&s!==n&&Oa(e,s,{get:(l=>t[l]).bind(null,s),enumerable:!(i=Fw(t,s))||i.enumerable});return e},Na=(e,t,n)=>(n=e!=null?Uw(Zw(e)):{},Jw(t||!e||!e.__esModule?Oa(n,"default",{value:e,enumerable:!0}):n,e));var Gw=new Set(["https://json-schema.org/draft/2020-12/schema","http://json-schema.org/draft/2020-12/schema"]),_v=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]),Bw=new Set(["https://json-schema.org/draft-07/schema","http://json-schema.org/draft-07/schema"]),Kw=new Set(["https://json-schema.org/draft-06/schema","http://json-schema.org/draft-06/schema"]);function bv(e){return typeof e=="string"&&_v.has(e.replace(/#$/,""))}function Sv(e,t){if(!("$schema"in e)||typeof e.$schema!="string")return"2020-12";let n=e.$schema.replace(/#$/,"");if(Gw.has(n))return"2020-12";if(_v.has(n))return"2019-09";if(Bw.has(n)||Kw.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 c={};Vt(c,{$brand:()=>Gu,$input:()=>hp,$output:()=>pp,NEVER:()=>Ki,TimePrecision:()=>yp,ZodAny:()=>nf,ZodArray:()=>cf,ZodBase64:()=>cc,ZodBase64URL:()=>lc,ZodBigInt:()=>Wn,ZodBigIntFormat:()=>mc,ZodBoolean:()=>Kn,ZodCIDRv4:()=>ac,ZodCIDRv6:()=>sc,ZodCUID:()=>Qs,ZodCUID2:()=>ec,ZodCatch:()=>Tf,ZodCodec:()=>Ro,ZodCustom:()=>ko,ZodCustomStringFormat:()=>Gn,ZodDate:()=>$o,ZodDefault:()=>$f,ZodDiscriminatedUnion:()=>uf,ZodE164:()=>uc,ZodEmail:()=>Ks,ZodEmoji:()=>Ys,ZodEnum:()=>Zn,ZodError:()=>RR,ZodExactOptional:()=>_f,ZodFile:()=>vf,ZodFirstPartyTypeKind:()=>Df,ZodFunction:()=>Lf,ZodGUID:()=>yo,ZodIPv4:()=>ic,ZodIPv6:()=>oc,ZodISODate:()=>Vs,ZodISODateTime:()=>Fs,ZodISODuration:()=>Hs,ZodISOTime:()=>Zs,ZodIntersection:()=>df,ZodIssueCode:()=>Uf,ZodJWT:()=>dc,ZodKSUID:()=>nc,ZodLazy:()=>Nf,ZodLiteral:()=>gf,ZodMAC:()=>Qh,ZodMap:()=>hf,ZodNaN:()=>Pf,ZodNanoID:()=>Xs,ZodNever:()=>af,ZodNonOptional:()=>vc,ZodNull:()=>rf,ZodNullable:()=>Sf,ZodNumber:()=>Bn,ZodNumberFormat:()=>Wr,ZodObject:()=>wo,ZodOptional:()=>gc,ZodPipe:()=>Io,ZodPrefault:()=>zf,ZodPreprocess:()=>xf,ZodPromise:()=>Cf,ZodReadonly:()=>jf,ZodRealError:()=>ht,ZodRecord:()=>Vn,ZodSet:()=>ff,ZodString:()=>Hn,ZodStringFormat:()=>xe,ZodSuccess:()=>kf,ZodSymbol:()=>ef,ZodTemplateLiteral:()=>Of,ZodTransform:()=>yf,ZodTuple:()=>mf,ZodType:()=>$e,ZodULID:()=>tc,ZodURL:()=>So,ZodUUID:()=>Lt,ZodUndefined:()=>tf,ZodUnion:()=>zo,ZodUnknown:()=>of,ZodVoid:()=>sf,ZodXID:()=>rc,ZodXor:()=>lf,_ZodString:()=>Bs,_default:()=>wf,_function:()=>rb,any:()=>pc,array:()=>O,base64:()=>S_,base64url:()=>$_,bigint:()=>A_,boolean:()=>te,catch:()=>Ef,check:()=>nb,cidrv4:()=>__,cidrv6:()=>b_,clone:()=>at,codec:()=>X_,coerce:()=>To,config:()=>Me,core:()=>Jt,cuid:()=>d_,cuid2:()=>m_,custom:()=>ib,date:()=>M_,decode:()=>Jh,decodeAsync:()=>Bh,describe:()=>ob,discriminatedUnion:()=>fr,e164:()=>w_,email:()=>Ws,emoji:()=>l_,encode:()=>Hh,encodeAsync:()=>Gh,endsWith:()=>On,enum:()=>fe,exactOptional:()=>bf,file:()=>B_,flattenError:()=>no,float32:()=>E_,float64:()=>P_,formatError:()=>io,fromJSONSchema:()=>db,function:()=>rb,getErrorMap:()=>ER,globalRegistry:()=>Xe,gt:()=>Nt,gte:()=>ct,guid:()=>n_,hash:()=>T_,hex:()=>k_,hostname:()=>R_,httpUrl:()=>c_,includes:()=>jn,instanceof:()=>sb,int:()=>Js,int32:()=>x_,int64:()=>O_,intersection:()=>Tt,invertCodec:()=>Q_,ipv4:()=>g_,ipv6:()=>y_,iso:()=>_t,json:()=>lb,jwt:()=>z_,keyof:()=>D_,ksuid:()=>f_,lazy:()=>gr,length:()=>Br,literal:()=>N,locales:()=>po,looseObject:()=>ue,looseRecord:()=>Z_,lowercase:()=>Pn,lt:()=>Ot,lte:()=>yt,mac:()=>v_,map:()=>H_,maxLength:()=>Gr,maxSize:()=>dr,meta:()=>ab,mime:()=>Nn,minLength:()=>Ht,minSize:()=>Ct,multipleOf:()=>ur,nan:()=>Y_,nanoid:()=>u_,nativeEnum:()=>G_,negative:()=>As,never:()=>hc,nonnegative:()=>Ns,nonoptional:()=>Rf,nonpositive:()=>Os,normalize:()=>Cn,null:()=>qt,nullable:()=>_o,nullish:()=>K_,number:()=>H,object:()=>T,optional:()=>ae,overwrite:()=>kt,parse:()=>Fh,parseAsync:()=>Vh,partialRecord:()=>V_,pipe:()=>Gs,positive:()=>js,prefault:()=>If,preprocess:()=>Gt,prettifyError:()=>ad,promise:()=>tb,property:()=>Cs,readonly:()=>Af,record:()=>Q,refine:()=>qf,regex:()=>En,regexes:()=>vt,registry:()=>ds,safeDecode:()=>Wh,safeDecodeAsync:()=>Xh,safeEncode:()=>Kh,safeEncodeAsync:()=>Yh,safeParse:()=>vo,safeParseAsync:()=>Zh,set:()=>J_,setErrorMap:()=>TR,size:()=>Jr,slugify:()=>Dn,startsWith:()=>An,strictObject:()=>U_,string:()=>m,stringFormat:()=>I_,stringbool:()=>cb,success:()=>W_,superRefine:()=>Mf,symbol:()=>C_,templateLiteral:()=>eb,toJSONSchema:()=>Kr,toLowerCase:()=>qn,toUpperCase:()=>Mn,transform:()=>fc,treeifyError:()=>od,trim:()=>Ln,tuple:()=>pf,uint32:()=>j_,uint64:()=>N_,ulid:()=>p_,undefined:()=>L_,union:()=>ie,unknown:()=>oe,uppercase:()=>xn,url:()=>Jn,util:()=>K,uuid:()=>i_,uuidv4:()=>o_,uuidv6:()=>a_,uuidv7:()=>s_,void:()=>q_,xid:()=>h_,xor:()=>F_});var Jt={};Vt(Jt,{$ZodAny:()=>Nm,$ZodArray:()=>Dm,$ZodAsyncError:()=>Rt,$ZodBase64:()=>Im,$ZodBase64URL:()=>Rm,$ZodBigInt:()=>ns,$ZodBigIntFormat:()=>xm,$ZodBoolean:()=>co,$ZodCIDRv4:()=>$m,$ZodCIDRv6:()=>wm,$ZodCUID:()=>um,$ZodCUID2:()=>dm,$ZodCatch:()=>ip,$ZodCheck:()=>Ae,$ZodCheckBigIntFormat:()=>Dd,$ZodCheckEndsWith:()=>Xd,$ZodCheckGreaterThan:()=>Ya,$ZodCheckIncludes:()=>Wd,$ZodCheckLengthEquals:()=>Jd,$ZodCheckLessThan:()=>Wa,$ZodCheckLowerCase:()=>Bd,$ZodCheckMaxLength:()=>Zd,$ZodCheckMaxSize:()=>Ud,$ZodCheckMimeType:()=>em,$ZodCheckMinLength:()=>Hd,$ZodCheckMinSize:()=>Fd,$ZodCheckMultipleOf:()=>qd,$ZodCheckNumberFormat:()=>Md,$ZodCheckOverwrite:()=>tm,$ZodCheckProperty:()=>Qd,$ZodCheckRegex:()=>Gd,$ZodCheckSizeEquals:()=>Vd,$ZodCheckStartsWith:()=>Yd,$ZodCheckStringFormat:()=>kn,$ZodCheckUpperCase:()=>Kd,$ZodCodec:()=>uo,$ZodCustom:()=>mp,$ZodCustomStringFormat:()=>Em,$ZodDate:()=>Mm,$ZodDefault:()=>ep,$ZodDiscriminatedUnion:()=>Vm,$ZodE164:()=>km,$ZodEmail:()=>am,$ZodEmoji:()=>cm,$ZodEncodeError:()=>or,$ZodEnum:()=>Bm,$ZodError:()=>ro,$ZodExactOptional:()=>Xm,$ZodFile:()=>Wm,$ZodFunction:()=>lp,$ZodGUID:()=>im,$ZodIPv4:()=>_m,$ZodIPv6:()=>bm,$ZodISODate:()=>gm,$ZodISODateTime:()=>fm,$ZodISODuration:()=>ym,$ZodISOTime:()=>vm,$ZodIntersection:()=>Zm,$ZodJWT:()=>Tm,$ZodKSUID:()=>hm,$ZodLazy:()=>dp,$ZodLiteral:()=>Km,$ZodMAC:()=>Sm,$ZodMap:()=>Jm,$ZodNaN:()=>op,$ZodNanoID:()=>lm,$ZodNever:()=>Lm,$ZodNonOptional:()=>rp,$ZodNull:()=>Om,$ZodNullable:()=>Qm,$ZodNumber:()=>rs,$ZodNumberFormat:()=>Pm,$ZodObject:()=>Xv,$ZodObjectJIT:()=>Um,$ZodOptional:()=>os,$ZodPipe:()=>as,$ZodPrefault:()=>tp,$ZodPreprocess:()=>ap,$ZodPromise:()=>up,$ZodReadonly:()=>sp,$ZodRealError:()=>pt,$ZodRecord:()=>Hm,$ZodRegistry:()=>us,$ZodSet:()=>Gm,$ZodString:()=>Hr,$ZodStringFormat:()=>Pe,$ZodSuccess:()=>np,$ZodSymbol:()=>jm,$ZodTemplateLiteral:()=>cp,$ZodTransform:()=>Ym,$ZodTuple:()=>is,$ZodType:()=>ge,$ZodULID:()=>mm,$ZodURL:()=>sm,$ZodUUID:()=>om,$ZodUndefined:()=>Am,$ZodUnion:()=>lo,$ZodUnknown:()=>Cm,$ZodVoid:()=>qm,$ZodXID:()=>pm,$ZodXor:()=>Fm,$brand:()=>Gu,$constructor:()=>A,$input:()=>hp,$output:()=>pp,Doc:()=>so,JSONSchema:()=>e_,JSONSchemaGenerator:()=>Ds,NEVER:()=>Ki,TimePrecision:()=>yp,_any:()=>Mp,_array:()=>Jp,_base64:()=>Ts,_base64url:()=>Es,_bigint:()=>jp,_boolean:()=>Pp,_catch:()=>yR,_check:()=>Qy,_cidrv4:()=>Rs,_cidrv6:()=>ks,_coercedBigint:()=>Ap,_coercedBoolean:()=>xp,_coercedDate:()=>Zp,_coercedNumber:()=>zp,_coercedString:()=>gp,_cuid:()=>_s,_cuid2:()=>bs,_custom:()=>Bp,_date:()=>Vp,_decode:()=>Ua,_decodeAsync:()=>Va,_default:()=>fR,_discriminatedUnion:()=>nR,_e164:()=>Ps,_email:()=>ms,_emoji:()=>vs,_encode:()=>Da,_encodeAsync:()=>Fa,_endsWith:()=>On,_enum:()=>lR,_file:()=>Gp,_float32:()=>Rp,_float64:()=>kp,_gt:()=>Nt,_gte:()=>ct,_guid:()=>ho,_includes:()=>jn,_int:()=>Ip,_int32:()=>Tp,_int64:()=>Op,_intersection:()=>iR,_ipv4:()=>zs,_ipv6:()=>Is,_isoDate:()=>bp,_isoDateTime:()=>_p,_isoDuration:()=>$p,_isoTime:()=>Sp,_jwt:()=>xs,_ksuid:()=>ws,_lazy:()=>$R,_length:()=>Br,_literal:()=>dR,_lowercase:()=>Pn,_lt:()=>Ot,_lte:()=>yt,_mac:()=>vp,_map:()=>sR,_max:()=>yt,_maxLength:()=>Gr,_maxSize:()=>dr,_mime:()=>Nn,_min:()=>ct,_minLength:()=>Ht,_minSize:()=>Ct,_multipleOf:()=>ur,_nan:()=>Hp,_nanoid:()=>ys,_nativeEnum:()=>uR,_negative:()=>As,_never:()=>Up,_nonnegative:()=>Ns,_nonoptional:()=>gR,_nonpositive:()=>Os,_normalize:()=>Cn,_null:()=>qp,_nullable:()=>hR,_number:()=>wp,_optional:()=>pR,_overwrite:()=>kt,_parse:()=>wn,_parseAsync:()=>zn,_pipe:()=>_R,_positive:()=>js,_promise:()=>wR,_property:()=>Cs,_readonly:()=>bR,_record:()=>aR,_refine:()=>Kp,_regex:()=>En,_safeDecode:()=>Ha,_safeDecodeAsync:()=>Ga,_safeEncode:()=>Za,_safeEncodeAsync:()=>Ja,_safeParse:()=>In,_safeParseAsync:()=>Rn,_set:()=>cR,_size:()=>Jr,_slugify:()=>Dn,_startsWith:()=>An,_string:()=>fp,_stringFormat:()=>Un,_stringbool:()=>Qp,_success:()=>vR,_superRefine:()=>Wp,_symbol:()=>Cp,_templateLiteral:()=>SR,_toLowerCase:()=>qn,_toUpperCase:()=>Mn,_transform:()=>mR,_trim:()=>Ln,_tuple:()=>oR,_uint32:()=>Ep,_uint64:()=>Np,_ulid:()=>Ss,_undefined:()=>Lp,_union:()=>tR,_unknown:()=>Dp,_uppercase:()=>xn,_url:()=>fo,_uuid:()=>ps,_uuidv4:()=>hs,_uuidv6:()=>fs,_uuidv7:()=>gs,_void:()=>Fp,_xid:()=>$s,_xor:()=>rR,clone:()=>at,config:()=>Me,createStandardJSONSchemaMethod:()=>Fn,createToJSONSchemaMethod:()=>eh,decode:()=>wz,decodeAsync:()=>Iz,describe:()=>Yp,encode:()=>$z,encodeAsync:()=>zz,extractDefs:()=>pr,finalize:()=>hr,flattenError:()=>no,formatError:()=>io,globalConfig:()=>Fr,globalRegistry:()=>Xe,initializeContext:()=>mr,isValidBase64:()=>zm,isValidBase64URL:()=>Bv,isValidJWT:()=>Kv,locales:()=>po,meta:()=>Xp,parse:()=>qa,parseAsync:()=>Ma,prettifyError:()=>ad,process:()=>Ee,regexes:()=>vt,registry:()=>ds,safeDecode:()=>kz,safeDecodeAsync:()=>Ez,safeEncode:()=>Rz,safeEncodeAsync:()=>Tz,safeParse:()=>sd,safeParseAsync:()=>cd,toDotPath:()=>kv,toJSONSchema:()=>Kr,treeifyError:()=>od,util:()=>K,version:()=>rm});var $v,Ki=Object.freeze({status:"aborted"});function A(e,t,n){function i(s,l){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:l,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,l);let u=a.prototype,d=Object.keys(u);for(let p=0;p<d.length;p++){let f=d[p];f in s||(s[f]=u[f].bind(s))}}let r=n?.Parent??Object;class o extends r{}Object.defineProperty(o,"name",{value:e});function a(s){var l;let u=n?.Parent?new o:this;i(u,s),(l=u._zod).deferred??(l.deferred=[]);for(let d of u._zod.deferred)d();return u}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>n?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var Gu=Symbol("zod_brand"),Rt=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},or=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};($v=globalThis).__zod_globalConfig??($v.__zod_globalConfig={});var Fr=globalThis.__zod_globalConfig;function Me(e){return e&&Object.assign(Fr,e),Fr}var K={};Vt(K,{BIGINT_FORMAT_RANGES:()=>nd,Class:()=>Ku,NUMBER_FORMAT_RANGES:()=>rd,aborted:()=>lr,allowsEval:()=>Xu,assert:()=>ez,assertEqual:()=>Ww,assertIs:()=>Xw,assertNever:()=>Qw,assertNotEqual:()=>Yw,assignProp:()=>sr,base64ToUint8Array:()=>zv,base64urlToUint8Array:()=>vz,cached:()=>Sn,captureStackTrace:()=>La,cleanEnum:()=>gz,cleanRegex:()=>Xi,clone:()=>at,cloneDef:()=>rz,createTransparentProxy:()=>cz,defineLazy:()=>Ie,esc:()=>Ca,escapeRegex:()=>$t,explicitlyAborted:()=>id,extend:()=>dz,finalizeIssue:()=>st,floatSafeRemainder:()=>Wu,getElementAtPath:()=>nz,getEnumValues:()=>Yi,getLengthableOrigin:()=>to,getParsedType:()=>sz,getSizableOrigin:()=>eo,hexToUint8Array:()=>_z,isObject:()=>Vr,isPlainObject:()=>cr,issue:()=>$n,joinValues:()=>q,jsonStringifyReplacer:()=>bn,merge:()=>pz,mergeDefs:()=>Zt,normalizeParams:()=>W,nullish:()=>ar,numKeys:()=>az,objectClone:()=>tz,omit:()=>uz,optionalKeys:()=>td,parsedType:()=>B,partial:()=>hz,pick:()=>lz,prefixIssues:()=>mt,primitiveTypes:()=>ed,promiseAllObject:()=>iz,propertyKeyTypes:()=>Qi,randomString:()=>oz,required:()=>fz,safeExtend:()=>mz,shallowClone:()=>Qu,slugify:()=>Yu,stringifyPrimitive:()=>G,uint8ArrayToBase64:()=>Iv,uint8ArrayToBase64url:()=>yz,uint8ArrayToHex:()=>bz,unwrapMessage:()=>Wi});function Ww(e){return e}function Yw(e){return e}function Xw(e){}function Qw(e){throw new Error("Unexpected value in exhaustive check")}function ez(e){}function Yi(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,r])=>t.indexOf(+i)===-1).map(([i,r])=>r)}function q(e,t="|"){return e.map(n=>G(n)).join(t)}function bn(e,t){return typeof t=="bigint"?t.toString():t}function Sn(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function ar(e){return e==null}function Xi(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function Wu(e,t){let n=e/t,i=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-i)<r?0:n-i}var wv=Symbol("evaluating");function Ie(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==wv)return i===void 0&&(i=wv,i=n()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function tz(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function sr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Zt(...e){let t={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function rz(e){return Zt(e._zod.def)}function nz(e,t){return t?t.reduce((n,i)=>n?.[i],e):e}function iz(e){let t=Object.keys(e),n=t.map(i=>e[i]);return Promise.all(n).then(i=>{let r={};for(let o=0;o<t.length;o++)r[t[o]]=i[o];return r})}function oz(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=t[Math.floor(Math.random()*t.length)];return n}function Ca(e){return JSON.stringify(e)}function Yu(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var La="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Vr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Xu=Sn(()=>{if(Fr.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function cr(e){if(Vr(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(Vr(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Qu(e){return cr(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function az(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var sz=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}`)}},Qi=new Set(["string","number","symbol"]),ed=new Set(["string","number","bigint","boolean","symbol","undefined"]);function $t(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function at(e,t,n){let i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}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 cz(e){let t;return new Proxy({},{get(n,i,r){return t??(t=e()),Reflect.get(t,i,r)},set(n,i,r,o){return t??(t=e()),Reflect.set(t,i,r,o)},has(n,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(n,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(n,i,r){return t??(t=e()),Reflect.defineProperty(t,i,r)}})}function G(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function td(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var rd={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]},nd={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function lz(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=Zt(e._zod.def,{get shape(){let a={};for(let s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(a[s]=n.shape[s])}return sr(this,"shape",a),a},checks:[]});return at(e,o)}function uz(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=Zt(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete a[s]}return sr(this,"shape",a),a},checks:[]});return at(e,o)}function dz(e,t){if(!cr(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let o=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=Zt(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return sr(this,"shape",o),o}});return at(e,r)}function mz(e,t){if(!cr(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Zt(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return sr(this,"shape",i),i}});return at(e,n)}function pz(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=Zt(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return sr(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return at(e,n)}function hz(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 a=Zt(t._zod.def,{get shape(){let s=t._zod.def.shape,l={...s};if(n)for(let u in n){if(!(u in s))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(l[u]=e?new e({type:"optional",innerType:s[u]}):s[u])}else for(let u in s)l[u]=e?new e({type:"optional",innerType:s[u]}):s[u];return sr(this,"shape",l),l},checks:[]});return at(t,a)}function fz(e,t,n){let i=Zt(t._zod.def,{get shape(){let r=t._zod.def.shape,o={...r};if(n)for(let a in n){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(o[a]=new e({type:"nonoptional",innerType:r[a]}))}else for(let a in r)o[a]=new e({type:"nonoptional",innerType:r[a]});return sr(this,"shape",o),o}});return at(t,i)}function lr(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function id(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function mt(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function Wi(e){return typeof e=="string"?e:e?.message}function st(e,t,n){let i=e.message?e.message:Wi(e.inst?._zod.def?.error?.(e))??Wi(t?.error?.(e))??Wi(n.customError?.(e))??Wi(n.localeError?.(e))??"Invalid input",{inst:r,continue:o,input:a,...s}=e;return s.path??(s.path=[]),s.message=i,t?.reportInput&&(s.input=a),s}function eo(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function to(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function B(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 $n(...e){let[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function gz(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function zv(e){let t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}function Iv(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function vz(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return zv(t+n)}function yz(e){return Iv(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function _z(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 i=0;i<t.length;i+=2)n[i/2]=Number.parseInt(t.slice(i,i+2),16);return n}function bz(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var Ku=class{constructor(...t){}};var Rv=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,bn,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},ro=A("$ZodError",Rv),pt=A("$ZodError",Rv,{Parent:Error});function no(e,t=n=>n.message){let n={},i=[];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))):i.push(t(r));return{formErrors:i,fieldErrors:n}}function io(e,t=n=>n.message){let n={_errors:[]},i=(r,o=[])=>{for(let a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>i({issues:s},[...o,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...o,...a.path]);else{let s=[...o,...a.path];if(s.length===0)n._errors.push(t(a));else{let l=n,u=0;for(;u<s.length;){let d=s[u];u===s.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(t(a))):l[d]=l[d]||{_errors:[]},l=l[d],u++}}}};return i(e),n}function od(e,t=n=>n.message){let n={errors:[]},i=(r,o=[])=>{var a,s;for(let l of r.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(u=>i({issues:u},[...o,...l.path]));else if(l.code==="invalid_key")i({issues:l.issues},[...o,...l.path]);else if(l.code==="invalid_element")i({issues:l.issues},[...o,...l.path]);else{let u=[...o,...l.path];if(u.length===0){n.errors.push(t(l));continue}let d=n,p=0;for(;p<u.length;){let f=u[p],b=p===u.length-1;typeof f=="string"?(d.properties??(d.properties={}),(a=d.properties)[f]??(a[f]={errors:[]}),d=d.properties[f]):(d.items??(d.items=[]),(s=d.items)[f]??(s[f]={errors:[]}),d=d.items[f]),b&&d.errors.push(t(l)),p++}}};return i(e),n}function kv(e){let t=[],n=e.map(i=>typeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function ad(e){let t=[],n=[...e.issues].sort((i,r)=>(i.path??[]).length-(r.path??[]).length);for(let i of n)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${kv(i.path)}`);return t.join(`
|
|
3
|
-
`)}var wn=e=>(t,n,i,r)=>{let o=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise)throw new Rt;if(a.issues.length){let s=new(r?.Err??e)(a.issues.map(l=>st(l,o,Me())));throw La(s,r?.callee),s}return a.value},qa=wn(pt),zn=e=>async(t,n,i,r)=>{let o=i?{...i,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(r?.Err??e)(a.issues.map(l=>st(l,o,Me())));throw La(s,r?.callee),s}return a.value},Ma=zn(pt),In=e=>(t,n,i)=>{let r=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new Rt;return o.issues.length?{success:!1,error:new(e??ro)(o.issues.map(a=>st(a,r,Me())))}:{success:!0,data:o.value}},sd=In(pt),Rn=e=>async(t,n,i)=>{let r=i?{...i,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(a=>st(a,r,Me())))}:{success:!0,data:o.value}},cd=Rn(pt),Da=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return wn(e)(t,n,r)},$z=Da(pt),Ua=e=>(t,n,i)=>wn(e)(t,n,i),wz=Ua(pt),Fa=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return zn(e)(t,n,r)},zz=Fa(pt),Va=e=>async(t,n,i)=>zn(e)(t,n,i),Iz=Va(pt),Za=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return In(e)(t,n,r)},Rz=Za(pt),Ha=e=>(t,n,i)=>In(e)(t,n,i),kz=Ha(pt),Ja=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Rn(e)(t,n,r)},Tz=Ja(pt),Ga=e=>async(t,n,i)=>Rn(e)(t,n,i),Ez=Ga(pt);var vt={};Vt(vt,{base64:()=>zd,base64url:()=>Ba,bigint:()=>xd,boolean:()=>Ad,browserEmail:()=>Lz,cidrv4:()=>$d,cidrv6:()=>wd,cuid:()=>ld,cuid2:()=>ud,date:()=>kd,datetime:()=>Ed,domain:()=>Dz,duration:()=>fd,e164:()=>Rd,email:()=>vd,emoji:()=>yd,extendedDuration:()=>Pz,guid:()=>gd,hex:()=>Uz,hostname:()=>Mz,html5Email:()=>Oz,httpProtocol:()=>Id,idnEmail:()=>Cz,integer:()=>jd,ipv4:()=>_d,ipv6:()=>bd,ksuid:()=>pd,lowercase:()=>Cd,mac:()=>Sd,md5_base64:()=>Vz,md5_base64url:()=>Zz,md5_hex:()=>Fz,nanoid:()=>hd,null:()=>Od,number:()=>Ka,rfc5322Email:()=>Nz,sha1_base64:()=>Jz,sha1_base64url:()=>Gz,sha1_hex:()=>Hz,sha256_base64:()=>Kz,sha256_base64url:()=>Wz,sha256_hex:()=>Bz,sha384_base64:()=>Xz,sha384_base64url:()=>Qz,sha384_hex:()=>Yz,sha512_base64:()=>tI,sha512_base64url:()=>rI,sha512_hex:()=>eI,string:()=>Pd,time:()=>Td,ulid:()=>dd,undefined:()=>Nd,unicodeEmail:()=>Tv,uppercase:()=>Ld,uuid:()=>Zr,uuid4:()=>xz,uuid6:()=>jz,uuid7:()=>Az,xid:()=>md});var ld=/^[cC][0-9a-z]{6,}$/,ud=/^[0-9a-z]+$/,dd=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,md=/^[0-9a-vA-V]{20}$/,pd=/^[A-Za-z0-9]{27}$/,hd=/^[a-zA-Z0-9_-]{21}$/,fd=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Pz=/^[-+]?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)?)??$/,gd=/^([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})$/,Zr=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)$/,xz=Zr(4),jz=Zr(6),Az=Zr(7),vd=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Oz=/^[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])?)*$/,Nz=/^(([^<>()\[\]\\.,;:\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,Cz=Tv,Lz=/^[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])?)*$/,qz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function yd(){return new RegExp(qz,"u")}var _d=/^(?:(?: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])$/,bd=/^(([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}|:))$/,Sd=e=>{let t=$t(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},$d=/^((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])$/,wd=/^(([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])$/,zd=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Ba=/^[A-Za-z0-9_-]*$/,Mz=/^(?=.{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])?)*\.?$/,Dz=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Id=/^https?$/,Rd=/^\+[1-9]\d{6,14}$/,Ev="(?:(?:\\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])))",kd=new RegExp(`^${Ev}$`);function Pv(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 Td(e){return new RegExp(`^${Pv(e)}$`)}function Ed(e){let t=Pv({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${n.join("|")})`;return new RegExp(`^${Ev}T(?:${i})$`)}var Pd=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},xd=/^-?\d+n?$/,jd=/^-?\d+$/,Ka=/^-?\d+(?:\.\d+)?$/,Ad=/^(?:true|false)$/i,Od=/^null$/i;var Nd=/^undefined$/i;var Cd=/^[^A-Z]*$/,Ld=/^[^a-z]*$/,Uz=/^[0-9a-fA-F]*$/;function oo(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function ao(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Fz=/^[0-9a-fA-F]{32}$/,Vz=oo(22,"=="),Zz=ao(22),Hz=/^[0-9a-fA-F]{40}$/,Jz=oo(27,"="),Gz=ao(27),Bz=/^[0-9a-fA-F]{64}$/,Kz=oo(43,"="),Wz=ao(43),Yz=/^[0-9a-fA-F]{96}$/,Xz=oo(64,""),Qz=ao(64),eI=/^[0-9a-fA-F]{128}$/,tI=oo(86,"=="),rI=ao(86);var Ae=A("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),jv={number:"number",bigint:"bigint",object:"date"},Wa=A("$ZodCheckLessThan",(e,t)=>{Ae.init(e,t);let n=jv[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ya=A("$ZodCheckGreaterThan",(e,t)=>{Ae.init(e,t);let n=jv[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),qd=A("$ZodCheckMultipleOf",(e,t)=>{Ae.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.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):Wu(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})}}),Md=A("$ZodCheckNumberFormat",(e,t)=>{Ae.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),i=n?"int":"number",[r,o]=rd[t.format];e._zod.onattach.push(a=>{let s=a._zod.bag;s.format=t.format,s.minimum=r,s.maximum=o,n&&(s.pattern=jd)}),e._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s)){a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}s<r&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Dd=A("$ZodCheckBigIntFormat",(e,t)=>{Ae.init(e,t);let[n,i]=nd[t.format];e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,o.minimum=n,o.maximum=i}),e._zod.check=r=>{let o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>i&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Ud=A("$ZodCheckMaxSize",(e,t)=>{var n;Ae.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!ar(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;r.size<=t.maximum||i.issues.push({origin:eo(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Fd=A("$ZodCheckMinSize",(e,t)=>{var n;Ae.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!ar(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;r.size>=t.minimum||i.issues.push({origin:eo(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Vd=A("$ZodCheckSizeEquals",(e,t)=>{var n;Ae.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!ar(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=i=>{let r=i.value,o=r.size;if(o===t.size)return;let a=o>t.size;i.issues.push({origin:eo(r),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Zd=A("$ZodCheckMaxLength",(e,t)=>{var n;Ae.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!ar(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;if(r.length<=t.maximum)return;let a=to(r);i.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Hd=A("$ZodCheckMinLength",(e,t)=>{var n;Ae.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!ar(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;if(r.length>=t.minimum)return;let a=to(r);i.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Jd=A("$ZodCheckLengthEquals",(e,t)=>{var n;Ae.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!ar(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=i=>{let r=i.value,o=r.length;if(o===t.length)return;let a=to(r),s=o>t.length;i.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),kn=A("$ZodCheckStringFormat",(e,t)=>{var n,i;Ae.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.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})}):(i=e._zod).check??(i.check=()=>{})}),Gd=A("$ZodCheckRegex",(e,t)=>{kn.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})}}),Bd=A("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Cd),kn.init(e,t)}),Kd=A("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Ld),kn.init(e,t)}),Wd=A("$ZodCheckIncludes",(e,t)=>{Ae.init(e,t);let n=$t(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),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})}}),Yd=A("$ZodCheckStartsWith",(e,t)=>{Ae.init(e,t);let n=new RegExp(`^${$t(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),Xd=A("$ZodCheckEndsWith",(e,t)=>{Ae.init(e,t);let n=new RegExp(`.*${$t(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function xv(e,t,n){e.issues.length&&t.issues.push(...mt(n,e.issues))}var Qd=A("$ZodCheckProperty",(e,t)=>{Ae.init(e,t),e._zod.check=n=>{let i=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(r=>xv(r,n,t.property));xv(i,n,t.property)}}),em=A("$ZodCheckMimeType",(e,t)=>{Ae.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),tm=A("$ZodCheckOverwrite",(e,t)=>{Ae.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var so=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 i=t.split(`
|
|
2
|
+
var rz=Object.defineProperty;var Zt=(e,t)=>{for(var n in t)rz(e,n,{get:t[n],enumerable:!0})};var nz=Object.create,Ma=Object.defineProperty,iz=Object.getOwnPropertyDescriptor,oz=Object.getOwnPropertyNames,az=Object.getPrototypeOf,sz=Object.prototype.hasOwnProperty,Z=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ev=(e,t)=>{let n={};for(var i in e)Ma(n,i,{get:e[i],enumerable:!0});return t&&Ma(n,Symbol.toStringTag,{value:"Module"}),n},cz=(e,t,n,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(var r=oz(t),o=0,a=r.length,s;o<a;o++)s=r[o],!sz.call(e,s)&&s!==n&&Ma(e,s,{get:(c=>t[c]).bind(null,s),enumerable:!(i=iz(t,s))||i.enumerable});return e},Da=(e,t,n)=>(n=e!=null?nz(az(e)):{},cz(t||!e||!e.__esModule?Ma(n,"default",{value:e,enumerable:!0}):n,e));var lz=new Set(["https://json-schema.org/draft/2020-12/schema","http://json-schema.org/draft/2020-12/schema"]),Pv=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]),uz=new Set(["https://json-schema.org/draft-07/schema","http://json-schema.org/draft-07/schema"]),dz=new Set(["https://json-schema.org/draft-06/schema","http://json-schema.org/draft-06/schema"]);function xv(e){return typeof e=="string"&&Pv.has(e.replace(/#$/,""))}function jv(e,t){if(!("$schema"in e)||typeof e.$schema!="string")return"2020-12";let n=e.$schema.replace(/#$/,"");if(lz.has(n))return"2020-12";if(Pv.has(n))return"2019-09";if(uz.has(n)||dz.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 l={};Zt(l,{$brand:()=>rd,$input:()=>wp,$output:()=>$p,NEVER:()=>Xi,TimePrecision:()=>kp,ZodAny:()=>pf,ZodArray:()=>vf,ZodBase64:()=>pc,ZodBase64URL:()=>hc,ZodBigInt:()=>Xn,ZodBigIntFormat:()=>vc,ZodBoolean:()=>Yn,ZodCIDRv4:()=>dc,ZodCIDRv6:()=>mc,ZodCUID:()=>ic,ZodCUID2:()=>oc,ZodCatch:()=>Lf,ZodCodec:()=>Eo,ZodCustom:()=>Po,ZodCustomStringFormat:()=>Kn,ZodDate:()=>Io,ZodDefault:()=>xf,ZodDiscriminatedUnion:()=>_f,ZodE164:()=>fc,ZodEmail:()=>ec,ZodEmoji:()=>rc,ZodEnum:()=>Jn,ZodError:()=>FR,ZodExactOptional:()=>Tf,ZodFile:()=>Rf,ZodFirstPartyTypeKind:()=>Kf,ZodFunction:()=>Jf,ZodGUID:()=>So,ZodIPv4:()=>lc,ZodIPv6:()=>uc,ZodISODate:()=>Bs,ZodISODateTime:()=>Gs,ZodISODuration:()=>Ws,ZodISOTime:()=>Ks,ZodIntersection:()=>bf,ZodIssueCode:()=>Wf,ZodJWT:()=>gc,ZodKSUID:()=>cc,ZodLazy:()=>Zf,ZodLiteral:()=>If,ZodMAC:()=>lf,ZodMap:()=>wf,ZodNaN:()=>Mf,ZodNanoID:()=>nc,ZodNever:()=>ff,ZodNonOptional:()=>$c,ZodNull:()=>mf,ZodNullable:()=>Pf,ZodNumber:()=>Wn,ZodNumberFormat:()=>Xr,ZodObject:()=>Ro,ZodOptional:()=>Sc,ZodPipe:()=>To,ZodPrefault:()=>Af,ZodPreprocess:()=>Df,ZodPromise:()=>Hf,ZodReadonly:()=>Uf,ZodRealError:()=>ft,ZodRecord:()=>Hn,ZodSet:()=>zf,ZodString:()=>Gn,ZodStringFormat:()=>xe,ZodSuccess:()=>Nf,ZodSymbol:()=>uf,ZodTemplateLiteral:()=>Vf,ZodTransform:()=>kf,ZodTuple:()=>Sf,ZodType:()=>$e,ZodULID:()=>ac,ZodURL:()=>zo,ZodUUID:()=>Mt,ZodUndefined:()=>df,ZodUnion:()=>ko,ZodUnknown:()=>hf,ZodVoid:()=>gf,ZodXID:()=>sc,ZodXor:()=>yf,_ZodString:()=>Qs,_default:()=>jf,_function:()=>pb,any:()=>yc,array:()=>O,base64:()=>j_,base64url:()=>A_,bigint:()=>Z_,boolean:()=>te,catch:()=>qf,check:()=>hb,cidrv4:()=>P_,cidrv6:()=>x_,clone:()=>st,codec:()=>lb,coerce:()=>xo,config:()=>Me,core:()=>Gt,cuid:()=>$_,cuid2:()=>w_,custom:()=>fb,date:()=>W_,decode:()=>tf,decodeAsync:()=>nf,describe:()=>gb,discriminatedUnion:()=>gr,e164:()=>O_,email:()=>tc,emoji:()=>b_,encode:()=>ef,encodeAsync:()=>rf,endsWith:()=>Nn,enum:()=>ge,exactOptional:()=>Ef,file:()=>ob,flattenError:()=>ao,float32:()=>D_,float64:()=>U_,formatError:()=>so,fromJSONSchema:()=>$b,function:()=>pb,getErrorMap:()=>HR,globalRegistry:()=>Xe,gt:()=>Lt,gte:()=>lt,guid:()=>h_,hash:()=>M_,hex:()=>q_,hostname:()=>L_,httpUrl:()=>__,includes:()=>On,instanceof:()=>yb,int:()=>Ys,int32:()=>F_,int64:()=>H_,intersection:()=>Et,invertCodec:()=>ub,ipv4:()=>k_,ipv6:()=>E_,iso:()=>bt,json:()=>bb,jwt:()=>C_,keyof:()=>Y_,ksuid:()=>R_,lazy:()=>vr,length:()=>Wr,literal:()=>C,locales:()=>go,looseObject:()=>de,looseRecord:()=>tb,lowercase:()=>jn,lt:()=>Nt,lte:()=>_t,mac:()=>T_,map:()=>rb,maxLength:()=>Kr,maxSize:()=>mr,meta:()=>vb,mime:()=>Ln,minLength:()=>Jt,minSize:()=>qt,multipleOf:()=>dr,nan:()=>cb,nanoid:()=>S_,nativeEnum:()=>ib,negative:()=>qs,never:()=>_c,nonnegative:()=>Ds,nonoptional:()=>Cf,nonpositive:()=>Ms,normalize:()=>qn,null:()=>Dt,nullable:()=>$o,nullish:()=>ab,number:()=>H,object:()=>T,optional:()=>se,overwrite:()=>Tt,parse:()=>Yh,parseAsync:()=>Xh,partialRecord:()=>eb,pipe:()=>Xs,positive:()=>Ls,prefault:()=>Of,preprocess:()=>Bt,prettifyError:()=>fd,promise:()=>mb,property:()=>Us,readonly:()=>Ff,record:()=>Q,refine:()=>Gf,regex:()=>xn,regexes:()=>yt,registry:()=>gs,safeDecode:()=>af,safeDecodeAsync:()=>cf,safeEncode:()=>of,safeEncodeAsync:()=>sf,safeParse:()=>bo,safeParseAsync:()=>Qh,set:()=>nb,setErrorMap:()=>ZR,size:()=>Br,slugify:()=>Fn,startsWith:()=>Cn,strictObject:()=>X_,string:()=>m,stringFormat:()=>N_,stringbool:()=>_b,success:()=>sb,superRefine:()=>Bf,symbol:()=>G_,templateLiteral:()=>db,toJSONSchema:()=>Yr,toLowerCase:()=>Dn,toUpperCase:()=>Un,transform:()=>bc,treeifyError:()=>hd,trim:()=>Mn,tuple:()=>$f,uint32:()=>V_,uint64:()=>J_,ulid:()=>z_,undefined:()=>B_,union:()=>ie,unknown:()=>ae,uppercase:()=>An,url:()=>Bn,util:()=>K,uuid:()=>f_,uuidv4:()=>g_,uuidv6:()=>v_,uuidv7:()=>y_,void:()=>K_,xid:()=>I_,xor:()=>Q_});var Gt={};Zt(Gt,{$ZodAny:()=>Zm,$ZodArray:()=>Km,$ZodAsyncError:()=>kt,$ZodBase64:()=>Om,$ZodBase64URL:()=>Cm,$ZodBigInt:()=>cs,$ZodBigIntFormat:()=>Dm,$ZodBoolean:()=>mo,$ZodCIDRv4:()=>xm,$ZodCIDRv6:()=>jm,$ZodCUID:()=>_m,$ZodCUID2:()=>bm,$ZodCatch:()=>pp,$ZodCheck:()=>je,$ZodCheckBigIntFormat:()=>Kd,$ZodCheckEndsWith:()=>sm,$ZodCheckGreaterThan:()=>rs,$ZodCheckIncludes:()=>om,$ZodCheckLengthEquals:()=>tm,$ZodCheckLessThan:()=>ts,$ZodCheckLowerCase:()=>nm,$ZodCheckMaxLength:()=>Qd,$ZodCheckMaxSize:()=>Wd,$ZodCheckMimeType:()=>lm,$ZodCheckMinLength:()=>em,$ZodCheckMinSize:()=>Yd,$ZodCheckMultipleOf:()=>Gd,$ZodCheckNumberFormat:()=>Bd,$ZodCheckOverwrite:()=>um,$ZodCheckProperty:()=>cm,$ZodCheckRegex:()=>rm,$ZodCheckSizeEquals:()=>Xd,$ZodCheckStartsWith:()=>am,$ZodCheckStringFormat:()=>En,$ZodCheckUpperCase:()=>im,$ZodCodec:()=>ho,$ZodCustom:()=>Sp,$ZodCustomStringFormat:()=>qm,$ZodDate:()=>Bm,$ZodDefault:()=>lp,$ZodDiscriminatedUnion:()=>Xm,$ZodE164:()=>Nm,$ZodEmail:()=>fm,$ZodEmoji:()=>vm,$ZodEncodeError:()=>ar,$ZodEnum:()=>np,$ZodError:()=>oo,$ZodExactOptional:()=>sp,$ZodFile:()=>op,$ZodFunction:()=>yp,$ZodGUID:()=>pm,$ZodIPv4:()=>Tm,$ZodIPv6:()=>Em,$ZodISODate:()=>Im,$ZodISODateTime:()=>zm,$ZodISODuration:()=>km,$ZodISOTime:()=>Rm,$ZodIntersection:()=>Qm,$ZodJWT:()=>Lm,$ZodKSUID:()=>wm,$ZodLazy:()=>bp,$ZodLiteral:()=>ip,$ZodMAC:()=>Pm,$ZodMap:()=>tp,$ZodNaN:()=>hp,$ZodNanoID:()=>ym,$ZodNever:()=>Jm,$ZodNonOptional:()=>dp,$ZodNull:()=>Vm,$ZodNullable:()=>cp,$ZodNumber:()=>ss,$ZodNumberFormat:()=>Mm,$ZodObject:()=>ly,$ZodObjectJIT:()=>Wm,$ZodOptional:()=>us,$ZodPipe:()=>ds,$ZodPrefault:()=>up,$ZodPreprocess:()=>fp,$ZodPromise:()=>_p,$ZodReadonly:()=>gp,$ZodRealError:()=>ht,$ZodRecord:()=>ep,$ZodRegistry:()=>fs,$ZodSet:()=>rp,$ZodString:()=>Gr,$ZodStringFormat:()=>Pe,$ZodSuccess:()=>mp,$ZodSymbol:()=>Um,$ZodTemplateLiteral:()=>vp,$ZodTransform:()=>ap,$ZodTuple:()=>ls,$ZodType:()=>ve,$ZodULID:()=>Sm,$ZodURL:()=>gm,$ZodUUID:()=>hm,$ZodUndefined:()=>Fm,$ZodUnion:()=>po,$ZodUnknown:()=>Hm,$ZodVoid:()=>Gm,$ZodXID:()=>$m,$ZodXor:()=>Ym,$brand:()=>rd,$constructor:()=>A,$input:()=>wp,$output:()=>$p,Doc:()=>uo,JSONSchema:()=>d_,JSONSchemaGenerator:()=>Hs,NEVER:()=>Xi,TimePrecision:()=>kp,_any:()=>Bp,_array:()=>th,_base64:()=>As,_base64url:()=>Os,_bigint:()=>Up,_boolean:()=>Mp,_catch:()=>OR,_check:()=>u_,_cidrv4:()=>xs,_cidrv6:()=>js,_coercedBigint:()=>Fp,_coercedBoolean:()=>Dp,_coercedDate:()=>Qp,_coercedNumber:()=>Ap,_coercedString:()=>Ip,_cuid:()=>zs,_cuid2:()=>Is,_custom:()=>nh,_date:()=>Xp,_decode:()=>Ja,_decodeAsync:()=>Ba,_default:()=>xR,_discriminatedUnion:()=>_R,_e164:()=>Cs,_email:()=>vs,_emoji:()=>$s,_encode:()=>Ha,_encodeAsync:()=>Ga,_endsWith:()=>Nn,_enum:()=>IR,_file:()=>rh,_float32:()=>Cp,_float64:()=>Np,_gt:()=>Lt,_gte:()=>lt,_guid:()=>vo,_includes:()=>On,_int:()=>Op,_int32:()=>Lp,_int64:()=>Vp,_intersection:()=>bR,_ipv4:()=>Es,_ipv6:()=>Ps,_isoDate:()=>Ep,_isoDateTime:()=>Tp,_isoDuration:()=>xp,_isoTime:()=>Pp,_jwt:()=>Ns,_ksuid:()=>Ts,_lazy:()=>qR,_length:()=>Wr,_literal:()=>kR,_lowercase:()=>jn,_lt:()=>Nt,_lte:()=>_t,_mac:()=>Rp,_map:()=>wR,_max:()=>_t,_maxLength:()=>Kr,_maxSize:()=>mr,_mime:()=>Ln,_min:()=>lt,_minLength:()=>Jt,_minSize:()=>qt,_multipleOf:()=>dr,_nan:()=>eh,_nanoid:()=>ws,_nativeEnum:()=>RR,_negative:()=>qs,_never:()=>Wp,_nonnegative:()=>Ds,_nonoptional:()=>jR,_nonpositive:()=>Ms,_normalize:()=>qn,_null:()=>Gp,_nullable:()=>PR,_number:()=>jp,_optional:()=>ER,_overwrite:()=>Tt,_parse:()=>In,_parseAsync:()=>Rn,_pipe:()=>CR,_positive:()=>Ls,_promise:()=>MR,_property:()=>Us,_readonly:()=>NR,_record:()=>$R,_refine:()=>ih,_regex:()=>xn,_safeDecode:()=>Wa,_safeDecodeAsync:()=>Xa,_safeEncode:()=>Ka,_safeEncodeAsync:()=>Ya,_safeParse:()=>kn,_safeParseAsync:()=>Tn,_set:()=>zR,_size:()=>Br,_slugify:()=>Fn,_startsWith:()=>Cn,_string:()=>zp,_stringFormat:()=>Vn,_stringbool:()=>ch,_success:()=>AR,_superRefine:()=>oh,_symbol:()=>Hp,_templateLiteral:()=>LR,_toLowerCase:()=>Dn,_toUpperCase:()=>Un,_transform:()=>TR,_trim:()=>Mn,_tuple:()=>SR,_uint32:()=>qp,_uint64:()=>Zp,_ulid:()=>Rs,_undefined:()=>Jp,_union:()=>vR,_unknown:()=>Kp,_uppercase:()=>An,_url:()=>yo,_uuid:()=>ys,_uuidv4:()=>_s,_uuidv6:()=>bs,_uuidv7:()=>Ss,_void:()=>Yp,_xid:()=>ks,_xor:()=>yR,clone:()=>st,config:()=>Me,createStandardJSONSchemaMethod:()=>Zn,createToJSONSchemaMethod:()=>lh,decode:()=>Mz,decodeAsync:()=>Uz,describe:()=>ah,encode:()=>qz,encodeAsync:()=>Dz,extractDefs:()=>hr,finalize:()=>fr,flattenError:()=>ao,formatError:()=>so,globalConfig:()=>Zr,globalRegistry:()=>Xe,initializeContext:()=>pr,isValidBase64:()=>Am,isValidBase64URL:()=>oy,isValidJWT:()=>ay,locales:()=>go,meta:()=>sh,parse:()=>Va,parseAsync:()=>Za,prettifyError:()=>fd,process:()=>Ee,regexes:()=>yt,registry:()=>gs,safeDecode:()=>Vz,safeDecodeAsync:()=>Hz,safeEncode:()=>Fz,safeEncodeAsync:()=>Zz,safeParse:()=>gd,safeParseAsync:()=>vd,toDotPath:()=>qv,toJSONSchema:()=>Yr,treeifyError:()=>hd,util:()=>K,version:()=>dm});var Av,Xi=Object.freeze({status:"aborted"});function A(e,t,n){function i(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),t(s,c);let u=a.prototype,d=Object.keys(u);for(let p=0;p<d.length;p++){let f=d[p];f in s||(s[f]=u[f].bind(s))}}let r=n?.Parent??Object;class o extends r{}Object.defineProperty(o,"name",{value:e});function a(s){var c;let u=n?.Parent?new o:this;i(u,s),(c=u._zod).deferred??(c.deferred=[]);for(let d of u._zod.deferred)d();return u}return Object.defineProperty(a,"init",{value:i}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>n?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var rd=Symbol("zod_brand"),kt=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},ar=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(Av=globalThis).__zod_globalConfig??(Av.__zod_globalConfig={});var Zr=globalThis.__zod_globalConfig;function Me(e){return e&&Object.assign(Zr,e),Zr}var K={};Zt(K,{BIGINT_FORMAT_RANGES:()=>md,Class:()=>id,NUMBER_FORMAT_RANGES:()=>dd,aborted:()=>ur,allowsEval:()=>sd,assert:()=>gz,assertEqual:()=>mz,assertIs:()=>hz,assertNever:()=>fz,assertNotEqual:()=>pz,assignProp:()=>cr,base64ToUint8Array:()=>Cv,base64urlToUint8Array:()=>Az,cached:()=>wn,captureStackTrace:()=>Fa,cleanEnum:()=>jz,cleanRegex:()=>to,clone:()=>st,cloneDef:()=>yz,createTransparentProxy:()=>zz,defineLazy:()=>Ie,esc:()=>Ua,escapeRegex:()=>wt,explicitlyAborted:()=>pd,extend:()=>kz,finalizeIssue:()=>ct,floatSafeRemainder:()=>od,getElementAtPath:()=>_z,getEnumValues:()=>eo,getLengthableOrigin:()=>io,getParsedType:()=>wz,getSizableOrigin:()=>no,hexToUint8Array:()=>Cz,isObject:()=>Hr,isPlainObject:()=>lr,issue:()=>zn,joinValues:()=>q,jsonStringifyReplacer:()=>$n,merge:()=>Ez,mergeDefs:()=>Ht,normalizeParams:()=>W,nullish:()=>sr,numKeys:()=>$z,objectClone:()=>vz,omit:()=>Rz,optionalKeys:()=>ud,parsedType:()=>B,partial:()=>Pz,pick:()=>Iz,prefixIssues:()=>pt,primitiveTypes:()=>ld,promiseAllObject:()=>bz,propertyKeyTypes:()=>ro,randomString:()=>Sz,required:()=>xz,safeExtend:()=>Tz,shallowClone:()=>cd,slugify:()=>ad,stringifyPrimitive:()=>G,uint8ArrayToBase64:()=>Nv,uint8ArrayToBase64url:()=>Oz,uint8ArrayToHex:()=>Nz,unwrapMessage:()=>Qi});function mz(e){return e}function pz(e){return e}function hz(e){}function fz(e){throw new Error("Unexpected value in exhaustive check")}function gz(e){}function eo(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,r])=>t.indexOf(+i)===-1).map(([i,r])=>r)}function q(e,t="|"){return e.map(n=>G(n)).join(t)}function $n(e,t){return typeof t=="bigint"?t.toString():t}function wn(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function sr(e){return e==null}function to(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function od(e,t){let n=e/t,i=Math.round(n),r=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-i)<r?0:n-i}var Ov=Symbol("evaluating");function Ie(e,t,n){let i;Object.defineProperty(e,t,{get(){if(i!==Ov)return i===void 0&&(i=Ov,i=n()),i},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})}function vz(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function cr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ht(...e){let t={};for(let n of e){let i=Object.getOwnPropertyDescriptors(n);Object.assign(t,i)}return Object.defineProperties({},t)}function yz(e){return Ht(e._zod.def)}function _z(e,t){return t?t.reduce((n,i)=>n?.[i],e):e}function bz(e){let t=Object.keys(e),n=t.map(i=>e[i]);return Promise.all(n).then(i=>{let r={};for(let o=0;o<t.length;o++)r[t[o]]=i[o];return r})}function Sz(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let i=0;i<e;i++)n+=t[Math.floor(Math.random()*t.length)];return n}function Ua(e){return JSON.stringify(e)}function ad(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Fa="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Hr(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var sd=wn(()=>{if(Zr.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function lr(e){if(Hr(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(Hr(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function cd(e){return lr(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function $z(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var wz=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}`)}},ro=new Set(["string","number","symbol"]),ld=new Set(["string","number","bigint","boolean","symbol","undefined"]);function wt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function st(e,t,n){let i=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(i._zod.parent=e),i}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 zz(e){let t;return new Proxy({},{get(n,i,r){return t??(t=e()),Reflect.get(t,i,r)},set(n,i,r,o){return t??(t=e()),Reflect.set(t,i,r,o)},has(n,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(n,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(n,i,r){return t??(t=e()),Reflect.defineProperty(t,i,r)}})}function G(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function ud(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]},md={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Iz(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=Ht(e._zod.def,{get shape(){let a={};for(let s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(a[s]=n.shape[s])}return cr(this,"shape",a),a},checks:[]});return st(e,o)}function Rz(e,t){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=Ht(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let s in t){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete a[s]}return cr(this,"shape",a),a},checks:[]});return st(e,o)}function kz(e,t){if(!lr(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let o=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=Ht(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return cr(this,"shape",o),o}});return st(e,r)}function Tz(e,t){if(!lr(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Ht(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t};return cr(this,"shape",i),i}});return st(e,n)}function Ez(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=Ht(e._zod.def,{get shape(){let i={...e._zod.def.shape,...t._zod.def.shape};return cr(this,"shape",i),i},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return st(e,n)}function Pz(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 a=Ht(t._zod.def,{get shape(){let s=t._zod.def.shape,c={...s};if(n)for(let u in n){if(!(u in s))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(c[u]=e?new e({type:"optional",innerType:s[u]}):s[u])}else for(let u in s)c[u]=e?new e({type:"optional",innerType:s[u]}):s[u];return cr(this,"shape",c),c},checks:[]});return st(t,a)}function xz(e,t,n){let i=Ht(t._zod.def,{get shape(){let r=t._zod.def.shape,o={...r};if(n)for(let a in n){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(o[a]=new e({type:"nonoptional",innerType:r[a]}))}else for(let a in r)o[a]=new e({type:"nonoptional",innerType:r[a]});return cr(this,"shape",o),o}});return st(t,i)}function ur(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function pd(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function pt(e,t){return t.map(n=>{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function Qi(e){return typeof e=="string"?e:e?.message}function ct(e,t,n){let i=e.message?e.message:Qi(e.inst?._zod.def?.error?.(e))??Qi(t?.error?.(e))??Qi(n.customError?.(e))??Qi(n.localeError?.(e))??"Invalid input",{inst:r,continue:o,input:a,...s}=e;return s.path??(s.path=[]),s.message=i,t?.reportInput&&(s.input=a),s}function no(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function io(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function B(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 zn(...e){let[t,n,i]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:i}:{...t}}function jz(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Cv(e){let t=atob(e),n=new Uint8Array(t.length);for(let i=0;i<t.length;i++)n[i]=t.charCodeAt(i);return n}function Nv(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function Az(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return Cv(t+n)}function Oz(e){return Nv(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Cz(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 i=0;i<t.length;i+=2)n[i/2]=Number.parseInt(t.slice(i,i+2),16);return n}function Nz(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var id=class{constructor(...t){}};var Lv=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,$n,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},oo=A("$ZodError",Lv),ht=A("$ZodError",Lv,{Parent:Error});function ao(e,t=n=>n.message){let n={},i=[];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))):i.push(t(r));return{formErrors:i,fieldErrors:n}}function so(e,t=n=>n.message){let n={_errors:[]},i=(r,o=[])=>{for(let a of r.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>i({issues:s},[...o,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...o,...a.path]);else{let s=[...o,...a.path];if(s.length===0)n._errors.push(t(a));else{let c=n,u=0;for(;u<s.length;){let d=s[u];u===s.length-1?(c[d]=c[d]||{_errors:[]},c[d]._errors.push(t(a))):c[d]=c[d]||{_errors:[]},c=c[d],u++}}}};return i(e),n}function hd(e,t=n=>n.message){let n={errors:[]},i=(r,o=[])=>{var a,s;for(let c of r.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>i({issues:u},[...o,...c.path]));else if(c.code==="invalid_key")i({issues:c.issues},[...o,...c.path]);else if(c.code==="invalid_element")i({issues:c.issues},[...o,...c.path]);else{let u=[...o,...c.path];if(u.length===0){n.errors.push(t(c));continue}let d=n,p=0;for(;p<u.length;){let f=u[p],b=p===u.length-1;typeof f=="string"?(d.properties??(d.properties={}),(a=d.properties)[f]??(a[f]={errors:[]}),d=d.properties[f]):(d.items??(d.items=[]),(s=d.items)[f]??(s[f]={errors:[]}),d=d.items[f]),b&&d.errors.push(t(c)),p++}}};return i(e),n}function qv(e){let t=[],n=e.map(i=>typeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function fd(e){let t=[],n=[...e.issues].sort((i,r)=>(i.path??[]).length-(r.path??[]).length);for(let i of n)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${qv(i.path)}`);return t.join(`
|
|
3
|
+
`)}var In=e=>(t,n,i,r)=>{let o=i?{...i,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise)throw new kt;if(a.issues.length){let s=new(r?.Err??e)(a.issues.map(c=>ct(c,o,Me())));throw Fa(s,r?.callee),s}return a.value},Va=In(ht),Rn=e=>async(t,n,i,r)=>{let o=i?{...i,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(r?.Err??e)(a.issues.map(c=>ct(c,o,Me())));throw Fa(s,r?.callee),s}return a.value},Za=Rn(ht),kn=e=>(t,n,i)=>{let r=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},r);if(o instanceof Promise)throw new kt;return o.issues.length?{success:!1,error:new(e??oo)(o.issues.map(a=>ct(a,r,Me())))}:{success:!0,data:o.value}},gd=kn(ht),Tn=e=>async(t,n,i)=>{let r=i?{...i,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(a=>ct(a,r,Me())))}:{success:!0,data:o.value}},vd=Tn(ht),Ha=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return In(e)(t,n,r)},qz=Ha(ht),Ja=e=>(t,n,i)=>In(e)(t,n,i),Mz=Ja(ht),Ga=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Rn(e)(t,n,r)},Dz=Ga(ht),Ba=e=>async(t,n,i)=>Rn(e)(t,n,i),Uz=Ba(ht),Ka=e=>(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return kn(e)(t,n,r)},Fz=Ka(ht),Wa=e=>(t,n,i)=>kn(e)(t,n,i),Vz=Wa(ht),Ya=e=>async(t,n,i)=>{let r=i?{...i,direction:"backward"}:{direction:"backward"};return Tn(e)(t,n,r)},Zz=Ya(ht),Xa=e=>async(t,n,i)=>Tn(e)(t,n,i),Hz=Xa(ht);var yt={};Zt(yt,{base64:()=>Ad,base64url:()=>Qa,bigint:()=>Dd,boolean:()=>Fd,browserEmail:()=>Qz,cidrv4:()=>xd,cidrv6:()=>jd,cuid:()=>yd,cuid2:()=>_d,date:()=>Nd,datetime:()=>qd,domain:()=>rI,duration:()=>zd,e164:()=>Cd,email:()=>Rd,emoji:()=>kd,extendedDuration:()=>Jz,guid:()=>Id,hex:()=>nI,hostname:()=>tI,html5Email:()=>Wz,httpProtocol:()=>Od,idnEmail:()=>Xz,integer:()=>Ud,ipv4:()=>Td,ipv6:()=>Ed,ksuid:()=>$d,lowercase:()=>Hd,mac:()=>Pd,md5_base64:()=>oI,md5_base64url:()=>aI,md5_hex:()=>iI,nanoid:()=>wd,null:()=>Vd,number:()=>es,rfc5322Email:()=>Yz,sha1_base64:()=>cI,sha1_base64url:()=>lI,sha1_hex:()=>sI,sha256_base64:()=>dI,sha256_base64url:()=>mI,sha256_hex:()=>uI,sha384_base64:()=>hI,sha384_base64url:()=>fI,sha384_hex:()=>pI,sha512_base64:()=>vI,sha512_base64url:()=>yI,sha512_hex:()=>gI,string:()=>Md,time:()=>Ld,ulid:()=>bd,undefined:()=>Zd,unicodeEmail:()=>Mv,uppercase:()=>Jd,uuid:()=>Jr,uuid4:()=>Gz,uuid6:()=>Bz,uuid7:()=>Kz,xid:()=>Sd});var yd=/^[cC][0-9a-z]{6,}$/,_d=/^[0-9a-z]+$/,bd=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Sd=/^[0-9a-vA-V]{20}$/,$d=/^[A-Za-z0-9]{27}$/,wd=/^[a-zA-Z0-9_-]{21}$/,zd=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Jz=/^[-+]?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)?)??$/,Id=/^([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})$/,Jr=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)$/,Gz=Jr(4),Bz=Jr(6),Kz=Jr(7),Rd=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Wz=/^[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])?)*$/,Yz=/^(([^<>()\[\]\\.,;:\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,}))$/,Mv=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Xz=Mv,Qz=/^[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])?)*$/,eI="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function kd(){return new RegExp(eI,"u")}var Td=/^(?:(?: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])$/,Ed=/^(([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}|:))$/,Pd=e=>{let t=wt(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},xd=/^((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])$/,jd=/^(([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])$/,Ad=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Qa=/^[A-Za-z0-9_-]*$/,tI=/^(?=.{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])?)*\.?$/,rI=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Od=/^https?$/,Cd=/^\+[1-9]\d{6,14}$/,Dv="(?:(?:\\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])))",Nd=new RegExp(`^${Dv}$`);function Uv(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 Ld(e){return new RegExp(`^${Uv(e)}$`)}function qd(e){let t=Uv({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${t}(?:${n.join("|")})`;return new RegExp(`^${Dv}T(?:${i})$`)}var Md=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Dd=/^-?\d+n?$/,Ud=/^-?\d+$/,es=/^-?\d+(?:\.\d+)?$/,Fd=/^(?:true|false)$/i,Vd=/^null$/i;var Zd=/^undefined$/i;var Hd=/^[^A-Z]*$/,Jd=/^[^a-z]*$/,nI=/^[0-9a-fA-F]*$/;function co(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function lo(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var iI=/^[0-9a-fA-F]{32}$/,oI=co(22,"=="),aI=lo(22),sI=/^[0-9a-fA-F]{40}$/,cI=co(27,"="),lI=lo(27),uI=/^[0-9a-fA-F]{64}$/,dI=co(43,"="),mI=lo(43),pI=/^[0-9a-fA-F]{96}$/,hI=co(64,""),fI=lo(64),gI=/^[0-9a-fA-F]{128}$/,vI=co(86,"=="),yI=lo(86);var je=A("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Vv={number:"number",bigint:"bigint",object:"date"},ts=A("$ZodCheckLessThan",(e,t)=>{je.init(e,t);let n=Vv[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.maximum:r.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?r.maximum=t.value:r.exclusiveMaximum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),rs=A("$ZodCheckGreaterThan",(e,t)=>{je.init(e,t);let n=Vv[typeof t.value];e._zod.onattach.push(i=>{let r=i._zod.bag,o=(t.inclusive?r.minimum:r.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?r.minimum=t.value:r.exclusiveMinimum=t.value)}),e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Gd=A("$ZodCheckMultipleOf",(e,t)=>{je.init(e,t),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.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):od(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})}}),Bd=A("$ZodCheckNumberFormat",(e,t)=>{je.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),i=n?"int":"number",[r,o]=dd[t.format];e._zod.onattach.push(a=>{let s=a._zod.bag;s.format=t.format,s.minimum=r,s.maximum=o,n&&(s.pattern=Ud)}),e._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s)){a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}s<r&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Kd=A("$ZodCheckBigIntFormat",(e,t)=>{je.init(e,t);let[n,i]=md[t.format];e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,o.minimum=n,o.maximum=i}),e._zod.check=r=>{let o=r.value;o<n&&r.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>i&&r.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Wd=A("$ZodCheckMaxSize",(e,t)=>{var n;je.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!sr(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;r.size<=t.maximum||i.issues.push({origin:no(r),code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Yd=A("$ZodCheckMinSize",(e,t)=>{var n;je.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!sr(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;r.size>=t.minimum||i.issues.push({origin:no(r),code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Xd=A("$ZodCheckSizeEquals",(e,t)=>{var n;je.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!sr(r)&&r.size!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.size,r.maximum=t.size,r.size=t.size}),e._zod.check=i=>{let r=i.value,o=r.size;if(o===t.size)return;let a=o>t.size;i.issues.push({origin:no(r),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Qd=A("$ZodCheckMaxLength",(e,t)=>{var n;je.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!sr(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<r&&(i._zod.bag.maximum=t.maximum)}),e._zod.check=i=>{let r=i.value;if(r.length<=t.maximum)return;let a=io(r);i.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),em=A("$ZodCheckMinLength",(e,t)=>{var n;je.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!sr(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>r&&(i._zod.bag.minimum=t.minimum)}),e._zod.check=i=>{let r=i.value;if(r.length>=t.minimum)return;let a=io(r);i.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),tm=A("$ZodCheckLengthEquals",(e,t)=>{var n;je.init(e,t),(n=e._zod.def).when??(n.when=i=>{let r=i.value;return!sr(r)&&r.length!==void 0}),e._zod.onattach.push(i=>{let r=i._zod.bag;r.minimum=t.length,r.maximum=t.length,r.length=t.length}),e._zod.check=i=>{let r=i.value,o=r.length;if(o===t.length)return;let a=io(r),s=o>t.length;i.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),En=A("$ZodCheckStringFormat",(e,t)=>{var n,i;je.init(e,t),e._zod.onattach.push(r=>{let o=r._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.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})}):(i=e._zod).check??(i.check=()=>{})}),rm=A("$ZodCheckRegex",(e,t)=>{En.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})}}),nm=A("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Hd),En.init(e,t)}),im=A("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Jd),En.init(e,t)}),om=A("$ZodCheckIncludes",(e,t)=>{je.init(e,t);let n=wt(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=i,e._zod.onattach.push(r=>{let o=r._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),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})}}),am=A("$ZodCheckStartsWith",(e,t)=>{je.init(e,t);let n=new RegExp(`^${wt(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),sm=A("$ZodCheckEndsWith",(e,t)=>{je.init(e,t);let n=new RegExp(`.*${wt(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(i=>{let r=i._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function Fv(e,t,n){e.issues.length&&t.issues.push(...pt(n,e.issues))}var cm=A("$ZodCheckProperty",(e,t)=>{je.init(e,t),e._zod.check=n=>{let i=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(r=>Fv(r,n,t.property));Fv(i,n,t.property)}}),lm=A("$ZodCheckMimeType",(e,t)=>{je.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=t.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),um=A("$ZodCheckOverwrite",(e,t)=>{je.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var uo=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 i=t.split(`
|
|
4
4
|
`).filter(a=>a),r=Math.min(...i.map(a=>a.length-a.trimStart().length)),o=i.map(a=>a.slice(r)).map(a=>" ".repeat(this.indent*2)+a);for(let a of o)this.content.push(a)}compile(){let t=Function,n=this?.args,r=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...n,r.join(`
|
|
5
|
-
`))}};var rm={major:4,minor:4,patch:3};var ge=A("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=rm;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let r of i)for(let o of r._zod.onattach)o(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(a,s,l)=>{let u=lr(a),d;for(let p of s){if(p._zod.def.when){if(id(a)||!p._zod.def.when(a))continue}else if(u)continue;let f=a.issues.length,b=p._zod.check(a);if(b instanceof Promise&&l?.async===!1)throw new Rt;if(d||b instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await b,a.issues.length!==f&&(u||(u=lr(a,f)))});else{if(a.issues.length===f)continue;u||(u=lr(a,f))}}return d?d.then(()=>a):a},o=(a,s,l)=>{if(lr(a))return a.aborted=!0,a;let u=r(s,i,l);if(u instanceof Promise){if(l.async===!1)throw new Rt;return u.then(d=>e._zod.parse(d,l))}return e._zod.parse(u,l)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let u=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return u instanceof Promise?u.then(d=>o(d,a,s)):o(u,a,s)}let l=e._zod.parse(a,s);if(l instanceof Promise){if(s.async===!1)throw new Rt;return l.then(u=>r(u,i,s))}return r(l,i,s)}}Ie(e,"~standard",()=>({validate:r=>{try{let o=sd(e,r);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return cd(e,r).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),Hr=A("$ZodString",(e,t)=>{ge.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Pd(e._zod.bag),e._zod.parse=(n,i)=>{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}}),Pe=A("$ZodStringFormat",(e,t)=>{kn.init(e,t),Hr.init(e,t)}),im=A("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=gd),Pe.init(e,t)}),om=A("$ZodUUID",(e,t)=>{if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Zr(i))}else t.pattern??(t.pattern=Zr());Pe.init(e,t)}),am=A("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=vd),Pe.init(e,t)}),sm=A("$ZodURL",(e,t)=>{Pe.init(e,t),e._zod.check=n=>{try{let i=n.value.trim();if(!t.normalize&&t.protocol?.source===Id.source&&!/^https?:\/\//i.test(i)){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(i);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=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),cm=A("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=yd()),Pe.init(e,t)}),lm=A("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=hd),Pe.init(e,t)}),um=A("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=ld),Pe.init(e,t)}),dm=A("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=ud),Pe.init(e,t)}),mm=A("$ZodULID",(e,t)=>{t.pattern??(t.pattern=dd),Pe.init(e,t)}),pm=A("$ZodXID",(e,t)=>{t.pattern??(t.pattern=md),Pe.init(e,t)}),hm=A("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=pd),Pe.init(e,t)}),fm=A("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Ed(t)),Pe.init(e,t)}),gm=A("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=kd),Pe.init(e,t)}),vm=A("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Td(t)),Pe.init(e,t)}),ym=A("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=fd),Pe.init(e,t)}),_m=A("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=_d),Pe.init(e,t),e._zod.bag.format="ipv4"}),bm=A("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=bd),Pe.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})}}}),Sm=A("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Sd(t.delimiter)),Pe.init(e,t),e._zod.bag.format="mac"}),$m=A("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=$d),Pe.init(e,t)}),wm=A("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=wd),Pe.init(e,t),e._zod.check=n=>{let i=n.value.split("/");try{if(i.length!==2)throw new Error;let[r,o]=i;if(!o)throw new Error;let a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>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 zm(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Im=A("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=zd),Pe.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{zm(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Bv(e){if(!Ba.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return zm(n)}var Rm=A("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Ba),Pe.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})}}),km=A("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Rd),Pe.init(e,t)});function Kv(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let r=JSON.parse(atob(i));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}var Tm=A("$ZodJWT",(e,t)=>{Pe.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})}}),Em=A("$ZodCustomStringFormat",(e,t)=>{Pe.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})}}),rs=A("$ZodNumber",(e,t)=>{ge.init(e,t),e._zod.pattern=e._zod.bag.pattern??Ka,e._zod.parse=(n,i)=>{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 o=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,...o?{received:o}:{}}),n}}),Pm=A("$ZodNumberFormat",(e,t)=>{Md.init(e,t),rs.init(e,t)}),co=A("$ZodBoolean",(e,t)=>{ge.init(e,t),e._zod.pattern=Ad,e._zod.parse=(n,i)=>{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}}),ns=A("$ZodBigInt",(e,t)=>{ge.init(e,t),e._zod.pattern=xd,e._zod.parse=(n,i)=>{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}}),xm=A("$ZodBigIntFormat",(e,t)=>{Dd.init(e,t),ns.init(e,t)}),jm=A("$ZodSymbol",(e,t)=>{ge.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),Am=A("$ZodUndefined",(e,t)=>{ge.init(e,t),e._zod.pattern=Nd,e._zod.values=new Set([void 0]),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),Om=A("$ZodNull",(e,t)=>{ge.init(e,t),e._zod.pattern=Od,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),Nm=A("$ZodAny",(e,t)=>{ge.init(e,t),e._zod.parse=n=>n}),Cm=A("$ZodUnknown",(e,t)=>{ge.init(e,t),e._zod.parse=n=>n}),Lm=A("$ZodNever",(e,t)=>{ge.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),qm=A("$ZodVoid",(e,t)=>{ge.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),Mm=A("$ZodDate",(e,t)=>{ge.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:e}),n}});function Ov(e,t,n){e.issues.length&&t.issues.push(...mt(n,e.issues)),t.value[n]=e.value}var Dm=A("$ZodArray",(e,t)=>{ge.init(e,t),e._zod.parse=(n,i)=>{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 o=[];for(let a=0;a<r.length;a++){let s=r[a],l=t.element._zod.run({value:s,issues:[]},i);l instanceof Promise?o.push(l.then(u=>Ov(u,n,a))):Ov(l,n,a)}return o.length?Promise.all(o).then(()=>n):n}});function ts(e,t,n,i,r,o){let a=n in i;if(e.issues.length){if(r&&o&&!a)return;t.issues.push(...mt(n,e.issues))}if(!a&&!r){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?a&&(t.value[n]=void 0):t.value[n]=e.value}function Wv(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let n=td(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Yv(e,t,n,i,r,o){let a=[],s=r.keySet,l=r.catchall._zod,u=l.def.type,d=l.optin==="optional",p=l.optout==="optional";for(let f in t){if(f==="__proto__"||s.has(f))continue;if(u==="never"){a.push(f);continue}let b=l.run({value:t[f],issues:[]},i);b instanceof Promise?e.push(b.then(v=>ts(v,n,f,t,d,p))):ts(b,n,f,t,d,p)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}var Xv=A("$ZodObject",(e,t)=>{if(ge.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let l={...s};return Object.defineProperty(t,"shape",{value:l}),l}})}let i=Sn(()=>Wv(t));Ie(e._zod,"propValues",()=>{let s=t.shape,l={};for(let u in s){let d=s[u]._zod;if(d.values){l[u]??(l[u]=new Set);for(let p of d.values)l[u].add(p)}}return l});let r=Vr,o=t.catchall,a;e._zod.parse=(s,l)=>{a??(a=i.value);let u=s.value;if(!r(u))return s.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),s;s.value={};let d=[],p=a.shape;for(let f of a.keys){let b=p[f],v=b._zod.optin==="optional",$=b._zod.optout==="optional",y=b._zod.run({value:u[f],issues:[]},l);y instanceof Promise?d.push(y.then(h=>ts(h,s,f,u,v,$))):ts(y,s,f,u,v,$)}return o?Yv(d,u,s,l,i.value,e):d.length?Promise.all(d).then(()=>s):s}}),Um=A("$ZodObjectJIT",(e,t)=>{Xv.init(e,t);let n=e._zod.parse,i=Sn(()=>Wv(t)),r=f=>{let b=new so(["shape","payload","ctx"]),v=i.value,$=g=>{let S=Ca(g);return`shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`};b.write("const input = payload.value;");let y=Object.create(null),h=0;for(let g of v.keys)y[g]=`key_${h++}`;b.write("const newResult = {};");for(let g of v.keys){let S=y[g],k=Ca(g),w=f[g],_=w?._zod?.optin==="optional",I=w?._zod?.optout==="optional";b.write(`const ${S} = ${$(g)};`),_&&I?b.write(`
|
|
5
|
+
`))}};var dm={major:4,minor:4,patch:3};var ve=A("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=dm;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let r of i)for(let o of r._zod.onattach)o(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let r=(a,s,c)=>{let u=ur(a),d;for(let p of s){if(p._zod.def.when){if(pd(a)||!p._zod.def.when(a))continue}else if(u)continue;let f=a.issues.length,b=p._zod.check(a);if(b instanceof Promise&&c?.async===!1)throw new kt;if(d||b instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await b,a.issues.length!==f&&(u||(u=ur(a,f)))});else{if(a.issues.length===f)continue;u||(u=ur(a,f))}}return d?d.then(()=>a):a},o=(a,s,c)=>{if(ur(a))return a.aborted=!0,a;let u=r(s,i,c);if(u instanceof Promise){if(c.async===!1)throw new kt;return u.then(d=>e._zod.parse(d,c))}return e._zod.parse(u,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let u=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return u instanceof Promise?u.then(d=>o(d,a,s)):o(u,a,s)}let c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new kt;return c.then(u=>r(u,i,s))}return r(c,i,s)}}Ie(e,"~standard",()=>({validate:r=>{try{let o=gd(e,r);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return vd(e,r).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),Gr=A("$ZodString",(e,t)=>{ve.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Md(e._zod.bag),e._zod.parse=(n,i)=>{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}}),Pe=A("$ZodStringFormat",(e,t)=>{En.init(e,t),Gr.init(e,t)}),pm=A("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Id),Pe.init(e,t)}),hm=A("$ZodUUID",(e,t)=>{if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Jr(i))}else t.pattern??(t.pattern=Jr());Pe.init(e,t)}),fm=A("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Rd),Pe.init(e,t)}),gm=A("$ZodURL",(e,t)=>{Pe.init(e,t),e._zod.check=n=>{try{let i=n.value.trim();if(!t.normalize&&t.protocol?.source===Od.source&&!/^https?:\/\//i.test(i)){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(i);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=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),vm=A("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=kd()),Pe.init(e,t)}),ym=A("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=wd),Pe.init(e,t)}),_m=A("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=yd),Pe.init(e,t)}),bm=A("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=_d),Pe.init(e,t)}),Sm=A("$ZodULID",(e,t)=>{t.pattern??(t.pattern=bd),Pe.init(e,t)}),$m=A("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Sd),Pe.init(e,t)}),wm=A("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=$d),Pe.init(e,t)}),zm=A("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=qd(t)),Pe.init(e,t)}),Im=A("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Nd),Pe.init(e,t)}),Rm=A("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Ld(t)),Pe.init(e,t)}),km=A("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=zd),Pe.init(e,t)}),Tm=A("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Td),Pe.init(e,t),e._zod.bag.format="ipv4"}),Em=A("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Ed),Pe.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})}}}),Pm=A("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Pd(t.delimiter)),Pe.init(e,t),e._zod.bag.format="mac"}),xm=A("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=xd),Pe.init(e,t)}),jm=A("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=jd),Pe.init(e,t),e._zod.check=n=>{let i=n.value.split("/");try{if(i.length!==2)throw new Error;let[r,o]=i;if(!o)throw new Error;let a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>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 Am(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Om=A("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Ad),Pe.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Am(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function oy(e){if(!Qa.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Am(n)}var Cm=A("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Qa),Pe.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{oy(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Nm=A("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Cd),Pe.init(e,t)});function ay(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let r=JSON.parse(atob(i));return!("typ"in r&&r?.typ!=="JWT"||!r.alg||t&&(!("alg"in r)||r.alg!==t))}catch{return!1}}var Lm=A("$ZodJWT",(e,t)=>{Pe.init(e,t),e._zod.check=n=>{ay(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),qm=A("$ZodCustomStringFormat",(e,t)=>{Pe.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})}}),ss=A("$ZodNumber",(e,t)=>{ve.init(e,t),e._zod.pattern=e._zod.bag.pattern??es,e._zod.parse=(n,i)=>{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 o=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,...o?{received:o}:{}}),n}}),Mm=A("$ZodNumberFormat",(e,t)=>{Bd.init(e,t),ss.init(e,t)}),mo=A("$ZodBoolean",(e,t)=>{ve.init(e,t),e._zod.pattern=Fd,e._zod.parse=(n,i)=>{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}}),cs=A("$ZodBigInt",(e,t)=>{ve.init(e,t),e._zod.pattern=Dd,e._zod.parse=(n,i)=>{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}}),Dm=A("$ZodBigIntFormat",(e,t)=>{Kd.init(e,t),cs.init(e,t)}),Um=A("$ZodSymbol",(e,t)=>{ve.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:r,inst:e}),n}}),Fm=A("$ZodUndefined",(e,t)=>{ve.init(e,t),e._zod.pattern=Zd,e._zod.values=new Set([void 0]),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:r,inst:e}),n}}),Vm=A("$ZodNull",(e,t)=>{ve.init(e,t),e._zod.pattern=Vd,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let r=n.value;return r===null||n.issues.push({expected:"null",code:"invalid_type",input:r,inst:e}),n}}),Zm=A("$ZodAny",(e,t)=>{ve.init(e,t),e._zod.parse=n=>n}),Hm=A("$ZodUnknown",(e,t)=>{ve.init(e,t),e._zod.parse=n=>n}),Jm=A("$ZodNever",(e,t)=>{ve.init(e,t),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),Gm=A("$ZodVoid",(e,t)=>{ve.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return typeof r>"u"||n.issues.push({expected:"void",code:"invalid_type",input:r,inst:e}),n}}),Bm=A("$ZodDate",(e,t)=>{ve.init(e,t),e._zod.parse=(n,i)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let r=n.value,o=r instanceof Date;return o&&!Number.isNaN(r.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:r,...o?{received:"Invalid Date"}:{},inst:e}),n}});function Hv(e,t,n){e.issues.length&&t.issues.push(...pt(n,e.issues)),t.value[n]=e.value}var Km=A("$ZodArray",(e,t)=>{ve.init(e,t),e._zod.parse=(n,i)=>{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 o=[];for(let a=0;a<r.length;a++){let s=r[a],c=t.element._zod.run({value:s,issues:[]},i);c instanceof Promise?o.push(c.then(u=>Hv(u,n,a))):Hv(c,n,a)}return o.length?Promise.all(o).then(()=>n):n}});function as(e,t,n,i,r,o){let a=n in i;if(e.issues.length){if(r&&o&&!a)return;t.issues.push(...pt(n,e.issues))}if(!a&&!r){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?a&&(t.value[n]=void 0):t.value[n]=e.value}function sy(e){let t=Object.keys(e.shape);for(let i of t)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let n=ud(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function cy(e,t,n,i,r,o){let a=[],s=r.keySet,c=r.catchall._zod,u=c.def.type,d=c.optin==="optional",p=c.optout==="optional";for(let f in t){if(f==="__proto__"||s.has(f))continue;if(u==="never"){a.push(f);continue}let b=c.run({value:t[f],issues:[]},i);b instanceof Promise?e.push(b.then(v=>as(v,n,f,t,d,p))):as(b,n,f,t,d,p)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}var ly=A("$ZodObject",(e,t)=>{if(ve.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let s=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...s};return Object.defineProperty(t,"shape",{value:c}),c}})}let i=wn(()=>sy(t));Ie(e._zod,"propValues",()=>{let s=t.shape,c={};for(let u in s){let d=s[u]._zod;if(d.values){c[u]??(c[u]=new Set);for(let p of d.values)c[u].add(p)}}return c});let r=Hr,o=t.catchall,a;e._zod.parse=(s,c)=>{a??(a=i.value);let u=s.value;if(!r(u))return s.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),s;s.value={};let d=[],p=a.shape;for(let f of a.keys){let b=p[f],v=b._zod.optin==="optional",$=b._zod.optout==="optional",y=b._zod.run({value:u[f],issues:[]},c);y instanceof Promise?d.push(y.then(h=>as(h,s,f,u,v,$))):as(y,s,f,u,v,$)}return o?cy(d,u,s,c,i.value,e):d.length?Promise.all(d).then(()=>s):s}}),Wm=A("$ZodObjectJIT",(e,t)=>{ly.init(e,t);let n=e._zod.parse,i=wn(()=>sy(t)),r=f=>{let b=new uo(["shape","payload","ctx"]),v=i.value,$=g=>{let S=Ua(g);return`shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`};b.write("const input = payload.value;");let y=Object.create(null),h=0;for(let g of v.keys)y[g]=`key_${h++}`;b.write("const newResult = {};");for(let g of v.keys){let S=y[g],k=Ua(g),w=f[g],_=w?._zod?.optin==="optional",I=w?._zod?.optout==="optional";b.write(`const ${S} = ${$(g)};`),_&&I?b.write(`
|
|
6
6
|
if (${S}.issues.length) {
|
|
7
7
|
if (${k} in input) {
|
|
8
8
|
payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
|
|
@@ -61,18 +61,18 @@ var Dw=Object.defineProperty;var Vt=(e,t)=>{for(var n in t)Dw(e,n,{get:t[n],enum
|
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
`)}b.write("payload.value = newResult;"),b.write("return payload;");let z=b.compile();return(g,S)=>z(f,g,S)},o,a=Vr,s=!Fr.jitless,u=s&&Xu.value,d=t.catchall,p;e._zod.parse=(f,b)=>{p??(p=i.value);let v=f.value;return a(v)?s&&u&&b?.async===!1&&b.jitless!==!0?(o||(o=r(t.shape)),f=o(f,b),d?Yv([],v,f,b,p,e):f):n(f,b):(f.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),f)}});function Nv(e,t,n,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let r=e.filter(o=>!lr(o));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(o=>o.issues.map(a=>st(a,i,Me())))}),t)}var lo=A("$ZodUnion",(e,t)=>{ge.init(e,t),Ie(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Ie(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Ie(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Ie(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(r=>r._zod.pattern);return new RegExp(`^(${i.map(r=>Xi(r.source)).join("|")})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,a=[];for(let s of t.options){let l=s._zod.run({value:i.value,issues:[]},r);if(l instanceof Promise)a.push(l),o=!0;else{if(l.issues.length===0)return l;a.push(l)}}return o?Promise.all(a).then(s=>Nv(s,i,e,r)):Nv(a,i,e,r)}});function Cv(e,t,n,i){let r=e.filter(o=>o.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(o=>o.issues.map(a=>st(a,i,Me())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}var Fm=A("$ZodXor",(e,t)=>{lo.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,a=[];for(let s of t.options){let l=s._zod.run({value:i.value,issues:[]},r);l instanceof Promise?(a.push(l),o=!0):a.push(l)}return o?Promise.all(a).then(s=>Cv(s,i,e,r)):Cv(a,i,e,r)}}),Vm=A("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,lo.init(e,t);let n=e._zod.parse;Ie(e._zod,"propValues",()=>{let r={};for(let o of t.options){let a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let[s,l]of Object.entries(a)){r[s]||(r[s]=new Set);for(let u of l)r[s].add(u)}}return r});let i=Sn(()=>{let r=t.options,o=new Map;for(let a of r){let s=a._zod.propValues?.[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let l of s){if(o.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);o.set(l,a)}}return o});e._zod.parse=(r,o)=>{let a=r.value;if(!Vr(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;let s=i.value.get(a?.[t.discriminator]);return s?s._zod.run(r,o):t.unionFallback||o.direction==="backward"?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:a,path:[t.discriminator],inst:e}),r)}}),Zm=A("$ZodIntersection",(e,t)=>{ge.init(e,t),e._zod.parse=(n,i)=>{let r=n.value,o=t.left._zod.run({value:r,issues:[]},i),a=t.right._zod.run({value:r,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([l,u])=>Lv(n,l,u)):Lv(n,o,a)}});function nm(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(cr(e)&&cr(t)){let n=Object.keys(t),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),r={...e,...t};for(let o of i){let a=nm(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r[o]=a.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let r=e[i],o=t[i],a=nm(r,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Lv(e,t,n){let i=new Map,r;for(let s of t.issues)if(s.code==="unrecognized_keys"){r??(r=s);for(let l of s.keys)i.has(l)||i.set(l,{}),i.get(l).l=!0}else e.issues.push(s);for(let s of n.issues)if(s.code==="unrecognized_keys")for(let l of s.keys)i.has(l)||i.set(l,{}),i.get(l).r=!0;else e.issues.push(s);let o=[...i].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(o.length&&r&&e.issues.push({...r,keys:o}),lr(e))return e;let a=nm(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var is=A("$ZodTuple",(e,t)=>{ge.init(e,t);let n=t.items;e._zod.parse=(i,r)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let a=[],s=qv(n,"optin"),l=qv(n,"optout");if(!t.rest){if(o.length<s)return i.issues.push({code:"too_small",minimum:s,inclusive:!0,input:o,inst:e,origin:"array"}),i;o.length>n.length&&i.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:o,inst:e,origin:"array"})}let u=new Array(n.length);for(let d=0;d<n.length;d++){let p=n[d]._zod.run({value:o[d],issues:[]},r);p instanceof Promise?a.push(p.then(f=>{u[d]=f})):u[d]=p}if(t.rest){let d=n.length-1,p=o.slice(n.length);for(let f of p){d++;let b=t.rest._zod.run({value:f,issues:[]},r);b instanceof Promise?a.push(b.then(v=>Mv(v,i,d))):Mv(b,i,d)}}return a.length?Promise.all(a).then(()=>Dv(u,i,n,o,l)):Dv(u,i,n,o,l)}});function qv(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function Mv(e,t,n){e.issues.length&&t.issues.push(...mt(n,e.issues)),t.value[n]=e.value}function Dv(e,t,n,i,r){for(let o=0;o<n.length;o++){let a=e[o],s=o<i.length;if(a.issues.length){if(!s&&o>=r){t.value.length=o;break}t.issues.push(...mt(o,a.issues))}t.value[o]=a.value}for(let o=t.value.length-1;o>=i.length&&(n[o]._zod.optout==="optional"&&t.value[o]===void 0);o--)t.value.length=o;return t}var Hm=A("$ZodRecord",(e,t)=>{ge.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!cr(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let o=[],a=t.keyType._zod.values;if(a){n.value={};let s=new Set;for(let u of a)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){s.add(typeof u=="number"?u.toString():u);let d=t.keyType._zod.run({value:u,issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(b=>st(b,i,Me())),input:u,path:[u],inst:e});continue}let p=d.value,f=t.valueType._zod.run({value:r[u],issues:[]},i);f instanceof Promise?o.push(f.then(b=>{b.issues.length&&n.issues.push(...mt(u,b.issues)),n.value[p]=b.value})):(f.issues.length&&n.issues.push(...mt(u,f.issues)),n.value[p]=f.value)}let l;for(let u in r)s.has(u)||(l=l??[],l.push(u));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:l})}else{n.value={};for(let s of Reflect.ownKeys(r)){if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(r,s))continue;let l=t.keyType._zod.run({value:s,issues:[]},i);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&Ka.test(s)&&l.issues.length){let p=t.keyType._zod.run({value:Number(s),issues:[]},i);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(l=p)}if(l.issues.length){t.mode==="loose"?n.value[s]=r[s]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(p=>st(p,i,Me())),input:s,path:[s],inst:e});continue}let d=t.valueType._zod.run({value:r[s],issues:[]},i);d instanceof Promise?o.push(d.then(p=>{p.issues.length&&n.issues.push(...mt(s,p.issues)),n.value[l.value]=p.value})):(d.issues.length&&n.issues.push(...mt(s,d.issues)),n.value[l.value]=d.value)}}return o.length?Promise.all(o).then(()=>n):n}}),Jm=A("$ZodMap",(e,t)=>{ge.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let o=[];n.value=new Map;for(let[a,s]of r){let l=t.keyType._zod.run({value:a,issues:[]},i),u=t.valueType._zod.run({value:s,issues:[]},i);l instanceof Promise||u instanceof Promise?o.push(Promise.all([l,u]).then(([d,p])=>{Uv(d,p,n,a,r,e,i)})):Uv(l,u,n,a,r,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function Uv(e,t,n,i,r,o,a){e.issues.length&&(Qi.has(typeof i)?n.issues.push(...mt(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(s=>st(s,a,Me()))})),t.issues.length&&(Qi.has(typeof i)?n.issues.push(...mt(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(s=>st(s,a,Me()))})),n.value.set(e.value,t.value)}var Gm=A("$ZodSet",(e,t)=>{ge.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let o=[];n.value=new Set;for(let a of r){let s=t.valueType._zod.run({value:a,issues:[]},i);s instanceof Promise?o.push(s.then(l=>Fv(l,n))):Fv(s,n)}return o.length?Promise.all(o).then(()=>n):n}});function Fv(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Bm=A("$ZodEnum",(e,t)=>{ge.init(e,t);let n=Yi(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(r=>Qi.has(typeof r)).map(r=>typeof r=="string"?$t(r):r.toString()).join("|")})$`),e._zod.parse=(r,o)=>{let a=r.value;return i.has(a)||r.issues.push({code:"invalid_value",values:n,input:a,inst:e}),r}}),Km=A("$ZodLiteral",(e,t)=>{if(ge.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(i=>typeof i=="string"?$t(i):i?$t(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,r)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),Wm=A("$ZodFile",(e,t)=>{ge.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),Ym=A("$ZodTransform",(e,t)=>{ge.init(e,t),e._zod.optin="optional",e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new or(e.constructor.name);let r=t.transform(n.value,n);if(i.async)return(r instanceof Promise?r:Promise.resolve(r)).then(a=>(n.value=a,n.fallback=!0,n));if(r instanceof Promise)throw new Rt;return n.value=r,n.fallback=!0,n}});function Vv(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var os=A("$ZodOptional",(e,t)=>{ge.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ie(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ie(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Xi(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){let r=n.value,o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(a=>Vv(a,r)):Vv(o,r)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),Xm=A("$ZodExactOptional",(e,t)=>{os.init(e,t),Ie(e._zod,"values",()=>t.innerType._zod.values),Ie(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),Qm=A("$ZodNullable",(e,t)=>{ge.init(e,t),Ie(e._zod,"optin",()=>t.innerType._zod.optin),Ie(e._zod,"optout",()=>t.innerType._zod.optout),Ie(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${Xi(n.source)}|null)$`):void 0}),Ie(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),ep=A("$ZodDefault",(e,t)=>{ge.init(e,t),e._zod.optin="optional",Ie(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>Zv(o,t)):Zv(r,t)}});function Zv(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var tp=A("$ZodPrefault",(e,t)=>{ge.init(e,t),e._zod.optin="optional",Ie(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),rp=A("$ZodNonOptional",(e,t)=>{ge.init(e,t),Ie(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>Hv(o,e)):Hv(r,e)}});function Hv(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 np=A("$ZodSuccess",(e,t)=>{ge.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new or("ZodSuccess");let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),ip=A("$ZodCatch",(e,t)=>{ge.init(e,t),e._zod.optin="optional",Ie(e._zod,"optout",()=>t.innerType._zod.optout),Ie(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(a=>st(a,i,Me()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(o=>st(o,i,Me()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),op=A("$ZodNaN",(e,t)=>{ge.init(e,t),e._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),as=A("$ZodPipe",(e,t)=>{ge.init(e,t),Ie(e._zod,"values",()=>t.in._zod.values),Ie(e._zod,"optin",()=>t.in._zod.optin),Ie(e._zod,"optout",()=>t.out._zod.optout),Ie(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(a=>Xa(a,t.in,i)):Xa(o,t.in,i)}let r=t.in._zod.run(n,i);return r instanceof Promise?r.then(o=>Xa(o,t.out,i)):Xa(r,t.out,i)}});function Xa(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var uo=A("$ZodCodec",(e,t)=>{ge.init(e,t),Ie(e._zod,"values",()=>t.in._zod.values),Ie(e._zod,"optin",()=>t.in._zod.optin),Ie(e._zod,"optout",()=>t.out._zod.optout),Ie(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let o=t.in._zod.run(n,i);return o instanceof Promise?o.then(a=>Qa(a,t,i)):Qa(o,t,i)}else{let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(a=>Qa(a,t,i)):Qa(o,t,i)}}});function Qa(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(o=>es(e,o,t.out,n)):es(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(o=>es(e,o,t.in,n)):es(e,r,t.in,n)}}function es(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}var ap=A("$ZodPreprocess",(e,t)=>{as.init(e,t)}),sp=A("$ZodReadonly",(e,t)=>{ge.init(e,t),Ie(e._zod,"propValues",()=>t.innerType._zod.propValues),Ie(e._zod,"values",()=>t.innerType._zod.values),Ie(e._zod,"optin",()=>t.innerType?._zod?.optin),Ie(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(Jv):Jv(r)}});function Jv(e){return e.value=Object.freeze(e.value),e}var cp=A("$ZodTemplateLiteral",(e,t)=>{ge.init(e,t);let n=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let r=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let o=r.startsWith("^")?1:0,a=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(o,a))}else if(i===null||ed.has(typeof i))n.push($t(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(i,r)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),lp=A("$ZodFunction",(e,t)=>(ge.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(...i){let r=e._def.input?qa(e._def.input,i):i,o=Reflect.apply(n,this,r);return e._def.output?qa(e._def.output,o):o}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let r=e._def.input?await Ma(e._def.input,i):i,o=await Reflect.apply(n,this,r);return e._def.output?await Ma(e._def.output,o):o}},e._zod.parse=(n,i)=>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 i=e.constructor;return Array.isArray(n[0])?new i({type:"function",input:new is({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new i({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:n})},e)),up=A("$ZodPromise",(e,t)=>{ge.init(e,t),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},i))}),dp=A("$ZodLazy",(e,t)=>{ge.init(e,t),Ie(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),Ie(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Ie(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Ie(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Ie(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),mp=A("$ZodCustom",(e,t)=>{Ae.init(e,t),ge.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(o=>Gv(o,n,i,e));Gv(r,n,i,e)}});function Gv(e,t,n,i){if(!e){let r={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(r.params=i._zod.def.params),t.issues.push($n(r))}}var po={};Vt(po,{ar:()=>Qv,az:()=>ey,be:()=>ry,bg:()=>ny,ca:()=>iy,cs:()=>oy,da:()=>ay,de:()=>sy,el:()=>cy,en:()=>ss,eo:()=>ly,es:()=>uy,fa:()=>dy,fi:()=>my,fr:()=>py,frCA:()=>hy,he:()=>fy,hr:()=>gy,hu:()=>vy,hy:()=>_y,id:()=>by,is:()=>Sy,it:()=>$y,ja:()=>wy,ka:()=>zy,kh:()=>Iy,km:()=>cs,ko:()=>Ry,lt:()=>Ty,mk:()=>Ey,ms:()=>Py,nl:()=>xy,no:()=>jy,ota:()=>Ay,pl:()=>Ny,ps:()=>Oy,pt:()=>Cy,ro:()=>Ly,ru:()=>My,sl:()=>Dy,sv:()=>Uy,ta:()=>Fy,th:()=>Vy,tr:()=>Zy,ua:()=>Hy,uk:()=>ls,ur:()=>Jy,uz:()=>Gy,vi:()=>By,yo:()=>Yy,zhCN:()=>Ky,zhTW:()=>Wy});var iI=()=>{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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\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 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}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 ${G(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: ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?` \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"} ${o} ${r.maximum.toString()} ${a.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"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\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 ${o} ${r.minimum.toString()} ${a.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 ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`${n[o.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":""}: ${q(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 Qv(){return{localeError:iI()}}var oI=()=>{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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${s}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${G(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[o.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":""}: ${q(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 ey(){return{localeError:oI()}}function ty(e,t,n,i){let r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?n:i}var aI=()=>{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"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}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 ${G(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 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),l=ty(s,a.unit.one,a.unit.few,a.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 ${a.verb} ${o}${r.maximum.toString()} ${l}`}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 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),l=ty(s,a.unit.one,a.unit.few,a.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 ${a.verb} ${o}${r.minimum.toString()} ${l}`}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 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[o.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"}: ${q(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 ry(){return{localeError:aI()}}var sI=()=>{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"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}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 ${G(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 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\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 ${o}${r.maximum.toString()} ${a.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 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\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 ${o}${r.minimum.toString()} ${a.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 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;if(o.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 "${o.prefix}"`;if(o.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 "${o.suffix}"`;if(o.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 "${o.includes}"`;if(o.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 ${o.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${n[o.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":""}: ${q(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 ny(){return{localeError:sI()}}var cI=()=>{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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${s}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${G(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${q(r.values," o ")}`;case"too_big":{let o=r.inclusive?"com a m\xE0xim":"menys de",a=t(r.origin);return a?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${o} ${r.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(r.origin);return a?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${o} ${r.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${n[o.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":""}: ${q(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 iy(){return{localeError:cI()}}var lI=()=>{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"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${s}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${G(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.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: ${q(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 oy(){return{localeError:lI()}}var uI=()=>{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"},i={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 o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${s}`:`Ugyldigt input: forventede ${o}, fik ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${G(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=i[r.origin]??r.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${o} ${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=i[r.origin]??r.origin;return a?`For lille: forventede ${s} ${a.verb} ${o} ${r.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.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"}: ${q(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 ay(){return{localeError:uI()}}var dI=()=>{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"},i={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${s}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${G(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ist`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ist`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${n[o.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"}: ${q(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 sy(){return{localeError:dI()}}var mI=()=>{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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\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 ${o}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}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 ${G(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 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\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 ${o}${r.maximum.toString()} ${a.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 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\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 ${o}${r.minimum.toString()} ${a.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 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[o.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"}: ${q(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 cy(){return{localeError:mI()}}var pI=()=>{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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return`Invalid input: expected ${o}, received ${s}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${G(r.values[0])}`:`Invalid option: expected one of ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Too big: expected ${r.origin??"value"} to have ${o}${r.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Too small: expected ${r.origin} to have ${o}${r.minimum.toString()} ${a.unit}`:`Too small: expected ${r.origin} to be ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${n[o.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":""}: ${q(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(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}};function ss(){return{localeError:pI()}}var hI=()=>{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"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${s}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${G(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${o}${r.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${n[o.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":""}: ${q(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 ly(){return{localeError:hI()}}var fI=()=>{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"},i={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 o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${s}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${G(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${o}${r.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${o}${r.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${n[o.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":""}: ${q(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}};function uy(){return{localeError:fI()}}var gI=()=>{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"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s} \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 ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \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 ${G(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 ${q(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${a.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 ${o}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[o.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: ${q(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 dy(){return{localeError:gI()}}var vI=()=>{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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${s}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${G(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${o}${r.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${o}${r.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${n[o.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"}: ${q(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 my(){return{localeError:vI()}}var yI=()=>{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"},i={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 o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${s} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${G(r.values[0])} attendu`:`Option invalide : une valeur parmi ${q(r.values,"|")} attendue`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Trop grand : ${i[r.origin]??"valeur"} doit ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Trop petit : ${i[r.origin]??"valeur"} doit ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Trop petit : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${n[o.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":""} : ${q(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 py(){return{localeError:yI()}}var _I=()=>{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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${s}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${G(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u2264":"<",a=t(r.origin);return a?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${o}${r.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u2265":">",a=t(r.origin);return a?`Trop petit : attendu que ${r.origin} ait ${o}${r.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${r.origin} soit ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.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":""} : ${q(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 hy(){return{localeError:_I()}}var bI=()=>{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,i=u=>{let d=n(u);return d?d.label:u??e.unknown.label},r=u=>`\u05D4${i(u)}`,o=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",a=u=>u?t[u]??null:null,s={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"}},l={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let d=u.expected,p=l[d??""]??i(d),f=B(u.input),b=l[f]??e[f]?.label??f;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 ${b}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}, \u05D4\u05EA\u05E7\u05D1\u05DC ${b}`}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 ${G(u.values[0])}`;let d=u.values.map(b=>G(b));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 ${d[0]} \u05D0\u05D5 ${d[1]}`;let p=d[d.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 ${d.slice(0,-1).join(", ")} \u05D0\u05D5 ${p}`}case"too_big":{let d=a(u.origin),p=r(u.origin??"value");if(u.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.maximum.toString()} ${d?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(u.origin==="number"){let v=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: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(u.origin==="array"||u.origin==="set"){let v=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",$=u.inclusive?`${u.maximum} ${d?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${u.maximum} ${d?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${$}`.trim()}let f=u.inclusive?"<=":"<",b=o(u.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${p} ${b} ${f}${u.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${p} ${b} ${f}${u.maximum.toString()}`}case"too_small":{let d=a(u.origin),p=r(u.origin??"value");if(u.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.minimum.toString()} ${d?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(u.origin==="number"){let v=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: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(u.origin==="array"||u.origin==="set"){let v=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){let y=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`}let $=u.inclusive?`${u.minimum} ${d?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${u.minimum} ${d?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${$}`.trim()}let f=u.inclusive?">=":">",b=o(u.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${p} ${b} ${f}${u.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${p} ${b} ${f}${u.minimum.toString()}`}case"invalid_format":{let d=u;if(d.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${d.prefix}"`;if(d.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${d.suffix}"`;if(d.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${d.includes}"`;if(d.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 ${d.pattern}`;let p=s[d.format],f=p?.label??d.format,v=(p?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${v}`}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"}: ${q(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 fy(){return{localeError:bI()}}var SI=()=>{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"},i={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 o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${r.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${s}`}case"invalid_value":return r.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${G(r.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${o}${r.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${o}${r.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${o.prefix}"`:o.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${o.suffix}"`:o.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${o.includes}"`:o.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`:`Neispravna ${n[o.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"}: ${q(r.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[r.origin]??r.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[r.origin]??r.origin}`;default:return"Neispravan unos"}}};function gy(){return{localeError:SI()}}var $I=()=>{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"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${G(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${r.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${o}${r.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[o.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":""}: ${q(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 vy(){return{localeError:$I()}}function yy(e,t,n){return Math.abs(e)===1?t:n}function Tn(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 wI=()=>{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"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\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 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}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 ${G(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 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),l=yy(s,a.unit.one,a.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 ${Tn(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.maximum.toString()} ${l}`}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 ${Tn(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),l=yy(s,a.unit.one,a.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 ${Tn(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${r.minimum.toString()} ${l}`}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 ${Tn(r.origin)} \u056C\u056B\u0576\u056B ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.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 ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[o.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":""}. ${q(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Tn(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 ${Tn(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function _y(){return{localeError:wI()}}var zI=()=>{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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${o}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${G(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${o}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: diharapkan ${r.origin} memiliki ${o}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${n[o.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":""}: ${q(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 by(){return{localeError:zI()}}var II=()=>{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"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${G(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${o}${r.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${o}${r.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${n[o.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"}: ${q(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 Sy(){return{localeError:II()}}var RI=()=>{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"},i={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${s}`:`Input non valido: atteso ${o}, ricevuto ${s}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${G(r.values[0])}`:`Opzione non valida: atteso uno tra ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Troppo grande: ${r.origin??"valore"} deve avere ${o}${r.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Troppo piccolo: ${r.origin} deve avere ${o}${r.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${r.origin} deve essere ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Input non valido: ${n[o.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"}: ${q(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:RI()}}var kI=()=>{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"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${G(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${q(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(r.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${a.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(r.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${a.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[o.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":""}: ${q(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 wy(){return{localeError:kI()}}var TI=()=>{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"},i={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 o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\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 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}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 ${G(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 ${q(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\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"} ${a.verb} ${o}${r.maximum.toString()} ${a.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 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\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} ${a.verb} ${o}${r.minimum.toString()} ${a.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 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"-\u10D8\u10D7`:o.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 "${o.suffix}"-\u10D8\u10D7`:o.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 "${o.includes}"-\u10E1`:o.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 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[o.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"}: ${q(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 zy(){return{localeError:TI()}}var EI=()=>{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"},i={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 o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\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 ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}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 ${G(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 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()} ${a.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"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[o.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 ${q(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 cs(){return{localeError:EI()}}function Iy(){return cs()}var PI=()=>{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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${G(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${q(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),l=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${l} ${o}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${o}${a}`}case"too_small":{let o=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),l=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${l} ${o}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${o}${a}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[o.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: ${q(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:PI()}}var mo=e=>e.charAt(0).toUpperCase()+e.slice(1);function ky(e){let t=Math.abs(e),n=t%10,i=t%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}var xI=()=>{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,o,a,s){let l=e[r]??null;return l===null?l:{unit:l.unit[o],verb:l.verb[s][a?"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"},i={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 o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${o}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${G(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${q(r.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[r.origin]??r.origin,a=t(r.origin,ky(Number(r.maximum)),r.inclusive??!1,"smaller");if(a?.verb)return`${mo(o??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.maximum.toString()} ${a.unit??"element\u0173"}`;let s=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${mo(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.maximum.toString()} ${a?.unit}`}case"too_small":{let o=i[r.origin]??r.origin,a=t(r.origin,ky(Number(r.minimum)),r.inclusive??!1,"bigger");if(a?.verb)return`${mo(o??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.minimum.toString()} ${a.unit??"element\u0173"}`;let s=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${mo(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.minimum.toString()} ${a?.unit}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${n[o.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"}: ${q(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[r.origin]??r.origin;return`${mo(o??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Ty(){return{localeError:xI()}}var jI=()=>{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"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${G(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 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\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 ${o}${r.maximum.toString()} ${a.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 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\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 ${o}${r.minimum.toString()} ${a.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 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`Invalid ${n[o.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"}: ${q(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 Ey(){return{localeError:jI()}}var AI=()=>{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"},i={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${s}`:`Input tidak sah: dijangka ${o}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${G(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: dijangka ${r.origin??"nilai"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: dijangka ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${n[o.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${q(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 Py(){return{localeError:AI()}}var OI=()=>{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"},i={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${o}, ontving ${s}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${G(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} is`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} is`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${n[o.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":""}: ${q(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 xy(){return{localeError:OI()}}var NI=()=>{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"},i={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${s}`:`Ugyldig input: forventet ${o}, fikk ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${G(r.values[0])}`:`Ugyldig valg: forventet en av ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.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"}: ${q(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 jy(){return{localeError:NI()}}var CI=()=>{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"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${G(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=r;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[o.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":""}: ${q(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 Ay(){return{localeError:CI()}}var LI=()=>{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"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \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 ${G(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${q(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${a.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 ${o}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[o.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"}: ${q(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:LI()}}var qI=()=>{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"},i={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${s}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${G(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[o.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":""}: ${q(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 Ny(){return{localeError:qI()}}var MI=()=>{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"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${s}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${G(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${o}${r.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Muito pequeno: esperado que ${r.origin} tivesse ${o}${r.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${n[o.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":""}: ${q(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 Cy(){return{localeError:MI()}}var DI=()=>{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"},i={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 o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${s}`}case"invalid_value":return r.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${G(r.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} s\u0103 fie ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Prea mic: a\u0219teptat ca ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${r.origin} s\u0103 fie ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${o.prefix}"`:o.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${o.suffix}"`:o.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${o.includes}"`:o.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${o.pattern}`:`Format invalid: ${n[o.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: ${q(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 Ly(){return{localeError:DI()}}function qy(e,t,n,i){let r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?n:i}var UI=()=>{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"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}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 ${G(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 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),l=qy(s,a.unit.one,a.unit.few,a.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 ${o}${r.maximum.toString()} ${l}`}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 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),l=qy(s,a.unit.one,a.unit.few,a.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 ${o}${r.minimum.toString()} ${l}`}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 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[o.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":""}: ${q(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 My(){return{localeError:UI()}}var FI=()=>{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"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${s}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${G(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${o}${r.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${o}${r.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.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"}: ${q(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 Dy(){return{localeError:FI()}}var VI=()=>{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"},i={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${s}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${G(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${n[o.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"}: ${q(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 Uy(){return{localeError:VI()}}var ZI=()=>{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"},i={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 o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\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 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}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 ${G(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 ${q(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\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"} ${o}${r.maximum.toString()} ${a.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"} ${o}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\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} ${o}${r.minimum.toString()} ${a.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} ${o}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.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[o.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":""}: ${q(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 Fy(){return{localeError:ZI()}}var HI=()=>{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"},i={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 o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\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 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}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 ${G(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 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()} ${a.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${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.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 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[o.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: ${q(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 Vy(){return{localeError:HI()}}var JI=()=>{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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${G(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[o.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":""}: ${q(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 Zy(){return{localeError:JI()}}var GI=()=>{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"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\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 ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}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 ${G(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 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\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"} ${a.verb} ${o}${r.maximum.toString()} ${a.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 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\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} ${a.verb} ${o}${r.minimum.toString()} ${a.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 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[o.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":""}: ${q(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 ls(){return{localeError:GI()}}function Hy(){return ls()}var BI=()=>{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"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${G(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${q(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${r.maximum.toString()} ${a.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 ${o}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${o}${r.minimum.toString()} ${a.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 ${o}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[o.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":""}: ${q(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 Jy(){return{localeError:BI()}}var KI=()=>{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"},i={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${s}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${G(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[o.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":""}: ${q(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 Gy(){return{localeError:KI()}}var WI=()=>{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"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${G(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 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${n[o.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: ${q(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:WI()}}var YI=()=>{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"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${G(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${n[o.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): ${q(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:YI()}}var XI=()=>{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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${G(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${n[o.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${q(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 Wy(){return{localeError:XI()}}var QI=()=>{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"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${G(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${a.verb} ${o}${r.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.maximum}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${a.verb} ${o}${r.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.minimum}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${n[o.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: ${q(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 Yy(){return{localeError:QI()}}var Xy,pp=Symbol("ZodOutput"),hp=Symbol("ZodInput"),us=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.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 i={...this.get(n)??{}};delete i.id;let r={...i,...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 ds(){return new us}(Xy=globalThis).__zod_globalRegistry??(Xy.__zod_globalRegistry=ds());var Xe=globalThis.__zod_globalRegistry;function fp(e,t){return new e({type:"string",...W(t)})}function gp(e,t){return new e({type:"string",coerce:!0,...W(t)})}function ms(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...W(t)})}function ho(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...W(t)})}function ps(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...W(t)})}function hs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...W(t)})}function fs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...W(t)})}function gs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...W(t)})}function fo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...W(t)})}function vs(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...W(t)})}function ys(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...W(t)})}function _s(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...W(t)})}function bs(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...W(t)})}function Ss(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...W(t)})}function $s(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...W(t)})}function ws(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...W(t)})}function zs(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...W(t)})}function Is(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...W(t)})}function vp(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...W(t)})}function Rs(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...W(t)})}function ks(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...W(t)})}function Ts(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...W(t)})}function Es(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...W(t)})}function Ps(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...W(t)})}function xs(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...W(t)})}var yp={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function _p(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...W(t)})}function bp(e,t){return new e({type:"string",format:"date",check:"string_format",...W(t)})}function Sp(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...W(t)})}function $p(e,t){return new e({type:"string",format:"duration",check:"string_format",...W(t)})}function wp(e,t){return new e({type:"number",checks:[],...W(t)})}function zp(e,t){return new e({type:"number",coerce:!0,checks:[],...W(t)})}function Ip(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...W(t)})}function Rp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...W(t)})}function kp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...W(t)})}function Tp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...W(t)})}function Ep(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...W(t)})}function Pp(e,t){return new e({type:"boolean",...W(t)})}function xp(e,t){return new e({type:"boolean",coerce:!0,...W(t)})}function jp(e,t){return new e({type:"bigint",...W(t)})}function Ap(e,t){return new e({type:"bigint",coerce:!0,...W(t)})}function Op(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...W(t)})}function Np(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...W(t)})}function Cp(e,t){return new e({type:"symbol",...W(t)})}function Lp(e,t){return new e({type:"undefined",...W(t)})}function qp(e,t){return new e({type:"null",...W(t)})}function Mp(e){return new e({type:"any"})}function Dp(e){return new e({type:"unknown"})}function Up(e,t){return new e({type:"never",...W(t)})}function Fp(e,t){return new e({type:"void",...W(t)})}function Vp(e,t){return new e({type:"date",...W(t)})}function Zp(e,t){return new e({type:"date",coerce:!0,...W(t)})}function Hp(e,t){return new e({type:"nan",...W(t)})}function Ot(e,t){return new Wa({check:"less_than",...W(t),value:e,inclusive:!1})}function yt(e,t){return new Wa({check:"less_than",...W(t),value:e,inclusive:!0})}function Nt(e,t){return new Ya({check:"greater_than",...W(t),value:e,inclusive:!1})}function ct(e,t){return new Ya({check:"greater_than",...W(t),value:e,inclusive:!0})}function js(e){return Nt(0,e)}function As(e){return Ot(0,e)}function Os(e){return yt(0,e)}function Ns(e){return ct(0,e)}function ur(e,t){return new qd({check:"multiple_of",...W(t),value:e})}function dr(e,t){return new Ud({check:"max_size",...W(t),maximum:e})}function Ct(e,t){return new Fd({check:"min_size",...W(t),minimum:e})}function Jr(e,t){return new Vd({check:"size_equals",...W(t),size:e})}function Gr(e,t){return new Zd({check:"max_length",...W(t),maximum:e})}function Ht(e,t){return new Hd({check:"min_length",...W(t),minimum:e})}function Br(e,t){return new Jd({check:"length_equals",...W(t),length:e})}function En(e,t){return new Gd({check:"string_format",format:"regex",...W(t),pattern:e})}function Pn(e){return new Bd({check:"string_format",format:"lowercase",...W(e)})}function xn(e){return new Kd({check:"string_format",format:"uppercase",...W(e)})}function jn(e,t){return new Wd({check:"string_format",format:"includes",...W(t),includes:e})}function An(e,t){return new Yd({check:"string_format",format:"starts_with",...W(t),prefix:e})}function On(e,t){return new Xd({check:"string_format",format:"ends_with",...W(t),suffix:e})}function Cs(e,t,n){return new Qd({check:"property",property:e,schema:t,...W(n)})}function Nn(e,t){return new em({check:"mime_type",mime:e,...W(t)})}function kt(e){return new tm({check:"overwrite",tx:e})}function Cn(e){return kt(t=>t.normalize(e))}function Ln(){return kt(e=>e.trim())}function qn(){return kt(e=>e.toLowerCase())}function Mn(){return kt(e=>e.toUpperCase())}function Dn(){return kt(e=>Yu(e))}function Jp(e,t,n){return new e({type:"array",element:t,...W(n)})}function tR(e,t,n){return new e({type:"union",options:t,...W(n)})}function rR(e,t,n){return new e({type:"union",options:t,inclusive:!1,...W(n)})}function nR(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...W(i)})}function iR(e,t,n){return new e({type:"intersection",left:t,right:n})}function oR(e,t,n,i){let r=n instanceof ge,o=r?i:n,a=r?n:null;return new e({type:"tuple",items:t,rest:a,...W(o)})}function aR(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...W(i)})}function sR(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...W(i)})}function cR(e,t,n){return new e({type:"set",valueType:t,...W(n)})}function lR(e,t,n){let i=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:i,...W(n)})}function uR(e,t,n){return new e({type:"enum",entries:t,...W(n)})}function dR(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...W(n)})}function Gp(e,t){return new e({type:"file",...W(t)})}function mR(e,t){return new e({type:"transform",transform:t})}function pR(e,t){return new e({type:"optional",innerType:t})}function hR(e,t){return new e({type:"nullable",innerType:t})}function fR(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Qu(n)}})}function gR(e,t,n){return new e({type:"nonoptional",innerType:t,...W(n)})}function vR(e,t){return new e({type:"success",innerType:t})}function yR(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function _R(e,t,n){return new e({type:"pipe",in:t,out:n})}function bR(e,t){return new e({type:"readonly",innerType:t})}function SR(e,t,n){return new e({type:"template_literal",parts:t,...W(n)})}function $R(e,t){return new e({type:"lazy",getter:t})}function wR(e,t){return new e({type:"promise",innerType:t})}function Bp(e,t,n){let i=W(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function Kp(e,t,n){return new e({type:"custom",check:"custom",fn:t,...W(n)})}function Wp(e,t){let n=Qy(i=>(i.addIssue=r=>{if(typeof r=="string")i.issues.push($n(r,i.value,n._zod.def));else{let o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),i.issues.push($n(o))}},e(i.value,i)),t);return n}function Qy(e,t){let n=new Ae({check:"custom",...W(t)});return n._zod.check=e,n}function Yp(e){let t=new Ae({check:"describe"});return t._zod.onattach=[n=>{let i=Xe.get(n)??{};Xe.add(n,{...i,description:e})}],t._zod.check=()=>{},t}function Xp(e){let t=new Ae({check:"meta"});return t._zod.onattach=[n=>{let i=Xe.get(n)??{};Xe.add(n,{...i,...e})}],t._zod.check=()=>{},t}function Qp(e,t){let n=W(t),i=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(b=>typeof b=="string"?b.toLowerCase():b),r=r.map(b=>typeof b=="string"?b.toLowerCase():b));let o=new Set(i),a=new Set(r),s=e.Codec??uo,l=e.Boolean??co,u=e.String??Hr,d=new u({type:"string",error:n.error}),p=new l({type:"boolean",error:n.error}),f=new s({type:"pipe",in:d,out:p,transform:((b,v)=>{let $=b;return n.case!=="sensitive"&&($=$.toLowerCase()),o.has($)?!0:a.has($)?!1:(v.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:v.value,inst:f,continue:!1}),{})}),reverseTransform:((b,v)=>b===!0?i[0]||"true":r[0]||"false"),error:n.error});return f}function Un(e,t,n,i={}){let r=W(i),o={...W(i),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:s=>n.test(s),...r};return n instanceof RegExp&&(o.pattern=n),new e(o)}function mr(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??Xe,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 Ee(e,t,n={path:[],schemaPath:[]}){var i;let r=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let d={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,d);else{let f=a.schema,b=t.processors[r.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);b(e,t,f,d)}let p=e._zod.parent;p&&(a.ref||(a.ref=p),Ee(p,t,d),t.seen.get(p).isParent=!0)}let l=t.metadataRegistry.get(e);return l&&Object.assign(a.schema,l),t.io==="input"&<(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function pr(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let l=i.get(s);if(l&&l!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(s,a[0])}}let r=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(a[0])?.id,f=e.external.uri??(v=>v);if(p)return{ref:f(p)};let b=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=b,{defId:b,ref:`${f("__shared")}#/${s}/${b}`}}if(a[1]===n)return{ref:"#"};let u=`#/${s}/`,d=a[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:u+d}},o=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:l,defId:u}=r(a);s.def={...s.schema},u&&(s.defId=u);let d=s.schema;for(let p in d)delete d[p];d.$ref=l};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
|
|
64
|
+
`)}b.write("payload.value = newResult;"),b.write("return payload;");let z=b.compile();return(g,S)=>z(f,g,S)},o,a=Hr,s=!Zr.jitless,u=s&&sd.value,d=t.catchall,p;e._zod.parse=(f,b)=>{p??(p=i.value);let v=f.value;return a(v)?s&&u&&b?.async===!1&&b.jitless!==!0?(o||(o=r(t.shape)),f=o(f,b),d?cy([],v,f,b,p,e):f):n(f,b):(f.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),f)}});function Jv(e,t,n,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let r=e.filter(o=>!ur(o));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(o=>o.issues.map(a=>ct(a,i,Me())))}),t)}var po=A("$ZodUnion",(e,t)=>{ve.init(e,t),Ie(e._zod,"optin",()=>t.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Ie(e._zod,"optout",()=>t.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Ie(e._zod,"values",()=>{if(t.options.every(i=>i._zod.values))return new Set(t.options.flatMap(i=>Array.from(i._zod.values)))}),Ie(e._zod,"pattern",()=>{if(t.options.every(i=>i._zod.pattern)){let i=t.options.map(r=>r._zod.pattern);return new RegExp(`^(${i.map(r=>to(r.source)).join("|")})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,a=[];for(let s of t.options){let c=s._zod.run({value:i.value,issues:[]},r);if(c instanceof Promise)a.push(c),o=!0;else{if(c.issues.length===0)return c;a.push(c)}}return o?Promise.all(a).then(s=>Jv(s,i,e,r)):Jv(a,i,e,r)}});function Gv(e,t,n,i){let r=e.filter(o=>o.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(o=>o.issues.map(a=>ct(a,i,Me())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}var Ym=A("$ZodXor",(e,t)=>{po.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,r)=>{if(n)return n(i,r);let o=!1,a=[];for(let s of t.options){let c=s._zod.run({value:i.value,issues:[]},r);c instanceof Promise?(a.push(c),o=!0):a.push(c)}return o?Promise.all(a).then(s=>Gv(s,i,e,r)):Gv(a,i,e,r)}}),Xm=A("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,po.init(e,t);let n=e._zod.parse;Ie(e._zod,"propValues",()=>{let r={};for(let o of t.options){let a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let[s,c]of Object.entries(a)){r[s]||(r[s]=new Set);for(let u of c)r[s].add(u)}}return r});let i=wn(()=>{let r=t.options,o=new Map;for(let a of r){let s=a._zod.propValues?.[t.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let c of s){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,a)}}return o});e._zod.parse=(r,o)=>{let a=r.value;if(!Hr(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;let s=i.value.get(a?.[t.discriminator]);return s?s._zod.run(r,o):t.unionFallback||o.direction==="backward"?n(r,o):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()),input:a,path:[t.discriminator],inst:e}),r)}}),Qm=A("$ZodIntersection",(e,t)=>{ve.init(e,t),e._zod.parse=(n,i)=>{let r=n.value,o=t.left._zod.run({value:r,issues:[]},i),a=t.right._zod.run({value:r,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([c,u])=>Bv(n,c,u)):Bv(n,o,a)}});function mm(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(lr(e)&&lr(t)){let n=Object.keys(t),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),r={...e,...t};for(let o of i){let a=mm(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r[o]=a.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;i<e.length;i++){let r=e[i],o=t[i],a=mm(r,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Bv(e,t,n){let i=new Map,r;for(let s of t.issues)if(s.code==="unrecognized_keys"){r??(r=s);for(let c of s.keys)i.has(c)||i.set(c,{}),i.get(c).l=!0}else e.issues.push(s);for(let s of n.issues)if(s.code==="unrecognized_keys")for(let c of s.keys)i.has(c)||i.set(c,{}),i.get(c).r=!0;else e.issues.push(s);let o=[...i].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(o.length&&r&&e.issues.push({...r,keys:o}),ur(e))return e;let a=mm(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var ls=A("$ZodTuple",(e,t)=>{ve.init(e,t);let n=t.items;e._zod.parse=(i,r)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let a=[],s=Kv(n,"optin"),c=Kv(n,"optout");if(!t.rest){if(o.length<s)return i.issues.push({code:"too_small",minimum:s,inclusive:!0,input:o,inst:e,origin:"array"}),i;o.length>n.length&&i.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:o,inst:e,origin:"array"})}let u=new Array(n.length);for(let d=0;d<n.length;d++){let p=n[d]._zod.run({value:o[d],issues:[]},r);p instanceof Promise?a.push(p.then(f=>{u[d]=f})):u[d]=p}if(t.rest){let d=n.length-1,p=o.slice(n.length);for(let f of p){d++;let b=t.rest._zod.run({value:f,issues:[]},r);b instanceof Promise?a.push(b.then(v=>Wv(v,i,d))):Wv(b,i,d)}}return a.length?Promise.all(a).then(()=>Yv(u,i,n,o,c)):Yv(u,i,n,o,c)}});function Kv(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function Wv(e,t,n){e.issues.length&&t.issues.push(...pt(n,e.issues)),t.value[n]=e.value}function Yv(e,t,n,i,r){for(let o=0;o<n.length;o++){let a=e[o],s=o<i.length;if(a.issues.length){if(!s&&o>=r){t.value.length=o;break}t.issues.push(...pt(o,a.issues))}t.value[o]=a.value}for(let o=t.value.length-1;o>=i.length&&(n[o]._zod.optout==="optional"&&t.value[o]===void 0);o--)t.value.length=o;return t}var ep=A("$ZodRecord",(e,t)=>{ve.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!lr(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;let o=[],a=t.keyType._zod.values;if(a){n.value={};let s=new Set;for(let u of a)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){s.add(typeof u=="number"?u.toString():u);let d=t.keyType._zod.run({value:u,issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(b=>ct(b,i,Me())),input:u,path:[u],inst:e});continue}let p=d.value,f=t.valueType._zod.run({value:r[u],issues:[]},i);f instanceof Promise?o.push(f.then(b=>{b.issues.length&&n.issues.push(...pt(u,b.issues)),n.value[p]=b.value})):(f.issues.length&&n.issues.push(...pt(u,f.issues)),n.value[p]=f.value)}let c;for(let u in r)s.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 s of Reflect.ownKeys(r)){if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(r,s))continue;let c=t.keyType._zod.run({value:s,issues:[]},i);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&es.test(s)&&c.issues.length){let p=t.keyType._zod.run({value:Number(s),issues:[]},i);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");p.issues.length===0&&(c=p)}if(c.issues.length){t.mode==="loose"?n.value[s]=r[s]:n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(p=>ct(p,i,Me())),input:s,path:[s],inst:e});continue}let d=t.valueType._zod.run({value:r[s],issues:[]},i);d instanceof Promise?o.push(d.then(p=>{p.issues.length&&n.issues.push(...pt(s,p.issues)),n.value[c.value]=p.value})):(d.issues.length&&n.issues.push(...pt(s,d.issues)),n.value[c.value]=d.value)}}return o.length?Promise.all(o).then(()=>n):n}}),tp=A("$ZodMap",(e,t)=>{ve.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),n;let o=[];n.value=new Map;for(let[a,s]of r){let c=t.keyType._zod.run({value:a,issues:[]},i),u=t.valueType._zod.run({value:s,issues:[]},i);c instanceof Promise||u instanceof Promise?o.push(Promise.all([c,u]).then(([d,p])=>{Xv(d,p,n,a,r,e,i)})):Xv(c,u,n,a,r,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function Xv(e,t,n,i,r,o,a){e.issues.length&&(ro.has(typeof i)?n.issues.push(...pt(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:r,inst:o,issues:e.issues.map(s=>ct(s,a,Me()))})),t.issues.length&&(ro.has(typeof i)?n.issues.push(...pt(i,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:r,inst:o,key:i,issues:t.issues.map(s=>ct(s,a,Me()))})),n.value.set(e.value,t.value)}var rp=A("$ZodSet",(e,t)=>{ve.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;if(!(r instanceof Set))return n.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),n;let o=[];n.value=new Set;for(let a of r){let s=t.valueType._zod.run({value:a,issues:[]},i);s instanceof Promise?o.push(s.then(c=>Qv(c,n))):Qv(s,n)}return o.length?Promise.all(o).then(()=>n):n}});function Qv(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var np=A("$ZodEnum",(e,t)=>{ve.init(e,t);let n=eo(t.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(r=>ro.has(typeof r)).map(r=>typeof r=="string"?wt(r):r.toString()).join("|")})$`),e._zod.parse=(r,o)=>{let a=r.value;return i.has(a)||r.issues.push({code:"invalid_value",values:n,input:a,inst:e}),r}}),ip=A("$ZodLiteral",(e,t)=>{if(ve.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(i=>typeof i=="string"?wt(i):i?wt(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,r)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),op=A("$ZodFile",(e,t)=>{ve.init(e,t),e._zod.parse=(n,i)=>{let r=n.value;return r instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:r,inst:e}),n}}),ap=A("$ZodTransform",(e,t)=>{ve.init(e,t),e._zod.optin="optional",e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ar(e.constructor.name);let r=t.transform(n.value,n);if(i.async)return(r instanceof Promise?r:Promise.resolve(r)).then(a=>(n.value=a,n.fallback=!0,n));if(r instanceof Promise)throw new kt;return n.value=r,n.fallback=!0,n}});function ey(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var us=A("$ZodOptional",(e,t)=>{ve.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Ie(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Ie(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${to(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(t.innerType._zod.optin==="optional"){let r=n.value,o=t.innerType._zod.run(n,i);return o instanceof Promise?o.then(a=>ey(a,r)):ey(o,r)}return n.value===void 0?n:t.innerType._zod.run(n,i)}}),sp=A("$ZodExactOptional",(e,t)=>{us.init(e,t),Ie(e._zod,"values",()=>t.innerType._zod.values),Ie(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,i)=>t.innerType._zod.run(n,i)}),cp=A("$ZodNullable",(e,t)=>{ve.init(e,t),Ie(e._zod,"optin",()=>t.innerType._zod.optin),Ie(e._zod,"optout",()=>t.innerType._zod.optout),Ie(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${to(n.source)}|null)$`):void 0}),Ie(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:t.innerType._zod.run(n,i)}),lp=A("$ZodDefault",(e,t)=>{ve.init(e,t),e._zod.optin="optional",Ie(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);if(n.value===void 0)return n.value=t.defaultValue,n;let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>ty(o,t)):ty(r,t)}});function ty(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var up=A("$ZodPrefault",(e,t)=>{ve.init(e,t),e._zod.optin="optional",Ie(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,i))}),dp=A("$ZodNonOptional",(e,t)=>{ve.init(e,t),Ie(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>ry(o,e)):ry(r,e)}});function ry(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 mp=A("$ZodSuccess",(e,t)=>{ve.init(e,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ar("ZodSuccess");let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.issues.length===0,n)):(n.value=r.issues.length===0,n)}}),pp=A("$ZodCatch",(e,t)=>{ve.init(e,t),e._zod.optin="optional",Ie(e._zod,"optout",()=>t.innerType._zod.optout),Ie(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(a=>ct(a,i,Me()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=r.value,r.issues.length&&(n.value=t.catchValue({...n,error:{issues:r.issues.map(o=>ct(o,i,Me()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),hp=A("$ZodNaN",(e,t)=>{ve.init(e,t),e._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),ds=A("$ZodPipe",(e,t)=>{ve.init(e,t),Ie(e._zod,"values",()=>t.in._zod.values),Ie(e._zod,"optin",()=>t.in._zod.optin),Ie(e._zod,"optout",()=>t.out._zod.optout),Ie(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(a=>ns(a,t.in,i)):ns(o,t.in,i)}let r=t.in._zod.run(n,i);return r instanceof Promise?r.then(o=>ns(o,t.out,i)):ns(r,t.out,i)}});function ns(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var ho=A("$ZodCodec",(e,t)=>{ve.init(e,t),Ie(e._zod,"values",()=>t.in._zod.values),Ie(e._zod,"optin",()=>t.in._zod.optin),Ie(e._zod,"optout",()=>t.out._zod.optout),Ie(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let o=t.in._zod.run(n,i);return o instanceof Promise?o.then(a=>is(a,t,i)):is(o,t,i)}else{let o=t.out._zod.run(n,i);return o instanceof Promise?o.then(a=>is(a,t,i)):is(o,t,i)}}});function is(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let r=t.transform(e.value,e);return r instanceof Promise?r.then(o=>os(e,o,t.out,n)):os(e,r,t.out,n)}else{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(o=>os(e,o,t.in,n)):os(e,r,t.in,n)}}function os(e,t,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},i)}var fp=A("$ZodPreprocess",(e,t)=>{ds.init(e,t)}),gp=A("$ZodReadonly",(e,t)=>{ve.init(e,t),Ie(e._zod,"propValues",()=>t.innerType._zod.propValues),Ie(e._zod,"values",()=>t.innerType._zod.values),Ie(e._zod,"optin",()=>t.innerType?._zod?.optin),Ie(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return t.innerType._zod.run(n,i);let r=t.innerType._zod.run(n,i);return r instanceof Promise?r.then(ny):ny(r)}});function ny(e){return e.value=Object.freeze(e.value),e}var vp=A("$ZodTemplateLiteral",(e,t)=>{ve.init(e,t);let n=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let r=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!r)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let o=r.startsWith("^")?1:0,a=r.endsWith("$")?r.length-1:r.length;n.push(r.slice(o,a))}else if(i===null||ld.has(typeof i))n.push(wt(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(i,r)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),yp=A("$ZodFunction",(e,t)=>(ve.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(...i){let r=e._def.input?Va(e._def.input,i):i,o=Reflect.apply(n,this,r);return e._def.output?Va(e._def.output,o):o}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let r=e._def.input?await Za(e._def.input,i):i,o=await Reflect.apply(n,this,r);return e._def.output?await Za(e._def.output,o):o}},e._zod.parse=(n,i)=>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 i=e.constructor;return Array.isArray(n[0])?new i({type:"function",input:new ls({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new i({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:n})},e)),_p=A("$ZodPromise",(e,t)=>{ve.init(e,t),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(r=>t.innerType._zod.run({value:r,issues:[]},i))}),bp=A("$ZodLazy",(e,t)=>{ve.init(e,t),Ie(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),Ie(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Ie(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Ie(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Ie(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),Sp=A("$ZodCustom",(e,t)=>{je.init(e,t),ve.init(e,t),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,r=t.fn(i);if(r instanceof Promise)return r.then(o=>iy(o,n,i,e));iy(r,n,i,e)}});function iy(e,t,n,i){if(!e){let r={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(r.params=i._zod.def.params),t.issues.push(zn(r))}}var go={};Zt(go,{ar:()=>uy,az:()=>dy,be:()=>py,bg:()=>hy,ca:()=>fy,cs:()=>gy,da:()=>vy,de:()=>yy,el:()=>_y,en:()=>ms,eo:()=>by,es:()=>Sy,fa:()=>$y,fi:()=>wy,fr:()=>zy,frCA:()=>Iy,he:()=>Ry,hr:()=>ky,hu:()=>Ty,hy:()=>Py,id:()=>xy,is:()=>jy,it:()=>Ay,ja:()=>Oy,ka:()=>Cy,kh:()=>Ny,km:()=>ps,ko:()=>Ly,lt:()=>My,mk:()=>Dy,ms:()=>Uy,nl:()=>Fy,no:()=>Vy,ota:()=>Zy,pl:()=>Jy,ps:()=>Hy,pt:()=>Gy,ro:()=>By,ru:()=>Wy,sl:()=>Yy,sv:()=>Xy,ta:()=>Qy,th:()=>e_,tr:()=>t_,ua:()=>r_,uk:()=>hs,ur:()=>n_,uz:()=>i_,vi:()=>o_,yo:()=>c_,zhCN:()=>a_,zhTW:()=>s_});var bI=()=>{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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\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 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}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 ${G(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: ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?` \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"} ${o} ${r.maximum.toString()} ${a.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"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\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 ${o} ${r.minimum.toString()} ${a.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 ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`${n[o.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":""}: ${q(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 uy(){return{localeError:bI()}}var SI=()=>{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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${r.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${s}`}case"invalid_value":return r.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${G(r.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${r.origin??"d\u0259y\u0259r"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[o.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":""}: ${q(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 dy(){return{localeError:SI()}}function my(e,t,n,i){let r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?n:i}var $I=()=>{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"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}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 ${G(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 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=my(s,a.unit.one,a.unit.few,a.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 ${a.verb} ${o}${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 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=my(s,a.unit.one,a.unit.few,a.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 ${a.verb} ${o}${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 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[o.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"}: ${q(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 py(){return{localeError:$I()}}var wI=()=>{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"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}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 ${G(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 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\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 ${o}${r.maximum.toString()} ${a.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 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\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 ${o}${r.minimum.toString()} ${a.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 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;if(o.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 "${o.prefix}"`;if(o.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 "${o.suffix}"`;if(o.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 "${o.includes}"`;if(o.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 ${o.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${n[o.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":""}: ${q(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 hy(){return{localeError:wI()}}var zI=()=>{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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${r.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${s}`}case"invalid_value":return r.values.length===1?`Valor inv\xE0lid: s'esperava ${G(r.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${q(r.values," o ")}`;case"too_big":{let o=r.inclusive?"com a m\xE0xim":"menys de",a=t(r.origin);return a?`Massa gran: s'esperava que ${r.origin??"el valor"} contingu\xE9s ${o} ${r.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${r.origin??"el valor"} fos ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(r.origin);return a?`Massa petit: s'esperava que ${r.origin} contingu\xE9s ${o} ${r.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${r.origin} fos ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${n[o.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":""}: ${q(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 fy(){return{localeError:zI()}}var II=()=>{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"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${r.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${s}`}case"invalid_value":return r.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${G(r.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED m\xEDt ${o}${r.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${r.origin??"hodnota"} mus\xED b\xFDt ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.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: ${q(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 gy(){return{localeError:II()}}var RI=()=>{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"},i={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 o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldigt input: forventede instanceof ${r.expected}, fik ${s}`:`Ugyldigt input: forventede ${o}, fik ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig v\xE6rdi: forventede ${G(r.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=i[r.origin]??r.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${o} ${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=i[r.origin]??r.origin;return a?`For lille: forventede ${s} ${a.verb} ${o} ${r.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.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"}: ${q(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 vy(){return{localeError:RI()}}var kI=()=>{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"},i={nan:"NaN",number:"Zahl",array:"Array"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${r.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${s}`}case"invalid_value":return r.values.length===1?`Ung\xFCltige Eingabe: erwartet ${G(r.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${r.origin??"Wert"} ${o}${r.maximum.toString()} ist`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${r.origin} ${o}${r.minimum.toString()} ist`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${n[o.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"}: ${q(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 yy(){return{localeError:kI()}}var TI=()=>{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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\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 ${o}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}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 ${G(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 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\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 ${o}${r.maximum.toString()} ${a.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 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\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 ${o}${r.minimum.toString()} ${a.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 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[o.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"}: ${q(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 _y(){return{localeError:TI()}}var EI=()=>{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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return`Invalid input: expected ${o}, received ${s}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${G(r.values[0])}`:`Invalid option: expected one of ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Too big: expected ${r.origin??"value"} to have ${o}${r.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${r.origin??"value"} to be ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Too small: expected ${r.origin} to have ${o}${r.minimum.toString()} ${a.unit}`:`Too small: expected ${r.origin} to be ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${n[o.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":""}: ${q(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(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${r.origin}`;default:return"Invalid input"}}};function ms(){return{localeError:EI()}}var PI=()=>{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"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${r.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${s}`}case"invalid_value":return r.values.length===1?`Nevalida enigo: atendi\u011Dis ${G(r.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${r.origin??"valoro"} havu ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Tro malgranda: atendi\u011Dis ke ${r.origin} havu ${o}${r.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${r.origin} estu ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${n[o.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":""}: ${q(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 by(){return{localeError:PI()}}var xI=()=>{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"},i={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 o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${r.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${s}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: se esperaba ${G(r.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${o}${r.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${o}${r.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${n[o.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":""}: ${q(r.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[r.origin]??r.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[r.origin]??r.origin}`;default:return"Entrada inv\xE1lida"}}};function Sy(){return{localeError:xI()}}var jI=()=>{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"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s} \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 ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \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 ${G(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 ${q(r.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${r.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${a.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 ${o}${r.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[o.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: ${q(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 $y(){return{localeError:jI()}}var AI=()=>{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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Virheellinen tyyppi: odotettiin instanceof ${r.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${s}`}case"invalid_value":return r.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${G(r.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${o}${r.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${o}${r.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${n[o.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"}: ${q(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 wy(){return{localeError:AI()}}var OI=()=>{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"},i={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 o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : instanceof ${r.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${s} re\xE7u`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : ${G(r.values[0])} attendu`:`Option invalide : une valeur parmi ${q(r.values,"|")} attendue`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Trop grand : ${i[r.origin]??"valeur"} doit ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Trop petit : ${i[r.origin]??"valeur"} doit ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Trop petit : ${i[r.origin]??"valeur"} doit \xEAtre ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${n[o.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":""} : ${q(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 zy(){return{localeError:OI()}}var CI=()=>{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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Entr\xE9e invalide : attendu instanceof ${r.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${s}`}case"invalid_value":return r.values.length===1?`Entr\xE9e invalide : attendu ${G(r.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u2264":"<",a=t(r.origin);return a?`Trop grand : attendu que ${r.origin??"la valeur"} ait ${o}${r.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${r.origin??"la valeur"} soit ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u2265":">",a=t(r.origin);return a?`Trop petit : attendu que ${r.origin} ait ${o}${r.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${r.origin} soit ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.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":""} : ${q(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 Iy(){return{localeError:CI()}}var NI=()=>{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,i=u=>{let d=n(u);return d?d.label:u??e.unknown.label},r=u=>`\u05D4${i(u)}`,o=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",a=u=>u?t[u]??null:null,s={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 d=u.expected,p=c[d??""]??i(d),f=B(u.input),b=c[f]??e[f]?.label??f;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 ${b}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${p}, \u05D4\u05EA\u05E7\u05D1\u05DC ${b}`}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 ${G(u.values[0])}`;let d=u.values.map(b=>G(b));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 ${d[0]} \u05D0\u05D5 ${d[1]}`;let p=d[d.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 ${d.slice(0,-1).join(", ")} \u05D0\u05D5 ${p}`}case"too_big":{let d=a(u.origin),p=r(u.origin??"value");if(u.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.maximum.toString()} ${d?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(u.origin==="number"){let v=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: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(u.origin==="array"||u.origin==="set"){let v=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",$=u.inclusive?`${u.maximum} ${d?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${u.maximum} ${d?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${p} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${$}`.trim()}let f=u.inclusive?"<=":"<",b=o(u.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${p} ${b} ${f}${u.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${p} ${b} ${f}${u.maximum.toString()}`}case"too_small":{let d=a(u.origin),p=r(u.origin??"value");if(u.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${p} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.minimum.toString()} ${d?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(u.origin==="number"){let v=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: ${p} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(u.origin==="array"||u.origin==="set"){let v=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){let y=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${y}`}let $=u.inclusive?`${u.minimum} ${d?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${u.minimum} ${d?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${p} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${$}`.trim()}let f=u.inclusive?">=":">",b=o(u.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${p} ${b} ${f}${u.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${p} ${b} ${f}${u.minimum.toString()}`}case"invalid_format":{let d=u;if(d.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${d.prefix}"`;if(d.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${d.suffix}"`;if(d.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${d.includes}"`;if(d.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 ${d.pattern}`;let p=s[d.format],f=p?.label??d.format,v=(p?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${v}`}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"}: ${q(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 Ry(){return{localeError:NI()}}var LI=()=>{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"},i={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 o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${r.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${s}`}case"invalid_value":return r.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${G(r.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${o}${r.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=i[r.origin]??r.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${o}${r.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${o.prefix}"`:o.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${o.suffix}"`:o.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${o.includes}"`:o.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`:`Neispravna ${n[o.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"}: ${q(r.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[r.origin]??r.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[r.origin]??r.origin}`;default:return"Neispravan unos"}}};function ky(){return{localeError:LI()}}var qI=()=>{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"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${r.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return r.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${G(r.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xFAl nagy: ${r.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${r.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${r.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} m\xE9rete t\xFAl kicsi ${o}${r.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${r.origin} t\xFAl kicsi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[o.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":""}: ${q(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 Ty(){return{localeError:qI()}}function Ey(e,t,n){return Math.abs(e)===1?t:n}function Pn(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 MI=()=>{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"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\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 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}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 ${G(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 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=Ey(s,a.unit.one,a.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 ${Pn(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${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 ${Pn(r.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=Ey(s,a.unit.one,a.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 ${Pn(r.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${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 ${Pn(r.origin)} \u056C\u056B\u0576\u056B ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.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 ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[o.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":""}. ${q(r.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Pn(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 ${Pn(r.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Py(){return{localeError:MI()}}var DI=()=>{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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak valid: diharapkan instanceof ${r.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${o}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak valid: diharapkan ${G(r.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: diharapkan ${r.origin??"value"} memiliki ${o}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${r.origin??"value"} menjadi ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: diharapkan ${r.origin} memiliki ${o}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${r.origin} menjadi ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${n[o.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":""}: ${q(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 xy(){return{localeError:DI()}}var UI=()=>{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"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${r.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return r.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${G(r.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} hafi ${o}${r.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin??"gildi"} s\xE9 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} hafi ${o}${r.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${r.origin} s\xE9 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${n[o.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"}: ${q(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 jy(){return{localeError:UI()}}var FI=()=>{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"},i={nan:"NaN",number:"numero",array:"vettore"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input non valido: atteso instanceof ${r.expected}, ricevuto ${s}`:`Input non valido: atteso ${o}, ricevuto ${s}`}case"invalid_value":return r.values.length===1?`Input non valido: atteso ${G(r.values[0])}`:`Opzione non valida: atteso uno tra ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Troppo grande: ${r.origin??"valore"} deve avere ${o}${r.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${r.origin??"valore"} deve essere ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Troppo piccolo: ${r.origin} deve avere ${o}${r.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${r.origin} deve essere ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Input non valido: ${n[o.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"}: ${q(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 Ay(){return{localeError:FI()}}var VI=()=>{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"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${r.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return r.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${G(r.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${q(r.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=r.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(r.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${a.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${r.origin??"\u5024"}\u306F${r.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=r.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(r.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${a.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${r.origin}\u306F${r.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[o.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":""}: ${q(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 Oy(){return{localeError:VI()}}var ZI=()=>{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"},i={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 o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\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 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}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 ${G(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 ${q(r.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\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"} ${a.verb} ${o}${r.maximum.toString()} ${a.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 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\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} ${a.verb} ${o}${r.minimum.toString()} ${a.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 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"-\u10D8\u10D7`:o.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 "${o.suffix}"-\u10D8\u10D7`:o.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 "${o.includes}"-\u10E1`:o.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 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[o.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"}: ${q(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 Cy(){return{localeError:ZI()}}var HI=()=>{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"},i={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 o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\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 ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}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 ${G(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 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${r.maximum.toString()} ${a.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"} ${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${r.origin} ${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[o.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 ${q(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 ps(){return{localeError:HI()}}function Ny(){return ps()}var JI=()=>{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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${r.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return r.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${G(r.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${q(r.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=r.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),c=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()}${c} ${o}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${r.maximum.toString()} ${o}${a}`}case"too_small":{let o=r.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(r.origin),c=s?.unit??"\uC694\uC18C";return s?`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()}${c} ${o}${a}`:`${r.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${r.minimum.toString()} ${o}${a}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[o.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: ${q(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 Ly(){return{localeError:JI()}}var fo=e=>e.charAt(0).toUpperCase()+e.slice(1);function qy(e){let t=Math.abs(e),n=t%10,i=t%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}var GI=()=>{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,o,a,s){let c=e[r]??null;return c===null?c:{unit:c.unit[o],verb:c.verb[s][a?"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"},i={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 o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${r.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${o}`}case"invalid_value":return r.values.length===1?`Privalo b\u016Bti ${G(r.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${q(r.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[r.origin]??r.origin,a=t(r.origin,qy(Number(r.maximum)),r.inclusive??!1,"smaller");if(a?.verb)return`${fo(o??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.maximum.toString()} ${a.unit??"element\u0173"}`;let s=r.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${fo(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.maximum.toString()} ${a?.unit}`}case"too_small":{let o=i[r.origin]??r.origin,a=t(r.origin,qy(Number(r.minimum)),r.inclusive??!1,"bigger");if(a?.verb)return`${fo(o??r.origin??"reik\u0161m\u0117")} ${a.verb} ${r.minimum.toString()} ${a.unit??"element\u0173"}`;let s=r.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${fo(o??r.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${r.minimum.toString()} ${a?.unit}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${n[o.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"}: ${q(r.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[r.origin]??r.origin;return`${fo(o??r.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function My(){return{localeError:GI()}}var BI=()=>{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"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return r.values.length===1?`Invalid input: expected ${G(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 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\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 ${o}${r.maximum.toString()} ${a.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 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\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 ${o}${r.minimum.toString()} ${a.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 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`Invalid ${n[o.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"}: ${q(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 Dy(){return{localeError:BI()}}var KI=()=>{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"},i={nan:"NaN",number:"nombor"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Input tidak sah: dijangka instanceof ${r.expected}, diterima ${s}`:`Input tidak sah: dijangka ${o}, diterima ${s}`}case"invalid_value":return r.values.length===1?`Input tidak sah: dijangka ${G(r.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Terlalu besar: dijangka ${r.origin??"nilai"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${r.origin??"nilai"} adalah ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Terlalu kecil: dijangka ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${r.origin} adalah ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${n[o.format]??r.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${r.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${q(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 Uy(){return{localeError:KI()}}var WI=()=>{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"},i={nan:"NaN",number:"getal"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ongeldige invoer: verwacht instanceof ${r.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${o}, ontving ${s}`}case"invalid_value":return r.values.length===1?`Ongeldige invoer: verwacht ${G(r.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin),s=r.origin==="date"?"laat":r.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin??"waarde"} ${o}${r.maximum.toString()} is`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin),s=r.origin==="date"?"vroeg":r.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${r.origin} ${o}${r.minimum.toString()} is`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${n[o.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":""}: ${q(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 Fy(){return{localeError:WI()}}var YI=()=>{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"},i={nan:"NaN",number:"tall",array:"liste"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ugyldig input: forventet instanceof ${r.expected}, fikk ${s}`:`Ugyldig input: forventet ${o}, fikk ${s}`}case"invalid_value":return r.values.length===1?`Ugyldig verdi: forventet ${G(r.values[0])}`:`Ugyldig valg: forventet en av ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${r.origin??"value"} til \xE5 ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${r.origin} til \xE5 ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.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"}: ${q(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 Vy(){return{localeError:YI()}}var XI=()=>{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"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`F\xE2sit giren: umulan instanceof ${r.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`F\xE2sit giren: umulan ${G(r.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${r.origin??"value"}, ${o}${r.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${r.origin}, ${o}${r.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=r;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[o.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":""}: ${q(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:XI()}}var QI=()=>{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"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \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 ${G(r.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${q(r.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${r.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${r.maximum.toString()} ${a.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 ${o}${r.maximum.toString()} \u0648\u064A`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${r.origin} \u0628\u0627\u06CC\u062F ${o}${r.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[o.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"}: ${q(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 Hy(){return{localeError:QI()}}var eR=()=>{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"},i={nan:"NaN",number:"liczba",array:"tablica"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${r.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${s}`}case"invalid_value":return r.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${G(r.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${r.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${r.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[o.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":""}: ${q(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 Jy(){return{localeError:eR()}}var tR=()=>{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"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Tipo inv\xE1lido: esperado instanceof ${r.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${s}`}case"invalid_value":return r.values.length===1?`Entrada inv\xE1lida: esperado ${G(r.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Muito grande: esperado que ${r.origin??"valor"} tivesse ${o}${r.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${r.origin??"valor"} fosse ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Muito pequeno: esperado que ${r.origin} tivesse ${o}${r.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${r.origin} fosse ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${n[o.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":""}: ${q(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 Gy(){return{localeError:tR()}}var rR=()=>{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"},i={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 o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${s}`}case"invalid_value":return r.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${G(r.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${r.origin??"valoarea"} s\u0103 fie ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Prea mic: a\u0219teptat ca ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${r.origin} s\u0103 fie ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${o.prefix}"`:o.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${o.suffix}"`:o.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${o.includes}"`:o.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${o.pattern}`:`Format invalid: ${n[o.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: ${q(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 By(){return{localeError:rR()}}function Ky(e,t,n,i){let r=Math.abs(e),o=r%10,a=r%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?n:i}var nR=()=>{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"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}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 ${G(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 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);if(a){let s=Number(r.maximum),c=Ky(s,a.unit.one,a.unit.few,a.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 ${o}${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 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);if(a){let s=Number(r.minimum),c=Ky(s,a.unit.one,a.unit.few,a.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 ${o}${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 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[o.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":""}: ${q(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 Wy(){return{localeError:nR()}}var iR=()=>{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"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${r.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${s}`}case"invalid_value":return r.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${G(r.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} imelo ${o}${r.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${r.origin??"vrednost"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${r.origin} imelo ${o}${r.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.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"}: ${q(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 Yy(){return{localeError:iR()}}var oR=()=>{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"},i={nan:"NaN",number:"antal",array:"lista"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${r.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${s}`}case"invalid_value":return r.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${G(r.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${r.origin??"v\xE4rdet"} att ha ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${r.origin??"v\xE4rdet"} att ha ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${n[o.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"}: ${q(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 Xy(){return{localeError:oR()}}var aR=()=>{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"},i={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 o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\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 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}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 ${G(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 ${q(r.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\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"} ${o}${r.maximum.toString()} ${a.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"} ${o}${r.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\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} ${o}${r.minimum.toString()} ${a.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} ${o}${r.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.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[o.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":""}: ${q(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 Qy(){return{localeError:aR()}}var sR=()=>{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"},i={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 o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\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 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}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 ${G(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 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.maximum.toString()} ${a.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${o} ${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(r.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${r.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.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 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[o.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: ${q(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 e_(){return{localeError:sR()}}var cR=()=>{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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${r.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${s}`}case"invalid_value":return r.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${G(r.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${r.origin??"de\u011Fer"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[o.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":""}: ${q(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 t_(){return{localeError:cR()}}var lR=()=>{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"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\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 ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}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 ${G(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 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\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"} ${a.verb} ${o}${r.maximum.toString()} ${a.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 ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\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} ${a.verb} ${o}${r.minimum.toString()} ${a.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 ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.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 "${o.suffix}"`:o.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 "${o.includes}"`:o.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 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[o.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":""}: ${q(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 hs(){return{localeError:lR()}}function r_(){return hs()}var uR=()=>{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"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return r.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${G(r.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${q(r.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${r.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${r.maximum.toString()} ${a.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 ${o}${r.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${r.origin} \u06A9\u06D2 ${o}${r.minimum.toString()} ${a.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 ${o}${r.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[o.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":""}: ${q(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 n_(){return{localeError:uR()}}var dR=()=>{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"},i={nan:"NaN",number:"raqam",array:"massiv"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${r.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${s}`}case"invalid_value":return r.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${G(r.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${r.origin??"qiymat"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[o.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":""}: ${q(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 i_(){return{localeError:dR()}}var mR=()=>{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"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return r.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${G(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 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${o}${r.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${r.origin??"gi\xE1 tr\u1ECB"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${a.verb} ${o}${r.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${n[o.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: ${q(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 o_(){return{localeError:mR()}}var pR=()=>{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"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${r.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return r.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${G(r.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${r.origin??"\u503C"} ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${r.origin} ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${n[o.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): ${q(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 a_(){return{localeError:pR()}}var hR=()=>{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"},i={nan:"NaN"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;return/^[A-Z]/.test(r.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${r.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return r.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${G(r.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${r.origin??"\u503C"} \u61C9\u70BA ${o}${r.maximum.toString()}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${r.origin} \u61C9\u70BA ${o}${r.minimum.toString()}`}case"invalid_format":{let o=r;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${n[o.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${q(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 s_(){return{localeError:hR()}}var fR=()=>{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"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return r=>{switch(r.code){case"invalid_type":{let o=i[r.expected]??r.expected,a=B(r.input),s=i[a]??a;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 ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return r.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${G(r.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${q(r.values,"|")}`;case"too_big":{let o=r.inclusive?"<=":"<",a=t(r.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin??"iye"} ${a.verb} ${o}${r.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.maximum}`}case"too_small":{let o=r.inclusive?">=":">",a=t(r.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${r.origin} ${a.verb} ${o}${r.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${r.minimum}`}case"invalid_format":{let o=r;return o.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 "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${n[o.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: ${q(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 c_(){return{localeError:fR()}}var l_,$p=Symbol("ZodOutput"),wp=Symbol("ZodInput"),fs=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let i=n[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.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 i={...this.get(n)??{}};delete i.id;let r={...i,...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 gs(){return new fs}(l_=globalThis).__zod_globalRegistry??(l_.__zod_globalRegistry=gs());var Xe=globalThis.__zod_globalRegistry;function zp(e,t){return new e({type:"string",...W(t)})}function Ip(e,t){return new e({type:"string",coerce:!0,...W(t)})}function vs(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...W(t)})}function vo(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...W(t)})}function ys(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...W(t)})}function _s(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...W(t)})}function bs(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...W(t)})}function Ss(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...W(t)})}function yo(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...W(t)})}function $s(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...W(t)})}function ws(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...W(t)})}function zs(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...W(t)})}function Is(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...W(t)})}function Rs(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...W(t)})}function ks(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...W(t)})}function Ts(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...W(t)})}function Es(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...W(t)})}function Ps(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...W(t)})}function Rp(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...W(t)})}function xs(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...W(t)})}function js(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...W(t)})}function As(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...W(t)})}function Os(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...W(t)})}function Cs(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...W(t)})}function Ns(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...W(t)})}var kp={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Tp(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...W(t)})}function Ep(e,t){return new e({type:"string",format:"date",check:"string_format",...W(t)})}function Pp(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...W(t)})}function xp(e,t){return new e({type:"string",format:"duration",check:"string_format",...W(t)})}function jp(e,t){return new e({type:"number",checks:[],...W(t)})}function Ap(e,t){return new e({type:"number",coerce:!0,checks:[],...W(t)})}function Op(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...W(t)})}function Cp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...W(t)})}function Np(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...W(t)})}function Lp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...W(t)})}function qp(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...W(t)})}function Mp(e,t){return new e({type:"boolean",...W(t)})}function Dp(e,t){return new e({type:"boolean",coerce:!0,...W(t)})}function Up(e,t){return new e({type:"bigint",...W(t)})}function Fp(e,t){return new e({type:"bigint",coerce:!0,...W(t)})}function Vp(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...W(t)})}function Zp(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...W(t)})}function Hp(e,t){return new e({type:"symbol",...W(t)})}function Jp(e,t){return new e({type:"undefined",...W(t)})}function Gp(e,t){return new e({type:"null",...W(t)})}function Bp(e){return new e({type:"any"})}function Kp(e){return new e({type:"unknown"})}function Wp(e,t){return new e({type:"never",...W(t)})}function Yp(e,t){return new e({type:"void",...W(t)})}function Xp(e,t){return new e({type:"date",...W(t)})}function Qp(e,t){return new e({type:"date",coerce:!0,...W(t)})}function eh(e,t){return new e({type:"nan",...W(t)})}function Nt(e,t){return new ts({check:"less_than",...W(t),value:e,inclusive:!1})}function _t(e,t){return new ts({check:"less_than",...W(t),value:e,inclusive:!0})}function Lt(e,t){return new rs({check:"greater_than",...W(t),value:e,inclusive:!1})}function lt(e,t){return new rs({check:"greater_than",...W(t),value:e,inclusive:!0})}function Ls(e){return Lt(0,e)}function qs(e){return Nt(0,e)}function Ms(e){return _t(0,e)}function Ds(e){return lt(0,e)}function dr(e,t){return new Gd({check:"multiple_of",...W(t),value:e})}function mr(e,t){return new Wd({check:"max_size",...W(t),maximum:e})}function qt(e,t){return new Yd({check:"min_size",...W(t),minimum:e})}function Br(e,t){return new Xd({check:"size_equals",...W(t),size:e})}function Kr(e,t){return new Qd({check:"max_length",...W(t),maximum:e})}function Jt(e,t){return new em({check:"min_length",...W(t),minimum:e})}function Wr(e,t){return new tm({check:"length_equals",...W(t),length:e})}function xn(e,t){return new rm({check:"string_format",format:"regex",...W(t),pattern:e})}function jn(e){return new nm({check:"string_format",format:"lowercase",...W(e)})}function An(e){return new im({check:"string_format",format:"uppercase",...W(e)})}function On(e,t){return new om({check:"string_format",format:"includes",...W(t),includes:e})}function Cn(e,t){return new am({check:"string_format",format:"starts_with",...W(t),prefix:e})}function Nn(e,t){return new sm({check:"string_format",format:"ends_with",...W(t),suffix:e})}function Us(e,t,n){return new cm({check:"property",property:e,schema:t,...W(n)})}function Ln(e,t){return new lm({check:"mime_type",mime:e,...W(t)})}function Tt(e){return new um({check:"overwrite",tx:e})}function qn(e){return Tt(t=>t.normalize(e))}function Mn(){return Tt(e=>e.trim())}function Dn(){return Tt(e=>e.toLowerCase())}function Un(){return Tt(e=>e.toUpperCase())}function Fn(){return Tt(e=>ad(e))}function th(e,t,n){return new e({type:"array",element:t,...W(n)})}function vR(e,t,n){return new e({type:"union",options:t,...W(n)})}function yR(e,t,n){return new e({type:"union",options:t,inclusive:!1,...W(n)})}function _R(e,t,n,i){return new e({type:"union",options:n,discriminator:t,...W(i)})}function bR(e,t,n){return new e({type:"intersection",left:t,right:n})}function SR(e,t,n,i){let r=n instanceof ve,o=r?i:n,a=r?n:null;return new e({type:"tuple",items:t,rest:a,...W(o)})}function $R(e,t,n,i){return new e({type:"record",keyType:t,valueType:n,...W(i)})}function wR(e,t,n,i){return new e({type:"map",keyType:t,valueType:n,...W(i)})}function zR(e,t,n){return new e({type:"set",valueType:t,...W(n)})}function IR(e,t,n){let i=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new e({type:"enum",entries:i,...W(n)})}function RR(e,t,n){return new e({type:"enum",entries:t,...W(n)})}function kR(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...W(n)})}function rh(e,t){return new e({type:"file",...W(t)})}function TR(e,t){return new e({type:"transform",transform:t})}function ER(e,t){return new e({type:"optional",innerType:t})}function PR(e,t){return new e({type:"nullable",innerType:t})}function xR(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():cd(n)}})}function jR(e,t,n){return new e({type:"nonoptional",innerType:t,...W(n)})}function AR(e,t){return new e({type:"success",innerType:t})}function OR(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function CR(e,t,n){return new e({type:"pipe",in:t,out:n})}function NR(e,t){return new e({type:"readonly",innerType:t})}function LR(e,t,n){return new e({type:"template_literal",parts:t,...W(n)})}function qR(e,t){return new e({type:"lazy",getter:t})}function MR(e,t){return new e({type:"promise",innerType:t})}function nh(e,t,n){let i=W(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function ih(e,t,n){return new e({type:"custom",check:"custom",fn:t,...W(n)})}function oh(e,t){let n=u_(i=>(i.addIssue=r=>{if(typeof r=="string")i.issues.push(zn(r,i.value,n._zod.def));else{let o=r;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),i.issues.push(zn(o))}},e(i.value,i)),t);return n}function u_(e,t){let n=new je({check:"custom",...W(t)});return n._zod.check=e,n}function ah(e){let t=new je({check:"describe"});return t._zod.onattach=[n=>{let i=Xe.get(n)??{};Xe.add(n,{...i,description:e})}],t._zod.check=()=>{},t}function sh(e){let t=new je({check:"meta"});return t._zod.onattach=[n=>{let i=Xe.get(n)??{};Xe.add(n,{...i,...e})}],t._zod.check=()=>{},t}function ch(e,t){let n=W(t),i=n.truthy??["true","1","yes","on","y","enabled"],r=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(b=>typeof b=="string"?b.toLowerCase():b),r=r.map(b=>typeof b=="string"?b.toLowerCase():b));let o=new Set(i),a=new Set(r),s=e.Codec??ho,c=e.Boolean??mo,u=e.String??Gr,d=new u({type:"string",error:n.error}),p=new c({type:"boolean",error:n.error}),f=new s({type:"pipe",in:d,out:p,transform:((b,v)=>{let $=b;return n.case!=="sensitive"&&($=$.toLowerCase()),o.has($)?!0:a.has($)?!1:(v.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:v.value,inst:f,continue:!1}),{})}),reverseTransform:((b,v)=>b===!0?i[0]||"true":r[0]||"false"),error:n.error});return f}function Vn(e,t,n,i={}){let r=W(i),o={...W(i),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:s=>n.test(s),...r};return n instanceof RegExp&&(o.pattern=n),new e(o)}function pr(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??Xe,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 Ee(e,t,n={path:[],schemaPath:[]}){var i;let r=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let d={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,d);else{let f=a.schema,b=t.processors[r.type];if(!b)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${r.type}`);b(e,t,f,d)}let p=e._zod.parent;p&&(a.ref||(a.ref=p),Ee(p,t,d),t.seen.get(p).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(a.schema,c),t.io==="input"&&ut(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function hr(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let c=i.get(s);if(c&&c!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(s,a[0])}}let r=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let p=e.external.registry.get(a[0])?.id,f=e.external.uri??(v=>v);if(p)return{ref:f(p)};let b=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=b,{defId:b,ref:`${f("__shared")}#/${s}/${b}`}}if(a[1]===n)return{ref:"#"};let u=`#/${s}/`,d=a[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:u+d}},o=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:c,defId:u}=r(a);s.def={...s.schema},u&&(s.defId=u);let d=s.schema;for(let p in d)delete d[p];d.$ref=c};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
|
|
65
65
|
|
|
66
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){o(a);continue}if(e.external){let u=e.external.registry.get(a[0])?.id;if(t!==a[0]&&u){o(a);continue}}if(e.metadataRegistry.get(a[0])?.id){o(a);continue}if(s.cycle){o(a);continue}if(s.count>1&&e.reused==="ref"){o(a);continue}}}function hr(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=s=>{let l=e.seen.get(s);if(l.ref===null)return;let u=l.def??l.schema,d={...u},p=l.ref;if(l.ref=null,p){i(p);let b=e.seen.get(p),v=b.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(v)):Object.assign(u,v),Object.assign(u,d),s._zod.parent===p)for(let y in u)y==="$ref"||y==="allOf"||y in d||delete u[y];if(v.$ref&&b.def)for(let y in u)y==="$ref"||y==="allOf"||y in b.def&&JSON.stringify(u[y])===JSON.stringify(b.def[y])&&delete u[y]}let f=s._zod.parent;if(f&&f!==p){i(f);let b=e.seen.get(f);if(b?.schema.$ref&&(u.$ref=b.schema.$ref,b.def))for(let v in u)v==="$ref"||v==="allOf"||v in b.def&&JSON.stringify(u[v])===JSON.stringify(b.def[v])&&delete u[v]}e.override({zodSchema:s,jsonSchema:u,path:l.path??[]})};for(let s of[...e.seen.entries()].reverse())i(s[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 s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(s)}Object.assign(r,n.def??n.schema);let o=e.metadataRegistry.get(t)?.id;o!==void 0&&r.id===o&&delete r.id;let a=e.external?.defs??{};for(let s of e.seen.entries()){let l=s[1];l.def&&l.defId&&(l.def.id===l.defId&&delete l.def.id,a[l.defId]=l.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?r.$defs=a:r.definitions=a);try{let s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Fn(t,"input",e.processors),output:Fn(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function lt(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return lt(i.element,n);if(i.type==="set")return lt(i.valueType,n);if(i.type==="lazy")return lt(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return lt(i.innerType,n);if(i.type==="intersection")return lt(i.left,n)||lt(i.right,n);if(i.type==="record"||i.type==="map")return lt(i.keyType,n)||lt(i.valueType,n);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:lt(i.in,n)||lt(i.out,n);if(i.type==="object"){for(let r in i.shape)if(lt(i.shape[r],n))return!0;return!1}if(i.type==="union"){for(let r of i.options)if(lt(r,n))return!0;return!1}if(i.type==="tuple"){for(let r of i.items)if(lt(r,n))return!0;return!!(i.rest&<(i.rest,n))}return!1}var eh=(e,t={})=>n=>{let i=mr({...n,processors:t});return Ee(e,i),pr(i,e),hr(i,e)},Fn=(e,t,n={})=>i=>{let{libraryOptions:r,target:o}=i??{},a=mr({...r??{},target:o,io:t,processors:n});return Ee(e,a),pr(a,e),hr(a,e)};var zR={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},th=(e,t,n,i)=>{let r=n;r.type="string";let{minimum:o,maximum:a,format:s,patterns:l,contentEncoding:u}=e._zod.bag;if(typeof o=="number"&&(r.minLength=o),typeof a=="number"&&(r.maxLength=a),s&&(r.format=zR[s]??s,r.format===""&&delete r.format,s==="time"&&delete r.format),u&&(r.contentEncoding=u),l&&l.size>0){let d=[...l];d.length===1?r.pattern=d[0].source:d.length>1&&(r.allOf=[...d.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},rh=(e,t,n,i)=>{let r=n,{minimum:o,maximum:a,format:s,multipleOf:l,exclusiveMaximum:u,exclusiveMinimum:d}=e._zod.bag;typeof s=="string"&&s.includes("int")?r.type="integer":r.type="number";let p=typeof d=="number"&&d>=(o??Number.NEGATIVE_INFINITY),f=typeof u=="number"&&u<=(a??Number.POSITIVE_INFINITY),b=t.target==="draft-04"||t.target==="openapi-3.0";p?b?(r.minimum=d,r.exclusiveMinimum=!0):r.exclusiveMinimum=d:typeof o=="number"&&(r.minimum=o),f?b?(r.maximum=u,r.exclusiveMaximum=!0):r.exclusiveMaximum=u:typeof a=="number"&&(r.maximum=a),typeof l=="number"&&(r.multipleOf=l)},nh=(e,t,n,i)=>{n.type="boolean"},ih=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},oh=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},ah=(e,t,n,i)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},sh=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},ch=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},lh=(e,t,n,i)=>{n.not={}},uh=(e,t,n,i)=>{},dh=(e,t,n,i)=>{},mh=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},ph=(e,t,n,i)=>{let r=e._zod.def,o=Yi(r.entries);o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),n.enum=o},hh=(e,t,n,i)=>{let r=e._zod.def,o=[];for(let a of r.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),o.every(a=>typeof a=="boolean")&&(n.type="boolean"),o.every(a=>a===null)&&(n.type="null"),n.enum=o},fh=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},gh=(e,t,n,i)=>{let r=n,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},vh=(e,t,n,i)=>{let r=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:l}=e._zod.bag;a!==void 0&&(o.minLength=a),s!==void 0&&(o.maxLength=s),l?l.length===1?(o.contentMediaType=l[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=l.map(u=>({contentMediaType:u}))):Object.assign(r,o)},yh=(e,t,n,i)=>{n.type="boolean"},_h=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},bh=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Sh=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},$h=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},wh=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},zh=(e,t,n,i)=>{let r=n,o=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(r.minItems=a),typeof s=="number"&&(r.maxItems=s),r.type="array",r.items=Ee(o.element,t,{...i,path:[...i.path,"items"]})},Ih=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object",r.properties={};let a=o.shape;for(let u in a)r.properties[u]=Ee(a[u],t,{...i,path:[...i.path,"properties",u]});let s=new Set(Object.keys(a)),l=new Set([...s].filter(u=>{let d=o.shape[u]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));l.size>0&&(r.required=Array.from(l)),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=Ee(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},qs=(e,t,n,i)=>{let r=e._zod.def,o=r.inclusive===!1,a=r.options.map((s,l)=>Ee(s,t,{...i,path:[...i.path,o?"oneOf":"anyOf",l]}));o?n.oneOf=a:n.anyOf=a},Rh=(e,t,n,i)=>{let r=e._zod.def,o=Ee(r.left,t,{...i,path:[...i.path,"allOf",0]}),a=Ee(r.right,t,{...i,path:[...i.path,"allOf",1]}),s=u=>"allOf"in u&&Object.keys(u).length===1,l=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];n.allOf=l},kh=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",l=o.items.map((f,b)=>Ee(f,t,{...i,path:[...i.path,a,b]})),u=o.rest?Ee(o.rest,t,{...i,path:[...i.path,s,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(r.prefixItems=l,u&&(r.items=u)):t.target==="openapi-3.0"?(r.items={anyOf:l},u&&r.items.anyOf.push(u),r.minItems=l.length,u||(r.maxItems=l.length)):(r.items=l,u&&(r.additionalItems=u));let{minimum:d,maximum:p}=e._zod.bag;typeof d=="number"&&(r.minItems=d),typeof p=="number"&&(r.maxItems=p)},Th=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object";let a=o.keyType,l=a._zod.bag?.patterns;if(o.mode==="loose"&&l&&l.size>0){let d=Ee(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(let p of l)r.patternProperties[p.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=Ee(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=Ee(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let u=a._zod.values;if(u){let d=[...u].filter(p=>typeof p=="string"||typeof p=="number");d.length>0&&(r.required=d)}},Eh=(e,t,n,i)=>{let r=e._zod.def,o=Ee(r.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=r.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},Ph=(e,t,n,i)=>{let r=e._zod.def;Ee(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},xh=(e,t,n,i)=>{let r=e._zod.def;Ee(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},jh=(e,t,n,i)=>{let r=e._zod.def;Ee(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},Ah=(e,t,n,i)=>{let r=e._zod.def;Ee(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType;let a;try{a=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},Oh=(e,t,n,i)=>{let r=e._zod.def,o=r.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?o?r.out:r.in:r.out;Ee(a,t,i);let s=t.seen.get(e);s.ref=a},Nh=(e,t,n,i)=>{let r=e._zod.def;Ee(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.readOnly=!0},Ch=(e,t,n,i)=>{let r=e._zod.def;Ee(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},Ms=(e,t,n,i)=>{let r=e._zod.def;Ee(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},Lh=(e,t,n,i)=>{let r=e._zod.innerType;Ee(r,t,i);let o=t.seen.get(e);o.ref=r},Ls={string:th,number:rh,boolean:nh,bigint:ih,symbol:oh,null:ah,undefined:sh,void:ch,never:lh,any:uh,unknown:dh,date:mh,enum:ph,literal:hh,nan:fh,template_literal:gh,file:vh,success:yh,custom:_h,function:bh,transform:Sh,map:$h,set:wh,array:zh,object:Ih,union:qs,intersection:Rh,tuple:kh,record:Th,nullable:Eh,nonoptional:Ph,default:xh,prefault:jh,catch:Ah,pipe:Oh,readonly:Nh,promise:Ch,optional:Ms,lazy:Lh};function Kr(e,t){if("_idmap"in e){let i=e,r=mr({...t,processors:Ls}),o={};for(let l of i._idmap.entries()){let[u,d]=l;Ee(d,r)}let a={},s={registry:i,uri:t?.uri,defs:o};r.external=s;for(let l of i._idmap.entries()){let[u,d]=l;pr(r,d),a[u]=hr(r,d)}if(Object.keys(o).length>0){let l=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[l]:o}}return{schemas:a}}let n=mr({...t,processors:Ls});return Ee(e,n),pr(n,e),hr(n,e)}var Ds=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=mr({processors:Ls,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 Ee(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)),pr(this.ctx,t);let i=hr(this.ctx,t),{"~standard":r,...o}=i;return o}};var e_={};var go={};Vt(go,{ZodAny:()=>nf,ZodArray:()=>cf,ZodBase64:()=>cc,ZodBase64URL:()=>lc,ZodBigInt:()=>Wn,ZodBigIntFormat:()=>mc,ZodBoolean:()=>Kn,ZodCIDRv4:()=>ac,ZodCIDRv6:()=>sc,ZodCUID:()=>Qs,ZodCUID2:()=>ec,ZodCatch:()=>Tf,ZodCodec:()=>Ro,ZodCustom:()=>ko,ZodCustomStringFormat:()=>Gn,ZodDate:()=>$o,ZodDefault:()=>$f,ZodDiscriminatedUnion:()=>uf,ZodE164:()=>uc,ZodEmail:()=>Ks,ZodEmoji:()=>Ys,ZodEnum:()=>Zn,ZodExactOptional:()=>_f,ZodFile:()=>vf,ZodFunction:()=>Lf,ZodGUID:()=>yo,ZodIPv4:()=>ic,ZodIPv6:()=>oc,ZodIntersection:()=>df,ZodJWT:()=>dc,ZodKSUID:()=>nc,ZodLazy:()=>Nf,ZodLiteral:()=>gf,ZodMAC:()=>Qh,ZodMap:()=>hf,ZodNaN:()=>Pf,ZodNanoID:()=>Xs,ZodNever:()=>af,ZodNonOptional:()=>vc,ZodNull:()=>rf,ZodNullable:()=>Sf,ZodNumber:()=>Bn,ZodNumberFormat:()=>Wr,ZodObject:()=>wo,ZodOptional:()=>gc,ZodPipe:()=>Io,ZodPrefault:()=>zf,ZodPreprocess:()=>xf,ZodPromise:()=>Cf,ZodReadonly:()=>jf,ZodRecord:()=>Vn,ZodSet:()=>ff,ZodString:()=>Hn,ZodStringFormat:()=>xe,ZodSuccess:()=>kf,ZodSymbol:()=>ef,ZodTemplateLiteral:()=>Of,ZodTransform:()=>yf,ZodTuple:()=>mf,ZodType:()=>$e,ZodULID:()=>tc,ZodURL:()=>So,ZodUUID:()=>Lt,ZodUndefined:()=>tf,ZodUnion:()=>zo,ZodUnknown:()=>of,ZodVoid:()=>sf,ZodXID:()=>rc,ZodXor:()=>lf,_ZodString:()=>Bs,_default:()=>wf,_function:()=>rb,any:()=>pc,array:()=>O,base64:()=>S_,base64url:()=>$_,bigint:()=>A_,boolean:()=>te,catch:()=>Ef,check:()=>nb,cidrv4:()=>__,cidrv6:()=>b_,codec:()=>X_,cuid:()=>d_,cuid2:()=>m_,custom:()=>ib,date:()=>M_,describe:()=>ob,discriminatedUnion:()=>fr,e164:()=>w_,email:()=>Ws,emoji:()=>l_,enum:()=>fe,exactOptional:()=>bf,file:()=>B_,float32:()=>E_,float64:()=>P_,function:()=>rb,guid:()=>n_,hash:()=>T_,hex:()=>k_,hostname:()=>R_,httpUrl:()=>c_,instanceof:()=>sb,int:()=>Js,int32:()=>x_,int64:()=>O_,intersection:()=>Tt,invertCodec:()=>Q_,ipv4:()=>g_,ipv6:()=>y_,json:()=>lb,jwt:()=>z_,keyof:()=>D_,ksuid:()=>f_,lazy:()=>gr,literal:()=>N,looseObject:()=>ue,looseRecord:()=>Z_,mac:()=>v_,map:()=>H_,meta:()=>ab,nan:()=>Y_,nanoid:()=>u_,nativeEnum:()=>G_,never:()=>hc,nonoptional:()=>Rf,null:()=>qt,nullable:()=>_o,nullish:()=>K_,number:()=>H,object:()=>T,optional:()=>ae,partialRecord:()=>V_,pipe:()=>Gs,prefault:()=>If,preprocess:()=>Gt,promise:()=>tb,readonly:()=>Af,record:()=>Q,refine:()=>qf,set:()=>J_,strictObject:()=>U_,string:()=>m,stringFormat:()=>I_,stringbool:()=>cb,success:()=>W_,superRefine:()=>Mf,symbol:()=>C_,templateLiteral:()=>eb,transform:()=>fc,tuple:()=>pf,uint32:()=>j_,uint64:()=>N_,ulid:()=>p_,undefined:()=>L_,union:()=>ie,unknown:()=>oe,url:()=>Jn,uuid:()=>i_,uuidv4:()=>o_,uuidv6:()=>a_,uuidv7:()=>s_,void:()=>q_,xid:()=>h_,xor:()=>F_});var Us={};Vt(Us,{endsWith:()=>On,gt:()=>Nt,gte:()=>ct,includes:()=>jn,length:()=>Br,lowercase:()=>Pn,lt:()=>Ot,lte:()=>yt,maxLength:()=>Gr,maxSize:()=>dr,mime:()=>Nn,minLength:()=>Ht,minSize:()=>Ct,multipleOf:()=>ur,negative:()=>As,nonnegative:()=>Ns,nonpositive:()=>Os,normalize:()=>Cn,overwrite:()=>kt,positive:()=>js,property:()=>Cs,regex:()=>En,size:()=>Jr,slugify:()=>Dn,startsWith:()=>An,toLowerCase:()=>qn,toUpperCase:()=>Mn,trim:()=>Ln,uppercase:()=>xn});var _t={};Vt(_t,{ZodISODate:()=>Vs,ZodISODateTime:()=>Fs,ZodISODuration:()=>Hs,ZodISOTime:()=>Zs,date:()=>Mh,datetime:()=>qh,duration:()=>Uh,time:()=>Dh});var Fs=A("ZodISODateTime",(e,t)=>{fm.init(e,t),xe.init(e,t)});function qh(e){return _p(Fs,e)}var Vs=A("ZodISODate",(e,t)=>{gm.init(e,t),xe.init(e,t)});function Mh(e){return bp(Vs,e)}var Zs=A("ZodISOTime",(e,t)=>{vm.init(e,t),xe.init(e,t)});function Dh(e){return Sp(Zs,e)}var Hs=A("ZodISODuration",(e,t)=>{ym.init(e,t),xe.init(e,t)});function Uh(e){return $p(Hs,e)}var t_=(e,t)=>{ro.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>io(e,n)},flatten:{value:n=>no(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,bn,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,bn,2)}},isEmpty:{get(){return e.issues.length===0}}})},RR=A("ZodError",t_),ht=A("ZodError",t_,{Parent:Error});var Fh=wn(ht),Vh=zn(ht),vo=In(ht),Zh=Rn(ht),Hh=Da(ht),Jh=Ua(ht),Gh=Fa(ht),Bh=Va(ht),Kh=Za(ht),Wh=Ha(ht),Yh=Ja(ht),Xh=Ga(ht);var r_=new WeakMap;function bo(e,t,n){let i=Object.getPrototypeOf(e),r=r_.get(i);if(r||(r=new Set,r_.set(i,r)),!r.has(t)){r.add(t);for(let o in n){let a=n[o];Object.defineProperty(i,o,{configurable:!0,enumerable:!1,get(){let s=a.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}var $e=A("ZodType",(e,t)=>(ge.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Fn(e,"input"),output:Fn(e,"output")}}),e.toJSONSchema=eh(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,i)=>Fh(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>vo(e,n,i),e.parseAsync=async(n,i)=>Vh(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>Zh(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>Hh(e,n,i),e.decode=(n,i)=>Jh(e,n,i),e.encodeAsync=async(n,i)=>Gh(e,n,i),e.decodeAsync=async(n,i)=>Bh(e,n,i),e.safeEncode=(n,i)=>Kh(e,n,i),e.safeDecode=(n,i)=>Wh(e,n,i),e.safeEncodeAsync=async(n,i)=>Yh(e,n,i),e.safeDecodeAsync=async(n,i)=>Xh(e,n,i),bo(e,"ZodType",{check(...n){let i=this.def;return this.clone(K.mergeDefs(i,{checks:[...i.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,i){return at(this,n,i)},brand(){return this},register(n,i){return n.add(this,i),this},refine(n,i){return this.check(qf(n,i))},superRefine(n,i){return this.check(Mf(n,i))},overwrite(n){return this.check(kt(n))},optional(){return ae(this)},exactOptional(){return bf(this)},nullable(){return _o(this)},nullish(){return ae(_o(this))},nonoptional(n){return Rf(this,n)},array(){return O(this)},or(n){return ie([this,n])},and(n){return Tt(this,n)},transform(n){return Gs(this,fc(n))},default(n){return wf(this,n)},prefault(n){return If(this,n)},catch(n){return Ef(this,n)},pipe(n){return Gs(this,n)},readonly(){return Af(this)},describe(n){let i=this.clone();return Xe.add(i,{description:n}),i},meta(...n){if(n.length===0)return Xe.get(this);let i=this.clone();return Xe.add(i,n[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Xe.get(e)?.description},configurable:!0}),e)),Bs=A("_ZodString",(e,t)=>{Hr.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(i,r,o)=>th(e,i,r,o);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,bo(e,"_ZodString",{regex(...i){return this.check(En(...i))},includes(...i){return this.check(jn(...i))},startsWith(...i){return this.check(An(...i))},endsWith(...i){return this.check(On(...i))},min(...i){return this.check(Ht(...i))},max(...i){return this.check(Gr(...i))},length(...i){return this.check(Br(...i))},nonempty(...i){return this.check(Ht(1,...i))},lowercase(i){return this.check(Pn(i))},uppercase(i){return this.check(xn(i))},trim(){return this.check(Ln())},normalize(...i){return this.check(Cn(...i))},toLowerCase(){return this.check(qn())},toUpperCase(){return this.check(Mn())},slugify(){return this.check(Dn())}})}),Hn=A("ZodString",(e,t)=>{Hr.init(e,t),Bs.init(e,t),e.email=n=>e.check(ms(Ks,n)),e.url=n=>e.check(fo(So,n)),e.jwt=n=>e.check(xs(dc,n)),e.emoji=n=>e.check(vs(Ys,n)),e.guid=n=>e.check(ho(yo,n)),e.uuid=n=>e.check(ps(Lt,n)),e.uuidv4=n=>e.check(hs(Lt,n)),e.uuidv6=n=>e.check(fs(Lt,n)),e.uuidv7=n=>e.check(gs(Lt,n)),e.nanoid=n=>e.check(ys(Xs,n)),e.guid=n=>e.check(ho(yo,n)),e.cuid=n=>e.check(_s(Qs,n)),e.cuid2=n=>e.check(bs(ec,n)),e.ulid=n=>e.check(Ss(tc,n)),e.base64=n=>e.check(Ts(cc,n)),e.base64url=n=>e.check(Es(lc,n)),e.xid=n=>e.check($s(rc,n)),e.ksuid=n=>e.check(ws(nc,n)),e.ipv4=n=>e.check(zs(ic,n)),e.ipv6=n=>e.check(Is(oc,n)),e.cidrv4=n=>e.check(Rs(ac,n)),e.cidrv6=n=>e.check(ks(sc,n)),e.e164=n=>e.check(Ps(uc,n)),e.datetime=n=>e.check(qh(n)),e.date=n=>e.check(Mh(n)),e.time=n=>e.check(Dh(n)),e.duration=n=>e.check(Uh(n))});function m(e){return fp(Hn,e)}var xe=A("ZodStringFormat",(e,t)=>{Pe.init(e,t),Bs.init(e,t)}),Ks=A("ZodEmail",(e,t)=>{am.init(e,t),xe.init(e,t)});function Ws(e){return ms(Ks,e)}var yo=A("ZodGUID",(e,t)=>{im.init(e,t),xe.init(e,t)});function n_(e){return ho(yo,e)}var Lt=A("ZodUUID",(e,t)=>{om.init(e,t),xe.init(e,t)});function i_(e){return ps(Lt,e)}function o_(e){return hs(Lt,e)}function a_(e){return fs(Lt,e)}function s_(e){return gs(Lt,e)}var So=A("ZodURL",(e,t)=>{sm.init(e,t),xe.init(e,t)});function Jn(e){return fo(So,e)}function c_(e){return fo(So,{protocol:vt.httpProtocol,hostname:vt.domain,...K.normalizeParams(e)})}var Ys=A("ZodEmoji",(e,t)=>{cm.init(e,t),xe.init(e,t)});function l_(e){return vs(Ys,e)}var Xs=A("ZodNanoID",(e,t)=>{lm.init(e,t),xe.init(e,t)});function u_(e){return ys(Xs,e)}var Qs=A("ZodCUID",(e,t)=>{um.init(e,t),xe.init(e,t)});function d_(e){return _s(Qs,e)}var ec=A("ZodCUID2",(e,t)=>{dm.init(e,t),xe.init(e,t)});function m_(e){return bs(ec,e)}var tc=A("ZodULID",(e,t)=>{mm.init(e,t),xe.init(e,t)});function p_(e){return Ss(tc,e)}var rc=A("ZodXID",(e,t)=>{pm.init(e,t),xe.init(e,t)});function h_(e){return $s(rc,e)}var nc=A("ZodKSUID",(e,t)=>{hm.init(e,t),xe.init(e,t)});function f_(e){return ws(nc,e)}var ic=A("ZodIPv4",(e,t)=>{_m.init(e,t),xe.init(e,t)});function g_(e){return zs(ic,e)}var Qh=A("ZodMAC",(e,t)=>{Sm.init(e,t),xe.init(e,t)});function v_(e){return vp(Qh,e)}var oc=A("ZodIPv6",(e,t)=>{bm.init(e,t),xe.init(e,t)});function y_(e){return Is(oc,e)}var ac=A("ZodCIDRv4",(e,t)=>{$m.init(e,t),xe.init(e,t)});function __(e){return Rs(ac,e)}var sc=A("ZodCIDRv6",(e,t)=>{wm.init(e,t),xe.init(e,t)});function b_(e){return ks(sc,e)}var cc=A("ZodBase64",(e,t)=>{Im.init(e,t),xe.init(e,t)});function S_(e){return Ts(cc,e)}var lc=A("ZodBase64URL",(e,t)=>{Rm.init(e,t),xe.init(e,t)});function $_(e){return Es(lc,e)}var uc=A("ZodE164",(e,t)=>{km.init(e,t),xe.init(e,t)});function w_(e){return Ps(uc,e)}var dc=A("ZodJWT",(e,t)=>{Tm.init(e,t),xe.init(e,t)});function z_(e){return xs(dc,e)}var Gn=A("ZodCustomStringFormat",(e,t)=>{Em.init(e,t),xe.init(e,t)});function I_(e,t,n={}){return Un(Gn,e,t,n)}function R_(e){return Un(Gn,"hostname",vt.hostname,e)}function k_(e){return Un(Gn,"hex",vt.hex,e)}function T_(e,t){let n=t?.enc??"hex",i=`${e}_${n}`,r=vt[i];if(!r)throw new Error(`Unrecognized hash format: ${i}`);return Un(Gn,i,r,t)}var Bn=A("ZodNumber",(e,t)=>{rs.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(i,r,o)=>rh(e,i,r,o),bo(e,"ZodNumber",{gt(i,r){return this.check(Nt(i,r))},gte(i,r){return this.check(ct(i,r))},min(i,r){return this.check(ct(i,r))},lt(i,r){return this.check(Ot(i,r))},lte(i,r){return this.check(yt(i,r))},max(i,r){return this.check(yt(i,r))},int(i){return this.check(Js(i))},safe(i){return this.check(Js(i))},positive(i){return this.check(Nt(0,i))},nonnegative(i){return this.check(ct(0,i))},negative(i){return this.check(Ot(0,i))},nonpositive(i){return this.check(yt(0,i))},multipleOf(i,r){return this.check(ur(i,r))},step(i,r){return this.check(ur(i,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=!0,e.format=n.format??null});function H(e){return wp(Bn,e)}var Wr=A("ZodNumberFormat",(e,t)=>{Pm.init(e,t),Bn.init(e,t)});function Js(e){return Ip(Wr,e)}function E_(e){return Rp(Wr,e)}function P_(e){return kp(Wr,e)}function x_(e){return Tp(Wr,e)}function j_(e){return Ep(Wr,e)}var Kn=A("ZodBoolean",(e,t)=>{co.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>nh(e,n,i,r)});function te(e){return Pp(Kn,e)}var Wn=A("ZodBigInt",(e,t)=>{ns.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(i,r,o)=>ih(e,i,r,o),e.gte=(i,r)=>e.check(ct(i,r)),e.min=(i,r)=>e.check(ct(i,r)),e.gt=(i,r)=>e.check(Nt(i,r)),e.gte=(i,r)=>e.check(ct(i,r)),e.min=(i,r)=>e.check(ct(i,r)),e.lt=(i,r)=>e.check(Ot(i,r)),e.lte=(i,r)=>e.check(yt(i,r)),e.max=(i,r)=>e.check(yt(i,r)),e.positive=i=>e.check(Nt(BigInt(0),i)),e.negative=i=>e.check(Ot(BigInt(0),i)),e.nonpositive=i=>e.check(yt(BigInt(0),i)),e.nonnegative=i=>e.check(ct(BigInt(0),i)),e.multipleOf=(i,r)=>e.check(ur(i,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function A_(e){return jp(Wn,e)}var mc=A("ZodBigIntFormat",(e,t)=>{xm.init(e,t),Wn.init(e,t)});function O_(e){return Op(mc,e)}function N_(e){return Np(mc,e)}var ef=A("ZodSymbol",(e,t)=>{jm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>oh(e,n,i,r)});function C_(e){return Cp(ef,e)}var tf=A("ZodUndefined",(e,t)=>{Am.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>sh(e,n,i,r)});function L_(e){return Lp(tf,e)}var rf=A("ZodNull",(e,t)=>{Om.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ah(e,n,i,r)});function qt(e){return qp(rf,e)}var nf=A("ZodAny",(e,t)=>{Nm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>uh(e,n,i,r)});function pc(){return Mp(nf)}var of=A("ZodUnknown",(e,t)=>{Cm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>dh(e,n,i,r)});function oe(){return Dp(of)}var af=A("ZodNever",(e,t)=>{Lm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>lh(e,n,i,r)});function hc(e){return Up(af,e)}var sf=A("ZodVoid",(e,t)=>{qm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>ch(e,n,i,r)});function q_(e){return Fp(sf,e)}var $o=A("ZodDate",(e,t)=>{Mm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(i,r,o)=>mh(e,i,r,o),e.min=(i,r)=>e.check(ct(i,r)),e.max=(i,r)=>e.check(yt(i,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 M_(e){return Vp($o,e)}var cf=A("ZodArray",(e,t)=>{Dm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>zh(e,n,i,r),e.element=t.element,bo(e,"ZodArray",{min(n,i){return this.check(Ht(n,i))},nonempty(n){return this.check(Ht(1,n))},max(n,i){return this.check(Gr(n,i))},length(n,i){return this.check(Br(n,i))},unwrap(){return this.element}})});function O(e,t){return Jp(cf,e,t)}function D_(e){let t=e._zod.def.shape;return fe(Object.keys(t))}var wo=A("ZodObject",(e,t)=>{Um.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ih(e,n,i,r),K.defineLazy(e,"shape",()=>t.shape),bo(e,"ZodObject",{keyof(){return fe(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:oe()})},loose(){return this.clone({...this._zod.def,catchall:oe()})},strict(){return this.clone({...this._zod.def,catchall:hc()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return K.extend(this,n)},safeExtend(n){return K.safeExtend(this,n)},merge(n){return K.merge(this,n)},pick(n){return K.pick(this,n)},omit(n){return K.omit(this,n)},partial(...n){return K.partial(gc,this,n[0])},required(...n){return K.required(vc,this,n[0])}})});function T(e,t){let n={type:"object",shape:e??{},...K.normalizeParams(t)};return new wo(n)}function U_(e,t){return new wo({type:"object",shape:e,catchall:hc(),...K.normalizeParams(t)})}function ue(e,t){return new wo({type:"object",shape:e,catchall:oe(),...K.normalizeParams(t)})}var zo=A("ZodUnion",(e,t)=>{lo.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>qs(e,n,i,r),e.options=t.options});function ie(e,t){return new zo({type:"union",options:e,...K.normalizeParams(t)})}var lf=A("ZodXor",(e,t)=>{zo.init(e,t),Fm.init(e,t),e._zod.processJSONSchema=(n,i,r)=>qs(e,n,i,r),e.options=t.options});function F_(e,t){return new lf({type:"union",options:e,inclusive:!1,...K.normalizeParams(t)})}var uf=A("ZodDiscriminatedUnion",(e,t)=>{zo.init(e,t),Vm.init(e,t)});function fr(e,t,n){return new uf({type:"union",options:t,discriminator:e,...K.normalizeParams(n)})}var df=A("ZodIntersection",(e,t)=>{Zm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Rh(e,n,i,r)});function Tt(e,t){return new df({type:"intersection",left:e,right:t})}var mf=A("ZodTuple",(e,t)=>{is.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>kh(e,n,i,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function pf(e,t,n){let i=t instanceof ge,r=i?n:t,o=i?t:null;return new mf({type:"tuple",items:e,rest:o,...K.normalizeParams(r)})}var Vn=A("ZodRecord",(e,t)=>{Hm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Th(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType});function Q(e,t,n){return!t||!t._zod?new Vn({type:"record",keyType:m(),valueType:e,...K.normalizeParams(t)}):new Vn({type:"record",keyType:e,valueType:t,...K.normalizeParams(n)})}function V_(e,t,n){let i=at(e);return i._zod.values=void 0,new Vn({type:"record",keyType:i,valueType:t,...K.normalizeParams(n)})}function Z_(e,t,n){return new Vn({type:"record",keyType:e,valueType:t,mode:"loose",...K.normalizeParams(n)})}var hf=A("ZodMap",(e,t)=>{Jm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>$h(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Ct(...n)),e.nonempty=n=>e.check(Ct(1,n)),e.max=(...n)=>e.check(dr(...n)),e.size=(...n)=>e.check(Jr(...n))});function H_(e,t,n){return new hf({type:"map",keyType:e,valueType:t,...K.normalizeParams(n)})}var ff=A("ZodSet",(e,t)=>{Gm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>wh(e,n,i,r),e.min=(...n)=>e.check(Ct(...n)),e.nonempty=n=>e.check(Ct(1,n)),e.max=(...n)=>e.check(dr(...n)),e.size=(...n)=>e.check(Jr(...n))});function J_(e,t){return new ff({type:"set",valueType:e,...K.normalizeParams(t)})}var Zn=A("ZodEnum",(e,t)=>{Bm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(i,r,o)=>ph(e,i,r,o),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(i,r)=>{let o={};for(let a of i)if(n.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Zn({...t,checks:[],...K.normalizeParams(r),entries:o})},e.exclude=(i,r)=>{let o={...t.entries};for(let a of i)if(n.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new Zn({...t,checks:[],...K.normalizeParams(r),entries:o})}});function fe(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new Zn({type:"enum",entries:n,...K.normalizeParams(t)})}function G_(e,t){return new Zn({type:"enum",entries:e,...K.normalizeParams(t)})}var gf=A("ZodLiteral",(e,t)=>{Km.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>hh(e,n,i,r),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 N(e,t){return new gf({type:"literal",values:Array.isArray(e)?e:[e],...K.normalizeParams(t)})}var vf=A("ZodFile",(e,t)=>{Wm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>vh(e,n,i,r),e.min=(n,i)=>e.check(Ct(n,i)),e.max=(n,i)=>e.check(dr(n,i)),e.mime=(n,i)=>e.check(Nn(Array.isArray(n)?n:[n],i))});function B_(e){return Gp(vf,e)}var yf=A("ZodTransform",(e,t)=>{Ym.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Sh(e,n,i,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new or(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(K.issue(o,n.value,t));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(K.issue(a))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(o=>(n.value=o,n.fallback=!0,n)):(n.value=r,n.fallback=!0,n)}});function fc(e){return new yf({type:"transform",transform:e})}var gc=A("ZodOptional",(e,t)=>{os.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ms(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function ae(e){return new gc({type:"optional",innerType:e})}var _f=A("ZodExactOptional",(e,t)=>{Xm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ms(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function bf(e){return new _f({type:"optional",innerType:e})}var Sf=A("ZodNullable",(e,t)=>{Qm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Eh(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function _o(e){return new Sf({type:"nullable",innerType:e})}function K_(e){return ae(_o(e))}var $f=A("ZodDefault",(e,t)=>{ep.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>xh(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function wf(e,t){return new $f({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():K.shallowClone(t)}})}var zf=A("ZodPrefault",(e,t)=>{tp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>jh(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function If(e,t){return new zf({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():K.shallowClone(t)}})}var vc=A("ZodNonOptional",(e,t)=>{rp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ph(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Rf(e,t){return new vc({type:"nonoptional",innerType:e,...K.normalizeParams(t)})}var kf=A("ZodSuccess",(e,t)=>{np.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>yh(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function W_(e){return new kf({type:"success",innerType:e})}var Tf=A("ZodCatch",(e,t)=>{ip.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ah(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ef(e,t){return new Tf({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var Pf=A("ZodNaN",(e,t)=>{op.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>fh(e,n,i,r)});function Y_(e){return Hp(Pf,e)}var Io=A("ZodPipe",(e,t)=>{as.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Oh(e,n,i,r),e.in=t.in,e.out=t.out});function Gs(e,t){return new Io({type:"pipe",in:e,out:t})}var Ro=A("ZodCodec",(e,t)=>{Io.init(e,t),uo.init(e,t)});function X_(e,t,n){return new Ro({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function Q_(e){let t=e._zod.def;return new Ro({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var xf=A("ZodPreprocess",(e,t)=>{Io.init(e,t),ap.init(e,t)}),jf=A("ZodReadonly",(e,t)=>{sp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Nh(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Af(e){return new jf({type:"readonly",innerType:e})}var Of=A("ZodTemplateLiteral",(e,t)=>{cp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>gh(e,n,i,r)});function eb(e,t){return new Of({type:"template_literal",parts:e,...K.normalizeParams(t)})}var Nf=A("ZodLazy",(e,t)=>{dp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Lh(e,n,i,r),e.unwrap=()=>e._zod.def.getter()});function gr(e){return new Nf({type:"lazy",getter:e})}var Cf=A("ZodPromise",(e,t)=>{up.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ch(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function tb(e){return new Cf({type:"promise",innerType:e})}var Lf=A("ZodFunction",(e,t)=>{lp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>bh(e,n,i,r)});function rb(e){return new Lf({type:"function",input:Array.isArray(e?.input)?pf(e?.input):e?.input??O(oe()),output:e?.output??oe()})}var ko=A("ZodCustom",(e,t)=>{mp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>_h(e,n,i,r)});function nb(e){let t=new Ae({check:"custom"});return t._zod.check=e,t}function ib(e,t){return Bp(ko,e??(()=>!0),t)}function qf(e,t={}){return Kp(ko,e,t)}function Mf(e,t){return Wp(e,t)}var ob=Yp,ab=Xp;function sb(e,t={}){let n=new ko({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...K.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:n,path:[...n._zod.def.path??[]]})},n}var cb=(...e)=>Qp({Codec:Ro,Boolean:Kn,String:Hn},...e);function lb(e){let t=gr(()=>ie([m(e),H(),te(),qt(),O(t),Q(m(),t)]));return t}function Gt(e,t){return new xf({type:"pipe",in:fc(e),out:t})}var Uf={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 TR(e){Me({customError:e})}function ER(){return Me().customError}var Df;Df||(Df={});var re={...go,...Us,iso:_t},PR=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 xR(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 jR(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 i=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===i){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 ub(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return re.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 re.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let o=jR(r,t),a=rt(o,t);return t.refs.set(r,a),t.processing.delete(r),a}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return re.null();if(r.length===0)return re.never();if(r.length===1)return re.literal(r[0]);if(r.every(a=>typeof a=="string"))return re.enum(r);let o=r.map(a=>re.literal(a));return o.length<2?o[0]:re.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return re.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(o=>{let a={...e,type:o};return ub(a,t)});return r.length===0?re.never():r.length===1?r[0]:re.union(r)}if(!n)return re.any();let i;switch(n){case"string":{let r=re.string();if(e.format){let o=e.format;o==="email"?r=r.check(re.email()):o==="uri"||o==="uri-reference"?r=r.check(re.url()):o==="uuid"||o==="guid"?r=r.check(re.uuid()):o==="date-time"?r=r.check(re.iso.datetime()):o==="date"?r=r.check(re.iso.date()):o==="time"?r=r.check(re.iso.time()):o==="duration"?r=r.check(re.iso.duration()):o==="ipv4"?r=r.check(re.ipv4()):o==="ipv6"?r=r.check(re.ipv6()):o==="mac"?r=r.check(re.mac()):o==="cidr"?r=r.check(re.cidrv4()):o==="cidr-v6"?r=r.check(re.cidrv6()):o==="base64"?r=r.check(re.base64()):o==="base64url"?r=r.check(re.base64url()):o==="e164"?r=r.check(re.e164()):o==="jwt"?r=r.check(re.jwt()):o==="emoji"?r=r.check(re.emoji()):o==="nanoid"?r=r.check(re.nanoid()):o==="cuid"?r=r.check(re.cuid()):o==="cuid2"?r=r.check(re.cuid2()):o==="ulid"?r=r.check(re.ulid()):o==="xid"?r=r.check(re.xid()):o==="ksuid"&&(r=r.check(re.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))),i=r;break}case"number":case"integer":{let r=n==="integer"?re.number().int():re.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===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),i=r;break}case"boolean":{i=re.boolean();break}case"null":{i=re.null();break}case"object":{let r={},o=e.properties||{},a=new Set(e.required||[]);for(let[l,u]of Object.entries(o)){let d=rt(u,t);r[l]=a.has(l)?d:d.optional()}if(e.propertyNames){let l=rt(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?rt(e.additionalProperties,t):re.any();if(Object.keys(r).length===0){i=re.record(l,u);break}let d=re.object(r).passthrough(),p=re.looseRecord(l,u);i=re.intersection(d,p);break}if(e.patternProperties){let l=e.patternProperties,u=Object.keys(l),d=[];for(let f of u){let b=rt(l[f],t),v=re.string().regex(new RegExp(f));d.push(re.looseRecord(v,b))}let p=[];if(Object.keys(r).length>0&&p.push(re.object(r).passthrough()),p.push(...d),p.length===0)i=re.object({}).passthrough();else if(p.length===1)i=p[0];else{let f=re.intersection(p[0],p[1]);for(let b=2;b<p.length;b++)f=re.intersection(f,p[b]);i=f}break}let s=re.object(r);e.additionalProperties===!1?i=s.strict():typeof e.additionalProperties=="object"?i=s.catchall(rt(e.additionalProperties,t)):i=s.passthrough();break}case"array":{let r=e.prefixItems,o=e.items;if(r&&Array.isArray(r)){let a=r.map(l=>rt(l,t)),s=o&&typeof o=="object"&&!Array.isArray(o)?rt(o,t):void 0;s?i=re.tuple(a).rest(s):i=re.tuple(a),typeof e.minItems=="number"&&(i=i.check(re.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(re.maxLength(e.maxItems)))}else if(Array.isArray(o)){let a=o.map(l=>rt(l,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?rt(e.additionalItems,t):void 0;s?i=re.tuple(a).rest(s):i=re.tuple(a),typeof e.minItems=="number"&&(i=i.check(re.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(re.maxLength(e.maxItems)))}else if(o!==void 0){let a=rt(o,t),s=re.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),i=s}else i=re.array(re.any());break}default:throw new Error(`Unsupported type: ${n}`)}return i}function rt(e,t){if(typeof e=="boolean")return e?re.any():re.never();let n=ub(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(u=>rt(u,t)),l=re.union(s);n=i?re.intersection(n,l):l}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(u=>rt(u,t)),l=re.xor(s);n=i?re.intersection(n,l):l}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=i?n:re.any();else{let s=i?n:rt(e.allOf[0],t),l=i?0:1;for(let u=l;u<e.allOf.length;u++)s=re.intersection(s,rt(e.allOf[u],t));n=s}e.nullable===!0&&t.version==="openapi-3.0"&&(n=re.nullable(n)),e.readOnly===!0&&(n=re.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let r={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of o)s in e&&(r[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(r[s]=e[s]);for(let s of Object.keys(e))PR.has(s)||(r[s]=e[s]);return Object.keys(r).length>0&&t.registry.add(n,r),e.description&&(n=n.describe(e.description)),n}function db(e,t){if(typeof e=="boolean")return e?re.any():re.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 i=xR(n,t?.defaultTarget),r=n.$defs||n.definitions||{},o={version:i,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Xe};return rt(n,o)}var To={};Vt(To,{bigint:()=>CR,boolean:()=>NR,date:()=>LR,number:()=>OR,string:()=>AR});function AR(e){return gp(Hn,e)}function OR(e){return zp(Bn,e)}function NR(e){return xp(Kn,e)}function CR(e){return Ap(Wn,e)}function LR(e){return Zp($o,e)}Me(ss());var Xr="2025-11-25";var yc=[Xr,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],_c="io.modelcontextprotocol/related-task",Kt="io.modelcontextprotocol/protocolVersion",Yn="io.modelcontextprotocol/clientInfo",Mt="io.modelcontextprotocol/serverInfo",Wt="io.modelcontextprotocol/clientCapabilities",Qr="io.modelcontextprotocol/subscriptionId",yr="io.modelcontextprotocol/logLevel";var en="2.0";var vr=gr(()=>ie([m(),H(),te(),qt(),Q(m(),vr),O(vr)])),De=Q(m(),vr),Vf=O(vr),Eo=ie([m(),H().int()]),Po=m(),bc=T({ttl:H().optional()}),Sc=T({taskId:m()}),xo=ue({progressToken:Eo.optional(),[_c]:Sc.optional()}),Ye=T({_meta:xo.optional()}),tn=Ye.extend({task:bc.optional()}),Ue=T({method:m(),params:Ye.loose().optional()}),nt=T({_meta:xo.optional()}),it=T({method:m(),params:nt.loose().optional()}),jo=ue({get[Mt](){return ei.optional().catch(void 0)}}),Fe=ue({_meta:jo.optional()}),_r=ie([m(),H().int()]),Ao=T({jsonrpc:N(en),id:_r,...Ue.shape}).strict(),Oo=T({jsonrpc:N(en),...it.shape}).strict(),Xn=T({jsonrpc:N(en),id:_r,result:Fe}).strict(),Qn=T({jsonrpc:N(en),id:_r.optional(),error:T({code:H().int(),message:m(),data:oe().optional()})}).strict(),No=ie([Ao,Oo,Xn,Qn]),Zf=ie([Xn,Qn]),Co=Fe.strict(),$c=nt.extend({requestId:_r.optional(),reason:m().optional()}),Lo=it.extend({method:N("notifications/cancelled"),params:$c}),wc=T({src:m(),mimeType:m().optional(),sizes:O(m()).optional(),theme:fe(["light","dark"]).optional()}),br=T({icons:O(wc).optional()}),Bt=T({name:m(),title:m().optional()}),ei=Bt.extend({...Bt.shape,...br.shape,version:m(),websiteUrl:m().optional(),description:m().optional()}),MR=Tt(T({applyDefaults:te().optional()}),De),DR=Gt(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Tt(T({form:MR.optional(),url:De.optional()}),De.optional())),zc=ue({list:De.optional(),cancel:De.optional(),requests:ue({sampling:ue({createMessage:De.optional()}).optional(),elicitation:ue({create:De.optional()}).optional()}).optional()}),Ic=ue({list:De.optional(),cancel:De.optional(),requests:ue({tools:ue({call:De.optional()}).optional()}).optional()}),Rc=T({experimental:Q(m(),De).optional(),sampling:T({context:De.optional(),tools:De.optional()}).optional(),elicitation:DR.optional(),roots:T({listChanged:te().optional()}).optional(),tasks:zc.optional(),extensions:Q(m(),De).optional()}),kc=Ye.extend({protocolVersion:m(),capabilities:Rc,clientInfo:ei}),Tc=Ue.extend({method:N("initialize"),params:kc}),qo=T({experimental:Q(m(),De).optional(),logging:De.optional(),completions:De.optional(),prompts:T({listChanged:te().optional()}).optional(),resources:T({subscribe:te().optional(),listChanged:te().optional()}).optional(),tools:T({listChanged:te().optional()}).optional(),tasks:Ic.optional(),extensions:Q(m(),De).optional()}),Ec=Fe.extend({protocolVersion:m(),capabilities:qo,serverInfo:ei,instructions:m().optional()}),Pc=it.extend({method:N("notifications/initialized"),params:nt.optional()}),xc=Ue.extend({method:N("server/discover"),params:Ye.optional()}),jc=Fe.extend({supportedVersions:O(m()),capabilities:qo,instructions:m().optional()}),Mo=Ue.extend({method:N("ping"),params:Ye.optional()}),Ac=T({progress:H(),total:ae(H()),message:ae(m())}),Oc=T({...nt.shape,...Ac.shape,progressToken:Eo}),Do=it.extend({method:N("notifications/progress"),params:Oc}),Nc=Ye.extend({cursor:Po.optional()}),Sr=Ue.extend({params:Nc.optional()}),$r=Fe.extend({nextCursor:Po.optional()}),Uo=T({uri:m(),mimeType:ae(m()),_meta:Q(m(),oe()).optional()}),Fo=Uo.extend({text:m()}),Hf=m().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Vo=Uo.extend({blob:Hf}),wr=fe(["user","assistant"]),Yt=T({audience:O(wr).optional(),priority:H().min(0).max(1).optional(),lastModified:_t.datetime({offset:!0}).optional()}),Zo=T({...Bt.shape,...br.shape,uri:m(),description:ae(m()),mimeType:ae(m()),size:ae(H()),annotations:Yt.optional(),_meta:ae(ue({}))}),Cc=T({...Bt.shape,...br.shape,uriTemplate:m(),description:ae(m()),mimeType:ae(m()),annotations:Yt.optional(),_meta:ae(ue({}))}),Lc=Sr.extend({method:N("resources/list")}),qc=$r.extend({resources:O(Zo)}),Mc=Sr.extend({method:N("resources/templates/list")}),Dc=$r.extend({resourceTemplates:O(Cc)}),ti=Ye.extend({uri:m()}),Uc=ti,Fc=Ue.extend({method:N("resources/read"),params:Uc}),Vc=Fe.extend({contents:O(ie([Fo,Vo]))}),Zc=it.extend({method:N("notifications/resources/list_changed"),params:nt.optional()}),Hc=ti,Jc=Ue.extend({method:N("resources/subscribe"),params:Hc}),Gc=ti,Bc=Ue.extend({method:N("resources/unsubscribe"),params:Gc}),Ho=T({toolsListChanged:te().optional(),promptsListChanged:te().optional(),resourcesListChanged:te().optional(),resourceSubscriptions:O(m()).optional()}),Kc=Ye.extend({notifications:Ho}),Wc=Ue.extend({method:N("subscriptions/listen"),params:Kc}),Yc=nt.extend({notifications:Ho}),Xc=it.extend({method:N("notifications/subscriptions/acknowledged"),params:Yc}),Qc=jo.extend({[Qr]:_r}),el=Fe.extend({_meta:Qc}),tl=nt.extend({uri:m()}),rl=it.extend({method:N("notifications/resources/updated"),params:tl}),nl=T({name:m(),description:ae(m()),required:ae(te())}),il=T({...Bt.shape,...br.shape,description:ae(m()),arguments:ae(O(nl)),_meta:ae(ue({}))}),ol=Sr.extend({method:N("prompts/list")}),al=$r.extend({prompts:O(il)}),sl=Ye.extend({name:m(),arguments:Q(m(),m()).optional()}),cl=Ue.extend({method:N("prompts/get"),params:sl}),ri=T({type:N("text"),text:m(),annotations:Yt.optional(),_meta:Q(m(),oe()).optional()}),ni=T({type:N("image"),data:Hf,mimeType:m(),annotations:Yt.optional(),_meta:Q(m(),oe()).optional()}),ii=T({type:N("audio"),data:Hf,mimeType:m(),annotations:Yt.optional(),_meta:Q(m(),oe()).optional()}),ll=T({type:N("tool_use"),name:m(),id:m(),input:Q(m(),oe()),_meta:Q(m(),oe()).optional()}),ul=T({type:N("resource"),resource:ie([Fo,Vo]),annotations:Yt.optional(),_meta:Q(m(),oe()).optional()}),dl=Zo.extend({type:N("resource_link")}),oi=ie([ri,ni,ii,dl,ul]),ml=T({role:wr,content:oi}),pl=Fe.extend({description:m().optional(),messages:O(ml)}),hl=it.extend({method:N("notifications/prompts/list_changed"),params:nt.optional()}),fl=T({title:m().optional(),readOnlyHint:te().optional(),destructiveHint:te().optional(),idempotentHint:te().optional(),openWorldHint:te().optional()}),gl=T({taskSupport:fe(["required","optional","forbidden"]).optional()}),Jo=T({...Bt.shape,...br.shape,description:m().optional(),inputSchema:T({type:N("object"),properties:Q(m(),vr).optional(),required:O(m()).optional()}).catchall(oe()),outputSchema:ue({$schema:m().optional()}).optional(),annotations:fl.optional(),execution:gl.optional(),_meta:Q(m(),oe()).optional()}),vl=Sr.extend({method:N("tools/list")}),yl=$r.extend({tools:O(Jo)}),Go=Fe.extend({content:O(oi).default([]),structuredContent:oe().optional(),isError:te().optional()}),Jf=Go.or(Fe.extend({toolResult:oe()})),_l=tn.extend({name:m(),arguments:Q(m(),oe()).optional()}),bl=Ue.extend({method:N("tools/call"),params:_l}),Sl=it.extend({method:N("notifications/tools/list_changed"),params:nt.optional()}),Gf=T({autoRefresh:te().default(!0),debounceMs:H().int().nonnegative().default(300)}),zr=fe(["debug","info","notice","warning","error","critical","alert","emergency"]),$l=Ye.extend({level:zr}),wl=Ue.extend({method:N("logging/setLevel"),params:$l}),zl=nt.extend({level:zr,logger:m().optional(),data:oe()}),Il=it.extend({method:N("notifications/message"),params:zl}),Rl=T({name:m().optional()}),kl=T({hints:O(Rl).optional(),costPriority:H().min(0).max(1).optional(),speedPriority:H().min(0).max(1).optional(),intelligencePriority:H().min(0).max(1).optional()}),Tl=T({mode:fe(["auto","required","none"]).optional()}),El=T({type:N("tool_result"),toolUseId:m().describe("The unique identifier for the corresponding tool call."),content:O(oi),structuredContent:oe().optional(),isError:te().optional(),_meta:Q(m(),oe()).optional()}),Pl=fr("type",[ri,ni,ii]),Yr=fr("type",[ri,ni,ii,ll,El]),xl=T({role:wr,content:ie([Yr,O(Yr)]),_meta:Q(m(),oe()).optional()}),jl=tn.extend({messages:O(xl),modelPreferences:kl.optional(),systemPrompt:m().optional(),includeContext:fe(["none","thisServer","allServers"]).optional(),temperature:H().optional(),maxTokens:H().int(),stopSequences:O(m()).optional(),metadata:De.optional(),tools:O(Jo).optional(),toolChoice:Tl.optional()}),Al=Ue.extend({method:N("sampling/createMessage"),params:jl}),Ol=Fe.extend({model:m(),stopReason:ae(fe(["endTurn","stopSequence","maxTokens"]).or(m())),role:wr,content:Pl}),Nl=Fe.extend({model:m(),stopReason:ae(fe(["endTurn","stopSequence","maxTokens","toolUse"]).or(m())),role:wr,content:ie([Yr,O(Yr)])}),Bo=T({type:N("boolean"),title:m().optional(),description:m().optional(),default:te().optional()}),ai=T({type:N("string"),title:m().optional(),description:m().optional(),minLength:H().optional(),maxLength:H().optional(),format:fe(["email","uri","date","date-time"]).optional(),default:m().optional()}),si=T({type:fe(["number","integer"]),title:m().optional(),description:m().optional(),minimum:H().optional(),maximum:H().optional(),default:H().optional()}),Ko=T({type:N("string"),title:m().optional(),description:m().optional(),enum:O(m()),default:m().optional()}),Wo=T({type:N("string"),title:m().optional(),description:m().optional(),oneOf:O(T({const:m(),title:m()})),default:m().optional()}),Yo=T({type:N("string"),title:m().optional(),description:m().optional(),enum:O(m()),enumNames:O(m()).optional(),default:m().optional()}),Cl=ie([Ko,Wo]),Xo=T({type:N("array"),title:m().optional(),description:m().optional(),minItems:H().optional(),maxItems:H().optional(),items:T({type:N("string"),enum:O(m())}),default:O(m()).optional()}),Qo=T({type:N("array"),title:m().optional(),description:m().optional(),minItems:H().optional(),maxItems:H().optional(),items:T({anyOf:O(T({const:m(),title:m()}))}),default:O(m()).optional()}),Ll=ie([Xo,Qo]),ql=ie([Yo,Cl,Ll]),ea=ie([ql,Bo,ai,si]),ci=tn.extend({mode:N("form").optional(),message:m(),requestedSchema:T({type:N("object"),properties:Q(m(),ea),required:O(m()).optional()}).catchall(oe())}),Ml=tn.extend({mode:N("url"),message:m(),elicitationId:m(),url:m().url()}),Dl=ie([ci,Ml]),Ul=Ue.extend({method:N("elicitation/create"),params:Dl}),Fl=nt.extend({elicitationId:m()}),Vl=it.extend({method:N("notifications/elicitation/complete"),params:Fl}),Zl=Fe.extend({action:fe(["accept","decline","cancel"]),content:Gt(e=>e===null?void 0:e,Q(m(),ie([m(),H(),te(),O(m())])).optional())}),Hl=T({type:N("ref/resource"),uri:m()}),Jl=T({type:N("ref/prompt"),name:m()}),Gl=Ye.extend({ref:ie([Jl,Hl]),argument:T({name:m(),value:m()}),context:T({arguments:Q(m(),m()).optional()}).optional()}),Bl=Ue.extend({method:N("completion/complete"),params:Gl}),Kl=Fe.extend({completion:ue({values:O(m()).max(100),total:ae(H().int()),hasMore:ae(te())})}),Wl=T({uri:m().startsWith("file://"),name:m().optional(),_meta:Q(m(),oe()).optional()}),Yl=Ue.extend({method:N("roots/list"),params:Ye.optional()}),Xl=Fe.extend({roots:O(Wl)}),Ql=it.extend({method:N("notifications/roots/list_changed"),params:nt.optional()}),Bf=ue({ttl:H().optional(),pollInterval:H().optional()}),eu=fe(["working","input_required","completed","failed","cancelled"]),Ir=T({taskId:m(),status:eu,ttl:ie([H(),qt()]),createdAt:m(),lastUpdatedAt:m(),pollInterval:ae(H()),statusMessage:ae(m())}),Kf=Fe.extend({task:Ir}),tu=nt.merge(Ir),Wf=it.extend({method:N("notifications/tasks/status"),params:tu}),Yf=Ue.extend({method:N("tasks/get"),params:Ye.extend({taskId:m()})}),Xf=Fe.merge(Ir),Qf=Ue.extend({method:N("tasks/result"),params:Ye.extend({taskId:m()})}),eg=Fe.loose(),tg=Sr.extend({method:N("tasks/list")}),rg=$r.extend({tasks:O(Ir)}),ng=Ue.extend({method:N("tasks/cancel"),params:Ye.extend({taskId:m()})}),ig=Fe.merge(Ir),og=ie([Mo,Tc,xc,Bl,wl,cl,ol,Lc,Mc,Fc,Jc,Bc,Wc,bl,vl]),ag=ie([Lo,Do,Pc,Ql]),sg=ie([Co,Ol,Nl,Zl,Xl]),cg=ie([Mo,Al,Ul,Yl]),lg=ie([Lo,Do,Il,rl,Zc,Sl,hl,Xc,Vl]),ug=ie([Co,Ec,jc,Kl,pl,al,qc,Dc,Vc,Go,yl,el]),We=Jn().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Uf.custom,message:"URL must be parseable",fatal:!0}),Ki}).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"}),dg=ue({resource:m().url(),authorization_servers:O(We).optional(),jwks_uri:m().url().optional(),scopes_supported:O(m()).optional(),bearer_methods_supported:O(m()).optional(),resource_signing_alg_values_supported:O(m()).optional(),resource_name:m().optional(),resource_documentation:m().optional(),resource_policy_uri:m().url().optional(),resource_tos_uri:m().url().optional(),tls_client_certificate_bound_access_tokens:te().optional(),authorization_details_types_supported:O(m()).optional(),dpop_signing_alg_values_supported:O(m()).optional(),dpop_bound_access_tokens_required:te().optional()}),ru=ue({issuer:m(),authorization_endpoint:We,token_endpoint:We,registration_endpoint:We.optional(),scopes_supported:O(m()).optional(),response_types_supported:O(m()),response_modes_supported:O(m()).optional(),grant_types_supported:O(m()).optional(),token_endpoint_auth_methods_supported:O(m()).optional(),token_endpoint_auth_signing_alg_values_supported:O(m()).optional(),service_documentation:We.optional(),revocation_endpoint:We.optional(),revocation_endpoint_auth_methods_supported:O(m()).optional(),revocation_endpoint_auth_signing_alg_values_supported:O(m()).optional(),introspection_endpoint:m().optional(),introspection_endpoint_auth_methods_supported:O(m()).optional(),introspection_endpoint_auth_signing_alg_values_supported:O(m()).optional(),code_challenge_methods_supported:O(m()).optional(),client_id_metadata_document_supported:te().optional(),authorization_response_iss_parameter_supported:te().optional().catch(void 0)}),nu=ue({issuer:m(),authorization_endpoint:We,token_endpoint:We,userinfo_endpoint:We.optional(),jwks_uri:We,registration_endpoint:We.optional(),scopes_supported:O(m()).optional(),response_types_supported:O(m()),response_modes_supported:O(m()).optional(),grant_types_supported:O(m()).optional(),acr_values_supported:O(m()).optional(),subject_types_supported:O(m()),id_token_signing_alg_values_supported:O(m()),id_token_encryption_alg_values_supported:O(m()).optional(),id_token_encryption_enc_values_supported:O(m()).optional(),userinfo_signing_alg_values_supported:O(m()).optional(),userinfo_encryption_alg_values_supported:O(m()).optional(),userinfo_encryption_enc_values_supported:O(m()).optional(),request_object_signing_alg_values_supported:O(m()).optional(),request_object_encryption_alg_values_supported:O(m()).optional(),request_object_encryption_enc_values_supported:O(m()).optional(),token_endpoint_auth_methods_supported:O(m()).optional(),token_endpoint_auth_signing_alg_values_supported:O(m()).optional(),display_values_supported:O(m()).optional(),claim_types_supported:O(m()).optional(),claims_supported:O(m()).optional(),service_documentation:m().optional(),claims_locales_supported:O(m()).optional(),ui_locales_supported:O(m()).optional(),claims_parameter_supported:te().optional(),request_parameter_supported:te().optional(),request_uri_parameter_supported:te().optional(),require_request_uri_registration:te().optional(),op_policy_uri:We.optional(),op_tos_uri:We.optional(),client_id_metadata_document_supported:te().optional(),authorization_response_iss_parameter_supported:te().optional().catch(void 0)}),mg=T({...nu.shape,...ru.pick({code_challenge_methods_supported:!0}).shape}),pg=T({access_token:m(),id_token:m().optional(),token_type:m(),expires_in:To.number().optional(),scope:m().optional(),refresh_token:m().optional()}).strip(),hg=T({issued_token_type:N("urn:ietf:params:oauth:token-type:id-jag"),access_token:m(),token_type:m().optional(),expires_in:H().optional(),scope:m().optional()}).strip(),fg=T({error:m(),error_description:m().optional(),error_uri:m().optional()}),Ff=We.optional().or(N("").transform(()=>{})),iu=T({redirect_uris:O(We),token_endpoint_auth_method:m().optional(),grant_types:O(m()).optional(),response_types:O(m()).optional(),application_type:m().optional(),client_name:m().optional(),client_uri:We.optional(),logo_uri:Ff,scope:m().optional(),contacts:O(m()).optional(),tos_uri:Ff,policy_uri:m().optional(),jwks_uri:We.optional(),jwks:pc().optional(),software_id:m().optional(),software_version:m().optional(),software_statement:m().optional()}).strip(),ou=T({client_id:m(),client_secret:m().optional(),client_id_issued_at:H().optional(),client_secret_expires_at:H().optional()}).strip(),gg=iu.merge(ou),vg=T({error:m(),error_description:m().optional()}).strip(),yg=T({token:m(),token_type_hint:m().optional()}).strip();var $g=Symbol.for("mcp.sdk.errorBrands");function Rg(e,t){let n=new Set,i=t;for(;typeof i=="function";){let r=i.mcpBrand;Object.prototype.hasOwnProperty.call(i,"mcpBrand")&&typeof r=="string"&&n.add(r),i=Object.getPrototypeOf(i)}n.size!==0&&Object.defineProperty(e,$g,{value:n,enumerable:!1,configurable:!0})}function ui(e,t){try{if(typeof t=="object"&&t!==null&&Object.prototype.hasOwnProperty.call(e,"mcpBrand")&&typeof e.mcpBrand=="string"&&Object.prototype.hasOwnProperty.call(t,$g)){let n=t[$g];if(n&&typeof n.has=="function"&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}var UR=class Ab extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthError"})}static[Symbol.hasInstance](t){return ui(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 ui(this,t)}constructor(t,n,i){super(n),this.code=t,this.errorUri=i,this.name="OAuthError",Rg(this,new.target)}toResponseObject(){let t={error:this.code,error_description:this.message};return this.errorUri&&(t.error_uri=this.errorUri),t}static fromResponse(t){return new Ab(t.error,t.error_description??t.error,t.error_uri)}},ze=(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})({}),ve=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkError"})}static[Symbol.hasInstance](e){return ui(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 ui(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name="SdkError",Rg(this,new.target)}},FR=class extends ve{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkHttpError"})}constructor(e,t,n){super(e,t,n),this.name="SdkHttpError"}get status(){return this.data.status}get statusText(){return this.data.statusText}};function Sb(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function VR(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 pu(e,t){let n={};for(let[i,r]of Object.entries(e)){if(r===void 0)continue;let o=t===void 0?void 0:t[i];if(o===void 0){n[i]=r;continue}if(Sb(r)&&Sb(o)){let a={};for(let[s,l]of Object.entries(r))l!==void 0&&o[s]===void 0&&!VR(i,s,o)&&(a[s]=l);Object.keys(a).length>0&&(n[i]=a)}}return Object.keys(n).length>0?n:void 0}var Nb="2026-07-28",kr=[Nb];function mi(e){return e>=Nb}function Cb(e){return e.filter(t=>!mi(t))}function kg(e){return e.filter(t=>mi(t))}function Lb(e){let t=e.structuredContent;return t===void 0||!(typeof t!="object"||t===null||Array.isArray(t))||(e.content?.some(n=>n.type==="text")??!1)?e:{...e,content:[...e.content??[],{type:"text",text:JSON.stringify(t)}]}}var qb=["task","inputRequests","requestState"];function Tg(e){return e===null||typeof e!="object"||Array.isArray(e)||e.content!==void 0||qb.some(t=>t in e)?e:{...e,content:[]}}function ZR(){let e=gr(()=>ie([m(),H(),te(),qt(),Q(m(),e),O(e)])),t=Q(m(),e),n=ie([m(),H().int()]),i=m(),r=T({ttl:H().optional()}),o=T({taskId:m()}),a=ue({progressToken:n.optional(),"io.modelcontextprotocol/related-task":o.optional()}),s=T({_meta:a.optional()}),l=s.extend({task:r.optional()}),u=T({method:m(),params:s.loose().optional()}),d=T({_meta:a.optional()}),p=T({method:m(),params:d.loose().optional()}),f=ue({_meta:a.optional()}),b=ie([m(),H().int()]),v=f.strict(),$=d.extend({requestId:b.optional(),reason:m().optional()}),y=p.extend({method:N("notifications/cancelled"),params:$}),h=T({src:m(),mimeType:m().optional(),sizes:O(m()).optional(),theme:fe(["light","dark"]).optional()}),z=T({icons:O(h).optional()}),g=T({name:m(),title:m().optional()}),S=g.extend({...g.shape,...z.shape,version:m(),websiteUrl:m().optional(),description:m().optional()}),k=Tt(T({applyDefaults:te().optional()}),t),w=Gt(tt=>tt&&typeof tt=="object"&&!Array.isArray(tt)&&Object.keys(tt).length===0?{form:{}}:tt,Tt(T({form:k.optional(),url:t.optional()}),t.optional())),_=ue({list:t.optional(),cancel:t.optional(),requests:ue({sampling:ue({createMessage:t.optional()}).optional(),elicitation:ue({create:t.optional()}).optional()}).optional()}),I=ue({list:t.optional(),cancel:t.optional(),requests:ue({tools:ue({call:t.optional()}).optional()}).optional()}),j=T({experimental:Q(m(),t).optional(),sampling:T({context:t.optional(),tools:t.optional()}).optional(),elicitation:w.optional(),roots:T({listChanged:te().optional()}).optional(),tasks:_.optional(),extensions:Q(m(),t).optional()}),U=s.extend({protocolVersion:m(),capabilities:j,clientInfo:S}),C=u.extend({method:N("initialize"),params:U}),F=T({experimental:Q(m(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:T({listChanged:te().optional()}).optional(),resources:T({subscribe:te().optional(),listChanged:te().optional()}).optional(),tools:T({listChanged:te().optional()}).optional(),tasks:I.optional(),extensions:Q(m(),t).optional()}),ee=f.extend({protocolVersion:m(),capabilities:F,serverInfo:S,instructions:m().optional()}),ne=p.extend({method:N("notifications/initialized"),params:d.optional()}),we=u.extend({method:N("ping"),params:s.optional()}),Ce=T({progress:H(),total:ae(H()),message:ae(m())}),Oe=T({...d.shape,...Ce.shape,progressToken:n}),Je=p.extend({method:N("notifications/progress"),params:Oe}),ke=s.extend({cursor:i.optional()}),x=u.extend({params:ke.optional()}),M=f.extend({nextCursor:i.optional()}),J=T({uri:m(),mimeType:ae(m()),_meta:Q(m(),oe()).optional()}),R=J.extend({text:m()}),P=m().refine(tt=>{try{return atob(tt),!0}catch{return!1}},{message:"Invalid Base64 string"}),L=J.extend({blob:P}),Y=fe(["user","assistant"]),le=T({audience:O(Y).optional(),priority:H().min(0).max(1).optional(),lastModified:_t.datetime({offset:!0}).optional()}),Se=T({...g.shape,...z.shape,uri:m(),description:ae(m()),mimeType:ae(m()),size:ae(H()),annotations:le.optional(),_meta:ae(ue({}))}),he=T({...g.shape,...z.shape,uriTemplate:m(),description:ae(m()),mimeType:ae(m()),annotations:le.optional(),_meta:ae(ue({}))}),Ne=x.extend({method:N("resources/list")}),ot=M.extend({resources:O(Se)}),E=x.extend({method:N("resources/templates/list")}),D=M.extend({resourceTemplates:O(he)}),V=s.extend({uri:m()}),me=V,pe=u.extend({method:N("resources/read"),params:me}),be=f.extend({contents:O(ie([R,L]))}),Ve=p.extend({method:N("notifications/resources/list_changed"),params:d.optional()}),Be=V,Qe=u.extend({method:N("resources/subscribe"),params:Be}),Ge=V,Le=u.extend({method:N("resources/unsubscribe"),params:Ge}),bt=d.extend({uri:m()}),Ke=p.extend({method:N("notifications/resources/updated"),params:bt}),Ut=T({name:m(),description:ae(m()),required:ae(te())}),zt=T({...g.shape,...z.shape,description:ae(m()),arguments:ae(O(Ut)),_meta:ae(ue({}))}),Ft=x.extend({method:N("prompts/list")}),er=M.extend({prompts:O(zt)}),tr=s.extend({name:m(),arguments:Q(m(),m()).optional()}),jr=u.extend({method:N("prompts/get"),params:tr}),Ar=T({type:N("text"),text:m(),annotations:le.optional(),_meta:Q(m(),oe()).optional()}),Or=T({type:N("image"),data:P,mimeType:m(),annotations:le.optional(),_meta:Q(m(),oe()).optional()}),Nr=T({type:N("audio"),data:P,mimeType:m(),annotations:le.optional(),_meta:Q(m(),oe()).optional()}),$i=T({type:N("tool_use"),name:m(),id:m(),input:Q(m(),oe()),_meta:Q(m(),oe()).optional()}),rr=T({type:N("resource"),resource:ie([R,L]),annotations:le.optional(),_meta:Q(m(),oe()).optional()}),wi=Se.extend({type:N("resource_link")}),St=ie([Ar,Or,Nr,wi,rr]),ln=T({role:Y,content:St}),un=f.extend({description:m().optional(),messages:O(ln)}),Cr=p.extend({method:N("notifications/prompts/list_changed"),params:d.optional()}),zi=T({title:m().optional(),readOnlyHint:te().optional(),destructiveHint:te().optional(),idempotentHint:te().optional(),openWorldHint:te().optional()}),dn=T({taskSupport:fe(["required","optional","forbidden"]).optional()}),Lr=T({...g.shape,...z.shape,description:m().optional(),inputSchema:T({type:N("object"),properties:Q(m(),e).optional(),required:O(m()).optional()}).catchall(oe()),outputSchema:T({type:N("object"),properties:Q(m(),e).optional(),required:O(m()).optional()}).catchall(oe()).optional(),annotations:zi.optional(),execution:dn.optional(),_meta:Q(m(),oe()).optional()}),mn=x.extend({method:N("tools/list")}),pn=M.extend({tools:O(Lr)}),hn=f.extend({content:O(St),structuredContent:Q(m(),oe()).optional(),isError:te().optional()}),et=l.extend({name:m(),arguments:Q(m(),oe()).optional()}),Ii=u.extend({method:N("tools/call"),params:et}),va=p.extend({method:N("notifications/tools/list_changed"),params:d.optional()}),fn=fe(["debug","info","notice","warning","error","critical","alert","emergency"]),Ri=s.extend({level:fn}),ki=u.extend({method:N("logging/setLevel"),params:Ri}),Ti=d.extend({level:fn,logger:m().optional(),data:oe()}),Ei=p.extend({method:N("notifications/message"),params:Ti}),Pi=T({name:m().optional()}),xi=T({hints:O(Pi).optional(),costPriority:H().min(0).max(1).optional(),speedPriority:H().min(0).max(1).optional(),intelligencePriority:H().min(0).max(1).optional()}),ji=T({mode:fe(["auto","required","none"]).optional()}),ya=T({type:N("tool_result"),toolUseId:m().describe("The unique identifier for the corresponding tool call."),content:O(St),structuredContent:T({}).loose().optional(),isError:te().optional(),_meta:Q(m(),oe()).optional()}),Ai=fr("type",[Ar,Or,Nr]),nr=fr("type",[Ar,Or,Nr,$i,ya]),Oi=T({role:Y,content:ie([nr,O(nr)]),_meta:Q(m(),oe()).optional()}),Ni=l.extend({messages:O(Oi),modelPreferences:xi.optional(),systemPrompt:m().optional(),includeContext:fe(["none","thisServer","allServers"]).optional(),temperature:H().optional(),maxTokens:H().int(),stopSequences:O(m()).optional(),metadata:t.optional(),tools:O(Lr).optional(),toolChoice:ji.optional()}),Ci=u.extend({method:N("sampling/createMessage"),params:Ni}),Li=f.extend({model:m(),stopReason:ae(fe(["endTurn","stopSequence","maxTokens"]).or(m())),role:Y,content:Ai}),qi=f.extend({model:m(),stopReason:ae(fe(["endTurn","stopSequence","maxTokens","toolUse"]).or(m())),role:Y,content:ie([nr,O(nr)])}),Mi=T({type:N("boolean"),title:m().optional(),description:m().optional(),default:te().optional()}),Di=T({type:N("string"),title:m().optional(),description:m().optional(),minLength:H().optional(),maxLength:H().optional(),format:fe(["email","uri","date","date-time"]).optional(),default:m().optional()}),Ui=T({type:fe(["number","integer"]),title:m().optional(),description:m().optional(),minimum:H().optional(),maximum:H().optional(),default:H().optional()}),Fi=T({type:N("string"),title:m().optional(),description:m().optional(),enum:O(m()),default:m().optional()}),Vi=T({type:N("string"),title:m().optional(),description:m().optional(),oneOf:O(T({const:m(),title:m()})),default:m().optional()}),Zi=T({type:N("string"),title:m().optional(),description:m().optional(),enum:O(m()),enumNames:O(m()).optional(),default:m().optional()}),Hi=ie([Fi,Vi]),qr=T({type:N("array"),title:m().optional(),description:m().optional(),minItems:H().optional(),maxItems:H().optional(),items:T({type:N("string"),enum:O(m())}),default:O(m()).optional()}),Mr=T({type:N("array"),title:m().optional(),description:m().optional(),minItems:H().optional(),maxItems:H().optional(),items:T({anyOf:O(T({const:m(),title:m()}))}),default:O(m()).optional()}),_a=ie([qr,Mr]),ba=ie([Zi,Hi,_a]),ft=ie([ba,Mi,Di,Ui]),gt=l.extend({mode:N("form").optional(),message:m(),requestedSchema:T({type:N("object"),properties:Q(m(),ft),required:O(m()).optional()}).catchall(oe())}),Ji=l.extend({mode:N("url"),message:m(),elicitationId:m(),url:m().url()}),It=ie([gt,Ji]),Sa=u.extend({method:N("elicitation/create"),params:It}),$a=d.extend({elicitationId:m()}),wa=p.extend({method:N("notifications/elicitation/complete"),params:$a}),za=f.extend({action:fe(["accept","decline","cancel"]),content:Gt(tt=>tt===null?void 0:tt,Q(m(),ie([m(),H(),te(),O(m())])).optional())}),Ia=T({type:N("ref/resource"),uri:m()}),Ra=T({type:N("ref/prompt"),name:m()}),ka=s.extend({ref:ie([Ra,Ia]),argument:T({name:m(),value:m()}),context:T({arguments:Q(m(),m()).optional()}).optional()}),Gi=u.extend({method:N("completion/complete"),params:ka}),Ta=f.extend({completion:ue({values:O(m()).max(100),total:ae(H().int()),hasMore:ae(te())})}),Ea=T({uri:m().startsWith("file://"),name:m().optional(),_meta:Q(m(),oe()).optional()}),gn=u.extend({method:N("roots/list"),params:s.optional()}),Bi=f.extend({roots:O(Ea)}),Pa=p.extend({method:N("notifications/roots/list_changed"),params:d.optional()}),xa=ue({ttl:H().optional(),pollInterval:H().optional()}),ja=fe(["working","input_required","completed","failed","cancelled"]),ir=T({taskId:m(),status:ja,ttl:ie([H(),qt()]),createdAt:m(),lastUpdatedAt:m(),pollInterval:ae(H()),statusMessage:ae(m())}),ut=f.extend({task:ir}),Aa=d.merge(ir),Dr=p.extend({method:N("notifications/tasks/status"),params:Aa}),vn=u.extend({method:N("tasks/get"),params:s.extend({taskId:m()})}),yn=f.merge(ir),_n=u.extend({method:N("tasks/result"),params:s.extend({taskId:m()})}),Ju=f.loose(),dt=x.extend({method:N("tasks/list")}),Ze=M.extend({tasks:O(ir)}),Ur=u.extend({method:N("tasks/cancel"),params:s.extend({taskId:m()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:i,TaskMetadataSchema:r,RelatedTaskMetadataSchema:o,RequestMetaSchema:a,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:l,RequestSchema:u,NotificationsParamsSchema:d,NotificationSchema:p,ResultSchema:f,RequestIdSchema:b,EmptyResultSchema:v,CancelledNotificationParamsSchema:$,CancelledNotificationSchema:y,IconSchema:h,IconsSchema:z,BaseMetadataSchema:g,ImplementationSchema:S,ClientTasksCapabilitySchema:_,ServerTasksCapabilitySchema:I,ClientCapabilitiesSchema:j,InitializeRequestParamsSchema:U,InitializeRequestSchema:C,ServerCapabilitiesSchema:F,InitializeResultSchema:ee,InitializedNotificationSchema:ne,PingRequestSchema:we,ProgressSchema:Ce,ProgressNotificationParamsSchema:Oe,ProgressNotificationSchema:Je,PaginatedRequestParamsSchema:ke,PaginatedRequestSchema:x,PaginatedResultSchema:M,ResourceContentsSchema:J,TextResourceContentsSchema:R,BlobResourceContentsSchema:L,RoleSchema:Y,AnnotationsSchema:le,ResourceSchema:Se,ResourceTemplateSchema:he,ListResourcesRequestSchema:Ne,ListResourcesResultSchema:ot,ListResourceTemplatesRequestSchema:E,ListResourceTemplatesResultSchema:D,ResourceRequestParamsSchema:V,ReadResourceRequestParamsSchema:me,ReadResourceRequestSchema:pe,ReadResourceResultSchema:be,ResourceListChangedNotificationSchema:Ve,SubscribeRequestParamsSchema:Be,SubscribeRequestSchema:Qe,UnsubscribeRequestParamsSchema:Ge,UnsubscribeRequestSchema:Le,ResourceUpdatedNotificationParamsSchema:bt,ResourceUpdatedNotificationSchema:Ke,PromptArgumentSchema:Ut,PromptSchema:zt,ListPromptsRequestSchema:Ft,ListPromptsResultSchema:er,GetPromptRequestParamsSchema:tr,GetPromptRequestSchema:jr,TextContentSchema:Ar,ImageContentSchema:Or,AudioContentSchema:Nr,ToolUseContentSchema:$i,EmbeddedResourceSchema:rr,ResourceLinkSchema:wi,ContentBlockSchema:St,PromptMessageSchema:ln,GetPromptResultSchema:un,PromptListChangedNotificationSchema:Cr,ToolAnnotationsSchema:zi,ToolExecutionSchema:dn,ToolSchema:Lr,ListToolsRequestSchema:mn,ListToolsResultSchema:pn,CallToolResultSchema:hn,CallToolRequestParamsSchema:et,CallToolRequestSchema:Ii,ToolListChangedNotificationSchema:va,LoggingLevelSchema:fn,SetLevelRequestParamsSchema:Ri,SetLevelRequestSchema:ki,LoggingMessageNotificationParamsSchema:Ti,LoggingMessageNotificationSchema:Ei,ModelHintSchema:Pi,ModelPreferencesSchema:xi,ToolChoiceSchema:ji,ToolResultContentSchema:ya,SamplingContentSchema:Ai,SamplingMessageContentBlockSchema:nr,SamplingMessageSchema:Oi,CreateMessageRequestParamsSchema:Ni,CreateMessageRequestSchema:Ci,CreateMessageResultSchema:Li,CreateMessageResultWithToolsSchema:qi,BooleanSchemaSchema:Mi,StringSchemaSchema:Di,NumberSchemaSchema:Ui,UntitledSingleSelectEnumSchemaSchema:Fi,TitledSingleSelectEnumSchemaSchema:Vi,LegacyTitledEnumSchemaSchema:Zi,SingleSelectEnumSchemaSchema:Hi,UntitledMultiSelectEnumSchemaSchema:qr,TitledMultiSelectEnumSchemaSchema:Mr,MultiSelectEnumSchemaSchema:_a,EnumSchemaSchema:ba,PrimitiveSchemaDefinitionSchema:ft,ElicitRequestFormParamsSchema:gt,ElicitRequestURLParamsSchema:Ji,ElicitRequestParamsSchema:It,ElicitRequestSchema:Sa,ElicitationCompleteNotificationParamsSchema:$a,ElicitationCompleteNotificationSchema:wa,ElicitResultSchema:za,ResourceTemplateReferenceSchema:Ia,PromptReferenceSchema:Ra,CompleteRequestParamsSchema:ka,CompleteRequestSchema:Gi,CompleteResultSchema:Ta,RootSchema:Ea,ListRootsRequestSchema:gn,ListRootsResultSchema:Bi,RootsListChangedNotificationSchema:Pa,TaskCreationParamsSchema:xa,TaskStatusSchema:ja,TaskSchema:ir,CreateTaskResultSchema:ut,TaskStatusNotificationParamsSchema:Aa,TaskStatusNotificationSchema:Dr,GetTaskRequestSchema:vn,GetTaskResultSchema:yn,GetTaskPayloadRequestSchema:_n,GetTaskPayloadResultSchema:Ju,ListTasksRequestSchema:dt,ListTasksResultSchema:Ze,CancelTaskRequestSchema:Ur,CancelTaskResultSchema:f.merge(ir),ClientRequestSchema:ie([we,C,Gi,ki,jr,Ft,Ne,E,pe,Qe,Le,Ii,mn,vn,_n,dt,Ur]),ClientNotificationSchema:ie([y,Je,ne,Pa,Dr]),ClientResultSchema:ie([v,Li,qi,za,Bi,yn,Ze,ut]),ServerRequestSchema:ie([we,Ci,Sa,gn,vn,_n,dt,Ur]),ServerNotificationSchema:ie([y,Je,Ei,Ke,Ve,va,Cr,Dr,wa]),ServerResultSchema:ie([v,ee,Ta,un,er,ot,D,be,hn,pn,yn,Ze,ut]),CallToolResultWireSchema:oe().superRefine((tt,Mw)=>{if(!(typeof tt!="object"||tt===null||Array.isArray(tt)||tt.content!==void 0)){for(let vv of qb)if(vv in tt){Mw.addIssue({code:"custom",message:`content is required when the body carries '${vv}' \u2014 another result family cannot default into an empty tools/call success`});return}}}).transform(Tg).pipe(hn)}}var HR;function Mb(){return HR??=ZR()}function Db(e){return e.type!=="object"}var JR=new Set(["const","enum","default","examples"]),GR=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas","dependencies"]);function $b(e){return e!==void 0&&!(typeof e=="string"&&e.startsWith("#"))}function BR(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=bv(e.$schema)&&e.$recursiveAnchor!==!0,i=(r,o)=>{if(Array.isArray(r))return r.map(l=>i(l,!1));if(r===null||typeof r!="object"||!o&&$b(r.$id))return r;let a={},s=!1;for(let[l,u]of Object.entries(r))o?a[l]=i(u,!1):(l==="$ref"||l==="$dynamicRef")&&typeof u=="string"?a[l]=u==="#"?"#/properties/result":u.startsWith("#/")?`#/properties/result${u.slice(1)}`:u:l==="$recursiveRef"&&u==="#"&&n?s=!0:JR.has(l)?a[l]=u:GR.has(l)?a[l]=i(u,!0):a[l]=i(u,!1);return s&&("$ref"in a?a.allOf=[...Array.isArray(a.allOf)?a.allOf:[],{$ref:"#/properties/result"}]:a.$ref="#/properties/result"),a};return{...t!==void 0&&{$schema:t},type:"object",properties:{result:i(e,!1)},required:["result"]}}var Ub={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},Fb={"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},KR={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},au;function Eg(){if(au)return au;let e=Mb();return au={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}},au}function Vb(e){return Object.prototype.hasOwnProperty.call(Ub,e)}function Zb(e){return Object.prototype.hasOwnProperty.call(Fb,e)}function WR(e){return Object.prototype.hasOwnProperty.call(KR,e)}function YR(e){return WR(e)?Eg().resultSchemas[e]:void 0}function XR(e){return Vb(e)?Eg().requestSchemas[e]:void 0}function QR(e){return Zb(e)?Eg().notificationSchemas[e]:void 0}var vA=Object.keys(Ub),yA=Object.keys(Fb);function wg(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function su(e,t){if(e===void 0)return{ok:!1,reason:"not-in-era"};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:"invalid",message:String(n.error)}}var wb={ok:!1,reason:"not-in-era"};function zb(e){return wg(e)&&wg(e.outputSchema)&&Db(e.outputSchema)}var Pg={era:"2025-11-25",hasRequestMethod:Vb,hasNotificationMethod:Zb,validateRequest:(e,t)=>su(XR(e),t),validateResult:(e,t)=>su(YR(e),t),validateNotification:(e,t)=>su(QR(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>wb,validateInputResponse:()=>wb,samplingResultVariant:((e,t)=>{let n=Mb();return su(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>{},validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=Lb(e),i=n.structuredContent;if(i===void 0)return n;let r=typeof i!="object"||i===null||Array.isArray(i),o=t!==void 0&&Db(t);return!r&&!o?n:{...n,structuredContent:{result:i}}},decodeResult(e,t){if(wg(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(i=>zb(i))?t:{...t,tools:n.map(i=>zb(i)?{...i,outputSchema:BR(i.outputSchema)}:i)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>{}};function e0(){let e=gr(()=>ie([m(),H(),te(),qt(),Q(m(),e),O(e)])),t=Q(m(),e),n=ie([m(),H().int()]),i=m(),r=ie([m(),H().int()]),o=fe(["user","assistant"]),a=fe(["debug","info","notice","warning","error","critical","alert","emergency"]),s=m().refine(Ze=>{try{return atob(Ze),!0}catch{return!1}},{message:"Invalid Base64 string"}),l=T({ttl:H().optional()}),u=T({taskId:m()}),d=ue({progressToken:n.optional(),"io.modelcontextprotocol/related-task":u.optional()}),p=T({_meta:d.optional()}),f=p.extend({task:l.optional()}),b=T({_meta:d.optional()}),v=T({method:m(),params:b.loose().optional()}),$=T({src:m(),mimeType:m().optional(),sizes:O(m()).optional(),theme:fe(["light","dark"]).optional()}),y=T({icons:O($).optional()}),h=T({name:m(),title:m().optional()}),z=h.extend({...h.shape,...y.shape,version:m(),websiteUrl:m().optional(),description:m().optional()}),g=Tt(T({applyDefaults:te().optional()}),t),S=Gt(Ze=>Ze&&typeof Ze=="object"&&!Array.isArray(Ze)&&Object.keys(Ze).length===0?{form:{}}:Ze,Tt(T({form:g.optional(),url:t.optional()}),t.optional())),k=ue({list:t.optional(),cancel:t.optional(),requests:ue({sampling:ue({createMessage:t.optional()}).optional(),elicitation:ue({create:t.optional()}).optional()}).optional()}),w=ue({list:t.optional(),cancel:t.optional(),requests:ue({tools:ue({call:t.optional()}).optional()}).optional()}),_=T({experimental:Q(m(),t).optional(),sampling:T({context:t.optional(),tools:t.optional()}).optional(),elicitation:S.optional(),roots:T({listChanged:te().optional()}).optional(),tasks:k.optional(),extensions:Q(m(),t).optional()}),I=T({experimental:Q(m(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:T({listChanged:te().optional()}).optional(),resources:T({subscribe:te().optional(),listChanged:te().optional()}).optional(),tools:T({listChanged:te().optional()}).optional(),tasks:w.optional(),extensions:Q(m(),t).optional()}),j=T({progress:H(),total:ae(H()),message:ae(m())}),U=T({...b.shape,...j.shape,progressToken:n}),C=v.extend({method:N("notifications/progress"),params:U}),F=b.extend({level:a,logger:m().optional(),data:oe()}),ee=v.extend({method:N("notifications/message"),params:F}),ne=T({uri:m(),mimeType:ae(m()),_meta:Q(m(),oe()).optional()}),we=ne.extend({text:m()}),Ce=ne.extend({blob:s}),Oe=T({audience:O(o).optional(),priority:H().min(0).max(1).optional(),lastModified:_t.datetime({offset:!0}).optional()}),Je=T({...h.shape,...y.shape,uri:m(),description:ae(m()),mimeType:ae(m()),size:ae(H()),annotations:Oe.optional(),_meta:ae(ue({}))}),ke=T({...h.shape,...y.shape,uriTemplate:m(),description:ae(m()),mimeType:ae(m()),annotations:Oe.optional(),_meta:ae(ue({}))}),x=v.extend({method:N("notifications/resources/list_changed"),params:b.optional()}),M=b.extend({uri:m()}),J=v.extend({method:N("notifications/resources/updated"),params:M}),R=T({name:m(),description:ae(m()),required:ae(te())}),P=T({...h.shape,...y.shape,description:ae(m()),arguments:ae(O(R)),_meta:ae(ue({}))}),L=v.extend({method:N("notifications/prompts/list_changed"),params:b.optional()}),Y=T({type:N("text"),text:m(),annotations:Oe.optional(),_meta:Q(m(),oe()).optional()}),le=T({type:N("image"),data:s,mimeType:m(),annotations:Oe.optional(),_meta:Q(m(),oe()).optional()}),Se=T({type:N("audio"),data:s,mimeType:m(),annotations:Oe.optional(),_meta:Q(m(),oe()).optional()}),he=T({type:N("tool_use"),name:m(),id:m(),input:Q(m(),oe()),_meta:Q(m(),oe()).optional()}),Ne=T({type:N("resource"),resource:ie([we,Ce]),annotations:Oe.optional(),_meta:Q(m(),oe()).optional()}),ot=Je.extend({type:N("resource_link")}),E=ie([Y,le,Se,ot,Ne]),D=T({role:o,content:E}),V=T({title:m().optional(),readOnlyHint:te().optional(),destructiveHint:te().optional(),idempotentHint:te().optional(),openWorldHint:te().optional()}),me=v.extend({method:N("notifications/tools/list_changed"),params:b.optional()}),pe=T({name:m().optional()}),be=T({hints:O(pe).optional(),costPriority:H().min(0).max(1).optional(),speedPriority:H().min(0).max(1).optional(),intelligencePriority:H().min(0).max(1).optional()}),Ve=T({mode:fe(["auto","required","none"]).optional()}),Be=T({type:N("boolean"),title:m().optional(),description:m().optional(),default:te().optional()}),Qe=T({type:N("string"),title:m().optional(),description:m().optional(),minLength:H().optional(),maxLength:H().optional(),format:fe(["email","uri","date","date-time"]).optional(),default:m().optional()}),Ge=T({type:fe(["number","integer"]),title:m().optional(),description:m().optional(),minimum:H().optional(),maximum:H().optional(),default:H().optional()}),Le=T({type:N("string"),title:m().optional(),description:m().optional(),enum:O(m()),default:m().optional()}),bt=T({type:N("string"),title:m().optional(),description:m().optional(),oneOf:O(T({const:m(),title:m()})),default:m().optional()}),Ke=T({type:N("string"),title:m().optional(),description:m().optional(),enum:O(m()),enumNames:O(m()).optional(),default:m().optional()}),Ut=ie([Le,bt]),zt=T({type:N("array"),title:m().optional(),description:m().optional(),minItems:H().optional(),maxItems:H().optional(),items:T({type:N("string"),enum:O(m())}),default:O(m()).optional()}),Ft=T({type:N("array"),title:m().optional(),description:m().optional(),minItems:H().optional(),maxItems:H().optional(),items:T({anyOf:O(T({const:m(),title:m()}))}),default:O(m()).optional()}),er=ie([zt,Ft]),tr=ie([Ke,Ut,er]),jr=ie([tr,Be,Qe,Ge]),Ar=f.extend({mode:N("form").optional(),message:m(),requestedSchema:T({type:N("object"),properties:Q(m(),jr),required:O(m()).optional()}).catchall(oe())}),Or=T({type:N("ref/resource"),uri:m()}),Nr=T({type:N("ref/prompt"),name:m()}),$i=T({uri:m().startsWith("file://"),name:m().optional(),_meta:Q(m(),oe()).optional()}),rr=_.shape,wi=T({experimental:rr.experimental,sampling:rr.sampling,elicitation:rr.elicitation,roots:rr.roots,extensions:rr.extensions}),St=I.shape,ln=T({experimental:St.experimental,logging:St.logging,completions:St.completions,prompts:St.prompts,resources:St.resources,tools:St.tools,extensions:St.extensions}),un=ue({progressToken:n.optional(),[Kt]:m(),[Yn]:z.optional(),[Wt]:wi,[yr]:a.optional()}),Cr=T({...h.shape,...y.shape,description:m().optional(),inputSchema:ue({$schema:m().optional(),type:N("object")}),outputSchema:ue({$schema:m().optional()}).optional(),annotations:V.optional(),_meta:Q(m(),oe()).optional()}),zi=T({type:N("tool_result"),toolUseId:m(),content:O(E),structuredContent:oe().optional(),isError:te().optional(),_meta:Q(m(),oe()).optional()}),dn=ie([Y,le,Se,he,zi]),Lr=T({role:o,content:ie([dn,O(dn)]),_meta:Q(m(),oe()).optional()}),mn=m(),pn=ue({[Mt]:z.optional().catch(void 0)}),hn=pn.optional();function et(Ze){return ue({_meta:hn,resultType:mn.default("complete"),...Ze})}let Ii=et({}),va=et({nextCursor:i.optional()}),fn=et({content:O(E),structuredContent:oe().optional(),isError:te().optional()}),Ri=et({ttlMs:H().int().min(0),cacheScope:fe(["public","private"]),tools:O(Cr),nextCursor:i.optional()}),ki=et({ttlMs:H().int().min(0),cacheScope:fe(["public","private"]),prompts:O(P),nextCursor:i.optional()}),Ti=et({description:m().optional(),messages:O(D)}),Ei=et({ttlMs:H().int().min(0),cacheScope:fe(["public","private"]),resources:O(Je),nextCursor:i.optional()}),Pi=et({ttlMs:H().int().min(0),cacheScope:fe(["public","private"]),resourceTemplates:O(ke),nextCursor:i.optional()}),xi=et({ttlMs:H().int().min(0),cacheScope:fe(["public","private"]),contents:O(ie([we,Ce]))}),ji=et({completion:T({values:O(m()).max(100),total:H().int().optional(),hasMore:te().optional()}).loose()}),ya=et({ttlMs:H().int().min(0),cacheScope:fe(["public","private"])}),Ai=et({ttlMs:H().int().min(0).catch(0),cacheScope:fe(["public","private"]).catch("private"),supportedVersions:O(m()),capabilities:ln,instructions:m().optional()}),nr=T({messages:O(Lr),modelPreferences:be.optional(),systemPrompt:m().optional(),includeContext:fe(["none","thisServer","allServers"]).optional(),temperature:H().optional(),maxTokens:H().int(),stopSequences:O(m()).optional(),metadata:t.optional(),tools:O(Cr).optional(),toolChoice:Ve.optional()}),Oi=T({method:N("sampling/createMessage"),params:nr}),Ni=T({method:N("roots/list"),params:T({_meta:Q(m(),oe()).optional()}).optional()}),Ci=T({...Lr.shape,model:m(),stopReason:m().optional()}),Li=T({roots:O($i)}),qi=T({action:fe(["accept","decline","cancel"]),content:Q(m(),ie([m(),H(),te(),O(m())])).optional()}),Mi=T({mode:N("url"),message:m(),url:m().url()}),Di=ie([Ar,Mi]),Ui=T({method:N("elicitation/create"),params:Di}),Fi=ie([Oi,Ni,Ui]),Vi=ie([Ci,Li,qi]),Zi=Q(m(),Fi),Hi=Q(m(),Vi),qr=et({inputRequests:Zi.optional(),requestState:m().optional()}),Mr={inputResponses:Hi.optional(),requestState:m().optional()},_a=T({_meta:un,...Mr}),ba=ue({progressToken:n.optional()});function ft(Ze,Ur){return T({method:N(Ze),params:T({_meta:un,...Ur})})}function gt(Ze,Ur){return T({method:N(Ze),params:T({_meta:ba.optional(),...Ur}).optional()})}let Ji={name:m(),arguments:Q(m(),oe()).optional(),...Mr},It={cursor:i.optional()},Sa=ft("tools/call",Ji),$a=ft("tools/list",It),wa=ft("prompts/list",It),za=ft("prompts/get",{name:m(),arguments:Q(m(),m()).optional(),...Mr}),Ia=ft("resources/list",It),Ra=ft("resources/templates/list",It),ka=ft("resources/read",{uri:m(),...Mr}),Gi={ref:ie([Nr,Or]),argument:T({name:m(),value:m()}),context:T({arguments:Q(m(),m()).optional()}).optional()},Ta=ft("completion/complete",Gi),Ea=ft("server/discover",{}),gn=T({toolsListChanged:te().optional(),promptsListChanged:te().optional(),resourcesListChanged:te().optional(),resourceSubscriptions:O(m()).optional()}),Bi={notifications:gn},Pa=ft("subscriptions/listen",Bi),xa=pn.extend({"io.modelcontextprotocol/subscriptionId":r}),ja=ue({_meta:xa,resultType:mn.default("complete")}),ir={"tools/call":gt("tools/call",Ji),"tools/list":gt("tools/list",It),"prompts/get":gt("prompts/get",{name:m(),arguments:Q(m(),m()).optional()}),"prompts/list":gt("prompts/list",It),"resources/list":gt("resources/list",It),"resources/templates/list":gt("resources/templates/list",It),"resources/read":gt("resources/read",{uri:m()}),"completion/complete":gt("completion/complete",Gi),"server/discover":gt("server/discover",{}),"subscriptions/listen":gt("subscriptions/listen",Bi)};function ut(Ze){return ue({_meta:hn,...Ze})}let Aa={"tools/call":ut({content:O(E),structuredContent:oe().optional(),isError:te().optional()}),"tools/list":ut({ttlMs:H().int().min(0),cacheScope:fe(["public","private"]),tools:O(Cr),nextCursor:i.optional()}),"prompts/get":ut({description:m().optional(),messages:O(D)}),"prompts/list":ut({ttlMs:H().int().min(0),cacheScope:fe(["public","private"]),prompts:O(P),nextCursor:i.optional()}),"resources/list":ut({ttlMs:H().int().min(0),cacheScope:fe(["public","private"]),resources:O(Je),nextCursor:i.optional()}),"resources/templates/list":ut({ttlMs:H().int().min(0),cacheScope:fe(["public","private"]),resourceTemplates:O(ke),nextCursor:i.optional()}),"resources/read":ut({ttlMs:H().int().min(0),cacheScope:fe(["public","private"]),contents:O(ie([we,Ce]))}),"completion/complete":ut({completion:T({values:O(m()).max(100),total:H().int().optional(),hasMore:te().optional()}).loose()}),"server/discover":ut({ttlMs:H().int().min(0).catch(0),cacheScope:fe(["public","private"]).catch("private"),supportedVersions:O(m()),capabilities:ln,instructions:m().optional()}),"subscriptions/listen":ut({})},Dr=ue({"io.modelcontextprotocol/subscriptionId":r.optional()}),vn=T({method:N("notifications/subscriptions/acknowledged"),params:T({_meta:Dr.optional(),notifications:gn})}),yn=T({_meta:Dr.optional(),requestId:r,reason:m().optional()}),_n=T({method:N("notifications/cancelled"),params:yn}),Ju={"notifications/cancelled":_n,"notifications/progress":C,"notifications/message":ee,"notifications/resources/updated":J,"notifications/resources/list_changed":x,"notifications/tools/list_changed":me,"notifications/prompts/list_changed":L,"notifications/subscriptions/acknowledged":vn},dt=Ze=>T({jsonrpc:N("2.0"),id:ie([m(),H().int()]),result:Ze}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:i,RequestIdSchema:r,RoleSchema:o,LoggingLevelSchema:a,TaskMetadataSchema:l,RelatedTaskMetadataSchema:u,RequestMetaSchema:d,BaseRequestParamsSchema:p,TaskAugmentedRequestParamsSchema:f,NotificationsParamsSchema:b,NotificationSchema:v,IconSchema:$,IconsSchema:y,BaseMetadataSchema:h,ImplementationSchema:z,ClientTasksCapabilitySchema:k,ServerTasksCapabilitySchema:w,ClientCapabilitiesSchema:_,ServerCapabilitiesSchema:I,ProgressSchema:j,ProgressNotificationParamsSchema:U,ProgressNotificationSchema:C,LoggingMessageNotificationParamsSchema:F,LoggingMessageNotificationSchema:ee,ResourceContentsSchema:ne,TextResourceContentsSchema:we,BlobResourceContentsSchema:Ce,AnnotationsSchema:Oe,ResourceSchema:Je,ResourceTemplateSchema:ke,ResourceListChangedNotificationSchema:x,ResourceUpdatedNotificationParamsSchema:M,ResourceUpdatedNotificationSchema:J,PromptArgumentSchema:R,PromptSchema:P,PromptListChangedNotificationSchema:L,TextContentSchema:Y,ImageContentSchema:le,AudioContentSchema:Se,ToolUseContentSchema:he,EmbeddedResourceSchema:Ne,ResourceLinkSchema:ot,ContentBlockSchema:E,PromptMessageSchema:D,ToolAnnotationsSchema:V,ToolListChangedNotificationSchema:me,ModelHintSchema:pe,ModelPreferencesSchema:be,ToolChoiceSchema:Ve,BooleanSchemaSchema:Be,StringSchemaSchema:Qe,NumberSchemaSchema:Ge,UntitledSingleSelectEnumSchemaSchema:Le,TitledSingleSelectEnumSchemaSchema:bt,LegacyTitledEnumSchemaSchema:Ke,SingleSelectEnumSchemaSchema:Ut,UntitledMultiSelectEnumSchemaSchema:zt,TitledMultiSelectEnumSchemaSchema:Ft,MultiSelectEnumSchemaSchema:er,EnumSchemaSchema:tr,PrimitiveSchemaDefinitionSchema:jr,ElicitRequestFormParamsSchema:Ar,ResourceTemplateReferenceSchema:Or,PromptReferenceSchema:Nr,RootSchema:$i,ClientCapabilities2026Schema:wi,ServerCapabilities2026Schema:ln,RequestMetaEnvelopeSchema:un,ToolSchema:Cr,ToolResultContentSchema:zi,SamplingMessageContentBlockSchema:dn,SamplingMessageSchema:Lr,ResultTypeSchema:mn,ResultMetaSchema:pn,ResultSchema:Ii,PaginatedResultSchema:va,CallToolResultSchema:fn,ListToolsResultSchema:Ri,ListPromptsResultSchema:ki,GetPromptResultSchema:Ti,ListResourcesResultSchema:Ei,ListResourceTemplatesResultSchema:Pi,ReadResourceResultSchema:xi,CompleteResultSchema:ji,CacheableResultSchema:ya,DiscoverResultSchema:Ai,CreateMessageRequestParamsSchema:nr,CreateMessageRequestSchema:Oi,ListRootsRequestSchema:Ni,CreateMessageResultSchema:Ci,ListRootsResultSchema:Li,ElicitResultSchema:qi,ElicitRequestURLParamsSchema:Mi,ElicitRequestParamsSchema:Di,ElicitRequestSchema:Ui,InputRequestSchema:Fi,InputResponseSchema:Vi,InputRequestsSchema:Zi,InputResponsesSchema:Hi,InputRequiredResultSchema:qr,InputResponseRequestParamsSchema:_a,CallToolRequestSchema:Sa,ListToolsRequestSchema:$a,ListPromptsRequestSchema:wa,GetPromptRequestSchema:za,ListResourcesRequestSchema:Ia,ListResourceTemplatesRequestSchema:Ra,ReadResourceRequestSchema:ka,CompleteRequestSchema:Ta,DiscoverRequestSchema:Ea,SubscriptionFilterSchema:gn,SubscriptionsListenRequestSchema:Pa,SubscriptionsListenResultMetaSchema:xa,SubscriptionsListenResultSchema:ja,dispatchRequestSchemas:ir,dispatchResultSchemas:Aa,NotificationMetaSchema:Dr,SubscriptionsAcknowledgedNotificationSchema:vn,CancelledNotificationParamsSchema:yn,CancelledNotificationSchema:_n,notificationSchemas2026:Ju,JSONRPCResultResponseSchema:dt(Ii),CallToolResultResponseSchema:dt(ie([fn,qr])),ListToolsResultResponseSchema:dt(Ri),ListPromptsResultResponseSchema:dt(ki),GetPromptResultResponseSchema:dt(ie([Ti,qr])),ListResourcesResultResponseSchema:dt(Ei),ListResourceTemplatesResultResponseSchema:dt(Pi),ReadResourceResultResponseSchema:dt(ie([xi,qr])),CompleteResultResponseSchema:dt(ji),DiscoverResultResponseSchema:dt(Ai)}}var t0;function nn(){return t0??=e0()}var r0=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"];function n0(e){return r0.includes(e)}var li=Symbol("modelcontextprotocol.resultCacheHintFallback");function hu(e,t){if(t===void 0)return e;let n=e[li];if(n===void 0)return{...e,[li]:t};let i={},r=n.ttlMs??t.ttlMs;r!==void 0&&(i.ttlMs=r);let o=n.cacheScope??t.cacheScope;return o!==void 0&&(i.cacheScope=o),{...e,[li]:i}}function i0(e){return e[li]}function xg(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0}function jg(e){return e==="public"||e==="private"}function Ag(e,t){if(e.ttlMs!==void 0&&!xg(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&&!jg(e.cacheScope))throw new RangeError(`Invalid cache hint for ${t}: cacheScope must be 'public' or 'private' (got ${String(e.cacheScope)})`)}var X=(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 Hb extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ProtocolError"})}static[Symbol.hasInstance](t){return ui(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 ui(this,t)}constructor(t,n,i){super(n),this.code=t,this.data=i,this.name="ProtocolError",Rg(this,new.target)}static fromError(t,n,i){if(t===X.UrlElicitationRequired&&i){let r=i;if(r.elicitations)return new Jb(r.elicitations,n)}if(t===X.UnsupportedProtocolVersion&&i){let r=i;if(Array.isArray(r.supported)&&typeof r.requested=="string")return new pi({supported:r.supported,requested:r.requested},n)}if(t===X.InvalidParams||t===X.ResourceNotFound){let r=i;if(typeof r?.uri=="string"&&(t===X.ResourceNotFound||Object.keys(r).length===1))return new fu(r.uri,n)}if(t===X.MissingRequiredClientCapability&&i){let r=i;if(r.requiredCapabilities!==null&&typeof r.requiredCapabilities=="object"&&!Array.isArray(r.requiredCapabilities))return new gu({requiredCapabilities:r.requiredCapabilities},n)}return new Hb(t,n,i)}},fu=class extends de{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ResourceNotFoundError"})}constructor(e,t=`Resource not found: ${e}`){super(X.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},Jb=class extends de{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UrlElicitationRequiredError"})}constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(X.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},pi=class extends de{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnsupportedProtocolVersionError"})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(X.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},gu=class extends de{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.MissingRequiredClientCapabilityError"})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(", ")}`){super(X.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},o0=0,a0="private",s0=["tools/call","prompts/get","resources/read"];function c0(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:"complete"};if(n==="complete"||s0.includes(e))return t;throw new de(X.InternalError,`Handler for ${e} returned resultType '${String(n)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function l0(e,t){let n=i0(t);if(t.resultType!=="complete"||!n0(e))return n===void 0?t:h0(t);let i=t,r=xg(i.ttlMs)?i.ttlMs:m0(n),o=jg(i.cacheScope)?i.cacheScope:p0(n),a={...i,ttlMs:r,cacheScope:o};return delete a[li],a}function u0(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function d0(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[Mt]:t}}:!u0(n)||n[Mt]!==void 0?e:{...e,_meta:{...n,[Mt]:t}}}function m0(e){return e!==void 0&&xg(e.ttlMs)?e.ttlMs:o0}function p0(e){return e!==void 0&&jg(e.cacheScope)?e.cacheScope:a0}function h0(e){let t={...e};return delete t[li],t}var f0=["elicitation/create","sampling/createMessage","roots/list"],cu;function Gb(){if(cu)return cu;let e=nn();return cu={request:{"elicitation/create":T({method:N("elicitation/create"),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":T({method:N("sampling/createMessage"),params:e.CreateMessageRequestParamsSchema}),"roots/list":T({method:N("roots/list"),params:ue({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},cu}function Bb(e){return f0.includes(e)}function _g(e){return Bb(e)?Gb().request[e]:void 0}function g0(e){return Bb(e)?Gb().response[e]:void 0}var Og={"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 Wb(e){return Object.prototype.hasOwnProperty.call(Og,e)}function Yb(e){return Object.prototype.hasOwnProperty.call(Kb,e)}function v0(e){return Object.prototype.hasOwnProperty.call(Og,e)}function y0(e){return Wb(e)?nn().dispatchRequestSchemas[e]:void 0}function _0(e){return v0(e)?nn().dispatchResultSchemas[e]:void 0}function b0(e){return Yb(e)?nn().notificationSchemas2026[e]:void 0}var _A=Object.keys(Og),bA=Object.keys(Kb);function na(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function ta(e,t){if(e===void 0)return{ok:!1,reason:"not-in-era"};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:"invalid",message:String(n.error)}}var S0={ok:!1,reason:"not-in-era"},$0=[Kt,Wt];function w0(e,t){let n=t,i=!1,r=()=>(i||(n={...n},i=!0),n),o=t.tools;e==="tools/list"&&Array.isArray(o)&&o.some(s=>na(s)&&"execution"in s)&&(r().tools=o.map(s=>{if(!na(s)||!("execution"in s))return s;let l={...s};return delete l.execution,l}));let a=t.capabilities;if(na(a)&&"tasks"in a){let s={...a};delete s.tasks,r().capabilities=s}return n}var Ng={era:"2026-07-28",hasRequestMethod:Wb,hasNotificationMethod:Yb,hasInputRequestMethod:e=>_g(e)!==void 0,validateRequest:(e,t)=>ta(y0(e),t),validateResult:(e,t)=>ta(_0(e),t),validateNotification:(e,t)=>ta(b0(e),t),validateInputRequest:(e,t)=>ta(_g(e),t),validateInputResponse:(e,t)=>ta(g0(e),t),samplingResultVariant:()=>S0,outboundEnvelope(e){return{[Kt]:e.protocolVersion,[Yn]:e.clientInfo,[Wt]:e.clientCapabilities,...e.logLevel!==void 0&&{[yr]:e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let i of $0)i in e||t.push({key:i,problem:"missing"});let n=nn().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let i of n.error.issues){let r=i.path.map(String),o=r.length>0?r.join("."):"_meta";r.length===1&&t.some(a=>a.key===o&&a.problem==="missing")||t.push({key:o,problem:i.message})}return t},projectCallToolResult:e=>Lb(e),inputRequestSchema:_g,decodeResult(e,t){if(!na(t))return{kind:"invalid",error:new ve(ze.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:"invalid",error:new ve(ze.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 ve(ze.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n==="input_required"){let a=t.inputRequests,s=na(a)?a:{},l=t.requestState;return Object.keys(s).length===0&&typeof l!="string"?{kind:"invalid",error:new ve(ze.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:s,...typeof l=="string"&&{requestState:l}}}if(n!=="complete")return{kind:"invalid",error:new ve(ze.UnsupportedResultType,`Unsupported result type '${n}' for ${e}`,{resultType:n,method:e})};let i=z0(),r=Object.hasOwn(i,e)?i[e]:void 0;if(r!==void 0){let a=r.safeParse(t);if(!a.success)return{kind:"invalid",error:new ve(ze.InvalidResult,`Invalid result for ${e}: ${a.error}`,{method:e})}}let o={...t};return delete o.resultType,{kind:"complete",result:o}},encodeResult(e,t,n){return d0(l0(e,c0(e,w0(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=nn().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("; ")}`}},lu;function z0(){if(lu)return lu;let e=nn();return lu={"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},lu}var sa="2026-07-28";function Rr(e){return e!==void 0&&mi(e)?Ng:Pg}function Ib(e){return e.revision!==void 0?Rr(e.revision).era:e.era==="modern"?Ng.era:Pg.era}function bg(e){return Xb.some(t=>t.hasRequestMethod(e))}function Sg(e){return Xb.some(t=>t.hasNotificationMethod(e))}var Xb=[Pg,Ng];function Rb(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function on(e){if(!Rb(e))return;let t=e._meta;return Rb(t)?t:void 0}function vu(e){let t=on(e);return t!==void 0&&Kt in t}function yu(e){let t=on(e)?.[Kt];return typeof t=="string"?t:void 0}function _u(e){return Rr(sa).validateEnvelopeMeta(e)}var I0=yv({AnnotationsSchema:()=>Yt,AudioContentSchema:()=>ii,BaseMetadataSchema:()=>Bt,BaseRequestParamsSchema:()=>Ye,BlobResourceContentsSchema:()=>Vo,BooleanSchemaSchema:()=>Bo,CallToolRequestParamsSchema:()=>_l,CallToolRequestSchema:()=>bl,CallToolResultSchema:()=>Go,CancelTaskRequestSchema:()=>ng,CancelTaskResultSchema:()=>ig,CancelledNotificationParamsSchema:()=>$c,CancelledNotificationSchema:()=>Lo,ClientCapabilitiesSchema:()=>Rc,ClientNotificationSchema:()=>ag,ClientRequestSchema:()=>og,ClientResultSchema:()=>sg,ClientTasksCapabilitySchema:()=>zc,CompatibilityCallToolResultSchema:()=>Jf,CompleteRequestParamsSchema:()=>Gl,CompleteRequestSchema:()=>Bl,CompleteResultSchema:()=>Kl,ContentBlockSchema:()=>oi,CreateMessageRequestParamsSchema:()=>jl,CreateMessageRequestSchema:()=>Al,CreateMessageResultSchema:()=>Ol,CreateMessageResultWithToolsSchema:()=>Nl,CreateTaskResultSchema:()=>Kf,CursorSchema:()=>Po,DiscoverRequestSchema:()=>xc,DiscoverResultSchema:()=>jc,ElicitRequestFormParamsSchema:()=>ci,ElicitRequestParamsSchema:()=>Dl,ElicitRequestSchema:()=>Ul,ElicitRequestURLParamsSchema:()=>Ml,ElicitResultSchema:()=>Zl,ElicitationCompleteNotificationParamsSchema:()=>Fl,ElicitationCompleteNotificationSchema:()=>Vl,EmbeddedResourceSchema:()=>ul,EmptyResultSchema:()=>Co,EnumSchemaSchema:()=>ql,GetPromptRequestParamsSchema:()=>sl,GetPromptRequestSchema:()=>cl,GetPromptResultSchema:()=>pl,GetTaskPayloadRequestSchema:()=>Qf,GetTaskPayloadResultSchema:()=>eg,GetTaskRequestSchema:()=>Yf,GetTaskResultSchema:()=>Xf,IconSchema:()=>wc,IconsSchema:()=>br,ImageContentSchema:()=>ni,ImplementationSchema:()=>ei,InitializeRequestParamsSchema:()=>kc,InitializeRequestSchema:()=>Tc,InitializeResultSchema:()=>Ec,InitializedNotificationSchema:()=>Pc,JSONArraySchema:()=>Vf,JSONObjectSchema:()=>De,JSONRPCErrorResponseSchema:()=>Qn,JSONRPCMessageSchema:()=>No,JSONRPCNotificationSchema:()=>Oo,JSONRPCRequestSchema:()=>Ao,JSONRPCResponseSchema:()=>Zf,JSONRPCResultResponseSchema:()=>Xn,JSONValueSchema:()=>vr,LegacyTitledEnumSchemaSchema:()=>Yo,ListChangedOptionsBaseSchema:()=>Gf,ListPromptsRequestSchema:()=>ol,ListPromptsResultSchema:()=>al,ListResourceTemplatesRequestSchema:()=>Mc,ListResourceTemplatesResultSchema:()=>Dc,ListResourcesRequestSchema:()=>Lc,ListResourcesResultSchema:()=>qc,ListRootsRequestSchema:()=>Yl,ListRootsResultSchema:()=>Xl,ListTasksRequestSchema:()=>tg,ListTasksResultSchema:()=>rg,ListToolsRequestSchema:()=>vl,ListToolsResultSchema:()=>yl,LoggingLevelSchema:()=>zr,LoggingMessageNotificationParamsSchema:()=>zl,LoggingMessageNotificationSchema:()=>Il,ModelHintSchema:()=>Rl,ModelPreferencesSchema:()=>kl,MultiSelectEnumSchemaSchema:()=>Ll,NotificationSchema:()=>it,NotificationsParamsSchema:()=>nt,NumberSchemaSchema:()=>si,PaginatedRequestParamsSchema:()=>Nc,PaginatedRequestSchema:()=>Sr,PaginatedResultSchema:()=>$r,PingRequestSchema:()=>Mo,PrimitiveSchemaDefinitionSchema:()=>ea,ProgressNotificationParamsSchema:()=>Oc,ProgressNotificationSchema:()=>Do,ProgressSchema:()=>Ac,ProgressTokenSchema:()=>Eo,PromptArgumentSchema:()=>nl,PromptListChangedNotificationSchema:()=>hl,PromptMessageSchema:()=>ml,PromptReferenceSchema:()=>Jl,PromptSchema:()=>il,ReadResourceRequestParamsSchema:()=>Uc,ReadResourceRequestSchema:()=>Fc,ReadResourceResultSchema:()=>Vc,RelatedTaskMetadataSchema:()=>Sc,RequestIdSchema:()=>_r,RequestMetaSchema:()=>xo,RequestSchema:()=>Ue,ResourceContentsSchema:()=>Uo,ResourceLinkSchema:()=>dl,ResourceListChangedNotificationSchema:()=>Zc,ResourceRequestParamsSchema:()=>ti,ResourceSchema:()=>Zo,ResourceTemplateReferenceSchema:()=>Hl,ResourceTemplateSchema:()=>Cc,ResourceUpdatedNotificationParamsSchema:()=>tl,ResourceUpdatedNotificationSchema:()=>rl,ResultMetaObjectSchema:()=>jo,ResultSchema:()=>Fe,RoleSchema:()=>wr,RootSchema:()=>Wl,RootsListChangedNotificationSchema:()=>Ql,SamplingContentSchema:()=>Pl,SamplingMessageContentBlockSchema:()=>Yr,SamplingMessageSchema:()=>xl,ServerCapabilitiesSchema:()=>qo,ServerNotificationSchema:()=>lg,ServerRequestSchema:()=>cg,ServerResultSchema:()=>ug,ServerTasksCapabilitySchema:()=>Ic,SetLevelRequestParamsSchema:()=>$l,SetLevelRequestSchema:()=>wl,SingleSelectEnumSchemaSchema:()=>Cl,StringSchemaSchema:()=>ai,SubscribeRequestParamsSchema:()=>Hc,SubscribeRequestSchema:()=>Jc,SubscriptionFilterSchema:()=>Ho,SubscriptionsAcknowledgedNotificationParamsSchema:()=>Yc,SubscriptionsAcknowledgedNotificationSchema:()=>Xc,SubscriptionsListenRequestParamsSchema:()=>Kc,SubscriptionsListenRequestSchema:()=>Wc,SubscriptionsListenResultMetaSchema:()=>Qc,SubscriptionsListenResultSchema:()=>el,TaskAugmentedRequestParamsSchema:()=>tn,TaskCreationParamsSchema:()=>Bf,TaskMetadataSchema:()=>bc,TaskSchema:()=>Ir,TaskStatusNotificationParamsSchema:()=>tu,TaskStatusNotificationSchema:()=>Wf,TaskStatusSchema:()=>eu,TextContentSchema:()=>ri,TextResourceContentsSchema:()=>Fo,TitledMultiSelectEnumSchemaSchema:()=>Qo,TitledSingleSelectEnumSchemaSchema:()=>Wo,ToolAnnotationsSchema:()=>fl,ToolChoiceSchema:()=>Tl,ToolExecutionSchema:()=>gl,ToolListChangedNotificationSchema:()=>Sl,ToolResultContentSchema:()=>El,ToolSchema:()=>Jo,ToolUseContentSchema:()=>ll,UnsubscribeRequestParamsSchema:()=>Gc,UnsubscribeRequestSchema:()=>Bc,UntitledMultiSelectEnumSchemaSchema:()=>Xo,UntitledSingleSelectEnumSchemaSchema:()=>Ko});var wt=e=>Ao.safeParse(e).success,Tr=e=>Oo.safeParse(e).success,oa=e=>Xn.safeParse(e).success,bu=e=>Qn.safeParse(e).success;var Xt=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)&&e.resultType==="input_required";function Cg(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function Lg(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var kb="x-mcp-header",R0=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,k0=new Set(["string","integer","boolean","number"]);function qg(e){let t=[],n=new Map,i=(o,a,s)=>{if(o===null||typeof o!="object")return;let l=o;if(kb in l){if(!s||a.length===0)return`${uu(a)}: 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 d=l[kb];if(typeof d!="string"||d.length===0)return`${uu(a)}: x-mcp-header MUST be a non-empty string`;if(!R0.test(d))return`${uu(a)}: x-mcp-header '${d}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let p=typeof l.type=="string"?l.type:void 0;if(p===void 0||!k0.has(p))return`${uu(a)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${p??"<none>"}`;let f=d.toLowerCase(),b=n.get(f);if(b!==void 0)return`x-mcp-header '${d}' is not case-insensitively unique (also declared as '${b}')`;n.set(f,d),t.push({path:a,headerName:d,type:p})}let u=l.properties;if(u!==null&&typeof u=="object")for(let[d,p]of Object.entries(u)){let f=i(p,[...a,d],s);if(f!==void 0)return f}for(let d of T0){let p=l[d];if(p===void 0)continue;let f=Array.isArray(p)?p:p!==null&&typeof p=="object"&&E0.has(d)?Object.values(p):[p];for(let b of f){let v=i(b,[...a,`<${d}>`],!1);if(v!==void 0)return v}}},r=i(e,[],!0);return r===void 0?{valid:!0,declarations:t}:{valid:!1,reason:r}}var T0=["items","prefixItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","patternProperties","dependentSchemas","oneOf","anyOf","allOf","not","if","then","else","$defs","definitions"],E0=new Set(["patternProperties","dependentSchemas","$defs","definitions"]);function uu(e){return e.length===0?"<root>":e.join(".")}var mu=-32020,SA=[{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:[X.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:[mu,X.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:[X.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:[X.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:[X.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:[mu],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:[X.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:[mu],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."}],P0={[X.ParseError]:400,[X.InvalidRequest]:400,[X.MethodNotFound]:404,[X.UnsupportedProtocolVersion]:400,[X.MissingRequiredClientCapability]:400,[mu]:400};function du(e,t,n,i,r){return{kind:"reject",rung:e,cell:t,httpStatus:n,code:i.code,message:i.message,...i.data!==void 0&&{data:i.data},settled:r}}function Mg(e){if(!vu(e))return!1;let t=yu(e);if(t===void 0||!mi(t))return!1;let n=on(e);return n!==void 0&&_u(n).length===0}function Dg(e,t){switch(e.reason){case"http-method":return du("http-method","modern-only-method-not-allowed",405,new de(-32e3,"Method not allowed."),!0);case"batch":return du("jsonrpc-shape","modern-only-batch-not-supported",400,new de(X.InvalidRequest,"Bad Request: JSON-RPC batches are not supported by this endpoint"),!0);case"response":return du("jsonrpc-shape","modern-only-response-post",400,new de(X.InvalidRequest,"Bad Request: JSON-RPC responses cannot be posted to this endpoint"),!0);case"notification":return;case"initialize":case"no-claim":{let n=e.requestedVersion;return du("era-classification","modern-only-missing-envelope",400,n===void 0?new de(X.UnsupportedProtocolVersion,"Unsupported protocol version: the request did not name a protocol version",{supported:[...t]}):new pi({supported:[...t],requested:n}),!0)}}}function Su(e,t){return vo(e,t)}function ra(e){return new Set(e.flatMap(t=>Object.keys(t.shape)))}function di(e){if(e==null)return!1;let t=typeof e;return t!=="object"&&t!=="function"||!("~standard"in e)?!1:typeof e["~standard"]?.validate=="function"}var Tb=!1,zg="draft-2020-12";function Er(e,t="input"){let n=e["~standard"],i;if(n.jsonSchema)i=n.jsonSchema[t]({target:zg});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=!0,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.")),i=Kr(e,{target:zg,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 i.type!==void 0?i:Qb(i)?{type:"object",...i}:i;if(i.type!==void 0&&i.type!=="object")throw new Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(i.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:"object",...i}}function Qb(e){if("properties"in e||"patternProperties"in e||"additionalProperties"in e||"required"in e)return!0;for(let t of["oneOf","anyOf","allOf"]){let n=e[t];if(Array.isArray(n)&&n.length>0)return n.every(i=>i!==null&&typeof i=="object"&&(i.type==="object"||Qb(i)))}return!1}function x0(e){return e.path?.length?`${e.path.map(t=>String(typeof t=="object"?t.key:t)).join(".")}: ${e.message}`:e.message}async function rn(e,t){let n=await e["~standard"].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(i=>x0(i)).join(", ")}:{success:!0,data:n.value}}function j0(e){let t=Kr(e,{target:zg,io:"input"});return typeof t.pattern=="string"?t.pattern:void 0}var A0=/\\\.\\d\{(\d+)\}/;function O0(e){let t=A0.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[!1,!0].flatMap(i=>[!1,!0].flatMap(r=>n.map(o=>_t.datetime({local:i,offset:r,precision:o}))))}function N0(e,t){let n;switch(e){case"email":n=[Ws()];break;case"uri":n=[Jn()];break;case"date":n=[_t.date()];break;case"date-time":n=O0(t);break}return new Set(n.map(i=>j0(i)).filter(i=>i!==void 0))}function C0(e,t,n){return n!=="zod"?!0:N0(e,t).has(t)}function eS(e){let t=Er(e,"input"),n=t.properties||{},i=t.required||[];return Object.entries(n).map(([r,o])=>({name:r,description:o?.description,required:i.includes(r)}))}function aa(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function L0(e){try{return Er(e,"input")}catch(t){let n=t instanceof Error?t.message:String(t);throw new de(X.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${n}`)}}var q0=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);function Ug(e){return q0.has(e)||e.startsWith("x-")}var M0=new Set(["$schema",...Object.keys(ci.shape.requestedSchema.shape)]),Eb={string:ra([ai,Ko,Wo,Yo]),number:ra([si]),integer:ra([si]),boolean:ra([Bo]),array:ra([Xo,Qo])},D0=new Set(ai.shape.format.unwrap().options);function U0(e,t,n,i){if(!aa(e))return e;let r=typeof e.type=="string"&&Object.hasOwn(Eb,e.type)?Eb[e.type]:void 0;if(r===void 0)return e;let o={};for(let[a,s]of Object.entries(e))r.has(a)||Ug(a)?o[a]=s:a==="pattern"&&e.type==="string"&&typeof e.format=="string"?D0.has(e.format)?(typeof s!="string"||!C0(e.format,s,n))&&i.push(`${t}.${a}`):o[a]=s:i.push(`${t}.${a}`);return o}function F0(e,t){let n={},i=[];for(let[r,o]of Object.entries(e))r==="properties"&&aa(o)?n[r]=Object.fromEntries(Object.entries(o).map(([a,s])=>[a,U0(s,`properties.${a}`,t,i)])):M0.has(r)?n[r]=o:Ug(r)||i.push(r);if(i.length>0)throw new de(X.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(", ")}`);return n}function V0(e,t){if(!aa(e.properties))return t;let n=Object.entries(e.properties).filter(([,i])=>!Su(ea,i).success).map(([i])=>`properties.${i}`);return n.length>0?n.join(", "):t}function Ig(e,t,n=""){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((i,r)=>Ig(i,t[r],`${n}[${r}]`)):!aa(e)||!aa(t)?[]:Object.entries(e).flatMap(([i,r])=>{let o=n?`${n}.${i}`:i;return Object.prototype.hasOwnProperty.call(t,i)?Ig(r,t[i],o):Ug(i)?[]:[o]})}function Z0(e){if(!di(e.requestedSchema))return{...e,mode:"form",requestedSchema:e.requestedSchema};let t=e.requestedSchema["~standard"].vendor,n=F0(L0(e.requestedSchema),t),i=Su(ci.shape.requestedSchema,n);if(!i.success)throw new de(X.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${V0(n,i.error.message)}`);let r=Ig(n,i.data);if(r.length>0)throw new de(X.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(", ")}`);let o=(i.data.required??[]).filter(a=>!Object.prototype.hasOwnProperty.call(i.data.properties,a));if(o.length>0)throw new de(X.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${o.join(", ")}`);return{...e,mode:"form",requestedSchema:i.data}}function H0(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}}}var J0=Object.assign(H0,{elicit(e){try{return{method:"elicitation/create",params:Z0(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 tS=250;function rS(e,t){return`Multi-round-trip request '${e}' still required input after ${t} rounds (inputRequired.maxRounds)`}function nS(e,t){return new Promise((n,i)=>{if(t?.aborted){i(t.reason instanceof ve?t.reason:new ve(ze.RequestTimeout,String(t.reason)));return}let r=setTimeout(()=>{t?.removeEventListener("abort",o),n()},e),o=()=>{clearTimeout(r),i(t?.reason instanceof ve?t.reason:new ve(ze.RequestTimeout,String(t?.reason)))};t?.addEventListener("abort",o,{once:!0})})}function iS(e){let t=new AbortController,n=()=>t.abort(e?.reason);return e?.addEventListener("abort",n,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:i=>t.abort(i),dispose:()=>e?.removeEventListener("abort",n)}}var G0=["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"],B0={IdJagTokenExchangeResponseSchema:hg,OAuthClientInformationFullSchema:gg,OAuthClientInformationSchema:ou,OAuthClientMetadataSchema:iu,OAuthClientRegistrationErrorSchema:vg,OAuthErrorResponseSchema:fg,OAuthMetadataSchema:ru,OAuthProtectedResourceMetadataSchema:dg,OAuthTokenRevocationRequestSchema:yg,OAuthTokensSchema:pg,OpenIdProviderDiscoveryMetadataSchema:mg,OpenIdProviderMetadataSchema:nu},oS={},aS={};function sS(e,t){let n=e.slice(0,-6);oS[n]=t,aS[n]=i=>t.safeParse(i).success}for(let e of G0)sS(e,I0[e]);for(let[e,t]of Object.entries(B0))sS(e,t);var K0=Object.freeze(oS),W0=Object.freeze(aS);function Y0(e){switch(e){case"initialize":case"notifications/initialized":return Rr(void 0);case"server/discover":return Rr(sa);default:return}}var cS=6e4,X0=[Kt,Yn,Wt,yr],Q0=["inputResponses","requestState"];function Pb(e,t){let n=e.params;if(!ia(n))return{message:e,lifted:{}};let i=n._meta,r=ia(i)?X0.filter(l=>l in i):[],o=t==="request"?Q0.filter(l=>l in n):[];if(r.length===0&&o.length===0)return{message:e,lifted:{}};let a={},s={...n};if(r.length>0&&ia(i)){let l={},u={...i};for(let d of r)l[d]=i[d],delete u[d];a.envelope=l,Object.keys(u).length>0?s._meta=u:delete s._meta}for(let l of o)l==="inputResponses"&&(a.inputResponses=s[l]),l==="requestState"&&(a.requestState=s[l]),delete s[l];return{message:{...e,params:s},lifted:a}}function xb(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(i){let r=e.validateResult(t,i);return r.ok?{value:r.value}:{issues:[{message:r.reason==="invalid"?r.message:`not-in-era: ${t}`}]}}}}}function ca(e){return()=>e}var ek=ca(void 0);function Fg(e,t){return{...e,mcpReq:{...e.mcpReq,requestState:ca(t)}}}var lS;function Vg(e,t){lS(e,t)}var Zg=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{lS=(e,t)=>{e._negotiatedProtocolVersion=t}}_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??yc,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 ve(ze.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,i,r=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:r,onTimeout:i})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new ve(ze.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_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 i=this._transport?.onmessage;this._transport.onmessage=(r,o)=>{i?.(r,o),oa(r)||bu(r)?this._onresponse(r):wt(r)?this._onrequest(r,o):Tr(r)?this._onnotification(r,o):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 i of this._timeoutInfo.values())clearTimeout(i.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new ve(ze.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.()}finally{for(let i of e.values())i(n);for(let i of t.values())i.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=Pb(e,"notification"),i=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)==="drop")return;if(t?.classification!==void 0){let a=Ib(t.classification);if(a!==i.era){this._onerror(new Error(`Era mismatch on inbound notification '${n.method}': classified as ${a} but this instance serves ${i.era}`));return}}if(Sg(n.method)&&!i.hasNotificationMethod(n.method))return;let r=this._notificationHandlers.get(n.method),o=this.fallbackNotificationHandler;r===void 0&&o===void 0||Promise.resolve().then(()=>r===void 0?o(n):r(n,i)).catch(a=>this._onerror(new Error(`Uncaught error in notification handler: ${a}`)))}_onrequest(e,t){let{message:n,lifted:i}=Pb(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 o=this._transport,a=($,y,h)=>{let z={jsonrpc:"2.0",id:n.id,error:{code:$,message:y,...h!==void 0&&{data:h}}};o?.send(z).catch(g=>this._onerror(new Error(`Failed to send an error response: ${g}`)))};if(t?.classification!==void 0){let $=Ib(t.classification);if($!==r.era){this._onerror(new Error(`Era mismatch on inbound request '${n.method}': classified as ${$} but this instance serves ${r.era}`));let y=t.classification.revision??$;a(X.UnsupportedProtocolVersion,`Unsupported protocol version: ${y}`,{supported:this._supportedProtocolVersions,requested:y});return}}if(bg(n.method)&&!r.hasRequestMethod(n.method)){a(X.MethodNotFound,"Method not found");return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){a(X.MethodNotFound,"Method not found");return}let l=r.checkInboundEnvelope(i);if(l!==void 0){a(X.InvalidParams,l);return}let u=($,y)=>this._notificationViaCodec(this._resolveOutboundCodec($.method),$,{...y,relatedRequestId:n.id}),d=($,y,h)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec($.method),$,y,{...h,relatedRequestId:n.id}),p=new AbortController;this._requestHandlerAbortControllers.set(n.id,p);let f=i.inputResponses===void 0?void 0:tk(i.inputResponses),b={sessionId:o?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...i.envelope!==void 0&&{envelope:i.envelope},...f!==void 0&&{inputResponses:f.accepted},...f!==void 0&&f.droppedKeys.length>0&&{droppedInputResponseKeys:f.droppedKeys},requestState:i.requestState===void 0?ek:ca(i.requestState),signal:p.signal,send:(($,y,h)=>{let z=this._resolveOutboundCodec($.method);if(this._assertOutboundRequestInEra(z,$.method),di(y))return d($,y,h);let g=xb(z,$.method);if(g===void 0)throw new TypeError(`'${$.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return d($,g,y)}),notify:u},http:t?.authInfo?{authInfo:t.authInfo}:void 0},v=this.buildContext(b,t);Promise.resolve().then(()=>s(n,v)).then(async $=>{if(p.signal.aborted)return;let y;try{y=r.encodeResult(n.method,$,this._outboundServerInfo())}catch(z){this._onerror(new Error(`Failed to encode result for ${n.method}: ${z}`)),a(X.InternalError,"Internal error");return}let h={result:y,jsonrpc:"2.0",id:n.id};await o?.send(h)},async $=>{if(p.signal.aborted)return;let y=Number.isSafeInteger($.code)?$.code:X.InternalError,h={jsonrpc:"2.0",id:n.id,error:{code:r.encodeErrorCode(y),message:$.message??"Internal error",...$.data!==void 0&&{data:$.data}}};await o?.send(h)}).catch($=>this._onerror(new Error(`Failed to send response: ${$}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===p&&this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,i=Number(t),r=this._progressHandlers.get(i);if(!r){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let o=this._responseHandlers.get(i),a=this._timeoutInfo.get(i);if(a&&o&&a.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(s){this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),o(s);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),oa(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 i=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(i,e.method),di(t))return this._requestWithSchemaViaCodec(i,e,t,n);let r=xb(i,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(i,e,r,t)}_negotiatedWireCodec(){return Rr(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=Y0(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(bg(t)&&!e.hasRequestMethod(t))throw new ve(ze.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 i=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(i,e.method),this._requestWithSchemaViaCodec(i,e,t,n)}_requestWithSchemaViaCodec(e,t,n,i){let{relatedRequestId:r,resumptionToken:o,onresumptiontoken:a,headers:s}=i??{},l=Date.now(),u,d;return new Promise((p,f)=>{let b=w=>{f(w)};if(!this._transport){b(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(w){b(w);return}if(i?.signal?.aborted){let w=i.signal.reason;throw w instanceof ve?w:new ve(ze.RequestTimeout,String(w))}let v=e.era===sa&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,$=this._requestMessageId++;d=$;let y={...t,jsonrpc:"2.0",id:$};i?.onprogress&&(this._progressHandlers.set($,i.onprogress),y.params={...t.params,_meta:{...t.params?._meta,progressToken:$}});let h=this._envelopeOutbound(y),z=!1,g=w=>{z||(this._progressHandlers.delete($),v===void 0?this._transport?.send(this._envelopeOutbound({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:$,reason:String(w)}}),{relatedRequestId:r,resumptionToken:o,onresumptiontoken:a}).catch(_=>this._onerror(new Error(`Failed to send cancellation: ${_}`))):v.abort(),f(w instanceof ve?w:new ve(ze.RequestTimeout,String(w))))};this._responseHandlers.set($,w=>{if(i?.signal?.aborted)return;if(z=!0,w instanceof Error)return f(w);let _;try{_=e.decodeResult(t.method,w.result)}catch(j){return f(j instanceof Error?j:new Error(String(j)))}if(_.kind==="invalid")return f(_.error);if(_.kind==="input_required"){if(i?.allowInputRequired===!0)return p(rk(_));let j={codec:e,request:t,resultSchema:n,options:i,flowStartedAt:l,retry:(U,C)=>this._requestWithSchemaViaCodec(e,U===void 0?{method:t.method}:{method:t.method,params:U},n,C)};return p(this._resolveNonCompleteResult(_,j))}let I=_.result;rn(n,I).then(j=>{j.success?p(j.data):f(new ve(ze.InvalidResult,`Invalid result for ${t.method}: ${j.error}`))},f)}),u=()=>g(i?.signal?.reason),i?.signal?.addEventListener("abort",u,{once:!0});let S=i?.timeout??cS,k=()=>g(new ve(ze.RequestTimeout,"Request timed out",{timeout:S}));this._setupTimeout($,S,i?.maxTotalTimeout,k,i?.resetTimeoutOnProgress??!1),this._transport.send(h,{relatedRequestId:r,resumptionToken:o,onresumptiontoken:a,headers:s,requestSignal:v?.signal}).catch(w=>{this._progressHandlers.delete($),f(w)})}).finally(()=>{u&&i?.signal?.removeEventListener("abort",u),d!==void 0&&(this._responseHandlers.delete(d),this._cleanupTimeout(d))})}async notification(e,t){return this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new ve(ze.NotConnected,"Not connected");if(Sg(t.method)&&!e.hasNotificationMethod(t.method))throw new ve(ze.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 i=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(i,n).catch(r=>this._onerror(r))});return}await this._transport.send(i,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let i;if(typeof t=="function"){if(!bg(e))throw new TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);i=(r,o)=>{let a=this._negotiatedWireCodec(),s=a.validateRequest(e,r);if(!s.ok&&s.reason==="not-in-era"&&(s=a.validateInputRequest(e,r)),!s.ok)throw s.reason==="not-in-era"?new de(X.InternalError,`No wire schema for ${e} in the resolved era`):new Error(s.message);return Promise.resolve(t(s.value,o))}}else if(n)i=async(r,o)=>{let a=await rn(t.params,{...r.params});if(!a.success)throw new de(X.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,o)};else throw new TypeError("setRequestHandler: handler is required");this._requestHandlers.set(e,this._wrapHandler(e,i))}_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(!Sg(e))throw new TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(i,r)=>{let o=r.validateNotification(e,i);if(!o.ok)throw o.reason==="not-in-era"?new de(X.InternalError,`No wire schema for ${e} in the resolved era`):new Error(o.message);return Promise.resolve(t(o.value))});return}if(!n)throw new TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set(e,async i=>{let r=await rn(t.params,{...i.params});if(!r.success)throw new de(X.InvalidParams,`Invalid params for notification ${e}: ${r.error}`);await n(r.data,i)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function ia(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function Hg(e,t){let n={...e};for(let i in t){let r=i,o=t[r];if(o===void 0)continue;let a=n[r];n[r]=ia(a)&&ia(o)?{...a,...o}:o}return n}function jb(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function tk(e){let t={},n=[];if(!jb(e))return{accepted:t,droppedKeys:n};for(let[i,r]of Object.entries(e)){if(!jb(r)||"method"in r||"result"in r){n.push(i);continue}t[i]=r}return{accepted:t,droppedKeys:n}}function rk(e){return{resultType:"input_required",inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState}}}var nk=Z((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,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=r;function r(s){if(!s)throw new TypeError("argument string is required");var l=typeof s=="object"?o(s):s;if(typeof l!="string")throw new TypeError("argument string is required to be a string");var u=l.indexOf(";"),d=u!==-1?l.slice(0,u).trim():l.trim();if(!i.test(d))throw new TypeError("invalid media type");var p=new a(d.toLowerCase());if(u!==-1){var f,b,v;for(t.lastIndex=u;b=t.exec(l);){if(b.index!==u)throw new TypeError("invalid parameter format");u+=b[0].length,f=b[1].toLowerCase(),v=b[2],v.charCodeAt(0)===34&&(v=v.slice(1,-1),v.indexOf("\\")!==-1&&(v=v.replace(n,"$1"))),p.parameters[f]=v}if(u!==l.length)throw new TypeError("invalid parameter format")}return p}function o(s){var l;if(typeof s.getHeader=="function"?l=s.getHeader("content-type"):typeof s.headers=="object"&&(l=s.headers&&s.headers["content-type"]),typeof l!="string")throw new TypeError("content-type header is missing from object");return l}function a(s){this.parameters=Object.create(null),this.type=s}})),$A=Na(nk(),1);var uS=10*1024*1024,Jg=class{_buffer;_maxBufferSize;constructor(e){this._maxBufferSize=e?.maxBufferSize??uS}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
|
|
68
|
-
`}var ik=/^[A-Za-z0-9._-]{1,128}$/;function ok(e){let t=[];if(e.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(e.length>128)return{isValid:!1,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"),!ik.test(e)){let n=[...e].filter(i=>!/[A-Za-z0-9._-]/.test(i)).filter((i,r,o)=>o.indexOf(i)===r);return t.push(`Tool name contains invalid characters: ${n.map(i=>`"${i}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}function ak(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 Bg(e){let t=ok(e);return ak(e,t.warnings),t.isValid}function sk(e){return typeof e=="object"&&e!==null&&"_zod"in e}function ck(e){return typeof e=="object"&&e!==null&&!("_zod"in e)&&"_def"in e&&typeof e._def?.typeName=="string"}function lk(e){if(typeof e!="object"||e===null||di(e))return!1;let t=Object.getPrototypeOf(e);return t!==Object.prototype&&t!==null?!1:Object.values(e).every(n=>sk(n))}function $u(e){if(e!==void 0){if(lk(e))return T(e);if(typeof e=="object"&&e!==null&&!di(e)&&Object.values(e).some(t=>ck(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(!di(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 zu=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),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(h){if(super(),!e.IDENTIFIER.test(h))throw new Error("CodeGen: name must be a valid identifier");this.str=h}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var i=class extends t{constructor(h){super(),this._items=typeof h=="string"?[h]:h}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let h=this._items[0];return h===""||h==='""'}get str(){var h;return(h=this._str)!==null&&h!==void 0?h:this._str=this._items.reduce((z,g)=>`${z}${g}`,"")}get names(){var h;return(h=this._names)!==null&&h!==void 0?h:this._names=this._items.reduce((z,g)=>(g instanceof n&&(z[g.str]=(z[g.str]||0)+1),z),{})}};e._Code=i,e.nil=new i("");function r(h,...z){let g=[h[0]],S=0;for(;S<z.length;)s(g,z[S]),g.push(h[++S]);return new i(g)}e._=r;let o=new i("+");function a(h,...z){let g=[b(h[0])],S=0;for(;S<z.length;)g.push(o),s(g,z[S]),g.push(o,b(h[++S]));return l(g),new i(g)}e.str=a;function s(h,z){z instanceof i?h.push(...z._items):z instanceof n?h.push(z):h.push(p(z))}e.addCodeArg=s;function l(h){let z=1;for(;z<h.length-1;){if(h[z]===o){let g=u(h[z-1],h[z+1]);if(g!==void 0){h.splice(z-1,3,g);continue}h[z++]="+"}z++}}function u(h,z){if(z==='""')return h;if(h==='""')return z;if(typeof h=="string")return z instanceof n||h[h.length-1]!=='"'?void 0:typeof z!="string"?`${h.slice(0,-1)}${z}"`:z[0]==='"'?h.slice(0,-1)+z.slice(1):void 0;if(typeof z=="string"&&z[0]==='"'&&!(h instanceof n))return`"${h}${z.slice(1)}`}function d(h,z){return z.emptyStr()?h:h.emptyStr()?z:a`${h}${z}`}e.strConcat=d;function p(h){return typeof h=="number"||typeof h=="boolean"||h===null?h:b(Array.isArray(h)?h.join(","):h)}function f(h){return new i(b(h))}e.stringify=f;function b(h){return JSON.stringify(h).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=b;function v(h){return typeof h=="string"&&e.IDENTIFIER.test(h)?new i(`.${h}`):r`[${h}]`}e.getProperty=v;function $(h){if(typeof h=="string"&&e.IDENTIFIER.test(h))return new i(`${h}`);throw new Error(`CodeGen: invalid export name: ${h}, use explicit $id name mapping`)}e.getEsmExportName=$;function y(h){return new i(h.toString())}e.regexpCode=y})),mS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;let t=zu();var n=class extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}},i;(function(l){l[l.Started=0]="Started",l[l.Completed=1]="Completed"})(i||(e.UsedValueState=i={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};var r=class{constructor({prefixes:l,parent:u}={}){this._names={},this._prefixes=l,this._parent=u}toName(l){return l instanceof t.Name?l:this.name(l)}name(l){return new t.Name(this._newName(l))}_newName(l){let u=this._names[l]||this._nameGroup(l);return`${l}${u.index++}`}_nameGroup(l){var u,d;if(!((d=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||d===void 0)&&d.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}};e.Scope=r;var o=class extends t.Name{constructor(l,u){super(u),this.prefix=l}setValue(l,{property:u,itemIndex:d}){this.value=l,this.scopePath=(0,t._)`.${new t.Name(u)}[${d}]`}};e.ValueScopeName=o;let a=(0,t._)`\n`;var s=class extends r{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?a:t.nil}}get(){return this._scope}name(l){return new o(l,this._newName(l))}value(l,u){var d;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let p=this.toName(l),{prefix:f}=p,b=(d=u.key)!==null&&d!==void 0?d:u.ref,v=this._values[f];if(v){let h=v.get(b);if(h)return h}else v=this._values[f]=new Map;v.set(b,p);let $=this._scope[f]||(this._scope[f]=[]),y=$.length;return $[y]=u.ref,p.setValue(u,{property:f,itemIndex:y}),p}getValue(l,u){let d=this._values[l];if(d)return d.get(u)}scopeRefs(l,u=this._values){return this._reduceValues(u,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,t._)`${l}${d.scopePath}`})}scopeCode(l=this._values,u,d){return this._reduceValues(l,p=>{if(p.value===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return p.value.code},u,d)}_reduceValues(l,u,d={},p){let f=t.nil;for(let b in l){let v=l[b];if(!v)continue;let $=d[b]=d[b]||new Map;v.forEach(y=>{if($.has(y))return;$.set(y,i.Started);let h=u(y);if(h){let z=this.opts.es5?e.varKinds.var:e.varKinds.const;f=(0,t._)`${f}${z} ${y} = ${h};${this.opts._n}`}else if(h=p?.(y))f=(0,t._)`${f}${h}${this.opts._n}`;else throw new n(y);$.set(y,i.Completed)})}return f}};e.ValueScope=s})),ye=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),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=zu(),n=mS();var i=zu();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var r=mS();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return r.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return r.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return r.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,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 o=class{optimizeNodes(){return this}optimizeNames(R,P){return this}},a=class extends o{constructor(R,P,L){super(),this.varKind=R,this.name=P,this.rhs=L}render({es5:R,_n:P}){let L=R?n.varKinds.var:this.varKind,Y=this.rhs===void 0?"":` = ${this.rhs}`;return`${L} ${this.name}${Y};`+P}optimizeNames(R,P){if(R[this.name.str])return this.rhs&&(this.rhs=ne(this.rhs,R,P)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends o{constructor(R,P,L){super(),this.lhs=R,this.rhs=P,this.sideEffects=L}render({_n:R}){return`${this.lhs} = ${this.rhs};`+R}optimizeNames(R,P){if(!(this.lhs instanceof t.Name&&!R[this.lhs.str]&&!this.sideEffects))return this.rhs=ne(this.rhs,R,P),this}get names(){return ee(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},l=class extends s{constructor(R,P,L,Y){super(R,L,Y),this.op=P}render({_n:R}){return`${this.lhs} ${this.op}= ${this.rhs};`+R}},u=class extends o{constructor(R){super(),this.label=R,this.names={}}render({_n:R}){return`${this.label}:`+R}},d=class extends o{constructor(R){super(),this.label=R,this.names={}}render({_n:R}){return`break${this.label?` ${this.label}`:""};`+R}},p=class extends o{constructor(R){super(),this.error=R}render({_n:R}){return`throw ${this.error};`+R}get names(){return this.error.names}},f=class extends o{constructor(R){super(),this.code=R}render({_n:R}){return`${this.code};`+R}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(R,P){return this.code=ne(this.code,R,P),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},b=class extends o{constructor(R=[]){super(),this.nodes=R}render(R){return this.nodes.reduce((P,L)=>P+L.render(R),"")}optimizeNodes(){let{nodes:R}=this,P=R.length;for(;P--;){let L=R[P].optimizeNodes();Array.isArray(L)?R.splice(P,1,...L):L?R[P]=L:R.splice(P,1)}return R.length>0?this:void 0}optimizeNames(R,P){let{nodes:L}=this,Y=L.length;for(;Y--;){let le=L[Y];le.optimizeNames(R,P)||(we(R,le.names),L.splice(Y,1))}return L.length>0?this:void 0}get names(){return this.nodes.reduce((R,P)=>F(R,P.names),{})}},v=class extends b{render(R){return"{"+R._n+super.render(R)+"}"+R._n}},$=class extends b{},y=class extends v{};y.kind="else";var h=class wu extends v{constructor(P,L){super(L),this.condition=P}render(P){let L=`if(${this.condition})`+super.render(P);return this.else&&(L+="else "+this.else.render(P)),L}optimizeNodes(){super.optimizeNodes();let P=this.condition;if(P===!0)return this.nodes;let L=this.else;if(L){let Y=L.optimizeNodes();L=this.else=Array.isArray(Y)?new y(Y):Y}if(L)return P===!1?L instanceof wu?L:L.nodes:this.nodes.length?this:new wu(Ce(P),L instanceof wu?[L]:L.nodes);if(!(P===!1||!this.nodes.length))return this}optimizeNames(P,L){var Y;if(this.else=(Y=this.else)===null||Y===void 0?void 0:Y.optimizeNames(P,L),!!(super.optimizeNames(P,L)||this.else))return this.condition=ne(this.condition,P,L),this}get names(){let P=super.names;return ee(P,this.condition),this.else&&F(P,this.else.names),P}};h.kind="if";var z=class extends v{};z.kind="for";var g=class extends z{constructor(R){super(),this.iteration=R}render(R){return`for(${this.iteration})`+super.render(R)}optimizeNames(R,P){if(super.optimizeNames(R,P))return this.iteration=ne(this.iteration,R,P),this}get names(){return F(super.names,this.iteration.names)}},S=class extends z{constructor(R,P,L,Y){super(),this.varKind=R,this.name=P,this.from=L,this.to=Y}render(R){let P=R.es5?n.varKinds.var:this.varKind,{name:L,from:Y,to:le}=this;return`for(${P} ${L}=${Y}; ${L}<${le}; ${L}++)`+super.render(R)}get names(){return ee(ee(super.names,this.from),this.to)}},k=class extends z{constructor(R,P,L,Y){super(),this.loop=R,this.varKind=P,this.name=L,this.iterable=Y}render(R){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(R)}optimizeNames(R,P){if(super.optimizeNames(R,P))return this.iterable=ne(this.iterable,R,P),this}get names(){return F(super.names,this.iterable.names)}},w=class extends v{constructor(R,P,L){super(),this.name=R,this.args=P,this.async=L}render(R){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(R)}};w.kind="func";var _=class extends b{render(R){return"return "+super.render(R)}};_.kind="return";var I=class extends v{render(R){let P="try"+super.render(R);return this.catch&&(P+=this.catch.render(R)),this.finally&&(P+=this.finally.render(R)),P}optimizeNodes(){var R,P;return super.optimizeNodes(),(R=this.catch)===null||R===void 0||R.optimizeNodes(),(P=this.finally)===null||P===void 0||P.optimizeNodes(),this}optimizeNames(R,P){var L,Y;return super.optimizeNames(R,P),(L=this.catch)===null||L===void 0||L.optimizeNames(R,P),(Y=this.finally)===null||Y===void 0||Y.optimizeNames(R,P),this}get names(){let R=super.names;return this.catch&&F(R,this.catch.names),this.finally&&F(R,this.finally.names),R}},j=class extends v{constructor(R){super(),this.error=R}render(R){return`catch(${this.error})`+super.render(R)}};j.kind="catch";var U=class extends v{render(R){return"finally"+super.render(R)}};U.kind="finally";var C=class{constructor(R,P={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...P,_n:P.lines?`
|
|
69
|
-
`:""},this._extScope=R,this._scope=new n.Scope({parent:R}),this._nodes=[new $]}toString(){return this._root.render(this.opts)}name(R){return this._scope.name(R)}scopeName(R){return this._extScope.name(R)}scopeValue(R,P){let L=this._extScope.value(R,P);return(this._values[L.prefix]||(this._values[L.prefix]=new Set)).add(L),L}getScopeValue(R,P){return this._extScope.getValue(R,P)}scopeRefs(R){return this._extScope.scopeRefs(R,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(R,P,L,Y){let le=this._scope.toName(P);return L!==void 0&&Y&&(this._constants[le.str]=L),this._leafNode(new a(R,le,L)),le}const(R,P,L){return this._def(n.varKinds.const,R,P,L)}let(R,P,L){return this._def(n.varKinds.let,R,P,L)}var(R,P,L){return this._def(n.varKinds.var,R,P,L)}assign(R,P,L){return this._leafNode(new s(R,P,L))}add(R,P){return this._leafNode(new l(R,e.operators.ADD,P))}code(R){return typeof R=="function"?R():R!==t.nil&&this._leafNode(new f(R)),this}object(...R){let P=["{"];for(let[L,Y]of R)P.length>1&&P.push(","),P.push(L),(L!==Y||this.opts.es5)&&(P.push(":"),(0,t.addCodeArg)(P,Y));return P.push("}"),new t._Code(P)}if(R,P,L){if(this._blockNode(new h(R)),P&&L)this.code(P).else().code(L).endIf();else if(P)this.code(P).endIf();else if(L)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(R){return this._elseNode(new h(R))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(h,y)}_for(R,P){return this._blockNode(R),P&&this.code(P).endFor(),this}for(R,P){return this._for(new g(R),P)}forRange(R,P,L,Y,le=this.opts.es5?n.varKinds.var:n.varKinds.let){let Se=this._scope.toName(R);return this._for(new S(le,Se,P,L),()=>Y(Se))}forOf(R,P,L,Y=n.varKinds.const){let le=this._scope.toName(R);if(this.opts.es5){let Se=P instanceof t.Name?P:this.var("_arr",P);return this.forRange("_i",0,(0,t._)`${Se}.length`,he=>{this.var(le,(0,t._)`${Se}[${he}]`),L(le)})}return this._for(new k("of",Y,le,P),()=>L(le))}forIn(R,P,L,Y=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(R,(0,t._)`Object.keys(${P})`,L);let le=this._scope.toName(R);return this._for(new k("in",Y,le,P),()=>L(le))}endFor(){return this._endBlockNode(z)}label(R){return this._leafNode(new u(R))}break(R){return this._leafNode(new d(R))}return(R){let P=new _;if(this._blockNode(P),this.code(R),P.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(_)}try(R,P,L){if(!P&&!L)throw new Error('CodeGen: "try" without "catch" and "finally"');let Y=new I;if(this._blockNode(Y),this.code(R),P){let le=this.name("e");this._currNode=Y.catch=new j(le),P(le)}return L&&(this._currNode=Y.finally=new U,this.code(L)),this._endBlockNode(j,U)}throw(R){return this._leafNode(new p(R))}block(R,P){return this._blockStarts.push(this._nodes.length),R&&this.code(R).endBlock(P),this}endBlock(R){let P=this._blockStarts.pop();if(P===void 0)throw new Error("CodeGen: not in self-balancing block");let L=this._nodes.length-P;if(L<0||R!==void 0&&L!==R)throw new Error(`CodeGen: wrong number of nodes: ${L} vs ${R} expected`);return this._nodes.length=P,this}func(R,P=t.nil,L,Y){return this._blockNode(new w(R,P,L)),Y&&this.code(Y).endFunc(),this}endFunc(){return this._endBlockNode(w)}optimize(R=1){for(;R-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(R){return this._currNode.nodes.push(R),this}_blockNode(R){this._currNode.nodes.push(R),this._nodes.push(R)}_endBlockNode(R,P){let L=this._currNode;if(L instanceof R||P&&L instanceof P)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${P?`${R.kind}/${P.kind}`:R.kind}"`)}_elseNode(R){let P=this._currNode;if(!(P instanceof h))throw new Error('CodeGen: "else" without "if"');return this._currNode=P.else=R,this}get _root(){return this._nodes[0]}get _currNode(){let R=this._nodes;return R[R.length-1]}set _currNode(R){let P=this._nodes;P[P.length-1]=R}};e.CodeGen=C;function F(R,P){for(let L in P)R[L]=(R[L]||0)+(P[L]||0);return R}function ee(R,P){return P instanceof t._CodeOrName?F(R,P.names):R}function ne(R,P,L){if(R instanceof t.Name)return Y(R);if(!le(R))return R;return new t._Code(R._items.reduce((Se,he)=>(he instanceof t.Name&&(he=Y(he)),he instanceof t._Code?Se.push(...he._items):Se.push(he),Se),[]));function Y(Se){let he=L[Se.str];return he===void 0||P[Se.str]!==1?Se:(delete P[Se.str],he)}function le(Se){return Se instanceof t._Code&&Se._items.some(he=>he instanceof t.Name&&P[he.str]===1&&L[he.str]!==void 0)}}function we(R,P){for(let L in P)R[L]=(R[L]||0)-(P[L]||0)}function Ce(R){return typeof R=="boolean"||typeof R=="number"||R===null?!R:(0,t._)`!${J(R)}`}e.not=Ce;let Oe=M(e.operators.AND);function Je(...R){return R.reduce(Oe)}e.and=Je;let ke=M(e.operators.OR);function x(...R){return R.reduce(ke)}e.or=x;function M(R){return(P,L)=>P===t.nil?L:L===t.nil?P:(0,t._)`${J(P)} ${R} ${J(L)}`}function J(R){return R instanceof t.Name?R:(0,t._)`(${R})`}})),Te=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),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=ye(),n=zu();function i(w){let _={};for(let I of w)_[I]=!0;return _}e.toHash=i;function r(w,_){return typeof _=="boolean"?_:Object.keys(_).length===0?!0:(o(w,_),!a(_,w.self.RULES.all))}e.alwaysValidSchema=r;function o(w,_=w.schema){let{opts:I,self:j}=w;if(!I.strictSchema||typeof _=="boolean")return;let U=j.RULES.keywords;for(let C in _)U[C]||k(w,`unknown keyword: "${C}"`)}e.checkUnknownRules=o;function a(w,_){if(typeof w=="boolean")return!w;for(let I in w)if(_[I])return!0;return!1}e.schemaHasRules=a;function s(w,_){if(typeof w=="boolean")return!w;for(let I in w)if(I!=="$ref"&&_.all[I])return!0;return!1}e.schemaHasRulesButRef=s;function l({topSchemaRef:w,schemaPath:_},I,j,U){if(!U){if(typeof I=="number"||typeof I=="boolean")return I;if(typeof I=="string")return(0,t._)`${I}`}return(0,t._)`${w}${_}${(0,t.getProperty)(j)}`}e.schemaRefOrVal=l;function u(w){return f(decodeURIComponent(w))}e.unescapeFragment=u;function d(w){return encodeURIComponent(p(w))}e.escapeFragment=d;function p(w){return typeof w=="number"?`${w}`:w.replace(/~/g,"~0").replace(/\//g,"~1")}e.escapeJsonPointer=p;function f(w){return w.replace(/~1/g,"/").replace(/~0/g,"~")}e.unescapeJsonPointer=f;function b(w,_){if(Array.isArray(w))for(let I of w)_(I);else _(w)}e.eachItem=b;function v({mergeNames:w,mergeToName:_,mergeValues:I,resultToName:j}){return(U,C,F,ee)=>{let ne=F===void 0?C:F instanceof t.Name?(C instanceof t.Name?w(U,C,F):_(U,C,F),F):C instanceof t.Name?(_(U,F,C),C):I(C,F);return ee===t.Name&&!(ne instanceof t.Name)?j(U,ne):ne}}e.mergeEvaluated={props:v({mergeNames:(w,_,I)=>w.if((0,t._)`${I} !== true && ${_} !== undefined`,()=>{w.if((0,t._)`${_} === true`,()=>w.assign(I,!0),()=>w.assign(I,(0,t._)`${I} || {}`).code((0,t._)`Object.assign(${I}, ${_})`))}),mergeToName:(w,_,I)=>w.if((0,t._)`${I} !== true`,()=>{_===!0?w.assign(I,!0):(w.assign(I,(0,t._)`${I} || {}`),y(w,I,_))}),mergeValues:(w,_)=>w===!0?!0:{...w,..._},resultToName:$}),items:v({mergeNames:(w,_,I)=>w.if((0,t._)`${I} !== true && ${_} !== undefined`,()=>w.assign(I,(0,t._)`${_} === true ? true : ${I} > ${_} ? ${I} : ${_}`)),mergeToName:(w,_,I)=>w.if((0,t._)`${I} !== true`,()=>w.assign(I,_===!0?!0:(0,t._)`${I} > ${_} ? ${I} : ${_}`)),mergeValues:(w,_)=>w===!0?!0:Math.max(w,_),resultToName:(w,_)=>w.var("items",_)})};function $(w,_){if(_===!0)return w.var("props",!0);let I=w.var("props",(0,t._)`{}`);return _!==void 0&&y(w,I,_),I}e.evaluatedPropsToName=$;function y(w,_,I){Object.keys(I).forEach(j=>w.assign((0,t._)`${_}${(0,t.getProperty)(j)}`,!0))}e.setEvaluated=y;let h={};function z(w,_){return w.scopeValue("func",{ref:_,code:h[_.code]||(h[_.code]=new n._Code(_.code))})}e.useFunc=z;var g;(function(w){w[w.Num=0]="Num",w[w.Str=1]="Str"})(g||(e.Type=g={}));function S(w,_,I){if(w instanceof t.Name){let j=_===g.Num;return I?j?(0,t._)`"[" + ${w} + "]"`:(0,t._)`"['" + ${w} + "']"`:j?(0,t._)`"/" + ${w}`:(0,t._)`"/" + ${w}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return I?(0,t.getProperty)(w).toString():"/"+p(w)}e.getErrorPath=S;function k(w,_,I=w.opts.strictSchema){if(I){if(_=`strict mode: ${_}`,I===!0)throw new Error(_);w.self.logger.warn(_)}}e.checkStrictMode=k})),Et=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ye(),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})),Ru=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;let t=ye(),n=Te(),i=Et();e.keywordError={message:({keyword:y})=>(0,t.str)`must pass "${y}" keyword validation`},e.keyword$DataError={message:({keyword:y,schemaType:h})=>h?(0,t.str)`"${y}" keyword must be ${h} ($data)`:(0,t.str)`"${y}" keyword is invalid ($data)`};function r(y,h=e.keywordError,z,g){let{it:S}=y,{gen:k,compositeRule:w,allErrors:_}=S,I=p(y,h,z);g??(w||_)?l(k,I):u(S,(0,t._)`[${I}]`)}e.reportError=r;function o(y,h=e.keywordError,z){let{it:g}=y,{gen:S,compositeRule:k,allErrors:w}=g;l(S,p(y,h,z)),k||w||u(g,i.default.vErrors)}e.reportExtraError=o;function a(y,h){y.assign(i.default.errors,h),y.if((0,t._)`${i.default.vErrors} !== null`,()=>y.if(h,()=>y.assign((0,t._)`${i.default.vErrors}.length`,h),()=>y.assign(i.default.vErrors,null)))}e.resetErrorsCount=a;function s({gen:y,keyword:h,schemaValue:z,data:g,errsCount:S,it:k}){if(S===void 0)throw new Error("ajv implementation error");let w=y.name("err");y.forRange("i",S,i.default.errors,_=>{y.const(w,(0,t._)`${i.default.vErrors}[${_}]`),y.if((0,t._)`${w}.instancePath === undefined`,()=>y.assign((0,t._)`${w}.instancePath`,(0,t.strConcat)(i.default.instancePath,k.errorPath))),y.assign((0,t._)`${w}.schemaPath`,(0,t.str)`${k.errSchemaPath}/${h}`),k.opts.verbose&&(y.assign((0,t._)`${w}.schema`,z),y.assign((0,t._)`${w}.data`,g))})}e.extendErrors=s;function l(y,h){let z=y.const("err",h);y.if((0,t._)`${i.default.vErrors} === null`,()=>y.assign(i.default.vErrors,(0,t._)`[${z}]`),(0,t._)`${i.default.vErrors}.push(${z})`),y.code((0,t._)`${i.default.errors}++`)}function u(y,h){let{gen:z,validateName:g,schemaEnv:S}=y;S.$async?z.throw((0,t._)`new ${y.ValidationError}(${h})`):(z.assign((0,t._)`${g}.errors`,h),z.return(!1))}let d={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 p(y,h,z){let{createErrors:g}=y.it;return g===!1?(0,t._)`{}`:f(y,h,z)}function f(y,h,z={}){let{gen:g,it:S}=y,k=[b(S,z),v(y,z)];return $(y,h,k),g.object(...k)}function b({errorPath:y},{instancePath:h}){let z=h?(0,t.str)`${y}${(0,n.getErrorPath)(h,n.Type.Str)}`:y;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,z)]}function v({keyword:y,it:{errSchemaPath:h}},{schemaPath:z,parentSchema:g}){let S=g?h:(0,t.str)`${h}/${y}`;return z&&(S=(0,t.str)`${S}${(0,n.getErrorPath)(z,n.Type.Str)}`),[d.schemaPath,S]}function $(y,{params:h,message:z},g){let{keyword:S,data:k,schemaValue:w,it:_}=y,{opts:I,propertyName:j,topSchemaRef:U,schemaPath:C}=_;g.push([d.keyword,S],[d.params,typeof h=="function"?h(y):h||(0,t._)`{}`]),I.messages&&g.push([d.message,typeof z=="function"?z(y):z]),I.verbose&&g.push([d.schema,w],[d.parentSchema,(0,t._)`${U}${C}`],[i.default.data,k]),j&&g.push([d.propertyName,j])}})),uk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;let t=Ru(),n=ye(),i=Et(),r={message:"boolean schema is false"};function o(l){let{gen:u,schema:d,validateName:p}=l;d===!1?s(l,!1):typeof d=="object"&&d.$async===!0?u.return(i.default.data):(u.assign((0,n._)`${p}.errors`,null),u.return(!0))}e.topBoolOrEmptySchema=o;function a(l,u){let{gen:d,schema:p}=l;p===!1?(d.var(u,!1),s(l)):d.var(u,!0)}e.boolOrEmptySchema=a;function s(l,u){let{gen:d,data:p}=l,f={gen:d,keyword:"false schema",data:p,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:l};(0,t.reportError)(f,r,void 0,u)}})),pS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),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 i(){let r={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...r,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},r.number,r.string,r.array,r.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=i})),hS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:r,self:o},a){let s=o.RULES.types[a];return s&&s!==!0&&n(r,s)}e.schemaHasRulesForType=t;function n(r,o){return o.rules.some(a=>i(r,a))}e.shouldUseGroup=n;function i(r,o){var a;return r[o.keyword]!==void 0||((a=o.definition.implements)===null||a===void 0?void 0:a.some(s=>r[s]!==void 0))}e.shouldUseRule=i})),Iu=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;let t=pS(),n=hS(),i=Ru(),r=ye(),o=Te();var a;(function(g){g[g.Correct=0]="Correct",g[g.Wrong=1]="Wrong"})(a||(e.DataType=a={}));function s(g){let S=l(g.type);if(S.includes("null")){if(g.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!S.length&&g.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');g.nullable===!0&&S.push("null")}return S}e.getSchemaTypes=s;function l(g){let S=Array.isArray(g)?g:g?[g]:[];if(S.every(t.isJSONType))return S;throw new Error("type must be JSONType or JSONType[]: "+S.join(","))}e.getJSONTypes=l;function u(g,S){let{gen:k,data:w,opts:_}=g,I=p(S,_.coerceTypes),j=S.length>0&&!(I.length===0&&S.length===1&&(0,n.schemaHasRulesForType)(g,S[0]));if(j){let U=$(S,w,_.strictNumbers,a.Wrong);k.if(U,()=>{I.length?f(g,S,I):h(g)})}return j}e.coerceAndCheckDataType=u;let d=new Set(["string","number","integer","boolean","null"]);function p(g,S){return S?g.filter(k=>d.has(k)||S==="array"&&k==="array"):[]}function f(g,S,k){let{gen:w,data:_,opts:I}=g,j=w.let("dataType",(0,r._)`typeof ${_}`),U=w.let("coerced",(0,r._)`undefined`);I.coerceTypes==="array"&&w.if((0,r._)`${j} == 'object' && Array.isArray(${_}) && ${_}.length == 1`,()=>w.assign(_,(0,r._)`${_}[0]`).assign(j,(0,r._)`typeof ${_}`).if($(S,_,I.strictNumbers),()=>w.assign(U,_))),w.if((0,r._)`${U} !== undefined`);for(let F of k)(d.has(F)||F==="array"&&I.coerceTypes==="array")&&C(F);w.else(),h(g),w.endIf(),w.if((0,r._)`${U} !== undefined`,()=>{w.assign(_,U),b(g,U)});function C(F){switch(F){case"string":w.elseIf((0,r._)`${j} == "number" || ${j} == "boolean"`).assign(U,(0,r._)`"" + ${_}`).elseIf((0,r._)`${_} === null`).assign(U,(0,r._)`""`);return;case"number":w.elseIf((0,r._)`${j} == "boolean" || ${_} === null
|
|
66
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(t===a[0]){o(a);continue}if(e.external){let u=e.external.registry.get(a[0])?.id;if(t!==a[0]&&u){o(a);continue}}if(e.metadataRegistry.get(a[0])?.id){o(a);continue}if(s.cycle){o(a);continue}if(s.count>1&&e.reused==="ref"){o(a);continue}}}function fr(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=s=>{let c=e.seen.get(s);if(c.ref===null)return;let u=c.def??c.schema,d={...u},p=c.ref;if(c.ref=null,p){i(p);let b=e.seen.get(p),v=b.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(v)):Object.assign(u,v),Object.assign(u,d),s._zod.parent===p)for(let y in u)y==="$ref"||y==="allOf"||y in d||delete u[y];if(v.$ref&&b.def)for(let y in u)y==="$ref"||y==="allOf"||y in b.def&&JSON.stringify(u[y])===JSON.stringify(b.def[y])&&delete u[y]}let f=s._zod.parent;if(f&&f!==p){i(f);let b=e.seen.get(f);if(b?.schema.$ref&&(u.$ref=b.schema.$ref,b.def))for(let v in u)v==="$ref"||v==="allOf"||v in b.def&&JSON.stringify(u[v])===JSON.stringify(b.def[v])&&delete u[v]}e.override({zodSchema:s,jsonSchema:u,path:c.path??[]})};for(let s of[...e.seen.entries()].reverse())i(s[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 s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");r.$id=e.external.uri(s)}Object.assign(r,n.def??n.schema);let o=e.metadataRegistry.get(t)?.id;o!==void 0&&r.id===o&&delete r.id;let a=e.external?.defs??{};for(let s of e.seen.entries()){let c=s[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,a[c.defId]=c.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?r.$defs=a:r.definitions=a);try{let s=JSON.parse(JSON.stringify(r));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Zn(t,"input",e.processors),output:Zn(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function ut(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return ut(i.element,n);if(i.type==="set")return ut(i.valueType,n);if(i.type==="lazy")return ut(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return ut(i.innerType,n);if(i.type==="intersection")return ut(i.left,n)||ut(i.right,n);if(i.type==="record"||i.type==="map")return ut(i.keyType,n)||ut(i.valueType,n);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:ut(i.in,n)||ut(i.out,n);if(i.type==="object"){for(let r in i.shape)if(ut(i.shape[r],n))return!0;return!1}if(i.type==="union"){for(let r of i.options)if(ut(r,n))return!0;return!1}if(i.type==="tuple"){for(let r of i.items)if(ut(r,n))return!0;return!!(i.rest&&ut(i.rest,n))}return!1}var lh=(e,t={})=>n=>{let i=pr({...n,processors:t});return Ee(e,i),hr(i,e),fr(i,e)},Zn=(e,t,n={})=>i=>{let{libraryOptions:r,target:o}=i??{},a=pr({...r??{},target:o,io:t,processors:n});return Ee(e,a),hr(a,e),fr(a,e)};var DR={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},uh=(e,t,n,i)=>{let r=n;r.type="string";let{minimum:o,maximum:a,format:s,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof o=="number"&&(r.minLength=o),typeof a=="number"&&(r.maxLength=a),s&&(r.format=DR[s]??s,r.format===""&&delete r.format,s==="time"&&delete r.format),u&&(r.contentEncoding=u),c&&c.size>0){let d=[...c];d.length===1?r.pattern=d[0].source:d.length>1&&(r.allOf=[...d.map(p=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:p.source}))])}},dh=(e,t,n,i)=>{let r=n,{minimum:o,maximum:a,format:s,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:d}=e._zod.bag;typeof s=="string"&&s.includes("int")?r.type="integer":r.type="number";let p=typeof d=="number"&&d>=(o??Number.NEGATIVE_INFINITY),f=typeof u=="number"&&u<=(a??Number.POSITIVE_INFINITY),b=t.target==="draft-04"||t.target==="openapi-3.0";p?b?(r.minimum=d,r.exclusiveMinimum=!0):r.exclusiveMinimum=d:typeof o=="number"&&(r.minimum=o),f?b?(r.maximum=u,r.exclusiveMaximum=!0):r.exclusiveMaximum=u:typeof a=="number"&&(r.maximum=a),typeof c=="number"&&(r.multipleOf=c)},mh=(e,t,n,i)=>{n.type="boolean"},ph=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},hh=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},fh=(e,t,n,i)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},gh=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},vh=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},yh=(e,t,n,i)=>{n.not={}},_h=(e,t,n,i)=>{},bh=(e,t,n,i)=>{},Sh=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},$h=(e,t,n,i)=>{let r=e._zod.def,o=eo(r.entries);o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),n.enum=o},wh=(e,t,n,i)=>{let r=e._zod.def,o=[];for(let a of r.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),o.every(a=>typeof a=="boolean")&&(n.type="boolean"),o.every(a=>a===null)&&(n.type="null"),n.enum=o},zh=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Ih=(e,t,n,i)=>{let r=n,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");r.type="string",r.pattern=o.source},Rh=(e,t,n,i)=>{let r=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;a!==void 0&&(o.minLength=a),s!==void 0&&(o.maxLength=s),c?c.length===1?(o.contentMediaType=c[0],Object.assign(r,o)):(Object.assign(r,o),r.anyOf=c.map(u=>({contentMediaType:u}))):Object.assign(r,o)},kh=(e,t,n,i)=>{n.type="boolean"},Th=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Eh=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Ph=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},xh=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},jh=(e,t,n,i)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Ah=(e,t,n,i)=>{let r=n,o=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(r.minItems=a),typeof s=="number"&&(r.maxItems=s),r.type="array",r.items=Ee(o.element,t,{...i,path:[...i.path,"items"]})},Oh=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object",r.properties={};let a=o.shape;for(let u in a)r.properties[u]=Ee(a[u],t,{...i,path:[...i.path,"properties",u]});let s=new Set(Object.keys(a)),c=new Set([...s].filter(u=>{let d=o.shape[u]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));c.size>0&&(r.required=Array.from(c)),o.catchall?._zod.def.type==="never"?r.additionalProperties=!1:o.catchall?o.catchall&&(r.additionalProperties=Ee(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(r.additionalProperties=!1)},Vs=(e,t,n,i)=>{let r=e._zod.def,o=r.inclusive===!1,a=r.options.map((s,c)=>Ee(s,t,{...i,path:[...i.path,o?"oneOf":"anyOf",c]}));o?n.oneOf=a:n.anyOf=a},Ch=(e,t,n,i)=>{let r=e._zod.def,o=Ee(r.left,t,{...i,path:[...i.path,"allOf",0]}),a=Ee(r.right,t,{...i,path:[...i.path,"allOf",1]}),s=u=>"allOf"in u&&Object.keys(u).length===1,c=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];n.allOf=c},Nh=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((f,b)=>Ee(f,t,{...i,path:[...i.path,a,b]})),u=o.rest?Ee(o.rest,t,{...i,path:[...i.path,s,...t.target==="openapi-3.0"?[o.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:d,maximum:p}=e._zod.bag;typeof d=="number"&&(r.minItems=d),typeof p=="number"&&(r.maxItems=p)},Lh=(e,t,n,i)=>{let r=n,o=e._zod.def;r.type="object";let a=o.keyType,c=a._zod.bag?.patterns;if(o.mode==="loose"&&c&&c.size>0){let d=Ee(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});r.patternProperties={};for(let p of c)r.patternProperties[p.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(r.propertyNames=Ee(o.keyType,t,{...i,path:[...i.path,"propertyNames"]})),r.additionalProperties=Ee(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]});let u=a._zod.values;if(u){let d=[...u].filter(p=>typeof p=="string"||typeof p=="number");d.length>0&&(r.required=d)}},qh=(e,t,n,i)=>{let r=e._zod.def,o=Ee(r.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=r.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},Mh=(e,t,n,i)=>{let r=e._zod.def;Ee(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},Dh=(e,t,n,i)=>{let r=e._zod.def;Ee(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.default=JSON.parse(JSON.stringify(r.defaultValue))},Uh=(e,t,n,i)=>{let r=e._zod.def;Ee(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(r.defaultValue)))},Fh=(e,t,n,i)=>{let r=e._zod.def;Ee(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType;let a;try{a=r.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},Vh=(e,t,n,i)=>{let r=e._zod.def,o=r.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?o?r.out:r.in:r.out;Ee(a,t,i);let s=t.seen.get(e);s.ref=a},Zh=(e,t,n,i)=>{let r=e._zod.def;Ee(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType,n.readOnly=!0},Hh=(e,t,n,i)=>{let r=e._zod.def;Ee(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},Zs=(e,t,n,i)=>{let r=e._zod.def;Ee(r.innerType,t,i);let o=t.seen.get(e);o.ref=r.innerType},Jh=(e,t,n,i)=>{let r=e._zod.innerType;Ee(r,t,i);let o=t.seen.get(e);o.ref=r},Fs={string:uh,number:dh,boolean:mh,bigint:ph,symbol:hh,null:fh,undefined:gh,void:vh,never:yh,any:_h,unknown:bh,date:Sh,enum:$h,literal:wh,nan:zh,template_literal:Ih,file:Rh,success:kh,custom:Th,function:Eh,transform:Ph,map:xh,set:jh,array:Ah,object:Oh,union:Vs,intersection:Ch,tuple:Nh,record:Lh,nullable:qh,nonoptional:Mh,default:Dh,prefault:Uh,catch:Fh,pipe:Vh,readonly:Zh,promise:Hh,optional:Zs,lazy:Jh};function Yr(e,t){if("_idmap"in e){let i=e,r=pr({...t,processors:Fs}),o={};for(let c of i._idmap.entries()){let[u,d]=c;Ee(d,r)}let a={},s={registry:i,uri:t?.uri,defs:o};r.external=s;for(let c of i._idmap.entries()){let[u,d]=c;hr(r,d),a[u]=fr(r,d)}if(Object.keys(o).length>0){let c=r.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:o}}return{schemas:a}}let n=pr({...t,processors:Fs});return Ee(e,n),hr(n,e),fr(n,e)}var Hs=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=pr({processors:Fs,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 Ee(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)),hr(this.ctx,t);let i=fr(this.ctx,t),{"~standard":r,...o}=i;return o}};var d_={};var _o={};Zt(_o,{ZodAny:()=>pf,ZodArray:()=>vf,ZodBase64:()=>pc,ZodBase64URL:()=>hc,ZodBigInt:()=>Xn,ZodBigIntFormat:()=>vc,ZodBoolean:()=>Yn,ZodCIDRv4:()=>dc,ZodCIDRv6:()=>mc,ZodCUID:()=>ic,ZodCUID2:()=>oc,ZodCatch:()=>Lf,ZodCodec:()=>Eo,ZodCustom:()=>Po,ZodCustomStringFormat:()=>Kn,ZodDate:()=>Io,ZodDefault:()=>xf,ZodDiscriminatedUnion:()=>_f,ZodE164:()=>fc,ZodEmail:()=>ec,ZodEmoji:()=>rc,ZodEnum:()=>Jn,ZodExactOptional:()=>Tf,ZodFile:()=>Rf,ZodFunction:()=>Jf,ZodGUID:()=>So,ZodIPv4:()=>lc,ZodIPv6:()=>uc,ZodIntersection:()=>bf,ZodJWT:()=>gc,ZodKSUID:()=>cc,ZodLazy:()=>Zf,ZodLiteral:()=>If,ZodMAC:()=>lf,ZodMap:()=>wf,ZodNaN:()=>Mf,ZodNanoID:()=>nc,ZodNever:()=>ff,ZodNonOptional:()=>$c,ZodNull:()=>mf,ZodNullable:()=>Pf,ZodNumber:()=>Wn,ZodNumberFormat:()=>Xr,ZodObject:()=>Ro,ZodOptional:()=>Sc,ZodPipe:()=>To,ZodPrefault:()=>Af,ZodPreprocess:()=>Df,ZodPromise:()=>Hf,ZodReadonly:()=>Uf,ZodRecord:()=>Hn,ZodSet:()=>zf,ZodString:()=>Gn,ZodStringFormat:()=>xe,ZodSuccess:()=>Nf,ZodSymbol:()=>uf,ZodTemplateLiteral:()=>Vf,ZodTransform:()=>kf,ZodTuple:()=>Sf,ZodType:()=>$e,ZodULID:()=>ac,ZodURL:()=>zo,ZodUUID:()=>Mt,ZodUndefined:()=>df,ZodUnion:()=>ko,ZodUnknown:()=>hf,ZodVoid:()=>gf,ZodXID:()=>sc,ZodXor:()=>yf,_ZodString:()=>Qs,_default:()=>jf,_function:()=>pb,any:()=>yc,array:()=>O,base64:()=>j_,base64url:()=>A_,bigint:()=>Z_,boolean:()=>te,catch:()=>qf,check:()=>hb,cidrv4:()=>P_,cidrv6:()=>x_,codec:()=>lb,cuid:()=>$_,cuid2:()=>w_,custom:()=>fb,date:()=>W_,describe:()=>gb,discriminatedUnion:()=>gr,e164:()=>O_,email:()=>tc,emoji:()=>b_,enum:()=>ge,exactOptional:()=>Ef,file:()=>ob,float32:()=>D_,float64:()=>U_,function:()=>pb,guid:()=>h_,hash:()=>M_,hex:()=>q_,hostname:()=>L_,httpUrl:()=>__,instanceof:()=>yb,int:()=>Ys,int32:()=>F_,int64:()=>H_,intersection:()=>Et,invertCodec:()=>ub,ipv4:()=>k_,ipv6:()=>E_,json:()=>bb,jwt:()=>C_,keyof:()=>Y_,ksuid:()=>R_,lazy:()=>vr,literal:()=>C,looseObject:()=>de,looseRecord:()=>tb,mac:()=>T_,map:()=>rb,meta:()=>vb,nan:()=>cb,nanoid:()=>S_,nativeEnum:()=>ib,never:()=>_c,nonoptional:()=>Cf,null:()=>Dt,nullable:()=>$o,nullish:()=>ab,number:()=>H,object:()=>T,optional:()=>se,partialRecord:()=>eb,pipe:()=>Xs,prefault:()=>Of,preprocess:()=>Bt,promise:()=>mb,readonly:()=>Ff,record:()=>Q,refine:()=>Gf,set:()=>nb,strictObject:()=>X_,string:()=>m,stringFormat:()=>N_,stringbool:()=>_b,success:()=>sb,superRefine:()=>Bf,symbol:()=>G_,templateLiteral:()=>db,transform:()=>bc,tuple:()=>$f,uint32:()=>V_,uint64:()=>J_,ulid:()=>z_,undefined:()=>B_,union:()=>ie,unknown:()=>ae,url:()=>Bn,uuid:()=>f_,uuidv4:()=>g_,uuidv6:()=>v_,uuidv7:()=>y_,void:()=>K_,xid:()=>I_,xor:()=>Q_});var Js={};Zt(Js,{endsWith:()=>Nn,gt:()=>Lt,gte:()=>lt,includes:()=>On,length:()=>Wr,lowercase:()=>jn,lt:()=>Nt,lte:()=>_t,maxLength:()=>Kr,maxSize:()=>mr,mime:()=>Ln,minLength:()=>Jt,minSize:()=>qt,multipleOf:()=>dr,negative:()=>qs,nonnegative:()=>Ds,nonpositive:()=>Ms,normalize:()=>qn,overwrite:()=>Tt,positive:()=>Ls,property:()=>Us,regex:()=>xn,size:()=>Br,slugify:()=>Fn,startsWith:()=>Cn,toLowerCase:()=>Dn,toUpperCase:()=>Un,trim:()=>Mn,uppercase:()=>An});var bt={};Zt(bt,{ZodISODate:()=>Bs,ZodISODateTime:()=>Gs,ZodISODuration:()=>Ws,ZodISOTime:()=>Ks,date:()=>Bh,datetime:()=>Gh,duration:()=>Wh,time:()=>Kh});var Gs=A("ZodISODateTime",(e,t)=>{zm.init(e,t),xe.init(e,t)});function Gh(e){return Tp(Gs,e)}var Bs=A("ZodISODate",(e,t)=>{Im.init(e,t),xe.init(e,t)});function Bh(e){return Ep(Bs,e)}var Ks=A("ZodISOTime",(e,t)=>{Rm.init(e,t),xe.init(e,t)});function Kh(e){return Pp(Ks,e)}var Ws=A("ZodISODuration",(e,t)=>{km.init(e,t),xe.init(e,t)});function Wh(e){return xp(Ws,e)}var m_=(e,t)=>{oo.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>so(e,n)},flatten:{value:n=>ao(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,$n,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,$n,2)}},isEmpty:{get(){return e.issues.length===0}}})},FR=A("ZodError",m_),ft=A("ZodError",m_,{Parent:Error});var Yh=In(ft),Xh=Rn(ft),bo=kn(ft),Qh=Tn(ft),ef=Ha(ft),tf=Ja(ft),rf=Ga(ft),nf=Ba(ft),of=Ka(ft),af=Wa(ft),sf=Ya(ft),cf=Xa(ft);var p_=new WeakMap;function wo(e,t,n){let i=Object.getPrototypeOf(e),r=p_.get(i);if(r||(r=new Set,p_.set(i,r)),!r.has(t)){r.add(t);for(let o in n){let a=n[o];Object.defineProperty(i,o,{configurable:!0,enumerable:!1,get(){let s=a.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}var $e=A("ZodType",(e,t)=>(ve.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Zn(e,"input"),output:Zn(e,"output")}}),e.toJSONSchema=lh(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,i)=>Yh(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>bo(e,n,i),e.parseAsync=async(n,i)=>Xh(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>Qh(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>ef(e,n,i),e.decode=(n,i)=>tf(e,n,i),e.encodeAsync=async(n,i)=>rf(e,n,i),e.decodeAsync=async(n,i)=>nf(e,n,i),e.safeEncode=(n,i)=>of(e,n,i),e.safeDecode=(n,i)=>af(e,n,i),e.safeEncodeAsync=async(n,i)=>sf(e,n,i),e.safeDecodeAsync=async(n,i)=>cf(e,n,i),wo(e,"ZodType",{check(...n){let i=this.def;return this.clone(K.mergeDefs(i,{checks:[...i.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,i){return st(this,n,i)},brand(){return this},register(n,i){return n.add(this,i),this},refine(n,i){return this.check(Gf(n,i))},superRefine(n,i){return this.check(Bf(n,i))},overwrite(n){return this.check(Tt(n))},optional(){return se(this)},exactOptional(){return Ef(this)},nullable(){return $o(this)},nullish(){return se($o(this))},nonoptional(n){return Cf(this,n)},array(){return O(this)},or(n){return ie([this,n])},and(n){return Et(this,n)},transform(n){return Xs(this,bc(n))},default(n){return jf(this,n)},prefault(n){return Of(this,n)},catch(n){return qf(this,n)},pipe(n){return Xs(this,n)},readonly(){return Ff(this)},describe(n){let i=this.clone();return Xe.add(i,{description:n}),i},meta(...n){if(n.length===0)return Xe.get(this);let i=this.clone();return Xe.add(i,n[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Xe.get(e)?.description},configurable:!0}),e)),Qs=A("_ZodString",(e,t)=>{Gr.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(i,r,o)=>uh(e,i,r,o);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,wo(e,"_ZodString",{regex(...i){return this.check(xn(...i))},includes(...i){return this.check(On(...i))},startsWith(...i){return this.check(Cn(...i))},endsWith(...i){return this.check(Nn(...i))},min(...i){return this.check(Jt(...i))},max(...i){return this.check(Kr(...i))},length(...i){return this.check(Wr(...i))},nonempty(...i){return this.check(Jt(1,...i))},lowercase(i){return this.check(jn(i))},uppercase(i){return this.check(An(i))},trim(){return this.check(Mn())},normalize(...i){return this.check(qn(...i))},toLowerCase(){return this.check(Dn())},toUpperCase(){return this.check(Un())},slugify(){return this.check(Fn())}})}),Gn=A("ZodString",(e,t)=>{Gr.init(e,t),Qs.init(e,t),e.email=n=>e.check(vs(ec,n)),e.url=n=>e.check(yo(zo,n)),e.jwt=n=>e.check(Ns(gc,n)),e.emoji=n=>e.check($s(rc,n)),e.guid=n=>e.check(vo(So,n)),e.uuid=n=>e.check(ys(Mt,n)),e.uuidv4=n=>e.check(_s(Mt,n)),e.uuidv6=n=>e.check(bs(Mt,n)),e.uuidv7=n=>e.check(Ss(Mt,n)),e.nanoid=n=>e.check(ws(nc,n)),e.guid=n=>e.check(vo(So,n)),e.cuid=n=>e.check(zs(ic,n)),e.cuid2=n=>e.check(Is(oc,n)),e.ulid=n=>e.check(Rs(ac,n)),e.base64=n=>e.check(As(pc,n)),e.base64url=n=>e.check(Os(hc,n)),e.xid=n=>e.check(ks(sc,n)),e.ksuid=n=>e.check(Ts(cc,n)),e.ipv4=n=>e.check(Es(lc,n)),e.ipv6=n=>e.check(Ps(uc,n)),e.cidrv4=n=>e.check(xs(dc,n)),e.cidrv6=n=>e.check(js(mc,n)),e.e164=n=>e.check(Cs(fc,n)),e.datetime=n=>e.check(Gh(n)),e.date=n=>e.check(Bh(n)),e.time=n=>e.check(Kh(n)),e.duration=n=>e.check(Wh(n))});function m(e){return zp(Gn,e)}var xe=A("ZodStringFormat",(e,t)=>{Pe.init(e,t),Qs.init(e,t)}),ec=A("ZodEmail",(e,t)=>{fm.init(e,t),xe.init(e,t)});function tc(e){return vs(ec,e)}var So=A("ZodGUID",(e,t)=>{pm.init(e,t),xe.init(e,t)});function h_(e){return vo(So,e)}var Mt=A("ZodUUID",(e,t)=>{hm.init(e,t),xe.init(e,t)});function f_(e){return ys(Mt,e)}function g_(e){return _s(Mt,e)}function v_(e){return bs(Mt,e)}function y_(e){return Ss(Mt,e)}var zo=A("ZodURL",(e,t)=>{gm.init(e,t),xe.init(e,t)});function Bn(e){return yo(zo,e)}function __(e){return yo(zo,{protocol:yt.httpProtocol,hostname:yt.domain,...K.normalizeParams(e)})}var rc=A("ZodEmoji",(e,t)=>{vm.init(e,t),xe.init(e,t)});function b_(e){return $s(rc,e)}var nc=A("ZodNanoID",(e,t)=>{ym.init(e,t),xe.init(e,t)});function S_(e){return ws(nc,e)}var ic=A("ZodCUID",(e,t)=>{_m.init(e,t),xe.init(e,t)});function $_(e){return zs(ic,e)}var oc=A("ZodCUID2",(e,t)=>{bm.init(e,t),xe.init(e,t)});function w_(e){return Is(oc,e)}var ac=A("ZodULID",(e,t)=>{Sm.init(e,t),xe.init(e,t)});function z_(e){return Rs(ac,e)}var sc=A("ZodXID",(e,t)=>{$m.init(e,t),xe.init(e,t)});function I_(e){return ks(sc,e)}var cc=A("ZodKSUID",(e,t)=>{wm.init(e,t),xe.init(e,t)});function R_(e){return Ts(cc,e)}var lc=A("ZodIPv4",(e,t)=>{Tm.init(e,t),xe.init(e,t)});function k_(e){return Es(lc,e)}var lf=A("ZodMAC",(e,t)=>{Pm.init(e,t),xe.init(e,t)});function T_(e){return Rp(lf,e)}var uc=A("ZodIPv6",(e,t)=>{Em.init(e,t),xe.init(e,t)});function E_(e){return Ps(uc,e)}var dc=A("ZodCIDRv4",(e,t)=>{xm.init(e,t),xe.init(e,t)});function P_(e){return xs(dc,e)}var mc=A("ZodCIDRv6",(e,t)=>{jm.init(e,t),xe.init(e,t)});function x_(e){return js(mc,e)}var pc=A("ZodBase64",(e,t)=>{Om.init(e,t),xe.init(e,t)});function j_(e){return As(pc,e)}var hc=A("ZodBase64URL",(e,t)=>{Cm.init(e,t),xe.init(e,t)});function A_(e){return Os(hc,e)}var fc=A("ZodE164",(e,t)=>{Nm.init(e,t),xe.init(e,t)});function O_(e){return Cs(fc,e)}var gc=A("ZodJWT",(e,t)=>{Lm.init(e,t),xe.init(e,t)});function C_(e){return Ns(gc,e)}var Kn=A("ZodCustomStringFormat",(e,t)=>{qm.init(e,t),xe.init(e,t)});function N_(e,t,n={}){return Vn(Kn,e,t,n)}function L_(e){return Vn(Kn,"hostname",yt.hostname,e)}function q_(e){return Vn(Kn,"hex",yt.hex,e)}function M_(e,t){let n=t?.enc??"hex",i=`${e}_${n}`,r=yt[i];if(!r)throw new Error(`Unrecognized hash format: ${i}`);return Vn(Kn,i,r,t)}var Wn=A("ZodNumber",(e,t)=>{ss.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(i,r,o)=>dh(e,i,r,o),wo(e,"ZodNumber",{gt(i,r){return this.check(Lt(i,r))},gte(i,r){return this.check(lt(i,r))},min(i,r){return this.check(lt(i,r))},lt(i,r){return this.check(Nt(i,r))},lte(i,r){return this.check(_t(i,r))},max(i,r){return this.check(_t(i,r))},int(i){return this.check(Ys(i))},safe(i){return this.check(Ys(i))},positive(i){return this.check(Lt(0,i))},nonnegative(i){return this.check(lt(0,i))},negative(i){return this.check(Nt(0,i))},nonpositive(i){return this.check(_t(0,i))},multipleOf(i,r){return this.check(dr(i,r))},step(i,r){return this.check(dr(i,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=!0,e.format=n.format??null});function H(e){return jp(Wn,e)}var Xr=A("ZodNumberFormat",(e,t)=>{Mm.init(e,t),Wn.init(e,t)});function Ys(e){return Op(Xr,e)}function D_(e){return Cp(Xr,e)}function U_(e){return Np(Xr,e)}function F_(e){return Lp(Xr,e)}function V_(e){return qp(Xr,e)}var Yn=A("ZodBoolean",(e,t)=>{mo.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>mh(e,n,i,r)});function te(e){return Mp(Yn,e)}var Xn=A("ZodBigInt",(e,t)=>{cs.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(i,r,o)=>ph(e,i,r,o),e.gte=(i,r)=>e.check(lt(i,r)),e.min=(i,r)=>e.check(lt(i,r)),e.gt=(i,r)=>e.check(Lt(i,r)),e.gte=(i,r)=>e.check(lt(i,r)),e.min=(i,r)=>e.check(lt(i,r)),e.lt=(i,r)=>e.check(Nt(i,r)),e.lte=(i,r)=>e.check(_t(i,r)),e.max=(i,r)=>e.check(_t(i,r)),e.positive=i=>e.check(Lt(BigInt(0),i)),e.negative=i=>e.check(Nt(BigInt(0),i)),e.nonpositive=i=>e.check(_t(BigInt(0),i)),e.nonnegative=i=>e.check(lt(BigInt(0),i)),e.multipleOf=(i,r)=>e.check(dr(i,r));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function Z_(e){return Up(Xn,e)}var vc=A("ZodBigIntFormat",(e,t)=>{Dm.init(e,t),Xn.init(e,t)});function H_(e){return Vp(vc,e)}function J_(e){return Zp(vc,e)}var uf=A("ZodSymbol",(e,t)=>{Um.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>hh(e,n,i,r)});function G_(e){return Hp(uf,e)}var df=A("ZodUndefined",(e,t)=>{Fm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>gh(e,n,i,r)});function B_(e){return Jp(df,e)}var mf=A("ZodNull",(e,t)=>{Vm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>fh(e,n,i,r)});function Dt(e){return Gp(mf,e)}var pf=A("ZodAny",(e,t)=>{Zm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>_h(e,n,i,r)});function yc(){return Bp(pf)}var hf=A("ZodUnknown",(e,t)=>{Hm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>bh(e,n,i,r)});function ae(){return Kp(hf)}var ff=A("ZodNever",(e,t)=>{Jm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>yh(e,n,i,r)});function _c(e){return Wp(ff,e)}var gf=A("ZodVoid",(e,t)=>{Gm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>vh(e,n,i,r)});function K_(e){return Yp(gf,e)}var Io=A("ZodDate",(e,t)=>{Bm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(i,r,o)=>Sh(e,i,r,o),e.min=(i,r)=>e.check(lt(i,r)),e.max=(i,r)=>e.check(_t(i,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 W_(e){return Xp(Io,e)}var vf=A("ZodArray",(e,t)=>{Km.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ah(e,n,i,r),e.element=t.element,wo(e,"ZodArray",{min(n,i){return this.check(Jt(n,i))},nonempty(n){return this.check(Jt(1,n))},max(n,i){return this.check(Kr(n,i))},length(n,i){return this.check(Wr(n,i))},unwrap(){return this.element}})});function O(e,t){return th(vf,e,t)}function Y_(e){let t=e._zod.def.shape;return ge(Object.keys(t))}var Ro=A("ZodObject",(e,t)=>{Wm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Oh(e,n,i,r),K.defineLazy(e,"shape",()=>t.shape),wo(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:ae()})},loose(){return this.clone({...this._zod.def,catchall:ae()})},strict(){return this.clone({...this._zod.def,catchall:_c()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return K.extend(this,n)},safeExtend(n){return K.safeExtend(this,n)},merge(n){return K.merge(this,n)},pick(n){return K.pick(this,n)},omit(n){return K.omit(this,n)},partial(...n){return K.partial(Sc,this,n[0])},required(...n){return K.required($c,this,n[0])}})});function T(e,t){let n={type:"object",shape:e??{},...K.normalizeParams(t)};return new Ro(n)}function X_(e,t){return new Ro({type:"object",shape:e,catchall:_c(),...K.normalizeParams(t)})}function de(e,t){return new Ro({type:"object",shape:e,catchall:ae(),...K.normalizeParams(t)})}var ko=A("ZodUnion",(e,t)=>{po.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Vs(e,n,i,r),e.options=t.options});function ie(e,t){return new ko({type:"union",options:e,...K.normalizeParams(t)})}var yf=A("ZodXor",(e,t)=>{ko.init(e,t),Ym.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Vs(e,n,i,r),e.options=t.options});function Q_(e,t){return new yf({type:"union",options:e,inclusive:!1,...K.normalizeParams(t)})}var _f=A("ZodDiscriminatedUnion",(e,t)=>{ko.init(e,t),Xm.init(e,t)});function gr(e,t,n){return new _f({type:"union",options:t,discriminator:e,...K.normalizeParams(n)})}var bf=A("ZodIntersection",(e,t)=>{Qm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ch(e,n,i,r)});function Et(e,t){return new bf({type:"intersection",left:e,right:t})}var Sf=A("ZodTuple",(e,t)=>{ls.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Nh(e,n,i,r),e.rest=n=>e.clone({...e._zod.def,rest:n})});function $f(e,t,n){let i=t instanceof ve,r=i?n:t,o=i?t:null;return new Sf({type:"tuple",items:e,rest:o,...K.normalizeParams(r)})}var Hn=A("ZodRecord",(e,t)=>{ep.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Lh(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType});function Q(e,t,n){return!t||!t._zod?new Hn({type:"record",keyType:m(),valueType:e,...K.normalizeParams(t)}):new Hn({type:"record",keyType:e,valueType:t,...K.normalizeParams(n)})}function eb(e,t,n){let i=st(e);return i._zod.values=void 0,new Hn({type:"record",keyType:i,valueType:t,...K.normalizeParams(n)})}function tb(e,t,n){return new Hn({type:"record",keyType:e,valueType:t,mode:"loose",...K.normalizeParams(n)})}var wf=A("ZodMap",(e,t)=>{tp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>xh(e,n,i,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(qt(...n)),e.nonempty=n=>e.check(qt(1,n)),e.max=(...n)=>e.check(mr(...n)),e.size=(...n)=>e.check(Br(...n))});function rb(e,t,n){return new wf({type:"map",keyType:e,valueType:t,...K.normalizeParams(n)})}var zf=A("ZodSet",(e,t)=>{rp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>jh(e,n,i,r),e.min=(...n)=>e.check(qt(...n)),e.nonempty=n=>e.check(qt(1,n)),e.max=(...n)=>e.check(mr(...n)),e.size=(...n)=>e.check(Br(...n))});function nb(e,t){return new zf({type:"set",valueType:e,...K.normalizeParams(t)})}var Jn=A("ZodEnum",(e,t)=>{np.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(i,r,o)=>$h(e,i,r,o),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(i,r)=>{let o={};for(let a of i)if(n.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Jn({...t,checks:[],...K.normalizeParams(r),entries:o})},e.exclude=(i,r)=>{let o={...t.entries};for(let a of i)if(n.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new Jn({...t,checks:[],...K.normalizeParams(r),entries:o})}});function ge(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new Jn({type:"enum",entries:n,...K.normalizeParams(t)})}function ib(e,t){return new Jn({type:"enum",entries:e,...K.normalizeParams(t)})}var If=A("ZodLiteral",(e,t)=>{ip.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>wh(e,n,i,r),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 C(e,t){return new If({type:"literal",values:Array.isArray(e)?e:[e],...K.normalizeParams(t)})}var Rf=A("ZodFile",(e,t)=>{op.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Rh(e,n,i,r),e.min=(n,i)=>e.check(qt(n,i)),e.max=(n,i)=>e.check(mr(n,i)),e.mime=(n,i)=>e.check(Ln(Array.isArray(n)?n:[n],i))});function ob(e){return rh(Rf,e)}var kf=A("ZodTransform",(e,t)=>{ap.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ph(e,n,i,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new ar(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(K.issue(o,n.value,t));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(K.issue(a))}};let r=t.transform(n.value,n);return r instanceof Promise?r.then(o=>(n.value=o,n.fallback=!0,n)):(n.value=r,n.fallback=!0,n)}});function bc(e){return new kf({type:"transform",transform:e})}var Sc=A("ZodOptional",(e,t)=>{us.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Zs(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function se(e){return new Sc({type:"optional",innerType:e})}var Tf=A("ZodExactOptional",(e,t)=>{sp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Zs(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Ef(e){return new Tf({type:"optional",innerType:e})}var Pf=A("ZodNullable",(e,t)=>{cp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>qh(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function $o(e){return new Pf({type:"nullable",innerType:e})}function ab(e){return se($o(e))}var xf=A("ZodDefault",(e,t)=>{lp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Dh(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function jf(e,t){return new xf({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():K.shallowClone(t)}})}var Af=A("ZodPrefault",(e,t)=>{up.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Uh(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Of(e,t){return new Af({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():K.shallowClone(t)}})}var $c=A("ZodNonOptional",(e,t)=>{dp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Mh(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Cf(e,t){return new $c({type:"nonoptional",innerType:e,...K.normalizeParams(t)})}var Nf=A("ZodSuccess",(e,t)=>{mp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>kh(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function sb(e){return new Nf({type:"success",innerType:e})}var Lf=A("ZodCatch",(e,t)=>{pp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Fh(e,n,i,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function qf(e,t){return new Lf({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var Mf=A("ZodNaN",(e,t)=>{hp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>zh(e,n,i,r)});function cb(e){return eh(Mf,e)}var To=A("ZodPipe",(e,t)=>{ds.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Vh(e,n,i,r),e.in=t.in,e.out=t.out});function Xs(e,t){return new To({type:"pipe",in:e,out:t})}var Eo=A("ZodCodec",(e,t)=>{To.init(e,t),ho.init(e,t)});function lb(e,t,n){return new Eo({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function ub(e){let t=e._zod.def;return new Eo({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var Df=A("ZodPreprocess",(e,t)=>{To.init(e,t),fp.init(e,t)}),Uf=A("ZodReadonly",(e,t)=>{gp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Zh(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function Ff(e){return new Uf({type:"readonly",innerType:e})}var Vf=A("ZodTemplateLiteral",(e,t)=>{vp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Ih(e,n,i,r)});function db(e,t){return new Vf({type:"template_literal",parts:e,...K.normalizeParams(t)})}var Zf=A("ZodLazy",(e,t)=>{bp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Jh(e,n,i,r),e.unwrap=()=>e._zod.def.getter()});function vr(e){return new Zf({type:"lazy",getter:e})}var Hf=A("ZodPromise",(e,t)=>{_p.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Hh(e,n,i,r),e.unwrap=()=>e._zod.def.innerType});function mb(e){return new Hf({type:"promise",innerType:e})}var Jf=A("ZodFunction",(e,t)=>{yp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Eh(e,n,i,r)});function pb(e){return new Jf({type:"function",input:Array.isArray(e?.input)?$f(e?.input):e?.input??O(ae()),output:e?.output??ae()})}var Po=A("ZodCustom",(e,t)=>{Sp.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(n,i,r)=>Th(e,n,i,r)});function hb(e){let t=new je({check:"custom"});return t._zod.check=e,t}function fb(e,t){return nh(Po,e??(()=>!0),t)}function Gf(e,t={}){return ih(Po,e,t)}function Bf(e,t){return oh(e,t)}var gb=ah,vb=sh;function yb(e,t={}){let n=new Po({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...K.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:n,path:[...n._zod.def.path??[]]})},n}var _b=(...e)=>ch({Codec:Eo,Boolean:Yn,String:Gn},...e);function bb(e){let t=vr(()=>ie([m(e),H(),te(),Dt(),O(t),Q(m(),t)]));return t}function Bt(e,t){return new Df({type:"pipe",in:bc(e),out:t})}var Wf={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 ZR(e){Me({customError:e})}function HR(){return Me().customError}var Kf;Kf||(Kf={});var re={..._o,...Js,iso:bt},JR=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 GR(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 BR(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 i=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===i){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 re.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 re.lazy(()=>{if(!t.refs.has(r))throw new Error(`Circular reference not resolved: ${r}`);return t.refs.get(r)});t.processing.add(r);let o=BR(r,t),a=nt(o,t);return t.refs.set(r,a),t.processing.delete(r),a}if(e.enum!==void 0){let r=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&r.length===1&&r[0]===null)return re.null();if(r.length===0)return re.never();if(r.length===1)return re.literal(r[0]);if(r.every(a=>typeof a=="string"))return re.enum(r);let o=r.map(a=>re.literal(a));return o.length<2?o[0]:re.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return re.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(o=>{let a={...e,type:o};return Sb(a,t)});return r.length===0?re.never():r.length===1?r[0]:re.union(r)}if(!n)return re.any();let i;switch(n){case"string":{let r=re.string();if(e.format){let o=e.format;o==="email"?r=r.check(re.email()):o==="uri"||o==="uri-reference"?r=r.check(re.url()):o==="uuid"||o==="guid"?r=r.check(re.uuid()):o==="date-time"?r=r.check(re.iso.datetime()):o==="date"?r=r.check(re.iso.date()):o==="time"?r=r.check(re.iso.time()):o==="duration"?r=r.check(re.iso.duration()):o==="ipv4"?r=r.check(re.ipv4()):o==="ipv6"?r=r.check(re.ipv6()):o==="mac"?r=r.check(re.mac()):o==="cidr"?r=r.check(re.cidrv4()):o==="cidr-v6"?r=r.check(re.cidrv6()):o==="base64"?r=r.check(re.base64()):o==="base64url"?r=r.check(re.base64url()):o==="e164"?r=r.check(re.e164()):o==="jwt"?r=r.check(re.jwt()):o==="emoji"?r=r.check(re.emoji()):o==="nanoid"?r=r.check(re.nanoid()):o==="cuid"?r=r.check(re.cuid()):o==="cuid2"?r=r.check(re.cuid2()):o==="ulid"?r=r.check(re.ulid()):o==="xid"?r=r.check(re.xid()):o==="ksuid"&&(r=r.check(re.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))),i=r;break}case"number":case"integer":{let r=n==="integer"?re.number().int():re.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===!0&&typeof e.minimum=="number"&&(r=r.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?r=r.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(r=r.lt(e.maximum)),typeof e.multipleOf=="number"&&(r=r.multipleOf(e.multipleOf)),i=r;break}case"boolean":{i=re.boolean();break}case"null":{i=re.null();break}case"object":{let r={},o=e.properties||{},a=new Set(e.required||[]);for(let[c,u]of Object.entries(o)){let d=nt(u,t);r[c]=a.has(c)?d:d.optional()}if(e.propertyNames){let c=nt(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?nt(e.additionalProperties,t):re.any();if(Object.keys(r).length===0){i=re.record(c,u);break}let d=re.object(r).passthrough(),p=re.looseRecord(c,u);i=re.intersection(d,p);break}if(e.patternProperties){let c=e.patternProperties,u=Object.keys(c),d=[];for(let f of u){let b=nt(c[f],t),v=re.string().regex(new RegExp(f));d.push(re.looseRecord(v,b))}let p=[];if(Object.keys(r).length>0&&p.push(re.object(r).passthrough()),p.push(...d),p.length===0)i=re.object({}).passthrough();else if(p.length===1)i=p[0];else{let f=re.intersection(p[0],p[1]);for(let b=2;b<p.length;b++)f=re.intersection(f,p[b]);i=f}break}let s=re.object(r);e.additionalProperties===!1?i=s.strict():typeof e.additionalProperties=="object"?i=s.catchall(nt(e.additionalProperties,t)):i=s.passthrough();break}case"array":{let r=e.prefixItems,o=e.items;if(r&&Array.isArray(r)){let a=r.map(c=>nt(c,t)),s=o&&typeof o=="object"&&!Array.isArray(o)?nt(o,t):void 0;s?i=re.tuple(a).rest(s):i=re.tuple(a),typeof e.minItems=="number"&&(i=i.check(re.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(re.maxLength(e.maxItems)))}else if(Array.isArray(o)){let a=o.map(c=>nt(c,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?nt(e.additionalItems,t):void 0;s?i=re.tuple(a).rest(s):i=re.tuple(a),typeof e.minItems=="number"&&(i=i.check(re.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(re.maxLength(e.maxItems)))}else if(o!==void 0){let a=nt(o,t),s=re.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),i=s}else i=re.array(re.any());break}default:throw new Error(`Unsupported type: ${n}`)}return i}function nt(e,t){if(typeof e=="boolean")return e?re.any():re.never();let n=Sb(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(u=>nt(u,t)),c=re.union(s);n=i?re.intersection(n,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(u=>nt(u,t)),c=re.xor(s);n=i?re.intersection(n,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=i?n:re.any();else{let s=i?n:nt(e.allOf[0],t),c=i?0:1;for(let u=c;u<e.allOf.length;u++)s=re.intersection(s,nt(e.allOf[u],t));n=s}e.nullable===!0&&t.version==="openapi-3.0"&&(n=re.nullable(n)),e.readOnly===!0&&(n=re.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let r={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of o)s in e&&(r[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(r[s]=e[s]);for(let s of Object.keys(e))JR.has(s)||(r[s]=e[s]);return Object.keys(r).length>0&&t.registry.add(n,r),e.description&&(n=n.describe(e.description)),n}function $b(e,t){if(typeof e=="boolean")return e?re.any():re.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 i=GR(n,t?.defaultTarget),r=n.$defs||n.definitions||{},o={version:i,defs:r,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Xe};return nt(n,o)}var xo={};Zt(xo,{bigint:()=>XR,boolean:()=>YR,date:()=>QR,number:()=>WR,string:()=>KR});function KR(e){return Ip(Gn,e)}function WR(e){return Ap(Wn,e)}function YR(e){return Dp(Yn,e)}function XR(e){return Fp(Xn,e)}function QR(e){return Qp(Io,e)}Me(ms());var en="2025-11-25";var wc=[en,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],zc="io.modelcontextprotocol/related-task",Wt="io.modelcontextprotocol/protocolVersion",Qn="io.modelcontextprotocol/clientInfo",Ut="io.modelcontextprotocol/serverInfo",Yt="io.modelcontextprotocol/clientCapabilities",tn="io.modelcontextprotocol/subscriptionId",_r="io.modelcontextprotocol/logLevel";var rn="2.0";var yr=vr(()=>ie([m(),H(),te(),Dt(),Q(m(),yr),O(yr)])),De=Q(m(),yr),Xf=O(yr),jo=ie([m(),H().int()]),Ao=m(),Ic=T({ttl:H().optional()}),Rc=T({taskId:m()}),Oo=de({progressToken:jo.optional(),[zc]:Rc.optional()}),Ye=T({_meta:Oo.optional()}),nn=Ye.extend({task:Ic.optional()}),Ue=T({method:m(),params:Ye.loose().optional()}),it=T({_meta:Oo.optional()}),ot=T({method:m(),params:it.loose().optional()}),Co=de({get[Ut](){return ri.optional().catch(void 0)}}),Fe=de({_meta:Co.optional()}),br=ie([m(),H().int()]),No=T({jsonrpc:C(rn),id:br,...Ue.shape}).strict(),Lo=T({jsonrpc:C(rn),...ot.shape}).strict(),ei=T({jsonrpc:C(rn),id:br,result:Fe}).strict(),ti=T({jsonrpc:C(rn),id:br.optional(),error:T({code:H().int(),message:m(),data:ae().optional()})}).strict(),qo=ie([No,Lo,ei,ti]),Qf=ie([ei,ti]),Mo=Fe.strict(),kc=it.extend({requestId:br.optional(),reason:m().optional()}),Do=ot.extend({method:C("notifications/cancelled"),params:kc}),Tc=T({src:m(),mimeType:m().optional(),sizes:O(m()).optional(),theme:ge(["light","dark"]).optional()}),Sr=T({icons:O(Tc).optional()}),Kt=T({name:m(),title:m().optional()}),ri=Kt.extend({...Kt.shape,...Sr.shape,version:m(),websiteUrl:m().optional(),description:m().optional()}),t0=Et(T({applyDefaults:te().optional()}),De),r0=Bt(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Et(T({form:t0.optional(),url:De.optional()}),De.optional())),Ec=de({list:De.optional(),cancel:De.optional(),requests:de({sampling:de({createMessage:De.optional()}).optional(),elicitation:de({create:De.optional()}).optional()}).optional()}),Pc=de({list:De.optional(),cancel:De.optional(),requests:de({tools:de({call:De.optional()}).optional()}).optional()}),xc=T({experimental:Q(m(),De).optional(),sampling:T({context:De.optional(),tools:De.optional()}).optional(),elicitation:r0.optional(),roots:T({listChanged:te().optional()}).optional(),tasks:Ec.optional(),extensions:Q(m(),De).optional()}),jc=Ye.extend({protocolVersion:m(),capabilities:xc,clientInfo:ri}),Ac=Ue.extend({method:C("initialize"),params:jc}),Uo=T({experimental:Q(m(),De).optional(),logging:De.optional(),completions:De.optional(),prompts:T({listChanged:te().optional()}).optional(),resources:T({subscribe:te().optional(),listChanged:te().optional()}).optional(),tools:T({listChanged:te().optional()}).optional(),tasks:Pc.optional(),extensions:Q(m(),De).optional()}),Oc=Fe.extend({protocolVersion:m(),capabilities:Uo,serverInfo:ri,instructions:m().optional()}),Cc=ot.extend({method:C("notifications/initialized"),params:it.optional()}),Nc=Ue.extend({method:C("server/discover"),params:Ye.optional()}),Lc=Fe.extend({supportedVersions:O(m()),capabilities:Uo,instructions:m().optional()}),Fo=Ue.extend({method:C("ping"),params:Ye.optional()}),qc=T({progress:H(),total:se(H()),message:se(m())}),Mc=T({...it.shape,...qc.shape,progressToken:jo}),Vo=ot.extend({method:C("notifications/progress"),params:Mc}),Dc=Ye.extend({cursor:Ao.optional()}),$r=Ue.extend({params:Dc.optional()}),wr=Fe.extend({nextCursor:Ao.optional()}),Zo=T({uri:m(),mimeType:se(m()),_meta:Q(m(),ae()).optional()}),Ho=Zo.extend({text:m()}),eg=m().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Jo=Zo.extend({blob:eg}),zr=ge(["user","assistant"]),Xt=T({audience:O(zr).optional(),priority:H().min(0).max(1).optional(),lastModified:bt.datetime({offset:!0}).optional()}),Go=T({...Kt.shape,...Sr.shape,uri:m(),description:se(m()),mimeType:se(m()),size:se(H()),annotations:Xt.optional(),_meta:se(de({}))}),Uc=T({...Kt.shape,...Sr.shape,uriTemplate:m(),description:se(m()),mimeType:se(m()),annotations:Xt.optional(),_meta:se(de({}))}),Fc=$r.extend({method:C("resources/list")}),Vc=wr.extend({resources:O(Go)}),Zc=$r.extend({method:C("resources/templates/list")}),Hc=wr.extend({resourceTemplates:O(Uc)}),ni=Ye.extend({uri:m()}),Jc=ni,Gc=Ue.extend({method:C("resources/read"),params:Jc}),Bc=Fe.extend({contents:O(ie([Ho,Jo]))}),Kc=ot.extend({method:C("notifications/resources/list_changed"),params:it.optional()}),Wc=ni,Yc=Ue.extend({method:C("resources/subscribe"),params:Wc}),Xc=ni,Qc=Ue.extend({method:C("resources/unsubscribe"),params:Xc}),Bo=T({toolsListChanged:te().optional(),promptsListChanged:te().optional(),resourcesListChanged:te().optional(),resourceSubscriptions:O(m()).optional()}),el=Ye.extend({notifications:Bo}),tl=Ue.extend({method:C("subscriptions/listen"),params:el}),rl=it.extend({notifications:Bo}),nl=ot.extend({method:C("notifications/subscriptions/acknowledged"),params:rl}),il=Co.extend({[tn]:br}),ol=Fe.extend({_meta:il}),al=it.extend({uri:m()}),sl=ot.extend({method:C("notifications/resources/updated"),params:al}),cl=T({name:m(),description:se(m()),required:se(te())}),ll=T({...Kt.shape,...Sr.shape,description:se(m()),arguments:se(O(cl)),_meta:se(de({}))}),ul=$r.extend({method:C("prompts/list")}),dl=wr.extend({prompts:O(ll)}),ml=Ye.extend({name:m(),arguments:Q(m(),m()).optional()}),pl=Ue.extend({method:C("prompts/get"),params:ml}),ii=T({type:C("text"),text:m(),annotations:Xt.optional(),_meta:Q(m(),ae()).optional()}),oi=T({type:C("image"),data:eg,mimeType:m(),annotations:Xt.optional(),_meta:Q(m(),ae()).optional()}),ai=T({type:C("audio"),data:eg,mimeType:m(),annotations:Xt.optional(),_meta:Q(m(),ae()).optional()}),hl=T({type:C("tool_use"),name:m(),id:m(),input:Q(m(),ae()),_meta:Q(m(),ae()).optional()}),fl=T({type:C("resource"),resource:ie([Ho,Jo]),annotations:Xt.optional(),_meta:Q(m(),ae()).optional()}),gl=Go.extend({type:C("resource_link")}),si=ie([ii,oi,ai,gl,fl]),vl=T({role:zr,content:si}),yl=Fe.extend({description:m().optional(),messages:O(vl)}),_l=ot.extend({method:C("notifications/prompts/list_changed"),params:it.optional()}),bl=T({title:m().optional(),readOnlyHint:te().optional(),destructiveHint:te().optional(),idempotentHint:te().optional(),openWorldHint:te().optional()}),Sl=T({taskSupport:ge(["required","optional","forbidden"]).optional()}),Ko=T({...Kt.shape,...Sr.shape,description:m().optional(),inputSchema:T({type:C("object"),properties:Q(m(),yr).optional(),required:O(m()).optional()}).catchall(ae()),outputSchema:de({$schema:m().optional()}).optional(),annotations:bl.optional(),execution:Sl.optional(),_meta:Q(m(),ae()).optional()}),$l=$r.extend({method:C("tools/list")}),wl=wr.extend({tools:O(Ko)}),Wo=Fe.extend({content:O(si).default([]),structuredContent:ae().optional(),isError:te().optional()}),tg=Wo.or(Fe.extend({toolResult:ae()})),zl=nn.extend({name:m(),arguments:Q(m(),ae()).optional()}),Il=Ue.extend({method:C("tools/call"),params:zl}),Rl=ot.extend({method:C("notifications/tools/list_changed"),params:it.optional()}),rg=T({autoRefresh:te().default(!0),debounceMs:H().int().nonnegative().default(300)}),Ir=ge(["debug","info","notice","warning","error","critical","alert","emergency"]),kl=Ye.extend({level:Ir}),Tl=Ue.extend({method:C("logging/setLevel"),params:kl}),El=it.extend({level:Ir,logger:m().optional(),data:ae()}),Pl=ot.extend({method:C("notifications/message"),params:El}),xl=T({name:m().optional()}),jl=T({hints:O(xl).optional(),costPriority:H().min(0).max(1).optional(),speedPriority:H().min(0).max(1).optional(),intelligencePriority:H().min(0).max(1).optional()}),Al=T({mode:ge(["auto","required","none"]).optional()}),Ol=T({type:C("tool_result"),toolUseId:m().describe("The unique identifier for the corresponding tool call."),content:O(si),structuredContent:ae().optional(),isError:te().optional(),_meta:Q(m(),ae()).optional()}),Cl=gr("type",[ii,oi,ai]),Qr=gr("type",[ii,oi,ai,hl,Ol]),Nl=T({role:zr,content:ie([Qr,O(Qr)]),_meta:Q(m(),ae()).optional()}),Ll=nn.extend({messages:O(Nl),modelPreferences:jl.optional(),systemPrompt:m().optional(),includeContext:ge(["none","thisServer","allServers"]).optional(),temperature:H().optional(),maxTokens:H().int(),stopSequences:O(m()).optional(),metadata:De.optional(),tools:O(Ko).optional(),toolChoice:Al.optional()}),ql=Ue.extend({method:C("sampling/createMessage"),params:Ll}),Ml=Fe.extend({model:m(),stopReason:se(ge(["endTurn","stopSequence","maxTokens"]).or(m())),role:zr,content:Cl}),Dl=Fe.extend({model:m(),stopReason:se(ge(["endTurn","stopSequence","maxTokens","toolUse"]).or(m())),role:zr,content:ie([Qr,O(Qr)])}),Yo=T({type:C("boolean"),title:m().optional(),description:m().optional(),default:te().optional()}),ci=T({type:C("string"),title:m().optional(),description:m().optional(),minLength:H().optional(),maxLength:H().optional(),format:ge(["email","uri","date","date-time"]).optional(),default:m().optional()}),li=T({type:ge(["number","integer"]),title:m().optional(),description:m().optional(),minimum:H().optional(),maximum:H().optional(),default:H().optional()}),Xo=T({type:C("string"),title:m().optional(),description:m().optional(),enum:O(m()),default:m().optional()}),Qo=T({type:C("string"),title:m().optional(),description:m().optional(),oneOf:O(T({const:m(),title:m()})),default:m().optional()}),ea=T({type:C("string"),title:m().optional(),description:m().optional(),enum:O(m()),enumNames:O(m()).optional(),default:m().optional()}),Ul=ie([Xo,Qo]),ta=T({type:C("array"),title:m().optional(),description:m().optional(),minItems:H().optional(),maxItems:H().optional(),items:T({type:C("string"),enum:O(m())}),default:O(m()).optional()}),ra=T({type:C("array"),title:m().optional(),description:m().optional(),minItems:H().optional(),maxItems:H().optional(),items:T({anyOf:O(T({const:m(),title:m()}))}),default:O(m()).optional()}),Fl=ie([ta,ra]),Vl=ie([ea,Ul,Fl]),na=ie([Vl,Yo,ci,li]),ui=nn.extend({mode:C("form").optional(),message:m(),requestedSchema:T({type:C("object"),properties:Q(m(),na),required:O(m()).optional()}).catchall(ae())}),Zl=nn.extend({mode:C("url"),message:m(),elicitationId:m(),url:m().url()}),Hl=ie([ui,Zl]),Jl=Ue.extend({method:C("elicitation/create"),params:Hl}),Gl=it.extend({elicitationId:m()}),Bl=ot.extend({method:C("notifications/elicitation/complete"),params:Gl}),Kl=Fe.extend({action:ge(["accept","decline","cancel"]),content:Bt(e=>e===null?void 0:e,Q(m(),ie([m(),H(),te(),O(m())])).optional())}),Wl=T({type:C("ref/resource"),uri:m()}),Yl=T({type:C("ref/prompt"),name:m()}),Xl=Ye.extend({ref:ie([Yl,Wl]),argument:T({name:m(),value:m()}),context:T({arguments:Q(m(),m()).optional()}).optional()}),Ql=Ue.extend({method:C("completion/complete"),params:Xl}),eu=Fe.extend({completion:de({values:O(m()).max(100),total:se(H().int()),hasMore:se(te())})}),tu=T({uri:m().startsWith("file://"),name:m().optional(),_meta:Q(m(),ae()).optional()}),ru=Ue.extend({method:C("roots/list"),params:Ye.optional()}),nu=Fe.extend({roots:O(tu)}),iu=ot.extend({method:C("notifications/roots/list_changed"),params:it.optional()}),ng=de({ttl:H().optional(),pollInterval:H().optional()}),ou=ge(["working","input_required","completed","failed","cancelled"]),Rr=T({taskId:m(),status:ou,ttl:ie([H(),Dt()]),createdAt:m(),lastUpdatedAt:m(),pollInterval:se(H()),statusMessage:se(m())}),ig=Fe.extend({task:Rr}),au=it.merge(Rr),og=ot.extend({method:C("notifications/tasks/status"),params:au}),ag=Ue.extend({method:C("tasks/get"),params:Ye.extend({taskId:m()})}),sg=Fe.merge(Rr),cg=Ue.extend({method:C("tasks/result"),params:Ye.extend({taskId:m()})}),lg=Fe.loose(),ug=$r.extend({method:C("tasks/list")}),dg=wr.extend({tasks:O(Rr)}),mg=Ue.extend({method:C("tasks/cancel"),params:Ye.extend({taskId:m()})}),pg=Fe.merge(Rr),hg=ie([Fo,Ac,Nc,Ql,Tl,pl,ul,Fc,Zc,Gc,Yc,Qc,tl,Il,$l]),fg=ie([Do,Vo,Cc,iu]),gg=ie([Mo,Ml,Dl,Kl,nu]),vg=ie([Fo,ql,Jl,ru]),yg=ie([Do,Vo,Pl,sl,Kc,Rl,_l,nl,Bl]),_g=ie([Mo,Oc,Lc,eu,yl,dl,Vc,Hc,Bc,Wo,wl,ol]),We=Bn().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Wf.custom,message:"URL must be parseable",fatal:!0}),Xi}).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"}),bg=de({resource:m().url(),authorization_servers:O(We).optional(),jwks_uri:m().url().optional(),scopes_supported:O(m()).optional(),bearer_methods_supported:O(m()).optional(),resource_signing_alg_values_supported:O(m()).optional(),resource_name:m().optional(),resource_documentation:m().optional(),resource_policy_uri:m().url().optional(),resource_tos_uri:m().url().optional(),tls_client_certificate_bound_access_tokens:te().optional(),authorization_details_types_supported:O(m()).optional(),dpop_signing_alg_values_supported:O(m()).optional(),dpop_bound_access_tokens_required:te().optional()}),su=de({issuer:m(),authorization_endpoint:We,token_endpoint:We,registration_endpoint:We.optional(),scopes_supported:O(m()).optional(),response_types_supported:O(m()),response_modes_supported:O(m()).optional(),grant_types_supported:O(m()).optional(),token_endpoint_auth_methods_supported:O(m()).optional(),token_endpoint_auth_signing_alg_values_supported:O(m()).optional(),service_documentation:We.optional(),revocation_endpoint:We.optional(),revocation_endpoint_auth_methods_supported:O(m()).optional(),revocation_endpoint_auth_signing_alg_values_supported:O(m()).optional(),introspection_endpoint:m().optional(),introspection_endpoint_auth_methods_supported:O(m()).optional(),introspection_endpoint_auth_signing_alg_values_supported:O(m()).optional(),code_challenge_methods_supported:O(m()).optional(),client_id_metadata_document_supported:te().optional(),authorization_response_iss_parameter_supported:te().optional().catch(void 0)}),cu=de({issuer:m(),authorization_endpoint:We,token_endpoint:We,userinfo_endpoint:We.optional(),jwks_uri:We,registration_endpoint:We.optional(),scopes_supported:O(m()).optional(),response_types_supported:O(m()),response_modes_supported:O(m()).optional(),grant_types_supported:O(m()).optional(),acr_values_supported:O(m()).optional(),subject_types_supported:O(m()),id_token_signing_alg_values_supported:O(m()),id_token_encryption_alg_values_supported:O(m()).optional(),id_token_encryption_enc_values_supported:O(m()).optional(),userinfo_signing_alg_values_supported:O(m()).optional(),userinfo_encryption_alg_values_supported:O(m()).optional(),userinfo_encryption_enc_values_supported:O(m()).optional(),request_object_signing_alg_values_supported:O(m()).optional(),request_object_encryption_alg_values_supported:O(m()).optional(),request_object_encryption_enc_values_supported:O(m()).optional(),token_endpoint_auth_methods_supported:O(m()).optional(),token_endpoint_auth_signing_alg_values_supported:O(m()).optional(),display_values_supported:O(m()).optional(),claim_types_supported:O(m()).optional(),claims_supported:O(m()).optional(),service_documentation:m().optional(),claims_locales_supported:O(m()).optional(),ui_locales_supported:O(m()).optional(),claims_parameter_supported:te().optional(),request_parameter_supported:te().optional(),request_uri_parameter_supported:te().optional(),require_request_uri_registration:te().optional(),op_policy_uri:We.optional(),op_tos_uri:We.optional(),client_id_metadata_document_supported:te().optional(),authorization_response_iss_parameter_supported:te().optional().catch(void 0)}),Sg=T({...cu.shape,...su.pick({code_challenge_methods_supported:!0}).shape}),$g=T({access_token:m(),id_token:m().optional(),token_type:m(),expires_in:xo.number().optional(),scope:m().optional(),refresh_token:m().optional()}).strip(),wg=T({issued_token_type:C("urn:ietf:params:oauth:token-type:id-jag"),access_token:m(),token_type:m().optional(),expires_in:H().optional(),scope:m().optional()}).strip(),zg=T({error:m(),error_description:m().optional(),error_uri:m().optional()}),Yf=We.optional().or(C("").transform(()=>{})),lu=T({redirect_uris:O(We),token_endpoint_auth_method:m().optional(),grant_types:O(m()).optional(),response_types:O(m()).optional(),application_type:m().optional(),client_name:m().optional(),client_uri:We.optional(),logo_uri:Yf,scope:m().optional(),contacts:O(m()).optional(),tos_uri:Yf,policy_uri:m().optional(),jwks_uri:We.optional(),jwks:yc().optional(),software_id:m().optional(),software_version:m().optional(),software_statement:m().optional()}).strip(),uu=T({client_id:m(),client_secret:m().optional(),client_id_issued_at:H().optional(),client_secret_expires_at:H().optional()}).strip(),Ig=lu.merge(uu),Rg=T({error:m(),error_description:m().optional()}).strip(),kg=T({token:m(),token_type_hint:m().optional()}).strip();var xg=Symbol.for("mcp.sdk.errorBrands");function Cg(e,t){let n=new Set,i=t;for(;typeof i=="function";){let r=i.mcpBrand;Object.prototype.hasOwnProperty.call(i,"mcpBrand")&&typeof r=="string"&&n.add(r),i=Object.getPrototypeOf(i)}n.size!==0&&Object.defineProperty(e,xg,{value:n,enumerable:!1,configurable:!0})}function mi(e,t){try{if(typeof t=="object"&&t!==null&&Object.prototype.hasOwnProperty.call(e,"mcpBrand")&&typeof e.mcpBrand=="string"&&Object.prototype.hasOwnProperty.call(t,xg)){let n=t[xg];if(n&&typeof n.has=="function"&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}var n0=class Zb extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthError"})}static[Symbol.hasInstance](t){return mi(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 mi(this,t)}constructor(t,n,i){super(n),this.code=t,this.errorUri=i,this.name="OAuthError",Cg(this,new.target)}toResponseObject(){let t={error:this.code,error_description:this.message};return this.errorUri&&(t.error_uri=this.errorUri),t}static fromResponse(t){return new Zb(t.error,t.error_description??t.error,t.error_uri)}},ze=(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 mi(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 mi(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name="SdkError",Cg(this,new.target)}},i0=class extends ye{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkHttpError"})}constructor(e,t,n){super(e,t,n),this.name="SdkHttpError"}get status(){return this.data.status}get statusText(){return this.data.statusText}};function jb(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function o0(e,t,n){return e==="elicitation"&&t==="form"&&n.form===void 0&&n.url===void 0}function Hb(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 yu(e,t){let n={};for(let[i,r]of Object.entries(e)){if(r===void 0)continue;let o=t===void 0?void 0:t[i];if(o===void 0){n[i]=r;continue}if(jb(r)&&jb(o)){let a={};for(let[s,c]of Object.entries(r))c!==void 0&&o[s]===void 0&&!o0(i,s,o)&&(a[s]=c);Object.keys(a).length>0&&(n[i]=a)}}return Object.keys(n).length>0?n:void 0}var Jb="2026-07-28",Tr=[Jb];function hi(e){return e>=Jb}function Gb(e){return e.filter(t=>!hi(t))}function Ng(e){return e.filter(t=>hi(t))}function Bb(e){let t=e.structuredContent;return t===void 0||!(typeof t!="object"||t===null||Array.isArray(t))||(e.content?.some(n=>n.type==="text")??!1)?e:{...e,content:[...e.content??[],{type:"text",text:JSON.stringify(t)}]}}var Kb=["task","inputRequests","requestState"];function Lg(e){return e===null||typeof e!="object"||Array.isArray(e)||e.content!==void 0||Kb.some(t=>t in e)?e:{...e,content:[]}}function a0(){let e=vr(()=>ie([m(),H(),te(),Dt(),Q(m(),e),O(e)])),t=Q(m(),e),n=ie([m(),H().int()]),i=m(),r=T({ttl:H().optional()}),o=T({taskId:m()}),a=de({progressToken:n.optional(),"io.modelcontextprotocol/related-task":o.optional()}),s=T({_meta:a.optional()}),c=s.extend({task:r.optional()}),u=T({method:m(),params:s.loose().optional()}),d=T({_meta:a.optional()}),p=T({method:m(),params:d.loose().optional()}),f=de({_meta:a.optional()}),b=ie([m(),H().int()]),v=f.strict(),$=d.extend({requestId:b.optional(),reason:m().optional()}),y=p.extend({method:C("notifications/cancelled"),params:$}),h=T({src:m(),mimeType:m().optional(),sizes:O(m()).optional(),theme:ge(["light","dark"]).optional()}),z=T({icons:O(h).optional()}),g=T({name:m(),title:m().optional()}),S=g.extend({...g.shape,...z.shape,version:m(),websiteUrl:m().optional(),description:m().optional()}),k=Et(T({applyDefaults:te().optional()}),t),w=Bt(rt=>rt&&typeof rt=="object"&&!Array.isArray(rt)&&Object.keys(rt).length===0?{form:{}}:rt,Et(T({form:k.optional(),url:t.optional()}),t.optional())),_=de({list:t.optional(),cancel:t.optional(),requests:de({sampling:de({createMessage:t.optional()}).optional(),elicitation:de({create:t.optional()}).optional()}).optional()}),I=de({list:t.optional(),cancel:t.optional(),requests:de({tools:de({call:t.optional()}).optional()}).optional()}),j=T({experimental:Q(m(),t).optional(),sampling:T({context:t.optional(),tools:t.optional()}).optional(),elicitation:w.optional(),roots:T({listChanged:te().optional()}).optional(),tasks:_.optional(),extensions:Q(m(),t).optional()}),U=s.extend({protocolVersion:m(),capabilities:j,clientInfo:S}),N=u.extend({method:C("initialize"),params:U}),F=T({experimental:Q(m(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:T({listChanged:te().optional()}).optional(),resources:T({subscribe:te().optional(),listChanged:te().optional()}).optional(),tools:T({listChanged:te().optional()}).optional(),tasks:I.optional(),extensions:Q(m(),t).optional()}),ee=f.extend({protocolVersion:m(),capabilities:F,serverInfo:S,instructions:m().optional()}),ne=p.extend({method:C("notifications/initialized"),params:d.optional()}),we=u.extend({method:C("ping"),params:s.optional()}),Ne=T({progress:H(),total:se(H()),message:se(m())}),Ae=T({...d.shape,...Ne.shape,progressToken:n}),Je=p.extend({method:C("notifications/progress"),params:Ae}),ke=s.extend({cursor:i.optional()}),x=u.extend({params:ke.optional()}),M=f.extend({nextCursor:i.optional()}),J=T({uri:m(),mimeType:se(m()),_meta:Q(m(),ae()).optional()}),R=J.extend({text:m()}),P=m().refine(rt=>{try{return atob(rt),!0}catch{return!1}},{message:"Invalid Base64 string"}),L=J.extend({blob:P}),Y=ge(["user","assistant"]),ue=T({audience:O(Y).optional(),priority:H().min(0).max(1).optional(),lastModified:bt.datetime({offset:!0}).optional()}),Se=T({...g.shape,...z.shape,uri:m(),description:se(m()),mimeType:se(m()),size:se(H()),annotations:ue.optional(),_meta:se(de({}))}),fe=T({...g.shape,...z.shape,uriTemplate:m(),description:se(m()),mimeType:se(m()),annotations:ue.optional(),_meta:se(de({}))}),Oe=x.extend({method:C("resources/list")}),at=M.extend({resources:O(Se)}),E=x.extend({method:C("resources/templates/list")}),D=M.extend({resourceTemplates:O(fe)}),V=s.extend({uri:m()}),pe=V,he=u.extend({method:C("resources/read"),params:pe}),be=f.extend({contents:O(ie([R,L]))}),Ve=p.extend({method:C("notifications/resources/list_changed"),params:d.optional()}),Be=V,et=u.extend({method:C("resources/subscribe"),params:Be}),Ge=V,Le=u.extend({method:C("resources/unsubscribe"),params:Ge}),St=d.extend({uri:m()}),Ke=p.extend({method:C("notifications/resources/updated"),params:St}),Ft=T({name:m(),description:se(m()),required:se(te())}),It=T({...g.shape,...z.shape,description:se(m()),arguments:se(O(Ft)),_meta:se(de({}))}),Vt=x.extend({method:C("prompts/list")}),tr=M.extend({prompts:O(It)}),rr=s.extend({name:m(),arguments:Q(m(),m()).optional()}),Or=u.extend({method:C("prompts/get"),params:rr}),Cr=T({type:C("text"),text:m(),annotations:ue.optional(),_meta:Q(m(),ae()).optional()}),Nr=T({type:C("image"),data:P,mimeType:m(),annotations:ue.optional(),_meta:Q(m(),ae()).optional()}),Lr=T({type:C("audio"),data:P,mimeType:m(),annotations:ue.optional(),_meta:Q(m(),ae()).optional()}),Ii=T({type:C("tool_use"),name:m(),id:m(),input:Q(m(),ae()),_meta:Q(m(),ae()).optional()}),nr=T({type:C("resource"),resource:ie([R,L]),annotations:ue.optional(),_meta:Q(m(),ae()).optional()}),Ri=Se.extend({type:C("resource_link")}),$t=ie([Cr,Nr,Lr,Ri,nr]),dn=T({role:Y,content:$t}),mn=f.extend({description:m().optional(),messages:O(dn)}),qr=p.extend({method:C("notifications/prompts/list_changed"),params:d.optional()}),ki=T({title:m().optional(),readOnlyHint:te().optional(),destructiveHint:te().optional(),idempotentHint:te().optional(),openWorldHint:te().optional()}),pn=T({taskSupport:ge(["required","optional","forbidden"]).optional()}),Mr=T({...g.shape,...z.shape,description:m().optional(),inputSchema:T({type:C("object"),properties:Q(m(),e).optional(),required:O(m()).optional()}).catchall(ae()),outputSchema:T({type:C("object"),properties:Q(m(),e).optional(),required:O(m()).optional()}).catchall(ae()).optional(),annotations:ki.optional(),execution:pn.optional(),_meta:Q(m(),ae()).optional()}),hn=x.extend({method:C("tools/list")}),fn=M.extend({tools:O(Mr)}),gn=f.extend({content:O($t),structuredContent:Q(m(),ae()).optional(),isError:te().optional()}),tt=c.extend({name:m(),arguments:Q(m(),ae()).optional()}),Ti=u.extend({method:C("tools/call"),params:tt}),$a=p.extend({method:C("notifications/tools/list_changed"),params:d.optional()}),vn=ge(["debug","info","notice","warning","error","critical","alert","emergency"]),Ei=s.extend({level:vn}),Pi=u.extend({method:C("logging/setLevel"),params:Ei}),xi=d.extend({level:vn,logger:m().optional(),data:ae()}),ji=p.extend({method:C("notifications/message"),params:xi}),Ai=T({name:m().optional()}),Oi=T({hints:O(Ai).optional(),costPriority:H().min(0).max(1).optional(),speedPriority:H().min(0).max(1).optional(),intelligencePriority:H().min(0).max(1).optional()}),Ci=T({mode:ge(["auto","required","none"]).optional()}),wa=T({type:C("tool_result"),toolUseId:m().describe("The unique identifier for the corresponding tool call."),content:O($t),structuredContent:T({}).loose().optional(),isError:te().optional(),_meta:Q(m(),ae()).optional()}),Ni=gr("type",[Cr,Nr,Lr]),ir=gr("type",[Cr,Nr,Lr,Ii,wa]),Li=T({role:Y,content:ie([ir,O(ir)]),_meta:Q(m(),ae()).optional()}),qi=c.extend({messages:O(Li),modelPreferences:Oi.optional(),systemPrompt:m().optional(),includeContext:ge(["none","thisServer","allServers"]).optional(),temperature:H().optional(),maxTokens:H().int(),stopSequences:O(m()).optional(),metadata:t.optional(),tools:O(Mr).optional(),toolChoice:Ci.optional()}),Mi=u.extend({method:C("sampling/createMessage"),params:qi}),Di=f.extend({model:m(),stopReason:se(ge(["endTurn","stopSequence","maxTokens"]).or(m())),role:Y,content:Ni}),Ui=f.extend({model:m(),stopReason:se(ge(["endTurn","stopSequence","maxTokens","toolUse"]).or(m())),role:Y,content:ie([ir,O(ir)])}),Fi=T({type:C("boolean"),title:m().optional(),description:m().optional(),default:te().optional()}),Vi=T({type:C("string"),title:m().optional(),description:m().optional(),minLength:H().optional(),maxLength:H().optional(),format:ge(["email","uri","date","date-time"]).optional(),default:m().optional()}),Zi=T({type:ge(["number","integer"]),title:m().optional(),description:m().optional(),minimum:H().optional(),maximum:H().optional(),default:H().optional()}),Hi=T({type:C("string"),title:m().optional(),description:m().optional(),enum:O(m()),default:m().optional()}),Ji=T({type:C("string"),title:m().optional(),description:m().optional(),oneOf:O(T({const:m(),title:m()})),default:m().optional()}),Gi=T({type:C("string"),title:m().optional(),description:m().optional(),enum:O(m()),enumNames:O(m()).optional(),default:m().optional()}),Bi=ie([Hi,Ji]),Dr=T({type:C("array"),title:m().optional(),description:m().optional(),minItems:H().optional(),maxItems:H().optional(),items:T({type:C("string"),enum:O(m())}),default:O(m()).optional()}),Ur=T({type:C("array"),title:m().optional(),description:m().optional(),minItems:H().optional(),maxItems:H().optional(),items:T({anyOf:O(T({const:m(),title:m()}))}),default:O(m()).optional()}),za=ie([Dr,Ur]),Ia=ie([Gi,Bi,za]),gt=ie([Ia,Fi,Vi,Zi]),vt=c.extend({mode:C("form").optional(),message:m(),requestedSchema:T({type:C("object"),properties:Q(m(),gt),required:O(m()).optional()}).catchall(ae())}),Ki=c.extend({mode:C("url"),message:m(),elicitationId:m(),url:m().url()}),Rt=ie([vt,Ki]),Ra=u.extend({method:C("elicitation/create"),params:Rt}),ka=d.extend({elicitationId:m()}),Ta=p.extend({method:C("notifications/elicitation/complete"),params:ka}),Ea=f.extend({action:ge(["accept","decline","cancel"]),content:Bt(rt=>rt===null?void 0:rt,Q(m(),ie([m(),H(),te(),O(m())])).optional())}),Pa=T({type:C("ref/resource"),uri:m()}),xa=T({type:C("ref/prompt"),name:m()}),ja=s.extend({ref:ie([xa,Pa]),argument:T({name:m(),value:m()}),context:T({arguments:Q(m(),m()).optional()}).optional()}),Wi=u.extend({method:C("completion/complete"),params:ja}),Aa=f.extend({completion:de({values:O(m()).max(100),total:se(H().int()),hasMore:se(te())})}),Oa=T({uri:m().startsWith("file://"),name:m().optional(),_meta:Q(m(),ae()).optional()}),yn=u.extend({method:C("roots/list"),params:s.optional()}),Yi=f.extend({roots:O(Oa)}),Ca=p.extend({method:C("notifications/roots/list_changed"),params:d.optional()}),Na=de({ttl:H().optional(),pollInterval:H().optional()}),La=ge(["working","input_required","completed","failed","cancelled"]),or=T({taskId:m(),status:La,ttl:ie([H(),Dt()]),createdAt:m(),lastUpdatedAt:m(),pollInterval:se(H()),statusMessage:se(m())}),dt=f.extend({task:or}),qa=d.merge(or),Fr=p.extend({method:C("notifications/tasks/status"),params:qa}),_n=u.extend({method:C("tasks/get"),params:s.extend({taskId:m()})}),bn=f.merge(or),Sn=u.extend({method:C("tasks/result"),params:s.extend({taskId:m()})}),td=f.loose(),mt=x.extend({method:C("tasks/list")}),Ze=M.extend({tasks:O(or)}),Vr=u.extend({method:C("tasks/cancel"),params:s.extend({taskId:m()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:i,TaskMetadataSchema:r,RelatedTaskMetadataSchema:o,RequestMetaSchema:a,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:u,NotificationsParamsSchema:d,NotificationSchema:p,ResultSchema:f,RequestIdSchema:b,EmptyResultSchema:v,CancelledNotificationParamsSchema:$,CancelledNotificationSchema:y,IconSchema:h,IconsSchema:z,BaseMetadataSchema:g,ImplementationSchema:S,ClientTasksCapabilitySchema:_,ServerTasksCapabilitySchema:I,ClientCapabilitiesSchema:j,InitializeRequestParamsSchema:U,InitializeRequestSchema:N,ServerCapabilitiesSchema:F,InitializeResultSchema:ee,InitializedNotificationSchema:ne,PingRequestSchema:we,ProgressSchema:Ne,ProgressNotificationParamsSchema:Ae,ProgressNotificationSchema:Je,PaginatedRequestParamsSchema:ke,PaginatedRequestSchema:x,PaginatedResultSchema:M,ResourceContentsSchema:J,TextResourceContentsSchema:R,BlobResourceContentsSchema:L,RoleSchema:Y,AnnotationsSchema:ue,ResourceSchema:Se,ResourceTemplateSchema:fe,ListResourcesRequestSchema:Oe,ListResourcesResultSchema:at,ListResourceTemplatesRequestSchema:E,ListResourceTemplatesResultSchema:D,ResourceRequestParamsSchema:V,ReadResourceRequestParamsSchema:pe,ReadResourceRequestSchema:he,ReadResourceResultSchema:be,ResourceListChangedNotificationSchema:Ve,SubscribeRequestParamsSchema:Be,SubscribeRequestSchema:et,UnsubscribeRequestParamsSchema:Ge,UnsubscribeRequestSchema:Le,ResourceUpdatedNotificationParamsSchema:St,ResourceUpdatedNotificationSchema:Ke,PromptArgumentSchema:Ft,PromptSchema:It,ListPromptsRequestSchema:Vt,ListPromptsResultSchema:tr,GetPromptRequestParamsSchema:rr,GetPromptRequestSchema:Or,TextContentSchema:Cr,ImageContentSchema:Nr,AudioContentSchema:Lr,ToolUseContentSchema:Ii,EmbeddedResourceSchema:nr,ResourceLinkSchema:Ri,ContentBlockSchema:$t,PromptMessageSchema:dn,GetPromptResultSchema:mn,PromptListChangedNotificationSchema:qr,ToolAnnotationsSchema:ki,ToolExecutionSchema:pn,ToolSchema:Mr,ListToolsRequestSchema:hn,ListToolsResultSchema:fn,CallToolResultSchema:gn,CallToolRequestParamsSchema:tt,CallToolRequestSchema:Ti,ToolListChangedNotificationSchema:$a,LoggingLevelSchema:vn,SetLevelRequestParamsSchema:Ei,SetLevelRequestSchema:Pi,LoggingMessageNotificationParamsSchema:xi,LoggingMessageNotificationSchema:ji,ModelHintSchema:Ai,ModelPreferencesSchema:Oi,ToolChoiceSchema:Ci,ToolResultContentSchema:wa,SamplingContentSchema:Ni,SamplingMessageContentBlockSchema:ir,SamplingMessageSchema:Li,CreateMessageRequestParamsSchema:qi,CreateMessageRequestSchema:Mi,CreateMessageResultSchema:Di,CreateMessageResultWithToolsSchema:Ui,BooleanSchemaSchema:Fi,StringSchemaSchema:Vi,NumberSchemaSchema:Zi,UntitledSingleSelectEnumSchemaSchema:Hi,TitledSingleSelectEnumSchemaSchema:Ji,LegacyTitledEnumSchemaSchema:Gi,SingleSelectEnumSchemaSchema:Bi,UntitledMultiSelectEnumSchemaSchema:Dr,TitledMultiSelectEnumSchemaSchema:Ur,MultiSelectEnumSchemaSchema:za,EnumSchemaSchema:Ia,PrimitiveSchemaDefinitionSchema:gt,ElicitRequestFormParamsSchema:vt,ElicitRequestURLParamsSchema:Ki,ElicitRequestParamsSchema:Rt,ElicitRequestSchema:Ra,ElicitationCompleteNotificationParamsSchema:ka,ElicitationCompleteNotificationSchema:Ta,ElicitResultSchema:Ea,ResourceTemplateReferenceSchema:Pa,PromptReferenceSchema:xa,CompleteRequestParamsSchema:ja,CompleteRequestSchema:Wi,CompleteResultSchema:Aa,RootSchema:Oa,ListRootsRequestSchema:yn,ListRootsResultSchema:Yi,RootsListChangedNotificationSchema:Ca,TaskCreationParamsSchema:Na,TaskStatusSchema:La,TaskSchema:or,CreateTaskResultSchema:dt,TaskStatusNotificationParamsSchema:qa,TaskStatusNotificationSchema:Fr,GetTaskRequestSchema:_n,GetTaskResultSchema:bn,GetTaskPayloadRequestSchema:Sn,GetTaskPayloadResultSchema:td,ListTasksRequestSchema:mt,ListTasksResultSchema:Ze,CancelTaskRequestSchema:Vr,CancelTaskResultSchema:f.merge(or),ClientRequestSchema:ie([we,N,Wi,Pi,Or,Vt,Oe,E,he,et,Le,Ti,hn,_n,Sn,mt,Vr]),ClientNotificationSchema:ie([y,Je,ne,Ca,Fr]),ClientResultSchema:ie([v,Di,Ui,Ea,Yi,bn,Ze,dt]),ServerRequestSchema:ie([we,Mi,Ra,yn,_n,Sn,mt,Vr]),ServerNotificationSchema:ie([y,Je,ji,Ke,Ve,$a,qr,Fr,Ta]),ServerResultSchema:ie([v,ee,Aa,mn,tr,at,D,be,gn,fn,bn,Ze,dt]),CallToolResultWireSchema:ae().superRefine((rt,tz)=>{if(!(typeof rt!="object"||rt===null||Array.isArray(rt)||rt.content!==void 0)){for(let Tv of Kb)if(Tv in rt){tz.addIssue({code:"custom",message:`content is required when the body carries '${Tv}' \u2014 another result family cannot default into an empty tools/call success`});return}}}).transform(Lg).pipe(gn)}}var s0;function Wb(){return s0??=a0()}function Yb(e){return e.type!=="object"}var c0=new Set(["const","enum","default","examples"]),l0=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas","dependencies"]);function Ab(e){return e!==void 0&&!(typeof e=="string"&&e.startsWith("#"))}function u0(e){let t=typeof e.$schema=="string"?e.$schema:void 0;if(Ab(e.$id))return{...t!==void 0&&{$schema:t},type:"object",properties:{result:e},required:["result"]};let n=xv(e.$schema)&&e.$recursiveAnchor!==!0,i=(r,o)=>{if(Array.isArray(r))return r.map(c=>i(c,!1));if(r===null||typeof r!="object"||!o&&Ab(r.$id))return r;let a={},s=!1;for(let[c,u]of Object.entries(r))o?a[c]=i(u,!1):(c==="$ref"||c==="$dynamicRef")&&typeof u=="string"?a[c]=u==="#"?"#/properties/result":u.startsWith("#/")?`#/properties/result${u.slice(1)}`:u:c==="$recursiveRef"&&u==="#"&&n?s=!0:c0.has(c)?a[c]=u:l0.has(c)?a[c]=i(u,!0):a[c]=i(u,!1);return s&&("$ref"in a?a.allOf=[...Array.isArray(a.allOf)?a.allOf:[],{$ref:"#/properties/result"}]:a.$ref="#/properties/result"),a};return{...t!==void 0&&{$schema:t},type:"object",properties:{result:i(e,!1)},required:["result"]}}var Xb={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},Qb={"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},d0={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},du;function qg(){if(du)return du;let e=Wb();return du={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}},du}function eS(e){return Object.prototype.hasOwnProperty.call(Xb,e)}function tS(e){return Object.prototype.hasOwnProperty.call(Qb,e)}function m0(e){return Object.prototype.hasOwnProperty.call(d0,e)}function p0(e){return m0(e)?qg().resultSchemas[e]:void 0}function h0(e){return eS(e)?qg().requestSchemas[e]:void 0}function f0(e){return tS(e)?qg().notificationSchemas[e]:void 0}var qA=Object.keys(Xb),MA=Object.keys(Qb);function jg(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function mu(e,t){if(e===void 0)return{ok:!1,reason:"not-in-era"};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:"invalid",message:String(n.error)}}var Ob={ok:!1,reason:"not-in-era"};function Cb(e){return jg(e)&&jg(e.outputSchema)&&Yb(e.outputSchema)}var Mg={era:"2025-11-25",hasRequestMethod:eS,hasNotificationMethod:tS,validateRequest:(e,t)=>mu(h0(e),t),validateResult:(e,t)=>mu(p0(e),t),validateNotification:(e,t)=>mu(f0(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>Ob,validateInputResponse:()=>Ob,samplingResultVariant:((e,t)=>{let n=Wb();return mu(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>{},validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=Bb(e),i=n.structuredContent;if(i===void 0)return n;let r=typeof i!="object"||i===null||Array.isArray(i),o=t!==void 0&&Yb(t);return!r&&!o?n:{...n,structuredContent:{result:i}}},decodeResult(e,t){if(jg(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(i=>Cb(i))?t:{...t,tools:n.map(i=>Cb(i)?{...i,outputSchema:u0(i.outputSchema)}:i)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>{}};function g0(){let e=vr(()=>ie([m(),H(),te(),Dt(),Q(m(),e),O(e)])),t=Q(m(),e),n=ie([m(),H().int()]),i=m(),r=ie([m(),H().int()]),o=ge(["user","assistant"]),a=ge(["debug","info","notice","warning","error","critical","alert","emergency"]),s=m().refine(Ze=>{try{return atob(Ze),!0}catch{return!1}},{message:"Invalid Base64 string"}),c=T({ttl:H().optional()}),u=T({taskId:m()}),d=de({progressToken:n.optional(),"io.modelcontextprotocol/related-task":u.optional()}),p=T({_meta:d.optional()}),f=p.extend({task:c.optional()}),b=T({_meta:d.optional()}),v=T({method:m(),params:b.loose().optional()}),$=T({src:m(),mimeType:m().optional(),sizes:O(m()).optional(),theme:ge(["light","dark"]).optional()}),y=T({icons:O($).optional()}),h=T({name:m(),title:m().optional()}),z=h.extend({...h.shape,...y.shape,version:m(),websiteUrl:m().optional(),description:m().optional()}),g=Et(T({applyDefaults:te().optional()}),t),S=Bt(Ze=>Ze&&typeof Ze=="object"&&!Array.isArray(Ze)&&Object.keys(Ze).length===0?{form:{}}:Ze,Et(T({form:g.optional(),url:t.optional()}),t.optional())),k=de({list:t.optional(),cancel:t.optional(),requests:de({sampling:de({createMessage:t.optional()}).optional(),elicitation:de({create:t.optional()}).optional()}).optional()}),w=de({list:t.optional(),cancel:t.optional(),requests:de({tools:de({call:t.optional()}).optional()}).optional()}),_=T({experimental:Q(m(),t).optional(),sampling:T({context:t.optional(),tools:t.optional()}).optional(),elicitation:S.optional(),roots:T({listChanged:te().optional()}).optional(),tasks:k.optional(),extensions:Q(m(),t).optional()}),I=T({experimental:Q(m(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:T({listChanged:te().optional()}).optional(),resources:T({subscribe:te().optional(),listChanged:te().optional()}).optional(),tools:T({listChanged:te().optional()}).optional(),tasks:w.optional(),extensions:Q(m(),t).optional()}),j=T({progress:H(),total:se(H()),message:se(m())}),U=T({...b.shape,...j.shape,progressToken:n}),N=v.extend({method:C("notifications/progress"),params:U}),F=b.extend({level:a,logger:m().optional(),data:ae()}),ee=v.extend({method:C("notifications/message"),params:F}),ne=T({uri:m(),mimeType:se(m()),_meta:Q(m(),ae()).optional()}),we=ne.extend({text:m()}),Ne=ne.extend({blob:s}),Ae=T({audience:O(o).optional(),priority:H().min(0).max(1).optional(),lastModified:bt.datetime({offset:!0}).optional()}),Je=T({...h.shape,...y.shape,uri:m(),description:se(m()),mimeType:se(m()),size:se(H()),annotations:Ae.optional(),_meta:se(de({}))}),ke=T({...h.shape,...y.shape,uriTemplate:m(),description:se(m()),mimeType:se(m()),annotations:Ae.optional(),_meta:se(de({}))}),x=v.extend({method:C("notifications/resources/list_changed"),params:b.optional()}),M=b.extend({uri:m()}),J=v.extend({method:C("notifications/resources/updated"),params:M}),R=T({name:m(),description:se(m()),required:se(te())}),P=T({...h.shape,...y.shape,description:se(m()),arguments:se(O(R)),_meta:se(de({}))}),L=v.extend({method:C("notifications/prompts/list_changed"),params:b.optional()}),Y=T({type:C("text"),text:m(),annotations:Ae.optional(),_meta:Q(m(),ae()).optional()}),ue=T({type:C("image"),data:s,mimeType:m(),annotations:Ae.optional(),_meta:Q(m(),ae()).optional()}),Se=T({type:C("audio"),data:s,mimeType:m(),annotations:Ae.optional(),_meta:Q(m(),ae()).optional()}),fe=T({type:C("tool_use"),name:m(),id:m(),input:Q(m(),ae()),_meta:Q(m(),ae()).optional()}),Oe=T({type:C("resource"),resource:ie([we,Ne]),annotations:Ae.optional(),_meta:Q(m(),ae()).optional()}),at=Je.extend({type:C("resource_link")}),E=ie([Y,ue,Se,at,Oe]),D=T({role:o,content:E}),V=T({title:m().optional(),readOnlyHint:te().optional(),destructiveHint:te().optional(),idempotentHint:te().optional(),openWorldHint:te().optional()}),pe=v.extend({method:C("notifications/tools/list_changed"),params:b.optional()}),he=T({name:m().optional()}),be=T({hints:O(he).optional(),costPriority:H().min(0).max(1).optional(),speedPriority:H().min(0).max(1).optional(),intelligencePriority:H().min(0).max(1).optional()}),Ve=T({mode:ge(["auto","required","none"]).optional()}),Be=T({type:C("boolean"),title:m().optional(),description:m().optional(),default:te().optional()}),et=T({type:C("string"),title:m().optional(),description:m().optional(),minLength:H().optional(),maxLength:H().optional(),format:ge(["email","uri","date","date-time"]).optional(),default:m().optional()}),Ge=T({type:ge(["number","integer"]),title:m().optional(),description:m().optional(),minimum:H().optional(),maximum:H().optional(),default:H().optional()}),Le=T({type:C("string"),title:m().optional(),description:m().optional(),enum:O(m()),default:m().optional()}),St=T({type:C("string"),title:m().optional(),description:m().optional(),oneOf:O(T({const:m(),title:m()})),default:m().optional()}),Ke=T({type:C("string"),title:m().optional(),description:m().optional(),enum:O(m()),enumNames:O(m()).optional(),default:m().optional()}),Ft=ie([Le,St]),It=T({type:C("array"),title:m().optional(),description:m().optional(),minItems:H().optional(),maxItems:H().optional(),items:T({type:C("string"),enum:O(m())}),default:O(m()).optional()}),Vt=T({type:C("array"),title:m().optional(),description:m().optional(),minItems:H().optional(),maxItems:H().optional(),items:T({anyOf:O(T({const:m(),title:m()}))}),default:O(m()).optional()}),tr=ie([It,Vt]),rr=ie([Ke,Ft,tr]),Or=ie([rr,Be,et,Ge]),Cr=f.extend({mode:C("form").optional(),message:m(),requestedSchema:T({type:C("object"),properties:Q(m(),Or),required:O(m()).optional()}).catchall(ae())}),Nr=T({type:C("ref/resource"),uri:m()}),Lr=T({type:C("ref/prompt"),name:m()}),Ii=T({uri:m().startsWith("file://"),name:m().optional(),_meta:Q(m(),ae()).optional()}),nr=_.shape,Ri=T({experimental:nr.experimental,sampling:nr.sampling,elicitation:nr.elicitation,roots:nr.roots,extensions:nr.extensions}),$t=I.shape,dn=T({experimental:$t.experimental,logging:$t.logging,completions:$t.completions,prompts:$t.prompts,resources:$t.resources,tools:$t.tools,extensions:$t.extensions}),mn=de({progressToken:n.optional(),[Wt]:m(),[Qn]:z.optional(),[Yt]:Ri,[_r]:a.optional()}),qr=T({...h.shape,...y.shape,description:m().optional(),inputSchema:de({$schema:m().optional(),type:C("object")}),outputSchema:de({$schema:m().optional()}).optional(),annotations:V.optional(),_meta:Q(m(),ae()).optional()}),ki=T({type:C("tool_result"),toolUseId:m(),content:O(E),structuredContent:ae().optional(),isError:te().optional(),_meta:Q(m(),ae()).optional()}),pn=ie([Y,ue,Se,fe,ki]),Mr=T({role:o,content:ie([pn,O(pn)]),_meta:Q(m(),ae()).optional()}),hn=m(),fn=de({[Ut]:z.optional().catch(void 0)}),gn=fn.optional();function tt(Ze){return de({_meta:gn,resultType:hn.default("complete"),...Ze})}let Ti=tt({}),$a=tt({nextCursor:i.optional()}),vn=tt({content:O(E),structuredContent:ae().optional(),isError:te().optional()}),Ei=tt({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),tools:O(qr),nextCursor:i.optional()}),Pi=tt({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),prompts:O(P),nextCursor:i.optional()}),xi=tt({description:m().optional(),messages:O(D)}),ji=tt({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),resources:O(Je),nextCursor:i.optional()}),Ai=tt({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),resourceTemplates:O(ke),nextCursor:i.optional()}),Oi=tt({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),contents:O(ie([we,Ne]))}),Ci=tt({completion:T({values:O(m()).max(100),total:H().int().optional(),hasMore:te().optional()}).loose()}),wa=tt({ttlMs:H().int().min(0),cacheScope:ge(["public","private"])}),Ni=tt({ttlMs:H().int().min(0).catch(0),cacheScope:ge(["public","private"]).catch("private"),supportedVersions:O(m()),capabilities:dn,instructions:m().optional()}),ir=T({messages:O(Mr),modelPreferences:be.optional(),systemPrompt:m().optional(),includeContext:ge(["none","thisServer","allServers"]).optional(),temperature:H().optional(),maxTokens:H().int(),stopSequences:O(m()).optional(),metadata:t.optional(),tools:O(qr).optional(),toolChoice:Ve.optional()}),Li=T({method:C("sampling/createMessage"),params:ir}),qi=T({method:C("roots/list"),params:T({_meta:Q(m(),ae()).optional()}).optional()}),Mi=T({...Mr.shape,model:m(),stopReason:m().optional()}),Di=T({roots:O(Ii)}),Ui=T({action:ge(["accept","decline","cancel"]),content:Q(m(),ie([m(),H(),te(),O(m())])).optional()}),Fi=T({mode:C("url"),message:m(),url:m().url()}),Vi=ie([Cr,Fi]),Zi=T({method:C("elicitation/create"),params:Vi}),Hi=ie([Li,qi,Zi]),Ji=ie([Mi,Di,Ui]),Gi=Q(m(),Hi),Bi=Q(m(),Ji),Dr=tt({inputRequests:Gi.optional(),requestState:m().optional()}),Ur={inputResponses:Bi.optional(),requestState:m().optional()},za=T({_meta:mn,...Ur}),Ia=de({progressToken:n.optional()});function gt(Ze,Vr){return T({method:C(Ze),params:T({_meta:mn,...Vr})})}function vt(Ze,Vr){return T({method:C(Ze),params:T({_meta:Ia.optional(),...Vr}).optional()})}let Ki={name:m(),arguments:Q(m(),ae()).optional(),...Ur},Rt={cursor:i.optional()},Ra=gt("tools/call",Ki),ka=gt("tools/list",Rt),Ta=gt("prompts/list",Rt),Ea=gt("prompts/get",{name:m(),arguments:Q(m(),m()).optional(),...Ur}),Pa=gt("resources/list",Rt),xa=gt("resources/templates/list",Rt),ja=gt("resources/read",{uri:m(),...Ur}),Wi={ref:ie([Lr,Nr]),argument:T({name:m(),value:m()}),context:T({arguments:Q(m(),m()).optional()}).optional()},Aa=gt("completion/complete",Wi),Oa=gt("server/discover",{}),yn=T({toolsListChanged:te().optional(),promptsListChanged:te().optional(),resourcesListChanged:te().optional(),resourceSubscriptions:O(m()).optional()}),Yi={notifications:yn},Ca=gt("subscriptions/listen",Yi),Na=fn.extend({"io.modelcontextprotocol/subscriptionId":r}),La=de({_meta:Na,resultType:hn.default("complete")}),or={"tools/call":vt("tools/call",Ki),"tools/list":vt("tools/list",Rt),"prompts/get":vt("prompts/get",{name:m(),arguments:Q(m(),m()).optional()}),"prompts/list":vt("prompts/list",Rt),"resources/list":vt("resources/list",Rt),"resources/templates/list":vt("resources/templates/list",Rt),"resources/read":vt("resources/read",{uri:m()}),"completion/complete":vt("completion/complete",Wi),"server/discover":vt("server/discover",{}),"subscriptions/listen":vt("subscriptions/listen",Yi)};function dt(Ze){return de({_meta:gn,...Ze})}let qa={"tools/call":dt({content:O(E),structuredContent:ae().optional(),isError:te().optional()}),"tools/list":dt({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),tools:O(qr),nextCursor:i.optional()}),"prompts/get":dt({description:m().optional(),messages:O(D)}),"prompts/list":dt({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),prompts:O(P),nextCursor:i.optional()}),"resources/list":dt({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),resources:O(Je),nextCursor:i.optional()}),"resources/templates/list":dt({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),resourceTemplates:O(ke),nextCursor:i.optional()}),"resources/read":dt({ttlMs:H().int().min(0),cacheScope:ge(["public","private"]),contents:O(ie([we,Ne]))}),"completion/complete":dt({completion:T({values:O(m()).max(100),total:H().int().optional(),hasMore:te().optional()}).loose()}),"server/discover":dt({ttlMs:H().int().min(0).catch(0),cacheScope:ge(["public","private"]).catch("private"),supportedVersions:O(m()),capabilities:dn,instructions:m().optional()}),"subscriptions/listen":dt({})},Fr=de({"io.modelcontextprotocol/subscriptionId":r.optional()}),_n=T({method:C("notifications/subscriptions/acknowledged"),params:T({_meta:Fr.optional(),notifications:yn})}),bn=T({_meta:Fr.optional(),requestId:r,reason:m().optional()}),Sn=T({method:C("notifications/cancelled"),params:bn}),td={"notifications/cancelled":Sn,"notifications/progress":N,"notifications/message":ee,"notifications/resources/updated":J,"notifications/resources/list_changed":x,"notifications/tools/list_changed":pe,"notifications/prompts/list_changed":L,"notifications/subscriptions/acknowledged":_n},mt=Ze=>T({jsonrpc:C("2.0"),id:ie([m(),H().int()]),result:Ze}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:i,RequestIdSchema:r,RoleSchema:o,LoggingLevelSchema:a,TaskMetadataSchema:c,RelatedTaskMetadataSchema:u,RequestMetaSchema:d,BaseRequestParamsSchema:p,TaskAugmentedRequestParamsSchema:f,NotificationsParamsSchema:b,NotificationSchema:v,IconSchema:$,IconsSchema:y,BaseMetadataSchema:h,ImplementationSchema:z,ClientTasksCapabilitySchema:k,ServerTasksCapabilitySchema:w,ClientCapabilitiesSchema:_,ServerCapabilitiesSchema:I,ProgressSchema:j,ProgressNotificationParamsSchema:U,ProgressNotificationSchema:N,LoggingMessageNotificationParamsSchema:F,LoggingMessageNotificationSchema:ee,ResourceContentsSchema:ne,TextResourceContentsSchema:we,BlobResourceContentsSchema:Ne,AnnotationsSchema:Ae,ResourceSchema:Je,ResourceTemplateSchema:ke,ResourceListChangedNotificationSchema:x,ResourceUpdatedNotificationParamsSchema:M,ResourceUpdatedNotificationSchema:J,PromptArgumentSchema:R,PromptSchema:P,PromptListChangedNotificationSchema:L,TextContentSchema:Y,ImageContentSchema:ue,AudioContentSchema:Se,ToolUseContentSchema:fe,EmbeddedResourceSchema:Oe,ResourceLinkSchema:at,ContentBlockSchema:E,PromptMessageSchema:D,ToolAnnotationsSchema:V,ToolListChangedNotificationSchema:pe,ModelHintSchema:he,ModelPreferencesSchema:be,ToolChoiceSchema:Ve,BooleanSchemaSchema:Be,StringSchemaSchema:et,NumberSchemaSchema:Ge,UntitledSingleSelectEnumSchemaSchema:Le,TitledSingleSelectEnumSchemaSchema:St,LegacyTitledEnumSchemaSchema:Ke,SingleSelectEnumSchemaSchema:Ft,UntitledMultiSelectEnumSchemaSchema:It,TitledMultiSelectEnumSchemaSchema:Vt,MultiSelectEnumSchemaSchema:tr,EnumSchemaSchema:rr,PrimitiveSchemaDefinitionSchema:Or,ElicitRequestFormParamsSchema:Cr,ResourceTemplateReferenceSchema:Nr,PromptReferenceSchema:Lr,RootSchema:Ii,ClientCapabilities2026Schema:Ri,ServerCapabilities2026Schema:dn,RequestMetaEnvelopeSchema:mn,ToolSchema:qr,ToolResultContentSchema:ki,SamplingMessageContentBlockSchema:pn,SamplingMessageSchema:Mr,ResultTypeSchema:hn,ResultMetaSchema:fn,ResultSchema:Ti,PaginatedResultSchema:$a,CallToolResultSchema:vn,ListToolsResultSchema:Ei,ListPromptsResultSchema:Pi,GetPromptResultSchema:xi,ListResourcesResultSchema:ji,ListResourceTemplatesResultSchema:Ai,ReadResourceResultSchema:Oi,CompleteResultSchema:Ci,CacheableResultSchema:wa,DiscoverResultSchema:Ni,CreateMessageRequestParamsSchema:ir,CreateMessageRequestSchema:Li,ListRootsRequestSchema:qi,CreateMessageResultSchema:Mi,ListRootsResultSchema:Di,ElicitResultSchema:Ui,ElicitRequestURLParamsSchema:Fi,ElicitRequestParamsSchema:Vi,ElicitRequestSchema:Zi,InputRequestSchema:Hi,InputResponseSchema:Ji,InputRequestsSchema:Gi,InputResponsesSchema:Bi,InputRequiredResultSchema:Dr,InputResponseRequestParamsSchema:za,CallToolRequestSchema:Ra,ListToolsRequestSchema:ka,ListPromptsRequestSchema:Ta,GetPromptRequestSchema:Ea,ListResourcesRequestSchema:Pa,ListResourceTemplatesRequestSchema:xa,ReadResourceRequestSchema:ja,CompleteRequestSchema:Aa,DiscoverRequestSchema:Oa,SubscriptionFilterSchema:yn,SubscriptionsListenRequestSchema:Ca,SubscriptionsListenResultMetaSchema:Na,SubscriptionsListenResultSchema:La,dispatchRequestSchemas:or,dispatchResultSchemas:qa,NotificationMetaSchema:Fr,SubscriptionsAcknowledgedNotificationSchema:_n,CancelledNotificationParamsSchema:bn,CancelledNotificationSchema:Sn,notificationSchemas2026:td,JSONRPCResultResponseSchema:mt(Ti),CallToolResultResponseSchema:mt(ie([vn,Dr])),ListToolsResultResponseSchema:mt(Ei),ListPromptsResultResponseSchema:mt(Pi),GetPromptResultResponseSchema:mt(ie([xi,Dr])),ListResourcesResultResponseSchema:mt(ji),ListResourceTemplatesResultResponseSchema:mt(Ai),ReadResourceResultResponseSchema:mt(ie([Oi,Dr])),CompleteResultResponseSchema:mt(Ci),DiscoverResultResponseSchema:mt(Ni)}}var v0;function an(){return v0??=g0()}var y0=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"];function _0(e){return y0.includes(e)}var di=Symbol("modelcontextprotocol.resultCacheHintFallback");function _u(e,t){if(t===void 0)return e;let n=e[di];if(n===void 0)return{...e,[di]:t};let i={},r=n.ttlMs??t.ttlMs;r!==void 0&&(i.ttlMs=r);let o=n.cacheScope??t.cacheScope;return o!==void 0&&(i.cacheScope=o),{...e,[di]:i}}function b0(e){return e[di]}function Dg(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0}function Ug(e){return e==="public"||e==="private"}function Fg(e,t){if(e.ttlMs!==void 0&&!Dg(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&&!Ug(e.cacheScope))throw new RangeError(`Invalid cache hint for ${t}: cacheScope must be 'public' or 'private' (got ${String(e.cacheScope)})`)}var X=(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})({}),me=class rS extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ProtocolError"})}static[Symbol.hasInstance](t){return mi(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 mi(this,t)}constructor(t,n,i){super(n),this.code=t,this.data=i,this.name="ProtocolError",Cg(this,new.target)}static fromError(t,n,i){if(t===X.UrlElicitationRequired&&i){let r=i;if(r.elicitations)return new nS(r.elicitations,n)}if(t===X.UnsupportedProtocolVersion&&i){let r=i;if(Array.isArray(r.supported)&&typeof r.requested=="string")return new fi({supported:r.supported,requested:r.requested},n)}if(t===X.InvalidParams||t===X.ResourceNotFound){let r=i;if(typeof r?.uri=="string"&&(t===X.ResourceNotFound||Object.keys(r).length===1))return new bu(r.uri,n)}if(t===X.MissingRequiredClientCapability&&i){let r=i;if(r.requiredCapabilities!==null&&typeof r.requiredCapabilities=="object"&&!Array.isArray(r.requiredCapabilities))return new Su({requiredCapabilities:r.requiredCapabilities},n)}return new rS(t,n,i)}},bu=class extends me{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ResourceNotFoundError"})}constructor(e,t=`Resource not found: ${e}`){super(X.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},nS=class extends me{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UrlElicitationRequiredError"})}constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(X.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},fi=class extends me{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnsupportedProtocolVersionError"})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(X.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},Su=class extends me{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.MissingRequiredClientCapabilityError"})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(", ")}`){super(X.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},S0=0,$0="private",w0=["tools/call","prompts/get","resources/read"];function z0(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:"complete"};if(n==="complete"||w0.includes(e))return t;throw new me(X.InternalError,`Handler for ${e} returned resultType '${String(n)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function I0(e,t){let n=b0(t);if(t.resultType!=="complete"||!_0(e))return n===void 0?t:P0(t);let i=t,r=Dg(i.ttlMs)?i.ttlMs:T0(n),o=Ug(i.cacheScope)?i.cacheScope:E0(n),a={...i,ttlMs:r,cacheScope:o};return delete a[di],a}function R0(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function k0(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[Ut]:t}}:!R0(n)||n[Ut]!==void 0?e:{...e,_meta:{...n,[Ut]:t}}}function T0(e){return e!==void 0&&Dg(e.ttlMs)?e.ttlMs:S0}function E0(e){return e!==void 0&&Ug(e.cacheScope)?e.cacheScope:$0}function P0(e){let t={...e};return delete t[di],t}var x0=["elicitation/create","sampling/createMessage","roots/list"],pu;function iS(){if(pu)return pu;let e=an();return pu={request:{"elicitation/create":T({method:C("elicitation/create"),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":T({method:C("sampling/createMessage"),params:e.CreateMessageRequestParamsSchema}),"roots/list":T({method:C("roots/list"),params:de({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},pu}function oS(e){return x0.includes(e)}function Tg(e){return oS(e)?iS().request[e]:void 0}function j0(e){return oS(e)?iS().response[e]:void 0}var Vg={"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},aS={"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 sS(e){return Object.prototype.hasOwnProperty.call(Vg,e)}function cS(e){return Object.prototype.hasOwnProperty.call(aS,e)}function A0(e){return Object.prototype.hasOwnProperty.call(Vg,e)}function O0(e){return sS(e)?an().dispatchRequestSchemas[e]:void 0}function C0(e){return A0(e)?an().dispatchResultSchemas[e]:void 0}function N0(e){return cS(e)?an().notificationSchemas2026[e]:void 0}var DA=Object.keys(Vg),UA=Object.keys(aS);function aa(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function ia(e,t){if(e===void 0)return{ok:!1,reason:"not-in-era"};let n=e.safeParse(t);return n.success?{ok:!0,value:n.data}:{ok:!1,reason:"invalid",message:String(n.error)}}var L0={ok:!1,reason:"not-in-era"},q0=[Wt,Yt];function M0(e,t){let n=t,i=!1,r=()=>(i||(n={...n},i=!0),n),o=t.tools;e==="tools/list"&&Array.isArray(o)&&o.some(s=>aa(s)&&"execution"in s)&&(r().tools=o.map(s=>{if(!aa(s)||!("execution"in s))return s;let c={...s};return delete c.execution,c}));let a=t.capabilities;if(aa(a)&&"tasks"in a){let s={...a};delete s.tasks,r().capabilities=s}return n}var Zg={era:"2026-07-28",hasRequestMethod:sS,hasNotificationMethod:cS,hasInputRequestMethod:e=>Tg(e)!==void 0,validateRequest:(e,t)=>ia(O0(e),t),validateResult:(e,t)=>ia(C0(e),t),validateNotification:(e,t)=>ia(N0(e),t),validateInputRequest:(e,t)=>ia(Tg(e),t),validateInputResponse:(e,t)=>ia(j0(e),t),samplingResultVariant:()=>L0,outboundEnvelope(e){return{[Wt]:e.protocolVersion,[Qn]:e.clientInfo,[Yt]:e.clientCapabilities,...e.logLevel!==void 0&&{[_r]:e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let i of q0)i in e||t.push({key:i,problem:"missing"});let n=an().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let i of n.error.issues){let r=i.path.map(String),o=r.length>0?r.join("."):"_meta";r.length===1&&t.some(a=>a.key===o&&a.problem==="missing")||t.push({key:o,problem:i.message})}return t},projectCallToolResult:e=>Bb(e),inputRequestSchema:Tg,decodeResult(e,t){if(!aa(t))return{kind:"invalid",error:new ye(ze.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:"invalid",error:new ye(ze.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(ze.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n==="input_required"){let a=t.inputRequests,s=aa(a)?a:{},c=t.requestState;return Object.keys(s).length===0&&typeof c!="string"?{kind:"invalid",error:new ye(ze.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:s,...typeof c=="string"&&{requestState:c}}}if(n!=="complete")return{kind:"invalid",error:new ye(ze.UnsupportedResultType,`Unsupported result type '${n}' for ${e}`,{resultType:n,method:e})};let i=D0(),r=Object.hasOwn(i,e)?i[e]:void 0;if(r!==void 0){let a=r.safeParse(t);if(!a.success)return{kind:"invalid",error:new ye(ze.InvalidResult,`Invalid result for ${e}: ${a.error}`,{method:e})}}let o={...t};return delete o.resultType,{kind:"complete",result:o}},encodeResult(e,t,n){return k0(I0(e,z0(e,M0(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=an().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("; ")}`}},hu;function D0(){if(hu)return hu;let e=an();return hu={"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},hu}var ua="2026-07-28";function kr(e){return e!==void 0&&hi(e)?Zg:Mg}function Nb(e){return e.revision!==void 0?kr(e.revision).era:e.era==="modern"?Zg.era:Mg.era}function Eg(e){return lS.some(t=>t.hasRequestMethod(e))}function Pg(e){return lS.some(t=>t.hasNotificationMethod(e))}var lS=[Mg,Zg];function Lb(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function sn(e){if(!Lb(e))return;let t=e._meta;return Lb(t)?t:void 0}function $u(e){let t=sn(e);return t!==void 0&&Wt in t}function wu(e){let t=sn(e)?.[Wt];return typeof t=="string"?t:void 0}function zu(e){return kr(ua).validateEnvelopeMeta(e)}var U0=Ev({AnnotationsSchema:()=>Xt,AudioContentSchema:()=>ai,BaseMetadataSchema:()=>Kt,BaseRequestParamsSchema:()=>Ye,BlobResourceContentsSchema:()=>Jo,BooleanSchemaSchema:()=>Yo,CallToolRequestParamsSchema:()=>zl,CallToolRequestSchema:()=>Il,CallToolResultSchema:()=>Wo,CancelTaskRequestSchema:()=>mg,CancelTaskResultSchema:()=>pg,CancelledNotificationParamsSchema:()=>kc,CancelledNotificationSchema:()=>Do,ClientCapabilitiesSchema:()=>xc,ClientNotificationSchema:()=>fg,ClientRequestSchema:()=>hg,ClientResultSchema:()=>gg,ClientTasksCapabilitySchema:()=>Ec,CompatibilityCallToolResultSchema:()=>tg,CompleteRequestParamsSchema:()=>Xl,CompleteRequestSchema:()=>Ql,CompleteResultSchema:()=>eu,ContentBlockSchema:()=>si,CreateMessageRequestParamsSchema:()=>Ll,CreateMessageRequestSchema:()=>ql,CreateMessageResultSchema:()=>Ml,CreateMessageResultWithToolsSchema:()=>Dl,CreateTaskResultSchema:()=>ig,CursorSchema:()=>Ao,DiscoverRequestSchema:()=>Nc,DiscoverResultSchema:()=>Lc,ElicitRequestFormParamsSchema:()=>ui,ElicitRequestParamsSchema:()=>Hl,ElicitRequestSchema:()=>Jl,ElicitRequestURLParamsSchema:()=>Zl,ElicitResultSchema:()=>Kl,ElicitationCompleteNotificationParamsSchema:()=>Gl,ElicitationCompleteNotificationSchema:()=>Bl,EmbeddedResourceSchema:()=>fl,EmptyResultSchema:()=>Mo,EnumSchemaSchema:()=>Vl,GetPromptRequestParamsSchema:()=>ml,GetPromptRequestSchema:()=>pl,GetPromptResultSchema:()=>yl,GetTaskPayloadRequestSchema:()=>cg,GetTaskPayloadResultSchema:()=>lg,GetTaskRequestSchema:()=>ag,GetTaskResultSchema:()=>sg,IconSchema:()=>Tc,IconsSchema:()=>Sr,ImageContentSchema:()=>oi,ImplementationSchema:()=>ri,InitializeRequestParamsSchema:()=>jc,InitializeRequestSchema:()=>Ac,InitializeResultSchema:()=>Oc,InitializedNotificationSchema:()=>Cc,JSONArraySchema:()=>Xf,JSONObjectSchema:()=>De,JSONRPCErrorResponseSchema:()=>ti,JSONRPCMessageSchema:()=>qo,JSONRPCNotificationSchema:()=>Lo,JSONRPCRequestSchema:()=>No,JSONRPCResponseSchema:()=>Qf,JSONRPCResultResponseSchema:()=>ei,JSONValueSchema:()=>yr,LegacyTitledEnumSchemaSchema:()=>ea,ListChangedOptionsBaseSchema:()=>rg,ListPromptsRequestSchema:()=>ul,ListPromptsResultSchema:()=>dl,ListResourceTemplatesRequestSchema:()=>Zc,ListResourceTemplatesResultSchema:()=>Hc,ListResourcesRequestSchema:()=>Fc,ListResourcesResultSchema:()=>Vc,ListRootsRequestSchema:()=>ru,ListRootsResultSchema:()=>nu,ListTasksRequestSchema:()=>ug,ListTasksResultSchema:()=>dg,ListToolsRequestSchema:()=>$l,ListToolsResultSchema:()=>wl,LoggingLevelSchema:()=>Ir,LoggingMessageNotificationParamsSchema:()=>El,LoggingMessageNotificationSchema:()=>Pl,ModelHintSchema:()=>xl,ModelPreferencesSchema:()=>jl,MultiSelectEnumSchemaSchema:()=>Fl,NotificationSchema:()=>ot,NotificationsParamsSchema:()=>it,NumberSchemaSchema:()=>li,PaginatedRequestParamsSchema:()=>Dc,PaginatedRequestSchema:()=>$r,PaginatedResultSchema:()=>wr,PingRequestSchema:()=>Fo,PrimitiveSchemaDefinitionSchema:()=>na,ProgressNotificationParamsSchema:()=>Mc,ProgressNotificationSchema:()=>Vo,ProgressSchema:()=>qc,ProgressTokenSchema:()=>jo,PromptArgumentSchema:()=>cl,PromptListChangedNotificationSchema:()=>_l,PromptMessageSchema:()=>vl,PromptReferenceSchema:()=>Yl,PromptSchema:()=>ll,ReadResourceRequestParamsSchema:()=>Jc,ReadResourceRequestSchema:()=>Gc,ReadResourceResultSchema:()=>Bc,RelatedTaskMetadataSchema:()=>Rc,RequestIdSchema:()=>br,RequestMetaSchema:()=>Oo,RequestSchema:()=>Ue,ResourceContentsSchema:()=>Zo,ResourceLinkSchema:()=>gl,ResourceListChangedNotificationSchema:()=>Kc,ResourceRequestParamsSchema:()=>ni,ResourceSchema:()=>Go,ResourceTemplateReferenceSchema:()=>Wl,ResourceTemplateSchema:()=>Uc,ResourceUpdatedNotificationParamsSchema:()=>al,ResourceUpdatedNotificationSchema:()=>sl,ResultMetaObjectSchema:()=>Co,ResultSchema:()=>Fe,RoleSchema:()=>zr,RootSchema:()=>tu,RootsListChangedNotificationSchema:()=>iu,SamplingContentSchema:()=>Cl,SamplingMessageContentBlockSchema:()=>Qr,SamplingMessageSchema:()=>Nl,ServerCapabilitiesSchema:()=>Uo,ServerNotificationSchema:()=>yg,ServerRequestSchema:()=>vg,ServerResultSchema:()=>_g,ServerTasksCapabilitySchema:()=>Pc,SetLevelRequestParamsSchema:()=>kl,SetLevelRequestSchema:()=>Tl,SingleSelectEnumSchemaSchema:()=>Ul,StringSchemaSchema:()=>ci,SubscribeRequestParamsSchema:()=>Wc,SubscribeRequestSchema:()=>Yc,SubscriptionFilterSchema:()=>Bo,SubscriptionsAcknowledgedNotificationParamsSchema:()=>rl,SubscriptionsAcknowledgedNotificationSchema:()=>nl,SubscriptionsListenRequestParamsSchema:()=>el,SubscriptionsListenRequestSchema:()=>tl,SubscriptionsListenResultMetaSchema:()=>il,SubscriptionsListenResultSchema:()=>ol,TaskAugmentedRequestParamsSchema:()=>nn,TaskCreationParamsSchema:()=>ng,TaskMetadataSchema:()=>Ic,TaskSchema:()=>Rr,TaskStatusNotificationParamsSchema:()=>au,TaskStatusNotificationSchema:()=>og,TaskStatusSchema:()=>ou,TextContentSchema:()=>ii,TextResourceContentsSchema:()=>Ho,TitledMultiSelectEnumSchemaSchema:()=>ra,TitledSingleSelectEnumSchemaSchema:()=>Qo,ToolAnnotationsSchema:()=>bl,ToolChoiceSchema:()=>Al,ToolExecutionSchema:()=>Sl,ToolListChangedNotificationSchema:()=>Rl,ToolResultContentSchema:()=>Ol,ToolSchema:()=>Ko,ToolUseContentSchema:()=>hl,UnsubscribeRequestParamsSchema:()=>Xc,UnsubscribeRequestSchema:()=>Qc,UntitledMultiSelectEnumSchemaSchema:()=>ta,UntitledSingleSelectEnumSchemaSchema:()=>Xo});var zt=e=>No.safeParse(e).success,Er=e=>Lo.safeParse(e).success,ca=e=>ei.safeParse(e).success,Iu=e=>ti.safeParse(e).success;var Qt=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)&&e.resultType==="input_required";function Hg(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function Jg(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var qb="x-mcp-header",F0=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,V0=new Set(["string","integer","boolean","number"]);function Gg(e){let t=[],n=new Map,i=(o,a,s)=>{if(o===null||typeof o!="object")return;let c=o;if(qb in c){if(!s||a.length===0)return`${fu(a)}: 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 d=c[qb];if(typeof d!="string"||d.length===0)return`${fu(a)}: x-mcp-header MUST be a non-empty string`;if(!F0.test(d))return`${fu(a)}: x-mcp-header '${d}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let p=typeof c.type=="string"?c.type:void 0;if(p===void 0||!V0.has(p))return`${fu(a)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${p??"<none>"}`;let f=d.toLowerCase(),b=n.get(f);if(b!==void 0)return`x-mcp-header '${d}' is not case-insensitively unique (also declared as '${b}')`;n.set(f,d),t.push({path:a,headerName:d,type:p})}let u=c.properties;if(u!==null&&typeof u=="object")for(let[d,p]of Object.entries(u)){let f=i(p,[...a,d],s);if(f!==void 0)return f}for(let d of Z0){let p=c[d];if(p===void 0)continue;let f=Array.isArray(p)?p:p!==null&&typeof p=="object"&&H0.has(d)?Object.values(p):[p];for(let b of f){let v=i(b,[...a,`<${d}>`],!1);if(v!==void 0)return v}}},r=i(e,[],!0);return r===void 0?{valid:!0,declarations:t}:{valid:!1,reason:r}}var Z0=["items","prefixItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","patternProperties","dependentSchemas","oneOf","anyOf","allOf","not","if","then","else","$defs","definitions"],H0=new Set(["patternProperties","dependentSchemas","$defs","definitions"]);function fu(e){return e.length===0?"<root>":e.join(".")}var vu=-32020,FA=[{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:[X.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:[vu,X.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:[X.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:[X.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:[X.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:[vu],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:[X.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:[vu],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."}],J0={[X.ParseError]:400,[X.InvalidRequest]:400,[X.MethodNotFound]:404,[X.UnsupportedProtocolVersion]:400,[X.MissingRequiredClientCapability]:400,[vu]:400};function gu(e,t,n,i,r){return{kind:"reject",rung:e,cell:t,httpStatus:n,code:i.code,message:i.message,...i.data!==void 0&&{data:i.data},settled:r}}function Bg(e){if(!$u(e))return!1;let t=wu(e);if(t===void 0||!hi(t))return!1;let n=sn(e);return n!==void 0&&zu(n).length===0}function Kg(e,t){switch(e.reason){case"http-method":return gu("http-method","modern-only-method-not-allowed",405,new me(-32e3,"Method not allowed."),!0);case"batch":return gu("jsonrpc-shape","modern-only-batch-not-supported",400,new me(X.InvalidRequest,"Bad Request: JSON-RPC batches are not supported by this endpoint"),!0);case"response":return gu("jsonrpc-shape","modern-only-response-post",400,new me(X.InvalidRequest,"Bad Request: JSON-RPC responses cannot be posted to this endpoint"),!0);case"notification":return;case"initialize":case"no-claim":{let n=e.requestedVersion;return gu("era-classification","modern-only-missing-envelope",400,n===void 0?new me(X.UnsupportedProtocolVersion,"Unsupported protocol version: the request did not name a protocol version",{supported:[...t]}):new fi({supported:[...t],requested:n}),!0)}}}function Ru(e,t){return bo(e,t)}function oa(e){return new Set(e.flatMap(t=>Object.keys(t.shape)))}function pi(e){if(e==null)return!1;let t=typeof e;return t!=="object"&&t!=="function"||!("~standard"in e)?!1:typeof e["~standard"]?.validate=="function"}var Mb=!1,Ag="draft-2020-12";function Pr(e,t="input"){let n=e["~standard"],i;if(n.jsonSchema)i=n.jsonSchema[t]({target:Ag});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().");Mb||(Mb=!0,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.")),i=Yr(e,{target:Ag,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 i.type!==void 0?i:uS(i)?{type:"object",...i}:i;if(i.type!==void 0&&i.type!=="object")throw new Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(i.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:"object",...i}}function uS(e){if("properties"in e||"patternProperties"in e||"additionalProperties"in e||"required"in e)return!0;for(let t of["oneOf","anyOf","allOf"]){let n=e[t];if(Array.isArray(n)&&n.length>0)return n.every(i=>i!==null&&typeof i=="object"&&(i.type==="object"||uS(i)))}return!1}function G0(e){return e.path?.length?`${e.path.map(t=>String(typeof t=="object"?t.key:t)).join(".")}: ${e.message}`:e.message}async function on(e,t){let n=await e["~standard"].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(i=>G0(i)).join(", ")}:{success:!0,data:n.value}}function B0(e){let t=Yr(e,{target:Ag,io:"input"});return typeof t.pattern=="string"?t.pattern:void 0}var K0=/\\\.\\d\{(\d+)\}/;function W0(e){let t=K0.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[!1,!0].flatMap(i=>[!1,!0].flatMap(r=>n.map(o=>bt.datetime({local:i,offset:r,precision:o}))))}function Y0(e,t){let n;switch(e){case"email":n=[tc()];break;case"uri":n=[Bn()];break;case"date":n=[bt.date()];break;case"date-time":n=W0(t);break}return new Set(n.map(i=>B0(i)).filter(i=>i!==void 0))}function X0(e,t,n){return n!=="zod"?!0:Y0(e,t).has(t)}function dS(e){let t=Pr(e,"input"),n=t.properties||{},i=t.required||[];return Object.entries(n).map(([r,o])=>({name:r,description:o?.description,required:i.includes(r)}))}function la(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Q0(e){try{return Pr(e,"input")}catch(t){let n=t instanceof Error?t.message:String(t);throw new me(X.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${n}`)}}var ek=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);function Wg(e){return ek.has(e)||e.startsWith("x-")}var tk=new Set(["$schema",...Object.keys(ui.shape.requestedSchema.shape)]),Db={string:oa([ci,Xo,Qo,ea]),number:oa([li]),integer:oa([li]),boolean:oa([Yo]),array:oa([ta,ra])},rk=new Set(ci.shape.format.unwrap().options);function nk(e,t,n,i){if(!la(e))return e;let r=typeof e.type=="string"&&Object.hasOwn(Db,e.type)?Db[e.type]:void 0;if(r===void 0)return e;let o={};for(let[a,s]of Object.entries(e))r.has(a)||Wg(a)?o[a]=s:a==="pattern"&&e.type==="string"&&typeof e.format=="string"?rk.has(e.format)?(typeof s!="string"||!X0(e.format,s,n))&&i.push(`${t}.${a}`):o[a]=s:i.push(`${t}.${a}`);return o}function ik(e,t){let n={},i=[];for(let[r,o]of Object.entries(e))r==="properties"&&la(o)?n[r]=Object.fromEntries(Object.entries(o).map(([a,s])=>[a,nk(s,`properties.${a}`,t,i)])):tk.has(r)?n[r]=o:Wg(r)||i.push(r);if(i.length>0)throw new me(X.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(", ")}`);return n}function ok(e,t){if(!la(e.properties))return t;let n=Object.entries(e.properties).filter(([,i])=>!Ru(na,i).success).map(([i])=>`properties.${i}`);return n.length>0?n.join(", "):t}function Og(e,t,n=""){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((i,r)=>Og(i,t[r],`${n}[${r}]`)):!la(e)||!la(t)?[]:Object.entries(e).flatMap(([i,r])=>{let o=n?`${n}.${i}`:i;return Object.prototype.hasOwnProperty.call(t,i)?Og(r,t[i],o):Wg(i)?[]:[o]})}function ak(e){if(!pi(e.requestedSchema))return{...e,mode:"form",requestedSchema:e.requestedSchema};let t=e.requestedSchema["~standard"].vendor,n=ik(Q0(e.requestedSchema),t),i=Ru(ui.shape.requestedSchema,n);if(!i.success)throw new me(X.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${ok(n,i.error.message)}`);let r=Og(n,i.data);if(r.length>0)throw new me(X.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(", ")}`);let o=(i.data.required??[]).filter(a=>!Object.prototype.hasOwnProperty.call(i.data.properties,a));if(o.length>0)throw new me(X.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${o.join(", ")}`);return{...e,mode:"form",requestedSchema:i.data}}function sk(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}}}var ck=Object.assign(sk,{elicit(e){try{return{method:"elicitation/create",params:ak(e)}}catch(t){throw t instanceof me?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 mS=250;function pS(e,t){return`Multi-round-trip request '${e}' still required input after ${t} rounds (inputRequired.maxRounds)`}function hS(e,t){return new Promise((n,i)=>{if(t?.aborted){i(t.reason instanceof ye?t.reason:new ye(ze.RequestTimeout,String(t.reason)));return}let r=setTimeout(()=>{t?.removeEventListener("abort",o),n()},e),o=()=>{clearTimeout(r),i(t?.reason instanceof ye?t.reason:new ye(ze.RequestTimeout,String(t?.reason)))};t?.addEventListener("abort",o,{once:!0})})}function fS(e){let t=new AbortController,n=()=>t.abort(e?.reason);return e?.addEventListener("abort",n,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:i=>t.abort(i),dispose:()=>e?.removeEventListener("abort",n)}}var lk=["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"],uk={IdJagTokenExchangeResponseSchema:wg,OAuthClientInformationFullSchema:Ig,OAuthClientInformationSchema:uu,OAuthClientMetadataSchema:lu,OAuthClientRegistrationErrorSchema:Rg,OAuthErrorResponseSchema:zg,OAuthMetadataSchema:su,OAuthProtectedResourceMetadataSchema:bg,OAuthTokenRevocationRequestSchema:kg,OAuthTokensSchema:$g,OpenIdProviderDiscoveryMetadataSchema:Sg,OpenIdProviderMetadataSchema:cu},gS={},vS={};function yS(e,t){let n=e.slice(0,-6);gS[n]=t,vS[n]=i=>t.safeParse(i).success}for(let e of lk)yS(e,U0[e]);for(let[e,t]of Object.entries(uk))yS(e,t);var dk=Object.freeze(gS),mk=Object.freeze(vS);function pk(e){switch(e){case"initialize":case"notifications/initialized":return kr(void 0);case"server/discover":return kr(ua);default:return}}var _S=6e4,hk=[Wt,Qn,Yt,_r],fk=["inputResponses","requestState"];function Ub(e,t){let n=e.params;if(!sa(n))return{message:e,lifted:{}};let i=n._meta,r=sa(i)?hk.filter(c=>c in i):[],o=t==="request"?fk.filter(c=>c in n):[];if(r.length===0&&o.length===0)return{message:e,lifted:{}};let a={},s={...n};if(r.length>0&&sa(i)){let c={},u={...i};for(let d of r)c[d]=i[d],delete u[d];a.envelope=c,Object.keys(u).length>0?s._meta=u:delete s._meta}for(let c of o)c==="inputResponses"&&(a.inputResponses=s[c]),c==="requestState"&&(a.requestState=s[c]),delete s[c];return{message:{...e,params:s},lifted:a}}function Fb(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(i){let r=e.validateResult(t,i);return r.ok?{value:r.value}:{issues:[{message:r.reason==="invalid"?r.message:`not-in-era: ${t}`}]}}}}}function da(e){return()=>e}var gk=da(void 0);function Yg(e,t){return{...e,mcpReq:{...e.mcpReq,requestState:da(t)}}}var bS;function Xg(e,t){bS(e,t)}var Qg=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{bS=(e,t)=>{e._negotiatedProtocolVersion=t}}_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??wc,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(ze.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,i,r=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:r,onTimeout:i})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new ye(ze.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_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 i=this._transport?.onmessage;this._transport.onmessage=(r,o)=>{i?.(r,o),ca(r)||Iu(r)?this._onresponse(r):zt(r)?this._onrequest(r,o):Er(r)?this._onnotification(r,o):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 i of this._timeoutInfo.values())clearTimeout(i.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new ye(ze.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.()}finally{for(let i of e.values())i(n);for(let i of t.values())i.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=Ub(e,"notification"),i=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)==="drop")return;if(t?.classification!==void 0){let a=Nb(t.classification);if(a!==i.era){this._onerror(new Error(`Era mismatch on inbound notification '${n.method}': classified as ${a} but this instance serves ${i.era}`));return}}if(Pg(n.method)&&!i.hasNotificationMethod(n.method))return;let r=this._notificationHandlers.get(n.method),o=this.fallbackNotificationHandler;r===void 0&&o===void 0||Promise.resolve().then(()=>r===void 0?o(n):r(n,i)).catch(a=>this._onerror(new Error(`Uncaught error in notification handler: ${a}`)))}_onrequest(e,t){let{message:n,lifted:i}=Ub(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 o=this._transport,a=($,y,h)=>{let z={jsonrpc:"2.0",id:n.id,error:{code:$,message:y,...h!==void 0&&{data:h}}};o?.send(z).catch(g=>this._onerror(new Error(`Failed to send an error response: ${g}`)))};if(t?.classification!==void 0){let $=Nb(t.classification);if($!==r.era){this._onerror(new Error(`Era mismatch on inbound request '${n.method}': classified as ${$} but this instance serves ${r.era}`));let y=t.classification.revision??$;a(X.UnsupportedProtocolVersion,`Unsupported protocol version: ${y}`,{supported:this._supportedProtocolVersions,requested:y});return}}if(Eg(n.method)&&!r.hasRequestMethod(n.method)){a(X.MethodNotFound,"Method not found");return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){a(X.MethodNotFound,"Method not found");return}let c=r.checkInboundEnvelope(i);if(c!==void 0){a(X.InvalidParams,c);return}let u=($,y)=>this._notificationViaCodec(this._resolveOutboundCodec($.method),$,{...y,relatedRequestId:n.id}),d=($,y,h)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec($.method),$,y,{...h,relatedRequestId:n.id}),p=new AbortController;this._requestHandlerAbortControllers.set(n.id,p);let f=i.inputResponses===void 0?void 0:vk(i.inputResponses),b={sessionId:o?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...i.envelope!==void 0&&{envelope:i.envelope},...f!==void 0&&{inputResponses:f.accepted},...f!==void 0&&f.droppedKeys.length>0&&{droppedInputResponseKeys:f.droppedKeys},requestState:i.requestState===void 0?gk:da(i.requestState),signal:p.signal,send:(($,y,h)=>{let z=this._resolveOutboundCodec($.method);if(this._assertOutboundRequestInEra(z,$.method),pi(y))return d($,y,h);let g=Fb(z,$.method);if(g===void 0)throw new TypeError(`'${$.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return d($,g,y)}),notify:u},http:t?.authInfo?{authInfo:t.authInfo}:void 0},v=this.buildContext(b,t);Promise.resolve().then(()=>s(n,v)).then(async $=>{if(p.signal.aborted)return;let y;try{y=r.encodeResult(n.method,$,this._outboundServerInfo())}catch(z){this._onerror(new Error(`Failed to encode result for ${n.method}: ${z}`)),a(X.InternalError,"Internal error");return}let h={result:y,jsonrpc:"2.0",id:n.id};await o?.send(h)},async $=>{if(p.signal.aborted)return;let y=Number.isSafeInteger($.code)?$.code:X.InternalError,h={jsonrpc:"2.0",id:n.id,error:{code:r.encodeErrorCode(y),message:$.message??"Internal error",...$.data!==void 0&&{data:$.data}}};await o?.send(h)}).catch($=>this._onerror(new Error(`Failed to send response: ${$}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===p&&this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,i=Number(t),r=this._progressHandlers.get(i);if(!r){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let o=this._responseHandlers.get(i),a=this._timeoutInfo.get(i);if(a&&o&&a.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(s){this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),o(s);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),ca(e)?n(e):n(me.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 i=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(i,e.method),pi(t))return this._requestWithSchemaViaCodec(i,e,t,n);let r=Fb(i,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(i,e,r,t)}_negotiatedWireCodec(){return kr(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=pk(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(Eg(t)&&!e.hasRequestMethod(t))throw new ye(ze.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 i=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(i,e.method),this._requestWithSchemaViaCodec(i,e,t,n)}_requestWithSchemaViaCodec(e,t,n,i){let{relatedRequestId:r,resumptionToken:o,onresumptiontoken:a,headers:s}=i??{},c=Date.now(),u,d;return new Promise((p,f)=>{let b=w=>{f(w)};if(!this._transport){b(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(w){b(w);return}if(i?.signal?.aborted){let w=i.signal.reason;throw w instanceof ye?w:new ye(ze.RequestTimeout,String(w))}let v=e.era===ua&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,$=this._requestMessageId++;d=$;let y={...t,jsonrpc:"2.0",id:$};i?.onprogress&&(this._progressHandlers.set($,i.onprogress),y.params={...t.params,_meta:{...t.params?._meta,progressToken:$}});let h=this._envelopeOutbound(y),z=!1,g=w=>{z||(this._progressHandlers.delete($),v===void 0?this._transport?.send(this._envelopeOutbound({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:$,reason:String(w)}}),{relatedRequestId:r,resumptionToken:o,onresumptiontoken:a}).catch(_=>this._onerror(new Error(`Failed to send cancellation: ${_}`))):v.abort(),f(w instanceof ye?w:new ye(ze.RequestTimeout,String(w))))};this._responseHandlers.set($,w=>{if(i?.signal?.aborted)return;if(z=!0,w instanceof Error)return f(w);let _;try{_=e.decodeResult(t.method,w.result)}catch(j){return f(j instanceof Error?j:new Error(String(j)))}if(_.kind==="invalid")return f(_.error);if(_.kind==="input_required"){if(i?.allowInputRequired===!0)return p(yk(_));let j={codec:e,request:t,resultSchema:n,options:i,flowStartedAt:c,retry:(U,N)=>this._requestWithSchemaViaCodec(e,U===void 0?{method:t.method}:{method:t.method,params:U},n,N)};return p(this._resolveNonCompleteResult(_,j))}let I=_.result;on(n,I).then(j=>{j.success?p(j.data):f(new ye(ze.InvalidResult,`Invalid result for ${t.method}: ${j.error}`))},f)}),u=()=>g(i?.signal?.reason),i?.signal?.addEventListener("abort",u,{once:!0});let S=i?.timeout??_S,k=()=>g(new ye(ze.RequestTimeout,"Request timed out",{timeout:S}));this._setupTimeout($,S,i?.maxTotalTimeout,k,i?.resetTimeoutOnProgress??!1),this._transport.send(h,{relatedRequestId:r,resumptionToken:o,onresumptiontoken:a,headers:s,requestSignal:v?.signal}).catch(w=>{this._progressHandlers.delete($),f(w)})}).finally(()=>{u&&i?.signal?.removeEventListener("abort",u),d!==void 0&&(this._responseHandlers.delete(d),this._cleanupTimeout(d))})}async notification(e,t){return this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new ye(ze.NotConnected,"Not connected");if(Pg(t.method)&&!e.hasNotificationMethod(t.method))throw new ye(ze.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 i=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(i,n).catch(r=>this._onerror(r))});return}await this._transport.send(i,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let i;if(typeof t=="function"){if(!Eg(e))throw new TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);i=(r,o)=>{let a=this._negotiatedWireCodec(),s=a.validateRequest(e,r);if(!s.ok&&s.reason==="not-in-era"&&(s=a.validateInputRequest(e,r)),!s.ok)throw s.reason==="not-in-era"?new me(X.InternalError,`No wire schema for ${e} in the resolved era`):new Error(s.message);return Promise.resolve(t(s.value,o))}}else if(n)i=async(r,o)=>{let a=await on(t.params,{...r.params});if(!a.success)throw new me(X.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,o)};else throw new TypeError("setRequestHandler: handler is required");this._requestHandlers.set(e,this._wrapHandler(e,i))}_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(!Pg(e))throw new TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(i,r)=>{let o=r.validateNotification(e,i);if(!o.ok)throw o.reason==="not-in-era"?new me(X.InternalError,`No wire schema for ${e} in the resolved era`):new Error(o.message);return Promise.resolve(t(o.value))});return}if(!n)throw new TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set(e,async i=>{let r=await on(t.params,{...i.params});if(!r.success)throw new me(X.InvalidParams,`Invalid params for notification ${e}: ${r.error}`);await n(r.data,i)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function sa(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function ev(e,t){let n={...e};for(let i in t){let r=i,o=t[r];if(o===void 0)continue;let a=n[r];n[r]=sa(a)&&sa(o)?{...a,...o}:o}return n}function Vb(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function vk(e){let t={},n=[];if(!Vb(e))return{accepted:t,droppedKeys:n};for(let[i,r]of Object.entries(e)){if(!Vb(r)||"method"in r||"result"in r){n.push(i);continue}t[i]=r}return{accepted:t,droppedKeys:n}}function yk(e){return{resultType:"input_required",inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState}}}var _k=Z((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,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=r;function r(s){if(!s)throw new TypeError("argument string is required");var c=typeof s=="object"?o(s):s;if(typeof c!="string")throw new TypeError("argument string is required to be a string");var u=c.indexOf(";"),d=u!==-1?c.slice(0,u).trim():c.trim();if(!i.test(d))throw new TypeError("invalid media type");var p=new a(d.toLowerCase());if(u!==-1){var f,b,v;for(t.lastIndex=u;b=t.exec(c);){if(b.index!==u)throw new TypeError("invalid parameter format");u+=b[0].length,f=b[1].toLowerCase(),v=b[2],v.charCodeAt(0)===34&&(v=v.slice(1,-1),v.indexOf("\\")!==-1&&(v=v.replace(n,"$1"))),p.parameters[f]=v}if(u!==c.length)throw new TypeError("invalid parameter format")}return p}function o(s){var c;if(typeof s.getHeader=="function"?c=s.getHeader("content-type"):typeof s.headers=="object"&&(c=s.headers&&s.headers["content-type"]),typeof c!="string")throw new TypeError("content-type header is missing from object");return c}function a(s){this.parameters=Object.create(null),this.type=s}})),VA=Da(_k(),1);var SS=10*1024*1024,tv=class{_buffer;_maxBufferSize;constructor(e){this._maxBufferSize=e?.maxBufferSize??SS}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 $S(t)}catch(n){if(n instanceof SyntaxError)continue;throw n}}return null}clear(){this._buffer=void 0}};function $S(e){return qo.parse(JSON.parse(e))}function rv(e){return JSON.stringify(e)+`
|
|
68
|
+
`}var bk=/^[A-Za-z0-9._-]{1,128}$/;function Sk(e){let t=[];if(e.length===0)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(e.length>128)return{isValid:!1,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"),!bk.test(e)){let n=[...e].filter(i=>!/[A-Za-z0-9._-]/.test(i)).filter((i,r,o)=>o.indexOf(i)===r);return t.push(`Tool name contains invalid characters: ${n.map(i=>`"${i}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}function $k(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 nv(e){let t=Sk(e);return $k(e,t.warnings),t.isValid}function wk(e){return typeof e=="object"&&e!==null&&"_zod"in e}function zk(e){return typeof e=="object"&&e!==null&&!("_zod"in e)&&"_def"in e&&typeof e._def?.typeName=="string"}function Ik(e){if(typeof e!="object"||e===null||pi(e))return!1;let t=Object.getPrototypeOf(e);return t!==Object.prototype&&t!==null?!1:Object.values(e).every(n=>wk(n))}function ku(e){if(e!==void 0){if(Ik(e))return T(e);if(typeof e=="object"&&e!==null&&!pi(e)&&Object.values(e).some(t=>zk(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(!pi(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 Eu=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),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(h){if(super(),!e.IDENTIFIER.test(h))throw new Error("CodeGen: name must be a valid identifier");this.str=h}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=n;var i=class extends t{constructor(h){super(),this._items=typeof h=="string"?[h]:h}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let h=this._items[0];return h===""||h==='""'}get str(){var h;return(h=this._str)!==null&&h!==void 0?h:this._str=this._items.reduce((z,g)=>`${z}${g}`,"")}get names(){var h;return(h=this._names)!==null&&h!==void 0?h:this._names=this._items.reduce((z,g)=>(g instanceof n&&(z[g.str]=(z[g.str]||0)+1),z),{})}};e._Code=i,e.nil=new i("");function r(h,...z){let g=[h[0]],S=0;for(;S<z.length;)s(g,z[S]),g.push(h[++S]);return new i(g)}e._=r;let o=new i("+");function a(h,...z){let g=[b(h[0])],S=0;for(;S<z.length;)g.push(o),s(g,z[S]),g.push(o,b(h[++S]));return c(g),new i(g)}e.str=a;function s(h,z){z instanceof i?h.push(...z._items):z instanceof n?h.push(z):h.push(p(z))}e.addCodeArg=s;function c(h){let z=1;for(;z<h.length-1;){if(h[z]===o){let g=u(h[z-1],h[z+1]);if(g!==void 0){h.splice(z-1,3,g);continue}h[z++]="+"}z++}}function u(h,z){if(z==='""')return h;if(h==='""')return z;if(typeof h=="string")return z instanceof n||h[h.length-1]!=='"'?void 0:typeof z!="string"?`${h.slice(0,-1)}${z}"`:z[0]==='"'?h.slice(0,-1)+z.slice(1):void 0;if(typeof z=="string"&&z[0]==='"'&&!(h instanceof n))return`"${h}${z.slice(1)}`}function d(h,z){return z.emptyStr()?h:h.emptyStr()?z:a`${h}${z}`}e.strConcat=d;function p(h){return typeof h=="number"||typeof h=="boolean"||h===null?h:b(Array.isArray(h)?h.join(","):h)}function f(h){return new i(b(h))}e.stringify=f;function b(h){return JSON.stringify(h).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=b;function v(h){return typeof h=="string"&&e.IDENTIFIER.test(h)?new i(`.${h}`):r`[${h}]`}e.getProperty=v;function $(h){if(typeof h=="string"&&e.IDENTIFIER.test(h))return new i(`${h}`);throw new Error(`CodeGen: invalid export name: ${h}, use explicit $id name mapping`)}e.getEsmExportName=$;function y(h){return new i(h.toString())}e.regexpCode=y})),wS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;let t=Eu();var n=class extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}},i;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(i||(e.UsedValueState=i={})),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,d;if(!((d=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||d===void 0)&&d.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 o=class extends t.Name{constructor(c,u){super(u),this.prefix=c}setValue(c,{property:u,itemIndex:d}){this.value=c,this.scopePath=(0,t._)`.${new t.Name(u)}[${d}]`}};e.ValueScopeName=o;let a=(0,t._)`\n`;var s=class extends r{constructor(c){super(c),this._values={},this._scope=c.scope,this.opts={...c,_n:c.lines?a:t.nil}}get(){return this._scope}name(c){return new o(c,this._newName(c))}value(c,u){var d;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let p=this.toName(c),{prefix:f}=p,b=(d=u.key)!==null&&d!==void 0?d:u.ref,v=this._values[f];if(v){let h=v.get(b);if(h)return h}else v=this._values[f]=new Map;v.set(b,p);let $=this._scope[f]||(this._scope[f]=[]),y=$.length;return $[y]=u.ref,p.setValue(u,{property:f,itemIndex:y}),p}getValue(c,u){let d=this._values[c];if(d)return d.get(u)}scopeRefs(c,u=this._values){return this._reduceValues(u,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,t._)`${c}${d.scopePath}`})}scopeCode(c=this._values,u,d){return this._reduceValues(c,p=>{if(p.value===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return p.value.code},u,d)}_reduceValues(c,u,d={},p){let f=t.nil;for(let b in c){let v=c[b];if(!v)continue;let $=d[b]=d[b]||new Map;v.forEach(y=>{if($.has(y))return;$.set(y,i.Started);let h=u(y);if(h){let z=this.opts.es5?e.varKinds.var:e.varKinds.const;f=(0,t._)`${f}${z} ${y} = ${h};${this.opts._n}`}else if(h=p?.(y))f=(0,t._)`${f}${h}${this.opts._n}`;else throw new n(y);$.set(y,i.Completed)})}return f}};e.ValueScope=s})),_e=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),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=Eu(),n=wS();var i=Eu();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var r=wS();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return r.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return r.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return r.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,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 o=class{optimizeNodes(){return this}optimizeNames(R,P){return this}},a=class extends o{constructor(R,P,L){super(),this.varKind=R,this.name=P,this.rhs=L}render({es5:R,_n:P}){let L=R?n.varKinds.var:this.varKind,Y=this.rhs===void 0?"":` = ${this.rhs}`;return`${L} ${this.name}${Y};`+P}optimizeNames(R,P){if(R[this.name.str])return this.rhs&&(this.rhs=ne(this.rhs,R,P)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends o{constructor(R,P,L){super(),this.lhs=R,this.rhs=P,this.sideEffects=L}render({_n:R}){return`${this.lhs} = ${this.rhs};`+R}optimizeNames(R,P){if(!(this.lhs instanceof t.Name&&!R[this.lhs.str]&&!this.sideEffects))return this.rhs=ne(this.rhs,R,P),this}get names(){return ee(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(R,P,L,Y){super(R,L,Y),this.op=P}render({_n:R}){return`${this.lhs} ${this.op}= ${this.rhs};`+R}},u=class extends o{constructor(R){super(),this.label=R,this.names={}}render({_n:R}){return`${this.label}:`+R}},d=class extends o{constructor(R){super(),this.label=R,this.names={}}render({_n:R}){return`break${this.label?` ${this.label}`:""};`+R}},p=class extends o{constructor(R){super(),this.error=R}render({_n:R}){return`throw ${this.error};`+R}get names(){return this.error.names}},f=class extends o{constructor(R){super(),this.code=R}render({_n:R}){return`${this.code};`+R}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(R,P){return this.code=ne(this.code,R,P),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},b=class extends o{constructor(R=[]){super(),this.nodes=R}render(R){return this.nodes.reduce((P,L)=>P+L.render(R),"")}optimizeNodes(){let{nodes:R}=this,P=R.length;for(;P--;){let L=R[P].optimizeNodes();Array.isArray(L)?R.splice(P,1,...L):L?R[P]=L:R.splice(P,1)}return R.length>0?this:void 0}optimizeNames(R,P){let{nodes:L}=this,Y=L.length;for(;Y--;){let ue=L[Y];ue.optimizeNames(R,P)||(we(R,ue.names),L.splice(Y,1))}return L.length>0?this:void 0}get names(){return this.nodes.reduce((R,P)=>F(R,P.names),{})}},v=class extends b{render(R){return"{"+R._n+super.render(R)+"}"+R._n}},$=class extends b{},y=class extends v{};y.kind="else";var h=class Tu extends v{constructor(P,L){super(L),this.condition=P}render(P){let L=`if(${this.condition})`+super.render(P);return this.else&&(L+="else "+this.else.render(P)),L}optimizeNodes(){super.optimizeNodes();let P=this.condition;if(P===!0)return this.nodes;let L=this.else;if(L){let Y=L.optimizeNodes();L=this.else=Array.isArray(Y)?new y(Y):Y}if(L)return P===!1?L instanceof Tu?L:L.nodes:this.nodes.length?this:new Tu(Ne(P),L instanceof Tu?[L]:L.nodes);if(!(P===!1||!this.nodes.length))return this}optimizeNames(P,L){var Y;if(this.else=(Y=this.else)===null||Y===void 0?void 0:Y.optimizeNames(P,L),!!(super.optimizeNames(P,L)||this.else))return this.condition=ne(this.condition,P,L),this}get names(){let P=super.names;return ee(P,this.condition),this.else&&F(P,this.else.names),P}};h.kind="if";var z=class extends v{};z.kind="for";var g=class extends z{constructor(R){super(),this.iteration=R}render(R){return`for(${this.iteration})`+super.render(R)}optimizeNames(R,P){if(super.optimizeNames(R,P))return this.iteration=ne(this.iteration,R,P),this}get names(){return F(super.names,this.iteration.names)}},S=class extends z{constructor(R,P,L,Y){super(),this.varKind=R,this.name=P,this.from=L,this.to=Y}render(R){let P=R.es5?n.varKinds.var:this.varKind,{name:L,from:Y,to:ue}=this;return`for(${P} ${L}=${Y}; ${L}<${ue}; ${L}++)`+super.render(R)}get names(){return ee(ee(super.names,this.from),this.to)}},k=class extends z{constructor(R,P,L,Y){super(),this.loop=R,this.varKind=P,this.name=L,this.iterable=Y}render(R){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(R)}optimizeNames(R,P){if(super.optimizeNames(R,P))return this.iterable=ne(this.iterable,R,P),this}get names(){return F(super.names,this.iterable.names)}},w=class extends v{constructor(R,P,L){super(),this.name=R,this.args=P,this.async=L}render(R){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(R)}};w.kind="func";var _=class extends b{render(R){return"return "+super.render(R)}};_.kind="return";var I=class extends v{render(R){let P="try"+super.render(R);return this.catch&&(P+=this.catch.render(R)),this.finally&&(P+=this.finally.render(R)),P}optimizeNodes(){var R,P;return super.optimizeNodes(),(R=this.catch)===null||R===void 0||R.optimizeNodes(),(P=this.finally)===null||P===void 0||P.optimizeNodes(),this}optimizeNames(R,P){var L,Y;return super.optimizeNames(R,P),(L=this.catch)===null||L===void 0||L.optimizeNames(R,P),(Y=this.finally)===null||Y===void 0||Y.optimizeNames(R,P),this}get names(){let R=super.names;return this.catch&&F(R,this.catch.names),this.finally&&F(R,this.finally.names),R}},j=class extends v{constructor(R){super(),this.error=R}render(R){return`catch(${this.error})`+super.render(R)}};j.kind="catch";var U=class extends v{render(R){return"finally"+super.render(R)}};U.kind="finally";var N=class{constructor(R,P={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...P,_n:P.lines?`
|
|
69
|
+
`:""},this._extScope=R,this._scope=new n.Scope({parent:R}),this._nodes=[new $]}toString(){return this._root.render(this.opts)}name(R){return this._scope.name(R)}scopeName(R){return this._extScope.name(R)}scopeValue(R,P){let L=this._extScope.value(R,P);return(this._values[L.prefix]||(this._values[L.prefix]=new Set)).add(L),L}getScopeValue(R,P){return this._extScope.getValue(R,P)}scopeRefs(R){return this._extScope.scopeRefs(R,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(R,P,L,Y){let ue=this._scope.toName(P);return L!==void 0&&Y&&(this._constants[ue.str]=L),this._leafNode(new a(R,ue,L)),ue}const(R,P,L){return this._def(n.varKinds.const,R,P,L)}let(R,P,L){return this._def(n.varKinds.let,R,P,L)}var(R,P,L){return this._def(n.varKinds.var,R,P,L)}assign(R,P,L){return this._leafNode(new s(R,P,L))}add(R,P){return this._leafNode(new c(R,e.operators.ADD,P))}code(R){return typeof R=="function"?R():R!==t.nil&&this._leafNode(new f(R)),this}object(...R){let P=["{"];for(let[L,Y]of R)P.length>1&&P.push(","),P.push(L),(L!==Y||this.opts.es5)&&(P.push(":"),(0,t.addCodeArg)(P,Y));return P.push("}"),new t._Code(P)}if(R,P,L){if(this._blockNode(new h(R)),P&&L)this.code(P).else().code(L).endIf();else if(P)this.code(P).endIf();else if(L)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(R){return this._elseNode(new h(R))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(h,y)}_for(R,P){return this._blockNode(R),P&&this.code(P).endFor(),this}for(R,P){return this._for(new g(R),P)}forRange(R,P,L,Y,ue=this.opts.es5?n.varKinds.var:n.varKinds.let){let Se=this._scope.toName(R);return this._for(new S(ue,Se,P,L),()=>Y(Se))}forOf(R,P,L,Y=n.varKinds.const){let ue=this._scope.toName(R);if(this.opts.es5){let Se=P instanceof t.Name?P:this.var("_arr",P);return this.forRange("_i",0,(0,t._)`${Se}.length`,fe=>{this.var(ue,(0,t._)`${Se}[${fe}]`),L(ue)})}return this._for(new k("of",Y,ue,P),()=>L(ue))}forIn(R,P,L,Y=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(R,(0,t._)`Object.keys(${P})`,L);let ue=this._scope.toName(R);return this._for(new k("in",Y,ue,P),()=>L(ue))}endFor(){return this._endBlockNode(z)}label(R){return this._leafNode(new u(R))}break(R){return this._leafNode(new d(R))}return(R){let P=new _;if(this._blockNode(P),this.code(R),P.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(_)}try(R,P,L){if(!P&&!L)throw new Error('CodeGen: "try" without "catch" and "finally"');let Y=new I;if(this._blockNode(Y),this.code(R),P){let ue=this.name("e");this._currNode=Y.catch=new j(ue),P(ue)}return L&&(this._currNode=Y.finally=new U,this.code(L)),this._endBlockNode(j,U)}throw(R){return this._leafNode(new p(R))}block(R,P){return this._blockStarts.push(this._nodes.length),R&&this.code(R).endBlock(P),this}endBlock(R){let P=this._blockStarts.pop();if(P===void 0)throw new Error("CodeGen: not in self-balancing block");let L=this._nodes.length-P;if(L<0||R!==void 0&&L!==R)throw new Error(`CodeGen: wrong number of nodes: ${L} vs ${R} expected`);return this._nodes.length=P,this}func(R,P=t.nil,L,Y){return this._blockNode(new w(R,P,L)),Y&&this.code(Y).endFunc(),this}endFunc(){return this._endBlockNode(w)}optimize(R=1){for(;R-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(R){return this._currNode.nodes.push(R),this}_blockNode(R){this._currNode.nodes.push(R),this._nodes.push(R)}_endBlockNode(R,P){let L=this._currNode;if(L instanceof R||P&&L instanceof P)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${P?`${R.kind}/${P.kind}`:R.kind}"`)}_elseNode(R){let P=this._currNode;if(!(P instanceof h))throw new Error('CodeGen: "else" without "if"');return this._currNode=P.else=R,this}get _root(){return this._nodes[0]}get _currNode(){let R=this._nodes;return R[R.length-1]}set _currNode(R){let P=this._nodes;P[P.length-1]=R}};e.CodeGen=N;function F(R,P){for(let L in P)R[L]=(R[L]||0)+(P[L]||0);return R}function ee(R,P){return P instanceof t._CodeOrName?F(R,P.names):R}function ne(R,P,L){if(R instanceof t.Name)return Y(R);if(!ue(R))return R;return new t._Code(R._items.reduce((Se,fe)=>(fe instanceof t.Name&&(fe=Y(fe)),fe instanceof t._Code?Se.push(...fe._items):Se.push(fe),Se),[]));function Y(Se){let fe=L[Se.str];return fe===void 0||P[Se.str]!==1?Se:(delete P[Se.str],fe)}function ue(Se){return Se instanceof t._Code&&Se._items.some(fe=>fe instanceof t.Name&&P[fe.str]===1&&L[fe.str]!==void 0)}}function we(R,P){for(let L in P)R[L]=(R[L]||0)-(P[L]||0)}function Ne(R){return typeof R=="boolean"||typeof R=="number"||R===null?!R:(0,t._)`!${J(R)}`}e.not=Ne;let Ae=M(e.operators.AND);function Je(...R){return R.reduce(Ae)}e.and=Je;let ke=M(e.operators.OR);function x(...R){return R.reduce(ke)}e.or=x;function M(R){return(P,L)=>P===t.nil?L:L===t.nil?P:(0,t._)`${J(P)} ${R} ${J(L)}`}function J(R){return R instanceof t.Name?R:(0,t._)`(${R})`}})),Te=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),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=_e(),n=Eu();function i(w){let _={};for(let I of w)_[I]=!0;return _}e.toHash=i;function r(w,_){return typeof _=="boolean"?_:Object.keys(_).length===0?!0:(o(w,_),!a(_,w.self.RULES.all))}e.alwaysValidSchema=r;function o(w,_=w.schema){let{opts:I,self:j}=w;if(!I.strictSchema||typeof _=="boolean")return;let U=j.RULES.keywords;for(let N in _)U[N]||k(w,`unknown keyword: "${N}"`)}e.checkUnknownRules=o;function a(w,_){if(typeof w=="boolean")return!w;for(let I in w)if(_[I])return!0;return!1}e.schemaHasRules=a;function s(w,_){if(typeof w=="boolean")return!w;for(let I in w)if(I!=="$ref"&&_.all[I])return!0;return!1}e.schemaHasRulesButRef=s;function c({topSchemaRef:w,schemaPath:_},I,j,U){if(!U){if(typeof I=="number"||typeof I=="boolean")return I;if(typeof I=="string")return(0,t._)`${I}`}return(0,t._)`${w}${_}${(0,t.getProperty)(j)}`}e.schemaRefOrVal=c;function u(w){return f(decodeURIComponent(w))}e.unescapeFragment=u;function d(w){return encodeURIComponent(p(w))}e.escapeFragment=d;function p(w){return typeof w=="number"?`${w}`:w.replace(/~/g,"~0").replace(/\//g,"~1")}e.escapeJsonPointer=p;function f(w){return w.replace(/~1/g,"/").replace(/~0/g,"~")}e.unescapeJsonPointer=f;function b(w,_){if(Array.isArray(w))for(let I of w)_(I);else _(w)}e.eachItem=b;function v({mergeNames:w,mergeToName:_,mergeValues:I,resultToName:j}){return(U,N,F,ee)=>{let ne=F===void 0?N:F instanceof t.Name?(N instanceof t.Name?w(U,N,F):_(U,N,F),F):N instanceof t.Name?(_(U,F,N),N):I(N,F);return ee===t.Name&&!(ne instanceof t.Name)?j(U,ne):ne}}e.mergeEvaluated={props:v({mergeNames:(w,_,I)=>w.if((0,t._)`${I} !== true && ${_} !== undefined`,()=>{w.if((0,t._)`${_} === true`,()=>w.assign(I,!0),()=>w.assign(I,(0,t._)`${I} || {}`).code((0,t._)`Object.assign(${I}, ${_})`))}),mergeToName:(w,_,I)=>w.if((0,t._)`${I} !== true`,()=>{_===!0?w.assign(I,!0):(w.assign(I,(0,t._)`${I} || {}`),y(w,I,_))}),mergeValues:(w,_)=>w===!0?!0:{...w,..._},resultToName:$}),items:v({mergeNames:(w,_,I)=>w.if((0,t._)`${I} !== true && ${_} !== undefined`,()=>w.assign(I,(0,t._)`${_} === true ? true : ${I} > ${_} ? ${I} : ${_}`)),mergeToName:(w,_,I)=>w.if((0,t._)`${I} !== true`,()=>w.assign(I,_===!0?!0:(0,t._)`${I} > ${_} ? ${I} : ${_}`)),mergeValues:(w,_)=>w===!0?!0:Math.max(w,_),resultToName:(w,_)=>w.var("items",_)})};function $(w,_){if(_===!0)return w.var("props",!0);let I=w.var("props",(0,t._)`{}`);return _!==void 0&&y(w,I,_),I}e.evaluatedPropsToName=$;function y(w,_,I){Object.keys(I).forEach(j=>w.assign((0,t._)`${_}${(0,t.getProperty)(j)}`,!0))}e.setEvaluated=y;let h={};function z(w,_){return w.scopeValue("func",{ref:_,code:h[_.code]||(h[_.code]=new n._Code(_.code))})}e.useFunc=z;var g;(function(w){w[w.Num=0]="Num",w[w.Str=1]="Str"})(g||(e.Type=g={}));function S(w,_,I){if(w instanceof t.Name){let j=_===g.Num;return I?j?(0,t._)`"[" + ${w} + "]"`:(0,t._)`"['" + ${w} + "']"`:j?(0,t._)`"/" + ${w}`:(0,t._)`"/" + ${w}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return I?(0,t.getProperty)(w).toString():"/"+p(w)}e.getErrorPath=S;function k(w,_,I=w.opts.strictSchema){if(I){if(_=`strict mode: ${_}`,I===!0)throw new Error(_);w.self.logger.warn(_)}}e.checkStrictMode=k})),Pt=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),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})),xu=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;let t=_e(),n=Te(),i=Pt();e.keywordError={message:({keyword:y})=>(0,t.str)`must pass "${y}" keyword validation`},e.keyword$DataError={message:({keyword:y,schemaType:h})=>h?(0,t.str)`"${y}" keyword must be ${h} ($data)`:(0,t.str)`"${y}" keyword is invalid ($data)`};function r(y,h=e.keywordError,z,g){let{it:S}=y,{gen:k,compositeRule:w,allErrors:_}=S,I=p(y,h,z);g??(w||_)?c(k,I):u(S,(0,t._)`[${I}]`)}e.reportError=r;function o(y,h=e.keywordError,z){let{it:g}=y,{gen:S,compositeRule:k,allErrors:w}=g;c(S,p(y,h,z)),k||w||u(g,i.default.vErrors)}e.reportExtraError=o;function a(y,h){y.assign(i.default.errors,h),y.if((0,t._)`${i.default.vErrors} !== null`,()=>y.if(h,()=>y.assign((0,t._)`${i.default.vErrors}.length`,h),()=>y.assign(i.default.vErrors,null)))}e.resetErrorsCount=a;function s({gen:y,keyword:h,schemaValue:z,data:g,errsCount:S,it:k}){if(S===void 0)throw new Error("ajv implementation error");let w=y.name("err");y.forRange("i",S,i.default.errors,_=>{y.const(w,(0,t._)`${i.default.vErrors}[${_}]`),y.if((0,t._)`${w}.instancePath === undefined`,()=>y.assign((0,t._)`${w}.instancePath`,(0,t.strConcat)(i.default.instancePath,k.errorPath))),y.assign((0,t._)`${w}.schemaPath`,(0,t.str)`${k.errSchemaPath}/${h}`),k.opts.verbose&&(y.assign((0,t._)`${w}.schema`,z),y.assign((0,t._)`${w}.data`,g))})}e.extendErrors=s;function c(y,h){let z=y.const("err",h);y.if((0,t._)`${i.default.vErrors} === null`,()=>y.assign(i.default.vErrors,(0,t._)`[${z}]`),(0,t._)`${i.default.vErrors}.push(${z})`),y.code((0,t._)`${i.default.errors}++`)}function u(y,h){let{gen:z,validateName:g,schemaEnv:S}=y;S.$async?z.throw((0,t._)`new ${y.ValidationError}(${h})`):(z.assign((0,t._)`${g}.errors`,h),z.return(!1))}let d={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 p(y,h,z){let{createErrors:g}=y.it;return g===!1?(0,t._)`{}`:f(y,h,z)}function f(y,h,z={}){let{gen:g,it:S}=y,k=[b(S,z),v(y,z)];return $(y,h,k),g.object(...k)}function b({errorPath:y},{instancePath:h}){let z=h?(0,t.str)`${y}${(0,n.getErrorPath)(h,n.Type.Str)}`:y;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,z)]}function v({keyword:y,it:{errSchemaPath:h}},{schemaPath:z,parentSchema:g}){let S=g?h:(0,t.str)`${h}/${y}`;return z&&(S=(0,t.str)`${S}${(0,n.getErrorPath)(z,n.Type.Str)}`),[d.schemaPath,S]}function $(y,{params:h,message:z},g){let{keyword:S,data:k,schemaValue:w,it:_}=y,{opts:I,propertyName:j,topSchemaRef:U,schemaPath:N}=_;g.push([d.keyword,S],[d.params,typeof h=="function"?h(y):h||(0,t._)`{}`]),I.messages&&g.push([d.message,typeof z=="function"?z(y):z]),I.verbose&&g.push([d.schema,w],[d.parentSchema,(0,t._)`${U}${N}`],[i.default.data,k]),j&&g.push([d.propertyName,j])}})),Rk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;let t=xu(),n=_e(),i=Pt(),r={message:"boolean schema is false"};function o(c){let{gen:u,schema:d,validateName:p}=c;d===!1?s(c,!1):typeof d=="object"&&d.$async===!0?u.return(i.default.data):(u.assign((0,n._)`${p}.errors`,null),u.return(!0))}e.topBoolOrEmptySchema=o;function a(c,u){let{gen:d,schema:p}=c;p===!1?(d.var(u,!1),s(c)):d.var(u,!0)}e.boolOrEmptySchema=a;function s(c,u){let{gen:d,data:p}=c,f={gen:d,keyword:"false schema",data:p,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:c};(0,t.reportError)(f,r,void 0,u)}})),zS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),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 i(){let r={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...r,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},r.number,r.string,r.array,r.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=i})),IS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:r,self:o},a){let s=o.RULES.types[a];return s&&s!==!0&&n(r,s)}e.schemaHasRulesForType=t;function n(r,o){return o.rules.some(a=>i(r,a))}e.shouldUseGroup=n;function i(r,o){var a;return r[o.keyword]!==void 0||((a=o.definition.implements)===null||a===void 0?void 0:a.some(s=>r[s]!==void 0))}e.shouldUseRule=i})),Pu=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;let t=zS(),n=IS(),i=xu(),r=_e(),o=Te();var a;(function(g){g[g.Correct=0]="Correct",g[g.Wrong=1]="Wrong"})(a||(e.DataType=a={}));function s(g){let S=c(g.type);if(S.includes("null")){if(g.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!S.length&&g.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');g.nullable===!0&&S.push("null")}return S}e.getSchemaTypes=s;function c(g){let S=Array.isArray(g)?g:g?[g]:[];if(S.every(t.isJSONType))return S;throw new Error("type must be JSONType or JSONType[]: "+S.join(","))}e.getJSONTypes=c;function u(g,S){let{gen:k,data:w,opts:_}=g,I=p(S,_.coerceTypes),j=S.length>0&&!(I.length===0&&S.length===1&&(0,n.schemaHasRulesForType)(g,S[0]));if(j){let U=$(S,w,_.strictNumbers,a.Wrong);k.if(U,()=>{I.length?f(g,S,I):h(g)})}return j}e.coerceAndCheckDataType=u;let d=new Set(["string","number","integer","boolean","null"]);function p(g,S){return S?g.filter(k=>d.has(k)||S==="array"&&k==="array"):[]}function f(g,S,k){let{gen:w,data:_,opts:I}=g,j=w.let("dataType",(0,r._)`typeof ${_}`),U=w.let("coerced",(0,r._)`undefined`);I.coerceTypes==="array"&&w.if((0,r._)`${j} == 'object' && Array.isArray(${_}) && ${_}.length == 1`,()=>w.assign(_,(0,r._)`${_}[0]`).assign(j,(0,r._)`typeof ${_}`).if($(S,_,I.strictNumbers),()=>w.assign(U,_))),w.if((0,r._)`${U} !== undefined`);for(let F of k)(d.has(F)||F==="array"&&I.coerceTypes==="array")&&N(F);w.else(),h(g),w.endIf(),w.if((0,r._)`${U} !== undefined`,()=>{w.assign(_,U),b(g,U)});function N(F){switch(F){case"string":w.elseIf((0,r._)`${j} == "number" || ${j} == "boolean"`).assign(U,(0,r._)`"" + ${_}`).elseIf((0,r._)`${_} === null`).assign(U,(0,r._)`""`);return;case"number":w.elseIf((0,r._)`${j} == "boolean" || ${_} === null
|
|
70
70
|
|| (${j} == "string" && ${_} && ${_} == +${_})`).assign(U,(0,r._)`+${_}`);return;case"integer":w.elseIf((0,r._)`${j} === "boolean" || ${_} === null
|
|
71
71
|
|| (${j} === "string" && ${_} && ${_} == +${_} && !(${_} % 1))`).assign(U,(0,r._)`+${_}`);return;case"boolean":w.elseIf((0,r._)`${_} === "false" || ${_} === 0 || ${_} === null`).assign(U,!1).elseIf((0,r._)`${_} === "true" || ${_} === 1`).assign(U,!0);return;case"null":w.elseIf((0,r._)`${_} === "" || ${_} === 0 || ${_} === false`),w.assign(U,null);return;case"array":w.elseIf((0,r._)`${j} === "string" || ${j} === "number"
|
|
72
|
-
|| ${j} === "boolean" || ${_} === null`).assign(U,(0,r._)`[${_}]`)}}}function b({gen:g,parentData:S,parentDataProperty:k},w){g.if((0,r._)`${S} !== undefined`,()=>g.assign((0,r._)`${S}[${k}]`,w))}function v(g,S,k,w=a.Correct){let _=w===a.Correct?r.operators.EQ:r.operators.NEQ,I;switch(g){case"null":return(0,r._)`${S} ${_} null`;case"array":I=(0,r._)`Array.isArray(${S})`;break;case"object":I=(0,r._)`${S} && typeof ${S} == "object" && !Array.isArray(${S})`;break;case"integer":I=j((0,r._)`!(${S} % 1) && !isNaN(${S})`);break;case"number":I=j();break;default:return(0,r._)`typeof ${S} ${_} ${g}`}return w===a.Correct?I:(0,r.not)(I);function j(U=r.nil){return(0,r.and)((0,r._)`typeof ${S} == "number"`,U,k?(0,r._)`isFinite(${S})`:r.nil)}}e.checkDataType=v;function $(g,S,k,w){if(g.length===1)return v(g[0],S,k,w);let _,I=(0,o.toHash)(g);if(I.array&&I.object){let j=(0,r._)`typeof ${S} != "object"`;_=I.null?j:(0,r._)`!${S} || ${j}`,delete I.null,delete I.array,delete I.object}else _=r.nil;I.number&&delete I.integer;for(let j in I)_=(0,r.and)(_,v(j,S,k,w));return _}e.checkDataTypes=$;let y={message:({schema:g})=>`must be ${g}`,params:({schema:g,schemaValue:S})=>typeof g=="string"?(0,r._)`{type: ${g}}`:(0,r._)`{type: ${S}}`};function h(g){let S=z(g);(0,i.reportError)(S,y)}e.reportTypeError=h;function z(g){let{gen:S,data:k,schema:w}=g,_=(0,o.schemaRefOrVal)(g,w,"type");return{gen:S,keyword:"type",data:k,schema:w.type,schemaCode:_,schemaValue:_,parentSchema:w,params:{},it:g}}})),dk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;let t=ye(),n=Te();function i(o,a){let{properties:s,items:l}=o.schema;if(a==="object"&&s)for(let u in s)r(o,u,s[u].default);else a==="array"&&Array.isArray(l)&&l.forEach((u,d)=>r(o,d,u.default))}e.assignDefaults=i;function r(o,a,s){let{gen:l,compositeRule:u,data:d,opts:p}=o;if(s===void 0)return;let f=(0,t._)`${d}${(0,t.getProperty)(a)}`;if(u){(0,n.checkStrictMode)(o,`default is ignored for: ${f}`);return}let b=(0,t._)`${f} === undefined`;p.useDefaults==="empty"&&(b=(0,t._)`${b} || ${f} === null || ${f} === ""`),l.if(b,(0,t._)`${f} = ${(0,t.stringify)(s)}`)}})),Pt=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),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=ye(),n=Te(),i=Et(),r=Te();function o(g,S){let{gen:k,data:w,it:_}=g;k.if(p(k,w,S,_.opts.ownProperties),()=>{g.setParams({missingProperty:(0,t._)`${S}`},!0),g.error()})}e.checkReportMissingProp=o;function a({gen:g,data:S,it:{opts:k}},w,_){return(0,t.or)(...w.map(I=>(0,t.and)(p(g,S,I,k.ownProperties),(0,t._)`${_} = ${I}`)))}e.checkMissingProp=a;function s(g,S){g.setParams({missingProperty:S},!0),g.error()}e.reportMissingProp=s;function l(g){return g.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=l;function u(g,S,k){return(0,t._)`${l(g)}.call(${S}, ${k})`}e.isOwnProperty=u;function d(g,S,k,w){let _=(0,t._)`${S}${(0,t.getProperty)(k)} !== undefined`;return w?(0,t._)`${_} && ${u(g,S,k)}`:_}e.propertyInData=d;function p(g,S,k,w){let _=(0,t._)`${S}${(0,t.getProperty)(k)} === undefined`;return w?(0,t.or)(_,(0,t.not)(u(g,S,k))):_}e.noPropertyInData=p;function f(g){return g?Object.keys(g).filter(S=>S!=="__proto__"):[]}e.allSchemaProperties=f;function b(g,S){return f(S).filter(k=>!(0,n.alwaysValidSchema)(g,S[k]))}e.schemaProperties=b;function v({schemaCode:g,data:S,it:{gen:k,topSchemaRef:w,schemaPath:_,errorPath:I},it:j},U,C,F){let ee=F?(0,t._)`${g}, ${S}, ${w}${_}`:S,ne=[[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,I)],[i.default.parentData,j.parentData],[i.default.parentDataProperty,j.parentDataProperty],[i.default.rootData,i.default.rootData]];j.opts.dynamicRef&&ne.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);let we=(0,t._)`${ee}, ${k.object(...ne)}`;return C!==t.nil?(0,t._)`${U}.call(${C}, ${we})`:(0,t._)`${U}(${we})`}e.callValidateCode=v;let $=(0,t._)`new RegExp`;function y({gen:g,it:{opts:S}},k){let w=S.unicodeRegExp?"u":"",{regExp:_}=S.code,I=_(k,w);return g.scopeValue("pattern",{key:I.toString(),ref:I,code:(0,t._)`${_.code==="new RegExp"?$:(0,r.useFunc)(g,_)}(${k}, ${w})`})}e.usePattern=y;function h(g){let{gen:S,data:k,keyword:w,it:_}=g,I=S.name("valid");if(_.allErrors){let U=S.let("valid",!0);return j(()=>S.assign(U,!1)),U}return S.var(I,!0),j(()=>S.break()),I;function j(U){let C=S.const("len",(0,t._)`${k}.length`);S.forRange("i",0,C,F=>{g.subschema({keyword:w,dataProp:F,dataPropType:n.Type.Num},I),S.if((0,t.not)(I),U)})}}e.validateArray=h;function z(g){let{gen:S,schema:k,keyword:w,it:_}=g;if(!Array.isArray(k))throw new Error("ajv implementation error");if(k.some(U=>(0,n.alwaysValidSchema)(_,U))&&!_.opts.unevaluated)return;let I=S.let("valid",!1),j=S.name("_valid");S.block(()=>k.forEach((U,C)=>{let F=g.subschema({keyword:w,schemaProp:C,compositeRule:!0},j);S.assign(I,(0,t._)`${I} || ${j}`),g.mergeValidEvaluated(F,j)||S.if((0,t.not)(I))})),g.result(I,()=>g.reset(),()=>g.error(!0))}e.validateUnion=z})),mk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;let t=ye(),n=Et(),i=Pt(),r=Ru();function o(b,v){let{gen:$,keyword:y,schema:h,parentSchema:z,it:g}=b,S=v.macro.call(g.self,h,z,g),k=d($,y,S);g.opts.validateSchema!==!1&&g.self.validateSchema(S,!0);let w=$.name("valid");b.subschema({schema:S,schemaPath:t.nil,errSchemaPath:`${g.errSchemaPath}/${y}`,topSchemaRef:k,compositeRule:!0},w),b.pass(w,()=>b.error(!0))}e.macroKeywordCode=o;function a(b,v){var $;let{gen:y,keyword:h,schema:z,parentSchema:g,$data:S,it:k}=b;u(k,v);let w=d(y,h,!S&&v.compile?v.compile.call(k.self,z,g,k):v.validate),_=y.let("valid");b.block$data(_,I),b.ok(($=v.valid)!==null&&$!==void 0?$:_);function I(){if(v.errors===!1)C(),v.modifying&&s(b),F(()=>b.error());else{let ee=v.async?j():U();v.modifying&&s(b),F(()=>l(b,ee))}}function j(){let ee=y.let("ruleErrs",null);return y.try(()=>C((0,t._)`await `),ne=>y.assign(_,!1).if((0,t._)`${ne} instanceof ${k.ValidationError}`,()=>y.assign(ee,(0,t._)`${ne}.errors`),()=>y.throw(ne))),ee}function U(){let ee=(0,t._)`${w}.errors`;return y.assign(ee,null),C(t.nil),ee}function C(ee=v.async?(0,t._)`await `:t.nil){let ne=k.opts.passContext?n.default.this:n.default.self,we=!("compile"in v&&!S||v.schema===!1);y.assign(_,(0,t._)`${ee}${(0,i.callValidateCode)(b,w,ne,we)}`,v.modifying)}function F(ee){var ne;y.if((0,t.not)((ne=v.valid)!==null&&ne!==void 0?ne:_),ee)}}e.funcKeywordCode=a;function s(b){let{gen:v,data:$,it:y}=b;v.if(y.parentData,()=>v.assign($,(0,t._)`${y.parentData}[${y.parentDataProperty}]`))}function l(b,v){let{gen:$}=b;$.if((0,t._)`Array.isArray(${v})`,()=>{$.assign(n.default.vErrors,(0,t._)`${n.default.vErrors} === null ? ${v} : ${n.default.vErrors}.concat(${v})`).assign(n.default.errors,(0,t._)`${n.default.vErrors}.length`),(0,r.extendErrors)(b)},()=>b.error())}function u({schemaEnv:b},v){if(v.async&&!b.$async)throw new Error("async keyword in sync schema")}function d(b,v,$){if($===void 0)throw new Error(`keyword "${v}" failed to compile`);return b.scopeValue("keyword",typeof $=="function"?{ref:$}:{ref:$,code:(0,t.stringify)($)})}function p(b,v,$=!1){return!v.length||v.some(y=>y==="array"?Array.isArray(b):y==="object"?b&&typeof b=="object"&&!Array.isArray(b):typeof b==y||$&&typeof b>"u")}e.validSchemaType=p;function f({schema:b,opts:v,self:$,errSchemaPath:y},h,z){if(Array.isArray(h.keyword)?!h.keyword.includes(z):h.keyword!==z)throw new Error("ajv implementation error");let g=h.dependencies;if(g?.some(S=>!Object.prototype.hasOwnProperty.call(b,S)))throw new Error(`parent schema must have dependencies of ${z}: ${g.join(",")}`);if(h.validateSchema&&!h.validateSchema(b[z])){let S=`keyword "${z}" value is invalid at path "${y}": `+$.errorsText(h.validateSchema.errors);if(v.validateSchema==="log")$.logger.error(S);else throw new Error(S)}}e.validateKeywordUsage=f})),pk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;let t=ye(),n=Te();function i(a,{keyword:s,schemaProp:l,schema:u,schemaPath:d,errSchemaPath:p,topSchemaRef:f}){if(s!==void 0&&u!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(s!==void 0){let b=a.schema[s];return l===void 0?{schema:b,schemaPath:(0,t._)`${a.schemaPath}${(0,t.getProperty)(s)}`,errSchemaPath:`${a.errSchemaPath}/${s}`}:{schema:b[l],schemaPath:(0,t._)`${a.schemaPath}${(0,t.getProperty)(s)}${(0,t.getProperty)(l)}`,errSchemaPath:`${a.errSchemaPath}/${s}/${(0,n.escapeFragment)(l)}`}}if(u!==void 0){if(d===void 0||p===void 0||f===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:d,topSchemaRef:f,errSchemaPath:p}}throw new Error('either "keyword" or "schema" must be passed')}e.getSubschema=i;function r(a,s,{dataProp:l,dataPropType:u,data:d,dataTypes:p,propertyName:f}){if(d!==void 0&&l!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:b}=s;if(l!==void 0){let{errorPath:$,dataPathArr:y,opts:h}=s;v(b.let("data",(0,t._)`${s.data}${(0,t.getProperty)(l)}`,!0)),a.errorPath=(0,t.str)`${$}${(0,n.getErrorPath)(l,u,h.jsPropertySyntax)}`,a.parentDataProperty=(0,t._)`${l}`,a.dataPathArr=[...y,a.parentDataProperty]}d!==void 0&&(v(d instanceof t.Name?d:b.let("data",d,!0)),f!==void 0&&(a.propertyName=f)),p&&(a.dataTypes=p);function v($){a.data=$,a.dataLevel=s.dataLevel+1,a.dataTypes=[],s.definedProperties=new Set,a.parentData=s.data,a.dataNames=[...s.dataNames,$]}}e.extendSubschemaData=r;function o(a,{jtdDiscriminator:s,jtdMetadata:l,compositeRule:u,createErrors:d,allErrors:p}){u!==void 0&&(a.compositeRule=u),d!==void 0&&(a.createErrors=d),p!==void 0&&(a.allErrors=p),a.jtdDiscriminator=s,a.jtdMetadata=l}e.extendSubschemaMode=o})),fS=Z(((e,t)=>{t.exports=function n(i,r){if(i===r)return!0;if(i&&r&&typeof i=="object"&&typeof r=="object"){if(i.constructor!==r.constructor)return!1;var o,a,s;if(Array.isArray(i)){if(o=i.length,o!=r.length)return!1;for(a=o;a--!==0;)if(!n(i[a],r[a]))return!1;return!0}if(i.constructor===RegExp)return i.source===r.source&&i.flags===r.flags;if(i.valueOf!==Object.prototype.valueOf)return i.valueOf()===r.valueOf();if(i.toString!==Object.prototype.toString)return i.toString()===r.toString();if(s=Object.keys(i),o=s.length,o!==Object.keys(r).length)return!1;for(a=o;a--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[a]))return!1;for(a=o;a--!==0;){var l=s[a];if(!n(i[l],r[l]))return!1}return!0}return i!==i&&r!==r}})),hk=Z(((e,t)=>{var n=t.exports=function(o,a,s){typeof a=="function"&&(s=a,a={}),s=a.cb||s;var l=typeof s=="function"?s:s.pre||function(){},u=s.post||function(){};i(a,l,u,o,"",o)};n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function i(o,a,s,l,u,d,p,f,b,v){if(l&&typeof l=="object"&&!Array.isArray(l)){a(l,u,d,p,f,b,v);for(var $ in l){var y=l[$];if(Array.isArray(y)){if($ in n.arrayKeywords)for(var h=0;h<y.length;h++)i(o,a,s,y[h],u+"/"+$+"/"+h,d,u,$,l,h)}else if($ in n.propsKeywords){if(y&&typeof y=="object")for(var z in y)i(o,a,s,y[z],u+"/"+$+"/"+r(z),d,u,$,l,z)}else($ in n.keywords||o.allKeys&&!($ in n.skipKeywords))&&i(o,a,s,y,u+"/"+$,d,u,$,l)}s(l,u,d,p,f,b,v)}}function r(o){return o.replace(/~/g,"~0").replace(/\//g,"~1")}})),ku=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;let t=Te(),n=fS(),i=hk(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function o(y,h=!0){return typeof y=="boolean"?!0:h===!0?!s(y):h?l(y)<=h:!1}e.inlineRef=o;let a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(y){for(let h in y){if(a.has(h))return!0;let z=y[h];if(Array.isArray(z)&&z.some(s)||typeof z=="object"&&s(z))return!0}return!1}function l(y){let h=0;for(let z in y){if(z==="$ref")return 1/0;if(h++,!r.has(z)&&(typeof y[z]=="object"&&(0,t.eachItem)(y[z],g=>h+=l(g)),h===1/0))return 1/0}return h}function u(y,h="",z){return z!==!1&&(h=f(h)),d(y,y.parse(h))}e.getFullPath=u;function d(y,h){return y.serialize(h).split("#")[0]+"#"}e._getFullPath=d;let p=/#\/?$/;function f(y){return y?y.replace(p,""):""}e.normalizeId=f;function b(y,h,z){return z=f(z),y.resolve(h,z)}e.resolveUrl=b;let v=/^[a-z_][-a-z0-9._]*$/i;function $(y,h){if(typeof y=="boolean")return{};let{schemaId:z,uriResolver:g}=this.opts,S=f(y[z]||h),k={"":S},w=u(g,S,!1),_={},I=new Set;return i(y,{allKeys:!0},(C,F,ee,ne)=>{if(ne===void 0)return;let we=w+F,Ce=k[ne];typeof C[z]=="string"&&(Ce=Oe.call(this,C[z])),Je.call(this,C.$anchor),Je.call(this,C.$dynamicAnchor),k[F]=Ce;function Oe(ke){let x=this.opts.uriResolver.resolve;if(ke=f(Ce?x(Ce,ke):ke),I.has(ke))throw U(ke);I.add(ke);let M=this.refs[ke];return typeof M=="string"&&(M=this.refs[M]),typeof M=="object"?j(C,M.schema,ke):ke!==f(we)&&(ke[0]==="#"?(j(C,_[ke],ke),_[ke]=C):this.refs[ke]=we),ke}function Je(ke){if(typeof ke=="string"){if(!v.test(ke))throw new Error(`invalid anchor "${ke}"`);Oe.call(this,`#${ke}`)}}}),_;function j(C,F,ee){if(F!==void 0&&!n(C,F))throw U(ee)}function U(C){return new Error(`reference "${C}" resolves to more than one schema`)}}e.getSchemaRefs=$})),hi=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;let t=uk(),n=Iu(),i=hS(),r=Iu(),o=dk(),a=mk(),s=pk(),l=ye(),u=Et(),d=ku(),p=Te(),f=Ru();function b(E){if(w(E)&&(I(E),k(E))){h(E);return}v(E,()=>(0,t.topBoolOrEmptySchema)(E))}e.validateFunctionCode=b;function v({gen:E,validateName:D,schema:V,schemaEnv:me,opts:pe},be){pe.code.es5?E.func(D,(0,l._)`${u.default.data}, ${u.default.valCxt}`,me.$async,()=>{E.code((0,l._)`"use strict"; ${g(V,pe)}`),y(E,pe),E.code(be)}):E.func(D,(0,l._)`${u.default.data}, ${$(pe)}`,me.$async,()=>E.code(g(V,pe)).code(be))}function $(E){return(0,l._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${E.dynamicRef?(0,l._)`, ${u.default.dynamicAnchors}={}`:l.nil}}={}`}function y(E,D){E.if(u.default.valCxt,()=>{E.var(u.default.instancePath,(0,l._)`${u.default.valCxt}.${u.default.instancePath}`),E.var(u.default.parentData,(0,l._)`${u.default.valCxt}.${u.default.parentData}`),E.var(u.default.parentDataProperty,(0,l._)`${u.default.valCxt}.${u.default.parentDataProperty}`),E.var(u.default.rootData,(0,l._)`${u.default.valCxt}.${u.default.rootData}`),D.dynamicRef&&E.var(u.default.dynamicAnchors,(0,l._)`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{E.var(u.default.instancePath,(0,l._)`""`),E.var(u.default.parentData,(0,l._)`undefined`),E.var(u.default.parentDataProperty,(0,l._)`undefined`),E.var(u.default.rootData,u.default.data),D.dynamicRef&&E.var(u.default.dynamicAnchors,(0,l._)`{}`)})}function h(E){let{schema:D,opts:V,gen:me}=E;v(E,()=>{V.$comment&&D.$comment&&ne(E),C(E),me.let(u.default.vErrors,null),me.let(u.default.errors,0),V.unevaluated&&z(E),j(E),we(E)})}function z(E){let{gen:D,validateName:V}=E;E.evaluated=D.const("evaluated",(0,l._)`${V}.evaluated`),D.if((0,l._)`${E.evaluated}.dynamicProps`,()=>D.assign((0,l._)`${E.evaluated}.props`,(0,l._)`undefined`)),D.if((0,l._)`${E.evaluated}.dynamicItems`,()=>D.assign((0,l._)`${E.evaluated}.items`,(0,l._)`undefined`))}function g(E,D){let V=typeof E=="object"&&E[D.schemaId];return V&&(D.code.source||D.code.process)?(0,l._)`/*# sourceURL=${V} */`:l.nil}function S(E,D){if(w(E)&&(I(E),k(E))){_(E,D);return}(0,t.boolOrEmptySchema)(E,D)}function k({schema:E,self:D}){if(typeof E=="boolean")return!E;for(let V in E)if(D.RULES.all[V])return!0;return!1}function w(E){return typeof E.schema!="boolean"}function _(E,D){let{schema:V,gen:me,opts:pe}=E;pe.$comment&&V.$comment&&ne(E),F(E),ee(E);let be=me.const("_errs",u.default.errors);j(E,be),me.var(D,(0,l._)`${be} === ${u.default.errors}`)}function I(E){(0,p.checkUnknownRules)(E),U(E)}function j(E,D){if(E.opts.jtd)return Oe(E,[],!1,D);let V=(0,n.getSchemaTypes)(E.schema);Oe(E,V,!(0,n.coerceAndCheckDataType)(E,V),D)}function U(E){let{schema:D,errSchemaPath:V,opts:me,self:pe}=E;D.$ref&&me.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(D,pe.RULES)&&pe.logger.warn(`$ref: keywords ignored in schema at path "${V}"`)}function C(E){let{schema:D,opts:V}=E;D.default!==void 0&&V.useDefaults&&V.strictSchema&&(0,p.checkStrictMode)(E,"default is ignored in the schema root")}function F(E){let D=E.schema[E.opts.schemaId];D&&(E.baseId=(0,d.resolveUrl)(E.opts.uriResolver,E.baseId,D))}function ee(E){if(E.schema.$async&&!E.schemaEnv.$async)throw new Error("async schema in sync schema")}function ne({gen:E,schemaEnv:D,schema:V,errSchemaPath:me,opts:pe}){let be=V.$comment;if(pe.$comment===!0)E.code((0,l._)`${u.default.self}.logger.log(${be})`);else if(typeof pe.$comment=="function"){let Ve=(0,l.str)`${me}/$comment`,Be=E.scopeValue("root",{ref:D.root});E.code((0,l._)`${u.default.self}.opts.$comment(${be}, ${Ve}, ${Be}.schema)`)}}function we(E){let{gen:D,schemaEnv:V,validateName:me,ValidationError:pe,opts:be}=E;V.$async?D.if((0,l._)`${u.default.errors} === 0`,()=>D.return(u.default.data),()=>D.throw((0,l._)`new ${pe}(${u.default.vErrors})`)):(D.assign((0,l._)`${me}.errors`,u.default.vErrors),be.unevaluated&&Ce(E),D.return((0,l._)`${u.default.errors} === 0`))}function Ce({gen:E,evaluated:D,props:V,items:me}){V instanceof l.Name&&E.assign((0,l._)`${D}.props`,V),me instanceof l.Name&&E.assign((0,l._)`${D}.items`,me)}function Oe(E,D,V,me){let{gen:pe,schema:be,data:Ve,allErrors:Be,opts:Qe,self:Ge}=E,{RULES:Le}=Ge;if(be.$ref&&(Qe.ignoreKeywordsWithRef||!(0,p.schemaHasRulesButRef)(be,Le))){pe.block(()=>Se(E,"$ref",Le.all.$ref.definition));return}Qe.jtd||ke(E,D),pe.block(()=>{for(let Ke of Le.rules)bt(Ke);bt(Le.post)});function bt(Ke){(0,i.shouldUseGroup)(be,Ke)&&(Ke.type?(pe.if((0,r.checkDataType)(Ke.type,Ve,Qe.strictNumbers)),Je(E,Ke),D.length===1&&D[0]===Ke.type&&V&&(pe.else(),(0,r.reportTypeError)(E)),pe.endIf()):Je(E,Ke),Be||pe.if((0,l._)`${u.default.errors} === ${me||0}`))}}function Je(E,D){let{gen:V,schema:me,opts:{useDefaults:pe}}=E;pe&&(0,o.assignDefaults)(E,D.type),V.block(()=>{for(let be of D.rules)(0,i.shouldUseRule)(me,be)&&Se(E,be.keyword,be.definition,D.type)})}function ke(E,D){E.schemaEnv.meta||!E.opts.strictTypes||(x(E,D),E.opts.allowUnionTypes||M(E,D),J(E,E.dataTypes))}function x(E,D){if(D.length){if(!E.dataTypes.length){E.dataTypes=D;return}D.forEach(V=>{P(E.dataTypes,V)||Y(E,`type "${V}" not allowed by context "${E.dataTypes.join(",")}"`)}),L(E,D)}}function M(E,D){D.length>1&&!(D.length===2&&D.includes("null"))&&Y(E,"use allowUnionTypes to allow union type keyword")}function J(E,D){let V=E.self.RULES.all;for(let me in V){let pe=V[me];if(typeof pe=="object"&&(0,i.shouldUseRule)(E.schema,pe)){let{type:be}=pe.definition;be.length&&!be.some(Ve=>R(D,Ve))&&Y(E,`missing type "${be.join(",")}" for keyword "${me}"`)}}}function R(E,D){return E.includes(D)||D==="number"&&E.includes("integer")}function P(E,D){return E.includes(D)||D==="integer"&&E.includes("number")}function L(E,D){let V=[];for(let me of E.dataTypes)P(D,me)?V.push(me):D.includes("integer")&&me==="number"&&V.push("integer");E.dataTypes=V}function Y(E,D){let V=E.schemaEnv.baseId+E.errSchemaPath;D+=` at "${V}" (strictTypes)`,(0,p.checkStrictMode)(E,D,E.opts.strictTypes)}var le=class{constructor(E,D,V){if((0,a.validateKeywordUsage)(E,D,V),this.gen=E.gen,this.allErrors=E.allErrors,this.keyword=V,this.data=E.data,this.schema=E.schema[V],this.$data=D.$data&&E.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(E,this.schema,V,this.$data),this.schemaType=D.schemaType,this.parentSchema=E.schema,this.params={},this.it=E,this.def=D,this.$data)this.schemaCode=E.gen.const("vSchema",ot(this.$data,E));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,D.schemaType,D.allowUndefined))throw new Error(`${V} value must be ${JSON.stringify(D.schemaType)}`);("code"in D?D.trackErrors:D.errors!==!1)&&(this.errsCount=E.gen.const("_errs",u.default.errors))}result(E,D,V){this.failResult((0,l.not)(E),D,V)}failResult(E,D,V){this.gen.if(E),V?V():this.error(),D?(this.gen.else(),D(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(E,D){this.failResult((0,l.not)(E),void 0,D)}fail(E){if(E===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(E),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(E){if(!this.$data)return this.fail(E);let{schemaCode:D}=this;this.fail((0,l._)`${D} !== undefined && (${(0,l.or)(this.invalid$data(),E)})`)}error(E,D,V){if(D){this.setParams(D),this._error(E,V),this.setParams({});return}this._error(E,V)}_error(E,D){(E?f.reportExtraError:f.reportError)(this,this.def.error,D)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(E){this.allErrors||this.gen.if(E)}setParams(E,D){D?Object.assign(this.params,E):this.params=E}block$data(E,D,V=l.nil){this.gen.block(()=>{this.check$data(E,V),D()})}check$data(E=l.nil,D=l.nil){if(!this.$data)return;let{gen:V,schemaCode:me,schemaType:pe,def:be}=this;V.if((0,l.or)((0,l._)`${me} === undefined`,D)),E!==l.nil&&V.assign(E,!0),(pe.length||be.validateSchema)&&(V.elseIf(this.invalid$data()),this.$dataError(),E!==l.nil&&V.assign(E,!1)),V.else()}invalid$data(){let{gen:E,schemaCode:D,schemaType:V,def:me,it:pe}=this;return(0,l.or)(be(),Ve());function be(){if(V.length){if(!(D instanceof l.Name))throw new Error("ajv implementation error");let Be=Array.isArray(V)?V:[V];return(0,l._)`${(0,r.checkDataTypes)(Be,D,pe.opts.strictNumbers,r.DataType.Wrong)}`}return l.nil}function Ve(){if(me.validateSchema){let Be=E.scopeValue("validate$data",{ref:me.validateSchema});return(0,l._)`!${Be}(${D})`}return l.nil}}subschema(E,D){let V=(0,s.getSubschema)(this.it,E);(0,s.extendSubschemaData)(V,this.it,E),(0,s.extendSubschemaMode)(V,E);let me={...this.it,...V,items:void 0,props:void 0};return S(me,D),me}mergeEvaluated(E,D){let{it:V,gen:me}=this;V.opts.unevaluated&&(V.props!==!0&&E.props!==void 0&&(V.props=p.mergeEvaluated.props(me,E.props,V.props,D)),V.items!==!0&&E.items!==void 0&&(V.items=p.mergeEvaluated.items(me,E.items,V.items,D)))}mergeValidEvaluated(E,D){let{it:V,gen:me}=this;if(V.opts.unevaluated&&(V.props!==!0||V.items!==!0))return me.if(D,()=>this.mergeEvaluated(E,l.Name)),!0}};e.KeywordCxt=le;function Se(E,D,V,me){let pe=new le(E,V,D);"code"in V?V.code(pe,me):pe.$data&&V.validate?(0,a.funcKeywordCode)(pe,V):"macro"in V?(0,a.macroKeywordCode)(pe,V):(V.compile||V.validate)&&(0,a.funcKeywordCode)(pe,V)}let he=/^\/(?:[^~]|~0|~1)*$/,Ne=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ot(E,{dataLevel:D,dataNames:V,dataPathArr:me}){let pe,be;if(E==="")return u.default.rootData;if(E[0]==="/"){if(!he.test(E))throw new Error(`Invalid JSON-pointer: ${E}`);pe=E,be=u.default.rootData}else{let Ge=Ne.exec(E);if(!Ge)throw new Error(`Invalid JSON-pointer: ${E}`);let Le=+Ge[1];if(pe=Ge[2],pe==="#"){if(Le>=D)throw new Error(Qe("property/index",Le));return me[D-Le]}if(Le>D)throw new Error(Qe("data",Le));if(be=V[D-Le],!pe)return be}let Ve=be,Be=pe.split("/");for(let Ge of Be)Ge&&(be=(0,l._)`${be}${(0,l.getProperty)((0,p.unescapeJsonPointer)(Ge))}`,Ve=(0,l._)`${Ve} && ${be}`);return Ve;function Qe(Ge,Le){return`Cannot access ${Ge} ${Le} levels up, current level is ${D}`}}e.getData=ot})),la=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=class extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}};e.default=t})),fi=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ku();var n=class extends Error{constructor(i,r,o,a){super(a||`can't resolve reference ${o} from id ${r}`),this.missingRef=(0,t.resolveUrl)(i,r,o),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(i,this.missingRef))}};e.default=n})),Tu=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;let t=ye(),n=la(),i=Et(),r=ku(),o=Te(),a=hi();var s=class{constructor(h){var z;this.refs={},this.dynamicAnchors={};let g;typeof h.schema=="object"&&(g=h.schema),this.schema=h.schema,this.schemaId=h.schemaId,this.root=h.root||this,this.baseId=(z=h.baseId)!==null&&z!==void 0?z:(0,r.normalizeId)(g?.[h.schemaId||"$id"]),this.schemaPath=h.schemaPath,this.localRefs=h.localRefs,this.meta=h.meta,this.$async=g?.$async,this.refs={}}};e.SchemaEnv=s;function l(h){let z=p.call(this,h);if(z)return z;let g=(0,r.getFullPath)(this.opts.uriResolver,h.root.baseId),{es5:S,lines:k}=this.opts.code,{ownProperties:w}=this.opts,_=new t.CodeGen(this.scope,{es5:S,lines:k,ownProperties:w}),I;h.$async&&(I=_.scopeValue("Error",{ref:n.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let j=_.scopeName("validate");h.validateName=j;let U={gen:_,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:_.scopeValue("schema",this.opts.code.source===!0?{ref:h.schema,code:(0,t.stringify)(h.schema)}:{ref:h.schema}),validateName:j,ValidationError:I,schema:h.schema,schemaEnv:h,rootId:g,baseId:h.baseId||g,schemaPath:t.nil,errSchemaPath:h.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this},C;try{this._compilations.add(h),(0,a.validateFunctionCode)(U),_.optimize(this.opts.code.optimize);let F=_.toString();C=`${_.scopeRefs(i.default.scope)}return ${F}`,this.opts.code.process&&(C=this.opts.code.process(C,h));let ee=new Function(`${i.default.self}`,`${i.default.scope}`,C)(this,this.scope.get());if(this.scope.value(j,{ref:ee}),ee.errors=null,ee.schema=h.schema,ee.schemaEnv=h,h.$async&&(ee.$async=!0),this.opts.code.source===!0&&(ee.source={validateName:j,validateCode:F,scopeValues:_._values}),this.opts.unevaluated){let{props:ne,items:we}=U;ee.evaluated={props:ne instanceof t.Name?void 0:ne,items:we instanceof t.Name?void 0:we,dynamicProps:ne instanceof t.Name,dynamicItems:we instanceof t.Name},ee.source&&(ee.source.evaluated=(0,t.stringify)(ee.evaluated))}return h.validate=ee,h}catch(F){throw delete h.validate,delete h.validateName,C&&this.logger.error("Error compiling schema, function code:",C),F}finally{this._compilations.delete(h)}}e.compileSchema=l;function u(h,z,g){var S;g=(0,r.resolveUrl)(this.opts.uriResolver,z,g);let k=h.refs[g];if(k)return k;let w=b.call(this,h,g);if(w===void 0){let _=(S=h.localRefs)===null||S===void 0?void 0:S[g],{schemaId:I}=this.opts;_&&(w=new s({schema:_,schemaId:I,root:h,baseId:z}))}if(w!==void 0)return h.refs[g]=d.call(this,w)}e.resolveRef=u;function d(h){return(0,r.inlineRef)(h.schema,this.opts.inlineRefs)?h.schema:h.validate?h:l.call(this,h)}function p(h){for(let z of this._compilations)if(f(z,h))return z}e.getCompilingSchema=p;function f(h,z){return h.schema===z.schema&&h.root===z.root&&h.baseId===z.baseId}function b(h,z){let g;for(;typeof(g=this.refs[z])=="string";)z=g;return g||this.schemas[z]||v.call(this,h,z)}function v(h,z){let g=this.opts.uriResolver.parse(z),S=(0,r._getFullPath)(this.opts.uriResolver,g),k=(0,r.getFullPath)(this.opts.uriResolver,h.baseId,void 0);if(Object.keys(h.schema).length>0&&S===k)return y.call(this,g,h);let w=(0,r.normalizeId)(S),_=this.refs[w]||this.schemas[w];if(typeof _=="string"){let I=v.call(this,h,_);return typeof I?.schema!="object"?void 0:y.call(this,g,I)}if(typeof _?.schema=="object"){if(_.validate||l.call(this,_),w===(0,r.normalizeId)(z)){let{schema:I}=_,{schemaId:j}=this.opts,U=I[j];return U&&(k=(0,r.resolveUrl)(this.opts.uriResolver,k,U)),new s({schema:I,schemaId:j,root:h,baseId:k})}return y.call(this,g,_)}}e.resolveSchema=v;let $=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(h,{baseId:z,schema:g,root:S}){var k;if(((k=h.fragment)===null||k===void 0?void 0:k[0])!=="/")return;for(let I of h.fragment.slice(1).split("/")){if(typeof g=="boolean")return;let j=g[(0,o.unescapeFragment)(I)];if(j===void 0)return;g=j;let U=typeof g=="object"&&g[this.opts.schemaId];!$.has(I)&&U&&(z=(0,r.resolveUrl)(this.opts.uriResolver,z,U))}let w;if(typeof g!="boolean"&&g.$ref&&!(0,o.schemaHasRulesButRef)(g,this.RULES)){let I=(0,r.resolveUrl)(this.opts.uriResolver,z,g.$ref);w=v.call(this,S,I)}let{schemaId:_}=this.opts;if(w=w||new s({schema:g,schemaId:_,root:S,baseId:z}),w.schema!==w.root.schema)return w}})),fk=Z(((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:!1}})),gS=Z(((e,t)=>{let n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),i=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(v){let $="",y=0,h=0;for(h=0;h<v.length;h++)if(y=v[h].charCodeAt(0),y!==48){if(!(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102))return"";$+=v[h];break}for(h+=1;h<v.length;h++){if(y=v[h].charCodeAt(0),!(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102))return"";$+=v[h]}return $}let o=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function a(v){return v.length=0,!0}function s(v,$,y){if(v.length){let h=r(v);if(h!=="")$.push(h);else return y.error=!0,!1;v.length=0}return!0}function l(v){let $=0,y={error:!1,address:"",zone:""},h=[],z=[],g=!1,S=!1,k=s;for(let w=0;w<v.length;w++){let _=v[w];if(!(_==="["||_==="]"))if(_===":"){if(g===!0&&(S=!0),!k(z,h,y))break;if(++$>7){y.error=!0;break}w>0&&v[w-1]===":"&&(g=!0),h.push(":");continue}else if(_==="%"){if(!k(z,h,y))break;k=a}else{z.push(_);continue}}return z.length&&(k===a?y.zone=z.join(""):S?h.push(z.join("")):h.push(r(z))),y.address=h.join(""),y}function u(v){if(d(v,":")<2)return{host:v,isIPV6:!1};let $=l(v);if($.error)return{host:v,isIPV6:!1};{let y=$.address,h=$.address;return $.zone&&(y+="%"+$.zone,h+="%25"+$.zone),{host:y,isIPV6:!0,escapedHost:h}}}function d(v,$){let y=0;for(let h=0;h<v.length;h++)v[h]===$&&y++;return y}function p(v){let $=v,y=[],h=-1,z=0;for(;z=$.length;){if(z===1){if($===".")break;if($==="/"){y.push("/");break}else{y.push($);break}}else if(z===2){if($[0]==="."){if($[1]===".")break;if($[1]==="/"){$=$.slice(2);continue}}else if($[0]==="/"&&($[1]==="."||$[1]==="/")){y.push("/");break}}else if(z===3&&$==="/.."){y.length!==0&&y.pop(),y.push("/");break}if($[0]==="."){if($[1]==="."){if($[2]==="/"){$=$.slice(3);continue}}else if($[1]==="/"){$=$.slice(2);continue}}else if($[0]==="/"&&$[1]==="."){if($[2]==="/"){$=$.slice(2);continue}else if($[2]==="."&&$[3]==="/"){$=$.slice(3),y.length!==0&&y.pop();continue}}if((h=$.indexOf("/",1))===-1){y.push($);break}else y.push($.slice(0,h)),$=$.slice(h)}return y.join("")}function f(v,$){let y=$!==!0?escape:unescape;return v.scheme!==void 0&&(v.scheme=y(v.scheme)),v.userinfo!==void 0&&(v.userinfo=y(v.userinfo)),v.host!==void 0&&(v.host=y(v.host)),v.path!==void 0&&(v.path=y(v.path)),v.query!==void 0&&(v.query=y(v.query)),v.fragment!==void 0&&(v.fragment=y(v.fragment)),v}function b(v){let $=[];if(v.userinfo!==void 0&&($.push(v.userinfo),$.push("@")),v.host!==void 0){let y=unescape(v.host);if(!i(y)){let h=u(y);h.isIPV6===!0?y=`[${h.escapedHost}]`:y=v.host}$.push(y)}return(typeof v.port=="number"||typeof v.port=="string")&&($.push(":"),$.push(String(v.port))),$.length?$.join(""):void 0}t.exports={nonSimpleDomain:o,recomposeAuthority:b,normalizeComponentEncoding:f,removeDotSegments:p,isIPv4:i,isUUID:n,normalizeIPv6:u,stringArrayToHexStripped:r}})),gk=Z(((e,t)=>{let{isUUID:n}=gS(),i=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function o(_){return r.indexOf(_)!==-1}function a(_){return _.secure===!0?!0:_.secure===!1?!1:_.scheme?_.scheme.length===3&&(_.scheme[0]==="w"||_.scheme[0]==="W")&&(_.scheme[1]==="s"||_.scheme[1]==="S")&&(_.scheme[2]==="s"||_.scheme[2]==="S"):!1}function s(_){return _.host||(_.error=_.error||"HTTP URIs must have a host."),_}function l(_){let I=String(_.scheme).toLowerCase()==="https";return(_.port===(I?443:80)||_.port==="")&&(_.port=void 0),_.path||(_.path="/"),_}function u(_){return _.secure=a(_),_.resourceName=(_.path||"/")+(_.query?"?"+_.query:""),_.path=void 0,_.query=void 0,_}function d(_){if((_.port===(a(_)?443:80)||_.port==="")&&(_.port=void 0),typeof _.secure=="boolean"&&(_.scheme=_.secure?"wss":"ws",_.secure=void 0),_.resourceName){let[I,j]=_.resourceName.split("?");_.path=I&&I!=="/"?I:void 0,_.query=j,_.resourceName=void 0}return _.fragment=void 0,_}function p(_,I){if(!_.path)return _.error="URN can not be parsed",_;let j=_.path.match(i);if(j){let U=I.scheme||_.scheme||"urn";_.nid=j[1].toLowerCase(),_.nss=j[2];let C=w(`${U}:${I.nid||_.nid}`);_.path=void 0,C&&(_=C.parse(_,I))}else _.error=_.error||"URN can not be parsed.";return _}function f(_,I){if(_.nid===void 0)throw new Error("URN without nid cannot be serialized");let j=I.scheme||_.scheme||"urn",U=_.nid.toLowerCase(),C=w(`${j}:${I.nid||U}`);C&&(_=C.serialize(_,I));let F=_,ee=_.nss;return F.path=`${U||I.nid}:${ee}`,I.skipEscape=!0,F}function b(_,I){let j=_;return j.uuid=j.nss,j.nss=void 0,!I.tolerant&&(!j.uuid||!n(j.uuid))&&(j.error=j.error||"UUID is not valid."),j}function v(_){let I=_;return I.nss=(_.uuid||"").toLowerCase(),I}let $={scheme:"http",domainHost:!0,parse:s,serialize:l},y={scheme:"https",domainHost:$.domainHost,parse:s,serialize:l},h={scheme:"ws",domainHost:!0,parse:u,serialize:d},z={scheme:"wss",domainHost:h.domainHost,parse:h.parse,serialize:h.serialize},k={http:$,https:y,ws:h,wss:z,urn:{scheme:"urn",parse:p,serialize:f,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:b,serialize:v,skipNormalize:!0}};Object.setPrototypeOf(k,null);function w(_){return _&&(k[_]||k[_.toLowerCase()])||void 0}t.exports={wsIsSecure:a,SCHEMES:k,isValidSchemeName:o,getSchemeHandler:w}})),vk=Z(((e,t)=>{let{normalizeIPv6:n,removeDotSegments:i,recomposeAuthority:r,normalizeComponentEncoding:o,isIPv4:a,nonSimpleDomain:s}=gS(),{SCHEMES:l,getSchemeHandler:u}=gk();function d(z,g){return typeof z=="string"?z=v(y(z,g),g):typeof z=="object"&&(z=y(v(z,g),g)),z}function p(z,g,S){let k=S?Object.assign({scheme:"null"},S):{scheme:"null"},w=f(y(z,k),y(g,k),k,!0);return k.skipEscape=!0,v(w,k)}function f(z,g,S,k){let w={};return k||(z=y(v(z,S),S),g=y(v(g,S),S)),S=S||{},!S.tolerant&&g.scheme?(w.scheme=g.scheme,w.userinfo=g.userinfo,w.host=g.host,w.port=g.port,w.path=i(g.path||""),w.query=g.query):(g.userinfo!==void 0||g.host!==void 0||g.port!==void 0?(w.userinfo=g.userinfo,w.host=g.host,w.port=g.port,w.path=i(g.path||""),w.query=g.query):(g.path?(g.path[0]==="/"?w.path=i(g.path):((z.userinfo!==void 0||z.host!==void 0||z.port!==void 0)&&!z.path?w.path="/"+g.path:z.path?w.path=z.path.slice(0,z.path.lastIndexOf("/")+1)+g.path:w.path=g.path,w.path=i(w.path)),w.query=g.query):(w.path=z.path,g.query!==void 0?w.query=g.query:w.query=z.query),w.userinfo=z.userinfo,w.host=z.host,w.port=z.port),w.scheme=z.scheme),w.fragment=g.fragment,w}function b(z,g,S){return typeof z=="string"?(z=unescape(z),z=v(o(y(z,S),!0),{...S,skipEscape:!0})):typeof z=="object"&&(z=v(o(z,!0),{...S,skipEscape:!0})),typeof g=="string"?(g=unescape(g),g=v(o(y(g,S),!0),{...S,skipEscape:!0})):typeof g=="object"&&(g=v(o(g,!0),{...S,skipEscape:!0})),z.toLowerCase()===g.toLowerCase()}function v(z,g){let S={host:z.host,scheme:z.scheme,userinfo:z.userinfo,port:z.port,path:z.path,query:z.query,nid:z.nid,nss:z.nss,uuid:z.uuid,fragment:z.fragment,reference:z.reference,resourceName:z.resourceName,secure:z.secure,error:""},k=Object.assign({},g),w=[],_=u(k.scheme||S.scheme);_&&_.serialize&&_.serialize(S,k),S.path!==void 0&&(k.skipEscape?S.path=unescape(S.path):(S.path=escape(S.path),S.scheme!==void 0&&(S.path=S.path.split("%3A").join(":")))),k.reference!=="suffix"&&S.scheme&&w.push(S.scheme,":");let I=r(S);if(I!==void 0&&(k.reference!=="suffix"&&w.push("//"),w.push(I),S.path&&S.path[0]!=="/"&&w.push("/")),S.path!==void 0){let j=S.path;!k.absolutePath&&(!_||!_.absolutePath)&&(j=i(j)),I===void 0&&j[0]==="/"&&j[1]==="/"&&(j="/%2F"+j.slice(2)),w.push(j)}return S.query!==void 0&&w.push("?",S.query),S.fragment!==void 0&&w.push("#",S.fragment),w.join("")}let $=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function y(z,g){let S=Object.assign({},g),k={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},w=!1;S.reference==="suffix"&&(S.scheme?z=S.scheme+":"+z:z="//"+z);let _=z.match($);if(_){if(k.scheme=_[1],k.userinfo=_[3],k.host=_[4],k.port=parseInt(_[5],10),k.path=_[6]||"",k.query=_[7],k.fragment=_[8],isNaN(k.port)&&(k.port=_[5]),k.host)if(a(k.host)===!1){let j=n(k.host);k.host=j.host.toLowerCase(),w=j.isIPV6}else w=!0;k.scheme===void 0&&k.userinfo===void 0&&k.host===void 0&&k.port===void 0&&k.query===void 0&&!k.path?k.reference="same-document":k.scheme===void 0?k.reference="relative":k.fragment===void 0?k.reference="absolute":k.reference="uri",S.reference&&S.reference!=="suffix"&&S.reference!==k.reference&&(k.error=k.error||"URI is not a "+S.reference+" reference.");let I=u(S.scheme||k.scheme);if(!S.unicodeSupport&&(!I||!I.unicodeSupport)&&k.host&&(S.domainHost||I&&I.domainHost)&&w===!1&&s(k.host))try{k.host=URL.domainToASCII(k.host.toLowerCase())}catch(j){k.error=k.error||"Host's domain name can not be converted to ASCII: "+j}(!I||I&&!I.skipNormalize)&&(z.indexOf("%")!==-1&&(k.scheme!==void 0&&(k.scheme=unescape(k.scheme)),k.host!==void 0&&(k.host=unescape(k.host))),k.path&&(k.path=escape(unescape(k.path))),k.fragment&&(k.fragment=encodeURI(decodeURIComponent(k.fragment)))),I&&I.parse&&I.parse(k,S)}else k.error=k.error||"URI can not be parsed.";return k}let h={SCHEMES:l,normalize:d,resolve:p,resolveComponent:f,equal:b,serialize:v,parse:y};t.exports=h,t.exports.default=h,t.exports.fastUri=h})),yk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=vk();t.code='require("ajv/dist/runtime/uri").default',e.default=t})),Wg=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=hi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=ye();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});let i=la(),r=fi(),o=pS(),a=Tu(),s=ye(),l=ku(),u=Iu(),d=Te(),p=fk(),f=yk(),b=(x,M)=>new RegExp(x,M);b.code="new RegExp";let v=["removeAdditional","useDefaults","coerceTypes"],$=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={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."},h={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},z=200;function g(x){var M,J,R,P,L,Y,le,Se,he,Ne,ot,E,D,V,me,pe,be,Ve,Be,Qe,Ge,Le,bt,Ke,Ut;let zt=x.strict,Ft=(M=x.code)===null||M===void 0?void 0:M.optimize,er=Ft===!0||Ft===void 0?1:Ft||0,tr=(R=(J=x.code)===null||J===void 0?void 0:J.regExp)!==null&&R!==void 0?R:b,jr=(P=x.uriResolver)!==null&&P!==void 0?P:f.default;return{strictSchema:(Y=(L=x.strictSchema)!==null&&L!==void 0?L:zt)!==null&&Y!==void 0?Y:!0,strictNumbers:(Se=(le=x.strictNumbers)!==null&&le!==void 0?le:zt)!==null&&Se!==void 0?Se:!0,strictTypes:(Ne=(he=x.strictTypes)!==null&&he!==void 0?he:zt)!==null&&Ne!==void 0?Ne:"log",strictTuples:(E=(ot=x.strictTuples)!==null&&ot!==void 0?ot:zt)!==null&&E!==void 0?E:"log",strictRequired:(V=(D=x.strictRequired)!==null&&D!==void 0?D:zt)!==null&&V!==void 0?V:!1,code:x.code?{...x.code,optimize:er,regExp:tr}:{optimize:er,regExp:tr},loopRequired:(me=x.loopRequired)!==null&&me!==void 0?me:z,loopEnum:(pe=x.loopEnum)!==null&&pe!==void 0?pe:z,meta:(be=x.meta)!==null&&be!==void 0?be:!0,messages:(Ve=x.messages)!==null&&Ve!==void 0?Ve:!0,inlineRefs:(Be=x.inlineRefs)!==null&&Be!==void 0?Be:!0,schemaId:(Qe=x.schemaId)!==null&&Qe!==void 0?Qe:"$id",addUsedSchema:(Ge=x.addUsedSchema)!==null&&Ge!==void 0?Ge:!0,validateSchema:(Le=x.validateSchema)!==null&&Le!==void 0?Le:!0,validateFormats:(bt=x.validateFormats)!==null&&bt!==void 0?bt:!0,unicodeRegExp:(Ke=x.unicodeRegExp)!==null&&Ke!==void 0?Ke:!0,int32range:(Ut=x.int32range)!==null&&Ut!==void 0?Ut:!0,uriResolver:jr}}var S=class{constructor(x={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,x=this.opts={...x,...g(x)};let{es5:M,lines:J}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:$,es5:M,lines:J}),this.logger=F(x.logger);let R=x.validateFormats;x.validateFormats=!1,this.RULES=(0,o.getRules)(),k.call(this,y,x,"NOT SUPPORTED"),k.call(this,h,x,"DEPRECATED","warn"),this._metaOpts=U.call(this),x.formats&&I.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),x.keywords&&j.call(this,x.keywords),typeof x.meta=="object"&&this.addMetaSchema(x.meta),_.call(this),x.validateFormats=R}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:x,meta:M,schemaId:J}=this.opts,R=p;J==="id"&&(R={...p},R.id=R.$id,delete R.$id),M&&x&&this.addMetaSchema(R,R[J],!1)}defaultMeta(){let{meta:x,schemaId:M}=this.opts;return this.opts.defaultMeta=typeof x=="object"?x[M]||x:void 0}validate(x,M){let J;if(typeof x=="string"){if(J=this.getSchema(x),!J)throw new Error(`no schema with key or ref "${x}"`)}else J=this.compile(x);let R=J(M);return"$async"in J||(this.errors=J.errors),R}compile(x,M){let J=this._addSchema(x,M);return J.validate||this._compileSchemaEnv(J)}compileAsync(x,M){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:J}=this.opts;return R.call(this,x,M);async function R(he,Ne){await P.call(this,he.$schema);let ot=this._addSchema(he,Ne);return ot.validate||L.call(this,ot)}async function P(he){he&&!this.getSchema(he)&&await R.call(this,{$ref:he},!0)}async function L(he){try{return this._compileSchemaEnv(he)}catch(Ne){if(!(Ne instanceof r.default))throw Ne;return Y.call(this,Ne),await le.call(this,Ne.missingSchema),L.call(this,he)}}function Y({missingSchema:he,missingRef:Ne}){if(this.refs[he])throw new Error(`AnySchema ${he} is loaded but ${Ne} cannot be resolved`)}async function le(he){let Ne=await Se.call(this,he);this.refs[he]||await P.call(this,Ne.$schema),this.refs[he]||this.addSchema(Ne,he,M)}async function Se(he){let Ne=this._loading[he];if(Ne)return Ne;try{return await(this._loading[he]=J(he))}finally{delete this._loading[he]}}}addSchema(x,M,J,R=this.opts.validateSchema){if(Array.isArray(x)){for(let L of x)this.addSchema(L,void 0,J,R);return this}let P;if(typeof x=="object"){let{schemaId:L}=this.opts;if(P=x[L],P!==void 0&&typeof P!="string")throw new Error(`schema ${L} must be string`)}return M=(0,l.normalizeId)(M||P),this._checkUnique(M),this.schemas[M]=this._addSchema(x,J,M,R,!0),this}addMetaSchema(x,M,J=this.opts.validateSchema){return this.addSchema(x,M,!0,J),this}validateSchema(x,M){if(typeof x=="boolean")return!0;let J;if(J=x.$schema,J!==void 0&&typeof J!="string")throw new Error("$schema must be a string");if(J=J||this.opts.defaultMeta||this.defaultMeta(),!J)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let R=this.validate(J,x);if(!R&&M){let P="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(P);else throw new Error(P)}return R}getSchema(x){let M;for(;typeof(M=w.call(this,x))=="string";)x=M;if(M===void 0){let{schemaId:J}=this.opts,R=new a.SchemaEnv({schema:{},schemaId:J});if(M=a.resolveSchema.call(this,R,x),!M)return;this.refs[x]=M}return M.validate||this._compileSchemaEnv(M)}removeSchema(x){if(x instanceof RegExp)return this._removeAllSchemas(this.schemas,x),this._removeAllSchemas(this.refs,x),this;switch(typeof x){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let M=w.call(this,x);return typeof M=="object"&&this._cache.delete(M.schema),delete this.schemas[x],delete this.refs[x],this}case"object":{let M=x;this._cache.delete(M);let J=x[this.opts.schemaId];return J&&(J=(0,l.normalizeId)(J),delete this.schemas[J],delete this.refs[J]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(x){for(let M of x)this.addKeyword(M);return this}addKeyword(x,M){let J;if(typeof x=="string")J=x,typeof M=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),M.keyword=J);else if(typeof x=="object"&&M===void 0){if(M=x,J=M.keyword,Array.isArray(J)&&!J.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(ne.call(this,J,M),!M)return(0,d.eachItem)(J,P=>we.call(this,P)),this;Oe.call(this,M);let R={...M,type:(0,u.getJSONTypes)(M.type),schemaType:(0,u.getJSONTypes)(M.schemaType)};return(0,d.eachItem)(J,R.type.length===0?P=>we.call(this,P,R):P=>R.type.forEach(L=>we.call(this,P,R,L))),this}getKeyword(x){let M=this.RULES.all[x];return typeof M=="object"?M.definition:!!M}removeKeyword(x){let{RULES:M}=this;delete M.keywords[x],delete M.all[x];for(let J of M.rules){let R=J.rules.findIndex(P=>P.keyword===x);R>=0&&J.rules.splice(R,1)}return this}addFormat(x,M){return typeof M=="string"&&(M=new RegExp(M)),this.formats[x]=M,this}errorsText(x=this.errors,{separator:M=", ",dataVar:J="data"}={}){return!x||x.length===0?"No errors":x.map(R=>`${J}${R.instancePath} ${R.message}`).reduce((R,P)=>R+M+P)}$dataMetaSchema(x,M){let J=this.RULES.all;x=JSON.parse(JSON.stringify(x));for(let R of M){let P=R.split("/").slice(1),L=x;for(let Y of P)L=L[Y];for(let Y in J){let le=J[Y];if(typeof le!="object")continue;let{$data:Se}=le.definition,he=L[Y];Se&&he&&(L[Y]=ke(he))}}return x}_removeAllSchemas(x,M){for(let J in x){let R=x[J];(!M||M.test(J))&&(typeof R=="string"?delete x[J]:R&&!R.meta&&(this._cache.delete(R.schema),delete x[J]))}}_addSchema(x,M,J,R=this.opts.validateSchema,P=this.opts.addUsedSchema){let L,{schemaId:Y}=this.opts;if(typeof x=="object")L=x[Y];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof x!="boolean")throw new Error("schema must be object or boolean")}let le=this._cache.get(x);if(le!==void 0)return le;J=(0,l.normalizeId)(L||J);let Se=l.getSchemaRefs.call(this,x,J);return le=new a.SchemaEnv({schema:x,schemaId:Y,meta:M,baseId:J,localRefs:Se}),this._cache.set(le.schema,le),P&&!J.startsWith("#")&&(J&&this._checkUnique(J),this.refs[J]=le),R&&this.validateSchema(x,!0),le}_checkUnique(x){if(this.schemas[x]||this.refs[x])throw new Error(`schema with key or id "${x}" already exists`)}_compileSchemaEnv(x){if(x.meta?this._compileMetaSchema(x):a.compileSchema.call(this,x),!x.validate)throw new Error("ajv implementation error");return x.validate}_compileMetaSchema(x){let M=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,x)}finally{this.opts=M}}};S.ValidationError=i.default,S.MissingRefError=r.default,e.default=S;function k(x,M,J,R="error"){for(let P in x){let L=P;L in M&&this.logger[R](`${J}: option ${P}. ${x[L]}`)}}function w(x){return x=(0,l.normalizeId)(x),this.schemas[x]||this.refs[x]}function _(){let x=this.opts.schemas;if(x)if(Array.isArray(x))this.addSchema(x);else for(let M in x)this.addSchema(x[M],M)}function I(){for(let x in this.opts.formats){let M=this.opts.formats[x];M&&this.addFormat(x,M)}}function j(x){if(Array.isArray(x)){this.addVocabulary(x);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let M in x){let J=x[M];J.keyword||(J.keyword=M),this.addKeyword(J)}}function U(){let x={...this.opts};for(let M of v)delete x[M];return x}let C={log(){},warn(){},error(){}};function F(x){if(x===!1)return C;if(x===void 0)return console;if(x.log&&x.warn&&x.error)return x;throw new Error("logger must implement log, warn and error methods")}let ee=/^[a-z_$][a-z0-9_$:-]*$/i;function ne(x,M){let{RULES:J}=this;if((0,d.eachItem)(x,R=>{if(J.keywords[R])throw new Error(`Keyword ${R} is already defined`);if(!ee.test(R))throw new Error(`Keyword ${R} has invalid name`)}),!!M&&M.$data&&!("code"in M||"validate"in M))throw new Error('$data keyword must have "code" or "validate" function')}function we(x,M,J){var R;let P=M?.post;if(J&&P)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:L}=this,Y=P?L.post:L.rules.find(({type:Se})=>Se===J);if(Y||(Y={type:J,rules:[]},L.rules.push(Y)),L.keywords[x]=!0,!M)return;let le={keyword:x,definition:{...M,type:(0,u.getJSONTypes)(M.type),schemaType:(0,u.getJSONTypes)(M.schemaType)}};M.before?Ce.call(this,Y,le,M.before):Y.rules.push(le),L.all[x]=le,(R=M.implements)===null||R===void 0||R.forEach(Se=>this.addKeyword(Se))}function Ce(x,M,J){let R=x.rules.findIndex(P=>P.keyword===J);R>=0?x.rules.splice(R,0,M):(x.rules.push(M),this.logger.warn(`rule ${J} is not defined`))}function Oe(x){let{metaSchema:M}=x;M!==void 0&&(x.$data&&this.opts.$data&&(M=ke(M)),x.validateSchema=this.compile(M,!0))}let Je={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ke(x){return{anyOf:[x,Je]}}})),_k=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};e.default=t})),Yg=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;let t=fi(),n=Pt(),i=ye(),r=Et(),o=Tu(),a=Te(),s={keyword:"$ref",schemaType:"string",code(d){let{gen:p,schema:f,it:b}=d,{baseId:v,schemaEnv:$,validateName:y,opts:h,self:z}=b,{root:g}=$;if((f==="#"||f==="#/")&&v===g.baseId)return k();let S=o.resolveRef.call(z,g,v,f);if(S===void 0)throw new t.default(b.opts.uriResolver,v,f);if(S instanceof o.SchemaEnv)return w(S);return _(S);function k(){if($===g)return u(d,y,$,$.$async);let I=p.scopeValue("root",{ref:g});return u(d,(0,i._)`${I}.validate`,g,g.$async)}function w(I){u(d,l(d,I),I,I.$async)}function _(I){let j=p.scopeValue("schema",h.code.source===!0?{ref:I,code:(0,i.stringify)(I)}:{ref:I}),U=p.name("valid"),C=d.subschema({schema:I,dataTypes:[],schemaPath:i.nil,topSchemaRef:j,errSchemaPath:f},U);d.mergeEvaluated(C),d.ok(U)}}};function l(d,p){let{gen:f}=d;return p.validate?f.scopeValue("validate",{ref:p.validate}):(0,i._)`${f.scopeValue("wrapper",{ref:p})}.validate`}e.getValidate=l;function u(d,p,f,b){let{gen:v,it:$}=d,{allErrors:y,schemaEnv:h,opts:z}=$,g=z.passContext?r.default.this:i.nil;b?S():k();function S(){if(!h.$async)throw new Error("async schema referenced by sync schema");let I=v.let("valid");v.try(()=>{v.code((0,i._)`await ${(0,n.callValidateCode)(d,p,g)}`),_(p),y||v.assign(I,!0)},j=>{v.if((0,i._)`!(${j} instanceof ${$.ValidationError})`,()=>v.throw(j)),w(j),y||v.assign(I,!1)}),d.ok(I)}function k(){d.result((0,n.callValidateCode)(d,p,g),()=>_(p),()=>w(p))}function w(I){let j=(0,i._)`${I}.errors`;v.assign(r.default.vErrors,(0,i._)`${r.default.vErrors} === null ? ${j} : ${r.default.vErrors}.concat(${j})`),v.assign(r.default.errors,(0,i._)`${r.default.vErrors}.length`)}function _(I){var j;if(!$.opts.unevaluated)return;let U=(j=f?.validate)===null||j===void 0?void 0:j.evaluated;if($.props!==!0)if(U&&!U.dynamicProps)U.props!==void 0&&($.props=a.mergeEvaluated.props(v,U.props,$.props));else{let C=v.var("props",(0,i._)`${I}.evaluated.props`);$.props=a.mergeEvaluated.props(v,C,$.props,i.Name)}if($.items!==!0)if(U&&!U.dynamicItems)U.items!==void 0&&($.items=a.mergeEvaluated.items(v,U.items,$.items));else{let C=v.var("items",(0,i._)`${I}.evaluated.items`);$.items=a.mergeEvaluated.items(v,C,$.items,i.Name)}}}e.callRef=u,e.default=s})),vS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_k(),n=Yg(),i=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,n.default];e.default=i})),bk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ye(),n=t.operators,i={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(i),type:"number",schemaType:"number",$data:!0,error:{message:({keyword:o,schemaCode:a})=>(0,t.str)`must be ${i[o].okStr} ${a}`,params:({keyword:o,schemaCode:a})=>(0,t._)`{comparison: ${i[o].okStr}, limit: ${a}}`},code(o){let{keyword:a,data:s,schemaCode:l}=o;o.fail$data((0,t._)`${s} ${i[a].fail} ${l} || isNaN(${s})`)}};e.default=r})),Sk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ye(),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:i})=>(0,t.str)`must be multiple of ${i}`,params:({schemaCode:i})=>(0,t._)`{multipleOf: ${i}}`},code(i){let{gen:r,data:o,schemaCode:a,it:s}=i,l=s.opts.multipleOfPrecision,u=r.let("res"),d=l?(0,t._)`Math.abs(Math.round(${u}) - ${u}) > 1e-${l}`:(0,t._)`${u} !== parseInt(${u})`;i.fail$data((0,t._)`(${a} === 0 || (${u} = ${o}/${a}, ${d}))`)}};e.default=n})),$k=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(n){let i=n.length,r=0,o=0,a;for(;o<i;)r++,a=n.charCodeAt(o++),a>=55296&&a<=56319&&o<i&&(a=n.charCodeAt(o),(a&64512)===56320&&o++);return r}e.default=t,t.code='require("ajv/dist/runtime/ucs2length").default'})),wk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ye(),n=Te(),i=$k(),r={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:a}){let s=o==="maxLength"?"more":"fewer";return(0,t.str)`must NOT have ${s} than ${a} characters`},params:({schemaCode:o})=>(0,t._)`{limit: ${o}}`},code(o){let{keyword:a,data:s,schemaCode:l,it:u}=o,d=a==="maxLength"?t.operators.GT:t.operators.LT,p=u.opts.unicode===!1?(0,t._)`${s}.length`:(0,t._)`${(0,n.useFunc)(o.gen,i.default)}(${s})`;o.fail$data((0,t._)`${p} ${d} ${l}`)}};e.default=r})),zk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Pt(),n=Te(),i=ye(),r={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:o})=>(0,i.str)`must match pattern "${o}"`,params:({schemaCode:o})=>(0,i._)`{pattern: ${o}}`},code(o){let{gen:a,data:s,$data:l,schema:u,schemaCode:d,it:p}=o,f=p.opts.unicodeRegExp?"u":"";if(l){let{regExp:b}=p.opts.code,v=b.code==="new RegExp"?(0,i._)`new RegExp`:(0,n.useFunc)(a,b),$=a.let("valid");a.try(()=>a.assign($,(0,i._)`${v}(${d}, ${f}).test(${s})`),()=>a.assign($,!1)),o.fail$data((0,i._)`!${$}`)}else{let b=(0,t.usePattern)(o,u);o.fail$data((0,i._)`!${b}.test(${s})`)}}};e.default=r})),Ik=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ye(),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:r}){let o=i==="maxProperties"?"more":"fewer";return(0,t.str)`must NOT have ${o} than ${r} properties`},params:({schemaCode:i})=>(0,t._)`{limit: ${i}}`},code(i){let{keyword:r,data:o,schemaCode:a}=i,s=r==="maxProperties"?t.operators.GT:t.operators.LT;i.fail$data((0,t._)`Object.keys(${o}).length ${s} ${a}`)}};e.default=n})),Rk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Pt(),n=ye(),i=Te(),r={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,n.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,n._)`{missingProperty: ${o}}`},code(o){let{gen:a,schema:s,schemaCode:l,data:u,$data:d,it:p}=o,{opts:f}=p;if(!d&&s.length===0)return;let b=s.length>=f.loopRequired;if(p.allErrors?v():$(),f.strictRequired){let z=o.parentSchema.properties,{definedProperties:g}=o.it;for(let S of s)if(z?.[S]===void 0&&!g.has(S)){let k=`required property "${S}" is not defined at "${p.schemaEnv.baseId+p.errSchemaPath}" (strictRequired)`;(0,i.checkStrictMode)(p,k,p.opts.strictRequired)}}function v(){if(b||d)o.block$data(n.nil,y);else for(let z of s)(0,t.checkReportMissingProp)(o,z)}function $(){let z=a.let("missing");if(b||d){let g=a.let("valid",!0);o.block$data(g,()=>h(z,g)),o.ok(g)}else a.if((0,t.checkMissingProp)(o,s,z)),(0,t.reportMissingProp)(o,z),a.else()}function y(){a.forOf("prop",l,z=>{o.setParams({missingProperty:z}),a.if((0,t.noPropertyInData)(a,u,z,f.ownProperties),()=>o.error())})}function h(z,g){o.setParams({missingProperty:z}),a.forOf(z,l,()=>{a.assign(g,(0,t.propertyInData)(a,u,z,f.ownProperties)),a.if((0,n.not)(g),()=>{o.error(),a.break()})},n.nil)}}};e.default=r})),kk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ye(),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:r}){let o=i==="maxItems"?"more":"fewer";return(0,t.str)`must NOT have ${o} than ${r} items`},params:({schemaCode:i})=>(0,t._)`{limit: ${i}}`},code(i){let{keyword:r,data:o,schemaCode:a}=i,s=r==="maxItems"?t.operators.GT:t.operators.LT;i.fail$data((0,t._)`${o}.length ${s} ${a}`)}};e.default=n})),Xg=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=fS();t.code='require("ajv/dist/runtime/equal").default',e.default=t})),Tk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Iu(),n=ye(),i=Te(),r=Xg(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:a,j:s}})=>(0,n.str)`must NOT have duplicate items (items ## ${s} and ${a} are identical)`,params:({params:{i:a,j:s}})=>(0,n._)`{i: ${a}, j: ${s}}`},code(a){let{gen:s,data:l,$data:u,schema:d,parentSchema:p,schemaCode:f,it:b}=a;if(!u&&!d)return;let v=s.let("valid"),$=p.items?(0,t.getSchemaTypes)(p.items):[];a.block$data(v,y,(0,n._)`${f} === false`),a.ok(v);function y(){let S=s.let("i",(0,n._)`${l}.length`),k=s.let("j");a.setParams({i:S,j:k}),s.assign(v,!0),s.if((0,n._)`${S} > 1`,()=>(h()?z:g)(S,k))}function h(){return $.length>0&&!$.some(S=>S==="object"||S==="array")}function z(S,k){let w=s.name("item"),_=(0,t.checkDataTypes)($,w,b.opts.strictNumbers,t.DataType.Wrong),I=s.const("indices",(0,n._)`{}`);s.for((0,n._)`;${S}--;`,()=>{s.let(w,(0,n._)`${l}[${S}]`),s.if(_,(0,n._)`continue`),$.length>1&&s.if((0,n._)`typeof ${w} == "string"`,(0,n._)`${w} += "_"`),s.if((0,n._)`typeof ${I}[${w}] == "number"`,()=>{s.assign(k,(0,n._)`${I}[${w}]`),a.error(),s.assign(v,!1).break()}).code((0,n._)`${I}[${w}] = ${S}`)})}function g(S,k){let w=(0,i.useFunc)(s,r.default),_=s.name("outer");s.label(_).for((0,n._)`;${S}--;`,()=>s.for((0,n._)`${k} = ${S}; ${k}--;`,()=>s.if((0,n._)`${w}(${l}[${S}], ${l}[${k}])`,()=>{a.error(),s.assign(v,!1).break(_)})))}}};e.default=o})),Ek=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ye(),n=Te(),i=Xg(),r={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,t._)`{allowedValue: ${o}}`},code(o){let{gen:a,data:s,$data:l,schemaCode:u,schema:d}=o;l||d&&typeof d=="object"?o.fail$data((0,t._)`!${(0,n.useFunc)(a,i.default)}(${s}, ${u})`):o.fail((0,t._)`${d} !== ${s}`)}};e.default=r})),Pk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ye(),n=Te(),i=Xg(),r={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,t._)`{allowedValues: ${o}}`},code(o){let{gen:a,data:s,$data:l,schema:u,schemaCode:d,it:p}=o;if(!l&&u.length===0)throw new Error("enum must have non-empty array");let f=u.length>=p.opts.loopEnum,b,v=()=>b??(b=(0,n.useFunc)(a,i.default)),$;if(f||l)$=a.let("valid"),o.block$data($,y);else{if(!Array.isArray(u))throw new Error("ajv implementation error");let z=a.const("vSchema",d);$=(0,t.or)(...u.map((g,S)=>h(z,S)))}o.pass($);function y(){a.assign($,!1),a.forOf("v",d,z=>a.if((0,t._)`${v()}(${s}, ${z})`,()=>a.assign($,!0).break()))}function h(z,g){let S=u[g];return typeof S=="object"&&S!==null?(0,t._)`${v()}(${s}, ${z}[${g}])`:(0,t._)`${s} === ${S}`}}};e.default=r})),yS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=bk(),n=Sk(),i=wk(),r=zk(),o=Ik(),a=Rk(),s=kk(),l=Tk(),u=Ek(),d=Pk(),p=[t.default,n.default,i.default,r.default,o.default,a.default,s.default,l.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,d.default];e.default=p})),_S=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;let t=ye(),n=Te(),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,t.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,t._)`{limit: ${o}}`},code(o){let{parentSchema:a,it:s}=o,{items:l}=a;if(!Array.isArray(l)){(0,n.checkStrictMode)(s,'"additionalItems" is ignored when "items" is not an array of schemas');return}r(o,l)}};function r(o,a){let{gen:s,schema:l,data:u,keyword:d,it:p}=o;p.items=!0;let f=s.const("len",(0,t._)`${u}.length`);if(l===!1)o.setParams({len:a.length}),o.pass((0,t._)`${f} <= ${a.length}`);else if(typeof l=="object"&&!(0,n.alwaysValidSchema)(p,l)){let v=s.var("valid",(0,t._)`${f} <= ${a.length}`);s.if((0,t.not)(v),()=>b(v)),o.ok(v)}function b(v){s.forRange("i",a.length,f,$=>{o.subschema({keyword:d,dataProp:$,dataPropType:n.Type.Num},v),p.allErrors||s.if((0,t.not)(v),()=>s.break())})}}e.validateAdditionalItems=r,e.default=i})),bS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;let t=ye(),n=Te(),i=Pt(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(a){let{schema:s,it:l}=a;if(Array.isArray(s))return o(a,"additionalItems",s);l.items=!0,!(0,n.alwaysValidSchema)(l,s)&&a.ok((0,i.validateArray)(a))}};function o(a,s,l=a.schema){let{gen:u,parentSchema:d,data:p,keyword:f,it:b}=a;y(d),b.opts.unevaluated&&l.length&&b.items!==!0&&(b.items=n.mergeEvaluated.items(u,l.length,b.items));let v=u.name("valid"),$=u.const("len",(0,t._)`${p}.length`);l.forEach((h,z)=>{(0,n.alwaysValidSchema)(b,h)||(u.if((0,t._)`${$} > ${z}`,()=>a.subschema({keyword:f,schemaProp:z,dataProp:z},v)),a.ok(v))});function y(h){let{opts:z,errSchemaPath:g}=b,S=l.length,k=S===h.minItems&&(S===h.maxItems||h[s]===!1);if(z.strictTuples&&!k){let w=`"${f}" is ${S}-tuple, but minItems or maxItems/${s} are not specified or different at path "${g}"`;(0,n.checkStrictMode)(b,w,z.strictTuples)}}}e.validateTuple=o,e.default=r})),xk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=bS(),n={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:i=>(0,t.validateTuple)(i,"items")};e.default=n})),jk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ye(),n=Te(),i=Pt(),r=_S(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,t.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,t._)`{limit: ${a}}`},code(a){let{schema:s,parentSchema:l,it:u}=a,{prefixItems:d}=l;u.items=!0,!(0,n.alwaysValidSchema)(u,s)&&(d?(0,r.validateAdditionalItems)(a,d):a.ok((0,i.validateArray)(a)))}};e.default=o})),Ak=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ye(),n=Te(),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:r,max:o}})=>o===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 ${o} valid item(s)`,params:({params:{min:r,max:o}})=>o===void 0?(0,t._)`{minContains: ${r}}`:(0,t._)`{minContains: ${r}, maxContains: ${o}}`},code(r){let{gen:o,schema:a,parentSchema:s,data:l,it:u}=r,d,p,{minContains:f,maxContains:b}=s;u.opts.next?(d=f===void 0?1:f,p=b):d=1;let v=o.const("len",(0,t._)`${l}.length`);if(r.setParams({min:d,max:p}),p===void 0&&d===0){(0,n.checkStrictMode)(u,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(p!==void 0&&d>p){(0,n.checkStrictMode)(u,'"minContains" > "maxContains" is always invalid'),r.fail();return}if((0,n.alwaysValidSchema)(u,a)){let g=(0,t._)`${v} >= ${d}`;p!==void 0&&(g=(0,t._)`${g} && ${v} <= ${p}`),r.pass(g);return}u.items=!0;let $=o.name("valid");p===void 0&&d===1?h($,()=>o.if($,()=>o.break())):d===0?(o.let($,!0),p!==void 0&&o.if((0,t._)`${l}.length > 0`,y)):(o.let($,!1),y()),r.result($,()=>r.reset());function y(){let g=o.name("_valid"),S=o.let("count",0);h(g,()=>o.if(g,()=>z(S)))}function h(g,S){o.forRange("i",0,v,k=>{r.subschema({keyword:"contains",dataProp:k,dataPropType:n.Type.Num,compositeRule:!0},g),S()})}function z(g){o.code((0,t._)`${g}++`),p===void 0?o.if((0,t._)`${g} >= ${d}`,()=>o.assign($,!0).break()):(o.if((0,t._)`${g} > ${p}`,()=>o.assign($,!1).break()),d===1?o.assign($,!0):o.if((0,t._)`${g} >= ${d}`,()=>o.assign($,!0)))}}};e.default=i})),Qg=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;let t=ye(),n=Te(),i=Pt();e.error={message:({params:{property:l,depsCount:u,deps:d}})=>{let p=u===1?"property":"properties";return(0,t.str)`must have ${p} ${d} when property ${l} is present`},params:({params:{property:l,depsCount:u,deps:d,missingProperty:p}})=>(0,t._)`{property: ${l},
|
|
72
|
+
|| ${j} === "boolean" || ${_} === null`).assign(U,(0,r._)`[${_}]`)}}}function b({gen:g,parentData:S,parentDataProperty:k},w){g.if((0,r._)`${S} !== undefined`,()=>g.assign((0,r._)`${S}[${k}]`,w))}function v(g,S,k,w=a.Correct){let _=w===a.Correct?r.operators.EQ:r.operators.NEQ,I;switch(g){case"null":return(0,r._)`${S} ${_} null`;case"array":I=(0,r._)`Array.isArray(${S})`;break;case"object":I=(0,r._)`${S} && typeof ${S} == "object" && !Array.isArray(${S})`;break;case"integer":I=j((0,r._)`!(${S} % 1) && !isNaN(${S})`);break;case"number":I=j();break;default:return(0,r._)`typeof ${S} ${_} ${g}`}return w===a.Correct?I:(0,r.not)(I);function j(U=r.nil){return(0,r.and)((0,r._)`typeof ${S} == "number"`,U,k?(0,r._)`isFinite(${S})`:r.nil)}}e.checkDataType=v;function $(g,S,k,w){if(g.length===1)return v(g[0],S,k,w);let _,I=(0,o.toHash)(g);if(I.array&&I.object){let j=(0,r._)`typeof ${S} != "object"`;_=I.null?j:(0,r._)`!${S} || ${j}`,delete I.null,delete I.array,delete I.object}else _=r.nil;I.number&&delete I.integer;for(let j in I)_=(0,r.and)(_,v(j,S,k,w));return _}e.checkDataTypes=$;let y={message:({schema:g})=>`must be ${g}`,params:({schema:g,schemaValue:S})=>typeof g=="string"?(0,r._)`{type: ${g}}`:(0,r._)`{type: ${S}}`};function h(g){let S=z(g);(0,i.reportError)(S,y)}e.reportTypeError=h;function z(g){let{gen:S,data:k,schema:w}=g,_=(0,o.schemaRefOrVal)(g,w,"type");return{gen:S,keyword:"type",data:k,schema:w.type,schemaCode:_,schemaValue:_,parentSchema:w,params:{},it:g}}})),kk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;let t=_e(),n=Te();function i(o,a){let{properties:s,items:c}=o.schema;if(a==="object"&&s)for(let u in s)r(o,u,s[u].default);else a==="array"&&Array.isArray(c)&&c.forEach((u,d)=>r(o,d,u.default))}e.assignDefaults=i;function r(o,a,s){let{gen:c,compositeRule:u,data:d,opts:p}=o;if(s===void 0)return;let f=(0,t._)`${d}${(0,t.getProperty)(a)}`;if(u){(0,n.checkStrictMode)(o,`default is ignored for: ${f}`);return}let b=(0,t._)`${f} === undefined`;p.useDefaults==="empty"&&(b=(0,t._)`${b} || ${f} === null || ${f} === ""`),c.if(b,(0,t._)`${f} = ${(0,t.stringify)(s)}`)}})),xt=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),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=_e(),n=Te(),i=Pt(),r=Te();function o(g,S){let{gen:k,data:w,it:_}=g;k.if(p(k,w,S,_.opts.ownProperties),()=>{g.setParams({missingProperty:(0,t._)`${S}`},!0),g.error()})}e.checkReportMissingProp=o;function a({gen:g,data:S,it:{opts:k}},w,_){return(0,t.or)(...w.map(I=>(0,t.and)(p(g,S,I,k.ownProperties),(0,t._)`${_} = ${I}`)))}e.checkMissingProp=a;function s(g,S){g.setParams({missingProperty:S},!0),g.error()}e.reportMissingProp=s;function c(g){return g.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=c;function u(g,S,k){return(0,t._)`${c(g)}.call(${S}, ${k})`}e.isOwnProperty=u;function d(g,S,k,w){let _=(0,t._)`${S}${(0,t.getProperty)(k)} !== undefined`;return w?(0,t._)`${_} && ${u(g,S,k)}`:_}e.propertyInData=d;function p(g,S,k,w){let _=(0,t._)`${S}${(0,t.getProperty)(k)} === undefined`;return w?(0,t.or)(_,(0,t.not)(u(g,S,k))):_}e.noPropertyInData=p;function f(g){return g?Object.keys(g).filter(S=>S!=="__proto__"):[]}e.allSchemaProperties=f;function b(g,S){return f(S).filter(k=>!(0,n.alwaysValidSchema)(g,S[k]))}e.schemaProperties=b;function v({schemaCode:g,data:S,it:{gen:k,topSchemaRef:w,schemaPath:_,errorPath:I},it:j},U,N,F){let ee=F?(0,t._)`${g}, ${S}, ${w}${_}`:S,ne=[[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,I)],[i.default.parentData,j.parentData],[i.default.parentDataProperty,j.parentDataProperty],[i.default.rootData,i.default.rootData]];j.opts.dynamicRef&&ne.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);let we=(0,t._)`${ee}, ${k.object(...ne)}`;return N!==t.nil?(0,t._)`${U}.call(${N}, ${we})`:(0,t._)`${U}(${we})`}e.callValidateCode=v;let $=(0,t._)`new RegExp`;function y({gen:g,it:{opts:S}},k){let w=S.unicodeRegExp?"u":"",{regExp:_}=S.code,I=_(k,w);return g.scopeValue("pattern",{key:I.toString(),ref:I,code:(0,t._)`${_.code==="new RegExp"?$:(0,r.useFunc)(g,_)}(${k}, ${w})`})}e.usePattern=y;function h(g){let{gen:S,data:k,keyword:w,it:_}=g,I=S.name("valid");if(_.allErrors){let U=S.let("valid",!0);return j(()=>S.assign(U,!1)),U}return S.var(I,!0),j(()=>S.break()),I;function j(U){let N=S.const("len",(0,t._)`${k}.length`);S.forRange("i",0,N,F=>{g.subschema({keyword:w,dataProp:F,dataPropType:n.Type.Num},I),S.if((0,t.not)(I),U)})}}e.validateArray=h;function z(g){let{gen:S,schema:k,keyword:w,it:_}=g;if(!Array.isArray(k))throw new Error("ajv implementation error");if(k.some(U=>(0,n.alwaysValidSchema)(_,U))&&!_.opts.unevaluated)return;let I=S.let("valid",!1),j=S.name("_valid");S.block(()=>k.forEach((U,N)=>{let F=g.subschema({keyword:w,schemaProp:N,compositeRule:!0},j);S.assign(I,(0,t._)`${I} || ${j}`),g.mergeValidEvaluated(F,j)||S.if((0,t.not)(I))})),g.result(I,()=>g.reset(),()=>g.error(!0))}e.validateUnion=z})),Tk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;let t=_e(),n=Pt(),i=xt(),r=xu();function o(b,v){let{gen:$,keyword:y,schema:h,parentSchema:z,it:g}=b,S=v.macro.call(g.self,h,z,g),k=d($,y,S);g.opts.validateSchema!==!1&&g.self.validateSchema(S,!0);let w=$.name("valid");b.subschema({schema:S,schemaPath:t.nil,errSchemaPath:`${g.errSchemaPath}/${y}`,topSchemaRef:k,compositeRule:!0},w),b.pass(w,()=>b.error(!0))}e.macroKeywordCode=o;function a(b,v){var $;let{gen:y,keyword:h,schema:z,parentSchema:g,$data:S,it:k}=b;u(k,v);let w=d(y,h,!S&&v.compile?v.compile.call(k.self,z,g,k):v.validate),_=y.let("valid");b.block$data(_,I),b.ok(($=v.valid)!==null&&$!==void 0?$:_);function I(){if(v.errors===!1)N(),v.modifying&&s(b),F(()=>b.error());else{let ee=v.async?j():U();v.modifying&&s(b),F(()=>c(b,ee))}}function j(){let ee=y.let("ruleErrs",null);return y.try(()=>N((0,t._)`await `),ne=>y.assign(_,!1).if((0,t._)`${ne} instanceof ${k.ValidationError}`,()=>y.assign(ee,(0,t._)`${ne}.errors`),()=>y.throw(ne))),ee}function U(){let ee=(0,t._)`${w}.errors`;return y.assign(ee,null),N(t.nil),ee}function N(ee=v.async?(0,t._)`await `:t.nil){let ne=k.opts.passContext?n.default.this:n.default.self,we=!("compile"in v&&!S||v.schema===!1);y.assign(_,(0,t._)`${ee}${(0,i.callValidateCode)(b,w,ne,we)}`,v.modifying)}function F(ee){var ne;y.if((0,t.not)((ne=v.valid)!==null&&ne!==void 0?ne:_),ee)}}e.funcKeywordCode=a;function s(b){let{gen:v,data:$,it:y}=b;v.if(y.parentData,()=>v.assign($,(0,t._)`${y.parentData}[${y.parentDataProperty}]`))}function c(b,v){let{gen:$}=b;$.if((0,t._)`Array.isArray(${v})`,()=>{$.assign(n.default.vErrors,(0,t._)`${n.default.vErrors} === null ? ${v} : ${n.default.vErrors}.concat(${v})`).assign(n.default.errors,(0,t._)`${n.default.vErrors}.length`),(0,r.extendErrors)(b)},()=>b.error())}function u({schemaEnv:b},v){if(v.async&&!b.$async)throw new Error("async keyword in sync schema")}function d(b,v,$){if($===void 0)throw new Error(`keyword "${v}" failed to compile`);return b.scopeValue("keyword",typeof $=="function"?{ref:$}:{ref:$,code:(0,t.stringify)($)})}function p(b,v,$=!1){return!v.length||v.some(y=>y==="array"?Array.isArray(b):y==="object"?b&&typeof b=="object"&&!Array.isArray(b):typeof b==y||$&&typeof b>"u")}e.validSchemaType=p;function f({schema:b,opts:v,self:$,errSchemaPath:y},h,z){if(Array.isArray(h.keyword)?!h.keyword.includes(z):h.keyword!==z)throw new Error("ajv implementation error");let g=h.dependencies;if(g?.some(S=>!Object.prototype.hasOwnProperty.call(b,S)))throw new Error(`parent schema must have dependencies of ${z}: ${g.join(",")}`);if(h.validateSchema&&!h.validateSchema(b[z])){let S=`keyword "${z}" value is invalid at path "${y}": `+$.errorsText(h.validateSchema.errors);if(v.validateSchema==="log")$.logger.error(S);else throw new Error(S)}}e.validateKeywordUsage=f})),Ek=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;let t=_e(),n=Te();function i(a,{keyword:s,schemaProp:c,schema:u,schemaPath:d,errSchemaPath:p,topSchemaRef:f}){if(s!==void 0&&u!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(s!==void 0){let b=a.schema[s];return c===void 0?{schema:b,schemaPath:(0,t._)`${a.schemaPath}${(0,t.getProperty)(s)}`,errSchemaPath:`${a.errSchemaPath}/${s}`}:{schema:b[c],schemaPath:(0,t._)`${a.schemaPath}${(0,t.getProperty)(s)}${(0,t.getProperty)(c)}`,errSchemaPath:`${a.errSchemaPath}/${s}/${(0,n.escapeFragment)(c)}`}}if(u!==void 0){if(d===void 0||p===void 0||f===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:u,schemaPath:d,topSchemaRef:f,errSchemaPath:p}}throw new Error('either "keyword" or "schema" must be passed')}e.getSubschema=i;function r(a,s,{dataProp:c,dataPropType:u,data:d,dataTypes:p,propertyName:f}){if(d!==void 0&&c!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:b}=s;if(c!==void 0){let{errorPath:$,dataPathArr:y,opts:h}=s;v(b.let("data",(0,t._)`${s.data}${(0,t.getProperty)(c)}`,!0)),a.errorPath=(0,t.str)`${$}${(0,n.getErrorPath)(c,u,h.jsPropertySyntax)}`,a.parentDataProperty=(0,t._)`${c}`,a.dataPathArr=[...y,a.parentDataProperty]}d!==void 0&&(v(d instanceof t.Name?d:b.let("data",d,!0)),f!==void 0&&(a.propertyName=f)),p&&(a.dataTypes=p);function v($){a.data=$,a.dataLevel=s.dataLevel+1,a.dataTypes=[],s.definedProperties=new Set,a.parentData=s.data,a.dataNames=[...s.dataNames,$]}}e.extendSubschemaData=r;function o(a,{jtdDiscriminator:s,jtdMetadata:c,compositeRule:u,createErrors:d,allErrors:p}){u!==void 0&&(a.compositeRule=u),d!==void 0&&(a.createErrors=d),p!==void 0&&(a.allErrors=p),a.jtdDiscriminator=s,a.jtdMetadata=c}e.extendSubschemaMode=o})),RS=Z(((e,t)=>{t.exports=function n(i,r){if(i===r)return!0;if(i&&r&&typeof i=="object"&&typeof r=="object"){if(i.constructor!==r.constructor)return!1;var o,a,s;if(Array.isArray(i)){if(o=i.length,o!=r.length)return!1;for(a=o;a--!==0;)if(!n(i[a],r[a]))return!1;return!0}if(i.constructor===RegExp)return i.source===r.source&&i.flags===r.flags;if(i.valueOf!==Object.prototype.valueOf)return i.valueOf()===r.valueOf();if(i.toString!==Object.prototype.toString)return i.toString()===r.toString();if(s=Object.keys(i),o=s.length,o!==Object.keys(r).length)return!1;for(a=o;a--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[a]))return!1;for(a=o;a--!==0;){var c=s[a];if(!n(i[c],r[c]))return!1}return!0}return i!==i&&r!==r}})),Pk=Z(((e,t)=>{var n=t.exports=function(o,a,s){typeof a=="function"&&(s=a,a={}),s=a.cb||s;var c=typeof s=="function"?s:s.pre||function(){},u=s.post||function(){};i(a,c,u,o,"",o)};n.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},n.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},n.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},n.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function i(o,a,s,c,u,d,p,f,b,v){if(c&&typeof c=="object"&&!Array.isArray(c)){a(c,u,d,p,f,b,v);for(var $ in c){var y=c[$];if(Array.isArray(y)){if($ in n.arrayKeywords)for(var h=0;h<y.length;h++)i(o,a,s,y[h],u+"/"+$+"/"+h,d,u,$,c,h)}else if($ in n.propsKeywords){if(y&&typeof y=="object")for(var z in y)i(o,a,s,y[z],u+"/"+$+"/"+r(z),d,u,$,c,z)}else($ in n.keywords||o.allKeys&&!($ in n.skipKeywords))&&i(o,a,s,y,u+"/"+$,d,u,$,c)}s(c,u,d,p,f,b,v)}}function r(o){return o.replace(/~/g,"~0").replace(/\//g,"~1")}})),ju=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getSchemaRefs=e.resolveUrl=e.normalizeId=e._getFullPath=e.getFullPath=e.inlineRef=void 0;let t=Te(),n=RS(),i=Pk(),r=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function o(y,h=!0){return typeof y=="boolean"?!0:h===!0?!s(y):h?c(y)<=h:!1}e.inlineRef=o;let a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(y){for(let h in y){if(a.has(h))return!0;let z=y[h];if(Array.isArray(z)&&z.some(s)||typeof z=="object"&&s(z))return!0}return!1}function c(y){let h=0;for(let z in y){if(z==="$ref")return 1/0;if(h++,!r.has(z)&&(typeof y[z]=="object"&&(0,t.eachItem)(y[z],g=>h+=c(g)),h===1/0))return 1/0}return h}function u(y,h="",z){return z!==!1&&(h=f(h)),d(y,y.parse(h))}e.getFullPath=u;function d(y,h){return y.serialize(h).split("#")[0]+"#"}e._getFullPath=d;let p=/#\/?$/;function f(y){return y?y.replace(p,""):""}e.normalizeId=f;function b(y,h,z){return z=f(z),y.resolve(h,z)}e.resolveUrl=b;let v=/^[a-z_][-a-z0-9._]*$/i;function $(y,h){if(typeof y=="boolean")return{};let{schemaId:z,uriResolver:g}=this.opts,S=f(y[z]||h),k={"":S},w=u(g,S,!1),_={},I=new Set;return i(y,{allKeys:!0},(N,F,ee,ne)=>{if(ne===void 0)return;let we=w+F,Ne=k[ne];typeof N[z]=="string"&&(Ne=Ae.call(this,N[z])),Je.call(this,N.$anchor),Je.call(this,N.$dynamicAnchor),k[F]=Ne;function Ae(ke){let x=this.opts.uriResolver.resolve;if(ke=f(Ne?x(Ne,ke):ke),I.has(ke))throw U(ke);I.add(ke);let M=this.refs[ke];return typeof M=="string"&&(M=this.refs[M]),typeof M=="object"?j(N,M.schema,ke):ke!==f(we)&&(ke[0]==="#"?(j(N,_[ke],ke),_[ke]=N):this.refs[ke]=we),ke}function Je(ke){if(typeof ke=="string"){if(!v.test(ke))throw new Error(`invalid anchor "${ke}"`);Ae.call(this,`#${ke}`)}}}),_;function j(N,F,ee){if(F!==void 0&&!n(N,F))throw U(ee)}function U(N){return new Error(`reference "${N}" resolves to more than one schema`)}}e.getSchemaRefs=$})),gi=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;let t=Rk(),n=Pu(),i=IS(),r=Pu(),o=kk(),a=Tk(),s=Ek(),c=_e(),u=Pt(),d=ju(),p=Te(),f=xu();function b(E){if(w(E)&&(I(E),k(E))){h(E);return}v(E,()=>(0,t.topBoolOrEmptySchema)(E))}e.validateFunctionCode=b;function v({gen:E,validateName:D,schema:V,schemaEnv:pe,opts:he},be){he.code.es5?E.func(D,(0,c._)`${u.default.data}, ${u.default.valCxt}`,pe.$async,()=>{E.code((0,c._)`"use strict"; ${g(V,he)}`),y(E,he),E.code(be)}):E.func(D,(0,c._)`${u.default.data}, ${$(he)}`,pe.$async,()=>E.code(g(V,he)).code(be))}function $(E){return(0,c._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${E.dynamicRef?(0,c._)`, ${u.default.dynamicAnchors}={}`:c.nil}}={}`}function y(E,D){E.if(u.default.valCxt,()=>{E.var(u.default.instancePath,(0,c._)`${u.default.valCxt}.${u.default.instancePath}`),E.var(u.default.parentData,(0,c._)`${u.default.valCxt}.${u.default.parentData}`),E.var(u.default.parentDataProperty,(0,c._)`${u.default.valCxt}.${u.default.parentDataProperty}`),E.var(u.default.rootData,(0,c._)`${u.default.valCxt}.${u.default.rootData}`),D.dynamicRef&&E.var(u.default.dynamicAnchors,(0,c._)`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{E.var(u.default.instancePath,(0,c._)`""`),E.var(u.default.parentData,(0,c._)`undefined`),E.var(u.default.parentDataProperty,(0,c._)`undefined`),E.var(u.default.rootData,u.default.data),D.dynamicRef&&E.var(u.default.dynamicAnchors,(0,c._)`{}`)})}function h(E){let{schema:D,opts:V,gen:pe}=E;v(E,()=>{V.$comment&&D.$comment&&ne(E),N(E),pe.let(u.default.vErrors,null),pe.let(u.default.errors,0),V.unevaluated&&z(E),j(E),we(E)})}function z(E){let{gen:D,validateName:V}=E;E.evaluated=D.const("evaluated",(0,c._)`${V}.evaluated`),D.if((0,c._)`${E.evaluated}.dynamicProps`,()=>D.assign((0,c._)`${E.evaluated}.props`,(0,c._)`undefined`)),D.if((0,c._)`${E.evaluated}.dynamicItems`,()=>D.assign((0,c._)`${E.evaluated}.items`,(0,c._)`undefined`))}function g(E,D){let V=typeof E=="object"&&E[D.schemaId];return V&&(D.code.source||D.code.process)?(0,c._)`/*# sourceURL=${V} */`:c.nil}function S(E,D){if(w(E)&&(I(E),k(E))){_(E,D);return}(0,t.boolOrEmptySchema)(E,D)}function k({schema:E,self:D}){if(typeof E=="boolean")return!E;for(let V in E)if(D.RULES.all[V])return!0;return!1}function w(E){return typeof E.schema!="boolean"}function _(E,D){let{schema:V,gen:pe,opts:he}=E;he.$comment&&V.$comment&&ne(E),F(E),ee(E);let be=pe.const("_errs",u.default.errors);j(E,be),pe.var(D,(0,c._)`${be} === ${u.default.errors}`)}function I(E){(0,p.checkUnknownRules)(E),U(E)}function j(E,D){if(E.opts.jtd)return Ae(E,[],!1,D);let V=(0,n.getSchemaTypes)(E.schema);Ae(E,V,!(0,n.coerceAndCheckDataType)(E,V),D)}function U(E){let{schema:D,errSchemaPath:V,opts:pe,self:he}=E;D.$ref&&pe.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(D,he.RULES)&&he.logger.warn(`$ref: keywords ignored in schema at path "${V}"`)}function N(E){let{schema:D,opts:V}=E;D.default!==void 0&&V.useDefaults&&V.strictSchema&&(0,p.checkStrictMode)(E,"default is ignored in the schema root")}function F(E){let D=E.schema[E.opts.schemaId];D&&(E.baseId=(0,d.resolveUrl)(E.opts.uriResolver,E.baseId,D))}function ee(E){if(E.schema.$async&&!E.schemaEnv.$async)throw new Error("async schema in sync schema")}function ne({gen:E,schemaEnv:D,schema:V,errSchemaPath:pe,opts:he}){let be=V.$comment;if(he.$comment===!0)E.code((0,c._)`${u.default.self}.logger.log(${be})`);else if(typeof he.$comment=="function"){let Ve=(0,c.str)`${pe}/$comment`,Be=E.scopeValue("root",{ref:D.root});E.code((0,c._)`${u.default.self}.opts.$comment(${be}, ${Ve}, ${Be}.schema)`)}}function we(E){let{gen:D,schemaEnv:V,validateName:pe,ValidationError:he,opts:be}=E;V.$async?D.if((0,c._)`${u.default.errors} === 0`,()=>D.return(u.default.data),()=>D.throw((0,c._)`new ${he}(${u.default.vErrors})`)):(D.assign((0,c._)`${pe}.errors`,u.default.vErrors),be.unevaluated&&Ne(E),D.return((0,c._)`${u.default.errors} === 0`))}function Ne({gen:E,evaluated:D,props:V,items:pe}){V instanceof c.Name&&E.assign((0,c._)`${D}.props`,V),pe instanceof c.Name&&E.assign((0,c._)`${D}.items`,pe)}function Ae(E,D,V,pe){let{gen:he,schema:be,data:Ve,allErrors:Be,opts:et,self:Ge}=E,{RULES:Le}=Ge;if(be.$ref&&(et.ignoreKeywordsWithRef||!(0,p.schemaHasRulesButRef)(be,Le))){he.block(()=>Se(E,"$ref",Le.all.$ref.definition));return}et.jtd||ke(E,D),he.block(()=>{for(let Ke of Le.rules)St(Ke);St(Le.post)});function St(Ke){(0,i.shouldUseGroup)(be,Ke)&&(Ke.type?(he.if((0,r.checkDataType)(Ke.type,Ve,et.strictNumbers)),Je(E,Ke),D.length===1&&D[0]===Ke.type&&V&&(he.else(),(0,r.reportTypeError)(E)),he.endIf()):Je(E,Ke),Be||he.if((0,c._)`${u.default.errors} === ${pe||0}`))}}function Je(E,D){let{gen:V,schema:pe,opts:{useDefaults:he}}=E;he&&(0,o.assignDefaults)(E,D.type),V.block(()=>{for(let be of D.rules)(0,i.shouldUseRule)(pe,be)&&Se(E,be.keyword,be.definition,D.type)})}function ke(E,D){E.schemaEnv.meta||!E.opts.strictTypes||(x(E,D),E.opts.allowUnionTypes||M(E,D),J(E,E.dataTypes))}function x(E,D){if(D.length){if(!E.dataTypes.length){E.dataTypes=D;return}D.forEach(V=>{P(E.dataTypes,V)||Y(E,`type "${V}" not allowed by context "${E.dataTypes.join(",")}"`)}),L(E,D)}}function M(E,D){D.length>1&&!(D.length===2&&D.includes("null"))&&Y(E,"use allowUnionTypes to allow union type keyword")}function J(E,D){let V=E.self.RULES.all;for(let pe in V){let he=V[pe];if(typeof he=="object"&&(0,i.shouldUseRule)(E.schema,he)){let{type:be}=he.definition;be.length&&!be.some(Ve=>R(D,Ve))&&Y(E,`missing type "${be.join(",")}" for keyword "${pe}"`)}}}function R(E,D){return E.includes(D)||D==="number"&&E.includes("integer")}function P(E,D){return E.includes(D)||D==="integer"&&E.includes("number")}function L(E,D){let V=[];for(let pe of E.dataTypes)P(D,pe)?V.push(pe):D.includes("integer")&&pe==="number"&&V.push("integer");E.dataTypes=V}function Y(E,D){let V=E.schemaEnv.baseId+E.errSchemaPath;D+=` at "${V}" (strictTypes)`,(0,p.checkStrictMode)(E,D,E.opts.strictTypes)}var ue=class{constructor(E,D,V){if((0,a.validateKeywordUsage)(E,D,V),this.gen=E.gen,this.allErrors=E.allErrors,this.keyword=V,this.data=E.data,this.schema=E.schema[V],this.$data=D.$data&&E.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(E,this.schema,V,this.$data),this.schemaType=D.schemaType,this.parentSchema=E.schema,this.params={},this.it=E,this.def=D,this.$data)this.schemaCode=E.gen.const("vSchema",at(this.$data,E));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,D.schemaType,D.allowUndefined))throw new Error(`${V} value must be ${JSON.stringify(D.schemaType)}`);("code"in D?D.trackErrors:D.errors!==!1)&&(this.errsCount=E.gen.const("_errs",u.default.errors))}result(E,D,V){this.failResult((0,c.not)(E),D,V)}failResult(E,D,V){this.gen.if(E),V?V():this.error(),D?(this.gen.else(),D(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(E,D){this.failResult((0,c.not)(E),void 0,D)}fail(E){if(E===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(E),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(E){if(!this.$data)return this.fail(E);let{schemaCode:D}=this;this.fail((0,c._)`${D} !== undefined && (${(0,c.or)(this.invalid$data(),E)})`)}error(E,D,V){if(D){this.setParams(D),this._error(E,V),this.setParams({});return}this._error(E,V)}_error(E,D){(E?f.reportExtraError:f.reportError)(this,this.def.error,D)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(E){this.allErrors||this.gen.if(E)}setParams(E,D){D?Object.assign(this.params,E):this.params=E}block$data(E,D,V=c.nil){this.gen.block(()=>{this.check$data(E,V),D()})}check$data(E=c.nil,D=c.nil){if(!this.$data)return;let{gen:V,schemaCode:pe,schemaType:he,def:be}=this;V.if((0,c.or)((0,c._)`${pe} === undefined`,D)),E!==c.nil&&V.assign(E,!0),(he.length||be.validateSchema)&&(V.elseIf(this.invalid$data()),this.$dataError(),E!==c.nil&&V.assign(E,!1)),V.else()}invalid$data(){let{gen:E,schemaCode:D,schemaType:V,def:pe,it:he}=this;return(0,c.or)(be(),Ve());function be(){if(V.length){if(!(D instanceof c.Name))throw new Error("ajv implementation error");let Be=Array.isArray(V)?V:[V];return(0,c._)`${(0,r.checkDataTypes)(Be,D,he.opts.strictNumbers,r.DataType.Wrong)}`}return c.nil}function Ve(){if(pe.validateSchema){let Be=E.scopeValue("validate$data",{ref:pe.validateSchema});return(0,c._)`!${Be}(${D})`}return c.nil}}subschema(E,D){let V=(0,s.getSubschema)(this.it,E);(0,s.extendSubschemaData)(V,this.it,E),(0,s.extendSubschemaMode)(V,E);let pe={...this.it,...V,items:void 0,props:void 0};return S(pe,D),pe}mergeEvaluated(E,D){let{it:V,gen:pe}=this;V.opts.unevaluated&&(V.props!==!0&&E.props!==void 0&&(V.props=p.mergeEvaluated.props(pe,E.props,V.props,D)),V.items!==!0&&E.items!==void 0&&(V.items=p.mergeEvaluated.items(pe,E.items,V.items,D)))}mergeValidEvaluated(E,D){let{it:V,gen:pe}=this;if(V.opts.unevaluated&&(V.props!==!0||V.items!==!0))return pe.if(D,()=>this.mergeEvaluated(E,c.Name)),!0}};e.KeywordCxt=ue;function Se(E,D,V,pe){let he=new ue(E,V,D);"code"in V?V.code(he,pe):he.$data&&V.validate?(0,a.funcKeywordCode)(he,V):"macro"in V?(0,a.macroKeywordCode)(he,V):(V.compile||V.validate)&&(0,a.funcKeywordCode)(he,V)}let fe=/^\/(?:[^~]|~0|~1)*$/,Oe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function at(E,{dataLevel:D,dataNames:V,dataPathArr:pe}){let he,be;if(E==="")return u.default.rootData;if(E[0]==="/"){if(!fe.test(E))throw new Error(`Invalid JSON-pointer: ${E}`);he=E,be=u.default.rootData}else{let Ge=Oe.exec(E);if(!Ge)throw new Error(`Invalid JSON-pointer: ${E}`);let Le=+Ge[1];if(he=Ge[2],he==="#"){if(Le>=D)throw new Error(et("property/index",Le));return pe[D-Le]}if(Le>D)throw new Error(et("data",Le));if(be=V[D-Le],!he)return be}let Ve=be,Be=he.split("/");for(let Ge of Be)Ge&&(be=(0,c._)`${be}${(0,c.getProperty)((0,p.unescapeJsonPointer)(Ge))}`,Ve=(0,c._)`${Ve} && ${be}`);return Ve;function et(Ge,Le){return`Cannot access ${Ge} ${Le} levels up, current level is ${D}`}}e.getData=at})),ma=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=class extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}};e.default=t})),vi=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ju();var n=class extends Error{constructor(i,r,o,a){super(a||`can't resolve reference ${o} from id ${r}`),this.missingRef=(0,t.resolveUrl)(i,r,o),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(i,this.missingRef))}};e.default=n})),Au=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;let t=_e(),n=ma(),i=Pt(),r=ju(),o=Te(),a=gi();var s=class{constructor(h){var z;this.refs={},this.dynamicAnchors={};let g;typeof h.schema=="object"&&(g=h.schema),this.schema=h.schema,this.schemaId=h.schemaId,this.root=h.root||this,this.baseId=(z=h.baseId)!==null&&z!==void 0?z:(0,r.normalizeId)(g?.[h.schemaId||"$id"]),this.schemaPath=h.schemaPath,this.localRefs=h.localRefs,this.meta=h.meta,this.$async=g?.$async,this.refs={}}};e.SchemaEnv=s;function c(h){let z=p.call(this,h);if(z)return z;let g=(0,r.getFullPath)(this.opts.uriResolver,h.root.baseId),{es5:S,lines:k}=this.opts.code,{ownProperties:w}=this.opts,_=new t.CodeGen(this.scope,{es5:S,lines:k,ownProperties:w}),I;h.$async&&(I=_.scopeValue("Error",{ref:n.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let j=_.scopeName("validate");h.validateName=j;let U={gen:_,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:_.scopeValue("schema",this.opts.code.source===!0?{ref:h.schema,code:(0,t.stringify)(h.schema)}:{ref:h.schema}),validateName:j,ValidationError:I,schema:h.schema,schemaEnv:h,rootId:g,baseId:h.baseId||g,schemaPath:t.nil,errSchemaPath:h.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this},N;try{this._compilations.add(h),(0,a.validateFunctionCode)(U),_.optimize(this.opts.code.optimize);let F=_.toString();N=`${_.scopeRefs(i.default.scope)}return ${F}`,this.opts.code.process&&(N=this.opts.code.process(N,h));let ee=new Function(`${i.default.self}`,`${i.default.scope}`,N)(this,this.scope.get());if(this.scope.value(j,{ref:ee}),ee.errors=null,ee.schema=h.schema,ee.schemaEnv=h,h.$async&&(ee.$async=!0),this.opts.code.source===!0&&(ee.source={validateName:j,validateCode:F,scopeValues:_._values}),this.opts.unevaluated){let{props:ne,items:we}=U;ee.evaluated={props:ne instanceof t.Name?void 0:ne,items:we instanceof t.Name?void 0:we,dynamicProps:ne instanceof t.Name,dynamicItems:we instanceof t.Name},ee.source&&(ee.source.evaluated=(0,t.stringify)(ee.evaluated))}return h.validate=ee,h}catch(F){throw delete h.validate,delete h.validateName,N&&this.logger.error("Error compiling schema, function code:",N),F}finally{this._compilations.delete(h)}}e.compileSchema=c;function u(h,z,g){var S;g=(0,r.resolveUrl)(this.opts.uriResolver,z,g);let k=h.refs[g];if(k)return k;let w=b.call(this,h,g);if(w===void 0){let _=(S=h.localRefs)===null||S===void 0?void 0:S[g],{schemaId:I}=this.opts;_&&(w=new s({schema:_,schemaId:I,root:h,baseId:z}))}if(w!==void 0)return h.refs[g]=d.call(this,w)}e.resolveRef=u;function d(h){return(0,r.inlineRef)(h.schema,this.opts.inlineRefs)?h.schema:h.validate?h:c.call(this,h)}function p(h){for(let z of this._compilations)if(f(z,h))return z}e.getCompilingSchema=p;function f(h,z){return h.schema===z.schema&&h.root===z.root&&h.baseId===z.baseId}function b(h,z){let g;for(;typeof(g=this.refs[z])=="string";)z=g;return g||this.schemas[z]||v.call(this,h,z)}function v(h,z){let g=this.opts.uriResolver.parse(z),S=(0,r._getFullPath)(this.opts.uriResolver,g),k=(0,r.getFullPath)(this.opts.uriResolver,h.baseId,void 0);if(Object.keys(h.schema).length>0&&S===k)return y.call(this,g,h);let w=(0,r.normalizeId)(S),_=this.refs[w]||this.schemas[w];if(typeof _=="string"){let I=v.call(this,h,_);return typeof I?.schema!="object"?void 0:y.call(this,g,I)}if(typeof _?.schema=="object"){if(_.validate||c.call(this,_),w===(0,r.normalizeId)(z)){let{schema:I}=_,{schemaId:j}=this.opts,U=I[j];return U&&(k=(0,r.resolveUrl)(this.opts.uriResolver,k,U)),new s({schema:I,schemaId:j,root:h,baseId:k})}return y.call(this,g,_)}}e.resolveSchema=v;let $=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(h,{baseId:z,schema:g,root:S}){var k;if(((k=h.fragment)===null||k===void 0?void 0:k[0])!=="/")return;for(let I of h.fragment.slice(1).split("/")){if(typeof g=="boolean")return;let j=g[(0,o.unescapeFragment)(I)];if(j===void 0)return;g=j;let U=typeof g=="object"&&g[this.opts.schemaId];!$.has(I)&&U&&(z=(0,r.resolveUrl)(this.opts.uriResolver,z,U))}let w;if(typeof g!="boolean"&&g.$ref&&!(0,o.schemaHasRulesButRef)(g,this.RULES)){let I=(0,r.resolveUrl)(this.opts.uriResolver,z,g.$ref);w=v.call(this,S,I)}let{schemaId:_}=this.opts;if(w=w||new s({schema:g,schemaId:_,root:S,baseId:z}),w.schema!==w.root.schema)return w}})),xk=Z(((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:!1}})),kS=Z(((e,t)=>{let n=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),i=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(v){let $="",y=0,h=0;for(h=0;h<v.length;h++)if(y=v[h].charCodeAt(0),y!==48){if(!(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102))return"";$+=v[h];break}for(h+=1;h<v.length;h++){if(y=v[h].charCodeAt(0),!(y>=48&&y<=57||y>=65&&y<=70||y>=97&&y<=102))return"";$+=v[h]}return $}let o=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function a(v){return v.length=0,!0}function s(v,$,y){if(v.length){let h=r(v);if(h!=="")$.push(h);else return y.error=!0,!1;v.length=0}return!0}function c(v){let $=0,y={error:!1,address:"",zone:""},h=[],z=[],g=!1,S=!1,k=s;for(let w=0;w<v.length;w++){let _=v[w];if(!(_==="["||_==="]"))if(_===":"){if(g===!0&&(S=!0),!k(z,h,y))break;if(++$>7){y.error=!0;break}w>0&&v[w-1]===":"&&(g=!0),h.push(":");continue}else if(_==="%"){if(!k(z,h,y))break;k=a}else{z.push(_);continue}}return z.length&&(k===a?y.zone=z.join(""):S?h.push(z.join("")):h.push(r(z))),y.address=h.join(""),y}function u(v){if(d(v,":")<2)return{host:v,isIPV6:!1};let $=c(v);if($.error)return{host:v,isIPV6:!1};{let y=$.address,h=$.address;return $.zone&&(y+="%"+$.zone,h+="%25"+$.zone),{host:y,isIPV6:!0,escapedHost:h}}}function d(v,$){let y=0;for(let h=0;h<v.length;h++)v[h]===$&&y++;return y}function p(v){let $=v,y=[],h=-1,z=0;for(;z=$.length;){if(z===1){if($===".")break;if($==="/"){y.push("/");break}else{y.push($);break}}else if(z===2){if($[0]==="."){if($[1]===".")break;if($[1]==="/"){$=$.slice(2);continue}}else if($[0]==="/"&&($[1]==="."||$[1]==="/")){y.push("/");break}}else if(z===3&&$==="/.."){y.length!==0&&y.pop(),y.push("/");break}if($[0]==="."){if($[1]==="."){if($[2]==="/"){$=$.slice(3);continue}}else if($[1]==="/"){$=$.slice(2);continue}}else if($[0]==="/"&&$[1]==="."){if($[2]==="/"){$=$.slice(2);continue}else if($[2]==="."&&$[3]==="/"){$=$.slice(3),y.length!==0&&y.pop();continue}}if((h=$.indexOf("/",1))===-1){y.push($);break}else y.push($.slice(0,h)),$=$.slice(h)}return y.join("")}function f(v,$){let y=$!==!0?escape:unescape;return v.scheme!==void 0&&(v.scheme=y(v.scheme)),v.userinfo!==void 0&&(v.userinfo=y(v.userinfo)),v.host!==void 0&&(v.host=y(v.host)),v.path!==void 0&&(v.path=y(v.path)),v.query!==void 0&&(v.query=y(v.query)),v.fragment!==void 0&&(v.fragment=y(v.fragment)),v}function b(v){let $=[];if(v.userinfo!==void 0&&($.push(v.userinfo),$.push("@")),v.host!==void 0){let y=unescape(v.host);if(!i(y)){let h=u(y);h.isIPV6===!0?y=`[${h.escapedHost}]`:y=v.host}$.push(y)}return(typeof v.port=="number"||typeof v.port=="string")&&($.push(":"),$.push(String(v.port))),$.length?$.join(""):void 0}t.exports={nonSimpleDomain:o,recomposeAuthority:b,normalizeComponentEncoding:f,removeDotSegments:p,isIPv4:i,isUUID:n,normalizeIPv6:u,stringArrayToHexStripped:r}})),jk=Z(((e,t)=>{let{isUUID:n}=kS(),i=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function o(_){return r.indexOf(_)!==-1}function a(_){return _.secure===!0?!0:_.secure===!1?!1:_.scheme?_.scheme.length===3&&(_.scheme[0]==="w"||_.scheme[0]==="W")&&(_.scheme[1]==="s"||_.scheme[1]==="S")&&(_.scheme[2]==="s"||_.scheme[2]==="S"):!1}function s(_){return _.host||(_.error=_.error||"HTTP URIs must have a host."),_}function c(_){let I=String(_.scheme).toLowerCase()==="https";return(_.port===(I?443:80)||_.port==="")&&(_.port=void 0),_.path||(_.path="/"),_}function u(_){return _.secure=a(_),_.resourceName=(_.path||"/")+(_.query?"?"+_.query:""),_.path=void 0,_.query=void 0,_}function d(_){if((_.port===(a(_)?443:80)||_.port==="")&&(_.port=void 0),typeof _.secure=="boolean"&&(_.scheme=_.secure?"wss":"ws",_.secure=void 0),_.resourceName){let[I,j]=_.resourceName.split("?");_.path=I&&I!=="/"?I:void 0,_.query=j,_.resourceName=void 0}return _.fragment=void 0,_}function p(_,I){if(!_.path)return _.error="URN can not be parsed",_;let j=_.path.match(i);if(j){let U=I.scheme||_.scheme||"urn";_.nid=j[1].toLowerCase(),_.nss=j[2];let N=w(`${U}:${I.nid||_.nid}`);_.path=void 0,N&&(_=N.parse(_,I))}else _.error=_.error||"URN can not be parsed.";return _}function f(_,I){if(_.nid===void 0)throw new Error("URN without nid cannot be serialized");let j=I.scheme||_.scheme||"urn",U=_.nid.toLowerCase(),N=w(`${j}:${I.nid||U}`);N&&(_=N.serialize(_,I));let F=_,ee=_.nss;return F.path=`${U||I.nid}:${ee}`,I.skipEscape=!0,F}function b(_,I){let j=_;return j.uuid=j.nss,j.nss=void 0,!I.tolerant&&(!j.uuid||!n(j.uuid))&&(j.error=j.error||"UUID is not valid."),j}function v(_){let I=_;return I.nss=(_.uuid||"").toLowerCase(),I}let $={scheme:"http",domainHost:!0,parse:s,serialize:c},y={scheme:"https",domainHost:$.domainHost,parse:s,serialize:c},h={scheme:"ws",domainHost:!0,parse:u,serialize:d},z={scheme:"wss",domainHost:h.domainHost,parse:h.parse,serialize:h.serialize},k={http:$,https:y,ws:h,wss:z,urn:{scheme:"urn",parse:p,serialize:f,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:b,serialize:v,skipNormalize:!0}};Object.setPrototypeOf(k,null);function w(_){return _&&(k[_]||k[_.toLowerCase()])||void 0}t.exports={wsIsSecure:a,SCHEMES:k,isValidSchemeName:o,getSchemeHandler:w}})),Ak=Z(((e,t)=>{let{normalizeIPv6:n,removeDotSegments:i,recomposeAuthority:r,normalizeComponentEncoding:o,isIPv4:a,nonSimpleDomain:s}=kS(),{SCHEMES:c,getSchemeHandler:u}=jk();function d(z,g){return typeof z=="string"?z=v(y(z,g),g):typeof z=="object"&&(z=y(v(z,g),g)),z}function p(z,g,S){let k=S?Object.assign({scheme:"null"},S):{scheme:"null"},w=f(y(z,k),y(g,k),k,!0);return k.skipEscape=!0,v(w,k)}function f(z,g,S,k){let w={};return k||(z=y(v(z,S),S),g=y(v(g,S),S)),S=S||{},!S.tolerant&&g.scheme?(w.scheme=g.scheme,w.userinfo=g.userinfo,w.host=g.host,w.port=g.port,w.path=i(g.path||""),w.query=g.query):(g.userinfo!==void 0||g.host!==void 0||g.port!==void 0?(w.userinfo=g.userinfo,w.host=g.host,w.port=g.port,w.path=i(g.path||""),w.query=g.query):(g.path?(g.path[0]==="/"?w.path=i(g.path):((z.userinfo!==void 0||z.host!==void 0||z.port!==void 0)&&!z.path?w.path="/"+g.path:z.path?w.path=z.path.slice(0,z.path.lastIndexOf("/")+1)+g.path:w.path=g.path,w.path=i(w.path)),w.query=g.query):(w.path=z.path,g.query!==void 0?w.query=g.query:w.query=z.query),w.userinfo=z.userinfo,w.host=z.host,w.port=z.port),w.scheme=z.scheme),w.fragment=g.fragment,w}function b(z,g,S){return typeof z=="string"?(z=unescape(z),z=v(o(y(z,S),!0),{...S,skipEscape:!0})):typeof z=="object"&&(z=v(o(z,!0),{...S,skipEscape:!0})),typeof g=="string"?(g=unescape(g),g=v(o(y(g,S),!0),{...S,skipEscape:!0})):typeof g=="object"&&(g=v(o(g,!0),{...S,skipEscape:!0})),z.toLowerCase()===g.toLowerCase()}function v(z,g){let S={host:z.host,scheme:z.scheme,userinfo:z.userinfo,port:z.port,path:z.path,query:z.query,nid:z.nid,nss:z.nss,uuid:z.uuid,fragment:z.fragment,reference:z.reference,resourceName:z.resourceName,secure:z.secure,error:""},k=Object.assign({},g),w=[],_=u(k.scheme||S.scheme);_&&_.serialize&&_.serialize(S,k),S.path!==void 0&&(k.skipEscape?S.path=unescape(S.path):(S.path=escape(S.path),S.scheme!==void 0&&(S.path=S.path.split("%3A").join(":")))),k.reference!=="suffix"&&S.scheme&&w.push(S.scheme,":");let I=r(S);if(I!==void 0&&(k.reference!=="suffix"&&w.push("//"),w.push(I),S.path&&S.path[0]!=="/"&&w.push("/")),S.path!==void 0){let j=S.path;!k.absolutePath&&(!_||!_.absolutePath)&&(j=i(j)),I===void 0&&j[0]==="/"&&j[1]==="/"&&(j="/%2F"+j.slice(2)),w.push(j)}return S.query!==void 0&&w.push("?",S.query),S.fragment!==void 0&&w.push("#",S.fragment),w.join("")}let $=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function y(z,g){let S=Object.assign({},g),k={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},w=!1;S.reference==="suffix"&&(S.scheme?z=S.scheme+":"+z:z="//"+z);let _=z.match($);if(_){if(k.scheme=_[1],k.userinfo=_[3],k.host=_[4],k.port=parseInt(_[5],10),k.path=_[6]||"",k.query=_[7],k.fragment=_[8],isNaN(k.port)&&(k.port=_[5]),k.host)if(a(k.host)===!1){let j=n(k.host);k.host=j.host.toLowerCase(),w=j.isIPV6}else w=!0;k.scheme===void 0&&k.userinfo===void 0&&k.host===void 0&&k.port===void 0&&k.query===void 0&&!k.path?k.reference="same-document":k.scheme===void 0?k.reference="relative":k.fragment===void 0?k.reference="absolute":k.reference="uri",S.reference&&S.reference!=="suffix"&&S.reference!==k.reference&&(k.error=k.error||"URI is not a "+S.reference+" reference.");let I=u(S.scheme||k.scheme);if(!S.unicodeSupport&&(!I||!I.unicodeSupport)&&k.host&&(S.domainHost||I&&I.domainHost)&&w===!1&&s(k.host))try{k.host=URL.domainToASCII(k.host.toLowerCase())}catch(j){k.error=k.error||"Host's domain name can not be converted to ASCII: "+j}(!I||I&&!I.skipNormalize)&&(z.indexOf("%")!==-1&&(k.scheme!==void 0&&(k.scheme=unescape(k.scheme)),k.host!==void 0&&(k.host=unescape(k.host))),k.path&&(k.path=escape(unescape(k.path))),k.fragment&&(k.fragment=encodeURI(decodeURIComponent(k.fragment)))),I&&I.parse&&I.parse(k,S)}else k.error=k.error||"URI can not be parsed.";return k}let h={SCHEMES:c,normalize:d,resolve:p,resolveComponent:f,equal:b,serialize:v,parse:y};t.exports=h,t.exports.default=h,t.exports.fastUri=h})),Ok=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ak();t.code='require("ajv/dist/runtime/uri").default',e.default=t})),ov=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=gi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var n=_e();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});let i=ma(),r=vi(),o=zS(),a=Au(),s=_e(),c=ju(),u=Pu(),d=Te(),p=xk(),f=Ok(),b=(x,M)=>new RegExp(x,M);b.code="new RegExp";let v=["removeAdditional","useDefaults","coerceTypes"],$=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={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."},h={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},z=200;function g(x){var M,J,R,P,L,Y,ue,Se,fe,Oe,at,E,D,V,pe,he,be,Ve,Be,et,Ge,Le,St,Ke,Ft;let It=x.strict,Vt=(M=x.code)===null||M===void 0?void 0:M.optimize,tr=Vt===!0||Vt===void 0?1:Vt||0,rr=(R=(J=x.code)===null||J===void 0?void 0:J.regExp)!==null&&R!==void 0?R:b,Or=(P=x.uriResolver)!==null&&P!==void 0?P:f.default;return{strictSchema:(Y=(L=x.strictSchema)!==null&&L!==void 0?L:It)!==null&&Y!==void 0?Y:!0,strictNumbers:(Se=(ue=x.strictNumbers)!==null&&ue!==void 0?ue:It)!==null&&Se!==void 0?Se:!0,strictTypes:(Oe=(fe=x.strictTypes)!==null&&fe!==void 0?fe:It)!==null&&Oe!==void 0?Oe:"log",strictTuples:(E=(at=x.strictTuples)!==null&&at!==void 0?at:It)!==null&&E!==void 0?E:"log",strictRequired:(V=(D=x.strictRequired)!==null&&D!==void 0?D:It)!==null&&V!==void 0?V:!1,code:x.code?{...x.code,optimize:tr,regExp:rr}:{optimize:tr,regExp:rr},loopRequired:(pe=x.loopRequired)!==null&&pe!==void 0?pe:z,loopEnum:(he=x.loopEnum)!==null&&he!==void 0?he:z,meta:(be=x.meta)!==null&&be!==void 0?be:!0,messages:(Ve=x.messages)!==null&&Ve!==void 0?Ve:!0,inlineRefs:(Be=x.inlineRefs)!==null&&Be!==void 0?Be:!0,schemaId:(et=x.schemaId)!==null&&et!==void 0?et:"$id",addUsedSchema:(Ge=x.addUsedSchema)!==null&&Ge!==void 0?Ge:!0,validateSchema:(Le=x.validateSchema)!==null&&Le!==void 0?Le:!0,validateFormats:(St=x.validateFormats)!==null&&St!==void 0?St:!0,unicodeRegExp:(Ke=x.unicodeRegExp)!==null&&Ke!==void 0?Ke:!0,int32range:(Ft=x.int32range)!==null&&Ft!==void 0?Ft:!0,uriResolver:Or}}var S=class{constructor(x={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,x=this.opts={...x,...g(x)};let{es5:M,lines:J}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:$,es5:M,lines:J}),this.logger=F(x.logger);let R=x.validateFormats;x.validateFormats=!1,this.RULES=(0,o.getRules)(),k.call(this,y,x,"NOT SUPPORTED"),k.call(this,h,x,"DEPRECATED","warn"),this._metaOpts=U.call(this),x.formats&&I.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),x.keywords&&j.call(this,x.keywords),typeof x.meta=="object"&&this.addMetaSchema(x.meta),_.call(this),x.validateFormats=R}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:x,meta:M,schemaId:J}=this.opts,R=p;J==="id"&&(R={...p},R.id=R.$id,delete R.$id),M&&x&&this.addMetaSchema(R,R[J],!1)}defaultMeta(){let{meta:x,schemaId:M}=this.opts;return this.opts.defaultMeta=typeof x=="object"?x[M]||x:void 0}validate(x,M){let J;if(typeof x=="string"){if(J=this.getSchema(x),!J)throw new Error(`no schema with key or ref "${x}"`)}else J=this.compile(x);let R=J(M);return"$async"in J||(this.errors=J.errors),R}compile(x,M){let J=this._addSchema(x,M);return J.validate||this._compileSchemaEnv(J)}compileAsync(x,M){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:J}=this.opts;return R.call(this,x,M);async function R(fe,Oe){await P.call(this,fe.$schema);let at=this._addSchema(fe,Oe);return at.validate||L.call(this,at)}async function P(fe){fe&&!this.getSchema(fe)&&await R.call(this,{$ref:fe},!0)}async function L(fe){try{return this._compileSchemaEnv(fe)}catch(Oe){if(!(Oe instanceof r.default))throw Oe;return Y.call(this,Oe),await ue.call(this,Oe.missingSchema),L.call(this,fe)}}function Y({missingSchema:fe,missingRef:Oe}){if(this.refs[fe])throw new Error(`AnySchema ${fe} is loaded but ${Oe} cannot be resolved`)}async function ue(fe){let Oe=await Se.call(this,fe);this.refs[fe]||await P.call(this,Oe.$schema),this.refs[fe]||this.addSchema(Oe,fe,M)}async function Se(fe){let Oe=this._loading[fe];if(Oe)return Oe;try{return await(this._loading[fe]=J(fe))}finally{delete this._loading[fe]}}}addSchema(x,M,J,R=this.opts.validateSchema){if(Array.isArray(x)){for(let L of x)this.addSchema(L,void 0,J,R);return this}let P;if(typeof x=="object"){let{schemaId:L}=this.opts;if(P=x[L],P!==void 0&&typeof P!="string")throw new Error(`schema ${L} must be string`)}return M=(0,c.normalizeId)(M||P),this._checkUnique(M),this.schemas[M]=this._addSchema(x,J,M,R,!0),this}addMetaSchema(x,M,J=this.opts.validateSchema){return this.addSchema(x,M,!0,J),this}validateSchema(x,M){if(typeof x=="boolean")return!0;let J;if(J=x.$schema,J!==void 0&&typeof J!="string")throw new Error("$schema must be a string");if(J=J||this.opts.defaultMeta||this.defaultMeta(),!J)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let R=this.validate(J,x);if(!R&&M){let P="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(P);else throw new Error(P)}return R}getSchema(x){let M;for(;typeof(M=w.call(this,x))=="string";)x=M;if(M===void 0){let{schemaId:J}=this.opts,R=new a.SchemaEnv({schema:{},schemaId:J});if(M=a.resolveSchema.call(this,R,x),!M)return;this.refs[x]=M}return M.validate||this._compileSchemaEnv(M)}removeSchema(x){if(x instanceof RegExp)return this._removeAllSchemas(this.schemas,x),this._removeAllSchemas(this.refs,x),this;switch(typeof x){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let M=w.call(this,x);return typeof M=="object"&&this._cache.delete(M.schema),delete this.schemas[x],delete this.refs[x],this}case"object":{let M=x;this._cache.delete(M);let J=x[this.opts.schemaId];return J&&(J=(0,c.normalizeId)(J),delete this.schemas[J],delete this.refs[J]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(x){for(let M of x)this.addKeyword(M);return this}addKeyword(x,M){let J;if(typeof x=="string")J=x,typeof M=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),M.keyword=J);else if(typeof x=="object"&&M===void 0){if(M=x,J=M.keyword,Array.isArray(J)&&!J.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(ne.call(this,J,M),!M)return(0,d.eachItem)(J,P=>we.call(this,P)),this;Ae.call(this,M);let R={...M,type:(0,u.getJSONTypes)(M.type),schemaType:(0,u.getJSONTypes)(M.schemaType)};return(0,d.eachItem)(J,R.type.length===0?P=>we.call(this,P,R):P=>R.type.forEach(L=>we.call(this,P,R,L))),this}getKeyword(x){let M=this.RULES.all[x];return typeof M=="object"?M.definition:!!M}removeKeyword(x){let{RULES:M}=this;delete M.keywords[x],delete M.all[x];for(let J of M.rules){let R=J.rules.findIndex(P=>P.keyword===x);R>=0&&J.rules.splice(R,1)}return this}addFormat(x,M){return typeof M=="string"&&(M=new RegExp(M)),this.formats[x]=M,this}errorsText(x=this.errors,{separator:M=", ",dataVar:J="data"}={}){return!x||x.length===0?"No errors":x.map(R=>`${J}${R.instancePath} ${R.message}`).reduce((R,P)=>R+M+P)}$dataMetaSchema(x,M){let J=this.RULES.all;x=JSON.parse(JSON.stringify(x));for(let R of M){let P=R.split("/").slice(1),L=x;for(let Y of P)L=L[Y];for(let Y in J){let ue=J[Y];if(typeof ue!="object")continue;let{$data:Se}=ue.definition,fe=L[Y];Se&&fe&&(L[Y]=ke(fe))}}return x}_removeAllSchemas(x,M){for(let J in x){let R=x[J];(!M||M.test(J))&&(typeof R=="string"?delete x[J]:R&&!R.meta&&(this._cache.delete(R.schema),delete x[J]))}}_addSchema(x,M,J,R=this.opts.validateSchema,P=this.opts.addUsedSchema){let L,{schemaId:Y}=this.opts;if(typeof x=="object")L=x[Y];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof x!="boolean")throw new Error("schema must be object or boolean")}let ue=this._cache.get(x);if(ue!==void 0)return ue;J=(0,c.normalizeId)(L||J);let Se=c.getSchemaRefs.call(this,x,J);return ue=new a.SchemaEnv({schema:x,schemaId:Y,meta:M,baseId:J,localRefs:Se}),this._cache.set(ue.schema,ue),P&&!J.startsWith("#")&&(J&&this._checkUnique(J),this.refs[J]=ue),R&&this.validateSchema(x,!0),ue}_checkUnique(x){if(this.schemas[x]||this.refs[x])throw new Error(`schema with key or id "${x}" already exists`)}_compileSchemaEnv(x){if(x.meta?this._compileMetaSchema(x):a.compileSchema.call(this,x),!x.validate)throw new Error("ajv implementation error");return x.validate}_compileMetaSchema(x){let M=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,x)}finally{this.opts=M}}};S.ValidationError=i.default,S.MissingRefError=r.default,e.default=S;function k(x,M,J,R="error"){for(let P in x){let L=P;L in M&&this.logger[R](`${J}: option ${P}. ${x[L]}`)}}function w(x){return x=(0,c.normalizeId)(x),this.schemas[x]||this.refs[x]}function _(){let x=this.opts.schemas;if(x)if(Array.isArray(x))this.addSchema(x);else for(let M in x)this.addSchema(x[M],M)}function I(){for(let x in this.opts.formats){let M=this.opts.formats[x];M&&this.addFormat(x,M)}}function j(x){if(Array.isArray(x)){this.addVocabulary(x);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let M in x){let J=x[M];J.keyword||(J.keyword=M),this.addKeyword(J)}}function U(){let x={...this.opts};for(let M of v)delete x[M];return x}let N={log(){},warn(){},error(){}};function F(x){if(x===!1)return N;if(x===void 0)return console;if(x.log&&x.warn&&x.error)return x;throw new Error("logger must implement log, warn and error methods")}let ee=/^[a-z_$][a-z0-9_$:-]*$/i;function ne(x,M){let{RULES:J}=this;if((0,d.eachItem)(x,R=>{if(J.keywords[R])throw new Error(`Keyword ${R} is already defined`);if(!ee.test(R))throw new Error(`Keyword ${R} has invalid name`)}),!!M&&M.$data&&!("code"in M||"validate"in M))throw new Error('$data keyword must have "code" or "validate" function')}function we(x,M,J){var R;let P=M?.post;if(J&&P)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:L}=this,Y=P?L.post:L.rules.find(({type:Se})=>Se===J);if(Y||(Y={type:J,rules:[]},L.rules.push(Y)),L.keywords[x]=!0,!M)return;let ue={keyword:x,definition:{...M,type:(0,u.getJSONTypes)(M.type),schemaType:(0,u.getJSONTypes)(M.schemaType)}};M.before?Ne.call(this,Y,ue,M.before):Y.rules.push(ue),L.all[x]=ue,(R=M.implements)===null||R===void 0||R.forEach(Se=>this.addKeyword(Se))}function Ne(x,M,J){let R=x.rules.findIndex(P=>P.keyword===J);R>=0?x.rules.splice(R,0,M):(x.rules.push(M),this.logger.warn(`rule ${J} is not defined`))}function Ae(x){let{metaSchema:M}=x;M!==void 0&&(x.$data&&this.opts.$data&&(M=ke(M)),x.validateSchema=this.compile(M,!0))}let Je={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ke(x){return{anyOf:[x,Je]}}})),Ck=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};e.default=t})),av=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;let t=vi(),n=xt(),i=_e(),r=Pt(),o=Au(),a=Te(),s={keyword:"$ref",schemaType:"string",code(d){let{gen:p,schema:f,it:b}=d,{baseId:v,schemaEnv:$,validateName:y,opts:h,self:z}=b,{root:g}=$;if((f==="#"||f==="#/")&&v===g.baseId)return k();let S=o.resolveRef.call(z,g,v,f);if(S===void 0)throw new t.default(b.opts.uriResolver,v,f);if(S instanceof o.SchemaEnv)return w(S);return _(S);function k(){if($===g)return u(d,y,$,$.$async);let I=p.scopeValue("root",{ref:g});return u(d,(0,i._)`${I}.validate`,g,g.$async)}function w(I){u(d,c(d,I),I,I.$async)}function _(I){let j=p.scopeValue("schema",h.code.source===!0?{ref:I,code:(0,i.stringify)(I)}:{ref:I}),U=p.name("valid"),N=d.subschema({schema:I,dataTypes:[],schemaPath:i.nil,topSchemaRef:j,errSchemaPath:f},U);d.mergeEvaluated(N),d.ok(U)}}};function c(d,p){let{gen:f}=d;return p.validate?f.scopeValue("validate",{ref:p.validate}):(0,i._)`${f.scopeValue("wrapper",{ref:p})}.validate`}e.getValidate=c;function u(d,p,f,b){let{gen:v,it:$}=d,{allErrors:y,schemaEnv:h,opts:z}=$,g=z.passContext?r.default.this:i.nil;b?S():k();function S(){if(!h.$async)throw new Error("async schema referenced by sync schema");let I=v.let("valid");v.try(()=>{v.code((0,i._)`await ${(0,n.callValidateCode)(d,p,g)}`),_(p),y||v.assign(I,!0)},j=>{v.if((0,i._)`!(${j} instanceof ${$.ValidationError})`,()=>v.throw(j)),w(j),y||v.assign(I,!1)}),d.ok(I)}function k(){d.result((0,n.callValidateCode)(d,p,g),()=>_(p),()=>w(p))}function w(I){let j=(0,i._)`${I}.errors`;v.assign(r.default.vErrors,(0,i._)`${r.default.vErrors} === null ? ${j} : ${r.default.vErrors}.concat(${j})`),v.assign(r.default.errors,(0,i._)`${r.default.vErrors}.length`)}function _(I){var j;if(!$.opts.unevaluated)return;let U=(j=f?.validate)===null||j===void 0?void 0:j.evaluated;if($.props!==!0)if(U&&!U.dynamicProps)U.props!==void 0&&($.props=a.mergeEvaluated.props(v,U.props,$.props));else{let N=v.var("props",(0,i._)`${I}.evaluated.props`);$.props=a.mergeEvaluated.props(v,N,$.props,i.Name)}if($.items!==!0)if(U&&!U.dynamicItems)U.items!==void 0&&($.items=a.mergeEvaluated.items(v,U.items,$.items));else{let N=v.var("items",(0,i._)`${I}.evaluated.items`);$.items=a.mergeEvaluated.items(v,N,$.items,i.Name)}}}e.callRef=u,e.default=s})),TS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ck(),n=av(),i=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,n.default];e.default=i})),Nk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=t.operators,i={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(i),type:"number",schemaType:"number",$data:!0,error:{message:({keyword:o,schemaCode:a})=>(0,t.str)`must be ${i[o].okStr} ${a}`,params:({keyword:o,schemaCode:a})=>(0,t._)`{comparison: ${i[o].okStr}, limit: ${a}}`},code(o){let{keyword:a,data:s,schemaCode:c}=o;o.fail$data((0,t._)`${s} ${i[a].fail} ${c} || isNaN(${s})`)}};e.default=r})),Lk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:i})=>(0,t.str)`must be multiple of ${i}`,params:({schemaCode:i})=>(0,t._)`{multipleOf: ${i}}`},code(i){let{gen:r,data:o,schemaCode:a,it:s}=i,c=s.opts.multipleOfPrecision,u=r.let("res"),d=c?(0,t._)`Math.abs(Math.round(${u}) - ${u}) > 1e-${c}`:(0,t._)`${u} !== parseInt(${u})`;i.fail$data((0,t._)`(${a} === 0 || (${u} = ${o}/${a}, ${d}))`)}};e.default=n})),qk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(n){let i=n.length,r=0,o=0,a;for(;o<i;)r++,a=n.charCodeAt(o++),a>=55296&&a<=56319&&o<i&&(a=n.charCodeAt(o),(a&64512)===56320&&o++);return r}e.default=t,t.code='require("ajv/dist/runtime/ucs2length").default'})),Mk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=Te(),i=qk(),r={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:a}){let s=o==="maxLength"?"more":"fewer";return(0,t.str)`must NOT have ${s} than ${a} characters`},params:({schemaCode:o})=>(0,t._)`{limit: ${o}}`},code(o){let{keyword:a,data:s,schemaCode:c,it:u}=o,d=a==="maxLength"?t.operators.GT:t.operators.LT,p=u.opts.unicode===!1?(0,t._)`${s}.length`:(0,t._)`${(0,n.useFunc)(o.gen,i.default)}(${s})`;o.fail$data((0,t._)`${p} ${d} ${c}`)}};e.default=r})),Dk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xt(),n=Te(),i=_e(),r={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:o})=>(0,i.str)`must match pattern "${o}"`,params:({schemaCode:o})=>(0,i._)`{pattern: ${o}}`},code(o){let{gen:a,data:s,$data:c,schema:u,schemaCode:d,it:p}=o,f=p.opts.unicodeRegExp?"u":"";if(c){let{regExp:b}=p.opts.code,v=b.code==="new RegExp"?(0,i._)`new RegExp`:(0,n.useFunc)(a,b),$=a.let("valid");a.try(()=>a.assign($,(0,i._)`${v}(${d}, ${f}).test(${s})`),()=>a.assign($,!1)),o.fail$data((0,i._)`!${$}`)}else{let b=(0,t.usePattern)(o,u);o.fail$data((0,i._)`!${b}.test(${s})`)}}};e.default=r})),Uk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:r}){let o=i==="maxProperties"?"more":"fewer";return(0,t.str)`must NOT have ${o} than ${r} properties`},params:({schemaCode:i})=>(0,t._)`{limit: ${i}}`},code(i){let{keyword:r,data:o,schemaCode:a}=i,s=r==="maxProperties"?t.operators.GT:t.operators.LT;i.fail$data((0,t._)`Object.keys(${o}).length ${s} ${a}`)}};e.default=n})),Fk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xt(),n=_e(),i=Te(),r={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,n.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,n._)`{missingProperty: ${o}}`},code(o){let{gen:a,schema:s,schemaCode:c,data:u,$data:d,it:p}=o,{opts:f}=p;if(!d&&s.length===0)return;let b=s.length>=f.loopRequired;if(p.allErrors?v():$(),f.strictRequired){let z=o.parentSchema.properties,{definedProperties:g}=o.it;for(let S of s)if(z?.[S]===void 0&&!g.has(S)){let k=`required property "${S}" is not defined at "${p.schemaEnv.baseId+p.errSchemaPath}" (strictRequired)`;(0,i.checkStrictMode)(p,k,p.opts.strictRequired)}}function v(){if(b||d)o.block$data(n.nil,y);else for(let z of s)(0,t.checkReportMissingProp)(o,z)}function $(){let z=a.let("missing");if(b||d){let g=a.let("valid",!0);o.block$data(g,()=>h(z,g)),o.ok(g)}else a.if((0,t.checkMissingProp)(o,s,z)),(0,t.reportMissingProp)(o,z),a.else()}function y(){a.forOf("prop",c,z=>{o.setParams({missingProperty:z}),a.if((0,t.noPropertyInData)(a,u,z,f.ownProperties),()=>o.error())})}function h(z,g){o.setParams({missingProperty:z}),a.forOf(z,c,()=>{a.assign(g,(0,t.propertyInData)(a,u,z,f.ownProperties)),a.if((0,n.not)(g),()=>{o.error(),a.break()})},n.nil)}}};e.default=r})),Vk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:r}){let o=i==="maxItems"?"more":"fewer";return(0,t.str)`must NOT have ${o} than ${r} items`},params:({schemaCode:i})=>(0,t._)`{limit: ${i}}`},code(i){let{keyword:r,data:o,schemaCode:a}=i,s=r==="maxItems"?t.operators.GT:t.operators.LT;i.fail$data((0,t._)`${o}.length ${s} ${a}`)}};e.default=n})),sv=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=RS();t.code='require("ajv/dist/runtime/equal").default',e.default=t})),Zk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Pu(),n=_e(),i=Te(),r=sv(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:a,j:s}})=>(0,n.str)`must NOT have duplicate items (items ## ${s} and ${a} are identical)`,params:({params:{i:a,j:s}})=>(0,n._)`{i: ${a}, j: ${s}}`},code(a){let{gen:s,data:c,$data:u,schema:d,parentSchema:p,schemaCode:f,it:b}=a;if(!u&&!d)return;let v=s.let("valid"),$=p.items?(0,t.getSchemaTypes)(p.items):[];a.block$data(v,y,(0,n._)`${f} === false`),a.ok(v);function y(){let S=s.let("i",(0,n._)`${c}.length`),k=s.let("j");a.setParams({i:S,j:k}),s.assign(v,!0),s.if((0,n._)`${S} > 1`,()=>(h()?z:g)(S,k))}function h(){return $.length>0&&!$.some(S=>S==="object"||S==="array")}function z(S,k){let w=s.name("item"),_=(0,t.checkDataTypes)($,w,b.opts.strictNumbers,t.DataType.Wrong),I=s.const("indices",(0,n._)`{}`);s.for((0,n._)`;${S}--;`,()=>{s.let(w,(0,n._)`${c}[${S}]`),s.if(_,(0,n._)`continue`),$.length>1&&s.if((0,n._)`typeof ${w} == "string"`,(0,n._)`${w} += "_"`),s.if((0,n._)`typeof ${I}[${w}] == "number"`,()=>{s.assign(k,(0,n._)`${I}[${w}]`),a.error(),s.assign(v,!1).break()}).code((0,n._)`${I}[${w}] = ${S}`)})}function g(S,k){let w=(0,i.useFunc)(s,r.default),_=s.name("outer");s.label(_).for((0,n._)`;${S}--;`,()=>s.for((0,n._)`${k} = ${S}; ${k}--;`,()=>s.if((0,n._)`${w}(${c}[${S}], ${c}[${k}])`,()=>{a.error(),s.assign(v,!1).break(_)})))}}};e.default=o})),Hk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=Te(),i=sv(),r={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,t._)`{allowedValue: ${o}}`},code(o){let{gen:a,data:s,$data:c,schemaCode:u,schema:d}=o;c||d&&typeof d=="object"?o.fail$data((0,t._)`!${(0,n.useFunc)(a,i.default)}(${s}, ${u})`):o.fail((0,t._)`${d} !== ${s}`)}};e.default=r})),Jk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=Te(),i=sv(),r={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,t._)`{allowedValues: ${o}}`},code(o){let{gen:a,data:s,$data:c,schema:u,schemaCode:d,it:p}=o;if(!c&&u.length===0)throw new Error("enum must have non-empty array");let f=u.length>=p.opts.loopEnum,b,v=()=>b??(b=(0,n.useFunc)(a,i.default)),$;if(f||c)$=a.let("valid"),o.block$data($,y);else{if(!Array.isArray(u))throw new Error("ajv implementation error");let z=a.const("vSchema",d);$=(0,t.or)(...u.map((g,S)=>h(z,S)))}o.pass($);function y(){a.assign($,!1),a.forOf("v",d,z=>a.if((0,t._)`${v()}(${s}, ${z})`,()=>a.assign($,!0).break()))}function h(z,g){let S=u[g];return typeof S=="object"&&S!==null?(0,t._)`${v()}(${s}, ${z}[${g}])`:(0,t._)`${s} === ${S}`}}};e.default=r})),ES=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Nk(),n=Lk(),i=Mk(),r=Dk(),o=Uk(),a=Fk(),s=Vk(),c=Zk(),u=Hk(),d=Jk(),p=[t.default,n.default,i.default,r.default,o.default,a.default,s.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,d.default];e.default=p})),PS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;let t=_e(),n=Te(),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,t.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,t._)`{limit: ${o}}`},code(o){let{parentSchema:a,it:s}=o,{items:c}=a;if(!Array.isArray(c)){(0,n.checkStrictMode)(s,'"additionalItems" is ignored when "items" is not an array of schemas');return}r(o,c)}};function r(o,a){let{gen:s,schema:c,data:u,keyword:d,it:p}=o;p.items=!0;let f=s.const("len",(0,t._)`${u}.length`);if(c===!1)o.setParams({len:a.length}),o.pass((0,t._)`${f} <= ${a.length}`);else if(typeof c=="object"&&!(0,n.alwaysValidSchema)(p,c)){let v=s.var("valid",(0,t._)`${f} <= ${a.length}`);s.if((0,t.not)(v),()=>b(v)),o.ok(v)}function b(v){s.forRange("i",a.length,f,$=>{o.subschema({keyword:d,dataProp:$,dataPropType:n.Type.Num},v),p.allErrors||s.if((0,t.not)(v),()=>s.break())})}}e.validateAdditionalItems=r,e.default=i})),xS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;let t=_e(),n=Te(),i=xt(),r={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(a){let{schema:s,it:c}=a;if(Array.isArray(s))return o(a,"additionalItems",s);c.items=!0,!(0,n.alwaysValidSchema)(c,s)&&a.ok((0,i.validateArray)(a))}};function o(a,s,c=a.schema){let{gen:u,parentSchema:d,data:p,keyword:f,it:b}=a;y(d),b.opts.unevaluated&&c.length&&b.items!==!0&&(b.items=n.mergeEvaluated.items(u,c.length,b.items));let v=u.name("valid"),$=u.const("len",(0,t._)`${p}.length`);c.forEach((h,z)=>{(0,n.alwaysValidSchema)(b,h)||(u.if((0,t._)`${$} > ${z}`,()=>a.subschema({keyword:f,schemaProp:z,dataProp:z},v)),a.ok(v))});function y(h){let{opts:z,errSchemaPath:g}=b,S=c.length,k=S===h.minItems&&(S===h.maxItems||h[s]===!1);if(z.strictTuples&&!k){let w=`"${f}" is ${S}-tuple, but minItems or maxItems/${s} are not specified or different at path "${g}"`;(0,n.checkStrictMode)(b,w,z.strictTuples)}}}e.validateTuple=o,e.default=r})),Gk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xS(),n={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:i=>(0,t.validateTuple)(i,"items")};e.default=n})),Bk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=Te(),i=xt(),r=PS(),o={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,t.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,t._)`{limit: ${a}}`},code(a){let{schema:s,parentSchema:c,it:u}=a,{prefixItems:d}=c;u.items=!0,!(0,n.alwaysValidSchema)(u,s)&&(d?(0,r.validateAdditionalItems)(a,d):a.ok((0,i.validateArray)(a)))}};e.default=o})),Kk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=Te(),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:r,max:o}})=>o===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 ${o} valid item(s)`,params:({params:{min:r,max:o}})=>o===void 0?(0,t._)`{minContains: ${r}}`:(0,t._)`{minContains: ${r}, maxContains: ${o}}`},code(r){let{gen:o,schema:a,parentSchema:s,data:c,it:u}=r,d,p,{minContains:f,maxContains:b}=s;u.opts.next?(d=f===void 0?1:f,p=b):d=1;let v=o.const("len",(0,t._)`${c}.length`);if(r.setParams({min:d,max:p}),p===void 0&&d===0){(0,n.checkStrictMode)(u,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(p!==void 0&&d>p){(0,n.checkStrictMode)(u,'"minContains" > "maxContains" is always invalid'),r.fail();return}if((0,n.alwaysValidSchema)(u,a)){let g=(0,t._)`${v} >= ${d}`;p!==void 0&&(g=(0,t._)`${g} && ${v} <= ${p}`),r.pass(g);return}u.items=!0;let $=o.name("valid");p===void 0&&d===1?h($,()=>o.if($,()=>o.break())):d===0?(o.let($,!0),p!==void 0&&o.if((0,t._)`${c}.length > 0`,y)):(o.let($,!1),y()),r.result($,()=>r.reset());function y(){let g=o.name("_valid"),S=o.let("count",0);h(g,()=>o.if(g,()=>z(S)))}function h(g,S){o.forRange("i",0,v,k=>{r.subschema({keyword:"contains",dataProp:k,dataPropType:n.Type.Num,compositeRule:!0},g),S()})}function z(g){o.code((0,t._)`${g}++`),p===void 0?o.if((0,t._)`${g} >= ${d}`,()=>o.assign($,!0).break()):(o.if((0,t._)`${g} > ${p}`,()=>o.assign($,!1).break()),d===1?o.assign($,!0):o.if((0,t._)`${g} >= ${d}`,()=>o.assign($,!0)))}}};e.default=i})),cv=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;let t=_e(),n=Te(),i=xt();e.error={message:({params:{property:c,depsCount:u,deps:d}})=>{let p=u===1?"property":"properties";return(0,t.str)`must have ${p} ${d} when property ${c} is present`},params:({params:{property:c,depsCount:u,deps:d,missingProperty:p}})=>(0,t._)`{property: ${c},
|
|
73
73
|
missingProperty: ${p},
|
|
74
74
|
depsCount: ${u},
|
|
75
|
-
deps: ${d}}`};let r={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(l){let[u,d]=o(l);a(l,u),s(l,d)}};function o({schema:l}){let u={},d={};for(let p in l){if(p==="__proto__")continue;let f=Array.isArray(l[p])?u:d;f[p]=l[p]}return[u,d]}function a(l,u=l.schema){let{gen:d,data:p,it:f}=l;if(Object.keys(u).length===0)return;let b=d.let("missing");for(let v in u){let $=u[v];if($.length===0)continue;let y=(0,i.propertyInData)(d,p,v,f.opts.ownProperties);l.setParams({property:v,depsCount:$.length,deps:$.join(", ")}),f.allErrors?d.if(y,()=>{for(let h of $)(0,i.checkReportMissingProp)(l,h)}):(d.if((0,t._)`${y} && (${(0,i.checkMissingProp)(l,$,b)})`),(0,i.reportMissingProp)(l,b),d.else())}}e.validatePropertyDeps=a;function s(l,u=l.schema){let{gen:d,data:p,keyword:f,it:b}=l,v=d.name("valid");for(let $ in u)(0,n.alwaysValidSchema)(b,u[$])||(d.if((0,i.propertyInData)(d,p,$,b.opts.ownProperties),()=>{let y=l.subschema({keyword:f,schemaProp:$},v);l.mergeValidEvaluated(y,v)},()=>d.var(v,!0)),l.ok(v))}e.validateSchemaDeps=s,e.default=r})),Ok=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ye(),n=Te(),i={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:o,schema:a,data:s,it:l}=r;if((0,n.alwaysValidSchema)(l,a))return;let u=o.name("valid");o.forIn("key",s,d=>{r.setParams({propertyName:d}),r.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},u),o.if((0,t.not)(u),()=>{r.error(!0),l.allErrors||o.break()})}),r.ok(u)}};e.default=i})),SS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Pt(),n=ye(),i=Et(),r=Te(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:a})=>(0,n._)`{additionalProperty: ${a.additionalProperty}}`},code(a){let{gen:s,schema:l,parentSchema:u,data:d,errsCount:p,it:f}=a;if(!p)throw new Error("ajv implementation error");let{allErrors:b,opts:v}=f;if(f.props=!0,v.removeAdditional!=="all"&&(0,r.alwaysValidSchema)(f,l))return;let $=(0,t.allSchemaProperties)(u.properties),y=(0,t.allSchemaProperties)(u.patternProperties);h(),a.ok((0,n._)`${p} === ${i.default.errors}`);function h(){s.forIn("key",d,w=>{!$.length&&!y.length?S(w):s.if(z(w),()=>S(w))})}function z(w){let _;if($.length>8){let I=(0,r.schemaRefOrVal)(f,u.properties,"properties");_=(0,t.isOwnProperty)(s,I,w)}else $.length?_=(0,n.or)(...$.map(I=>(0,n._)`${w} === ${I}`)):_=n.nil;return y.length&&(_=(0,n.or)(_,...y.map(I=>(0,n._)`${(0,t.usePattern)(a,I)}.test(${w})`))),(0,n.not)(_)}function g(w){s.code((0,n._)`delete ${d}[${w}]`)}function S(w){if(v.removeAdditional==="all"||v.removeAdditional&&l===!1){g(w);return}if(l===!1){a.setParams({additionalProperty:w}),a.error(),b||s.break();return}if(typeof l=="object"&&!(0,r.alwaysValidSchema)(f,l)){let _=s.name("valid");v.removeAdditional==="failing"?(k(w,_,!1),s.if((0,n.not)(_),()=>{a.reset(),g(w)})):(k(w,_),b||s.if((0,n.not)(_),()=>s.break()))}}function k(w,_,I){let j={keyword:"additionalProperties",dataProp:w,dataPropType:r.Type.Str};I===!1&&Object.assign(j,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(j,_)}}};e.default=o})),Nk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=hi(),n=Pt(),i=Te(),r=SS(),o={keyword:"properties",type:"object",schemaType:"object",code(a){let{gen:s,schema:l,parentSchema:u,data:d,it:p}=a;p.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&r.default.code(new t.KeywordCxt(p,r.default,"additionalProperties"));let f=(0,n.allSchemaProperties)(l);for(let h of f)p.definedProperties.add(h);p.opts.unevaluated&&f.length&&p.props!==!0&&(p.props=i.mergeEvaluated.props(s,(0,i.toHash)(f),p.props));let b=f.filter(h=>!(0,i.alwaysValidSchema)(p,l[h]));if(b.length===0)return;let v=s.name("valid");for(let h of b)$(h)?y(h):(s.if((0,n.propertyInData)(s,d,h,p.opts.ownProperties)),y(h),p.allErrors||s.else().var(v,!0),s.endIf()),a.it.definedProperties.add(h),a.ok(v);function $(h){return p.opts.useDefaults&&!p.compositeRule&&l[h].default!==void 0}function y(h){a.subschema({keyword:"properties",schemaProp:h,dataProp:h},v)}}};e.default=o})),Ck=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Pt(),n=ye(),i=Te(),r=Te(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(a){let{gen:s,schema:l,data:u,parentSchema:d,it:p}=a,{opts:f}=p,b=(0,t.allSchemaProperties)(l),v=b.filter(k=>(0,i.alwaysValidSchema)(p,l[k]));if(b.length===0||v.length===b.length&&(!p.opts.unevaluated||p.props===!0))return;let $=f.strictSchema&&!f.allowMatchingProperties&&d.properties,y=s.name("valid");p.props!==!0&&!(p.props instanceof n.Name)&&(p.props=(0,r.evaluatedPropsToName)(s,p.props));let{props:h}=p;z();function z(){for(let k of b)$&&g(k),p.allErrors?S(k):(s.var(y,!0),S(k),s.if(y))}function g(k){for(let w in $)new RegExp(k).test(w)&&(0,i.checkStrictMode)(p,`property ${w} matches pattern ${k} (use allowMatchingProperties)`)}function S(k){s.forIn("key",u,w=>{s.if((0,n._)`${(0,t.usePattern)(a,k)}.test(${w})`,()=>{let _=v.includes(k);_||a.subschema({keyword:"patternProperties",schemaProp:k,dataProp:w,dataPropType:r.Type.Str},y),p.opts.unevaluated&&h!==!0?s.assign((0,n._)`${h}[${w}]`,!0):!_&&!p.allErrors&&s.if((0,n.not)(y),()=>s.break())})})}}};e.default=o})),Lk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Te(),n={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(i){let{gen:r,schema:o,it:a}=i;if((0,t.alwaysValidSchema)(a,o)){i.fail();return}let s=r.name("valid");i.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),i.failResult(s,()=>i.reset(),()=>i.error())},error:{message:"must NOT be valid"}};e.default=n})),qk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Pt().validateUnion,error:{message:"must match a schema in anyOf"}};e.default=t})),Mk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ye(),n=Te(),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:r})=>(0,t._)`{passingSchemas: ${r.passing}}`},code(r){let{gen:o,schema:a,parentSchema:s,it:l}=r;if(!Array.isArray(a))throw new Error("ajv implementation error");if(l.opts.discriminator&&s.discriminator)return;let u=a,d=o.let("valid",!1),p=o.let("passing",null),f=o.name("_valid");r.setParams({passing:p}),o.block(b),r.result(d,()=>r.reset(),()=>r.error(!0));function b(){u.forEach((v,$)=>{let y;(0,n.alwaysValidSchema)(l,v)?o.var(f,!0):y=r.subschema({keyword:"oneOf",schemaProp:$,compositeRule:!0},f),$>0&&o.if((0,t._)`${f} && ${d}`).assign(d,!1).assign(p,(0,t._)`[${p}, ${$}]`).else(),o.if(f,()=>{o.assign(d,!0),o.assign(p,$),y&&r.mergeEvaluated(y,t.Name)})})}}};e.default=i})),Dk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Te(),n={keyword:"allOf",schemaType:"array",code(i){let{gen:r,schema:o,it:a}=i;if(!Array.isArray(o))throw new Error("ajv implementation error");let s=r.name("valid");o.forEach((l,u)=>{if((0,t.alwaysValidSchema)(a,l))return;let d=i.subschema({keyword:"allOf",schemaProp:u},s);i.ok(s),i.mergeEvaluated(d)})}};e.default=n})),Uk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ye(),n=Te(),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,t.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,t._)`{failingKeyword: ${o.ifClause}}`},code(o){let{gen:a,parentSchema:s,it:l}=o;s.then===void 0&&s.else===void 0&&(0,n.checkStrictMode)(l,'"if" without "then" and "else" is ignored');let u=r(l,"then"),d=r(l,"else");if(!u&&!d)return;let p=a.let("valid",!0),f=a.name("_valid");if(b(),o.reset(),u&&d){let $=a.let("ifClause");o.setParams({ifClause:$}),a.if(f,v("then",$),v("else",$))}else u?a.if(f,v("then")):a.if((0,t.not)(f),v("else"));o.pass(p,()=>o.error(!0));function b(){let $=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},f);o.mergeEvaluated($)}function v($,y){return()=>{let h=o.subschema({keyword:$},f);a.assign(p,f),o.mergeValidEvaluated(h,p),y?a.assign(y,(0,t._)`${$}`):o.setParams({ifClause:$})}}}};function r(o,a){let s=o.schema[a];return s!==void 0&&!(0,n.alwaysValidSchema)(o,s)}e.default=i})),Fk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Te(),n={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:i,parentSchema:r,it:o}){r.if===void 0&&(0,t.checkStrictMode)(o,`"${i}" without "if" is ignored`)}};e.default=n})),$S=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_S(),n=xk(),i=bS(),r=jk(),o=Ak(),a=Qg(),s=Ok(),l=SS(),u=Nk(),d=Ck(),p=Lk(),f=qk(),b=Mk(),v=Dk(),$=Uk(),y=Fk();function h(z=!1){let g=[p.default,f.default,b.default,v.default,$.default,y.default,s.default,l.default,a.default,u.default,d.default];return z?g.push(n.default,r.default):g.push(t.default,i.default),g.push(o.default),g}e.default=h})),Vk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ye(),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,t.str)`must match format "${i}"`,params:({schemaCode:i})=>(0,t._)`{format: ${i}}`},code(i,r){let{gen:o,data:a,$data:s,schema:l,schemaCode:u,it:d}=i,{opts:p,errSchemaPath:f,schemaEnv:b,self:v}=d;if(!p.validateFormats)return;s?$():y();function $(){let h=o.scopeValue("formats",{ref:v.formats,code:p.code.formats}),z=o.const("fDef",(0,t._)`${h}[${u}]`),g=o.let("fType"),S=o.let("format");o.if((0,t._)`typeof ${z} == "object" && !(${z} instanceof RegExp)`,()=>o.assign(g,(0,t._)`${z}.type || "string"`).assign(S,(0,t._)`${z}.validate`),()=>o.assign(g,(0,t._)`"string"`).assign(S,z)),i.fail$data((0,t.or)(k(),w()));function k(){return p.strictSchema===!1?t.nil:(0,t._)`${u} && !${S}`}function w(){let _=b.$async?(0,t._)`(${z}.async ? await ${S}(${a}) : ${S}(${a}))`:(0,t._)`${S}(${a})`,I=(0,t._)`(typeof ${S} == "function" ? ${_} : ${S}.test(${a}))`;return(0,t._)`${S} && ${S} !== true && ${g} === ${r} && !${I}`}}function y(){let h=v.formats[l];if(!h){k();return}if(h===!0)return;let[z,g,S]=w(h);z===r&&i.pass(_());function k(){if(p.strictSchema===!1){v.logger.warn(I());return}throw new Error(I());function I(){return`unknown format "${l}" ignored in schema at path "${f}"`}}function w(I){let j=I instanceof RegExp?(0,t.regexpCode)(I):p.code.formats?(0,t._)`${p.code.formats}${(0,t.getProperty)(l)}`:void 0,U=o.scopeValue("formats",{key:l,ref:I,code:j});return typeof I=="object"&&!(I instanceof RegExp)?[I.type||"string",I.validate,(0,t._)`${U}.validate`]:["string",I,U]}function _(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!b.$async)throw new Error("async format in sync schema");return(0,t._)`await ${S}(${a})`}return typeof g=="function"?(0,t._)`${S}(${a})`:(0,t._)`${S}.test(${a})`}}}};e.default=n})),wS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=[Vk().default];e.default=t})),zS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],e.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]})),IS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=vS(),n=yS(),i=$S(),r=wS(),o=zS(),a=[t.default,n.default,(0,i.default)(),r.default,o.metadataVocabulary,o.contentVocabulary];e.default=a})),Zk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0;var t;(function(n){n.Tag="tag",n.Mapping="mapping"})(t||(e.DiscrError=t={}))})),ev=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ye(),n=Zk(),i=Tu(),r=fi(),o=Te(),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:s,tagName:l}})=>s===n.DiscrError.Tag?`tag "${l}" must be string`:`value of tag "${l}" must be in oneOf`,params:({params:{discrError:s,tag:l,tagName:u}})=>(0,t._)`{error: ${s}, tag: ${u}, tagValue: ${l}}`},code(s){let{gen:l,data:u,schema:d,parentSchema:p,it:f}=s,{oneOf:b}=p;if(!f.opts.discriminator)throw new Error("discriminator: requires discriminator option");let v=d.propertyName;if(typeof v!="string")throw new Error("discriminator: requires propertyName");if(d.mapping)throw new Error("discriminator: mapping is not supported");if(!b)throw new Error("discriminator: requires oneOf keyword");let $=l.let("valid",!1),y=l.const("tag",(0,t._)`${u}${(0,t.getProperty)(v)}`);l.if((0,t._)`typeof ${y} == "string"`,()=>h(),()=>s.error(!1,{discrError:n.DiscrError.Tag,tag:y,tagName:v})),s.ok($);function h(){let S=g();l.if(!1);for(let k in S)l.elseIf((0,t._)`${y} === ${k}`),l.assign($,z(S[k]));l.else(),s.error(!1,{discrError:n.DiscrError.Mapping,tag:y,tagName:v}),l.endIf()}function z(S){let k=l.name("valid"),w=s.subschema({keyword:"oneOf",schemaProp:S},k);return s.mergeEvaluated(w,t.Name),k}function g(){var S;let k={},w=I(p),_=!0;for(let C=0;C<b.length;C++){let F=b[C];if(F?.$ref&&!(0,o.schemaHasRulesButRef)(F,f.self.RULES)){let ne=F.$ref;if(F=i.resolveRef.call(f.self,f.schemaEnv.root,f.baseId,ne),F instanceof i.SchemaEnv&&(F=F.schema),F===void 0)throw new r.default(f.opts.uriResolver,f.baseId,ne)}let ee=(S=F?.properties)===null||S===void 0?void 0:S[v];if(typeof ee!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${v}"`);_=_&&(w||I(F)),j(ee,C)}if(!_)throw new Error(`discriminator: "${v}" must be required`);return k;function I({required:C}){return Array.isArray(C)&&C.includes(v)}function j(C,F){if(C.const)U(C.const,F);else if(C.enum)for(let ee of C.enum)U(ee,F);else throw new Error(`discriminator: "properties/${v}" must have "const" or "enum"`)}function U(C,F){if(typeof C!="string"||C in k)throw new Error(`discriminator: "${v}" values must be unique strings`);k[C]=F}}}};e.default=a})),Hk=Z(((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:!0,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:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},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:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},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:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},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:!0}})),RS=Z(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;let n=Wg(),i=IS(),r=ev(),o=Hk(),a=["/properties"],s="http://json-schema.org/draft-07/schema";var l=class extends n.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(r.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let b=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(b,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=l,t.exports=e=l,t.exports.Ajv=l,Object.defineProperty(e,"__esModule",{value:!0}),e.default=l;var u=hi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var d=ye();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var p=la();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return p.default}});var f=fi();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return f.default}})})),kS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicAnchor=void 0;let t=ye(),n=Et(),i=Tu(),r=Yg(),o={keyword:"$dynamicAnchor",schemaType:"string",code:l=>a(l,l.schema)};function a(l,u){let{gen:d,it:p}=l;p.schemaEnv.root.dynamicAnchors[u]=!0;let f=(0,t._)`${n.default.dynamicAnchors}${(0,t.getProperty)(u)}`,b=p.errSchemaPath==="#"?p.validateName:s(l);d.if((0,t._)`!${f}`,()=>d.assign(f,b))}e.dynamicAnchor=a;function s(l){let{schemaEnv:u,schema:d,self:p}=l.it,{root:f,baseId:b,localRefs:v,meta:$}=u.root,{schemaId:y}=p.opts,h=new i.SchemaEnv({schema:d,schemaId:y,root:f,baseId:b,localRefs:v,meta:$});return i.compileSchema.call(p,h),(0,r.getValidate)(l,h)}e.default=o})),TS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicRef=void 0;let t=ye(),n=Et(),i=Yg(),r={keyword:"$dynamicRef",schemaType:"string",code:a=>o(a,a.schema)};function o(a,s){let{gen:l,keyword:u,it:d}=a;if(s[0]!=="#")throw new Error(`"${u}" only supports hash fragment reference`);let p=s.slice(1);if(d.allErrors)f();else{let v=l.let("valid",!1);f(v),a.ok(v)}function f(v){if(d.schemaEnv.root.dynamicAnchors[p]){let $=l.let("_v",(0,t._)`${n.default.dynamicAnchors}${(0,t.getProperty)(p)}`);l.if($,b($,v),b(d.validateName,v))}else b(d.validateName,v)()}function b(v,$){return $?()=>l.block(()=>{(0,i.callRef)(a,v),l.let($,!0)}):()=>(0,i.callRef)(a,v)}}e.dynamicRef=o,e.default=r})),Jk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=kS(),n=Te(),i={keyword:"$recursiveAnchor",schemaType:"boolean",code(r){r.schema?(0,t.dynamicAnchor)(r,""):(0,n.checkStrictMode)(r.it,"$recursiveAnchor: false is ignored")}};e.default=i})),Gk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=TS(),n={keyword:"$recursiveRef",schemaType:"string",code:i=>(0,t.dynamicRef)(i,i.schema)};e.default=n})),ES=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=kS(),n=TS(),i=Jk(),r=Gk(),o=[t.default,n.default,i.default,r.default];e.default=o})),Bk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Qg(),n={keyword:"dependentRequired",type:"object",schemaType:"object",error:t.error,code:i=>(0,t.validatePropertyDeps)(i)};e.default=n})),Kk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Qg(),n={keyword:"dependentSchemas",type:"object",schemaType:"object",code:i=>(0,t.validateSchemaDeps)(i)};e.default=n})),Wk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Te(),n={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:i,parentSchema:r,it:o}){r.contains===void 0&&(0,t.checkStrictMode)(o,`"${i}" without "contains" is ignored`)}};e.default=n})),PS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Bk(),n=Kk(),i=Wk(),r=[t.default,n.default,i.default];e.default=r})),Yk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ye(),n=Te(),i=Et(),r={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:o})=>(0,t._)`{unevaluatedProperty: ${o.unevaluatedProperty}}`},code(o){let{gen:a,schema:s,data:l,errsCount:u,it:d}=o;if(!u)throw new Error("ajv implementation error");let{allErrors:p,props:f}=d;f instanceof t.Name?a.if((0,t._)`${f} !== true`,()=>a.forIn("key",l,y=>a.if(v(f,y),()=>b(y)))):f!==!0&&a.forIn("key",l,y=>f===void 0?b(y):a.if($(f,y),()=>b(y))),d.props=!0,o.ok((0,t._)`${u} === ${i.default.errors}`);function b(y){if(s===!1){o.setParams({unevaluatedProperty:y}),o.error(),p||a.break();return}if(!(0,n.alwaysValidSchema)(d,s)){let h=a.name("valid");o.subschema({keyword:"unevaluatedProperties",dataProp:y,dataPropType:n.Type.Str},h),p||a.if((0,t.not)(h),()=>a.break())}}function v(y,h){return(0,t._)`!${y} || !${y}[${h}]`}function $(y,h){let z=[];for(let g in y)y[g]===!0&&z.push((0,t._)`${h} !== ${g}`);return(0,t.and)(...z)}}};e.default=r})),Xk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ye(),n=Te(),i={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:o,schema:a,data:s,it:l}=r,u=l.items||0;if(u===!0)return;let d=o.const("len",(0,t._)`${s}.length`);if(a===!1)r.setParams({len:u}),r.fail((0,t._)`${d} > ${u}`);else if(typeof a=="object"&&!(0,n.alwaysValidSchema)(l,a)){let f=o.var("valid",(0,t._)`${d} <= ${u}`);o.if((0,t.not)(f),()=>p(f,u)),r.ok(f)}l.items=!0;function p(f,b){o.forRange("i",b,d,v=>{r.subschema({keyword:"unevaluatedItems",dataProp:v,dataPropType:n.Type.Num},f),l.allErrors||o.if((0,t.not)(f),()=>o.break())})}}};e.default=i})),xS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Yk(),n=Xk(),i=[t.default,n.default];e.default=i})),Qk=Z(((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":!0,"https://json-schema.org/draft/2019-09/vocab/applicator":!0,"https://json-schema.org/draft/2019-09/vocab/validation":!0,"https://json-schema.org/draft/2019-09/vocab/meta-data":!0,"https://json-schema.org/draft/2019-09/vocab/format":!1,"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,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"}]}}}}})),eT=Z(((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":!0},$recursiveAnchor:!0,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:"#"}}}}})),tT=Z(((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":!0},$recursiveAnchor:!0,title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$recursiveRef:"#"}}}})),rT=Z(((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":!0},$recursiveAnchor:!0,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:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}}}}})),nT=Z(((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":!0},$recursiveAnchor:!0,title:"Format vocabulary meta-schema",type:["object","boolean"],properties:{format:{type:"string"}}}})),iT=Z(((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":!0},$recursiveAnchor:!0,title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}})),oT=Z(((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":!0},$recursiveAnchor:!0,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:!1},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:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]}},$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:!0,default:[]}}}})),aT=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Qk(),n=eT(),i=tT(),r=rT(),o=nT(),a=iT(),s=oT(),l=["/properties"];function u(d){return[t,n,i,r,p(this,o),a,p(this,s)].forEach(f=>this.addMetaSchema(f,void 0,!1)),this;function p(f,b){return d?f.$dataMetaSchema(b,l):b}}e.default=u})),sT=Z(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2019=void 0;let n=Wg(),i=IS(),r=ES(),o=PS(),a=xS(),s=ev(),l=aT(),u="https://json-schema.org/draft/2019-09/schema";var d=class extends n.default{constructor($={}){super({...$,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(r.default),i.default.forEach($=>this.addVocabulary($)),this.addVocabulary(o.default),this.addVocabulary(a.default),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:$,meta:y}=this.opts;y&&(l.default.call(this,$),this.refs["http://json-schema.org/schema"]=u)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}};e.Ajv2019=d,t.exports=e=d,t.exports.Ajv2019=d,Object.defineProperty(e,"__esModule",{value:!0}),e.default=d;var p=hi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var f=ye();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var b=la();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return b.default}});var v=fi();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return v.default}})})),cT=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=vS(),n=yS(),i=$S(),r=ES(),o=PS(),a=xS(),s=wS(),l=zS(),u=[r.default,t.default,n.default,(0,i.default)(!0),s.default,l.metadataVocabulary,l.contentVocabulary,o.default,a.default];e.default=u})),lT=Z(((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":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$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:!0,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:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}})),uT=Z(((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":!0},$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"}}}}})),dT=Z(((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":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}})),mT=Z(((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":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}})),pT=Z(((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":!0},$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"}}}})),hT=Z(((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":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}})),fT=Z(((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":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}})),gT=Z(((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":!0},$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:!0}]},const:!0,enum:{type:"array",items:!0},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:!1},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:!0,default:[]}}}})),vT=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=lT(),n=uT(),i=dT(),r=mT(),o=pT(),a=hT(),s=fT(),l=gT(),u=["/properties"];function d(p){return[t,n,i,r,o,f(this,a),s,f(this,l)].forEach(b=>this.addMetaSchema(b,void 0,!1)),this;function f(b,v){return p?b.$dataMetaSchema(v,u):v}}e.default=d})),yT=Z(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;let n=Wg(),i=cT(),r=ev(),o=vT(),a="https://json-schema.org/draft/2020-12/schema";var s=class extends n.default{constructor(f={}){super({...f,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),i.default.forEach(f=>this.addVocabulary(f)),this.opts.discriminator&&this.addKeyword(r.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:f,meta:b}=this.opts;b&&(o.default.call(this,f),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}};e.Ajv2020=s,t.exports=e=s,t.exports.Ajv2020=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var l=hi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=ye();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var d=la();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return d.default}});var p=fi();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})})),_T=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(C,F){return{validate:C,compare:F}}e.fullFormats={date:t(o,a),time:t(l(!0),u),"date-time":t(f(!0),b),"iso-time":t(l(),d),"iso-date-time":t(f(),v),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:h,"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:U,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:g,int32:{type:"number",validate:w},int64:{type:"number",validate:_},float:{type:"number",validate:I},double:{type:"number",validate:I},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),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,b),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,d),"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,v),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(C){return C%4===0&&(C%100!==0||C%400===0)}let i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(C){let F=i.exec(C);if(!F)return!1;let ee=+F[1],ne=+F[2],we=+F[3];return ne>=1&&ne<=12&&we>=1&&we<=(ne===2&&n(ee)?29:r[ne])}function a(C,F){if(C&&F)return C>F?1:C<F?-1:0}let s=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function l(C){return function(ee){let ne=s.exec(ee);if(!ne)return!1;let we=+ne[1],Ce=+ne[2],Oe=+ne[3],Je=ne[4],ke=ne[5]==="-"?-1:1,x=+(ne[6]||0),M=+(ne[7]||0);if(x>23||M>59||C&&!Je)return!1;if(we<=23&&Ce<=59&&Oe<60)return!0;let J=Ce-M*ke,R=we-x*ke-(J<0?1:0);return(R===23||R===-1)&&(J===59||J===-1)&&Oe<61}}function u(C,F){if(!(C&&F))return;let ee=new Date("2020-01-01T"+C).valueOf(),ne=new Date("2020-01-01T"+F).valueOf();if(ee&&ne)return ee-ne}function d(C,F){if(!(C&&F))return;let ee=s.exec(C),ne=s.exec(F);if(ee&&ne)return C=ee[1]+ee[2]+ee[3],F=ne[1]+ne[2]+ne[3],C>F?1:C<F?-1:0}let p=/t|\s/i;function f(C){let F=l(C);return function(ne){let we=ne.split(p);return we.length===2&&o(we[0])&&F(we[1])}}function b(C,F){if(!(C&&F))return;let ee=new Date(C).valueOf(),ne=new Date(F).valueOf();if(ee&&ne)return ee-ne}function v(C,F){if(!(C&&F))return;let[ee,ne]=C.split(p),[we,Ce]=F.split(p),Oe=a(ee,we);if(Oe!==void 0)return Oe||u(ne,Ce)}let $=/\/|:/,y=/^(?:[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 h(C){return $.test(C)&&y.test(C)}let z=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function g(C){return z.lastIndex=0,z.test(C)}let S=-(2**31),k=2**31-1;function w(C){return Number.isInteger(C)&&C<=k&&C>=S}function _(C){return Number.isInteger(C)}function I(){return!0}let j=/[^\\]\\Z/;function U(C){if(j.test(C))return!1;try{return new RegExp(C),!0}catch{return!1}}})),bT=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;let t=RS(),n=ye(),i=n.operators,r={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},o={message:({keyword:s,schemaCode:l})=>(0,n.str)`should be ${r[s].okStr} ${l}`,params:({keyword:s,schemaCode:l})=>(0,n._)`{comparison: ${r[s].okStr}, limit: ${l}}`};e.formatLimitDefinition={keyword:Object.keys(r),type:"string",schemaType:"string",$data:!0,error:o,code(s){let{gen:l,data:u,schemaCode:d,keyword:p,it:f}=s,{opts:b,self:v}=f;if(!b.validateFormats)return;let $=new t.KeywordCxt(f,v.RULES.all.format.definition,"format");$.$data?y():h();function y(){let g=l.scopeValue("formats",{ref:v.formats,code:b.code.formats}),S=l.const("fmt",(0,n._)`${g}[${$.schemaCode}]`);s.fail$data((0,n.or)((0,n._)`typeof ${S} != "object"`,(0,n._)`${S} instanceof RegExp`,(0,n._)`typeof ${S}.compare != "function"`,z(S)))}function h(){let g=$.schema,S=v.formats[g];if(!S||S===!0)return;if(typeof S!="object"||S instanceof RegExp||typeof S.compare!="function")throw new Error(`"${p}": format "${g}" does not define "compare" function`);let k=l.scopeValue("formats",{key:g,ref:S,code:b.code.formats?(0,n._)`${b.code.formats}${(0,n.getProperty)(g)}`:void 0});s.fail$data(z(k))}function z(g){return(0,n._)`${g}.compare(${u}, ${d}) ${r[p].fail} 0`}},dependencies:["format"]};let a=s=>(s.addKeyword(e.formatLimitDefinition),s);e.default=a})),ST=Z(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});let n=_T(),i=bT(),r=ye(),o=new r.Name("fullFormats"),a=new r.Name("fastFormats"),s=(u,d={keywords:!0})=>{if(Array.isArray(d))return l(u,d,n.fullFormats,o),u;let[p,f]=d.mode==="fast"?[n.fastFormats,a]:[n.fullFormats,o];return l(u,d.formats||n.formatNames,p,f),d.keywords&&(0,i.default)(u),u};s.get=(u,d="full")=>{let p=(d==="fast"?n.fastFormats:n.fullFormats)[u];if(!p)throw new Error(`Unknown format "${u}"`);return p};function l(u,d,p,f){var b,v;(b=(v=u.opts.code).formats)!==null&&b!==void 0||(v.formats=(0,r._)`require("ajv-formats/dist/formats").${f}`);for(let $ of d)u.addFormat($,p[$])}t.exports=e=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s})),jS=RS(),$T=sT(),wT=yT(),zT=Na(ST(),1),IT=zT.default;function Kg(e){let t=new e({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return IT(t),t}var Eu=class{_ajv;_ajvDraft7;_ajv2019;_userAjv;constructor(e){this._userAjv=e!==void 0,this._ajv=e}get ajv(){return this._ajv??=Kg(wT.Ajv2020)}_engineFor(e){if(this._userAjv)return this.ajv;let t=Sv(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??=Kg($T.Ajv2019):this._ajvDraft7??=Kg(jS.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 i=>n(i)?{valid:!0,data:i,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:t.errorsText(n.errors)}}},OA=jS.Ajv;import tv from"process";var US=Symbol.for("mcp.completable");function nv(e){return!!e&&typeof e=="object"&&US in e}function kT(e){return e[US]?.complete}var IO=2**31-1;function TT(e,t){switch(t.kind){case"tools_list_changed":return e.toolsListChanged===!0;case"prompts_list_changed":return e.promptsListChanged===!0;case"resources_list_changed":return e.resourcesListChanged===!0;case"resource_updated":return e.resourceSubscriptions!==void 0&&e.resourceSubscriptions.includes(t.uri)}}function ET(e,t){let n={},i=r=>t===void 0||r===!0;return e.toolsListChanged===!0&&i(t?.tools?.listChanged)&&(n.toolsListChanged=!0),e.promptsListChanged===!0&&i(t?.prompts?.listChanged)&&(n.promptsListChanged=!0),e.resourcesListChanged===!0&&i(t?.resources?.listChanged)&&(n.resourcesListChanged=!0),e.resourceSubscriptions!==void 0&&e.resourceSubscriptions.length>0&&i(t?.resources?.subscribe)&&(n.resourceSubscriptions=[...e.resourceSubscriptions]),n}var Pu=1024;function AS(e,t){return{method:e.method,params:{...e.params,_meta:{...e.params?._meta,[Qr]:t}}}}function PT(e){let t=Rr(sa).validateRequest("subscriptions/listen",e);return t.ok?t.value.params?.notifications:void 0}var xT=new Set(["notifications/tools/list_changed","notifications/prompts/list_changed","notifications/resources/list_changed","notifications/resources/updated"]),FS=class{_subs=new Map;_serverCapabilities;_serverInfo;constructor(e=Pu,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=PT(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=ET(t,this._serverCapabilities);return this._subs.set(e.id,n),AS({method:"notifications/subscriptions/acknowledged",params:{notifications:n}},e.id)}cancel(e){return this._subs.delete(e)}routeOutbound(e){if(!xT.has(e.method))return"passthrough";let t=e.params?.uri,n=typeof t=="string"?t:void 0,i=jT(e.method,n),r=[];for(let[o,a]of this._subs)TT(a,i)&&r.push(AS({method:e.method,params:e.params??{}},o));return r}teardownAll(){let e=[];for(let t of this._subs.keys())e.push({jsonrpc:"2.0",id:t,result:{resultType:"complete",_meta:{[Qr]:t,...this._serverInfo!==void 0&&{[Mt]:this._serverInfo}}}});return this._subs.clear(),e}};function jT(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 AT=8,OT=6e5;function NT(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??AT,roundTimeoutMs:e?.roundTimeoutMs??OT,legacyShim:e?.legacyShim??!0}}function VS(e,t,n){if(n===null||typeof n!="object"||typeof n.method!="string")throw new de(X.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 i=n,r=Ob(i);if(r===void 0)throw new de(X.InternalError,`Handler for ${e} returned an input request '${t}' of kind '${i.method}', which is not an embedded request the 2026-07-28 revision defines`);return{embedded:i,required:r}}function CT(){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(i=>i.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 rv(e,t){if(e==="tools/call")return{content:[{type:"text",text:t}],isError:!0};throw new de(X.InternalError,t)}var LT=class{constructor(e){this._host=e}async fulfill(e,t,n,i,r){let{maxRounds:o,roundTimeoutMs:a}=this._host,s=i.mcpReq.signal,l=r,u=0;for(;;){if(u+=1,u>o)return rv(e,rS(e,o));let d=l.inputRequests,p=d!=null&&Object.keys(d).length>0,f=typeof l.requestState=="string"?l.requestState:void 0;if(!p&&f===void 0)throw new de(X.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 b;if(p){let y=this._host.resolvedClientCapabilities(i),h=[];for(let[g,S]of Object.entries(d)){let{embedded:k,required:w}=VS(e,g,S);if(k.method!=="roots/list"&&k.params===void 0)throw new de(X.InternalError,`Handler for ${e} returned an input request '${g}' of kind '${k.method}' without params`);if(pu(w,y)!==void 0)return rv(e,`Cannot request input '${g}' (${k.method}): the client on this 2025-era connection did not declare the required capability${y===void 0?" (no client capabilities are available on this connection \u2014 per-request legacy serving cannot receive server-to-client requests)":""}`);h.push([g,k])}let z=iS(s);try{let g={relatedRequestId:i.mcpReq.id,timeout:a,resetTimeoutOnProgress:!0,onprogress:()=>{},signal:z.signal},S=await Promise.all(h.map(async([k,w])=>{try{return[k,await this._dispatchLeg(w,g)]}catch(_){throw z.abort(_),_}}));b=Object.fromEntries(S)}catch(g){if(s.aborted)throw g;return rv(e,`Fulfilling input required by '${e}' failed: ${g instanceof Error?g.message:String(g)}`)}finally{z.dispose()}}else await nS(tS,s);let v={...i,mcpReq:{...i.mcpReq,inputResponses:b,droppedInputResponseKeys:void 0,requestState:ca(f)}};if(f!==void 0){let y=await this._host.verifyRequestState(f,v,e);y!==void 0&&(v=Fg(v,y))}let $=await t(n,v);if(!Xt($))return $;l=$}}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:CT()}),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)}}},qT=new Set(["tools/call","prompts/get","resources/read"]),MT,ZS,HS;function iv(e,t){ZS(e,t)}function ov(e){return HS(e)}var JS=class extends Zg{_clientCapabilities;_clientVersion;static{MT=(e,t)=>{t.clientCapabilities!==void 0&&(e._clientCapabilities=t.clientCapabilities),t.clientInfo!==void 0&&(e._clientVersion=t.clientInfo)},ZS=(e,t)=>{let n=t.filter(i=>!e._supportedProtocolVersions.includes(i));n.length>0&&(e._supportedProtocolVersions=[...e._supportedProtocolVersions,...n]),e.setRequestHandler("server/discover",()=>e._ondiscover())},HS=e=>e._serverInfo}_capabilities;_instructions;_jsonSchemaValidator;_cacheHints;_requestStateVerify;_inputRequiredServing;_legacyShim;_legacyInputRequiredShim(){return this._legacyShim??=new LT({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:!1}),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 Eu,this._requestStateVerify=t?.requestState?.verify,this._inputRequiredServing=NT(t?.inputRequired),t?.cacheHints!==void 0){for(let[n,i]of Object.entries(t.cacheHints))i!==void 0&&Ag(i,`cacheHints['${n}']`);this._cacheHints=t.cacheHints}this.setRequestHandler("initialize",n=>this._oninitialize(n)),this.setNotificationHandler("notifications/initialized",()=>this.oninitialized?.()),kg(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:i}=e.params,r=Su(zr,i);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:(i,r,o)=>{if(!this._capabilities.logging)return Promise.resolve();let a;if(this._servedModernEra()){if(a=e.mcpReq.envelope?.[yr],a===void 0)return Promise.resolve()}else a=this._loggingLevels.get(e.sessionId)??this._loggingLevels.get(void 0);return a!==void 0&&this.LOG_LEVEL_SEVERITY.get(i)<this.LOG_LEVEL_SEVERITY.get(a)?Promise.resolve():e.mcpReq.notify({method:"notifications/message",params:{level:i,data:r,logger:o}})},elicitInput:(i,r)=>this.elicitInput(i,r),requestSampling:(i,r)=>this.createMessage(i,r)},http:n?{...e.http,req:t?.request,closeSSE:t?.closeSSEStream,closeStandaloneSSE:t?.closeStandaloneSSEStream}:void 0}}_loggingLevels=new Map;LOG_LEVEL_SEVERITY=new Map(zr.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):!1};registerCapabilities(e){if(this.transport)throw new ve(ze.AlreadyConnected,"Cannot register capabilities after connecting to transport");let t=!!this._capabilities.logging;this._capabilities=Hg(this._capabilities,e),!t&&this._capabilities.logging&&this._registerLoggingHandler()}_wrapHandler(e,t){if(e!=="tools/call"){let n=this._cacheHints?.[e],i=qT.has(e);return n===void 0&&!i?async(r,o)=>{let a=await t(r,o);if(Xt(a))throw new de(X.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 a}:async(r,o)=>{let a=i?await this._invokeInputRequiredCapableHandler(e,t,r,o):await t(r,o);if(Xt(a)){if(!i)throw new de(X.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 a}return n===void 0?a:hu(a,n)}}return async(n,i)=>{let r=Rr(this._negotiatedProtocolVersion),o=r.validateRequest("tools/call",n);if(!o.ok)throw new de(o.reason==="not-in-era"?X.InternalError:X.InvalidParams,o.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call request: ${o.message}`);let a=await this._invokeInputRequiredCapableHandler("tools/call",t,n,i);if(Xt(a))return a;let s=Tg(a),l=r.validateResult("tools/call",s);if(!l.ok)throw new de(l.reason==="not-in-era"?X.InternalError:X.InvalidParams,l.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call result: ${l.message}`);return l.value}}_servedModernEra(){return this._negotiatedProtocolVersion!==void 0&&mi(this._negotiatedProtocolVersion)}async _invokeInputRequiredCapableHandler(e,t,n,i){let r=this._servedModernEra(),o=i.mcpReq.requestState();if(o!==void 0&&typeof o!="string")throw new de(X.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"});let a=i;if(typeof o=="string"){let p=await this._verifyRequestState(o,i,e);p!==void 0&&(a=Fg(i,p))}let s;try{s=await t(n,a)}catch(p){throw p instanceof de&&p.code===X.UrlElicitationRequired&&r?new de(X.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.`):p}if(!Xt(s))return s;if(!r){if(!this._inputRequiredServing.legacyShim)throw new de(X.InternalError,`Handler for ${e} returned an input-required result, but this request is served on protocol revision ${this._negotiatedProtocolVersion??Xr}, which has no input_required vocabulary`);return await this._legacyInputRequiredShim().fulfill(e,t,n,a,s)}let l=s.inputRequests,u=l!=null&&Object.keys(l).length>0,d=typeof s.requestState=="string";if(!u&&!d)throw new de(X.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 p=this._inputRequestCapabilityView(i);for(let[f,b]of Object.entries(l)){let{embedded:v,required:$}=VS(e,f,b),y=pu($,p);if(y!==void 0)throw new gu({requiredCapabilities:y},`Cannot request input '${f}' (${v.method}): the request's client capabilities do not declare the required capability`)}}return s}async _verifyRequestState(e,t,n){if(this._requestStateVerify!==void 0)try{return await this._requestStateVerify(e,t)}catch(i){throw this.onerror?.(new Error(`requestState verification rejected ${n}: ${i instanceof Error?i.message:String(i)}`)),new de(X.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"})}}_inputRequestCapabilityView(e){return this._servedModernEra()?e.mcpReq.envelope?.[Wt]:this._clientCapabilities}_assertPushApiInServedEra(e){if(this._servedModernEra())throw new ve(ze.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 ve(ze.CapabilityNotSupported,`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new ve(ze.CapabilityNotSupported,`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new ve(ze.CapabilityNotSupported,`Client does not support listing roots (required for ${e})`);break;case"ping":break}}assertNotificationCapability(e){switch(e){case"notifications/message":if(!this._capabilities.logging)throw new ve(ze.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 ve(ze.CapabilityNotSupported,`Server does not support notifying about resources (required for ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new ve(ze.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 ve(ze.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 ve(ze.CapabilityNotSupported,`Client does not support URL elicitation (required for ${e})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){switch(e){case"completion/complete":if(!this._capabilities.completions)throw new ve(ze.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new ve(ze.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new ve(ze.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 ve(ze.CapabilityNotSupported,`Server does not support resources (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new ve(ze.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case"ping":case"initialize":break}}async _oninitialize(e){let t=e.params.protocolVersion;this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo;let n=Cb(this._supportedProtocolVersions),i=n.includes(t)?t:n[0]??Xr;return this._negotiatedProtocolVersion=i,this.transport?.setProtocolVersion?.(i),{protocolVersion:i,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}_ondiscover(){return{supportedVersions:kg(this._supportedProtocolVersions),capabilities:DT(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 ve(ze.CapabilityNotSupported,"Client does not support sampling tools capability.");if(e.messages.length>0){let o=e.messages.at(-1),a=Array.isArray(o.content)?o.content:[o.content],s=a.some(p=>p.type==="tool_result"),l=e.messages.length>1?e.messages.at(-2):void 0,u=l?Array.isArray(l.content)?l.content:[l.content]:[],d=u.some(p=>p.type==="tool_use");if(s){if(a.some(p=>p.type!=="tool_result"))throw new de(X.InvalidParams,"The last message must contain only tool_result content if any is present");if(!d)throw new de(X.InvalidParams,"tool_result blocks are not matching any tool_use from the previous message")}if(d){let p=new Set(u.filter(b=>b.type==="tool_use").map(b=>b.id)),f=new Set(a.filter(b=>b.type==="tool_result").map(b=>b.toolUseId));if(p.size!==f.size||![...p].every(b=>f.has(b)))throw new de(X.InvalidParams,"ids of tool_result blocks and tool_use blocks from previous message do not match")}}let n=!!(e.tools||e.toolChoice),i=await this.request({method:"sampling/createMessage",params:e},t),r=this._wireCodec().samplingResultVariant(n,i);if(!r.ok)throw new ve(ze.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 ve(ze.CapabilityNotSupported,"Client does not support url elicitation.");break;case"form":if(!this._clientCapabilities?.elicitation?.form)throw new ve(ze.CapabilityNotSupported,"Client does not support form elicitation.");break}return this._sendElicitationLeg(e,t)}async _sendElicitationLeg(e,t,n){let i=e.mode??"form",r=n?.validateAcceptedContent??!0;switch(i){case"url":{let o=e;return this.request({method:"elicitation/create",params:o},t)}case"form":{let o=e.mode==="form"?e:{...e,mode:"form"},a=await this.request({method:"elicitation/create",params:o},t);if(r&&a.action==="accept"&&a.content&&o.requestedSchema)try{let s=this._jsonSchemaValidator.getValidator(o.requestedSchema)(a.content);if(!s.valid)throw new de(X.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(s){throw s instanceof de?s:new de(X.InternalError,`Error validating elicitation response: ${s instanceof Error?s.message:String(s)}`)}return a}}}createElicitationCompletionNotifier(e,t){if(!this._clientCapabilities?.elicitation?.url)throw new ve(ze.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 DT(e){return{...e}}var da=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 NS;try{let n=Er(t.inputSchema,"input");return this._toolInputSchemaJson[e]=n,n}catch{return}}}constructor(e,t){this.server=new JS(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=!1;setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler("tools/list"),this.server.assertCanSetRequestHandler("tools/call"),this.server.registerCapabilities({tools:{listChanged:this.server.getCapabilities().tools?.listChanged??!0}}),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?Er(t.inputSchema,"input"):NS,annotations:t.annotations,icons:t.icons,execution:t.execution,_meta:t._meta};return t.outputSchema&&(n.outputSchema=Er(t.outputSchema,"output")),n})})),this.server.setRequestHandler("tools/call",async(e,t)=>{let n=this._registeredTools[e.params.name];if(!n)throw new de(X.InvalidParams,`Tool ${e.params.name} not found`);if(!n.enabled)throw new de(X.InvalidParams,`Tool ${e.params.name} disabled`);try{let i=await this.validateToolInput(n,e.params.arguments,e.params.name),r=await this.executeToolHandler(n,i,t);return await this.validateToolOutput(n,r,e.params.name),Xt(r)?r:this.server.projectCallToolResult(r,n.outputSchemaJson)}catch(i){if(i instanceof de&&i.code===X.UrlElicitationRequired)throw i;return this.createToolError(i instanceof Error?i.message:String(i))}}),this._toolHandlersInitialized=!0)}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,t,n){if(!e.inputSchema)return;let i=await rn(e.inputSchema,t??{});if(!i.success)throw new de(X.InvalidParams,`Input validation error: Invalid arguments for tool ${n}: ${i.error}`);return i.data}async validateToolOutput(e,t,n){if(!e.outputSchema||Xt(t)||t.isError)return;if(t.structuredContent===void 0)throw new de(X.InvalidParams,`Output validation error: Tool ${n} has an output schema but no structured content was provided`);let i=await rn(e.outputSchema,t.structuredContent);if(!i.success)throw new de(X.InvalidParams,`Output validation error: Invalid structured content for tool ${n}: ${i.error}`)}async executeToolHandler(e,t,n){return e.executor(t,n)}_completionHandlerInitialized=!1;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 Cg(e),this.handlePromptCompletion(e,e.params.ref);case"ref/resource":return Lg(e),this.handleResourceCompletion(e,e.params.ref);default:throw new de(X.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(e,t){let n=this._registeredPrompts[t.name];if(!n)throw new de(X.InvalidParams,`Prompt ${t.name} not found`);if(!n.enabled)throw new de(X.InvalidParams,`Prompt ${t.name} disabled`);if(!n.argsSchema)return ua;let i=DS(MS(n.argsSchema)?.[e.params.argument.name]);if(!nv(i))return ua;let r=kT(i);return r?qS(await r(e.params.argument.value,e.params.context)):ua}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 ua;throw new de(X.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let i=n.resourceTemplate.completeCallback(e.params.argument.name);return i?qS(await i(e.params.argument.value,e.params.context)):ua}_resourceHandlersInitialized=!1;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??!0}}),this.server.setRequestHandler("resources/list",async(e,t)=>{let n=Object.entries(this._registeredResources).filter(([r,o])=>o.enabled).map(([r,o])=>({uri:r,name:o.name,...o.metadata})),i=[];for(let r of Object.values(this._registeredResourceTemplates)){if(!r.resourceTemplate.listCallback)continue;let o=await r.resourceTemplate.listCallback(t);for(let a of o.resources)i.push({...r.metadata,...a})}return{resources:[...n,...i]}}),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(X.InvalidParams,`Resource URI ${e.params.uri} is invalid`,{uri:e.params.uri,reason:"invalid_uri"})}let i=this._registeredResources[n.toString()];if(i){if(!i.enabled)throw new de(X.InvalidParams,`Resource ${n} disabled`);return hu(await i.readCallback(n,t),i.cacheHint)}for(let r of Object.values(this._registeredResourceTemplates)){let o=r.resourceTemplate.uriTemplate.match(n.toString());if(o)return hu(await r.readCallback(n,o,t),r.cacheHint)}throw new fu(e.params.uri)}),this._resourceHandlersInitialized=!0)}_promptHandlersInitialized=!1;setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler("prompts/list"),this.server.assertCanSetRequestHandler("prompts/get"),this.server.registerCapabilities({prompts:{listChanged:this.server.getCapabilities().prompts?.listChanged??!0}}),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?eS(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(X.InvalidParams,`Prompt ${e.params.name} not found`);if(!n.enabled)throw new de(X.InvalidParams,`Prompt ${e.params.name} disabled`);return n.handler(e.params.arguments,t)}),this._promptHandlersInitialized=!0)}registerResource(e,t,n,i){let r=n.cacheHint,o=n;if(r!==void 0){Ag(r,`resource ${e}`);let a={...n};delete a.cacheHint,o=a}if(typeof t=="string"){if(this._registeredResources[t])throw new Error(`Resource ${t} is already registered`);let a=this._createRegisteredResource(e,n.title,t,o,i);return r!==void 0&&(a.cacheHint=r),this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}else{if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);let a=this._createRegisteredResourceTemplate(e,n.title,t,o,i);return r!==void 0&&(a.cacheHint=r),this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}}_createRegisteredResource(e,t,n,i,r){let o={name:e,title:t,metadata:i,readCallback:r,enabled:!0,disable:()=>o.update({enabled:!1}),enable:()=>o.update({enabled:!0}),remove:()=>o.update({uri:null}),update:a=>{a.uri!==void 0&&a.uri!==n&&(delete this._registeredResources[n],a.uri&&(this._registeredResources[a.uri]=o)),a.name!==void 0&&(o.name=a.name),a.title!==void 0&&(o.title=a.title),a.metadata!==void 0&&(o.metadata=a.metadata),a.callback!==void 0&&(o.readCallback=a.callback),a.enabled!==void 0&&(o.enabled=a.enabled),this.sendResourceListChanged()}};return this._registeredResources[n]=o,o}_createRegisteredResourceTemplate(e,t,n,i,r){let o={resourceTemplate:n,title:t,metadata:i,readCallback:r,enabled:!0,disable:()=>o.update({enabled:!1}),enable:()=>o.update({enabled:!0}),remove:()=>o.update({name:null}),update:s=>{s.name!==void 0&&s.name!==e&&(delete this._registeredResourceTemplates[e],s.name&&(this._registeredResourceTemplates[s.name]=o)),s.title!==void 0&&(o.title=s.title),s.template!==void 0&&(o.resourceTemplate=s.template),s.metadata!==void 0&&(o.metadata=s.metadata),s.callback!==void 0&&(o.readCallback=s.callback),s.enabled!==void 0&&(o.enabled=s.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[e]=o;let a=n.uriTemplate.variableNames;return Array.isArray(a)&&a.some(s=>!!n.completeCallback(s))&&this.setCompletionRequestHandler(),o}_createRegisteredPrompt(e,t,n,i,r,o,a){let s=i,l=r,u={title:t,description:n,argsSchema:i,icons:o,_meta:a,handler:LS(e,i,r),enabled:!0,disable:()=>u.update({enabled:!1}),enable:()=>u.update({enabled:!0}),remove:()=>u.update({name:null}),update:d=>{d.name!==void 0&&d.name!==e&&(delete this._registeredPrompts[e],d.name&&(this._registeredPrompts[d.name]=u)),d.title!==void 0&&(u.title=d.title),d.description!==void 0&&(u.description=d.description),d.icons!==void 0&&(u.icons=d.icons),d._meta!==void 0&&(u._meta=d._meta);let p=!1;d.argsSchema!==void 0&&(u.argsSchema=d.argsSchema,s=d.argsSchema,p=!0),d.callback!==void 0&&(l=d.callback,p=!0),p&&(u.handler=LS(e,s,l)),d.enabled!==void 0&&(u.enabled=d.enabled),this.sendPromptListChanged()}};if(this._registeredPrompts[e]=u,i){let d=MS(i);d&&Object.values(d).some(p=>nv(DS(p)))&&this.setCompletionRequestHandler()}return u}_createRegisteredTool(e,t,n,i,r,o,a,s,l,u){if(Bg(e),i!==void 0)try{let f=Er(i,"input");this._toolInputSchemaJson[e]=f;let b=qg(f);b.valid||console.warn(`[mcp-sdk] tool '${e}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${b.reason}`)}catch{}let d=u,p={title:t,description:n,inputSchema:i,outputSchema:r,outputSchemaJson:CS(r),annotations:o,icons:a,execution:s,_meta:l,handler:u,executor:OS(i,u),enabled:!0,disable:()=>p.update({enabled:!1}),enable:()=>p.update({enabled:!0}),remove:()=>p.update({name:null}),update:f=>{f.name!==void 0&&f.name!==e&&(typeof f.name=="string"&&Bg(f.name),delete this._registeredTools[e],delete this._toolInputSchemaJson[e],f.name&&(delete this._toolInputSchemaJson[f.name],this._registeredTools[f.name]=p,e=f.name)),f.title!==void 0&&(p.title=f.title),f.description!==void 0&&(p.description=f.description);let b=!1;f.paramsSchema!==void 0&&(p.inputSchema=f.paramsSchema,delete this._toolInputSchemaJson[e],b=!0),f.callback!==void 0&&(p.handler=f.callback,d=f.callback,b=!0),b&&(p.executor=OS(p.inputSchema,d)),f.outputSchema!==void 0&&(p.outputSchema=f.outputSchema,p.outputSchemaJson=CS(f.outputSchema)),f.annotations!==void 0&&(p.annotations=f.annotations),f.icons!==void 0&&(p.icons=f.icons),f._meta!==void 0&&(p._meta=f._meta),f.enabled!==void 0&&(p.enabled=f.enabled),this.sendToolListChanged()}};return this._registeredTools[e]=p,this.setToolRequestHandlers(),this.sendToolListChanged(),p}registerTool(e,t,n){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let{title:i,description:r,inputSchema:o,outputSchema:a,annotations:s,icons:l,_meta:u}=t;return this._createRegisteredTool(e,i,r,$u(o),$u(a),s,l,void 0,u,n)}registerPrompt(e,t,n){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let{title:i,description:r,argsSchema:o,icons:a,_meta:s}=t,l=this._createRegisteredPrompt(e,i,r,$u(o),n,a,s);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),l}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 OS(e,t){if(e){let i=t;return async(r,o)=>i(r,o)}let n=t;return async(i,r)=>n(r)}var NS={type:"object",properties:{}};function CS(e){if(e!==void 0)try{return Er(e,"output")}catch{return}}function LS(e,t,n){if(t){let i=n;return async(r,o)=>{let a=await rn(t,r);if(!a.success)throw new de(X.InvalidParams,`Invalid arguments for prompt ${e}: ${a.error}`);return i(a.data,o)}}else{let i=n;return async(r,o)=>i(o)}}function qS(e){return{completion:{values:e.map(String).slice(0,100),total:e.length,hasMore:e.length>100}}}var ua={completion:{values:[],hasMore:!1}};function MS(e){let t=e;if(t.shape&&typeof t.shape=="object")return t.shape}function UT(e){return e?.type==="optional"}function DS(e){return UT(e)?e.def?.innerType??e:e}var FT=class{_readBuffer;_started=!1;_closed=!1;constructor(e=tv.stdin,t=tv.stdout,n){this._stdin=e,this._stdout=t,this._readBuffer=new Jg({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=!0,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=!0,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 i=Gg(e),r=!1,o=s=>{r||(r=!0,this._stdout.off("error",o),this._stdout.off("drain",a),n(s))},a=()=>{r||(r=!0,this._stdout.off("error",o),this._stdout.off("drain",a),t())};if(this._stdout.once("error",o),this._stdout.write(i)){if(r)return;r=!0,this._stdout.off("error",o),t()}else r||this._stdout.once("drain",a)})}},GS=3e3,VT=class{onclose;onerror;onmessage;_closed=!1;_pendingRequests=new Set;_drainWaiters=[];constructor(e,t,n){this._wire=e,this._onInstanceClose=t,this._outboundIntercept=n}async start(){}async send(e,t){if(oa(e)||bu(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(wt(e))this._pendingRequests.add(e.id);else if(Tr(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?!0:await new Promise(t=>{let n=()=>{clearTimeout(i),t(!0)},i=setTimeout(()=>{this._drainWaiters=this._drainWaiters.filter(r=>r!==n),t(!1)},e);this._drainWaiters.push(n)})}async close(){if(!this._closed){this._closed=!0,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 ZT(e){let t=e.params;if(e.method==="initialize"&&!Mg(t)){let o=t!==null&&typeof t=="object"&&typeof t.protocolVersion=="string"?t.protocolVersion:void 0;return{kind:"legacy",reason:"initialize",...o!==void 0&&{requestedVersion:o}}}if(!vu(t))return{kind:"legacy",reason:"no-claim"};let n=on(t),i=(n===void 0?[]:_u(n))[0];if(i!==void 0)return{kind:"invalid-envelope",issue:i};let r=yu(t);return r===void 0||!kr.includes(r)?{kind:"unsupported-revision",requested:r??"unknown"}:{kind:"modern",revision:r,classification:{era:"modern",revision:r}}}function BS(e,t={}){let n=t.legacy??"serve",i=t.transport??new FT,r={phase:"opening"},o,a=!1,s=()=>a||r.phase==="closed",l=I=>{try{t.onerror?.(I)}catch{}},u=(I,j,U,C)=>i.send({jsonrpc:"2.0",id:I,error:{code:j,message:U,...C!==void 0&&{data:C}}}).catch(F=>l(xt(F))),d=new FS(t.maxSubscriptions??Pu),p=I=>{if(!Tr(I))return;let j=d.routeOutbound(I);if(j!=="passthrough"){for(let U of j)i.send({jsonrpc:"2.0",...U}).catch(C=>l(xt(C)));return"handled"}},f=async I=>{if(wt(I)&&I.method==="subscriptions/listen"){let j=on(I.params),U=vu(I.params)?(j===void 0?[]:_u(j))[0]:{key:"_meta",problem:"the per-request envelope is required on protocol revision 2026-07-28"},C=yu(I.params),F;if(U!==void 0)F={jsonrpc:"2.0",id:I.id,error:{code:-32602,message:`Invalid _meta envelope: ${U.key}: ${U.problem}`}};else if(C===void 0||!kr.includes(C)){let ee=new pi({supported:[...kr],requested:C??"unknown"});F={jsonrpc:"2.0",id:I.id,error:{code:ee.code,message:ee.message,data:ee.data}}}else F=d.serve(I);return await i.send("error"in F?F:{jsonrpc:"2.0",method:F.method,params:F.params}).catch(ee=>l(xt(ee))),!0}if(Tr(I)&&I.method==="notifications/cancelled"){let j=I.params?.requestId;if(j!==void 0&&d.cancel(j))return!0}return!1},b=(I,j,U)=>{let C=Dg({kind:"legacy",reason:j,...U!==void 0&&{requestedVersion:U}},kr);return C===void 0?Promise.resolve():(l(new Error(`Rejected 2025-era request on a modern-only stdio connection (${C.cell}): ${C.message}`)),u(I.id,C.code,C.message,C.data))},v=I=>{a||I===o||w()},$=async(I,j)=>{let U=await e({era:I}),C=U instanceof da?U.server:U;I==="modern"&&(Vg(C,j),iv(C,kr),d.setServerCapabilities(C.getCapabilities(),ov(C)));let F=new VT(i,()=>v(F),I==="modern"?p:void 0);return await U.connect(F),{product:U,channel:F}},y=I=>I.product.close().catch(j=>l(xt(j))),h=async I=>{o=I.channel;try{await I.channel.whenRequestsAnswered(GS)||l(new Error(`Discarded the probe instance with requests still unanswered after ${GS}ms; continuing with the fallback`)),await I.product.close()}catch(j){l(xt(j))}finally{o=void 0}},z=async I=>{if(r.phase==="closed")return;if(r.phase==="pinned"){if(r.era==="modern"&&wt(I)&&I.method==="initialize"&&!Mg(I.params)){await b(I,"initialize",I.params!==null&&typeof I.params=="object"&&typeof I.params.protocolVersion=="string"?I.params.protocolVersion:void 0);return}if(r.era==="modern"&&await f(I))return;r.instance.channel.deliver(I);return}if(!wt(I)&&!Tr(I)){l(new Error("Discarded a JSON-RPC response received before the connection negotiated an era"));return}let j=ZT(I);switch(j.kind){case"invalid-envelope":{let U=`Invalid _meta envelope for protocol revision 2026-07-28: ${j.issue.key}: ${j.issue.problem}`;wt(I)?await u(I.id,X.InvalidParams,U,{envelope:j.issue}):l(new Error(`Discarded a notification with a malformed envelope: ${U}`));return}case"unsupported-revision":if(wt(I)){let U=new pi({supported:[...kr],requested:j.requested});l(U),await u(I.id,U.code,U.message,U.data)}else l(new Error(`Discarded a notification claiming unsupported protocol revision ${j.requested}`));return;case"modern":if(wt(I)&&I.method==="server/discover"){if(r.phase==="probe"){r.instance.channel.deliver(I,{classification:j.classification});return}let U=await $("modern",j.revision);if(s()){await y(U);return}r={phase:"probe",instance:U},U.channel.deliver(I,{classification:j.classification});return}if(r.phase==="probe"){if(Tr(I)){r.instance.channel.deliver(I,{classification:j.classification});return}r={phase:"pinned",era:"modern",instance:r.instance}}else{let U=await $("modern",j.revision);if(s()){await y(U);return}r={phase:"pinned",era:"modern",instance:U}}if(await f(I))return;r.instance.channel.deliver(I,{classification:j.classification});return;case"legacy":{if(n==="reject"){wt(I)&&await b(I,j.reason,j.requestedVersion);return}if(r.phase==="probe"){if(await h(r.instance),s())return;r={phase:"opening"}}let U=await $("legacy");if(s()){await y(U);return}r={phase:"pinned",era:"legacy",instance:U},r.instance.channel.deliver(I);return}}},g=[],S=!1,k=async()=>{if(!S){S=!0;try{for(;g.length>0;){let I=g.shift();try{await z(I)}catch(j){wt(I)&&await u(I.id,X.InternalError,"Internal server error"),l(xt(j))}}}finally{S=!1}}},w=async()=>{if(a||r.phase==="closed")return;a=!0;let I=r;r={phase:"closed"};for(let j of d.teardownAll())await i.send(j).catch(U=>l(xt(U)));(I.phase==="probe"||I.phase==="pinned")&&await I.instance.product.close().catch(j=>l(xt(j))),await i.close().catch(j=>l(xt(j)))};i.onmessage=I=>{g.push(I),k()},i.onerror=I=>{l(I),(r.phase==="probe"||r.phase==="pinned")&&r.instance.channel.onerror?.(I)},i.onclose=()=>{if(a||r.phase==="closed")return;a=!0;let I=r;r={phase:"closed"},(I.phase==="probe"||I.phase==="pinned")&&I.instance.product.close().catch(j=>l(xt(j)))};let _=i.start().catch(I=>{throw l(xt(I)),I});return _.catch(()=>{}),{close:async()=>{await _.catch(()=>{}),await w()}}}function xt(e){return e instanceof Error?e:new Error(String(e))}var HT=c.object({ANILIST_ACCESS_TOKEN:c.string().min(1).optional(),ANILIST_CLIENT_ID:c.string().min(1).optional(),ANILIST_CLIENT_SECRET:c.string().min(1).optional(),ANILIST_TOKEN_STORE:c.string().min(1).optional(),ANILIST_GRAPHQL_URL:c.string().url().default("https://graphql.anilist.co"),ANILIST_OAUTH_BASE_URL:c.string().url().default("https://anilist.co/api/v2/oauth"),HTTP_TIMEOUT_MS:c.coerce.number().int().positive().default(15e3),HTTP_RETRIES:c.coerce.number().int().nonnegative().default(2),ANILIST_MIN_INTERVAL_MS:c.coerce.number().int().nonnegative().default(2100),CACHE_TTL_MS:c.coerce.number().int().nonnegative().default(3e5),ANILIST_OAUTH_PORT:c.coerce.number().int().positive().default(8082),LOG_LEVEL:c.enum(["debug","info","warn","error","silent"]).default("info")}),JT=HT.transform(e=>({graphqlUrl:e.ANILIST_GRAPHQL_URL,oauthBaseUrl:e.ANILIST_OAUTH_BASE_URL,httpTimeoutMs:e.HTTP_TIMEOUT_MS,httpRetries:e.HTTP_RETRIES,minIntervalMs:e.ANILIST_MIN_INTERVAL_MS,cacheTtlMs:e.CACHE_TTL_MS,logLevel:e.LOG_LEVEL,oauthPort:e.ANILIST_OAUTH_PORT,auth:{accessToken:e.ANILIST_ACCESS_TOKEN,clientId:e.ANILIST_CLIENT_ID,clientSecret:e.ANILIST_CLIENT_SECRET,tokenStorePath:e.ANILIST_TOKEN_STORE,canLogin:!!(e.ANILIST_CLIENT_ID&&e.ANILIST_CLIENT_SECRET),configured:!!e.ANILIST_ACCESS_TOKEN}})),GT=/^\$\{[^}]*\}$/;function KS(e=process.env){let t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!==void 0&&n!==""&&!GT.test(n)));return JT.parse(t)}var Re=class extends Error{code;status;retryable;authenticated;constructor(t){super(t.message,t.cause===void 0?void 0:{cause:t.cause}),this.name="ApiError",this.code=t.code,this.status=t.status,this.retryable=t.retryable??!1,this.authenticated=t.authenticated}};function xu(e){return e===304?{code:"not_modified",retryable:!1}:e===401?{code:"unauthorized",retryable:!1}:e===403?{code:"forbidden",retryable:!1}:e===404?{code:"not_found",retryable:!1}:e===429?{code:"rate_limited",retryable:!0}:e===400||e===405||e===422?{code:"bad_request",retryable:!1}:e>=500?{code:"server_error",retryable:!0}:{code:"unknown",retryable:!1}}function je(e,t){if(e==null)throw new Re({code:"not_found",message:t});return e}function av(e){return e.replace(/Bearer\s+[A-Za-z0-9._~+/-]+=*/gi,"Bearer ***").replace(/\b(access_token|refresh_token|client_secret|client_id)=([^&\s"]+)/gi,"$1=***").replace(/"(access_token|refresh_token|client_secret|client_id)"\s*:\s*"[^"]*"/gi,'"$1":"***"')}var WS={debug:10,info:20,warn:30,error:40,silent:100};function YS(e,t){let n=WS[e];function i(r,o,a){if(WS[r]<n)return;let s=a.length?" "+av(a.map(u=>BT(u)).join(" ")):"",l=`${av(o)}${s}`;if(console.error(`[anilist-mcp-server] ${r}: ${l}`),t)try{t(r,l)}catch{}}return{debug:(r,...o)=>i("debug",r,o),info:(r,...o)=>i("info",r,o),warn:(r,...o)=>i("warn",r,o),error:(r,...o)=>i("error",r,o)}}function BT(e){if(typeof e=="string")return e;if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch{return String(e)}}var ju="0.6.0",XS=`anilist-mcp-server/${ju} (+https://github.com/Grinv/anilist-mcp-server)`;var QS=8e3,gi=class{#e;constructor(t){this.#e=t}async getJson(t,n={}){return this.requestJson(t,{...n,method:n.method??"GET"})}async requestJson(t,n={}){let i=this.#r(t,n.query),r=n.retries??this.#e.retries??2,o=n.timeoutMs??this.#e.timeoutMs??15e3,a=0;for(;;){this.#e.beforeRequest&&await this.#e.beforeRequest();try{return await this.#t(i,n,o)}catch(s){let l=s instanceof Re?s:e$(s);if(!l.retryable||a>=r)throw l;let u=YT(a,l);this.#e.logger.debug(`retrying ${i} after ${u}ms (attempt ${a+1}/${r}, ${l.code})`),await tE(u),a+=1}}}async#t(t,n,i){let r=AbortSignal.timeout(i),o=n.signal?AbortSignal.any([r,n.signal]):r,a={"User-Agent":XS,Accept:"application/json",...this.#e.defaultHeaders,...n.headers},s;try{s=await fetch(t,{method:n.method??"GET",headers:a,...n.body===void 0?{}:{body:n.body},signal:o})}catch(u){throw n.signal?.aborted?new Re({code:"network",message:"Request aborted by caller",cause:u}):r.aborted?new Re({code:"timeout",message:`Request timed out after ${i}ms`,retryable:!0,cause:u}):e$(u)}if(!s.ok)throw await KT(s,"Authorization"in a);if(s.status===204)return;let l=await s.text();if(l.length!==0)try{return JSON.parse(l)}catch(u){throw new Re({code:"unknown",message:"Upstream returned invalid JSON",cause:u})}}#r(t,n){let i=new URL(t.replace(/^\//,""),eE(this.#e.baseUrl));if(n)for(let[r,o]of Object.entries(n))o!==void 0&&i.searchParams.set(r,String(o));return i.toString()}};async function KT(e,t){let{code:n,retryable:i}=xu(e.status),r="";try{r=await e.text()}catch{}let o=WT(r)??r.slice(0,500),a=QT(e.headers.get("retry-after"));return new Re({code:n,status:e.status,retryable:i,authenticated:t,message:`HTTP ${e.status} ${e.statusText}${o?`: ${o}`:""}`,...a===void 0?{}:{cause:{retryAfterMs:a}}})}function WT(e){if(e)try{let t=JSON.parse(e);if(t===null||typeof t!="object")return;let n=t;if(typeof n.message=="string")return n.message;if(typeof n.error=="string")return n.error;if(Array.isArray(n.errors)&&n.errors.length>0){let i=n.errors[0],r=typeof i.message=="string"?i.message:void 0,o=i.validation!==null&&typeof i.validation=="object"?Object.entries(i.validation).map(([a,s])=>`${a}: ${Array.isArray(s)?s.join(", "):String(s)}`).join("; "):void 0;return r&&o?`${r} (${o})`:r??o}return}catch{return}}function e$(e){return e instanceof Re?e:new Re({code:"network",message:e instanceof Error?`Network error: ${e.message}`:"Network error",retryable:!0,cause:e})}function YT(e,t){let n=t.cause?.retryAfterMs;if(typeof n=="number"&&n>0)return Math.min(n,QS);let i=Math.min(QS,500*2**e);return i+Math.floor(i*.25*XT(e))}function XT(e){return e*2654435761%1e3/1e3}function QT(e){if(!e)return;let t=Number(e);if(Number.isFinite(t))return t*1e3;let n=Date.parse(e);if(Number.isFinite(n))return Math.max(0,n-Date.now())}function eE(e){return e.endsWith("/")?e:e+"/"}function tE(e){return new Promise(t=>setTimeout(t,e))}var Au=class{#e;#t;constructor(t){this.#e=new gi({baseUrl:t.endpoint,logger:t.logger,timeoutMs:t.timeoutMs,retries:t.retries,beforeRequest:t.beforeRequest,defaultHeaders:{"Content-Type":"application/json"}}),this.#t=t.cache}async request(t,n={},i,r){if(this.#t&&!r?.skipCache&&!/^\s*mutation\b/i.test(t)){let a=JSON.stringify({query:t,variables:n,auth:i?.Authorization??null});return this.#t.wrap(a,()=>this.#r(t,n,i))}let o=await this.#r(t,n,i);return this.#t&&this.#t.clear(),o}async#r(t,n,i){let r=JSON.stringify({query:t,variables:t$(n)}),o=await this.#e.requestJson("",{method:"POST",body:r,...i?{headers:i}:{}});if(o.errors?.length){let a=new Set(o.errors.map(u=>u.status).filter(u=>typeof u=="number")),s=a.size===1?[...a][0]:void 0,l=s!==void 0?xu(s):void 0;throw new Re({code:l?.code??"bad_request",status:s,retryable:l?.retryable,message:o.errors.map(rE).join("; ")})}if(o.data===null||o.data===void 0)throw new Re({code:"unknown",message:"AniList returned no data for this query"});return o.data}};function rE(e){if(!e.validation||Object.keys(e.validation).length===0)return e.message;let t=Object.entries(e.validation).map(([n,i])=>`${n}: ${i.join(", ")}`).join("; ");return`${e.message} (${t})`}function t$(e){let t={};for(let[n,i]of Object.entries(e))i!==void 0&&(t[n]=i!==null&&typeof i=="object"&&!Array.isArray(i)?t$(i):i);return t}var Ou=class{#e;#t;#r;#n=[];#o=Promise.resolve();#i=null;constructor(t,n=[]){this.#e=Math.max(0,t),this.#t=n,this.#r=n.reduce((i,r)=>Math.max(i,r.windowMs),0)}acquire(){let t=this.#o,n;return this.#o=new Promise(i=>{n=i}),t.then(async()=>{let i=this.#a();i>0&&await nE(i);let r=Date.now();this.#i=r,this.#s(r),n()})}#a(){let t=Date.now(),n=this.#i!==null?this.#i+this.#e:0;for(let i of this.#t){if(this.#n.length<i.limit)continue;let r=this.#n[this.#n.length-i.limit];n=Math.max(n,r+i.windowMs)}return Math.max(0,n-t)}#s(t){this.#n.push(t);let n=t-this.#r,i=0;for(;i<this.#n.length&&this.#n[i]<=n;)i+=1;i>0&&this.#n.splice(0,i)}};function nE(e){return new Promise(t=>setTimeout(t,e))}var Nu=class{#e;#t;#r=new Map;#n=new Map;constructor(t,n=500){this.#e=t,this.#t=n}get(t){let n=this.#r.get(t);if(n)return n.expires>Date.now()?n.value:void 0}getStale(t){return this.#r.get(t)?.value}clear(){this.#r.clear(),this.#n.clear()}set(t,n){if(!(this.#e<=0)){if(!this.#r.has(t)&&this.#r.size>=this.#t){let i=this.#r.keys().next().value;i!==void 0&&this.#r.delete(i)}this.#r.set(t,{value:n,expires:Date.now()+this.#e})}}async wrap(t,n){let i=this.get(t);return i!==void 0?i:this.#o(t,n)}async wrapStaleOnError(t,n){let i=this.get(t);if(i!==void 0)return i;try{return await this.#o(t,n)}catch(r){let o=this.getStale(t);if(o!==void 0)return o;throw r}}#o(t,n){let i=this.#n.get(t);if(i)return i;let r=n().then(o=>(this.set(t,o),o)).finally(()=>this.#n.delete(t));return this.#n.set(t,r),r}};import{mkdirSync as iE,readFileSync as oE,writeFileSync as aE}from"fs";import{homedir as r$,platform as sE}from"os";import{dirname as cE,join as sv}from"path";var cv=c.object({accessToken:c.string(),expiresAt:c.number()}).passthrough(),Cu=class{#e;#t;constructor(t,n){this.#e=t,this.#t=n}get path(){return this.#e}load(){let t;try{t=oE(this.#e,"utf8")}catch{return}let n;try{n=JSON.parse(t)}catch{this.#t.warn(`token store at ${this.#e} is not valid JSON; ignoring it`);return}let i=cv.safeParse(n);if(!i.success){this.#t.warn(`token store at ${this.#e} is malformed; ignoring it`);return}return i.data}save(t){iE(cE(this.#e),{recursive:!0,mode:448}),aE(this.#e,JSON.stringify(t,null,2),{mode:384})}};function n$(e=process.env){if(e.ANILIST_TOKEN_STORE)return e.ANILIST_TOKEN_STORE;let t=sE()==="win32"?e.APPDATA??sv(r$(),"AppData","Roaming"):e.XDG_CONFIG_HOME??sv(r$(),".config");return sv(t,"anilist-mcp-server","tokens.json")}import{createServer as lE}from"http";import{randomBytes as uE}from"crypto";import{spawn as dE}from"child_process";import{platform as lv}from"os";function i$(){return uE(16).toString("hex")}function o$(e){let t=new URLSearchParams({response_type:"code",client_id:e.clientId,redirect_uri:e.redirectUri});return e.state&&t.set("state",e.state),`${e.oauthBaseUrl.replace(/\/$/,"")}/authorize?${t.toString()}`}function a$(e){let t=e.trim(),n;try{n=new URL(t).searchParams}catch{t.includes("=")&&(n=new URLSearchParams(t.replace(/^\?/,"")))}if(n){let i=n.get("error");if(i)throw new Re({code:"bad_request",message:`authorization denied: ${i}`});let r=n.get("code");if(r)return r;throw new Re({code:"bad_request",message:"no `code` found in the pasted redirect URL"})}if(!t)throw new Re({code:"bad_request",message:"empty redirect/code"});return t}function s$(e){let t=e.trim();try{return new URL(t).searchParams.get("state")}catch{return t.includes("=")?new URLSearchParams(t.replace(/^\?/,"")).get("state"):null}}function c$(e){let t=lv()==="darwin"?"open":lv()==="win32"?"cmd":"xdg-open",n=lv()==="win32"?["/c","start","",e]:[e];try{let i=dE(t,n,{stdio:"ignore",detached:!0});i.on("error",()=>{}),i.unref()}catch{}}function l$(e){return new Promise((t,n)=>{let i=lE((r,o)=>{let a=null,s=null,l=null;try{let u=new URL(r.url??"/",`http://localhost:${e.port}`);if(!u.pathname.startsWith(e.path)){o.writeHead(404).end();return}a=u.searchParams.get("code"),s=u.searchParams.get("state"),l=u.searchParams.get("error")}catch{}o.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),o.end(l?"<h2>AniList login was denied. You can close this tab.</h2>":a?"<h2>Logged in to AniList \u2014 you can close this tab and return to your client.</h2>":"<h2>Waiting for the AniList redirect\u2026</h2>"),a&&e.onCode(a,s)});i.on("error",n),i.listen(e.port,"127.0.0.1",()=>{t({server:i,close:()=>i.close()})})})}function u$(e){let t=e.split(".");if(t.length===3)try{let n=JSON.parse(Buffer.from(t[1],"base64url").toString("utf8"));return typeof n.exp=="number"?n.exp*1e3:void 0}catch{return}}var mE=365*24*60*60*1e3,Lu=class{#e;#t;#r;#n;#o;#i;#a;#s;constructor(t,n){this.#e=t,this.#t=n;let i=new Ou(t.minIntervalMs),r=new Nu(t.cacheTtlMs);this.#r=new Au({endpoint:t.graphqlUrl,logger:n,timeoutMs:t.httpTimeoutMs,retries:t.httpRetries,beforeRequest:()=>i.acquire(),cache:r}),this.#n=new gi({baseUrl:t.oauthBaseUrl,logger:n,timeoutMs:t.httpTimeoutMs,retries:t.httpRetries}),this.#o=new Cu(t.auth.tokenStorePath??n$(),n),this.#i=t.auth.accessToken?{accessToken:t.auth.accessToken,expiresAt:1/0}:this.#o.load()}isConfigured(){return!!(this.#i&&this.#i.expiresAt>Date.now())}canLogin(){return this.#e.auth.canLogin}#c(){return this.isConfigured()?{Authorization:`Bearer ${this.#i.accessToken}`}:void 0}#u(){let t=this.#c();if(!t)throw new Re({code:"unauthorized",message:"Run login_anilist (or set ANILIST_ACCESS_TOKEN) before using this tool."});return t}ctx(){return{gql:this.#r,authHeader:()=>this.#c(),requireAuth:()=>this.#u()}}async startLogin(t={}){if(!this.#e.auth.clientId||!this.#e.auth.clientSecret)throw new Re({code:"bad_request",message:"ANILIST_CLIENT_ID and ANILIST_CLIENT_SECRET must both be set to log in."});let n=`http://localhost:${this.#e.oauthPort}/callback`,i=i$();this.#s=i;let r=o$({oauthBaseUrl:this.#e.oauthBaseUrl,clientId:this.#e.auth.clientId,redirectUri:n,state:i});this.#a?.close(),this.#a=void 0;let o=!1;try{let{close:a}=await l$({port:this.#e.oauthPort,path:"/callback",onCode:(s,l)=>{this.#l(s,l).finally(()=>{this.#a?.close(),this.#a=void 0})}});this.#a={close:a},o=!0}catch(a){this.#t.warn(`could not bind localhost:${this.#e.oauthPort}, use manual paste`,a)}return(t.open??c$)(r),{authorizeUrl:r,redirectUri:n,listening:o}}async submitRedirect(t){let n=a$(t);try{await this.#l(n,s$(t))}finally{this.#a?.close(),this.#a=void 0}}async#l(t,n){if(this.#s&&n!==this.#s)throw new Re({code:"unauthorized",message:"OAuth state mismatch \u2014 this redirect doesn't match the login attempt that started it. Run login_anilist again."});let i=`http://localhost:${this.#e.oauthPort}/callback`,r;try{r=await this.#n.requestJson("token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({grant_type:"authorization_code",client_id:this.#e.auth.clientId,client_secret:this.#e.auth.clientSecret,redirect_uri:i,code:t}),retries:0})}catch(s){throw s instanceof Re&&s.code==="bad_request"?new Re({code:"bad_request",message:`AniList rejected the authorization code (it may be expired, already used, or invalid) \u2014 run login_anilist again for a fresh one. (${s.message})`}):s}if(this.#s=void 0,!r.access_token)throw new Re({code:"unknown",message:"AniList's token response had no access_token"});let o=u$(r.access_token)??Date.now()+mE,a=cv.safeParse({accessToken:r.access_token,expiresAt:o});if(!a.success)throw new Re({code:"unknown",message:"AniList's token response had a malformed access_token"});this.#i=a.data,this.#o?.save(this.#i)}};function vi(e,t,n){let i=n?`id:$${t},${n}`:`id:$${t}`;return`exists:${e}(${i}){id}`}var qu=`
|
|
75
|
+
deps: ${d}}`};let r={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){let[u,d]=o(c);a(c,u),s(c,d)}};function o({schema:c}){let u={},d={};for(let p in c){if(p==="__proto__")continue;let f=Array.isArray(c[p])?u:d;f[p]=c[p]}return[u,d]}function a(c,u=c.schema){let{gen:d,data:p,it:f}=c;if(Object.keys(u).length===0)return;let b=d.let("missing");for(let v in u){let $=u[v];if($.length===0)continue;let y=(0,i.propertyInData)(d,p,v,f.opts.ownProperties);c.setParams({property:v,depsCount:$.length,deps:$.join(", ")}),f.allErrors?d.if(y,()=>{for(let h of $)(0,i.checkReportMissingProp)(c,h)}):(d.if((0,t._)`${y} && (${(0,i.checkMissingProp)(c,$,b)})`),(0,i.reportMissingProp)(c,b),d.else())}}e.validatePropertyDeps=a;function s(c,u=c.schema){let{gen:d,data:p,keyword:f,it:b}=c,v=d.name("valid");for(let $ in u)(0,n.alwaysValidSchema)(b,u[$])||(d.if((0,i.propertyInData)(d,p,$,b.opts.ownProperties),()=>{let y=c.subschema({keyword:f,schemaProp:$},v);c.mergeValidEvaluated(y,v)},()=>d.var(v,!0)),c.ok(v))}e.validateSchemaDeps=s,e.default=r})),Wk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=Te(),i={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:o,schema:a,data:s,it:c}=r;if((0,n.alwaysValidSchema)(c,a))return;let u=o.name("valid");o.forIn("key",s,d=>{r.setParams({propertyName:d}),r.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},u),o.if((0,t.not)(u),()=>{r.error(!0),c.allErrors||o.break()})}),r.ok(u)}};e.default=i})),jS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xt(),n=_e(),i=Pt(),r=Te(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:a})=>(0,n._)`{additionalProperty: ${a.additionalProperty}}`},code(a){let{gen:s,schema:c,parentSchema:u,data:d,errsCount:p,it:f}=a;if(!p)throw new Error("ajv implementation error");let{allErrors:b,opts:v}=f;if(f.props=!0,v.removeAdditional!=="all"&&(0,r.alwaysValidSchema)(f,c))return;let $=(0,t.allSchemaProperties)(u.properties),y=(0,t.allSchemaProperties)(u.patternProperties);h(),a.ok((0,n._)`${p} === ${i.default.errors}`);function h(){s.forIn("key",d,w=>{!$.length&&!y.length?S(w):s.if(z(w),()=>S(w))})}function z(w){let _;if($.length>8){let I=(0,r.schemaRefOrVal)(f,u.properties,"properties");_=(0,t.isOwnProperty)(s,I,w)}else $.length?_=(0,n.or)(...$.map(I=>(0,n._)`${w} === ${I}`)):_=n.nil;return y.length&&(_=(0,n.or)(_,...y.map(I=>(0,n._)`${(0,t.usePattern)(a,I)}.test(${w})`))),(0,n.not)(_)}function g(w){s.code((0,n._)`delete ${d}[${w}]`)}function S(w){if(v.removeAdditional==="all"||v.removeAdditional&&c===!1){g(w);return}if(c===!1){a.setParams({additionalProperty:w}),a.error(),b||s.break();return}if(typeof c=="object"&&!(0,r.alwaysValidSchema)(f,c)){let _=s.name("valid");v.removeAdditional==="failing"?(k(w,_,!1),s.if((0,n.not)(_),()=>{a.reset(),g(w)})):(k(w,_),b||s.if((0,n.not)(_),()=>s.break()))}}function k(w,_,I){let j={keyword:"additionalProperties",dataProp:w,dataPropType:r.Type.Str};I===!1&&Object.assign(j,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(j,_)}}};e.default=o})),Yk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=gi(),n=xt(),i=Te(),r=jS(),o={keyword:"properties",type:"object",schemaType:"object",code(a){let{gen:s,schema:c,parentSchema:u,data:d,it:p}=a;p.opts.removeAdditional==="all"&&u.additionalProperties===void 0&&r.default.code(new t.KeywordCxt(p,r.default,"additionalProperties"));let f=(0,n.allSchemaProperties)(c);for(let h of f)p.definedProperties.add(h);p.opts.unevaluated&&f.length&&p.props!==!0&&(p.props=i.mergeEvaluated.props(s,(0,i.toHash)(f),p.props));let b=f.filter(h=>!(0,i.alwaysValidSchema)(p,c[h]));if(b.length===0)return;let v=s.name("valid");for(let h of b)$(h)?y(h):(s.if((0,n.propertyInData)(s,d,h,p.opts.ownProperties)),y(h),p.allErrors||s.else().var(v,!0),s.endIf()),a.it.definedProperties.add(h),a.ok(v);function $(h){return p.opts.useDefaults&&!p.compositeRule&&c[h].default!==void 0}function y(h){a.subschema({keyword:"properties",schemaProp:h,dataProp:h},v)}}};e.default=o})),Xk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=xt(),n=_e(),i=Te(),r=Te(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(a){let{gen:s,schema:c,data:u,parentSchema:d,it:p}=a,{opts:f}=p,b=(0,t.allSchemaProperties)(c),v=b.filter(k=>(0,i.alwaysValidSchema)(p,c[k]));if(b.length===0||v.length===b.length&&(!p.opts.unevaluated||p.props===!0))return;let $=f.strictSchema&&!f.allowMatchingProperties&&d.properties,y=s.name("valid");p.props!==!0&&!(p.props instanceof n.Name)&&(p.props=(0,r.evaluatedPropsToName)(s,p.props));let{props:h}=p;z();function z(){for(let k of b)$&&g(k),p.allErrors?S(k):(s.var(y,!0),S(k),s.if(y))}function g(k){for(let w in $)new RegExp(k).test(w)&&(0,i.checkStrictMode)(p,`property ${w} matches pattern ${k} (use allowMatchingProperties)`)}function S(k){s.forIn("key",u,w=>{s.if((0,n._)`${(0,t.usePattern)(a,k)}.test(${w})`,()=>{let _=v.includes(k);_||a.subschema({keyword:"patternProperties",schemaProp:k,dataProp:w,dataPropType:r.Type.Str},y),p.opts.unevaluated&&h!==!0?s.assign((0,n._)`${h}[${w}]`,!0):!_&&!p.allErrors&&s.if((0,n.not)(y),()=>s.break())})})}}};e.default=o})),Qk=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Te(),n={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(i){let{gen:r,schema:o,it:a}=i;if((0,t.alwaysValidSchema)(a,o)){i.fail();return}let s=r.name("valid");i.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),i.failResult(s,()=>i.reset(),()=>i.error())},error:{message:"must NOT be valid"}};e.default=n})),eT=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:xt().validateUnion,error:{message:"must match a schema in anyOf"}};e.default=t})),tT=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=Te(),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:r})=>(0,t._)`{passingSchemas: ${r.passing}}`},code(r){let{gen:o,schema:a,parentSchema:s,it:c}=r;if(!Array.isArray(a))throw new Error("ajv implementation error");if(c.opts.discriminator&&s.discriminator)return;let u=a,d=o.let("valid",!1),p=o.let("passing",null),f=o.name("_valid");r.setParams({passing:p}),o.block(b),r.result(d,()=>r.reset(),()=>r.error(!0));function b(){u.forEach((v,$)=>{let y;(0,n.alwaysValidSchema)(c,v)?o.var(f,!0):y=r.subschema({keyword:"oneOf",schemaProp:$,compositeRule:!0},f),$>0&&o.if((0,t._)`${f} && ${d}`).assign(d,!1).assign(p,(0,t._)`[${p}, ${$}]`).else(),o.if(f,()=>{o.assign(d,!0),o.assign(p,$),y&&r.mergeEvaluated(y,t.Name)})})}}};e.default=i})),rT=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Te(),n={keyword:"allOf",schemaType:"array",code(i){let{gen:r,schema:o,it:a}=i;if(!Array.isArray(o))throw new Error("ajv implementation error");let s=r.name("valid");o.forEach((c,u)=>{if((0,t.alwaysValidSchema)(a,c))return;let d=i.subschema({keyword:"allOf",schemaProp:u},s);i.ok(s),i.mergeEvaluated(d)})}};e.default=n})),nT=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=Te(),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,t.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,t._)`{failingKeyword: ${o.ifClause}}`},code(o){let{gen:a,parentSchema:s,it:c}=o;s.then===void 0&&s.else===void 0&&(0,n.checkStrictMode)(c,'"if" without "then" and "else" is ignored');let u=r(c,"then"),d=r(c,"else");if(!u&&!d)return;let p=a.let("valid",!0),f=a.name("_valid");if(b(),o.reset(),u&&d){let $=a.let("ifClause");o.setParams({ifClause:$}),a.if(f,v("then",$),v("else",$))}else u?a.if(f,v("then")):a.if((0,t.not)(f),v("else"));o.pass(p,()=>o.error(!0));function b(){let $=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},f);o.mergeEvaluated($)}function v($,y){return()=>{let h=o.subschema({keyword:$},f);a.assign(p,f),o.mergeValidEvaluated(h,p),y?a.assign(y,(0,t._)`${$}`):o.setParams({ifClause:$})}}}};function r(o,a){let s=o.schema[a];return s!==void 0&&!(0,n.alwaysValidSchema)(o,s)}e.default=i})),iT=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Te(),n={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:i,parentSchema:r,it:o}){r.if===void 0&&(0,t.checkStrictMode)(o,`"${i}" without "if" is ignored`)}};e.default=n})),AS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=PS(),n=Gk(),i=xS(),r=Bk(),o=Kk(),a=cv(),s=Wk(),c=jS(),u=Yk(),d=Xk(),p=Qk(),f=eT(),b=tT(),v=rT(),$=nT(),y=iT();function h(z=!1){let g=[p.default,f.default,b.default,v.default,$.default,y.default,s.default,c.default,a.default,u.default,d.default];return z?g.push(n.default,r.default):g.push(t.default,i.default),g.push(o.default),g}e.default=h})),oT=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,t.str)`must match format "${i}"`,params:({schemaCode:i})=>(0,t._)`{format: ${i}}`},code(i,r){let{gen:o,data:a,$data:s,schema:c,schemaCode:u,it:d}=i,{opts:p,errSchemaPath:f,schemaEnv:b,self:v}=d;if(!p.validateFormats)return;s?$():y();function $(){let h=o.scopeValue("formats",{ref:v.formats,code:p.code.formats}),z=o.const("fDef",(0,t._)`${h}[${u}]`),g=o.let("fType"),S=o.let("format");o.if((0,t._)`typeof ${z} == "object" && !(${z} instanceof RegExp)`,()=>o.assign(g,(0,t._)`${z}.type || "string"`).assign(S,(0,t._)`${z}.validate`),()=>o.assign(g,(0,t._)`"string"`).assign(S,z)),i.fail$data((0,t.or)(k(),w()));function k(){return p.strictSchema===!1?t.nil:(0,t._)`${u} && !${S}`}function w(){let _=b.$async?(0,t._)`(${z}.async ? await ${S}(${a}) : ${S}(${a}))`:(0,t._)`${S}(${a})`,I=(0,t._)`(typeof ${S} == "function" ? ${_} : ${S}.test(${a}))`;return(0,t._)`${S} && ${S} !== true && ${g} === ${r} && !${I}`}}function y(){let h=v.formats[c];if(!h){k();return}if(h===!0)return;let[z,g,S]=w(h);z===r&&i.pass(_());function k(){if(p.strictSchema===!1){v.logger.warn(I());return}throw new Error(I());function I(){return`unknown format "${c}" ignored in schema at path "${f}"`}}function w(I){let j=I instanceof RegExp?(0,t.regexpCode)(I):p.code.formats?(0,t._)`${p.code.formats}${(0,t.getProperty)(c)}`:void 0,U=o.scopeValue("formats",{key:c,ref:I,code:j});return typeof I=="object"&&!(I instanceof RegExp)?[I.type||"string",I.validate,(0,t._)`${U}.validate`]:["string",I,U]}function _(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!b.$async)throw new Error("async format in sync schema");return(0,t._)`await ${S}(${a})`}return typeof g=="function"?(0,t._)`${S}(${a})`:(0,t._)`${S}.test(${a})`}}}};e.default=n})),OS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=[oT().default];e.default=t})),CS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.contentVocabulary=e.metadataVocabulary=void 0,e.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],e.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]})),NS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=TS(),n=ES(),i=AS(),r=OS(),o=CS(),a=[t.default,n.default,(0,i.default)(),r.default,o.metadataVocabulary,o.contentVocabulary];e.default=a})),aT=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0;var t;(function(n){n.Tag="tag",n.Mapping="mapping"})(t||(e.DiscrError=t={}))})),lv=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=aT(),i=Au(),r=vi(),o=Te(),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:s,tagName:c}})=>s===n.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:s,tag:c,tagName:u}})=>(0,t._)`{error: ${s}, tag: ${u}, tagValue: ${c}}`},code(s){let{gen:c,data:u,schema:d,parentSchema:p,it:f}=s,{oneOf:b}=p;if(!f.opts.discriminator)throw new Error("discriminator: requires discriminator option");let v=d.propertyName;if(typeof v!="string")throw new Error("discriminator: requires propertyName");if(d.mapping)throw new Error("discriminator: mapping is not supported");if(!b)throw new Error("discriminator: requires oneOf keyword");let $=c.let("valid",!1),y=c.const("tag",(0,t._)`${u}${(0,t.getProperty)(v)}`);c.if((0,t._)`typeof ${y} == "string"`,()=>h(),()=>s.error(!1,{discrError:n.DiscrError.Tag,tag:y,tagName:v})),s.ok($);function h(){let S=g();c.if(!1);for(let k in S)c.elseIf((0,t._)`${y} === ${k}`),c.assign($,z(S[k]));c.else(),s.error(!1,{discrError:n.DiscrError.Mapping,tag:y,tagName:v}),c.endIf()}function z(S){let k=c.name("valid"),w=s.subschema({keyword:"oneOf",schemaProp:S},k);return s.mergeEvaluated(w,t.Name),k}function g(){var S;let k={},w=I(p),_=!0;for(let N=0;N<b.length;N++){let F=b[N];if(F?.$ref&&!(0,o.schemaHasRulesButRef)(F,f.self.RULES)){let ne=F.$ref;if(F=i.resolveRef.call(f.self,f.schemaEnv.root,f.baseId,ne),F instanceof i.SchemaEnv&&(F=F.schema),F===void 0)throw new r.default(f.opts.uriResolver,f.baseId,ne)}let ee=(S=F?.properties)===null||S===void 0?void 0:S[v];if(typeof ee!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${v}"`);_=_&&(w||I(F)),j(ee,N)}if(!_)throw new Error(`discriminator: "${v}" must be required`);return k;function I({required:N}){return Array.isArray(N)&&N.includes(v)}function j(N,F){if(N.const)U(N.const,F);else if(N.enum)for(let ee of N.enum)U(ee,F);else throw new Error(`discriminator: "properties/${v}" must have "const" or "enum"`)}function U(N,F){if(typeof N!="string"||N in k)throw new Error(`discriminator: "${v}" values must be unique strings`);k[N]=F}}}};e.default=a})),sT=Z(((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:!0,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:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},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:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},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:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},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:!0}})),LS=Z(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv=void 0;let n=ov(),i=NS(),r=lv(),o=sT(),a=["/properties"],s="http://json-schema.org/draft-07/schema";var c=class extends n.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(b=>this.addVocabulary(b)),this.opts.discriminator&&this.addKeyword(r.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let b=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(b,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var u=gi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var d=_e();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var p=ma();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return p.default}});var f=vi();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return f.default}})})),qS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicAnchor=void 0;let t=_e(),n=Pt(),i=Au(),r=av(),o={keyword:"$dynamicAnchor",schemaType:"string",code:c=>a(c,c.schema)};function a(c,u){let{gen:d,it:p}=c;p.schemaEnv.root.dynamicAnchors[u]=!0;let f=(0,t._)`${n.default.dynamicAnchors}${(0,t.getProperty)(u)}`,b=p.errSchemaPath==="#"?p.validateName:s(c);d.if((0,t._)`!${f}`,()=>d.assign(f,b))}e.dynamicAnchor=a;function s(c){let{schemaEnv:u,schema:d,self:p}=c.it,{root:f,baseId:b,localRefs:v,meta:$}=u.root,{schemaId:y}=p.opts,h=new i.SchemaEnv({schema:d,schemaId:y,root:f,baseId:b,localRefs:v,meta:$});return i.compileSchema.call(p,h),(0,r.getValidate)(c,h)}e.default=o})),MS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicRef=void 0;let t=_e(),n=Pt(),i=av(),r={keyword:"$dynamicRef",schemaType:"string",code:a=>o(a,a.schema)};function o(a,s){let{gen:c,keyword:u,it:d}=a;if(s[0]!=="#")throw new Error(`"${u}" only supports hash fragment reference`);let p=s.slice(1);if(d.allErrors)f();else{let v=c.let("valid",!1);f(v),a.ok(v)}function f(v){if(d.schemaEnv.root.dynamicAnchors[p]){let $=c.let("_v",(0,t._)`${n.default.dynamicAnchors}${(0,t.getProperty)(p)}`);c.if($,b($,v),b(d.validateName,v))}else b(d.validateName,v)()}function b(v,$){return $?()=>c.block(()=>{(0,i.callRef)(a,v),c.let($,!0)}):()=>(0,i.callRef)(a,v)}}e.dynamicRef=o,e.default=r})),cT=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=qS(),n=Te(),i={keyword:"$recursiveAnchor",schemaType:"boolean",code(r){r.schema?(0,t.dynamicAnchor)(r,""):(0,n.checkStrictMode)(r.it,"$recursiveAnchor: false is ignored")}};e.default=i})),lT=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=MS(),n={keyword:"$recursiveRef",schemaType:"string",code:i=>(0,t.dynamicRef)(i,i.schema)};e.default=n})),DS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=qS(),n=MS(),i=cT(),r=lT(),o=[t.default,n.default,i.default,r.default];e.default=o})),uT=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=cv(),n={keyword:"dependentRequired",type:"object",schemaType:"object",error:t.error,code:i=>(0,t.validatePropertyDeps)(i)};e.default=n})),dT=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=cv(),n={keyword:"dependentSchemas",type:"object",schemaType:"object",code:i=>(0,t.validateSchemaDeps)(i)};e.default=n})),mT=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Te(),n={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:i,parentSchema:r,it:o}){r.contains===void 0&&(0,t.checkStrictMode)(o,`"${i}" without "contains" is ignored`)}};e.default=n})),US=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=uT(),n=dT(),i=mT(),r=[t.default,n.default,i.default];e.default=r})),pT=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=Te(),i=Pt(),r={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:o})=>(0,t._)`{unevaluatedProperty: ${o.unevaluatedProperty}}`},code(o){let{gen:a,schema:s,data:c,errsCount:u,it:d}=o;if(!u)throw new Error("ajv implementation error");let{allErrors:p,props:f}=d;f instanceof t.Name?a.if((0,t._)`${f} !== true`,()=>a.forIn("key",c,y=>a.if(v(f,y),()=>b(y)))):f!==!0&&a.forIn("key",c,y=>f===void 0?b(y):a.if($(f,y),()=>b(y))),d.props=!0,o.ok((0,t._)`${u} === ${i.default.errors}`);function b(y){if(s===!1){o.setParams({unevaluatedProperty:y}),o.error(),p||a.break();return}if(!(0,n.alwaysValidSchema)(d,s)){let h=a.name("valid");o.subschema({keyword:"unevaluatedProperties",dataProp:y,dataPropType:n.Type.Str},h),p||a.if((0,t.not)(h),()=>a.break())}}function v(y,h){return(0,t._)`!${y} || !${y}[${h}]`}function $(y,h){let z=[];for(let g in y)y[g]===!0&&z.push((0,t._)`${h} !== ${g}`);return(0,t.and)(...z)}}};e.default=r})),hT=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=_e(),n=Te(),i={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:o,schema:a,data:s,it:c}=r,u=c.items||0;if(u===!0)return;let d=o.const("len",(0,t._)`${s}.length`);if(a===!1)r.setParams({len:u}),r.fail((0,t._)`${d} > ${u}`);else if(typeof a=="object"&&!(0,n.alwaysValidSchema)(c,a)){let f=o.var("valid",(0,t._)`${d} <= ${u}`);o.if((0,t.not)(f),()=>p(f,u)),r.ok(f)}c.items=!0;function p(f,b){o.forRange("i",b,d,v=>{r.subschema({keyword:"unevaluatedItems",dataProp:v,dataPropType:n.Type.Num},f),c.allErrors||o.if((0,t.not)(f),()=>o.break())})}}};e.default=i})),FS=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=pT(),n=hT(),i=[t.default,n.default];e.default=i})),fT=Z(((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":!0,"https://json-schema.org/draft/2019-09/vocab/applicator":!0,"https://json-schema.org/draft/2019-09/vocab/validation":!0,"https://json-schema.org/draft/2019-09/vocab/meta-data":!0,"https://json-schema.org/draft/2019-09/vocab/format":!1,"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,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"}]}}}}})),gT=Z(((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":!0},$recursiveAnchor:!0,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:"#"}}}}})),vT=Z(((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":!0},$recursiveAnchor:!0,title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$recursiveRef:"#"}}}})),yT=Z(((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":!0},$recursiveAnchor:!0,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:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}}}}})),_T=Z(((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":!0},$recursiveAnchor:!0,title:"Format vocabulary meta-schema",type:["object","boolean"],properties:{format:{type:"string"}}}})),bT=Z(((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":!0},$recursiveAnchor:!0,title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}})),ST=Z(((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":!0},$recursiveAnchor:!0,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:!1},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:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]}},$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:!0,default:[]}}}})),$T=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=fT(),n=gT(),i=vT(),r=yT(),o=_T(),a=bT(),s=ST(),c=["/properties"];function u(d){return[t,n,i,r,p(this,o),a,p(this,s)].forEach(f=>this.addMetaSchema(f,void 0,!1)),this;function p(f,b){return d?f.$dataMetaSchema(b,c):b}}e.default=u})),wT=Z(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2019=void 0;let n=ov(),i=NS(),r=DS(),o=US(),a=FS(),s=lv(),c=$T(),u="https://json-schema.org/draft/2019-09/schema";var d=class extends n.default{constructor($={}){super({...$,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(r.default),i.default.forEach($=>this.addVocabulary($)),this.addVocabulary(o.default),this.addVocabulary(a.default),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:$,meta:y}=this.opts;y&&(c.default.call(this,$),this.refs["http://json-schema.org/schema"]=u)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}};e.Ajv2019=d,t.exports=e=d,t.exports.Ajv2019=d,Object.defineProperty(e,"__esModule",{value:!0}),e.default=d;var p=gi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return p.KeywordCxt}});var f=_e();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var b=ma();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return b.default}});var v=vi();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return v.default}})})),zT=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=TS(),n=ES(),i=AS(),r=DS(),o=US(),a=FS(),s=OS(),c=CS(),u=[r.default,t.default,n.default,(0,i.default)(!0),s.default,c.metadataVocabulary,c.contentVocabulary,o.default,a.default];e.default=u})),IT=Z(((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":!0,"https://json-schema.org/draft/2020-12/vocab/applicator":!0,"https://json-schema.org/draft/2020-12/vocab/unevaluated":!0,"https://json-schema.org/draft/2020-12/vocab/validation":!0,"https://json-schema.org/draft/2020-12/vocab/meta-data":!0,"https://json-schema.org/draft/2020-12/vocab/format-annotation":!0,"https://json-schema.org/draft/2020-12/vocab/content":!0},$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:!0,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:!0,default:{}},$recursiveAnchor:{$comment:'"$recursiveAnchor" has been replaced by "$dynamicAnchor".',$ref:"meta/core#/$defs/anchorString",deprecated:!0},$recursiveRef:{$comment:'"$recursiveRef" has been replaced by "$dynamicRef".',$ref:"meta/core#/$defs/uriReferenceString",deprecated:!0}}}})),RT=Z(((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":!0},$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"}}}}})),kT=Z(((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":!0},$dynamicAnchor:"meta",title:"Unevaluated applicator vocabulary meta-schema",type:["object","boolean"],properties:{unevaluatedItems:{$dynamicRef:"#meta"},unevaluatedProperties:{$dynamicRef:"#meta"}}}})),TT=Z(((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":!0},$dynamicAnchor:"meta",title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentEncoding:{type:"string"},contentMediaType:{type:"string"},contentSchema:{$dynamicRef:"#meta"}}}})),ET=Z(((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":!0},$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"}}}})),PT=Z(((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":!0},$dynamicAnchor:"meta",title:"Format vocabulary meta-schema for annotation results",type:["object","boolean"],properties:{format:{type:"string"}}}})),xT=Z(((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":!0},$dynamicAnchor:"meta",title:"Meta-data vocabulary meta-schema",type:["object","boolean"],properties:{title:{type:"string"},description:{type:"string"},default:!0,deprecated:{type:"boolean",default:!1},readOnly:{type:"boolean",default:!1},writeOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0}}}})),jT=Z(((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":!0},$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:!0}]},const:!0,enum:{type:"array",items:!0},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:!1},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:!0,default:[]}}}})),AT=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=IT(),n=RT(),i=kT(),r=TT(),o=ET(),a=PT(),s=xT(),c=jT(),u=["/properties"];function d(p){return[t,n,i,r,o,f(this,a),s,f(this,c)].forEach(b=>this.addMetaSchema(b,void 0,!1)),this;function f(b,v){return p?b.$dataMetaSchema(v,u):v}}e.default=d})),OT=Z(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.MissingRefError=e.ValidationError=e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=e.Ajv2020=void 0;let n=ov(),i=zT(),r=lv(),o=AT(),a="https://json-schema.org/draft/2020-12/schema";var s=class extends n.default{constructor(f={}){super({...f,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),i.default.forEach(f=>this.addVocabulary(f)),this.opts.discriminator&&this.addKeyword(r.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:f,meta:b}=this.opts;b&&(o.default.call(this,f),this.refs["http://json-schema.org/schema"]=a)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}};e.Ajv2020=s,t.exports=e=s,t.exports.Ajv2020=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var c=gi();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var u=_e();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var d=ma();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return d.default}});var p=vi();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return p.default}})})),CT=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(N,F){return{validate:N,compare:F}}e.fullFormats={date:t(o,a),time:t(c(!0),u),"date-time":t(f(!0),b),"iso-time":t(c(),d),"iso-date-time":t(f(),v),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:h,"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:U,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:g,int32:{type:"number",validate:w},int64:{type:"number",validate:_},float:{type:"number",validate:I},double:{type:"number",validate:I},password:!0,binary:!0},e.fastFormats={...e.fullFormats,date:t(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),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,b),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,d),"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,v),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 i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,r=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(N){let F=i.exec(N);if(!F)return!1;let ee=+F[1],ne=+F[2],we=+F[3];return ne>=1&&ne<=12&&we>=1&&we<=(ne===2&&n(ee)?29:r[ne])}function a(N,F){if(N&&F)return N>F?1:N<F?-1:0}let s=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(N){return function(ee){let ne=s.exec(ee);if(!ne)return!1;let we=+ne[1],Ne=+ne[2],Ae=+ne[3],Je=ne[4],ke=ne[5]==="-"?-1:1,x=+(ne[6]||0),M=+(ne[7]||0);if(x>23||M>59||N&&!Je)return!1;if(we<=23&&Ne<=59&&Ae<60)return!0;let J=Ne-M*ke,R=we-x*ke-(J<0?1:0);return(R===23||R===-1)&&(J===59||J===-1)&&Ae<61}}function u(N,F){if(!(N&&F))return;let ee=new Date("2020-01-01T"+N).valueOf(),ne=new Date("2020-01-01T"+F).valueOf();if(ee&&ne)return ee-ne}function d(N,F){if(!(N&&F))return;let ee=s.exec(N),ne=s.exec(F);if(ee&&ne)return N=ee[1]+ee[2]+ee[3],F=ne[1]+ne[2]+ne[3],N>F?1:N<F?-1:0}let p=/t|\s/i;function f(N){let F=c(N);return function(ne){let we=ne.split(p);return we.length===2&&o(we[0])&&F(we[1])}}function b(N,F){if(!(N&&F))return;let ee=new Date(N).valueOf(),ne=new Date(F).valueOf();if(ee&&ne)return ee-ne}function v(N,F){if(!(N&&F))return;let[ee,ne]=N.split(p),[we,Ne]=F.split(p),Ae=a(ee,we);if(Ae!==void 0)return Ae||u(ne,Ne)}let $=/\/|:/,y=/^(?:[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 h(N){return $.test(N)&&y.test(N)}let z=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function g(N){return z.lastIndex=0,z.test(N)}let S=-(2**31),k=2**31-1;function w(N){return Number.isInteger(N)&&N<=k&&N>=S}function _(N){return Number.isInteger(N)}function I(){return!0}let j=/[^\\]\\Z/;function U(N){if(j.test(N))return!1;try{return new RegExp(N),!0}catch{return!1}}})),NT=Z((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;let t=LS(),n=_e(),i=n.operators,r={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},o={message:({keyword:s,schemaCode:c})=>(0,n.str)`should be ${r[s].okStr} ${c}`,params:({keyword:s,schemaCode:c})=>(0,n._)`{comparison: ${r[s].okStr}, limit: ${c}}`};e.formatLimitDefinition={keyword:Object.keys(r),type:"string",schemaType:"string",$data:!0,error:o,code(s){let{gen:c,data:u,schemaCode:d,keyword:p,it:f}=s,{opts:b,self:v}=f;if(!b.validateFormats)return;let $=new t.KeywordCxt(f,v.RULES.all.format.definition,"format");$.$data?y():h();function y(){let g=c.scopeValue("formats",{ref:v.formats,code:b.code.formats}),S=c.const("fmt",(0,n._)`${g}[${$.schemaCode}]`);s.fail$data((0,n.or)((0,n._)`typeof ${S} != "object"`,(0,n._)`${S} instanceof RegExp`,(0,n._)`typeof ${S}.compare != "function"`,z(S)))}function h(){let g=$.schema,S=v.formats[g];if(!S||S===!0)return;if(typeof S!="object"||S instanceof RegExp||typeof S.compare!="function")throw new Error(`"${p}": format "${g}" does not define "compare" function`);let k=c.scopeValue("formats",{key:g,ref:S,code:b.code.formats?(0,n._)`${b.code.formats}${(0,n.getProperty)(g)}`:void 0});s.fail$data(z(k))}function z(g){return(0,n._)`${g}.compare(${u}, ${d}) ${r[p].fail} 0`}},dependencies:["format"]};let a=s=>(s.addKeyword(e.formatLimitDefinition),s);e.default=a})),LT=Z(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});let n=CT(),i=NT(),r=_e(),o=new r.Name("fullFormats"),a=new r.Name("fastFormats"),s=(u,d={keywords:!0})=>{if(Array.isArray(d))return c(u,d,n.fullFormats,o),u;let[p,f]=d.mode==="fast"?[n.fastFormats,a]:[n.fullFormats,o];return c(u,d.formats||n.formatNames,p,f),d.keywords&&(0,i.default)(u),u};s.get=(u,d="full")=>{let p=(d==="fast"?n.fastFormats:n.fullFormats)[u];if(!p)throw new Error(`Unknown format "${u}"`);return p};function c(u,d,p,f){var b,v;(b=(v=u.opts.code).formats)!==null&&b!==void 0||(v.formats=(0,r._)`require("ajv-formats/dist/formats").${f}`);for(let $ of d)u.addFormat($,p[$])}t.exports=e=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s})),VS=LS(),qT=wT(),MT=OT(),DT=Da(LT(),1),UT=DT.default;function iv(e){let t=new e({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return UT(t),t}var Ou=class{_ajv;_ajvDraft7;_ajv2019;_userAjv;constructor(e){this._userAjv=e!==void 0,this._ajv=e}get ajv(){return this._ajv??=iv(MT.Ajv2020)}_engineFor(e){if(this._userAjv)return this.ajv;let t=jv(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??=iv(qT.Ajv2019):this._ajvDraft7??=iv(VS.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 i=>n(i)?{valid:!0,data:i,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:t.errorsText(n.errors)}}},tO=VS.Ajv;import uv from"process";var XS=Symbol.for("mcp.completable");function mv(e){return!!e&&typeof e=="object"&&XS in e}function VT(e){return e[XS]?.complete}var JO=2**31-1;function ZT(e,t){switch(t.kind){case"tools_list_changed":return e.toolsListChanged===!0;case"prompts_list_changed":return e.promptsListChanged===!0;case"resources_list_changed":return e.resourcesListChanged===!0;case"resource_updated":return e.resourceSubscriptions!==void 0&&e.resourceSubscriptions.includes(t.uri)}}function HT(e,t){let n={},i=r=>t===void 0||r===!0;return e.toolsListChanged===!0&&i(t?.tools?.listChanged)&&(n.toolsListChanged=!0),e.promptsListChanged===!0&&i(t?.prompts?.listChanged)&&(n.promptsListChanged=!0),e.resourcesListChanged===!0&&i(t?.resources?.listChanged)&&(n.resourcesListChanged=!0),e.resourceSubscriptions!==void 0&&e.resourceSubscriptions.length>0&&i(t?.resources?.subscribe)&&(n.resourceSubscriptions=[...e.resourceSubscriptions]),n}var Cu=1024;function ZS(e,t){return{method:e.method,params:{...e.params,_meta:{...e.params?._meta,[tn]:t}}}}function JT(e){let t=kr(ua).validateRequest("subscriptions/listen",e);return t.ok?t.value.params?.notifications:void 0}var GT=new Set(["notifications/tools/list_changed","notifications/prompts/list_changed","notifications/resources/list_changed","notifications/resources/updated"]),QS=class{_subs=new Map;_serverCapabilities;_serverInfo;constructor(e=Cu,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=JT(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=HT(t,this._serverCapabilities);return this._subs.set(e.id,n),ZS({method:"notifications/subscriptions/acknowledged",params:{notifications:n}},e.id)}cancel(e){return this._subs.delete(e)}routeOutbound(e){if(!GT.has(e.method))return"passthrough";let t=e.params?.uri,n=typeof t=="string"?t:void 0,i=BT(e.method,n),r=[];for(let[o,a]of this._subs)ZT(a,i)&&r.push(ZS({method:e.method,params:e.params??{}},o));return r}teardownAll(){let e=[];for(let t of this._subs.keys())e.push({jsonrpc:"2.0",id:t,result:{resultType:"complete",_meta:{[tn]:t,...this._serverInfo!==void 0&&{[Ut]:this._serverInfo}}}});return this._subs.clear(),e}};function BT(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 KT=8,WT=6e5;function YT(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??KT,roundTimeoutMs:e?.roundTimeoutMs??WT,legacyShim:e?.legacyShim??!0}}function e$(e,t,n){if(n===null||typeof n!="object"||typeof n.method!="string")throw new me(X.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 i=n,r=Hb(i);if(r===void 0)throw new me(X.InternalError,`Handler for ${e} returned an input request '${t}' of kind '${i.method}', which is not an embedded request the 2026-07-28 revision defines`);return{embedded:i,required:r}}function XT(){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(i=>i.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 dv(e,t){if(e==="tools/call")return{content:[{type:"text",text:t}],isError:!0};throw new me(X.InternalError,t)}var QT=class{constructor(e){this._host=e}async fulfill(e,t,n,i,r){let{maxRounds:o,roundTimeoutMs:a}=this._host,s=i.mcpReq.signal,c=r,u=0;for(;;){if(u+=1,u>o)return dv(e,pS(e,o));let d=c.inputRequests,p=d!=null&&Object.keys(d).length>0,f=typeof c.requestState=="string"?c.requestState:void 0;if(!p&&f===void 0)throw new me(X.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 b;if(p){let y=this._host.resolvedClientCapabilities(i),h=[];for(let[g,S]of Object.entries(d)){let{embedded:k,required:w}=e$(e,g,S);if(k.method!=="roots/list"&&k.params===void 0)throw new me(X.InternalError,`Handler for ${e} returned an input request '${g}' of kind '${k.method}' without params`);if(yu(w,y)!==void 0)return dv(e,`Cannot request input '${g}' (${k.method}): the client on this 2025-era connection did not declare the required capability${y===void 0?" (no client capabilities are available on this connection \u2014 per-request legacy serving cannot receive server-to-client requests)":""}`);h.push([g,k])}let z=fS(s);try{let g={relatedRequestId:i.mcpReq.id,timeout:a,resetTimeoutOnProgress:!0,onprogress:()=>{},signal:z.signal},S=await Promise.all(h.map(async([k,w])=>{try{return[k,await this._dispatchLeg(w,g)]}catch(_){throw z.abort(_),_}}));b=Object.fromEntries(S)}catch(g){if(s.aborted)throw g;return dv(e,`Fulfilling input required by '${e}' failed: ${g instanceof Error?g.message:String(g)}`)}finally{z.dispose()}}else await hS(mS,s);let v={...i,mcpReq:{...i.mcpReq,inputResponses:b,droppedInputResponseKeys:void 0,requestState:da(f)}};if(f!==void 0){let y=await this._host.verifyRequestState(f,v,e);y!==void 0&&(v=Yg(v,y))}let $=await t(n,v);if(!Qt($))return $;c=$}}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:XT()}),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)}}},eE=new Set(["tools/call","prompts/get","resources/read"]),tE,t$,r$;function pv(e,t){t$(e,t)}function hv(e){return r$(e)}var n$=class extends Qg{_clientCapabilities;_clientVersion;static{tE=(e,t)=>{t.clientCapabilities!==void 0&&(e._clientCapabilities=t.clientCapabilities),t.clientInfo!==void 0&&(e._clientVersion=t.clientInfo)},t$=(e,t)=>{let n=t.filter(i=>!e._supportedProtocolVersions.includes(i));n.length>0&&(e._supportedProtocolVersions=[...e._supportedProtocolVersions,...n]),e.setRequestHandler("server/discover",()=>e._ondiscover())},r$=e=>e._serverInfo}_capabilities;_instructions;_jsonSchemaValidator;_cacheHints;_requestStateVerify;_inputRequiredServing;_legacyShim;_legacyInputRequiredShim(){return this._legacyShim??=new QT({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:!1}),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 Ou,this._requestStateVerify=t?.requestState?.verify,this._inputRequiredServing=YT(t?.inputRequired),t?.cacheHints!==void 0){for(let[n,i]of Object.entries(t.cacheHints))i!==void 0&&Fg(i,`cacheHints['${n}']`);this._cacheHints=t.cacheHints}this.setRequestHandler("initialize",n=>this._oninitialize(n)),this.setNotificationHandler("notifications/initialized",()=>this.oninitialized?.()),Ng(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:i}=e.params,r=Ru(Ir,i);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:(i,r,o)=>{if(!this._capabilities.logging)return Promise.resolve();let a;if(this._servedModernEra()){if(a=e.mcpReq.envelope?.[_r],a===void 0)return Promise.resolve()}else a=this._loggingLevels.get(e.sessionId)??this._loggingLevels.get(void 0);return a!==void 0&&this.LOG_LEVEL_SEVERITY.get(i)<this.LOG_LEVEL_SEVERITY.get(a)?Promise.resolve():e.mcpReq.notify({method:"notifications/message",params:{level:i,data:r,logger:o}})},elicitInput:(i,r)=>this.elicitInput(i,r),requestSampling:(i,r)=>this.createMessage(i,r)},http:n?{...e.http,req:t?.request,closeSSE:t?.closeSSEStream,closeStandaloneSSE:t?.closeStandaloneSSEStream}:void 0}}_loggingLevels=new Map;LOG_LEVEL_SEVERITY=new Map(Ir.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):!1};registerCapabilities(e){if(this.transport)throw new ye(ze.AlreadyConnected,"Cannot register capabilities after connecting to transport");let t=!!this._capabilities.logging;this._capabilities=ev(this._capabilities,e),!t&&this._capabilities.logging&&this._registerLoggingHandler()}_wrapHandler(e,t){if(e!=="tools/call"){let n=this._cacheHints?.[e],i=eE.has(e);return n===void 0&&!i?async(r,o)=>{let a=await t(r,o);if(Qt(a))throw new me(X.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 a}:async(r,o)=>{let a=i?await this._invokeInputRequiredCapableHandler(e,t,r,o):await t(r,o);if(Qt(a)){if(!i)throw new me(X.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 a}return n===void 0?a:_u(a,n)}}return async(n,i)=>{let r=kr(this._negotiatedProtocolVersion),o=r.validateRequest("tools/call",n);if(!o.ok)throw new me(o.reason==="not-in-era"?X.InternalError:X.InvalidParams,o.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call request: ${o.message}`);let a=await this._invokeInputRequiredCapableHandler("tools/call",t,n,i);if(Qt(a))return a;let s=Lg(a),c=r.validateResult("tools/call",s);if(!c.ok)throw new me(c.reason==="not-in-era"?X.InternalError:X.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&&hi(this._negotiatedProtocolVersion)}async _invokeInputRequiredCapableHandler(e,t,n,i){let r=this._servedModernEra(),o=i.mcpReq.requestState();if(o!==void 0&&typeof o!="string")throw new me(X.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"});let a=i;if(typeof o=="string"){let p=await this._verifyRequestState(o,i,e);p!==void 0&&(a=Yg(i,p))}let s;try{s=await t(n,a)}catch(p){throw p instanceof me&&p.code===X.UrlElicitationRequired&&r?new me(X.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.`):p}if(!Qt(s))return s;if(!r){if(!this._inputRequiredServing.legacyShim)throw new me(X.InternalError,`Handler for ${e} returned an input-required result, but this request is served on protocol revision ${this._negotiatedProtocolVersion??en}, which has no input_required vocabulary`);return await this._legacyInputRequiredShim().fulfill(e,t,n,a,s)}let c=s.inputRequests,u=c!=null&&Object.keys(c).length>0,d=typeof s.requestState=="string";if(!u&&!d)throw new me(X.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 p=this._inputRequestCapabilityView(i);for(let[f,b]of Object.entries(c)){let{embedded:v,required:$}=e$(e,f,b),y=yu($,p);if(y!==void 0)throw new Su({requiredCapabilities:y},`Cannot request input '${f}' (${v.method}): the request's client capabilities do not declare the required capability`)}}return s}async _verifyRequestState(e,t,n){if(this._requestStateVerify!==void 0)try{return await this._requestStateVerify(e,t)}catch(i){throw this.onerror?.(new Error(`requestState verification rejected ${n}: ${i instanceof Error?i.message:String(i)}`)),new me(X.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"})}}_inputRequestCapabilityView(e){return this._servedModernEra()?e.mcpReq.envelope?.[Yt]:this._clientCapabilities}_assertPushApiInServedEra(e){if(this._servedModernEra())throw new ye(ze.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(ze.CapabilityNotSupported,`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new ye(ze.CapabilityNotSupported,`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new ye(ze.CapabilityNotSupported,`Client does not support listing roots (required for ${e})`);break;case"ping":break}}assertNotificationCapability(e){switch(e){case"notifications/message":if(!this._capabilities.logging)throw new ye(ze.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(ze.CapabilityNotSupported,`Server does not support notifying about resources (required for ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new ye(ze.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(ze.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(ze.CapabilityNotSupported,`Client does not support URL elicitation (required for ${e})`);break;case"notifications/cancelled":break;case"notifications/progress":break}}assertRequestHandlerCapability(e){switch(e){case"completion/complete":if(!this._capabilities.completions)throw new ye(ze.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new ye(ze.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new ye(ze.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(ze.CapabilityNotSupported,`Server does not support resources (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new ye(ze.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case"ping":case"initialize":break}}async _oninitialize(e){let t=e.params.protocolVersion;this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo;let n=Gb(this._supportedProtocolVersions),i=n.includes(t)?t:n[0]??en;return this._negotiatedProtocolVersion=i,this.transport?.setProtocolVersion?.(i),{protocolVersion:i,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}_ondiscover(){return{supportedVersions:Ng(this._supportedProtocolVersions),capabilities:rE(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(ze.CapabilityNotSupported,"Client does not support sampling tools capability.");if(e.messages.length>0){let o=e.messages.at(-1),a=Array.isArray(o.content)?o.content:[o.content],s=a.some(p=>p.type==="tool_result"),c=e.messages.length>1?e.messages.at(-2):void 0,u=c?Array.isArray(c.content)?c.content:[c.content]:[],d=u.some(p=>p.type==="tool_use");if(s){if(a.some(p=>p.type!=="tool_result"))throw new me(X.InvalidParams,"The last message must contain only tool_result content if any is present");if(!d)throw new me(X.InvalidParams,"tool_result blocks are not matching any tool_use from the previous message")}if(d){let p=new Set(u.filter(b=>b.type==="tool_use").map(b=>b.id)),f=new Set(a.filter(b=>b.type==="tool_result").map(b=>b.toolUseId));if(p.size!==f.size||![...p].every(b=>f.has(b)))throw new me(X.InvalidParams,"ids of tool_result blocks and tool_use blocks from previous message do not match")}}let n=!!(e.tools||e.toolChoice),i=await this.request({method:"sampling/createMessage",params:e},t),r=this._wireCodec().samplingResultVariant(n,i);if(!r.ok)throw new ye(ze.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(ze.CapabilityNotSupported,"Client does not support url elicitation.");break;case"form":if(!this._clientCapabilities?.elicitation?.form)throw new ye(ze.CapabilityNotSupported,"Client does not support form elicitation.");break}return this._sendElicitationLeg(e,t)}async _sendElicitationLeg(e,t,n){let i=e.mode??"form",r=n?.validateAcceptedContent??!0;switch(i){case"url":{let o=e;return this.request({method:"elicitation/create",params:o},t)}case"form":{let o=e.mode==="form"?e:{...e,mode:"form"},a=await this.request({method:"elicitation/create",params:o},t);if(r&&a.action==="accept"&&a.content&&o.requestedSchema)try{let s=this._jsonSchemaValidator.getValidator(o.requestedSchema)(a.content);if(!s.valid)throw new me(X.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(s){throw s instanceof me?s:new me(X.InternalError,`Error validating elicitation response: ${s instanceof Error?s.message:String(s)}`)}return a}}}createElicitationCompletionNotifier(e,t){if(!this._clientCapabilities?.elicitation?.url)throw new ye(ze.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 rE(e){return{...e}}var ha=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 JS;try{let n=Pr(t.inputSchema,"input");return this._toolInputSchemaJson[e]=n,n}catch{return}}}constructor(e,t){this.server=new n$(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=!1;setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler("tools/list"),this.server.assertCanSetRequestHandler("tools/call"),this.server.registerCapabilities({tools:{listChanged:this.server.getCapabilities().tools?.listChanged??!0}}),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?Pr(t.inputSchema,"input"):JS,annotations:t.annotations,icons:t.icons,execution:t.execution,_meta:t._meta};return t.outputSchema&&(n.outputSchema=Pr(t.outputSchema,"output")),n})})),this.server.setRequestHandler("tools/call",async(e,t)=>{let n=this._registeredTools[e.params.name];if(!n)throw new me(X.InvalidParams,`Tool ${e.params.name} not found`);if(!n.enabled)throw new me(X.InvalidParams,`Tool ${e.params.name} disabled`);try{let i=await this.validateToolInput(n,e.params.arguments,e.params.name),r=await this.executeToolHandler(n,i,t);return await this.validateToolOutput(n,r,e.params.name),Qt(r)?r:this.server.projectCallToolResult(r,n.outputSchemaJson)}catch(i){if(i instanceof me&&i.code===X.UrlElicitationRequired)throw i;return this.createToolError(i instanceof Error?i.message:String(i))}}),this._toolHandlersInitialized=!0)}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,t,n){if(!e.inputSchema)return;let i=await on(e.inputSchema,t??{});if(!i.success)throw new me(X.InvalidParams,`Input validation error: Invalid arguments for tool ${n}: ${i.error}`);return i.data}async validateToolOutput(e,t,n){if(!e.outputSchema||Qt(t)||t.isError)return;if(t.structuredContent===void 0)throw new me(X.InvalidParams,`Output validation error: Tool ${n} has an output schema but no structured content was provided`);let i=await on(e.outputSchema,t.structuredContent);if(!i.success)throw new me(X.InvalidParams,`Output validation error: Invalid structured content for tool ${n}: ${i.error}`)}async executeToolHandler(e,t,n){return e.executor(t,n)}_completionHandlerInitialized=!1;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 Hg(e),this.handlePromptCompletion(e,e.params.ref);case"ref/resource":return Jg(e),this.handleResourceCompletion(e,e.params.ref);default:throw new me(X.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(e,t){let n=this._registeredPrompts[t.name];if(!n)throw new me(X.InvalidParams,`Prompt ${t.name} not found`);if(!n.enabled)throw new me(X.InvalidParams,`Prompt ${t.name} disabled`);if(!n.argsSchema)return pa;let i=YS(WS(n.argsSchema)?.[e.params.argument.name]);if(!mv(i))return pa;let r=VT(i);return r?KS(await r(e.params.argument.value,e.params.context)):pa}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 pa;throw new me(X.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let i=n.resourceTemplate.completeCallback(e.params.argument.name);return i?KS(await i(e.params.argument.value,e.params.context)):pa}_resourceHandlersInitialized=!1;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??!0}}),this.server.setRequestHandler("resources/list",async(e,t)=>{let n=Object.entries(this._registeredResources).filter(([r,o])=>o.enabled).map(([r,o])=>({uri:r,name:o.name,...o.metadata})),i=[];for(let r of Object.values(this._registeredResourceTemplates)){if(!r.resourceTemplate.listCallback)continue;let o=await r.resourceTemplate.listCallback(t);for(let a of o.resources)i.push({...r.metadata,...a})}return{resources:[...n,...i]}}),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 me(X.InvalidParams,`Resource URI ${e.params.uri} is invalid`,{uri:e.params.uri,reason:"invalid_uri"})}let i=this._registeredResources[n.toString()];if(i){if(!i.enabled)throw new me(X.InvalidParams,`Resource ${n} disabled`);return _u(await i.readCallback(n,t),i.cacheHint)}for(let r of Object.values(this._registeredResourceTemplates)){let o=r.resourceTemplate.uriTemplate.match(n.toString());if(o)return _u(await r.readCallback(n,o,t),r.cacheHint)}throw new bu(e.params.uri)}),this._resourceHandlersInitialized=!0)}_promptHandlersInitialized=!1;setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler("prompts/list"),this.server.assertCanSetRequestHandler("prompts/get"),this.server.registerCapabilities({prompts:{listChanged:this.server.getCapabilities().prompts?.listChanged??!0}}),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?dS(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 me(X.InvalidParams,`Prompt ${e.params.name} not found`);if(!n.enabled)throw new me(X.InvalidParams,`Prompt ${e.params.name} disabled`);return n.handler(e.params.arguments,t)}),this._promptHandlersInitialized=!0)}registerResource(e,t,n,i){let r=n.cacheHint,o=n;if(r!==void 0){Fg(r,`resource ${e}`);let a={...n};delete a.cacheHint,o=a}if(typeof t=="string"){if(this._registeredResources[t])throw new Error(`Resource ${t} is already registered`);let a=this._createRegisteredResource(e,n.title,t,o,i);return r!==void 0&&(a.cacheHint=r),this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}else{if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);let a=this._createRegisteredResourceTemplate(e,n.title,t,o,i);return r!==void 0&&(a.cacheHint=r),this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}}_createRegisteredResource(e,t,n,i,r){let o={name:e,title:t,metadata:i,readCallback:r,enabled:!0,disable:()=>o.update({enabled:!1}),enable:()=>o.update({enabled:!0}),remove:()=>o.update({uri:null}),update:a=>{a.uri!==void 0&&a.uri!==n&&(delete this._registeredResources[n],a.uri&&(this._registeredResources[a.uri]=o)),a.name!==void 0&&(o.name=a.name),a.title!==void 0&&(o.title=a.title),a.metadata!==void 0&&(o.metadata=a.metadata),a.callback!==void 0&&(o.readCallback=a.callback),a.enabled!==void 0&&(o.enabled=a.enabled),this.sendResourceListChanged()}};return this._registeredResources[n]=o,o}_createRegisteredResourceTemplate(e,t,n,i,r){let o={resourceTemplate:n,title:t,metadata:i,readCallback:r,enabled:!0,disable:()=>o.update({enabled:!1}),enable:()=>o.update({enabled:!0}),remove:()=>o.update({name:null}),update:s=>{s.name!==void 0&&s.name!==e&&(delete this._registeredResourceTemplates[e],s.name&&(this._registeredResourceTemplates[s.name]=o)),s.title!==void 0&&(o.title=s.title),s.template!==void 0&&(o.resourceTemplate=s.template),s.metadata!==void 0&&(o.metadata=s.metadata),s.callback!==void 0&&(o.readCallback=s.callback),s.enabled!==void 0&&(o.enabled=s.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[e]=o;let a=n.uriTemplate.variableNames;return Array.isArray(a)&&a.some(s=>!!n.completeCallback(s))&&this.setCompletionRequestHandler(),o}_createRegisteredPrompt(e,t,n,i,r,o,a){let s=i,c=r,u={title:t,description:n,argsSchema:i,icons:o,_meta:a,handler:BS(e,i,r),enabled:!0,disable:()=>u.update({enabled:!1}),enable:()=>u.update({enabled:!0}),remove:()=>u.update({name:null}),update:d=>{d.name!==void 0&&d.name!==e&&(delete this._registeredPrompts[e],d.name&&(this._registeredPrompts[d.name]=u)),d.title!==void 0&&(u.title=d.title),d.description!==void 0&&(u.description=d.description),d.icons!==void 0&&(u.icons=d.icons),d._meta!==void 0&&(u._meta=d._meta);let p=!1;d.argsSchema!==void 0&&(u.argsSchema=d.argsSchema,s=d.argsSchema,p=!0),d.callback!==void 0&&(c=d.callback,p=!0),p&&(u.handler=BS(e,s,c)),d.enabled!==void 0&&(u.enabled=d.enabled),this.sendPromptListChanged()}};if(this._registeredPrompts[e]=u,i){let d=WS(i);d&&Object.values(d).some(p=>mv(YS(p)))&&this.setCompletionRequestHandler()}return u}_createRegisteredTool(e,t,n,i,r,o,a,s,c,u){if(nv(e),i!==void 0)try{let f=Pr(i,"input");this._toolInputSchemaJson[e]=f;let b=Gg(f);b.valid||console.warn(`[mcp-sdk] tool '${e}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${b.reason}`)}catch{}let d=u,p={title:t,description:n,inputSchema:i,outputSchema:r,outputSchemaJson:GS(r),annotations:o,icons:a,execution:s,_meta:c,handler:u,executor:HS(i,u),enabled:!0,disable:()=>p.update({enabled:!1}),enable:()=>p.update({enabled:!0}),remove:()=>p.update({name:null}),update:f=>{f.name!==void 0&&f.name!==e&&(typeof f.name=="string"&&nv(f.name),delete this._registeredTools[e],delete this._toolInputSchemaJson[e],f.name&&(delete this._toolInputSchemaJson[f.name],this._registeredTools[f.name]=p,e=f.name)),f.title!==void 0&&(p.title=f.title),f.description!==void 0&&(p.description=f.description);let b=!1;f.paramsSchema!==void 0&&(p.inputSchema=f.paramsSchema,delete this._toolInputSchemaJson[e],b=!0),f.callback!==void 0&&(p.handler=f.callback,d=f.callback,b=!0),b&&(p.executor=HS(p.inputSchema,d)),f.outputSchema!==void 0&&(p.outputSchema=f.outputSchema,p.outputSchemaJson=GS(f.outputSchema)),f.annotations!==void 0&&(p.annotations=f.annotations),f.icons!==void 0&&(p.icons=f.icons),f._meta!==void 0&&(p._meta=f._meta),f.enabled!==void 0&&(p.enabled=f.enabled),this.sendToolListChanged()}};return this._registeredTools[e]=p,this.setToolRequestHandlers(),this.sendToolListChanged(),p}registerTool(e,t,n){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let{title:i,description:r,inputSchema:o,outputSchema:a,annotations:s,icons:c,_meta:u}=t;return this._createRegisteredTool(e,i,r,ku(o),ku(a),s,c,void 0,u,n)}registerPrompt(e,t,n){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let{title:i,description:r,argsSchema:o,icons:a,_meta:s}=t,c=this._createRegisteredPrompt(e,i,r,ku(o),n,a,s);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 HS(e,t){if(e){let i=t;return async(r,o)=>i(r,o)}let n=t;return async(i,r)=>n(r)}var JS={type:"object",properties:{}};function GS(e){if(e!==void 0)try{return Pr(e,"output")}catch{return}}function BS(e,t,n){if(t){let i=n;return async(r,o)=>{let a=await on(t,r);if(!a.success)throw new me(X.InvalidParams,`Invalid arguments for prompt ${e}: ${a.error}`);return i(a.data,o)}}else{let i=n;return async(r,o)=>i(o)}}function KS(e){return{completion:{values:e.map(String).slice(0,100),total:e.length,hasMore:e.length>100}}}var pa={completion:{values:[],hasMore:!1}};function WS(e){let t=e;if(t.shape&&typeof t.shape=="object")return t.shape}function nE(e){return e?.type==="optional"}function YS(e){return nE(e)?e.def?.innerType??e:e}var iE=class{_readBuffer;_started=!1;_closed=!1;constructor(e=uv.stdin,t=uv.stdout,n){this._stdin=e,this._stdout=t,this._readBuffer=new tv({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=!0,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=!0,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 i=rv(e),r=!1,o=s=>{r||(r=!0,this._stdout.off("error",o),this._stdout.off("drain",a),n(s))},a=()=>{r||(r=!0,this._stdout.off("error",o),this._stdout.off("drain",a),t())};if(this._stdout.once("error",o),this._stdout.write(i)){if(r)return;r=!0,this._stdout.off("error",o),t()}else r||this._stdout.once("drain",a)})}},i$=3e3,oE=class{onclose;onerror;onmessage;_closed=!1;_pendingRequests=new Set;_drainWaiters=[];constructor(e,t,n){this._wire=e,this._onInstanceClose=t,this._outboundIntercept=n}async start(){}async send(e,t){if(ca(e)||Iu(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(zt(e))this._pendingRequests.add(e.id);else if(Er(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?!0:await new Promise(t=>{let n=()=>{clearTimeout(i),t(!0)},i=setTimeout(()=>{this._drainWaiters=this._drainWaiters.filter(r=>r!==n),t(!1)},e);this._drainWaiters.push(n)})}async close(){if(!this._closed){this._closed=!0,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 aE(e){let t=e.params;if(e.method==="initialize"&&!Bg(t)){let o=t!==null&&typeof t=="object"&&typeof t.protocolVersion=="string"?t.protocolVersion:void 0;return{kind:"legacy",reason:"initialize",...o!==void 0&&{requestedVersion:o}}}if(!$u(t))return{kind:"legacy",reason:"no-claim"};let n=sn(t),i=(n===void 0?[]:zu(n))[0];if(i!==void 0)return{kind:"invalid-envelope",issue:i};let r=wu(t);return r===void 0||!Tr.includes(r)?{kind:"unsupported-revision",requested:r??"unknown"}:{kind:"modern",revision:r,classification:{era:"modern",revision:r}}}function o$(e,t={}){let n=t.legacy??"serve",i=t.transport??new iE,r={phase:"opening"},o,a=!1,s=()=>a||r.phase==="closed",c=I=>{try{t.onerror?.(I)}catch{}},u=(I,j,U,N)=>i.send({jsonrpc:"2.0",id:I,error:{code:j,message:U,...N!==void 0&&{data:N}}}).catch(F=>c(jt(F))),d=new QS(t.maxSubscriptions??Cu),p=I=>{if(!Er(I))return;let j=d.routeOutbound(I);if(j!=="passthrough"){for(let U of j)i.send({jsonrpc:"2.0",...U}).catch(N=>c(jt(N)));return"handled"}},f=async I=>{if(zt(I)&&I.method==="subscriptions/listen"){let j=sn(I.params),U=$u(I.params)?(j===void 0?[]:zu(j))[0]:{key:"_meta",problem:"the per-request envelope is required on protocol revision 2026-07-28"},N=wu(I.params),F;if(U!==void 0)F={jsonrpc:"2.0",id:I.id,error:{code:-32602,message:`Invalid _meta envelope: ${U.key}: ${U.problem}`}};else if(N===void 0||!Tr.includes(N)){let ee=new fi({supported:[...Tr],requested:N??"unknown"});F={jsonrpc:"2.0",id:I.id,error:{code:ee.code,message:ee.message,data:ee.data}}}else F=d.serve(I);return await i.send("error"in F?F:{jsonrpc:"2.0",method:F.method,params:F.params}).catch(ee=>c(jt(ee))),!0}if(Er(I)&&I.method==="notifications/cancelled"){let j=I.params?.requestId;if(j!==void 0&&d.cancel(j))return!0}return!1},b=(I,j,U)=>{let N=Kg({kind:"legacy",reason:j,...U!==void 0&&{requestedVersion:U}},Tr);return N===void 0?Promise.resolve():(c(new Error(`Rejected 2025-era request on a modern-only stdio connection (${N.cell}): ${N.message}`)),u(I.id,N.code,N.message,N.data))},v=I=>{a||I===o||w()},$=async(I,j)=>{let U=await e({era:I}),N=U instanceof ha?U.server:U;I==="modern"&&(Xg(N,j),pv(N,Tr),d.setServerCapabilities(N.getCapabilities(),hv(N)));let F=new oE(i,()=>v(F),I==="modern"?p:void 0);return await U.connect(F),{product:U,channel:F}},y=I=>I.product.close().catch(j=>c(jt(j))),h=async I=>{o=I.channel;try{await I.channel.whenRequestsAnswered(i$)||c(new Error(`Discarded the probe instance with requests still unanswered after ${i$}ms; continuing with the fallback`)),await I.product.close()}catch(j){c(jt(j))}finally{o=void 0}},z=async I=>{if(r.phase==="closed")return;if(r.phase==="pinned"){if(r.era==="modern"&&zt(I)&&I.method==="initialize"&&!Bg(I.params)){await b(I,"initialize",I.params!==null&&typeof I.params=="object"&&typeof I.params.protocolVersion=="string"?I.params.protocolVersion:void 0);return}if(r.era==="modern"&&await f(I))return;r.instance.channel.deliver(I);return}if(!zt(I)&&!Er(I)){c(new Error("Discarded a JSON-RPC response received before the connection negotiated an era"));return}let j=aE(I);switch(j.kind){case"invalid-envelope":{let U=`Invalid _meta envelope for protocol revision 2026-07-28: ${j.issue.key}: ${j.issue.problem}`;zt(I)?await u(I.id,X.InvalidParams,U,{envelope:j.issue}):c(new Error(`Discarded a notification with a malformed envelope: ${U}`));return}case"unsupported-revision":if(zt(I)){let U=new fi({supported:[...Tr],requested:j.requested});c(U),await u(I.id,U.code,U.message,U.data)}else c(new Error(`Discarded a notification claiming unsupported protocol revision ${j.requested}`));return;case"modern":if(zt(I)&&I.method==="server/discover"){if(r.phase==="probe"){r.instance.channel.deliver(I,{classification:j.classification});return}let U=await $("modern",j.revision);if(s()){await y(U);return}r={phase:"probe",instance:U},U.channel.deliver(I,{classification:j.classification});return}if(r.phase==="probe"){if(Er(I)){r.instance.channel.deliver(I,{classification:j.classification});return}r={phase:"pinned",era:"modern",instance:r.instance}}else{let U=await $("modern",j.revision);if(s()){await y(U);return}r={phase:"pinned",era:"modern",instance:U}}if(await f(I))return;r.instance.channel.deliver(I,{classification:j.classification});return;case"legacy":{if(n==="reject"){zt(I)&&await b(I,j.reason,j.requestedVersion);return}if(r.phase==="probe"){if(await h(r.instance),s())return;r={phase:"opening"}}let U=await $("legacy");if(s()){await y(U);return}r={phase:"pinned",era:"legacy",instance:U},r.instance.channel.deliver(I);return}}},g=[],S=!1,k=async()=>{if(!S){S=!0;try{for(;g.length>0;){let I=g.shift();try{await z(I)}catch(j){zt(I)&&await u(I.id,X.InternalError,"Internal server error"),c(jt(j))}}}finally{S=!1}}},w=async()=>{if(a||r.phase==="closed")return;a=!0;let I=r;r={phase:"closed"};for(let j of d.teardownAll())await i.send(j).catch(U=>c(jt(U)));(I.phase==="probe"||I.phase==="pinned")&&await I.instance.product.close().catch(j=>c(jt(j))),await i.close().catch(j=>c(jt(j)))};i.onmessage=I=>{g.push(I),k()},i.onerror=I=>{c(I),(r.phase==="probe"||r.phase==="pinned")&&r.instance.channel.onerror?.(I)},i.onclose=()=>{if(a||r.phase==="closed")return;a=!0;let I=r;r={phase:"closed"},(I.phase==="probe"||I.phase==="pinned")&&I.instance.product.close().catch(j=>c(jt(j)))};let _=i.start().catch(I=>{throw c(jt(I)),I});return _.catch(()=>{}),{close:async()=>{await _.catch(()=>{}),await w()}}}function jt(e){return e instanceof Error?e:new Error(String(e))}var sE=l.object({ANILIST_ACCESS_TOKEN:l.string().min(1).optional(),ANILIST_CLIENT_ID:l.string().min(1).optional(),ANILIST_CLIENT_SECRET:l.string().min(1).optional(),ANILIST_TOKEN_STORE:l.string().min(1).optional(),ANILIST_GRAPHQL_URL:l.url({protocol:/^https?$/}).default("https://graphql.anilist.co"),ANILIST_OAUTH_BASE_URL:l.url({protocol:/^https?$/}).default("https://anilist.co/api/v2/oauth"),HTTP_TIMEOUT_MS:l.coerce.number().int().positive().default(15e3),HTTP_RETRIES:l.coerce.number().int().nonnegative().default(2),ANILIST_MIN_INTERVAL_MS:l.coerce.number().int().nonnegative().default(2100),CACHE_TTL_MS:l.coerce.number().int().nonnegative().default(3e5),ANILIST_OAUTH_PORT:l.coerce.number().int().positive().default(8082),LOG_LEVEL:l.enum(["debug","info","warn","error","silent"]).default("info")}),cE=sE.transform(e=>({graphqlUrl:e.ANILIST_GRAPHQL_URL,oauthBaseUrl:e.ANILIST_OAUTH_BASE_URL,httpTimeoutMs:e.HTTP_TIMEOUT_MS,httpRetries:e.HTTP_RETRIES,minIntervalMs:e.ANILIST_MIN_INTERVAL_MS,cacheTtlMs:e.CACHE_TTL_MS,logLevel:e.LOG_LEVEL,oauthPort:e.ANILIST_OAUTH_PORT,auth:{accessToken:e.ANILIST_ACCESS_TOKEN,clientId:e.ANILIST_CLIENT_ID,clientSecret:e.ANILIST_CLIENT_SECRET,tokenStorePath:e.ANILIST_TOKEN_STORE,canLogin:!!(e.ANILIST_CLIENT_ID&&e.ANILIST_CLIENT_SECRET)}})),lE=/^\$\{[^}]*\}$/;function a$(e=process.env){let t=Object.fromEntries(Object.entries(e).filter(([,n])=>n!==void 0&&n!==""&&!lE.test(n)));return cE.parse(t)}var Re=class extends Error{code;status;retryable;authenticated;constructor(t){super(t.message,t.cause===void 0?void 0:{cause:t.cause}),this.name="ApiError",this.code=t.code,this.status=t.status,this.retryable=t.retryable??!1,this.authenticated=t.authenticated}};function Nu(e){return e===304?{code:"not_modified",retryable:!1}:e===401?{code:"unauthorized",retryable:!1}:e===403?{code:"forbidden",retryable:!1}:e===404?{code:"not_found",retryable:!1}:e===429?{code:"rate_limited",retryable:!0}:e===400||e===405||e===422?{code:"bad_request",retryable:!1}:e>=500?{code:"server_error",retryable:!0}:{code:"unknown",retryable:!1}}function Ce(e,t){if(e==null)throw new Re({code:"not_found",message:t});return e}function fa(e){return e.replace(/Bearer\s+[A-Za-z0-9._~+/-]+=*/gi,"Bearer ***").replace(/\b(access_token|refresh_token|client_secret|client_id)=([^&\s"]+)/gi,"$1=***").replace(/"(access_token|refresh_token|client_secret|client_id)"\s*:\s*"[^"]*"/gi,'"$1":"***"')}var s$={debug:10,info:20,warn:30,error:40,silent:100};function c$(e){let t=s$[e];function n(i,r,o){if(s$[i]<t)return;let a=o.length?" "+fa(o.map(c=>uE(c)).join(" ")):"",s=`${fa(r)}${a}`;console.error(`[anilist-mcp-server] ${i}: ${s}`)}return{debug:(i,...r)=>n("debug",i,r),info:(i,...r)=>n("info",i,r),warn:(i,...r)=>n("warn",i,r),error:(i,...r)=>n("error",i,r)}}function uE(e){if(typeof e=="string")return e;if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch{return String(e)}}var Lu="0.7.1",l$=`anilist-mcp-server/${Lu} (+https://github.com/Grinv/anilist-mcp-server)`;var u$=8e3,yi=class{#e;constructor(t){this.#e=t}async getJson(t,n={}){return this.requestJson(t,{...n,method:n.method??"GET"})}async requestJson(t,n={}){let i=this.#r(t,n.query),r=n.retries??this.#e.retries??2,o=n.timeoutMs??this.#e.timeoutMs??15e3,a=0;for(;;){this.#e.beforeRequest&&await this.#e.beforeRequest();try{return await this.#t(i,n,o)}catch(s){let c=s instanceof Re?s:d$(s);if(!c.retryable||a>=r)throw c;let u=pE(a,c);this.#e.logger.debug(`retrying ${i} after ${u}ms (attempt ${a+1}/${r}, ${c.code})`),await vE(u),a+=1}}}async#t(t,n,i){let r=AbortSignal.timeout(i),o=n.signal?AbortSignal.any([r,n.signal]):r,a={"User-Agent":l$,Accept:"application/json",...this.#e.defaultHeaders,...n.headers},s;try{s=await fetch(t,{method:n.method??"GET",headers:a,...n.body===void 0?{}:{body:n.body},signal:o})}catch(u){throw n.signal?.aborted?new Re({code:"network",message:"Request aborted by caller",cause:u}):r.aborted?new Re({code:"timeout",message:`Request timed out after ${i}ms`,retryable:!0,cause:u}):d$(u)}if(!s.ok)throw await dE(s,"Authorization"in a);if(s.status===204)return;let c=await s.text();if(c.length!==0)try{return JSON.parse(c)}catch(u){throw new Re({code:"unknown",message:"Upstream returned invalid JSON",cause:u})}}#r(t,n){let i=new URL(t.replace(/^\//,""),gE(this.#e.baseUrl));if(n)for(let[r,o]of Object.entries(n))o!==void 0&&i.searchParams.set(r,String(o));return i.toString()}};async function dE(e,t){let{code:n,retryable:i}=Nu(e.status),r="";try{r=await e.text()}catch{}let o=mE(r)??r.slice(0,500),a=fE(e.headers.get("retry-after"));return new Re({code:n,status:e.status,retryable:i,authenticated:t,message:`HTTP ${e.status} ${e.statusText}${o?`: ${o}`:""}`,...a===void 0?{}:{cause:{retryAfterMs:a}}})}function mE(e){if(e)try{let t=JSON.parse(e);if(t===null||typeof t!="object")return;let n=t;if(typeof n.message=="string")return n.message;if(typeof n.error=="string")return n.error;if(Array.isArray(n.errors)&&n.errors.length>0){let i=n.errors[0],r=typeof i.message=="string"?i.message:void 0,o=i.validation!==null&&typeof i.validation=="object"?Object.entries(i.validation).map(([a,s])=>`${a}: ${Array.isArray(s)?s.join(", "):String(s)}`).join("; "):void 0;return r&&o?`${r} (${o})`:r??o}return}catch{return}}function d$(e){return e instanceof Re?e:new Re({code:"network",message:e instanceof Error?`Network error: ${e.message}`:"Network error",retryable:!0,cause:e})}function pE(e,t){let n=t.cause?.retryAfterMs;if(typeof n=="number"&&n>0)return Math.min(n,u$);let i=Math.min(u$,500*2**e);return i+Math.floor(i*.25*hE(e))}function hE(e){return e*2654435761%1e3/1e3}function fE(e){if(!e)return;let t=Number(e);if(Number.isFinite(t))return t*1e3;let n=Date.parse(e);if(Number.isFinite(n))return Math.max(0,n-Date.now())}function gE(e){return e.endsWith("/")?e:e+"/"}function vE(e){return new Promise(t=>setTimeout(t,e))}var qu=class{#e;#t;constructor(t){this.#e=new yi({baseUrl:t.endpoint,logger:t.logger,timeoutMs:t.timeoutMs,retries:t.retries,beforeRequest:t.beforeRequest,defaultHeaders:{"Content-Type":"application/json"}}),this.#t=t.cache}async request(t,n={},i,r){if(this.#t&&!r?.skipCache&&!/^\s*mutation\b/i.test(t)){let a=JSON.stringify({query:t,variables:n,auth:i?.Authorization??null});return this.#t.wrap(a,()=>this.#r(t,n,i))}let o=await this.#r(t,n,i);return this.#t&&this.#t.clear(),o}async#r(t,n,i){let r=JSON.stringify({query:t,variables:m$(n)}),o=await this.#e.requestJson("",{method:"POST",body:r,...i?{headers:i}:{}});if(o.errors?.length){let a=new Set(o.errors.map(u=>u.status).filter(u=>typeof u=="number")),s=a.size===1?[...a][0]:void 0,c=s!==void 0?Nu(s):void 0;throw new Re({code:c?.code??"bad_request",status:s,retryable:c?.retryable,message:o.errors.map(yE).join("; ")})}if(o.data===null||o.data===void 0)throw new Re({code:"unknown",message:"AniList returned no data for this query"});return o.data}};function yE(e){if(!e.validation||Object.keys(e.validation).length===0)return e.message;let t=Object.entries(e.validation).map(([n,i])=>`${n}: ${i.join(", ")}`).join("; ");return`${e.message} (${t})`}function m$(e){let t={};for(let[n,i]of Object.entries(e))i!==void 0&&(t[n]=i!==null&&typeof i=="object"&&!Array.isArray(i)?m$(i):i);return t}var Mu=class{#e;#t=Promise.resolve();#r=null;constructor(t){this.#e=Math.max(0,t)}acquire(){let t=this.#t,n;return this.#t=new Promise(i=>{n=i}),t.then(async()=>{let i=this.#r!==null?this.#r+this.#e-Date.now():0;i>0&&await _E(i),this.#r=Date.now(),n()})}};function _E(e){return new Promise(t=>setTimeout(t,e))}var Du=class{#e;#t;#r=new Map;#n=new Map;constructor(t,n=500){this.#e=t,this.#t=n}get(t){let n=this.#r.get(t);if(n)return n.expires>Date.now()?n.value:void 0}getStale(t){return this.#r.get(t)?.value}clear(){this.#r.clear(),this.#n.clear()}set(t,n){if(!(this.#e<=0)){if(!this.#r.has(t)&&this.#r.size>=this.#t){let i=this.#r.keys().next().value;i!==void 0&&this.#r.delete(i)}this.#r.set(t,{value:n,expires:Date.now()+this.#e})}}async wrap(t,n){let i=this.get(t);return i!==void 0?i:this.#o(t,n)}async wrapStaleOnError(t,n){let i=this.get(t);if(i!==void 0)return i;try{return await this.#o(t,n)}catch(r){let o=this.getStale(t);if(o!==void 0)return o;throw r}}#o(t,n){let i=this.#n.get(t);if(i)return i;let r=n().then(o=>(this.set(t,o),o)).finally(()=>this.#n.delete(t));return this.#n.set(t,r),r}};import{chmodSync as bE,mkdirSync as SE,readFileSync as $E,writeFileSync as wE}from"fs";import{homedir as p$,platform as h$}from"os";import{dirname as zE,join as fv}from"path";var gv=l.object({accessToken:l.string(),expiresAt:l.number().positive()}).loose(),Uu=class{#e;#t;constructor(t,n){this.#e=t,this.#t=n}get path(){return this.#e}load(){let t;try{t=$E(this.#e,"utf8")}catch{return}let n;try{n=JSON.parse(t)}catch{this.#t.warn(`token store at ${this.#e} is not valid JSON; ignoring it`);return}let i=gv.safeParse(n);if(!i.success){this.#t.warn(`token store at ${this.#e} is malformed; ignoring it`);return}return i.data}save(t){SE(zE(this.#e),{recursive:!0,mode:448}),wE(this.#e,JSON.stringify(t,null,2),{mode:384}),h$()!=="win32"&&bE(this.#e,384)}};function f$(e=process.env){if(e.ANILIST_TOKEN_STORE)return e.ANILIST_TOKEN_STORE;let t=h$()==="win32"?e.APPDATA??fv(p$(),"AppData","Roaming"):e.XDG_CONFIG_HOME??fv(p$(),".config");return fv(t,"anilist-mcp-server","tokens.json")}import{createServer as IE}from"http";import{randomBytes as RE}from"crypto";import{spawn as kE}from"child_process";import{platform as vv}from"os";function g$(){return RE(16).toString("hex")}function v$(e){let t=new URLSearchParams({response_type:"code",client_id:e.clientId,redirect_uri:e.redirectUri});return e.state&&t.set("state",e.state),`${e.oauthBaseUrl.replace(/\/$/,"")}/authorize?${t.toString()}`}function y$(e){let t=e.trim(),n;try{n=new URL(t).searchParams}catch{t.includes("=")&&(n=new URLSearchParams(t.replace(/^\?/,"")))}if(n){let i=n.get("error");if(i)throw new Re({code:"bad_request",message:`authorization denied: ${i}`});let r=n.get("code");if(r)return r;throw new Re({code:"bad_request",message:"no `code` found in the pasted redirect URL"})}if(!t)throw new Re({code:"bad_request",message:"empty redirect/code"});return t}function _$(e){let t=e.trim();try{return new URL(t).searchParams.get("state")}catch{return t.includes("=")?new URLSearchParams(t.replace(/^\?/,"")).get("state"):null}}function b$(e){let t=vv()==="darwin"?"open":vv()==="win32"?"cmd":"xdg-open",n=vv()==="win32"?["/c","start","",e]:[e];try{let i=kE(t,n,{stdio:"ignore",detached:!0});i.on("error",()=>{}),i.unref()}catch{}}function S$(e){return new Promise((t,n)=>{let i=IE((r,o)=>{let a=null,s=null,c=null;try{let u=new URL(r.url??"/",`http://localhost:${e.port}`);if(!u.pathname.startsWith(e.path)){o.writeHead(404).end();return}a=u.searchParams.get("code"),s=u.searchParams.get("state"),c=u.searchParams.get("error")}catch{}o.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),o.end(c?"<h2>AniList login was denied. You can close this tab.</h2>":a?"<h2>Logged in to AniList \u2014 you can close this tab and return to your client.</h2>":"<h2>Waiting for the AniList redirect\u2026</h2>"),a&&e.onCode(a,s)});i.on("error",n),i.listen(e.port,"127.0.0.1",()=>{t({server:i,close:()=>i.close()})})})}function $$(e){let t=e.split(".");if(t.length===3)try{let n=JSON.parse(Buffer.from(t[1],"base64url").toString("utf8"));return typeof n.exp=="number"?n.exp*1e3:void 0}catch{return}}var TE=365*24*60*60*1e3,Fu=class{#e;#t;#r;#n;#o;#a;#i;#s;constructor(t,n){this.#e=t,this.#t=n;let i=new Mu(t.minIntervalMs),r=new Du(t.cacheTtlMs);this.#r=new qu({endpoint:t.graphqlUrl,logger:n,timeoutMs:t.httpTimeoutMs,retries:t.httpRetries,beforeRequest:()=>i.acquire(),cache:r}),this.#n=new yi({baseUrl:t.oauthBaseUrl,logger:n,timeoutMs:t.httpTimeoutMs,retries:t.httpRetries}),this.#o=new Uu(t.auth.tokenStorePath??f$(),n),this.#a=t.auth.accessToken?{accessToken:t.auth.accessToken,expiresAt:1/0}:this.#o.load()}isConfigured(){return!!(this.#a&&this.#a.expiresAt>Date.now())}canLogin(){return this.#e.auth.canLogin}#c(){return this.isConfigured()?{Authorization:`Bearer ${this.#a.accessToken}`}:void 0}#u(){let t=this.#c();if(!t)throw new Re({code:"unauthorized",message:"Run login_anilist (or set ANILIST_ACCESS_TOKEN) before using this tool."});return t}ctx(){return{gql:this.#r,authHeader:()=>this.#c(),requireAuth:()=>this.#u()}}async startLogin(t={}){if(!this.#e.auth.clientId||!this.#e.auth.clientSecret)throw new Re({code:"bad_request",message:"ANILIST_CLIENT_ID and ANILIST_CLIENT_SECRET must both be set to log in."});let n=`http://localhost:${this.#e.oauthPort}/callback`,i=g$();this.#s=i;let r=v$({oauthBaseUrl:this.#e.oauthBaseUrl,clientId:this.#e.auth.clientId,redirectUri:n,state:i});this.#i?.close(),this.#i=void 0;let o=!1;try{let{close:a}=await S$({port:this.#e.oauthPort,path:"/callback",onCode:(s,c)=>{this.#l(s,c).finally(()=>{this.#i?.close(),this.#i=void 0})}});this.#i={close:a},o=!0}catch(a){this.#t.warn(`could not bind localhost:${this.#e.oauthPort}, use manual paste`,a)}return(t.open??b$)(r),{authorizeUrl:r,redirectUri:n,listening:o}}async submitRedirect(t){let n=y$(t);try{await this.#l(n,_$(t))}finally{this.#i?.close(),this.#i=void 0}}async#l(t,n){if(this.#s&&n!==this.#s)throw new Re({code:"unauthorized",message:"OAuth state mismatch \u2014 this redirect doesn't match the login attempt that started it. Run login_anilist again."});let i=`http://localhost:${this.#e.oauthPort}/callback`,r;try{r=await this.#n.requestJson("token",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({grant_type:"authorization_code",client_id:this.#e.auth.clientId,client_secret:this.#e.auth.clientSecret,redirect_uri:i,code:t}),retries:0})}catch(s){throw s instanceof Re&&s.code==="bad_request"?new Re({code:"bad_request",message:`AniList rejected the authorization code (it may be expired, already used, or invalid) \u2014 run login_anilist again for a fresh one. (${s.message})`}):s}if(this.#s=void 0,!r.access_token)throw new Re({code:"unknown",message:"AniList's token response had no access_token"});let o=$$(r.access_token)??Date.now()+TE,a=gv.safeParse({accessToken:r.access_token,expiresAt:o});if(!a.success)throw new Re({code:"unknown",message:"AniList's token response had a malformed access_token"});this.#a=a.data,this.#o?.save(this.#a)}};function _i(e,t,n){let i=n?`id:$${t},${n}`:`id:$${t}`;return`exists:${e}(${i}){id}`}var Vu=`
|
|
76
76
|
id
|
|
77
77
|
idMal
|
|
78
78
|
type
|
|
@@ -96,7 +96,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
96
96
|
startDate { year month day }
|
|
97
97
|
endDate { year month day }
|
|
98
98
|
trailer { id site thumbnail }
|
|
99
|
-
`,
|
|
99
|
+
`,Zu="description(asHtml: false)",w$=`
|
|
100
100
|
tags { name rank isMediaSpoiler }
|
|
101
101
|
rankings { rank type format year season allTime context }
|
|
102
102
|
nextAiringEpisode { id airingAt timeUntilAiring episode }
|
|
@@ -106,7 +106,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
106
106
|
hiddenFromStatusLists customLists(asArray: true) advancedScores
|
|
107
107
|
startedAt { year month day } completedAt { year month day } updatedAt createdAt
|
|
108
108
|
}
|
|
109
|
-
`,
|
|
109
|
+
`,z$="streamingEpisodes { title thumbnail url site }",ga=`
|
|
110
110
|
id
|
|
111
111
|
name { full native }
|
|
112
112
|
image { large }
|
|
@@ -114,7 +114,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
114
114
|
favourites
|
|
115
115
|
isFavourite
|
|
116
116
|
siteUrl
|
|
117
|
-
`,
|
|
117
|
+
`,va=`
|
|
118
118
|
id
|
|
119
119
|
name { full native }
|
|
120
120
|
image { large }
|
|
@@ -123,15 +123,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
123
123
|
favourites
|
|
124
124
|
isFavourite
|
|
125
125
|
siteUrl
|
|
126
|
-
`,
|
|
126
|
+
`,I$=`
|
|
127
127
|
media(perPage: 25, sort: POPULARITY_DESC) {
|
|
128
128
|
edges { characterRole node { id title { romaji english } type format } }
|
|
129
129
|
}
|
|
130
|
-
`,
|
|
130
|
+
`,R$=`
|
|
131
131
|
staffMedia(perPage: 25, sort: POPULARITY_DESC) {
|
|
132
132
|
edges { staffRole node { id title { romaji english } type format } }
|
|
133
133
|
}
|
|
134
|
-
`,
|
|
134
|
+
`,yv=`
|
|
135
135
|
id
|
|
136
136
|
name
|
|
137
137
|
isAnimationStudio
|
|
@@ -140,7 +140,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
140
140
|
media(sort: POPULARITY_DESC, perPage: 10) {
|
|
141
141
|
nodes { id title { romaji english } }
|
|
142
142
|
}
|
|
143
|
-
`,
|
|
143
|
+
`,bi=`
|
|
144
144
|
id
|
|
145
145
|
name
|
|
146
146
|
about(asHtml: false)
|
|
@@ -151,7 +151,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
151
151
|
donatorBadge
|
|
152
152
|
isFollowing
|
|
153
153
|
isFollower
|
|
154
|
-
`,
|
|
154
|
+
`,Hu=`
|
|
155
155
|
options {
|
|
156
156
|
titleLanguage displayAdultContent airingNotifications profileColor timezone
|
|
157
157
|
activityMergeTime staffNameLanguage restrictMessagesToFollowing
|
|
@@ -164,11 +164,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
164
164
|
animeList { sectionOrder splitCompletedSectionByFormat customLists advancedScoring advancedScoringEnabled theme }
|
|
165
165
|
mangaList { sectionOrder splitCompletedSectionByFormat customLists advancedScoring advancedScoringEnabled theme }
|
|
166
166
|
}
|
|
167
|
-
`,
|
|
167
|
+
`,Si=`
|
|
168
168
|
... on TextActivity { id type text(asHtml: false) siteUrl createdAt replyCount likeCount isLiked user { id name } }
|
|
169
169
|
... on ListActivity { id type status progress createdAt siteUrl replyCount likeCount isLiked user { id name } media { id title { romaji english } } }
|
|
170
170
|
... on MessageActivity { id type message(asHtml: false) createdAt siteUrl replyCount likeCount isLiked recipient { id name } messenger { id name } }
|
|
171
|
-
`,
|
|
171
|
+
`,k$=`
|
|
172
172
|
... on AiringNotification { id type createdAt animeId episode contexts media { id title { romaji english } } }
|
|
173
173
|
... on FollowingNotification { id type createdAt userId context user { id name } }
|
|
174
174
|
... on ActivityMessageNotification { id type createdAt userId activityId context user { id name } message { id message(asHtml: false) siteUrl } }
|
|
@@ -189,24 +189,54 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
189
189
|
... on MediaSubmissionUpdateNotification { id type createdAt contexts status notes submittedTitle media { id title { romaji english } } }
|
|
190
190
|
... on StaffSubmissionUpdateNotification { id type createdAt contexts status notes staff { id name { full } } }
|
|
191
191
|
... on CharacterSubmissionUpdateNotification { id type createdAt contexts status notes character { id name { full } } }
|
|
192
|
-
`;async function
|
|
192
|
+
`;async function T$(e,t){let n=typeof t=="number",i=n?`query($id:Int){Studio(id:$id){${yv}}}`:`query($search:String){Studio(search:$search){${yv}}}`,r=await e.gql.request(i,n?{id:t}:{search:t},e.authHeader());return Ce(r.Studio,`No studio found matching ${JSON.stringify(t)}.`)}async function E$(e){return(await e.gql.request("query{GenreCollection}",{},e.authHeader())).GenreCollection}async function P$(e,t=1,n=25){let o=(await e.gql.request("query{MediaTagCollection{id name description category isAdult}}",{},e.authHeader())).MediaTagCollection??[],a=(t-1)*n;return{tags:o.slice(a,a+n),pageInfo:{total:o.length,currentPage:t,perPage:n,lastPage:Math.max(1,Math.ceil(o.length/n)),hasNextPage:a+n<o.length}}}async function x$(e,t=1,n=7){return(await e.gql.request(`query($page:Int,$perPage:Int){SiteStatistics{
|
|
193
193
|
users(sort:DATE_DESC,page:$page,perPage:$perPage){nodes{date count change} pageInfo{total currentPage lastPage hasNextPage perPage}}
|
|
194
194
|
anime(sort:DATE_DESC,page:$page,perPage:$perPage){nodes{date count change} pageInfo{total currentPage lastPage hasNextPage perPage}}
|
|
195
195
|
manga(sort:DATE_DESC,page:$page,perPage:$perPage){nodes{date count change} pageInfo{total currentPage lastPage hasNextPage perPage}}
|
|
196
|
-
}}`,{page:t,perPage:n},e.authHeader())).SiteStatistics}function se(e){return{content:[{type:"text",text:JSON.stringify(e)}],structuredContent:e}}function ha(e){return{content:[{type:"text",text:e}],isError:!0}}function b$(e){return ha(hE(e))}function hE(e){switch(e.code){case"unauthorized":return e.status===void 0?e.message:e.authenticated?"The upstream service rejected this request (401) even though a token was sent. This can mean the token is invalid or expired, but it can also mean the authenticated account isn't allowed to perform this specific action (e.g. it doesn't own the resource being changed). Try login_anilist for a fresh token; if the same request still fails, the action itself is likely not permitted here.":"The upstream service rejected this request (401): it requires an authenticated AniList account. Run login_anilist (or set ANILIST_ACCESS_TOKEN) first.";case"forbidden":return e.authenticated?"The upstream service denied access (403). This can mean the authenticated account may lack permission for this specific action, but a 403 can also happen for reasons unrelated to the account or token \u2014 e.g. an upstream security block (a WAF rejecting unusual characters in the request). If the action should normally be permitted, try simplifying the request before assuming it's an account/token issue.":"The upstream service denied access (403) to this anonymous request. Since no credentials were involved, this isn't a permissions issue \u2014 it's more likely a security block or a temporary upstream outage. Try simplifying the request or retrying shortly.";case"not_found":return`No matching resource was found (404): ${e.message}`;case"not_modified":return`The content has not changed since the last request (304): ${e.message}`;case"rate_limited":return`Upstream rate limit hit (429): ${e.message} Please retry in a few seconds.`;case"server_error":return`The upstream service returned an error (5xx): ${e.message} Please retry later.`;case"network":return`Could not reach the upstream service (network error): ${e.message} Check connectivity and retry.`;case"timeout":return`The upstream request timed out: ${e.message} Please retry.`;case"bad_request":return`The request was rejected as invalid: ${e.message}`;default:return`Unexpected error talking to the upstream service: ${e.message}`}}async function ce(e){try{return await e()}catch(t){return t instanceof Re?b$(t):ha(`Unexpected error: ${t instanceof Error?t.message:String(t)}`)}}var _e=c.number().int().min(-2147483648).max(2147483647),an={readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1,openWorldHint:!0},qe=e=>({page:c.number().int().positive().default(1).describe("Page number for pagination."),perPage:c.number().int().min(1).max(25).default(e).describe("Results per page (max 25).")}),sn=e=>c.boolean().nullish().describe(`[Requires login] Whether this ${e} is in the caller's favourites. Has a brief read-after-write lag on AniList's own backend \u2014 confirmed live, a re-check right after toggle_favourite can briefly still show the pre-toggle value.`),He=c.object({total:c.number().int().nullish().describe("Not currently accurate (a known AniList performance limitation) \u2014 don't rely on it to decide whether to fetch more pages."),perPage:c.number().int().nullish(),currentPage:c.number().int().nullish(),lastPage:c.number().int().nullish().describe("Not currently accurate (a known AniList performance limitation) \u2014 use `hasNextPage` instead to decide whether to fetch another page."),hasNextPage:c.boolean().nullish()}).passthrough(),cn=c.object({deleted:c.boolean().nullish()}).passthrough(),Qt=c.object({id:c.number().int()}).passthrough().describe("Only `id` is guaranteed here \u2014 the real object has more fields, but their shape depends on which variant of an underlying union type this is (e.g. which activity type), so only the field common to every variant is declared."),jt=c.object({romaji:c.string().nullish(),english:c.string().nullish()}),Pr=c.object({year:c.number().int().nullish(),month:c.number().int().nullish(),day:c.number().int().nullish()}).passthrough(),fa=c.object({nodes:c.array(c.object({id:c.number().int()}).passthrough()).nullish()}).passthrough(),S$=c.object({anime:fa.nullish(),manga:fa.nullish(),characters:fa.nullish(),staff:fa.nullish(),studios:fa.nullish()}).passthrough(),bi=["ANIME","MANGA"],Dt=["CURRENT","PLANNING","COMPLETED","DROPPED","PAUSED","REPEATING"],At=c.union([_e,c.string().min(1)],{error:e=>e.input===void 0?"user is required \u2014 pass an AniList numeric ID or a username string.":"user must be an AniList numeric ID or a username string."}).describe("AniList user ID, or username.");var fE=c.object({id:c.number().int().optional(),name:c.string().optional(),description:c.string().nullish(),category:c.string().nullish(),isAdult:c.boolean().nullish()}).passthrough(),dv=c.object({nodes:c.array(c.object({date:c.number().nullish(),count:c.number().int().nullish(),change:c.number().int().nullish()}).passthrough()).nullish(),pageInfo:He.optional()}).passthrough(),gE=c.object({users:dv.nullish(),anime:dv.nullish(),manga:dv.nullish()}).passthrough(),vE=c.object({id:c.number().int().optional(),name:c.string().optional(),isAnimationStudio:c.boolean().nullish(),isFavourite:sn("studio"),siteUrl:c.string().nullish(),media:c.object({nodes:c.array(c.object({id:c.number().int().optional(),title:c.object({romaji:c.string().nullish(),english:c.string().nullish()}).nullish()}).passthrough()).nullish()}).passthrough().nullish()}).passthrough();function $$(e,t){e.registerTool("get_genres",{title:"Get genres",description:"List every genre name AniList uses to tag anime/manga (e.g. Action, Comedy, Slice of Life). Call this before filtering search_media by genre, so you pass a name AniList actually recognizes.",inputSchema:c.object({}),outputSchema:c.object({genres:c.array(c.string())}),annotations:{readOnlyHint:!0,openWorldHint:!0}},()=>ce(async()=>se({genres:await v$(t.ctx())})));let n=He.extend({total:c.number().int().nullish().describe("Exact total tag count \u2014 unlike this field's usual meaning on AniList-paginated tools, this one IS accurate: it's computed client-side from the full ~425-tag collection fetched in one request, not from AniList's own degraded page resolver. Safe to rely on to know when you've paged through everything."),lastPage:c.number().int().nullish().describe("Exact final page number for the requested `perPage` size (computed client-side) \u2014 accurate here, unlike the same field on AniList-paginated tools.")});e.registerTool("get_media_tags",{title:"Get media tags",description:"List every descriptive tag AniList uses on anime/manga (finer-grained than genres, e.g. 'Time Skip', 'Tragedy', 'Reincarnation'), with category and adult-content flag. There are ~425 tags total, so results are paginated \u2014 use `page`/`perPage` rather than expecting them all in one response. Use this to look up a tag's exact name before passing it to search_media's `tag_in` \u2014 tag names are case-sensitive, and an unrecognized name doesn't error, it just silently matches nothing (confirmed live).",inputSchema:c.object({...qe(25)}),outputSchema:c.object({tags:c.array(fE),pageInfo:n.optional()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({page:i,perPage:r})=>ce(async()=>se(await y$(t.ctx(),i,r)))),e.registerTool("get_site_statistics",{title:"Get AniList site statistics",description:"Get AniList's own site-wide statistics (new users/anime/manga daily counts), newest first. Useful for questions about AniList's growth/activity, not for anime data. Defaults to the last 7 days; use `page`/`perPage` to go further back. Confirmed live (bypassing this tool's own 25 cap): AniList's SiteStatistics field silently caps `perPage` at 25 itself, so this tool's own limit doesn't lose you anything.",inputSchema:c.object({page:c.number().int().positive().default(1).describe("Page number for pagination."),perPage:c.number().int().min(1).max(25).default(7).describe("Results per page/series (max 25, enforced by AniList itself).")}),outputSchema:c.object({statistics:gE}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({page:i,perPage:r})=>ce(async()=>se({statistics:await _$(t.ctx(),i,r)}))),e.registerTool("get_studio",{title:"Get studio",description:"Get a studio's profile (name, whether it's an animation studio) and its top 10 most popular produced titles (a fixed cap, not paginated \u2014 AniList's studio field exposes no more via this lookup), by AniList studio ID or by name. Confirmed live: `name` already does AniList's own fuzzy search (same mechanism as search_studio), so a partial name (e.g. \"Kyoto Anim\") resolves directly \u2014 reach for search_studio instead only when you need to browse multiple candidates rather than take the closest match. If both `id` and `name` are given, `id` takes precedence and `name` is ignored.",inputSchema:c.object({id:_e.optional().describe("AniList studio ID. Provide this or `name`."),name:c.string().min(1).optional().describe("Studio name to look up. Provide this or `id`.")}).refine(i=>i.id!==void 0||i.name!==void 0,{message:"Provide either `id` or `name`."}),outputSchema:c.object({studio:vE}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:i,name:r})=>ce(async()=>se({studio:await g$(t.ctx(),i??r)})))}async function w$(e,t){let n=`query($id:Int){Activity(id:$id){${_i}}}`,i=await e.gql.request(n,{id:t},e.authHeader());return je(i.Activity,`No activity found with ID ${t}.`)}async function Uu(e,t,n=1,i=10){let r=e.authHeader();if(typeof t=="number"){let d=`query($userId:Int,$page:Int,$perPage:Int){
|
|
197
|
-
|
|
196
|
+
}}`,{page:t,perPage:n},e.authHeader())).SiteStatistics}function ce(e){return{content:[{type:"text",text:JSON.stringify(e)}],structuredContent:e}}function ya(e){return{content:[{type:"text",text:e}],isError:!0}}function j$(e){return ya(PE(e))}function PE(e){switch(e.code){case"unauthorized":return e.status===void 0?e.message:e.authenticated?"The upstream service rejected this request (401) even though a token was sent. This can mean the token is invalid or expired, but it can also mean the authenticated account isn't allowed to perform this specific action (e.g. it doesn't own the resource being changed). Try login_anilist for a fresh token; if the same request still fails, the action itself is likely not permitted here.":"The upstream service rejected this request (401): it requires an authenticated AniList account. Run login_anilist (or set ANILIST_ACCESS_TOKEN) first.";case"forbidden":return e.authenticated?"The upstream service denied access (403). This can mean the authenticated account may lack permission for this specific action, but a 403 can also happen for reasons unrelated to the account or token \u2014 e.g. an upstream security block (a WAF rejecting unusual characters in the request). If the action should normally be permitted, try simplifying the request before assuming it's an account/token issue.":"The upstream service denied access (403) to this anonymous request. Since no credentials were involved, this isn't a permissions issue \u2014 it's more likely a security block or a temporary upstream outage. Try simplifying the request or retrying shortly.";case"not_found":return`No matching resource was found (404): ${e.message}`;case"not_modified":return`The content has not changed since the last request (304): ${e.message}`;case"rate_limited":return`Upstream rate limit hit (429): ${e.message} Please retry in a few seconds.`;case"server_error":return`The upstream service returned an error (5xx): ${e.message} Please retry later.`;case"network":return`Could not reach the upstream service (network error): ${e.message} Check connectivity and retry.`;case"timeout":return`The upstream request timed out: ${e.message} Please retry.`;case"bad_request":return`The request was rejected as invalid: ${e.message}`;default:return`Unexpected error talking to the upstream service: ${e.message}`}}async function le(e){try{return await e()}catch(t){return t instanceof Re?j$(t):ya(`Unexpected error: ${t instanceof Error?t.message:String(t)}`)}}var cn=["ANIME","MANGA"],At=["CURRENT","PLANNING","COMPLETED","DROPPED","PAUSED","REPEATING"],A$=["ANIME","MANGA","CHARACTER","STAFF","STUDIO"],O$=["CHARACTER","STAFF"];var oe=l.int32().positive(),Qe=oe.brand(),_v=oe.brand(),ba=oe.brand(),C$=oe.brand(),N$=oe.brand(),L$=oe.brand(),$i=oe.brand(),Ju=oe.brand(),Gu=oe.brand(),Sa=oe.brand(),q$=oe.brand(),ln={readOnlyHint:!1,destructiveHint:!0,idempotentHint:!1,openWorldHint:!0},qe=e=>({page:l.int().positive().default(1).describe("Page number for pagination. AniList's paginated connections (search results, a title's characters/staff/reviews, activity feeds, forum comments) reject a page whose page \xD7 perPage exceeds ~5000 entries with an upstream error, so paging that deep fails rather than returning more results."),perPage:l.int().positive().max(25).default(e).describe("Results per page (max 25).")}),xr=e=>l.boolean().nullish().describe(`[Requires login] Whether this ${e} is in the caller's favourites. Has a brief read-after-write lag on AniList's own backend \u2014 confirmed live, a re-check right after toggle_favourite can briefly still show the pre-toggle value.`),He=l.object({total:l.int().nullish().describe("Not currently accurate (a known AniList performance limitation) \u2014 don't rely on it to decide whether to fetch more pages."),perPage:l.int().nullish(),currentPage:l.int().nullish(),lastPage:l.int().nullish().describe("Not currently accurate (a known AniList performance limitation) \u2014 use `hasNextPage` instead to decide whether to fetch another page."),hasNextPage:l.boolean().nullish()}).loose(),un=l.object({deleted:l.boolean().nullish()}).loose(),er=l.object({id:oe}).loose().describe("Only `id` is guaranteed here \u2014 the real object has more fields, but their shape depends on which variant of an underlying union type this is (e.g. which activity type), so only the field common to every variant is declared."),Ot=l.object({romaji:l.string().nullish(),english:l.string().nullish()}),jr=l.object({year:l.int().positive().nullish(),month:l.int().positive().nullish(),day:l.int().positive().nullish()}).loose(),_a=l.object({nodes:l.array(l.object({id:oe}).loose()).nullish()}).loose(),M$=l.object({anime:_a.nullish(),manga:_a.nullish(),characters:_a.nullish(),staff:_a.nullish(),studios:_a.nullish()}).loose(),Ct=l.union([ba,l.string().min(1)],{error:e=>e.input===void 0?"user is required \u2014 pass an AniList numeric ID or a username string.":"user must be an AniList numeric ID or a username string."}).describe("AniList user ID, or username.");var xE=l.object({id:oe.optional(),name:l.string().optional(),description:l.string().nullish(),category:l.string().nullish(),isAdult:l.boolean().nullish()}).loose(),jE=He.extend({total:l.int().nullish().describe("Total number of daily data points AniList has for this series \u2014 confirmed live accurate for this field (unlike this schema's usual meaning elsewhere in this server), safe to rely on."),lastPage:l.int().nullish().describe("Final page number for the requested `perPage` size \u2014 confirmed live accurate for this field, safe to rely on to know when you've paged through everything.")}),bv=l.object({nodes:l.array(l.object({date:l.number().nonnegative().nullish(),count:l.int().nonnegative().nullish(),change:l.int().nullish()}).loose()).nullish(),pageInfo:jE.optional()}).loose(),AE=l.object({users:bv.nullish(),anime:bv.nullish(),manga:bv.nullish()}).loose(),OE=l.object({id:oe.optional(),name:l.string().optional(),isAnimationStudio:l.boolean().nullish(),isFavourite:xr("studio"),siteUrl:l.httpUrl().nullish(),media:l.object({nodes:l.array(l.object({id:oe.optional(),title:l.object({romaji:l.string().nullish(),english:l.string().nullish()}).nullish()}).loose()).nullish()}).loose().nullish()}).loose();function D$(e,t){e.registerTool("get_genres",{title:"Get genres",description:"List every genre name AniList uses to tag anime/manga (e.g. Action, Comedy, Slice of Life). Call this before filtering search_media by genre, so you pass a name AniList actually recognizes.",inputSchema:l.object({}),outputSchema:l.object({genres:l.array(l.string())}),annotations:{readOnlyHint:!0,openWorldHint:!0}},()=>le(async()=>ce({genres:await E$(t.ctx())})));let n=He.extend({total:l.int().nullish().describe("Exact total tag count \u2014 unlike this field's usual meaning on AniList-paginated tools, this one IS accurate: it's computed client-side from the full ~425-tag collection fetched in one request, not from AniList's own degraded page resolver. Safe to rely on to know when you've paged through everything."),lastPage:l.int().nullish().describe("Exact final page number for the requested `perPage` size (computed client-side) \u2014 accurate here, unlike the same field on AniList-paginated tools.")});e.registerTool("get_media_tags",{title:"Get media tags",description:"List every descriptive tag AniList uses on anime/manga (finer-grained than genres, e.g. 'Time Skip', 'Tragedy', 'Reincarnation'), with category and adult-content flag. There are ~425 tags total, so results are paginated \u2014 use `page`/`perPage` rather than expecting them all in one response. Use this to look up a tag's exact name before passing it to search_media's `tag_in` \u2014 tag names are case-sensitive, and an unrecognized name doesn't error, it just silently matches nothing (confirmed live).",inputSchema:l.object({...qe(25)}),outputSchema:l.object({tags:l.array(xE),pageInfo:n.optional()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({page:i,perPage:r})=>le(async()=>ce(await P$(t.ctx(),i,r)))),e.registerTool("get_site_statistics",{title:"Get AniList site statistics",description:"Get AniList's own site-wide statistics (new users/anime/manga daily counts), newest first. Useful for questions about AniList's growth/activity, not for anime data. Defaults to the last 7 days; use `page`/`perPage` to go further back. Confirmed live (bypassing this tool's own 25 cap): AniList's SiteStatistics field silently caps `perPage` at 25 itself, so this tool's own limit doesn't lose you anything.",inputSchema:l.object({page:l.int().positive().default(1).describe("Page number for pagination."),perPage:l.int().min(1).max(25).default(7).describe("Results per page/series (max 25, enforced by AniList itself).")}),outputSchema:l.object({statistics:AE}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({page:i,perPage:r})=>le(async()=>ce({statistics:await x$(t.ctx(),i,r)}))),e.registerTool("get_studio",{title:"Get studio",description:"Get a studio's profile (name, whether it's an animation studio) and its top 10 most popular produced titles (a fixed cap, not paginated \u2014 AniList's studio field exposes no more via this lookup), by AniList studio ID or by name. Confirmed live: `name` already does AniList's own fuzzy search (same mechanism as search_studio), so a partial name (e.g. \"Kyoto Anim\") resolves directly \u2014 reach for search_studio instead only when you need to browse multiple candidates rather than take the closest match. If both `id` and `name` are given, `id` takes precedence and `name` is ignored.",inputSchema:l.object({id:L$.optional().describe("AniList studio ID. Provide this or `name`."),name:l.string().min(1).optional().describe("Studio name to look up. Provide this or `id`.")}).refine(i=>i.id!==void 0||i.name!==void 0,{message:"Provide either `id` or `name`."}),outputSchema:l.object({studio:OE}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:i,name:r})=>le(async()=>ce({studio:await T$(t.ctx(),i??r)})))}async function Bu(e,t,n){let r=await e.gql.request("query($name:String){User(name:$name){id}}",{name:t},n);return Ce(r.User,`No AniList user named "${t}" was found.`).id}async function U$(e,t){let n=typeof t=="number",i=`${bi}${Hu}`,r=n?`query($id:Int){User(id:$id){${i}}}`:`query($name:String){User(name:$name){${i}}}`,o=await e.gql.request(r,n?{id:t}:{name:t},e.authHeader());return Ce(o.User,`No AniList user found matching ${JSON.stringify(t)}.`)}async function F$(e,t){let n=typeof t=="number",i="statistics{anime{count meanScore minutesWatched episodesWatched}manga{count meanScore chaptersRead volumesRead}}",r=n?`query($id:Int){User(id:$id){${i}}}`:`query($name:String){User(name:$name){${i}}}`,o=await e.gql.request(r,n?{id:t}:{name:t},e.authHeader());return Ce(o.User,`No AniList user found matching ${JSON.stringify(t)}.`)}async function V$(e,t){let n=typeof t=="number",i=`${bi}${Hu} statistics{anime{count meanScore minutesWatched episodesWatched}manga{count meanScore chaptersRead volumesRead}}`,r=n?`query($id:Int){User(id:$id){${i}}}`:`query($name:String){User(name:$name){${i}}}`,o=await e.gql.request(r,n?{id:t}:{name:t},e.authHeader());return Ce(o.User,`No AniList user found matching ${JSON.stringify(t)}.`)}async function Z$(e){let t=e.requireAuth(),n=`query{Viewer{${bi}${Hu}}}`;return(await e.gql.request(n,{},t)).Viewer}async function H$(e,t){let n=e.requireAuth();return(await e.gql.request("mutation($id:Int){ToggleFollow(userId:$id){id name isFollowing}}",{id:t},n)).ToggleFollow}async function J$(e,t){let n=e.requireAuth();return(await e.gql.request(`mutation(
|
|
197
|
+
$about:String,$titleLanguage:UserTitleLanguage,$displayAdultContent:Boolean,$airingNotifications:Boolean,
|
|
198
|
+
$scoreFormat:ScoreFormat,$rowOrder:String,$profileColor:String,$donatorBadge:String,
|
|
199
|
+
$notificationOptions:[NotificationOptionInput],$timezone:String,$activityMergeTime:Int,
|
|
200
|
+
$staffNameLanguage:UserStaffNameLanguage,$restrictMessagesToFollowing:Boolean,
|
|
201
|
+
$disabledListActivity:[ListActivityOptionInput],
|
|
202
|
+
$animeListOptions:MediaListOptionsInput,$mangaListOptions:MediaListOptionsInput
|
|
203
|
+
){
|
|
204
|
+
UpdateUser(
|
|
205
|
+
about:$about,titleLanguage:$titleLanguage,displayAdultContent:$displayAdultContent,
|
|
206
|
+
airingNotifications:$airingNotifications,scoreFormat:$scoreFormat,rowOrder:$rowOrder,
|
|
207
|
+
profileColor:$profileColor,donatorBadge:$donatorBadge,notificationOptions:$notificationOptions,
|
|
208
|
+
timezone:$timezone,activityMergeTime:$activityMergeTime,staffNameLanguage:$staffNameLanguage,
|
|
209
|
+
restrictMessagesToFollowing:$restrictMessagesToFollowing,disabledListActivity:$disabledListActivity,
|
|
210
|
+
animeListOptions:$animeListOptions,mangaListOptions:$mangaListOptions
|
|
211
|
+
){
|
|
212
|
+
id name about(asHtml:false) donatorBadge
|
|
213
|
+
options{
|
|
214
|
+
titleLanguage displayAdultContent airingNotifications profileColor timezone
|
|
215
|
+
activityMergeTime staffNameLanguage restrictMessagesToFollowing
|
|
216
|
+
notificationOptions{type enabled}
|
|
217
|
+
disabledListActivity{type disabled}
|
|
218
|
+
}
|
|
219
|
+
mediaListOptions{
|
|
220
|
+
scoreFormat
|
|
221
|
+
rowOrder
|
|
222
|
+
animeList{sectionOrder splitCompletedSectionByFormat customLists advancedScoring advancedScoringEnabled theme}
|
|
223
|
+
mangaList{sectionOrder splitCompletedSectionByFormat customLists advancedScoring advancedScoringEnabled theme}
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
}`,{...t},n)).UpdateUser}async function G$(e,t){let n=`query($id:Int){Activity(id:$id){${Si}}}`,i=await e.gql.request(n,{id:t},e.authHeader());return Ce(i.Activity,`No activity found with ID ${t}.`)}async function Ku(e,t,n=1,i=10){let r=e.authHeader();if(typeof t=="number"){let c=`query($userId:Int,$page:Int,$perPage:Int){
|
|
227
|
+
${_i("User","userId")}
|
|
198
228
|
feed:Page(page:$page,perPage:$perPage){
|
|
199
229
|
pageInfo{total currentPage lastPage hasNextPage}
|
|
200
|
-
activities(userId:$userId,sort:ID_DESC){${
|
|
230
|
+
activities(userId:$userId,sort:ID_DESC){${Si}}
|
|
201
231
|
}
|
|
202
|
-
}`,
|
|
232
|
+
}`,u=await e.gql.request(c,{userId:t,page:n,perPage:i},r);return Ce(u.exists,`No AniList user found with ID ${t}.`),u.feed}let o=await Bu(e,t,r),a=`query($userId:Int,$page:Int,$perPage:Int){Page(page:$page,perPage:$perPage){
|
|
203
233
|
pageInfo{total currentPage lastPage hasNextPage}
|
|
204
|
-
activities(userId:$userId,sort:ID_DESC){${
|
|
205
|
-
}}`;return(await e.gql.request(
|
|
234
|
+
activities(userId:$userId,sort:ID_DESC){${Si}}
|
|
235
|
+
}}`;return(await e.gql.request(a,{userId:o,page:n,perPage:i},r)).Page}async function B$(e,t,n){let i=e.requireAuth();return(await e.gql.request(`mutation($id:Int,$text:String){SaveTextActivity(id:$id,text:$text){
|
|
206
236
|
... on TextActivity { id text(asHtml:false) siteUrl }
|
|
207
|
-
}}`,{id:n,text:t},i)).SaveTextActivity}async function
|
|
237
|
+
}}`,{id:n,text:t},i)).SaveTextActivity}async function K$(e,t,n,i){let r=e.requireAuth();return(await e.gql.request(`mutation($id:Int,$recipientId:Int,$message:String){SaveMessageActivity(id:$id,recipientId:$recipientId,message:$message){
|
|
208
238
|
... on MessageActivity { id message(asHtml:false) siteUrl }
|
|
209
|
-
}}`,{id:i,recipientId:t,message:n},r)).SaveMessageActivity}async function
|
|
239
|
+
}}`,{id:i,recipientId:t,message:n},r)).SaveMessageActivity}async function W$(e,t){let n=e.requireAuth(),r=await e.gql.request("mutation($id:Int){DeleteActivity(id:$id){deleted}}",{id:t},n);if(!r.DeleteActivity?.deleted)throw new Re({code:"not_found",message:"AniList reported this activity as not deleted \u2014 it may not exist or you may not own it."});return r.DeleteActivity}var Sv={id:oe,createdAt:l.number().nonnegative().nullish(),siteUrl:l.httpUrl().nullish(),replyCount:l.int().nonnegative().nullish(),likeCount:l.int().nonnegative().nullish(),isLiked:l.boolean().nullish()},Wu=l.object({id:oe,name:l.string().nullish()}).loose(),NE=l.object({...Sv,type:l.literal("TEXT"),text:l.string().nullish(),user:Wu.nullish()}).loose(),LE=l.object({...Sv,type:l.enum(["ANIME_LIST","MANGA_LIST","MEDIA_LIST"]),status:l.string().nullish(),progress:l.string().nullish(),user:Wu.nullish(),media:l.object({id:oe,title:Ot.nullish()}).loose().nullish()}).loose(),qE=l.object({...Sv,type:l.literal("MESSAGE"),message:l.string().nullish(),recipient:Wu.nullish(),messenger:Wu.nullish()}).loose(),wi=l.discriminatedUnion("type",[NE,LE,qE]),ME=l.object({id:oe,text:l.string().nullish(),siteUrl:l.httpUrl().nullish()}).loose(),DE=l.object({id:oe,message:l.string().nullish(),siteUrl:l.httpUrl().nullish()}).loose();function X$(e,t){e.registerTool("get_activity",{title:"Get an activity post",description:"Get a single AniList activity post (list update, text post, or message) by its ID, including `replyCount`, `likeCount`, and `isLiked`.",inputSchema:l.object({id:Sa.describe("AniList activity ID \u2014 from get_user_activity, get_user_recent_activity, search_activity, or the id returned by post_text_activity/post_message_activity.")}),outputSchema:l.object({activity:wi}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n})=>le(async()=>ce({activity:await G$(t.ctx(),n)}))),e.registerTool("get_user_activity",{title:"Get a user's activity feed",description:"List recent AniList activity posts from a specific user \u2014 every activity type (list updates, text posts, and message activity they received), the underlying query applies no type filter of its own. Accepts an exact AniList username directly (it's resolved to an id with one extra internal lookup) \u2014 no need to call search_user first unless you only have a partial/fuzzy name. Use search_activity instead if you want to restrict to one activity type (TEXT/ANIME_LIST/MANGA_LIST/MEDIA_LIST/MESSAGE) or browse without pinning to one user. Use get_user_recent_activity instead if you just want a quick, fixed-size (5-item) recent snapshot without paginating.",inputSchema:l.object({user:Ct.describe("AniList user ID, or username. Unlike search_activity's own `user` filter, both an unknown numeric ID and an unknown username error here rather than silently returning an empty feed."),...qe(10)}),outputSchema:l.object({results:l.object({pageInfo:He.optional(),activities:l.array(wi).optional()}).loose()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({user:n,page:i,perPage:r})=>le(async()=>ce({results:await Ku(t.ctx(),n,i,r)}))),e.registerTool("post_text_activity",{title:"Post a text activity",description:"[Requires login] Post a new text-status update to the authenticated user's own AniList profile, or update an existing one by passing its `id`.",inputSchema:l.object({text:l.string().min(5).max(1e4).describe("The text to post (per AniList's own schema: 5-10000 characters)."),id:Sa.optional().describe("Activity ID to update instead of creating a new post.")}),outputSchema:l.object({activity:ME}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},({text:n,id:i})=>le(async()=>ce({activity:await B$(t.ctx(),n,i)}))),e.registerTool("post_message_activity",{title:"Post a message activity",description:"[Requires login] Post a new message-style activity to another AniList user's profile, or update an existing one by passing its `id`. Despite the name, this is NOT a private DM \u2014 like post_text_activity, it's publicly visible on both users' activity feeds/profiles to anyone who can view them. This is a limitation of this tool, not AniList itself: AniList's underlying mutation does accept a `private` argument, but this tool doesn't expose it, so every message sent through it is public. Don't use it for anything the sender expects to stay confidential.",inputSchema:l.object({recipientId:ba.describe("AniList numeric user ID of the message recipient (resolve a username via search_user first)."),message:l.string().min(2).max(1e4).describe("The message text to post (per AniList's own schema: 2-10000 characters)."),id:Sa.optional().describe("Activity ID to update instead of creating a new post.")}),outputSchema:l.object({activity:DE}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},({recipientId:n,message:i,id:r})=>le(async()=>ce({activity:await K$(t.ctx(),n,i,r)}))),e.registerTool("delete_activity",{title:"Delete an activity post",description:"[Requires login] Delete an activity post the authenticated user owns. This cannot be undone, and calling it again on an already-deleted id errors rather than silently succeeding.",inputSchema:l.object({id:Sa.describe("AniList activity ID to delete \u2014 from get_user_activity, get_user_recent_activity, search_activity, or the id returned by a previous post_text_activity/post_message_activity call.")}),outputSchema:l.object({result:un}),annotations:ln},({id:n})=>le(async()=>ce({result:await W$(t.ctx(),n)})))}async function Q$(e,t,n,i=1,r=25){let o=typeof n=="number";return(await e.gql.request(`query($userId:Int,$userName:String,$type:MediaType,$chunk:Int,$perChunk:Int){MediaListCollection(userId:$userId,userName:$userName,type:$type,chunk:$chunk,perChunk:$perChunk){
|
|
210
240
|
hasNextChunk
|
|
211
241
|
lists{name isCustomList isSplitCompletedList status entries{
|
|
212
242
|
id status score(format:POINT_10_DECIMAL) progress progressVolumes repeat priority private notes
|
|
@@ -215,10 +245,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
215
245
|
customLists(asArray: true) advancedScores
|
|
216
246
|
media{id idMal title{romaji english} episodes chapters siteUrl}
|
|
217
247
|
}}
|
|
218
|
-
}}`,o?{userId:n,type:t,chunk:i,perChunk:r}:{userName:n,type:t,chunk:i,perChunk:r},e.authHeader())).MediaListCollection}async function
|
|
248
|
+
}}`,o?{userId:n,type:t,chunk:i,perChunk:r}:{userName:n,type:t,chunk:i,perChunk:r},e.authHeader())).MediaListCollection}async function UE(e,t){let i=await e.gql.request(`query{Viewer{mediaListOptions{
|
|
219
249
|
animeList{advancedScoring advancedScoringEnabled}
|
|
220
250
|
mangaList{advancedScoring advancedScoringEnabled}
|
|
221
|
-
}}}`,{},t,{skipCache:!0});return{anime:i.Viewer.mediaListOptions.animeList.advancedScoring??[],manga:i.Viewer.mediaListOptions.mangaList.advancedScoring??[],animeEnabled:i.Viewer.mediaListOptions.animeList.advancedScoringEnabled??!1,mangaEnabled:i.Viewer.mediaListOptions.mangaList.advancedScoringEnabled??!1}}async function
|
|
251
|
+
}}}`,{},t,{skipCache:!0});return{anime:i.Viewer.mediaListOptions.animeList.advancedScoring??[],manga:i.Viewer.mediaListOptions.mangaList.advancedScoring??[],animeEnabled:i.Viewer.mediaListOptions.animeList.advancedScoringEnabled??!1,mangaEnabled:i.Viewer.mediaListOptions.mangaList.advancedScoringEnabled??!1}}async function FE(e,t,n){return n.mediaId!==void 0?(await e.gql.request("query($id:Int){Media(id:$id){type}}",{id:n.mediaId},t,{skipCache:!0})).Media?.type:(await e.gql.request("query($id:Int){MediaList(id:$id){media{type}}}",{id:n.listEntryId},t,{skipCache:!0})).MediaList?.media?.type}function VE(e,t,n){let i=t==="MANGA",r=i?n.manga:n.anime;if(!(i?n.mangaEnabled:n.animeEnabled))throw new Re({code:"bad_request",message:`Advanced scoring isn't enabled for ${i?"manga":"anime"} on this account.`});let s=Object.keys(e).filter(c=>!r.includes(c));if(s.length)throw new Re({code:"bad_request",message:`advancedScores keys (${s.join(", ")}) don't match this account's configured advanced scoring categories for ${i?"manga":"anime"}: ${r.join(", ")}.`});return r.map(c=>Math.round((e[c]??0)*10))}async function $v(e,t){let n=e.requireAuth(),i;if(t.advancedScores){let[a,s]=await Promise.all([UE(e,n),FE(e,n,t)]);if(!s)throw new Re({code:"bad_request",message:"Could not determine whether this entry is anime or manga, needed to order advancedScores against the right category list."});i=VE(t.advancedScores,s,a)}return(await e.gql.request(`mutation(
|
|
222
252
|
$id:Int,$mediaId:Int,$status:MediaListStatus,$scoreRaw:Int,$progress:Int,$progressVolumes:Int,
|
|
223
253
|
$repeat:Int,$priority:Int,$private:Boolean,$notes:String,$hiddenFromStatusLists:Boolean,
|
|
224
254
|
$startedAt:FuzzyDateInput,$completedAt:FuzzyDateInput,
|
|
@@ -227,12 +257,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
227
257
|
id:$id,mediaId:$mediaId,status:$status,scoreRaw:$scoreRaw,progress:$progress,progressVolumes:$progressVolumes,
|
|
228
258
|
repeat:$repeat,priority:$priority,private:$private,notes:$notes,hiddenFromStatusLists:$hiddenFromStatusLists,
|
|
229
259
|
startedAt:$startedAt,completedAt:$completedAt,customLists:$customLists,advancedScores:$advancedScores
|
|
230
|
-
){id status score(format:POINT_10_DECIMAL) progress mediaId hiddenFromStatusLists}}`,{id:t.listEntryId,mediaId:t.mediaId,status:t.status,scoreRaw:t.score===void 0?void 0:Math.round(t.score*10),progress:t.progress,progressVolumes:t.progressVolumes,repeat:t.repeat,priority:t.priority,private:t.private,notes:t.notes,hiddenFromStatusLists:t.hiddenFromStatusLists,startedAt:t.startedAt,completedAt:t.completedAt,customLists:t.customLists,advancedScores:i},n)).SaveMediaListEntry}async function P$(e,t){let n=e.requireAuth(),r=await e.gql.request("mutation($id:Int){DeleteMediaListEntry(id:$id){deleted}}",{id:t},n);if(!r.DeleteMediaListEntry?.deleted)throw new Re({code:"not_found",message:"AniList reported this list entry as not deleted \u2014 it may not exist or you may not own it."});return r.DeleteMediaListEntry}var Fu=c.object({year:c.number().int().optional(),month:c.number().int().min(1).max(12).optional(),day:c.number().int().min(1).max(31).optional()}).describe("A partial date; omit fields you don't know (e.g. just {year: 2026})."),pv=1e3,hv=255,fv=6e3,x$=c.number().min(0).max(10).optional(),Vu=c.number().int().min(0).optional(),j$=c.number().int().min(0).max(pv).optional(),A$=c.number().int().min(0).max(hv).optional(),O$=c.string().max(fv).optional(),N$=c.record(c.string(),c.number().min(0).max(10)).optional(),zE=c.object({id:c.number().int(),idMal:c.number().int().nullish(),title:jt.nullish(),episodes:c.number().int().nullish(),chapters:c.number().int().nullish(),siteUrl:c.string().nullish()}).passthrough(),IE=c.object({id:c.number().int(),status:c.string().nullish(),score:c.number().nullish(),progress:c.number().int().nullish(),progressVolumes:c.number().int().nullish(),repeat:c.number().int().nullish(),priority:c.number().int().nullish(),private:c.boolean().nullish(),notes:c.string().nullish(),hiddenFromStatusLists:c.boolean().nullish(),startedAt:Pr.nullish(),completedAt:Pr.nullish(),updatedAt:c.number().nullish(),createdAt:c.number().nullish(),customLists:c.array(c.object({name:c.string().nullish(),enabled:c.boolean().nullish()}).passthrough()).nullish().describe("Every custom list configured on the account, with `enabled` showing whether THIS entry is filed under it. Naming a list here (via add_list_entry/update_list_entry) that isn't already in the account's `animeListOptions`/`mangaListOptions` `customLists` is silently a no-op on write \u2014 the list must exist first."),advancedScores:c.unknown().nullish().describe("Per-category advanced scores as AniList actually stores them \u2014 an untyped value (the write side takes a plain {category: score} map via add_list_entry/update_list_entry's `advancedScores`, but the echoed read-back shape isn't guaranteed to match it)."),media:zE.nullish()}).passthrough(),RE=c.object({name:c.string().nullish(),isCustomList:c.boolean().nullish(),isSplitCompletedList:c.boolean().nullish(),status:c.string().nullish(),entries:c.array(IE).nullish()}).passthrough(),C$=c.object({id:c.number().int(),status:c.string().nullish(),score:c.number().nullish(),progress:c.number().int().nullish(),mediaId:c.number().int().nullish(),hiddenFromStatusLists:c.boolean().nullish()}).passthrough();function L$(e,t){e.registerTool("get_user_list",{title:"Get a user's anime or manga list",description:"Get a user's AniList anime or manga list, grouped by status/custom list, with each entry's status, score, progress and dates. Works for any public/unlisted user. Accepts an exact AniList username directly \u2014 no need to call search_user first unless you only have a partial/fuzzy name. Paginated by `chunk`/`perChunk` (AniList's own mechanism for this \u2014 counted across entries of ALL statuses combined, not per status), since a large list can otherwise return thousands of entries in one response; check `hasNextChunk` and increment `chunk` to keep paging. AniList itself caps this at the ~11,000 most recently updated unique entries \u2014 irrelevant for virtually every account, but a hard ceiling if one is ever hit (older entries beyond it aren't retrievable through this field at all, by any chunk).",inputSchema:c.object({type:c.enum(bi).describe("Whether to get the anime or manga list."),user:At,chunk:c.number().int().positive().default(1).describe("Chunk number for pagination (AniList paginates this list by chunk, not page)."),perChunk:c.number().int().min(1).max(25).default(25).describe("Entries per chunk, counted across all statuses combined (max 25).")}),outputSchema:c.object({lists:c.array(RE).nullish(),hasNextChunk:c.boolean().nullish()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,user:i,chunk:r,perChunk:o})=>ce(async()=>se(await E$(t.ctx(),n,i,r,o)))),e.registerTool("add_list_entry",{title:"Add an entry to your AniList list",description:"[Requires login] Add an anime/manga to the authenticated user's own AniList list. Use search_media first to resolve the title to its AniList media ID. Only set the fields you care about \u2014 everything else is left at AniList's defaults ONLY if this media isn't already on the list. AniList upserts by media ID: if an entry for it already exists (e.g. previously dropped, with its own score/notes/progress), calling this updates that entry in place instead \u2014 every field you don't set here keeps its previous value, not a default. Use get_user_list first to check for an existing entry if you need a guaranteed-fresh one.",inputSchema:c.object({mediaId:_e.describe("AniList anime/manga ID to add (from search_media)."),status:c.enum(Dt).optional().describe("List status. If omitted on a genuinely NEW entry, AniList defaults to CURRENT (with `startedAt` auto-set to today) \u2014 confirmed live; despite AniList's own site UI defaulting new entries to Planning, the API itself does not. If the media is already on the list, this default does NOT apply \u2014 omitting `status` on an update-in-place leaves the entry's existing status untouched."),score:x$.describe("Score out of 10 (decimals allowed, e.g. 8.5), always on this scale regardless of the account's configured scoreFormat (set via update_user) \u2014 no conversion needed."),progress:Vu.describe("Episodes watched / chapters read."),progressVolumes:Vu.describe("Volumes read (manga only)."),repeat:j$.describe(`Number of times rewatched/reread (per AniList's own schema, capped at ${pv}).`),priority:A$.describe(`List priority (higher = more important; per AniList's own schema, capped at ${hv}).`),private:c.boolean().optional().describe("Hide this entry from your public list."),notes:O$.describe(`Free-text notes for this entry (per AniList's own schema, capped at ${fv} characters).`),hiddenFromStatusLists:c.boolean().optional().describe("Hide this entry from the public status-grouped list views (e.g. 'Watching') while still counting it in statistics \u2014 distinct from `private`, which hides the entry entirely."),startedAt:Fu.optional().describe("Date you started."),completedAt:Fu.optional().describe("Date you completed."),customLists:c.array(c.string()).optional().describe("Names of custom lists to file this entry under \u2014 REPLACES this entry's full set of enabled lists, not merged: naming only a subset silently turns OFF every other list this entry was previously filed under (confirmed live), it doesn't leave them alone. Include every list name you want this entry to stay tagged with, not just the one you're adding. Also, the list must already exist on the account (update_user's `animeListOptions`/`mangaListOptions` `customLists`) \u2014 naming one that doesn't exist yet is silently a no-op, not an error."),advancedScores:N$.describe("Per-category scores, 0-10 scale (e.g. {Story: 8, Characters: 9}) \u2014 errors if advanced scoring isn't enabled for this media's type, or if a key doesn't match the account's configured category list for it (anime and manga have SEPARATELY configured lists). Any of that list's categories you omit here is set to 0, not left unchanged \u2014 include every category if you don't want the others zeroed.")}),outputSchema:c.object({entry:C$}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},n=>ce(async()=>se({entry:await mv(t.ctx(),n)}))),e.registerTool("update_list_entry",{title:"Update an entry on your AniList list",description:"[Requires login] Update an existing entry on the authenticated user's own AniList list by its list-entry ID (NOT the media ID \u2014 get it from get_user_list, or from add_list_entry's response). Only set the fields you want to change.",inputSchema:c.object({listEntryId:_e.describe("The list ENTRY id to update (not the media id)."),status:c.enum(Dt).optional().describe("New list status."),score:x$.describe("New score out of 10 (decimals allowed), always on this scale regardless of the account's configured scoreFormat (set via update_user) \u2014 no conversion needed."),progress:Vu.describe("New episodes watched / chapters read."),progressVolumes:Vu.describe("New volumes read (manga only)."),repeat:j$.describe(`New rewatch/reread count (per AniList's own schema, capped at ${pv}).`),priority:A$.describe(`New list priority (higher = more important; per AniList's own schema, capped at ${hv}).`),private:c.boolean().optional().describe("Hide/unhide this entry from your public list."),notes:O$.describe(`New free-text notes (per AniList's own schema, capped at ${fv} characters).`),hiddenFromStatusLists:c.boolean().optional().describe("Hide/unhide this entry from the public status-grouped list views (e.g. 'Watching') while still counting it in statistics \u2014 distinct from `private`, which hides the entry entirely."),startedAt:Fu.optional().describe("New start date."),completedAt:Fu.optional().describe("New completion date."),customLists:c.array(c.string()).optional().describe("New set of custom lists for this entry \u2014 REPLACES this entry's full set of enabled lists, not merged: naming only a subset silently turns OFF every other list this entry was previously filed under (confirmed live for add_list_entry's identical field; this tool writes the same underlying value), it doesn't leave them alone. Include every list name you want this entry to stay tagged with, not just the one you're changing. Also, the list must already exist on the account (update_user's `animeListOptions`/`mangaListOptions` `customLists`) \u2014 naming one that doesn't exist yet is silently a no-op, not an error."),advancedScores:N$.describe("New per-category scores, keyed and error-checked the same way as add_list_entry (errors if advanced scoring is disabled, or a key doesn't match a configured category). Unlike this tool's other fields, this one is NOT a true partial update: any configured category you omit is set to 0, not left at its previous value \u2014 pass every category if you're only changing one.")}),outputSchema:c.object({entry:C$}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!0}},({listEntryId:n,...i})=>ce(async()=>se({entry:await mv(t.ctx(),{listEntryId:n,...i})}))),e.registerTool("remove_list_entry",{title:"Remove an entry from your AniList list",description:"[Requires login] Delete an entry from the authenticated user's own AniList list by its list-entry ID (NOT the media id) \u2014 get it from get_user_list. This cannot be undone, and calling it again on an already-deleted id errors rather than silently succeeding.",inputSchema:c.object({listEntryId:_e.describe("The list ENTRY id to delete (not the media id).")}),outputSchema:c.object({result:cn}),annotations:an},({listEntryId:n})=>ce(async()=>se({result:await P$(t.ctx(),n)})))}async function q$(e,t,n,i=!1){let r=`${qu}${Mu}${d$}${i?m$:""}`;if(Array.isArray(n)){let s=`query($ids:[Int],$type:MediaType){Page(perPage:${n.length}){media(id_in:$ids,type:$type){${r}}}}`,l=await e.gql.request(s,{ids:n,type:t},e.authHeader()),u=new Map(l.Page.media.map(d=>[d.id,d]));return n.map(d=>u.get(d)??null)}let o=`query($id:Int,$type:MediaType){Media(id:$id,type:$type){${r}}}`;return(await e.gql.request(o,{id:n,type:t},e.authHeader())).Media}async function M$(e,t,n){let r=await e.gql.request(`query($id:Int,$type:MediaType){Media(id:$id,type:$type){
|
|
260
|
+
){id status score(format:POINT_10_DECIMAL) progress mediaId hiddenFromStatusLists}}`,{id:t.listEntryId,mediaId:t.mediaId,status:t.status,scoreRaw:t.score===void 0?void 0:Math.round(t.score*10),progress:t.progress,progressVolumes:t.progressVolumes,repeat:t.repeat,priority:t.priority,private:t.private,notes:t.notes,hiddenFromStatusLists:t.hiddenFromStatusLists,startedAt:t.startedAt,completedAt:t.completedAt,customLists:t.customLists,advancedScores:i},n)).SaveMediaListEntry}async function ew(e,t){let n=e.requireAuth(),r=await e.gql.request("mutation($id:Int){DeleteMediaListEntry(id:$id){deleted}}",{id:t},n);if(!r.DeleteMediaListEntry?.deleted)throw new Re({code:"not_found",message:"AniList reported this list entry as not deleted \u2014 it may not exist or you may not own it."});return r.DeleteMediaListEntry}var Yu=l.object({year:l.int().positive().optional(),month:l.int().min(1).max(12).optional(),day:l.int().min(1).max(31).optional()}).describe("A partial date; omit fields you don't know (e.g. just {year: 2026})."),wv=1e3,zv=255,Iv=6e3,tw=l.number().nonnegative().max(10).optional(),Xu=l.int().nonnegative().optional(),rw=l.int().nonnegative().max(wv).optional(),nw=l.int().nonnegative().max(zv).optional(),iw=l.string().max(Iv).optional(),ow=l.record(l.string(),l.number().nonnegative().max(10)).optional(),HE=l.object({id:oe,idMal:l.int().positive().nullish(),title:Ot.nullish(),episodes:l.int().positive().nullish(),chapters:l.int().positive().nullish(),siteUrl:l.httpUrl().nullish()}).loose(),JE=l.object({id:oe,status:l.string().nullish(),score:l.number().nonnegative().nullish(),progress:l.int().nonnegative().nullish(),progressVolumes:l.int().nonnegative().nullish(),repeat:l.int().nonnegative().nullish(),priority:l.int().nonnegative().nullish(),private:l.boolean().nullish(),notes:l.string().nullish(),hiddenFromStatusLists:l.boolean().nullish(),startedAt:jr.nullish(),completedAt:jr.nullish(),updatedAt:l.number().nonnegative().nullish(),createdAt:l.number().nonnegative().nullish(),customLists:l.array(l.object({name:l.string().nullish(),enabled:l.boolean().nullish()}).loose()).nullish().describe("Every custom list configured on the account, with `enabled` showing whether THIS entry is filed under it. Naming a list here (via add_list_entry/update_list_entry) that isn't already in the account's `animeListOptions`/`mangaListOptions` `customLists` is silently a no-op on write \u2014 the list must exist first."),advancedScores:l.json().nullish().describe("Per-category advanced scores as AniList actually stores them \u2014 an untyped value (the write side takes a plain {category: score} map via add_list_entry/update_list_entry's `advancedScores`, but the echoed read-back shape isn't guaranteed to match it)."),media:HE.nullish()}).loose(),GE=l.object({name:l.string().nullish(),isCustomList:l.boolean().nullish(),isSplitCompletedList:l.boolean().nullish(),status:l.string().nullish(),entries:l.array(JE).nullish()}).loose(),aw=l.object({id:oe,status:l.string().nullish(),score:l.number().nonnegative().nullish(),progress:l.int().nonnegative().nullish(),mediaId:oe.nullish(),hiddenFromStatusLists:l.boolean().nullish()}).loose();function sw(e,t){e.registerTool("get_user_list",{title:"Get a user's anime or manga list",description:"Get a user's AniList anime or manga list, grouped by status/custom list, with each entry's status, score, progress and dates. Works for any public/unlisted user. Accepts an exact AniList username directly \u2014 no need to call search_user first unless you only have a partial/fuzzy name. Paginated by `chunk`/`perChunk` (AniList's own mechanism for this \u2014 counted across entries of ALL statuses combined, not per status), since a large list can otherwise return thousands of entries in one response; check `hasNextChunk` and increment `chunk` to keep paging. AniList itself caps this at the ~11,000 most recently updated unique entries \u2014 irrelevant for virtually every account, but a hard ceiling if one is ever hit (older entries beyond it aren't retrievable through this field at all, by any chunk).",inputSchema:l.object({type:l.enum(cn).describe("Whether to get the anime or manga list."),user:Ct,chunk:l.int().positive().default(1).describe("Chunk number for pagination (AniList paginates this list by chunk, not page)."),perChunk:l.int().positive().max(25).default(25).describe("Entries per chunk, counted across all statuses combined (max 25).")}),outputSchema:l.object({lists:l.array(GE).nullish(),hasNextChunk:l.boolean().nullish()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,user:i,chunk:r,perChunk:o})=>le(async()=>ce(await Q$(t.ctx(),n,i,r,o)))),e.registerTool("add_list_entry",{title:"Add an entry to your AniList list",description:"[Requires login] Add an anime/manga to the authenticated user's own AniList list. Use search_media first to resolve the title to its AniList media ID. Only set the fields you care about \u2014 everything else is left at AniList's defaults ONLY if this media isn't already on the list. AniList upserts by media ID: if an entry for it already exists (e.g. previously dropped, with its own score/notes/progress), calling this updates that entry in place instead \u2014 every field you don't set here keeps its previous value, not a default. Use get_user_list first to check for an existing entry if you need a guaranteed-fresh one.",inputSchema:l.object({mediaId:Qe.describe("AniList anime/manga ID to add (from search_media)."),status:l.enum(At).optional().describe("List status. If omitted on a genuinely NEW entry, AniList defaults to CURRENT (with `startedAt` auto-set to today) \u2014 confirmed live; despite AniList's own site UI defaulting new entries to Planning, the API itself does not. If the media is already on the list, this default does NOT apply \u2014 omitting `status` on an update-in-place leaves the entry's existing status untouched."),score:tw.describe("Score out of 10 (decimals allowed, e.g. 8.5), always on this scale regardless of the account's configured scoreFormat (set via update_user) \u2014 no conversion needed."),progress:Xu.describe("Episodes watched / chapters read."),progressVolumes:Xu.describe("Volumes read (manga only)."),repeat:rw.describe(`Number of times rewatched/reread (per AniList's own schema, capped at ${wv}).`),priority:nw.describe(`List priority (higher = more important; per AniList's own schema, capped at ${zv}).`),private:l.boolean().optional().describe("Hide this entry from your public list."),notes:iw.describe(`Free-text notes for this entry (per AniList's own schema, capped at ${Iv} characters).`),hiddenFromStatusLists:l.boolean().optional().describe("Hide this entry from the public status-grouped list views (e.g. 'Watching') while still counting it in statistics \u2014 distinct from `private`, which hides the entry entirely."),startedAt:Yu.optional().describe("Date you started."),completedAt:Yu.optional().describe("Date you completed."),customLists:l.array(l.string()).optional().describe("Names of custom lists to file this entry under \u2014 REPLACES this entry's full set of enabled lists, not merged: naming only a subset silently turns OFF every other list this entry was previously filed under (confirmed live), it doesn't leave them alone. Include every list name you want this entry to stay tagged with, not just the one you're adding. Also, the list must already exist on the account (update_user's `animeListOptions`/`mangaListOptions` `customLists`) \u2014 naming one that doesn't exist yet is silently a no-op, not an error."),advancedScores:ow.describe("Per-category scores, 0-10 scale (e.g. {Story: 8, Characters: 9}) \u2014 errors if advanced scoring isn't enabled for this media's type, or if a key doesn't match the account's configured category list for it (anime and manga have SEPARATELY configured lists). Any of that list's categories you omit here is set to 0, not left unchanged \u2014 include every category if you don't want the others zeroed. Stored positionally, not by name: matched against the account's category order (update_user's `advancedScoring`) at READ time, not write time \u2014 if that order is later renamed/reordered, a score you write for 'Story' today can silently be read back as 'Characters' tomorrow, with no error.")}),outputSchema:l.object({entry:aw}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},n=>le(async()=>ce({entry:await $v(t.ctx(),n)}))),e.registerTool("update_list_entry",{title:"Update an entry on your AniList list",description:"[Requires login] Update an existing entry on the authenticated user's own AniList list by its list-entry ID (NOT the media ID \u2014 get it from get_user_list, or from add_list_entry's response). Only set the fields you want to change.",inputSchema:l.object({listEntryId:_v.describe("The list ENTRY id to update (not the media id)."),status:l.enum(At).optional().describe("New list status."),score:tw.describe("New score out of 10 (decimals allowed), always on this scale regardless of the account's configured scoreFormat (set via update_user) \u2014 no conversion needed."),progress:Xu.describe("New episodes watched / chapters read."),progressVolumes:Xu.describe("New volumes read (manga only)."),repeat:rw.describe(`New rewatch/reread count (per AniList's own schema, capped at ${wv}).`),priority:nw.describe(`New list priority (higher = more important; per AniList's own schema, capped at ${zv}).`),private:l.boolean().optional().describe("Hide/unhide this entry from your public list."),notes:iw.describe(`New free-text notes (per AniList's own schema, capped at ${Iv} characters).`),hiddenFromStatusLists:l.boolean().optional().describe("Hide/unhide this entry from the public status-grouped list views (e.g. 'Watching') while still counting it in statistics \u2014 distinct from `private`, which hides the entry entirely."),startedAt:Yu.optional().describe("New start date."),completedAt:Yu.optional().describe("New completion date."),customLists:l.array(l.string()).optional().describe("New set of custom lists for this entry \u2014 REPLACES this entry's full set of enabled lists, not merged: naming only a subset silently turns OFF every other list this entry was previously filed under (confirmed live for add_list_entry's identical field; this tool writes the same underlying value), it doesn't leave them alone. Include every list name you want this entry to stay tagged with, not just the one you're changing. Also, the list must already exist on the account (update_user's `animeListOptions`/`mangaListOptions` `customLists`) \u2014 naming one that doesn't exist yet is silently a no-op, not an error."),advancedScores:ow.describe("New per-category scores, keyed and error-checked the same way as add_list_entry (errors if advanced scoring is disabled, or a key doesn't match a configured category). Unlike this tool's other fields, this one is NOT a true partial update: any configured category you omit is set to 0, not left at its previous value \u2014 pass every category if you're only changing one. Also stored positionally, not by name \u2014 same read-time reinterpretation risk as add_list_entry's `advancedScores` if the account's category order (update_user's `advancedScoring`) is later renamed/reordered.")}),outputSchema:l.object({entry:aw}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!0}},({listEntryId:n,...i})=>le(async()=>ce({entry:await $v(t.ctx(),{listEntryId:n,...i})}))),e.registerTool("remove_list_entry",{title:"Remove an entry from your AniList list",description:"[Requires login] Delete an entry from the authenticated user's own AniList list by its list-entry ID (NOT the media id) \u2014 get it from get_user_list. This cannot be undone, and calling it again on an already-deleted id errors rather than silently succeeding.",inputSchema:l.object({listEntryId:_v.describe("The list ENTRY id to delete (not the media id).")}),outputSchema:l.object({result:un}),annotations:ln},({listEntryId:n})=>le(async()=>ce({result:await ew(t.ctx(),n)})))}async function cw(e,t,n,i=!1){let r=`${Vu}${Zu}${w$}${i?z$:""}`;if(Array.isArray(n)){let s=`query($ids:[Int],$type:MediaType){Page(perPage:${n.length}){media(id_in:$ids,type:$type){${r}}}}`,c=await e.gql.request(s,{ids:n,type:t},e.authHeader()),u=new Map(c.Page.media.map(d=>[d.id,d]));return n.map(d=>u.get(d)??null)}let o=`query($id:Int,$type:MediaType){Media(id:$id,type:$type){${r}}}`;return(await e.gql.request(o,{id:n,type:t},e.authHeader())).Media}async function lw(e,t,n){let r=await e.gql.request(`query($id:Int,$type:MediaType){Media(id:$id,type:$type){
|
|
231
261
|
stats {
|
|
232
262
|
scoreDistribution { score amount }
|
|
233
263
|
statusDistribution { status amount }
|
|
234
264
|
}
|
|
235
|
-
}}`,{id:n,type:t},e.authHeader());return
|
|
265
|
+
}}`,{id:n,type:t},e.authHeader());return Ce(r.Media,`No anime/manga found with ID ${n}.`).stats}async function uw(e,t,n,i=1,r=25){let a=await e.gql.request(`query($id:Int,$type:MediaType,$page:Int,$perPage:Int){Media(id:$id,type:$type){
|
|
236
266
|
characters(page:$page,perPage:$perPage){
|
|
237
267
|
pageInfo{hasNextPage}
|
|
238
268
|
edges{
|
|
@@ -241,33 +271,33 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
241
271
|
node{id name{full native} siteUrl}
|
|
242
272
|
}
|
|
243
273
|
}
|
|
244
|
-
}}`,{id:n,type:t,page:i,perPage:r},e.authHeader());return
|
|
274
|
+
}}`,{id:n,type:t,page:i,perPage:r},e.authHeader());return Ce(a.Media,`No anime/manga found with ID ${n}.`).characters}async function dw(e,t,n,i=1,r=25){let a=await e.gql.request(`query($id:Int,$type:MediaType,$page:Int,$perPage:Int){Media(id:$id,type:$type){
|
|
245
275
|
staff(page:$page,perPage:$perPage){
|
|
246
276
|
pageInfo{hasNextPage}
|
|
247
277
|
edges{ role node{id name{full}} }
|
|
248
278
|
}
|
|
249
|
-
}}`,{id:n,type:t,page:i,perPage:r},e.authHeader());return
|
|
279
|
+
}}`,{id:n,type:t,page:i,perPage:r},e.authHeader());return Ce(a.Media,`No anime/manga found with ID ${n}.`).staff}async function mw(e,t,n,i=1,r=10,o=!1){let a=`query($id:Int,$type:MediaType,$page:Int,$perPage:Int){Media(id:$id,type:$type){
|
|
250
280
|
reviews(page:$page,perPage:$perPage,sort:RATING_DESC){
|
|
251
281
|
pageInfo{hasNextPage}
|
|
252
282
|
nodes{id summary${o?" body(asHtml:false)":""} rating ratingAmount score siteUrl user{id name}}
|
|
253
283
|
}
|
|
254
|
-
}}`,s=await e.gql.request(a,{id:n,type:t,page:i,perPage:r},e.authHeader());return
|
|
284
|
+
}}`,s=await e.gql.request(a,{id:n,type:t,page:i,perPage:r},e.authHeader());return Ce(s.Media,`No anime/manga found with ID ${n}.`).reviews}async function pw(e,t,n){let r=await e.gql.request(`query($id:Int,$type:MediaType){Media(id:$id,type:$type){
|
|
255
285
|
relations{
|
|
256
286
|
edges{relationType node{id type format title{romaji english} siteUrl}}
|
|
257
287
|
}
|
|
258
|
-
}}`,{id:n,type:t},e.authHeader());return
|
|
259
|
-
${t!==void 0?
|
|
288
|
+
}}`,{id:n,type:t},e.authHeader());return Ce(r.Media,`No anime/manga found with ID ${n}.`).relations}async function hw(e,t,n=!0,i=1,r=25){let a=`query($mediaId:Int,$notYetAired:Boolean,$page:Int,$perPage:Int){
|
|
289
|
+
${t!==void 0?_i("Media","mediaId","type:ANIME"):""}
|
|
260
290
|
schedule:Page(page:$page,perPage:$perPage){
|
|
261
291
|
pageInfo{hasNextPage}
|
|
262
292
|
airingSchedules(mediaId:$mediaId,notYetAired:$notYetAired,sort:TIME){
|
|
263
293
|
airingAt timeUntilAiring episode media{id title{romaji english} siteUrl}
|
|
264
294
|
}
|
|
265
295
|
}
|
|
266
|
-
}`,s=await e.gql.request(a,{mediaId:t,notYetAired:n,page:i,perPage:r},e.authHeader());return t!==void 0&&je(s.exists,`No anime found with ID ${t}.`),{schedule:s.schedule.airingSchedules,hasNextPage:s.schedule.pageInfo.hasNextPage}}var TE={ANIME:"animeId",MANGA:"mangaId",CHARACTER:"characterId",STAFF:"staffId",STUDIO:"studioId"};async function H$(e,t,n){let r=`mutation($id:Int){ToggleFavourite(${TE[t]}:$id){anime{nodes{id}}manga{nodes{id}}characters{nodes{id}}staff{nodes{id}}studios{nodes{id}}}}`;return(await e.gql.request(r,{id:n},e.requireAuth())).ToggleFavourite}var ga=c.enum(bi).describe("Whether `id` refers to anime or manga."),PE=c.union([_e,c.array(_e).min(1).max(25)],{error:e=>e.input===void 0?"ids is required \u2014 pass a single AniList ID (number), or a non-empty array of IDs.":"ids must be a single AniList ID (number), or a non-empty array of up to 25 IDs."}).describe("A single AniList anime/manga ID, or an array of up to 25 IDs to fetch in one call (same cap as this codebase's paginated list tools \u2014 each entry returned here includes the full synopsis/tags/rankings, so an uncapped batch could return a very large response)."),J$=c.object({id:c.number().int(),idMal:c.number().int().nullish(),type:c.string().nullish(),format:c.string().nullish(),status:c.string().nullish(),episodes:c.number().int().nullish(),chapters:c.number().int().nullish(),volumes:c.number().int().nullish(),duration:c.number().int().nullish(),genres:c.array(c.string()).nullish(),averageScore:c.number().nullish(),popularity:c.number().nullish(),isAdult:c.boolean().nullish(),isFavourite:sn("title"),siteUrl:c.string().nullish(),season:c.string().nullish(),seasonYear:c.number().int().nullish(),countryOfOrigin:c.string().nullish(),title:c.object({romaji:c.string().nullish(),english:c.string().nullish(),native:c.string().nullish()}).nullish(),coverImage:c.object({large:c.string().nullish()}).nullish(),startDate:Pr.nullish(),endDate:Pr.nullish(),description:c.string().nullish(),trailer:c.object({id:c.string().nullish(),site:c.string().nullish(),thumbnail:c.string().nullish()}).nullish(),tags:c.array(c.object({name:c.string().optional(),rank:c.number().int().nullish(),isMediaSpoiler:c.boolean().nullish()}).passthrough()).nullish(),rankings:c.array(c.object({rank:c.number().int().nullish(),type:c.string().nullish(),format:c.string().nullish(),year:c.number().int().nullish(),season:c.string().nullish(),allTime:c.boolean().nullish(),context:c.string().nullish()}).passthrough()).nullish(),nextAiringEpisode:c.object({id:c.number().int(),airingAt:c.number().nullish(),timeUntilAiring:c.number().nullish(),episode:c.number().int().nullish()}).passthrough().nullish(),externalLinks:c.array(c.object({id:c.number().int(),url:c.string().nullish(),site:c.string().nullish(),type:c.string().nullish(),language:c.string().nullish(),icon:c.string().nullish(),notes:c.string().nullish(),isDisabled:c.boolean().nullish()}).passthrough()).nullish(),streamingEpisodes:c.array(c.object({title:c.string().nullish(),thumbnail:c.string().nullish(),url:c.string().nullish(),site:c.string().nullish()}).passthrough()).nullish(),mediaListEntry:c.object({id:c.number().int(),status:c.string().nullish(),score:c.number().nullish(),progress:c.number().int().nullish(),progressVolumes:c.number().int().nullish(),repeat:c.number().int().nullish(),priority:c.number().int().nullish(),private:c.boolean().nullish(),notes:c.string().nullish(),hiddenFromStatusLists:c.boolean().nullish(),customLists:c.array(c.object({name:c.string().nullish(),enabled:c.boolean().nullish()}).passthrough()).nullish(),advancedScores:c.unknown().nullish(),startedAt:Pr.nullish(),completedAt:Pr.nullish(),updatedAt:c.number().nullish(),createdAt:c.number().nullish()}).passthrough().nullish().describe("Whether this title is on the caller's own list \u2014 viewer-relative, so it only resolves when logged in; null both when logged out and when the title just isn't on the list (the two cases aren't distinguishable from this field alone).")}).passthrough(),xE=c.object({scoreDistribution:c.array(c.object({score:c.number().nullish(),amount:c.number().int().nullish()}).passthrough()).nullish(),statusDistribution:c.array(c.object({status:c.string().nullish(),amount:c.number().int().nullish()}).passthrough()).nullish()}).passthrough(),jE=c.object({pageInfo:He.optional(),edges:c.array(c.object({role:c.string().nullish(),voiceActors:c.array(c.object({id:c.number().int(),name:c.object({full:c.string().nullish()}).nullish(),languageV2:c.string().nullish()}).passthrough()).nullish(),node:c.object({id:c.number().int(),name:c.object({full:c.string().nullish(),native:c.string().nullish()}).nullish(),siteUrl:c.string().nullish()}).passthrough().nullish()}).passthrough()).nullish()}).passthrough(),AE=c.object({pageInfo:He.optional(),edges:c.array(c.object({role:c.string().nullish(),node:c.object({id:c.number().int(),name:c.object({full:c.string().nullish()}).nullish()}).passthrough().nullish()}).passthrough()).nullish()}).passthrough(),OE=c.object({pageInfo:He.optional(),nodes:c.array(c.object({id:c.number().int(),summary:c.string().nullish(),body:c.string().nullish(),rating:c.number().nullish(),ratingAmount:c.number().nullish(),score:c.number().nullish(),siteUrl:c.string().nullish(),user:c.object({id:c.number().int(),name:c.string().nullish()}).passthrough().nullish()}).passthrough()).nullish()}).passthrough(),NE=c.object({edges:c.array(c.object({relationType:c.string().nullish(),node:c.object({id:c.number().int(),type:c.string().nullish(),format:c.string().nullish(),title:c.object({romaji:c.string().nullish(),english:c.string().nullish()}).nullish(),siteUrl:c.string().nullish()}).passthrough().nullish()}).passthrough()).nullish()}).passthrough(),CE=c.object({airingAt:c.number().nullish(),timeUntilAiring:c.number().nullish(),episode:c.number().int().nullish(),media:c.object({id:c.number().int(),title:jt.nullish(),siteUrl:c.string().nullish()}).passthrough().nullish()}).passthrough(),LE=["ANIME","MANGA","CHARACTER","STAFF","STUDIO"];function G$(e,t){e.registerTool("get_media",{title:"Get anime/manga details",description:"Get detailed information about one or more anime or manga by their AniList ID(s): title, format, status, episode/chapter/volume count, genres, score, synopsis, dates, and `rankings` \u2014 AniList's own ranking badges (e.g. \"#134 highest rated all time\", \"#11 highest rated 2024\"), one entry per rated/popular ranking window the title currently appears in. Also returns `nextAiringEpisode` (for currently-releasing anime), `externalLinks` (official sites, streaming platforms), and \u2014 [requires login] \u2014 `mediaListEntry`, the authenticated user's own list entry for this title, or null if it isn't on their list. Use search_media first to resolve a title to its AniList ID. Returns a single object if `ids` is a single ID, or an array (same order as `ids`, with `null` in place of any ID that didn't resolve to a real anime/manga) if `ids` is an array.",inputSchema:c.object({type:ga.describe("Whether `ids` refers to anime or manga."),ids:PE,includeStreamingEpisodes:c.boolean().default(!1).describe("Also fetch `streamingEpisodes` (per-episode streaming links). Kept off by default \u2014 AniList doesn't paginate this field, so a long-running title can return hundreds of entries.")}),outputSchema:c.object({media:c.union([J$,c.array(J$.nullable())])}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,ids:i,includeStreamingEpisodes:r})=>ce(async()=>se({media:await q$(t.ctx(),n,i,r)}))),e.registerTool("get_media_statistics",{title:"Get an anime/manga's score/status distribution",description:"Get an anime/manga's watch/read-status counts (watching/completed/planning/etc.) and score distribution histogram across all AniList users. Use search_media first to resolve a title to its AniList ID.",inputSchema:c.object({type:ga,id:_e.describe("AniList ID.")}),outputSchema:c.object({statistics:xE}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,id:i})=>ce(async()=>se({statistics:await M$(t.ctx(),n,i)}))),e.registerTool("get_media_characters",{title:"Get an anime/manga's characters",description:"List an anime/manga's characters with their role (Main/Supporting/Background) and, for anime, Japanese voice actors. Use search_media first to resolve a title to its AniList ID. No explicit ordering is requested \u2014 don't assume results are grouped by role or sorted by popularity (unlike get_character/get_staff's reverse-direction lookup, which IS popularity-sorted); confirmed live, a Main-role character can appear well after several Supporting ones.",inputSchema:c.object({type:ga,id:_e.describe("AniList ID."),...qe(25)}),outputSchema:c.object({characters:jE}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,id:i,page:r,perPage:o})=>ce(async()=>se({characters:await D$(t.ctx(),n,i,r,o)}))),e.registerTool("get_media_staff",{title:"Get an anime/manga's production staff",description:"List an anime/manga's staff (director, writer, character designer, author, illustrator, etc.) with their role. Use search_media first to resolve a title to its AniList ID. No explicit ordering is requested \u2014 don't assume results are sorted by role or popularity (unlike get_staff's reverse-direction lookup, which IS popularity-sorted).",inputSchema:c.object({type:ga,id:_e.describe("AniList ID."),...qe(25)}),outputSchema:c.object({staff:AE}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,id:i,page:r,perPage:o})=>ce(async()=>se({staff:await U$(t.ctx(),n,i,r,o)}))),e.registerTool("get_media_reviews",{title:"Get an anime/manga's reviews",description:"List user-written reviews for an anime or manga, highest-rated first. Always includes `summary` (a short excerpt); set `includeBody` to also fetch each review's full text (can be long \u2014 leave it off unless you actually need the full text). Use search_media first to resolve a title to its AniList ID.",inputSchema:c.object({type:ga,id:_e.describe("AniList ID."),...qe(10),includeBody:c.boolean().default(!1).describe("Also fetch each review's full text (`body`), not just its short `summary`.")}),outputSchema:c.object({reviews:OE}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,id:i,page:r,perPage:o,includeBody:a})=>ce(async()=>se({reviews:await F$(t.ctx(),n,i,r,o,a)}))),e.registerTool("get_media_relations",{title:"Get a title's related media",description:"Get the anime/manga related to a given title (prequels, sequels, side stories, adaptations, spin-offs) with the relation type. Use search_media first to resolve a title to its AniList ID.",inputSchema:c.object({id:_e.describe("AniList anime/manga ID."),type:c.enum(["ANIME","MANGA"]).describe("Whether `id` refers to an anime or a manga.")}),outputSchema:c.object({relations:NE}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n,type:i})=>ce(async()=>se({relations:await V$(t.ctx(),i,n)}))),e.registerTool("get_anime_schedule",{title:"Get the anime airing schedule",description:"Get upcoming (or a specific title's) episode air times, soonest-airing first (confirmed live). Omit `mediaId` for the site-wide upcoming schedule, or pass it (from search_media/get_media) to get one title's next-episode air time. Anime only \u2014 manga has no airing schedule; a manga id is rejected with a clear error rather than silently returning an empty schedule.",inputSchema:c.object({mediaId:_e.optional().describe("Restrict to this AniList anime ID (not manga)."),notYetAired:c.boolean().default(!0).describe("Set false to include already-aired episodes too."),...qe(25)}),outputSchema:c.object({schedule:c.array(CE),hasNextPage:c.boolean().nullish()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({mediaId:n,notYetAired:i,page:r,perPage:o})=>ce(async()=>se(await Z$(t.ctx(),n,i,r,o)))),e.registerTool("toggle_favourite",{title:"Favourite/unfavourite an anime, manga, character, staff member, or studio",description:"[Requires login] Toggle an anime, manga, character, staff member, or studio in the authenticated user's AniList favourites. Calling it again on the same `kind`+`id` un-favourites it. The response is not scoped to just the toggled item: it returns the account's entire current favourites (id-only) across all 5 categories (anime/manga/characters/staff/studios), so expect a wide result even for a single toggle. Resolve `id` first via search_media/get_media (kind: ANIME/MANGA), search_character/get_character, search_staff/get_staff, or search_studio/get_studio, matching `kind`. Confirmed live: AniList does NOT validate that `id` actually belongs to the given `kind` \u2014 e.g. passing an anime's ID with `kind: CHARACTER` succeeds silently instead of erroring, favouriting a nonexistent character. Always resolve `id` from the tool matching `kind` rather than reusing an ID you already have on hand. Note: immediately re-checking with get_media/get_character/get_staff/get_studio's own `isFavourite` can briefly still show the pre-toggle value \u2014 a confirmed AniList-side read-after-write lag, not a bug in this call; this tool's own response already reflects the new favourites list correctly.",inputSchema:c.object({kind:c.enum(LE).describe("Which kind of entity `id` refers to."),id:_e.describe("AniList ID of that anime/manga/character/staff/studio.")}),outputSchema:c.object({favourites:S$}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},({kind:n,id:i})=>ce(async()=>se({favourites:await H$(t.ctx(),n,i)})))}async function B$(e,t){let n=`query($id:Int){Character(id:$id){${ma}${p$}}}`,i=await e.gql.request(n,{id:t},e.authHeader());return je(i.Character,`No character found with ID ${t}.`)}async function K$(e,t){let n=`query($id:Int){Staff(id:$id){${pa}${h$}}}`,i=await e.gql.request(n,{id:t},e.authHeader());return je(i.Staff,`No staff member found with ID ${t}.`)}async function W$(e,t){let n=t==="CHARACTER"?"characters":"staff",r=`query{Page(perPage:50){${n}(isBirthday:true){${t==="CHARACTER"?ma:pa}}}}`;return(await e.gql.request(r,{},e.authHeader())).Page[n]}var Q$=c.object({node:c.object({id:c.number().int(),title:jt.nullish(),type:c.string().nullish(),format:c.string().nullish()}).passthrough().nullish()}).passthrough(),Y$=c.object({id:c.number().int(),name:c.object({full:c.string().nullish(),native:c.string().nullish()}).nullish(),image:c.object({large:c.string().nullish()}).nullish(),description:c.string().nullish(),favourites:c.number().int().nullish(),isFavourite:sn("character"),siteUrl:c.string().nullish(),media:c.object({edges:c.array(Q$.extend({characterRole:c.string().nullish()}))}).nullish()}).passthrough(),X$=c.object({id:c.number().int(),name:c.object({full:c.string().nullish(),native:c.string().nullish()}).nullish(),image:c.object({large:c.string().nullish()}).nullish(),description:c.string().nullish(),primaryOccupations:c.array(c.string()).nullish(),favourites:c.number().int().nullish(),isFavourite:sn("staff member"),siteUrl:c.string().nullish(),staffMedia:c.object({edges:c.array(Q$.extend({staffRole:c.string().nullish()}))}).nullish()}).passthrough(),ME=["CHARACTER","STAFF"];function ew(e,t){e.registerTool("get_character",{title:"Get character details",description:"Get a character's profile by AniList character ID: name, image, description, and the anime/manga they appear in (`media`, up to 25 by popularity, with their `characterRole` \u2014 MAIN/SUPPORTING/BACKGROUND \u2014 in each). Use search_character first to resolve a name to its ID.",inputSchema:c.object({id:_e.describe("AniList character ID.")}),outputSchema:c.object({character:Y$}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n})=>ce(async()=>se({character:await B$(t.ctx(),n)}))),e.registerTool("get_staff",{title:"Get staff member details",description:"Get a staff member's profile by AniList staff ID: name, image, occupations, description, and the anime/manga they worked on (`staffMedia`, up to 25 by popularity, with their `staffRole` \u2014 e.g. Director, Character Design \u2014 in each). Use search_staff first to resolve a name to its ID.",inputSchema:c.object({id:_e.describe("AniList staff ID.")}),outputSchema:c.object({staff:X$}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n})=>ce(async()=>se({staff:await K$(t.ctx(),n)}))),e.registerTool("get_todays_birthdays",{title:"Get today's birthday characters or staff",description:"List AniList characters or staff members whose birthday (month/day) is today, up to 50 results (a fixed cap, not paginated \u2014 entries beyond 50 are silently omitted, not an error). Returns character-shaped or staff-shaped objects for kind: CHARACTER/STAFF respectively, but a lighter fetch than get_character/get_staff: it does NOT include those tools' `media`/`staffMedia` filmography \u2014 call get_character/get_staff by ID for an entry's full roles/works, don't read a missing filmography here as 'none'.",inputSchema:c.object({kind:c.enum(ME).describe("Whether to list characters or staff members.")}),outputSchema:c.object({results:c.union([c.array(Y$),c.array(X$)])}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({kind:n})=>ce(async()=>se({results:await W$(t.ctx(),n)})))}async function tw(e,t){let i=await e.gql.request(`query($id:Int){Recommendation(id:$id){id rating userRating
|
|
267
|
-
media{id title{romaji english}} mediaRecommendation{id title{romaji english}}}}`,{id:t},e.authHeader());return
|
|
296
|
+
}`,s=await e.gql.request(a,{mediaId:t,notYetAired:n,page:i,perPage:r},e.authHeader());return t!==void 0&&Ce(s.exists,`No anime found with ID ${t}.`),{schedule:s.schedule.airingSchedules,hasNextPage:s.schedule.pageInfo.hasNextPage}}var KE={ANIME:"animeId",MANGA:"mangaId",CHARACTER:"characterId",STAFF:"staffId",STUDIO:"studioId"};async function fw(e,t,n){let r=`mutation($id:Int){ToggleFavourite(${KE[t]}:$id){anime{nodes{id}}manga{nodes{id}}characters{nodes{id}}staff{nodes{id}}studios{nodes{id}}}}`;return(await e.gql.request(r,{id:n},e.requireAuth())).ToggleFavourite}var zi=l.enum(cn).describe("Whether `id` refers to anime or manga."),YE=l.union([Qe,l.array(Qe).min(1).max(25)],{error:e=>e.input===void 0?"ids is required \u2014 pass a single AniList ID (number), or a non-empty array of IDs.":"ids must be a single AniList ID (number), or a non-empty array of up to 25 IDs."}).describe("A single AniList anime/manga ID, or an array of up to 25 IDs to fetch in one call (same cap as this codebase's paginated list tools \u2014 each entry returned here includes the full synopsis/tags/rankings, so an uncapped batch could return a very large response)."),gw=l.object({id:oe,idMal:l.int().positive().nullish(),type:l.string().nullish(),format:l.string().nullish(),status:l.string().nullish(),episodes:l.int().positive().nullish(),chapters:l.int().positive().nullish(),volumes:l.int().positive().nullish(),duration:l.int().positive().nullish(),genres:l.array(l.string()).nullish(),averageScore:l.number().nonnegative().nullish(),popularity:l.number().nonnegative().nullish(),isAdult:l.boolean().nullish(),isFavourite:xr("title"),siteUrl:l.httpUrl().nullish(),season:l.string().nullish(),seasonYear:l.int().positive().nullish(),countryOfOrigin:l.string().nullish(),title:l.object({romaji:l.string().nullish(),english:l.string().nullish(),native:l.string().nullish()}).nullish(),coverImage:l.object({large:l.httpUrl().nullish()}).nullish(),startDate:jr.nullish(),endDate:jr.nullish(),description:l.string().nullish(),trailer:l.object({id:l.string().nullish(),site:l.string().nullish(),thumbnail:l.string().nullish()}).nullish(),tags:l.array(l.object({name:l.string().optional(),rank:l.int().positive().nullish(),isMediaSpoiler:l.boolean().nullish()}).loose()).nullish(),rankings:l.array(l.object({rank:l.int().positive().nullish(),type:l.string().nullish(),format:l.string().nullish(),year:l.int().positive().nullish(),season:l.string().nullish(),allTime:l.boolean().nullish(),context:l.string().nullish()}).loose()).nullish(),nextAiringEpisode:l.object({id:oe,airingAt:l.number().nonnegative().nullish(),timeUntilAiring:l.number().nullish(),episode:l.int().nonnegative().nullish()}).loose().nullish(),externalLinks:l.array(l.object({id:oe,url:l.string().nullish(),site:l.string().nullish(),type:l.string().nullish(),language:l.string().nullish(),icon:l.string().nullish(),notes:l.string().nullish(),isDisabled:l.boolean().nullish()}).loose()).nullish(),streamingEpisodes:l.array(l.object({title:l.string().nullish(),thumbnail:l.string().nullish(),url:l.string().nullish(),site:l.string().nullish()}).loose()).nullish(),mediaListEntry:l.object({id:oe,status:l.string().nullish(),score:l.number().nonnegative().nullish(),progress:l.int().nonnegative().nullish(),progressVolumes:l.int().nonnegative().nullish(),repeat:l.int().nonnegative().nullish(),priority:l.int().nonnegative().nullish(),private:l.boolean().nullish(),notes:l.string().nullish(),hiddenFromStatusLists:l.boolean().nullish(),customLists:l.array(l.object({name:l.string().nullish(),enabled:l.boolean().nullish()}).loose()).nullish(),advancedScores:l.json().nullish(),startedAt:jr.nullish(),completedAt:jr.nullish(),updatedAt:l.number().nonnegative().nullish(),createdAt:l.number().nonnegative().nullish()}).loose().nullish().describe("Whether this title is on the caller's own list \u2014 viewer-relative, so it only resolves when logged in; null both when logged out and when the title just isn't on the list (the two cases aren't distinguishable from this field alone).")}).loose(),XE=l.object({scoreDistribution:l.array(l.object({score:l.number().nonnegative().nullish(),amount:l.int().nonnegative().nullish()}).loose()).nullish(),statusDistribution:l.array(l.object({status:l.string().nullish(),amount:l.int().nonnegative().nullish()}).loose()).nullish()}).loose(),QE=l.object({pageInfo:He.optional(),edges:l.array(l.object({role:l.string().nullish(),voiceActors:l.array(l.object({id:oe,name:l.object({full:l.string().nullish()}).nullish(),languageV2:l.string().nullish()}).loose()).nullish(),node:l.object({id:oe,name:l.object({full:l.string().nullish(),native:l.string().nullish()}).nullish(),siteUrl:l.httpUrl().nullish()}).loose().nullish()}).loose()).nullish()}).loose(),eP=l.object({pageInfo:He.optional(),edges:l.array(l.object({role:l.string().nullish(),node:l.object({id:oe,name:l.object({full:l.string().nullish()}).nullish()}).loose().nullish()}).loose()).nullish()}).loose(),tP=l.object({pageInfo:He.optional(),nodes:l.array(l.object({id:oe,summary:l.string().nullish(),body:l.string().nullish(),rating:l.number().nonnegative().nullish().describe("Net helpful votes this review received from other users (community helpfulness, confirmed live this is what results are sorted by) \u2014 not the reviewer's own opinion of the title, that's `score`."),ratingAmount:l.number().nonnegative().nullish().describe("Total votes cast on this review's helpfulness (helpful + unhelpful)."),score:l.number().nonnegative().nullish().describe("The reviewer's own 0-100 rating of the title itself, not a vote count."),siteUrl:l.httpUrl().nullish(),user:l.object({id:oe,name:l.string().nullish()}).loose().nullish()}).loose()).nullish()}).loose(),rP=l.object({edges:l.array(l.object({relationType:l.string().nullish(),node:l.object({id:oe,type:l.string().nullish(),format:l.string().nullish(),title:l.object({romaji:l.string().nullish(),english:l.string().nullish()}).nullish(),siteUrl:l.httpUrl().nullish()}).loose().nullish()}).loose()).nullish()}).loose(),nP=l.object({airingAt:l.number().nonnegative().nullish(),timeUntilAiring:l.number().nullish(),episode:l.int().nonnegative().nullish(),media:l.object({id:oe,title:Ot.nullish(),siteUrl:l.httpUrl().nullish()}).loose().nullish()}).loose();function vw(e,t){e.registerTool("get_media",{title:"Get anime/manga details",description:"Get detailed information about one or more anime or manga by their AniList ID(s): title, format, status, episode/chapter/volume count, genres, score, synopsis, dates, and `rankings` \u2014 AniList's own ranking badges (e.g. \"#134 highest rated all time\", \"#11 highest rated 2024\"), one entry per rated/popular ranking window the title currently appears in. Also returns `nextAiringEpisode` (for currently-releasing anime), `externalLinks` (official sites, streaming platforms), and \u2014 [requires login] \u2014 `mediaListEntry`, the authenticated user's own list entry for this title, or null if it isn't on their list. Use search_media first to resolve a title to its AniList ID. Returns a single object if `ids` is a single ID, or an array (same order as `ids`, with `null` in place of any ID that didn't resolve to a real anime/manga) if `ids` is an array.",inputSchema:l.object({type:zi.describe("Whether `ids` refers to anime or manga."),ids:YE,includeStreamingEpisodes:l.boolean().default(!1).describe("Also fetch `streamingEpisodes` (per-episode streaming links). Kept off by default \u2014 AniList doesn't paginate this field, so a long-running title can return hundreds of entries.")}),outputSchema:l.object({media:l.union([gw,l.array(gw.nullable())])}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,ids:i,includeStreamingEpisodes:r})=>le(async()=>ce({media:await cw(t.ctx(),n,i,r)}))),e.registerTool("get_media_statistics",{title:"Get an anime/manga's score/status distribution",description:"Get an anime/manga's watch/read-status counts (watching/completed/planning/etc.) and score distribution histogram across all AniList users. Use search_media first to resolve a title to its AniList ID.",inputSchema:l.object({type:zi,id:Qe.describe("AniList ID.")}),outputSchema:l.object({statistics:XE}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,id:i})=>le(async()=>ce({statistics:await lw(t.ctx(),n,i)}))),e.registerTool("get_media_characters",{title:"Get an anime/manga's characters",description:"List an anime/manga's characters with their role (Main/Supporting/Background) and, for anime, Japanese voice actors. Use search_media first to resolve a title to its AniList ID. No explicit ordering is requested \u2014 don't assume results are grouped by role or sorted by popularity (unlike get_character/get_staff's reverse-direction lookup, which IS popularity-sorted); confirmed live, a Main-role character can appear well after several Supporting ones.",inputSchema:l.object({type:zi,id:Qe.describe("AniList ID."),...qe(25)}),outputSchema:l.object({characters:QE}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,id:i,page:r,perPage:o})=>le(async()=>ce({characters:await uw(t.ctx(),n,i,r,o)}))),e.registerTool("get_media_staff",{title:"Get an anime/manga's production staff",description:"List an anime/manga's staff (director, writer, character designer, author, illustrator, etc.) with their role. Use search_media first to resolve a title to its AniList ID. No explicit ordering is requested \u2014 don't assume results are sorted by role or popularity (unlike get_staff's reverse-direction lookup, which IS popularity-sorted).",inputSchema:l.object({type:zi,id:Qe.describe("AniList ID."),...qe(25)}),outputSchema:l.object({staff:eP}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,id:i,page:r,perPage:o})=>le(async()=>ce({staff:await dw(t.ctx(),n,i,r,o)}))),e.registerTool("get_media_reviews",{title:"Get an anime/manga's reviews",description:"List user-written reviews for an anime or manga, most-helpful-voted first (confirmed live: ordered by `rating`, not `score` \u2014 see those fields' own descriptions). Always includes `summary` (a short excerpt); set `includeBody` to also fetch each review's full text (can be long \u2014 leave it off unless you actually need the full text). Use search_media first to resolve a title to its AniList ID.",inputSchema:l.object({type:zi,id:Qe.describe("AniList ID."),...qe(10),includeBody:l.boolean().default(!1).describe("Also fetch each review's full text (`body`), not just its short `summary`.")}),outputSchema:l.object({reviews:tP}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({type:n,id:i,page:r,perPage:o,includeBody:a})=>le(async()=>ce({reviews:await mw(t.ctx(),n,i,r,o,a)}))),e.registerTool("get_media_relations",{title:"Get a title's related media",description:"Get the anime/manga related to a given title (prequels, sequels, side stories, adaptations, spin-offs) with the relation type. Use search_media first to resolve a title to its AniList ID.",inputSchema:l.object({type:zi,id:Qe.describe("AniList anime/manga ID.")}),outputSchema:l.object({relations:rP}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n,type:i})=>le(async()=>ce({relations:await pw(t.ctx(),i,n)}))),e.registerTool("get_anime_schedule",{title:"Get the anime airing schedule",description:"Get upcoming (or a specific title's) episode air times, soonest-airing first (confirmed live). Omit `mediaId` for the site-wide upcoming schedule, or pass it (from search_media/get_media) to get one title's next-episode air time. Anime only \u2014 manga has no airing schedule; a manga id (like any non-anime id) is rejected as not-found rather than silently returning an empty schedule, though that error reads the same as a nonexistent id and doesn't single out the manga/anime mismatch.",inputSchema:l.object({mediaId:Qe.optional().describe("Restrict to this AniList anime ID (not manga)."),notYetAired:l.boolean().default(!0).describe("Set false to instead list only already-aired episodes (confirmed live: this swaps to a past-only result set, it doesn't add past episodes to the still-upcoming ones)."),...qe(25)}),outputSchema:l.object({schedule:l.array(nP),hasNextPage:l.boolean().nullish()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({mediaId:n,notYetAired:i,page:r,perPage:o})=>le(async()=>ce(await hw(t.ctx(),n,i,r,o)))),e.registerTool("toggle_favourite",{title:"Favourite/unfavourite an anime, manga, character, staff member, or studio",description:"[Requires login] Toggle an anime, manga, character, staff member, or studio in the authenticated user's AniList favourites. Calling it again on the same `kind`+`id` un-favourites it. The response is not scoped to just the toggled item: it returns the account's entire current favourites (id-only) across all 5 categories (anime/manga/characters/staff/studios), so expect a wide result even for a single toggle. Resolve `id` first via search_media/get_media (kind: ANIME/MANGA), search_character/get_character, search_staff/get_staff, or search_studio/get_studio, matching `kind`. Confirmed live: AniList does NOT validate that `id` actually belongs to the given `kind` \u2014 e.g. passing an anime's ID with `kind: CHARACTER` succeeds silently instead of erroring, favouriting a nonexistent character. Always resolve `id` from the tool matching `kind` rather than reusing an ID you already have on hand. Note: immediately re-checking with get_media/get_character/get_staff/get_studio's own `isFavourite` can briefly still show the pre-toggle value \u2014 a confirmed AniList-side read-after-write lag, not a bug in this call; this tool's own response already reflects the new favourites list correctly.",inputSchema:l.object({kind:l.enum(A$).describe("Which kind of entity `id` refers to."),id:oe.describe("AniList ID of that anime/manga/character/staff/studio.")}),outputSchema:l.object({favourites:M$}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},({kind:n,id:i})=>le(async()=>ce({favourites:await fw(t.ctx(),n,i)})))}async function yw(e,t){let n=`query($id:Int){Character(id:$id){${ga}${I$}}}`,i=await e.gql.request(n,{id:t},e.authHeader());return Ce(i.Character,`No character found with ID ${t}.`)}async function _w(e,t){let n=`query($id:Int){Staff(id:$id){${va}${R$}}}`,i=await e.gql.request(n,{id:t},e.authHeader());return Ce(i.Staff,`No staff member found with ID ${t}.`)}async function bw(e,t){let n=t==="CHARACTER"?"characters":"staff",r=`query{Page(perPage:50){${n}(isBirthday:true){${t==="CHARACTER"?ga:va}}}}`;return(await e.gql.request(r,{},e.authHeader())).Page[n]}var Sw=l.object({node:l.object({id:oe,title:Ot.nullish(),type:l.string().nullish(),format:l.string().nullish()}).loose().nullish()}).loose(),oP=l.object({id:oe,name:l.object({full:l.string().nullish(),native:l.string().nullish()}).nullish(),image:l.object({large:l.httpUrl().nullish()}).nullish(),description:l.string().nullish(),favourites:l.int().nonnegative().nullish(),isFavourite:xr("character"),siteUrl:l.httpUrl().nullish(),media:l.object({edges:l.array(Sw.extend({characterRole:l.string().nullish()}))}).nullish()}).loose(),aP=l.object({id:oe,name:l.object({full:l.string().nullish(),native:l.string().nullish()}).nullish(),image:l.object({large:l.httpUrl().nullish()}).nullish(),description:l.string().nullish(),primaryOccupations:l.array(l.string()).nullish(),favourites:l.int().nonnegative().nullish(),isFavourite:xr("staff member"),siteUrl:l.httpUrl().nullish(),staffMedia:l.object({edges:l.array(Sw.extend({staffRole:l.string().nullish()}))}).nullish()}).loose(),sP=l.object({id:oe,name:l.object({full:l.string().nullish(),native:l.string().nullish()}).nullish(),image:l.object({large:l.httpUrl().nullish()}).nullish(),description:l.string().nullish(),primaryOccupations:l.array(l.string()).nullish(),favourites:l.int().nonnegative().nullish(),isFavourite:xr("character or staff member"),siteUrl:l.httpUrl().nullish()}).loose();function $w(e,t){e.registerTool("get_character",{title:"Get character details",description:"Get a character's profile by AniList character ID: name, image, description, and the anime/manga they appear in (`media`, up to 25 by popularity, with their `characterRole` \u2014 MAIN/SUPPORTING/BACKGROUND \u2014 in each). Use search_character first to resolve a name to its ID.",inputSchema:l.object({id:C$.describe("AniList character ID.")}),outputSchema:l.object({character:oP}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n})=>le(async()=>ce({character:await yw(t.ctx(),n)}))),e.registerTool("get_staff",{title:"Get staff member details",description:"Get a staff member's profile by AniList staff ID: name, image, occupations, description, and the anime/manga they worked on (`staffMedia`, up to 25 by popularity, with their `staffRole` \u2014 e.g. Director, Character Design \u2014 in each). Use search_staff first to resolve a name to its ID.",inputSchema:l.object({id:N$.describe("AniList staff ID.")}),outputSchema:l.object({staff:aP}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n})=>le(async()=>ce({staff:await _w(t.ctx(),n)}))),e.registerTool("get_todays_birthdays",{title:"Get today's birthday characters or staff",description:"List AniList characters or staff members whose birthday (month/day) is today, up to 50 results (a fixed cap, not paginated \u2014 entries beyond 50 are silently omitted, not an error). Returns character-shaped or staff-shaped objects for kind: CHARACTER/STAFF respectively, but a lighter fetch than get_character/get_staff: it does NOT include those tools' `media`/`staffMedia` filmography \u2014 call get_character/get_staff by ID for an entry's full roles/works, don't read a missing filmography here as 'none'.",inputSchema:l.object({kind:l.enum(O$).describe("Whether to list characters or staff members.")}),outputSchema:l.object({results:l.array(sP)}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({kind:n})=>le(async()=>ce({results:await bw(t.ctx(),n)})))}async function ww(e,t){let i=await e.gql.request(`query($id:Int){Recommendation(id:$id){id rating userRating
|
|
297
|
+
media{id title{romaji english}} mediaRecommendation{id title{romaji english}}}}`,{id:t},e.authHeader());return Ce(i.Recommendation,`No recommendation found with ID ${t}.`)}async function zw(e,t,n=1,i=10,r=!1){let a=await e.gql.request(`query($id:Int,$page:Int,$perPage:Int){Media(id:$id){recommendations(page:$page,perPage:$perPage,sort:RATING_DESC){
|
|
268
298
|
pageInfo{hasNextPage}
|
|
269
299
|
nodes{id rating userRating mediaRecommendation{id title{romaji english} siteUrl mediaListEntry{id status}}}
|
|
270
|
-
}}}`,{id:t,page:n,perPage:i},e.authHeader()),{recommendations:s}=
|
|
300
|
+
}}}`,{id:t,page:n,perPage:i},e.authHeader()),{recommendations:s}=Ce(a.Media,`No anime/manga found with ID ${t}.`);return r?{...s,nodes:s.nodes.filter(c=>!c.mediaRecommendation?.mediaListEntry)}:s}var Iw=l.object({id:oe,title:Ot.nullish()}).loose(),Rw=l.int().nullish().describe("Net rating (RATE_UP minus RATE_DOWN votes across all users), not the caller's own."),kw=l.enum(["NO_RATING","RATE_UP","RATE_DOWN"]).nullish(),lP=l.object({id:oe,rating:Rw,userRating:kw,media:Iw.nullish(),mediaRecommendation:Iw.nullish()}).loose(),uP=l.object({id:oe,rating:Rw,userRating:kw,mediaRecommendation:l.object({id:oe,title:Ot.nullish(),siteUrl:l.httpUrl().nullish(),mediaListEntry:l.object({id:oe,status:l.string().nullish()}).loose().nullish().describe("Whether this recommended title is on the caller's own list \u2014 viewer-relative, so it only resolves when logged in; null both when logged out and when the title just isn't on the list (the two cases aren't distinguishable from this field alone).")}).loose().nullish()}).loose();function Tw(e,t){e.registerTool("get_recommendation",{title:"Get a recommendation by ID",description:"Get a single AniList recommendation pairing (media + the media users recommend alongside it) by its AniList recommendation ID \u2014 useful for re-checking one specific pairing's current `rating`/`userRating` (e.g. after voting on it directly on anilist.co \u2014 this server has no tool to cast that vote itself) without re-paginating the whole list. Use get_recommendations_for_media instead to discover recommendation IDs for a title in the first place, or to browse/list them. Confirmed live (raw GraphQL, independent of this server): this is an AniList-side inconsistency, not a client bug \u2014 a majority of ids from get_recommendations_for_media's own `nodes[].id` 404 here anyway (7 of 10 tested for one title), with no correlation to that pairing's `rating`. A 404 on an id you just got from that tool doesn't mean the pairing doesn't exist, only that this specific lookup can't resolve it.",inputSchema:l.object({id:q$.describe("AniList recommendation ID.")}),outputSchema:l.object({recommendation:lP}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n})=>le(async()=>ce({recommendation:await ww(t.ctx(),n)}))),e.registerTool("get_recommendations_for_media",{title:"Get recommendations for a title",description:"List anime/manga AniList users recommend as similar to a given title, ranked by rating (highest first). Use search_media first to resolve the title to its AniList ID. Each result's `mediaRecommendation.mediaListEntry` (requires login) shows whether it's already on your own list \u2014 set `excludeInList: true` to filter those out server-side instead of checking each one yourself.",inputSchema:l.object({mediaId:Qe.describe("AniList ID of the anime/manga to get recommendations for."),...qe(10),excludeInList:l.boolean().default(!1).describe("[Requires login] Omit recommendations already on your own list. Filtered after fetching this page, so a page can come back with fewer than `perPage` results \u2014 not an error, just fewer new ones on that page. No-ops (nothing filtered) if not logged in, since there's no list to check against.")}),outputSchema:l.object({recommendations:l.object({pageInfo:l.object({hasNextPage:l.boolean().nullish()}).loose().optional().describe("Whether another page exists \u2014 use this to decide whether to paginate."),nodes:l.array(uP).nullish()}).loose()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({mediaId:n,page:i,perPage:r,excludeInList:o})=>le(async()=>ce({recommendations:await zw(t.ctx(),n,i,r,o)})))}function Qu(e){if(!(!e||e.year===void 0))return e.year*1e4+(e.month??0)*100+(e.day??0)}async function Ew(e,t,n){let r=`query(
|
|
271
301
|
$search:String,$type:MediaType,$page:Int,$perPage:Int,$sort:[MediaSort],
|
|
272
302
|
$isAdult:Boolean,$genre_in:[String],$format_in:[MediaFormat],$status_in:[MediaStatus],
|
|
273
303
|
$seasonYear:Int,$season:MediaSeason,$tag_in:[String],$onList:Boolean,
|
|
@@ -290,85 +320,55 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
290
320
|
startDate_greater:$startDate_greater,startDate_lesser:$startDate_lesser,
|
|
291
321
|
endDate_greater:$endDate_greater,endDate_lesser:$endDate_lesser,
|
|
292
322
|
source_in:$source_in
|
|
293
|
-
){${`${
|
|
323
|
+
){${`${Vu}${n.includeDescription?Zu:""}`}}
|
|
294
324
|
}
|
|
295
|
-
}`,o=n.filter??{},a=n.term?.trim()
|
|
325
|
+
}`,o=n.filter??{},a=n.term?.trim()||void 0,s=n.sort??(a?["SEARCH_MATCH"]:void 0);return(await e.gql.request(r,{search:a,type:t,page:n.page??1,perPage:n.perPage??10,sort:s,isAdult:o.isAdult,genre_in:o.genre_in,format_in:o.format_in,status_in:o.status_in,seasonYear:o.seasonYear,season:o.season,tag_in:o.tag_in,onList:o.onList,averageScore_greater:o.averageScore_greater,averageScore_lesser:o.averageScore_lesser,popularity_greater:o.popularity_greater,popularity_lesser:o.popularity_lesser,episodes_greater:o.episodes_greater,episodes_lesser:o.episodes_lesser,startDate_greater:Qu(o.startDate_greater),startDate_lesser:Qu(o.startDate_lesser),endDate_greater:Qu(o.endDate_greater),endDate_lesser:Qu(o.endDate_lesser),source_in:o.source_in},e.authHeader())).Page}async function Pw(e,t,n=1,i=10){let r=`query($search:String,$page:Int,$perPage:Int){Page(page:$page,perPage:$perPage){
|
|
296
326
|
pageInfo{total currentPage lastPage hasNextPage}
|
|
297
|
-
characters(search:$search){${
|
|
298
|
-
}}`;return(await e.gql.request(r,{search:t,page:n,perPage:i},e.authHeader())).Page}async function
|
|
327
|
+
characters(search:$search){${ga}}
|
|
328
|
+
}}`;return(await e.gql.request(r,{search:t,page:n,perPage:i},e.authHeader())).Page}async function xw(e,t,n=1,i=10){let r=`query($search:String,$page:Int,$perPage:Int){Page(page:$page,perPage:$perPage){
|
|
299
329
|
pageInfo{total currentPage lastPage hasNextPage}
|
|
300
|
-
staff(search:$search){${
|
|
301
|
-
}}`;return(await e.gql.request(r,{search:t,page:n,perPage:i},e.authHeader())).Page}async function
|
|
330
|
+
staff(search:$search){${va}}
|
|
331
|
+
}}`;return(await e.gql.request(r,{search:t,page:n,perPage:i},e.authHeader())).Page}async function jw(e,t,n=1,i=10){return(await e.gql.request(`query($search:String,$page:Int,$perPage:Int){Page(page:$page,perPage:$perPage){
|
|
302
332
|
pageInfo{total currentPage lastPage hasNextPage}
|
|
303
333
|
studios(search:$search){id name isAnimationStudio siteUrl}
|
|
304
|
-
}}`,{search:t,page:n,perPage:i},e.authHeader())).Page}async function
|
|
334
|
+
}}`,{search:t,page:n,perPage:i},e.authHeader())).Page}async function Aw(e,t,n=1,i=10){let r=`query($search:String,$page:Int,$perPage:Int){Page(page:$page,perPage:$perPage){
|
|
305
335
|
pageInfo{total currentPage lastPage hasNextPage}
|
|
306
|
-
users(search:$search){${
|
|
307
|
-
}}`;return(await e.gql.request(r,{search:t,page:n,perPage:i},e.authHeader())).Page}async function
|
|
336
|
+
users(search:$search){${bi}}
|
|
337
|
+
}}`;return(await e.gql.request(r,{search:t,page:n,perPage:i},e.authHeader())).Page}async function Ow(e,t,n,i,r=1,o=10){let a=`query($search:String,$categoryId:Int,$mediaCategoryId:Int,$page:Int,$perPage:Int){Page(page:$page,perPage:$perPage){
|
|
308
338
|
pageInfo{total currentPage lastPage hasNextPage}
|
|
309
339
|
threads(search:$search,categoryId:$categoryId,mediaCategoryId:$mediaCategoryId,sort:[SEARCH_MATCH]){
|
|
310
340
|
id title siteUrl replyCount viewCount isSticky createdAt user{id name} categories{id name}
|
|
311
341
|
}
|
|
312
|
-
}}`,s=t?.trim()?t:void 0;return(await e.gql.request(a,{search:s,categoryId:n,mediaCategoryId:i,page:r,perPage:o},e.authHeader())).Page}async function
|
|
342
|
+
}}`,s=t?.trim()?t:void 0;return(await e.gql.request(a,{search:s,categoryId:n,mediaCategoryId:i,page:r,perPage:o},e.authHeader())).Page}async function Cw(e,t,n,i=1,r=10){let o=e.authHeader(),a=typeof t=="string"?await Bu(e,t,o):t,s=`query($userId:Int,$type:ActivityType,$page:Int,$perPage:Int){Page(page:$page,perPage:$perPage){
|
|
313
343
|
pageInfo{total currentPage lastPage hasNextPage}
|
|
314
|
-
activities(userId:$userId,type:$type,sort:ID_DESC){${
|
|
315
|
-
}}`;return(await e.gql.request(s,{userId:a,type:n,page:i,perPage:r},o)).Page}var ZE=["TV","TV_SHORT","MOVIE","SPECIAL","OVA","ONA","MUSIC","MANGA","NOVEL","ONE_SHOT"],HE=["FINISHED","RELEASING","NOT_YET_RELEASED","CANCELLED","HIATUS"],JE=["WINTER","SPRING","SUMMER","FALL"],GE=["TEXT","ANIME_LIST","MANGA_LIST","MESSAGE","MEDIA_LIST"],BE=["ORIGINAL","MANGA","LIGHT_NOVEL","VISUAL_NOVEL","VIDEO_GAME","OTHER","NOVEL","DOUJINSHI","ANIME","WEB_NOVEL","LIVE_ACTION","GAME","COMIC","MULTIMEDIA_PROJECT","PICTURE_BOOK"],Hu=c.object({year:c.number().int().describe("Required \u2014 a date filter needs at least a year."),month:c.number().int().min(1).max(12).optional(),day:c.number().int().min(1).max(31).optional()}).describe("A partial date; omit `month`/`day` you don't want to narrow by."),KE=["ID","ID_DESC","TITLE_ROMAJI","TITLE_ROMAJI_DESC","TITLE_ENGLISH","TITLE_ENGLISH_DESC","TITLE_NATIVE","TITLE_NATIVE_DESC","TYPE","TYPE_DESC","FORMAT","FORMAT_DESC","START_DATE","START_DATE_DESC","END_DATE","END_DATE_DESC","SCORE","SCORE_DESC","POPULARITY","POPULARITY_DESC","TRENDING","TRENDING_DESC","EPISODES","EPISODES_DESC","DURATION","DURATION_DESC","STATUS","STATUS_DESC","CHAPTERS","CHAPTERS_DESC","VOLUMES","VOLUMES_DESC","UPDATED_AT","UPDATED_AT_DESC","SEARCH_MATCH","FAVOURITES","FAVOURITES_DESC"],WE=c.object({type:c.enum(bi).describe("Whether to search anime or manga."),term:c.string().optional().describe("Free-text search term (matches title). Omit to only filter."),genres:c.array(c.string()).optional().describe("Restrict to entries matching ALL of these genre names (see get_genres for valid names) \u2014 an unrecognized genre name doesn't error, it just filters out all results, same silent-mismatch behavior as `format_in`/`tag_in` below."),format_in:c.array(c.enum(ZE)).optional().describe("Restrict to these formats. Only formats valid for the `type` you're searching match anything \u2014 e.g. NOVEL/ONE_SHOT with type: ANIME, or TV/OVA/ONA with type: MANGA, will just filter out all results, not error."),status_in:c.array(c.enum(HE)).optional().describe("Restrict to these release statuses."),season:c.enum(JE).optional().describe("Restrict to this airing season. Works alone \u2014 matches every year's occurrence of that season, NOT just the current year (unlike anilist.co's own season filter UI, which implicitly assumes the current year when you don't also pick one). Combine with `seasonYear` for one specific season+year."),seasonYear:c.number().int().optional().describe("Restrict to this airing/release year (matches any season within it). Works alone or combined with `season` for one specific season+year \u2014 neither requires the other."),tag_in:c.array(c.string()).optional().describe('Restrict to entries matching ALL of these exact tag names (see get_media_tags for valid names \u2014 unlike `genres`, tag names are case-sensitive and more specific, e.g. "Time Loop" or "Tragedy"). An unrecognized tag name doesn\'t error, it just silently matches nothing (same behavior as `genres`/`format_in` above, confirmed live).'),onList:c.boolean().optional().describe("[Requires login] Restrict to (true) or exclude (false) entries already on the authenticated user's own list. Omit to ignore list status entirely. Confirmed live: silently no-ops (identical results for true/false/omitted) if not logged in, since there's no list to check against \u2014 same behavior as get_recommendations_for_media's `excludeInList`."),averageScore_greater:c.number().int().min(0).max(100).optional().describe("Restrict to entries with an average score strictly greater than this (0-100)."),averageScore_lesser:c.number().int().min(0).max(100).optional().describe("Restrict to entries with an average score strictly less than this (0-100)."),popularity_greater:c.number().int().min(0).optional().describe("Restrict to entries with more list-adds than this."),popularity_lesser:c.number().int().min(0).optional().describe("Restrict to entries with fewer list-adds than this."),episodes_greater:c.number().int().min(0).optional().describe("Restrict to entries with more episodes/chapters than this."),episodes_lesser:c.number().int().min(0).optional().describe("Restrict to entries with fewer episodes/chapters than this."),startDate_greater:Hu.optional().describe("Restrict to entries whose start date is on or after this date."),startDate_lesser:Hu.optional().describe("Restrict to entries whose start date is on or before this date."),endDate_greater:Hu.optional().describe("Restrict to entries whose end date is on or after this date."),endDate_lesser:Hu.optional().describe("Restrict to entries whose end date is on or before this date."),source_in:c.array(c.enum(BE)).optional().describe("Restrict to entries adapted from these source material types."),sfw:c.boolean().default(!1).describe("Set true to exclude adult (isAdult) entries. Adult results are NOT filtered by default."),sort:c.array(c.enum(KE)).optional().describe('Sort order, most-significant key first (e.g. ["SCORE_DESC"] for highest-rated first, ["POPULARITY_DESC"] for most popular, ["TRENDING_DESC"] for what\'s hot right now). Defaults to relevance-ranked SEARCH_MATCH, which only makes sense when `term` is also given \u2014 set an explicit sort for a term-less browse/ranking query.'),includeDescription:c.boolean().default(!1).describe("Also fetch each result's full synopsis (`description`). Kept off by default \u2014 with up to 25 results per call, always including it would burn tokens on text you may not need; use get_media for a single title's full synopsis instead."),...qe(10)});function hw(e,t){e.registerTool("search_media",{title:"Search anime/manga",description:"Search AniList for anime or manga by title and/or filters (genre, format, status, season/year), or browse term-less by ranking (top-rated, most popular, trending \u2014 see the `sort` parameter) when you don't have a title to search for. Adult (NSFW) results are included unless you set `sfw: true` \u2014 see the `sfw` parameter. Returns AniList IDs to use with get_media and other ID-based tools.",inputSchema:WE,outputSchema:c.object({results:c.object({pageInfo:He.optional(),media:c.array(Qt).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},n=>ce(async()=>se({results:await sw(t.ctx(),n.type,{term:n.term,page:n.page,perPage:n.perPage,sort:n.sort,includeDescription:n.includeDescription,filter:{isAdult:n.sfw?!1:void 0,genre_in:n.genres,format_in:n.format_in,status_in:n.status_in,season:n.season,seasonYear:n.seasonYear,tag_in:n.tag_in,onList:n.onList,averageScore_greater:n.averageScore_greater,averageScore_lesser:n.averageScore_lesser,popularity_greater:n.popularity_greater,popularity_lesser:n.popularity_lesser,episodes_greater:n.episodes_greater,episodes_lesser:n.episodes_lesser,startDate_greater:n.startDate_greater,startDate_lesser:n.startDate_lesser,endDate_greater:n.endDate_greater,endDate_lesser:n.endDate_lesser,source_in:n.source_in}})}))),e.registerTool("search_character",{title:"Search characters",description:"Search AniList for characters by name. Returns AniList IDs to use with get_character.",inputSchema:c.object({term:c.string().min(1).describe("Character name (or part of it) to search for."),...qe(10)}),outputSchema:c.object({results:c.object({pageInfo:He.optional(),characters:c.array(Qt).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({term:n,page:i,perPage:r})=>ce(async()=>se({results:await cw(t.ctx(),n,i,r)}))),e.registerTool("search_staff",{title:"Search staff",description:"Search AniList for staff members by name. Returns AniList IDs to use with get_staff.",inputSchema:c.object({term:c.string().min(1).describe("Staff member name (or part of it) to search for."),...qe(10)}),outputSchema:c.object({results:c.object({pageInfo:He.optional(),staff:c.array(Qt).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({term:n,page:i,perPage:r})=>ce(async()=>se({results:await lw(t.ctx(),n,i,r)}))),e.registerTool("search_studio",{title:"Search studios",description:"Search/browse AniList's animation/production studios by name, when you want to see multiple candidates rather than take the closest match \u2014 get_studio's own `name` param already does this same fuzzy search directly and resolves a partial name on its own. Returns AniList IDs to use with get_studio.",inputSchema:c.object({term:c.string().min(1).describe("Studio name (or part of it) to search for."),...qe(10)}),outputSchema:c.object({results:c.object({pageInfo:He.optional(),studios:c.array(Qt).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({term:n,page:i,perPage:r})=>ce(async()=>se({results:await uw(t.ctx(),n,i,r)}))),e.registerTool("search_user",{title:"Search users",description:"Search AniList for users by username. Returns AniList user IDs to use with get_user_profile/get_full_user_info (profile), get_user_stats (statistics), get_user_list (their public list), or toggle_follow_user.",inputSchema:c.object({term:c.string().min(1).describe("Username (or part of it) to search for."),...qe(10)}),outputSchema:c.object({results:c.object({pageInfo:He.optional(),users:c.array(Qt).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({term:n,page:i,perPage:r})=>ce(async()=>se({results:await dw(t.ctx(),n,i,r)}))),e.registerTool("search_thread",{title:"Search forum threads",description:"Search/browse AniList's forum threads by title/body text and/or restrict to one category. Returns AniList thread IDs (with title/category for context) to use with get_thread, get_thread_comments, post_thread, or post_thread_comment.",inputSchema:c.object({term:c.string().optional().describe("Free-text search term (matches thread title/body). Omit to just filter/browse."),categoryId:_e.optional().describe("Restrict to this forum category ID. Not independently listable by any tool \u2014 resolve one from a thread you've already read (its `categories` field) or from a forum URL like anilist.co/forum/recent?category=<id>. A wrong or nonexistent ID doesn't error, it silently filters to an empty result \u2014 indistinguishable from 'no threads in this category.'"),mediaCategoryId:_e.optional().describe("Restrict to threads tagged with this AniList anime/manga ID (from search_media/get_media). Not existence-checked: a nonexistent media ID doesn't error, it silently filters to an empty result \u2014 resolve the ID via search_media first if you need to confirm the title actually exists."),...qe(10)}),outputSchema:c.object({results:c.object({pageInfo:He.optional(),threads:c.array(Qt).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({term:n,categoryId:i,mediaCategoryId:r,page:o,perPage:a})=>ce(async()=>se({results:await mw(t.ctx(),n,i,r,o,a)}))),e.registerTool("search_activity",{title:"Search activity feed",description:"Search/browse AniList's activity feed (list updates, text posts, messages), optionally filtered to one user and/or one activity type. Each result already includes its full content (text/message/status, `replyCount`/`likeCount`/`isLiked`, the posting user, and \u2014 for list activity \u2014 the media) \u2014 no follow-up get_activity call needed unless you need to re-check one specific result's `replyCount`/`likeCount`/`isLiked` later (e.g. after liking it).",inputSchema:c.object({user:At.optional().describe("Restrict results to this AniList user \u2014 numeric ID or exact username (resolved to an id with one extra internal lookup; no need to call search_user first unless you only have a partial/fuzzy name). Validation is asymmetric: an unknown USERNAME errors ('No AniList user named ... was found'), but an unknown numeric ID does NOT \u2014 it silently returns an empty result, indistinguishable from 'this user has no matching activity'. Resolve a numeric ID via search_user first if you need to confirm the account actually exists. Use get_user_activity instead if you only need one user's feed without the type filter."),type:c.enum(GE).optional().describe("Restrict to this activity type. MEDIA_LIST matches both ANIME_LIST and MANGA_LIST activities; use ANIME_LIST/MANGA_LIST to restrict to just one."),...qe(10)}),outputSchema:c.object({results:c.object({pageInfo:He.optional(),activities:c.array(Si).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({user:n,type:i,page:r,perPage:o})=>ce(async()=>se({results:await pw(t.ctx(),n,i,r,o)})))}async function fw(e,t){let i=await e.gql.request(`query($id:Int){Thread(id:$id){id title body(asHtml:false) siteUrl replyCommentId
|
|
344
|
+
activities(userId:$userId,type:$type,sort:ID_DESC){${Si}}
|
|
345
|
+
}}`;return(await e.gql.request(s,{userId:a,type:n,page:i,perPage:r},o)).Page}var mP=["TV","TV_SHORT","MOVIE","SPECIAL","OVA","ONA","MUSIC","MANGA","NOVEL","ONE_SHOT"],pP=["FINISHED","RELEASING","NOT_YET_RELEASED","CANCELLED","HIATUS"],hP=["WINTER","SPRING","SUMMER","FALL"],fP=["TEXT","ANIME_LIST","MANGA_LIST","MESSAGE","MEDIA_LIST"],gP=["ORIGINAL","MANGA","LIGHT_NOVEL","VISUAL_NOVEL","VIDEO_GAME","OTHER","NOVEL","DOUJINSHI","ANIME","WEB_NOVEL","LIVE_ACTION","GAME","COMIC","MULTIMEDIA_PROJECT","PICTURE_BOOK"],ed=l.object({year:l.int().positive().describe("Required \u2014 a date filter needs at least a year."),month:l.int().min(1).max(12).optional(),day:l.int().min(1).max(31).optional()}).describe("A partial date; omit `month`/`day` you don't want to narrow by."),vP=["ID","ID_DESC","TITLE_ROMAJI","TITLE_ROMAJI_DESC","TITLE_ENGLISH","TITLE_ENGLISH_DESC","TITLE_NATIVE","TITLE_NATIVE_DESC","TYPE","TYPE_DESC","FORMAT","FORMAT_DESC","START_DATE","START_DATE_DESC","END_DATE","END_DATE_DESC","SCORE","SCORE_DESC","POPULARITY","POPULARITY_DESC","TRENDING","TRENDING_DESC","EPISODES","EPISODES_DESC","DURATION","DURATION_DESC","STATUS","STATUS_DESC","CHAPTERS","CHAPTERS_DESC","VOLUMES","VOLUMES_DESC","UPDATED_AT","UPDATED_AT_DESC","SEARCH_MATCH","FAVOURITES","FAVOURITES_DESC"],yP=l.object({type:l.enum(cn).describe("Whether to search anime or manga."),term:l.string().optional().describe("Free-text search term (matches title). Omit to only filter."),genres:l.array(l.string()).optional().describe("Restrict to entries matching ALL of these genre names (see get_genres for valid names) \u2014 an unrecognized genre name doesn't error, it just filters out all results, same silent-mismatch behavior as `format_in`/`tag_in` below."),format_in:l.array(l.enum(mP)).optional().describe("Restrict to these formats. Only formats valid for the `type` you're searching match anything \u2014 e.g. NOVEL/ONE_SHOT with type: ANIME, or TV/OVA/ONA with type: MANGA, will just filter out all results, not error."),status_in:l.array(l.enum(pP)).optional().describe("Restrict to these release statuses."),season:l.enum(hP).optional().describe("Restrict to this airing season. Works alone \u2014 matches every year's occurrence of that season, NOT just the current year (unlike anilist.co's own season filter UI, which implicitly assumes the current year when you don't also pick one). Combine with `seasonYear` for one specific season+year."),seasonYear:l.int().positive().optional().describe("Restrict to this airing/release year (matches any season within it). Works alone or combined with `season` for one specific season+year \u2014 neither requires the other."),tag_in:l.array(l.string()).optional().describe('Restrict to entries matching ALL of these exact tag names (see get_media_tags for valid names \u2014 unlike `genres`, tag names are case-sensitive and more specific, e.g. "Time Loop" or "Tragedy"). An unrecognized tag name doesn\'t error, it just silently matches nothing (same behavior as `genres`/`format_in` above, confirmed live).'),onList:l.boolean().optional().describe("[Requires login] Restrict to (true) or exclude (false) entries already on the authenticated user's own list. Omit to ignore list status entirely. Confirmed live: silently no-ops (identical results for true/false/omitted) if not logged in, since there's no list to check against \u2014 same behavior as get_recommendations_for_media's `excludeInList`."),averageScore_greater:l.int().nonnegative().max(100).optional().describe("Restrict to entries with an average score strictly greater than this (0-100)."),averageScore_lesser:l.int().nonnegative().max(100).optional().describe("Restrict to entries with an average score strictly less than this (0-100)."),popularity_greater:l.int().nonnegative().optional().describe("Restrict to entries with more list-adds than this."),popularity_lesser:l.int().nonnegative().optional().describe("Restrict to entries with fewer list-adds than this."),episodes_greater:l.int().nonnegative().optional().describe("Restrict to entries with more episodes/chapters than this."),episodes_lesser:l.int().nonnegative().optional().describe("Restrict to entries with fewer episodes/chapters than this."),startDate_greater:ed.optional().describe("Restrict to entries whose start date is on or after this date."),startDate_lesser:ed.optional().describe("Restrict to entries whose start date is on or before this date."),endDate_greater:ed.optional().describe("Restrict to entries whose end date is on or after this date."),endDate_lesser:ed.optional().describe("Restrict to entries whose end date is on or before this date."),source_in:l.array(l.enum(gP)).optional().describe("Restrict to entries adapted from these source material types."),sfw:l.boolean().default(!1).describe("Set true to exclude adult (isAdult) entries. Adult results are NOT filtered by default."),sort:l.array(l.enum(vP)).optional().describe('Sort order, most-significant key first (e.g. ["SCORE_DESC"] for highest-rated first, ["POPULARITY_DESC"] for most popular, ["TRENDING_DESC"] for what\'s hot right now). Defaults to relevance-ranked SEARCH_MATCH when a `term` is given; with no term and no explicit sort, results come back in AniList\'s own default order. Set an explicit sort for a term-less ranking/browse query (e.g. top-rated or most-popular).'),includeDescription:l.boolean().default(!1).describe("Also fetch each result's full synopsis (`description`). Kept off by default \u2014 with up to 25 results per call, always including it would burn tokens on text you may not need; use get_media for a single title's full synopsis instead."),...qe(10)});function Nw(e,t){e.registerTool("search_media",{title:"Search anime/manga",description:"Search AniList for anime or manga by title and/or filters (genre, format, status, season/year), or browse term-less by ranking (top-rated, most popular, trending \u2014 see the `sort` parameter) when you don't have a title to search for. Adult (NSFW) results are included unless you set `sfw: true` \u2014 see the `sfw` parameter. Returns AniList IDs to use with get_media and other ID-based tools.",inputSchema:yP,outputSchema:l.object({results:l.object({pageInfo:He.optional(),media:l.array(er).optional()}).loose()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},n=>le(async()=>ce({results:await Ew(t.ctx(),n.type,{term:n.term,page:n.page,perPage:n.perPage,sort:n.sort,includeDescription:n.includeDescription,filter:{isAdult:n.sfw?!1:void 0,genre_in:n.genres,format_in:n.format_in,status_in:n.status_in,season:n.season,seasonYear:n.seasonYear,tag_in:n.tag_in,onList:n.onList,averageScore_greater:n.averageScore_greater,averageScore_lesser:n.averageScore_lesser,popularity_greater:n.popularity_greater,popularity_lesser:n.popularity_lesser,episodes_greater:n.episodes_greater,episodes_lesser:n.episodes_lesser,startDate_greater:n.startDate_greater,startDate_lesser:n.startDate_lesser,endDate_greater:n.endDate_greater,endDate_lesser:n.endDate_lesser,source_in:n.source_in}})}))),e.registerTool("search_character",{title:"Search characters",description:"Search AniList for characters by name. Returns AniList IDs to use with get_character.",inputSchema:l.object({term:l.string().min(1).describe("Character name (or part of it) to search for."),...qe(10)}),outputSchema:l.object({results:l.object({pageInfo:He.optional(),characters:l.array(er).optional()}).loose()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({term:n,page:i,perPage:r})=>le(async()=>ce({results:await Pw(t.ctx(),n,i,r)}))),e.registerTool("search_staff",{title:"Search staff",description:"Search AniList for staff members by name. Returns AniList IDs to use with get_staff.",inputSchema:l.object({term:l.string().min(1).describe("Staff member name (or part of it) to search for."),...qe(10)}),outputSchema:l.object({results:l.object({pageInfo:He.optional(),staff:l.array(er).optional()}).loose()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({term:n,page:i,perPage:r})=>le(async()=>ce({results:await xw(t.ctx(),n,i,r)}))),e.registerTool("search_studio",{title:"Search studios",description:"Search/browse AniList's animation/production studios by name, when you want to see multiple candidates rather than take the closest match \u2014 get_studio's own `name` param already does this same fuzzy search directly and resolves a partial name on its own. Returns AniList IDs to use with get_studio.",inputSchema:l.object({term:l.string().min(1).describe("Studio name (or part of it) to search for."),...qe(10)}),outputSchema:l.object({results:l.object({pageInfo:He.optional(),studios:l.array(er).optional()}).loose()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({term:n,page:i,perPage:r})=>le(async()=>ce({results:await jw(t.ctx(),n,i,r)}))),e.registerTool("search_user",{title:"Search users",description:"Search AniList for users by username. Returns AniList user IDs to use with get_user_profile/get_full_user_info (profile), get_user_stats (statistics), get_user_list (their public list), or toggle_follow_user.",inputSchema:l.object({term:l.string().min(1).describe("Username (or part of it) to search for."),...qe(10)}),outputSchema:l.object({results:l.object({pageInfo:He.optional(),users:l.array(er).optional()}).loose()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({term:n,page:i,perPage:r})=>le(async()=>ce({results:await Aw(t.ctx(),n,i,r)}))),e.registerTool("search_thread",{title:"Search forum threads",description:"Search/browse AniList's forum threads by title/body text and/or restrict to one category. Returns AniList thread IDs (with title/category for context) to use with get_thread, get_thread_comments, post_thread, or post_thread_comment.",inputSchema:l.object({term:l.string().optional().describe("Free-text search term (matches thread title/body). Omit to just filter/browse."),categoryId:Gu.optional().describe("Restrict to this forum category ID. Not independently listable by any tool \u2014 resolve one from a thread you've already read (its `categories` field) or from a forum URL like anilist.co/forum/recent?category=<id>. A wrong or nonexistent ID doesn't error, it silently filters to an empty result \u2014 indistinguishable from 'no threads in this category.'"),mediaCategoryId:Qe.optional().describe("Restrict to threads tagged with this AniList anime/manga ID (from search_media/get_media). Not existence-checked: a nonexistent media ID doesn't error, it silently filters to an empty result \u2014 resolve the ID via search_media first if you need to confirm the title actually exists."),...qe(10)}),outputSchema:l.object({results:l.object({pageInfo:He.optional(),threads:l.array(er).optional()}).loose()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({term:n,categoryId:i,mediaCategoryId:r,page:o,perPage:a})=>le(async()=>ce({results:await Ow(t.ctx(),n,i,r,o,a)}))),e.registerTool("search_activity",{title:"Search activity feed",description:"Search/browse AniList's activity feed (list updates, text posts, messages), optionally filtered to one user and/or one activity type. Each result already includes its full content (text/message/status, `replyCount`/`likeCount`/`isLiked`, the posting user, and \u2014 for list activity \u2014 the media) \u2014 no follow-up get_activity call needed unless you need to re-check one specific result's `replyCount`/`likeCount`/`isLiked` later (e.g. after liking it).",inputSchema:l.object({user:Ct.optional().describe("Restrict results to this AniList user \u2014 numeric ID or exact username (resolved to an id with one extra internal lookup; no need to call search_user first unless you only have a partial/fuzzy name). Validation is asymmetric: an unknown USERNAME errors ('No AniList user named ... was found'), but an unknown numeric ID does NOT \u2014 it silently returns an empty result, indistinguishable from 'this user has no matching activity'. Resolve a numeric ID via search_user first if you need to confirm the account actually exists. Use get_user_activity instead if you only need one user's feed without the type filter."),type:l.enum(fP).optional().describe("Restrict to this activity type. MEDIA_LIST matches both ANIME_LIST and MANGA_LIST activities; use ANIME_LIST/MANGA_LIST to restrict to just one."),...qe(10)}),outputSchema:l.object({results:l.object({pageInfo:He.optional(),activities:l.array(wi).optional()}).loose()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({user:n,type:i,page:r,perPage:o})=>le(async()=>ce({results:await Cw(t.ctx(),n,i,r,o)})))}async function Lw(e,t){let i=await e.gql.request(`query($id:Int){Thread(id:$id){id title body(asHtml:false) siteUrl replyCommentId
|
|
316
346
|
isSticky isLocked replyCount viewCount likeCount isLiked user{id name} categories{id name}
|
|
317
|
-
mediaCategories{id title{romaji english}}}}`,{id:t},e.authHeader());return
|
|
318
|
-
${
|
|
347
|
+
mediaCategories{id title{romaji english}}}}`,{id:t},e.authHeader());return Ce(i.Thread,`No thread found with ID ${t}.`)}async function qw(e,t,n=1,i=25){let r=`query($threadId:Int,$page:Int,$perPage:Int){
|
|
348
|
+
${_i("Thread","threadId")}
|
|
319
349
|
Page(page:$page,perPage:$perPage){
|
|
320
350
|
pageInfo{total currentPage lastPage hasNextPage}
|
|
321
351
|
threadComments(threadId:$threadId){id comment(asHtml:false) siteUrl likeCount isLiked user{id name} childComments}
|
|
322
352
|
}
|
|
323
|
-
}`,o=await e.gql.request(r,{threadId:t,page:n,perPage:i},e.authHeader());return
|
|
353
|
+
}`,o=await e.gql.request(r,{threadId:t,page:n,perPage:i},e.authHeader());return Ce(o.exists,`No thread found with ID ${t}.`),o.Page}async function Mw(e,t,n,i={}){let r=e.requireAuth();return(await e.gql.request(`mutation($id:Int,$title:String,$body:String,$categories:[Int],$mediaCategories:[Int],$sticky:Boolean,$locked:Boolean){
|
|
324
354
|
SaveThread(id:$id,title:$title,body:$body,categories:$categories,mediaCategories:$mediaCategories,sticky:$sticky,locked:$locked){
|
|
325
355
|
id title siteUrl replyCount viewCount likeCount isLiked
|
|
326
356
|
}
|
|
327
|
-
}`,{id:i.id,title:t,body:n,categories:i.categories,mediaCategories:i.mediaCategories,sticky:i.sticky,locked:i.locked},r)).SaveThread}async function
|
|
357
|
+
}`,{id:i.id,title:t,body:n,categories:i.categories,mediaCategories:i.mediaCategories,sticky:i.sticky,locked:i.locked},r)).SaveThread}async function Dw(e,t,n,i={}){let r=e.requireAuth();return(await e.gql.request(`mutation($id:Int,$threadId:Int,$parentCommentId:Int,$comment:String){
|
|
328
358
|
SaveThreadComment(id:$id,threadId:$threadId,parentCommentId:$parentCommentId,comment:$comment){
|
|
329
359
|
id comment(asHtml:false) siteUrl likeCount isLiked
|
|
330
360
|
}
|
|
331
|
-
}`,{id:i.id,threadId:t,parentCommentId:i.parentCommentId,comment:n},r)).SaveThreadComment}async function _w(e,t){let n=e.requireAuth(),r=await e.gql.request("mutation($id:Int){DeleteThread(id:$id){deleted}}",{id:t},n);if(!r.DeleteThread?.deleted)throw new Re({code:"not_found",message:"AniList reported this thread as not deleted \u2014 it may not exist or you may not own it."});return r.DeleteThread}async function bw(e,t){let n=e.requireAuth(),r=await e.gql.request("mutation($id:Int){DeleteThreadComment(id:$id){deleted}}",{id:t},n);if(!r.DeleteThreadComment?.deleted)throw new Re({code:"not_found",message:"AniList reported this comment as not deleted \u2014 it may not exist or you may not own it."});return r.DeleteThreadComment}var XE=c.object({id:c.number().int(),title:c.string().nullish(),siteUrl:c.string().nullish(),replyCount:c.number().int().nullish(),viewCount:c.number().int().nullish(),likeCount:c.number().int().nullish(),isLiked:c.boolean().nullish()}).passthrough(),QE=c.object({id:c.number().int(),comment:c.string().nullish(),siteUrl:c.string().nullish(),likeCount:c.number().int().nullish(),isLiked:c.boolean().nullish()}).passthrough(),eP=c.object({id:c.number().int(),title:c.string().nullish(),body:c.string().nullish(),siteUrl:c.string().nullish(),replyCommentId:c.number().int().nullish(),isSticky:c.boolean().nullish(),isLocked:c.boolean().nullish(),replyCount:c.number().int().nullish(),viewCount:c.number().int().nullish(),likeCount:c.number().int().nullish(),isLiked:c.boolean().nullish(),user:c.object({id:c.number().int(),name:c.string().nullish()}).passthrough().nullish(),categories:c.array(c.object({id:c.number().int(),name:c.string().nullish()}).passthrough()).nullish(),mediaCategories:c.array(c.object({id:c.number().int(),title:c.object({romaji:c.string().nullish(),english:c.string().nullish()}).nullish()}).passthrough()).nullish()}).passthrough(),tP=c.object({id:c.number().int(),comment:c.string().nullish(),siteUrl:c.string().nullish(),likeCount:c.number().int().nullish(),isLiked:c.boolean().nullish(),user:c.object({id:c.number().int(),name:c.string().nullish()}).passthrough().nullish(),childComments:c.unknown().nullish()}).passthrough();function Sw(e,t){e.registerTool("get_thread",{title:"Get a forum thread",description:"Get an AniList forum thread's title, body and metadata (including `replyCount`, `viewCount`, `likeCount`, `isLiked`) by its ID.",inputSchema:c.object({id:_e.describe("AniList thread ID \u2014 use search_thread to find one, or pass one already known (e.g. from an AniList forum URL, anilist.co/forum/thread/<id>).")}),outputSchema:c.object({thread:eP}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n})=>ce(async()=>se({thread:await fw(t.ctx(),n)}))),e.registerTool("get_thread_comments",{title:"Get comments on a forum thread",description:"List top-level comments posted on an AniList forum thread, by the thread's ID. Replies (posted via post_thread_comment's `parentCommentId`) are nested under their parent's `childComments` rather than appearing as separate entries in this list.",inputSchema:c.object({threadId:_e.describe("AniList thread ID \u2014 use search_thread to find one, or pass one already known (e.g. from an AniList forum URL, or from get_thread)."),...qe(25)}),outputSchema:c.object({comments:c.object({pageInfo:He.optional(),threadComments:c.array(tP).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({threadId:n,page:i,perPage:r})=>ce(async()=>se({comments:await gw(t.ctx(),n,i,r)}))),e.registerTool("post_thread",{title:"Post a forum thread",description:"[Requires login] Post a new forum thread to the authenticated user's own AniList account, or update an existing one by passing its `id`. Use search_thread first if you want to check whether a similar thread already exists before posting a new one.",inputSchema:c.object({title:c.string().min(6).max(120).optional().describe("Thread title (per AniList's own schema: 6-120 characters) \u2014 REQUIRED when creating a new thread, optional when updating one via `id` (confirmed live: omitting it on an update leaves the existing title unchanged, it isn't cleared)."),body:c.string().min(1).max(3e4).optional().describe("Thread body (markdown; per AniList's own schema, up to 30000 characters) \u2014 REQUIRED when creating a new thread, optional when updating one via `id` (confirmed live: omitting it on an update leaves the existing body unchanged)."),categories:c.array(_e).optional().describe("Forum category IDs to post this thread under \u2014 REQUIRED when creating a new thread (AniList rejects the mutation otherwise), optional when updating one via `id`. When updating and you DO set this, it's a full replace, not a merge \u2014 confirmed live: an existing thread with categories [A] updated with just [B] ended up with [B] only, A silently dropped. Fetch the thread's current categories first (get_thread) and include every one you want to keep. Not independently listable by any tool; resolve one from a thread you've already read (get_thread's/search_thread's `categories` field) or from a forum URL like anilist.co/forum/recent?category=<id>."),mediaCategories:c.array(_e).optional().describe("AniList anime/manga IDs to tag this thread with, for threads about a specific title (from search_media/get_media). Optional on both create and update. When updating and you DO set this, it's a full replace, not a merge \u2014 confirmed live: an existing thread tagged with [A] updated with just [B] ended up with [B] only, A silently dropped (same behavior as `categories` above). Fetch the thread's current `mediaCategories` first (get_thread) if you need to keep an existing tag alongside a new one."),sticky:c.boolean().optional().describe("Pin this thread (only takes effect if you have moderator permission \u2014 confirmed live that a non-mod account's own thread silently stays unpinned)."),locked:c.boolean().optional().describe("Lock this thread to prevent further replies (only takes effect if you have moderator permission \u2014 confirmed live that a non-mod account's own thread silently stays unlocked)."),id:_e.optional().describe("Thread ID to update instead of creating a new one.")}).refine(n=>n.id!==void 0||n.title!==void 0,{message:"`title` is required when creating a new thread (no `id` given)."}).refine(n=>n.id!==void 0||n.body!==void 0,{message:"`body` is required when creating a new thread (no `id` given)."}).refine(n=>n.id!==void 0||n.categories!==void 0,{message:"`categories` is required when creating a new thread (no `id` given)."}),outputSchema:c.object({thread:XE}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},({title:n,body:i,categories:r,mediaCategories:o,sticky:a,locked:s,id:l})=>ce(async()=>se({thread:await vw(t.ctx(),n,i,{id:l,categories:r,mediaCategories:o,sticky:a,locked:s})}))),e.registerTool("post_thread_comment",{title:"Post a comment on a forum thread",description:"[Requires login] Post a new comment on an AniList forum thread from the authenticated user's account, or update an existing one by passing its `id`.",inputSchema:c.object({threadId:_e.describe("AniList thread ID to comment on (from get_thread/search_thread)."),comment:c.string().min(1).max(12e3).describe("The comment text to post (markdown; per AniList's own schema, up to 12000 characters)."),parentCommentId:_e.optional().describe("Reply to this specific comment instead of posting top-level (from get_thread_comments). The reply then appears nested under that comment's `childComments` in get_thread_comments, not as a new top-level entry."),id:_e.optional().describe("Comment ID to update instead of creating a new one.")}),outputSchema:c.object({comment:QE}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},({threadId:n,comment:i,parentCommentId:r,id:o})=>ce(async()=>se({comment:await yw(t.ctx(),n,i,{id:o,parentCommentId:r})}))),e.registerTool("delete_thread",{title:"Delete a forum thread",description:"[Requires login] Delete a forum thread the authenticated user owns, by its ID (from search_thread, get_thread, or the id returned by post_thread). This cannot be undone, and calling it again on an already-deleted id errors rather than silently succeeding.",inputSchema:c.object({id:_e.describe("AniList thread ID to delete.")}),outputSchema:c.object({result:cn}),annotations:an},({id:n})=>ce(async()=>se({result:await _w(t.ctx(),n)}))),e.registerTool("delete_thread_comment",{title:"Delete a comment on a forum thread",description:"[Requires login] Delete a comment the authenticated user owns, by its ID (from get_thread_comments or the id returned by post_thread_comment). This cannot be undone, and calling it again on an already-deleted id errors rather than silently succeeding.",inputSchema:c.object({id:_e.describe("AniList comment ID to delete.")}),outputSchema:c.object({result:cn}),annotations:an},({id:n})=>ce(async()=>se({result:await bw(t.ctx(),n)})))}async function $w(e,t){let n=typeof t=="number",i=`${yi}${Du}`,r=n?`query($id:Int){User(id:$id){${i}}}`:`query($name:String){User(name:$name){${i}}}`,o=await e.gql.request(r,n?{id:t}:{name:t},e.authHeader());return je(o.User,`No AniList user found matching ${JSON.stringify(t)}.`)}async function ww(e,t){let n=typeof t=="number",i="statistics{anime{count meanScore minutesWatched episodesWatched}manga{count meanScore chaptersRead volumesRead}}",r=n?`query($id:Int){User(id:$id){${i}}}`:`query($name:String){User(name:$name){${i}}}`,o=await e.gql.request(r,n?{id:t}:{name:t},e.authHeader());return je(o.User,`No AniList user found matching ${JSON.stringify(t)}.`)}async function zw(e,t){let n=typeof t=="number",i=`${yi}${Du} statistics{anime{count meanScore minutesWatched episodesWatched}manga{count meanScore chaptersRead volumesRead}}`,r=n?`query($id:Int){User(id:$id){${i}}}`:`query($name:String){User(name:$name){${i}}}`,o=await e.gql.request(r,n?{id:t}:{name:t},e.authHeader());return je(o.User,`No AniList user found matching ${JSON.stringify(t)}.`)}async function Iw(e){let t=e.requireAuth(),n=`query{Viewer{${yi}${Du}}}`;return(await e.gql.request(n,{},t)).Viewer}async function Rw(e,t){let n=e.requireAuth();return(await e.gql.request("mutation($id:Int){ToggleFollow(userId:$id){id name isFollowing}}",{id:t},n)).ToggleFollow}async function kw(e,t){let n=e.requireAuth();return(await e.gql.request(`mutation(
|
|
332
|
-
$about:String,$titleLanguage:UserTitleLanguage,$displayAdultContent:Boolean,$airingNotifications:Boolean,
|
|
333
|
-
$scoreFormat:ScoreFormat,$rowOrder:String,$profileColor:String,$donatorBadge:String,
|
|
334
|
-
$notificationOptions:[NotificationOptionInput],$timezone:String,$activityMergeTime:Int,
|
|
335
|
-
$staffNameLanguage:UserStaffNameLanguage,$restrictMessagesToFollowing:Boolean,
|
|
336
|
-
$disabledListActivity:[ListActivityOptionInput],
|
|
337
|
-
$animeListOptions:MediaListOptionsInput,$mangaListOptions:MediaListOptionsInput
|
|
338
|
-
){
|
|
339
|
-
UpdateUser(
|
|
340
|
-
about:$about,titleLanguage:$titleLanguage,displayAdultContent:$displayAdultContent,
|
|
341
|
-
airingNotifications:$airingNotifications,scoreFormat:$scoreFormat,rowOrder:$rowOrder,
|
|
342
|
-
profileColor:$profileColor,donatorBadge:$donatorBadge,notificationOptions:$notificationOptions,
|
|
343
|
-
timezone:$timezone,activityMergeTime:$activityMergeTime,staffNameLanguage:$staffNameLanguage,
|
|
344
|
-
restrictMessagesToFollowing:$restrictMessagesToFollowing,disabledListActivity:$disabledListActivity,
|
|
345
|
-
animeListOptions:$animeListOptions,mangaListOptions:$mangaListOptions
|
|
346
|
-
){
|
|
347
|
-
id name about(asHtml:false) donatorBadge
|
|
348
|
-
options{
|
|
349
|
-
titleLanguage displayAdultContent airingNotifications profileColor timezone
|
|
350
|
-
activityMergeTime staffNameLanguage restrictMessagesToFollowing
|
|
351
|
-
notificationOptions{type enabled}
|
|
352
|
-
disabledListActivity{type disabled}
|
|
353
|
-
}
|
|
354
|
-
mediaListOptions{
|
|
355
|
-
scoreFormat
|
|
356
|
-
rowOrder
|
|
357
|
-
animeList{sectionOrder splitCompletedSectionByFormat customLists advancedScoring advancedScoringEnabled theme}
|
|
358
|
-
mangaList{sectionOrder splitCompletedSectionByFormat customLists advancedScoring advancedScoringEnabled theme}
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
}`,{...t},n)).UpdateUser}async function Tw(e,{typeIn:t,resetNotificationCount:n,page:i=1,perPage:r=25}){let o=e.requireAuth(),a=`query($page:Int,$perPage:Int,$type_in:[NotificationType],$resetNotificationCount:Boolean){
|
|
361
|
+
}`,{id:i.id,threadId:t,parentCommentId:i.parentCommentId,comment:n},r)).SaveThreadComment}async function Uw(e,t){let n=e.requireAuth(),r=await e.gql.request("mutation($id:Int){DeleteThread(id:$id){deleted}}",{id:t},n);if(!r.DeleteThread?.deleted)throw new Re({code:"not_found",message:"AniList reported this thread as not deleted \u2014 it may not exist or you may not own it."});return r.DeleteThread}async function Fw(e,t){let n=e.requireAuth(),r=await e.gql.request("mutation($id:Int){DeleteThreadComment(id:$id){deleted}}",{id:t},n);if(!r.DeleteThreadComment?.deleted)throw new Re({code:"not_found",message:"AniList reported this comment as not deleted \u2014 it may not exist or you may not own it."});return r.DeleteThreadComment}var bP=l.object({id:oe,title:l.string().nullish(),siteUrl:l.httpUrl().nullish(),replyCount:l.int().nonnegative().nullish(),viewCount:l.int().nonnegative().nullish(),likeCount:l.int().nonnegative().nullish(),isLiked:l.boolean().nullish()}).loose(),SP=l.object({id:oe,comment:l.string().nullish(),siteUrl:l.httpUrl().nullish(),likeCount:l.int().nonnegative().nullish(),isLiked:l.boolean().nullish()}).loose(),$P=l.object({id:oe,title:l.string().nullish(),body:l.string().nullish(),siteUrl:l.httpUrl().nullish(),replyCommentId:oe.nullish(),isSticky:l.boolean().nullish(),isLocked:l.boolean().nullish(),replyCount:l.int().nonnegative().nullish(),viewCount:l.int().nonnegative().nullish(),likeCount:l.int().nonnegative().nullish(),isLiked:l.boolean().nullish(),user:l.object({id:oe,name:l.string().nullish()}).loose().nullish(),categories:l.array(l.object({id:oe,name:l.string().nullish()}).loose()).nullish(),mediaCategories:l.array(l.object({id:oe,title:l.object({romaji:l.string().nullish(),english:l.string().nullish()}).nullish()}).loose()).nullish()}).loose(),wP=l.object({id:oe,comment:l.string().nullish(),siteUrl:l.httpUrl().nullish(),likeCount:l.int().nonnegative().nullish(),isLiked:l.boolean().nullish(),user:l.object({id:oe,name:l.string().nullish()}).loose().nullish(),childComments:l.json().nullish()}).loose();function Vw(e,t){e.registerTool("get_thread",{title:"Get a forum thread",description:"Get an AniList forum thread's title, body and metadata (including `replyCount`, `viewCount`, `likeCount`, `isLiked`) by its ID.",inputSchema:l.object({id:$i.describe("AniList thread ID \u2014 use search_thread to find one, or pass one already known (e.g. from an AniList forum URL, anilist.co/forum/thread/<id>).")}),outputSchema:l.object({thread:$P}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({id:n})=>le(async()=>ce({thread:await Lw(t.ctx(),n)}))),e.registerTool("get_thread_comments",{title:"Get comments on a forum thread",description:"List top-level comments posted on an AniList forum thread, by the thread's ID. Replies (posted via post_thread_comment's `parentCommentId`) are nested under their parent's `childComments` rather than appearing as separate entries in this list.",inputSchema:l.object({threadId:$i.describe("AniList thread ID \u2014 use search_thread to find one, or pass one already known (e.g. from an AniList forum URL, or from get_thread)."),...qe(25)}),outputSchema:l.object({comments:l.object({pageInfo:He.optional(),threadComments:l.array(wP).optional()}).loose()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({threadId:n,page:i,perPage:r})=>le(async()=>ce({comments:await qw(t.ctx(),n,i,r)}))),e.registerTool("post_thread",{title:"Post a forum thread",description:"[Requires login] Post a new forum thread to the authenticated user's own AniList account, or update an existing one by passing its `id`. Use search_thread first if you want to check whether a similar thread already exists before posting a new one. Note: this tool's own response doesn't include `categories`/`mediaCategories`/`isSticky`/`isLocked` \u2014 call get_thread with the returned `id` afterward to confirm whether a category/sticky/locked change actually applied, especially since sticky/locked can silently no-op and categories/mediaCategories can silently drop existing values (see those fields' own descriptions below).",inputSchema:l.object({title:l.string().min(6).max(120).optional().describe("Thread title (per AniList's own schema: 6-120 characters) \u2014 REQUIRED when creating a new thread, optional when updating one via `id` (confirmed live: omitting it on an update leaves the existing title unchanged, it isn't cleared)."),body:l.string().min(1).max(3e4).optional().describe("Thread body (markdown; per AniList's own schema, up to 30000 characters) \u2014 REQUIRED when creating a new thread, optional when updating one via `id` (confirmed live: omitting it on an update leaves the existing body unchanged)."),categories:l.array(Gu).optional().describe("Forum category IDs to post this thread under \u2014 REQUIRED when creating a new thread (AniList rejects the mutation otherwise), optional when updating one via `id`. When updating and you DO set this, it's a full replace, not a merge \u2014 confirmed live: an existing thread with categories [A] updated with just [B] ended up with [B] only, A silently dropped. Fetch the thread's current categories first (get_thread) and include every one you want to keep. Not independently listable by any tool; resolve one from a thread you've already read (get_thread's/search_thread's `categories` field) or from a forum URL like anilist.co/forum/recent?category=<id>."),mediaCategories:l.array(Qe).optional().describe("AniList anime/manga IDs to tag this thread with, for threads about a specific title (from search_media/get_media). Optional on both create and update. When updating and you DO set this, it's a full replace, not a merge \u2014 confirmed live: an existing thread tagged with [A] updated with just [B] ended up with [B] only, A silently dropped (same behavior as `categories` above). Fetch the thread's current `mediaCategories` first (get_thread) if you need to keep an existing tag alongside a new one."),sticky:l.boolean().optional().describe("Pin this thread (only takes effect if you have moderator permission \u2014 confirmed live that a non-mod account's own thread silently stays unpinned)."),locked:l.boolean().optional().describe("Lock this thread to prevent further replies (only takes effect if you have moderator permission \u2014 confirmed live that a non-mod account's own thread silently stays unlocked)."),id:$i.optional().describe("Thread ID to update instead of creating a new one.")}).refine(n=>n.id!==void 0||n.title!==void 0,{message:"`title` is required when creating a new thread (no `id` given)."}).refine(n=>n.id!==void 0||n.body!==void 0,{message:"`body` is required when creating a new thread (no `id` given)."}).refine(n=>n.id!==void 0||n.categories!==void 0,{message:"`categories` is required when creating a new thread (no `id` given)."}),outputSchema:l.object({thread:bP}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},({title:n,body:i,categories:r,mediaCategories:o,sticky:a,locked:s,id:c})=>le(async()=>ce({thread:await Mw(t.ctx(),n,i,{id:c,categories:r,mediaCategories:o,sticky:a,locked:s})}))),e.registerTool("post_thread_comment",{title:"Post a comment on a forum thread",description:"[Requires login] Post a new comment on an AniList forum thread from the authenticated user's account, or update an existing one by passing its `id`.",inputSchema:l.object({threadId:$i.describe("AniList thread ID to comment on (from get_thread/search_thread)."),comment:l.string().min(1).max(12e3).describe("The comment text to post (markdown; per AniList's own schema, up to 12000 characters)."),parentCommentId:Ju.optional().describe("Reply to this specific comment instead of posting top-level (from get_thread_comments). The reply then appears nested under that comment's `childComments` in get_thread_comments, not as a new top-level entry. Not the comment being edited \u2014 that's `id`."),id:Ju.optional().describe("Comment ID to update instead of creating a new one. Not the comment you're replying to \u2014 that's `parentCommentId`.")}),outputSchema:l.object({comment:SP}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},({threadId:n,comment:i,parentCommentId:r,id:o})=>le(async()=>ce({comment:await Dw(t.ctx(),n,i,{id:o,parentCommentId:r})}))),e.registerTool("delete_thread",{title:"Delete a forum thread",description:"[Requires login] Delete a forum thread the authenticated user owns, by its ID (from search_thread, get_thread, or the id returned by post_thread). This cannot be undone, and calling it again on an already-deleted id errors rather than silently succeeding.",inputSchema:l.object({id:$i.describe("AniList thread ID to delete.")}),outputSchema:l.object({result:un}),annotations:ln},({id:n})=>le(async()=>ce({result:await Uw(t.ctx(),n)}))),e.registerTool("delete_thread_comment",{title:"Delete a comment on a forum thread",description:"[Requires login] Delete a comment the authenticated user owns, by its ID (from get_thread_comments or the id returned by post_thread_comment). This cannot be undone, and calling it again on an already-deleted id errors rather than silently succeeding.",inputSchema:l.object({id:Ju.describe("AniList comment ID to delete.")}),outputSchema:l.object({result:un}),annotations:ln},({id:n})=>le(async()=>ce({result:await Fw(t.ctx(),n)})))}async function Zw(e,{typeIn:t,resetNotificationCount:n,page:i=1,perPage:r=25}){let o=e.requireAuth(),a=`query($page:Int,$perPage:Int,$type_in:[NotificationType],$resetNotificationCount:Boolean){
|
|
362
362
|
Page(page:$page,perPage:$perPage){
|
|
363
363
|
pageInfo { hasNextPage }
|
|
364
|
-
notifications(type_in:$type_in,resetNotificationCount:$resetNotificationCount){${
|
|
364
|
+
notifications(type_in:$type_in,resetNotificationCount:$resetNotificationCount){${k$}}
|
|
365
365
|
}
|
|
366
|
-
}`;return(await e.gql.request(a,{page:i,perPage:r,type_in:t,resetNotificationCount:n},o,{skipCache:!0})).Page}var xr=["ACTIVITY_MESSAGE","ACTIVITY_REPLY","FOLLOWING","ACTIVITY_MENTION","THREAD_COMMENT_MENTION","THREAD_SUBSCRIBED","THREAD_COMMENT_REPLY","AIRING","ACTIVITY_LIKE","ACTIVITY_REPLY_LIKE","THREAD_LIKE","THREAD_COMMENT_LIKE","ACTIVITY_REPLY_SUBSCRIBED","RELATED_MEDIA_ADDITION","MEDIA_DATA_CHANGE","MEDIA_MERGE","MEDIA_DELETION","MEDIA_SUBMISSION_UPDATE","STAFF_SUBMISSION_UPDATE","CHARACTER_SUBMISSION_UPDATE"];function Ew(e,t){e.registerTool("get_notifications",{title:"Get your AniList notifications",description:"[Requires login] Get the authenticated user's AniList notifications: new episodes airing, activity likes/replies/mentions, new followers, thread replies/likes, and media/staff/character data-submission updates. Every item has `id`, `type` and a human-readable `context`/`contexts` string; the rest of the fields depend on `type` (e.g. an AIRING item includes `media`/`episode`, a FOLLOWING item includes `user`, an ACTIVITY_MESSAGE item includes `message.message` \u2014 the actual DM text is nested one level inside `message`).",inputSchema:c.object({type_in:c.array(c.enum(xr)).optional().describe("Restrict to these notification types. Omit to get every type. This only filters what's returned here \u2014 whether a type is generated at all is controlled separately by the account's own notificationOptions (update_user); a type disabled there simply never appears, regardless of this filter."),markAsRead:c.boolean().default(!1).describe("Set true to also reset AniList's unread-notification badge count to 0, as a side effect of this call (the same effect as opening the notifications page on the site). Defaults to false so a routine check doesn't clear the badge."),...qe(25)}),outputSchema:c.object({results:c.object({pageInfo:c.object({hasNextPage:c.boolean().nullish()}).passthrough().optional().describe("Whether another page exists \u2014 this query only ever requests hasNextPage, not total/currentPage/lastPage (unlike some sibling paginated tools)."),notifications:c.array(Qt).optional()}).passthrough()}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},({type_in:n,markAsRead:i,page:r,perPage:o})=>ce(async()=>se({results:await Tw(t.ctx(),{typeIn:n,resetNotificationCount:i,page:r,perPage:o})})))}var iP=["ROMAJI","ENGLISH","NATIVE","ROMAJI_STYLISED","ENGLISH_STYLISED","NATIVE_STYLISED"],oP=["POINT_100","POINT_10_DECIMAL","POINT_10","POINT_5","POINT_3"],aP=["ROMAJI_WESTERN","ROMAJI","NATIVE"],Pw=c.object({sectionOrder:c.array(c.string()).optional().describe("Custom list-status section order."),splitCompletedSectionByFormat:c.boolean().optional().describe("Split the Completed section by format (TV/Movie/etc.)."),customLists:c.array(c.string()).optional().describe("Names of this account's custom lists \u2014 REPLACES the entire array, not merged by name: any existing list name you omit here is silently deleted (confirmed live), even though sibling fields like advancedScoring/sectionOrder and the other list type (mangaList) are left untouched. Fetch the current array first (get_authorized_user's mediaListOptions.animeList/mangaList.customLists) and include every name you want to keep, not just the one you're adding."),advancedScoring:c.array(c.string()).optional().describe("Advanced-scoring category names (e.g. Story, Characters, Visuals) \u2014 ordered, and the order is load-bearing: every list entry's per-category `advancedScores` is stored as a plain positional array, matched against THIS list at read time, not by name. Renaming or reordering categories here silently reinterprets every already-scored entry's stored values under the new names/positions \u2014 e.g. a score the user gave for 'Story' can start reading as their 'Characters' score, with no error and no way to detect it happened after the fact. Fetch the current order first (get_authorized_user's `mediaListOptions.animeList/mangaList.advancedScoring`) so you know the existing positions before changing anything. Only add new categories at the end, or rename in place (same position) \u2014 never reorder an account that already has scored entries."),advancedScoringEnabled:c.boolean().optional().describe("Whether advanced (per-category) scoring is enabled for this list type."),theme:c.string().optional().describe("List-page color theme name. AniList itself marks this field experimental ('not yet fully implemented, may change without warning') \u2014 its read-back shape (see get_user_profile/get_full_user_info/get_authorized_user/update_user's own response) is an untyped value, not guaranteed to be the string you set.")}).optional(),xw=c.object({sectionOrder:c.array(c.string()).nullish(),splitCompletedSectionByFormat:c.boolean().nullish(),customLists:c.array(c.string()).nullish(),advancedScoring:c.array(c.string()).nullish(),advancedScoringEnabled:c.boolean().nullish(),theme:c.unknown().nullish()}).passthrough(),sP=c.object({type:c.string().nullish(),enabled:c.boolean().nullish()}).passthrough(),cP=c.object({type:c.string().nullish(),disabled:c.boolean().nullish()}).passthrough(),gv={options:c.object({titleLanguage:c.string().nullish(),displayAdultContent:c.boolean().nullish(),airingNotifications:c.boolean().nullish(),profileColor:c.string().nullish(),timezone:c.string().nullish(),activityMergeTime:c.number().int().nullish(),staffNameLanguage:c.string().nullish(),restrictMessagesToFollowing:c.boolean().nullish(),notificationOptions:c.array(sP).nullish(),disabledListActivity:c.array(cP).nullish()}).passthrough().nullish(),mediaListOptions:c.object({scoreFormat:c.string().nullish(),rowOrder:c.string().nullish(),animeList:xw.nullish(),mangaList:xw.nullish()}).passthrough().nullish()},jw=c.object({id:c.number().int(),name:c.string().nullish(),about:c.string().nullish(),avatar:c.object({large:c.string().nullish()}).nullish(),bannerImage:c.string().nullish(),siteUrl:c.string().nullish(),donatorTier:c.number().int().nullish(),donatorBadge:c.string().nullish(),isFollowing:c.boolean().nullish(),isFollower:c.boolean().nullish(),...gv}).passthrough(),Aw=c.object({count:c.number().int().nullish(),meanScore:c.number().nullish(),minutesWatched:c.number().int().nullish(),episodesWatched:c.number().int().nullish()}).passthrough(),Ow=c.object({count:c.number().int().nullish(),meanScore:c.number().nullish(),chaptersRead:c.number().int().nullish(),volumesRead:c.number().int().nullish()}).passthrough(),lP=c.object({statistics:c.object({anime:Aw.nullish(),manga:Ow.nullish()}).passthrough().nullish()}).passthrough(),uP=c.object({id:c.number().int(),name:c.string().nullish(),about:c.string().nullish(),avatar:c.object({large:c.string().nullish()}).nullish(),bannerImage:c.string().nullish(),siteUrl:c.string().nullish(),donatorTier:c.number().int().nullish(),donatorBadge:c.string().nullish(),isFollowing:c.boolean().nullish(),isFollower:c.boolean().nullish(),...gv,statistics:c.object({anime:Aw.nullish(),manga:Ow.nullish()}).passthrough().nullish()}).passthrough(),dP=c.object({id:c.number().int(),name:c.string().nullish(),isFollowing:c.boolean().nullish()}).passthrough(),mP=c.object({id:c.number().int(),name:c.string().nullish(),about:c.string().nullish(),donatorBadge:c.string().nullish(),...gv}).passthrough();function Nw(e,t){e.registerTool("get_user_profile",{title:"Get a user's profile",description:"Get an AniList user's public profile: name, about text, avatar, donator status \u2014 plus their account settings (title/name-language preferences, notification toggles, list display options). Confirmed live these settings are NOT viewer-gated, so they're included for any user, not just the authenticated caller. Accepts an exact AniList username directly \u2014 no need to call search_user first unless you only have a partial/fuzzy name and need to look up the exact one. Need statistics too? Use get_full_user_info instead of also calling get_user_stats separately.",inputSchema:c.object({user:At}),outputSchema:c.object({profile:jw}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({user:n})=>ce(async()=>se({profile:await $w(t.ctx(),n)}))),e.registerTool("get_user_stats",{title:"Get a user's statistics",description:"Get an AniList user's anime/manga statistics: counts, mean score, time watched, episodes/chapters/volumes consumed. Accepts an exact AniList username directly \u2014 no need to call search_user first unless you only have a partial/fuzzy name. AniList's own stats aggregation can lag behind the account's real list \u2014 confirmed live, an account with real scored/progressed entries still read back all-zero statistics \u2014 so don't treat a zeroed result as 'this account has no list activity' without cross-checking get_user_list. Need the profile too? Use get_full_user_info instead of also calling get_user_profile separately.",inputSchema:c.object({user:At}),outputSchema:c.object({stats:lP}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({user:n})=>ce(async()=>se({stats:await ww(t.ctx(),n)}))),e.registerTool("get_full_user_info",{title:"Get a user's complete profile and stats",description:"Get an AniList user's profile AND statistics in a single call \u2014 use this instead of calling get_user_profile and get_user_stats separately. Like get_user_profile, this also returns the target's account settings (notifications, list display, etc.) regardless of who's authenticated \u2014 AniList doesn't viewer-gate those fields. Accepts an exact AniList username directly \u2014 no need to call search_user first unless you only have a partial/fuzzy name. Its embedded statistics carry the same staleness caveat as get_user_stats: AniList's own aggregation can lag and read all-zero even for an account with real list entries.",inputSchema:c.object({user:At}),outputSchema:c.object({user:uP}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({user:n})=>ce(async()=>se({user:await zw(t.ctx(),n)}))),e.registerTool("get_user_recent_activity",{title:"Get a user's most recent activity",description:"Get an AniList user's 5 most recent activity posts, with full content (not just IDs) \u2014 a fixed count, not configurable; use get_user_activity for a paginated full feed instead. Accepts an exact AniList username directly \u2014 no need to call search_user first unless you only have a partial/fuzzy name (username resolution costs one extra internal lookup either way).",inputSchema:c.object({user:At.describe("AniList user ID, or username. Unlike search_activity's own `user` filter, both an unknown numeric ID and an unknown username error here rather than silently returning an empty feed.")}),outputSchema:c.object({activity:c.object({pageInfo:He.optional(),activities:c.array(Si).optional()}).passthrough()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({user:n})=>ce(async()=>se({activity:await Uu(t.ctx(),n,1,5)}))),e.registerTool("get_authorized_user",{title:"Get the logged-in user's profile",description:"[Requires login] Get the profile of the AniList account currently authorized via login_anilist/ANILIST_ACCESS_TOKEN \u2014 use this to confirm which account is connected. Also the authoritative source to fetch BEFORE an update_user call touching `options.notificationOptions`/`options.disabledListActivity` (confirmed live: full array replace, not merge by entry) or `mediaListOptions.animeList/mangaList.customLists` (confirmed live: same full-replace behavior) \u2014 read the current values here first and resend them in full alongside your changes. The sibling `advancedScoring` array carries a related but distinct risk instead: it's positional, not name-matched, so reordering/renaming its entries silently reinterprets already-scored list entries (see update_user's own `advancedScoring` field for detail) \u2014 fetch it here first too before changing it.",inputSchema:c.object({}),outputSchema:c.object({user:jw}),annotations:{readOnlyHint:!0,openWorldHint:!0}},()=>ce(async()=>se({user:await Iw(t.ctx())}))),e.registerTool("toggle_follow_user",{title:"Follow/unfollow a user",description:"[Requires login] Toggle following another AniList user from the authenticated user's account. Calling it again on the same user unfollows them.",inputSchema:c.object({id:_e.describe("AniList numeric user ID to follow/unfollow \u2014 this mutation has no username form; resolve one via search_user or get_user_profile first.")}),outputSchema:c.object({user:dP}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},({id:n})=>ce(async()=>se({user:await Rw(t.ctx(),n)}))),e.registerTool("update_user",{title:"Update your AniList account settings",description:"[Requires login] Update settings on the authenticated user's own AniList account (about text, preferred title language, adult-content visibility, score format, notification/messaging preferences, anime/manga list options). Only set the fields you want to change \u2014 most fields are a true partial update (see `notificationOptions`/`disabledListActivity` below for two confirmed exceptions, PLUS `animeListOptions`/`mangaListOptions`'s nested `customLists` \u2014 a third: that one field's ARRAY VALUE is a full replace even though its sibling fields and the other list type merge normally).",inputSchema:c.object({about:c.string().optional().describe("New profile 'about' text."),titleLanguage:c.enum(iP).optional().describe("Preferred title display language."),displayAdultContent:c.boolean().optional().describe("Whether to show adult content in search/browse."),airingNotifications:c.boolean().optional().describe("Whether to notify about new episode airings for anime on your list."),scoreFormat:c.enum(oP).optional().describe("Preferred list score format (affects how scores DISPLAY on anilist.co only \u2014 add_list_entry/update_list_entry's `score` parameter always stays on a 0-10 scale regardless of this setting, so no conversion is needed on your end)."),rowOrder:c.string().optional().describe('Internal list-table row ordering key \u2014 reads back from `mediaListOptions.rowOrder` in the profile tools/this tool\'s own response. Confirmed live: AniList validates this server-side and rejects an unrecognized value with a clear error ("The selected row order is invalid.") rather than silently ignoring it \u2014 unlike `profileColor` below.'),profileColor:c.string().optional().describe("Profile accent color (name or hex). Confirmed live: AniList silently ignores an unrecognized value instead of erroring \u2014 the account's existing color is left unchanged, with no error surfaced and no way to detect the value was rejected other than re-checking with get_authorized_user."),donatorBadge:c.string().max(24).optional().describe("Custom donator badge text, up to 24 characters per AniList's own schema (only takes effect on a donator account)."),notificationOptions:c.array(c.object({type:c.enum(xr).describe("Notification type to configure."),enabled:c.boolean().optional().describe(`Whether this notification type is on. Optional per entry, but not really \u2014 omitting it doesn't error and doesn't inherit the previous value either; confirmed live it's written as \`enabled: null\`, effectively unsetting the type. Always pass an explicit true/false for every one of the ${xr.length} types.`)})).refine(n=>n.length===xr.length&&new Set(n.map(i=>i.type)).size===xr.length,`Must include every one of the ${xr.length} notification types exactly once.`).optional().describe(`ALL ${xr.length} notification types, every time \u2014 confirmed live this is a full replace, not a partial merge: AniList silently drops every type you don't list (not just resets it to default, removes it) with no error. Fetch the account's current list first (get_authorized_user's \`options.notificationOptions\`) and resend it in full with just your changes applied.`),timezone:c.string().regex(/^-?\d{2}:\d{2}$/,`Must be a timezone offset in AniList's own documented "-?HH:MM" format, e.g. "09:00" or "-05:00".`).optional().describe(`Display timezone as an offset, in AniList's own documented "-?HH:MM" format (e.g. "09:00", "-05:00"). Confirmed live that AniList validates this server-side and rejects a malformed value with a clear error ("The timezone format is invalid.") \u2014 whether a leading "+" is also accepted wasn't tested live (this tool has no way to explicitly clear timezone back to unset, so a wrong guess here risked an unrevertable change); this regex follows AniList's own literal grammar, which mentions only an optional leading minus.`),activityMergeTime:c.number().int().min(0).optional().describe("Minutes within which consecutive list activity posts get merged into one. Per AniList's own schema: 0 = never merge, 20160+ (2 weeks) = always merge."),staffNameLanguage:c.enum(aP).optional().describe("Preferred staff/character name display language."),restrictMessagesToFollowing:c.boolean().optional().describe("Only allow message activity from users you follow."),disabledListActivity:c.array(c.object({type:c.enum(Dt).describe("List status this toggle applies to."),disabled:c.boolean().optional().describe(`Whether posting activity for this status is suppressed. Optional in the schema, but NOT safe to omit: confirmed live, leaving it out on even one of the ${Dt.length} statuses makes the whole call fail with a 500 Internal Server Error on AniList's side (not a clean validation error, and not this server's bug) \u2014 always pass an explicit true/false for every status.`)})).refine(n=>n.length===Dt.length&&new Set(n.map(i=>i.type)).size===Dt.length,`Must include every one of the ${Dt.length} list statuses exactly once \u2014 AniList rejects a partial list.`).optional().describe(`ALL ${Dt.length} list statuses, every time \u2014 confirmed live: AniList rejects this with a 400 error if any status is missing ("Incorrect number of disabled list activity options"), it's not a partial per-status update. Fetch the current list first (get_authorized_user's \`options.disabledListActivity\`) and resend it in full with just your changes applied.`),animeListOptions:Pw.describe("New anime-list display/scoring options \u2014 only the fields you set are changed (confirmed live: this is a partial merge, unlike add_list_entry's advancedScores)."),mangaListOptions:Pw.describe("New manga-list display/scoring options \u2014 same partial-merge behavior as `animeListOptions` above.")}),outputSchema:c.object({user:mP}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!0}},n=>ce(async()=>se({user:await kw(t.ctx(),n)})))}function Cw(e,t){e.registerTool("login_anilist",{title:"Log in to AniList",description:"Authorize the personal-list and social tools with your AniList account (one-time). Prerequisite: register an app at anilist.co/settings/developer with Redirect URL set to this server's localhost callback, and set ANILIST_CLIENT_ID + ANILIST_CLIENT_SECRET in the server env. Calling this returns an authorization URL: open it, log in, and click Approve. If your browser genuinely runs on the same machine as this server, login then completes automatically; otherwise copy the URL you land on and pass it to submit_anilist_redirect. `auto_capture` in the response is NOT a reliable detector of that \u2014 it only reflects whether this server process could bind its own localhost listener, which typically succeeds even when the server runs remotely (SSH/headless) and the browser can never reach it; you (or the user) know the actual machine layout, the response doesn't.",inputSchema:c.object({}),outputSchema:c.object({authorize_url:c.string(),redirect_uri:c.string(),auto_capture:c.boolean().describe("Whether this server process could bind a local callback listener \u2014 NOT whether the browser opening authorize_url is actually on the same machine. A remote/SSH server can still bind its own loopback port successfully and read `true` here even though that browser's redirect can never reach it."),instructions:c.string()}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},()=>ce(async()=>{if(!t.canLogin())return ha("ANILIST_CLIENT_ID and ANILIST_CLIENT_SECRET must both be set to log in. Register an app at anilist.co/settings/developer first.");let{authorizeUrl:n,redirectUri:i,listening:r}=await t.startLogin();return se({authorize_url:n,redirect_uri:i,auto_capture:r,instructions:r?"Open authorize_url, log in and click Approve. If your browser is on the same machine as this server, login completes automatically \u2014 call get_authorized_user to confirm. If the server is actually remote (SSH/headless) despite this server being able to bind its own local port, copy the URL you're redirected to instead and pass it to submit_anilist_redirect.":"Open authorize_url, log in and click Approve, then copy the URL you're redirected to and pass it to submit_anilist_redirect."})})),e.registerTool("submit_anilist_redirect",{title:"Complete AniList login with a pasted redirect URL",description:"Complete a login started with login_anilist by submitting the URL your browser was redirected to after clicking Approve (the one containing ?code=...). Use this when login didn't complete automatically \u2014 e.g. the server runs on a remote/headless host. A bare code string is also accepted.",inputSchema:c.object({redirect_url:c.string().min(1).describe("The full redirected URL (contains ?code=...), or just the code value.")}),outputSchema:c.object({success:c.boolean()}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},({redirect_url:n})=>ce(async()=>(await t.submitRedirect(n),se({success:!0}))))}function Lw(e){e.registerPrompt("recommend_similar",{title:"Recommend similar anime/manga",description:"Plan a recommendation search for anime or manga similar to a given title, using AniList's own recommendation data rather than the model's own knowledge.",argsSchema:{title:c.string().min(1).describe("An anime or manga title the user liked."),type:c.enum(["ANIME","MANGA"]).describe("Whether the title is anime or manga. Defaults to ANIME.").optional()}},({title:t,type:n})=>{let i=n??"ANIME";return{messages:[{role:"user",content:{type:"text",text:`Recommend ${i==="ANIME"?"anime":"manga"} similar to "${t}".
|
|
367
|
-
Steps: call search_media with type: "${i}" to resolve it to an AniList id, then get_recommendations_for_media with that id as \`mediaId\` (not \`id\` \u2014 that's the param name for the different get_recommendation tool). Present 5-8 recommendations with a one-line reason each, noting AniList's average score and genres.`}}]}}),e.registerPrompt("seasonal_overview",{title:"Seasonal anime overview",description:"Summarize the notable anime airing in a given season (or the current one).",argsSchema:{season:
|
|
368
|
-
Call search_media with type: "ANIME", ${o}, then group the results into highlights (highest average score / most popular) and notable genres. Keep it concise.`}}]}}),e.registerPrompt("hidden_gems",{title:"Find hidden gems",description:"Surface highly-rated anime or manga that aren't widely known \u2014 high average score, low popularity.",argsSchema:{type:
|
|
369
|
-
Call search_media with type: "${i}"`+(n?`, genres: ["${n}"]`:"")+" and perPage: 25, then pick the entries whose averageScore is high but whose popularity is much lower than that score would suggest \u2014 those are the underseen ones. Present 5-8 picks with title, averageScore, popularity, and a one-line reason each noting why it's underrated."}}]}}),e.registerPrompt("catch_up_activity",{title:"Catch up on a user's AniList activity",description:"Summarize a user's recent AniList activity feed alongside their current in-progress anime AND manga lists.",argsSchema:{user:
|
|
370
|
-
Call get_user_activity for their recent activity posts (list updates, text posts), and get_user_list with type: "ANIME" and again with type: "MANGA" for their CURRENT (watching/reading) status groups. Combine all of that into a short digest: what they've recently updated, what they're currently watching/reading and how far along, and any notable text posts. Omit a list from the digest if it has no CURRENT entries.`}}]})),e.registerPrompt("check_notifications",{title:"Check your AniList notifications",description:"[Requires login] Summarize the authenticated user's recent AniList notifications (airing episodes, activity likes/replies/mentions, new followers, thread activity).",argsSchema:{markAsRead:
|
|
371
|
-
Call get_notifications`+(t==="true"?" with markAsRead: true":"")+". Group the results by what they're about (airing episodes, activity likes/replies/mentions, new followers, thread activity, etc.) and present a short digest, most recent first. If get_notifications reports no token is configured, tell the user to run login_anilist first instead of guessing."}}]}))}var
|
|
366
|
+
}`;return(await e.gql.request(a,{page:i,perPage:r,type_in:t,resetNotificationCount:n},o,{skipCache:!0})).Page}var Ar=["ACTIVITY_MESSAGE","ACTIVITY_REPLY","FOLLOWING","ACTIVITY_MENTION","THREAD_COMMENT_MENTION","THREAD_SUBSCRIBED","THREAD_COMMENT_REPLY","AIRING","ACTIVITY_LIKE","ACTIVITY_REPLY_LIKE","THREAD_LIKE","THREAD_COMMENT_LIKE","ACTIVITY_REPLY_SUBSCRIBED","RELATED_MEDIA_ADDITION","MEDIA_DATA_CHANGE","MEDIA_MERGE","MEDIA_DELETION","MEDIA_SUBMISSION_UPDATE","STAFF_SUBMISSION_UPDATE","CHARACTER_SUBMISSION_UPDATE"];function Hw(e,t){e.registerTool("get_notifications",{title:"Get your AniList notifications",description:"[Requires login] Get the authenticated user's AniList notifications: new episodes airing, activity likes/replies/mentions, new followers, thread replies/likes, and media/staff/character data-submission updates. Every item has `id`, `type` and a human-readable `context`/`contexts` string; the rest of the fields depend on `type` (e.g. an AIRING item includes `media`/`episode`, a FOLLOWING item includes `user`, an ACTIVITY_MESSAGE item includes `message.message` \u2014 the actual DM text is nested one level inside `message`).",inputSchema:l.object({type_in:l.array(l.enum(Ar)).optional().describe("Restrict to these notification types. Omit to get every type. This only filters what's returned here \u2014 whether a type is generated at all is controlled separately by the account's own notificationOptions (update_user); a type disabled there simply never appears, regardless of this filter."),markAsRead:l.boolean().default(!1).describe("Set true to also reset AniList's unread-notification badge count to 0, as a side effect of this call (the same effect as opening the notifications page on the site). Defaults to false so a routine check doesn't clear the badge."),...qe(25)}),outputSchema:l.object({results:l.object({pageInfo:l.object({hasNextPage:l.boolean().nullish()}).loose().optional().describe("Whether another page exists \u2014 this query only ever requests hasNextPage, not total/currentPage/lastPage (unlike some sibling paginated tools)."),notifications:l.array(er).optional()}).loose()}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},({type_in:n,markAsRead:i,page:r,perPage:o})=>le(async()=>ce({results:await Zw(t.ctx(),{typeIn:n,resetNotificationCount:i,page:r,perPage:o})})))}var IP=["ROMAJI","ENGLISH","NATIVE","ROMAJI_STYLISED","ENGLISH_STYLISED","NATIVE_STYLISED"],RP=["POINT_100","POINT_10_DECIMAL","POINT_10","POINT_5","POINT_3"],kP=["ROMAJI_WESTERN","ROMAJI","NATIVE"],Jw=l.object({sectionOrder:l.array(l.string()).optional().describe("Custom list-status section order."),splitCompletedSectionByFormat:l.boolean().optional().describe("Split the Completed section by format (TV/Movie/etc.)."),customLists:l.array(l.string()).optional().describe("Names of this account's custom lists \u2014 REPLACES the entire array, not merged by name: any existing list name you omit here is silently deleted (confirmed live), even though sibling fields like advancedScoring/sectionOrder and the other list type (mangaList) are left untouched. Fetch the current array first (get_authorized_user's mediaListOptions.animeList/mangaList.customLists) and include every name you want to keep, not just the one you're adding."),advancedScoring:l.array(l.string()).optional().describe("Advanced-scoring category names (e.g. Story, Characters, Visuals) \u2014 ordered, and the order is load-bearing: every list entry's per-category `advancedScores` is stored as a plain positional array, matched against THIS list at read time, not by name. Renaming or reordering categories here silently reinterprets every already-scored entry's stored values under the new names/positions \u2014 e.g. a score the user gave for 'Story' can start reading as their 'Characters' score, with no error and no way to detect it happened after the fact. Fetch the current order first (get_authorized_user's `mediaListOptions.animeList/mangaList.advancedScoring`) so you know the existing positions before changing anything. Only add new categories at the end, or rename in place (same position) \u2014 never reorder an account that already has scored entries."),advancedScoringEnabled:l.boolean().optional().describe("Whether advanced (per-category) scoring is enabled for this list type."),theme:l.string().optional().describe("List-page color theme name. AniList itself marks this field experimental ('not yet fully implemented, may change without warning') \u2014 its read-back shape (see get_user_profile/get_full_user_info/get_authorized_user/update_user's own response) is an untyped value, not guaranteed to be the string you set.")}).optional(),Gw=l.object({sectionOrder:l.array(l.string()).nullish(),splitCompletedSectionByFormat:l.boolean().nullish(),customLists:l.array(l.string()).nullish(),advancedScoring:l.array(l.string()).nullish(),advancedScoringEnabled:l.boolean().nullish(),theme:l.json().nullish()}).loose(),TP=l.object({type:l.string().nullish(),enabled:l.boolean().nullish()}).loose(),EP=l.object({type:l.string().nullish(),disabled:l.boolean().nullish()}).loose(),Rv={options:l.object({titleLanguage:l.string().nullish(),displayAdultContent:l.boolean().nullish(),airingNotifications:l.boolean().nullish(),profileColor:l.string().nullish(),timezone:l.string().nullish(),activityMergeTime:l.int().nonnegative().nullish(),staffNameLanguage:l.string().nullish(),restrictMessagesToFollowing:l.boolean().nullish(),notificationOptions:l.array(TP).nullish(),disabledListActivity:l.array(EP).nullish()}).loose().nullish(),mediaListOptions:l.object({scoreFormat:l.string().nullish(),rowOrder:l.string().nullish(),animeList:Gw.nullish(),mangaList:Gw.nullish()}).loose().nullish()},kv=l.string().nullish().describe(`AniList returns "Donator" here even for a non-donator (donatorTier 0); it's an upstream default label, not proof the user donates. A user's donatorTier (0 = non-donator) is the real signal.`),Bw=l.object({id:oe,name:l.string().nullish(),about:l.string().nullish(),avatar:l.object({large:l.httpUrl().nullish()}).nullish(),bannerImage:l.httpUrl().nullish(),siteUrl:l.httpUrl().nullish(),donatorTier:l.int().nonnegative().nullish(),donatorBadge:kv,isFollowing:l.boolean().nullish(),isFollower:l.boolean().nullish(),...Rv}).loose(),Kw=l.object({count:l.int().nonnegative().nullish(),meanScore:l.number().nonnegative().nullish(),minutesWatched:l.int().nonnegative().nullish(),episodesWatched:l.int().nonnegative().nullish()}).loose(),Ww=l.object({count:l.int().nonnegative().nullish(),meanScore:l.number().nonnegative().nullish(),chaptersRead:l.int().nonnegative().nullish(),volumesRead:l.int().nonnegative().nullish()}).loose(),PP=l.object({statistics:l.object({anime:Kw.nullish(),manga:Ww.nullish()}).loose().nullish()}).loose(),xP=l.object({id:oe,name:l.string().nullish(),about:l.string().nullish(),avatar:l.object({large:l.httpUrl().nullish()}).nullish(),bannerImage:l.httpUrl().nullish(),siteUrl:l.httpUrl().nullish(),donatorTier:l.int().nonnegative().nullish(),donatorBadge:kv,isFollowing:l.boolean().nullish(),isFollower:l.boolean().nullish(),...Rv,statistics:l.object({anime:Kw.nullish(),manga:Ww.nullish()}).loose().nullish()}).loose(),jP=l.object({id:oe,name:l.string().nullish(),isFollowing:l.boolean().nullish()}).loose(),AP=l.object({id:oe,name:l.string().nullish(),about:l.string().nullish(),donatorBadge:kv,...Rv}).loose();function Yw(e,t){e.registerTool("get_user_profile",{title:"Get a user's profile",description:"Get an AniList user's public profile: name, about text, avatar, donator status \u2014 plus their account settings (title/name-language preferences, notification toggles, list display options). Confirmed live these settings are NOT viewer-gated, so they're included for any user, not just the authenticated caller. Accepts an exact AniList username directly \u2014 no need to call search_user first unless you only have a partial/fuzzy name and need to look up the exact one. Need statistics too? Use get_full_user_info instead of also calling get_user_stats separately.",inputSchema:l.object({user:Ct}),outputSchema:l.object({profile:Bw}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({user:n})=>le(async()=>ce({profile:await U$(t.ctx(),n)}))),e.registerTool("get_user_stats",{title:"Get a user's statistics",description:"Get an AniList user's anime/manga statistics: counts, mean score, time watched, episodes/chapters/volumes consumed. Accepts an exact AniList username directly \u2014 no need to call search_user first unless you only have a partial/fuzzy name. AniList's own stats aggregation can lag behind the account's real list \u2014 confirmed live, an account with real scored/progressed entries still read back all-zero statistics \u2014 so don't treat a zeroed result as 'this account has no list activity' without cross-checking get_user_list. Need the profile too? Use get_full_user_info instead of also calling get_user_profile separately.",inputSchema:l.object({user:Ct}),outputSchema:l.object({stats:PP}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({user:n})=>le(async()=>ce({stats:await F$(t.ctx(),n)}))),e.registerTool("get_full_user_info",{title:"Get a user's complete profile and stats",description:"Get an AniList user's profile AND statistics in a single call \u2014 use this instead of calling get_user_profile and get_user_stats separately. Like get_user_profile, this also returns the target's account settings (notifications, list display, etc.) regardless of who's authenticated \u2014 AniList doesn't viewer-gate those fields. Accepts an exact AniList username directly \u2014 no need to call search_user first unless you only have a partial/fuzzy name. Its embedded statistics carry the same staleness caveat as get_user_stats: AniList's own aggregation can lag and read all-zero even for an account with real list entries.",inputSchema:l.object({user:Ct}),outputSchema:l.object({user:xP}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({user:n})=>le(async()=>ce({user:await V$(t.ctx(),n)}))),e.registerTool("get_user_recent_activity",{title:"Get a user's most recent activity",description:"Get an AniList user's 5 most recent activity posts, with full content (not just IDs) \u2014 every activity type (list updates, text posts, and message activity they received; the underlying query applies no type filter of its own), a fixed count, not configurable; use get_user_activity for a paginated full feed instead. Accepts an exact AniList username directly \u2014 no need to call search_user first unless you only have a partial/fuzzy name (username resolution costs one extra internal lookup either way).",inputSchema:l.object({user:Ct.describe("AniList user ID, or username. Unlike search_activity's own `user` filter, both an unknown numeric ID and an unknown username error here rather than silently returning an empty feed.")}),outputSchema:l.object({activity:l.object({pageInfo:He.optional(),activities:l.array(wi).optional()}).loose()}),annotations:{readOnlyHint:!0,openWorldHint:!0}},({user:n})=>le(async()=>ce({activity:await Ku(t.ctx(),n,1,5)}))),e.registerTool("get_authorized_user",{title:"Get the logged-in user's profile",description:"[Requires login] Get the profile of the AniList account currently authorized via login_anilist/ANILIST_ACCESS_TOKEN \u2014 use this to confirm which account is connected. Also the authoritative source to fetch BEFORE an update_user call touching `options.notificationOptions`/`options.disabledListActivity` (confirmed live: full array replace, not merge by entry) or `mediaListOptions.animeList/mangaList.customLists` (confirmed live: same full-replace behavior) \u2014 read the current values here first and resend them in full alongside your changes. The sibling `advancedScoring` array carries a related but distinct risk instead: it's positional, not name-matched, so reordering/renaming its entries silently reinterprets already-scored list entries (see update_user's own `advancedScoring` field for detail) \u2014 fetch it here first too before changing it.",inputSchema:l.object({}),outputSchema:l.object({user:Bw}),annotations:{readOnlyHint:!0,openWorldHint:!0}},()=>le(async()=>ce({user:await Z$(t.ctx())}))),e.registerTool("toggle_follow_user",{title:"Follow/unfollow a user",description:"[Requires login] Toggle following another AniList user from the authenticated user's account. Calling it again on the same user unfollows them.",inputSchema:l.object({id:ba.describe("AniList numeric user ID to follow/unfollow \u2014 this mutation has no username form; resolve one via search_user or get_user_profile first.")}),outputSchema:l.object({user:jP}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},({id:n})=>le(async()=>ce({user:await H$(t.ctx(),n)}))),e.registerTool("update_user",{title:"Update your AniList account settings",description:"[Requires login] Update settings on the authenticated user's own AniList account (about text, preferred title language, adult-content visibility, score format, notification/messaging preferences, anime/manga list options). Only set the fields you want to change \u2014 most fields are a true partial update (see `notificationOptions`/`disabledListActivity` below for two confirmed exceptions, PLUS `animeListOptions`/`mangaListOptions`'s nested `customLists` \u2014 a third: that one field's ARRAY VALUE is a full replace even though its sibling fields and the other list type merge normally).",inputSchema:l.object({about:l.string().optional().describe("New profile 'about' text."),titleLanguage:l.enum(IP).optional().describe("Preferred title display language."),displayAdultContent:l.boolean().optional().describe("Whether to show adult content in search/browse."),airingNotifications:l.boolean().optional().describe("Whether to notify about new episode airings for anime on your list."),scoreFormat:l.enum(RP).optional().describe("Preferred list score format (affects how scores DISPLAY on anilist.co only \u2014 add_list_entry/update_list_entry's `score` parameter always stays on a 0-10 scale regardless of this setting, so no conversion is needed on your end)."),rowOrder:l.string().optional().describe('Internal list-table row ordering key \u2014 reads back from `mediaListOptions.rowOrder` in the profile tools/this tool\'s own response. Confirmed live: AniList validates this server-side and rejects an unrecognized value with a clear error ("The selected row order is invalid.") rather than silently ignoring it \u2014 unlike `profileColor` below.'),profileColor:l.string().optional().describe("Profile accent color (name or hex). Confirmed live: AniList silently ignores an unrecognized value instead of erroring \u2014 the account's existing color is left unchanged, with no error surfaced and no way to detect the value was rejected other than re-checking with get_authorized_user."),donatorBadge:l.string().max(24).optional().describe("Custom donator badge text, up to 24 characters per AniList's own schema (only takes effect on a donator account)."),notificationOptions:l.array(l.object({type:l.enum(Ar).describe("Notification type to configure."),enabled:l.boolean().optional().describe(`Whether this notification type is on. Optional per entry, but not really \u2014 omitting it doesn't error and doesn't inherit the previous value either; confirmed live it's written as \`enabled: null\`, effectively unsetting the type. Always pass an explicit true/false for every one of the ${Ar.length} types.`)})).refine(n=>n.length===Ar.length&&new Set(n.map(i=>i.type)).size===Ar.length,`Must include every one of the ${Ar.length} notification types exactly once.`).optional().describe(`ALL ${Ar.length} notification types, every time \u2014 confirmed live this is a full replace, not a partial merge: AniList silently drops every type you don't list (not just resets it to default, removes it) with no error. Fetch the account's current list first (get_authorized_user's \`options.notificationOptions\`) and resend it in full with just your changes applied.`),timezone:l.string().regex(/^-?\d{2}:\d{2}$/,`Must be a timezone offset in AniList's own documented "-?HH:MM" format, e.g. "09:00" or "-05:00".`).optional().describe(`Display timezone as an offset, in AniList's own documented "-?HH:MM" format (e.g. "09:00", "-05:00"). Confirmed live that AniList validates this server-side and rejects a malformed value with a clear error ("The timezone format is invalid.") \u2014 whether a leading "+" is also accepted wasn't tested live (this tool has no way to explicitly clear timezone back to unset, so a wrong guess here risked an unrevertable change); this regex follows AniList's own literal grammar, which mentions only an optional leading minus.`),activityMergeTime:l.int().min(0).optional().describe("Minutes within which consecutive list activity posts get merged into one. Per AniList's own schema: 0 = never merge, 20160+ (2 weeks) = always merge."),staffNameLanguage:l.enum(kP).optional().describe("Preferred staff/character name display language."),restrictMessagesToFollowing:l.boolean().optional().describe("Only allow message activity from users you follow."),disabledListActivity:l.array(l.object({type:l.enum(At).describe("List status this toggle applies to."),disabled:l.boolean().optional().describe(`Whether posting activity for this status is suppressed. Optional in the schema, but NOT safe to omit: confirmed live, leaving it out on even one of the ${At.length} statuses makes the whole call fail with a 500 Internal Server Error on AniList's side (not a clean validation error, and not this server's bug) \u2014 always pass an explicit true/false for every status.`)})).refine(n=>n.length===At.length&&new Set(n.map(i=>i.type)).size===At.length,`Must include every one of the ${At.length} list statuses exactly once \u2014 AniList rejects a partial list.`).optional().describe(`ALL ${At.length} list statuses, every time \u2014 confirmed live: AniList rejects this with a 400 error if any status is missing ("Incorrect number of disabled list activity options"), it's not a partial per-status update. Fetch the current list first (get_authorized_user's \`options.disabledListActivity\`) and resend it in full with just your changes applied.`),animeListOptions:Jw.describe("New anime-list display/scoring options \u2014 only the fields you set are changed (confirmed live: this is a partial merge, unlike add_list_entry's advancedScores)."),mangaListOptions:Jw.describe("New manga-list display/scoring options \u2014 same partial-merge behavior as `animeListOptions` above.")}),outputSchema:l.object({user:AP}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!0,openWorldHint:!0}},n=>le(async()=>ce({user:await J$(t.ctx(),n)})))}function Xw(e,t){e.registerTool("login_anilist",{title:"Log in to AniList",description:"Authorize the personal-list and social tools with your AniList account (one-time). Prerequisite: register an app at anilist.co/settings/developer with Redirect URL set to `http://localhost:8082/callback` (the default; override the port via ANILIST_OAUTH_PORT if 8082 is taken \u2014 it must match exactly what you register), and set ANILIST_CLIENT_ID + ANILIST_CLIENT_SECRET in the server env. Calling this returns an authorization URL: open it, log in, and click Approve. If your browser genuinely runs on the same machine as this server, login then completes automatically; otherwise copy the URL you land on and pass it to submit_anilist_redirect. `auto_capture` in the response is NOT a reliable detector of that \u2014 it only reflects whether this server process could bind its own localhost listener, which typically succeeds even when the server runs remotely (SSH/headless) and the browser can never reach it; you (or the user) know the actual machine layout, the response doesn't.",inputSchema:l.object({}),outputSchema:l.object({authorize_url:l.string().describe("The AniList OAuth authorization URL \u2014 open it in a browser and click Approve."),redirect_uri:l.string().describe("The exact localhost callback URI this login attempt used (port from ANILIST_OAUTH_PORT, default 8082) \u2014 must exactly match the Redirect URL registered for your AniList app, or the token exchange fails."),auto_capture:l.boolean().describe("Whether this server process could bind a local callback listener \u2014 NOT whether the browser opening authorize_url is actually on the same machine. A remote/SSH server can still bind its own loopback port successfully and read `true` here even though that browser's redirect can never reach it."),instructions:l.string()}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},()=>le(async()=>{if(!t.canLogin())return ya("ANILIST_CLIENT_ID and ANILIST_CLIENT_SECRET must both be set to log in. Register an app at anilist.co/settings/developer first.");let{authorizeUrl:n,redirectUri:i,listening:r}=await t.startLogin();return ce({authorize_url:n,redirect_uri:i,auto_capture:r,instructions:r?"Open authorize_url, log in and click Approve. If your browser is on the same machine as this server, login completes automatically \u2014 call get_authorized_user to confirm. If the server is actually remote (SSH/headless) despite this server being able to bind its own local port, copy the URL you're redirected to instead and pass it to submit_anilist_redirect.":"Open authorize_url, log in and click Approve, then copy the URL you're redirected to and pass it to submit_anilist_redirect."})})),e.registerTool("submit_anilist_redirect",{title:"Complete AniList login with a pasted redirect URL",description:"Complete a login started with login_anilist by submitting the URL your browser was redirected to after clicking Approve (the one containing ?code=...). Use this when login didn't complete automatically \u2014 e.g. the server runs on a remote/headless host. A bare code string is also accepted.",inputSchema:l.object({redirect_url:l.string().min(1).describe("The full redirected URL (contains ?code=...), or just the code value.")}),outputSchema:l.object({success:l.boolean()}),annotations:{readOnlyHint:!1,destructiveHint:!1,idempotentHint:!1,openWorldHint:!0}},({redirect_url:n})=>le(async()=>(await t.submitRedirect(n),ce({success:!0}))))}function Qw(e){e.registerPrompt("recommend_similar",{title:"Recommend similar anime/manga",description:"Plan a recommendation search for anime or manga similar to a given title, using AniList's own recommendation data rather than the model's own knowledge.",argsSchema:{title:l.string().min(1).describe("An anime or manga title the user liked."),type:l.enum(["ANIME","MANGA"]).describe("Whether the title is anime or manga. Defaults to ANIME.").optional()}},({title:t,type:n})=>{let i=n??"ANIME";return{messages:[{role:"user",content:{type:"text",text:`Recommend ${i==="ANIME"?"anime":"manga"} similar to "${t}".
|
|
367
|
+
Steps: call search_media with type: "${i}" to resolve it to an AniList id, then get_recommendations_for_media with that id as \`mediaId\` (not \`id\` \u2014 that's the param name for the different get_recommendation tool). Present 5-8 recommendations with a one-line reason each, noting AniList's average score and genres.`}}]}}),e.registerPrompt("seasonal_overview",{title:"Seasonal anime overview",description:"Summarize the notable anime airing in a given season (or the current one).",argsSchema:{season:l.enum(["WINTER","SPRING","SUMMER","FALL"]).describe("Season name.").optional(),year:l.string().regex(/^\d{4}$/,"year must be four digits, e.g. '2026'.").describe("Four-digit year.").optional()}},({season:t,year:n})=>{let i=t&&n?`the ${t} ${n} season`:t?`the ${t} season (across all years)`:n?`the ${n} season (any season within that year)`:"the current season",r=[t&&`season: "${t}"`,n&&`seasonYear: ${n}`].filter(Boolean),o=r.length?r.join(", "):'status_in: ["RELEASING"]';return{messages:[{role:"user",content:{type:"text",text:`Give an overview of ${i} in anime.
|
|
368
|
+
Call search_media with type: "ANIME", ${o}, then group the results into highlights (highest average score / most popular) and notable genres. Keep it concise.`}}]}}),e.registerPrompt("hidden_gems",{title:"Find hidden gems",description:"Surface highly-rated anime or manga that aren't widely known \u2014 high average score, low popularity.",argsSchema:{type:l.enum(["ANIME","MANGA"]).describe("Look for anime or manga. Defaults to ANIME.").optional(),genre:l.string().describe("Restrict to this genre (see get_genres for valid names).").optional()}},({type:t,genre:n})=>{let i=t??"ANIME";return{messages:[{role:"user",content:{type:"text",text:`Find hidden-gem ${i==="ANIME"?"anime":"manga"}: high AniList average score but not widely known.
|
|
369
|
+
Call search_media with type: "${i}"`+(n?`, genres: ["${n}"]`:"")+" and perPage: 25, then pick the entries whose averageScore is high but whose popularity is much lower than that score would suggest \u2014 those are the underseen ones. Present 5-8 picks with title, averageScore, popularity, and a one-line reason each noting why it's underrated."}}]}}),e.registerPrompt("catch_up_activity",{title:"Catch up on a user's AniList activity",description:"Summarize a user's recent AniList activity feed alongside their current in-progress anime AND manga lists.",argsSchema:{user:l.string().min(1).describe("AniList username (or numeric user ID as a string).")}},({user:t})=>({messages:[{role:"user",content:{type:"text",text:`Summarize what AniList user "${t}" has been up to lately.
|
|
370
|
+
Call get_user_activity for their recent activity posts (list updates, text posts), and get_user_list with type: "ANIME" and again with type: "MANGA" for their CURRENT (watching/reading) status groups. Combine all of that into a short digest: what they've recently updated, what they're currently watching/reading and how far along, and any notable text posts. Omit a list from the digest if it has no CURRENT entries.`}}]})),e.registerPrompt("check_notifications",{title:"Check your AniList notifications",description:"[Requires login] Summarize the authenticated user's recent AniList notifications (airing episodes, activity likes/replies/mentions, new followers, thread activity).",argsSchema:{markAsRead:l.enum(["true","false"]).describe('Set "true" to also clear the AniList unread badge. Defaults to "false".').optional()}},({markAsRead:t})=>({messages:[{role:"user",content:{type:"text",text:`Summarize my recent AniList notifications.
|
|
371
|
+
Call get_notifications`+(t==="true"?" with markAsRead: true":"")+". Group the results by what they're about (airing episodes, activity likes/replies/mentions, new followers, thread activity, etc.) and present a short digest, most recent first. If get_notifications reports no token is configured, tell the user to run login_anilist first instead of guessing."}}]}))}var OP="AniList tools for anime, manga, characters, staff and studios. Reads (search/details/genres/tags/recommendations/threads/activity/public user data) call the public AniList GraphQL API and need no credentials. Personal-list and social tools (get/add/update/remove list entries, favourites, follow, posting/deleting activity or threads, update_user, get_notifications) act on the authenticated user's own AniList account and require a user token; without one they return an actionable error. Resolve a title to its AniList id with search_media before calling id-based tools.";function CP(e,t){let n=new Fu(e,t),i=new ha({name:"anilist-mcp-server",title:"AniList MCP Server",version:Lu},{instructions:OP,cacheHints:{"tools/list":{ttlMs:36e5,cacheScope:"public"},"prompts/list":{ttlMs:36e5,cacheScope:"public"},"server/discover":{ttlMs:36e5,cacheScope:"public"}}});return D$(i,n),X$(i,n),sw(i,n),vw(i,n),$w(i,n),Tw(i,n),Nw(i,n),Vw(i,n),Yw(i,n),Hw(i,n),Xw(i,n),Qw(i),i}async function ez(){let e=a$(),t=c$(e.logLevel),n,i=r=>{t.info(`received ${r}, shutting down`),(n?.close()??Promise.resolve()).finally(()=>process.exit(0))};process.on("SIGINT",()=>i("SIGINT")),process.on("SIGTERM",()=>i("SIGTERM")),process.on("unhandledRejection",r=>t.error("unhandled rejection",r)),process.on("uncaughtException",r=>{t.error("uncaught exception",r),process.exit(1)}),n=o$(()=>CP(e,t),{onerror:r=>t.error("stdio transport error",r)}),t.info(`anilist-mcp-server ${Lu} ready`)}ez().catch(e=>{let t=e instanceof Error?e.message:String(e);process.stderr.write(`[anilist-mcp-server] fatal: ${fa(t)}
|
|
372
372
|
`),process.exit(1)});
|
|
373
373
|
/*! Bundled license information:
|
|
374
374
|
|