@babylonjs/mcp-servers 9.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/babylonjs-mcp-servers.js +66 -0
- package/dist/flow-graph-mcp-server.js +159 -0
- package/dist/flow-graph-mcp-server.js.map +1 -0
- package/dist/gui-mcp-server.js +149 -0
- package/dist/gui-mcp-server.js.map +1 -0
- package/dist/nge-mcp-server.js +147 -0
- package/dist/nge-mcp-server.js.map +1 -0
- package/dist/nme-mcp-server.js +151 -0
- package/dist/nme-mcp-server.js.map +1 -0
- package/dist/npe-mcp-server.js +150 -0
- package/dist/npe-mcp-server.js.map +1 -0
- package/dist/nrge-mcp-server.js +145 -0
- package/dist/nrge-mcp-server.js.map +1 -0
- package/dist/smart-filters-mcp-server.js +132 -0
- package/dist/smart-filters-mcp-server.js.map +1 -0
- package/package.json +48 -0
- package/readme.md +73 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import uu from"node:process";import*as Ii from"node:crypto";import*as Zv from"node:http";import{dirname as Mv}from"node:path";import{mkdirSync as Bv,writeFileSync as Lv,readFileSync as Fv}from"node:fs";var lu;const du=Object.freeze({status:"aborted"});function S(e,t,r){function o(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);const u=a.prototype,l=Object.keys(u);for(let d=0;d<l.length;d++){const p=l[d];p in s||(s[p]=u[p].bind(s))}}const n=r?.Parent??Object;class i extends n{}Object.defineProperty(i,"name",{value:e});function a(s){var c;const u=r?.Parent?new i:this;o(u,s),(c=u._zod).deferred??(c.deferred=[]);for(const l of u._zod.deferred)l();return u}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:s=>r?.Parent&&s instanceof r.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}const mu=Symbol("zod_brand");class Ft extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class zr extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}(lu=globalThis).__zod_globalConfig??(lu.__zod_globalConfig={});const Nn=globalThis.__zod_globalConfig;function Ae(e){return e&&Object.assign(Nn,e),Nn}function Gv(e){return e}function Vv(e){return e}function qv(e){}function Jv(e){throw new Error("Unexpected value in exhaustive check")}function Hv(e){}function Oi(e){const t=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,n])=>t.indexOf(+o)===-1).map(([o,n])=>n)}function D(e,t="|"){return e.map(r=>K(r)).join(t)}function Nr(e,t){return typeof t=="bigint"?t.toString():t}function jn(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Gt(e){return e==null}function jr(e){const t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function pu(e,t){const r=e/t,o=Math.round(r),n=Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-o)<n?0:r-o}const fu=Symbol("evaluating");function oe(e,t,r){let o;Object.defineProperty(e,t,{get(){if(o!==fu)return o===void 0&&(o=fu,o=r()),o},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Kv(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function jt(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function kt(...e){const t={};for(const r of e){const o=Object.getOwnPropertyDescriptors(r);Object.assign(t,o)}return Object.defineProperties({},t)}function Wv(e){return kt(e._zod.def)}function Yv(e,t){return t?t.reduce((r,o)=>r?.[o],e):e}function Xv(e){const t=Object.keys(e),r=t.map(o=>e[o]);return Promise.all(r).then(o=>{const n={};for(let i=0;i<t.length;i++)n[t[i]]=o[i];return n})}function Qv(e=10){const t="abcdefghijklmnopqrstuvwxyz";let r="";for(let o=0;o<e;o++)r+=t[Math.floor(Math.random()*t.length)];return r}function xi(e){return JSON.stringify(e)}function hu(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Ti="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function an(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const gu=jn(()=>{if(Nn.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Vt(e){if(an(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const r=t.prototype;return!(an(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function Dr(e){return Vt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function ey(e){let t=0;for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}const ty=e=>{const 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}`)}},Cr=new Set(["string","number","symbol"]),vu=new Set(["string","number","bigint","boolean","symbol","undefined"]);function xt(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function et(e,t,r){const o=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(o._zod.parent=e),o}function z(e){const 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 ny(e){let t;return new Proxy({},{get(r,o,n){return t??(t=e()),Reflect.get(t,o,n)},set(r,o,n,i){return t??(t=e()),Reflect.set(t,o,n,i)},has(r,o){return t??(t=e()),Reflect.has(t,o)},deleteProperty(r,o){return t??(t=e()),Reflect.deleteProperty(t,o)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,o){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,o)},defineProperty(r,o,n){return t??(t=e()),Reflect.defineProperty(t,o,n)}})}function K(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function yu(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const _u={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]},$u={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function bu(e,t){const r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=kt(e._zod.def,{get shape(){const a={};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&(a[s]=r.shape[s])}return jt(this,"shape",a),a},checks:[]});return et(e,i)}function ku(e,t){const r=e._zod.def,o=r.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=kt(e._zod.def,{get shape(){const a={...e._zod.def.shape};for(const s in t){if(!(s in r.shape))throw new Error(`Unrecognized key: "${s}"`);t[s]&&delete a[s]}return jt(this,"shape",a),a},checks:[]});return et(e,i)}function Su(e,t){if(!Vt(t))throw new Error("Invalid input to extend: expected a plain object");const r=e._zod.def.checks;if(r&&r.length>0){const i=e._zod.def.shape;for(const a in t)if(Object.getOwnPropertyDescriptor(i,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const n=kt(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return jt(this,"shape",i),i}});return et(e,n)}function wu(e,t){if(!Vt(t))throw new Error("Invalid input to safeExtend: expected a plain object");const r=kt(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t};return jt(this,"shape",o),o}});return et(e,r)}function Iu(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const r=kt(e._zod.def,{get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return jt(this,"shape",o),o},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return et(e,r)}function Ou(e,t,r){const n=t._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const a=kt(t._zod.def,{get shape(){const s=t._zod.def.shape,c={...s};if(r)for(const u in r){if(!(u in s))throw new Error(`Unrecognized key: "${u}"`);r[u]&&(c[u]=e?new e({type:"optional",innerType:s[u]}):s[u])}else for(const u in s)c[u]=e?new e({type:"optional",innerType:s[u]}):s[u];return jt(this,"shape",c),c},checks:[]});return et(t,a)}function xu(e,t,r){const o=kt(t._zod.def,{get shape(){const n=t._zod.def.shape,i={...n};if(r)for(const a in r){if(!(a in i))throw new Error(`Unrecognized key: "${a}"`);r[a]&&(i[a]=new e({type:"nonoptional",innerType:n[a]}))}else for(const a in n)i[a]=new e({type:"nonoptional",innerType:n[a]});return jt(this,"shape",i),i}});return et(t,o)}function qt(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Tu(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function ct(e,t){return t.map(r=>{var o;return(o=r).path??(o.path=[]),r.path.unshift(e),r})}function Dn(e){return typeof e=="string"?e:e?.message}function tt(e,t,r){const o=e.message?e.message:Dn(e.inst?._zod.def?.error?.(e))??Dn(t?.error?.(e))??Dn(r.customError?.(e))??Dn(r.localeError?.(e))??"Invalid input",{inst:n,continue:i,input:a,...s}=e;return s.path??(s.path=[]),s.message=o,t?.reportInput&&(s.input=a),s}function Rr(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Ar(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function X(e){const 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";const r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function sn(...e){const[t,r,o]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:o}:{...t}}function ry(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function Pu(e){const t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r}function Eu(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function oy(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return Pu(t+r)}function iy(e){return Eu(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function ay(e){const t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");const r=new Uint8Array(t.length/2);for(let o=0;o<t.length;o+=2)r[o/2]=Number.parseInt(t.slice(o,o+2),16);return r}function sy(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}class cy{constructor(...t){}}var zu=Object.freeze({__proto__:null,BIGINT_FORMAT_RANGES:$u,Class:cy,NUMBER_FORMAT_RANGES:_u,aborted:qt,allowsEval:gu,assert:Hv,assertEqual:Gv,assertIs:qv,assertNever:Jv,assertNotEqual:Vv,assignProp:jt,base64ToUint8Array:Pu,base64urlToUint8Array:oy,cached:jn,captureStackTrace:Ti,cleanEnum:ry,cleanRegex:jr,clone:et,cloneDef:Wv,createTransparentProxy:ny,defineLazy:oe,esc:xi,escapeRegex:xt,explicitlyAborted:Tu,extend:Su,finalizeIssue:tt,floatSafeRemainder:pu,getElementAtPath:Yv,getEnumValues:Oi,getLengthableOrigin:Ar,getParsedType:ty,getSizableOrigin:Rr,hexToUint8Array:ay,isObject:an,isPlainObject:Vt,issue:sn,joinValues:D,jsonStringifyReplacer:Nr,merge:Iu,mergeDefs:kt,normalizeParams:z,nullish:Gt,numKeys:ey,objectClone:Kv,omit:ku,optionalKeys:yu,parsedType:X,partial:Ou,pick:bu,prefixIssues:ct,primitiveTypes:vu,promiseAllObject:Xv,propertyKeyTypes:Cr,randomString:Qv,required:xu,safeExtend:wu,shallowClone:Dr,slugify:hu,stringifyPrimitive:K,uint8ArrayToBase64:Eu,uint8ArrayToBase64url:iy,uint8ArrayToHex:sy,unwrapMessage:Dn});const Nu=(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,Nr,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Pi=S("$ZodError",Nu),nt=S("$ZodError",Nu,{Parent:Error});function Ei(e,t=r=>r.message){const r={},o=[];for(const n of e.issues)n.path.length>0?(r[n.path[0]]=r[n.path[0]]||[],r[n.path[0]].push(t(n))):o.push(t(n));return{formErrors:o,fieldErrors:r}}function zi(e,t=r=>r.message){const r={_errors:[]},o=(n,i=[])=>{for(const a of n.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>o({issues:s},[...i,...a.path]));else if(a.code==="invalid_key")o({issues:a.issues},[...i,...a.path]);else if(a.code==="invalid_element")o({issues:a.issues},[...i,...a.path]);else{const s=[...i,...a.path];if(s.length===0)r._errors.push(t(a));else{let c=r,u=0;for(;u<s.length;){const l=s[u];u===s.length-1?(c[l]=c[l]||{_errors:[]},c[l]._errors.push(t(a))):c[l]=c[l]||{_errors:[]},c=c[l],u++}}}};return o(e),r}function ju(e,t=r=>r.message){const r={errors:[]},o=(n,i=[])=>{var a,s;for(const c of n.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>o({issues:u},[...i,...c.path]));else if(c.code==="invalid_key")o({issues:c.issues},[...i,...c.path]);else if(c.code==="invalid_element")o({issues:c.issues},[...i,...c.path]);else{const u=[...i,...c.path];if(u.length===0){r.errors.push(t(c));continue}let l=r,d=0;for(;d<u.length;){const p=u[d],m=d===u.length-1;typeof p=="string"?(l.properties??(l.properties={}),(a=l.properties)[p]??(a[p]={errors:[]}),l=l.properties[p]):(l.items??(l.items=[]),(s=l.items)[p]??(s[p]={errors:[]}),l=l.items[p]),m&&l.errors.push(t(c)),d++}}};return o(e),r}function Du(e){const t=[],r=e.map(o=>typeof o=="object"?o.key:o);for(const o of r)typeof o=="number"?t.push(`[${o}]`):typeof o=="symbol"?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function Cu(e){const t=[],r=[...e.issues].sort((o,n)=>(o.path??[]).length-(n.path??[]).length);for(const o of r)t.push(`\u2716 ${o.message}`),o.path?.length&&t.push(` \u2192 at ${Du(o.path)}`);return t.join(`
|
|
3
|
+
`)}const Cn=e=>(t,r,o,n)=>{const i=o?{...o,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise)throw new Ft;if(a.issues.length){const s=new(n?.Err??e)(a.issues.map(c=>tt(c,i,Ae())));throw Ti(s,n?.callee),s}return a.value},Ur=Cn(nt),Rn=e=>async(t,r,o,n)=>{const i=o?{...o,async:!0}:{async:!0};let a=t._zod.run({value:r,issues:[]},i);if(a instanceof Promise&&(a=await a),a.issues.length){const s=new(n?.Err??e)(a.issues.map(c=>tt(c,i,Ae())));throw Ti(s,n?.callee),s}return a.value},Zr=Rn(nt),An=e=>(t,r,o)=>{const n=o?{...o,async:!1}:{async:!1},i=t._zod.run({value:r,issues:[]},n);if(i instanceof Promise)throw new Ft;return i.issues.length?{success:!1,error:new(e??Pi)(i.issues.map(a=>tt(a,n,Ae())))}:{success:!0,data:i.value}},Mr=An(nt),Un=e=>async(t,r,o)=>{const n=o?{...o,async:!0}:{async:!0};let i=t._zod.run({value:r,issues:[]},n);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(a=>tt(a,n,Ae())))}:{success:!0,data:i.value}},Br=Un(nt),Ni=e=>(t,r,o)=>{const n=o?{...o,direction:"backward"}:{direction:"backward"};return Cn(e)(t,r,n)},uy=Ni(nt),ji=e=>(t,r,o)=>Cn(e)(t,r,o),ly=ji(nt),Di=e=>async(t,r,o)=>{const n=o?{...o,direction:"backward"}:{direction:"backward"};return Rn(e)(t,r,n)},dy=Di(nt),Ci=e=>async(t,r,o)=>Rn(e)(t,r,o),my=Ci(nt),Ri=e=>(t,r,o)=>{const n=o?{...o,direction:"backward"}:{direction:"backward"};return An(e)(t,r,n)},py=Ri(nt),Ai=e=>(t,r,o)=>An(e)(t,r,o),fy=Ai(nt),Ui=e=>async(t,r,o)=>{const n=o?{...o,direction:"backward"}:{direction:"backward"};return Un(e)(t,r,n)},hy=Ui(nt),Zi=e=>async(t,r,o)=>Un(e)(t,r,o),gy=Zi(nt),Ru=/^[cC][0-9a-z]{6,}$/,Au=/^[0-9a-z]+$/,Uu=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Zu=/^[0-9a-vA-V]{20}$/,Mu=/^[A-Za-z0-9]{27}$/,Bu=/^[a-zA-Z0-9_-]{21}$/,Lu=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,vy=/^[-+]?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)?)??$/,Fu=/^([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})$/,cn=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)$/,yy=cn(4),_y=cn(6),$y=cn(7),Gu=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,by=/^[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])?)*$/,ky=/^(([^<>()\[\]\\.,;:\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,}))$/,Vu=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Sy=Vu,wy=/^[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])?)*$/,Iy="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function qu(){return new RegExp(Iy,"u")}const Ju=/^(?:(?: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])$/,Hu=/^(([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}|:))$/,Ku=e=>{const t=xt(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Wu=/^((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])$/,Yu=/^(([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])$/,Xu=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Mi=/^[A-Za-z0-9_-]*$/,Qu=/^(?=.{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])?)*\.?$/,el=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Bi=/^https?$/,tl=/^\+[1-9]\d{6,14}$/,nl="(?:(?:\\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])))",rl=new RegExp(`^${nl}$`);function ol(e){const 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 il(e){return new RegExp(`^${ol(e)}$`)}function al(e){const t=ol({precision:e.precision}),r=["Z"];e.local&&r.push(""),e.offset&&r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const o=`${t}(?:${r.join("|")})`;return new RegExp(`^${nl}T(?:${o})$`)}const sl=e=>{const t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},cl=/^-?\d+n?$/,ul=/^-?\d+$/,Li=/^-?\d+(?:\.\d+)?$/,ll=/^(?:true|false)$/i,dl=/^null$/i,ml=/^undefined$/i,pl=/^[^A-Z]*$/,fl=/^[^a-z]*$/,hl=/^[0-9a-fA-F]*$/;function Zn(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Mn(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}const Oy=/^[0-9a-fA-F]{32}$/,xy=Zn(22,"=="),Ty=Mn(22),Py=/^[0-9a-fA-F]{40}$/,Ey=Zn(27,"="),zy=Mn(27),Ny=/^[0-9a-fA-F]{64}$/,jy=Zn(43,"="),Dy=Mn(43),Cy=/^[0-9a-fA-F]{96}$/,Ry=Zn(64,""),Ay=Mn(64),Uy=/^[0-9a-fA-F]{128}$/,Zy=Zn(86,"=="),My=Mn(86);var Fi=Object.freeze({__proto__:null,base64:Xu,base64url:Mi,bigint:cl,boolean:ll,browserEmail:wy,cidrv4:Wu,cidrv6:Yu,cuid:Ru,cuid2:Au,date:rl,datetime:al,domain:el,duration:Lu,e164:tl,email:Gu,emoji:qu,extendedDuration:vy,guid:Fu,hex:hl,hostname:Qu,html5Email:by,httpProtocol:Bi,idnEmail:Sy,integer:ul,ipv4:Ju,ipv6:Hu,ksuid:Mu,lowercase:pl,mac:Ku,md5_base64:xy,md5_base64url:Ty,md5_hex:Oy,nanoid:Bu,null:dl,number:Li,rfc5322Email:ky,sha1_base64:Ey,sha1_base64url:zy,sha1_hex:Py,sha256_base64:jy,sha256_base64url:Dy,sha256_hex:Ny,sha384_base64:Ry,sha384_base64url:Ay,sha384_hex:Cy,sha512_base64:Zy,sha512_base64url:My,sha512_hex:Uy,string:sl,time:il,ulid:Uu,undefined:ml,unicodeEmail:Vu,uppercase:fl,uuid:cn,uuid4:yy,uuid6:_y,uuid7:$y,xid:Zu});const Te=S("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),gl={number:"number",bigint:"bigint",object:"date"},Gi=S("$ZodCheckLessThan",(e,t)=>{Te.init(e,t);const r=gl[typeof t.value];e._zod.onattach.push(o=>{const n=o._zod.bag,i=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Vi=S("$ZodCheckGreaterThan",(e,t)=>{Te.init(e,t);const r=gl[typeof t.value];e._zod.onattach.push(o=>{const n=o._zod.bag,i=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),vl=S("$ZodCheckMultipleOf",(e,t)=>{Te.init(e,t),e._zod.onattach.push(r=>{var o;(o=r._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?r.value%t.value===BigInt(0):pu(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),yl=S("$ZodCheckNumberFormat",(e,t)=>{Te.init(e,t),t.format=t.format||"float64";const r=t.format?.includes("int"),o=r?"int":"number",[n,i]=_u[t.format];e._zod.onattach.push(a=>{const s=a._zod.bag;s.format=t.format,s.minimum=n,s.maximum=i,r&&(s.pattern=ul)}),e._zod.check=a=>{const s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:o,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:o,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:o,inclusive:!0,continue:!t.abort});return}}s<n&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),s>i&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),_l=S("$ZodCheckBigIntFormat",(e,t)=>{Te.init(e,t);const[r,o]=$u[t.format];e._zod.onattach.push(n=>{const i=n._zod.bag;i.format=t.format,i.minimum=r,i.maximum=o}),e._zod.check=n=>{const i=n.value;i<r&&n.issues.push({origin:"bigint",input:i,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),i>o&&n.issues.push({origin:"bigint",input:i,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),$l=S("$ZodCheckMaxSize",(e,t)=>{var r;Te.init(e,t),(r=e._zod.def).when??(r.when=o=>{const n=o.value;return!Gt(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{const n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{const n=o.value;n.size<=t.maximum||o.issues.push({origin:Rr(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),bl=S("$ZodCheckMinSize",(e,t)=>{var r;Te.init(e,t),(r=e._zod.def).when??(r.when=o=>{const n=o.value;return!Gt(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{const n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const n=o.value;n.size>=t.minimum||o.issues.push({origin:Rr(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),kl=S("$ZodCheckSizeEquals",(e,t)=>{var r;Te.init(e,t),(r=e._zod.def).when??(r.when=o=>{const n=o.value;return!Gt(n)&&n.size!==void 0}),e._zod.onattach.push(o=>{const n=o._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=o=>{const n=o.value,i=n.size;if(i===t.size)return;const a=i>t.size;o.issues.push({origin:Rr(n),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Sl=S("$ZodCheckMaxLength",(e,t)=>{var r;Te.init(e,t),(r=e._zod.def).when??(r.when=o=>{const n=o.value;return!Gt(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{const n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(o._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{const n=o.value;if(n.length<=t.maximum)return;const a=Ar(n);o.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),wl=S("$ZodCheckMinLength",(e,t)=>{var r;Te.init(e,t),(r=e._zod.def).when??(r.when=o=>{const n=o.value;return!Gt(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{const n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(o._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const n=o.value;if(n.length>=t.minimum)return;const a=Ar(n);o.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Il=S("$ZodCheckLengthEquals",(e,t)=>{var r;Te.init(e,t),(r=e._zod.def).when??(r.when=o=>{const n=o.value;return!Gt(n)&&n.length!==void 0}),e._zod.onattach.push(o=>{const n=o._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=o=>{const n=o.value,i=n.length;if(i===t.length)return;const a=Ar(n),s=i>t.length;o.issues.push({origin:a,...s?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),Bn=S("$ZodCheckStringFormat",(e,t)=>{var r,o;Te.init(e,t),e._zod.onattach.push(n=>{const i=n._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),Ol=S("$ZodCheckRegex",(e,t)=>{Bn.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),xl=S("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=pl),Bn.init(e,t)}),Tl=S("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=fl),Bn.init(e,t)}),Pl=S("$ZodCheckIncludes",(e,t)=>{Te.init(e,t);const r=xt(t.includes),o=new RegExp(typeof t.position=="number"?`^.{${t.position}}${r}`:r);t.pattern=o,e._zod.onattach.push(n=>{const i=n._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(o)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),El=S("$ZodCheckStartsWith",(e,t)=>{Te.init(e,t);const r=new RegExp(`^${xt(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{const n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),zl=S("$ZodCheckEndsWith",(e,t)=>{Te.init(e,t);const r=new RegExp(`.*${xt(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.onattach.push(o=>{const n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(r)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function Nl(e,t,r){e.issues.length&&t.issues.push(...ct(r,e.issues))}const jl=S("$ZodCheckProperty",(e,t)=>{Te.init(e,t),e._zod.check=r=>{const o=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(n=>Nl(n,r,t.property));Nl(o,r,t.property)}}),Dl=S("$ZodCheckMimeType",(e,t)=>{Te.init(e,t);const r=new Set(t.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=t.mime}),e._zod.check=o=>{r.has(o.value.type)||o.issues.push({code:"invalid_value",values:t.mime,input:o.value.type,inst:e,continue:!t.abort})}}),Cl=S("$ZodCheckOverwrite",(e,t)=>{Te.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});class Rl{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}const o=t.split(`
|
|
4
|
+
`).filter(a=>a),n=Math.min(...o.map(a=>a.length-a.trimStart().length)),i=o.map(a=>a.slice(n)).map(a=>" ".repeat(this.indent*2)+a);for(const a of i)this.content.push(a)}compile(){const t=Function,r=this?.args,n=[...(this?.content??[""]).map(i=>` ${i}`)];return new t(...r,n.join(`
|
|
5
|
+
`))}}const Al={major:4,minor:4,patch:3},ee=S("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Al;const o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(const n of o)for(const i of n._zod.onattach)i(e);if(o.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const n=(a,s,c)=>{let u=qt(a),l;for(const d of s){if(d._zod.def.when){if(Tu(a)||!d._zod.def.when(a))continue}else if(u)continue;const p=a.issues.length,m=d._zod.check(a);if(m instanceof Promise&&c?.async===!1)throw new Ft;if(l||m instanceof Promise)l=(l??Promise.resolve()).then(async()=>{await m,a.issues.length!==p&&(u||(u=qt(a,p)))});else{if(a.issues.length===p)continue;u||(u=qt(a,p))}}return l?l.then(()=>a):a},i=(a,s,c)=>{if(qt(a))return a.aborted=!0,a;const u=n(s,o,c);if(u instanceof Promise){if(c.async===!1)throw new Ft;return u.then(l=>e._zod.parse(l,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"){const u=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return u instanceof Promise?u.then(l=>i(l,a,s)):i(u,a,s)}const c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new Ft;return c.then(u=>n(u,o,s))}return n(c,o,s)}}oe(e,"~standard",()=>({validate:n=>{try{const i=Mr(e,n);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return Br(e,n).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),Ln=S("$ZodString",(e,t)=>{ee.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??sl(e._zod.bag),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),be=S("$ZodStringFormat",(e,t)=>{Bn.init(e,t),Ln.init(e,t)}),Ul=S("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Fu),be.init(e,t)}),Zl=S("$ZodUUID",(e,t)=>{if(t.version){const o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(o===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=cn(o))}else t.pattern??(t.pattern=cn());be.init(e,t)}),Ml=S("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Gu),be.init(e,t)}),Bl=S("$ZodURL",(e,t)=>{be.init(e,t),e._zod.check=r=>{try{const o=r.value.trim();if(!t.normalize&&t.protocol?.source===Bi.source&&!/^https?:\/\//i.test(o)){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}const n=new URL(o);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(n.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=n.href:r.value=o;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),Ll=S("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=qu()),be.init(e,t)}),Fl=S("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Bu),be.init(e,t)}),Gl=S("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Ru),be.init(e,t)}),Vl=S("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Au),be.init(e,t)}),ql=S("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Uu),be.init(e,t)}),Jl=S("$ZodXID",(e,t)=>{t.pattern??(t.pattern=Zu),be.init(e,t)}),Hl=S("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Mu),be.init(e,t)}),Kl=S("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=al(t)),be.init(e,t)}),Wl=S("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=rl),be.init(e,t)}),Yl=S("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=il(t)),be.init(e,t)}),Xl=S("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Lu),be.init(e,t)}),Ql=S("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Ju),be.init(e,t),e._zod.bag.format="ipv4"}),ed=S("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Hu),be.init(e,t),e._zod.bag.format="ipv6",e._zod.check=r=>{try{new URL(`http://[${r.value}]`)}catch{r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}}),td=S("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Ku(t.delimiter)),be.init(e,t),e._zod.bag.format="mac"}),nd=S("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Wu),be.init(e,t)}),rd=S("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Yu),be.init(e,t),e._zod.check=r=>{const o=r.value.split("/");try{if(o.length!==2)throw new Error;const[n,i]=o;if(!i)throw new Error;const a=Number(i);if(`${a}`!==i)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${n}]`)}catch{r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}}});function qi(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const od=S("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Xu),be.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=r=>{qi(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}});function id(e){if(!Mi.test(e))return!1;const t=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return qi(r)}const ad=S("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Mi),be.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=r=>{id(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),sd=S("$ZodE164",(e,t)=>{t.pattern??(t.pattern=tl),be.init(e,t)});function cd(e,t=null){try{const r=e.split(".");if(r.length!==3)return!1;const[o]=r;if(!o)return!1;const n=JSON.parse(atob(o));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}const ud=S("$ZodJWT",(e,t)=>{be.init(e,t),e._zod.check=r=>{cd(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),ld=S("$ZodCustomStringFormat",(e,t)=>{be.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),Ji=S("$ZodNumber",(e,t)=>{ee.init(e,t),e._zod.pattern=e._zod.bag.pattern??Li,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}const n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;const i=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...i?{received:i}:{}}),r}}),dd=S("$ZodNumberFormat",(e,t)=>{yl.init(e,t),Ji.init(e,t)}),Hi=S("$ZodBoolean",(e,t)=>{ee.init(e,t),e._zod.pattern=ll,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=!!r.value}catch{}const n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),Ki=S("$ZodBigInt",(e,t)=>{ee.init(e,t),e._zod.pattern=cl,e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),md=S("$ZodBigIntFormat",(e,t)=>{_l.init(e,t),Ki.init(e,t)}),pd=S("$ZodSymbol",(e,t)=>{ee.init(e,t),e._zod.parse=(r,o)=>{const n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),fd=S("$ZodUndefined",(e,t)=>{ee.init(e,t),e._zod.pattern=ml,e._zod.values=new Set([void 0]),e._zod.parse=(r,o)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),hd=S("$ZodNull",(e,t)=>{ee.init(e,t),e._zod.pattern=dl,e._zod.values=new Set([null]),e._zod.parse=(r,o)=>{const n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),gd=S("$ZodAny",(e,t)=>{ee.init(e,t),e._zod.parse=r=>r}),vd=S("$ZodUnknown",(e,t)=>{ee.init(e,t),e._zod.parse=r=>r}),yd=S("$ZodNever",(e,t)=>{ee.init(e,t),e._zod.parse=(r,o)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),_d=S("$ZodVoid",(e,t)=>{ee.init(e,t),e._zod.parse=(r,o)=>{const n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),$d=S("$ZodDate",(e,t)=>{ee.init(e,t),e._zod.parse=(r,o)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}const n=r.value,i=n instanceof Date;return i&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...i?{received:"Invalid Date"}:{},inst:e}),r}});function bd(e,t,r){e.issues.length&&t.issues.push(...ct(r,e.issues)),t.value[r]=e.value}const kd=S("$ZodArray",(e,t)=>{ee.init(e,t),e._zod.parse=(r,o)=>{const n=r.value;if(!Array.isArray(n))return r.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),r;r.value=Array(n.length);const i=[];for(let a=0;a<n.length;a++){const s=n[a],c=t.element._zod.run({value:s,issues:[]},o);c instanceof Promise?i.push(c.then(u=>bd(u,r,a))):bd(c,r,a)}return i.length?Promise.all(i).then(()=>r):r}});function Lr(e,t,r,o,n,i){const a=r in o;if(e.issues.length){if(n&&i&&!a)return;t.issues.push(...ct(r,e.issues))}if(!a&&!n){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?a&&(t.value[r]=void 0):t.value[r]=e.value}function Sd(e){const t=Object.keys(e.shape);for(const o of t)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const r=yu(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}function wd(e,t,r,o,n,i){const a=[],s=n.keySet,c=n.catchall._zod,u=c.def.type,l=c.optin==="optional",d=c.optout==="optional";for(const p in t){if(p==="__proto__"||s.has(p))continue;if(u==="never"){a.push(p);continue}const m=c.run({value:t[p],issues:[]},o);m instanceof Promise?e.push(m.then(h=>Lr(h,r,p,t,l,d))):Lr(m,r,p,t,l,d)}return a.length&&r.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:i}),e.length?Promise.all(e).then(()=>r):r}const Wi=S("$ZodObject",(e,t)=>{if(ee.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){const s=t.shape;Object.defineProperty(t,"shape",{get:()=>{const c={...s};return Object.defineProperty(t,"shape",{value:c}),c}})}const o=jn(()=>Sd(t));oe(e._zod,"propValues",()=>{const s=t.shape,c={};for(const u in s){const l=s[u]._zod;if(l.values){c[u]??(c[u]=new Set);for(const d of l.values)c[u].add(d)}}return c});const n=an,i=t.catchall;let a;e._zod.parse=(s,c)=>{a??(a=o.value);const u=s.value;if(!n(u))return s.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),s;s.value={};const l=[],d=a.shape;for(const p of a.keys){const m=d[p],h=m._zod.optin==="optional",$=m._zod.optout==="optional",g=m._zod.run({value:u[p],issues:[]},c);g instanceof Promise?l.push(g.then(v=>Lr(v,s,p,u,h,$))):Lr(g,s,p,u,h,$)}return i?wd(l,u,s,c,o.value,e):l.length?Promise.all(l).then(()=>s):s}}),Id=S("$ZodObjectJIT",(e,t)=>{Wi.init(e,t);const r=e._zod.parse,o=jn(()=>Sd(t)),n=p=>{const m=new Rl(["shape","payload","ctx"]),h=o.value,$=b=>{const I=xi(b);return`shape[${I}]._zod.run({ value: input[${I}], issues: [] }, ctx)`};m.write("const input = payload.value;");const g=Object.create(null);let v=0;for(const b of h.keys)g[b]=`key_${v++}`;m.write("const newResult = {};");for(const b of h.keys){const I=g[b],P=xi(b),M=p[b],G=M?._zod?.optin==="optional",ue=M?._zod?.optout==="optional";m.write(`const ${I} = ${$(b)};`),G&&ue?m.write(`
|
|
6
|
+
if (${I}.issues.length) {
|
|
7
|
+
if (${P} in input) {
|
|
8
|
+
payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
|
|
9
|
+
...iss,
|
|
10
|
+
path: iss.path ? [${P}, ...iss.path] : [${P}]
|
|
11
|
+
})));
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (${I}.value === undefined) {
|
|
16
|
+
if (${P} in input) {
|
|
17
|
+
newResult[${P}] = undefined;
|
|
18
|
+
}
|
|
19
|
+
} else {
|
|
20
|
+
newResult[${P}] = ${I}.value;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
`):G?m.write(`
|
|
24
|
+
if (${I}.issues.length) {
|
|
25
|
+
payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
|
|
26
|
+
...iss,
|
|
27
|
+
path: iss.path ? [${P}, ...iss.path] : [${P}]
|
|
28
|
+
})));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (${I}.value === undefined) {
|
|
32
|
+
if (${P} in input) {
|
|
33
|
+
newResult[${P}] = undefined;
|
|
34
|
+
}
|
|
35
|
+
} else {
|
|
36
|
+
newResult[${P}] = ${I}.value;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
`):m.write(`
|
|
40
|
+
const ${I}_present = ${P} in input;
|
|
41
|
+
if (${I}.issues.length) {
|
|
42
|
+
payload.issues = payload.issues.concat(${I}.issues.map(iss => ({
|
|
43
|
+
...iss,
|
|
44
|
+
path: iss.path ? [${P}, ...iss.path] : [${P}]
|
|
45
|
+
})));
|
|
46
|
+
}
|
|
47
|
+
if (!${I}_present && !${I}.issues.length) {
|
|
48
|
+
payload.issues.push({
|
|
49
|
+
code: "invalid_type",
|
|
50
|
+
expected: "nonoptional",
|
|
51
|
+
input: undefined,
|
|
52
|
+
path: [${P}]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (${I}_present) {
|
|
57
|
+
if (${I}.value === undefined) {
|
|
58
|
+
newResult[${P}] = undefined;
|
|
59
|
+
} else {
|
|
60
|
+
newResult[${P}] = ${I}.value;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
`)}m.write("payload.value = newResult;"),m.write("return payload;");const y=m.compile();return(b,I)=>y(p,b,I)};let i;const a=an,s=!Nn.jitless,u=s&&gu.value,l=t.catchall;let d;e._zod.parse=(p,m)=>{d??(d=o.value);const h=p.value;return a(h)?s&&u&&m?.async===!1&&m.jitless!==!0?(i||(i=n(t.shape)),p=i(p,m),l?wd([],h,p,m,d,e):p):r(p,m):(p.issues.push({expected:"object",code:"invalid_type",input:h,inst:e}),p)}});function Od(e,t,r,o){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const n=e.filter(i=>!qt(i));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>tt(a,o,Ae())))}),t)}const Fr=S("$ZodUnion",(e,t)=>{ee.init(e,t),oe(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),oe(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),oe(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),oe(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){const o=t.options.map(n=>n._zod.pattern);return new RegExp(`^(${o.map(n=>jr(n.source)).join("|")})$`)}});const r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1;const a=[];for(const s of t.options){const c=s._zod.run({value:o.value,issues:[]},n);if(c instanceof Promise)a.push(c),i=!0;else{if(c.issues.length===0)return c;a.push(c)}}return i?Promise.all(a).then(s=>Od(s,o,e,n)):Od(a,o,e,n)}});function xd(e,t,r,o){const n=e.filter(i=>i.issues.length===0);return n.length===1?(t.value=n[0].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(i=>i.issues.map(a=>tt(a,o,Ae())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1}),t)}const Td=S("$ZodXor",(e,t)=>{Fr.init(e,t),t.inclusive=!1;const r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(o,n)=>{if(r)return r(o,n);let i=!1;const a=[];for(const s of t.options){const c=s._zod.run({value:o.value,issues:[]},n);c instanceof Promise?(a.push(c),i=!0):a.push(c)}return i?Promise.all(a).then(s=>xd(s,o,e,n)):xd(a,o,e,n)}}),Pd=S("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Fr.init(e,t);const r=e._zod.parse;oe(e._zod,"propValues",()=>{const n={};for(const i of t.options){const a=i._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(i)}"`);for(const[s,c]of Object.entries(a)){n[s]||(n[s]=new Set);for(const u of c)n[s].add(u)}}return n});const o=jn(()=>{const n=t.options,i=new Map;for(const a of n){const 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(const c of s){if(i.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);i.set(c,a)}}return i});e._zod.parse=(n,i)=>{const a=n.value;if(!an(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),n;const s=o.value.get(a?.[t.discriminator]);return s?s._zod.run(n,i):t.unionFallback||i.direction==="backward"?r(n,i):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(o.value.keys()),input:a,path:[t.discriminator],inst:e}),n)}}),Ed=S("$ZodIntersection",(e,t)=>{ee.init(e,t),e._zod.parse=(r,o)=>{const n=r.value,i=t.left._zod.run({value:n,issues:[]},o),a=t.right._zod.run({value:n,issues:[]},o);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([c,u])=>zd(r,c,u)):zd(r,i,a)}});function Yi(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(Vt(e)&&Vt(t)){const r=Object.keys(t),o=Object.keys(e).filter(i=>r.indexOf(i)!==-1),n={...e,...t};for(const i of o){const a=Yi(e[i],t[i]);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};n[i]=a.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const r=[];for(let o=0;o<e.length;o++){const n=e[o],i=t[o],a=Yi(n,i);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function zd(e,t,r){const o=new Map;let n;for(const s of t.issues)if(s.code==="unrecognized_keys"){n??(n=s);for(const c of s.keys)o.has(c)||o.set(c,{}),o.get(c).l=!0}else e.issues.push(s);for(const s of r.issues)if(s.code==="unrecognized_keys")for(const c of s.keys)o.has(c)||o.set(c,{}),o.get(c).r=!0;else e.issues.push(s);const i=[...o].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(i.length&&n&&e.issues.push({...n,keys:i}),qt(e))return e;const a=Yi(t.value,r.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}const Xi=S("$ZodTuple",(e,t)=>{ee.init(e,t);const r=t.items;e._zod.parse=(o,n)=>{const i=o.value;if(!Array.isArray(i))return o.issues.push({input:i,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];const a=[],s=Nd(r,"optin"),c=Nd(r,"optout");if(!t.rest){if(i.length<s)return o.issues.push({code:"too_small",minimum:s,inclusive:!0,input:i,inst:e,origin:"array"}),o;i.length>r.length&&o.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:i,inst:e,origin:"array"})}const u=new Array(r.length);for(let l=0;l<r.length;l++){const d=r[l]._zod.run({value:i[l],issues:[]},n);d instanceof Promise?a.push(d.then(p=>{u[l]=p})):u[l]=d}if(t.rest){let l=r.length-1;const d=i.slice(r.length);for(const p of d){l++;const m=t.rest._zod.run({value:p,issues:[]},n);m instanceof Promise?a.push(m.then(h=>jd(h,o,l))):jd(m,o,l)}}return a.length?Promise.all(a).then(()=>Dd(u,o,r,i,c)):Dd(u,o,r,i,c)}});function Nd(e,t){for(let r=e.length-1;r>=0;r--)if(e[r]._zod[t]!=="optional")return r+1;return 0}function jd(e,t,r){e.issues.length&&t.issues.push(...ct(r,e.issues)),t.value[r]=e.value}function Dd(e,t,r,o,n){for(let i=0;i<r.length;i++){const a=e[i],s=i<o.length;if(a.issues.length){if(!s&&i>=n){t.value.length=i;break}t.issues.push(...ct(i,a.issues))}t.value[i]=a.value}for(let i=t.value.length-1;i>=o.length&&(r[i]._zod.optout==="optional"&&t.value[i]===void 0);i--)t.value.length=i;return t}const Cd=S("$ZodRecord",(e,t)=>{ee.init(e,t),e._zod.parse=(r,o)=>{const n=r.value;if(!Vt(n))return r.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),r;const i=[],a=t.keyType._zod.values;if(a){r.value={};const s=new Set;for(const u of a)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){s.add(typeof u=="number"?u.toString():u);const l=t.keyType._zod.run({value:u,issues:[]},o);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(l.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(m=>tt(m,o,Ae())),input:u,path:[u],inst:e});continue}const d=l.value,p=t.valueType._zod.run({value:n[u],issues:[]},o);p instanceof Promise?i.push(p.then(m=>{m.issues.length&&r.issues.push(...ct(u,m.issues)),r.value[d]=m.value})):(p.issues.length&&r.issues.push(...ct(u,p.issues)),r.value[d]=p.value)}let c;for(const u in n)s.has(u)||(c=c??[],c.push(u));c&&c.length>0&&r.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:c})}else{r.value={};for(const s of Reflect.ownKeys(n)){if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(n,s))continue;let c=t.keyType._zod.run({value:s,issues:[]},o);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&Li.test(s)&&c.issues.length){const d=t.keyType._zod.run({value:Number(s),issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(c=d)}if(c.issues.length){t.mode==="loose"?r.value[s]=n[s]:r.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>tt(d,o,Ae())),input:s,path:[s],inst:e});continue}const l=t.valueType._zod.run({value:n[s],issues:[]},o);l instanceof Promise?i.push(l.then(d=>{d.issues.length&&r.issues.push(...ct(s,d.issues)),r.value[c.value]=d.value})):(l.issues.length&&r.issues.push(...ct(s,l.issues)),r.value[c.value]=l.value)}}return i.length?Promise.all(i).then(()=>r):r}}),Rd=S("$ZodMap",(e,t)=>{ee.init(e,t),e._zod.parse=(r,o)=>{const n=r.value;if(!(n instanceof Map))return r.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),r;const i=[];r.value=new Map;for(const[a,s]of n){const c=t.keyType._zod.run({value:a,issues:[]},o),u=t.valueType._zod.run({value:s,issues:[]},o);c instanceof Promise||u instanceof Promise?i.push(Promise.all([c,u]).then(([l,d])=>{Ad(l,d,r,a,n,e,o)})):Ad(c,u,r,a,n,e,o)}return i.length?Promise.all(i).then(()=>r):r}});function Ad(e,t,r,o,n,i,a){e.issues.length&&(Cr.has(typeof o)?r.issues.push(...ct(o,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:i,issues:e.issues.map(s=>tt(s,a,Ae()))})),t.issues.length&&(Cr.has(typeof o)?r.issues.push(...ct(o,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:i,key:o,issues:t.issues.map(s=>tt(s,a,Ae()))})),r.value.set(e.value,t.value)}const Ud=S("$ZodSet",(e,t)=>{ee.init(e,t),e._zod.parse=(r,o)=>{const n=r.value;if(!(n instanceof Set))return r.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),r;const i=[];r.value=new Set;for(const a of n){const s=t.valueType._zod.run({value:a,issues:[]},o);s instanceof Promise?i.push(s.then(c=>Zd(c,r))):Zd(s,r)}return i.length?Promise.all(i).then(()=>r):r}});function Zd(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const Md=S("$ZodEnum",(e,t)=>{ee.init(e,t);const r=Oi(t.entries),o=new Set(r);e._zod.values=o,e._zod.pattern=new RegExp(`^(${r.filter(n=>Cr.has(typeof n)).map(n=>typeof n=="string"?xt(n):n.toString()).join("|")})$`),e._zod.parse=(n,i)=>{const a=n.value;return o.has(a)||n.issues.push({code:"invalid_value",values:r,input:a,inst:e}),n}}),Bd=S("$ZodLiteral",(e,t)=>{if(ee.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(o=>typeof o=="string"?xt(o):o?xt(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,n)=>{const i=o.value;return r.has(i)||o.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),o}}),Ld=S("$ZodFile",(e,t)=>{ee.init(e,t),e._zod.parse=(r,o)=>{const n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),Fd=S("$ZodTransform",(e,t)=>{ee.init(e,t),e._zod.optin="optional",e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new zr(e.constructor.name);const n=t.transform(r.value,r);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r.fallback=!0,r));if(n instanceof Promise)throw new Ft;return r.value=n,r.fallback=!0,r}});function Gd(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}const Qi=S("$ZodOptional",(e,t)=>{ee.init(e,t),e._zod.optin="optional",e._zod.optout="optional",oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),oe(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${jr(r.source)})?$`):void 0}),e._zod.parse=(r,o)=>{if(t.innerType._zod.optin==="optional"){const n=r.value,i=t.innerType._zod.run(r,o);return i instanceof Promise?i.then(a=>Gd(a,n)):Gd(i,n)}return r.value===void 0?r:t.innerType._zod.run(r,o)}}),Vd=S("$ZodExactOptional",(e,t)=>{Qi.init(e,t),oe(e._zod,"values",()=>t.innerType._zod.values),oe(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(r,o)=>t.innerType._zod.run(r,o)}),qd=S("$ZodNullable",(e,t)=>{ee.init(e,t),oe(e._zod,"optin",()=>t.innerType._zod.optin),oe(e._zod,"optout",()=>t.innerType._zod.optout),oe(e._zod,"pattern",()=>{const r=t.innerType._zod.pattern;return r?new RegExp(`^(${jr(r.source)}|null)$`):void 0}),oe(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,o)=>r.value===null?r:t.innerType._zod.run(r,o)}),Jd=S("$ZodDefault",(e,t)=>{ee.init(e,t),e._zod.optin="optional",oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);if(r.value===void 0)return r.value=t.defaultValue,r;const n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>Hd(i,t)):Hd(n,t)}});function Hd(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const Kd=S("$ZodPrefault",(e,t)=>{ee.init(e,t),e._zod.optin="optional",oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>(o.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,o))}),Wd=S("$ZodNonOptional",(e,t)=>{ee.init(e,t),oe(e._zod,"values",()=>{const r=t.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),e._zod.parse=(r,o)=>{const n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>Yd(i,e)):Yd(n,e)}});function Yd(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const Xd=S("$ZodSuccess",(e,t)=>{ee.init(e,t),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new zr("ZodSuccess");const n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.issues.length===0,r)):(r.value=n.issues.length===0,r)}}),Qd=S("$ZodCatch",(e,t)=>{ee.init(e,t),e._zod.optin="optional",oe(e._zod,"optout",()=>t.innerType._zod.optout),oe(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);const n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(i=>(r.value=i.value,i.issues.length&&(r.value=t.catchValue({...r,error:{issues:i.issues.map(a=>tt(a,o,Ae()))},input:r.value}),r.issues=[],r.fallback=!0),r)):(r.value=n.value,n.issues.length&&(r.value=t.catchValue({...r,error:{issues:n.issues.map(i=>tt(i,o,Ae()))},input:r.value}),r.issues=[],r.fallback=!0),r)}}),em=S("$ZodNaN",(e,t)=>{ee.init(e,t),e._zod.parse=(r,o)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),ea=S("$ZodPipe",(e,t)=>{ee.init(e,t),oe(e._zod,"values",()=>t.in._zod.values),oe(e._zod,"optin",()=>t.in._zod.optin),oe(e._zod,"optout",()=>t.out._zod.optout),oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if(o.direction==="backward"){const i=t.out._zod.run(r,o);return i instanceof Promise?i.then(a=>Gr(a,t.in,o)):Gr(i,t.in,o)}const n=t.in._zod.run(r,o);return n instanceof Promise?n.then(i=>Gr(i,t.out,o)):Gr(n,t.out,o)}});function Gr(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},r)}const ta=S("$ZodCodec",(e,t)=>{ee.init(e,t),oe(e._zod,"values",()=>t.in._zod.values),oe(e._zod,"optin",()=>t.in._zod.optin),oe(e._zod,"optout",()=>t.out._zod.optout),oe(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,o)=>{if((o.direction||"forward")==="forward"){const i=t.in._zod.run(r,o);return i instanceof Promise?i.then(a=>Vr(a,t,o)):Vr(i,t,o)}else{const i=t.out._zod.run(r,o);return i instanceof Promise?i.then(a=>Vr(a,t,o)):Vr(i,t,o)}}});function Vr(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){const n=t.transform(e.value,e);return n instanceof Promise?n.then(i=>qr(e,i,t.out,r)):qr(e,n,t.out,r)}else{const n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(i=>qr(e,i,t.in,r)):qr(e,n,t.in,r)}}function qr(e,t,r,o){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},o)}const tm=S("$ZodPreprocess",(e,t)=>{ea.init(e,t)}),nm=S("$ZodReadonly",(e,t)=>{ee.init(e,t),oe(e._zod,"propValues",()=>t.innerType._zod.propValues),oe(e._zod,"values",()=>t.innerType._zod.values),oe(e._zod,"optin",()=>t.innerType?._zod?.optin),oe(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(r,o)=>{if(o.direction==="backward")return t.innerType._zod.run(r,o);const n=t.innerType._zod.run(r,o);return n instanceof Promise?n.then(rm):rm(n)}});function rm(e){return e.value=Object.freeze(e.value),e}const om=S("$ZodTemplateLiteral",(e,t)=>{ee.init(e,t);const r=[];for(const o of t.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);const n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw new Error(`Invalid template literal part: ${o._zod.traits}`);const i=n.startsWith("^")?1:0,a=n.endsWith("$")?n.length-1:n.length;r.push(n.slice(i,a))}else if(o===null||vu.has(typeof o))r.push(xt(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(o,n)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),o)}),im=S("$ZodFunction",(e,t)=>(ee.init(e,t),e._def=t,e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return function(...o){const n=e._def.input?Ur(e._def.input,o):o,i=Reflect.apply(r,this,n);return e._def.output?Ur(e._def.output,i):i}},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){const n=e._def.input?await Zr(e._def.input,o):o,i=await Reflect.apply(r,this,n);return e._def.output?await Zr(e._def.output,i):i}},e._zod.parse=(r,o)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{const o=e.constructor;return Array.isArray(r[0])?new o({type:"function",input:new Xi({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new o({type:"function",input:r[0],output:e._def.output})},e.output=r=>{const o=e.constructor;return new o({type:"function",input:e._def.input,output:r})},e)),am=S("$ZodPromise",(e,t)=>{ee.init(e,t),e._zod.parse=(r,o)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},o))}),sm=S("$ZodLazy",(e,t)=>{ee.init(e,t),oe(e._zod,"innerType",()=>{const r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),oe(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),oe(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),oe(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),oe(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(r,o)=>e._zod.innerType._zod.run(r,o)}),cm=S("$ZodCustom",(e,t)=>{Te.init(e,t),ee.init(e,t),e._zod.parse=(r,o)=>r,e._zod.check=r=>{const o=r.value,n=t.fn(o);if(n instanceof Promise)return n.then(i=>um(i,r,o,e));um(n,r,o,e)}});function um(e,t,r,o){if(!e){const n={code:"custom",input:r,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(n.params=o._zod.def.params),t.issues.push(sn(n))}}const By=()=>{const 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(n){return e[n]??null}const r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.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 ${n.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 ${i}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return n.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 ${K(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.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 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${i} ${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${i} ${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:i.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${i.suffix}"`:i.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${i.includes}"`:i.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${i.pattern}`:`${r[i.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${D(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.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 ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function Ly(){return{localeError:By()}}const Fy=()=>{const 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(n){return e[n]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${i}, daxil olan ${s}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${K(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${i.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:i.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${i.suffix}" il\u0259 bitm\u0259lidir`:i.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${i.includes}" daxil olmal\u0131d\u0131r`:i.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${i.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[i.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${D(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function Gy(){return{localeError:Fy()}}function lm(e,t,r,o){const n=Math.abs(e),i=n%10,a=n%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?r:o}const Vy=()=>{const 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(n){return e[n]??null}const r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${n.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 ${i}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return n.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 ${K(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);if(a){const s=Number(n.maximum),c=lm(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 ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${n.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 ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);if(a){const s=Number(n.minimum),c=lm(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 ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${i}${n.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 ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[i.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${D(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.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 ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function qy(){return{localeError:Vy()}}const Jy=()=>{const 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(n){return e[n]??null}const r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${n.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 ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${K(n.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${n.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 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${i}${n.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;if(i.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${i.prefix}"`;if(i.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${i.suffix}"`;if(i.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${i.includes}"`;if(i.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${i.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return i.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),i.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),i.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${r[i.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${n.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u043E\u0432\u0435":""}: ${D(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${n.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 ${n.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function Hy(){return{localeError:Jy()}}const Ky=()=>{const e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}const r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${i}, s'ha rebut ${s}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${K(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${D(n.values," o ")}`;case"too_big":{const i=n.inclusive?"com a m\xE0xim":"menys de",a=t(n.origin);return a?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${i} ${n.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${i} ${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${i} ${n.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${i} ${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${i.prefix}"`:i.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${i.suffix}"`:i.format==="includes"?`Format inv\xE0lid: ha d'incloure "${i.includes}"`:i.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${i.pattern}`:`Format inv\xE0lid per a ${r[i.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${D(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}};function Wy(){return{localeError:Ky()}}const Yy=()=>{const 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(n){return e[n]??null}const r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${i}, obdr\u017Eeno ${s}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${K(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${i}${n.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${i.prefix}"`:i.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${i.suffix}"`:i.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${i.includes}"`:i.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${i.pattern}`:`Neplatn\xFD form\xE1t ${r[i.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${D(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}};function Xy(){return{localeError:Yy()}}const Qy=()=>{const e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}const r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${s}`:`Ugyldigt input: forventede ${i}, fik ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${K(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin),s=o[n.origin]??n.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${i} ${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${i} ${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin),s=o[n.origin]??n.origin;return a?`For lille: forventede ${s} ${a.verb} ${i} ${n.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${i} ${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Ugyldig streng: skal starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: skal ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: skal indeholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${D(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${n.origin}`;default:return"Ugyldigt input"}}};function e_(){return{localeError:Qy()}}const t_=()=>{const 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(n){return e[n]??null}const r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},o={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${i}, erhalten ${s}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${K(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${i}${n.maximum.toString()} ist`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${i}${n.minimum.toString()} ist`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Ung\xFCltiger String: muss mit "${i.prefix}" beginnen`:i.format==="ends_with"?`Ung\xFCltiger String: muss mit "${i.suffix}" enden`:i.format==="includes"?`Ung\xFCltiger String: muss "${i.includes}" enthalten`:i.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${i.pattern} entsprechen`:`Ung\xFCltig: ${r[i.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${D(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}};function n_(){return{localeError:t_()}}const r_=()=>{const 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(n){return e[n]??null}const r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return typeof n.expected=="string"&&/^[A-Z]/.test(n.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 ${n.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 ${i}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return n.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 ${K(n.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${n.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 ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${i}${n.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${i.prefix}"`:i.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${i.suffix}"`:i.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${i.includes}"`:i.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${i.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[i.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${n.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${n.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${D(n.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${n.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 ${n.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function o_(){return{localeError:r_()}}const i_=()=>{const 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(n){return e[n]??null}const r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return`Invalid input: expected ${i}, received ${s}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${K(n.values[0])}`:`Invalid option: expected one of ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Too big: expected ${n.origin??"value"} to have ${i}${n.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Too small: expected ${n.origin} to have ${i}${n.minimum.toString()} ${a.unit}`:`Too small: expected ${n.origin} to be ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Invalid string: must start with "${i.prefix}"`:i.format==="ends_with"?`Invalid string: must end with "${i.suffix}"`:i.format==="includes"?`Invalid string: must include "${i.includes}"`:i.format==="regex"?`Invalid string: must match pattern ${i.pattern}`:`Invalid ${r[i.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${D(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`Invalid discriminator value. Expected ${n.options.map(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function dm(){return{localeError:i_()}}const a_=()=>{const e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}const r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${i}, ricevi\u011Dis ${s}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${K(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${i}${n.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${i.prefix}"`:i.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${i.suffix}"`:i.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${i.includes}"`:i.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${i.pattern}`:`Nevalida ${r[i.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${D(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};function s_(){return{localeError:a_()}}const c_=()=>{const e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}const r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${i}, recibido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${K(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${i}${n.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${i}${n.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${i.prefix}"`:i.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${i.suffix}"`:i.format==="includes"?`Cadena inv\xE1lida: debe incluir "${i.includes}"`:i.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${i.pattern}`:`Inv\xE1lido ${r[i.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${D(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}};function u_(){return{localeError:c_()}}const l_=()=>{const 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(n){return e[n]??null}const r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${n.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 ${i} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${K(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${D(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{const i=n;return i.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:i.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${i.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:i.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${i.includes}" \u0628\u0627\u0634\u062F`:i.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${i.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[i.format]??n.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 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${D(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.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 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function d_(){return{localeError:l_()}}const m_=()=>{const 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(n){return e[n]??null}const r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${i}, oli ${s}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${K(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${i}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${i}${n.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${i.prefix}"`:i.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${i.suffix}"`:i.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${i.includes}"`:i.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${i.pattern}`:`Virheellinen ${r[i.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${D(n.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 p_(){return{localeError:m_()}}const f_=()=>{const 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(n){return e[n]??null}const r={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instanceof ${n.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${i} attendu, ${s} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${K(n.values[0])} attendu`:`Option invalide : une valeur parmi ${D(n.values,"|")} attendue`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Trop grand : ${o[n.origin]??"valeur"} doit ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o[n.origin]??"valeur"} doit \xEAtre ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Trop petit : ${o[n.origin]??"valeur"} doit ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Trop petit : ${o[n.origin]??"valeur"} doit \xEAtre ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${i.pattern}`:`${r[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${D(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function h_(){return{localeError:f_()}}const g_=()=>{const 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(n){return e[n]??null}const r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${i}, re\xE7u ${s}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${K(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"\u2264":"<",a=t(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${i}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?"\u2265":">",a=t(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${i}${n.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${n.origin} soit ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${i.prefix}"`:i.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${i.suffix}"`:i.format==="includes"?`Cha\xEEne invalide : doit inclure "${i.includes}"`:i.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${i.pattern}`:`${r[i.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${D(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function v_(){return{localeError:g_()}}const y_=()=>{const 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"}},r=u=>u?e[u]:void 0,o=u=>{const l=r(u);return l?l.label:u??e.unknown.label},n=u=>`\u05D4${o(u)}`,i=u=>(r(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":{const l=u.expected,d=c[l??""]??o(l),p=X(u.input),m=c[p]??e[p]?.label??p;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 ${m}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${m}`}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 ${K(u.values[0])}`;const l=u.values.map(m=>K(m));if(u.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l[0]} \u05D0\u05D5 ${l[1]}`;const d=l[l.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${l.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{const l=a(u.origin),d=n(u.origin??"value");if(u.origin==="string")return`${l?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.maximum.toString()} ${l?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(u.origin==="number"){const h=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: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(u.origin==="array"||u.origin==="set"){const h=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",$=u.inclusive?`${u.maximum} ${l?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${u.maximum} ${l?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${$}`.trim()}const p=u.inclusive?"<=":"<",m=i(u.origin??"value");return l?.unit?`${l.longLabel} \u05DE\u05D3\u05D9: ${d} ${m} ${p}${u.maximum.toString()} ${l.unit}`:`${l?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${m} ${p}${u.maximum.toString()}`}case"too_small":{const l=a(u.origin),d=n(u.origin??"value");if(u.origin==="string")return`${l?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.minimum.toString()} ${l?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(u.origin==="number"){const h=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: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${h}`}if(u.origin==="array"||u.origin==="set"){const h=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){const g=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${g}`}const $=u.inclusive?`${u.minimum} ${l?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${u.minimum} ${l?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${h} \u05DC\u05D4\u05DB\u05D9\u05DC ${$}`.trim()}const p=u.inclusive?">=":">",m=i(u.origin??"value");return l?.unit?`${l.shortLabel} \u05DE\u05D3\u05D9: ${d} ${m} ${p}${u.minimum.toString()} ${l.unit}`:`${l?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${m} ${p}${u.minimum.toString()}`}case"invalid_format":{const l=u;if(l.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${l.prefix}"`;if(l.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${l.suffix}"`;if(l.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${l.includes}"`;if(l.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${l.pattern}`;const d=s[l.format],p=d?.label??l.format,h=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${p} \u05DC\u05D0 ${h}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${u.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${u.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${u.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${D(u.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${n(u.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function __(){return{localeError:y_()}}const $_=()=>{const e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(n){return e[n]??null}const r={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},o={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${n.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${i}, a primljeno je ${s}`}case"invalid_value":return n.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${K(n.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${i}${n.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin),s=o[n.origin]??n.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${i}${n.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${i.prefix}"`:i.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${i.suffix}"`:i.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${i.includes}"`:i.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${i.pattern}`:`Neispravna ${r[i.format]??n.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${n.divisor}`;case"unrecognized_keys":return`Neprepoznat${n.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${D(n.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${o[n.origin]??n.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${o[n.origin]??n.origin}`;default:return"Neispravan unos"}}};function b_(){return{localeError:$_()}}const k_=()=>{const e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}const r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${i}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${K(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${i}${n.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${i}${n.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`\xC9rv\xE9nytelen string: "${i.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:i.format==="ends_with"?`\xC9rv\xE9nytelen string: "${i.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:i.format==="includes"?`\xC9rv\xE9nytelen string: "${i.includes}" \xE9rt\xE9ket kell tartalmaznia`:i.format==="regex"?`\xC9rv\xE9nytelen string: ${i.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[i.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${D(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function S_(){return{localeError:k_()}}function mm(e,t,r){return Math.abs(e)===1?t:r}function un(e){if(!e)return"";const t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}const w_=()=>{const 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(n){return e[n]??null}const r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.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 ${n.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 ${i}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return n.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 ${K(n.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);if(a){const s=Number(n.maximum),c=mm(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 ${un(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.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 ${un(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);if(a){const s=Number(n.minimum),c=mm(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 ${un(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${i}${n.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 ${un(n.origin)} \u056C\u056B\u0576\u056B ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${i.prefix}"-\u0578\u057E`:i.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${i.suffix}"-\u0578\u057E`:i.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${i.includes}"`:i.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${i.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[i.format]??n.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 ${n.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${n.keys.length>1?"\u0576\u0565\u0580":""}. ${D(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${un(n.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 ${un(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function I_(){return{localeError:w_()}}const O_=()=>{const e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}const r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${i}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${K(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${i}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${i}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`String tidak valid: harus dimulai dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak valid: harus berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak valid: harus menyertakan "${i.includes}"`:i.format==="regex"?`String tidak valid: harus sesuai pola ${i.pattern}`:`${r[i.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${D(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function x_(){return{localeError:O_()}}const T_=()=>{const 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(n){return e[n]??null}const r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${i}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${K(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${i}${n.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${i}${n.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${i.prefix}"`:i.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${i.suffix}"`:i.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${i.includes}"`:i.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${i.pattern}`:`Rangt ${r[i.format]??n.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${D(n.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${n.origin}`;default:return"Rangt gildi"}}};function P_(){return{localeError:T_()}}const E_=()=>{const e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}const r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${s}`:`Input non valido: atteso ${i}, ricevuto ${s}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${K(n.values[0])}`:`Opzione non valida: atteso uno tra ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${i}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${i}${n.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${n.origin} deve essere ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Stringa non valida: deve iniziare con "${i.prefix}"`:i.format==="ends_with"?`Stringa non valida: deve terminare con "${i.suffix}"`:i.format==="includes"?`Stringa non valida: deve includere "${i.includes}"`:i.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${i.pattern}`:`Input non valido: ${r[i.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${D(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function z_(){return{localeError:E_()}}const N_=()=>{const 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(n){return e[n]??null}const r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.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: ${i}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${K(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${D(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{const i=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(n.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${a.unit??"\u8981\u7D20"}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{const i=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(n.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${a.unit}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${i}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{const i=n;return i.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${i.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:i.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${i.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[i.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.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${n.keys.length>1?"\u7FA4":""}: ${D(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function j_(){return{localeError:N_()}}const D_=()=>{const 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(n){return e[n]??null}const r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.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 ${n.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 ${i}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return n.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 ${K(n.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${D(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${i}${n.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 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.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 ${n.origin} ${a.verb} ${i}${n.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 ${n.origin} \u10D8\u10E7\u10DD\u10E1 ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.prefix}"-\u10D8\u10D7`:i.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${i.suffix}"-\u10D8\u10D7`:i.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${i.includes}"-\u10E1`:i.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${i.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[i.format]??n.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 ${n.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${n.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${D(n.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${n.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 ${n.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function C_(){return{localeError:D_()}}const R_=()=>{const 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(n){return e[n]??null}const r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},o={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.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 ${n.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 ${i} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return n.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 ${K(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${i} ${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${i} ${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${i.prefix}"`:i.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${i.suffix}"`:i.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${i.includes}"`:i.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${i.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[i.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${D(n.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 ${n.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 ${n.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 pm(){return{localeError:R_()}}function A_(){return pm()}const U_=()=>{const 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(n){return e[n]??null}const r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${i}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${K(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${D(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{const i=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=i==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${i}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${i}${a}`}case"too_small":{const i=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=i==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${i}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${i}${a}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:i.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${i.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:i.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${i.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[i.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${D(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function Z_(){return{localeError:U_()}}const Fn=e=>e.charAt(0).toUpperCase()+e.slice(1);function fm(e){const t=Math.abs(e),r=t%10,o=t%100;return o>=11&&o<=19||r===0?"many":r===1?"one":"few"}const M_=()=>{const 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(n,i,a,s){const c=e[n]??null;return c===null?c:{unit:c.unit[i],verb:c.verb[s][a?"inclusive":"notInclusive"]}}const r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},o={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${i}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${K(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${D(n.values,"|")} pasirinkim\u0173`;case"too_big":{const i=o[n.origin]??n.origin,a=t(n.origin,fm(Number(n.maximum)),n.inclusive??!1,"smaller");if(a?.verb)return`${Fn(i??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.maximum.toString()} ${a.unit??"element\u0173"}`;const s=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Fn(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.maximum.toString()} ${a?.unit}`}case"too_small":{const i=o[n.origin]??n.origin,a=t(n.origin,fm(Number(n.minimum)),n.inclusive??!1,"bigger");if(a?.verb)return`${Fn(i??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.minimum.toString()} ${a.unit??"element\u0173"}`;const s=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Fn(i??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.minimum.toString()} ${a?.unit}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${i.prefix}"`:i.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${i.suffix}"`:i.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${i.includes}"`:i.format==="regex"?`Eilut\u0117 privalo atitikti ${i.pattern}`:`Neteisingas ${r[i.format]??n.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${D(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{const i=o[n.origin]??n.origin;return`${Fn(i??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function B_(){return{localeError:M_()}}const L_=()=>{const 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(n){return e[n]??null}const r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${n.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 ${i}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${K(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.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 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${i}${n.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${i.pattern}`:`Invalid ${r[i.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${D(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.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 ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function F_(){return{localeError:L_()}}const G_=()=>{const e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}const r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${s}`:`Input tidak sah: dijangka ${i}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${K(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`String tidak sah: mesti bermula dengan "${i.prefix}"`:i.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${i.suffix}"`:i.format==="includes"?`String tidak sah: mesti mengandungi "${i.includes}"`:i.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${i.pattern}`:`${r[i.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${D(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function V_(){return{localeError:G_()}}const q_=()=>{const e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}const r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},o={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${i}, ontving ${s}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${K(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin),s=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin??"waarde"} ${i}${n.maximum.toString()} is`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin),s=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin} ${i}${n.minimum.toString()} is`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Ongeldige tekst: moet met "${i.prefix}" beginnen`:i.format==="ends_with"?`Ongeldige tekst: moet op "${i.suffix}" eindigen`:i.format==="includes"?`Ongeldige tekst: moet "${i.includes}" bevatten`:i.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${i.pattern}`:`Ongeldig: ${r[i.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${D(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function J_(){return{localeError:q_()}}const H_=()=>{const 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(n){return e[n]??null}const r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${s}`:`Ugyldig input: forventet ${i}, fikk ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${K(n.values[0])}`:`Ugyldig valg: forventet en av ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${i.prefix}"`:i.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${i.suffix}"`:i.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${i.includes}"`:i.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${i.pattern}`:`Ugyldig ${r[i.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${D(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function K_(){return{localeError:H_()}}const W_=()=>{const 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(n){return e[n]??null}const r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${i}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${K(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${i}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${i}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{const i=n;return i.format==="starts_with"?`F\xE2sit metin: "${i.prefix}" ile ba\u015Flamal\u0131.`:i.format==="ends_with"?`F\xE2sit metin: "${i.suffix}" ile bitmeli.`:i.format==="includes"?`F\xE2sit metin: "${i.includes}" ihtiv\xE2 etmeli.`:i.format==="regex"?`F\xE2sit metin: ${i.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[i.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${D(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function Y_(){return{localeError:W_()}}const X_=()=>{const 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(n){return e[n]??null}const r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${n.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 ${i} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${K(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${D(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${i}${n.maximum.toString()} \u0648\u064A`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${i}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{const i=n;return i.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:i.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${i.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:i.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${i.includes}" \u0648\u0644\u0631\u064A`:i.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${i.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[i.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${D(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.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 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function Q_(){return{localeError:X_()}}const e$=()=>{const 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(n){return e[n]??null}const r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},o={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${i}, otrzymano ${s}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${K(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${i}${n.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${i.prefix}"`:i.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${i.suffix}"`:i.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${i.includes}"`:i.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${i.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[i.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${D(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function t$(){return{localeError:e$()}}const n$=()=>{const e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(n){return e[n]??null}const r={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Tipo inv\xE1lido: esperado instanceof ${n.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${i}, recebido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: esperado ${K(n.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${i}${n.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Muito pequeno: esperado que ${n.origin} tivesse ${i}${n.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${i.prefix}"`:i.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${i.suffix}"`:i.format==="includes"?`Texto inv\xE1lido: deve incluir "${i.includes}"`:i.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${i.pattern}`:`${r[i.format]??n.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${D(n.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${n.origin}`;default:return"Campo inv\xE1lido"}}};function r$(){return{localeError:n$()}}const o$=()=>{const 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(n){return e[n]??null}const r={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},o={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${i}, primit ${s}`}case"invalid_value":return n.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${K(n.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} s\u0103 fie ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Prea mic: a\u0219teptat ca ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${n.origin} s\u0103 fie ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${i.prefix}"`:i.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${i.suffix}"`:i.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${i.includes}"`:i.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${i.pattern}`:`Format invalid: ${r[i.format]??n.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${n.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${D(n.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${n.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${n.origin}`;default:return"Intrare invalid\u0103"}}};function i$(){return{localeError:o$()}}function hm(e,t,r,o){const n=Math.abs(e),i=n%10,a=n%100;return a>=11&&a<=19?o:i===1?t:i>=2&&i<=4?r:o}const a$=()=>{const 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(n){return e[n]??null}const r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${n.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 ${i}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${K(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);if(a){const s=Number(n.maximum),c=hm(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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);if(a){const s=Number(n.minimum),c=hm(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 ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${i}${n.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 ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[i.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${D(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.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 ${n.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 s$(){return{localeError:a$()}}const c$=()=>{const e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}const r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${i}, prejeto ${s}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${K(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${i}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${i}${n.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${i.prefix}"`:i.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${i.suffix}"`:i.format==="includes"?`Neveljaven niz: mora vsebovati "${i.includes}"`:i.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${i.pattern}`:`Neveljaven ${r[i.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${D(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function u$(){return{localeError:c$()}}const l$=()=>{const 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(n){return e[n]??null}const r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${i}, fick ${s}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${K(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${i.prefix}"`:i.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${i.suffix}"`:i.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${i.includes}"`:i.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${i.pattern}"`:`Ogiltig(t) ${r[i.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${D(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function d$(){return{localeError:l$()}}const m$=()=>{const 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(n){return e[n]??null}const r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.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 ${n.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 ${i}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return n.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 ${K(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${D(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.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 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${i}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.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 ${n.origin} ${i}${n.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 ${n.origin} ${i}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{const i=n;return i.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${i.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:i.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${i.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.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${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${D(n.keys,", ")}`;case"invalid_key":return`${n.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`${n.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 p$(){return{localeError:m$()}}const f$=()=>{const 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(n){return e[n]??null}const r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},o={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.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 ${n.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 ${i} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${K(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${i} ${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${i.prefix}"`:i.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${i.suffix}"`:i.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${i.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:i.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${i.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[i.format]??n.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 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${D(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.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 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function h$(){return{localeError:f$()}}const g$=()=>{const 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(n){return e[n]??null}const r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${i}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${K(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Ge\xE7ersiz metin: "${i.prefix}" ile ba\u015Flamal\u0131`:i.format==="ends_with"?`Ge\xE7ersiz metin: "${i.suffix}" ile bitmeli`:i.format==="includes"?`Ge\xE7ersiz metin: "${i.includes}" i\xE7ermeli`:i.format==="regex"?`Ge\xE7ersiz metin: ${i.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[i.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${D(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function v$(){return{localeError:g$()}}const y$=()=>{const 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(n){return e[n]??null}const r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.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 ${n.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 ${i}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return n.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 ${K(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${i}${n.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 ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.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 ${n.origin} ${a.verb} ${i}${n.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 ${n.origin} \u0431\u0443\u0434\u0435 ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${i.prefix}"`:i.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${i.suffix}"`:i.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${i.includes}"`:i.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${i.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[i.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${D(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.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 ${n.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 gm(){return{localeError:y$()}}function _$(){return gm()}const $$=()=>{const 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(n){return e[n]??null}const r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${n.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: ${i} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${K(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${D(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${i}${n.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: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${i}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${i}${n.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${i}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{const i=n;return i.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${i.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:i.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${i.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.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${n.keys.length>1?"\u0632":""}: ${D(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function b$(){return{localeError:$$()}}const k$=()=>{const 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(n){return e[n]??null}const r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},o={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${i}, qabul qilingan ${s}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${K(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${i.prefix}" bilan boshlanishi kerak`:i.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${i.suffix}" bilan tugashi kerak`:i.format==="includes"?`Noto\u2018g\u2018ri satr: "${i.includes}" ni o\u2018z ichiga olishi kerak`:i.format==="regex"?`Noto\u2018g\u2018ri satr: ${i.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[i.format]??n.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${n.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${n.keys.length>1?"lar":""}: ${D(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${n.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function S$(){return{localeError:k$()}}const w$=()=>{const 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(n){return e[n]??null}const r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${i}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${K(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${i}${n.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${a.verb} ${i}${n.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${i.prefix}"`:i.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${i.suffix}"`:i.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${i.includes}"`:i.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${i.pattern}`:`${r[i.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${D(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.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 ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function I$(){return{localeError:w$()}}const O$=()=>{const 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(n){return e[n]??null}const r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${i}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${K(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.prefix}" \u5F00\u5934`:i.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${i.suffix}" \u7ED3\u5C3E`:i.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${i.pattern}`:`\u65E0\u6548${r[i.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${D(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function x$(){return{localeError:O$()}}const T$=()=>{const 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(n){return e[n]??null}const r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},o={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${i}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${K(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${i}${n.maximum.toString()}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${i}${n.minimum.toString()}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.prefix}" \u958B\u982D`:i.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${i.suffix}" \u7D50\u5C3E`:i.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${i.includes}"`:i.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${i.pattern}`:`\u7121\u6548\u7684 ${r[i.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${D(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function P$(){return{localeError:T$()}}const E$=()=>{const 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(n){return e[n]??null}const r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{switch(n.code){case"invalid_type":{const i=o[n.expected]??n.expected,a=X(n.input),s=o[a]??a;return/^[A-Z]/.test(n.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${i}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${K(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${D(n.values,"|")}`;case"too_big":{const i=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${a.verb} ${i}${n.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.maximum}`}case"too_small":{const i=n.inclusive?">=":">",a=t(n.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${a.verb} ${i}${n.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${i}${n.minimum}`}case"invalid_format":{const i=n;return i.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${i.prefix}"`:i.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${i.suffix}"`:i.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${i.includes}"`:i.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${i.pattern}`:`A\u1E63\xEC\u1E63e: ${r[i.format]??n.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 ${n.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${D(n.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.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 ${n.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function z$(){return{localeError:E$()}}var vm=Object.freeze({__proto__:null,ar:Ly,az:Gy,be:qy,bg:Hy,ca:Wy,cs:Xy,da:e_,de:n_,el:o_,en:dm,eo:s_,es:u_,fa:d_,fi:p_,fr:h_,frCA:v_,he:__,hr:b_,hu:S_,hy:I_,id:x_,is:P_,it:z_,ja:j_,ka:C_,kh:A_,km:pm,ko:Z_,lt:B_,mk:F_,ms:V_,nl:J_,no:K_,ota:Y_,pl:t$,ps:Q_,pt:r$,ro:i$,ru:s$,sl:u$,sv:d$,ta:p$,th:h$,tr:v$,ua:_$,uk:gm,ur:b$,uz:S$,vi:I$,yo:z$,zhCN:x$,zhTW:P$}),ym;const _m=Symbol("ZodOutput"),$m=Symbol("ZodInput");class bm{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){const o=r[0];return this._map.set(t,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){const r=t._zod.parent;if(r){const o={...this.get(r)??{}};delete o.id;const n={...o,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function na(){return new bm}(ym=globalThis).__zod_globalRegistry??(ym.__zod_globalRegistry=na());const ut=globalThis.__zod_globalRegistry;function km(e,t){return new e({type:"string",...z(t)})}function Sm(e,t){return new e({type:"string",coerce:!0,...z(t)})}function ra(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...z(t)})}function Jr(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...z(t)})}function oa(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...z(t)})}function ia(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...z(t)})}function aa(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...z(t)})}function sa(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...z(t)})}function Hr(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...z(t)})}function ca(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...z(t)})}function ua(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...z(t)})}function la(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...z(t)})}function da(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...z(t)})}function ma(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...z(t)})}function pa(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...z(t)})}function fa(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...z(t)})}function ha(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...z(t)})}function ga(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...z(t)})}function wm(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...z(t)})}function va(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...z(t)})}function ya(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...z(t)})}function _a(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...z(t)})}function $a(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...z(t)})}function ba(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...z(t)})}function ka(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...z(t)})}const Im={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Om(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...z(t)})}function xm(e,t){return new e({type:"string",format:"date",check:"string_format",...z(t)})}function Tm(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...z(t)})}function Pm(e,t){return new e({type:"string",format:"duration",check:"string_format",...z(t)})}function Em(e,t){return new e({type:"number",checks:[],...z(t)})}function zm(e,t){return new e({type:"number",coerce:!0,checks:[],...z(t)})}function Nm(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...z(t)})}function jm(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...z(t)})}function Dm(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...z(t)})}function Cm(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...z(t)})}function Rm(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...z(t)})}function Am(e,t){return new e({type:"boolean",...z(t)})}function Um(e,t){return new e({type:"boolean",coerce:!0,...z(t)})}function Zm(e,t){return new e({type:"bigint",...z(t)})}function Mm(e,t){return new e({type:"bigint",coerce:!0,...z(t)})}function Bm(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...z(t)})}function Lm(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...z(t)})}function Fm(e,t){return new e({type:"symbol",...z(t)})}function Gm(e,t){return new e({type:"undefined",...z(t)})}function Vm(e,t){return new e({type:"null",...z(t)})}function qm(e){return new e({type:"any"})}function Jm(e){return new e({type:"unknown"})}function Hm(e,t){return new e({type:"never",...z(t)})}function Km(e,t){return new e({type:"void",...z(t)})}function Wm(e,t){return new e({type:"date",...z(t)})}function Ym(e,t){return new e({type:"date",coerce:!0,...z(t)})}function Xm(e,t){return new e({type:"nan",...z(t)})}function Dt(e,t){return new Gi({check:"less_than",...z(t),value:e,inclusive:!1})}function lt(e,t){return new Gi({check:"less_than",...z(t),value:e,inclusive:!0})}function Ct(e,t){return new Vi({check:"greater_than",...z(t),value:e,inclusive:!1})}function We(e,t){return new Vi({check:"greater_than",...z(t),value:e,inclusive:!0})}function Sa(e){return Ct(0,e)}function wa(e){return Dt(0,e)}function Ia(e){return lt(0,e)}function Oa(e){return We(0,e)}function ln(e,t){return new vl({check:"multiple_of",...z(t),value:e})}function dn(e,t){return new $l({check:"max_size",...z(t),maximum:e})}function Rt(e,t){return new bl({check:"min_size",...z(t),minimum:e})}function Gn(e,t){return new kl({check:"size_equals",...z(t),size:e})}function Vn(e,t){return new Sl({check:"max_length",...z(t),maximum:e})}function Jt(e,t){return new wl({check:"min_length",...z(t),minimum:e})}function qn(e,t){return new Il({check:"length_equals",...z(t),length:e})}function Kr(e,t){return new Ol({check:"string_format",format:"regex",...z(t),pattern:e})}function Wr(e){return new xl({check:"string_format",format:"lowercase",...z(e)})}function Yr(e){return new Tl({check:"string_format",format:"uppercase",...z(e)})}function Xr(e,t){return new Pl({check:"string_format",format:"includes",...z(t),includes:e})}function Qr(e,t){return new El({check:"string_format",format:"starts_with",...z(t),prefix:e})}function eo(e,t){return new zl({check:"string_format",format:"ends_with",...z(t),suffix:e})}function xa(e,t,r){return new jl({check:"property",property:e,schema:t,...z(r)})}function to(e,t){return new Dl({check:"mime_type",mime:e,...z(t)})}function Tt(e){return new Cl({check:"overwrite",tx:e})}function no(e){return Tt(t=>t.normalize(e))}function ro(){return Tt(e=>e.trim())}function oo(){return Tt(e=>e.toLowerCase())}function io(){return Tt(e=>e.toUpperCase())}function ao(){return Tt(e=>hu(e))}function Qm(e,t,r){return new e({type:"array",element:t,...z(r)})}function N$(e,t,r){return new e({type:"union",options:t,...z(r)})}function j$(e,t,r){return new e({type:"union",options:t,inclusive:!1,...z(r)})}function D$(e,t,r,o){return new e({type:"union",options:r,discriminator:t,...z(o)})}function C$(e,t,r){return new e({type:"intersection",left:t,right:r})}function R$(e,t,r,o){const n=r instanceof ee,i=n?o:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...z(i)})}function A$(e,t,r,o){return new e({type:"record",keyType:t,valueType:r,...z(o)})}function U$(e,t,r,o){return new e({type:"map",keyType:t,valueType:r,...z(o)})}function Z$(e,t,r){return new e({type:"set",valueType:t,...z(r)})}function M$(e,t,r){const o=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:o,...z(r)})}function B$(e,t,r){return new e({type:"enum",entries:t,...z(r)})}function L$(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...z(r)})}function ep(e,t){return new e({type:"file",...z(t)})}function F$(e,t){return new e({type:"transform",transform:t})}function G$(e,t){return new e({type:"optional",innerType:t})}function V$(e,t){return new e({type:"nullable",innerType:t})}function q$(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():Dr(r)}})}function J$(e,t,r){return new e({type:"nonoptional",innerType:t,...z(r)})}function H$(e,t){return new e({type:"success",innerType:t})}function K$(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:()=>r})}function W$(e,t,r){return new e({type:"pipe",in:t,out:r})}function Y$(e,t){return new e({type:"readonly",innerType:t})}function X$(e,t,r){return new e({type:"template_literal",parts:t,...z(r)})}function Q$(e,t){return new e({type:"lazy",getter:t})}function eb(e,t){return new e({type:"promise",innerType:t})}function tp(e,t,r){const o=z(r);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:t,...o})}function np(e,t,r){return new e({type:"custom",check:"custom",fn:t,...z(r)})}function rp(e,t){const r=op(o=>(o.addIssue=n=>{if(typeof n=="string")o.issues.push(sn(n,o.value,r._zod.def));else{const i=n;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=o.value),i.inst??(i.inst=r),i.continue??(i.continue=!r._zod.def.abort),o.issues.push(sn(i))}},e(o.value,o)),t);return r}function op(e,t){const r=new Te({check:"custom",...z(t)});return r._zod.check=e,r}function ip(e){const t=new Te({check:"describe"});return t._zod.onattach=[r=>{const o=ut.get(r)??{};ut.add(r,{...o,description:e})}],t._zod.check=()=>{},t}function ap(e){const t=new Te({check:"meta"});return t._zod.onattach=[r=>{const o=ut.get(r)??{};ut.add(r,{...o,...e})}],t._zod.check=()=>{},t}function sp(e,t){const r=z(t);let o=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(o=o.map(m=>typeof m=="string"?m.toLowerCase():m),n=n.map(m=>typeof m=="string"?m.toLowerCase():m));const i=new Set(o),a=new Set(n),s=e.Codec??ta,c=e.Boolean??Hi,u=e.String??Ln,l=new u({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),p=new s({type:"pipe",in:l,out:d,transform:((m,h)=>{let $=m;return r.case!=="sensitive"&&($=$.toLowerCase()),i.has($)?!0:a.has($)?!1:(h.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...a],input:h.value,inst:p,continue:!1}),{})}),reverseTransform:((m,h)=>m===!0?o[0]||"true":n[0]||"false"),error:r.error});return p}function Jn(e,t,r,o={}){const n=z(o),i={...z(o),check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:s=>r.test(s),...n};return r instanceof RegExp&&(i.pattern=r),new e(i)}function mn(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??ut,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 $e(e,t,r={path:[],schemaPath:[]}){var o;const n=e._zod.def,i=t.seen.get(e);if(i)return i.count++,r.schemaPath.includes(e)&&(i.cycle=r.path),i.schema;const a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a);const s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{const l={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,l);else{const p=a.schema,m=t.processors[n.type];if(!m)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);m(e,t,p,l)}const d=e._zod.parent;d&&(a.ref||(a.ref=d),$e(d,t,l),t.seen.get(d).isParent=!0)}const c=t.metadataRegistry.get(e);return c&&Object.assign(a.schema,c),t.io==="input"&&qe(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function pn(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=new Map;for(const a of e.seen.entries()){const s=e.metadataRegistry.get(a[0])?.id;if(s){const c=o.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.`);o.set(s,a[0])}}const n=a=>{const s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const d=e.external.registry.get(a[0])?.id,p=e.external.uri??(h=>h);if(d)return{ref:p(d)};const m=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=m,{defId:m,ref:`${p("__shared")}#/${s}/${m}`}}if(a[1]===r)return{ref:"#"};const u=`#/${s}/`,l=a[1].schema.id??`__schema${e.counter++}`;return{defId:l,ref:u+l}},i=a=>{if(a[1].schema.$ref)return;const s=a[1],{ref:c,defId:u}=n(a);s.def={...s.schema},u&&(s.defId=u);const l=s.schema;for(const d in l)delete l[d];l.$ref=c};if(e.cycles==="throw")for(const a of e.seen.entries()){const s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/<root>
|
|
65
|
+
|
|
66
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const a of e.seen.entries()){const s=a[1];if(t===a[0]){i(a);continue}if(e.external){const u=e.external.registry.get(a[0])?.id;if(t!==a[0]&&u){i(a);continue}}if(e.metadataRegistry.get(a[0])?.id){i(a);continue}if(s.cycle){i(a);continue}if(s.count>1&&e.reused==="ref"){i(a);continue}}}function fn(e,t){const r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");const o=s=>{const c=e.seen.get(s);if(c.ref===null)return;const u=c.def??c.schema,l={...u},d=c.ref;if(c.ref=null,d){o(d);const m=e.seen.get(d),h=m.schema;if(h.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(h)):Object.assign(u,h),Object.assign(u,l),s._zod.parent===d)for(const g in u)g==="$ref"||g==="allOf"||g in l||delete u[g];if(h.$ref&&m.def)for(const g in u)g==="$ref"||g==="allOf"||g in m.def&&JSON.stringify(u[g])===JSON.stringify(m.def[g])&&delete u[g]}const p=s._zod.parent;if(p&&p!==d){o(p);const m=e.seen.get(p);if(m?.schema.$ref&&(u.$ref=m.schema.$ref,m.def))for(const h in u)h==="$ref"||h==="allOf"||h in m.def&&JSON.stringify(u[h])===JSON.stringify(m.def[h])&&delete u[h]}e.override({zodSchema:s,jsonSchema:u,path:c.path??[]})};for(const s of[...e.seen.entries()].reverse())o(s[0]);const n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){const s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(s)}Object.assign(n,r.def??r.schema);const i=e.metadataRegistry.get(t)?.id;i!==void 0&&n.id===i&&delete n.id;const a=e.external?.defs??{};for(const s of e.seen.entries()){const 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"?n.$defs=a:n.definitions=a);try{const s=JSON.parse(JSON.stringify(n));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:Hn(t,"input",e.processors),output:Hn(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function qe(e,t){const r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);const o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return qe(o.element,r);if(o.type==="set")return qe(o.valueType,r);if(o.type==="lazy")return qe(o.getter(),r);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return qe(o.innerType,r);if(o.type==="intersection")return qe(o.left,r)||qe(o.right,r);if(o.type==="record"||o.type==="map")return qe(o.keyType,r)||qe(o.valueType,r);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:qe(o.in,r)||qe(o.out,r);if(o.type==="object"){for(const n in o.shape)if(qe(o.shape[n],r))return!0;return!1}if(o.type==="union"){for(const n of o.options)if(qe(n,r))return!0;return!1}if(o.type==="tuple"){for(const n of o.items)if(qe(n,r))return!0;return!!(o.rest&&qe(o.rest,r))}return!1}const cp=(e,t={})=>r=>{const o=mn({...r,processors:t});return $e(e,o),pn(o,e),fn(o,e)},Hn=(e,t,r={})=>o=>{const{libraryOptions:n,target:i}=o??{},a=mn({...n??{},target:i,io:t,processors:r});return $e(e,a),pn(a,e),fn(a,e)},tb={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},up=(e,t,r,o)=>{const n=r;n.type="string";const{minimum:i,maximum:a,format:s,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof i=="number"&&(n.minLength=i),typeof a=="number"&&(n.maxLength=a),s&&(n.format=tb[s]??s,n.format===""&&delete n.format,s==="time"&&delete n.format),u&&(n.contentEncoding=u),c&&c.size>0){const l=[...c];l.length===1?n.pattern=l[0].source:l.length>1&&(n.allOf=[...l.map(d=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},lp=(e,t,r,o)=>{const n=r,{minimum:i,maximum:a,format:s,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:l}=e._zod.bag;typeof s=="string"&&s.includes("int")?n.type="integer":n.type="number";const d=typeof l=="number"&&l>=(i??Number.NEGATIVE_INFINITY),p=typeof u=="number"&&u<=(a??Number.POSITIVE_INFINITY),m=t.target==="draft-04"||t.target==="openapi-3.0";d?m?(n.minimum=l,n.exclusiveMinimum=!0):n.exclusiveMinimum=l:typeof i=="number"&&(n.minimum=i),p?m?(n.maximum=u,n.exclusiveMaximum=!0):n.exclusiveMaximum=u:typeof a=="number"&&(n.maximum=a),typeof c=="number"&&(n.multipleOf=c)},dp=(e,t,r,o)=>{r.type="boolean"},mp=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},pp=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},fp=(e,t,r,o)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},hp=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},gp=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},vp=(e,t,r,o)=>{r.not={}},yp=(e,t,r,o)=>{},_p=(e,t,r,o)=>{},$p=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},bp=(e,t,r,o)=>{const n=e._zod.def,i=Oi(n.entries);i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),r.enum=i},kp=(e,t,r,o)=>{const n=e._zod.def,i=[];for(const a of n.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");i.push(Number(a))}else i.push(a);if(i.length!==0)if(i.length===1){const a=i[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else i.every(a=>typeof a=="number")&&(r.type="number"),i.every(a=>typeof a=="string")&&(r.type="string"),i.every(a=>typeof a=="boolean")&&(r.type="boolean"),i.every(a=>a===null)&&(r.type="null"),r.enum=i},Sp=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},wp=(e,t,r,o)=>{const n=r,i=e._zod.pattern;if(!i)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=i.source},Ip=(e,t,r,o)=>{const n=r,i={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;a!==void 0&&(i.minLength=a),s!==void 0&&(i.maxLength=s),c?c.length===1?(i.contentMediaType=c[0],Object.assign(n,i)):(Object.assign(n,i),n.anyOf=c.map(u=>({contentMediaType:u}))):Object.assign(n,i)},Op=(e,t,r,o)=>{r.type="boolean"},xp=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Tp=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Pp=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Ep=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},zp=(e,t,r,o)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Np=(e,t,r,o)=>{const n=r,i=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(n.minItems=a),typeof s=="number"&&(n.maxItems=s),n.type="array",n.items=$e(i.element,t,{...o,path:[...o.path,"items"]})},jp=(e,t,r,o)=>{const n=r,i=e._zod.def;n.type="object",n.properties={};const a=i.shape;for(const u in a)n.properties[u]=$e(a[u],t,{...o,path:[...o.path,"properties",u]});const s=new Set(Object.keys(a)),c=new Set([...s].filter(u=>{const l=i.shape[u]._zod;return t.io==="input"?l.optin===void 0:l.optout===void 0}));c.size>0&&(n.required=Array.from(c)),i.catchall?._zod.def.type==="never"?n.additionalProperties=!1:i.catchall?i.catchall&&(n.additionalProperties=$e(i.catchall,t,{...o,path:[...o.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},Ta=(e,t,r,o)=>{const n=e._zod.def,i=n.inclusive===!1,a=n.options.map((s,c)=>$e(s,t,{...o,path:[...o.path,i?"oneOf":"anyOf",c]}));i?r.oneOf=a:r.anyOf=a},Dp=(e,t,r,o)=>{const n=e._zod.def,i=$e(n.left,t,{...o,path:[...o.path,"allOf",0]}),a=$e(n.right,t,{...o,path:[...o.path,"allOf",1]}),s=u=>"allOf"in u&&Object.keys(u).length===1,c=[...s(i)?i.allOf:[i],...s(a)?a.allOf:[a]];r.allOf=c},Cp=(e,t,r,o)=>{const n=r,i=e._zod.def;n.type="array";const a=t.target==="draft-2020-12"?"prefixItems":"items",s=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=i.items.map((p,m)=>$e(p,t,{...o,path:[...o.path,a,m]})),u=i.rest?$e(i.rest,t,{...o,path:[...o.path,s,...t.target==="openapi-3.0"?[i.items.length]:[]]}):null;t.target==="draft-2020-12"?(n.prefixItems=c,u&&(n.items=u)):t.target==="openapi-3.0"?(n.items={anyOf:c},u&&n.items.anyOf.push(u),n.minItems=c.length,u||(n.maxItems=c.length)):(n.items=c,u&&(n.additionalItems=u));const{minimum:l,maximum:d}=e._zod.bag;typeof l=="number"&&(n.minItems=l),typeof d=="number"&&(n.maxItems=d)},Rp=(e,t,r,o)=>{const n=r,i=e._zod.def;n.type="object";const a=i.keyType,c=a._zod.bag?.patterns;if(i.mode==="loose"&&c&&c.size>0){const l=$e(i.valueType,t,{...o,path:[...o.path,"patternProperties","*"]});n.patternProperties={};for(const d of c)n.patternProperties[d.source]=l}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(n.propertyNames=$e(i.keyType,t,{...o,path:[...o.path,"propertyNames"]})),n.additionalProperties=$e(i.valueType,t,{...o,path:[...o.path,"additionalProperties"]});const u=a._zod.values;if(u){const l=[...u].filter(d=>typeof d=="string"||typeof d=="number");l.length>0&&(n.required=l)}},Ap=(e,t,r,o)=>{const n=e._zod.def,i=$e(n.innerType,t,o),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=n.innerType,r.nullable=!0):r.anyOf=[i,{type:"null"}]},Up=(e,t,r,o)=>{const n=e._zod.def;$e(n.innerType,t,o);const i=t.seen.get(e);i.ref=n.innerType},Zp=(e,t,r,o)=>{const n=e._zod.def;$e(n.innerType,t,o);const i=t.seen.get(e);i.ref=n.innerType,r.default=JSON.parse(JSON.stringify(n.defaultValue))},Mp=(e,t,r,o)=>{const n=e._zod.def;$e(n.innerType,t,o);const i=t.seen.get(e);i.ref=n.innerType,t.io==="input"&&(r._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},Bp=(e,t,r,o)=>{const n=e._zod.def;$e(n.innerType,t,o);const i=t.seen.get(e);i.ref=n.innerType;let a;try{a=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}r.default=a},Lp=(e,t,r,o)=>{const n=e._zod.def,i=n.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?i?n.out:n.in:n.out;$e(a,t,o);const s=t.seen.get(e);s.ref=a},Fp=(e,t,r,o)=>{const n=e._zod.def;$e(n.innerType,t,o);const i=t.seen.get(e);i.ref=n.innerType,r.readOnly=!0},Gp=(e,t,r,o)=>{const n=e._zod.def;$e(n.innerType,t,o);const i=t.seen.get(e);i.ref=n.innerType},Pa=(e,t,r,o)=>{const n=e._zod.def;$e(n.innerType,t,o);const i=t.seen.get(e);i.ref=n.innerType},Vp=(e,t,r,o)=>{const n=e._zod.innerType;$e(n,t,o);const i=t.seen.get(e);i.ref=n},Ea={string:up,number:lp,boolean:dp,bigint:mp,symbol:pp,null:fp,undefined:hp,void:gp,never:vp,any:yp,unknown:_p,date:$p,enum:bp,literal:kp,nan:Sp,template_literal:wp,file:Ip,success:Op,custom:xp,function:Tp,transform:Pp,map:Ep,set:zp,array:Np,object:jp,union:Ta,intersection:Dp,tuple:Cp,record:Rp,nullable:Ap,nonoptional:Up,default:Zp,prefault:Mp,catch:Bp,pipe:Lp,readonly:Fp,promise:Gp,optional:Pa,lazy:Vp};function za(e,t){if("_idmap"in e){const o=e,n=mn({...t,processors:Ea}),i={};for(const c of o._idmap.entries()){const[u,l]=c;$e(l,n)}const a={},s={registry:o,uri:t?.uri,defs:i};n.external=s;for(const c of o._idmap.entries()){const[u,l]=c;pn(n,l),a[u]=fn(n,l)}if(Object.keys(i).length>0){const c=n.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:i}}return{schemas:a}}const r=mn({...t,processors:Ea});return $e(e,r),pn(r,e),fn(r,e)}class nb{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 r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=mn({processors:Ea,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return $e(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),pn(this.ctx,t);const o=fn(this.ctx,t),{"~standard":n,...i}=o;return i}}var rb=Object.freeze({__proto__:null}),ob=Object.freeze({__proto__:null,$ZodAny:gd,$ZodArray:kd,$ZodAsyncError:Ft,$ZodBase64:od,$ZodBase64URL:ad,$ZodBigInt:Ki,$ZodBigIntFormat:md,$ZodBoolean:Hi,$ZodCIDRv4:nd,$ZodCIDRv6:rd,$ZodCUID:Gl,$ZodCUID2:Vl,$ZodCatch:Qd,$ZodCheck:Te,$ZodCheckBigIntFormat:_l,$ZodCheckEndsWith:zl,$ZodCheckGreaterThan:Vi,$ZodCheckIncludes:Pl,$ZodCheckLengthEquals:Il,$ZodCheckLessThan:Gi,$ZodCheckLowerCase:xl,$ZodCheckMaxLength:Sl,$ZodCheckMaxSize:$l,$ZodCheckMimeType:Dl,$ZodCheckMinLength:wl,$ZodCheckMinSize:bl,$ZodCheckMultipleOf:vl,$ZodCheckNumberFormat:yl,$ZodCheckOverwrite:Cl,$ZodCheckProperty:jl,$ZodCheckRegex:Ol,$ZodCheckSizeEquals:kl,$ZodCheckStartsWith:El,$ZodCheckStringFormat:Bn,$ZodCheckUpperCase:Tl,$ZodCodec:ta,$ZodCustom:cm,$ZodCustomStringFormat:ld,$ZodDate:$d,$ZodDefault:Jd,$ZodDiscriminatedUnion:Pd,$ZodE164:sd,$ZodEmail:Ml,$ZodEmoji:Ll,$ZodEncodeError:zr,$ZodEnum:Md,$ZodError:Pi,$ZodExactOptional:Vd,$ZodFile:Ld,$ZodFunction:im,$ZodGUID:Ul,$ZodIPv4:Ql,$ZodIPv6:ed,$ZodISODate:Wl,$ZodISODateTime:Kl,$ZodISODuration:Xl,$ZodISOTime:Yl,$ZodIntersection:Ed,$ZodJWT:ud,$ZodKSUID:Hl,$ZodLazy:sm,$ZodLiteral:Bd,$ZodMAC:td,$ZodMap:Rd,$ZodNaN:em,$ZodNanoID:Fl,$ZodNever:yd,$ZodNonOptional:Wd,$ZodNull:hd,$ZodNullable:qd,$ZodNumber:Ji,$ZodNumberFormat:dd,$ZodObject:Wi,$ZodObjectJIT:Id,$ZodOptional:Qi,$ZodPipe:ea,$ZodPrefault:Kd,$ZodPreprocess:tm,$ZodPromise:am,$ZodReadonly:nm,$ZodRealError:nt,$ZodRecord:Cd,$ZodRegistry:bm,$ZodSet:Ud,$ZodString:Ln,$ZodStringFormat:be,$ZodSuccess:Xd,$ZodSymbol:pd,$ZodTemplateLiteral:om,$ZodTransform:Fd,$ZodTuple:Xi,$ZodType:ee,$ZodULID:ql,$ZodURL:Bl,$ZodUUID:Zl,$ZodUndefined:fd,$ZodUnion:Fr,$ZodUnknown:vd,$ZodVoid:_d,$ZodXID:Jl,$ZodXor:Td,$brand:mu,$constructor:S,$input:$m,$output:_m,Doc:Rl,JSONSchema:rb,JSONSchemaGenerator:nb,NEVER:du,TimePrecision:Im,_any:qm,_array:Qm,_base64:_a,_base64url:$a,_bigint:Zm,_boolean:Am,_catch:K$,_check:op,_cidrv4:va,_cidrv6:ya,_coercedBigint:Mm,_coercedBoolean:Um,_coercedDate:Ym,_coercedNumber:zm,_coercedString:Sm,_cuid:la,_cuid2:da,_custom:tp,_date:Wm,_decode:ji,_decodeAsync:Ci,_default:q$,_discriminatedUnion:D$,_e164:ba,_email:ra,_emoji:ca,_encode:Ni,_encodeAsync:Di,_endsWith:eo,_enum:M$,_file:ep,_float32:jm,_float64:Dm,_gt:Ct,_gte:We,_guid:Jr,_includes:Xr,_int:Nm,_int32:Cm,_int64:Bm,_intersection:C$,_ipv4:ha,_ipv6:ga,_isoDate:xm,_isoDateTime:Om,_isoDuration:Pm,_isoTime:Tm,_jwt:ka,_ksuid:fa,_lazy:Q$,_length:qn,_literal:L$,_lowercase:Wr,_lt:Dt,_lte:lt,_mac:wm,_map:U$,_max:lt,_maxLength:Vn,_maxSize:dn,_mime:to,_min:We,_minLength:Jt,_minSize:Rt,_multipleOf:ln,_nan:Xm,_nanoid:ua,_nativeEnum:B$,_negative:wa,_never:Hm,_nonnegative:Oa,_nonoptional:J$,_nonpositive:Ia,_normalize:no,_null:Vm,_nullable:V$,_number:Em,_optional:G$,_overwrite:Tt,_parse:Cn,_parseAsync:Rn,_pipe:W$,_positive:Sa,_promise:eb,_property:xa,_readonly:Y$,_record:A$,_refine:np,_regex:Kr,_safeDecode:Ai,_safeDecodeAsync:Zi,_safeEncode:Ri,_safeEncodeAsync:Ui,_safeParse:An,_safeParseAsync:Un,_set:Z$,_size:Gn,_slugify:ao,_startsWith:Qr,_string:km,_stringFormat:Jn,_stringbool:sp,_success:H$,_superRefine:rp,_symbol:Fm,_templateLiteral:X$,_toLowerCase:oo,_toUpperCase:io,_transform:F$,_trim:ro,_tuple:R$,_uint32:Rm,_uint64:Lm,_ulid:ma,_undefined:Gm,_union:N$,_unknown:Jm,_uppercase:Yr,_url:Hr,_uuid:oa,_uuidv4:ia,_uuidv6:aa,_uuidv7:sa,_void:Km,_xid:pa,_xor:j$,clone:et,config:Ae,createStandardJSONSchemaMethod:Hn,createToJSONSchemaMethod:cp,decode:ly,decodeAsync:my,describe:ip,encode:uy,encodeAsync:dy,extractDefs:pn,finalize:fn,flattenError:Ei,formatError:zi,globalConfig:Nn,globalRegistry:ut,initializeContext:mn,isValidBase64:qi,isValidBase64URL:id,isValidJWT:cd,locales:vm,meta:ap,parse:Ur,parseAsync:Zr,prettifyError:Cu,process:$e,regexes:Fi,registry:na,safeDecode:fy,safeDecodeAsync:gy,safeEncode:py,safeEncodeAsync:hy,safeParse:Mr,safeParseAsync:Br,toDotPath:Du,toJSONSchema:za,treeifyError:ju,util:zu,version:Al}),ib=Object.freeze({__proto__:null,endsWith:eo,gt:Ct,gte:We,includes:Xr,length:qn,lowercase:Wr,lt:Dt,lte:lt,maxLength:Vn,maxSize:dn,mime:to,minLength:Jt,minSize:Rt,multipleOf:ln,negative:wa,nonnegative:Oa,nonpositive:Ia,normalize:no,overwrite:Tt,positive:Sa,property:xa,regex:Kr,size:Gn,slugify:ao,startsWith:Qr,toLowerCase:oo,toUpperCase:io,trim:ro,uppercase:Yr});const Na=S("ZodISODateTime",(e,t)=>{Kl.init(e,t),ke.init(e,t)});function ja(e){return Om(Na,e)}const Da=S("ZodISODate",(e,t)=>{Wl.init(e,t),ke.init(e,t)});function qp(e){return xm(Da,e)}const Ca=S("ZodISOTime",(e,t)=>{Yl.init(e,t),ke.init(e,t)});function Jp(e){return Tm(Ca,e)}const Ra=S("ZodISODuration",(e,t)=>{Xl.init(e,t),ke.init(e,t)});function Hp(e){return Pm(Ra,e)}var Kp=Object.freeze({__proto__:null,ZodISODate:Da,ZodISODateTime:Na,ZodISODuration:Ra,ZodISOTime:Ca,date:qp,datetime:ja,duration:Hp,time:Jp});const Wp=(e,t)=>{Pi.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:r=>zi(e,r)},flatten:{value:r=>Ei(e,r)},addIssue:{value:r=>{e.issues.push(r),e.message=JSON.stringify(e.issues,Nr,2)}},addIssues:{value:r=>{e.issues.push(...r),e.message=JSON.stringify(e.issues,Nr,2)}},isEmpty:{get(){return e.issues.length===0}}})},ab=S("ZodError",Wp),rt=S("ZodError",Wp,{Parent:Error}),Yp=Cn(rt),Xp=Rn(rt),Qp=An(rt),ef=Un(rt),tf=Ni(rt),nf=ji(rt),rf=Di(rt),of=Ci(rt),af=Ri(rt),sf=Ai(rt),cf=Ui(rt),uf=Zi(rt),lf=new WeakMap;function Kn(e,t,r){const o=Object.getPrototypeOf(e);let n=lf.get(o);if(n||(n=new Set,lf.set(o,n)),!n.has(t)){n.add(t);for(const i in r){const a=r[i];Object.defineProperty(o,i,{configurable:!0,enumerable:!1,get(){const s=a.bind(this);return Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}const ne=S("ZodType",(e,t)=>(ee.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Hn(e,"input"),output:Hn(e,"output")}}),e.toJSONSchema=cp(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(r,o)=>Yp(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>Qp(e,r,o),e.parseAsync=async(r,o)=>Xp(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>ef(e,r,o),e.spa=e.safeParseAsync,e.encode=(r,o)=>tf(e,r,o),e.decode=(r,o)=>nf(e,r,o),e.encodeAsync=async(r,o)=>rf(e,r,o),e.decodeAsync=async(r,o)=>of(e,r,o),e.safeEncode=(r,o)=>af(e,r,o),e.safeDecode=(r,o)=>sf(e,r,o),e.safeEncodeAsync=async(r,o)=>cf(e,r,o),e.safeDecodeAsync=async(r,o)=>uf(e,r,o),Kn(e,"ZodType",{check(...r){const o=this.def;return this.clone(kt(o,{checks:[...o.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0})},with(...r){return this.check(...r)},clone(r,o){return et(this,r,o)},brand(){return this},register(r,o){return r.add(this,o),this},refine(r,o){return this.check(Ss(r,o))},superRefine(r,o){return this.check(ws(r,o))},overwrite(r){return this.check(Tt(r))},optional(){return Oe(this)},exactOptional(){return rs(this)},nullable(){return ar(this)},nullish(){return Oe(ar(this))},nonoptional(r){return us(this,r)},array(){return ae(this)},or(r){return Se([this,r])},and(r){return or(this,r)},transform(r){return jo(this,zo(r))},default(r){return as(this,r)},prefault(r){return cs(this,r)},catch(r){return ms(this,r)},pipe(r){return jo(this,r)},readonly(){return gs(this)},describe(r){const o=this.clone();return ut.add(o,{description:r}),o},meta(...r){if(r.length===0)return ut.get(this);const o=this.clone();return ut.add(o,r[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(r){return r(this)}}),Object.defineProperty(e,"description",{get(){return ut.get(e)?.description},configurable:!0}),e)),so=S("_ZodString",(e,t)=>{Ln.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(o,n,i)=>up(e,o,n);const r=e._zod.bag;e.format=r.format??null,e.minLength=r.minimum??null,e.maxLength=r.maximum??null,Kn(e,"_ZodString",{regex(...o){return this.check(Kr(...o))},includes(...o){return this.check(Xr(...o))},startsWith(...o){return this.check(Qr(...o))},endsWith(...o){return this.check(eo(...o))},min(...o){return this.check(Jt(...o))},max(...o){return this.check(Vn(...o))},length(...o){return this.check(qn(...o))},nonempty(...o){return this.check(Jt(1,...o))},lowercase(o){return this.check(Wr(o))},uppercase(o){return this.check(Yr(o))},trim(){return this.check(ro())},normalize(...o){return this.check(no(...o))},toLowerCase(){return this.check(oo())},toUpperCase(){return this.check(io())},slugify(){return this.check(ao())}})}),Wn=S("ZodString",(e,t)=>{Ln.init(e,t),so.init(e,t),e.email=r=>e.check(ra(co,r)),e.url=r=>e.check(Hr(Xn,r)),e.jwt=r=>e.check(ka(wo,r)),e.emoji=r=>e.check(ca(uo,r)),e.guid=r=>e.check(Jr(Yn,r)),e.uuid=r=>e.check(oa(St,r)),e.uuidv4=r=>e.check(ia(St,r)),e.uuidv6=r=>e.check(aa(St,r)),e.uuidv7=r=>e.check(sa(St,r)),e.nanoid=r=>e.check(ua(lo,r)),e.guid=r=>e.check(Jr(Yn,r)),e.cuid=r=>e.check(la(mo,r)),e.cuid2=r=>e.check(da(po,r)),e.ulid=r=>e.check(ma(fo,r)),e.base64=r=>e.check(_a(bo,r)),e.base64url=r=>e.check($a(ko,r)),e.xid=r=>e.check(pa(ho,r)),e.ksuid=r=>e.check(fa(go,r)),e.ipv4=r=>e.check(ha(vo,r)),e.ipv6=r=>e.check(ga(yo,r)),e.cidrv4=r=>e.check(va(_o,r)),e.cidrv6=r=>e.check(ya($o,r)),e.e164=r=>e.check(ba(So,r)),e.datetime=r=>e.check(ja(r)),e.date=r=>e.check(qp(r)),e.time=r=>e.check(Jp(r)),e.duration=r=>e.check(Hp(r))});function k(e){return km(Wn,e)}const ke=S("ZodStringFormat",(e,t)=>{be.init(e,t),so.init(e,t)}),co=S("ZodEmail",(e,t)=>{Ml.init(e,t),ke.init(e,t)});function df(e){return ra(co,e)}const Yn=S("ZodGUID",(e,t)=>{Ul.init(e,t),ke.init(e,t)});function mf(e){return Jr(Yn,e)}const St=S("ZodUUID",(e,t)=>{Zl.init(e,t),ke.init(e,t)});function pf(e){return oa(St,e)}function ff(e){return ia(St,e)}function hf(e){return aa(St,e)}function gf(e){return sa(St,e)}const Xn=S("ZodURL",(e,t)=>{Bl.init(e,t),ke.init(e,t)});function vf(e){return Hr(Xn,e)}function yf(e){return Hr(Xn,{protocol:Bi,hostname:el,...z(e)})}const uo=S("ZodEmoji",(e,t)=>{Ll.init(e,t),ke.init(e,t)});function _f(e){return ca(uo,e)}const lo=S("ZodNanoID",(e,t)=>{Fl.init(e,t),ke.init(e,t)});function $f(e){return ua(lo,e)}const mo=S("ZodCUID",(e,t)=>{Gl.init(e,t),ke.init(e,t)});function bf(e){return la(mo,e)}const po=S("ZodCUID2",(e,t)=>{Vl.init(e,t),ke.init(e,t)});function kf(e){return da(po,e)}const fo=S("ZodULID",(e,t)=>{ql.init(e,t),ke.init(e,t)});function Sf(e){return ma(fo,e)}const ho=S("ZodXID",(e,t)=>{Jl.init(e,t),ke.init(e,t)});function wf(e){return pa(ho,e)}const go=S("ZodKSUID",(e,t)=>{Hl.init(e,t),ke.init(e,t)});function If(e){return fa(go,e)}const vo=S("ZodIPv4",(e,t)=>{Ql.init(e,t),ke.init(e,t)});function Of(e){return ha(vo,e)}const Aa=S("ZodMAC",(e,t)=>{td.init(e,t),ke.init(e,t)});function xf(e){return wm(Aa,e)}const yo=S("ZodIPv6",(e,t)=>{ed.init(e,t),ke.init(e,t)});function Tf(e){return ga(yo,e)}const _o=S("ZodCIDRv4",(e,t)=>{nd.init(e,t),ke.init(e,t)});function Pf(e){return va(_o,e)}const $o=S("ZodCIDRv6",(e,t)=>{rd.init(e,t),ke.init(e,t)});function Ef(e){return ya($o,e)}const bo=S("ZodBase64",(e,t)=>{od.init(e,t),ke.init(e,t)});function zf(e){return _a(bo,e)}const ko=S("ZodBase64URL",(e,t)=>{ad.init(e,t),ke.init(e,t)});function Nf(e){return $a(ko,e)}const So=S("ZodE164",(e,t)=>{sd.init(e,t),ke.init(e,t)});function jf(e){return ba(So,e)}const wo=S("ZodJWT",(e,t)=>{ud.init(e,t),ke.init(e,t)});function Df(e){return ka(wo,e)}const hn=S("ZodCustomStringFormat",(e,t)=>{ld.init(e,t),ke.init(e,t)});function Cf(e,t,r={}){return Jn(hn,e,t,r)}function Rf(e){return Jn(hn,"hostname",Qu,e)}function Af(e){return Jn(hn,"hex",hl,e)}function Uf(e,t){const r=t?.enc??"hex",o=`${e}_${r}`,n=Fi[o];if(!n)throw new Error(`Unrecognized hash format: ${o}`);return Jn(hn,o,n,t)}const Qn=S("ZodNumber",(e,t)=>{Ji.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(o,n,i)=>lp(e,o,n),Kn(e,"ZodNumber",{gt(o,n){return this.check(Ct(o,n))},gte(o,n){return this.check(We(o,n))},min(o,n){return this.check(We(o,n))},lt(o,n){return this.check(Dt(o,n))},lte(o,n){return this.check(lt(o,n))},max(o,n){return this.check(lt(o,n))},int(o){return this.check(Io(o))},safe(o){return this.check(Io(o))},positive(o){return this.check(Ct(0,o))},nonnegative(o){return this.check(We(0,o))},negative(o){return this.check(Dt(0,o))},nonpositive(o){return this.check(lt(0,o))},multipleOf(o,n){return this.check(ln(o,n))},step(o,n){return this.check(ln(o,n))},finite(){return this}});const r=e._zod.bag;e.minValue=Math.max(r.minimum??Number.NEGATIVE_INFINITY,r.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(r.maximum??Number.POSITIVE_INFINITY,r.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(r.format??"").includes("int")||Number.isSafeInteger(r.multipleOf??.5),e.isFinite=!0,e.format=r.format??null});function ie(e){return Em(Qn,e)}const Ht=S("ZodNumberFormat",(e,t)=>{dd.init(e,t),Qn.init(e,t)});function Io(e){return Nm(Ht,e)}function Zf(e){return jm(Ht,e)}function Mf(e){return Dm(Ht,e)}function Bf(e){return Cm(Ht,e)}function Lf(e){return Rm(Ht,e)}const er=S("ZodBoolean",(e,t)=>{Hi.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>dp(e,r,o)});function Ne(e){return Am(er,e)}const tr=S("ZodBigInt",(e,t)=>{Ki.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(o,n,i)=>mp(e,o),e.gte=(o,n)=>e.check(We(o,n)),e.min=(o,n)=>e.check(We(o,n)),e.gt=(o,n)=>e.check(Ct(o,n)),e.gte=(o,n)=>e.check(We(o,n)),e.min=(o,n)=>e.check(We(o,n)),e.lt=(o,n)=>e.check(Dt(o,n)),e.lte=(o,n)=>e.check(lt(o,n)),e.max=(o,n)=>e.check(lt(o,n)),e.positive=o=>e.check(Ct(BigInt(0),o)),e.negative=o=>e.check(Dt(BigInt(0),o)),e.nonpositive=o=>e.check(lt(BigInt(0),o)),e.nonnegative=o=>e.check(We(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(ln(o,n));const r=e._zod.bag;e.minValue=r.minimum??null,e.maxValue=r.maximum??null,e.format=r.format??null});function Ff(e){return Zm(tr,e)}const Oo=S("ZodBigIntFormat",(e,t)=>{md.init(e,t),tr.init(e,t)});function Gf(e){return Bm(Oo,e)}function Vf(e){return Lm(Oo,e)}const Ua=S("ZodSymbol",(e,t)=>{pd.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>pp(e,r)});function qf(e){return Fm(Ua,e)}const Za=S("ZodUndefined",(e,t)=>{fd.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>hp(e,r)});function Jf(e){return Gm(Za,e)}const Ma=S("ZodNull",(e,t)=>{hd.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>fp(e,r,o)});function xo(e){return Vm(Ma,e)}const Ba=S("ZodAny",(e,t)=>{gd.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>yp()});function Hf(){return qm(Ba)}const La=S("ZodUnknown",(e,t)=>{vd.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>_p()});function ve(){return Jm(La)}const Fa=S("ZodNever",(e,t)=>{yd.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>vp(e,r,o)});function To(e){return Hm(Fa,e)}const Ga=S("ZodVoid",(e,t)=>{_d.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>gp(e,r)});function Kf(e){return Km(Ga,e)}const Po=S("ZodDate",(e,t)=>{$d.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(o,n,i)=>$p(e,o),e.min=(o,n)=>e.check(We(o,n)),e.max=(o,n)=>e.check(lt(o,n));const r=e._zod.bag;e.minDate=r.minimum?new Date(r.minimum):null,e.maxDate=r.maximum?new Date(r.maximum):null});function Wf(e){return Wm(Po,e)}const Va=S("ZodArray",(e,t)=>{kd.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Np(e,r,o,n),e.element=t.element,Kn(e,"ZodArray",{min(r,o){return this.check(Jt(r,o))},nonempty(r){return this.check(Jt(1,r))},max(r,o){return this.check(Vn(r,o))},length(r,o){return this.check(qn(r,o))},unwrap(){return this.element}})});function ae(e,t){return Qm(Va,e,t)}function Yf(e){const t=e._zod.def.shape;return Fe(Object.keys(t))}const nr=S("ZodObject",(e,t)=>{Id.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>jp(e,r,o,n),oe(e,"shape",()=>t.shape),Kn(e,"ZodObject",{keyof(){return Fe(Object.keys(this._zod.def.shape))},catchall(r){return this.clone({...this._zod.def,catchall:r})},passthrough(){return this.clone({...this._zod.def,catchall:ve()})},loose(){return this.clone({...this._zod.def,catchall:ve()})},strict(){return this.clone({...this._zod.def,catchall:To()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(r){return Su(this,r)},safeExtend(r){return wu(this,r)},merge(r){return Iu(this,r)},pick(r){return bu(this,r)},omit(r){return ku(this,r)},partial(...r){return Ou(ir,this,r[0])},required(...r){return xu(No,this,r[0])}})});function U(e,t){const r={type:"object",shape:e??{},...z(t)};return new nr(r)}function Xf(e,t){return new nr({type:"object",shape:e,catchall:To(),...z(t)})}function Le(e,t){return new nr({type:"object",shape:e,catchall:ve(),...z(t)})}const rr=S("ZodUnion",(e,t)=>{Fr.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ta(e,r,o,n),e.options=t.options});function Se(e,t){return new rr({type:"union",options:e,...z(t)})}const qa=S("ZodXor",(e,t)=>{rr.init(e,t),Td.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ta(e,r,o,n),e.options=t.options});function Qf(e,t){return new qa({type:"union",options:e,inclusive:!1,...z(t)})}const Ja=S("ZodDiscriminatedUnion",(e,t)=>{rr.init(e,t),Pd.init(e,t)});function Eo(e,t,r){return new Ja({type:"union",options:t,discriminator:e,...z(r)})}const Ha=S("ZodIntersection",(e,t)=>{Ed.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Dp(e,r,o,n)});function or(e,t){return new Ha({type:"intersection",left:e,right:t})}const Ka=S("ZodTuple",(e,t)=>{Xi.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Cp(e,r,o,n),e.rest=r=>e.clone({...e._zod.def,rest:r})});function Wa(e,t,r){const o=t instanceof ee,n=o?r:t,i=o?t:null;return new Ka({type:"tuple",items:e,rest:i,...z(n)})}const gn=S("ZodRecord",(e,t)=>{Cd.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Rp(e,r,o,n),e.keyType=t.keyType,e.valueType=t.valueType});function he(e,t,r){return!t||!t._zod?new gn({type:"record",keyType:k(),valueType:e,...z(t)}):new gn({type:"record",keyType:e,valueType:t,...z(r)})}function eh(e,t,r){const o=et(e);return o._zod.values=void 0,new gn({type:"record",keyType:o,valueType:t,...z(r)})}function th(e,t,r){return new gn({type:"record",keyType:e,valueType:t,mode:"loose",...z(r)})}const Ya=S("ZodMap",(e,t)=>{Rd.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ep(e,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Rt(...r)),e.nonempty=r=>e.check(Rt(1,r)),e.max=(...r)=>e.check(dn(...r)),e.size=(...r)=>e.check(Gn(...r))});function nh(e,t,r){return new Ya({type:"map",keyType:e,valueType:t,...z(r)})}const Xa=S("ZodSet",(e,t)=>{Ud.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>zp(e,r),e.min=(...r)=>e.check(Rt(...r)),e.nonempty=r=>e.check(Rt(1,r)),e.max=(...r)=>e.check(dn(...r)),e.size=(...r)=>e.check(Gn(...r))});function rh(e,t){return new Xa({type:"set",valueType:e,...z(t)})}const vn=S("ZodEnum",(e,t)=>{Md.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(o,n,i)=>bp(e,o,n),e.enum=t.entries,e.options=Object.values(t.entries);const r=new Set(Object.keys(t.entries));e.extract=(o,n)=>{const i={};for(const a of o)if(r.has(a))i[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new vn({...t,checks:[],...z(n),entries:i})},e.exclude=(o,n)=>{const i={...t.entries};for(const a of o)if(r.has(a))delete i[a];else throw new Error(`Key ${a} not found in enum`);return new vn({...t,checks:[],...z(n),entries:i})}});function Fe(e,t){const r=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new vn({type:"enum",entries:r,...z(t)})}function oh(e,t){return new vn({type:"enum",entries:e,...z(t)})}const Qa=S("ZodLiteral",(e,t)=>{Bd.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>kp(e,r,o),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function F(e,t){return new Qa({type:"literal",values:Array.isArray(e)?e:[e],...z(t)})}const es=S("ZodFile",(e,t)=>{Ld.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ip(e,r,o),e.min=(r,o)=>e.check(Rt(r,o)),e.max=(r,o)=>e.check(dn(r,o)),e.mime=(r,o)=>e.check(to(Array.isArray(r)?r:[r],o))});function ih(e){return ep(es,e)}const ts=S("ZodTransform",(e,t)=>{Fd.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Pp(e,r),e._zod.parse=(r,o)=>{if(o.direction==="backward")throw new zr(e.constructor.name);r.addIssue=i=>{if(typeof i=="string")r.issues.push(sn(i,r.value,t));else{const a=i;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=r.value),a.inst??(a.inst=e),r.issues.push(sn(a))}};const n=t.transform(r.value,r);return n instanceof Promise?n.then(i=>(r.value=i,r.fallback=!0,r)):(r.value=n,r.fallback=!0,r)}});function zo(e){return new ts({type:"transform",transform:e})}const ir=S("ZodOptional",(e,t)=>{Qi.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Pa(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function Oe(e){return new ir({type:"optional",innerType:e})}const ns=S("ZodExactOptional",(e,t)=>{Vd.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Pa(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function rs(e){return new ns({type:"optional",innerType:e})}const os=S("ZodNullable",(e,t)=>{qd.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Ap(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function ar(e){return new os({type:"nullable",innerType:e})}function ah(e){return Oe(ar(e))}const is=S("ZodDefault",(e,t)=>{Jd.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Zp(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function as(e,t){return new is({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():Dr(t)}})}const ss=S("ZodPrefault",(e,t)=>{Kd.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Mp(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function cs(e,t){return new ss({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():Dr(t)}})}const No=S("ZodNonOptional",(e,t)=>{Wd.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Up(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function us(e,t){return new No({type:"nonoptional",innerType:e,...z(t)})}const ls=S("ZodSuccess",(e,t)=>{Xd.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Op(e,r,o),e.unwrap=()=>e._zod.def.innerType});function sh(e){return new ls({type:"success",innerType:e})}const ds=S("ZodCatch",(e,t)=>{Qd.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Bp(e,r,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ms(e,t){return new ds({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const ps=S("ZodNaN",(e,t)=>{em.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Sp(e,r)});function ch(e){return Xm(ps,e)}const sr=S("ZodPipe",(e,t)=>{ea.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Lp(e,r,o,n),e.in=t.in,e.out=t.out});function jo(e,t){return new sr({type:"pipe",in:e,out:t})}const cr=S("ZodCodec",(e,t)=>{sr.init(e,t),ta.init(e,t)});function uh(e,t,r){return new cr({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function lh(e){const t=e._zod.def;return new cr({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}const fs=S("ZodPreprocess",(e,t)=>{sr.init(e,t),tm.init(e,t)}),hs=S("ZodReadonly",(e,t)=>{nm.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Fp(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function gs(e){return new hs({type:"readonly",innerType:e})}const vs=S("ZodTemplateLiteral",(e,t)=>{om.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>wp(e,r,o)});function dh(e,t){return new vs({type:"template_literal",parts:e,...z(t)})}const ys=S("ZodLazy",(e,t)=>{sm.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Vp(e,r,o,n),e.unwrap=()=>e._zod.def.getter()});function _s(e){return new ys({type:"lazy",getter:e})}const $s=S("ZodPromise",(e,t)=>{am.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Gp(e,r,o,n),e.unwrap=()=>e._zod.def.innerType});function mh(e){return new $s({type:"promise",innerType:e})}const bs=S("ZodFunction",(e,t)=>{im.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>Tp(e,r)});function Do(e){return new bs({type:"function",input:Array.isArray(e?.input)?Wa(e?.input):e?.input??ae(ve()),output:e?.output??ve()})}const ur=S("ZodCustom",(e,t)=>{cm.init(e,t),ne.init(e,t),e._zod.processJSONSchema=(r,o,n)=>xp(e,r)});function ph(e){const t=new Te({check:"custom"});return t._zod.check=e,t}function ks(e,t){return tp(ur,e??(()=>!0),t)}function Ss(e,t={}){return np(ur,e,t)}function ws(e,t){return rp(e,t)}const fh=ip,hh=ap;function gh(e,t={}){const r=new ur({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...z(t)});return r._zod.bag.Class=e,r._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:r,path:[...r._zod.def.path??[]]})},r}const vh=(...e)=>sp({Codec:cr,Boolean:er,String:Wn},...e);function yh(e){const t=_s(()=>Se([k(e),ie(),Ne(),xo(),ae(t),he(k(),t)]));return t}function Co(e,t){return new fs({type:"pipe",in:zo(e),out:t})}var sb=Object.freeze({__proto__:null,ZodAny:Ba,ZodArray:Va,ZodBase64:bo,ZodBase64URL:ko,ZodBigInt:tr,ZodBigIntFormat:Oo,ZodBoolean:er,ZodCIDRv4:_o,ZodCIDRv6:$o,ZodCUID:mo,ZodCUID2:po,ZodCatch:ds,ZodCodec:cr,ZodCustom:ur,ZodCustomStringFormat:hn,ZodDate:Po,ZodDefault:is,ZodDiscriminatedUnion:Ja,ZodE164:So,ZodEmail:co,ZodEmoji:uo,ZodEnum:vn,ZodExactOptional:ns,ZodFile:es,ZodFunction:bs,ZodGUID:Yn,ZodIPv4:vo,ZodIPv6:yo,ZodIntersection:Ha,ZodJWT:wo,ZodKSUID:go,ZodLazy:ys,ZodLiteral:Qa,ZodMAC:Aa,ZodMap:Ya,ZodNaN:ps,ZodNanoID:lo,ZodNever:Fa,ZodNonOptional:No,ZodNull:Ma,ZodNullable:os,ZodNumber:Qn,ZodNumberFormat:Ht,ZodObject:nr,ZodOptional:ir,ZodPipe:sr,ZodPrefault:ss,ZodPreprocess:fs,ZodPromise:$s,ZodReadonly:hs,ZodRecord:gn,ZodSet:Xa,ZodString:Wn,ZodStringFormat:ke,ZodSuccess:ls,ZodSymbol:Ua,ZodTemplateLiteral:vs,ZodTransform:ts,ZodTuple:Ka,ZodType:ne,ZodULID:fo,ZodURL:Xn,ZodUUID:St,ZodUndefined:Za,ZodUnion:rr,ZodUnknown:La,ZodVoid:Ga,ZodXID:ho,ZodXor:qa,_ZodString:so,_default:as,_function:Do,any:Hf,array:ae,base64:zf,base64url:Nf,bigint:Ff,boolean:Ne,catch:ms,check:ph,cidrv4:Pf,cidrv6:Ef,codec:uh,cuid:bf,cuid2:kf,custom:ks,date:Wf,describe:fh,discriminatedUnion:Eo,e164:jf,email:df,emoji:_f,enum:Fe,exactOptional:rs,file:ih,float32:Zf,float64:Mf,function:Do,guid:mf,hash:Uf,hex:Af,hostname:Rf,httpUrl:yf,instanceof:gh,int:Io,int32:Bf,int64:Gf,intersection:or,invertCodec:lh,ipv4:Of,ipv6:Tf,json:yh,jwt:Df,keyof:Yf,ksuid:If,lazy:_s,literal:F,looseObject:Le,looseRecord:th,mac:xf,map:nh,meta:hh,nan:ch,nanoid:$f,nativeEnum:oh,never:To,nonoptional:us,null:xo,nullable:ar,nullish:ah,number:ie,object:U,optional:Oe,partialRecord:eh,pipe:jo,prefault:cs,preprocess:Co,promise:mh,readonly:gs,record:he,refine:Ss,set:rh,strictObject:Xf,string:k,stringFormat:Cf,stringbool:vh,success:sh,superRefine:ws,symbol:qf,templateLiteral:dh,transform:zo,tuple:Wa,uint32:Lf,uint64:Vf,ulid:Sf,undefined:Jf,union:Se,unknown:ve,url:vf,uuid:pf,uuidv4:ff,uuidv6:hf,uuidv7:gf,void:Kf,xid:wf,xor:Qf});const cb={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 ub(e){Ae({customError:e})}function lb(){return Ae().customError}var te;te||(te={});const A={...sb,...ib,iso:Kp},db=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 mb(e,t){const r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function pb(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");const r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;const o=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===o){const n=r[1];if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}function _h(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return A.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){const n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return A.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);const i=pb(n,t),a=Ge(i,t);return t.refs.set(n,a),t.processing.delete(n),a}if(e.enum!==void 0){const n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return A.null();if(n.length===0)return A.never();if(n.length===1)return A.literal(n[0]);if(n.every(a=>typeof a=="string"))return A.enum(n);const i=n.map(a=>A.literal(a));return i.length<2?i[0]:A.union([i[0],i[1],...i.slice(2)])}if(e.const!==void 0)return A.literal(e.const);const r=e.type;if(Array.isArray(r)){const n=r.map(i=>{const a={...e,type:i};return _h(a,t)});return n.length===0?A.never():n.length===1?n[0]:A.union(n)}if(!r)return A.any();let o;switch(r){case"string":{let n=A.string();if(e.format){const i=e.format;i==="email"?n=n.check(A.email()):i==="uri"||i==="uri-reference"?n=n.check(A.url()):i==="uuid"||i==="guid"?n=n.check(A.uuid()):i==="date-time"?n=n.check(A.iso.datetime()):i==="date"?n=n.check(A.iso.date()):i==="time"?n=n.check(A.iso.time()):i==="duration"?n=n.check(A.iso.duration()):i==="ipv4"?n=n.check(A.ipv4()):i==="ipv6"?n=n.check(A.ipv6()):i==="mac"?n=n.check(A.mac()):i==="cidr"?n=n.check(A.cidrv4()):i==="cidr-v6"?n=n.check(A.cidrv6()):i==="base64"?n=n.check(A.base64()):i==="base64url"?n=n.check(A.base64url()):i==="e164"?n=n.check(A.e164()):i==="jwt"?n=n.check(A.jwt()):i==="emoji"?n=n.check(A.emoji()):i==="nanoid"?n=n.check(A.nanoid()):i==="cuid"?n=n.check(A.cuid()):i==="cuid2"?n=n.check(A.cuid2()):i==="ulid"?n=n.check(A.ulid()):i==="xid"?n=n.check(A.xid()):i==="ksuid"&&(n=n.check(A.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),o=n;break}case"number":case"integer":{let n=r==="integer"?A.number().int():A.number();typeof e.minimum=="number"&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),o=n;break}case"boolean":{o=A.boolean();break}case"null":{o=A.null();break}case"object":{const n={},i=e.properties||{},a=new Set(e.required||[]);for(const[c,u]of Object.entries(i)){const l=Ge(u,t);n[c]=a.has(c)?l:l.optional()}if(e.propertyNames){const c=Ge(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?Ge(e.additionalProperties,t):A.any();if(Object.keys(n).length===0){o=A.record(c,u);break}const l=A.object(n).passthrough(),d=A.looseRecord(c,u);o=A.intersection(l,d);break}if(e.patternProperties){const c=e.patternProperties,u=Object.keys(c),l=[];for(const p of u){const m=Ge(c[p],t),h=A.string().regex(new RegExp(p));l.push(A.looseRecord(h,m))}const d=[];if(Object.keys(n).length>0&&d.push(A.object(n).passthrough()),d.push(...l),d.length===0)o=A.object({}).passthrough();else if(d.length===1)o=d[0];else{let p=A.intersection(d[0],d[1]);for(let m=2;m<d.length;m++)p=A.intersection(p,d[m]);o=p}break}const s=A.object(n);e.additionalProperties===!1?o=s.strict():typeof e.additionalProperties=="object"?o=s.catchall(Ge(e.additionalProperties,t)):o=s.passthrough();break}case"array":{const n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){const a=n.map(c=>Ge(c,t)),s=i&&typeof i=="object"&&!Array.isArray(i)?Ge(i,t):void 0;s?o=A.tuple(a).rest(s):o=A.tuple(a),typeof e.minItems=="number"&&(o=o.check(A.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(A.maxLength(e.maxItems)))}else if(Array.isArray(i)){const a=i.map(c=>Ge(c,t)),s=e.additionalItems&&typeof e.additionalItems=="object"?Ge(e.additionalItems,t):void 0;s?o=A.tuple(a).rest(s):o=A.tuple(a),typeof e.minItems=="number"&&(o=o.check(A.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(A.maxLength(e.maxItems)))}else if(i!==void 0){const a=Ge(i,t);let s=A.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),o=s}else o=A.array(A.any());break}default:throw new Error(`Unsupported type: ${r}`)}return o}function Ge(e,t){if(typeof e=="boolean")return e?A.any():A.never();let r=_h(e,t);const o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){const s=e.anyOf.map(u=>Ge(u,t)),c=A.union(s);r=o?A.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){const s=e.oneOf.map(u=>Ge(u,t)),c=A.xor(s);r=o?A.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=o?r:A.any();else{let s=o?r:Ge(e.allOf[0],t);const c=o?0:1;for(let u=c;u<e.allOf.length;u++)s=A.intersection(s,Ge(e.allOf[u],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=A.nullable(r)),e.readOnly===!0&&(r=A.readonly(r)),e.default!==void 0&&(r=r.default(e.default));const n={},i=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(const s of i)s in e&&(n[s]=e[s]);const a=["contentEncoding","contentMediaType","contentSchema"];for(const s of a)s in e&&(n[s]=e[s]);for(const s of Object.keys(e))db.has(s)||(n[s]=e[s]);return Object.keys(n).length>0&&t.registry.add(r,n),e.description&&(r=r.describe(e.description)),r}function fb(e,t){if(typeof e=="boolean")return e?A.any():A.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}const o=mb(r,t?.defaultTarget),n=r.$defs||r.definitions||{},i={version:o,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??ut};return Ge(r,i)}function hb(e){return Sm(Wn,e)}function gb(e){return zm(Qn,e)}function vb(e){return Um(er,e)}function yb(e){return Mm(tr,e)}function _b(e){return Ym(Po,e)}var $b=Object.freeze({__proto__:null,bigint:yb,boolean:vb,date:_b,number:gb,string:hb});Ae(dm());var Ro=Object.freeze({__proto__:null,$brand:mu,$input:$m,$output:_m,NEVER:du,TimePrecision:Im,ZodAny:Ba,ZodArray:Va,ZodBase64:bo,ZodBase64URL:ko,ZodBigInt:tr,ZodBigIntFormat:Oo,ZodBoolean:er,ZodCIDRv4:_o,ZodCIDRv6:$o,ZodCUID:mo,ZodCUID2:po,ZodCatch:ds,ZodCodec:cr,ZodCustom:ur,ZodCustomStringFormat:hn,ZodDate:Po,ZodDefault:is,ZodDiscriminatedUnion:Ja,ZodE164:So,ZodEmail:co,ZodEmoji:uo,ZodEnum:vn,ZodError:ab,ZodExactOptional:ns,ZodFile:es,get ZodFirstPartyTypeKind(){return te},ZodFunction:bs,ZodGUID:Yn,ZodIPv4:vo,ZodIPv6:yo,ZodISODate:Da,ZodISODateTime:Na,ZodISODuration:Ra,ZodISOTime:Ca,ZodIntersection:Ha,ZodIssueCode:cb,ZodJWT:wo,ZodKSUID:go,ZodLazy:ys,ZodLiteral:Qa,ZodMAC:Aa,ZodMap:Ya,ZodNaN:ps,ZodNanoID:lo,ZodNever:Fa,ZodNonOptional:No,ZodNull:Ma,ZodNullable:os,ZodNumber:Qn,ZodNumberFormat:Ht,ZodObject:nr,ZodOptional:ir,ZodPipe:sr,ZodPrefault:ss,ZodPreprocess:fs,ZodPromise:$s,ZodReadonly:hs,ZodRealError:rt,ZodRecord:gn,ZodSet:Xa,ZodString:Wn,ZodStringFormat:ke,ZodSuccess:ls,ZodSymbol:Ua,ZodTemplateLiteral:vs,ZodTransform:ts,ZodTuple:Ka,ZodType:ne,ZodULID:fo,ZodURL:Xn,ZodUUID:St,ZodUndefined:Za,ZodUnion:rr,ZodUnknown:La,ZodVoid:Ga,ZodXID:ho,ZodXor:qa,_ZodString:so,_default:as,_function:Do,any:Hf,array:ae,base64:zf,base64url:Nf,bigint:Ff,boolean:Ne,catch:ms,check:ph,cidrv4:Pf,cidrv6:Ef,clone:et,codec:uh,coerce:$b,config:Ae,core:ob,cuid:bf,cuid2:kf,custom:ks,date:Wf,decode:nf,decodeAsync:of,describe:fh,discriminatedUnion:Eo,e164:jf,email:df,emoji:_f,encode:tf,encodeAsync:rf,endsWith:eo,enum:Fe,exactOptional:rs,file:ih,flattenError:Ei,float32:Zf,float64:Mf,formatError:zi,fromJSONSchema:fb,function:Do,getErrorMap:lb,globalRegistry:ut,gt:Ct,gte:We,guid:mf,hash:Uf,hex:Af,hostname:Rf,httpUrl:yf,includes:Xr,instanceof:gh,int:Io,int32:Bf,int64:Gf,intersection:or,invertCodec:lh,ipv4:Of,ipv6:Tf,iso:Kp,json:yh,jwt:Df,keyof:Yf,ksuid:If,lazy:_s,length:qn,literal:F,locales:vm,looseObject:Le,looseRecord:th,lowercase:Wr,lt:Dt,lte:lt,mac:xf,map:nh,maxLength:Vn,maxSize:dn,meta:hh,mime:to,minLength:Jt,minSize:Rt,multipleOf:ln,nan:ch,nanoid:$f,nativeEnum:oh,negative:wa,never:To,nonnegative:Oa,nonoptional:us,nonpositive:Ia,normalize:no,null:xo,nullable:ar,nullish:ah,number:ie,object:U,optional:Oe,overwrite:Tt,parse:Yp,parseAsync:Xp,partialRecord:eh,pipe:jo,positive:Sa,prefault:cs,preprocess:Co,prettifyError:Cu,promise:mh,property:xa,readonly:gs,record:he,refine:Ss,regex:Kr,regexes:Fi,registry:na,safeDecode:sf,safeDecodeAsync:uf,safeEncode:af,safeEncodeAsync:cf,safeParse:Qp,safeParseAsync:ef,set:rh,setErrorMap:ub,size:Gn,slugify:ao,startsWith:Qr,strictObject:Xf,string:k,stringFormat:Cf,stringbool:vh,success:sh,superRefine:ws,symbol:qf,templateLiteral:dh,toJSONSchema:za,toLowerCase:oo,toUpperCase:io,transform:zo,treeifyError:ju,trim:ro,tuple:Wa,uint32:Lf,uint64:Vf,ulid:Sf,undefined:Jf,union:Se,unknown:ve,uppercase:Yr,url:vf,util:zu,uuid:pf,uuidv4:ff,uuidv6:hf,uuidv7:gf,void:Kf,xid:wf,xor:Qf});const bb=S("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");ee.init(e,t),e.def=t,e.type=t.type,e.parse=(r,o)=>Ur(e,r,o,{callee:e.parse}),e.safeParse=(r,o)=>Mr(e,r,o),e.parseAsync=async(r,o)=>Zr(e,r,o,{callee:e.parseAsync}),e.safeParseAsync=async(r,o)=>Br(e,r,o),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(o=>typeof o=="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]},{parent:!0}),e.with=e.check,e.clone=(r,o)=>et(e,r,o),e.brand=()=>e,e.register=((r,o)=>(r.add(e,o),e)),e.apply=r=>r(e)}),kb=S("ZodMiniObject",(e,t)=>{Wi.init(e,t),bb.init(e,t),oe(e,"shape",()=>t.shape)});function $h(e,t){const r={type:"object",shape:e??{},...z(t)};return new kb(r)}function wt(e){return!!e._zod}function yn(e){const t=Object.values(e);if(t.length===0)return $h({});const r=t.every(wt),o=t.every(n=>!wt(n));if(r)return $h(e);if(o)return U(e);throw new Error("Mixed Zod versions detected in object shape.")}function lr(e,t){return wt(e)?Mr(e,t):e.safeParse(t)}async function Is(e,t){return wt(e)?await Br(e,t):await e.safeParseAsync(t)}function dr(e){if(!e)return;let t;if(wt(e)?t=e._zod?.def?.shape:t=e.shape,!!t){if(typeof t=="function")try{return t()}catch{return}return t}}function mr(e){if(e){if(typeof e=="object"){const t=e,r=e;if(!t._def&&!r._zod){const o=Object.values(e);if(o.length>0&&o.every(n=>typeof n=="object"&&n!==null&&(n._def!==void 0||n._zod!==void 0||typeof n.parse=="function")))return yn(e)}}if(wt(e)){const r=e._zod?.def;if(r&&(r.type==="object"||r.shape!==void 0))return e}else if(e.shape!==void 0)return e}}function Os(e){if(e&&typeof e=="object"){if("message"in e&&typeof e.message=="string")return e.message;if("issues"in e&&Array.isArray(e.issues)&&e.issues.length>0){const t=e.issues[0];if(t&&typeof t=="object"&&"message"in t)return String(t.message)}try{return JSON.stringify(e)}catch{return String(e)}}return String(e)}function Sb(e){return e.description}function wb(e){if(wt(e))return e._zod?.def?.type==="optional";const t=e;return typeof e.isOptional=="function"?e.isOptional():t._def?.typeName==="ZodOptional"}function bh(e){if(wt(e)){const i=e._zod?.def;if(i){if(i.value!==void 0)return i.value;if(Array.isArray(i.values)&&i.values.length>0)return i.values[0]}}const r=e._def;if(r){if(r.value!==void 0)return r.value;if(Array.isArray(r.values)&&r.values.length>0)return r.values[0]}const o=e.value;if(o!==void 0)return o}const kh="2025-11-25",Ib=[kh,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],Kt="io.modelcontextprotocol/related-task",Ao="2.0",je=ks(e=>e!==null&&(typeof e=="object"||typeof e=="function")),Sh=Se([k(),ie().int()]),wh=k();Le({ttl:ie().optional(),pollInterval:ie().optional()});const Ob=U({ttl:ie().optional()}),xb=U({taskId:k()}),xs=Le({progressToken:Sh.optional(),[Kt]:xb.optional()}),ot=U({_meta:xs.optional()}),pr=ot.extend({task:Ob.optional()}),Tb=e=>pr.safeParse(e).success,Ue=U({method:k(),params:ot.loose().optional()}),dt=U({_meta:xs.optional()}),mt=U({method:k(),params:dt.loose().optional()}),Ze=Le({_meta:xs.optional()}),Uo=Se([k(),ie().int()]),Ih=U({jsonrpc:F(Ao),id:Uo,...Ue.shape}).strict(),Oh=e=>Ih.safeParse(e).success,xh=U({jsonrpc:F(Ao),...mt.shape}).strict(),Pb=e=>xh.safeParse(e).success,Ts=U({jsonrpc:F(Ao),id:Uo,result:Ze}).strict(),Zo=e=>Ts.safeParse(e).success;var W;(function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",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.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(W||(W={}));const Ps=U({jsonrpc:F(Ao),id:Uo.optional(),error:U({code:ie().int(),message:k(),data:ve().optional()})}).strict(),Eb=e=>Ps.safeParse(e).success,zb=Se([Ih,xh,Ts,Ps]);Se([Ts,Ps]);const Es=Ze.strict(),Nb=dt.extend({requestId:Uo.optional(),reason:k().optional()}),zs=mt.extend({method:F("notifications/cancelled"),params:Nb}),jb=U({src:k(),mimeType:k().optional(),sizes:ae(k()).optional(),theme:Fe(["light","dark"]).optional()}),fr=U({icons:ae(jb).optional()}),_n=U({name:k(),title:k().optional()}),Th=_n.extend({..._n.shape,...fr.shape,version:k(),websiteUrl:k().optional(),description:k().optional()}),Db=or(U({applyDefaults:Ne().optional()}),he(k(),ve())),Cb=Co(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,or(U({form:Db.optional(),url:je.optional()}),he(k(),ve()).optional())),Rb=Le({list:je.optional(),cancel:je.optional(),requests:Le({sampling:Le({createMessage:je.optional()}).optional(),elicitation:Le({create:je.optional()}).optional()}).optional()}),Ab=Le({list:je.optional(),cancel:je.optional(),requests:Le({tools:Le({call:je.optional()}).optional()}).optional()}),Ub=U({experimental:he(k(),je).optional(),sampling:U({context:je.optional(),tools:je.optional()}).optional(),elicitation:Cb.optional(),roots:U({listChanged:Ne().optional()}).optional(),tasks:Rb.optional(),extensions:he(k(),je).optional()}),Zb=ot.extend({protocolVersion:k(),capabilities:Ub,clientInfo:Th}),Ph=Ue.extend({method:F("initialize"),params:Zb}),Mb=U({experimental:he(k(),je).optional(),logging:je.optional(),completions:je.optional(),prompts:U({listChanged:Ne().optional()}).optional(),resources:U({subscribe:Ne().optional(),listChanged:Ne().optional()}).optional(),tools:U({listChanged:Ne().optional()}).optional(),tasks:Ab.optional(),extensions:he(k(),je).optional()}),Bb=Ze.extend({protocolVersion:k(),capabilities:Mb,serverInfo:Th,instructions:k().optional()}),Eh=mt.extend({method:F("notifications/initialized"),params:dt.optional()}),Ns=Ue.extend({method:F("ping"),params:ot.optional()}),Lb=U({progress:ie(),total:Oe(ie()),message:Oe(k())}),Fb=U({...dt.shape,...Lb.shape,progressToken:Sh}),js=mt.extend({method:F("notifications/progress"),params:Fb}),Gb=ot.extend({cursor:wh.optional()}),hr=Ue.extend({params:Gb.optional()}),gr=Ze.extend({nextCursor:wh.optional()}),Vb=Fe(["working","input_required","completed","failed","cancelled"]),vr=U({taskId:k(),status:Vb,ttl:Se([ie(),xo()]),createdAt:k(),lastUpdatedAt:k(),pollInterval:Oe(ie()),statusMessage:Oe(k())}),Mo=Ze.extend({task:vr}),qb=dt.merge(vr),Bo=mt.extend({method:F("notifications/tasks/status"),params:qb}),Ds=Ue.extend({method:F("tasks/get"),params:ot.extend({taskId:k()})}),Cs=Ze.merge(vr),Rs=Ue.extend({method:F("tasks/result"),params:ot.extend({taskId:k()})});Ze.loose();const As=hr.extend({method:F("tasks/list")}),Us=gr.extend({tasks:ae(vr)}),Zs=Ue.extend({method:F("tasks/cancel"),params:ot.extend({taskId:k()})}),Jb=Ze.merge(vr),zh=U({uri:k(),mimeType:Oe(k()),_meta:he(k(),ve()).optional()}),Nh=zh.extend({text:k()}),Ms=k().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),jh=zh.extend({blob:Ms}),yr=Fe(["user","assistant"]),$n=U({audience:ae(yr).optional(),priority:ie().min(0).max(1).optional(),lastModified:ja({offset:!0}).optional()}),Dh=U({..._n.shape,...fr.shape,uri:k(),description:Oe(k()),mimeType:Oe(k()),size:Oe(ie()),annotations:$n.optional(),_meta:Oe(Le({}))}),Hb=U({..._n.shape,...fr.shape,uriTemplate:k(),description:Oe(k()),mimeType:Oe(k()),annotations:$n.optional(),_meta:Oe(Le({}))}),Bs=hr.extend({method:F("resources/list")}),Kb=gr.extend({resources:ae(Dh)}),Ls=hr.extend({method:F("resources/templates/list")}),Wb=gr.extend({resourceTemplates:ae(Hb)}),Fs=ot.extend({uri:k()}),Yb=Fs,Gs=Ue.extend({method:F("resources/read"),params:Yb}),Xb=Ze.extend({contents:ae(Se([Nh,jh]))}),Qb=mt.extend({method:F("notifications/resources/list_changed"),params:dt.optional()}),ek=Fs,tk=Ue.extend({method:F("resources/subscribe"),params:ek}),nk=Fs,rk=Ue.extend({method:F("resources/unsubscribe"),params:nk}),ok=dt.extend({uri:k()}),ik=mt.extend({method:F("notifications/resources/updated"),params:ok}),ak=U({name:k(),description:Oe(k()),required:Oe(Ne())}),sk=U({..._n.shape,...fr.shape,description:Oe(k()),arguments:Oe(ae(ak)),_meta:Oe(Le({}))}),Vs=hr.extend({method:F("prompts/list")}),ck=gr.extend({prompts:ae(sk)}),uk=ot.extend({name:k(),arguments:he(k(),k()).optional()}),qs=Ue.extend({method:F("prompts/get"),params:uk}),Js=U({type:F("text"),text:k(),annotations:$n.optional(),_meta:he(k(),ve()).optional()}),Hs=U({type:F("image"),data:Ms,mimeType:k(),annotations:$n.optional(),_meta:he(k(),ve()).optional()}),Ks=U({type:F("audio"),data:Ms,mimeType:k(),annotations:$n.optional(),_meta:he(k(),ve()).optional()}),lk=U({type:F("tool_use"),name:k(),id:k(),input:he(k(),ve()),_meta:he(k(),ve()).optional()}),dk=U({type:F("resource"),resource:Se([Nh,jh]),annotations:$n.optional(),_meta:he(k(),ve()).optional()}),mk=Dh.extend({type:F("resource_link")}),Ws=Se([Js,Hs,Ks,mk,dk]),pk=U({role:yr,content:Ws}),fk=Ze.extend({description:k().optional(),messages:ae(pk)}),hk=mt.extend({method:F("notifications/prompts/list_changed"),params:dt.optional()}),gk=U({title:k().optional(),readOnlyHint:Ne().optional(),destructiveHint:Ne().optional(),idempotentHint:Ne().optional(),openWorldHint:Ne().optional()}),vk=U({taskSupport:Fe(["required","optional","forbidden"]).optional()}),Ch=U({..._n.shape,...fr.shape,description:k().optional(),inputSchema:U({type:F("object"),properties:he(k(),je).optional(),required:ae(k()).optional()}).catchall(ve()),outputSchema:U({type:F("object"),properties:he(k(),je).optional(),required:ae(k()).optional()}).catchall(ve()).optional(),annotations:gk.optional(),execution:vk.optional(),_meta:he(k(),ve()).optional()}),Ys=hr.extend({method:F("tools/list")}),yk=gr.extend({tools:ae(Ch)}),Xs=Ze.extend({content:ae(Ws).default([]),structuredContent:he(k(),ve()).optional(),isError:Ne().optional()});Xs.or(Ze.extend({toolResult:ve()}));const _k=pr.extend({name:k(),arguments:he(k(),ve()).optional()}),Lo=Ue.extend({method:F("tools/call"),params:_k}),$k=mt.extend({method:F("notifications/tools/list_changed"),params:dt.optional()});U({autoRefresh:Ne().default(!0),debounceMs:ie().int().nonnegative().default(300)});const Fo=Fe(["debug","info","notice","warning","error","critical","alert","emergency"]),bk=ot.extend({level:Fo}),Rh=Ue.extend({method:F("logging/setLevel"),params:bk}),kk=dt.extend({level:Fo,logger:k().optional(),data:ve()}),Sk=mt.extend({method:F("notifications/message"),params:kk}),wk=U({name:k().optional()}),Ik=U({hints:ae(wk).optional(),costPriority:ie().min(0).max(1).optional(),speedPriority:ie().min(0).max(1).optional(),intelligencePriority:ie().min(0).max(1).optional()}),Ok=U({mode:Fe(["auto","required","none"]).optional()}),xk=U({type:F("tool_result"),toolUseId:k().describe("The unique identifier for the corresponding tool call."),content:ae(Ws).default([]),structuredContent:U({}).loose().optional(),isError:Ne().optional(),_meta:he(k(),ve()).optional()}),Tk=Eo("type",[Js,Hs,Ks]),Go=Eo("type",[Js,Hs,Ks,lk,xk]),Pk=U({role:yr,content:Se([Go,ae(Go)]),_meta:he(k(),ve()).optional()}),Ek=pr.extend({messages:ae(Pk),modelPreferences:Ik.optional(),systemPrompt:k().optional(),includeContext:Fe(["none","thisServer","allServers"]).optional(),temperature:ie().optional(),maxTokens:ie().int(),stopSequences:ae(k()).optional(),metadata:je.optional(),tools:ae(Ch).optional(),toolChoice:Ok.optional()}),zk=Ue.extend({method:F("sampling/createMessage"),params:Ek}),Qs=Ze.extend({model:k(),stopReason:Oe(Fe(["endTurn","stopSequence","maxTokens"]).or(k())),role:yr,content:Tk}),Ah=Ze.extend({model:k(),stopReason:Oe(Fe(["endTurn","stopSequence","maxTokens","toolUse"]).or(k())),role:yr,content:Se([Go,ae(Go)])}),Nk=U({type:F("boolean"),title:k().optional(),description:k().optional(),default:Ne().optional()}),jk=U({type:F("string"),title:k().optional(),description:k().optional(),minLength:ie().optional(),maxLength:ie().optional(),format:Fe(["email","uri","date","date-time"]).optional(),default:k().optional()}),Dk=U({type:Fe(["number","integer"]),title:k().optional(),description:k().optional(),minimum:ie().optional(),maximum:ie().optional(),default:ie().optional()}),Ck=U({type:F("string"),title:k().optional(),description:k().optional(),enum:ae(k()),default:k().optional()}),Rk=U({type:F("string"),title:k().optional(),description:k().optional(),oneOf:ae(U({const:k(),title:k()})),default:k().optional()}),Ak=U({type:F("string"),title:k().optional(),description:k().optional(),enum:ae(k()),enumNames:ae(k()).optional(),default:k().optional()}),Uk=Se([Ck,Rk]),Zk=U({type:F("array"),title:k().optional(),description:k().optional(),minItems:ie().optional(),maxItems:ie().optional(),items:U({type:F("string"),enum:ae(k())}),default:ae(k()).optional()}),Mk=U({type:F("array"),title:k().optional(),description:k().optional(),minItems:ie().optional(),maxItems:ie().optional(),items:U({anyOf:ae(U({const:k(),title:k()}))}),default:ae(k()).optional()}),Bk=Se([Zk,Mk]),Lk=Se([Ak,Uk,Bk]),Fk=Se([Lk,Nk,jk,Dk]),Gk=pr.extend({mode:F("form").optional(),message:k(),requestedSchema:U({type:F("object"),properties:he(k(),Fk),required:ae(k()).optional()})}),Vk=pr.extend({mode:F("url"),message:k(),elicitationId:k(),url:k().url()}),qk=Se([Gk,Vk]),Jk=Ue.extend({method:F("elicitation/create"),params:qk}),Hk=dt.extend({elicitationId:k()}),Kk=mt.extend({method:F("notifications/elicitation/complete"),params:Hk}),Vo=Ze.extend({action:Fe(["accept","decline","cancel"]),content:Co(e=>e===null?void 0:e,he(k(),Se([k(),ie(),Ne(),ae(k())])).optional())}),Wk=U({type:F("ref/resource"),uri:k()}),Yk=U({type:F("ref/prompt"),name:k()}),Xk=ot.extend({ref:Se([Yk,Wk]),argument:U({name:k(),value:k()}),context:U({arguments:he(k(),k()).optional()}).optional()}),ec=Ue.extend({method:F("completion/complete"),params:Xk});function Qk(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function eS(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}const tS=Ze.extend({completion:Le({values:ae(k()).max(100),total:Oe(ie().int()),hasMore:Oe(Ne())})}),nS=U({uri:k().startsWith("file://"),name:k().optional(),_meta:he(k(),ve()).optional()}),rS=Ue.extend({method:F("roots/list"),params:ot.optional()}),Uh=Ze.extend({roots:ae(nS)}),oS=mt.extend({method:F("notifications/roots/list_changed"),params:dt.optional()});Se([Ns,Ph,ec,Rh,qs,Vs,Bs,Ls,Gs,tk,rk,Lo,Ys,Ds,Rs,As,Zs]),Se([zs,js,Eh,oS,Bo]),Se([Es,Qs,Ah,Vo,Uh,Cs,Us,Mo]),Se([Ns,zk,Jk,rS,Ds,Rs,As,Zs]),Se([zs,js,Sk,ik,Qb,$k,hk,Bo,Kk]),Se([Es,Bb,tS,fk,ck,Kb,Wb,Xb,Xs,yk,Cs,Us,Mo]);class q extends Error{constructor(t,r,o){super(`MCP error ${t}: ${r}`),this.code=t,this.data=o,this.name="McpError"}static fromError(t,r,o){if(t===W.UrlElicitationRequired&&o){const n=o;if(n.elicitations)return new iS(n.elicitations,r)}return new q(t,r,o)}}class iS extends q{constructor(t,r=`URL elicitation${t.length>1?"s":""} required`){super(W.UrlElicitationRequired,r,{elicitations:t})}get elicitations(){return this.data?.elicitations??[]}}function Wt(e){return e==="completed"||e==="failed"||e==="cancelled"}const aS=Symbol("Let zodToJsonSchema decide on which parser to use"),Zh={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},sS=e=>typeof e=="string"?{...Zh,name:e}:{...Zh,...e},cS=e=>{const t=sS(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([o,n])=>[n._def,{def:n._def,path:[...t.basePath,t.definitionPath,o],jsonSchema:void 0}]))}};function Mh(e,t,r,o){o?.errorMessages&&r&&(e.errorMessage={...e.errorMessage,[t]:r})}function ye(e,t,r,o,n){e[t]=r,Mh(e,t,o,n)}const Bh=(e,t)=>{let r=0;for(;r<e.length&&r<t.length&&e[r]===t[r];r++);return[(e.length-r).toString(),...t.slice(r)].join("/")};function Ye(e){if(e.target!=="openAi")return{};const t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:e.$refStrategy==="relative"?Bh(t,e.currentPath):t.join("/")}}function uS(e,t){const r={type:"array"};return e.type?._def&&e.type?._def?.typeName!==te.ZodAny&&(r.items=ge(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&ye(r,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&ye(r,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(ye(r,"minItems",e.exactLength.value,e.exactLength.message,t),ye(r,"maxItems",e.exactLength.value,e.exactLength.message,t)),r}function lS(e,t){const r={type:"integer",format:"int64"};if(!e.checks)return r;for(const o of e.checks)switch(o.kind){case"min":t.target==="jsonSchema7"?o.inclusive?ye(r,"minimum",o.value,o.message,t):ye(r,"exclusiveMinimum",o.value,o.message,t):(o.inclusive||(r.exclusiveMinimum=!0),ye(r,"minimum",o.value,o.message,t));break;case"max":t.target==="jsonSchema7"?o.inclusive?ye(r,"maximum",o.value,o.message,t):ye(r,"exclusiveMaximum",o.value,o.message,t):(o.inclusive||(r.exclusiveMaximum=!0),ye(r,"maximum",o.value,o.message,t));break;case"multipleOf":ye(r,"multipleOf",o.value,o.message,t);break}return r}function dS(){return{type:"boolean"}}function Lh(e,t){return ge(e.type._def,t)}const mS=(e,t)=>ge(e.innerType._def,t);function Fh(e,t,r){const o=r??t.dateStrategy;if(Array.isArray(o))return{anyOf:o.map((n,i)=>Fh(e,t,n))};switch(o){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return pS(e,t)}}const pS=(e,t)=>{const r={type:"integer",format:"unix-time"};if(t.target==="openApi3")return r;for(const o of e.checks)switch(o.kind){case"min":ye(r,"minimum",o.value,o.message,t);break;case"max":ye(r,"maximum",o.value,o.message,t);break}return r};function fS(e,t){return{...ge(e.innerType._def,t),default:e.defaultValue()}}function hS(e,t){return t.effectStrategy==="input"?ge(e.schema._def,t):Ye(t)}function gS(e){return{type:"string",enum:Array.from(e.values)}}const vS=e=>"type"in e&&e.type==="string"?!1:"allOf"in e;function yS(e,t){const r=[ge(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),ge(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(i=>!!i);let o=t.target==="jsonSchema2019-09"?{unevaluatedProperties:!1}:void 0;const n=[];return r.forEach(i=>{if(vS(i))n.push(...i.allOf),i.unevaluatedProperties===void 0&&(o=void 0);else{let a=i;if("additionalProperties"in i&&i.additionalProperties===!1){const{additionalProperties:s,...c}=i;a=c}else o=void 0;n.push(a)}}),n.length?{allOf:n,...o}:void 0}function _S(e,t){const r=typeof e.value;return r!=="bigint"&&r!=="number"&&r!=="boolean"&&r!=="string"?{type:Array.isArray(e.value)?"array":"object"}:t.target==="openApi3"?{type:r==="bigint"?"integer":r,enum:[e.value]}:{type:r==="bigint"?"integer":r,const:e.value}}let tc;const ht={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(tc===void 0&&(tc=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),tc),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?: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])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function Gh(e,t){const r={type:"string"};if(e.checks)for(const o of e.checks)switch(o.kind){case"min":ye(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,o.value):o.value,o.message,t);break;case"max":ye(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,o.value):o.value,o.message,t);break;case"email":switch(t.emailStrategy){case"format:email":gt(r,"email",o.message,t);break;case"format:idn-email":gt(r,"idn-email",o.message,t);break;case"pattern:zod":Je(r,ht.email,o.message,t);break}break;case"url":gt(r,"uri",o.message,t);break;case"uuid":gt(r,"uuid",o.message,t);break;case"regex":Je(r,o.regex,o.message,t);break;case"cuid":Je(r,ht.cuid,o.message,t);break;case"cuid2":Je(r,ht.cuid2,o.message,t);break;case"startsWith":Je(r,RegExp(`^${nc(o.value,t)}`),o.message,t);break;case"endsWith":Je(r,RegExp(`${nc(o.value,t)}$`),o.message,t);break;case"datetime":gt(r,"date-time",o.message,t);break;case"date":gt(r,"date",o.message,t);break;case"time":gt(r,"time",o.message,t);break;case"duration":gt(r,"duration",o.message,t);break;case"length":ye(r,"minLength",typeof r.minLength=="number"?Math.max(r.minLength,o.value):o.value,o.message,t),ye(r,"maxLength",typeof r.maxLength=="number"?Math.min(r.maxLength,o.value):o.value,o.message,t);break;case"includes":{Je(r,RegExp(nc(o.value,t)),o.message,t);break}case"ip":{o.version!=="v6"&>(r,"ipv4",o.message,t),o.version!=="v4"&>(r,"ipv6",o.message,t);break}case"base64url":Je(r,ht.base64url,o.message,t);break;case"jwt":Je(r,ht.jwt,o.message,t);break;case"cidr":{o.version!=="v6"&&Je(r,ht.ipv4Cidr,o.message,t),o.version!=="v4"&&Je(r,ht.ipv6Cidr,o.message,t);break}case"emoji":Je(r,ht.emoji(),o.message,t);break;case"ulid":{Je(r,ht.ulid,o.message,t);break}case"base64":{switch(t.base64Strategy){case"format:binary":{gt(r,"binary",o.message,t);break}case"contentEncoding:base64":{ye(r,"contentEncoding","base64",o.message,t);break}case"pattern:zod":{Je(r,ht.base64,o.message,t);break}}break}case"nanoid":Je(r,ht.nanoid,o.message,t)}return r}function nc(e,t){return t.patternStrategy==="escape"?bS(e):e}const $S=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function bS(e){let t="";for(let r=0;r<e.length;r++)$S.has(e[r])||(t+="\\"),t+=e[r];return t}function gt(e,t,r,o){e.format||e.anyOf?.some(n=>n.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&o.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.anyOf.push({format:t,...r&&o.errorMessages&&{errorMessage:{format:r}}})):ye(e,"format",t,r,o)}function Je(e,t,r,o){e.pattern||e.allOf?.some(n=>n.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&o.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,Object.keys(e.errorMessage).length===0&&delete e.errorMessage)),e.allOf.push({pattern:Vh(t,o),...r&&o.errorMessages&&{errorMessage:{pattern:r}}})):ye(e,"pattern",Vh(t,o),r,o)}function Vh(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;const r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},o=r.i?e.source.toLowerCase():e.source;let n="",i=!1,a=!1,s=!1;for(let c=0;c<o.length;c++){if(i){n+=o[c],i=!1;continue}if(r.i){if(a){if(o[c].match(/[a-z]/)){s?(n+=o[c],n+=`${o[c-2]}-${o[c]}`.toUpperCase(),s=!1):o[c+1]==="-"&&o[c+2]?.match(/[a-z]/)?(n+=o[c],s=!0):n+=`${o[c]}${o[c].toUpperCase()}`;continue}}else if(o[c].match(/[a-z]/)){n+=`[${o[c]}${o[c].toUpperCase()}]`;continue}}if(r.m){if(o[c]==="^"){n+=`(^|(?<=[\r
|
|
67
|
+
]))`;continue}else if(o[c]==="$"){n+=`($|(?=[\r
|
|
68
|
+
]))`;continue}}if(r.s&&o[c]==="."){n+=a?`${o[c]}\r
|
|
69
|
+
`:`[${o[c]}\r
|
|
70
|
+
]`;continue}n+=o[c],o[c]==="\\"?i=!0:a&&o[c]==="]"?a=!1:!a&&o[c]==="["&&(a=!0)}try{new RegExp(n)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return n}function qh(e,t){if(t.target==="openAi"&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),t.target==="openApi3"&&e.keyType?._def.typeName===te.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((o,n)=>({...o,[n]:ge(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",n]})??Ye(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};const r={type:"object",additionalProperties:ge(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if(t.target==="openApi3")return r;if(e.keyType?._def.typeName===te.ZodString&&e.keyType._def.checks?.length){const{type:o,...n}=Gh(e.keyType._def,t);return{...r,propertyNames:n}}else{if(e.keyType?._def.typeName===te.ZodEnum)return{...r,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===te.ZodBranded&&e.keyType._def.type._def.typeName===te.ZodString&&e.keyType._def.type._def.checks?.length){const{type:o,...n}=Lh(e.keyType._def,t);return{...r,propertyNames:n}}}return r}function kS(e,t){if(t.mapStrategy==="record")return qh(e,t);const r=ge(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||Ye(t),o=ge(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||Ye(t);return{type:"array",maxItems:125,items:{type:"array",items:[r,o],minItems:2,maxItems:2}}}function SS(e){const t=e.values,o=Object.keys(e.values).filter(i=>typeof t[t[i]]!="number").map(i=>t[i]),n=Array.from(new Set(o.map(i=>typeof i)));return{type:n.length===1?n[0]==="string"?"string":"number":["string","number"],enum:o}}function wS(e){return e.target==="openAi"?void 0:{not:Ye({...e,currentPath:[...e.currentPath,"not"]})}}function IS(e){return e.target==="openApi3"?{enum:["null"],nullable:!0}:{type:"null"}}const qo={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function OS(e,t){if(t.target==="openApi3")return Jh(e,t);const r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(o=>o._def.typeName in qo&&(!o._def.checks||!o._def.checks.length))){const o=r.reduce((n,i)=>{const a=qo[i._def.typeName];return a&&!n.includes(a)?[...n,a]:n},[]);return{type:o.length>1?o:o[0]}}else if(r.every(o=>o._def.typeName==="ZodLiteral"&&!o.description)){const o=r.reduce((n,i)=>{const a=typeof i._def.value;switch(a){case"string":case"number":case"boolean":return[...n,a];case"bigint":return[...n,"integer"];case"object":if(i._def.value===null)return[...n,"null"];case"symbol":case"undefined":case"function":default:return n}},[]);if(o.length===r.length){const n=o.filter((i,a,s)=>s.indexOf(i)===a);return{type:n.length>1?n:n[0],enum:r.reduce((i,a)=>i.includes(a._def.value)?i:[...i,a._def.value],[])}}}else if(r.every(o=>o._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((o,n)=>[...o,...n._def.values.filter(i=>!o.includes(i))],[])};return Jh(e,t)}const Jh=(e,t)=>{const r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((o,n)=>ge(o._def,{...t,currentPath:[...t.currentPath,"anyOf",`${n}`]})).filter(o=>!!o&&(!t.strictUnions||typeof o=="object"&&Object.keys(o).length>0));return r.length?{anyOf:r}:void 0};function xS(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return t.target==="openApi3"?{type:qo[e.innerType._def.typeName],nullable:!0}:{type:[qo[e.innerType._def.typeName],"null"]};if(t.target==="openApi3"){const o=ge(e.innerType._def,{...t,currentPath:[...t.currentPath]});return o&&"$ref"in o?{allOf:[o],nullable:!0}:o&&{...o,nullable:!0}}const r=ge(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function TS(e,t){const r={type:"number"};if(!e.checks)return r;for(const o of e.checks)switch(o.kind){case"int":r.type="integer",Mh(r,"type",o.message,t);break;case"min":t.target==="jsonSchema7"?o.inclusive?ye(r,"minimum",o.value,o.message,t):ye(r,"exclusiveMinimum",o.value,o.message,t):(o.inclusive||(r.exclusiveMinimum=!0),ye(r,"minimum",o.value,o.message,t));break;case"max":t.target==="jsonSchema7"?o.inclusive?ye(r,"maximum",o.value,o.message,t):ye(r,"exclusiveMaximum",o.value,o.message,t):(o.inclusive||(r.exclusiveMaximum=!0),ye(r,"maximum",o.value,o.message,t));break;case"multipleOf":ye(r,"multipleOf",o.value,o.message,t);break}return r}function PS(e,t){const r=t.target==="openAi",o={type:"object",properties:{}},n=[],i=e.shape();for(const s in i){let c=i[s];if(c===void 0||c._def===void 0)continue;let u=zS(c);u&&r&&(c._def.typeName==="ZodOptional"&&(c=c._def.innerType),c.isNullable()||(c=c.nullable()),u=!1);const l=ge(c._def,{...t,currentPath:[...t.currentPath,"properties",s],propertyPath:[...t.currentPath,"properties",s]});l!==void 0&&(o.properties[s]=l,u||n.push(s))}n.length&&(o.required=n);const a=ES(e,t);return a!==void 0&&(o.additionalProperties=a),o}function ES(e,t){if(e.catchall._def.typeName!=="ZodNever")return ge(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function zS(e){try{return e.isOptional()}catch{return!0}}const NS=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return ge(e.innerType._def,t);const r=ge(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:Ye(t)},r]}:Ye(t)},jS=(e,t)=>{if(t.pipeStrategy==="input")return ge(e.in._def,t);if(t.pipeStrategy==="output")return ge(e.out._def,t);const r=ge(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),o=ge(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,o].filter(n=>n!==void 0)}};function DS(e,t){return ge(e.type._def,t)}function CS(e,t){const o={type:"array",uniqueItems:!0,items:ge(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&ye(o,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&ye(o,"maxItems",e.maxSize.value,e.maxSize.message,t),o}function RS(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,o)=>ge(r._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((r,o)=>o===void 0?r:[...r,o],[]),additionalItems:ge(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,o)=>ge(r._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((r,o)=>o===void 0?r:[...r,o],[])}}function AS(e){return{not:Ye(e)}}function US(e){return Ye(e)}const ZS=(e,t)=>ge(e.innerType._def,t),MS=(e,t,r)=>{switch(t){case te.ZodString:return Gh(e,r);case te.ZodNumber:return TS(e,r);case te.ZodObject:return PS(e,r);case te.ZodBigInt:return lS(e,r);case te.ZodBoolean:return dS();case te.ZodDate:return Fh(e,r);case te.ZodUndefined:return AS(r);case te.ZodNull:return IS(r);case te.ZodArray:return uS(e,r);case te.ZodUnion:case te.ZodDiscriminatedUnion:return OS(e,r);case te.ZodIntersection:return yS(e,r);case te.ZodTuple:return RS(e,r);case te.ZodRecord:return qh(e,r);case te.ZodLiteral:return _S(e,r);case te.ZodEnum:return gS(e);case te.ZodNativeEnum:return SS(e);case te.ZodNullable:return xS(e,r);case te.ZodOptional:return NS(e,r);case te.ZodMap:return kS(e,r);case te.ZodSet:return CS(e,r);case te.ZodLazy:return()=>e.getter()._def;case te.ZodPromise:return DS(e,r);case te.ZodNaN:case te.ZodNever:return wS(r);case te.ZodEffects:return hS(e,r);case te.ZodAny:return Ye(r);case te.ZodUnknown:return US(r);case te.ZodDefault:return fS(e,r);case te.ZodBranded:return Lh(e,r);case te.ZodReadonly:return ZS(e,r);case te.ZodCatch:return mS(e,r);case te.ZodPipeline:return jS(e,r);case te.ZodFunction:case te.ZodVoid:case te.ZodSymbol:return;default:return(o=>{})()}};function ge(e,t,r=!1){const o=t.seen.get(e);if(t.override){const s=t.override?.(e,t,o,r);if(s!==aS)return s}if(o&&!r){const s=BS(o,t);if(s!==void 0)return s}const n={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,n);const i=MS(e,e.typeName,t),a=typeof i=="function"?ge(i(),t):i;if(a&&LS(e,t,a),t.postProcess){const s=t.postProcess(a,e,t);return n.jsonSchema=a,s}return n.jsonSchema=a,a}const BS=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:Bh(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,o)=>t.currentPath[o]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),Ye(t)):t.$refStrategy==="seen"?Ye(t):void 0}},LS=(e,t,r)=>(e.description&&(r.description=e.description,t.markdownDescription&&(r.markdownDescription=e.description)),r),FS=(e,t)=>{const r=cS(t);let o=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,l])=>({...c,[u]:ge(l._def,{...r,currentPath:[...r.basePath,r.definitionPath,u]},!0)??Ye(r)}),{}):void 0;const n=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,i=ge(e._def,n===void 0?r:{...r,currentPath:[...r.basePath,r.definitionPath,n]},!1)??Ye(r),a=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;a!==void 0&&(i.title=a),r.flags.hasReferencedOpenAiAnyType&&(o||(o={}),o[r.openAiAnyTypeName]||(o[r.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:r.$refStrategy==="relative"?"1":[...r.basePath,r.definitionPath,r.openAiAnyTypeName].join("/")}}));const s=n===void 0?o?{...i,[r.definitionPath]:o}:i:{$ref:[...r.$refStrategy==="relative"?[]:r.basePath,r.definitionPath,n].join("/"),[r.definitionPath]:{...o,[n]:i}};return r.target==="jsonSchema7"?s.$schema="http://json-schema.org/draft-07/schema#":(r.target==="jsonSchema2019-09"||r.target==="openAi")&&(s.$schema="https://json-schema.org/draft/2019-09/schema#"),r.target==="openAi"&&("anyOf"in s||"oneOf"in s||"allOf"in s||"type"in s&&Array.isArray(s.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),s};function GS(e){return!e||e==="jsonSchema7"||e==="draft-7"?"draft-7":e==="jsonSchema2019-09"||e==="draft-2020-12"?"draft-2020-12":"draft-7"}function Hh(e,t){return wt(e)?za(e,{target:GS(t?.target),io:t?.pipeStrategy??"input"}):FS(e,{strictUnions:t?.strictUnions??!0,pipeStrategy:t?.pipeStrategy??"input"})}function Kh(e){const r=dr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");const o=bh(r);if(typeof o!="string")throw new Error("Schema method literal must be a string");return o}function Wh(e,t){const r=lr(e,t);if(!r.success)throw r.error;return r.data}const VS=6e4;class qS{constructor(t){this._options=t,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(zs,r=>{this._oncancel(r)}),this.setNotificationHandler(js,r=>{this._onprogress(r)}),this.setRequestHandler(Ns,r=>({})),this._taskStore=t?.taskStore,this._taskMessageQueue=t?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(Ds,async(r,o)=>{const n=await this._taskStore.getTask(r.params.taskId,o.sessionId);if(!n)throw new q(W.InvalidParams,"Failed to retrieve task: Task not found");return{...n}}),this.setRequestHandler(Rs,async(r,o)=>{const n=async()=>{const i=r.params.taskId;if(this._taskMessageQueue){let s;for(;s=await this._taskMessageQueue.dequeue(i,o.sessionId);){if(s.type==="response"||s.type==="error"){const c=s.message,u=c.id,l=this._requestResolvers.get(u);if(l)if(this._requestResolvers.delete(u),s.type==="response")l(c);else{const d=c,p=new q(d.error.code,d.error.message,d.error.data);l(p)}else{const d=s.type==="response"?"Response":"Error";this._onerror(new Error(`${d} handler missing for request ${u}`))}continue}await this._transport?.send(s.message,{relatedRequestId:o.requestId})}}const a=await this._taskStore.getTask(i,o.sessionId);if(!a)throw new q(W.InvalidParams,`Task not found: ${i}`);if(!Wt(a.status))return await this._waitForTaskUpdate(i,o.signal),await n();if(Wt(a.status)){const s=await this._taskStore.getTaskResult(i,o.sessionId);return this._clearTaskQueue(i),{...s,_meta:{...s._meta,[Kt]:{taskId:i}}}}return await n()};return await n()}),this.setRequestHandler(As,async(r,o)=>{try{const{tasks:n,nextCursor:i}=await this._taskStore.listTasks(r.params?.cursor,o.sessionId);return{tasks:n,nextCursor:i,_meta:{}}}catch(n){throw new q(W.InvalidParams,`Failed to list tasks: ${n instanceof Error?n.message:String(n)}`)}}),this.setRequestHandler(Zs,async(r,o)=>{try{const n=await this._taskStore.getTask(r.params.taskId,o.sessionId);if(!n)throw new q(W.InvalidParams,`Task not found: ${r.params.taskId}`);if(Wt(n.status))throw new q(W.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(r.params.taskId,"cancelled","Client cancelled task execution.",o.sessionId),this._clearTaskQueue(r.params.taskId);const i=await this._taskStore.getTask(r.params.taskId,o.sessionId);if(!i)throw new q(W.InvalidParams,`Task not found after cancellation: ${r.params.taskId}`);return{_meta:{},...i}}catch(n){throw n instanceof q?n:new q(W.InvalidRequest,`Failed to cancel task: ${n instanceof Error?n.message:String(n)}`)}}))}async _oncancel(t){if(!t.params.requestId)return;this._requestHandlerAbortControllers.get(t.params.requestId)?.abort(t.params.reason)}_setupTimeout(t,r,o,n,i=!1){this._timeoutInfo.set(t,{timeoutId:setTimeout(n,r),startTime:Date.now(),timeout:r,maxTotalTimeout:o,resetTimeoutOnProgress:i,onTimeout:n})}_resetTimeout(t){const r=this._timeoutInfo.get(t);if(!r)return!1;const o=Date.now()-r.startTime;if(r.maxTotalTimeout&&o>=r.maxTotalTimeout)throw this._timeoutInfo.delete(t),q.fromError(W.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:r.maxTotalTimeout,totalElapsed:o});return clearTimeout(r.timeoutId),r.timeoutId=setTimeout(r.onTimeout,r.timeout),!0}_cleanupTimeout(t){const r=this._timeoutInfo.get(t);r&&(clearTimeout(r.timeoutId),this._timeoutInfo.delete(t))}async connect(t){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=t;const r=this.transport?.onclose;this._transport.onclose=()=>{r?.(),this._onclose()};const o=this.transport?.onerror;this._transport.onerror=i=>{o?.(i),this._onerror(i)};const n=this._transport?.onmessage;this._transport.onmessage=(i,a)=>{n?.(i,a),Zo(i)||Eb(i)?this._onresponse(i):Oh(i)?this._onrequest(i,a):Pb(i)?this._onnotification(i):this._onerror(new Error(`Unknown message type: ${JSON.stringify(i)}`))},await this._transport.start()}_onclose(){const t=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(const o of this._timeoutInfo.values())clearTimeout(o.timeoutId);this._timeoutInfo.clear();for(const o of this._requestHandlerAbortControllers.values())o.abort();this._requestHandlerAbortControllers.clear();const r=q.fromError(W.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const o of t.values())o(r)}_onerror(t){this.onerror?.(t)}_onnotification(t){const r=this._notificationHandlers.get(t.method)??this.fallbackNotificationHandler;r!==void 0&&Promise.resolve().then(()=>r(t)).catch(o=>this._onerror(new Error(`Uncaught error in notification handler: ${o}`)))}_onrequest(t,r){const o=this._requestHandlers.get(t.method)??this.fallbackRequestHandler,n=this._transport,i=t.params?._meta?.[Kt]?.taskId;if(o===void 0){const l={jsonrpc:"2.0",id:t.id,error:{code:W.MethodNotFound,message:"Method not found"}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:"error",message:l,timestamp:Date.now()},n?.sessionId).catch(d=>this._onerror(new Error(`Failed to enqueue error response: ${d}`))):n?.send(l).catch(d=>this._onerror(new Error(`Failed to send an error response: ${d}`)));return}const a=new AbortController;this._requestHandlerAbortControllers.set(t.id,a);const s=Tb(t.params)?t.params.task:void 0,c=this._taskStore?this.requestTaskStore(t,n?.sessionId):void 0,u={signal:a.signal,sessionId:n?.sessionId,_meta:t.params?._meta,sendNotification:async l=>{if(a.signal.aborted)return;const d={relatedRequestId:t.id};i&&(d.relatedTask={taskId:i}),await this.notification(l,d)},sendRequest:async(l,d,p)=>{if(a.signal.aborted)throw new q(W.ConnectionClosed,"Request was cancelled");const m={...p,relatedRequestId:t.id};i&&!m.relatedTask&&(m.relatedTask={taskId:i});const h=m.relatedTask?.taskId??i;return h&&c&&await c.updateTaskStatus(h,"input_required"),await this.request(l,d,m)},authInfo:r?.authInfo,requestId:t.id,requestInfo:r?.requestInfo,taskId:i,taskStore:c,taskRequestedTtl:s?.ttl,closeSSEStream:r?.closeSSEStream,closeStandaloneSSEStream:r?.closeStandaloneSSEStream};Promise.resolve().then(()=>{s&&this.assertTaskHandlerCapability(t.method)}).then(()=>o(t,u)).then(async l=>{if(a.signal.aborted)return;const d={result:l,jsonrpc:"2.0",id:t.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"response",message:d,timestamp:Date.now()},n?.sessionId):await n?.send(d)},async l=>{if(a.signal.aborted)return;const d={jsonrpc:"2.0",id:t.id,error:{code:Number.isSafeInteger(l.code)?l.code:W.InternalError,message:l.message??"Internal error",...l.data!==void 0&&{data:l.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:"error",message:d,timestamp:Date.now()},n?.sessionId):await n?.send(d)}).catch(l=>this._onerror(new Error(`Failed to send response: ${l}`))).finally(()=>{this._requestHandlerAbortControllers.get(t.id)===a&&this._requestHandlerAbortControllers.delete(t.id)})}_onprogress(t){const{progressToken:r,...o}=t.params,n=Number(r),i=this._progressHandlers.get(n);if(!i){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(t)}`));return}const a=this._responseHandlers.get(n),s=this._timeoutInfo.get(n);if(s&&a&&s.resetTimeoutOnProgress)try{this._resetTimeout(n)}catch(c){this._responseHandlers.delete(n),this._progressHandlers.delete(n),this._cleanupTimeout(n),a(c);return}i(o)}_onresponse(t){const r=Number(t.id),o=this._requestResolvers.get(r);if(o){if(this._requestResolvers.delete(r),Zo(t))o(t);else{const a=new q(t.error.code,t.error.message,t.error.data);o(a)}return}const n=this._responseHandlers.get(r);if(n===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(t)}`));return}this._responseHandlers.delete(r),this._cleanupTimeout(r);let i=!1;if(Zo(t)&&t.result&&typeof t.result=="object"){const a=t.result;if(a.task&&typeof a.task=="object"){const s=a.task;typeof s.taskId=="string"&&(i=!0,this._taskProgressTokens.set(s.taskId,r))}}if(i||this._progressHandlers.delete(r),Zo(t))n(t);else{const a=q.fromError(t.error.code,t.error.message,t.error.data);n(a)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(t,r,o){const{task:n}=o??{};if(!n){try{yield{type:"result",result:await this.request(t,r,o)}}catch(a){yield{type:"error",error:a instanceof q?a:new q(W.InternalError,String(a))}}return}let i;try{const a=await this.request(t,Mo,o);if(a.task)i=a.task.taskId,yield{type:"taskCreated",task:a.task};else throw new q(W.InternalError,"Task creation did not return a task");for(;;){const s=await this.getTask({taskId:i},o);if(yield{type:"taskStatus",task:s},Wt(s.status)){s.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:i},r,o)}:s.status==="failed"?yield{type:"error",error:new q(W.InternalError,`Task ${i} failed`)}:s.status==="cancelled"&&(yield{type:"error",error:new q(W.InternalError,`Task ${i} was cancelled`)});return}if(s.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:i},r,o)};return}const c=s.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(u=>setTimeout(u,c)),o?.signal?.throwIfAborted()}}catch(a){yield{type:"error",error:a instanceof q?a:new q(W.InternalError,String(a))}}}request(t,r,o){const{relatedRequestId:n,resumptionToken:i,onresumptiontoken:a,task:s,relatedTask:c}=o??{};return new Promise((u,l)=>{const d=y=>{l(y)};if(!this._transport){d(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method),s&&this.assertTaskCapability(t.method)}catch(y){d(y);return}o?.signal?.throwIfAborted();const p=this._requestMessageId++,m={...t,jsonrpc:"2.0",id:p};o?.onprogress&&(this._progressHandlers.set(p,o.onprogress),m.params={...t.params,_meta:{...t.params?._meta||{},progressToken:p}}),s&&(m.params={...m.params,task:s}),c&&(m.params={...m.params,_meta:{...m.params?._meta||{},[Kt]:c}});const h=y=>{this._responseHandlers.delete(p),this._progressHandlers.delete(p),this._cleanupTimeout(p),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:p,reason:String(y)}},{relatedRequestId:n,resumptionToken:i,onresumptiontoken:a}).catch(I=>this._onerror(new Error(`Failed to send cancellation: ${I}`)));const b=y instanceof q?y:new q(W.RequestTimeout,String(y));l(b)};this._responseHandlers.set(p,y=>{if(!o?.signal?.aborted){if(y instanceof Error)return l(y);try{const b=lr(r,y.result);b.success?u(b.data):l(b.error)}catch(b){l(b)}}}),o?.signal?.addEventListener("abort",()=>{h(o?.signal?.reason)});const $=o?.timeout??VS,g=()=>h(q.fromError(W.RequestTimeout,"Request timed out",{timeout:$}));this._setupTimeout(p,$,o?.maxTotalTimeout,g,o?.resetTimeoutOnProgress??!1);const v=c?.taskId;if(v){const y=b=>{const I=this._responseHandlers.get(p);I?I(b):this._onerror(new Error(`Response handler missing for side-channeled request ${p}`))};this._requestResolvers.set(p,y),this._enqueueTaskMessage(v,{type:"request",message:m,timestamp:Date.now()}).catch(b=>{this._cleanupTimeout(p),l(b)})}else this._transport.send(m,{relatedRequestId:n,resumptionToken:i,onresumptiontoken:a}).catch(y=>{this._cleanupTimeout(p),l(y)})})}async getTask(t,r){return this.request({method:"tasks/get",params:t},Cs,r)}async getTaskResult(t,r,o){return this.request({method:"tasks/result",params:t},r,o)}async listTasks(t,r){return this.request({method:"tasks/list",params:t},Us,r)}async cancelTask(t,r){return this.request({method:"tasks/cancel",params:t},Jb,r)}async notification(t,r){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(t.method);const o=r?.relatedTask?.taskId;if(o){const s={...t,jsonrpc:"2.0",params:{...t.params,_meta:{...t.params?._meta||{},[Kt]:r.relatedTask}}};await this._enqueueTaskMessage(o,{type:"notification",message:s,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&!r?.relatedRequestId&&!r?.relatedTask){if(this._pendingDebouncedNotifications.has(t.method))return;this._pendingDebouncedNotifications.add(t.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(t.method),!this._transport)return;let s={...t,jsonrpc:"2.0"};r?.relatedTask&&(s={...s,params:{...s.params,_meta:{...s.params?._meta||{},[Kt]:r.relatedTask}}}),this._transport?.send(s,r).catch(c=>this._onerror(c))});return}let a={...t,jsonrpc:"2.0"};r?.relatedTask&&(a={...a,params:{...a.params,_meta:{...a.params?._meta||{},[Kt]:r.relatedTask}}}),await this._transport.send(a,r)}setRequestHandler(t,r){const o=Kh(t);this.assertRequestHandlerCapability(o),this._requestHandlers.set(o,(n,i)=>{const a=Wh(t,n);return Promise.resolve(r(a,i))})}removeRequestHandler(t){this._requestHandlers.delete(t)}assertCanSetRequestHandler(t){if(this._requestHandlers.has(t))throw new Error(`A request handler for ${t} already exists, which would be overridden`)}setNotificationHandler(t,r){const o=Kh(t);this._notificationHandlers.set(o,n=>{const i=Wh(t,n);return Promise.resolve(r(i))})}removeNotificationHandler(t){this._notificationHandlers.delete(t)}_cleanupTaskProgressHandler(t){const r=this._taskProgressTokens.get(t);r!==void 0&&(this._progressHandlers.delete(r),this._taskProgressTokens.delete(t))}async _enqueueTaskMessage(t,r,o){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const n=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(t,r,o,n)}async _clearTaskQueue(t,r){if(this._taskMessageQueue){const o=await this._taskMessageQueue.dequeueAll(t,r);for(const n of o)if(n.type==="request"&&Oh(n.message)){const i=n.message.id,a=this._requestResolvers.get(i);a?(a(new q(W.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(i)):this._onerror(new Error(`Resolver missing for request ${i} during task ${t} cleanup`))}}}async _waitForTaskUpdate(t,r){let o=this._options?.defaultTaskPollInterval??1e3;try{const n=await this._taskStore?.getTask(t);n?.pollInterval&&(o=n.pollInterval)}catch{}return new Promise((n,i)=>{if(r.aborted){i(new q(W.InvalidRequest,"Request cancelled"));return}const a=setTimeout(n,o);r.addEventListener("abort",()=>{clearTimeout(a),i(new q(W.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(t,r){const o=this._taskStore;if(!o)throw new Error("No task store configured");return{createTask:async n=>{if(!t)throw new Error("No request provided");return await o.createTask(n,t.id,{method:t.method,params:t.params},r)},getTask:async n=>{const i=await o.getTask(n,r);if(!i)throw new q(W.InvalidParams,"Failed to retrieve task: Task not found");return i},storeTaskResult:async(n,i,a)=>{await o.storeTaskResult(n,i,a,r);const s=await o.getTask(n,r);if(s){const c=Bo.parse({method:"notifications/tasks/status",params:s});await this.notification(c),Wt(s.status)&&this._cleanupTaskProgressHandler(n)}},getTaskResult:n=>o.getTaskResult(n,r),updateTaskStatus:async(n,i,a)=>{const s=await o.getTask(n,r);if(!s)throw new q(W.InvalidParams,`Task "${n}" not found - it may have been cleaned up`);if(Wt(s.status))throw new q(W.InvalidParams,`Cannot update task "${n}" from terminal status "${s.status}" to "${i}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await o.updateTaskStatus(n,i,a,r);const c=await o.getTask(n,r);if(c){const u=Bo.parse({method:"notifications/tasks/status",params:c});await this.notification(u),Wt(c.status)&&this._cleanupTaskProgressHandler(n)}},listTasks:n=>o.listTasks(n,r)}}}function Yh(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function JS(e,t){const r={...e};for(const o in t){const n=o,i=t[n];if(i===void 0)continue;const a=r[n];Yh(a)&&Yh(i)?r[n]={...a,...i}:r[n]=i}return r}function Xh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rc={exports:{}},Qh={},Pt={},Yt={},oc={},se={},_r={};(function(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;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(y){if(super(),!e.IDENTIFIER.test(y))throw new Error("CodeGen: name must be a valid identifier");this.str=y}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class o extends t{constructor(y){super(),this._items=typeof y=="string"?[y]:y}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const y=this._items[0];return y===""||y==='""'}get str(){var y;return(y=this._str)!==null&&y!==void 0?y:this._str=this._items.reduce((b,I)=>`${b}${I}`,"")}get names(){var y;return(y=this._names)!==null&&y!==void 0?y:this._names=this._items.reduce((b,I)=>(I instanceof r&&(b[I.str]=(b[I.str]||0)+1),b),{})}}e._Code=o,e.nil=new o("");function n(v,...y){const b=[v[0]];let I=0;for(;I<y.length;)s(b,y[I]),b.push(v[++I]);return new o(b)}e._=n;const i=new o("+");function a(v,...y){const b=[m(v[0])];let I=0;for(;I<y.length;)b.push(i),s(b,y[I]),b.push(i,m(v[++I]));return c(b),new o(b)}e.str=a;function s(v,y){y instanceof o?v.push(...y._items):y instanceof r?v.push(y):v.push(d(y))}e.addCodeArg=s;function c(v){let y=1;for(;y<v.length-1;){if(v[y]===i){const b=u(v[y-1],v[y+1]);if(b!==void 0){v.splice(y-1,3,b);continue}v[y++]="+"}y++}}function u(v,y){if(y==='""')return v;if(v==='""')return y;if(typeof v=="string")return y instanceof r||v[v.length-1]!=='"'?void 0:typeof y!="string"?`${v.slice(0,-1)}${y}"`:y[0]==='"'?v.slice(0,-1)+y.slice(1):void 0;if(typeof y=="string"&&y[0]==='"'&&!(v instanceof r))return`"${v}${y.slice(1)}`}function l(v,y){return y.emptyStr()?v:v.emptyStr()?y:a`${v}${y}`}e.strConcat=l;function d(v){return typeof v=="number"||typeof v=="boolean"||v===null?v:m(Array.isArray(v)?v.join(","):v)}function p(v){return new o(m(v))}e.stringify=p;function m(v){return JSON.stringify(v).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=m;function h(v){return typeof v=="string"&&e.IDENTIFIER.test(v)?new o(`.${v}`):n`[${v}]`}e.getProperty=h;function $(v){if(typeof v=="string"&&e.IDENTIFIER.test(v))return new o(`${v}`);throw new Error(`CodeGen: invalid export name: ${v}, use explicit $id name mapping`)}e.getEsmExportName=$;function g(v){return new o(v.toString())}e.regexpCode=g})(_r);var ic={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=_r;class r extends Error{constructor(u){super(`CodeGen: "code" for ${u} not defined`),this.value=u.value}}var o;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(o||(e.UsedValueState=o={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class n{constructor({prefixes:u,parent:l}={}){this._names={},this._prefixes=u,this._parent=l}toName(u){return u instanceof t.Name?u:this.name(u)}name(u){return new t.Name(this._newName(u))}_newName(u){const l=this._names[u]||this._nameGroup(u);return`${u}${l.index++}`}_nameGroup(u){var l,d;if(!((d=(l=this._parent)===null||l===void 0?void 0:l._prefixes)===null||d===void 0)&&d.has(u)||this._prefixes&&!this._prefixes.has(u))throw new Error(`CodeGen: prefix "${u}" is not allowed in this scope`);return this._names[u]={prefix:u,index:0}}}e.Scope=n;class i extends t.Name{constructor(u,l){super(l),this.prefix=u}setValue(u,{property:l,itemIndex:d}){this.value=u,this.scopePath=(0,t._)`.${new t.Name(l)}[${d}]`}}e.ValueScopeName=i;const a=(0,t._)`\n`;class s extends n{constructor(u){super(u),this._values={},this._scope=u.scope,this.opts={...u,_n:u.lines?a:t.nil}}get(){return this._scope}name(u){return new i(u,this._newName(u))}value(u,l){var d;if(l.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const p=this.toName(u),{prefix:m}=p,h=(d=l.key)!==null&&d!==void 0?d:l.ref;let $=this._values[m];if($){const y=$.get(h);if(y)return y}else $=this._values[m]=new Map;$.set(h,p);const g=this._scope[m]||(this._scope[m]=[]),v=g.length;return g[v]=l.ref,p.setValue(l,{property:m,itemIndex:v}),p}getValue(u,l){const d=this._values[u];if(d)return d.get(l)}scopeRefs(u,l=this._values){return this._reduceValues(l,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,t._)`${u}${d.scopePath}`})}scopeCode(u=this._values,l,d){return this._reduceValues(u,p=>{if(p.value===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return p.value.code},l,d)}_reduceValues(u,l,d={},p){let m=t.nil;for(const h in u){const $=u[h];if(!$)continue;const g=d[h]=d[h]||new Map;$.forEach(v=>{if(g.has(v))return;g.set(v,o.Started);let y=l(v);if(y){const b=this.opts.es5?e.varKinds.var:e.varKinds.const;m=(0,t._)`${m}${b} ${v} = ${y};${this.opts._n}`}else if(y=p?.(v))m=(0,t._)`${m}${y}${this.opts._n}`;else throw new r(v);g.set(v,o.Completed)})}return m}}e.ValueScope=s})(ic),(function(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;const t=_r,r=ic;var o=_r;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return o.Name}});var n=ic;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return n.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("+")};class i{optimizeNodes(){return this}optimizeNames(f,_){return this}}class a extends i{constructor(f,_,E){super(),this.varKind=f,this.name=_,this.rhs=E}render({es5:f,_n:_}){const E=f?r.varKinds.var:this.varKind,L=this.rhs===void 0?"":` = ${this.rhs}`;return`${E} ${this.name}${L};`+_}optimizeNames(f,_){if(f[this.name.str])return this.rhs&&(this.rhs=H(this.rhs,f,_)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class s extends i{constructor(f,_,E){super(),this.lhs=f,this.rhs=_,this.sideEffects=E}render({_n:f}){return`${this.lhs} = ${this.rhs};`+f}optimizeNames(f,_){if(!(this.lhs instanceof t.Name&&!f[this.lhs.str]&&!this.sideEffects))return this.rhs=H(this.rhs,f,_),this}get names(){const f=this.lhs instanceof t.Name?{}:{...this.lhs.names};return Y(f,this.rhs)}}class c extends s{constructor(f,_,E,L){super(f,E,L),this.op=_}render({_n:f}){return`${this.lhs} ${this.op}= ${this.rhs};`+f}}class u extends i{constructor(f){super(),this.label=f,this.names={}}render({_n:f}){return`${this.label}:`+f}}class l extends i{constructor(f){super(),this.label=f,this.names={}}render({_n:f}){return`break${this.label?` ${this.label}`:""};`+f}}class d extends i{constructor(f){super(),this.error=f}render({_n:f}){return`throw ${this.error};`+f}get names(){return this.error.names}}class p extends i{constructor(f){super(),this.code=f}render({_n:f}){return`${this.code};`+f}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(f,_){return this.code=H(this.code,f,_),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class m extends i{constructor(f=[]){super(),this.nodes=f}render(f){return this.nodes.reduce((_,E)=>_+E.render(f),"")}optimizeNodes(){const{nodes:f}=this;let _=f.length;for(;_--;){const E=f[_].optimizeNodes();Array.isArray(E)?f.splice(_,1,...E):E?f[_]=E:f.splice(_,1)}return f.length>0?this:void 0}optimizeNames(f,_){const{nodes:E}=this;let L=E.length;for(;L--;){const J=E[L];J.optimizeNames(f,_)||(Ee(f,J.names),E.splice(L,1))}return E.length>0?this:void 0}get names(){return this.nodes.reduce((f,_)=>Q(f,_.names),{})}}class h extends m{render(f){return"{"+f._n+super.render(f)+"}"+f._n}}class $ extends m{}class g extends h{}g.kind="else";class v extends h{constructor(f,_){super(_),this.condition=f}render(f){let _=`if(${this.condition})`+super.render(f);return this.else&&(_+="else "+this.else.render(f)),_}optimizeNodes(){super.optimizeNodes();const f=this.condition;if(f===!0)return this.nodes;let _=this.else;if(_){const E=_.optimizeNodes();_=this.else=Array.isArray(E)?new g(E):E}if(_)return f===!1?_ instanceof v?_:_.nodes:this.nodes.length?this:new v(it(f),_ instanceof v?[_]:_.nodes);if(!(f===!1||!this.nodes.length))return this}optimizeNames(f,_){var E;if(this.else=(E=this.else)===null||E===void 0?void 0:E.optimizeNames(f,_),!!(super.optimizeNames(f,_)||this.else))return this.condition=H(this.condition,f,_),this}get names(){const f=super.names;return Y(f,this.condition),this.else&&Q(f,this.else.names),f}}v.kind="if";class y extends h{}y.kind="for";class b extends y{constructor(f){super(),this.iteration=f}render(f){return`for(${this.iteration})`+super.render(f)}optimizeNames(f,_){if(super.optimizeNames(f,_))return this.iteration=H(this.iteration,f,_),this}get names(){return Q(super.names,this.iteration.names)}}class I extends y{constructor(f,_,E,L){super(),this.varKind=f,this.name=_,this.from=E,this.to=L}render(f){const _=f.es5?r.varKinds.var:this.varKind,{name:E,from:L,to:J}=this;return`for(${_} ${E}=${L}; ${E}<${J}; ${E}++)`+super.render(f)}get names(){const f=Y(super.names,this.from);return Y(f,this.to)}}class P extends y{constructor(f,_,E,L){super(),this.loop=f,this.varKind=_,this.name=E,this.iterable=L}render(f){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(f)}optimizeNames(f,_){if(super.optimizeNames(f,_))return this.iterable=H(this.iterable,f,_),this}get names(){return Q(super.names,this.iterable.names)}}class M extends h{constructor(f,_,E){super(),this.name=f,this.args=_,this.async=E}render(f){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(f)}}M.kind="func";class G extends m{render(f){return"return "+super.render(f)}}G.kind="return";class ue extends h{render(f){let _="try"+super.render(f);return this.catch&&(_+=this.catch.render(f)),this.finally&&(_+=this.finally.render(f)),_}optimizeNodes(){var f,_;return super.optimizeNodes(),(f=this.catch)===null||f===void 0||f.optimizeNodes(),(_=this.finally)===null||_===void 0||_.optimizeNodes(),this}optimizeNames(f,_){var E,L;return super.optimizeNames(f,_),(E=this.catch)===null||E===void 0||E.optimizeNames(f,_),(L=this.finally)===null||L===void 0||L.optimizeNames(f,_),this}get names(){const f=super.names;return this.catch&&Q(f,this.catch.names),this.finally&&Q(f,this.finally.names),f}}class pe extends h{constructor(f){super(),this.error=f}render(f){return`catch(${this.error})`+super.render(f)}}pe.kind="catch";class Pe extends h{render(f){return"finally"+super.render(f)}}Pe.kind="finally";class B{constructor(f,_={}){this._values={},this._blockStarts=[],this._constants={},this.opts={..._,_n:_.lines?`
|
|
71
|
+
`:""},this._extScope=f,this._scope=new r.Scope({parent:f}),this._nodes=[new $]}toString(){return this._root.render(this.opts)}name(f){return this._scope.name(f)}scopeName(f){return this._extScope.name(f)}scopeValue(f,_){const E=this._extScope.value(f,_);return(this._values[E.prefix]||(this._values[E.prefix]=new Set)).add(E),E}getScopeValue(f,_){return this._extScope.getValue(f,_)}scopeRefs(f){return this._extScope.scopeRefs(f,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(f,_,E,L){const J=this._scope.toName(_);return E!==void 0&&L&&(this._constants[J.str]=E),this._leafNode(new a(f,J,E)),J}const(f,_,E){return this._def(r.varKinds.const,f,_,E)}let(f,_,E){return this._def(r.varKinds.let,f,_,E)}var(f,_,E){return this._def(r.varKinds.var,f,_,E)}assign(f,_,E){return this._leafNode(new s(f,_,E))}add(f,_){return this._leafNode(new c(f,e.operators.ADD,_))}code(f){return typeof f=="function"?f():f!==t.nil&&this._leafNode(new p(f)),this}object(...f){const _=["{"];for(const[E,L]of f)_.length>1&&_.push(","),_.push(E),(E!==L||this.opts.es5)&&(_.push(":"),(0,t.addCodeArg)(_,L));return _.push("}"),new t._Code(_)}if(f,_,E){if(this._blockNode(new v(f)),_&&E)this.code(_).else().code(E).endIf();else if(_)this.code(_).endIf();else if(E)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(f){return this._elseNode(new v(f))}else(){return this._elseNode(new g)}endIf(){return this._endBlockNode(v,g)}_for(f,_){return this._blockNode(f),_&&this.code(_).endFor(),this}for(f,_){return this._for(new b(f),_)}forRange(f,_,E,L,J=this.opts.es5?r.varKinds.var:r.varKinds.let){const fe=this._scope.toName(f);return this._for(new I(J,fe,_,E),()=>L(fe))}forOf(f,_,E,L=r.varKinds.const){const J=this._scope.toName(f);if(this.opts.es5){const fe=_ instanceof t.Name?_:this.var("_arr",_);return this.forRange("_i",0,(0,t._)`${fe}.length`,le=>{this.var(J,(0,t._)`${fe}[${le}]`),E(J)})}return this._for(new P("of",L,J,_),()=>E(J))}forIn(f,_,E,L=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(f,(0,t._)`Object.keys(${_})`,E);const J=this._scope.toName(f);return this._for(new P("in",L,J,_),()=>E(J))}endFor(){return this._endBlockNode(y)}label(f){return this._leafNode(new u(f))}break(f){return this._leafNode(new l(f))}return(f){const _=new G;if(this._blockNode(_),this.code(f),_.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(G)}try(f,_,E){if(!_&&!E)throw new Error('CodeGen: "try" without "catch" and "finally"');const L=new ue;if(this._blockNode(L),this.code(f),_){const J=this.name("e");this._currNode=L.catch=new pe(J),_(J)}return E&&(this._currNode=L.finally=new Pe,this.code(E)),this._endBlockNode(pe,Pe)}throw(f){return this._leafNode(new d(f))}block(f,_){return this._blockStarts.push(this._nodes.length),f&&this.code(f).endBlock(_),this}endBlock(f){const _=this._blockStarts.pop();if(_===void 0)throw new Error("CodeGen: not in self-balancing block");const E=this._nodes.length-_;if(E<0||f!==void 0&&E!==f)throw new Error(`CodeGen: wrong number of nodes: ${E} vs ${f} expected`);return this._nodes.length=_,this}func(f,_=t.nil,E,L){return this._blockNode(new M(f,_,E)),L&&this.code(L).endFunc(),this}endFunc(){return this._endBlockNode(M)}optimize(f=1){for(;f-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(f){return this._currNode.nodes.push(f),this}_blockNode(f){this._currNode.nodes.push(f),this._nodes.push(f)}_endBlockNode(f,_){const E=this._currNode;if(E instanceof f||_&&E instanceof _)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${_?`${f.kind}/${_.kind}`:f.kind}"`)}_elseNode(f){const _=this._currNode;if(!(_ instanceof v))throw new Error('CodeGen: "else" without "if"');return this._currNode=_.else=f,this}get _root(){return this._nodes[0]}get _currNode(){const f=this._nodes;return f[f.length-1]}set _currNode(f){const _=this._nodes;_[_.length-1]=f}}e.CodeGen=B;function Q(T,f){for(const _ in f)T[_]=(T[_]||0)+(f[_]||0);return T}function Y(T,f){return f instanceof t._CodeOrName?Q(T,f.names):T}function H(T,f,_){if(T instanceof t.Name)return E(T);if(!L(T))return T;return new t._Code(T._items.reduce((J,fe)=>(fe instanceof t.Name&&(fe=E(fe)),fe instanceof t._Code?J.push(...fe._items):J.push(fe),J),[]));function E(J){const fe=_[J.str];return fe===void 0||f[J.str]!==1?J:(delete f[J.str],fe)}function L(J){return J instanceof t._Code&&J._items.some(fe=>fe instanceof t.Name&&f[fe.str]===1&&_[fe.str]!==void 0)}}function Ee(T,f){for(const _ in f)T[_]=(T[_]||0)-(f[_]||0)}function it(T){return typeof T=="boolean"||typeof T=="number"||T===null?!T:(0,t._)`!${j(T)}`}e.not=it;const at=O(e.operators.AND);function Lt(...T){return T.reduce(at)}e.and=Lt;const Ot=O(e.operators.OR);function R(...T){return T.reduce(Ot)}e.or=R;function O(T){return(f,_)=>f===t.nil?_:_===t.nil?f:(0,t._)`${j(f)} ${T} ${j(_)}`}function j(T){return T instanceof t.Name?T:(0,t._)`(${T})`}})(se);var Z={};Object.defineProperty(Z,"__esModule",{value:!0}),Z.checkStrictMode=Z.getErrorPath=Z.Type=Z.useFunc=Z.setEvaluated=Z.evaluatedPropsToName=Z.mergeEvaluated=Z.eachItem=Z.unescapeJsonPointer=Z.escapeJsonPointer=Z.escapeFragment=Z.unescapeFragment=Z.schemaRefOrVal=Z.schemaHasRulesButRef=Z.schemaHasRules=Z.checkUnknownRules=Z.alwaysValidSchema=Z.toHash=void 0;const we=se,HS=_r;function KS(e){const t={};for(const r of e)t[r]=!0;return t}Z.toHash=KS;function WS(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(eg(e,t),!tg(t,e.self.RULES.all))}Z.alwaysValidSchema=WS;function eg(e,t=e.schema){const{opts:r,self:o}=e;if(!r.strictSchema||typeof t=="boolean")return;const n=o.RULES.keywords;for(const i in t)n[i]||ag(e,`unknown keyword: "${i}"`)}Z.checkUnknownRules=eg;function tg(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(t[r])return!0;return!1}Z.schemaHasRules=tg;function YS(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}Z.schemaHasRulesButRef=YS;function XS({topSchemaRef:e,schemaPath:t},r,o,n){if(!n){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,we._)`${r}`}return(0,we._)`${e}${t}${(0,we.getProperty)(o)}`}Z.schemaRefOrVal=XS;function QS(e){return ng(decodeURIComponent(e))}Z.unescapeFragment=QS;function ew(e){return encodeURIComponent(ac(e))}Z.escapeFragment=ew;function ac(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}Z.escapeJsonPointer=ac;function ng(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}Z.unescapeJsonPointer=ng;function tw(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)}Z.eachItem=tw;function rg({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(n,i,a,s)=>{const c=a===void 0?i:a instanceof we.Name?(i instanceof we.Name?e(n,i,a):t(n,i,a),a):i instanceof we.Name?(t(n,a,i),i):r(i,a);return s===we.Name&&!(c instanceof we.Name)?o(n,c):c}}Z.mergeEvaluated={props:rg({mergeNames:(e,t,r)=>e.if((0,we._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,we._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,we._)`${r} || {}`).code((0,we._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,we._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,we._)`${r} || {}`),sc(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:og}),items:rg({mergeNames:(e,t,r)=>e.if((0,we._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,we._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,we._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,we._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function og(e,t){if(t===!0)return e.var("props",!0);const r=e.var("props",(0,we._)`{}`);return t!==void 0&&sc(e,r,t),r}Z.evaluatedPropsToName=og;function sc(e,t,r){Object.keys(r).forEach(o=>e.assign((0,we._)`${t}${(0,we.getProperty)(o)}`,!0))}Z.setEvaluated=sc;const ig={};function nw(e,t){return e.scopeValue("func",{ref:t,code:ig[t.code]||(ig[t.code]=new HS._Code(t.code))})}Z.useFunc=nw;var cc;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(cc||(Z.Type=cc={}));function rw(e,t,r){if(e instanceof we.Name){const o=t===cc.Num;return r?o?(0,we._)`"[" + ${e} + "]"`:(0,we._)`"['" + ${e} + "']"`:o?(0,we._)`"/" + ${e}`:(0,we._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,we.getProperty)(e).toString():"/"+ac(e)}Z.getErrorPath=rw;function ag(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}Z.checkStrictMode=ag;var Jo={},sg;function At(){if(sg)return Jo;sg=1,Object.defineProperty(Jo,"__esModule",{value:!0});const e=se,t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return Jo.default=t,Jo}var cg;function Ho(){return cg||(cg=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=se,r=Z,o=At();e.keywordError={message:({keyword:g})=>(0,t.str)`must pass "${g}" keyword validation`},e.keyword$DataError={message:({keyword:g,schemaType:v})=>v?(0,t.str)`"${g}" keyword must be ${v} ($data)`:(0,t.str)`"${g}" keyword is invalid ($data)`};function n(g,v=e.keywordError,y,b){const{it:I}=g,{gen:P,compositeRule:M,allErrors:G}=I,ue=d(g,v,y);b??(M||G)?c(P,ue):u(I,(0,t._)`[${ue}]`)}e.reportError=n;function i(g,v=e.keywordError,y){const{it:b}=g,{gen:I,compositeRule:P,allErrors:M}=b,G=d(g,v,y);c(I,G),P||M||u(b,o.default.vErrors)}e.reportExtraError=i;function a(g,v){g.assign(o.default.errors,v),g.if((0,t._)`${o.default.vErrors} !== null`,()=>g.if(v,()=>g.assign((0,t._)`${o.default.vErrors}.length`,v),()=>g.assign(o.default.vErrors,null)))}e.resetErrorsCount=a;function s({gen:g,keyword:v,schemaValue:y,data:b,errsCount:I,it:P}){if(I===void 0)throw new Error("ajv implementation error");const M=g.name("err");g.forRange("i",I,o.default.errors,G=>{g.const(M,(0,t._)`${o.default.vErrors}[${G}]`),g.if((0,t._)`${M}.instancePath === undefined`,()=>g.assign((0,t._)`${M}.instancePath`,(0,t.strConcat)(o.default.instancePath,P.errorPath))),g.assign((0,t._)`${M}.schemaPath`,(0,t.str)`${P.errSchemaPath}/${v}`),P.opts.verbose&&(g.assign((0,t._)`${M}.schema`,y),g.assign((0,t._)`${M}.data`,b))})}e.extendErrors=s;function c(g,v){const y=g.const("err",v);g.if((0,t._)`${o.default.vErrors} === null`,()=>g.assign(o.default.vErrors,(0,t._)`[${y}]`),(0,t._)`${o.default.vErrors}.push(${y})`),g.code((0,t._)`${o.default.errors}++`)}function u(g,v){const{gen:y,validateName:b,schemaEnv:I}=g;I.$async?y.throw((0,t._)`new ${g.ValidationError}(${v})`):(y.assign((0,t._)`${b}.errors`,v),y.return(!1))}const l={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function d(g,v,y){const{createErrors:b}=g.it;return b===!1?(0,t._)`{}`:p(g,v,y)}function p(g,v,y={}){const{gen:b,it:I}=g,P=[m(I,y),h(g,y)];return $(g,v,P),b.object(...P)}function m({errorPath:g},{instancePath:v}){const y=v?(0,t.str)`${g}${(0,r.getErrorPath)(v,r.Type.Str)}`:g;return[o.default.instancePath,(0,t.strConcat)(o.default.instancePath,y)]}function h({keyword:g,it:{errSchemaPath:v}},{schemaPath:y,parentSchema:b}){let I=b?v:(0,t.str)`${v}/${g}`;return y&&(I=(0,t.str)`${I}${(0,r.getErrorPath)(y,r.Type.Str)}`),[l.schemaPath,I]}function $(g,{params:v,message:y},b){const{keyword:I,data:P,schemaValue:M,it:G}=g,{opts:ue,propertyName:pe,topSchemaRef:Pe,schemaPath:B}=G;b.push([l.keyword,I],[l.params,typeof v=="function"?v(g):v||(0,t._)`{}`]),ue.messages&&b.push([l.message,typeof y=="function"?y(g):y]),ue.verbose&&b.push([l.schema,M],[l.parentSchema,(0,t._)`${Pe}${B}`],[o.default.data,P]),pe&&b.push([l.propertyName,pe])}})(oc)),oc}var ug;function ow(){if(ug)return Yt;ug=1,Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.boolOrEmptySchema=Yt.topBoolOrEmptySchema=void 0;const e=Ho(),t=se,r=At(),o={message:"boolean schema is false"};function n(s){const{gen:c,schema:u,validateName:l}=s;u===!1?a(s,!1):typeof u=="object"&&u.$async===!0?c.return(r.default.data):(c.assign((0,t._)`${l}.errors`,null),c.return(!0))}Yt.topBoolOrEmptySchema=n;function i(s,c){const{gen:u,schema:l}=s;l===!1?(u.var(c,!1),a(s)):u.var(c,!0)}Yt.boolOrEmptySchema=i;function a(s,c){const{gen:u,data:l}=s,d={gen:u,keyword:"false schema",data:l,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:s};(0,e.reportError)(d,o,void 0,c)}return Yt}var De={},Xt={};Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.getRules=Xt.isJSONType=void 0;const iw=["string","number","integer","boolean","null","object","array"],aw=new Set(iw);function sw(e){return typeof e=="string"&&aw.has(e)}Xt.isJSONType=sw;function cw(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Xt.getRules=cw;var Et={},lg;function dg(){if(lg)return Et;lg=1,Object.defineProperty(Et,"__esModule",{value:!0}),Et.shouldUseRule=Et.shouldUseGroup=Et.schemaHasRulesForType=void 0;function e({schema:o,self:n},i){const a=n.RULES.types[i];return a&&a!==!0&&t(o,a)}Et.schemaHasRulesForType=e;function t(o,n){return n.rules.some(i=>r(o,i))}Et.shouldUseGroup=t;function r(o,n){var i;return o[n.keyword]!==void 0||((i=n.definition.implements)===null||i===void 0?void 0:i.some(a=>o[a]!==void 0))}return Et.shouldUseRule=r,Et}Object.defineProperty(De,"__esModule",{value:!0}),De.reportTypeError=De.checkDataTypes=De.checkDataType=De.coerceAndCheckDataType=De.getJSONTypes=De.getSchemaTypes=De.DataType=void 0;const uw=Xt,lw=dg(),dw=Ho(),re=se,mg=Z;var bn;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(bn||(De.DataType=bn={}));function mw(e){const t=pg(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}De.getSchemaTypes=mw;function pg(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(uw.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}De.getJSONTypes=pg;function pw(e,t){const{gen:r,data:o,opts:n}=e,i=fw(t,n.coerceTypes),a=t.length>0&&!(i.length===0&&t.length===1&&(0,lw.schemaHasRulesForType)(e,t[0]));if(a){const s=lc(t,o,n.strictNumbers,bn.Wrong);r.if(s,()=>{i.length?hw(e,t,i):dc(e)})}return a}De.coerceAndCheckDataType=pw;const fg=new Set(["string","number","integer","boolean","null"]);function fw(e,t){return t?e.filter(r=>fg.has(r)||t==="array"&&r==="array"):[]}function hw(e,t,r){const{gen:o,data:n,opts:i}=e,a=o.let("dataType",(0,re._)`typeof ${n}`),s=o.let("coerced",(0,re._)`undefined`);i.coerceTypes==="array"&&o.if((0,re._)`${a} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>o.assign(n,(0,re._)`${n}[0]`).assign(a,(0,re._)`typeof ${n}`).if(lc(t,n,i.strictNumbers),()=>o.assign(s,n))),o.if((0,re._)`${s} !== undefined`);for(const u of r)(fg.has(u)||u==="array"&&i.coerceTypes==="array")&&c(u);o.else(),dc(e),o.endIf(),o.if((0,re._)`${s} !== undefined`,()=>{o.assign(n,s),gw(e,s)});function c(u){switch(u){case"string":o.elseIf((0,re._)`${a} == "number" || ${a} == "boolean"`).assign(s,(0,re._)`"" + ${n}`).elseIf((0,re._)`${n} === null`).assign(s,(0,re._)`""`);return;case"number":o.elseIf((0,re._)`${a} == "boolean" || ${n} === null
|
|
72
|
+
|| (${a} == "string" && ${n} && ${n} == +${n})`).assign(s,(0,re._)`+${n}`);return;case"integer":o.elseIf((0,re._)`${a} === "boolean" || ${n} === null
|
|
73
|
+
|| (${a} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(s,(0,re._)`+${n}`);return;case"boolean":o.elseIf((0,re._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(s,!1).elseIf((0,re._)`${n} === "true" || ${n} === 1`).assign(s,!0);return;case"null":o.elseIf((0,re._)`${n} === "" || ${n} === 0 || ${n} === false`),o.assign(s,null);return;case"array":o.elseIf((0,re._)`${a} === "string" || ${a} === "number"
|
|
74
|
+
|| ${a} === "boolean" || ${n} === null`).assign(s,(0,re._)`[${n}]`)}}}function gw({gen:e,parentData:t,parentDataProperty:r},o){e.if((0,re._)`${t} !== undefined`,()=>e.assign((0,re._)`${t}[${r}]`,o))}function uc(e,t,r,o=bn.Correct){const n=o===bn.Correct?re.operators.EQ:re.operators.NEQ;let i;switch(e){case"null":return(0,re._)`${t} ${n} null`;case"array":i=(0,re._)`Array.isArray(${t})`;break;case"object":i=(0,re._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=a((0,re._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=a();break;default:return(0,re._)`typeof ${t} ${n} ${e}`}return o===bn.Correct?i:(0,re.not)(i);function a(s=re.nil){return(0,re.and)((0,re._)`typeof ${t} == "number"`,s,r?(0,re._)`isFinite(${t})`:re.nil)}}De.checkDataType=uc;function lc(e,t,r,o){if(e.length===1)return uc(e[0],t,r,o);let n;const i=(0,mg.toHash)(e);if(i.array&&i.object){const a=(0,re._)`typeof ${t} != "object"`;n=i.null?a:(0,re._)`!${t} || ${a}`,delete i.null,delete i.array,delete i.object}else n=re.nil;i.number&&delete i.integer;for(const a in i)n=(0,re.and)(n,uc(a,t,r,o));return n}De.checkDataTypes=lc;const vw={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,re._)`{type: ${e}}`:(0,re._)`{type: ${t}}`};function dc(e){const t=yw(e);(0,dw.reportError)(t,vw)}De.reportTypeError=dc;function yw(e){const{gen:t,data:r,schema:o}=e,n=(0,mg.schemaRefOrVal)(e,o,"type");return{gen:t,keyword:"type",data:r,schema:o.type,schemaCode:n,schemaValue:n,parentSchema:o,params:{},it:e}}var $r={},hg;function _w(){if(hg)return $r;hg=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.assignDefaults=void 0;const e=se,t=Z;function r(n,i){const{properties:a,items:s}=n.schema;if(i==="object"&&a)for(const c in a)o(n,c,a[c].default);else i==="array"&&Array.isArray(s)&&s.forEach((c,u)=>o(n,u,c.default))}$r.assignDefaults=r;function o(n,i,a){const{gen:s,compositeRule:c,data:u,opts:l}=n;if(a===void 0)return;const d=(0,e._)`${u}${(0,e.getProperty)(i)}`;if(c){(0,t.checkStrictMode)(n,`default is ignored for: ${d}`);return}let p=(0,e._)`${d} === undefined`;l.useDefaults==="empty"&&(p=(0,e._)`${p} || ${d} === null || ${d} === ""`),s.if(p,(0,e._)`${d} = ${(0,e.stringify)(a)}`)}return $r}var vt={},_e={},gg;function yt(){if(gg)return _e;gg=1,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;const e=se,t=Z,r=At(),o=Z;function n(y,b){const{gen:I,data:P,it:M}=y;I.if(l(I,P,b,M.opts.ownProperties),()=>{y.setParams({missingProperty:(0,e._)`${b}`},!0),y.error()})}_e.checkReportMissingProp=n;function i({gen:y,data:b,it:{opts:I}},P,M){return(0,e.or)(...P.map(G=>(0,e.and)(l(y,b,G,I.ownProperties),(0,e._)`${M} = ${G}`)))}_e.checkMissingProp=i;function a(y,b){y.setParams({missingProperty:b},!0),y.error()}_e.reportMissingProp=a;function s(y){return y.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}_e.hasPropFunc=s;function c(y,b,I){return(0,e._)`${s(y)}.call(${b}, ${I})`}_e.isOwnProperty=c;function u(y,b,I,P){const M=(0,e._)`${b}${(0,e.getProperty)(I)} !== undefined`;return P?(0,e._)`${M} && ${c(y,b,I)}`:M}_e.propertyInData=u;function l(y,b,I,P){const M=(0,e._)`${b}${(0,e.getProperty)(I)} === undefined`;return P?(0,e.or)(M,(0,e.not)(c(y,b,I))):M}_e.noPropertyInData=l;function d(y){return y?Object.keys(y).filter(b=>b!=="__proto__"):[]}_e.allSchemaProperties=d;function p(y,b){return d(b).filter(I=>!(0,t.alwaysValidSchema)(y,b[I]))}_e.schemaProperties=p;function m({schemaCode:y,data:b,it:{gen:I,topSchemaRef:P,schemaPath:M,errorPath:G},it:ue},pe,Pe,B){const Q=B?(0,e._)`${y}, ${b}, ${P}${M}`:b,Y=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,G)],[r.default.parentData,ue.parentData],[r.default.parentDataProperty,ue.parentDataProperty],[r.default.rootData,r.default.rootData]];ue.opts.dynamicRef&&Y.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const H=(0,e._)`${Q}, ${I.object(...Y)}`;return Pe!==e.nil?(0,e._)`${pe}.call(${Pe}, ${H})`:(0,e._)`${pe}(${H})`}_e.callValidateCode=m;const h=(0,e._)`new RegExp`;function $({gen:y,it:{opts:b}},I){const P=b.unicodeRegExp?"u":"",{regExp:M}=b.code,G=M(I,P);return y.scopeValue("pattern",{key:G.toString(),ref:G,code:(0,e._)`${M.code==="new RegExp"?h:(0,o.useFunc)(y,M)}(${I}, ${P})`})}_e.usePattern=$;function g(y){const{gen:b,data:I,keyword:P,it:M}=y,G=b.name("valid");if(M.allErrors){const pe=b.let("valid",!0);return ue(()=>b.assign(pe,!1)),pe}return b.var(G,!0),ue(()=>b.break()),G;function ue(pe){const Pe=b.const("len",(0,e._)`${I}.length`);b.forRange("i",0,Pe,B=>{y.subschema({keyword:P,dataProp:B,dataPropType:t.Type.Num},G),b.if((0,e.not)(G),pe)})}}_e.validateArray=g;function v(y){const{gen:b,schema:I,keyword:P,it:M}=y;if(!Array.isArray(I))throw new Error("ajv implementation error");if(I.some(Pe=>(0,t.alwaysValidSchema)(M,Pe))&&!M.opts.unevaluated)return;const ue=b.let("valid",!1),pe=b.name("_valid");b.block(()=>I.forEach((Pe,B)=>{const Q=y.subschema({keyword:P,schemaProp:B,compositeRule:!0},pe);b.assign(ue,(0,e._)`${ue} || ${pe}`),y.mergeValidEvaluated(Q,pe)||b.if((0,e.not)(ue))})),y.result(ue,()=>y.reset(),()=>y.error(!0))}return _e.validateUnion=v,_e}var vg;function $w(){if(vg)return vt;vg=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.validateKeywordUsage=vt.validSchemaType=vt.funcKeywordCode=vt.macroKeywordCode=void 0;const e=se,t=At(),r=yt(),o=Ho();function n(p,m){const{gen:h,keyword:$,schema:g,parentSchema:v,it:y}=p,b=m.macro.call(y.self,g,v,y),I=u(h,$,b);y.opts.validateSchema!==!1&&y.self.validateSchema(b,!0);const P=h.name("valid");p.subschema({schema:b,schemaPath:e.nil,errSchemaPath:`${y.errSchemaPath}/${$}`,topSchemaRef:I,compositeRule:!0},P),p.pass(P,()=>p.error(!0))}vt.macroKeywordCode=n;function i(p,m){var h;const{gen:$,keyword:g,schema:v,parentSchema:y,$data:b,it:I}=p;c(I,m);const P=!b&&m.compile?m.compile.call(I.self,v,y,I):m.validate,M=u($,g,P),G=$.let("valid");p.block$data(G,ue),p.ok((h=m.valid)!==null&&h!==void 0?h:G);function ue(){if(m.errors===!1)B(),m.modifying&&a(p),Q(()=>p.error());else{const Y=m.async?pe():Pe();m.modifying&&a(p),Q(()=>s(p,Y))}}function pe(){const Y=$.let("ruleErrs",null);return $.try(()=>B((0,e._)`await `),H=>$.assign(G,!1).if((0,e._)`${H} instanceof ${I.ValidationError}`,()=>$.assign(Y,(0,e._)`${H}.errors`),()=>$.throw(H))),Y}function Pe(){const Y=(0,e._)`${M}.errors`;return $.assign(Y,null),B(e.nil),Y}function B(Y=m.async?(0,e._)`await `:e.nil){const H=I.opts.passContext?t.default.this:t.default.self,Ee=!("compile"in m&&!b||m.schema===!1);$.assign(G,(0,e._)`${Y}${(0,r.callValidateCode)(p,M,H,Ee)}`,m.modifying)}function Q(Y){var H;$.if((0,e.not)((H=m.valid)!==null&&H!==void 0?H:G),Y)}}vt.funcKeywordCode=i;function a(p){const{gen:m,data:h,it:$}=p;m.if($.parentData,()=>m.assign(h,(0,e._)`${$.parentData}[${$.parentDataProperty}]`))}function s(p,m){const{gen:h}=p;h.if((0,e._)`Array.isArray(${m})`,()=>{h.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${m} : ${t.default.vErrors}.concat(${m})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,o.extendErrors)(p)},()=>p.error())}function c({schemaEnv:p},m){if(m.async&&!p.$async)throw new Error("async keyword in sync schema")}function u(p,m,h){if(h===void 0)throw new Error(`keyword "${m}" failed to compile`);return p.scopeValue("keyword",typeof h=="function"?{ref:h}:{ref:h,code:(0,e.stringify)(h)})}function l(p,m,h=!1){return!m.length||m.some($=>$==="array"?Array.isArray(p):$==="object"?p&&typeof p=="object"&&!Array.isArray(p):typeof p==$||h&&typeof p>"u")}vt.validSchemaType=l;function d({schema:p,opts:m,self:h,errSchemaPath:$},g,v){if(Array.isArray(g.keyword)?!g.keyword.includes(v):g.keyword!==v)throw new Error("ajv implementation error");const y=g.dependencies;if(y?.some(b=>!Object.prototype.hasOwnProperty.call(p,b)))throw new Error(`parent schema must have dependencies of ${v}: ${y.join(",")}`);if(g.validateSchema&&!g.validateSchema(p[v])){const I=`keyword "${v}" value is invalid at path "${$}": `+h.errorsText(g.validateSchema.errors);if(m.validateSchema==="log")h.logger.error(I);else throw new Error(I)}}return vt.validateKeywordUsage=d,vt}var zt={},yg;function bw(){if(yg)return zt;yg=1,Object.defineProperty(zt,"__esModule",{value:!0}),zt.extendSubschemaMode=zt.extendSubschemaData=zt.getSubschema=void 0;const e=se,t=Z;function r(i,{keyword:a,schemaProp:s,schema:c,schemaPath:u,errSchemaPath:l,topSchemaRef:d}){if(a!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){const p=i.schema[a];return s===void 0?{schema:p,schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(a)}`,errSchemaPath:`${i.errSchemaPath}/${a}`}:{schema:p[s],schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(a)}${(0,e.getProperty)(s)}`,errSchemaPath:`${i.errSchemaPath}/${a}/${(0,t.escapeFragment)(s)}`}}if(c!==void 0){if(u===void 0||l===void 0||d===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:u,topSchemaRef:d,errSchemaPath:l}}throw new Error('either "keyword" or "schema" must be passed')}zt.getSubschema=r;function o(i,a,{dataProp:s,dataPropType:c,data:u,dataTypes:l,propertyName:d}){if(u!==void 0&&s!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:p}=a;if(s!==void 0){const{errorPath:h,dataPathArr:$,opts:g}=a,v=p.let("data",(0,e._)`${a.data}${(0,e.getProperty)(s)}`,!0);m(v),i.errorPath=(0,e.str)`${h}${(0,t.getErrorPath)(s,c,g.jsPropertySyntax)}`,i.parentDataProperty=(0,e._)`${s}`,i.dataPathArr=[...$,i.parentDataProperty]}if(u!==void 0){const h=u instanceof e.Name?u:p.let("data",u,!0);m(h),d!==void 0&&(i.propertyName=d)}l&&(i.dataTypes=l);function m(h){i.data=h,i.dataLevel=a.dataLevel+1,i.dataTypes=[],a.definedProperties=new Set,i.parentData=a.data,i.dataNames=[...a.dataNames,h]}}zt.extendSubschemaData=o;function n(i,{jtdDiscriminator:a,jtdMetadata:s,compositeRule:c,createErrors:u,allErrors:l}){c!==void 0&&(i.compositeRule=c),u!==void 0&&(i.createErrors=u),l!==void 0&&(i.allErrors=l),i.jtdDiscriminator=a,i.jtdMetadata=s}return zt.extendSubschemaMode=n,zt}var Me={},_g=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var o,n,i;if(Array.isArray(t)){if(o=t.length,o!=r.length)return!1;for(n=o;n--!==0;)if(!e(t[n],r[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(i=Object.keys(t),o=i.length,o!==Object.keys(r).length)return!1;for(n=o;n--!==0;)if(!Object.prototype.hasOwnProperty.call(r,i[n]))return!1;for(n=o;n--!==0;){var a=i[n];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r},$g={exports:{}},Ut=$g.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var o=typeof r=="function"?r:r.pre||function(){},n=r.post||function(){};Ko(t,o,n,e,"",e)};Ut.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},Ut.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},Ut.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},Ut.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 Ko(e,t,r,o,n,i,a,s,c,u){if(o&&typeof o=="object"&&!Array.isArray(o)){t(o,n,i,a,s,c,u);for(var l in o){var d=o[l];if(Array.isArray(d)){if(l in Ut.arrayKeywords)for(var p=0;p<d.length;p++)Ko(e,t,r,d[p],n+"/"+l+"/"+p,i,n,l,o,p)}else if(l in Ut.propsKeywords){if(d&&typeof d=="object")for(var m in d)Ko(e,t,r,d[m],n+"/"+l+"/"+kw(m),i,n,l,o,m)}else(l in Ut.keywords||e.allKeys&&!(l in Ut.skipKeywords))&&Ko(e,t,r,d,n+"/"+l,i,n,l,o)}r(o,n,i,a,s,c,u)}}function kw(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}var Sw=$g.exports;Object.defineProperty(Me,"__esModule",{value:!0}),Me.getSchemaRefs=Me.resolveUrl=Me.normalizeId=Me._getFullPath=Me.getFullPath=Me.inlineRef=void 0;const ww=Z,Iw=_g,Ow=Sw,xw=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Tw(e,t=!0){return typeof e=="boolean"?!0:t===!0?!mc(e):t?bg(e)<=t:!1}Me.inlineRef=Tw;const Pw=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function mc(e){for(const t in e){if(Pw.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(mc)||typeof r=="object"&&mc(r))return!0}return!1}function bg(e){let t=0;for(const r in e){if(r==="$ref")return 1/0;if(t++,!xw.has(r)&&(typeof e[r]=="object"&&(0,ww.eachItem)(e[r],o=>t+=bg(o)),t===1/0))return 1/0}return t}function kg(e,t="",r){r!==!1&&(t=kn(t));const o=e.parse(t);return Sg(e,o)}Me.getFullPath=kg;function Sg(e,t){return e.serialize(t).split("#")[0]+"#"}Me._getFullPath=Sg;const Ew=/#\/?$/;function kn(e){return e?e.replace(Ew,""):""}Me.normalizeId=kn;function zw(e,t,r){return r=kn(r),e.resolve(t,r)}Me.resolveUrl=zw;const Nw=/^[a-z_][-a-z0-9._]*$/i;function jw(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:o}=this.opts,n=kn(e[r]||t),i={"":n},a=kg(o,n,!1),s={},c=new Set;return Ow(e,{allKeys:!0},(d,p,m,h)=>{if(h===void 0)return;const $=a+p;let g=i[h];typeof d[r]=="string"&&(g=v.call(this,d[r])),y.call(this,d.$anchor),y.call(this,d.$dynamicAnchor),i[p]=g;function v(b){const I=this.opts.uriResolver.resolve;if(b=kn(g?I(g,b):b),c.has(b))throw l(b);c.add(b);let P=this.refs[b];return typeof P=="string"&&(P=this.refs[P]),typeof P=="object"?u(d,P.schema,b):b!==kn($)&&(b[0]==="#"?(u(d,s[b],b),s[b]=d):this.refs[b]=$),b}function y(b){if(typeof b=="string"){if(!Nw.test(b))throw new Error(`invalid anchor "${b}"`);v.call(this,`#${b}`)}}}),s;function u(d,p,m){if(p!==void 0&&!Iw(d,p))throw l(m)}function l(d){return new Error(`reference "${d}" resolves to more than one schema`)}}Me.getSchemaRefs=jw;var wg;function Wo(){if(wg)return Pt;wg=1,Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.getData=Pt.KeywordCxt=Pt.validateFunctionCode=void 0;const e=ow(),t=De,r=dg(),o=De,n=_w(),i=$w(),a=bw(),s=se,c=At(),u=Me,l=Z,d=Ho();function p(w){if(P(w)&&(G(w),I(w))){g(w);return}m(w,()=>(0,e.topBoolOrEmptySchema)(w))}Pt.validateFunctionCode=p;function m({gen:w,validateName:x,schema:N,schemaEnv:C,opts:V},ce){V.code.es5?w.func(x,(0,s._)`${c.default.data}, ${c.default.valCxt}`,C.$async,()=>{w.code((0,s._)`"use strict"; ${y(N,V)}`),$(w,V),w.code(ce)}):w.func(x,(0,s._)`${c.default.data}, ${h(V)}`,C.$async,()=>w.code(y(N,V)).code(ce))}function h(w){return(0,s._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${w.dynamicRef?(0,s._)`, ${c.default.dynamicAnchors}={}`:s.nil}}={}`}function $(w,x){w.if(c.default.valCxt,()=>{w.var(c.default.instancePath,(0,s._)`${c.default.valCxt}.${c.default.instancePath}`),w.var(c.default.parentData,(0,s._)`${c.default.valCxt}.${c.default.parentData}`),w.var(c.default.parentDataProperty,(0,s._)`${c.default.valCxt}.${c.default.parentDataProperty}`),w.var(c.default.rootData,(0,s._)`${c.default.valCxt}.${c.default.rootData}`),x.dynamicRef&&w.var(c.default.dynamicAnchors,(0,s._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{w.var(c.default.instancePath,(0,s._)`""`),w.var(c.default.parentData,(0,s._)`undefined`),w.var(c.default.parentDataProperty,(0,s._)`undefined`),w.var(c.default.rootData,c.default.data),x.dynamicRef&&w.var(c.default.dynamicAnchors,(0,s._)`{}`)})}function g(w){const{schema:x,opts:N,gen:C}=w;m(w,()=>{N.$comment&&x.$comment&&Y(w),Pe(w),C.let(c.default.vErrors,null),C.let(c.default.errors,0),N.unevaluated&&v(w),ue(w),H(w)})}function v(w){const{gen:x,validateName:N}=w;w.evaluated=x.const("evaluated",(0,s._)`${N}.evaluated`),x.if((0,s._)`${w.evaluated}.dynamicProps`,()=>x.assign((0,s._)`${w.evaluated}.props`,(0,s._)`undefined`)),x.if((0,s._)`${w.evaluated}.dynamicItems`,()=>x.assign((0,s._)`${w.evaluated}.items`,(0,s._)`undefined`))}function y(w,x){const N=typeof w=="object"&&w[x.schemaId];return N&&(x.code.source||x.code.process)?(0,s._)`/*# sourceURL=${N} */`:s.nil}function b(w,x){if(P(w)&&(G(w),I(w))){M(w,x);return}(0,e.boolOrEmptySchema)(w,x)}function I({schema:w,self:x}){if(typeof w=="boolean")return!w;for(const N in w)if(x.RULES.all[N])return!0;return!1}function P(w){return typeof w.schema!="boolean"}function M(w,x){const{schema:N,gen:C,opts:V}=w;V.$comment&&N.$comment&&Y(w),B(w),Q(w);const ce=C.const("_errs",c.default.errors);ue(w,ce),C.var(x,(0,s._)`${ce} === ${c.default.errors}`)}function G(w){(0,l.checkUnknownRules)(w),pe(w)}function ue(w,x){if(w.opts.jtd)return it(w,[],!1,x);const N=(0,t.getSchemaTypes)(w.schema),C=(0,t.coerceAndCheckDataType)(w,N);it(w,N,!C,x)}function pe(w){const{schema:x,errSchemaPath:N,opts:C,self:V}=w;x.$ref&&C.ignoreKeywordsWithRef&&(0,l.schemaHasRulesButRef)(x,V.RULES)&&V.logger.warn(`$ref: keywords ignored in schema at path "${N}"`)}function Pe(w){const{schema:x,opts:N}=w;x.default!==void 0&&N.useDefaults&&N.strictSchema&&(0,l.checkStrictMode)(w,"default is ignored in the schema root")}function B(w){const x=w.schema[w.opts.schemaId];x&&(w.baseId=(0,u.resolveUrl)(w.opts.uriResolver,w.baseId,x))}function Q(w){if(w.schema.$async&&!w.schemaEnv.$async)throw new Error("async schema in sync schema")}function Y({gen:w,schemaEnv:x,schema:N,errSchemaPath:C,opts:V}){const ce=N.$comment;if(V.$comment===!0)w.code((0,s._)`${c.default.self}.logger.log(${ce})`);else if(typeof V.$comment=="function"){const Ce=(0,s.str)`${C}/$comment`,ft=w.scopeValue("root",{ref:x.root});w.code((0,s._)`${c.default.self}.opts.$comment(${ce}, ${Ce}, ${ft}.schema)`)}}function H(w){const{gen:x,schemaEnv:N,validateName:C,ValidationError:V,opts:ce}=w;N.$async?x.if((0,s._)`${c.default.errors} === 0`,()=>x.return(c.default.data),()=>x.throw((0,s._)`new ${V}(${c.default.vErrors})`)):(x.assign((0,s._)`${C}.errors`,c.default.vErrors),ce.unevaluated&&Ee(w),x.return((0,s._)`${c.default.errors} === 0`))}function Ee({gen:w,evaluated:x,props:N,items:C}){N instanceof s.Name&&w.assign((0,s._)`${x}.props`,N),C instanceof s.Name&&w.assign((0,s._)`${x}.items`,C)}function it(w,x,N,C){const{gen:V,schema:ce,data:Ce,allErrors:ft,opts:He,self:Ke}=w,{RULES:Re}=Ke;if(ce.$ref&&(He.ignoreKeywordsWithRef||!(0,l.schemaHasRulesButRef)(ce,Re))){V.block(()=>L(w,"$ref",Re.all.$ref.definition));return}He.jtd||Lt(w,x),V.block(()=>{for(const st of Re.rules)on(st);on(Re.post)});function on(st){(0,r.shouldUseGroup)(ce,st)&&(st.type?(V.if((0,o.checkDataType)(st.type,Ce,He.strictNumbers)),at(w,st),x.length===1&&x[0]===st.type&&N&&(V.else(),(0,o.reportTypeError)(w)),V.endIf()):at(w,st),ft||V.if((0,s._)`${c.default.errors} === ${C||0}`))}}function at(w,x){const{gen:N,schema:C,opts:{useDefaults:V}}=w;V&&(0,n.assignDefaults)(w,x.type),N.block(()=>{for(const ce of x.rules)(0,r.shouldUseRule)(C,ce)&&L(w,ce.keyword,ce.definition,x.type)})}function Lt(w,x){w.schemaEnv.meta||!w.opts.strictTypes||(Ot(w,x),w.opts.allowUnionTypes||R(w,x),O(w,w.dataTypes))}function Ot(w,x){if(x.length){if(!w.dataTypes.length){w.dataTypes=x;return}x.forEach(N=>{T(w.dataTypes,N)||_(w,`type "${N}" not allowed by context "${w.dataTypes.join(",")}"`)}),f(w,x)}}function R(w,x){x.length>1&&!(x.length===2&&x.includes("null"))&&_(w,"use allowUnionTypes to allow union type keyword")}function O(w,x){const N=w.self.RULES.all;for(const C in N){const V=N[C];if(typeof V=="object"&&(0,r.shouldUseRule)(w.schema,V)){const{type:ce}=V.definition;ce.length&&!ce.some(Ce=>j(x,Ce))&&_(w,`missing type "${ce.join(",")}" for keyword "${C}"`)}}}function j(w,x){return w.includes(x)||x==="number"&&w.includes("integer")}function T(w,x){return w.includes(x)||x==="integer"&&w.includes("number")}function f(w,x){const N=[];for(const C of w.dataTypes)T(x,C)?N.push(C):x.includes("integer")&&C==="number"&&N.push("integer");w.dataTypes=N}function _(w,x){const N=w.schemaEnv.baseId+w.errSchemaPath;x+=` at "${N}" (strictTypes)`,(0,l.checkStrictMode)(w,x,w.opts.strictTypes)}class E{constructor(x,N,C){if((0,i.validateKeywordUsage)(x,N,C),this.gen=x.gen,this.allErrors=x.allErrors,this.keyword=C,this.data=x.data,this.schema=x.schema[C],this.$data=N.$data&&x.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,l.schemaRefOrVal)(x,this.schema,C,this.$data),this.schemaType=N.schemaType,this.parentSchema=x.schema,this.params={},this.it=x,this.def=N,this.$data)this.schemaCode=x.gen.const("vSchema",le(this.$data,x));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,N.schemaType,N.allowUndefined))throw new Error(`${C} value must be ${JSON.stringify(N.schemaType)}`);("code"in N?N.trackErrors:N.errors!==!1)&&(this.errsCount=x.gen.const("_errs",c.default.errors))}result(x,N,C){this.failResult((0,s.not)(x),N,C)}failResult(x,N,C){this.gen.if(x),C?C():this.error(),N?(this.gen.else(),N(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(x,N){this.failResult((0,s.not)(x),void 0,N)}fail(x){if(x===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(x),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(x){if(!this.$data)return this.fail(x);const{schemaCode:N}=this;this.fail((0,s._)`${N} !== undefined && (${(0,s.or)(this.invalid$data(),x)})`)}error(x,N,C){if(N){this.setParams(N),this._error(x,C),this.setParams({});return}this._error(x,C)}_error(x,N){(x?d.reportExtraError:d.reportError)(this,this.def.error,N)}$dataError(){(0,d.reportError)(this,this.def.$dataError||d.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,d.resetErrorsCount)(this.gen,this.errsCount)}ok(x){this.allErrors||this.gen.if(x)}setParams(x,N){N?Object.assign(this.params,x):this.params=x}block$data(x,N,C=s.nil){this.gen.block(()=>{this.check$data(x,C),N()})}check$data(x=s.nil,N=s.nil){if(!this.$data)return;const{gen:C,schemaCode:V,schemaType:ce,def:Ce}=this;C.if((0,s.or)((0,s._)`${V} === undefined`,N)),x!==s.nil&&C.assign(x,!0),(ce.length||Ce.validateSchema)&&(C.elseIf(this.invalid$data()),this.$dataError(),x!==s.nil&&C.assign(x,!1)),C.else()}invalid$data(){const{gen:x,schemaCode:N,schemaType:C,def:V,it:ce}=this;return(0,s.or)(Ce(),ft());function Ce(){if(C.length){if(!(N instanceof s.Name))throw new Error("ajv implementation error");const He=Array.isArray(C)?C:[C];return(0,s._)`${(0,o.checkDataTypes)(He,N,ce.opts.strictNumbers,o.DataType.Wrong)}`}return s.nil}function ft(){if(V.validateSchema){const He=x.scopeValue("validate$data",{ref:V.validateSchema});return(0,s._)`!${He}(${N})`}return s.nil}}subschema(x,N){const C=(0,a.getSubschema)(this.it,x);(0,a.extendSubschemaData)(C,this.it,x),(0,a.extendSubschemaMode)(C,x);const V={...this.it,...C,items:void 0,props:void 0};return b(V,N),V}mergeEvaluated(x,N){const{it:C,gen:V}=this;C.opts.unevaluated&&(C.props!==!0&&x.props!==void 0&&(C.props=l.mergeEvaluated.props(V,x.props,C.props,N)),C.items!==!0&&x.items!==void 0&&(C.items=l.mergeEvaluated.items(V,x.items,C.items,N)))}mergeValidEvaluated(x,N){const{it:C,gen:V}=this;if(C.opts.unevaluated&&(C.props!==!0||C.items!==!0))return V.if(N,()=>this.mergeEvaluated(x,s.Name)),!0}}Pt.KeywordCxt=E;function L(w,x,N,C){const V=new E(w,N,x);"code"in N?N.code(V,C):V.$data&&N.validate?(0,i.funcKeywordCode)(V,N):"macro"in N?(0,i.macroKeywordCode)(V,N):(N.compile||N.validate)&&(0,i.funcKeywordCode)(V,N)}const J=/^\/(?:[^~]|~0|~1)*$/,fe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function le(w,{dataLevel:x,dataNames:N,dataPathArr:C}){let V,ce;if(w==="")return c.default.rootData;if(w[0]==="/"){if(!J.test(w))throw new Error(`Invalid JSON-pointer: ${w}`);V=w,ce=c.default.rootData}else{const Ke=fe.exec(w);if(!Ke)throw new Error(`Invalid JSON-pointer: ${w}`);const Re=+Ke[1];if(V=Ke[2],V==="#"){if(Re>=x)throw new Error(He("property/index",Re));return C[x-Re]}if(Re>x)throw new Error(He("data",Re));if(ce=N[x-Re],!V)return ce}let Ce=ce;const ft=V.split("/");for(const Ke of ft)Ke&&(ce=(0,s._)`${ce}${(0,s.getProperty)((0,l.unescapeJsonPointer)(Ke))}`,Ce=(0,s._)`${Ce} && ${ce}`);return Ce;function He(Ke,Re){return`Cannot access ${Ke} ${Re} levels up, current level is ${x}`}}return Pt.getData=le,Pt}var Yo={},Ig;function pc(){if(Ig)return Yo;Ig=1,Object.defineProperty(Yo,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return Yo.default=e,Yo}var Xo={},Og;function Qo(){if(Og)return Xo;Og=1,Object.defineProperty(Xo,"__esModule",{value:!0});const e=Me;class t extends Error{constructor(o,n,i,a){super(a||`can't resolve reference ${i} from id ${n}`),this.missingRef=(0,e.resolveUrl)(o,n,i),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(o,this.missingRef))}}return Xo.default=t,Xo}var Xe={};Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.resolveSchema=Xe.getCompilingSchema=Xe.resolveRef=Xe.compileSchema=Xe.SchemaEnv=void 0;const _t=se,Dw=pc(),Qt=At(),$t=Me,xg=Z,Cw=Wo();class ei{constructor(t){var r;this.refs={},this.dynamicAnchors={};let o;typeof t.schema=="object"&&(o=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,$t.normalizeId)(o?.[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=o?.$async,this.refs={}}}Xe.SchemaEnv=ei;function fc(e){const t=Tg.call(this,e);if(t)return t;const r=(0,$t.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:o,lines:n}=this.opts.code,{ownProperties:i}=this.opts,a=new _t.CodeGen(this.scope,{es5:o,lines:n,ownProperties:i});let s;e.$async&&(s=a.scopeValue("Error",{ref:Dw.default,code:(0,_t._)`require("ajv/dist/runtime/validation_error").default`}));const c=a.scopeName("validate");e.validateName=c;const u={gen:a,allErrors:this.opts.allErrors,data:Qt.default.data,parentData:Qt.default.parentData,parentDataProperty:Qt.default.parentDataProperty,dataNames:[Qt.default.data],dataPathArr:[_t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:a.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,_t.stringify)(e.schema)}:{ref:e.schema}),validateName:c,ValidationError:s,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:_t.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,_t._)`""`,opts:this.opts,self:this};let l;try{this._compilations.add(e),(0,Cw.validateFunctionCode)(u),a.optimize(this.opts.code.optimize);const d=a.toString();l=`${a.scopeRefs(Qt.default.scope)}return ${d}`,this.opts.code.process&&(l=this.opts.code.process(l,e));const m=new Function(`${Qt.default.self}`,`${Qt.default.scope}`,l)(this,this.scope.get());if(this.scope.value(c,{ref:m}),m.errors=null,m.schema=e.schema,m.schemaEnv=e,e.$async&&(m.$async=!0),this.opts.code.source===!0&&(m.source={validateName:c,validateCode:d,scopeValues:a._values}),this.opts.unevaluated){const{props:h,items:$}=u;m.evaluated={props:h instanceof _t.Name?void 0:h,items:$ instanceof _t.Name?void 0:$,dynamicProps:h instanceof _t.Name,dynamicItems:$ instanceof _t.Name},m.source&&(m.source.evaluated=(0,_t.stringify)(m.evaluated))}return e.validate=m,e}catch(d){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),d}finally{this._compilations.delete(e)}}Xe.compileSchema=fc;function Rw(e,t,r){var o;r=(0,$t.resolveUrl)(this.opts.uriResolver,t,r);const n=e.refs[r];if(n)return n;let i=Zw.call(this,e,r);if(i===void 0){const a=(o=e.localRefs)===null||o===void 0?void 0:o[r],{schemaId:s}=this.opts;a&&(i=new ei({schema:a,schemaId:s,root:e,baseId:t}))}if(i!==void 0)return e.refs[r]=Aw.call(this,i)}Xe.resolveRef=Rw;function Aw(e){return(0,$t.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:fc.call(this,e)}function Tg(e){for(const t of this._compilations)if(Uw(t,e))return t}Xe.getCompilingSchema=Tg;function Uw(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Zw(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||ti.call(this,e,t)}function ti(e,t){const r=this.opts.uriResolver.parse(t),o=(0,$t._getFullPath)(this.opts.uriResolver,r);let n=(0,$t.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&o===n)return hc.call(this,r,e);const i=(0,$t.normalizeId)(o),a=this.refs[i]||this.schemas[i];if(typeof a=="string"){const s=ti.call(this,e,a);return typeof s?.schema!="object"?void 0:hc.call(this,r,s)}if(typeof a?.schema=="object"){if(a.validate||fc.call(this,a),i===(0,$t.normalizeId)(t)){const{schema:s}=a,{schemaId:c}=this.opts,u=s[c];return u&&(n=(0,$t.resolveUrl)(this.opts.uriResolver,n,u)),new ei({schema:s,schemaId:c,root:e,baseId:n})}return hc.call(this,r,a)}}Xe.resolveSchema=ti;const Mw=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function hc(e,{baseId:t,schema:r,root:o}){var n;if(((n=e.fragment)===null||n===void 0?void 0:n[0])!=="/")return;for(const s of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const c=r[(0,xg.unescapeFragment)(s)];if(c===void 0)return;r=c;const u=typeof r=="object"&&r[this.opts.schemaId];!Mw.has(s)&&u&&(t=(0,$t.resolveUrl)(this.opts.uriResolver,t,u))}let i;if(typeof r!="boolean"&&r.$ref&&!(0,xg.schemaHasRulesButRef)(r,this.RULES)){const s=(0,$t.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=ti.call(this,o,s)}const{schemaId:a}=this.opts;if(i=i||new ei({schema:r,schemaId:a,root:o,baseId:t}),i.schema!==i.root.schema)return i}var Bw="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Lw="Meta-schema for $data reference (JSON AnySchema extension proposal)",Fw="object",Gw=["$data"],Vw={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},qw=!1,Jw={$id:Bw,description:Lw,type:Fw,required:Gw,properties:Vw,additionalProperties:qw},gc={},ni={exports:{}};const Hw=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),Pg=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),vc=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),Eg=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),Kw=RegExp.prototype.test.bind(/^[\da-z\-._~!$&'()*+,;=:@/]$/iu);function zg(e){let t="",r=0,o=0;for(o=0;o<e.length;o++)if(r=e[o].charCodeAt(0),r!==48){if(!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[o];break}for(o+=1;o<e.length;o++){if(r=e[o].charCodeAt(0),!(r>=48&&r<=57||r>=65&&r<=70||r>=97&&r<=102))return"";t+=e[o]}return t}const Ww=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function Ng(e){return e.length=0,!0}function Yw(e,t,r){if(e.length){const o=zg(e);if(o!=="")t.push(o);else return r.error=!0,!1;e.length=0}return!0}function Xw(e){let t=0;const r={error:!1,address:"",zone:""},o=[],n=[];let i=!1,a=!1,s=Yw;for(let c=0;c<e.length;c++){const u=e[c];if(!(u==="["||u==="]"))if(u===":"){if(i===!0&&(a=!0),!s(n,o,r))break;if(++t>7){r.error=!0;break}c>0&&e[c-1]===":"&&(i=!0),o.push(":");continue}else if(u==="%"){if(!s(n,o,r))break;s=Ng}else{n.push(u);continue}}return n.length&&(s===Ng?r.zone=n.join(""):a?o.push(n.join("")):o.push(zg(n))),r.address=o.join(""),r}function jg(e){if(Qw(e,":")<2)return{host:e,isIPV6:!1};const t=Xw(e);if(t.error)return{host:e,isIPV6:!1};{let r=t.address,o=t.address;return t.zone&&(r+="%"+t.zone,o+="%25"+t.zone),{host:r,isIPV6:!0,escapedHost:o}}}function Qw(e,t){let r=0;for(let o=0;o<e.length;o++)e[o]===t&&r++;return r}function e0(e){let t=e;const r=[];let o=-1,n=0;for(;n=t.length;){if(n===1){if(t===".")break;if(t==="/"){r.push("/");break}else{r.push(t);break}}else if(n===2){if(t[0]==="."){if(t[1]===".")break;if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&(t[1]==="."||t[1]==="/")){r.push("/");break}}else if(n===3&&t==="/.."){r.length!==0&&r.pop(),r.push("/");break}if(t[0]==="."){if(t[1]==="."){if(t[2]==="/"){t=t.slice(3);continue}}else if(t[1]==="/"){t=t.slice(2);continue}}else if(t[0]==="/"&&t[1]==="."){if(t[2]==="/"){t=t.slice(2);continue}else if(t[2]==="."&&t[3]==="/"){t=t.slice(3),r.length!==0&&r.pop();continue}}if((o=t.indexOf("/",1))===-1){r.push(t);break}else r.push(t.slice(0,o)),t=t.slice(o)}return r.join("")}const t0={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},n0=/[@/?#:]/g,r0=/[@/?#]/g;function Dg(e,t){const r=t?r0:n0;return r.lastIndex=0,e.replace(r,o=>t0[o])}function o0(e,t=!1){if(e.indexOf("%")===-1)return e;let r="";for(let o=0;o<e.length;o++){if(e[o]==="%"&&o+2<e.length){const n=e.slice(o+1,o+3);if(vc(n)){const i=n.toUpperCase(),a=String.fromCharCode(parseInt(i,16));t&&Eg(a)?r+=a:r+="%"+i,o+=2;continue}}r+=e[o]}return r}function i0(e){let t="";for(let r=0;r<e.length;r++){if(e[r]==="%"&&r+2<e.length){const o=e.slice(r+1,r+3);if(vc(o)){const n=o.toUpperCase(),i=String.fromCharCode(parseInt(n,16));i!=="."&&Eg(i)?t+=i:t+="%"+n,r+=2;continue}}Kw(e[r])?t+=e[r]:t+=escape(e[r])}return t}function a0(e){let t="";for(let r=0;r<e.length;r++){if(e[r]==="%"&&r+2<e.length){const o=e.slice(r+1,r+3);if(vc(o)){t+="%"+o.toUpperCase(),r+=2;continue}}t+=escape(e[r])}return t}function s0(e){const t=[];if(e.userinfo!==void 0&&(t.push(e.userinfo),t.push("@")),e.host!==void 0){let r=unescape(e.host);if(!Pg(r)){const o=jg(r);o.isIPV6===!0?r=`[${o.escapedHost}]`:r=Dg(r,!1)}t.push(r)}return(typeof e.port=="number"||typeof e.port=="string")&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}var Cg={nonSimpleDomain:Ww,recomposeAuthority:s0,reescapeHostDelimiters:Dg,normalizePercentEncoding:o0,normalizePathEncoding:i0,escapePreservingEscapes:a0,removeDotSegments:e0,isIPv4:Pg,isUUID:Hw,normalizeIPv6:jg};const{isUUID:c0}=Cg,u0=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function Rg(e){return e.secure===!0?!0:e.secure===!1?!1:e.scheme?e.scheme.length===3&&(e.scheme[0]==="w"||e.scheme[0]==="W")&&(e.scheme[1]==="s"||e.scheme[1]==="S")&&(e.scheme[2]==="s"||e.scheme[2]==="S"):!1}function Ag(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function Ug(e){const t=String(e.scheme).toLowerCase()==="https";return(e.port===(t?443:80)||e.port==="")&&(e.port=void 0),e.path||(e.path="/"),e}function l0(e){return e.secure=Rg(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function d0(e){if((e.port===(Rg(e)?443:80)||e.port==="")&&(e.port=void 0),typeof e.secure=="boolean"&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,r]=e.resourceName.split("?");e.path=t&&t!=="/"?t:void 0,e.query=r,e.resourceName=void 0}return e.fragment=void 0,e}function m0(e,t){if(!e.path)return e.error="URN can not be parsed",e;const r=e.path.match(u0);if(r){const o=t.scheme||e.scheme||"urn";e.nid=r[1].toLowerCase(),e.nss=r[2];const n=`${o}:${t.nid||e.nid}`,i=yc(n);e.path=void 0,i&&(e=i.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function p0(e,t){if(e.nid===void 0)throw new Error("URN without nid cannot be serialized");const r=t.scheme||e.scheme||"urn",o=e.nid.toLowerCase(),n=`${r}:${t.nid||o}`,i=yc(n);i&&(e=i.serialize(e,t));const a=e,s=e.nss;return a.path=`${o||t.nid}:${s}`,t.skipEscape=!0,a}function f0(e,t){const r=e;return r.uuid=r.nss,r.nss=void 0,!t.tolerant&&(!r.uuid||!c0(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function h0(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t}const Zg={scheme:"http",domainHost:!0,parse:Ag,serialize:Ug},g0={scheme:"https",domainHost:Zg.domainHost,parse:Ag,serialize:Ug},ri={scheme:"ws",domainHost:!0,parse:l0,serialize:d0},v0={scheme:"wss",domainHost:ri.domainHost,parse:ri.parse,serialize:ri.serialize},y0={scheme:"urn",parse:m0,serialize:p0,skipNormalize:!0},_0={scheme:"urn:uuid",parse:f0,serialize:h0,skipNormalize:!0},oi={http:Zg,https:g0,ws:ri,wss:v0,urn:y0,"urn:uuid":_0};Object.setPrototypeOf(oi,null);function yc(e){return e&&(oi[e]||oi[e.toLowerCase()])||void 0}var $0={SCHEMES:oi,getSchemeHandler:yc};const{normalizeIPv6:b0,removeDotSegments:br,recomposeAuthority:k0,normalizePercentEncoding:S0,normalizePathEncoding:w0,escapePreservingEscapes:I0,reescapeHostDelimiters:O0,isIPv4:x0,nonSimpleDomain:T0}=Cg,{SCHEMES:P0,getSchemeHandler:Mg}=$0;function E0(e,t){return typeof e=="string"?e=C0(e,t):typeof e=="object"&&(e=Sn(en(e,t),t)),e}function z0(e,t,r){const o=r?Object.assign({scheme:"null"},r):{scheme:"null"},n=Bg(Sn(e,o),Sn(t,o),o,!0);return o.skipEscape=!0,en(n,o)}function Bg(e,t,r,o){const n={};return o||(e=Sn(en(e,r),r),t=Sn(en(t,r),r)),r=r||{},!r.tolerant&&t.scheme?(n.scheme=t.scheme,n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=br(t.path||""),n.query=t.query):(t.userinfo!==void 0||t.host!==void 0||t.port!==void 0?(n.userinfo=t.userinfo,n.host=t.host,n.port=t.port,n.path=br(t.path||""),n.query=t.query):(t.path?(t.path[0]==="/"?n.path=br(t.path):((e.userinfo!==void 0||e.host!==void 0||e.port!==void 0)&&!e.path?n.path="/"+t.path:e.path?n.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:n.path=t.path,n.path=br(n.path)),n.query=t.query):(n.path=e.path,t.query!==void 0?n.query=t.query:n.query=e.query),n.userinfo=e.userinfo,n.host=e.host,n.port=e.port),n.scheme=e.scheme),n.fragment=t.fragment,n}function N0(e,t,r){const o=Gg(e,r),n=Gg(t,r);return o!==void 0&&n!==void 0&&o.toLowerCase()===n.toLowerCase()}function en(e,t){const r={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},o=Object.assign({},t),n=[],i=Mg(o.scheme||r.scheme);i&&i.serialize&&i.serialize(r,o),r.path!==void 0&&(o.skipEscape?r.path=S0(r.path):(r.path=I0(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),o.reference!=="suffix"&&r.scheme&&n.push(r.scheme,":");const a=k0(r);if(a!==void 0&&(o.reference!=="suffix"&&n.push("//"),n.push(a),r.path&&r.path[0]!=="/"&&n.push("/")),r.path!==void 0){let s=r.path;!o.absolutePath&&(!i||!i.absolutePath)&&(s=br(s)),a===void 0&&s[0]==="/"&&s[1]==="/"&&(s="/%2F"+s.slice(2)),n.push(s)}return r.query!==void 0&&n.push("?",r.query),r.fragment!==void 0&&n.push("#",r.fragment),n.join("")}const j0=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function D0(e,t){if(t[2]!==void 0&&e.path&&e.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof e.port=="number"&&(e.port<0||e.port>65535))return"URI port is malformed."}function Lg(e,t){const r=Object.assign({},t),o={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let n=!1,i=!1;r.reference==="suffix"&&(r.scheme?e=r.scheme+":"+e:e="//"+e);const a=e.match(j0);if(a){o.scheme=a[1],o.userinfo=a[3],o.host=a[4],o.port=parseInt(a[5],10),o.path=a[6]||"",o.query=a[7],o.fragment=a[8],isNaN(o.port)&&(o.port=a[5]);const s=D0(o,a);if(s!==void 0&&(o.error=o.error||s,n=!0),o.host)if(x0(o.host)===!1){const l=b0(o.host);o.host=l.host.toLowerCase(),i=l.isIPV6}else i=!0;o.scheme===void 0&&o.userinfo===void 0&&o.host===void 0&&o.port===void 0&&o.query===void 0&&!o.path?o.reference="same-document":o.scheme===void 0?o.reference="relative":o.fragment===void 0?o.reference="absolute":o.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==o.reference&&(o.error=o.error||"URI is not a "+r.reference+" reference.");const c=Mg(r.scheme||o.scheme);if(!r.unicodeSupport&&(!c||!c.unicodeSupport)&&o.host&&(r.domainHost||c&&c.domainHost)&&i===!1&&T0(o.host))try{o.host=URL.domainToASCII(o.host.toLowerCase())}catch(u){o.error=o.error||"Host's domain name can not be converted to ASCII: "+u}if((!c||c&&!c.skipNormalize)&&(e.indexOf("%")!==-1&&(o.scheme!==void 0&&(o.scheme=unescape(o.scheme)),o.host!==void 0&&(o.host=O0(unescape(o.host),i))),o.path&&(o.path=w0(o.path)),o.fragment))try{o.fragment=encodeURI(decodeURIComponent(o.fragment))}catch{o.error=o.error||"URI malformed"}c&&c.parse&&c.parse(o,r)}else o.error=o.error||"URI can not be parsed.";return{parsed:o,malformedAuthorityOrPort:n}}function Sn(e,t){return Lg(e,t).parsed}function C0(e,t){return Fg(e,t).normalized}function Fg(e,t){const{parsed:r,malformedAuthorityOrPort:o}=Lg(e,t);return{normalized:o?e:en(r,t),malformedAuthorityOrPort:o}}function Gg(e,t){if(typeof e=="string"){const{normalized:r,malformedAuthorityOrPort:o}=Fg(e,t);return o?void 0:r}if(typeof e=="object")return en(e,t)}const _c={SCHEMES:P0,normalize:E0,resolve:z0,resolveComponent:Bg,equal:N0,serialize:en,parse:Sn};ni.exports=_c,ni.exports.default=_c,ni.exports.fastUri=_c;var R0=ni.exports;Object.defineProperty(gc,"__esModule",{value:!0});const Vg=R0;Vg.code='require("ajv/dist/runtime/uri").default',gc.default=Vg,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=Wo();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=se;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const o=pc(),n=Qo(),i=Xt,a=Xe,s=se,c=Me,u=De,l=Z,d=Jw,p=gc,m=(R,O)=>new RegExp(R,O);m.code="new RegExp";const h=["removeAdditional","useDefaults","coerceTypes"],$=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),g={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."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},y=200;function b(R){var O,j,T,f,_,E,L,J,fe,le,w,x,N,C,V,ce,Ce,ft,He,Ke,Re,on,st,ki,Si;const zn=R.strict,wi=(O=R.code)===null||O===void 0?void 0:O.optimize,su=wi===!0||wi===void 0?1:wi||0,cu=(T=(j=R.code)===null||j===void 0?void 0:j.regExp)!==null&&T!==void 0?T:m,Uv=(f=R.uriResolver)!==null&&f!==void 0?f:p.default;return{strictSchema:(E=(_=R.strictSchema)!==null&&_!==void 0?_:zn)!==null&&E!==void 0?E:!0,strictNumbers:(J=(L=R.strictNumbers)!==null&&L!==void 0?L:zn)!==null&&J!==void 0?J:!0,strictTypes:(le=(fe=R.strictTypes)!==null&&fe!==void 0?fe:zn)!==null&&le!==void 0?le:"log",strictTuples:(x=(w=R.strictTuples)!==null&&w!==void 0?w:zn)!==null&&x!==void 0?x:"log",strictRequired:(C=(N=R.strictRequired)!==null&&N!==void 0?N:zn)!==null&&C!==void 0?C:!1,code:R.code?{...R.code,optimize:su,regExp:cu}:{optimize:su,regExp:cu},loopRequired:(V=R.loopRequired)!==null&&V!==void 0?V:y,loopEnum:(ce=R.loopEnum)!==null&&ce!==void 0?ce:y,meta:(Ce=R.meta)!==null&&Ce!==void 0?Ce:!0,messages:(ft=R.messages)!==null&&ft!==void 0?ft:!0,inlineRefs:(He=R.inlineRefs)!==null&&He!==void 0?He:!0,schemaId:(Ke=R.schemaId)!==null&&Ke!==void 0?Ke:"$id",addUsedSchema:(Re=R.addUsedSchema)!==null&&Re!==void 0?Re:!0,validateSchema:(on=R.validateSchema)!==null&&on!==void 0?on:!0,validateFormats:(st=R.validateFormats)!==null&&st!==void 0?st:!0,unicodeRegExp:(ki=R.unicodeRegExp)!==null&&ki!==void 0?ki:!0,int32range:(Si=R.int32range)!==null&&Si!==void 0?Si:!0,uriResolver:Uv}}class I{constructor(O={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,O=this.opts={...O,...b(O)};const{es5:j,lines:T}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:$,es5:j,lines:T}),this.logger=Q(O.logger);const f=O.validateFormats;O.validateFormats=!1,this.RULES=(0,i.getRules)(),P.call(this,g,O,"NOT SUPPORTED"),P.call(this,v,O,"DEPRECATED","warn"),this._metaOpts=Pe.call(this),O.formats&&ue.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),O.keywords&&pe.call(this,O.keywords),typeof O.meta=="object"&&this.addMetaSchema(O.meta),G.call(this),O.validateFormats=f}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:O,meta:j,schemaId:T}=this.opts;let f=d;T==="id"&&(f={...d},f.id=f.$id,delete f.$id),j&&O&&this.addMetaSchema(f,f[T],!1)}defaultMeta(){const{meta:O,schemaId:j}=this.opts;return this.opts.defaultMeta=typeof O=="object"?O[j]||O:void 0}validate(O,j){let T;if(typeof O=="string"){if(T=this.getSchema(O),!T)throw new Error(`no schema with key or ref "${O}"`)}else T=this.compile(O);const f=T(j);return"$async"in T||(this.errors=T.errors),f}compile(O,j){const T=this._addSchema(O,j);return T.validate||this._compileSchemaEnv(T)}compileAsync(O,j){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:T}=this.opts;return f.call(this,O,j);async function f(le,w){await _.call(this,le.$schema);const x=this._addSchema(le,w);return x.validate||E.call(this,x)}async function _(le){le&&!this.getSchema(le)&&await f.call(this,{$ref:le},!0)}async function E(le){try{return this._compileSchemaEnv(le)}catch(w){if(!(w instanceof n.default))throw w;return L.call(this,w),await J.call(this,w.missingSchema),E.call(this,le)}}function L({missingSchema:le,missingRef:w}){if(this.refs[le])throw new Error(`AnySchema ${le} is loaded but ${w} cannot be resolved`)}async function J(le){const w=await fe.call(this,le);this.refs[le]||await _.call(this,w.$schema),this.refs[le]||this.addSchema(w,le,j)}async function fe(le){const w=this._loading[le];if(w)return w;try{return await(this._loading[le]=T(le))}finally{delete this._loading[le]}}}addSchema(O,j,T,f=this.opts.validateSchema){if(Array.isArray(O)){for(const E of O)this.addSchema(E,void 0,T,f);return this}let _;if(typeof O=="object"){const{schemaId:E}=this.opts;if(_=O[E],_!==void 0&&typeof _!="string")throw new Error(`schema ${E} must be string`)}return j=(0,c.normalizeId)(j||_),this._checkUnique(j),this.schemas[j]=this._addSchema(O,T,j,f,!0),this}addMetaSchema(O,j,T=this.opts.validateSchema){return this.addSchema(O,j,!0,T),this}validateSchema(O,j){if(typeof O=="boolean")return!0;let T;if(T=O.$schema,T!==void 0&&typeof T!="string")throw new Error("$schema must be a string");if(T=T||this.opts.defaultMeta||this.defaultMeta(),!T)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const f=this.validate(T,O);if(!f&&j){const _="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(_);else throw new Error(_)}return f}getSchema(O){let j;for(;typeof(j=M.call(this,O))=="string";)O=j;if(j===void 0){const{schemaId:T}=this.opts,f=new a.SchemaEnv({schema:{},schemaId:T});if(j=a.resolveSchema.call(this,f,O),!j)return;this.refs[O]=j}return j.validate||this._compileSchemaEnv(j)}removeSchema(O){if(O instanceof RegExp)return this._removeAllSchemas(this.schemas,O),this._removeAllSchemas(this.refs,O),this;switch(typeof O){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const j=M.call(this,O);return typeof j=="object"&&this._cache.delete(j.schema),delete this.schemas[O],delete this.refs[O],this}case"object":{const j=O;this._cache.delete(j);let T=O[this.opts.schemaId];return T&&(T=(0,c.normalizeId)(T),delete this.schemas[T],delete this.refs[T]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(O){for(const j of O)this.addKeyword(j);return this}addKeyword(O,j){let T;if(typeof O=="string")T=O,typeof j=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),j.keyword=T);else if(typeof O=="object"&&j===void 0){if(j=O,T=j.keyword,Array.isArray(T)&&!T.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(H.call(this,T,j),!j)return(0,l.eachItem)(T,_=>Ee.call(this,_)),this;at.call(this,j);const f={...j,type:(0,u.getJSONTypes)(j.type),schemaType:(0,u.getJSONTypes)(j.schemaType)};return(0,l.eachItem)(T,f.type.length===0?_=>Ee.call(this,_,f):_=>f.type.forEach(E=>Ee.call(this,_,f,E))),this}getKeyword(O){const j=this.RULES.all[O];return typeof j=="object"?j.definition:!!j}removeKeyword(O){const{RULES:j}=this;delete j.keywords[O],delete j.all[O];for(const T of j.rules){const f=T.rules.findIndex(_=>_.keyword===O);f>=0&&T.rules.splice(f,1)}return this}addFormat(O,j){return typeof j=="string"&&(j=new RegExp(j)),this.formats[O]=j,this}errorsText(O=this.errors,{separator:j=", ",dataVar:T="data"}={}){return!O||O.length===0?"No errors":O.map(f=>`${T}${f.instancePath} ${f.message}`).reduce((f,_)=>f+j+_)}$dataMetaSchema(O,j){const T=this.RULES.all;O=JSON.parse(JSON.stringify(O));for(const f of j){const _=f.split("/").slice(1);let E=O;for(const L of _)E=E[L];for(const L in T){const J=T[L];if(typeof J!="object")continue;const{$data:fe}=J.definition,le=E[L];fe&&le&&(E[L]=Ot(le))}}return O}_removeAllSchemas(O,j){for(const T in O){const f=O[T];(!j||j.test(T))&&(typeof f=="string"?delete O[T]:f&&!f.meta&&(this._cache.delete(f.schema),delete O[T]))}}_addSchema(O,j,T,f=this.opts.validateSchema,_=this.opts.addUsedSchema){let E;const{schemaId:L}=this.opts;if(typeof O=="object")E=O[L];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof O!="boolean")throw new Error("schema must be object or boolean")}let J=this._cache.get(O);if(J!==void 0)return J;T=(0,c.normalizeId)(E||T);const fe=c.getSchemaRefs.call(this,O,T);return J=new a.SchemaEnv({schema:O,schemaId:L,meta:j,baseId:T,localRefs:fe}),this._cache.set(J.schema,J),_&&!T.startsWith("#")&&(T&&this._checkUnique(T),this.refs[T]=J),f&&this.validateSchema(O,!0),J}_checkUnique(O){if(this.schemas[O]||this.refs[O])throw new Error(`schema with key or id "${O}" already exists`)}_compileSchemaEnv(O){if(O.meta?this._compileMetaSchema(O):a.compileSchema.call(this,O),!O.validate)throw new Error("ajv implementation error");return O.validate}_compileMetaSchema(O){const j=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,O)}finally{this.opts=j}}}I.ValidationError=o.default,I.MissingRefError=n.default,e.default=I;function P(R,O,j,T="error"){for(const f in R){const _=f;_ in O&&this.logger[T](`${j}: option ${f}. ${R[_]}`)}}function M(R){return R=(0,c.normalizeId)(R),this.schemas[R]||this.refs[R]}function G(){const R=this.opts.schemas;if(R)if(Array.isArray(R))this.addSchema(R);else for(const O in R)this.addSchema(R[O],O)}function ue(){for(const R in this.opts.formats){const O=this.opts.formats[R];O&&this.addFormat(R,O)}}function pe(R){if(Array.isArray(R)){this.addVocabulary(R);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const O in R){const j=R[O];j.keyword||(j.keyword=O),this.addKeyword(j)}}function Pe(){const R={...this.opts};for(const O of h)delete R[O];return R}const B={log(){},warn(){},error(){}};function Q(R){if(R===!1)return B;if(R===void 0)return console;if(R.log&&R.warn&&R.error)return R;throw new Error("logger must implement log, warn and error methods")}const Y=/^[a-z_$][a-z0-9_$:-]*$/i;function H(R,O){const{RULES:j}=this;if((0,l.eachItem)(R,T=>{if(j.keywords[T])throw new Error(`Keyword ${T} is already defined`);if(!Y.test(T))throw new Error(`Keyword ${T} has invalid name`)}),!!O&&O.$data&&!("code"in O||"validate"in O))throw new Error('$data keyword must have "code" or "validate" function')}function Ee(R,O,j){var T;const f=O?.post;if(j&&f)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:_}=this;let E=f?_.post:_.rules.find(({type:J})=>J===j);if(E||(E={type:j,rules:[]},_.rules.push(E)),_.keywords[R]=!0,!O)return;const L={keyword:R,definition:{...O,type:(0,u.getJSONTypes)(O.type),schemaType:(0,u.getJSONTypes)(O.schemaType)}};O.before?it.call(this,E,L,O.before):E.rules.push(L),_.all[R]=L,(T=O.implements)===null||T===void 0||T.forEach(J=>this.addKeyword(J))}function it(R,O,j){const T=R.rules.findIndex(f=>f.keyword===j);T>=0?R.rules.splice(T,0,O):(R.rules.push(O),this.logger.warn(`rule ${j} is not defined`))}function at(R){let{metaSchema:O}=R;O!==void 0&&(R.$data&&this.opts.$data&&(O=Ot(O)),R.validateSchema=this.compile(O,!0))}const Lt={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ot(R){return{anyOf:[R,Lt]}}})(Qh);var $c={},bc={},kc={};Object.defineProperty(kc,"__esModule",{value:!0});const A0={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};kc.default=A0;var tn={};Object.defineProperty(tn,"__esModule",{value:!0}),tn.callRef=tn.getValidate=void 0;const U0=Qo(),qg=yt(),Qe=se,wn=At(),Jg=Xe,ii=Z,Z0={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:o}=e,{baseId:n,schemaEnv:i,validateName:a,opts:s,self:c}=o,{root:u}=i;if((r==="#"||r==="#/")&&n===u.baseId)return d();const l=Jg.resolveRef.call(c,u,n,r);if(l===void 0)throw new U0.default(o.opts.uriResolver,n,r);if(l instanceof Jg.SchemaEnv)return p(l);return m(l);function d(){if(i===u)return ai(e,a,i,i.$async);const h=t.scopeValue("root",{ref:u});return ai(e,(0,Qe._)`${h}.validate`,u,u.$async)}function p(h){const $=Hg(e,h);ai(e,$,h,h.$async)}function m(h){const $=t.scopeValue("schema",s.code.source===!0?{ref:h,code:(0,Qe.stringify)(h)}:{ref:h}),g=t.name("valid"),v=e.subschema({schema:h,dataTypes:[],schemaPath:Qe.nil,topSchemaRef:$,errSchemaPath:r},g);e.mergeEvaluated(v),e.ok(g)}}};function Hg(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Qe._)`${r.scopeValue("wrapper",{ref:t})}.validate`}tn.getValidate=Hg;function ai(e,t,r,o){const{gen:n,it:i}=e,{allErrors:a,schemaEnv:s,opts:c}=i,u=c.passContext?wn.default.this:Qe.nil;o?l():d();function l(){if(!s.$async)throw new Error("async schema referenced by sync schema");const h=n.let("valid");n.try(()=>{n.code((0,Qe._)`await ${(0,qg.callValidateCode)(e,t,u)}`),m(t),a||n.assign(h,!0)},$=>{n.if((0,Qe._)`!(${$} instanceof ${i.ValidationError})`,()=>n.throw($)),p($),a||n.assign(h,!1)}),e.ok(h)}function d(){e.result((0,qg.callValidateCode)(e,t,u),()=>m(t),()=>p(t))}function p(h){const $=(0,Qe._)`${h}.errors`;n.assign(wn.default.vErrors,(0,Qe._)`${wn.default.vErrors} === null ? ${$} : ${wn.default.vErrors}.concat(${$})`),n.assign(wn.default.errors,(0,Qe._)`${wn.default.vErrors}.length`)}function m(h){var $;if(!i.opts.unevaluated)return;const g=($=r?.validate)===null||$===void 0?void 0:$.evaluated;if(i.props!==!0)if(g&&!g.dynamicProps)g.props!==void 0&&(i.props=ii.mergeEvaluated.props(n,g.props,i.props));else{const v=n.var("props",(0,Qe._)`${h}.evaluated.props`);i.props=ii.mergeEvaluated.props(n,v,i.props,Qe.Name)}if(i.items!==!0)if(g&&!g.dynamicItems)g.items!==void 0&&(i.items=ii.mergeEvaluated.items(n,g.items,i.items));else{const v=n.var("items",(0,Qe._)`${h}.evaluated.items`);i.items=ii.mergeEvaluated.items(n,v,i.items,Qe.Name)}}}tn.callRef=ai,tn.default=Z0,Object.defineProperty(bc,"__esModule",{value:!0});const M0=kc,B0=tn,L0=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",M0.default,B0.default];bc.default=L0;var Sc={},wc={};Object.defineProperty(wc,"__esModule",{value:!0});const si=se,Zt=si.operators,ci={maximum:{okStr:"<=",ok:Zt.LTE,fail:Zt.GT},minimum:{okStr:">=",ok:Zt.GTE,fail:Zt.LT},exclusiveMaximum:{okStr:"<",ok:Zt.LT,fail:Zt.GTE},exclusiveMinimum:{okStr:">",ok:Zt.GT,fail:Zt.LTE}},F0={message:({keyword:e,schemaCode:t})=>(0,si.str)`must be ${ci[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,si._)`{comparison: ${ci[e].okStr}, limit: ${t}}`},G0={keyword:Object.keys(ci),type:"number",schemaType:"number",$data:!0,error:F0,code(e){const{keyword:t,data:r,schemaCode:o}=e;e.fail$data((0,si._)`${r} ${ci[t].fail} ${o} || isNaN(${r})`)}};wc.default=G0;var Ic={};Object.defineProperty(Ic,"__esModule",{value:!0});const kr=se,V0={message:({schemaCode:e})=>(0,kr.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,kr._)`{multipleOf: ${e}}`},q0={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:V0,code(e){const{gen:t,data:r,schemaCode:o,it:n}=e,i=n.opts.multipleOfPrecision,a=t.let("res"),s=i?(0,kr._)`Math.abs(Math.round(${a}) - ${a}) > 1e-${i}`:(0,kr._)`${a} !== parseInt(${a})`;e.fail$data((0,kr._)`(${o} === 0 || (${a} = ${r}/${o}, ${s}))`)}};Ic.default=q0;var Oc={},xc={};Object.defineProperty(xc,"__esModule",{value:!0});function Kg(e){const t=e.length;let r=0,o=0,n;for(;o<t;)r++,n=e.charCodeAt(o++),n>=55296&&n<=56319&&o<t&&(n=e.charCodeAt(o),(n&64512)===56320&&o++);return r}xc.default=Kg,Kg.code='require("ajv/dist/runtime/ucs2length").default',Object.defineProperty(Oc,"__esModule",{value:!0});const nn=se,J0=Z,H0=xc,K0={message({keyword:e,schemaCode:t}){const r=e==="maxLength"?"more":"fewer";return(0,nn.str)`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>(0,nn._)`{limit: ${e}}`},W0={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:K0,code(e){const{keyword:t,data:r,schemaCode:o,it:n}=e,i=t==="maxLength"?nn.operators.GT:nn.operators.LT,a=n.opts.unicode===!1?(0,nn._)`${r}.length`:(0,nn._)`${(0,J0.useFunc)(e.gen,H0.default)}(${r})`;e.fail$data((0,nn._)`${a} ${i} ${o}`)}};Oc.default=W0;var Tc={};Object.defineProperty(Tc,"__esModule",{value:!0});const Y0=yt(),X0=Z,In=se,Q0={message:({schemaCode:e})=>(0,In.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,In._)`{pattern: ${e}}`},eI={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Q0,code(e){const{gen:t,data:r,$data:o,schema:n,schemaCode:i,it:a}=e,s=a.opts.unicodeRegExp?"u":"";if(o){const{regExp:c}=a.opts.code,u=c.code==="new RegExp"?(0,In._)`new RegExp`:(0,X0.useFunc)(t,c),l=t.let("valid");t.try(()=>t.assign(l,(0,In._)`${u}(${i}, ${s}).test(${r})`),()=>t.assign(l,!1)),e.fail$data((0,In._)`!${l}`)}else{const c=(0,Y0.usePattern)(e,n);e.fail$data((0,In._)`!${c}.test(${r})`)}}};Tc.default=eI;var Pc={};Object.defineProperty(Pc,"__esModule",{value:!0});const Sr=se,tI={message({keyword:e,schemaCode:t}){const r=e==="maxProperties"?"more":"fewer";return(0,Sr.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Sr._)`{limit: ${e}}`},nI={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:tI,code(e){const{keyword:t,data:r,schemaCode:o}=e,n=t==="maxProperties"?Sr.operators.GT:Sr.operators.LT;e.fail$data((0,Sr._)`Object.keys(${r}).length ${n} ${o}`)}};Pc.default=nI;var Ec={};Object.defineProperty(Ec,"__esModule",{value:!0});const wr=yt(),Ir=se,rI=Z,oI={message:({params:{missingProperty:e}})=>(0,Ir.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Ir._)`{missingProperty: ${e}}`},iI={keyword:"required",type:"object",schemaType:"array",$data:!0,error:oI,code(e){const{gen:t,schema:r,schemaCode:o,data:n,$data:i,it:a}=e,{opts:s}=a;if(!i&&r.length===0)return;const c=r.length>=s.loopRequired;if(a.allErrors?u():l(),s.strictRequired){const m=e.parentSchema.properties,{definedProperties:h}=e.it;for(const $ of r)if(m?.[$]===void 0&&!h.has($)){const g=a.schemaEnv.baseId+a.errSchemaPath,v=`required property "${$}" is not defined at "${g}" (strictRequired)`;(0,rI.checkStrictMode)(a,v,a.opts.strictRequired)}}function u(){if(c||i)e.block$data(Ir.nil,d);else for(const m of r)(0,wr.checkReportMissingProp)(e,m)}function l(){const m=t.let("missing");if(c||i){const h=t.let("valid",!0);e.block$data(h,()=>p(m,h)),e.ok(h)}else t.if((0,wr.checkMissingProp)(e,r,m)),(0,wr.reportMissingProp)(e,m),t.else()}function d(){t.forOf("prop",o,m=>{e.setParams({missingProperty:m}),t.if((0,wr.noPropertyInData)(t,n,m,s.ownProperties),()=>e.error())})}function p(m,h){e.setParams({missingProperty:m}),t.forOf(m,o,()=>{t.assign(h,(0,wr.propertyInData)(t,n,m,s.ownProperties)),t.if((0,Ir.not)(h),()=>{e.error(),t.break()})},Ir.nil)}}};Ec.default=iI;var zc={};Object.defineProperty(zc,"__esModule",{value:!0});const Or=se,aI={message({keyword:e,schemaCode:t}){const r=e==="maxItems"?"more":"fewer";return(0,Or.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Or._)`{limit: ${e}}`},sI={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:aI,code(e){const{keyword:t,data:r,schemaCode:o}=e,n=t==="maxItems"?Or.operators.GT:Or.operators.LT;e.fail$data((0,Or._)`${r}.length ${n} ${o}`)}};zc.default=sI;var Nc={},xr={};Object.defineProperty(xr,"__esModule",{value:!0});const Wg=_g;Wg.code='require("ajv/dist/runtime/equal").default',xr.default=Wg,Object.defineProperty(Nc,"__esModule",{value:!0});const jc=De,Be=se,cI=Z,uI=xr,lI={message:({params:{i:e,j:t}})=>(0,Be.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,Be._)`{i: ${e}, j: ${t}}`},dI={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:lI,code(e){const{gen:t,data:r,$data:o,schema:n,parentSchema:i,schemaCode:a,it:s}=e;if(!o&&!n)return;const c=t.let("valid"),u=i.items?(0,jc.getSchemaTypes)(i.items):[];e.block$data(c,l,(0,Be._)`${a} === false`),e.ok(c);function l(){const h=t.let("i",(0,Be._)`${r}.length`),$=t.let("j");e.setParams({i:h,j:$}),t.assign(c,!0),t.if((0,Be._)`${h} > 1`,()=>(d()?p:m)(h,$))}function d(){return u.length>0&&!u.some(h=>h==="object"||h==="array")}function p(h,$){const g=t.name("item"),v=(0,jc.checkDataTypes)(u,g,s.opts.strictNumbers,jc.DataType.Wrong),y=t.const("indices",(0,Be._)`{}`);t.for((0,Be._)`;${h}--;`,()=>{t.let(g,(0,Be._)`${r}[${h}]`),t.if(v,(0,Be._)`continue`),u.length>1&&t.if((0,Be._)`typeof ${g} == "string"`,(0,Be._)`${g} += "_"`),t.if((0,Be._)`typeof ${y}[${g}] == "number"`,()=>{t.assign($,(0,Be._)`${y}[${g}]`),e.error(),t.assign(c,!1).break()}).code((0,Be._)`${y}[${g}] = ${h}`)})}function m(h,$){const g=(0,cI.useFunc)(t,uI.default),v=t.name("outer");t.label(v).for((0,Be._)`;${h}--;`,()=>t.for((0,Be._)`${$} = ${h}; ${$}--;`,()=>t.if((0,Be._)`${g}(${r}[${h}], ${r}[${$}])`,()=>{e.error(),t.assign(c,!1).break(v)})))}}};Nc.default=dI;var Dc={};Object.defineProperty(Dc,"__esModule",{value:!0});const Cc=se,mI=Z,pI=xr,fI={message:"must be equal to constant",params:({schemaCode:e})=>(0,Cc._)`{allowedValue: ${e}}`},hI={keyword:"const",$data:!0,error:fI,code(e){const{gen:t,data:r,$data:o,schemaCode:n,schema:i}=e;o||i&&typeof i=="object"?e.fail$data((0,Cc._)`!${(0,mI.useFunc)(t,pI.default)}(${r}, ${n})`):e.fail((0,Cc._)`${i} !== ${r}`)}};Dc.default=hI;var Rc={};Object.defineProperty(Rc,"__esModule",{value:!0});const Tr=se,gI=Z,vI=xr,yI={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,Tr._)`{allowedValues: ${e}}`},_I={keyword:"enum",schemaType:"array",$data:!0,error:yI,code(e){const{gen:t,data:r,$data:o,schema:n,schemaCode:i,it:a}=e;if(!o&&n.length===0)throw new Error("enum must have non-empty array");const s=n.length>=a.opts.loopEnum;let c;const u=()=>c??(c=(0,gI.useFunc)(t,vI.default));let l;if(s||o)l=t.let("valid"),e.block$data(l,d);else{if(!Array.isArray(n))throw new Error("ajv implementation error");const m=t.const("vSchema",i);l=(0,Tr.or)(...n.map((h,$)=>p(m,$)))}e.pass(l);function d(){t.assign(l,!1),t.forOf("v",i,m=>t.if((0,Tr._)`${u()}(${r}, ${m})`,()=>t.assign(l,!0).break()))}function p(m,h){const $=n[h];return typeof $=="object"&&$!==null?(0,Tr._)`${u()}(${r}, ${m}[${h}])`:(0,Tr._)`${r} === ${$}`}}};Rc.default=_I,Object.defineProperty(Sc,"__esModule",{value:!0});const $I=wc,bI=Ic,kI=Oc,SI=Tc,wI=Pc,II=Ec,OI=zc,xI=Nc,TI=Dc,PI=Rc,EI=[$I.default,bI.default,kI.default,SI.default,wI.default,II.default,OI.default,xI.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},TI.default,PI.default];Sc.default=EI;var Ac={},On={};Object.defineProperty(On,"__esModule",{value:!0}),On.validateAdditionalItems=void 0;const rn=se,Uc=Z,zI={message:({params:{len:e}})=>(0,rn.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,rn._)`{limit: ${e}}`},NI={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:zI,code(e){const{parentSchema:t,it:r}=e,{items:o}=t;if(!Array.isArray(o)){(0,Uc.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Yg(e,o)}};function Yg(e,t){const{gen:r,schema:o,data:n,keyword:i,it:a}=e;a.items=!0;const s=r.const("len",(0,rn._)`${n}.length`);if(o===!1)e.setParams({len:t.length}),e.pass((0,rn._)`${s} <= ${t.length}`);else if(typeof o=="object"&&!(0,Uc.alwaysValidSchema)(a,o)){const u=r.var("valid",(0,rn._)`${s} <= ${t.length}`);r.if((0,rn.not)(u),()=>c(u)),e.ok(u)}function c(u){r.forRange("i",t.length,s,l=>{e.subschema({keyword:i,dataProp:l,dataPropType:Uc.Type.Num},u),a.allErrors||r.if((0,rn.not)(u),()=>r.break())})}}On.validateAdditionalItems=Yg,On.default=NI;var Zc={},xn={};Object.defineProperty(xn,"__esModule",{value:!0}),xn.validateTuple=void 0;const Xg=se,ui=Z,jI=yt(),DI={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return Qg(e,"additionalItems",t);r.items=!0,!(0,ui.alwaysValidSchema)(r,t)&&e.ok((0,jI.validateArray)(e))}};function Qg(e,t,r=e.schema){const{gen:o,parentSchema:n,data:i,keyword:a,it:s}=e;l(n),s.opts.unevaluated&&r.length&&s.items!==!0&&(s.items=ui.mergeEvaluated.items(o,r.length,s.items));const c=o.name("valid"),u=o.const("len",(0,Xg._)`${i}.length`);r.forEach((d,p)=>{(0,ui.alwaysValidSchema)(s,d)||(o.if((0,Xg._)`${u} > ${p}`,()=>e.subschema({keyword:a,schemaProp:p,dataProp:p},c)),e.ok(c))});function l(d){const{opts:p,errSchemaPath:m}=s,h=r.length,$=h===d.minItems&&(h===d.maxItems||d[t]===!1);if(p.strictTuples&&!$){const g=`"${a}" is ${h}-tuple, but minItems or maxItems/${t} are not specified or different at path "${m}"`;(0,ui.checkStrictMode)(s,g,p.strictTuples)}}}xn.validateTuple=Qg,xn.default=DI,Object.defineProperty(Zc,"__esModule",{value:!0});const CI=xn,RI={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,CI.validateTuple)(e,"items")};Zc.default=RI;var Mc={};Object.defineProperty(Mc,"__esModule",{value:!0});const ev=se,AI=Z,UI=yt(),ZI=On,MI={message:({params:{len:e}})=>(0,ev.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,ev._)`{limit: ${e}}`},BI={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:MI,code(e){const{schema:t,parentSchema:r,it:o}=e,{prefixItems:n}=r;o.items=!0,!(0,AI.alwaysValidSchema)(o,t)&&(n?(0,ZI.validateAdditionalItems)(e,n):e.ok((0,UI.validateArray)(e)))}};Mc.default=BI;var Bc={};Object.defineProperty(Bc,"__esModule",{value:!0});const pt=se,li=Z,LI={message:({params:{min:e,max:t}})=>t===void 0?(0,pt.str)`must contain at least ${e} valid item(s)`:(0,pt.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,pt._)`{minContains: ${e}}`:(0,pt._)`{minContains: ${e}, maxContains: ${t}}`},FI={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:LI,code(e){const{gen:t,schema:r,parentSchema:o,data:n,it:i}=e;let a,s;const{minContains:c,maxContains:u}=o;i.opts.next?(a=c===void 0?1:c,s=u):a=1;const l=t.const("len",(0,pt._)`${n}.length`);if(e.setParams({min:a,max:s}),s===void 0&&a===0){(0,li.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(s!==void 0&&a>s){(0,li.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,li.alwaysValidSchema)(i,r)){let $=(0,pt._)`${l} >= ${a}`;s!==void 0&&($=(0,pt._)`${$} && ${l} <= ${s}`),e.pass($);return}i.items=!0;const d=t.name("valid");s===void 0&&a===1?m(d,()=>t.if(d,()=>t.break())):a===0?(t.let(d,!0),s!==void 0&&t.if((0,pt._)`${n}.length > 0`,p)):(t.let(d,!1),p()),e.result(d,()=>e.reset());function p(){const $=t.name("_valid"),g=t.let("count",0);m($,()=>t.if($,()=>h(g)))}function m($,g){t.forRange("i",0,l,v=>{e.subschema({keyword:"contains",dataProp:v,dataPropType:li.Type.Num,compositeRule:!0},$),g()})}function h($){t.code((0,pt._)`${$}++`),s===void 0?t.if((0,pt._)`${$} >= ${a}`,()=>t.assign(d,!0).break()):(t.if((0,pt._)`${$} > ${s}`,()=>t.assign(d,!1).break()),a===1?t.assign(d,!0):t.if((0,pt._)`${$} >= ${a}`,()=>t.assign(d,!0)))}}};Bc.default=FI;var tv={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=se,r=Z,o=yt();e.error={message:({params:{property:c,depsCount:u,deps:l}})=>{const d=u===1?"property":"properties";return(0,t.str)`must have ${d} ${l} when property ${c} is present`},params:({params:{property:c,depsCount:u,deps:l,missingProperty:d}})=>(0,t._)`{property: ${c},
|
|
75
|
+
missingProperty: ${d},
|
|
76
|
+
depsCount: ${u},
|
|
77
|
+
deps: ${l}}`};const n={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){const[u,l]=i(c);a(c,u),s(c,l)}};function i({schema:c}){const u={},l={};for(const d in c){if(d==="__proto__")continue;const p=Array.isArray(c[d])?u:l;p[d]=c[d]}return[u,l]}function a(c,u=c.schema){const{gen:l,data:d,it:p}=c;if(Object.keys(u).length===0)return;const m=l.let("missing");for(const h in u){const $=u[h];if($.length===0)continue;const g=(0,o.propertyInData)(l,d,h,p.opts.ownProperties);c.setParams({property:h,depsCount:$.length,deps:$.join(", ")}),p.allErrors?l.if(g,()=>{for(const v of $)(0,o.checkReportMissingProp)(c,v)}):(l.if((0,t._)`${g} && (${(0,o.checkMissingProp)(c,$,m)})`),(0,o.reportMissingProp)(c,m),l.else())}}e.validatePropertyDeps=a;function s(c,u=c.schema){const{gen:l,data:d,keyword:p,it:m}=c,h=l.name("valid");for(const $ in u)(0,r.alwaysValidSchema)(m,u[$])||(l.if((0,o.propertyInData)(l,d,$,m.opts.ownProperties),()=>{const g=c.subschema({keyword:p,schemaProp:$},h);c.mergeValidEvaluated(g,h)},()=>l.var(h,!0)),c.ok(h))}e.validateSchemaDeps=s,e.default=n})(tv);var Lc={};Object.defineProperty(Lc,"__esModule",{value:!0});const nv=se,GI=Z,VI={message:"property name must be valid",params:({params:e})=>(0,nv._)`{propertyName: ${e.propertyName}}`},qI={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:VI,code(e){const{gen:t,schema:r,data:o,it:n}=e;if((0,GI.alwaysValidSchema)(n,r))return;const i=t.name("valid");t.forIn("key",o,a=>{e.setParams({propertyName:a}),e.subschema({keyword:"propertyNames",data:a,dataTypes:["string"],propertyName:a,compositeRule:!0},i),t.if((0,nv.not)(i),()=>{e.error(!0),n.allErrors||t.break()})}),e.ok(i)}};Lc.default=qI;var di={};Object.defineProperty(di,"__esModule",{value:!0});const mi=yt(),bt=se,JI=At(),pi=Z,HI={message:"must NOT have additional properties",params:({params:e})=>(0,bt._)`{additionalProperty: ${e.additionalProperty}}`},KI={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:HI,code(e){const{gen:t,schema:r,parentSchema:o,data:n,errsCount:i,it:a}=e;if(!i)throw new Error("ajv implementation error");const{allErrors:s,opts:c}=a;if(a.props=!0,c.removeAdditional!=="all"&&(0,pi.alwaysValidSchema)(a,r))return;const u=(0,mi.allSchemaProperties)(o.properties),l=(0,mi.allSchemaProperties)(o.patternProperties);d(),e.ok((0,bt._)`${i} === ${JI.default.errors}`);function d(){t.forIn("key",n,g=>{!u.length&&!l.length?h(g):t.if(p(g),()=>h(g))})}function p(g){let v;if(u.length>8){const y=(0,pi.schemaRefOrVal)(a,o.properties,"properties");v=(0,mi.isOwnProperty)(t,y,g)}else u.length?v=(0,bt.or)(...u.map(y=>(0,bt._)`${g} === ${y}`)):v=bt.nil;return l.length&&(v=(0,bt.or)(v,...l.map(y=>(0,bt._)`${(0,mi.usePattern)(e,y)}.test(${g})`))),(0,bt.not)(v)}function m(g){t.code((0,bt._)`delete ${n}[${g}]`)}function h(g){if(c.removeAdditional==="all"||c.removeAdditional&&r===!1){m(g);return}if(r===!1){e.setParams({additionalProperty:g}),e.error(),s||t.break();return}if(typeof r=="object"&&!(0,pi.alwaysValidSchema)(a,r)){const v=t.name("valid");c.removeAdditional==="failing"?($(g,v,!1),t.if((0,bt.not)(v),()=>{e.reset(),m(g)})):($(g,v),s||t.if((0,bt.not)(v),()=>t.break()))}}function $(g,v,y){const b={keyword:"additionalProperties",dataProp:g,dataPropType:pi.Type.Str};y===!1&&Object.assign(b,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(b,v)}}};di.default=KI;var Fc={};Object.defineProperty(Fc,"__esModule",{value:!0});const WI=Wo(),rv=yt(),Gc=Z,ov=di,YI={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:o,data:n,it:i}=e;i.opts.removeAdditional==="all"&&o.additionalProperties===void 0&&ov.default.code(new WI.KeywordCxt(i,ov.default,"additionalProperties"));const a=(0,rv.allSchemaProperties)(r);for(const d of a)i.definedProperties.add(d);i.opts.unevaluated&&a.length&&i.props!==!0&&(i.props=Gc.mergeEvaluated.props(t,(0,Gc.toHash)(a),i.props));const s=a.filter(d=>!(0,Gc.alwaysValidSchema)(i,r[d]));if(s.length===0)return;const c=t.name("valid");for(const d of s)u(d)?l(d):(t.if((0,rv.propertyInData)(t,n,d,i.opts.ownProperties)),l(d),i.allErrors||t.else().var(c,!0),t.endIf()),e.it.definedProperties.add(d),e.ok(c);function u(d){return i.opts.useDefaults&&!i.compositeRule&&r[d].default!==void 0}function l(d){e.subschema({keyword:"properties",schemaProp:d,dataProp:d},c)}}};Fc.default=YI;var Vc={};Object.defineProperty(Vc,"__esModule",{value:!0});const iv=yt(),fi=se,av=Z,sv=Z,XI={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:o,parentSchema:n,it:i}=e,{opts:a}=i,s=(0,iv.allSchemaProperties)(r),c=s.filter($=>(0,av.alwaysValidSchema)(i,r[$]));if(s.length===0||c.length===s.length&&(!i.opts.unevaluated||i.props===!0))return;const u=a.strictSchema&&!a.allowMatchingProperties&&n.properties,l=t.name("valid");i.props!==!0&&!(i.props instanceof fi.Name)&&(i.props=(0,sv.evaluatedPropsToName)(t,i.props));const{props:d}=i;p();function p(){for(const $ of s)u&&m($),i.allErrors?h($):(t.var(l,!0),h($),t.if(l))}function m($){for(const g in u)new RegExp($).test(g)&&(0,av.checkStrictMode)(i,`property ${g} matches pattern ${$} (use allowMatchingProperties)`)}function h($){t.forIn("key",o,g=>{t.if((0,fi._)`${(0,iv.usePattern)(e,$)}.test(${g})`,()=>{const v=c.includes($);v||e.subschema({keyword:"patternProperties",schemaProp:$,dataProp:g,dataPropType:sv.Type.Str},l),i.opts.unevaluated&&d!==!0?t.assign((0,fi._)`${d}[${g}]`,!0):!v&&!i.allErrors&&t.if((0,fi.not)(l),()=>t.break())})})}}};Vc.default=XI;var qc={};Object.defineProperty(qc,"__esModule",{value:!0});const QI=Z,eO={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:o}=e;if((0,QI.alwaysValidSchema)(o,r)){e.fail();return}const n=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},n),e.failResult(n,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};qc.default=eO;var Jc={};Object.defineProperty(Jc,"__esModule",{value:!0});const tO=yt(),nO={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:tO.validateUnion,error:{message:"must match a schema in anyOf"}};Jc.default=nO;var Hc={};Object.defineProperty(Hc,"__esModule",{value:!0});const hi=se,rO=Z,oO={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,hi._)`{passingSchemas: ${e.passing}}`},iO={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:oO,code(e){const{gen:t,schema:r,parentSchema:o,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(n.opts.discriminator&&o.discriminator)return;const i=r,a=t.let("valid",!1),s=t.let("passing",null),c=t.name("_valid");e.setParams({passing:s}),t.block(u),e.result(a,()=>e.reset(),()=>e.error(!0));function u(){i.forEach((l,d)=>{let p;(0,rO.alwaysValidSchema)(n,l)?t.var(c,!0):p=e.subschema({keyword:"oneOf",schemaProp:d,compositeRule:!0},c),d>0&&t.if((0,hi._)`${c} && ${a}`).assign(a,!1).assign(s,(0,hi._)`[${s}, ${d}]`).else(),t.if(c,()=>{t.assign(a,!0),t.assign(s,d),p&&e.mergeEvaluated(p,hi.Name)})})}}};Hc.default=iO;var Kc={};Object.defineProperty(Kc,"__esModule",{value:!0});const aO=Z,sO={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const n=t.name("valid");r.forEach((i,a)=>{if((0,aO.alwaysValidSchema)(o,i))return;const s=e.subschema({keyword:"allOf",schemaProp:a},n);e.ok(n),e.mergeEvaluated(s)})}};Kc.default=sO;var Wc={};Object.defineProperty(Wc,"__esModule",{value:!0});const gi=se,cv=Z,cO={message:({params:e})=>(0,gi.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,gi._)`{failingKeyword: ${e.ifClause}}`},uO={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:cO,code(e){const{gen:t,parentSchema:r,it:o}=e;r.then===void 0&&r.else===void 0&&(0,cv.checkStrictMode)(o,'"if" without "then" and "else" is ignored');const n=uv(o,"then"),i=uv(o,"else");if(!n&&!i)return;const a=t.let("valid",!0),s=t.name("_valid");if(c(),e.reset(),n&&i){const l=t.let("ifClause");e.setParams({ifClause:l}),t.if(s,u("then",l),u("else",l))}else n?t.if(s,u("then")):t.if((0,gi.not)(s),u("else"));e.pass(a,()=>e.error(!0));function c(){const l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},s);e.mergeEvaluated(l)}function u(l,d){return()=>{const p=e.subschema({keyword:l},s);t.assign(a,s),e.mergeValidEvaluated(p,a),d?t.assign(d,(0,gi._)`${l}`):e.setParams({ifClause:l})}}}};function uv(e,t){const r=e.schema[t];return r!==void 0&&!(0,cv.alwaysValidSchema)(e,r)}Wc.default=uO;var Yc={};Object.defineProperty(Yc,"__esModule",{value:!0});const lO=Z,dO={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,lO.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Yc.default=dO,Object.defineProperty(Ac,"__esModule",{value:!0});const mO=On,pO=Zc,fO=xn,hO=Mc,gO=Bc,vO=tv,yO=Lc,_O=di,$O=Fc,bO=Vc,kO=qc,SO=Jc,wO=Hc,IO=Kc,OO=Wc,xO=Yc;function TO(e=!1){const t=[kO.default,SO.default,wO.default,IO.default,OO.default,xO.default,yO.default,_O.default,vO.default,$O.default,bO.default];return e?t.push(pO.default,hO.default):t.push(mO.default,fO.default),t.push(gO.default),t}Ac.default=TO;var Xc={},Qc={};Object.defineProperty(Qc,"__esModule",{value:!0});const ze=se,PO={message:({schemaCode:e})=>(0,ze.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,ze._)`{format: ${e}}`},EO={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:PO,code(e,t){const{gen:r,data:o,$data:n,schema:i,schemaCode:a,it:s}=e,{opts:c,errSchemaPath:u,schemaEnv:l,self:d}=s;if(!c.validateFormats)return;n?p():m();function p(){const h=r.scopeValue("formats",{ref:d.formats,code:c.code.formats}),$=r.const("fDef",(0,ze._)`${h}[${a}]`),g=r.let("fType"),v=r.let("format");r.if((0,ze._)`typeof ${$} == "object" && !(${$} instanceof RegExp)`,()=>r.assign(g,(0,ze._)`${$}.type || "string"`).assign(v,(0,ze._)`${$}.validate`),()=>r.assign(g,(0,ze._)`"string"`).assign(v,$)),e.fail$data((0,ze.or)(y(),b()));function y(){return c.strictSchema===!1?ze.nil:(0,ze._)`${a} && !${v}`}function b(){const I=l.$async?(0,ze._)`(${$}.async ? await ${v}(${o}) : ${v}(${o}))`:(0,ze._)`${v}(${o})`,P=(0,ze._)`(typeof ${v} == "function" ? ${I} : ${v}.test(${o}))`;return(0,ze._)`${v} && ${v} !== true && ${g} === ${t} && !${P}`}}function m(){const h=d.formats[i];if(!h){y();return}if(h===!0)return;const[$,g,v]=b(h);$===t&&e.pass(I());function y(){if(c.strictSchema===!1){d.logger.warn(P());return}throw new Error(P());function P(){return`unknown format "${i}" ignored in schema at path "${u}"`}}function b(P){const M=P instanceof RegExp?(0,ze.regexpCode)(P):c.code.formats?(0,ze._)`${c.code.formats}${(0,ze.getProperty)(i)}`:void 0,G=r.scopeValue("formats",{key:i,ref:P,code:M});return typeof P=="object"&&!(P instanceof RegExp)?[P.type||"string",P.validate,(0,ze._)`${G}.validate`]:["string",P,G]}function I(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!l.$async)throw new Error("async format in sync schema");return(0,ze._)`await ${v}(${o})`}return typeof g=="function"?(0,ze._)`${v}(${o})`:(0,ze._)`${v}.test(${o})`}}}};Qc.default=EO,Object.defineProperty(Xc,"__esModule",{value:!0});const zO=Qc,NO=[zO.default];Xc.default=NO;var Tn={};Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.contentVocabulary=Tn.metadataVocabulary=void 0,Tn.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Tn.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"],Object.defineProperty($c,"__esModule",{value:!0});const jO=bc,DO=Sc,CO=Ac,RO=Xc,lv=Tn,AO=[jO.default,DO.default,(0,CO.default)(),RO.default,lv.metadataVocabulary,lv.contentVocabulary];$c.default=AO;var eu={},vi={};Object.defineProperty(vi,"__esModule",{value:!0}),vi.DiscrError=void 0;var dv;(function(e){e.Tag="tag",e.Mapping="mapping"})(dv||(vi.DiscrError=dv={})),Object.defineProperty(eu,"__esModule",{value:!0});const Pn=se,tu=vi,mv=Xe,UO=Qo(),ZO=Z,MO={message:({params:{discrError:e,tagName:t}})=>e===tu.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Pn._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},BO={keyword:"discriminator",type:"object",schemaType:"object",error:MO,code(e){const{gen:t,data:r,schema:o,parentSchema:n,it:i}=e,{oneOf:a}=n;if(!i.opts.discriminator)throw new Error("discriminator: requires discriminator option");const s=o.propertyName;if(typeof s!="string")throw new Error("discriminator: requires propertyName");if(o.mapping)throw new Error("discriminator: mapping is not supported");if(!a)throw new Error("discriminator: requires oneOf keyword");const c=t.let("valid",!1),u=t.const("tag",(0,Pn._)`${r}${(0,Pn.getProperty)(s)}`);t.if((0,Pn._)`typeof ${u} == "string"`,()=>l(),()=>e.error(!1,{discrError:tu.DiscrError.Tag,tag:u,tagName:s})),e.ok(c);function l(){const m=p();t.if(!1);for(const h in m)t.elseIf((0,Pn._)`${u} === ${h}`),t.assign(c,d(m[h]));t.else(),e.error(!1,{discrError:tu.DiscrError.Mapping,tag:u,tagName:s}),t.endIf()}function d(m){const h=t.name("valid"),$=e.subschema({keyword:"oneOf",schemaProp:m},h);return e.mergeEvaluated($,Pn.Name),h}function p(){var m;const h={},$=v(n);let g=!0;for(let I=0;I<a.length;I++){let P=a[I];if(P?.$ref&&!(0,ZO.schemaHasRulesButRef)(P,i.self.RULES)){const G=P.$ref;if(P=mv.resolveRef.call(i.self,i.schemaEnv.root,i.baseId,G),P instanceof mv.SchemaEnv&&(P=P.schema),P===void 0)throw new UO.default(i.opts.uriResolver,i.baseId,G)}const M=(m=P?.properties)===null||m===void 0?void 0:m[s];if(typeof M!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${s}"`);g=g&&($||v(P)),y(M,I)}if(!g)throw new Error(`discriminator: "${s}" must be required`);return h;function v({required:I}){return Array.isArray(I)&&I.includes(s)}function y(I,P){if(I.const)b(I.const,P);else if(I.enum)for(const M of I.enum)b(M,P);else throw new Error(`discriminator: "properties/${s}" must have "const" or "enum"`)}function b(I,P){if(typeof I!="string"||I in h)throw new Error(`discriminator: "${s}" values must be unique strings`);h[I]=P}}}};eu.default=BO;var LO="http://json-schema.org/draft-07/schema#",FO="http://json-schema.org/draft-07/schema#",GO="Core schema meta-schema",VO={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:[]}},qO=["object","boolean"],JO={$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:"#"}},HO={$schema:LO,$id:FO,title:GO,definitions:VO,type:qO,properties:JO,default:!0};(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=Qh,o=$c,n=eu,i=HO,a=["/properties"],s="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),o.default.forEach(h=>this.addVocabulary(h)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const h=this.opts.$data?this.$dataMetaSchema(i,a):i;this.addMetaSchema(h,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var u=Wo();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var l=se;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var d=pc();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var p=Qo();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return p.default}})})(rc,rc.exports);var pv=rc.exports,KO=Xh(pv),nu={exports:{}},fv={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(B,Q){return{validate:B,compare:Q}}e.fullFormats={date:t(i,a),time:t(c(!0),u),"date-time":t(p(!0),m),"iso-time":t(c(),l),"iso-date-time":t(p(),h),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:v,"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:Pe,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:b,int32:{type:"number",validate:M},int64:{type:"number",validate:G},float:{type:"number",validate:ue},double:{type:"number",validate:ue},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,m),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,l),"iso-date-time":t(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,h),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 r(B){return B%4===0&&(B%100!==0||B%400===0)}const o=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function i(B){const Q=o.exec(B);if(!Q)return!1;const Y=+Q[1],H=+Q[2],Ee=+Q[3];return H>=1&&H<=12&&Ee>=1&&Ee<=(H===2&&r(Y)?29:n[H])}function a(B,Q){if(B&&Q)return B>Q?1:B<Q?-1:0}const s=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(B){return function(Y){const H=s.exec(Y);if(!H)return!1;const Ee=+H[1],it=+H[2],at=+H[3],Lt=H[4],Ot=H[5]==="-"?-1:1,R=+(H[6]||0),O=+(H[7]||0);if(R>23||O>59||B&&!Lt)return!1;if(Ee<=23&&it<=59&&at<60)return!0;const j=it-O*Ot,T=Ee-R*Ot-(j<0?1:0);return(T===23||T===-1)&&(j===59||j===-1)&&at<61}}function u(B,Q){if(!(B&&Q))return;const Y=new Date("2020-01-01T"+B).valueOf(),H=new Date("2020-01-01T"+Q).valueOf();if(Y&&H)return Y-H}function l(B,Q){if(!(B&&Q))return;const Y=s.exec(B),H=s.exec(Q);if(Y&&H)return B=Y[1]+Y[2]+Y[3],Q=H[1]+H[2]+H[3],B>Q?1:B<Q?-1:0}const d=/t|\s/i;function p(B){const Q=c(B);return function(H){const Ee=H.split(d);return Ee.length===2&&i(Ee[0])&&Q(Ee[1])}}function m(B,Q){if(!(B&&Q))return;const Y=new Date(B).valueOf(),H=new Date(Q).valueOf();if(Y&&H)return Y-H}function h(B,Q){if(!(B&&Q))return;const[Y,H]=B.split(d),[Ee,it]=Q.split(d),at=a(Y,Ee);if(at!==void 0)return at||u(H,it)}const $=/\/|:/,g=/^(?:[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 v(B){return $.test(B)&&g.test(B)}const y=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function b(B){return y.lastIndex=0,y.test(B)}const I=-2147483648,P=2**31-1;function M(B){return Number.isInteger(B)&&B<=P&&B>=I}function G(B){return Number.isInteger(B)}function ue(){return!0}const pe=/[^\\]\\Z/;function Pe(B){if(pe.test(B))return!1;try{return new RegExp(B),!0}catch{return!1}}})(fv);var hv={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;const t=pv,r=se,o=r.operators,n={formatMaximum:{okStr:"<=",ok:o.LTE,fail:o.GT},formatMinimum:{okStr:">=",ok:o.GTE,fail:o.LT},formatExclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},formatExclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},i={message:({keyword:s,schemaCode:c})=>(0,r.str)`should be ${n[s].okStr} ${c}`,params:({keyword:s,schemaCode:c})=>(0,r._)`{comparison: ${n[s].okStr}, limit: ${c}}`};e.formatLimitDefinition={keyword:Object.keys(n),type:"string",schemaType:"string",$data:!0,error:i,code(s){const{gen:c,data:u,schemaCode:l,keyword:d,it:p}=s,{opts:m,self:h}=p;if(!m.validateFormats)return;const $=new t.KeywordCxt(p,h.RULES.all.format.definition,"format");$.$data?g():v();function g(){const b=c.scopeValue("formats",{ref:h.formats,code:m.code.formats}),I=c.const("fmt",(0,r._)`${b}[${$.schemaCode}]`);s.fail$data((0,r.or)((0,r._)`typeof ${I} != "object"`,(0,r._)`${I} instanceof RegExp`,(0,r._)`typeof ${I}.compare != "function"`,y(I)))}function v(){const b=$.schema,I=h.formats[b];if(!I||I===!0)return;if(typeof I!="object"||I instanceof RegExp||typeof I.compare!="function")throw new Error(`"${d}": format "${b}" does not define "compare" function`);const P=c.scopeValue("formats",{key:b,ref:I,code:m.code.formats?(0,r._)`${m.code.formats}${(0,r.getProperty)(b)}`:void 0});s.fail$data(y(P))}function y(b){return(0,r._)`${b}.compare(${u}, ${l}) ${n[d].fail} 0`}},dependencies:["format"]};const a=s=>(s.addKeyword(e.formatLimitDefinition),s);e.default=a})(hv),(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r=fv,o=hv,n=se,i=new n.Name("fullFormats"),a=new n.Name("fastFormats"),s=(u,l={keywords:!0})=>{if(Array.isArray(l))return c(u,l,r.fullFormats,i),u;const[d,p]=l.mode==="fast"?[r.fastFormats,a]:[r.fullFormats,i],m=l.formats||r.formatNames;return c(u,m,d,p),l.keywords&&(0,o.default)(u),u};s.get=(u,l="full")=>{const p=(l==="fast"?r.fastFormats:r.fullFormats)[u];if(!p)throw new Error(`Unknown format "${u}"`);return p};function c(u,l,d,p){var m,h;(m=(h=u.opts.code).formats)!==null&&m!==void 0||(h.formats=(0,n._)`require("ajv-formats/dist/formats").${p}`);for(const $ of l)u.addFormat($,d[$])}e.exports=t=s,Object.defineProperty(t,"__esModule",{value:!0}),t.default=s})(nu,nu.exports);var WO=nu.exports,YO=Xh(WO);function XO(){const e=new KO({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return YO(e),e}class QO{constructor(t){this._ajv=t??XO()}getValidator(t){const r="$id"in t&&typeof t.$id=="string"?this._ajv.getSchema(t.$id)??this._ajv.compile(t):this._ajv.compile(t);return o=>r(o)?{valid:!0,data:o,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(r.errors)}}}class ex{constructor(t){this._server=t}requestStream(t,r,o){return this._server.requestStream(t,r,o)}createMessageStream(t,r){const o=this._server.getClientCapabilities();if((t.tools||t.toolChoice)&&!o?.sampling?.tools)throw new Error("Client does not support sampling tools capability.");if(t.messages.length>0){const n=t.messages[t.messages.length-1],i=Array.isArray(n.content)?n.content:[n.content],a=i.some(l=>l.type==="tool_result"),s=t.messages.length>1?t.messages[t.messages.length-2]:void 0,c=s?Array.isArray(s.content)?s.content:[s.content]:[],u=c.some(l=>l.type==="tool_use");if(a){if(i.some(l=>l.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!u)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(u){const l=new Set(c.filter(p=>p.type==="tool_use").map(p=>p.id)),d=new Set(i.filter(p=>p.type==="tool_result").map(p=>p.toolUseId));if(l.size!==d.size||![...l].every(p=>d.has(p)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return this.requestStream({method:"sampling/createMessage",params:t},Qs,r)}elicitInputStream(t,r){const o=this._server.getClientCapabilities(),n=t.mode??"form";switch(n){case"url":{if(!o?.elicitation?.url)throw new Error("Client does not support url elicitation.");break}case"form":{if(!o?.elicitation?.form)throw new Error("Client does not support form elicitation.");break}}const i=n==="form"&&t.mode===void 0?{...t,mode:"form"}:t;return this.requestStream({method:"elicitation/create",params:i},Vo,r)}async getTask(t,r){return this._server.getTask({taskId:t},r)}async getTaskResult(t,r,o){return this._server.getTaskResult({taskId:t},r,o)}async listTasks(t,r){return this._server.listTasks(t?{cursor:t}:void 0,r)}async cancelTask(t,r){return this._server.cancelTask({taskId:t},r)}}function tx(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"tools/call":if(!e.tools?.call)throw new Error(`${r} does not support task creation for tools/call (required for ${t})`);break}}function nx(e,t,r){if(!e)throw new Error(`${r} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${r} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${r} does not support task creation for elicitation/create (required for ${t})`);break}}class rx extends qS{constructor(t,r){super(r),this._serverInfo=t,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(Fo.options.map((o,n)=>[o,n])),this.isMessageIgnored=(o,n)=>{const i=this._loggingLevels.get(n);return i?this.LOG_LEVEL_SEVERITY.get(o)<this.LOG_LEVEL_SEVERITY.get(i):!1},this._capabilities=r?.capabilities??{},this._instructions=r?.instructions,this._jsonSchemaValidator=r?.jsonSchemaValidator??new QO,this.setRequestHandler(Ph,o=>this._oninitialize(o)),this.setNotificationHandler(Eh,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(Rh,async(o,n)=>{const i=n.sessionId||n.requestInfo?.headers["mcp-session-id"]||void 0,{level:a}=o.params,s=Fo.safeParse(a);return s.success&&this._loggingLevels.set(i,s.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new ex(this)}),this._experimental}registerCapabilities(t){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=JS(this._capabilities,t)}setRequestHandler(t,r){const n=dr(t)?.method;if(!n)throw new Error("Schema is missing a method literal");let i;if(wt(n)){const s=n;i=s._zod?.def?.value??s.value}else{const s=n;i=s._def?.value??s.value}if(typeof i!="string")throw new Error("Schema method literal must be a string");if(i==="tools/call"){const s=async(c,u)=>{const l=lr(Lo,c);if(!l.success){const h=l.error instanceof Error?l.error.message:String(l.error);throw new q(W.InvalidParams,`Invalid tools/call request: ${h}`)}const{params:d}=l.data,p=await Promise.resolve(r(c,u));if(d.task){const h=lr(Mo,p);if(!h.success){const $=h.error instanceof Error?h.error.message:String(h.error);throw new q(W.InvalidParams,`Invalid task creation result: ${$}`)}return h.data}const m=lr(Xs,p);if(!m.success){const h=m.error instanceof Error?m.error.message:String(m.error);throw new q(W.InvalidParams,`Invalid tools/call result: ${h}`)}return m.data};return super.setRequestHandler(t,s)}return super.setRequestHandler(t,r)}assertCapabilityForMethod(t){switch(t){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new Error(`Client does not support sampling (required for ${t})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new Error(`Client does not support elicitation (required for ${t})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new Error(`Client does not support listing roots (required for ${t})`);break}}assertNotificationCapability(t){switch(t){case"notifications/message":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new Error(`Server does not support notifying about resources (required for ${t})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new Error(`Server does not support notifying of tool list changes (required for ${t})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new Error(`Server does not support notifying of prompt list changes (required for ${t})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new Error(`Client does not support URL elicitation (required for ${t})`);break}}assertRequestHandlerCapability(t){if(this._capabilities)switch(t){case"completion/complete":if(!this._capabilities.completions)throw new Error(`Server does not support completions (required for ${t})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${t})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new Error(`Server does not support prompts (required for ${t})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new Error(`Server does not support resources (required for ${t})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new Error(`Server does not support tools (required for ${t})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Server does not support tasks capability (required for ${t})`);break}}assertTaskCapability(t){nx(this._clientCapabilities?.tasks?.requests,t,"Client")}assertTaskHandlerCapability(t){this._capabilities&&tx(this._capabilities.tasks?.requests,t,"Server")}async _oninitialize(t){const r=t.params.protocolVersion;return this._clientCapabilities=t.params.capabilities,this._clientVersion=t.params.clientInfo,{protocolVersion:Ib.includes(r)?r:kh,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},Es)}async createMessage(t,r){if((t.tools||t.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new Error("Client does not support sampling tools capability.");if(t.messages.length>0){const o=t.messages[t.messages.length-1],n=Array.isArray(o.content)?o.content:[o.content],i=n.some(u=>u.type==="tool_result"),a=t.messages.length>1?t.messages[t.messages.length-2]:void 0,s=a?Array.isArray(a.content)?a.content:[a.content]:[],c=s.some(u=>u.type==="tool_use");if(i){if(n.some(u=>u.type!=="tool_result"))throw new Error("The last message must contain only tool_result content if any is present");if(!c)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(c){const u=new Set(s.filter(d=>d.type==="tool_use").map(d=>d.id)),l=new Set(n.filter(d=>d.type==="tool_result").map(d=>d.toolUseId));if(u.size!==l.size||![...u].every(d=>l.has(d)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return t.tools?this.request({method:"sampling/createMessage",params:t},Ah,r):this.request({method:"sampling/createMessage",params:t},Qs,r)}async elicitInput(t,r){switch(t.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support url elicitation.");const n=t;return this.request({method:"elicitation/create",params:n},Vo,r)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw new Error("Client does not support form elicitation.");const n=t.mode==="form"?t:{...t,mode:"form"},i=await this.request({method:"elicitation/create",params:n},Vo,r);if(i.action==="accept"&&i.content&&n.requestedSchema)try{const s=this._jsonSchemaValidator.getValidator(n.requestedSchema)(i.content);if(!s.valid)throw new q(W.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(a){throw a instanceof q?a:new q(W.InternalError,`Error validating elicitation response: ${a instanceof Error?a.message:String(a)}`)}return i}}}createElicitationCompletionNotifier(t,r){if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:t}},r)}async listRoots(t,r){return this.request({method:"roots/list",params:t},Uh,r)}async sendLoggingMessage(t,r){if(this._capabilities.logging&&!this.isMessageIgnored(t.level,r))return this.notification({method:"notifications/message",params:t})}async sendResourceUpdated(t){return this.notification({method:"notifications/resources/updated",params:t})}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"})}}const gv=Symbol.for("mcp.completable");function vv(e){return!!e&&typeof e=="object"&&gv in e}function ox(e){return e[gv]?.complete}var yv;(function(e){e.Completable="McpCompletable"})(yv||(yv={}));const ix=/^[A-Za-z0-9._-]{1,128}$/;function ax(e){const 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"),!ix.test(e)){const r=e.split("").filter(o=>!/[A-Za-z0-9._-]/.test(o)).filter((o,n,i)=>i.indexOf(o)===n);return t.push(`Tool name contains invalid characters: ${r.map(o=>`"${o}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}function sx(e,t){if(t.length>0){console.warn(`Tool name validation warning for "${e}":`);for(const r of t)console.warn(` - ${r}`);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 _v(e){const t=ax(e);return sx(e,t.warnings),t.isValid}class cx{constructor(t){this._mcpServer=t}registerToolTask(t,r,o){const n={taskSupport:"required",...r.execution};if(n.taskSupport==="forbidden")throw new Error(`Cannot register task-based tool '${t}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool(t,r.title,r.description,r.inputSchema,r.outputSchema,r.annotations,n,r._meta,o)}}class ux{constructor(t,r){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new rx(t,r)}get experimental(){return this._experimental||(this._experimental={tasks:new cx(this)}),this._experimental}async connect(t){return await this.server.connect(t)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(Mt(Ys)),this.server.assertCanSetRequestHandler(Mt(Lo)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(Ys,()=>({tools:Object.entries(this._registeredTools).filter(([,t])=>t.enabled).map(([t,r])=>{const o={name:t,title:r.title,description:r.description,inputSchema:(()=>{const n=mr(r.inputSchema);return n?Hh(n,{strictUnions:!0,pipeStrategy:"input"}):lx})(),annotations:r.annotations,execution:r.execution,_meta:r._meta};if(r.outputSchema){const n=mr(r.outputSchema);n&&(o.outputSchema=Hh(n,{strictUnions:!0,pipeStrategy:"output"}))}return o})})),this.server.setRequestHandler(Lo,async(t,r)=>{try{const o=this._registeredTools[t.params.name];if(!o)throw new q(W.InvalidParams,`Tool ${t.params.name} not found`);if(!o.enabled)throw new q(W.InvalidParams,`Tool ${t.params.name} disabled`);const n=!!t.params.task,i=o.execution?.taskSupport,a="createTask"in o.handler;if((i==="required"||i==="optional")&&!a)throw new q(W.InternalError,`Tool ${t.params.name} has taskSupport '${i}' but was not registered with registerToolTask`);if(i==="required"&&!n)throw new q(W.MethodNotFound,`Tool ${t.params.name} requires task augmentation (taskSupport: 'required')`);if(i==="optional"&&!n&&a)return await this.handleAutomaticTaskPolling(o,t,r);const s=await this.validateToolInput(o,t.params.arguments,t.params.name),c=await this.executeToolHandler(o,s,r);return n||await this.validateToolOutput(o,c,t.params.name),c}catch(o){if(o instanceof q&&o.code===W.UrlElicitationRequired)throw o;return this.createToolError(o instanceof Error?o.message:String(o))}}),this._toolHandlersInitialized=!0)}createToolError(t){return{content:[{type:"text",text:t}],isError:!0}}async validateToolInput(t,r,o){if(!t.inputSchema)return;const i=mr(t.inputSchema)??t.inputSchema,a=await Is(i,r);if(!a.success){const s="error"in a?a.error:"Unknown error",c=Os(s);throw new q(W.InvalidParams,`Input validation error: Invalid arguments for tool ${o}: ${c}`)}return a.data}async validateToolOutput(t,r,o){if(!t.outputSchema||!("content"in r)||r.isError)return;if(!r.structuredContent)throw new q(W.InvalidParams,`Output validation error: Tool ${o} has an output schema but no structured content was provided`);const n=mr(t.outputSchema),i=await Is(n,r.structuredContent);if(!i.success){const a="error"in i?i.error:"Unknown error",s=Os(a);throw new q(W.InvalidParams,`Output validation error: Invalid structured content for tool ${o}: ${s}`)}}async executeToolHandler(t,r,o){const n=t.handler;if("createTask"in n){if(!o.taskStore)throw new Error("No task store provided.");const a={...o,taskStore:o.taskStore};if(t.inputSchema){const s=n;return await Promise.resolve(s.createTask(r,a))}else{const s=n;return await Promise.resolve(s.createTask(a))}}if(t.inputSchema){const a=n;return await Promise.resolve(a(r,o))}else{const a=n;return await Promise.resolve(a(o))}}async handleAutomaticTaskPolling(t,r,o){if(!o.taskStore)throw new Error("No task store provided for task-capable tool.");const n=await this.validateToolInput(t,r.params.arguments,r.params.name),i=t.handler,a={...o,taskStore:o.taskStore},s=n?await Promise.resolve(i.createTask(n,a)):await Promise.resolve(i.createTask(a)),c=s.task.taskId;let u=s.task;const l=u.pollInterval??5e3;for(;u.status!=="completed"&&u.status!=="failed"&&u.status!=="cancelled";){await new Promise(p=>setTimeout(p,l));const d=await o.taskStore.getTask(c);if(!d)throw new q(W.InternalError,`Task ${c} not found during polling`);u=d}return await o.taskStore.getTaskResult(c)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(Mt(ec)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(ec,async t=>{switch(t.params.ref.type){case"ref/prompt":return Qk(t),this.handlePromptCompletion(t,t.params.ref);case"ref/resource":return eS(t),this.handleResourceCompletion(t,t.params.ref);default:throw new q(W.InvalidParams,`Invalid completion reference: ${t.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(t,r){const o=this._registeredPrompts[r.name];if(!o)throw new q(W.InvalidParams,`Prompt ${r.name} not found`);if(!o.enabled)throw new q(W.InvalidParams,`Prompt ${r.name} disabled`);if(!o.argsSchema)return Pr;const i=dr(o.argsSchema)?.[t.params.argument.name];if(!vv(i))return Pr;const a=ox(i);if(!a)return Pr;const s=await a(t.params.argument.value,t.params.context);return Sv(s)}async handleResourceCompletion(t,r){const o=Object.values(this._registeredResourceTemplates).find(a=>a.resourceTemplate.uriTemplate.toString()===r.uri);if(!o){if(this._registeredResources[r.uri])return Pr;throw new q(W.InvalidParams,`Resource template ${t.params.ref.uri} not found`)}const n=o.resourceTemplate.completeCallback(t.params.argument.name);if(!n)return Pr;const i=await n(t.params.argument.value,t.params.context);return Sv(i)}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(Mt(Bs)),this.server.assertCanSetRequestHandler(Mt(Ls)),this.server.assertCanSetRequestHandler(Mt(Gs)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(Bs,async(t,r)=>{const o=Object.entries(this._registeredResources).filter(([i,a])=>a.enabled).map(([i,a])=>({uri:i,name:a.name,...a.metadata})),n=[];for(const i of Object.values(this._registeredResourceTemplates)){if(!i.resourceTemplate.listCallback)continue;const a=await i.resourceTemplate.listCallback(r);for(const s of a.resources)n.push({...i.metadata,...s})}return{resources:[...o,...n]}}),this.server.setRequestHandler(Ls,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([r,o])=>({name:r,uriTemplate:o.resourceTemplate.uriTemplate.toString(),...o.metadata}))})),this.server.setRequestHandler(Gs,async(t,r)=>{const o=new URL(t.params.uri),n=this._registeredResources[o.toString()];if(n){if(!n.enabled)throw new q(W.InvalidParams,`Resource ${o} disabled`);return n.readCallback(o,r)}for(const i of Object.values(this._registeredResourceTemplates)){const a=i.resourceTemplate.uriTemplate.match(o.toString());if(a)return i.readCallback(o,a,r)}throw new q(W.InvalidParams,`Resource ${o} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(Mt(Vs)),this.server.assertCanSetRequestHandler(Mt(qs)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(Vs,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,t])=>t.enabled).map(([t,r])=>({name:t,title:r.title,description:r.description,arguments:r.argsSchema?dx(r.argsSchema):void 0}))})),this.server.setRequestHandler(qs,async(t,r)=>{const o=this._registeredPrompts[t.params.name];if(!o)throw new q(W.InvalidParams,`Prompt ${t.params.name} not found`);if(!o.enabled)throw new q(W.InvalidParams,`Prompt ${t.params.name} disabled`);if(o.argsSchema){const n=mr(o.argsSchema),i=await Is(n,t.params.arguments);if(!i.success){const c="error"in i?i.error:"Unknown error",u=Os(c);throw new q(W.InvalidParams,`Invalid arguments for prompt ${t.params.name}: ${u}`)}const a=i.data,s=o.callback;return await Promise.resolve(s(a,r))}else{const n=o.callback;return await Promise.resolve(n(r))}}),this._promptHandlersInitialized=!0)}resource(t,r,...o){let n;typeof o[0]=="object"&&(n=o.shift());const i=o[0];if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);const a=this._createRegisteredResource(t,void 0,r,n,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);const a=this._createRegisteredResourceTemplate(t,void 0,r,n,i);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),a}}registerResource(t,r,o,n){if(typeof r=="string"){if(this._registeredResources[r])throw new Error(`Resource ${r} is already registered`);const i=this._createRegisteredResource(t,o.title,r,o,n);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}else{if(this._registeredResourceTemplates[t])throw new Error(`Resource template ${t} is already registered`);const i=this._createRegisteredResourceTemplate(t,o.title,r,o,n);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),i}}_createRegisteredResource(t,r,o,n,i){const a={name:t,title:r,metadata:n,readCallback:i,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({uri:null}),update:s=>{typeof s.uri<"u"&&s.uri!==o&&(delete this._registeredResources[o],s.uri&&(this._registeredResources[s.uri]=a)),typeof s.name<"u"&&(a.name=s.name),typeof s.title<"u"&&(a.title=s.title),typeof s.metadata<"u"&&(a.metadata=s.metadata),typeof s.callback<"u"&&(a.readCallback=s.callback),typeof s.enabled<"u"&&(a.enabled=s.enabled),this.sendResourceListChanged()}};return this._registeredResources[o]=a,a}_createRegisteredResourceTemplate(t,r,o,n,i){const a={resourceTemplate:o,title:r,metadata:n,readCallback:i,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:u=>{typeof u.name<"u"&&u.name!==t&&(delete this._registeredResourceTemplates[t],u.name&&(this._registeredResourceTemplates[u.name]=a)),typeof u.title<"u"&&(a.title=u.title),typeof u.template<"u"&&(a.resourceTemplate=u.template),typeof u.metadata<"u"&&(a.metadata=u.metadata),typeof u.callback<"u"&&(a.readCallback=u.callback),typeof u.enabled<"u"&&(a.enabled=u.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[t]=a;const s=o.uriTemplate.variableNames;return Array.isArray(s)&&s.some(u=>!!o.completeCallback(u))&&this.setCompletionRequestHandler(),a}_createRegisteredPrompt(t,r,o,n,i){const a={title:r,description:o,argsSchema:n===void 0?void 0:yn(n),callback:i,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:s=>{typeof s.name<"u"&&s.name!==t&&(delete this._registeredPrompts[t],s.name&&(this._registeredPrompts[s.name]=a)),typeof s.title<"u"&&(a.title=s.title),typeof s.description<"u"&&(a.description=s.description),typeof s.argsSchema<"u"&&(a.argsSchema=yn(s.argsSchema)),typeof s.callback<"u"&&(a.callback=s.callback),typeof s.enabled<"u"&&(a.enabled=s.enabled),this.sendPromptListChanged()}};return this._registeredPrompts[t]=a,n&&Object.values(n).some(c=>{const u=c instanceof ir?c._def?.innerType:c;return vv(u)})&&this.setCompletionRequestHandler(),a}_createRegisteredTool(t,r,o,n,i,a,s,c,u){_v(t);const l={title:r,description:o,inputSchema:kv(n),outputSchema:kv(i),annotations:a,execution:s,_meta:c,handler:u,enabled:!0,disable:()=>l.update({enabled:!1}),enable:()=>l.update({enabled:!0}),remove:()=>l.update({name:null}),update:d=>{typeof d.name<"u"&&d.name!==t&&(typeof d.name=="string"&&_v(d.name),delete this._registeredTools[t],d.name&&(this._registeredTools[d.name]=l)),typeof d.title<"u"&&(l.title=d.title),typeof d.description<"u"&&(l.description=d.description),typeof d.paramsSchema<"u"&&(l.inputSchema=yn(d.paramsSchema)),typeof d.outputSchema<"u"&&(l.outputSchema=yn(d.outputSchema)),typeof d.callback<"u"&&(l.handler=d.callback),typeof d.annotations<"u"&&(l.annotations=d.annotations),typeof d._meta<"u"&&(l._meta=d._meta),typeof d.enabled<"u"&&(l.enabled=d.enabled),this.sendToolListChanged()}};return this._registeredTools[t]=l,this.setToolRequestHandlers(),this.sendToolListChanged(),l}tool(t,...r){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);let o,n,i,a;if(typeof r[0]=="string"&&(o=r.shift()),r.length>1){const c=r[0];if(ru(c))n=r.shift(),r.length>1&&typeof r[0]=="object"&&r[0]!==null&&!ru(r[0])&&(a=r.shift());else if(typeof c=="object"&&c!==null){if(Object.values(c).some(u=>typeof u=="object"&&u!==null))throw new Error(`Tool ${t} expected a Zod schema or ToolAnnotations, but received an unrecognized object`);a=r.shift()}}const s=r[0];return this._createRegisteredTool(t,void 0,o,n,i,a,{taskSupport:"forbidden"},void 0,s)}registerTool(t,r,o){if(this._registeredTools[t])throw new Error(`Tool ${t} is already registered`);const{title:n,description:i,inputSchema:a,outputSchema:s,annotations:c,_meta:u}=r;return this._createRegisteredTool(t,n,i,a,s,c,{taskSupport:"forbidden"},u,o)}prompt(t,...r){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);let o;typeof r[0]=="string"&&(o=r.shift());let n;r.length>1&&(n=r.shift());const i=r[0],a=this._createRegisteredPrompt(t,void 0,o,n,i);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),a}registerPrompt(t,r,o){if(this._registeredPrompts[t])throw new Error(`Prompt ${t} is already registered`);const{title:n,description:i,argsSchema:a}=r,s=this._createRegisteredPrompt(t,n,i,a,o);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),s}isConnected(){return this.server.transport!==void 0}async sendLoggingMessage(t,r){return this.server.sendLoggingMessage(t,r)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}}const lx={type:"object",properties:{}};function $v(e){return e!==null&&typeof e=="object"&&"parse"in e&&typeof e.parse=="function"&&"safeParse"in e&&typeof e.safeParse=="function"}function bv(e){return"_def"in e||"_zod"in e||$v(e)}function ru(e){return typeof e!="object"||e===null||bv(e)?!1:Object.keys(e).length===0?!0:Object.values(e).some($v)}function kv(e){if(e){if(ru(e))return yn(e);if(!bv(e))throw new Error("inputSchema must be a Zod schema or raw shape, received an unrecognized object");return e}}function dx(e){const t=dr(e);return t?Object.entries(t).map(([r,o])=>{const n=Sb(o),i=wb(o);return{name:r,description:n,required:!i}}):[]}function Mt(e){const r=dr(e)?.method;if(!r)throw new Error("Schema is missing a method literal");const o=bh(r);if(typeof o=="string")return o;throw new Error("Schema method literal must be a string")}function Sv(e){return{completion:{values:e.slice(0,100),total:e.length,hasMore:e.length>100}}}const Pr={completion:{values:[],hasMore:!1}};class mx{append(t){this._buffer=this._buffer?Buffer.concat([this._buffer,t]):t}readMessage(){if(!this._buffer)return null;const t=this._buffer.indexOf(`
|
|
78
|
+
`);if(t===-1)return null;const r=this._buffer.toString("utf8",0,t).replace(/\r$/,"");return this._buffer=this._buffer.subarray(t+1),px(r)}clear(){this._buffer=void 0}}function px(e){return zb.parse(JSON.parse(e))}function fx(e){return JSON.stringify(e)+`
|
|
79
|
+
`}class hx{constructor(t=uu.stdin,r=uu.stdout){this._stdin=t,this._stdout=r,this._readBuffer=new mx,this._started=!1,this._ondata=o=>{this._readBuffer.append(o),this.processReadBuffer()},this._onerror=o=>{this.onerror?.(o)}}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)}processReadBuffer(){for(;;)try{const t=this._readBuffer.readMessage();if(t===null)break;this.onmessage?.(t)}catch(t){this.onerror?.(t)}}async close(){this._stdin.off("data",this._ondata),this._stdin.off("error",this._onerror),this._stdin.listenerCount("data")===0&&this._stdin.pause(),this._readBuffer.clear(),this.onclose?.()}send(t){return new Promise(r=>{const o=fx(t);this._stdout.write(o)?r():this._stdout.once("drain",r)})}}function yi(e){return e==null?!1:typeof e=="string"?e.length>0:!0}function gx(e){const t=e.isPresent??yi;if(!e.candidates.some(r=>t(r.value)))throw new Error(e.missingMessage??`Error: ${vx(e.candidates.map(r=>r.label))} must be provided.`)}function vx(e){return e.length===1?e[0]:e.length===2?`Either ${e[0]} or ${e[1]}`:`Either ${e.slice(0,-1).join(", ")}, or ${e[e.length-1]}`}function yx(e){const t=e.inlineLabel??"json",r=e.fileLabel??"jsonFile",o=e.fileDescription??"file";if(yi(e.inlineText)&&yi(e.filePath))throw new Error(`Provide either ${t} or ${r}, not both.`);if(yi(e.inlineText))return{text:e.inlineText,source:"inline"};gx({candidates:[{label:t,value:e.inlineText},{label:r,value:e.filePath}],missingMessage:`Either ${t} or ${r} must be provided.`});try{return{text:Fv(e.filePath,"utf-8"),source:"file"}}catch(n){throw new Error(`Error reading ${o}: ${n.message}`,{cause:n})}}function _x(e,t){Bv(Mv(e),{recursive:!0}),Lv(e,t,"utf-8")}function wv(e){const t=e.jsonLabel??"JSON";try{return JSON.parse(e.jsonText)}catch(r){if(e.includePreviewInError){const o=e.previewLength??100,n=e.jsonText.slice(0,o),i=e.jsonText.length>n.length?"...":"";throw new Error(`Invalid ${t}: ${n}${i}`,{cause:r})}throw new Error(`Invalid ${t}: parse error.`,{cause:r})}}function Iv(e){return{type:"text",text:e}}function Nt(e){return{content:[Iv(e)]}}function It(e){return{content:[Iv(e)],isError:!0}}function $x(e){if(!e.jsonText)return It(e.missingMessage);if(!e.outputFile)return Nt(e.jsonText);try{return _x(e.outputFile,e.jsonText),Nt(`${e.fileLabel} written to: ${e.outputFile}`)}catch(t){return It(`Error writing file: ${t.message}`)}}function bx(e){let t;try{t=yx({inlineText:e.json,filePath:e.jsonFile,inlineLabel:"json",fileLabel:"jsonFile",fileDescription:e.fileDescription}).text}catch(o){return It(o.message)}const r=e.importJson(t);return r!=="OK"?It(`Error: ${r}`):Nt(`${e.successMessage??"Imported successfully."}
|
|
80
|
+
|
|
81
|
+
${e.describeImported()}`)}function kx(e){if(e.snippetResult.type==="unknown")return It(`Error: Snippet "${e.snippetId}" has an unrecognized format.`);if(e.snippetResult.type!==e.expectedType)return It(`Error: Snippet "${e.snippetId}" is of type "${e.snippetResult.type}", not "${e.expectedType}".`);const t=e.importJson(JSON.stringify(e.snippetResult.data));return t!=="OK"?It(`Error importing snippet data: ${t}`):Nt(`${e.successMessage}
|
|
82
|
+
|
|
83
|
+
${e.describeImported()}`)}async function Sx(e){try{return e.createResponse(await e.loadSnippet(e.snippetId))}catch(t){return It(`Error fetching snippet "${e.snippetId}": ${t.message}`)}}function wx(e){return e.string().optional().describe("Optional absolute file path. When provided, the JSON is written to this file and the path is returned instead of the full JSON.")}function Ix(e,t){return e.string().optional().describe(t)}function Ox(e,t){return e.string().optional().describe(t)}function xx(e){return e.string().describe('Snippet ID from the Babylon.js Snippet Server (e.g. "ABC123" or "ABC123#2")')}function Tx(e,t){const r=typeof e=="string"?wv({jsonText:e,jsonLabel:t}):e;if(!r||typeof r!="object"||Array.isArray(r))throw new Error(`Invalid ${t}: expected a JSON object.`);return r}function Px(e){const t=Tx(e,"NGE JSON");if(t.customType!=="BABYLON.NodeGeometry")throw new Error(`Invalid NGE JSON: customType must be "BABYLON.NodeGeometry" but got "${String(t.customType)}".`);if(!Array.isArray(t.blocks))throw new Error("Invalid NGE JSON: must contain a 'blocks' array.");return t}const Ov="babylon-mcp-editor-session",Ex="1.0",zx="127.0.0.1",xv="localhost",Nx=3001,jx=10,Dx=15e3,Cx=15*6e4,_i="last-writer-wins";function Rx(e,t,r=xv){return`http://${r}:${t}/session/${e}`}function Ax(){return Ii.createHash("sha256").update(process.cwd()).digest("hex")}function Ux(){return`${process.pid}-${Ii.randomBytes(8).toString("hex")}`}class Zx{constructor(t,r={}){this._server=null,this._port=0,this._keepAliveInterval=null,this._idleTimeout=null,this._sessions=new Map,this._sessionByName=new Map,this._sseClients=new Map,this._startedAt=0,this._lastActivityAt=0,this._adapter=t,this._defaultPort=r.defaultPort??Nx,this._portRange=r.portRange??jx,this._host=r.host??zx,this._publicHostname=r.publicHostname??xv,this._protocolVersion=r.protocolVersion??Ex,this._keepAliveIntervalMs=r.keepAliveIntervalMs??Dx,this._idleTimeoutMs=r.idleTimeoutMs??Cx,this._corsOrigin=r.corsOrigin,this._allowedOrigins=r.allowedOrigins?new Set(r.allowedOrigins):null,this._legacyDocumentRoutes=new Set((r.legacyDocumentRoutes??[]).map(o=>o.replace(/^\//,""))),this._capabilities=["sse","document-get","document-post","session-close","session-list","diagnostics","idle-timeout",_i,...r.capabilities??[]],this._statusTitle=r.statusTitle??t.serverName,this._workspaceId=r.workspaceId??Ax(),this._ownerId=r.ownerId??Ux()}isRunning(){return this._server!==null&&this._server.listening}async startAsync(t=this._defaultPort){if(this.isRunning())return this._port;const r=t+this._portRange-1;return this._port=await this._tryPortRangeAsync(t,r),this._startedAt=Date.now(),this._recordActivity(),this._keepAliveInterval=setInterval(()=>{for(const o of this._sseClients.values())for(const n of o)n.write(`: ping
|
|
84
|
+
|
|
85
|
+
`)},this._keepAliveIntervalMs),this._port}async stopAsync(t="Session server stopped"){this._keepAliveInterval&&(clearInterval(this._keepAliveInterval),this._keepAliveInterval=null),this._idleTimeout&&(clearTimeout(this._idleTimeout),this._idleTimeout=null);for(const r of[...this._sessions.keys()])this.closeSession(r,t);if(this._idleTimeout&&(clearTimeout(this._idleTimeout),this._idleTimeout=null),!this._server){this._port=0,this._startedAt=0,this._lastActivityAt=0;return}await new Promise((r,o)=>{this._server.close(n=>{if(this._server=null,this._port=0,this._startedAt=0,this._lastActivityAt=0,n){o(new Error(n.message));return}r()})})}createSession(t,r=this._adapter.documentKind){const o=this._getSessionKey(r,t),n=this._sessionByName.get(o);if(n){const s=this._sessions.get(n);if(s)return s}const i=Date.now(),a={id:Ii.randomBytes(16).toString("hex"),kind:r,name:t,createdAt:i,updatedAt:i,revision:0};return this._sessions.set(a.id,a),this._sessionByName.set(o,a.id),this._sseClients.set(a.id,new Set),this._recordActivity(),a}getSessionIdForName(t,r=this._adapter.documentKind){return this._sessionByName.get(this._getSessionKey(r,t))}getSessionUrl(t,r=this._port){return Rx(t,r,this._publicHostname)}notifySessionUpdate(t){this._sendDocumentUpdateAsync(t)}closeSession(t,r="Session closed by MCP server"){const o=this._sessions.get(t);if(!o)return!1;const n=this._sseClients.get(t);if(n){for(const i of n)i.write(`event: session-closed
|
|
86
|
+
data: ${JSON.stringify({reason:r})}
|
|
87
|
+
|
|
88
|
+
`),i.end();n.clear()}return this._sseClients.delete(t),this._sessions.delete(t),this._sessionByName.delete(this._getSessionKey(o.kind,o.name)),this._recordActivity(),!0}closeSessionForName(t,r=this._adapter.documentKind){const o=this.getSessionIdForName(t,r);return o?this.closeSession(o):!1}getPort(){return this._port}getHealth(){return{protocol:Ov,protocolVersion:this._protocolVersion,serverName:this._adapter.serverName,port:this._port,host:this._host,publicHostname:this._publicHostname,documentKind:this._adapter.documentKind,running:this.isRunning(),activeSessionCount:this._sessions.size,capabilities:[...this._capabilities],conflictPolicy:_i,idleTimeoutMs:this._idleTimeoutMs,lastActivityAt:this._lastActivityAt,workspaceId:this._workspaceId,ownerId:this._ownerId}}getDiagnostics(){return{health:this.getHealth(),sessions:this._getSessionInfoList(),sseClientCount:this._getSseClientCount(),startedAt:this._startedAt,uptimeMs:this._startedAt?Date.now()-this._startedAt:0,keepAliveIntervalMs:this._keepAliveIntervalMs,idleTimeoutMs:this._idleTimeoutMs,lastActivityAt:this._lastActivityAt}}_recordActivity(){this._lastActivityAt=Date.now(),this._scheduleIdleTimeout()}_scheduleIdleTimeout(){if(this._idleTimeout&&(clearTimeout(this._idleTimeout),this._idleTimeout=null),this._idleTimeoutMs<=0||!this.isRunning())return;const t=Date.now()-this._lastActivityAt,r=Math.max(1,this._idleTimeoutMs-t),o=setTimeout(()=>{this._stopIfIdleAsync()},r);typeof o=="object"&&"unref"in o&&o.unref(),this._idleTimeout=o}async _stopIfIdleAsync(){if(!this.isRunning()||this._idleTimeoutMs<=0)return;if(Date.now()-this._lastActivityAt<this._idleTimeoutMs){this._scheduleIdleTimeout();return}await this.stopAsync("Session server stopped after idle timeout")}_getSessionKey(t,r){return`${t}:${r}`}async _tryPortRangeAsync(t,r){let o;for(let n=t;n<=r;n++)try{return await this._startOnPortAsync(n),n}catch(i){o=i}throw o??new Error(`Could not find an open port between ${t} and ${r}`)}async _startOnPortAsync(t){await new Promise((r,o)=>{const n=Zv.createServer((i,a)=>{this._handleRequestAsync(i,a)});n.once("error",i=>{o(new Error(i.message))}),n.listen(t,this._host,()=>{this._server=n,r()})})}_setCorsHeaders(t,r){const o=this._getAllowedCorsOrigin(t.headers.origin);o&&(r.setHeader("Access-Control-Allow-Origin",o),r.setHeader("Vary","Origin")),r.setHeader("Access-Control-Allow-Methods","GET, POST, OPTIONS"),r.setHeader("Access-Control-Allow-Headers","Content-Type"),r.setHeader("Access-Control-Expose-Headers","X-Mcp-Editor-Session-Revision")}_getAllowedCorsOrigin(t){if(this._corsOrigin)return this._corsOrigin;if(t)return this._allowedOrigins?this._allowedOrigins.has(t)?t:void 0:this._isLocalOrigin(t)?t:void 0}_isLocalOrigin(t){try{const r=new URL(t);return(r.protocol==="http:"||r.protocol==="https:")&&(r.hostname==="localhost"||r.hostname==="127.0.0.1"||r.hostname==="::1")}catch{return!1}}async _handleRequestAsync(t,r){if(this._setCorsHeaders(t,r),this._recordActivity(),t.method==="OPTIONS"){r.writeHead(204),r.end();return}const n=new URL(t.url??"/",`http://${this._publicHostname}:${this._port}`).pathname;if(n==="/"&&t.method==="GET"){this._handleStatus(r);return}if(n==="/health"&&t.method==="GET"){this._writeJson(r,200,this.getHealth());return}if(n==="/sessions"&&t.method==="GET"){this._writeJson(r,200,this._getSessionInfoList());return}if(n==="/diagnostics"&&t.method==="GET"){this._writeJson(r,200,this.getDiagnostics());return}const i=n.match(/^\/session\/([^/]+)(?:\/([^/]+))?$/);if(!i){this._writeText(r,404,"Not Found");return}const a=i[1],s=i[2]??"",c=this._sessions.get(a);if(!c){this._writeJson(r,404,{error:`Session "${a}" not found`});return}if(s===""&&t.method==="GET"){this._writeJson(r,200,this._createSessionInfo(c));return}if(s==="events"&&t.method==="GET"){await this._handleSseAsync(c,r);return}if(this._isDocumentRoute(s)){if(t.method==="GET"){await this._handleGetDocumentAsync(c,r);return}if(t.method==="POST"){await this._handlePostDocumentAsync(c,t,r);return}}this._writeText(r,404,"Not Found")}_handleStatus(t){const r=[this._statusTitle,"",`Protocol: ${Ov} ${this._protocolVersion}`,`Document kind: ${this._adapter.documentKind}`,""];if(this._sessions.size===0)r.push("No active sessions.");else{r.push("Active sessions:");for(const o of this._sessions.values()){const n=this._sseClients.get(o.id)?.size??0;r.push(` ${o.id} -> ${o.name} (${n} subscriber${n===1?"":"s"}, revision ${o.revision})`)}}this._writeText(t,200,r.join(`
|
|
89
|
+
`))}async _handleSseAsync(t,r){r.statusCode=200,r.setHeader("Content-Type","text/event-stream"),r.setHeader("Cache-Control","no-cache"),r.setHeader("Connection","keep-alive"),r.flushHeaders();const o=this._sseClients.get(t.id);o.add(r),r.write(`: connected
|
|
90
|
+
|
|
91
|
+
`);const n=await this._adapter.getDocument(t);n&&this._writeDocumentEvent(r,n),r.on("close",()=>{o.delete(r),this._recordActivity()})}async _handleGetDocumentAsync(t,r){const o=await this._adapter.getDocument(t);if(!o){this._writeJson(r,404,{error:`Document "${t.name}" not found`});return}r.statusCode=200,r.setHeader("Content-Type","application/json; charset=utf-8"),r.setHeader("Cache-Control","no-cache"),r.setHeader("X-Mcp-Editor-Session-Revision",t.revision.toString()),r.end(o)}async _handlePostDocumentAsync(t,r,o){const n=await this._readBodyAsync(r);try{JSON.parse(n)}catch{this._writeJson(o,400,{error:"Invalid JSON"});return}const i=await this._adapter.setDocument(t,n);if(typeof i=="string"&&i.length>0){this._writeJson(o,400,{error:i});return}const a=t.revision;this._touchSession(t),o.setHeader("X-Mcp-Editor-Session-Revision",t.revision.toString()),this._writeJson(o,200,{ok:!0,previousRevision:a,revision:t.revision,conflictPolicy:_i}),await this._sendDocumentUpdateAsync(t.id,!1)}async _sendDocumentUpdateAsync(t,r=!0){const o=this._sessions.get(t);if(!o)return;this._recordActivity(),r&&this._touchSession(o);const n=this._sseClients.get(t);if(!n||n.size===0)return;const i=await this._adapter.getDocument(o);if(i)for(const a of n)this._writeDocumentEvent(a,i)}_touchSession(t){t.updatedAt=Date.now(),t.revision++}_writeDocumentEvent(t,r){const o=JSON.stringify(JSON.parse(r));t.write(`data: ${o}
|
|
92
|
+
|
|
93
|
+
`)}_isDocumentRoute(t){return t==="document"||this._legacyDocumentRoutes.has(t)}_createSessionInfo(t){const r=this._sseClients.get(t.id)?.size??0,o={sessionId:t.id,kind:t.kind,name:t.name,revision:t.revision,createdAt:t.createdAt,updatedAt:t.updatedAt,conflictPolicy:_i,subscriberCount:r,eventsUrl:`/session/${t.id}/events`,documentUrl:`/session/${t.id}/document`};for(const n of this._legacyDocumentRoutes)o[`${n}Url`]=`/session/${t.id}/${n}`;return o}_getSessionInfoList(){return[...this._sessions.values()].map(t=>this._createSessionInfo(t))}_getSseClientCount(){let t=0;for(const r of this._sseClients.values())t+=r.size;return t}async _readBodyAsync(t){const r=[];return await new Promise((o,n)=>{t.on("data",i=>r.push(i)),t.on("end",o),t.on("error",n)}),Buffer.concat(r).toString("utf-8")}_writeJson(t,r,o){t.statusCode=r,t.setHeader("Content-Type","application/json; charset=utf-8"),t.end(JSON.stringify(o))}_writeText(t,r,o){t.statusCode=r,t.setHeader("Content-Type","text/plain; charset=utf-8"),t.end(o)}}class Mx{constructor(t,r={}){this._manager=null,this._sessionServer=null,this._adapter=t,this._options=r}isRunning(){return this._sessionServer?.isRunning()??!1}async startAsync(t,r){return this._manager=t,await this._getSessionServer().startAsync(r)}async stopAsync(){this._sessionServer&&await this._sessionServer.stopAsync()}createSession(t){return this._getSessionServer().createSession(t).id}getSessionIdForName(t){return this._sessionServer?.getSessionIdForName(t)}getSessionUrl(t,r){return this._getSessionServer().getSessionUrl(t,r)}notifySessionUpdate(t){this._sessionServer?.notifySessionUpdate(t)}closeSession(t){return this._sessionServer?.closeSession(t)??!1}closeSessionForName(t){return this._sessionServer?.closeSessionForName(t)??!1}getPort(){return this._sessionServer?.getPort()??0}getHealth(){return this._getSessionServer().getHealth()}getDiagnostics(){return this._getSessionServer().getDiagnostics()}_getSessionServer(){return this._sessionServer||(this._sessionServer=new Zx({serverName:this._adapter.serverName,documentKind:this._adapter.documentKind,getDocument:t=>this._manager?this._adapter.getDocument(this._manager,t):void 0,setDocument:(t,r)=>this._manager?this._adapter.setDocument(this._manager,t,r):this._adapter.managerUnavailableMessage??"Document manager is not available"},this._options)),this._sessionServer}}const En={GeometryInputBlock:{className:"GeometryInputBlock",category:"Input",description:"Provides input values to the geometry graph. Can be configured as a contextual source (Positions, Normals, UV, VertexID, etc.) or a constant value (Float, Int, Vector2, Vector3, Vector4, Matrix).",inputs:[],outputs:[{name:"output",type:"AutoDetect"}],properties:{type:"NodeGeometryBlockConnectionPointTypes \u2014 the data type (Int, Float, Vector2, Vector3, Vector4, Matrix)",contextualValue:"NodeGeometryContextualSources \u2014 None, Positions, Normals, Tangents, UV, UV2, UV3, UV4, UV5, UV6, Colors, VertexID, FaceID, GeometryID, CollectionID, LoopID, InstanceID, LatticeID, LatticeControl",value:"The actual constant value (number, Vector2, Vector3, Vector4, Matrix)",min:"number \u2014 minimum value for inspector slider",max:"number \u2014 maximum value for inspector slider",groupInInspector:"string \u2014 group name in the inspector",displayInInspector:"boolean \u2014 whether to show in Inspector"}},GeometryOutputBlock:{className:"GeometryOutputBlock",category:"Output",description:"The final output block that produces the geometry. Every Node Geometry graph must have exactly one.",inputs:[{name:"geometry",type:"Geometry"}],outputs:[]},BoxBlock:{className:"BoxBlock",category:"Source",description:"Generates box geometry with configurable size and subdivisions.",inputs:[{name:"size",type:"Float",isOptional:!0},{name:"width",type:"Float",isOptional:!0},{name:"height",type:"Float",isOptional:!0},{name:"depth",type:"Float",isOptional:!0},{name:"subdivisions",type:"Int",isOptional:!0},{name:"subdivisionsX",type:"Int",isOptional:!0},{name:"subdivisionsY",type:"Int",isOptional:!0},{name:"subdivisionsZ",type:"Int",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},SphereBlock:{className:"SphereBlock",category:"Source",description:"Generates sphere geometry with configurable segments, diameter, arc, and slice.",inputs:[{name:"segments",type:"Int",isOptional:!0},{name:"diameter",type:"Float",isOptional:!0},{name:"diameterX",type:"Float",isOptional:!0},{name:"diameterY",type:"Float",isOptional:!0},{name:"diameterZ",type:"Float",isOptional:!0},{name:"arc",type:"Float",isOptional:!0},{name:"slice",type:"Float",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},CylinderBlock:{className:"CylinderBlock",category:"Source",description:"Generates cylinder geometry with configurable height, diameter, subdivisions, tessellation, and arc.",inputs:[{name:"height",type:"Float",isOptional:!0},{name:"diameter",type:"Float",isOptional:!0},{name:"diameterTop",type:"Float",isOptional:!0},{name:"diameterBottom",type:"Float",isOptional:!0},{name:"subdivisions",type:"Int",isOptional:!0},{name:"tessellation",type:"Int",isOptional:!0},{name:"arc",type:"Float",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},PlaneBlock:{className:"PlaneBlock",category:"Source",description:"Generates plane geometry with configurable size and subdivisions.",inputs:[{name:"size",type:"Float",isOptional:!0},{name:"width",type:"Float",isOptional:!0},{name:"height",type:"Float",isOptional:!0},{name:"subdivisions",type:"Int",isOptional:!0},{name:"subdivisionsX",type:"Int",isOptional:!0},{name:"subdivisionsY",type:"Int",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},TorusBlock:{className:"TorusBlock",category:"Source",description:"Generates torus geometry with configurable diameter, thickness, and tessellation.",inputs:[{name:"diameter",type:"Float",isOptional:!0},{name:"thickness",type:"Float",isOptional:!0},{name:"tessellation",type:"Int",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},DiscBlock:{className:"DiscBlock",category:"Source",description:"Generates disc geometry with configurable radius, tessellation, and arc.",inputs:[{name:"radius",type:"Float",isOptional:!0},{name:"tessellation",type:"Int",isOptional:!0},{name:"arc",type:"Float",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},CapsuleBlock:{className:"CapsuleBlock",category:"Source",description:"Generates capsule geometry with configurable height, radius, tessellation, and subdivisions.",inputs:[{name:"height",type:"Float",isOptional:!0},{name:"radius",type:"Float",isOptional:!0},{name:"tessellation",type:"Int",isOptional:!0},{name:"subdivisions",type:"Int",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},IcoSphereBlock:{className:"IcoSphereBlock",category:"Source",description:"Generates icosphere geometry with configurable radius and subdivisions.",inputs:[{name:"radius",type:"Float",isOptional:!0},{name:"radiusX",type:"Float",isOptional:!0},{name:"radiusY",type:"Float",isOptional:!0},{name:"radiusZ",type:"Float",isOptional:!0},{name:"subdivisions",type:"Int",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},GridBlock:{className:"GridBlock",category:"Source",description:"Generates a flat grid geometry with configurable width, height, and subdivisions.",inputs:[{name:"width",type:"Float",isOptional:!0},{name:"height",type:"Float",isOptional:!0},{name:"subdivisions",type:"Int",isOptional:!0},{name:"subdivisionsX",type:"Int",isOptional:!0},{name:"subdivisionsY",type:"Int",isOptional:!0}],outputs:[{name:"geometry",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},NullBlock:{className:"NullBlock",category:"Source",description:"Outputs a null (empty) geometry and a zero vector. Useful as a placeholder.",inputs:[],outputs:[{name:"geometry",type:"Geometry"},{name:"vector",type:"Vector3"}]},MeshBlock:{className:"MeshBlock",category:"Source",description:"Provides geometry from an existing mesh. The mesh is set programmatically or via cached data.",inputs:[],outputs:[{name:"geometry",type:"Geometry"}],properties:{serializedCachedData:"boolean \u2014 whether cached mesh data is embedded (default: false)",reverseWindingOrder:"boolean \u2014 whether to reverse face winding (default: false)"},defaultSerializedProperties:{serializedCachedData:!1,reverseWindingOrder:!1}},PointListBlock:{className:"PointListBlock",category:"Source",description:"Generates geometry from an explicit list of points.",inputs:[],outputs:[{name:"geometry",type:"Geometry"}],properties:{points:"Vector3[] \u2014 array of 3D points, serialised as flat arrays"}},GeometryTransformBlock:{className:"GeometryTransformBlock",category:"Geometry",description:"Transforms geometry or a vector using a matrix, or individual translation/rotation/scaling vectors. When used per-vertex (evaluateContext=true), it transforms each vertex position.",inputs:[{name:"value",type:"AutoDetect"},{name:"matrix",type:"Matrix",isOptional:!0},{name:"translation",type:"Vector3",isOptional:!0},{name:"rotation",type:"Vector3",isOptional:!0},{name:"scaling",type:"Vector3",isOptional:!0},{name:"pivot",type:"Vector3",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{evaluateContext:"boolean \u2014 re-evaluate per context/vertex (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},MergeGeometryBlock:{className:"MergeGeometryBlock",category:"Geometry",description:"Merges up to 5 geometry inputs into a single geometry.",inputs:[{name:"geometry0",type:"Geometry"},{name:"geometry1",type:"Geometry",isOptional:!0},{name:"geometry2",type:"Geometry",isOptional:!0},{name:"geometry3",type:"Geometry",isOptional:!0},{name:"geometry4",type:"Geometry",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},BooleanGeometryBlock:{className:"BooleanGeometryBlock",category:"Geometry",description:"Performs CSG boolean operations (Intersect, Subtract, Union) between two geometries.",inputs:[{name:"geometry0",type:"Geometry"},{name:"geometry1",type:"Geometry"}],outputs:[{name:"output",type:"Geometry"}],properties:{operation:"BooleanGeometryOperations \u2014 Intersect (0), Subtract (1), Union (2). Default: Intersect",evaluateContext:"boolean (default: false)",useOldCSGEngine:"boolean \u2014 use legacy CSG engine (default: false)"},defaultSerializedProperties:{evaluateContext:!1,operation:0,useOldCSGEngine:!1}},ComputeNormalsBlock:{className:"ComputeNormalsBlock",category:"Geometry",description:"Recomputes normals for a geometry based on its face topology.",inputs:[{name:"geometry",type:"Geometry"}],outputs:[{name:"output",type:"Geometry"}]},CleanGeometryBlock:{className:"CleanGeometryBlock",category:"Geometry",description:"Cleans geometry by removing degenerate triangles, duplicates, etc.",inputs:[{name:"geometry",type:"Geometry"}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},ExtrudeGeometryBlock:{className:"ExtrudeGeometryBlock",category:"Geometry",description:"Extrudes a geometry along its average face normal by a given depth. Supports configurable cap modes (no cap, start, end, or both).",inputs:[{name:"geometry",type:"Geometry"},{name:"depth",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 re-evaluate per context/vertex (default: false)",cap:"ExtrudeGeometryCap \u2014 NoCap (0), CapStart (1), CapEnd (2), CapAll (3). Default: CapAll (3)"},defaultSerializedProperties:{evaluateContext:!1,cap:3}},BevelBlock:{className:"BevelBlock",category:"Geometry",description:"Bevels geometry edges by a configurable amount, segment count, and angle threshold.",inputs:[{name:"geometry",type:"Geometry"},{name:"amount",type:"Float",isOptional:!0},{name:"segments",type:"Int",isOptional:!0},{name:"angle",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean \u2014 whether to re-evaluate inputs per context (default: false)"},defaultSerializedProperties:{evaluateContext:!1}},SubdivideBlock:{className:"SubdivideBlock",category:"Geometry",description:"Subdivides geometry faces. Supports flat and Loop subdivision.",inputs:[{name:"geometry",type:"Geometry"},{name:"level",type:"Int",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{flatOnly:"boolean \u2014 flat subdivision only (default: false)",loopWeight:"number \u2014 Loop subdivision weight 0-1 (default: 1.0)"},defaultSerializedProperties:{flatOnly:!1,loopWeight:1}},GeometryOptimizeBlock:{className:"GeometryOptimizeBlock",category:"Geometry",description:"Optimizes geometry by merging close vertices and optionally removing duplicate faces.",inputs:[{name:"geometry",type:"Geometry"},{name:"selector",type:"Int",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)",epsilon:"number \u2014 merge distance threshold",optimizeFaces:"boolean \u2014 also optimize faces (default: false)"},defaultSerializedProperties:{evaluateContext:!0,optimizeFaces:!1}},BoundingBlock:{className:"BoundingBlock",category:"Geometry",description:"Computes the axis-aligned bounding box of a geometry, outputting min and max vectors.",inputs:[{name:"geometry",type:"Geometry"}],outputs:[{name:"min",type:"Vector3"},{name:"max",type:"Vector3"}]},GeometryInfoBlock:{className:"GeometryInfoBlock",category:"Geometry",description:"Provides metadata about a geometry: vertex count, face count, geometry ID, collection ID.",inputs:[{name:"geometry",type:"Geometry"}],outputs:[{name:"output",type:"Geometry"},{name:"id",type:"Int"},{name:"collectionId",type:"Int"},{name:"verticesCount",type:"Int"},{name:"facesCount",type:"Int"}]},GeometryCollectionBlock:{className:"GeometryCollectionBlock",category:"Geometry",description:"Collects up to 10 geometries into a collection, assigning each a unique collection ID.",inputs:[{name:"geometry0",type:"Geometry",isOptional:!0},{name:"geometry1",type:"Geometry",isOptional:!0},{name:"geometry2",type:"Geometry",isOptional:!0},{name:"geometry3",type:"Geometry",isOptional:!0},{name:"geometry4",type:"Geometry",isOptional:!0},{name:"geometry5",type:"Geometry",isOptional:!0},{name:"geometry6",type:"Geometry",isOptional:!0},{name:"geometry7",type:"Geometry",isOptional:!0},{name:"geometry8",type:"Geometry",isOptional:!0},{name:"geometry9",type:"Geometry",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},SetPositionsBlock:{className:"SetPositionsBlock",category:"Set",description:"Overrides vertex positions in a geometry. Runs per-vertex with contextual source access.",inputs:[{name:"geometry",type:"Geometry"},{name:"positions",type:"Vector3"}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},SetNormalsBlock:{className:"SetNormalsBlock",category:"Set",description:"Overrides vertex normals in a geometry.",inputs:[{name:"geometry",type:"Geometry"},{name:"normals",type:"Vector3"}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},SetColorsBlock:{className:"SetColorsBlock",category:"Set",description:"Overrides vertex colors in a geometry. Accepts Vector3 (RGB) or Vector4 (RGBA).",inputs:[{name:"geometry",type:"Geometry"},{name:"colors",type:"AutoDetect"}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},SetUVsBlock:{className:"SetUVsBlock",category:"Set",description:"Overrides UV coordinates in a geometry. Can target UV1\u2013UV6.",inputs:[{name:"geometry",type:"Geometry"},{name:"uvs",type:"Vector2"}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)",textureCoordinateIndex:"number \u2014 UV channel 0\u20135 (UV1\u2013UV6). Default: 0"},defaultSerializedProperties:{evaluateContext:!0,textureCoordinateIndex:0}},SetTangentsBlock:{className:"SetTangentsBlock",category:"Set",description:"Overrides vertex tangents in a geometry.",inputs:[{name:"geometry",type:"Geometry"},{name:"tangents",type:"Vector4"}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},SetMaterialIDBlock:{className:"SetMaterialIDBlock",category:"Set",description:"Assigns a material ID to each face in a geometry. Used for multi-material support.",inputs:[{name:"geometry",type:"Geometry"},{name:"id",type:"Int",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},AggregatorBlock:{className:"AggregatorBlock",category:"Set",description:"Aggregates values across geometry vertices using Max, Min, or Sum operations.",inputs:[{name:"geometry",type:"Geometry"},{name:"source",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{aggregation:"Aggregations \u2014 Max (0), Min (1), Sum (2). Default: Sum",evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0,aggregation:2}},LatticeBlock:{className:"LatticeBlock",category:"Set",description:"Applies a lattice deformation to geometry. Control points modify vertex positions.",inputs:[{name:"geometry",type:"Geometry"},{name:"controls",type:"Vector3"}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)",resolutionX:"number \u2014 lattice resolution X (default: 3, range: 1\u201310)",resolutionY:"number \u2014 lattice resolution Y (default: 3, range: 1\u201310)",resolutionZ:"number \u2014 lattice resolution Z (default: 3, range: 1\u201310)"},defaultSerializedProperties:{evaluateContext:!0,resolutionX:3,resolutionY:3,resolutionZ:3}},InstantiateBlock:{className:"InstantiateBlock",category:"Instance",description:"Creates instances of geometry at specified positions with custom transform per instance.",inputs:[{name:"instance",type:"Geometry",isOptional:!0},{name:"count",type:"Int",isOptional:!0},{name:"matrix",type:"Matrix",isOptional:!0},{name:"position",type:"Vector3",isOptional:!0},{name:"rotation",type:"Vector3",isOptional:!0},{name:"scaling",type:"Vector3",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},InstantiateLinearBlock:{className:"InstantiateLinearBlock",category:"Instance",description:"Creates instances arranged in a line along a direction vector.",inputs:[{name:"instance",type:"Geometry",isOptional:!0},{name:"count",type:"Int",isOptional:!0},{name:"direction",type:"Vector3",isOptional:!0},{name:"rotation",type:"Vector3",isOptional:!0},{name:"scaling",type:"Vector3",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},InstantiateRadialBlock:{className:"InstantiateRadialBlock",category:"Instance",description:"Creates instances arranged radially in a circle or arc.",inputs:[{name:"instance",type:"Geometry",isOptional:!0},{name:"count",type:"Int",isOptional:!0},{name:"radius",type:"Int",isOptional:!0},{name:"angleStart",type:"Float",isOptional:!0},{name:"angleEnd",type:"Float",isOptional:!0},{name:"transform",type:"Vector3",isOptional:!0},{name:"rotation",type:"Vector3",isOptional:!0},{name:"scaling",type:"Vector3",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},InstantiateOnFacesBlock:{className:"InstantiateOnFacesBlock",category:"Instance",description:"Scatters instances randomly across the faces of a source geometry.",inputs:[{name:"geometry",type:"Geometry"},{name:"instance",type:"Geometry",isOptional:!0},{name:"count",type:"Int",isOptional:!0},{name:"matrix",type:"Matrix",isOptional:!0},{name:"offset",type:"Vector3",isOptional:!0},{name:"rotation",type:"Vector3",isOptional:!0},{name:"scaling",type:"Vector3",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)"},defaultSerializedProperties:{evaluateContext:!0}},InstantiateOnVerticesBlock:{className:"InstantiateOnVerticesBlock",category:"Instance",description:"Places instances on the vertices of a source geometry with optional density filtering.",inputs:[{name:"geometry",type:"Geometry"},{name:"instance",type:"Geometry",isOptional:!0},{name:"density",type:"Float",isOptional:!0},{name:"matrix",type:"Matrix",isOptional:!0},{name:"offset",type:"Vector3",isOptional:!0},{name:"rotation",type:"Vector3",isOptional:!0},{name:"scaling",type:"Vector3",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)",removeDuplicatedPositions:"boolean \u2014 deduplicate vertices before instancing (default: true)"},defaultSerializedProperties:{evaluateContext:!0,removeDuplicatedPositions:!0}},InstantiateOnVolumeBlock:{className:"InstantiateOnVolumeBlock",category:"Instance",description:"Scatters instances inside the volume of a source geometry.",inputs:[{name:"geometry",type:"Geometry"},{name:"instance",type:"Geometry",isOptional:!0},{name:"count",type:"Int",isOptional:!0},{name:"matrix",type:"Matrix",isOptional:!0},{name:"offset",type:"Vector3",isOptional:!0},{name:"rotation",type:"Vector3",isOptional:!0},{name:"scaling",type:"Vector3",isOptional:!0},{name:"gridSize",type:"Int",isOptional:!0}],outputs:[{name:"output",type:"Geometry"}],properties:{evaluateContext:"boolean (default: true)",gridMode:"boolean \u2014 use grid-based placement (default: false)"},defaultSerializedProperties:{evaluateContext:!0,gridMode:!1}},TranslationBlock:{className:"TranslationBlock",category:"Matrix",description:"Creates a translation matrix from a Vector3 input.",inputs:[{name:"translation",type:"Vector3"}],outputs:[{name:"matrix",type:"Matrix"}]},ScalingBlock:{className:"ScalingBlock",category:"Matrix",description:"Creates a scaling matrix from a Vector3 input.",inputs:[{name:"scale",type:"Vector3"}],outputs:[{name:"matrix",type:"Matrix"}]},RotationXBlock:{className:"RotationXBlock",category:"Matrix",description:"Creates a rotation matrix around the X axis from an angle (in radians).",inputs:[{name:"angle",type:"Float",isOptional:!0}],outputs:[{name:"matrix",type:"Matrix"}]},RotationYBlock:{className:"RotationYBlock",category:"Matrix",description:"Creates a rotation matrix around the Y axis from an angle (in radians).",inputs:[{name:"angle",type:"Float",isOptional:!0}],outputs:[{name:"matrix",type:"Matrix"}]},RotationZBlock:{className:"RotationZBlock",category:"Matrix",description:"Creates a rotation matrix around the Z axis from an angle (in radians).",inputs:[{name:"angle",type:"Float",isOptional:!0}],outputs:[{name:"matrix",type:"Matrix"}]},AlignBlock:{className:"AlignBlock",category:"Matrix",description:"Creates a rotation matrix that aligns a source direction to a target direction.",inputs:[{name:"source",type:"Vector3",isOptional:!0},{name:"target",type:"Vector3",isOptional:!0}],outputs:[{name:"matrix",type:"Matrix"}]},MatrixComposeBlock:{className:"MatrixComposeBlock",category:"Matrix",description:"Multiplies two matrices together (matrix0 \xD7 matrix1).",inputs:[{name:"matrix0",type:"Matrix"},{name:"matrix1",type:"Matrix"}],outputs:[{name:"output",type:"Matrix"}]},MathBlock:{className:"MathBlock",category:"Math",description:"Performs basic math: Add, Subtract, Multiply, Divide, Max, Min. Works on scalars and vectors.",inputs:[{name:"left",type:"AutoDetect"},{name:"right",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{operation:"MathBlockOperations \u2014 Add (0), Subtract (1), Multiply (2), Divide (3), Max (4), Min (5). Default: Add"},defaultSerializedProperties:{operation:0}},GeometryTrigonometryBlock:{className:"GeometryTrigonometryBlock",category:"Math",description:"Applies a trigonometric or unary math function: Cos, Sin, Abs, Exp, Round, Floor, Ceiling, Sqrt, Log, Tan, ArcTan, ArcCos, ArcSin, Sign, Negate, OneMinus, Reciprocal, ToDegrees, ToRadians, Fract, Exp2.",inputs:[{name:"input",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{operation:"GeometryTrigonometryBlockOperations \u2014 Cos (0), Sin (1), Abs (2), Exp (3), Round (4), Floor (5), Ceiling (6), Sqrt (7), Log (8), Tan (9), ArcTan (10), ArcCos (11), ArcSin (12), Sign (13), Negate (14), OneMinus (15), Reciprocal (16), ToDegrees (17), ToRadians (18), Fract (19), Exp2 (20). Default: Cos"},defaultSerializedProperties:{operation:0}},ConditionBlock:{className:"ConditionBlock",category:"Math",description:"Conditional block: if left <test> right then ifTrue else ifFalse.",inputs:[{name:"left",type:"Float"},{name:"right",type:"Float",isOptional:!0},{name:"ifTrue",type:"AutoDetect",isOptional:!0},{name:"ifFalse",type:"AutoDetect",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{test:"ConditionBlockTests \u2014 Equal (0), NotEqual (1), LessThan (2), GreaterThan (3), LessOrEqual (4), GreaterOrEqual (5), Xor (6), Or (7), And (8). Default: Equal",epsilon:"number \u2014 comparison epsilon (default: 0)"},defaultSerializedProperties:{test:0,epsilon:0}},RandomBlock:{className:"RandomBlock",category:"Math",description:"Generates random values between min and max. Supports scalars and vectors.",inputs:[{name:"min",type:"AutoDetect"},{name:"max",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{lockMode:"RandomBlockLocks \u2014 None (0), LoopID (1), InstanceID (2), Once (3). Default: None"},defaultSerializedProperties:{lockMode:0}},NoiseBlock:{className:"NoiseBlock",category:"Math",description:"Generates Perlin-like noise with configurable offset, scale, octaves, and roughness.",inputs:[{name:"offset",type:"Vector3",isOptional:!0},{name:"scale",type:"Float",isOptional:!0},{name:"octaves",type:"Float",isOptional:!0},{name:"roughness",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"Float"}]},GeometryClampBlock:{className:"GeometryClampBlock",category:"Math",description:"Clamps a value between min and max bounds.",inputs:[{name:"value",type:"AutoDetect"},{name:"min",type:"Float",isOptional:!0},{name:"max",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryLerpBlock:{className:"GeometryLerpBlock",category:"Math",description:"Linear interpolation between left and right using a gradient (0\u20131).",inputs:[{name:"left",type:"AutoDetect"},{name:"right",type:"AutoDetect"},{name:"gradient",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryNLerpBlock:{className:"GeometryNLerpBlock",category:"Math",description:"Normalised linear interpolation \u2014 same as lerp but normalizes the result (useful for vectors).",inputs:[{name:"left",type:"AutoDetect"},{name:"right",type:"AutoDetect"},{name:"gradient",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometrySmoothStepBlock:{className:"GeometrySmoothStepBlock",category:"Math",description:"Hermite smooth interpolation between edge0 and edge1.",inputs:[{name:"value",type:"AutoDetect"},{name:"edge0",type:"Float",isOptional:!0},{name:"edge1",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryStepBlock:{className:"GeometryStepBlock",category:"Math",description:"Step function: returns 0 if value < edge, else 1.",inputs:[{name:"value",type:"AutoDetect"},{name:"edge",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryDotBlock:{className:"GeometryDotBlock",category:"Vector",description:"Computes the dot product of two vectors.",inputs:[{name:"left",type:"AutoDetect"},{name:"right",type:"AutoDetect"}],outputs:[{name:"output",type:"Float"}]},GeometryCrossBlock:{className:"GeometryCrossBlock",category:"Vector",description:"Computes the cross product of two Vector3s.",inputs:[{name:"left",type:"AutoDetect"},{name:"right",type:"AutoDetect"}],outputs:[{name:"output",type:"Vector3"}]},GeometryLengthBlock:{className:"GeometryLengthBlock",category:"Vector",description:"Computes the length (magnitude) of a vector.",inputs:[{name:"value",type:"AutoDetect"}],outputs:[{name:"output",type:"Float"}]},GeometryDistanceBlock:{className:"GeometryDistanceBlock",category:"Vector",description:"Computes the distance between two vectors.",inputs:[{name:"left",type:"AutoDetect"},{name:"right",type:"AutoDetect"}],outputs:[{name:"output",type:"Float"}]},NormalizeVectorBlock:{className:"NormalizeVectorBlock",category:"Vector",description:"Normalizes a vector to unit length.",inputs:[{name:"input",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryModBlock:{className:"GeometryModBlock",category:"Math",description:"Modulo operation (left % right).",inputs:[{name:"left",type:"AutoDetect"},{name:"right",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryPowBlock:{className:"GeometryPowBlock",category:"Math",description:"Power function (value ^ power).",inputs:[{name:"value",type:"AutoDetect"},{name:"power",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryArcTan2Block:{className:"GeometryArcTan2Block",category:"Math",description:"Computes atan2(x, y) \u2014 the two-argument arctangent.",inputs:[{name:"x",type:"AutoDetect"},{name:"y",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryReplaceColorBlock:{className:"GeometryReplaceColorBlock",category:"Color",description:"Replaces values near a reference color with a replacement color.",inputs:[{name:"value",type:"AutoDetect"},{name:"reference",type:"AutoDetect"},{name:"distance",type:"Float",isOptional:!0},{name:"replacement",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryPosterizeBlock:{className:"GeometryPosterizeBlock",category:"Color",description:"Reduces color to a set number of discrete steps (posterization effect).",inputs:[{name:"value",type:"AutoDetect"},{name:"steps",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryDesaturateBlock:{className:"GeometryDesaturateBlock",category:"Color",description:"Desaturates a color by mixing it towards its luminance value.",inputs:[{name:"color",type:"Vector3"},{name:"level",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"Vector3"}]},MappingBlock:{className:"MappingBlock",category:"Mapping",description:"Generates UV coordinates from position and normal using Spherical, Cylindrical, or Cubic projection.",inputs:[{name:"position",type:"Vector3"},{name:"normal",type:"Vector3"},{name:"center",type:"Vector3",isOptional:!0}],outputs:[{name:"uv",type:"Vector2"}],properties:{mapping:"MappingTypes \u2014 Spherical (0), Cylindrical (1), Cubic (2). Default: Spherical"},defaultSerializedProperties:{mapping:0}},MapRangeBlock:{className:"MapRangeBlock",category:"Math",description:"Remaps a value from one range [fromMin, fromMax] to another [toMin, toMax].",inputs:[{name:"value",type:"AutoDetect"},{name:"fromMin",type:"Float",isOptional:!0},{name:"fromMax",type:"Float",isOptional:!0},{name:"toMin",type:"Float",isOptional:!0},{name:"toMax",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryRotate2dBlock:{className:"GeometryRotate2dBlock",category:"Math",description:"Rotates a Vector2 by an angle (in radians).",inputs:[{name:"input",type:"Vector2"},{name:"angle",type:"Float",isOptional:!0}],outputs:[{name:"output",type:"Vector2"}]},GeometryEaseBlock:{className:"GeometryEaseBlock",category:"Math",description:"Applies an easing function to the input. Supports Sine, Quad, Cubic, Quart, Quint, Expo, Circ, Back, Elastic variants (In/Out/InOut).",inputs:[{name:"input",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{type:"GeometryEaseBlockTypes \u2014 EaseInSine (0), EaseOutSine (1), EaseInOutSine (2), EaseInQuad (3), EaseOutQuad (4), EaseInOutQuad (5), EaseInCubic (6), EaseOutCubic (7), EaseInOutCubic (8), EaseInQuart (9), EaseOutQuart (10), EaseInOutQuart (11), EaseInQuint (12), EaseOutQuint (13), EaseInOutQuint (14), EaseInExpo (15), EaseOutExpo (16), EaseInOutExpo (17), EaseInCirc (18), EaseOutCirc (19), EaseInOutCirc (20), EaseInBack (21), EaseOutBack (22), EaseInOutBack (23), EaseInElastic (24), EaseOutElastic (25), EaseInOutElastic (26). Default: EaseInOutSine"},defaultSerializedProperties:{type:2}},VectorConverterBlock:{className:"VectorConverterBlock",category:"Converter",description:"Splits vectors into components and/or assembles components into vectors.",inputs:[{name:"xyzw",type:"Vector4",isOptional:!0},{name:"xyz ",type:"Vector3",isOptional:!0},{name:"xy ",type:"Vector2",isOptional:!0},{name:"zw ",type:"Vector2",isOptional:!0},{name:"x ",type:"Float",isOptional:!0},{name:"y ",type:"Float",isOptional:!0},{name:"z ",type:"Float",isOptional:!0},{name:"w ",type:"Float",isOptional:!0}],outputs:[{name:"xyzw",type:"Vector4"},{name:"xyz",type:"Vector3"},{name:"xy",type:"Vector2"},{name:"zw",type:"Vector2"},{name:"x",type:"Float"},{name:"y",type:"Float"},{name:"z",type:"Float"},{name:"w",type:"Float"}]},IntFloatConverterBlock:{className:"IntFloatConverterBlock",category:"Converter",description:"Converts between Int and Float types.",inputs:[{name:"float ",type:"Float",isOptional:!0},{name:"int ",type:"Int",isOptional:!0}],outputs:[{name:"float",type:"Float"},{name:"int",type:"Int"}]},DebugBlock:{className:"DebugBlock",category:"Utility",description:"Pass-through block that logs values during graph evaluation. Useful for debugging.",inputs:[{name:"input",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryElbowBlock:{className:"GeometryElbowBlock",category:"Utility",description:"Simple pass-through (reroute) block. Useful for organizing graph layout.",inputs:[{name:"input",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},GeometryInterceptorBlock:{className:"GeometryInterceptorBlock",category:"Utility",description:"Pass-through that triggers an observable when traversed. Useful for runtime interception.",inputs:[{name:"input",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}]},TeleportInBlock:{className:"TeleportInBlock",category:"Teleport",description:"Teleport entry \u2014 sends data to linked TeleportOutBlock endpoints without visible wires.",inputs:[{name:"input",type:"AutoDetect"}],outputs:[]},TeleportOutBlock:{className:"TeleportOutBlock",category:"Teleport",description:"Teleport exit \u2014 receives data from a linked TeleportInBlock.",inputs:[],outputs:[{name:"output",type:"BasedOnInput"}],properties:{entryPoint:"number \u2014 block ID of the linked TeleportInBlock"}},GeometryTextureBlock:{className:"GeometryTextureBlock",category:"Texture",description:"Provides texture data for use with GeometryTextureFetchBlock. The texture is loaded programmatically.",inputs:[],outputs:[{name:"texture",type:"Texture"}],properties:{serializedCachedData:"boolean \u2014 whether to embed cached pixel data (default: false)"},defaultSerializedProperties:{serializedCachedData:!1}},GeometryCurveBlock:{className:"GeometryCurveBlock",category:"Math",description:"Applies an easing/curve function to the input. Same curves as GeometryEaseBlock but serialised as curveType.",inputs:[{name:"input",type:"AutoDetect"}],outputs:[{name:"output",type:"BasedOnInput"}],properties:{curveType:"GeometryCurveBlockTypes \u2014 EaseInSine (0), EaseOutSine (1), EaseInOutSine (2), EaseInQuad (3), EaseOutQuad (4), EaseInOutQuad (5), EaseInCubic (6), EaseOutCubic (7), EaseInOutCubic (8), EaseInQuart (9), EaseOutQuart (10), EaseInOutQuart (11), EaseInQuint (12), EaseOutQuint (13), EaseInOutQuint (14), EaseInExpo (15), EaseOutExpo (16), EaseInOutExpo (17), EaseInCirc (18), EaseOutCirc (19), EaseInOutCirc (20), EaseInBack (21), EaseOutBack (22), EaseInOutBack (23), EaseInElastic (24), EaseOutElastic (25), EaseInOutElastic (26). Default: EaseInOutSine"},defaultSerializedProperties:{curveType:2}},GeometryTextureFetchBlock:{className:"GeometryTextureFetchBlock",category:"Texture",description:"Samples a texture at given UV coordinates, outputting RGBA components.",inputs:[{name:"texture",type:"Texture"},{name:"coordinates",type:"Vector2"}],outputs:[{name:"rgba",type:"Vector4"},{name:"rgb",type:"Vector3"},{name:"r",type:"Float"},{name:"g",type:"Float"},{name:"b",type:"Float"},{name:"a",type:"Float"}],properties:{clampCoordinates:"boolean \u2014 clamp UV to 0-1 range (default: true)",interpolation:"boolean \u2014 bilinear interpolation (default: true)"},defaultSerializedProperties:{clampCoordinates:!0,interpolation:!0}}};function Tv(){const e=new Map;for(const[r,o]of Object.entries(En)){const n=o.category;e.has(n)||e.set(n,[]),e.get(n).push(` ${r}: ${o.description.split(".")[0]}`)}const t=[];for(const[r,o]of e)t.push(`## ${r}`),t.push(...o),t.push("");return t.join(`
|
|
94
|
+
`)}function Bx(e){return En[e]}const de={Int:1,Float:2,Vector2:4,Vector3:8,Vector4:16,Matrix:32,Geometry:64,Texture:128,AutoDetect:1024,BasedOnInput:2048,Undefined:4096},Ie={None:0,Positions:1,Normals:2,Tangents:3,UV:4,UV2:5,UV3:6,UV4:7,UV5:8,UV6:9,Colors:10,VertexID:11,FaceID:12,GeometryID:13,CollectionID:14,LoopID:15,InstanceID:16,LatticeID:17,LatticeControl:18},$i={[Ie.None]:de.AutoDetect,[Ie.Positions]:de.Vector3,[Ie.Normals]:de.Vector3,[Ie.Tangents]:de.Vector3,[Ie.UV]:de.Vector2,[Ie.UV2]:de.Vector2,[Ie.UV3]:de.Vector2,[Ie.UV4]:de.Vector2,[Ie.UV5]:de.Vector2,[Ie.UV6]:de.Vector2,[Ie.Colors]:de.Vector4,[Ie.VertexID]:de.Int,[Ie.FaceID]:de.Int,[Ie.GeometryID]:de.Int,[Ie.CollectionID]:de.Int,[Ie.LoopID]:de.Int,[Ie.InstanceID]:de.Int,[Ie.LatticeID]:de.Int,[Ie.LatticeControl]:de.Vector3},Lx={Add:0,Subtract:1,Multiply:2,Divide:3,Max:4,Min:5},Fx={Cos:0,Sin:1,Abs:2,Exp:3,Round:4,Floor:5,Ceiling:6,Sqrt:7,Log:8,Tan:9,ArcTan:10,ArcCos:11,ArcSin:12,Sign:13,Negate:14,OneMinus:15,Reciprocal:16,ToDegrees:17,ToRadians:18,Fract:19,Exp2:20},Gx={Equal:0,NotEqual:1,LessThan:2,GreaterThan:3,LessOrEqual:4,GreaterOrEqual:5,Xor:6,Or:7,And:8},Vx={Intersect:0,Subtract:1,Union:2},qx={None:0,LoopID:1,InstanceID:2,Once:3},Jx={Max:0,Min:1,Sum:2},Hx={Spherical:0,Cylindrical:1,Cubic:2},Pv={EaseInSine:0,EaseOutSine:1,EaseInOutSine:2,EaseInQuad:3,EaseOutQuad:4,EaseInOutQuad:5,EaseInCubic:6,EaseOutCubic:7,EaseInOutCubic:8,EaseInQuart:9,EaseOutQuart:10,EaseInOutQuart:11,EaseInQuint:12,EaseOutQuint:13,EaseInOutQuint:14,EaseInExpo:15,EaseOutExpo:16,EaseInOutExpo:17,EaseInCirc:18,EaseOutCirc:19,EaseInOutCirc:20,EaseInBack:21,EaseOutBack:22,EaseInOutBack:23,EaseInElastic:24,EaseOutElastic:25,EaseInOutElastic:26},Er={MathBlock:{operation:Lx},GeometryTrigonometryBlock:{operation:Fx},ConditionBlock:{test:Gx},BooleanGeometryBlock:{operation:Vx},RandomBlock:{lockMode:qx},AggregatorBlock:{aggregation:Jx},MappingBlock:{mapping:Hx},GeometryEaseBlock:{type:Pv},GeometryCurveBlock:{curveType:Pv}};class bi{_geometries=new Map;_nextId=new Map;_nextX=new Map;createGeometry(t,r){const o={customType:"BABYLON.NodeGeometry",outputNodeId:-1,blocks:[],comment:r};return this._geometries.set(t,o),this._nextId.set(t,1),this._nextX.set(t,0),o}getGeometry(t){return this._geometries.get(t)}listGeometries(){return Array.from(this._geometries.keys())}deleteGeometry(t){return this._nextId.delete(t),this._nextX.delete(t),this._geometries.delete(t)}clearAll(){this._geometries.clear(),this._nextId.clear(),this._nextX.clear()}addBlock(t,r,o,n){const i=this._geometries.get(t);if(!i)return`Geometry "${t}" not found. Create it first.`;const a=En[r];if(!a)return`Unknown block type "${r}". Use list_block_types to see available blocks.`;const s=[],c=this._nextId.get(t);this._nextId.set(t,c+1);const u=o??`${r}_${c}`,l={customType:`BABYLON.${a.className}`,id:c,name:u,inputs:a.inputs.map(p=>({name:p.name,displayName:p.name})),outputs:a.outputs.map(p=>({name:p.name,displayName:p.name}))};if(r==="GeometryInputBlock"&&(l.type=de.Float,l.contextualValue=Ie.None,l.min=0,l.max=0,l.groupInInspector="",l.displayInInspector=!0),a.defaultSerializedProperties)for(const[p,m]of Object.entries(a.defaultSerializedProperties))l[p]=m;if(n)for(const[p,m]of Object.entries(n))if(r==="GeometryInputBlock"&&p==="type"&&typeof m=="string")l.type=de[m]??m;else if(r==="GeometryInputBlock"&&p==="contextualValue"&&typeof m=="string"){const h=Ie[m]??m;l.contextualValue=h,typeof h=="number"&&h!==Ie.None&&$i[h]!==void 0&&(l.type=$i[h])}else typeof m=="string"&&Er[r]?.[p]?l[p]=Er[r][p][m]??m:l[p]=m;r==="GeometryInputBlock"&&(this._normaliseInputBlockValue(l),this._ensureDefaultValue(l)),r==="GeometryOutputBlock"&&(i.outputNodeId=c);const d=this._nextX.get(t);if(this._nextX.set(t,d+280),i.editorData||(i.editorData={locations:[]}),i.editorData.locations.push({blockId:c,x:d,y:0}),r==="GeometryInputBlock"){const p=l.contextualValue,m=l.value!==void 0;p===Ie.None&&!m&&s.push(`\u26A0 GeometryInputBlock "${l.name}" has contextualValue=None and no value. Set either a contextualValue (e.g. 'Positions', 'Normals', 'UV', 'VertexID') or provide a constant value.`)}return i.blocks.push(l),{block:l,warnings:s.length>0?s:void 0}}_normaliseInputBlockValue(t){const r=t.value;if(r==null)return;const o=t.type;if(typeof r=="number"){if(o===de.Matrix){t.value=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t.valueType="BABYLON.Matrix";return}t.valueType="number";return}if(Array.isArray(r)){t.valueType||(t.valueType=this._inferValueType(o,r.length));return}if(typeof r=="object"){const n=r;"x"in n&&("w"in n?(t.value=[n.x,n.y,n.z,n.w],t.valueType="BABYLON.Vector4"):"z"in n?(t.value=[n.x,n.y,n.z],t.valueType="BABYLON.Vector3"):(t.value=[n.x,n.y],t.valueType="BABYLON.Vector2"))}}_inferValueType(t,r){const o={[de.Vector2]:"BABYLON.Vector2",[de.Vector3]:"BABYLON.Vector3",[de.Vector4]:"BABYLON.Vector4",[de.Matrix]:"BABYLON.Matrix"};return t!==void 0&&o[t]?o[t]:{2:"BABYLON.Vector2",3:"BABYLON.Vector3",4:"BABYLON.Vector4",16:"BABYLON.Matrix"}[r]??"BABYLON.Vector3"}_ensureDefaultValue(t){if(t.value!==void 0&&t.value!==null)return;const r=t.contextualValue;if(r!==void 0&&r!==Ie.None)return;const o=t.type;if(o===void 0)return;const i={[de.Float]:{value:0,valueType:"number"},[de.Int]:{value:0,valueType:"number"},[de.Vector2]:{value:[0,0],valueType:"BABYLON.Vector2"},[de.Vector3]:{value:[0,0,0],valueType:"BABYLON.Vector3"},[de.Vector4]:{value:[0,0,0,0],valueType:"BABYLON.Vector4"},[de.Matrix]:{value:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],valueType:"BABYLON.Matrix"}}[o];i&&(t.value=i.value,t.valueType=i.valueType)}removeBlock(t,r){const o=this._geometries.get(t);if(!o)return`Geometry "${t}" not found.`;const n=o.blocks.findIndex(i=>i.id===r);if(n===-1)return`Block ${r} not found.`;for(const i of o.blocks)for(const a of i.inputs)a.targetBlockId===r&&(delete a.targetBlockId,delete a.targetConnectionName);return o.blocks.splice(n,1),o.outputNodeId===r&&(o.outputNodeId=-1),o.editorData&&(o.editorData.locations=o.editorData.locations.filter(i=>i.blockId!==r)),"OK"}connectBlocks(t,r,o,n,i){const a=this._geometries.get(t);if(!a)return`Geometry "${t}" not found.`;const s=a.blocks.find(d=>d.id===r);if(!s)return`Source block ${r} not found.`;const c=a.blocks.find(d=>d.id===n);if(!c)return`Target block ${n} not found.`;if(!s.outputs.find(d=>d.name===o)){const d=s.outputs.map(p=>p.name).join(", ");return`Output "${o}" not found on block ${r} ("${s.name}"). Available: ${d}`}const l=c.inputs.find(d=>d.name===i);if(!l){const d=c.inputs.map(p=>p.name).join(", ");return`Input "${i}" not found on block ${n} ("${c.name}"). Available: ${d}`}return l.inputName=l.name,l.targetBlockId=r,l.targetConnectionName=o,"OK"}disconnectInput(t,r,o){const n=this._geometries.get(t);if(!n)return`Geometry "${t}" not found.`;const i=n.blocks.find(s=>s.id===r);if(!i)return`Block ${r} not found.`;const a=i.inputs.find(s=>s.name===o);return a?(delete a.inputName,delete a.targetBlockId,delete a.targetConnectionName,"OK"):`Input "${o}" not found.`}describeGeometry(t){const r=this._geometries.get(t);if(!r)return`Geometry "${t}" not found.`;const o=[];o.push(`Geometry: ${t}`),o.push(`Blocks (${r.blocks.length}):`);for(const n of r.blocks){const i=n.customType.replace("BABYLON.","");if(o.push(` [${n.id}] ${n.name} (${i})`),n.inputs.length>0){for(const a of n.inputs)if(a.targetBlockId!==void 0){const s=r.blocks.find(c=>c.id===a.targetBlockId);o.push(` \u2190 ${a.name} \u2190 [${a.targetBlockId}] ${s?.name??"?"}.${a.targetConnectionName}`)}}}return o.push(`Output node: ${r.outputNodeId>=0?`[${r.outputNodeId}]`:"(not set)"}`),r.comment&&o.push(`Comment: ${r.comment}`),o.join(`
|
|
95
|
+
`)}describeBlock(t,r){const o=this._geometries.get(t);if(!o)return`Geometry "${t}" not found.`;const n=o.blocks.find(u=>u.id===r);if(!n)return`Block ${r} not found.`;const i=n.customType.replace("BABYLON.",""),a=[];a.push(`Block [${n.id}]: "${n.name}" \u2014 type ${i}`),a.push(`
|
|
96
|
+
Inputs:`);for(const u of n.inputs){const l=u.targetBlockId!==void 0?` \u2190 connected to [${u.targetBlockId}].${u.targetConnectionName}`:" (unconnected)";a.push(` \u2022 ${u.name}${l}`)}a.push(`
|
|
97
|
+
Outputs:`);for(const u of n.outputs){const l=[];for(const p of o.blocks)for(const m of p.inputs)m.targetBlockId===r&&m.targetConnectionName===u.name&&l.push(`[${p.id}] ${p.name}.${m.name}`);const d=l.length>0?` \u2192 ${l.join(", ")}`:" (unconnected)";a.push(` \u2022 ${u.name}${d}`)}const s=new Set(["customType","id","name","inputs","outputs"]),c=Object.entries(n).filter(([u])=>!s.has(u));if(c.length>0){a.push(`
|
|
98
|
+
Properties:`);for(const[u,l]of c)a.push(` ${u}: ${JSON.stringify(l)}`)}return a.join(`
|
|
99
|
+
`)}exportJSON(t){const r=this._geometries.get(t);if(r){for(const o of r.blocks){o.customType==="BABYLON.GeometryInputBlock"&&(this._normaliseInputBlockValue(o),this._ensureDefaultValue(o));const n=o.customType.replace("BABYLON.",""),i=En[n];if(i?.defaultSerializedProperties)for(const[s,c]of Object.entries(i.defaultSerializedProperties))o[s]===void 0&&(o[s]=c);const a=Er[n];if(a)for(const[s,c]of Object.entries(a))typeof o[s]=="string"&&(o[s]=c[o[s]]??o[s])}return this._layoutGraph(r),JSON.stringify(r,null,2)}}static COL_WIDTH=340;static ROW_HEIGHT=180;_layoutGraph(t){const r=t.blocks;if(r.length===0)return;const o=new Map;for(const g of r)o.set(g.id,g);const n=new Map,i=new Map;for(const g of r)n.set(g.id,new Set),i.set(g.id,new Set);for(const g of r)for(const v of g.inputs)v.targetBlockId!==void 0&&(n.get(g.id).add(v.targetBlockId),i.get(v.targetBlockId)?.add(g.id));const a=new Map,s=[];if(t.outputNodeId>=0&&o.has(t.outputNodeId))a.set(t.outputNodeId,0),s.push(t.outputNodeId);else for(const g of r)g.customType==="BABYLON.GeometryOutputBlock"&&(a.set(g.id,0),s.push(g.id));s.length===0&&r.length>0&&(a.set(r[r.length-1].id,0),s.push(r[r.length-1].id));let c=0;for(;c<s.length;){const g=s[c++],v=a.get(g);for(const y of n.get(g)??[]){const b=a.get(y);(b===void 0||v+1>b)&&(a.set(y,v+1),s.push(y))}}const u=Math.max(0,...a.values());for(const g of r)a.has(g.id)||a.set(g.id,u+1);const l=Math.max(0,...a.values()),d=new Map;for(const[g,v]of a)d.set(g,l-v);const p=new Map;for(const g of r){const v=d.get(g.id);p.has(v)||p.set(v,[]),p.get(v).push(g.id)}const m=[...p.keys()].sort((g,v)=>v-g),h=new Map;for(const g of m){const v=p.get(g);if(g===m[0])v.forEach((y,b)=>h.set(y,b));else{const y=new Map;for(const b of v){const I=i.get(b),P=[];for(const M of I){const G=h.get(M);G!==void 0&&P.push(G)}P.length>0?y.set(b,P.reduce((M,G)=>M+G,0)/P.length):y.set(b,9999)}v.sort((b,I)=>y.get(b)-y.get(I)),v.forEach((b,I)=>h.set(b,I))}}const $=[];for(const g of r){const v=d.get(g.id),y=h.get(g.id);$.push({blockId:g.id,x:v*bi.COL_WIDTH,y:y*bi.ROW_HEIGHT})}t.editorData?t.editorData.locations=$:t.editorData={locations:$}}importJSON(t,r){try{const o=Px(r);this._geometries.set(t,o);const n=o.blocks.reduce((i,a)=>Math.max(i,a.id),0);return this._nextId.set(t,n+1),this._nextX.set(t,o.blocks.length*280),"OK"}catch(o){return o.message}}setBlockProperties(t,r,o){const n=this._geometries.get(t);if(!n)return`Geometry "${t}" not found.`;const i=n.blocks.find(s=>s.id===r);if(!i)return`Block ${r} not found.`;const a=i.customType.replace("BABYLON.","");for(const[s,c]of Object.entries(o))if(a==="GeometryInputBlock"&&s==="type"&&typeof c=="string")i.type=de[c]??c;else if(a==="GeometryInputBlock"&&s==="contextualValue"&&typeof c=="string"){const u=Ie[c]??c;i.contextualValue=u,typeof u=="number"&&u!==Ie.None&&$i[u]!==void 0&&(i.type=$i[u])}else typeof c=="string"&&Er[a]?.[s]?i[s]=Er[a][s][c]??c:i[s]=c;return a==="GeometryInputBlock"&&(this._normaliseInputBlockValue(i),this._ensureDefaultValue(i)),"OK"}validateGeometry(t){const r=this._geometries.get(t);if(!r)return[`Geometry "${t}" not found.`];const o=[];r.blocks.some(i=>i.customType==="BABYLON.GeometryOutputBlock")||o.push("ERROR: Missing GeometryOutputBlock \u2014 every geometry graph needs exactly one."),r.outputNodeId<0?o.push("ERROR: outputNodeId is not set. There should be a GeometryOutputBlock."):r.blocks.find(i=>i.id===r.outputNodeId)||o.push(`ERROR: outputNodeId references block ${r.outputNodeId} which does not exist.`);for(const i of r.blocks){const a=i.customType.replace("BABYLON.",""),s=Object.values(En).find(c=>c.className===a);if(s)for(const c of i.inputs){const u=s.inputs.find(l=>l.name===c.name);c.targetBlockId===void 0&&u&&!u.isOptional&&o.push(`WARNING: Block [${i.id}] "${i.name}" has required input "${c.name}" that is not connected.`)}}for(const i of r.blocks)for(const a of i.inputs)if(a.targetBlockId!==void 0){const s=r.blocks.find(c=>c.id===a.targetBlockId);s?s.outputs.find(c=>c.name===a.targetConnectionName)||o.push(`WARNING: Block [${i.id}] "${i.name}" input "${a.name}" references output "${a.targetConnectionName}" which doesn't exist on block [${s.id}].`):o.push(`ERROR: Block [${i.id}] "${i.name}" input "${a.name}" references non-existent block ${a.targetBlockId}.`)}for(const i of r.blocks){if(i.customType!=="BABYLON.GeometryInputBlock")continue;const a=i.contextualValue,s=i.value!==void 0;(a===void 0||a===Ie.None)&&!s&&o.push(`WARNING: GeometryInputBlock [${i.id}] "${i.name}" has no contextual value and no constant value \u2014 it provides no data.`)}for(const i of r.blocks){if(i.customType==="BABYLON.GeometryOutputBlock"||i.customType==="BABYLON.GeometryInputBlock")continue;const a=i.inputs.some(c=>c.targetBlockId!==void 0),s=r.blocks.some(c=>c.inputs.some(u=>u.targetBlockId===i.id));!a&&!s&&o.push(`WARNING: Block [${i.id}] "${i.name}" (${i.customType.replace("BABYLON.","")}) has no connections \u2014 it is an orphan and does nothing.`)}return o.length===0&&o.push("No issues found \u2014 graph looks valid."),o}}const Kx="https://cdn.babylonjs.com",Wx={havok:"havok/HavokPhysics_umd.js",ammo:"ammo/ammo.js",recast:"recast.js"},ou="https://snippet.babylonjs.com";async function Yx(e,t=ou){let r=e.replace(/#/g,"/");r.includes("/")||(r+="/0");const o=`${t}/${r}`,n=await fetch(o);if(!n.ok)throw new Error(`Failed to fetch snippet "${e}": ${n.status} ${n.statusText}`);return await n.json()}const Xx=[["nodeMaterial","nodeMaterial"],["nodeGeometry","nodeGeometry"],["nodeRenderGraph","nodeRenderGraph"],["nodeParticle","nodeParticle"],["gui","gui"],["encodedGui","gui"],["animations","animation"],["animation","animation"],["particleSystem","particleSystem"],["spriteManager","spriteManager"],["shaderMaterial","shaderMaterial"]];function Qx(e){const t=atob(e),r=new Uint8Array(t.length);for(let o=0;o<t.length;o++)r[o]=t.charCodeAt(o);return r.buffer}function Ev(e){const t=new Uint8Array(Qx(e));return new TextDecoder("utf-8").decode(t)}function eT(e){if(e.files&&typeof e.files=="object"&&e.v!==void 0||typeof e.code=="string")return"playground";for(const[t,r]of Xx)if(t in e)return r;return"unknown"}function tT(e,t,r,o){let n;switch(t){case"gui":{typeof e.encodedGui=="string"?n=JSON.parse(Ev(e.encodedGui)):n=typeof e.gui=="string"?JSON.parse(e.gui):e.gui;break}case"animation":{typeof e.animations=="string"?n=JSON.parse(e.animations):e.animations!==void 0?n=e.animations:typeof e.animation=="string"?n=JSON.parse(e.animation):n=e.animation;break}default:{const a=e[t];n=typeof a=="string"?JSON.parse(a):a;break}}return{snippetId:r,type:t,metadata:o,data:n,load:i=>i?i(n):n}}let iu=null;async function nT(){return await import("monaco-editor/esm/vs/language/typescript/lib/typescriptServices")}async function rT(){return iu||(iu=nT().then(e=>e.typescript)),await iu}async function oT(e,t){const r=await rT();return r.transpileModule(e,{compilerOptions:{target:r.ScriptTarget.ESNext,module:r.ModuleKind.ESNext,jsx:t.endsWith(".tsx")?r.JsxEmit.ReactJSX:void 0,esModuleInterop:!1,allowJs:!0,sourceMap:!1,experimentalDecorators:!0,emitDecoratorMetadata:!1,isolatedModules:!0,strict:!1,allowUmdGlobalAccess:!0},fileName:t}).outputText}async function iT(e,t){const r={},o=[];for(const[n,i]of Object.entries(e))if(/\.tsx?$/i.test(n)){const a=n.replace(/\.tsx?$/i,".js");o.push((async()=>{r[a]=await Promise.resolve(t(i,n))})())}else r[n]=i;return await Promise.all(o),r}const zv=["delayCreateScene","delayLoadScene","createScene","CreateScene","createscene"];function aT(e){if(e.includes("class Playground"))return"TS";if(zv.some(o=>e.includes(o))||!e)return"JS";const t=[/\binterface\s+[A-Za-z_]\w*/m,/\benum\s+[A-Za-z_]\w*/m,/\btype\s+[A-Za-z_]\w*\s*=/m,/\bimplements\s+[A-Za-z_]/m,/\breadonly\b/m,/\bpublic\b|\bprivate\b|\bprotected\b/m,/\babstract\s+class\b/m,/\bas\s+const\b/m,/\bimport\s+type\s+/m],r=/[:]\s*[A-Za-z_$][\w$.<>,\s?\\[\]|&]*\b(?![:=])/m.test(e);return t.some(o=>o.test(e))||r?"TS":"JS"}function sT(e,t){let r=e;if(t==="JS"){const n=r.search(/(?:var|let|const|function)\s+(?:createScene|delayCreateScene|delayLoadScene|createEngine|CreateScene)\b/),i=n>0?r.slice(0,n):"";i&&(r=i.replace(/^[^\S\n]*(?:var|let|const)\s+canvas\s*=\s*document\.getElementById\s*\([^)]*\)\s*;?[^\S\n]*$/gm,"// [snippet-loader] canvas provided by host").replace(/^[^\S\n]*(?:var|let|const)\s+engine\s*=\s*new\s+BABYLON\.\w*Engine\b[^;]*;?[^\S\n]*$/gm,"// [snippet-loader] engine provided by host")+r.slice(n))}const o=t==="TS"?"Playground":zv.find(n=>r.includes(n))??"createScene";return r+=`
|
|
100
|
+
export default ${o}
|
|
101
|
+
`,t==="JS"&&/\bfunction\s+createEngine\b|\bvar\s+createEngine\s*=|\bconst\s+createEngine\s*=|\blet\s+createEngine\s*=/.test(r)&&(r+=`
|
|
102
|
+
export { createEngine }
|
|
103
|
+
`),r}function cT(e,t,r){if(e.files&&typeof e.files=="object"&&e.v!==void 0){const c=e,u=c.entry||(c.language==="JS"?"index.js":"index.ts");return{snippetId:t,type:"playground",metadata:r,language:c.language??"JS",engineType:void 0,isMultiFile:!0,manifest:{...c,entry:u},code:c.files[u]??"",files:{...c.files}}}const o=e;let n=String(o.code??"");o.unicode&&(n=Ev(o.unicode));try{const c=JSON.parse(n);if(c&&c.files&&typeof c.files=="object"){const u=c,l=u.entry||(u.language==="JS"?"index.js":"index.ts");return{snippetId:t,type:"playground",metadata:r,language:u.language??"JS",engineType:o.engine,isMultiFile:!0,manifest:{...u,entry:l},code:u.files[l]??"",files:{...u.files}}}}catch{}const i=aT(n),a=i==="TS"?"index.ts":"index.js",s=sT(n,i);return{snippetId:t,type:"playground",metadata:r,language:i,engineType:o.engine,isMultiFile:!1,manifest:null,code:s,files:{[a]:s}}}function Nv(e,t){const r=e.split("/");r.pop();for(const o of t.split("/"))!o||o==="."||(o===".."?r.pop():r.push(o));return r.join("/")}function jv(e,t){const r=[e,`./${e}`,`${e}.js`,`./${e}.js`,`${e}/index.js`,`./${e}/index.js`];for(const o of r)if(o in t)return o}async function uT(e,t,r){const o={},n=new Set,i={};function a(){if(i.__babylonProxy__)return i.__babylonProxy__;const m=globalThis.BABYLON,h=["const B = globalThis.BABYLON || {};","export default B;"];if(m&&typeof m=="object")for(const g of Object.keys(m))/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(g)&&h.push(`export const ${g} = B[${JSON.stringify(g)}];`);const $=URL.createObjectURL(new Blob([h.join(`
|
|
104
|
+
`)],{type:"text/javascript"}));return i.__babylonProxy__=$,$}function s(m){if(i[m])return i[m];if(m.startsWith("@babylonjs/")){const h=a();return i[m]=h,h}if(r&&m in r)return r[m]}function c(m){return/\.m?jsx?$/i.test(m)}function u(m){return`export default ${JSON.stringify(m)};
|
|
105
|
+
`}function l(m){if(o[m])return o[m];if(!(m in e))throw new Error(`Snippet file "${m}" not found in the file map. Check that the manifest entry and import specifiers reference existing files.`);if(!c(m)){const y=URL.createObjectURL(new Blob([u(e[m])],{type:"text/javascript"}));return o[m]=y,y}if(n.has(m)){const y=URL.createObjectURL(new Blob([e[m]],{type:"text/javascript"}));return o[m]=y,y}n.add(m);const h=(y,b,I,P)=>{const M=Nv(m,I),G=jv(M,e);if(G){const ue=l(G);return`${b}${ue}${P}`}return`${b}${I}${P}`},$=(y,b,I,P)=>{const M=s(I);return M?`${b}${M}${P}`:`${b}${I}${P}`};let g=e[m];g=g.replace(/((?:from|import)\s*["'])(\.[^"']+)(["'])/g,h).replace(/(import\s*\(\s*["'])(\.[^"']+)(["']\s*\))/g,h),g=g.replace(/((?:from|import)\s*["'])([^"'./][^"']*)(["'])/g,$).replace(/(import\s*\(\s*["'])([^"'./][^"']*)(["']\s*\))/g,$);const v=URL.createObjectURL(new Blob([g],{type:"text/javascript"}));return o[m]=v,n.delete(m),v}l(t);for(const m of Object.keys(e))!o[m]&&c(m)&&l(m);const p=await import(o[t]??Object.values(o)[0]);for(const m of Object.values(o))URL.revokeObjectURL(m);for(const m of Object.values(i))URL.revokeObjectURL(m);return p}function lT(e){let t=e,r=0;const o=[],n=a=>a.split(",").map(s=>s.trim()).filter(Boolean).map(s=>{const c=/^(\w+)\s+as\s+(\w+)$/.exec(s);return c?`${c[1]}: ${c[2]}`:s}).join(", "),i=(a,s)=>{const c=JSON.stringify(s),u=a.trim();if(u.startsWith("{")){const p=u.slice(1,-1);return`const { ${n(p)} } = require(${c});`}const l=/^\*\s+as\s+(\w+)$/.exec(u);if(l)return`const ${l[1]} = require(${c});`;if(u.includes(",")){const[p,m]=u.split(/,(.+)/).map(g=>g.trim()),h=`__mod_${r++}`,$=[`const ${h} = require(${c});`,`const ${p} = (${h} && Object.prototype.hasOwnProperty.call(${h}, "default")) ? ${h}.default : ${h};`];if(m?.startsWith("{")){const g=m.slice(1,-1),v=n(g);$.push(`const { ${v} } = ${h};`)}else{const g=/^\*\s+as\s+(\w+)$/.exec(m??"");g&&$.push(`const ${g[1]} = ${h};`)}return $.join(`
|
|
106
|
+
`)}const d=`__mod_${r++}`;return`const ${d} = require(${c});
|
|
107
|
+
const ${u} = (${d} && Object.prototype.hasOwnProperty.call(${d}, "default")) ? ${d}.default : ${d};`};if(t=t.replace(/^\s*import\s+([^"'\n;]+?)\s+from\s+["']([^"']+)["']\s*;?\s*$/gm,(a,s,c)=>i(s,c)),t=t.replace(/^\s*import\s+["']([^"']+)["']\s*;?\s*$/gm,(a,s)=>`require(${JSON.stringify(s)});`),t=t.replace(/^\s*export\s+\*\s+from\s+["']([^"']+)["']\s*;?\s*$/gm,(a,s)=>`Object.assign(exports, require(${JSON.stringify(s)}));`),t=t.replace(/^\s*export\s*\{([^}]+)\}\s*from\s*["']([^"']+)["']\s*;?\s*$/gm,(a,s,c)=>{const u=`__reexp_${r++}`,l=[`const ${u} = require(${JSON.stringify(c)});`];for(const d of s.split(",")){const p=d.trim();if(!p)continue;const m=/^(\w+)\s+as\s+(\w+)$/.exec(p),h=m?m[1]:p,$=m?m[2]:p;l.push(`exports.${$} = ${u}.${h};`)}return l.join(`
|
|
108
|
+
`)}),t=t.replace(/^\s*export\s*\{([^}]+)\}\s*;?\s*$/gm,(a,s)=>{const c=[];for(const u of s.split(",")){const l=u.trim();if(!l)continue;const d=/^(\w+)\s+as\s+(\w+)$/.exec(l),p=d?d[1]:l,m=d?d[2]:l;m==="default"?c.push(`exports.default = ${p};`):c.push(`exports.${m} = ${p};`)}return c.join(`
|
|
109
|
+
`)}),t=t.replace(/\bimport\s*\(\s*(["'][^"']+["'])\s*\)/g,"Promise.resolve(require($1))"),t=t.replace(/^\s*export\s+default\s+/gm,"exports.default = "),t=t.replace(/^\s*export\s+(async\s+)?function\s+(\w+)/gm,(a,s,c)=>(o.push(c),`${s??""}function ${c}`)),t=t.replace(/^\s*export\s+class\s+(\w+)/gm,(a,s)=>(o.push(s),`class ${s}`)),t=t.replace(/^\s*export\s+(const|let|var)\s+(\w+)/gm,(a,s,c)=>(o.push(c),`${s} ${c}`)),o.length){const a=[...new Set(o)];t+=`
|
|
110
|
+
${a.map(s=>`exports.${s} = ${s};`).join(`
|
|
111
|
+
`)}
|
|
112
|
+
`}return t}function Dv(e,t,r){const o=Object.keys(e).filter(l=>/\.m?jsx?$/i.test(l)),n={},i={};for(const l of o)n[l]=lT(e[l]);const a=l=>{if(i[l])return i[l].exports;if(!/\.m?jsx?$/i.test(l))return i[l]={exports:e[l]},e[l];const d={exports:{}};i[l]=d;const p=h=>{if(h.startsWith(".")||h.startsWith("/")){const $=Nv(l,h),g=jv($,e);if(g)return a(g);throw new Error(`Unable to resolve script-mode module "${h}" from "${l}"`)}if(h.startsWith("@babylonjs/"))return globalThis.BABYLON??{};if(r&&h in r)throw new Error(`Script mode cannot execute external import "${h}" (${r[h]}). Use moduleFormat: "esm" or pre-bundle dependencies.`);return globalThis[h]};return new Function("require","exports","module",n[l])(p,d.exports,d),d.exports},s=a(t);for(const l of o)l in i||a(l);const c={...s??{}},u=["createScene","CreateScene","createscene","delayCreateScene","delayLoadScene","DelayCreateScene","createEngine","Playground"];for(const l of u)c[l]===void 0&&typeof globalThis[l]<"u"&&(c[l]=globalThis[l]);return c}function dT(e){let t="";/\bexport\s+default\s+class\s+Playground\b/.test(e)?t="default.CreateScene":/\bexport\s+(const|let|var|function)\s+delayCreateScene\b/.test(e)?t="delayCreateScene":/\bexport\s+(const|let|var|function)\s+delayLoadScene\b/.test(e)?t="delayLoadScene":/\bexport\s+(const|let|var|function)\s+createScene\b/.test(e)?t="createScene":/\bexport\s+(const|let|var|function)\s+CreateScene\b/.test(e)?t="CreateScene":/\bexport\s+(const|let|var|function)\s+createscene\b/.test(e)?t="createscene":/\bexport\s+default\b/.test(e)&&(t="default");const r=/\bexport\s+(const|let|var|function)\s+createEngine\b/.test(e)||/\bexport\s*\{[^}]*\bcreateEngine\b[^}]*\}\s*;?/.test(e);return{sceneFunctionName:t,createEngineFn:r?o=>{}:null,createEngineSource:r?"snippet":"default"}}function Cv(e){let t=null,r="";const o=[[()=>e.default?.CreateScene,"default.CreateScene"],[()=>e.default?.DelayCreateScene,"default.DelayCreateScene"],[()=>e.Playground?.CreateScene,"Playground.CreateScene"],[()=>e.Playground?.DelayCreateScene,"Playground.DelayCreateScene"],[()=>typeof e.delayCreateScene=="function"?e.delayCreateScene:null,"delayCreateScene"],[()=>typeof e.delayLoadScene=="function"?e.delayLoadScene:null,"delayLoadScene"],[()=>typeof e.createScene=="function"?e.createScene:null,"createScene"],[()=>typeof e.CreateScene=="function"?e.CreateScene:null,"CreateScene"],[()=>typeof e.createscene=="function"?e.createscene:null,"createscene"],[()=>typeof e.default=="function"?e.default:null,"default"]];for(const[i,a]of o){const s=i();if(s){t=s,r=a;break}}let n=null;return typeof e.createEngine=="function"&&(n=e.createEngine),{createSceneFn:t,sceneFunctionName:r,createEngineFn:n}}function mT(e){return async(t,r)=>{const o=r?.antialias??!0,n=r?.engineOptions??{preserveDrawingBuffer:!0,stencil:!0},i=globalThis.BABYLON;if(!i)throw new Error("BABYLON is not available on globalThis. Ensure Babylon.js is loaded before calling createEngine.");if(e==="WebGPU"&&i.WebGPUEngine){const a=new i.WebGPUEngine(t,{antialias:o,enableAllFeatures:!0,setMaximumLimits:!0,...n});return await a.initAsync(),a}return new i.Engine(t,o,n)}}function pT(e){const t=Object.values(e).join(`
|
|
113
|
+
`);return{havok:/\bHavokPlugin\b/.test(t),ammo:/\bAmmoJSPlugin\b/.test(t),recast:/\bRecastJSPlugin\b/.test(t)}}const au=(()=>{const e=new Set;return async t=>await new Promise((r,o)=>{if(e.has(t))return r();const n=document.createElement("script");n.src=t,n.async=!0,n.onload=()=>{e.add(t),r()},n.onerror=()=>o(new Error(`Failed to load script: ${t}`)),document.head.appendChild(n)})})();async function fT(e,t){const r=globalThis,o=t?.loadScripts===!0,n=t?.scriptUrls??{},i=(t?.baseUrl??Kx).replace(/\/+$/,""),a=s=>n[s]??`${i}/${Wx[s]}`;if(e.ammo){if(typeof r.Ammo!="function"&&o)try{await au(a("ammo"))}catch{}if(typeof r.Ammo=="function")try{await r.Ammo()}catch{}}if(e.recast){if(typeof r.Recast!="function"&&o)try{await au(a("recast"))}catch{}if(typeof r.Recast=="function")try{await r.Recast()}catch{}}if(e.havok){if(typeof r.HavokPhysics!="function"&&o)try{await au(a("havok"))}catch{}if(typeof r.HavokPhysics=="function"&&typeof r.HK>"u")try{r.HK=await r.HavokPhysics()}catch{}}}function hT(e,t,r,o,n,i){let a=null,s;const c=e[t]??"",u=dT(c),l=async()=>(s||(r==="esm"?a=await uT(e,t,n):a=Dv(e,t,n),s=Cv(a),d=s.createEngineFn?"snippet":"default",p=s.sceneFunctionName),s);let d=u.createEngineSource,p=u.sceneFunctionName;const m=async($,g)=>{const{createEngineFn:v}=await l();return v?await v($,g):await mT(o)($,g)},h=async($,g)=>{const{createSceneFn:v}=await l();if(!v)throw new Error("No createScene export found in snippet (tried: default.CreateScene, Playground.CreateScene, createScene, delayCreateScene, default).");const y=globalThis,b=y.engine,I=y.canvas,P=y.BABYLON,M=P?.Tools?.BaseUrl,G=P?.Tools?.PreprocessUrl;r==="script"&&(y.engine=$,y.canvas=g);const ue=void 0;try{let pe;const B=await v.bind(new Proxy({},{get(Q,Y){return Y==="scene"?pe:Y==="engine"?$:Y==="canvas"?g:globalThis[Y]},set(Q,Y,H){return Y==="scene"?(pe=H,!0):(globalThis[Y]=H,!0)}}))($,g);return B!=null&&(pe=B),ue?.(),pe}finally{r==="script"&&(y.engine=b,y.canvas=I),P?.Tools&&(P.Tools.BaseUrl=M,P.Tools.PreprocessUrl=G)}};return r==="script"&&(a=Dv(e,t,n),s=Cv(a),p=s.sceneFunctionName,d=s.createEngineFn?"snippet":"default"),{createEngine:m,createScene:h,getCreateEngineSource:()=>d,getSceneFunctionName:()=>p,initializeMetadataAsync:async()=>{r==="script"&&await l()}}}async function gT(e,t){const r=await Yx(e,ou);return await vT(r,e,t)}async function vT(e,t,r){const o={name:e.name??"",description:e.description??"",tags:e.tags??""},n=e.jsonPayload??e.payload??"{}";let i;try{i=JSON.parse(n)}catch{return{snippetId:t,type:"unknown",metadata:o,rawPayload:n}}const a=eT(i),s=r?.moduleFormat??"esm";switch(a){case"playground":{const c=cT(i,t,o),u=c.manifest?.entry?.replace(/\.tsx?$/i,".js")??"index.js",l=Object.keys(c.files).some($=>/\.tsx?$/i.test($));let d;if(l){const $=(async(g,v)=>await oT(g,v));d=await iT(c.files,$)}else d={...c.files};const p=hT(d,u,s,c.engineType,c.manifest?.imports);await p.initializeMetadataAsync();const m=pT(c.files);return{...c,jsFiles:d,executedCode:d[u]??"",moduleFormat:s,createEngine:p.createEngine,createScene:p.createScene,createEngineSource:p.getCreateEngineSource(),sceneFunctionName:p.getSceneFunctionName(),runtimeFeatures:m,initializeRuntimeAsync:async $=>await fT(m,$)}}case"unknown":return{snippetId:t,type:"unknown",metadata:o,rawPayload:i};default:return tT(i,a,t,o)}}function yT(e,t){return JSON.stringify({payload:e,name:t?.metadata?.name??"",description:t?.metadata?.description??"",tags:t?.metadata?.tags??""})}function _T(e){const t=e.type,r=typeof e.data=="string"?e.data:JSON.stringify(e.data);return JSON.stringify({[t]:r})}function $T(e){const t=e.indexOf("#");return t>=0?e.slice(0,t):e}async function bT(e,t){let r;r=_T(e);const o=yT(r,t),n=(t?.snippetUrl??ou).replace(/\/+$/,""),i=t?.snippetId?$T(t.snippetId):"",a=i?`${n}/${i}`:n,s=await fetch(a,{method:"POST",headers:{"Content-Type":"application/json"},body:o});if(!s.ok)throw new Error(`Failed to save snippet: ${s.status} ${s.statusText}`);const c=await s.json(),u=c.id,l=String(c.version??"0");let d=u;return l&&l!=="0"&&(d+="#"+l),{snippetId:d,id:u,version:l}}const xe=new bi,Ve=new Mx({serverName:"NGE MCP Session Server",documentKind:"node-geometry",managerUnavailableMessage:"Geometry graph manager is not available",getDocument:(e,t)=>e.exportJSON(t.name),setDocument:(e,t,r)=>{const o=e.importJSON(t.name,r);return o&&o!=="OK"?o:void 0}},{defaultPort:3001,statusTitle:"NGE MCP Session Server"});function Bt(e){const t=Ve.getSessionIdForName(e);t&&Ve.notifySessionUpdate(t)}function Rv(e,t){const r=xe.importJSON(e,t);return r==="OK"&&Bt(e),r}const me=new ux({name:"babylonjs-node-geometry",version:"1.0.0"},{instructions:["You build Babylon.js procedural geometry via Node Geometry graphs. Workflow: create_geometry \u2192 add blocks (source geometry blocks like BoxBlock, then transform/math blocks, then GeometryOutputBlock) \u2192 connect ports \u2192 validate_geometry \u2192 export_geometry_json.","Every geometry needs a GeometryOutputBlock. Use get_block_type_info to discover ports before connecting.","Output JSON can be consumed by the Scene MCP via add_node_geometry_mesh."].join(" ")});me.registerResource("block-catalog","nge://block-catalog",{},async e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:`# NGE Block Catalog
|
|
114
|
+
${Tv()}`}]})),me.registerResource("enums","nge://enums",{},async e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:["# NGE Enumerations Reference","","## NodeGeometryBlockConnectionPointTypes","Int (0x0001), Float (0x0002), Vector2 (0x0004), Vector3 (0x0008), Vector4 (0x0010), Matrix (0x0020), Geometry (0x0040), Texture (0x0080), AutoDetect (0x0400), BasedOnInput (0x0800), Undefined (0x1000)","","## NodeGeometryContextualSources (for GeometryInputBlock)","None (0), Positions (1), Normals (2), Tangents (3), UV (4), UV2 (5), UV3 (6), UV4 (7), UV5 (8), UV6 (9), Colors (10), VertexID (11), FaceID (12), GeometryID (13), CollectionID (14), LoopID (15), InstanceID (16), LatticeID (17), LatticeControl (18)","","## MathBlockOperations (for MathBlock)","Add (0), Subtract (1), Multiply (2), Divide (3), Max (4), Min (5)","","## GeometryTrigonometryBlockOperations (for GeometryTrigonometryBlock)","Cos (0), Sin (1), Abs (2), Exp (3), Round (4), Floor (5), Ceiling (6), Sqrt (7), Log (8), Tan (9), ArcTan (10), ArcCos (11), ArcSin (12), Sign (13), Negate (14), OneMinus (15), Reciprocal (16), ToDegrees (17), ToRadians (18), Fract (19), Exp2 (20)","","## ConditionBlockTests (for ConditionBlock)","Equal (0), NotEqual (1), LessThan (2), GreaterThan (3), LessOrEqual (4), GreaterOrEqual (5), Xor (6), Or (7), And (8)","","## BooleanGeometryOperations (for BooleanGeometryBlock)","Intersect (0), Subtract (1), Union (2)","","## RandomBlockLocks (for RandomBlock)","None (0), LoopID (1), InstanceID (2), Once (3)","","## Aggregations (for AggregatorBlock) \u2014 property name: aggregation","Max (0), Min (1), Sum (2). Default: Sum","","## GeometryEaseBlockTypes (for GeometryEaseBlock) \u2014 property name: type","EaseInSine (0), EaseOutSine (1), EaseInOutSine (2), EaseInQuad (3), EaseOutQuad (4), ...","","## MappingTypes (for MappingBlock) \u2014 property name: mapping","Spherical (0), Cylindrical (1), Cubic (2)"].join(`
|
|
115
|
+
`)}]})),me.registerResource("concepts","nge://concepts",{},async e=>({contents:[{uri:e.href,mimeType:"text/markdown",text:["# Node Geometry Concepts","","## What is a Node Geometry?","A Node Geometry is a visual, graph-based procedural geometry builder in Babylon.js.","Instead of creating meshes from code, you connect typed blocks that represent geometry","operations. The graph evaluates at runtime to produce mesh vertex data.","","## Graph Structure \u2014 One Required Output","Every Node Geometry graph MUST have exactly one output block:"," \u2022 **GeometryOutputBlock** \u2014 receives the final Geometry output","Without this block, the geometry cannot be built.","","## GeometryInputBlock \u2014 Contextual Sources & Constants","GeometryInputBlock is the source of all external data entering the graph. It has two modes:","","### Mode 1: Contextual Source","Reads per-vertex/per-face data from the geometry being processed."," \u2022 Set `contextualValue` to one of: Positions, Normals, Tangents, UV, UV2, UV3, UV4, UV5, UV6,"," Colors, VertexID, FaceID, GeometryID, CollectionID, LoopID, InstanceID, LatticeID, LatticeControl"," \u2022 The `type` is automatically derived from the contextual source:"," - Positions/Normals/Tangents/LatticeControl \u2192 Vector3"," - UV/UV2/UV3/UV4/UV5/UV6 \u2192 Vector2"," - Colors \u2192 Vector4"," - VertexID/FaceID/GeometryID/CollectionID/LoopID/InstanceID/LatticeID \u2192 Int","","### Mode 2: Constant Value","Provides a fixed value of a specific type."," \u2022 Set `type` to: Int, Float, Vector2, Vector3, Vector4, Matrix"," \u2022 Set `value` to the constant (number, or {x,y}, {x,y,z}, {x,y,z,w}, or flat array)","","## Source Blocks \u2014 Built-in Primitives","These blocks generate mesh geometry directly without needing inputs:"," \u2022 BoxBlock, SphereBlock, CylinderBlock, PlaneBlock, TorusBlock, DiscBlock"," \u2022 CapsuleBlock, IcoSphereBlock, GridBlock, NullBlock, MeshBlock, PointListBlock","All dimension inputs (size, width, height, diameter, segments, subdivisions, etc.) are OPTIONAL INPUT","PORTS with sensible defaults. To override them, add a GeometryInputBlock (type Float or Int) with","the desired constant value and connect it to that port:"," Example: connect GeometryInputBlock(Float, value=10) \u2192 PlaneBlock.size"," Example: connect GeometryInputBlock(Float, value=0.5) \u2192 SphereBlock.diameter","You do NOT need to add inputs for dimensions you want to keep at their defaults.","","## The Simplest Geometry Graph","```","BoxBlock.geometry \u2192 GeometryOutputBlock.geometry","```","That's it \u2014 one source block connected to the output. This generates a default box.","","## Transforming Geometry","Use GeometryTransformBlock to translate, rotate, or scale geometry.","It accepts geometry on 'value' and has built-in translation/rotation/scaling inputs:","```","BoxBlock.geometry \u2192 GeometryTransformBlock.value","GeometryInputBlock(Vector3, value={x:0,y:2,z:0}) \u2192 GeometryTransformBlock.translation","GeometryTransformBlock.output \u2192 GeometryOutputBlock.geometry","```","Alternatively, wire a TranslationBlock (or RotationXBlock/ScalingBlock) to the 'matrix' input","for more complex multi-step transforms:","```","GeometryInputBlock(Vector3, {x:0,y:2,z:0}) \u2192 TranslationBlock.translation","TranslationBlock.matrix \u2192 GeometryTransformBlock.matrix","```","","## Merging Geometries","Use MergeGeometryBlock to combine multiple geometries:","```","BoxBlock.geometry \u2192 MergeGeometryBlock.geometry0","SphereBlock.geometry \u2192 MergeGeometryBlock.geometry1","MergeGeometryBlock.output \u2192 GeometryOutputBlock.geometry","```","","## Boolean Operations","Use BooleanGeometryBlock for CSG operations (Intersect, Subtract, Union):","```","BoxBlock.geometry \u2192 BooleanGeometryBlock.geometry0","SphereBlock.geometry \u2192 BooleanGeometryBlock.geometry1","BooleanGeometryBlock.output \u2192 GeometryOutputBlock.geometry","```","","## Instancing / Scattering","Create copies of geometry arranged in patterns:"," \u2022 InstantiateLinearBlock \u2014 line of copies along a direction"," \u2022 InstantiateRadialBlock \u2014 copies arranged in a circle"," \u2022 InstantiateOnFacesBlock \u2014 scatter copies on faces of source geometry"," \u2022 InstantiateOnVerticesBlock \u2014 place copies at vertices of source geometry"," \u2022 InstantiateOnVolumeBlock \u2014 scatter copies inside a volume","","## Per-Vertex Modification","Use Set blocks (evaluateContext=true, the default) to modify vertices individually:","```","BoxBlock.geometry \u2192 SetPositionsBlock.geometry","GeometryInputBlock(contextualValue:'Positions') \u2192 MathBlock.left (positions, Vector3)","NoiseBlock.output \u2192 VectorConverterBlock['x '] \u2192 VectorConverterBlock.xyz \u2192 MathBlock.right","MathBlock.output \u2192 SetPositionsBlock.positions","SetPositionsBlock.output \u2192 GeometryOutputBlock.geometry","```","Notes:"," \u2022 SetPositionsBlock.positions is a REQUIRED input (must be connected)."," \u2022 NoiseBlock outputs a Float; use VectorConverterBlock to lift it to Vector3."," \u2022 The MathBlock operation should be set to Add (0) via properties: { operation: 0 }.","","## VectorConverterBlock \u2014 Important: Trailing-Space Input Names","VectorConverterBlock input port names have a TRAILING SPACE to disambiguate from outputs:"," Inputs: 'xyzw ' (Vector4), 'xyz ' (Vector3), 'xy ' (Vector2), 'zw ' (Vector2),"," 'x ' (Float), 'y ' (Float), 'z ' (Float), 'w ' (Float)"," Outputs: 'xyzw' (Vector4), 'xyz' (Vector3), 'xy' (Vector2), 'zw' (Vector2),"," 'x' (Float), 'y' (Float), 'z' (Float), 'w' (Float)","When calling connect_blocks to a VectorConverterBlock INPUT, you MUST include the trailing space:"," connect_blocks(sourceId, 'output', vectorConverterId, 'x ') \u2190 note the space"," connect_blocks(vectorConverterId, 'xyz', targetId, ...) \u2190 outputs have no space","","## IntFloatConverterBlock \u2014 Same Trailing-Space Pattern","Inputs: 'float ' (Float), 'int ' (Int)","Outputs: 'float' (Float), 'int' (Int)","","## Common Mistakes","1. Forgetting GeometryOutputBlock \u2192 geometry cannot be built","2. Creating GeometryInputBlock without contextualValue or value \u2192 no data provided","3. Setting evaluateContext=false on Set blocks when per-vertex behaviour is needed","4. Not connecting the geometry flow \u2014 every path must link back to GeometryOutputBlock","5. Omitting trailing space on VectorConverterBlock / IntFloatConverterBlock inputs","6. Leaving SetPositionsBlock.positions unconnected (required, not optional)"].join(`
|
|
116
|
+
`)}]})),me.registerPrompt("create-box-geometry",{description:"Step-by-step instructions for building a simple box geometry"},()=>({messages:[{role:"user",content:{type:"text",text:["Create a simple box geometry. Steps:","1. create_geometry with name 'MyBox'","2. Add BoxBlock named 'box'","3. Add GeometryOutputBlock named 'output'","4. Connect box.geometry \u2192 output.geometry","5. validate_geometry, then export_geometry_json"].join(`
|
|
117
|
+
`)}}]})),me.registerPrompt("create-scattered-instances",{description:"Step-by-step instructions for scattering instances of a geometry on the faces of another"},()=>({messages:[{role:"user",content:{type:"text",text:["Create a geometry that scatters small spheres on the faces of a plane.","NOTE: PlaneBlock and SphereBlock inputs (size, diameter) are INPUT PORTS, not scalar properties.","To set them, add a GeometryInputBlock (type Float) with the desired value and connect it.","","Steps:","1. create_geometry with name 'ScatteredSpheres'","2. Add PlaneBlock named 'basePlane'","3. Add GeometryInputBlock named 'planeSize' with type 'Float', value 10","4. Connect planeSize.output \u2192 basePlane.size","5. Add SphereBlock named 'smallSphere'","6. Add GeometryInputBlock named 'sphereDiam' with type 'Float', value 0.2","7. Connect sphereDiam.output \u2192 smallSphere.diameter","8. Add GeometryInputBlock named 'count' with type 'Int', value 100","9. Add InstantiateOnFacesBlock named 'scatter'","10. Connect basePlane.geometry \u2192 scatter.geometry","11. Connect smallSphere.geometry \u2192 scatter.instance","12. Connect count.output \u2192 scatter.count","13. Add GeometryOutputBlock named 'output'","14. Connect scatter.output \u2192 output.geometry","15. validate_geometry, then export_geometry_json"].join(`
|
|
118
|
+
`)}}]})),me.registerPrompt("create-deformed-terrain",{description:"Create a subdivided plane deformed by noise to produce terrain-like geometry"},()=>({messages:[{role:"user",content:{type:"text",text:["Create a terrain by deforming a subdivided grid with noise.","NOTE: Input values (subdivisions, scale) are INPUT PORTS fed by GeometryInputBlocks.","","Steps:","1. create_geometry 'Terrain'","2. Add GridBlock named 'grid'","3. Add GeometryInputBlock 'gridSize' type Float, value 20 \u2192 connect to grid.size","4. Add GeometryInputBlock 'subdivs' type Int, value 64 \u2192 connect to grid.subdivisions","5. Add SetPositionsBlock named 'setPos'","6. Connect grid.geometry \u2192 setPos.geometry","7. Add Positions contextual input: GeometryInputBlock 'positions' contextualValue 'Positions' (Vector3)","8. Add NoiseSampleBlock named 'noise'","9. Connect positions.output \u2192 noise.position","10. Add GeometryInputBlock 'noiseScale' type Float, value 0.15 \u2192 noise.amplitude","11. Add VectorConverterBlock (or compose) to turn noise.output (Float) into a Y-offset Vector3:"," a. Add GeometryInputBlock 'zero' type Float, value 0"," b. Add CreateVector3Block 'offset' \u2014 connect zero\u2192x, noise.output\u2192y, zero\u2192z","12. Add AddBlock 'displaced' \u2014 connect positions\u2192left, offset\u2192right","13. Connect displaced.output \u2192 setPos.positions","14. Add ComputeNormalsBlock 'normals' \u2014 connect setPos.output \u2192 normals.geometry","15. Add GeometryOutputBlock 'output' \u2014 connect normals.output \u2192 output.geometry","16. validate_geometry, then export_geometry_json"].join(`
|
|
119
|
+
`)}}]})),me.registerTool("create_geometry",{description:"Create a new empty Node Geometry graph in memory. This is always the first step.",inputSchema:{name:k().describe("Unique name for the geometry (e.g. 'MyTerrain', 'TreeGenerator')"),comment:k().optional().describe("An optional description of what this geometry does")}},async({name:e,comment:t})=>{xe.createGeometry(e,t);const r=await Ve.startAsync(xe),o=Ve.createSession(e),n=Ve.getSessionUrl(o,r);return{content:[{type:"text",text:`Created geometry "${e}". Now add blocks with add_block, connect them with connect_blocks, then export with export_geometry_json.
|
|
120
|
+
|
|
121
|
+
MCP Session URL: ${n}`}]}}),me.registerTool("get_session_url",{description:"Get or create a live-session URL for a geometry. The URL can be pasted into the Node Geometry Editor MCP session panel.",inputSchema:{geometryName:k().describe("Name of the geometry")}},async({geometryName:e})=>{if(!xe.listGeometries().includes(e))return It(`Geometry "${e}" not found.`);const r=await Ve.startAsync(xe),o=Ve.createSession(e),n=Ve.getSessionUrl(o,r);return Nt(`MCP Session URL: ${n}`)}),me.registerTool("start_session",{description:"Start a live session for an existing geometry. If a session already exists for this geometry, returns the existing URL.",inputSchema:{geometryName:k().describe("Name of the geometry")}},async({geometryName:e})=>{if(!xe.listGeometries().includes(e))return It(`Geometry "${e}" not found.`);const r=await Ve.startAsync(xe),o=Ve.createSession(e),n=Ve.getSessionUrl(o,r);return Nt(`MCP Session URL: ${n}`)}),me.registerTool("close_session",{description:"Close a live session for a geometry. Disconnects all SSE subscribers in the editor and removes the session. The geometry itself is NOT deleted.",inputSchema:{geometryName:k().describe("Name of the geometry whose session to close")}},async({geometryName:e})=>Ve.closeSessionForName(e)?Nt(`Session for "${e}" closed. The editor will disconnect.`):Nt(`No active session for "${e}".`)),me.registerTool("stop_session_server",{description:"Stop the live MCP editor session server started by this MCP process. This closes all active sessions, disconnects editors, and releases the port."},async()=>(await Ve.stopAsync(),Nt("MCP session server stopped. Any connected editors have been disconnected."))),me.registerTool("delete_geometry",{description:"Delete a geometry graph from memory.",inputSchema:{name:k().describe("Name of the geometry to delete")}},async({name:e})=>(Ve.closeSessionForName(e),{content:[{type:"text",text:xe.deleteGeometry(e)?`Deleted "${e}".`:`Geometry "${e}" not found.`}]})),me.registerTool("clear_all",{description:"Remove all geometry graphs from memory, resetting the server to a clean state."},async()=>{const e=xe.listGeometries();for(const t of e)Ve.closeSessionForName(t);return xe.clearAll(),{content:[{type:"text",text:e.length>0?`Cleared ${e.length} geometry(s): ${e.join(", ")}`:"Nothing to clear \u2014 memory was already empty."}]}}),me.registerTool("list_geometries",{description:"List all geometry graphs currently in memory."},async()=>{const e=xe.listGeometries();return{content:[{type:"text",text:e.length>0?`Geometries in memory:
|
|
122
|
+
${e.map(t=>` \u2022 ${t}`).join(`
|
|
123
|
+
`)}`:"No geometries in memory."}]}}),me.registerTool("add_block",{description:"Add a new block to a geometry graph. Returns the block's id for use in connect_blocks.",inputSchema:{geometryName:k().describe("Name of the geometry to add the block to"),blockType:k().describe("The block type from the registry (e.g. 'BoxBlock', 'GeometryInputBlock', 'MergeGeometryBlock', 'SetPositionsBlock', 'InstantiateOnFacesBlock', etc.). Use list_block_types to see all."),name:k().optional().describe("Human-friendly name for this block instance (e.g. 'myBox', 'positions')"),properties:he(k(),ve()).optional().describe("Key-value properties to set on the block. For GeometryInputBlock: type (Int/Float/Vector2/Vector3/Vector4/Matrix), contextualValue (None/Positions/Normals/UV/VertexID/FaceID/etc.), value (the constant value), min/max (number). For MathBlock: operation (MathBlockOperations: 0=Add/1=Subtract/2=Multiply/3=Divide/4=Max/5=Min). For BooleanGeometryBlock: operation (BooleanGeometryOperations: 0=Intersect/1=Subtract/2=Union). For GeometryTrigonometryBlock: operation (GeometryTrigonometryBlockOperations: 0=Cos/1=Sin/2=Abs/3=Exp/4=Round.../19=Fract/20=Exp2). For ConditionBlock: test (ConditionBlockTests: 0=Equal/1=NotEqual/2=LessThan...). Many blocks support evaluateContext (boolean) for per-vertex evaluation.")}},async({geometryName:e,blockType:t,name:r,properties:o})=>{const n=xe.addBlock(e,t,r,o);if(typeof n=="string")return{content:[{type:"text",text:`Error: ${n}`}],isError:!0};Bt(e);const i=[`Added block [${n.block.id}] "${n.block.name}" (${t}). Use this id (${n.block.id}) to connect it.`];return n.warnings&&i.push("","Warnings:",...n.warnings),{content:[{type:"text",text:i.join(`
|
|
124
|
+
`)}]}}),me.registerTool("add_blocks_batch",{description:"Add multiple blocks at once. More efficient than calling add_block repeatedly. Returns all created block ids.",inputSchema:{geometryName:k().describe("Name of the geometry"),blocks:ae(U({blockType:k().describe("Block type name"),blockName:k().optional().describe("Instance name for the block"),name:k().optional().describe("Instance name (alias for blockName)"),properties:he(k(),ve()).optional().describe("Block properties")})).describe("Array of blocks to add")}},async({geometryName:e,blocks:t})=>{const r=[];let o=!1;for(const n of t){const i=n.blockName??n.name,a=xe.addBlock(e,n.blockType,i,n.properties);if(typeof a=="string")r.push(`Error adding ${n.blockType}: ${a}`);else{o=!0;let s=`[${a.block.id}] ${a.block.name} (${n.blockType})`;a.warnings&&(s+=`
|
|
125
|
+
\u26A0 ${a.warnings.join(`
|
|
126
|
+
\u26A0 `)}`),r.push(s)}}return o&&Bt(e),{content:[{type:"text",text:`Added blocks:
|
|
127
|
+
${r.join(`
|
|
128
|
+
`)}`}]}}),me.registerTool("remove_block",{description:"Remove a block from a geometry graph. Also removes any connections to/from it.",inputSchema:{geometryName:k().describe("Name of the geometry"),blockId:ie().describe("The block id to remove")}},async({geometryName:e,blockId:t})=>{const r=xe.removeBlock(e,t);return r==="OK"&&Bt(e),{content:[{type:"text",text:r==="OK"?`Removed block ${t}.`:`Error: ${r}`}],isError:r!=="OK"}}),me.registerTool("set_block_properties",{description:"Set or update properties on an existing block (e.g. change a GeometryInputBlock value, set a MathBlock operation, toggle evaluateContext).",inputSchema:{geometryName:k().describe("Name of the geometry"),blockId:ie().describe("The block id to modify"),properties:he(k(),ve()).describe("Key-value properties to set. Same keys as add_block's properties parameter.")}},async({geometryName:e,blockId:t,properties:r})=>{const o=xe.setBlockProperties(e,t,r);return o==="OK"&&Bt(e),{content:[{type:"text",text:o==="OK"?`Updated block ${t}.`:`Error: ${o}`}],isError:o!=="OK"}}),me.registerTool("connect_blocks",{description:"Connect an output of one block to an input of another block. Data flows from source output \u2192 target input.",inputSchema:{geometryName:k().describe("Name of the geometry"),sourceBlockId:ie().describe("Block id to connect FROM (the one with the output)"),outputName:k().describe("Name of the output on the source block (e.g. 'output', 'geometry', 'matrix')"),targetBlockId:ie().describe("Block id to connect TO (the one with the input)"),inputName:k().describe("Name of the input on the target block (e.g. 'geometry', 'value', 'positions')")}},async({geometryName:e,sourceBlockId:t,outputName:r,targetBlockId:o,inputName:n})=>{const i=xe.connectBlocks(e,t,r,o,n);return i==="OK"&&Bt(e),{content:[{type:"text",text:i==="OK"?`Connected [${t}].${r} \u2192 [${o}].${n}`:`Error: ${i}`}],isError:i!=="OK"}}),me.registerTool("connect_blocks_batch",{description:"Connect multiple block pairs at once. More efficient than calling connect_blocks repeatedly.",inputSchema:{geometryName:k().describe("Name of the geometry"),connections:ae(U({sourceBlockId:ie(),outputName:k(),targetBlockId:ie(),inputName:k()})).describe("Array of connections to make")}},async({geometryName:e,connections:t})=>{const r=[];let o=!1;for(const n of t){const i=xe.connectBlocks(e,n.sourceBlockId,n.outputName,n.targetBlockId,n.inputName);i==="OK"?(o=!0,r.push(`[${n.sourceBlockId}].${n.outputName} \u2192 [${n.targetBlockId}].${n.inputName}`)):r.push(`Error: ${i}`)}return o&&Bt(e),{content:[{type:"text",text:`Connections:
|
|
129
|
+
${r.join(`
|
|
130
|
+
`)}`}]}}),me.registerTool("disconnect_input",{description:"Disconnect an input on a block (remove an existing connection).",inputSchema:{geometryName:k().describe("Name of the geometry"),blockId:ie().describe("The block id whose input to disconnect"),inputName:k().describe("Name of the input to disconnect")}},async({geometryName:e,blockId:t,inputName:r})=>{const o=xe.disconnectInput(e,t,r);return o==="OK"&&Bt(e),{content:[{type:"text",text:o==="OK"?`Disconnected [${t}].${r}`:`Error: ${o}`}],isError:o!=="OK"}}),me.registerTool("describe_geometry",{description:"Get a human-readable description of the current state of a geometry graph, including all blocks and their connections.",inputSchema:{geometryName:k().describe("Name of the geometry to describe")}},async({geometryName:e})=>({content:[{type:"text",text:xe.describeGeometry(e)}]})),me.registerTool("describe_block",{description:"Get detailed information about a specific block instance in a geometry, including its connections and properties.",inputSchema:{geometryName:k().describe("Name of the geometry"),blockId:ie().describe("The block id to describe")}},async({geometryName:e,blockId:t})=>({content:[{type:"text",text:xe.describeBlock(e,t)}]})),me.registerTool("list_block_types",{description:"List all available NGE block types, grouped by category. Use this to discover which blocks you can add.",inputSchema:{category:k().optional().describe("Optionally filter by category (Source, Geometry, Set, Instance, Math, Vector, Color, Matrix, Converter, Texture, Utility, Teleport, Input, Output, Mapping)")}},async({category:e})=>{if(e){const t=Object.entries(En).filter(([,r])=>r.category.toLowerCase()===e.toLowerCase()).map(([r,o])=>` ${r}: ${o.description.split(".")[0]}`).join(`
|
|
131
|
+
`);return{content:[{type:"text",text:t.length>0?`## ${e} Blocks
|
|
132
|
+
${t}`:`No blocks found in category "${e}".`}]}}return{content:[{type:"text",text:Tv()}]}}),me.registerTool("get_block_type_info",{description:"Get detailed info about a specific block type \u2014 its inputs, outputs, properties, and description.",inputSchema:{blockType:k().describe("The block type name (e.g. 'BoxBlock', 'GeometryInputBlock', 'InstantiateOnFacesBlock')")}},async({blockType:e})=>{const t=Bx(e);if(!t)return{content:[{type:"text",text:`Block type "${e}" not found. Use list_block_types to see available types.`}],isError:!0};const r=[];r.push(`## ${e}`),r.push(`Category: ${t.category}`),r.push(`Description: ${t.description}`),r.push(`
|
|
133
|
+
### Inputs:`),t.inputs.length===0&&r.push(" (none)");for(const o of t.inputs){const n=o.isOptional?" (optional)":" (required)";r.push(` \u2022 ${o.name}: ${o.type}${n}`)}r.push(`
|
|
134
|
+
### Outputs:`),t.outputs.length===0&&r.push(" (none)");for(const o of t.outputs)r.push(` \u2022 ${o.name}: ${o.type}`);if(t.properties){r.push(`
|
|
135
|
+
### Configurable Properties:`);for(const[o,n]of Object.entries(t.properties))r.push(` \u2022 ${o}: ${n}`)}return{content:[{type:"text",text:r.join(`
|
|
136
|
+
`)}]}}),me.registerTool("validate_geometry",{description:"Run validation checks on a geometry graph. Reports missing output block, unconnected required inputs, and broken references.",inputSchema:{geometryName:k().describe("Name of the geometry to validate")}},async({geometryName:e})=>{const t=xe.validateGeometry(e);return{content:[{type:"text",text:t.join(`
|
|
137
|
+
`)}],isError:t.some(r=>r.startsWith("ERROR"))}}),me.registerTool("export_geometry_json",{description:"Export the geometry graph as NGE-compatible JSON. This JSON can be loaded in the Babylon.js Node Geometry Editor or via NodeGeometry.Parse() at runtime. When outputFile is provided, the JSON is written to disk and only the file path is returned (avoids large JSON payloads in the conversation context).",inputSchema:{geometryName:k().describe("Name of the geometry to export"),outputFile:wx(Ro)}},async({geometryName:e,outputFile:t})=>$x({jsonText:xe.exportJSON(e),outputFile:t,missingMessage:`Geometry "${e}" not found.`,fileLabel:"NGE JSON"})),me.registerTool("import_geometry_json",{description:"Import an existing NGE JSON into memory for editing. You can then modify blocks, connections, etc. Provide either the inline json string OR a jsonFile path (not both).",inputSchema:{geometryName:k().describe("Name to give the imported geometry"),json:Ix(Ro,"The NGE JSON string to import"),jsonFile:Ox(Ro,"Absolute path to a file containing the NGE JSON to import (alternative to inline json)")}},async({geometryName:e,json:t,jsonFile:r})=>bx({json:t,jsonFile:r,fileDescription:"NGE JSON file",importJson:o=>Rv(e,o),describeImported:()=>xe.describeGeometry(e)})),me.registerTool("import_from_snippet",{description:'Import a Node Geometry from the Babylon.js Snippet Server by its snippet ID. The snippet is fetched, validated as a nodeGeometry type, and loaded into memory for editing. Snippet IDs look like "ABC123" or "ABC123#2" (with revision).',inputSchema:{geometryName:k().describe("Name to give the imported geometry in memory"),snippetId:xx(Ro)}},async({geometryName:e,snippetId:t})=>await Sx({snippetId:t,loadSnippet:async r=>await gT(r),createResponse:r=>kx({snippetId:t,snippetResult:r,expectedType:"nodeGeometry",importJson:o=>Rv(e,o),describeImported:()=>xe.describeGeometry(e),successMessage:`Imported snippet "${t}" as "${e}" successfully.`})})),me.registerTool("get_snippet_url",{description:"Generate a URL that opens the geometry in the online Babylon.js Node Geometry Editor. The JSON is encoded in the URL fragment.",inputSchema:{geometryName:k().describe("Name of the geometry")}},async({geometryName:e})=>{const t=xe.exportJSON(e);return t?{content:[{type:"text",text:`Open this geometry in the NGE editor:
|
|
138
|
+
${`https://nge.babylonjs.com/#${Buffer.from(t).toString("base64")}`}
|
|
139
|
+
|
|
140
|
+
Note: For very large geometries, use the snippet server instead.`}]}:{content:[{type:"text",text:`Geometry "${e}" not found.`}],isError:!0}}),me.registerTool("save_snippet",{description:"Save the geometry to the Babylon.js Snippet Server and return the snippet ID and version. The snippet can later be loaded in the Node Geometry Editor via its snippet ID, or fetched with import_from_snippet. To create a new revision of an existing snippet, pass the previous snippetId.",inputSchema:{geometryName:k().describe("Name of the geometry to save"),snippetId:k().optional().describe('Optional existing snippet ID to create a new revision of (e.g. "ABC123" or "ABC123#1")'),name:k().optional().describe("Optional human-readable title for the snippet"),description:k().optional().describe("Optional description"),tags:k().optional().describe("Optional comma-separated tags")}},async({geometryName:e,snippetId:t,name:r,description:o,tags:n})=>{const i=xe.exportJSON(e);if(!i)return{content:[{type:"text",text:`Geometry "${e}" not found.`}],isError:!0};try{const a=await bT({type:"nodeGeometry",data:wv({jsonText:i,jsonLabel:"NGE JSON"})},{snippetId:t,metadata:{name:r,description:o,tags:n}});return{content:[{type:"text",text:`Saved geometry "${e}" to snippet server.
|
|
141
|
+
|
|
142
|
+
Snippet ID: ${a.id}
|
|
143
|
+
Version: ${a.version}
|
|
144
|
+
Full ID: ${a.snippetId}
|
|
145
|
+
|
|
146
|
+
Load in NGE editor: https://nge.babylonjs.com/#${a.snippetId}`}]}}catch(a){return{content:[{type:"text",text:`Error saving snippet: ${a.message}`}],isError:!0}}});async function kT(){const e=new hx;await me.connect(e),console.error("Babylon.js Node Geometry Editor MCP Server running on stdio")}try{await kT()}catch(e){console.error("Fatal error:",e),process.exit(1)}const Av=()=>{Ve.stopAsync(),process.exit(0)};process.on("SIGINT",Av),process.on("SIGTERM",Av);
|
|
147
|
+
//# sourceMappingURL=nge-mcp-server.js.map
|